body {
    background: #f9fafb;
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-weight: 400;
    margin: 0;
}

.panel-layout {
    display: flex;
    min-height: calc(100vh - 60px);
}

/* Sidebar */
.sidebar {
    width: 220px;
    background: #ffffff;
    border-right: 1px solid rgba(0,0,0,0.08);
    padding: 24px 0;
    flex-shrink: 0;
    position: sticky;
    top: 60px;
    height: calc(100vh - 60px);
    overflow-y: auto;
}

.sidebar-section { padding: 0 16px; margin-bottom: 8px; }

.sidebar-label {
    font-size: 11px;
    font-weight: 600;
    color: #adb2b8;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    padding: 0 8px;
    margin-bottom: 4px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 10px;
    border-radius: 8px;
    font-size: 14px;
    color: #374151;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    font-family: inherit;
}

.sidebar-link:hover { background: #f3f4f6; }
.sidebar-link.active { background: #f3f4f6; font-weight: 600; color: #000; }
.sidebar-link svg { flex-shrink: 0; opacity: 0.6; }
.sidebar-link.active svg { opacity: 1; }

.sidebar-divider { border: none; border-top: 1px solid rgba(0,0,0,0.07); margin: 12px 16px; }

/* Main content */
.panel-main {
    flex: 1;
    padding: 32px;
    max-width: 900px;
    min-width: 0;
}

.panel-section { display: none; }
.panel-section.active { display: block; }

.section-title { font-size: 20px; font-weight: 700; color: #000; margin: 0 0 6px 0; }
.section-subtitle { font-size: 13px; color: #6b7280; margin: 0 0 24px 0; }

/* Token create */
.create-token-bar { display: flex; gap: 10px; margin-bottom: 24px; }

.token-name-input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: 50px;
    font-size: 14px;
    background: #fff;
    color: #000;
    font-family: inherit;
    transition: border-color 0.2s;
    min-width: 0;
}

.token-name-input:focus { outline: none; border-color: rgba(0,0,0,0.25); }
.token-name-input::placeholder { color: #adb2b8; }

.btn-create {
    padding: 10px 20px;
    background: #000;
    color: #fff;
    border: none;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
    white-space: nowrap;
}

.btn-create:hover { background: #1a1a1a; transform: translateY(-1px); }

/* Token list */
.token-card {
    background: #fff;
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: 12px;
    margin-bottom: 10px;
    overflow: hidden;
}

.token-card-header {
    display: flex;
    align-items: center;
    padding: 14px 16px;
    gap: 12px;
    cursor: pointer;
    user-select: none;
}

.token-card-header:hover { background: #fafafa; }

.token-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #22c55e;
    flex-shrink: 0;
}

.token-status-dot.expired { background: #ef4444; }

.token-name { font-size: 14px; font-weight: 600; color: #000; flex: 1; min-width: 0; }

.token-uuid-short { font-size: 12px; color: #9ca3af; font-family: monospace; white-space: nowrap; }

.token-expand-icon { color: #9ca3af; font-size: 12px; flex-shrink: 0; }
.token-card.expanded .token-expand-icon { transform: rotate(180deg); }

.token-card-body {
    display: none;
    padding: 0 16px 16px;
    border-top: 1px solid rgba(0,0,0,0.06);
}

.token-card.expanded .token-card-body { display: block; }

.token-detail-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.token-detail-label { font-size: 12px; color: #6b7280; width: 80px; flex-shrink: 0; }

.token-detail-value {
    font-size: 13px;
    color: #111;
    font-family: monospace;
    background: #f3f4f6;
    padding: 4px 10px;
    border-radius: 6px;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

.btn-copy {
    padding: 4px 10px;
    background: #f3f4f6;
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.15s;
    color: #374151;
    white-space: nowrap;
}

.btn-copy:hover { background: #e5e7eb; }

.btn-revoke {
    margin-top: 14px;
    padding: 8px 16px;
    background: #fff;
    color: #ef4444;
    border: 1px solid #fecaca;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s;
}

.btn-revoke:hover { background: #fef2f2; }

.token-activity { margin-top: 14px; }

.activity-title {
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.activity-item {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #374151;
    padding: 5px 0;
    border-bottom: 1px solid #f3f4f6;
}

.activity-item:last-child { border-bottom: none; }
.activity-time { color: #9ca3af; }

.empty-state { text-align: center; padding: 48px 0; color: #9ca3af; font-size: 14px; }

/* New token banner */
.new-token-banner {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 20px;
    display: none;
}

.new-token-banner.show { display: block; }

.new-token-banner-title { font-size: 13px; font-weight: 600; color: #15803d; margin-bottom: 8px; }

.new-token-value {
    font-family: monospace;
    font-size: 13px;
    background: #fff;
    border: 1px solid #bbf7d0;
    border-radius: 8px;
    padding: 8px 12px;
    word-break: break-all;
    color: #111;
    display: flex;
    align-items: center;
    gap: 8px;
}

.new-token-text { flex: 1; }
.new-token-warn { font-size: 12px; color: #16a34a; margin-top: 8px; }

/* Amount buttons */
.amount-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 12px;
}

.amount-btn {
    padding: 9px 0;
    background: #f9fafb;
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    color: #374151;
    transition: background 0.15s, border-color 0.15s;
}

.amount-btn:hover, .amount-btn.selected { background: #000; color: #fff; border-color: #000; }

/* User info */
.user-info-card {
    background: #fff;
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 20px;
}

.user-avatar {
    width: 48px;
    height: 48px;
    background: #000;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 12px;
}

.user-name { font-size: 18px; font-weight: 700; color: #000; }
.user-balance { font-size: 13px; color: #6b7280; margin-top: 4px; }

.info-row { display: flex; gap: 16px; margin-top: 16px; flex-wrap: wrap; }

.info-stat { background: #f9fafb; border-radius: 8px; padding: 10px 16px; text-align: center; }
.info-stat-val { font-size: 20px; font-weight: 700; color: #000; }
.info-stat-label { font-size: 11px; color: #9ca3af; margin-top: 2px; }

.error-message {
    color: #dc2626;
    font-size: 13px;
    padding: 10px 14px;
    background: #fef2f2;
    border-radius: 10px;
    border: 1px solid #fee2e2;
    margin-bottom: 16px;
    display: none;
}

/* Mobile bottom nav */
.mobile-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    border-top: 1px solid rgba(0,0,0,0.08);
    z-index: 100;
    padding: 8px 0 env(safe-area-inset-bottom, 8px);
}

.mobile-nav-inner {
    display: flex;
    justify-content: space-around;
}

.mobile-nav-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 6px 16px;
    border: none;
    background: none;
    cursor: pointer;
    font-family: inherit;
    font-size: 11px;
    color: #9ca3af;
    border-radius: 8px;
    transition: color 0.15s;
}

.mobile-nav-btn.active { color: #000; }
.mobile-nav-btn svg { opacity: 0.5; }
.mobile-nav-btn.active svg { opacity: 1; }

@media (max-width: 640px) {
    .sidebar { display: none; }

    .mobile-nav { display: block; }

    .panel-main {
        padding: 16px 16px 80px;
        max-width: 100%;
    }

    .create-token-bar { flex-wrap: wrap; }
    .create-token-bar .token-name-input { min-width: 0; }
    .create-token-bar .btn-create { width: 100%; }

    .amount-grid { grid-template-columns: repeat(2, 1fr); }

    .token-detail-row { flex-wrap: wrap; }
    .token-detail-value { width: 100%; flex: none; }
    .btn-copy { align-self: flex-start; }

    .user-info-card { padding: 16px; }
}

/* Getting started */
.start-step {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
    background: #fff;
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: 12px;
    padding: 20px;
}

.start-step-num {
    width: 28px;
    height: 28px;
    background: #000;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    flex-shrink: 0;
}

.start-step-body { flex: 1; min-width: 0; }

.start-step-title { font-size: 14px; font-weight: 700; color: #000; margin-bottom: 6px; }

.start-step-desc { font-size: 13px; color: #6b7280; line-height: 1.6; }

.start-code {
    font-family: monospace;
    font-size: 13px;
    background: #f3f4f6;
    border-radius: 8px;
    padding: 8px 12px;
    margin-top: 10px;
    color: #111;
    word-break: break-all;
}

.start-code-block {
    background: #1a1a1a;
    border-radius: 10px;
    padding: 14px 16px;
    margin-top: 12px;
    font-family: monospace;
    font-size: 13px;
    line-height: 1.7;
}

.start-code-line { color: #e5e7eb; }

.start-code-comment { color: #6b7280; }

.start-code-arg { color: #86efac; }

.start-link {
    background: none;
    border: none;
    color: #000;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    font-size: inherit;
    padding: 0;
    text-decoration: underline;
    text-underline-offset: 2px;
}
