/* Zapinho account experience — brand palette 2026-08-06 */
.ux-brand-page,
.api-v2-page {
    --ux-brand-dark: #063b2f;
    --ux-brand-accent: #f05a41;
    --ux-brand-accent-hover: #d94c35;
    --ux-canvas: #f3f4f6;
    --ux-surface: #ffffff;
    --ux-surface-soft: #f8faf9;
    --ux-surface-muted: #eef2f0;
    --ux-text: #17221f;
    --ux-muted: #6f7d79;
    --ux-brand-gray: #8c98a4;
    --ux-line: #e2e8e5;
    --ux-panel-blue: #2563eb;
    --ux-panel-blue-hover: #1d4ed8;
    --ux-panel-blue-soft: #eff6ff;
    --ux-success: #10b981;
    --ux-success-deep: #08754f;
    --ux-warning: #f59e0b;
    --ux-danger: #dc2626;
    --ux-shadow: 0 14px 38px rgba(6, 59, 47, .08);
    --ux-shadow-lg: 0 24px 64px rgba(6, 59, 47, .14);
    color: var(--ux-text);
}

[data-theme="dark"] .ux-brand-page,
[data-theme="dark"] .api-v2-page {
    --ux-canvas: #020617;
    --ux-surface: #0f172a;
    --ux-surface-soft: #111c30;
    --ux-surface-muted: #17233a;
    --ux-text: #f8fafc;
    --ux-muted: #94a3b8;
    --ux-brand-gray: #cbd5e1;
    --ux-line: #1e293b;
    --ux-shadow: 0 16px 42px rgba(0, 0, 0, .24);
    --ux-shadow-lg: 0 28px 70px rgba(0, 0, 0, .34);
}

/* Shared account pages */
.ux-brand-page { display: grid; gap: 18px; }
.ux-brand-page .page-header { margin-bottom: 0; }
.ux-page-header { align-items: flex-start; }
.ux-page-header .page-header-copy { max-width: 760px; }
.ux-page-header .page-header-copy h1 { color: var(--ux-brand-dark); }
.ux-page-header .page-header-copy p { color: var(--ux-muted); }
.ux-page-header .eyebrow,
.ux-brand-page .eyebrow {
    border-color: rgba(240, 90, 65, .28);
    background: #fff0ec;
    color: var(--ux-brand-accent);
}
[data-theme="dark"] .ux-page-header .page-header-copy h1 { color: var(--ux-text); }
[data-theme="dark"] .ux-page-header .eyebrow,
[data-theme="dark"] .ux-brand-page .eyebrow { background: rgba(240, 90, 65, .12); }

.ux-brand-page .card {
    background: var(--ux-surface);
    border-color: var(--ux-line);
    color: var(--ux-text);
    box-shadow: var(--ux-shadow);
}
.ux-brand-page .card:hover { border-color: rgba(6, 59, 47, .22); }
.ux-brand-page .btn-primary {
    background: var(--ux-brand-accent);
    color: #fff;
    box-shadow: 0 10px 26px rgba(240, 90, 65, .24);
}
.ux-brand-page .btn-primary:hover { background: var(--ux-brand-accent-hover); }
.ux-brand-page .btn-secondary {
    background: var(--ux-surface);
    border: 1px solid var(--ux-line);
    color: var(--ux-brand-dark);
    box-shadow: none;
}
.ux-brand-page .btn-secondary:hover { background: var(--ux-surface-soft); border-color: rgba(6, 59, 47, .24); }
.ux-brand-page .field label { color: var(--ux-brand-dark); }
.ux-brand-page .field input,
.ux-brand-page .field textarea,
.ux-brand-page .field select {
    background: var(--ux-surface);
    border-color: var(--ux-line);
    color: var(--ux-text);
}
.ux-brand-page .field input:focus,
.ux-brand-page .field textarea:focus,
.ux-brand-page .field select:focus {
    border-color: var(--ux-brand-accent);
    box-shadow: 0 0 0 3px rgba(240, 90, 65, .13);
}
[data-theme="dark"] .ux-brand-page .btn-secondary,
[data-theme="dark"] .ux-brand-page .field input,
[data-theme="dark"] .ux-brand-page .field textarea,
[data-theme="dark"] .ux-brand-page .field select { color: var(--ux-text); }
[data-theme="dark"] .ux-brand-page .field label { color: var(--ux-text); }

.ux-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 11px;
    border: 1px solid var(--ux-line);
    border-radius: 999px;
    background: var(--ux-surface);
    color: var(--ux-muted);
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}
.ux-status-pill i { width: 15px !important; height: 15px !important; }
.ux-status-pill.is-success { border-color: rgba(16, 185, 129, .28); background: rgba(16, 185, 129, .09); color: #08754f; }
.ux-status-pill.is-warning { border-color: rgba(245, 158, 11, .32); background: rgba(245, 158, 11, .1); color: #9a6405; }
[data-theme="dark"] .ux-status-pill.is-success { color: #6ee7b7; }
[data-theme="dark"] .ux-status-pill.is-warning { color: #fbbf24; }

.ux-hero {
    position: relative;
    overflow: hidden;
    padding: clamp(22px, 3vw, 34px) !important;
    border: 0 !important;
    background: linear-gradient(135deg, #063b2f 0%, #0a4a3c 58%, #063b2f 100%) !important;
    color: #fff;
    box-shadow: var(--ux-shadow-lg) !important;
}
.ux-hero::before,
.ux-hero::after {
    content: "";
    position: absolute;
    border-radius: 999px;
    pointer-events: none;
}
.ux-hero::before { width: 260px; height: 260px; right: -90px; top: -150px; background: rgba(240, 90, 65, .24); }
.ux-hero::after { width: 150px; height: 150px; right: 160px; bottom: -110px; background: rgba(255, 255, 255, .07); }
.ux-hero--pwa::before { background: rgba(37, 99, 235, .22); }
.ux-hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(260px, .65fr); gap: 26px; align-items: center; }
.ux-hero h2 { margin: 9px 0 10px; color: #fff; font-size: clamp(25px, 3vw, 36px); line-height: 1.08; letter-spacing: -.04em; }
.ux-hero p { max-width: 720px; margin: 0; color: rgba(255, 255, 255, .74); }
.ux-hero .eyebrow { border-color: rgba(255, 255, 255, .18); background: rgba(255, 255, 255, .1); color: #fff; }
.ux-hero .btn-secondary.ux-hero-secondary,
.ux-hero .btn-secondary { border-color: rgba(255, 255, 255, .24); background: rgba(255, 255, 255, .1); color: #fff; }
.ux-hero .btn-secondary:hover { background: rgba(255, 255, 255, .17); }
.ux-hero-value {
    display: grid;
    gap: 6px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 18px;
    background: rgba(255, 255, 255, .1);
    backdrop-filter: blur(10px);
}
.ux-hero-value small { color: rgba(255, 255, 255, .66); font-size: 11px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.ux-hero-value strong { color: #fff; font-size: clamp(29px, 4vw, 44px); line-height: 1.08; letter-spacing: -.045em; }
.ux-hero-value .muted { color: rgba(255, 255, 255, .66); }

.ux-link-box { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 9px; padding: 8px; border: 1px solid rgba(255, 255, 255, .2); border-radius: 14px; background: rgba(255, 255, 255, .1); }
.ux-link-box input { min-width: 0; border: 0 !important; background: transparent !important; color: #fff !important; box-shadow: none !important; font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; }
.ux-link-actions { display: flex; gap: 8px; }
.ux-link-box .btn { white-space: nowrap; }

.ux-stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin: 0; }
.ux-stat { min-width: 0; padding: 19px; border: 1px solid var(--ux-line); border-radius: 17px; background: var(--ux-surface); box-shadow: var(--ux-shadow); }
.ux-stat-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ux-stat-icon { display: grid; width: 39px; height: 39px; place-items: center; border-radius: 12px; background: #fff0ec; color: var(--ux-brand-accent); }
.ux-pwa-page .ux-stat-icon { background: var(--ux-panel-blue-soft); color: var(--ux-panel-blue); }
.ux-stat-icon i { width: 19px !important; height: 19px !important; }
.ux-stat small { display: block; margin-top: 13px; color: var(--ux-brand-gray); font-size: 10px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.ux-stat strong { display: block; margin-top: 5px; color: var(--ux-brand-dark); font-size: clamp(22px, 2vw, 27px); line-height: 1.12; letter-spacing: -.035em; overflow-wrap: anywhere; }
.ux-stat em { display: block; margin-top: 7px; color: var(--ux-muted); font-size: 12px; font-style: normal; }
[data-theme="dark"] .ux-stat strong { color: var(--ux-text); }

.ux-panel-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(300px, .85fr); gap: 18px; align-items: start; }
.ux-card-title { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.ux-card-title h2,
.ux-card-title h3 { margin: 0; color: var(--ux-brand-dark); }
.ux-card-title p { margin: 5px 0 0; color: var(--ux-muted); font-size: 13px; }
[data-theme="dark"] .ux-card-title h2,
[data-theme="dark"] .ux-card-title h3 { color: var(--ux-text); }

.ux-step-list { display: grid; gap: 11px; }
.ux-step { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 12px; align-items: start; padding: 14px; border: 1px solid var(--ux-line); border-radius: 14px; background: var(--ux-surface-soft); }
.ux-step-number { display: grid; width: 40px; height: 40px; place-items: center; border-radius: 12px; background: #fff0ec; color: var(--ux-brand-accent); font-weight: 900; }
.ux-step-number i { width: 19px !important; height: 19px !important; }
.ux-step strong { display: block; margin-bottom: 3px; color: var(--ux-brand-dark); }
.ux-step p { margin: 0; color: var(--ux-muted); font-size: 13px; }
[data-theme="dark"] .ux-step strong { color: var(--ux-text); }

.ux-help-box { padding: 15px; border: 1px solid rgba(6, 59, 47, .14); border-left: 4px solid var(--ux-brand-dark); border-radius: 13px; background: #f7faf8; }
.ux-help-box strong { display: flex; align-items: center; gap: 8px; margin-bottom: 5px; color: var(--ux-brand-dark); }
.ux-help-box p { margin: 0; color: var(--ux-muted); font-size: 13px; }
[data-theme="dark"] .ux-help-box { background: var(--ux-surface-soft); border-color: var(--ux-line); border-left-color: var(--ux-brand-accent); }
[data-theme="dark"] .ux-help-box strong { color: var(--ux-text); }

.ux-table-wrap { overflow: auto; border: 1px solid var(--ux-line); border-radius: 15px; }
.ux-table-wrap table { width: 100%; min-width: 720px; border-collapse: collapse; }
.ux-table-wrap th,
.ux-table-wrap td { padding: 14px 16px; border-bottom: 1px solid var(--ux-line); text-align: left; }
.ux-table-wrap th { background: var(--ux-brand-dark); color: rgba(255, 255, 255, .75); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }
.ux-table-wrap tr:last-child td { border-bottom: 0; }
.ux-table-wrap tbody tr:hover { background: var(--ux-surface-soft); }
.ux-brand-page .money { color: var(--ux-success-deep); }
.ux-brand-page .badge-success { color: #08754f; background: rgba(16, 185, 129, .12); }
.ux-brand-page .badge-warning { color: #9a6405; background: rgba(245, 158, 11, .13); }
.ux-brand-page .badge-danger { color: #b91c1c; background: rgba(220, 38, 38, .1); }

/* PWA */
.ux-install-card { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 17px; align-items: start; }
.ux-app-icon { display: grid; width: 62px; height: 62px; place-items: center; border-radius: 18px; background: #fff; box-shadow: 0 14px 30px rgba(0, 0, 0, .18); }
.ux-app-icon img { width: 40px; height: 40px; object-fit: contain; }
.ux-toggle-list { display: grid; gap: 10px; }
.ux-toggle-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 15px; border: 1px solid var(--ux-line); border-radius: 14px; background: var(--ux-surface-soft); transition: border-color .18s, box-shadow .18s, transform .18s; }
.ux-toggle-row:hover { transform: translateY(-1px); border-color: rgba(6, 59, 47, .22); box-shadow: 0 10px 24px rgba(6, 59, 47, .06); }
.ux-toggle-copy { display: flex; gap: 12px; align-items: flex-start; }
.ux-toggle-icon { display: grid; flex: 0 0 39px; width: 39px; height: 39px; place-items: center; border-radius: 12px; background: var(--ux-panel-blue-soft); color: var(--ux-panel-blue); }
.ux-toggle-row--whatsapp .ux-toggle-icon { background: rgba(16, 185, 129, .12); color: #08754f; }
.ux-toggle-row--telegram .ux-toggle-icon { background: var(--ux-panel-blue-soft); color: var(--ux-panel-blue); }
.ux-toggle-row--marketplace .ux-toggle-icon { background: #fff0ec; color: var(--ux-brand-accent); }
.ux-toggle-copy strong { display: block; color: var(--ux-brand-dark); }
.ux-toggle-copy p { margin: 3px 0 0; color: var(--ux-muted); font-size: 12px; }
[data-theme="dark"] .ux-toggle-copy strong { color: var(--ux-text); }
.ux-pwa-page .toggle-switch input[type="checkbox"]:checked { background: var(--ux-panel-blue); }
.ux-save-bar { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--ux-line); }
.ux-save-bar p { margin: 0; color: var(--ux-muted); font-size: 12px; }
.ux-pwa-page .modal { background: var(--ux-surface); border-color: var(--ux-line); color: var(--ux-text); box-shadow: var(--ux-shadow-lg); }

/* API Keys — technical blue with brand foundation */
.api-v2-page { display: grid; gap: 18px; }
.api-v2-page .btn-primary { background: var(--ux-panel-blue); color: #fff; box-shadow: 0 10px 28px rgba(37, 99, 235, .24); }
.api-v2-page .btn-primary:hover { background: var(--ux-panel-blue-hover); }
.api-v2-page .btn-secondary { background: #fff; border: 1px solid var(--ux-line); color: var(--ux-brand-dark); box-shadow: none; }
.api-v2-page .btn-secondary:hover { background: var(--ux-surface-soft); }
[data-theme="dark"] .api-v2-page .btn-secondary { background: var(--ux-surface-muted); color: var(--ux-text); }

.api-v2-hero {
    position: relative;
    overflow: hidden;
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(270px, .65fr);
    gap: 30px;
    align-items: center;
    padding: clamp(26px, 4vw, 42px);
    border-radius: 24px;
    background: linear-gradient(132deg, #063b2f 0%, #0a4a3c 54%, #0d5545 100%);
    color: #fff;
    box-shadow: var(--ux-shadow-lg);
}
.api-v2-hero::before { content: ""; position: absolute; width: 330px; height: 330px; right: -150px; top: -190px; border-radius: 50%; background: rgba(240, 90, 65, .24); }
.api-v2-hero::after { content: ""; position: absolute; width: 180px; height: 180px; left: 42%; bottom: -145px; border-radius: 50%; background: rgba(37, 99, 235, .2); }
.api-v2-hero-copy,
.api-v2-hero-security { position: relative; z-index: 1; }
.api-v2-kicker { display: inline-flex; align-items: center; gap: 7px; padding: 6px 10px; border: 1px solid rgba(255,255,255,.2); border-radius: 999px; background: rgba(255,255,255,.1); color: #fff; font-size: 10px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.api-v2-kicker i { width: 14px !important; height: 14px !important; }
.api-v2-kicker.is-success { border-color: rgba(16,185,129,.3); background: rgba(16,185,129,.1); color: #08754f; }
.api-v2-hero h1 { max-width: 760px; margin: 14px 0 11px; color: #fff; font-size: clamp(34px, 5vw, 55px); line-height: 1.02; letter-spacing: -.055em; }
.api-v2-hero p { max-width: 690px; margin: 0; color: rgba(255,255,255,.74); font-size: 15px; }
.api-v2-hero-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 22px; }
.api-v2-hero .btn-secondary { border-color: rgba(255,255,255,.22); background: rgba(255,255,255,.1); color: #fff; }
.api-v2-hero .btn-secondary:hover { background: rgba(255,255,255,.17); }
.api-v2-text-link { display: inline-flex; align-items: center; gap: 7px; padding: 10px 5px; color: rgba(255,255,255,.76); font-size: 12px; font-weight: 800; }
.api-v2-text-link:hover { color: #fff; }
.api-v2-text-link i { width: 16px !important; height: 16px !important; }
.api-v2-hero-security { display: grid; gap: 10px; padding: 22px; border: 1px solid rgba(255,255,255,.17); border-radius: 20px; background: rgba(255,255,255,.09); backdrop-filter: blur(10px); text-align: center; }
.api-v2-security-orbit { display: grid; width: 68px; height: 68px; margin: 0 auto 3px; place-items: center; border-radius: 20px; background: var(--ux-panel-blue); color: #fff; box-shadow: 0 14px 34px rgba(37,99,235,.28); }
.api-v2-security-orbit i { width: 31px !important; height: 31px !important; }
.api-v2-hero-security strong { font-size: 16px; }
.api-v2-hero-security span { color: rgba(255,255,255,.68); font-size: 11px; }

.api-v2-token-reveal { display: grid; grid-template-columns: auto minmax(0,1fr); gap: 16px; padding: 20px; border: 1px solid rgba(16,185,129,.28); border-radius: 18px; background: #ecfdf5; box-shadow: var(--ux-shadow); }
.api-v2-token-icon { display: grid; width: 50px; height: 50px; place-items: center; border-radius: 15px; background: rgba(16,185,129,.14); color: #08754f; }
.api-v2-token-copy h2 { margin: 7px 0 4px; color: var(--ux-brand-dark); font-size: 20px; }
.api-v2-token-copy p { margin: 0; color: var(--ux-muted); font-size: 12px; }
.api-v2-token-field { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 9px; margin-top: 13px; }
.api-v2-token-field input { width: 100%; min-width: 0; padding: 12px; border: 1px solid rgba(16,185,129,.28); border-radius: 11px; background: #fff; color: #063b2f; font-family: ui-monospace,SFMono-Regular,Menlo,monospace; }
.api-v2-page .btn-success { background: var(--ux-success); color: #fff; }
[data-theme="dark"] .api-v2-token-reveal { background: rgba(16,185,129,.08); }
[data-theme="dark"] .api-v2-token-copy h2 { color: var(--ux-text); }

.api-v2-stat-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 13px; }
.api-v2-stat-card { display: flex; align-items: center; gap: 13px; min-width: 0; padding: 17px; border: 1px solid var(--ux-line); border-radius: 16px; background: var(--ux-surface); box-shadow: var(--ux-shadow); }
.api-v2-stat-icon { display: grid; flex: 0 0 39px; width: 39px; height: 39px; place-items: center; border-radius: 12px; background: var(--ux-panel-blue-soft); color: var(--ux-panel-blue); }
.api-v2-stat-card.is-active .api-v2-stat-icon { background: rgba(16,185,129,.12); color: #08754f; }
.api-v2-stat-card.is-muted .api-v2-stat-icon { background: rgba(220,38,38,.09); color: var(--ux-danger); }
.api-v2-stat-card small { display: block; color: var(--ux-brand-gray); font-size: 9px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.api-v2-stat-card strong { display: block; margin-top: 2px; color: var(--ux-brand-dark); font-size: 24px; line-height: 1; }
.api-v2-stat-card span { display: block; margin-top: 4px; color: var(--ux-muted); font-size: 10px; }
[data-theme="dark"] .api-v2-stat-card strong { color: var(--ux-text); }

.api-v2-workspace { display: grid; grid-template-columns: minmax(0,1.25fr) minmax(280px,.75fr); gap: 18px; align-items: start; }
.api-v2-create-card,
.api-v2-guide-card,
.api-v2-key-section { border: 1px solid var(--ux-line); border-radius: 19px; background: var(--ux-surface); box-shadow: var(--ux-shadow); }
.api-v2-create-card { padding: 23px; }
.api-v2-section-heading,
.api-v2-key-section-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.api-v2-section-heading h2,
.api-v2-key-section-head h2 { margin: 5px 0 3px; color: var(--ux-brand-dark); font-size: 22px; letter-spacing: -.03em; }
.api-v2-section-heading p,
.api-v2-key-section-head p { margin: 0; color: var(--ux-muted); font-size: 12px; }
.api-v2-step-label { color: var(--ux-brand-accent); font-size: 9px; font-weight: 900; letter-spacing: .09em; text-transform: uppercase; }
.api-v2-status { display: inline-flex; align-items: center; gap: 6px; padding: 6px 9px; border: 1px solid rgba(37,99,235,.2); border-radius: 999px; background: var(--ux-panel-blue-soft); color: var(--ux-panel-blue); font-size: 9px; font-weight: 900; white-space: nowrap; }
.api-v2-status span { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
[data-theme="dark"] .api-v2-section-heading h2,
[data-theme="dark"] .api-v2-key-section-head h2 { color: var(--ux-text); }

.api-v2-form { display: grid; gap: 18px; margin-top: 20px; }
.api-v2-form-section { margin: 0; padding: 0; border: 0; }
.api-v2-form-section legend { display: flex; align-items: center; gap: 9px; width: 100%; color: var(--ux-brand-dark); font-size: 13px; font-weight: 900; }
.api-v2-form-section legend span { display: grid; width: 25px; height: 25px; place-items: center; border-radius: 8px; background: var(--ux-brand-dark); color: #fff; font-size: 10px; }
.api-v2-section-help { margin: 7px 0 11px; color: var(--ux-muted); font-size: 11px; }
.api-v2-field { margin: 11px 0 0; }
.api-v2-field label { color: var(--ux-brand-dark); }
.api-v2-field input,
.api-v2-field textarea { background: var(--ux-surface-soft); border-color: var(--ux-line); color: var(--ux-text); }
.api-v2-field input:focus,
.api-v2-field textarea:focus { border-color: var(--ux-panel-blue); box-shadow: 0 0 0 3px rgba(37,99,235,.12); }
[data-theme="dark"] .api-v2-form-section legend,
[data-theme="dark"] .api-v2-field label { color: var(--ux-text); }

.api-v2-scope-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.api-v2-scope-option { position: relative; display: block; cursor: pointer; }
.api-v2-scope-option input { position: absolute; opacity: 0; pointer-events: none; }
.api-v2-scope-card { display: flex; height: 100%; flex-direction: column; padding: 16px; border: 1.5px solid var(--ux-line); border-radius: 15px; background: var(--ux-surface-soft); transition: border-color .18s, box-shadow .18s, transform .18s, background .18s; }
.api-v2-scope-option:hover .api-v2-scope-card { transform: translateY(-1px); border-color: rgba(37,99,235,.36); }
.api-v2-scope-option input:focus-visible + .api-v2-scope-card { outline: 3px solid rgba(37,99,235,.18); outline-offset: 2px; }
.api-v2-scope-option input:checked + .api-v2-scope-card { border-color: var(--ux-panel-blue); background: var(--ux-panel-blue-soft); box-shadow: 0 0 0 2px rgba(37,99,235,.08); }
.api-v2-scope-option input:checked + .api-v2-scope-card.is-write { border-color: var(--ux-brand-accent); background: #fff0ec; box-shadow: 0 0 0 2px rgba(240,90,65,.08); }
.api-v2-scope-top { display: flex; align-items: center; gap: 8px; }
.api-v2-scope-icon { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 11px; background: var(--ux-panel-blue-soft); color: var(--ux-panel-blue); }
.api-v2-scope-card.is-write .api-v2-scope-icon { background: #fff0ec; color: var(--ux-brand-accent); }
.api-v2-check { display: grid; width: 22px; height: 22px; margin-left: auto; place-items: center; border: 1px solid var(--ux-line); border-radius: 7px; color: transparent; }
.api-v2-scope-option input:checked + .api-v2-scope-card .api-v2-check { border-color: var(--ux-panel-blue); background: var(--ux-panel-blue); color: #fff; }
.api-v2-scope-option input:checked + .api-v2-scope-card.is-write .api-v2-check { border-color: var(--ux-brand-accent); background: var(--ux-brand-accent); }
.api-v2-recommended,
.api-v2-risk-label { padding: 4px 7px; border-radius: 999px; font-size: 8px; font-weight: 900; letter-spacing: .04em; text-transform: uppercase; }
.api-v2-recommended { background: rgba(16,185,129,.1); color: #08754f; }
.api-v2-risk-label { background: rgba(245,158,11,.12); color: #9a6405; }
.api-v2-scope-card > strong { margin: 14px 0 4px; color: var(--ux-brand-dark); font-size: 14px; }
.api-v2-scope-card > p { flex: 1; margin: 0; color: var(--ux-muted); font-size: 11px; line-height: 1.5; }
.api-v2-scope-card > code { align-self: flex-start; margin-top: 13px; padding: 5px 7px; border: 1px solid var(--ux-line); border-radius: 7px; background: #fff; color: var(--ux-brand-gray); font-size: 9px; }
[data-theme="dark"] .api-v2-scope-card > strong { color: var(--ux-text); }
[data-theme="dark"] .api-v2-scope-card > code { background: var(--ux-surface-muted); }

.api-v2-advanced { border: 1px solid var(--ux-line); border-radius: 14px; background: var(--ux-surface-soft); }
.api-v2-advanced summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 15px; cursor: pointer; list-style: none; }
.api-v2-advanced summary::-webkit-details-marker { display: none; }
.api-v2-advanced summary > span { display: grid; grid-template-columns: auto 1fr; gap: 2px 9px; align-items: center; }
.api-v2-advanced summary > span > i { grid-row: 1 / 3; color: var(--ux-panel-blue); }
.api-v2-advanced summary strong { color: var(--ux-brand-dark); font-size: 12px; }
.api-v2-advanced summary small { color: var(--ux-muted); font-size: 10px; }
.api-v2-chevron { color: var(--ux-muted); transition: transform .18s; }
.api-v2-advanced[open] .api-v2-chevron { transform: rotate(180deg); }
.api-v2-advanced-body { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; padding: 0 15px 16px; border-top: 1px solid var(--ux-line); }
[data-theme="dark"] .api-v2-advanced summary strong { color: var(--ux-text); }

.api-v2-create-footer { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding-top: 2px; }
.api-v2-live-summary { display: grid; gap: 2px; min-width: 0; }
.api-v2-live-summary span { display: flex; align-items: center; gap: 6px; color: var(--ux-muted); font-size: 10px; }
.api-v2-live-summary span i { color: var(--ux-success); }
.api-v2-live-summary strong { overflow: hidden; color: var(--ux-brand-dark); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.api-v2-create-button { min-width: 190px; }
[data-theme="dark"] .api-v2-live-summary strong { color: var(--ux-text); }

.api-v2-guide-card { position: sticky; top: 88px; overflow: hidden; }
.api-v2-guide-head { display: flex; gap: 12px; align-items: center; padding: 19px; border-bottom: 1px solid var(--ux-line); background: linear-gradient(135deg, #f7faf8, #fff0ec); }
.api-v2-guide-icon { display: grid; width: 43px; height: 43px; place-items: center; border-radius: 13px; background: var(--ux-brand-dark); color: #fff; box-shadow: 0 10px 24px rgba(6,59,47,.18); }
.api-v2-guide-head h2 { margin: 0; color: var(--ux-brand-dark); font-size: 17px; }
.api-v2-guide-head p { margin: 2px 0 0; color: var(--ux-muted); font-size: 11px; }
.api-v2-guide-list { display: grid; margin: 0; padding: 9px 19px; list-style: none; }
.api-v2-guide-list li { display: grid; grid-template-columns: 30px minmax(0,1fr); gap: 10px; padding: 13px 0; border-bottom: 1px solid var(--ux-line); }
.api-v2-guide-list li:last-child { border-bottom: 0; }
.api-v2-guide-list li > span { color: var(--ux-brand-accent); font-size: 9px; font-weight: 900; letter-spacing: .08em; }
.api-v2-guide-list strong { display: block; color: var(--ux-brand-dark); font-size: 12px; }
.api-v2-guide-list p { margin: 3px 0 0; color: var(--ux-muted); font-size: 10px; line-height: 1.5; }
.api-v2-auth-example { position: relative; margin: 0 19px 19px; padding: 13px 42px 13px 13px; border: 1px dashed rgba(37,99,235,.3); border-radius: 12px; background: var(--ux-panel-blue-soft); }
.api-v2-auth-example > span { display: block; margin-bottom: 5px; color: var(--ux-muted); font-size: 8px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.api-v2-auth-example code { display: block; overflow: hidden; color: var(--ux-panel-blue); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.api-v2-auth-example button { position: absolute; right: 7px; top: 50%; display: grid; width: 29px; height: 29px; place-items: center; transform: translateY(-50%); border: 0; border-radius: 8px; background: #fff; color: var(--ux-muted); }
.api-v2-auth-example button:hover,
.api-v2-auth-example button.is-copied { color: var(--ux-success); }
[data-theme="dark"] .api-v2-guide-head { background: var(--ux-surface-soft); }
[data-theme="dark"] .api-v2-guide-head h2,
[data-theme="dark"] .api-v2-guide-list strong { color: var(--ux-text); }
[data-theme="dark"] .api-v2-auth-example button { background: var(--ux-surface-muted); }

.api-v2-key-section { padding: 23px; }
.api-v2-filter-group { display: flex; align-items: center; gap: 5px; padding: 4px; border: 1px solid var(--ux-line); border-radius: 12px; background: var(--ux-surface-soft); }
.api-v2-filter-group button { display: flex; align-items: center; gap: 6px; border: 0; border-radius: 8px; padding: 7px 10px; background: transparent; color: var(--ux-muted); font-size: 10px; font-weight: 800; }
.api-v2-filter-group button:hover { color: var(--ux-brand-dark); }
.api-v2-filter-group button.is-active { background: #fff; color: var(--ux-panel-blue); box-shadow: 0 4px 12px rgba(6,59,47,.08); }
.api-v2-filter-group button span { display: grid; min-width: 18px; height: 18px; place-items: center; border-radius: 999px; background: var(--ux-surface-muted); font-size: 8px; }
.api-v2-key-list { display: grid; gap: 10px; margin-top: 18px; }
.api-v2-key-card { display: grid; grid-template-columns: minmax(250px,.95fr) minmax(340px,1.25fr) auto; gap: 18px; align-items: center; padding: 16px; border: 1px solid var(--ux-line); border-radius: 15px; background: var(--ux-surface-soft); transition: border-color .18s, transform .18s, box-shadow .18s; }
.api-v2-key-card:hover { transform: translateY(-1px); border-color: rgba(37,99,235,.3); box-shadow: 0 15px 34px rgba(6,59,47,.08); }
.api-v2-key-card[hidden] { display: none; }
.api-v2-key-main { display: grid; grid-template-columns: 42px minmax(0,1fr); gap: 12px; align-items: start; min-width: 0; }
.api-v2-key-symbol { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 12px; background: var(--ux-panel-blue-soft); color: var(--ux-panel-blue); }
.api-v2-key-title-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.api-v2-key-title-row h3 { margin: 0; color: var(--ux-brand-dark); font-size: 14px; }
.api-v2-key-status { display: inline-flex; align-items: center; gap: 4px; padding: 4px 7px; border-radius: 999px; font-size: 8px; font-weight: 900; letter-spacing: .04em; text-transform: uppercase; }
.api-v2-key-status.is-active { background: rgba(16,185,129,.1); color: #08754f; }
.api-v2-key-status.is-inactive { background: rgba(220,38,38,.09); color: #b91c1c; }
.api-v2-key-identity > code { display: block; margin-top: 5px; color: var(--ux-panel-blue); font-size: 10px; overflow-wrap: anywhere; }
.api-v2-key-tags { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 9px; }
.api-v2-key-tags span { display: inline-flex; align-items: center; gap: 4px; padding: 4px 7px; border: 1px solid var(--ux-line); border-radius: 999px; background: #fff; color: var(--ux-muted); font-size: 8px; }
.api-v2-key-details { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px 16px; padding-left: 18px; border-left: 1px solid var(--ux-line); }
.api-v2-key-details small { display: block; color: var(--ux-brand-gray); font-size: 8px; font-weight: 900; letter-spacing: .07em; text-transform: uppercase; }
.api-v2-key-details strong { display: block; margin-top: 2px; overflow: hidden; color: var(--ux-brand-dark); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.api-v2-key-action { justify-self: end; }
.api-v2-revoke { display: flex; align-items: center; gap: 6px; border: 1px solid rgba(220,38,38,.22); border-radius: 10px; padding: 9px 10px; background: rgba(220,38,38,.07); color: #b91c1c; font-size: 10px; font-weight: 800; }
.api-v2-revoke:hover { border-color: rgba(220,38,38,.46); background: rgba(220,38,38,.12); }
.api-v2-locked { display: inline-flex; align-items: center; gap: 6px; color: var(--ux-muted); font-size: 10px; }
.api-v2-empty { display: grid; justify-items: center; padding: 45px 20px; text-align: center; }
.api-v2-empty > span { display: grid; width: 58px; height: 58px; place-items: center; border: 1px solid rgba(37,99,235,.22); border-radius: 18px; background: var(--ux-panel-blue-soft); color: var(--ux-panel-blue); }
.api-v2-empty h3 { margin: 14px 0 5px; color: var(--ux-brand-dark); }
.api-v2-empty p,
.api-v2-no-filter-result { color: var(--ux-muted); font-size: 12px; }
.api-v2-no-filter-result { padding: 30px; text-align: center; }
[data-theme="dark"] .api-v2-filter-group button:hover,
[data-theme="dark"] .api-v2-key-title-row h3,
[data-theme="dark"] .api-v2-key-details strong,
[data-theme="dark"] .api-v2-empty h3 { color: var(--ux-text); }
[data-theme="dark"] .api-v2-filter-group button.is-active,
[data-theme="dark"] .api-v2-key-tags span { background: var(--ux-surface-muted); }

/* Shared responsive behavior */
@media (max-width: 1180px) {
    .ux-stat-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .ux-hero-grid,
    .ux-panel-grid,
    .api-v2-hero,
    .api-v2-workspace { grid-template-columns: 1fr; }
    .ux-hero-value { max-width: 460px; }
    .api-v2-guide-card { position: static; }
    .api-v2-key-card { grid-template-columns: minmax(240px,.9fr) minmax(320px,1.1fr); }
    .api-v2-key-action { grid-column: 1 / -1; justify-self: stretch; }
    .api-v2-revoke { justify-content: center; width: 100%; }
}
@media (max-width: 820px) {
    .api-v2-stat-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .api-v2-key-section-head { display: grid; }
    .api-v2-filter-group { justify-self: start; }
    .api-v2-key-card { grid-template-columns: 1fr; }
    .api-v2-key-details { padding: 13px 0 0; border-top: 1px solid var(--ux-line); border-left: 0; }
    .api-v2-key-action { grid-column: auto; }
    .api-v2-advanced-body { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
    .ux-brand-page { gap: 14px; }
    .ux-page-header .quick-actions,
    .ux-page-header .quick-actions > *,
    .ux-page-header .btn { width: 100%; }
    .ux-stat-grid,
    .ux-panel-grid { grid-template-columns: 1fr; }
    .ux-link-box { grid-template-columns: 1fr; }
    .ux-link-actions { display: grid; grid-template-columns: 1fr 1fr; }
    .ux-link-box .btn { width: 100%; }
    .ux-save-bar { position: sticky; z-index: 5; bottom: 76px; margin: 16px -16px -16px; padding: 13px 16px; border-top: 1px solid var(--ux-line); background: rgba(255,255,255,.96); backdrop-filter: blur(12px); }
    [data-theme="dark"] .ux-save-bar { background: rgba(15,23,42,.96); }
    .ux-save-bar p { display: none; }
    .ux-save-bar .btn { width: 100%; }
    .ux-install-card { grid-template-columns: 1fr; }
    .ux-toggle-row { padding: 13px; }
    .ux-table-wrap { border: 0; overflow: visible; }
    .ux-table-wrap table,
    .ux-table-wrap thead,
    .ux-table-wrap tbody,
    .ux-table-wrap tr,
    .ux-table-wrap th,
    .ux-table-wrap td { display: block; min-width: 0; }
    .ux-table-wrap thead { display: none; }
    .ux-table-wrap tr { margin-bottom: 12px; padding: 10px 13px; border: 1px solid var(--ux-line); border-radius: 13px; background: var(--ux-surface-soft); }
    .ux-table-wrap td { display: grid; grid-template-columns: minmax(105px,.75fr) minmax(0,1.25fr); gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--ux-line); text-align: right; }
    .ux-table-wrap td:last-child { border-bottom: 0; }
    .ux-table-wrap td::before { content: attr(data-label); color: var(--ux-brand-gray); font-size: 10px; font-weight: 900; letter-spacing: .06em; text-align: left; text-transform: uppercase; }
}
@media (max-width: 620px) {
    .api-v2-page { gap: 15px; }
    .api-v2-hero { padding: 23px; border-radius: 19px; }
    .api-v2-hero h1 { font-size: 34px; }
    .api-v2-hero-actions,
    .api-v2-hero-actions > .btn,
    .api-v2-text-link { width: 100%; }
    .api-v2-text-link { justify-content: center; }
    .api-v2-hero-security { text-align: left; }
    .api-v2-token-reveal { grid-template-columns: 1fr; }
    .api-v2-token-field { grid-template-columns: 1fr; }
    .api-v2-stat-grid,
    .api-v2-scope-grid { grid-template-columns: 1fr; }
    .api-v2-create-card,
    .api-v2-key-section { padding: 17px; border-radius: 16px; }
    .api-v2-section-heading { display: grid; }
    .api-v2-status { justify-self: start; }
    .api-v2-create-footer { position: sticky; z-index: 4; bottom: 72px; display: grid; margin: 18px -17px -17px; padding: 13px 17px; border-top: 1px solid var(--ux-line); background: rgba(255,255,255,.97); backdrop-filter: blur(12px); }
    [data-theme="dark"] .api-v2-create-footer { background: rgba(15,23,42,.97); }
    .api-v2-create-button { width: 100%; }
    .api-v2-live-summary { display: none; }
    .api-v2-filter-group { width: 100%; overflow: auto; }
    .api-v2-filter-group button { flex: 1; justify-content: center; white-space: nowrap; }
    .api-v2-key-details { grid-template-columns: 1fr; }
    .api-v2-key-title-row { align-items: flex-start; flex-direction: column; }
    .api-v2-key-card { padding: 14px; }
}
@media (max-width: 460px) {
    .ux-link-actions { grid-template-columns: 1fr; }
    .ux-toggle-row { grid-template-columns: 1fr; }
    .ux-toggle-row .toggle-switch { justify-self: start; }
}
