:root {
    --primary: #3b82f6;
    --primary-bg: #eff6ff;
    --bg-body: #f0f7ff;
    --bg-white: #ffffff;
    --text-main: #1f2937;
    --text-sub: #6b7280;
    --border: #e2e8f0;
    --radius: 1rem;
    --shadow: 0 4px 20px rgba(0,0,0,0.04);
    --shadow-active: 0 8px 30px rgba(0,0,0,0.06);
    --sidebar-w: 240px;
    --header-h: 3.5rem;
}

html {
    font-size: clamp(15px, 0.5vw + 13px, 19px);
}

* { margin:0; padding:0; box-sizing:border-box; }

body {
    background: var(--bg-body);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei UI', 'Microsoft YaHei', sans-serif;
    color: var(--text-main);
    min-height: 100vh;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

.hidden { display: none !important; }

/* ==================== Sidebar ==================== */
.sidebar {
    position: fixed; top: 0; left: 0; bottom: 0;
    width: var(--sidebar-w);
    background: var(--bg-white);
    border-right: 1px solid var(--border);
    display: flex; flex-direction: column;
    z-index: 200;
    overflow-y: auto;
}

.sidebar-header {
    display: flex; align-items: center; gap: 0.625rem;
    padding: 1.25rem 1.25rem 1rem;
    font-weight: 600; font-size: 1rem; color: var(--primary);
}

.logo-img {
    width: 2.25rem; height: 2.25rem; border-radius: 0.5rem;
    object-fit: cover; flex-shrink: 0;
}

.sidebar-nav { flex: 1; padding: 0.25rem 0.625rem; }

.nav-section { display: flex; flex-direction: column; gap: 0.125rem; }

.nav-item {
    display: flex; align-items: center; gap: 0.625rem;
    padding: 0.625rem 0.875rem; border-radius: 0.625rem;
    font-size: 0.875rem; font-weight: 500; color: var(--text-sub);
    text-decoration: none; transition: all .2s; position: relative;
    cursor: pointer; border: none; background: none; width: 100%;
}

.nav-item:hover { background: #f8fafc; color: var(--text-main); }

.nav-item.active {
    background: var(--primary-bg); color: var(--primary); font-weight: 600;
}

.nav-item.active::before {
    content: ''; position: absolute; left: 0; top: 0.5rem; bottom: 0.5rem;
    width: 3px; border-radius: 0 3px 3px 0; background: var(--primary);
}

.nav-item i:first-child { font-size: 1.125rem; width: 1.25rem; text-align: center; }

.nav-ext-icon { font-size: 0.75rem; margin-left: auto; opacity: .4; }

.nav-divider { height: 1px; background: var(--border); margin: 0.5rem 0.875rem; }

.sidebar-footer {
    padding: 0.625rem; border-top: 1px solid var(--border);
}

.nav-back-v1 { opacity: .6; font-size: 0.8125rem; }
.nav-back-v1:hover { opacity: 1; }

/* 同Key续费 - 淡金黄毛玻璃 */
.nav-recharge {
    background: linear-gradient(135deg, rgba(251,191,36,0.08) 0%, rgba(245,158,11,0.06) 100%);
    border: 1px solid rgba(251,191,36,0.18);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #b45309 !important;
}
.nav-recharge i:first-child { color: #f59e0b; }
.nav-recharge:hover {
    background: linear-gradient(135deg, rgba(251,191,36,0.14) 0%, rgba(245,158,11,0.10) 100%);
    border-color: rgba(251,191,36,0.28);
    color: #92400e !important;
}
.nav-recharge.active {
    background: linear-gradient(135deg, rgba(251,191,36,0.16) 0%, rgba(245,158,11,0.12) 100%);
    border-color: rgba(251,191,36,0.32);
    color: #92400e !important;
}
.nav-recharge.active::before { background: #f59e0b; }

/* ==================== Mobile Header ==================== */
.mobile-header {
    display: none; position: sticky; top: 0; z-index: 150;
    height: var(--header-h); background: var(--bg-white);
    border-bottom: 1px solid var(--border);
    padding: 0 1rem; align-items: center; justify-content: space-between;
}

.hamburger {
    background: none; border: none; font-size: 1.375rem;
    color: var(--text-main); cursor: pointer; padding: 0.375rem;
}

.mobile-logo {
    display: flex; align-items: center; gap: 0.5rem;
    font-weight: 700; font-size: 0.9375rem; color: var(--primary);
}

.mobile-logo .logo-img { width: 1.75rem; height: 1.75rem; }

.mobile-spacer { width: 2.125rem; }

.sidebar-overlay {
    display: none; position: fixed; inset: 0; background: rgba(0,0,0,.3);
    backdrop-filter: blur(2px); z-index: 190;
}

/* ==================== Main Content ==================== */
.main-content {
    margin-left: var(--sidebar-w);
    min-height: 100vh;
}

.page-container {
    max-width: 1100px; margin: 0 auto;
    padding: 1.875rem 2rem;
    transition: opacity .15s, transform .15s;
}

.page-container.page-exit { opacity: 0; transform: translateY(6px); }
.page-container.page-enter { opacity: 0; transform: translateY(6px); }

/* ==================== Cards ==================== */
.card {
    background: var(--bg-white); border-radius: var(--radius);
    box-shadow: var(--shadow); border: 1px solid #fff;
    padding: 1.5rem; margin-bottom: 1.25rem;
    transition: box-shadow .3s;
}

.card:hover { box-shadow: var(--shadow-active); }

.card-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 1.25rem;
}

.card-header h3 { font-size: 0.9375rem; font-weight: 600; }

.card-actions { display: flex; gap: 0.625rem; align-items: center; }

/* ==================== Buttons ==================== */
.btn {
    display: inline-flex; align-items: center; gap: 0.375rem;
    padding: 0.5rem 1.25rem; border-radius: 50px; font-size: 0.8125rem;
    font-weight: 600; cursor: pointer; border: none;
    transition: all .2s; text-decoration: none;
}

.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: #2563eb; transform: translateY(-1px); }

.btn-secondary { background: #f3f4f6; color: var(--text-sub); }
.btn-secondary:hover { background: #e2e8f0; color: var(--text-main); }

.btn-gold {
    background: linear-gradient(135deg, #fde68a, #fbbf24, #f59e0b);
    color: #1a1a2e; font-weight: 700;
    box-shadow: 0 4px 14px rgba(245,158,11,.35);
}
.btn-gold:hover {
    background: linear-gradient(135deg, #fbbf24, #f59e0b, #ea580c);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(245,158,11,.5);
}

.btn-green { background: #07C160; color: #fff; }
.btn-green:hover { background: #06ae56; }

.btn-ghost {
    background: #f5f5f7; border: 1px solid #e5e5ea; color: var(--text-sub);
}
.btn-ghost:hover { background: #e5e5ea; color: var(--text-main); }

.btn-sm { padding: 0.375rem 0.875rem; font-size: 0.75rem; }

/* ==================== Search Bar ==================== */
.search-bar {
    background: var(--bg-white); border-radius: var(--radius);
    box-shadow: var(--shadow); border: 1px solid #fff;
    display: flex; align-items: center; padding: 0.375rem 0.625rem; height: 3.5rem;
    transition: box-shadow .3s;
}
.search-bar:focus-within { box-shadow: var(--shadow-active); }

.search-bar .search-icon { font-size: 1.125rem; color: var(--text-sub); margin: 0 0.875rem; }

.search-bar input {
    flex: 1; border: none; font-size: 0.9375rem; outline: none;
    background: transparent; color: var(--text-main);
}
.search-bar input::placeholder { color: #cbd5e1; }

.search-bar .query-btn {
    background: #f3f4f6; color: var(--text-sub); border: none;
    padding: 0.5rem 1.375rem; border-radius: 0.5rem; font-size: 0.8125rem;
    font-weight: 600; cursor: pointer; transition: all .2s;
}
.search-bar .query-btn:hover { background: #e2e8f0; color: var(--text-main); }

/* ==================== Info Grid ==================== */
.info-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(10.625rem, 1fr));
    gap: 1.125rem;
}

.info-item .label { font-size: 0.75rem; color: var(--text-sub); margin-bottom: 0.375rem; }
.info-item .value { font-size: 0.9375rem; font-weight: 500; font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif; font-variant-numeric: tabular-nums; }
.info-item .highlight { color: var(--primary); font-size: 1.125rem; font-weight: 600; }

.status-badge {
    color: #fff !important; padding: 0.25rem 0.75rem; border-radius: 50px;
    font-size: 0.8125rem; font-weight: 500; display: inline-flex;
    align-items: center; height: 1.5rem;
}
.status-badge.valid {
    background: #34C759;
    box-shadow: 0 2px 8px rgba(52,199,89,.3);
}
.status-badge.invalid {
    background: #FF3B30;
    box-shadow: 0 2px 8px rgba(255,59,48,.3);
}

/* ==================== Buy Tabs ==================== */
.buy-tabs {
    display: flex; gap: 0.375rem; margin-bottom: 1rem;
    background: #f1f5f9; border-radius: 0.75rem; padding: 0.25rem;
}
.buy-tab {
    flex: 1; padding: 0.5625rem 0.75rem; border: none; background: none;
    border-radius: 0.625rem; font-size: 0.8125rem; font-weight: 500;
    color: var(--text-sub); cursor: pointer; transition: all .2s;
    display: flex; align-items: center; justify-content: center; gap: 0.375rem;
}
.buy-tab:hover { color: var(--text-main); }
.buy-tab.active {
    background: #fff; color: var(--primary); font-weight: 600;
    box-shadow: 0 1px 3px rgba(0,0,0,.08);
}
.tab-deal {
    font-size: 0.5625rem; font-weight: 700; color: #fff;
    background: linear-gradient(135deg, #f59e0b, #ef4444);
    padding: 0.125rem 0.375rem; border-radius: 2rem;
    letter-spacing: 0.5px; line-height: 1; white-space: nowrap;
    animation: tab-deal-pulse 2s ease-in-out infinite;
}
@keyframes tab-deal-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}
.buy-tab-hint {
    font-size: 0.75rem; color: #6366f1; background: #eef2ff;
    padding: 0.5rem 0.875rem; border-radius: 0.5rem; margin-bottom: 1rem;
    display: flex; align-items: center; gap: 0.375rem; line-height: 1.4;
}
.buy-tab-hint.hidden { display: none; }

.plan-duration {
    font-size: 0.75rem; color: #6366f1; font-weight: 500;
    margin-bottom: 0.375rem;
    display: flex; align-items: center; justify-content: center; gap: 0.25rem;
}

/* ==================== Plan Cards ==================== */
.plan-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(9.7rem, 1fr));
    gap: 1rem;
}

.plan-card {
    background: #fafbfc; border: 2px solid var(--border); border-radius: 1rem;
    padding: 1.375rem 0.875rem; text-align: center; cursor: pointer;
    transition: all .3s cubic-bezier(.34,1.56,.64,1);
    position: relative; overflow: hidden;
}
.plan-card:hover {
    border-color: var(--primary); transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(59,130,246,.12);
}
.plan-card.popular { border-color: #8b5cf6; background: linear-gradient(135deg,#faf5ff,#f5f3ff); }

.plan-badge {
    position: absolute; top: 0.625rem; right: -1.5rem;
    background: linear-gradient(135deg,#8b5cf6,#7c3aed);
    color: #fff; font-size: 0.6875rem; font-weight: 600;
    padding: 0.1875rem 1.875rem; transform: rotate(45deg); letter-spacing: 1px;
}

.plan-icon { font-size: 1.875rem; margin-bottom: 0.625rem; }
.plan-name { font-size: 0.9375rem; font-weight: 600; margin-bottom: 0.5rem; }
.plan-usd { font-size: 1.625rem; font-weight: 700; margin-bottom: 0.25rem; font-family: 'Inter', -apple-system, sans-serif; font-variant-numeric: tabular-nums; }
.plan-usd span { font-size: 0.875rem; font-weight: 500; color: var(--text-sub); }
.plan-price { font-size: 0.875rem; color: var(--text-sub); margin-bottom: 0.875rem; }

.plan-buy-btn {
    background: var(--primary); color: #fff; border: none;
    padding: 0.5625rem 1.25rem; border-radius: 50px; font-size: 0.8125rem;
    font-weight: 600; cursor: pointer; width: 100%; transition: all .2s;
}
.plan-buy-btn:hover { background: #2563eb; }
.plan-card.popular .plan-buy-btn { background: #8b5cf6; }
.plan-card.popular .plan-buy-btn:hover { background: #7c3aed; }

/* ==================== Table ==================== */
.table-wrapper { overflow-x: auto; scrollbar-width: none; }
.table-wrapper::-webkit-scrollbar { display: none; }

table { width: 100%; border-collapse: separate; border-spacing: 0 0.375rem; }

th {
    text-align: left; padding: 0.75rem 1.125rem; font-size: 0.8125rem;
    color: var(--text-sub); font-weight: 500; background: #f8fafc;
    white-space: nowrap; text-transform: uppercase; letter-spacing: .5px;
}
th:first-child { border-radius: 0.5rem 0 0 0.5rem; }
th:last-child { border-radius: 0 0.5rem 0.5rem 0; }

tbody tr {
    background: #fff; transition: all .2s;
    box-shadow: 0 1px 4px rgba(0,0,0,.02);
}
tbody tr:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(0,0,0,.05);
}

td {
    padding: 0.875rem 1.125rem; font-size: 0.875rem; border: none;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei UI', sans-serif;
    font-variant-numeric: tabular-nums;
}
tbody tr td:first-child { border-radius: 0.625rem 0 0 0.625rem; }
tbody tr td:last-child { border-radius: 0 0.625rem 0.625rem 0; }

.tag-model {
    display: inline-block; padding: 0.25rem 0.625rem; background: #eff6ff;
    color: #2563eb; border-radius: 0.5rem; font-weight: 500; font-size: 0.75rem;
    border: 1px solid #dbeafe;
}
.tag-time {
    display: inline-block; padding: 0.25rem 0.625rem; background: #f0fdf4;
    color: #166534; border-radius: 0.5rem; font-weight: 500; font-size: 0.75rem;
    border: 1px solid #dcfce7;
}
.tag-token {
    font-family: 'SF Mono','Menlo',monospace; color: var(--text-sub);
    font-size: 0.75rem; background: #f8fafc; padding: 0.1875rem 0.5rem;
    border-radius: 0.375rem; border: 1px solid var(--border);
}

/* ==================== Pagination ==================== */
.pagination-bar {
    display: flex; align-items: center; justify-content: space-between;
    padding: 0.875rem 0 0.25rem; border-top: 1px solid #f1f5f9; margin-top: 0.5rem;
}
.pagination-controls { display: flex; gap: 0.25rem; }
.page-btn {
    width: 2.125rem; height: 2.125rem; border: 1px solid var(--border);
    background: #fff; border-radius: 0.5rem; font-size: 0.8125rem; font-weight: 500;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    transition: all .2s;
}
.page-btn:hover:not(:disabled):not(.active) { background: #f1f5f9; }
.page-btn.active {
    background: var(--primary); color: #fff; border-color: var(--primary);
    box-shadow: 0 2px 8px rgba(59,130,246,.3);
}
.page-btn:disabled { opacity: .3; cursor: not-allowed; }
.record-info { font-size: 0.8125rem; color: var(--text-sub); }

/* ==================== Payment Inline ==================== */
.pay-area { text-align: center; padding: 1.25rem 0; }
.pay-qr { display: flex; flex-direction: column; align-items: center; gap: 0.75rem; min-height: 15rem; justify-content: center; }
.pay-qr img { border-radius: 0.75rem; border: 1px solid var(--border); }
.pay-hint { font-size: 0.8125rem; color: var(--text-sub); margin: 0.75rem 0; }
.pay-status { display: flex; align-items: center; justify-content: center; gap: 0.5rem; font-size: 0.875rem; font-weight: 500; color: var(--primary); margin: 0.75rem 0; }
.pay-direct-link { color: var(--primary); font-size: 0.875rem; font-weight: 600; text-decoration: none; display: flex; align-items: center; gap: 0.25rem; }

/* ==================== Overview Quick Actions ==================== */
.quick-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(12.5rem, 1fr));
    gap: 0.875rem;
}
.quick-card {
    display: flex; align-items: center; gap: 0.875rem;
    padding: 1.125rem; border-radius: 0.875rem; background: #fafbfc;
    border: 1px solid var(--border); cursor: pointer;
    text-decoration: none; color: var(--text-main);
    transition: all .25s;
}
.quick-card:hover { border-color: var(--primary); transform: translateY(-2px); box-shadow: 0 8px 20px rgba(59,130,246,.08); }
.quick-card-icon {
    width: 2.75rem; height: 2.75rem; border-radius: 0.75rem;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.25rem; flex-shrink: 0;
}
.quick-card-text h4 { font-size: 0.875rem; font-weight: 600; margin-bottom: 0.125rem; }
.quick-card-text p { font-size: 0.75rem; color: var(--text-sub); }

/* ==================== New Key Result ==================== */
.key-result {
    background: #f0fdf4; border: 2px solid #bbf7d0; border-radius: 1rem;
    padding: 1.75rem; text-align: center;
}
.key-result .key-value {
    font-family: 'SF Mono','Menlo',monospace; font-size: 0.875rem;
    background: #fff; padding: 0.75rem 1rem; border-radius: 0.625rem;
    border: 1px solid #dcfce7; word-break: break-all; margin: 1rem 0;
    user-select: all;
}
.key-result .key-warning {
    color: #dc2626; font-size: 0.8125rem; font-weight: 600; margin-top: 0.75rem;
}

/* ==================== CDK ==================== */
.cdk-input-row { display: flex; gap: 0.625rem; }
.cdk-input-row input {
    flex: 1; padding: 0.625rem 1rem; border: 2px solid var(--border);
    border-radius: 0.625rem; font-size: 0.875rem; outline: none; transition: border-color .2s;
}
.cdk-input-row input:focus { border-color: var(--primary); }
.cdk-result { margin-top: 0.875rem; padding: 0.875rem; border-radius: 0.625rem; font-size: 0.875rem; }
.cdk-result.success { background: #f0fdf4; border: 1px solid #bbf7d0; color: #15803d; }
.cdk-result.error { background: #fef2f2; border: 1px solid #fecaca; color: #dc2626; }

/* ==================== Empty / Error ==================== */
.empty-state {
    text-align: center; padding: 3.75rem 1.25rem; color: var(--text-sub);
}
.empty-state i { font-size: 3rem; margin-bottom: 0.875rem; display: block; opacity: .4; }
.empty-state p { font-size: 0.9375rem; }

.error-page {
    text-align: center; padding: 5rem 1.25rem; color: #dc2626;
}
.error-page i { font-size: 3rem; margin-bottom: 0.875rem; display: block; }

/* ==================== Modals ==================== */
.modal-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,.3);
    backdrop-filter: blur(4px); z-index: 1000;
    display: flex; align-items: center; justify-content: center;
    animation: fadeIn .2s;
}
.modal-box {
    background: #fff; width: 90%; max-width: 22.5rem; border-radius: 1.25rem;
    padding: 1.875rem 1.5rem; text-align: center;
    box-shadow: 0 20px 40px rgba(0,0,0,.1);
    animation: scaleIn .3s cubic-bezier(.175,.885,.32,1.275) forwards;
    transform: scale(.95);
}
.modal-icon { font-size: 3rem; margin-bottom: 1rem; color: #FF3B30; }
.modal-title { font-size: 1.125rem; font-weight: 600; margin-bottom: 0.625rem; }
.modal-msg { font-size: 0.875rem; color: var(--text-sub); margin-bottom: 1.5rem; line-height: 1.5; }
.modal-btn {
    background: var(--text-main); color: #fff; border: none;
    padding: 0.75rem 1.875rem; border-radius: 50px; font-size: 0.875rem;
    font-weight: 600; cursor: pointer; transition: all .2s;
}
.modal-btn:hover { background: #000; transform: scale(1.05); }

.wechat-modal-box { max-width: 25rem; }
.wechat-modal-header { display: flex; flex-direction: column; align-items: center; gap: 0.75rem; margin-bottom: 1.25rem; }
.wechat-qr-area { display: flex; justify-content: center; margin-bottom: 1.25rem; }
.wechat-qr-img { width: 15rem; height: 15rem; border-radius: 0.75rem; border: 1px solid var(--border); object-fit: cover; }
.wechat-perks { display: flex; flex-wrap: wrap; gap: 0.625rem; justify-content: center; margin-bottom: 1.25rem; }
.perk-item {
    display: flex; align-items: center; gap: 0.25rem; font-size: 0.75rem;
    color: var(--text-sub); background: #f8fafc; padding: 0.375rem 0.75rem;
    border-radius: 50px; border: 1px solid var(--border);
}
.perk-item i { color: #07C160; }
.wechat-close-btn { background: #07C160 !important; }
.wechat-close-btn:hover { background: #06ae56 !important; }

/* ==================== Spin ==================== */
@keyframes spin { to { transform: rotate(360deg); } }
.spin { animation: spin 1s linear infinite; display: inline-block; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes scaleIn { to { transform: scale(1); } }

/* ==================== Responsive: Mobile ==================== */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform .3s cubic-bezier(.4,0,.2,1);
        box-shadow: none;
    }
    .sidebar.open {
        transform: translateX(0);
        box-shadow: 4px 0 20px rgba(0,0,0,.1);
    }
    .sidebar-overlay.open { display: block; }
    .mobile-header { display: flex; }
    .main-content { margin-left: 0; }
    .page-container { padding: 1.25rem 1rem; }
    .plan-grid { grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }
    .plan-card { padding: 1.125rem 0.625rem; }
    .plan-usd { font-size: 1.375rem; }
    .info-grid { grid-template-columns: 1fr 1fr; }
    .pagination-bar { flex-direction: column; gap: 0.625rem; align-items: flex-start; }
    .quick-grid { grid-template-columns: 1fr 1fr; }
    .cdk-input-row { flex-direction: column; }
    .community-banner { flex-direction: column; gap: 0.75rem; text-align: center; padding: 1rem; }
    .community-banner-left { flex-direction: column; gap: 0.5rem; }
    .community-banner .btn-green { width: 100%; justify-content: center; }
    .ov-hero { flex-direction: column; padding: 1.5rem 1.25rem; gap: 1rem; text-align: center; }
    .ov-hero-mascot { width: 5rem; }
    .ov-hero-input { height: 2.75rem; }
    .ov-hero-input button { padding: 0.375rem 0.875rem; }
}

@media (max-width: 480px) {
    .plan-grid { grid-template-columns: 1fr; }
    .quick-grid { grid-template-columns: 1fr; }
}

/* ==================== Responsive: Large screens ==================== */
@media (min-width: 1600px) {
    :root {
        --sidebar-w: 260px;
    }
    .page-container { max-width: 1300px; }
    .plan-grid { grid-template-columns: repeat(4, 1fr); }
    .quick-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (min-width: 2000px) {
    .page-container { max-width: 1500px; }
}

/* ==================== Community Banner ==================== */
.community-banner {
    display: flex; align-items: center; justify-content: space-between;
    background: linear-gradient(135deg, #07C160 0%, #06ae56 50%, #059c4b 100%);
    border-radius: var(--radius); padding: 1.25rem 1.5rem;
    margin-top: 0; margin-bottom: 1.25rem; cursor: pointer;
    transition: all .3s cubic-bezier(.34,1.56,.64,1);
    box-shadow: 0 4px 16px rgba(7,193,96,.25);
}
.community-banner:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(7,193,96,.35);
}
.community-banner-left {
    display: flex; align-items: center; gap: 1rem;
}
.community-banner-icon {
    width: 3rem; height: 3rem; border-radius: 0.75rem;
    background: rgba(255,255,255,.2); backdrop-filter: blur(4px);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem; color: #fff; flex-shrink: 0;
}
.community-banner-text h4 {
    font-size: 1rem; font-weight: 600; color: #fff; margin-bottom: 0.1875rem;
}
.community-banner-text p {
    font-size: 0.8125rem; color: rgba(255,255,255,.85);
}
.community-banner .btn-green {
    background: rgba(255,255,255,.2); backdrop-filter: blur(4px);
    border: 1px solid rgba(255,255,255,.3); color: #fff;
    flex-shrink: 0;
}
.community-banner .btn-green:hover {
    background: rgba(255,255,255,.35);
}

*:focus-visible { outline: 2px solid rgba(59,130,246,.3); }

/* ==================== Overview Hero (Empty State) ==================== */
.ov-hero {
    background: var(--bg-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid #fff;
    padding: 2rem 2rem 2rem 2.5rem;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.ov-hero-left {
    flex: 1;
    min-width: 0;
}

.ov-hero-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 0.375rem;
}

.ov-hero-sub {
    font-size: 0.8125rem;
    color: var(--text-sub);
    margin-bottom: 1.125rem;
    line-height: 1.5;
}

.ov-hero-mascot {
    width: 7rem;
    height: auto;
    object-fit: contain;
    flex-shrink: 0;
}

.ov-hero-input {
    display: flex;
    align-items: center;
    background: #f8fafc;
    border: 2px solid var(--border);
    border-radius: 0.75rem;
    padding: 0.25rem 0.25rem 0.25rem 1rem;
    height: 3rem;
    transition: border-color .2s, box-shadow .2s;
}

.ov-hero-input:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59,130,246,.1);
}

.ov-hero-input i {
    font-size: 1rem;
    color: #94a3b8;
    margin-right: 0.625rem;
    flex-shrink: 0;
}

.ov-hero-input input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 0.875rem;
    outline: none;
    color: var(--text-main);
    min-width: 0;
}

.ov-hero-input input::placeholder {
    color: #cbd5e1;
}

.ov-hero-input button {
    background: var(--primary);
    color: #fff;
    border: none;
    padding: 0.4375rem 1.125rem;
    border-radius: 0.5rem;
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s;
    flex-shrink: 0;
    height: 2.25rem;
}

.ov-hero-input button:hover {
    background: #2563eb;
}

/* ==================== Overview Balance Header ==================== */
.ov-balance-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
    padding-bottom: 0.875rem;
    border-bottom: 1px solid #f1f5f9;
}

.ov-balance-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.ov-balance-title i {
    font-size: 1.125rem;
}

.ov-token-display {
    font-family: 'JetBrains Mono', 'SF Mono', SFMono-Regular, Consolas, monospace;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-sub);
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    transition: all .2s;
    letter-spacing: 0.02em;
}
.ov-token-display:hover {
    background: #f1f5f9;
    color: var(--text-main);
}
.ov-token-display.copied {
    background: #dcfce7;
    color: #15803d;
}

.ov-switch-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.375rem 0.75rem;
    border-radius: 0.5rem;
    border: 1px solid var(--border);
    background: #f8fafc;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-sub);
    cursor: pointer;
    transition: all .2s;
}

.ov-switch-btn:hover {
    background: #f1f5f9;
    color: var(--text-main);
    border-color: #cbd5e1;
}

/* ==================== Models Page ==================== */
.models-tabs {
    display: flex; gap: 0; margin-bottom: 1.25rem;
    overflow-x: auto; -webkit-overflow-scrolling: touch;
    scrollbar-width: none; padding: 0.25rem;
    background: #f1f5f9; border-radius: 0.75rem;
}
.models-tabs::-webkit-scrollbar { display: none; }

.models-tab {
    display: flex; align-items: center; gap: 0.625rem;
    padding: 0.75rem 1.25rem; border-radius: 0.625rem;
    border: none; background: transparent;
    cursor: pointer; white-space: nowrap; transition: all .2s ease;
    flex: 1; justify-content: center;
}
.models-tab:hover { background: rgba(255,255,255,.6); }
.models-tab.active {
    background: #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.04);
}

.models-tab-logo {
    width: 1.625rem; height: 1.625rem; object-fit: contain; border-radius: 0.25rem;
}
.models-tab-logo.logo-wide {
    width: auto; height: 1.5rem; max-width: 4.5rem;
}
.models-tab-name {
    font-size: 0.9375rem; font-weight: 600; color: var(--text-sub);
}
.models-tab.active .models-tab-name { color: var(--text-main); }
.models-tab-count {
    font-size: 0.6875rem; font-weight: 700; color: var(--text-sub);
    background: #e2e8f0; padding: 0.0625rem 0.375rem; border-radius: 0.5rem;
    min-width: 1.25rem; text-align: center;
}
.models-tab.active .models-tab-count {
    color: var(--primary); background: #dbeafe;
}

.models-panel-header {
    display: flex; align-items: center; gap: 0.875rem;
    padding: 1.125rem 1.5rem; border-bottom: 1px solid var(--border);
}
.models-panel-logo {
    width: 2.25rem; height: 2.25rem; object-fit: contain; border-radius: 0.5rem;
    flex-shrink: 0;
}
.models-panel-logo.logo-wide {
    width: auto; height: 2rem; max-width: 5.5rem;
}
.models-panel-title {
    font-size: 1.0625rem; font-weight: 600; margin: 0; line-height: 1.3;
}
.models-panel-sub {
    font-size: 0.75rem; color: var(--text-sub);
}

.models-list { padding: 0.25rem 0; }

.model-row {
    display: flex; align-items: center; gap: 0.75rem;
    padding: 0.75rem 1.5rem; cursor: pointer;
    transition: background .15s ease;
}
.model-row:hover { background: #f8fafc; }
.model-row:active { background: #f1f5f9; }

.model-index {
    font-size: 0.6875rem; color: var(--text-sub); opacity: 0.5;
    font-variant-numeric: tabular-nums; width: 1.25rem; text-align: right;
    flex-shrink: 0; font-family: 'SF Mono', SFMono-Regular, Consolas, monospace;
}

.model-name {
    flex: 1; font-size: 0.9375rem; font-weight: 500; color: #1e293b;
    font-family: 'JetBrains Mono', 'SF Mono', SFMono-Regular, Consolas, 'Liberation Mono', Menlo, monospace;
    letter-spacing: -0.01em;
}

.model-type {
    font-size: 0.6875rem; color: var(--text-sub); background: #f1f5f9;
    padding: 0.1875rem 0.5rem; border-radius: 0.25rem; border: 1px solid #e2e8f0;
    white-space: nowrap; flex-shrink: 0;
}

.model-copy-hint {
    font-size: 0.875rem; color: var(--text-sub); opacity: 0;
    transition: opacity .15s ease; flex-shrink: 0;
}
.model-row:hover .model-copy-hint { opacity: 0.5; }

/* Copy toast */
.copy-toast {
    position: fixed; bottom: 2rem; left: 50%; transform: translateX(-50%) translateY(1rem);
    background: #1e293b; color: #fff; padding: 0.625rem 1.25rem;
    border-radius: 0.5rem; font-size: 0.875rem; font-weight: 500;
    box-shadow: 0 8px 24px rgba(0,0,0,.2); z-index: 9999;
    opacity: 0; pointer-events: none;
    transition: all .3s cubic-bezier(.34,1.56,.64,1);
}
.copy-toast.show {
    opacity: 1; transform: translateX(-50%) translateY(0);
}

@media (max-width: 768px) {
    .models-tabs { gap: 0; }
    .models-tab { padding: 0.625rem 0.5rem; flex: 1; }
    .models-tab-name { font-size: 0.8125rem; }
    .models-tab-logo { width: 1.375rem; height: 1.375rem; }
    .models-tab-count { display: none; }
    .model-row { padding: 0.625rem 1rem; }
    .model-name { font-size: 0.8125rem; }
    .model-index { display: none; }
    .model-copy-hint { opacity: 0.3; }
}
