/* ═══════════════════════════════════════════════════════════════════
   DreamForge Dashboard — shared styles
   ═══════════════════════════════════════════════════════════════════ */

* { margin: 0; padding: 0; box-sizing: border-box; }
body { background: #12121c; color: #e8e8f0; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; min-height: 100vh; }

/* ── Header ── */
header { display: flex; align-items: center; gap: 12px; padding: 14px 24px; background: #0a0a14; border-bottom: 1px solid rgba(255,255,255,0.06); position: sticky; top: 0; z-index: 100; flex-wrap: wrap; }
header h1 { font-size: 20px; font-weight: 700; flex-shrink: 0; letter-spacing: -0.3px; }
.env-badge { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.8px; padding: 3px 10px; border-radius: 4px; background: rgba(255,255,255,0.1); color: #78788c; flex-shrink: 0; }
.env-badge:empty { display: none; }
.env-badge.env-production  { background: rgba(230,102,102,0.18); color: #e66666; }
.env-badge.env-staging     { background: rgba(230,200,102,0.18); color: #e6c866; }
.env-badge.env-development { background: rgba(102,230,128,0.18); color: #66e680; }
.status { font-size: 13px; color: #78788c; transition: color 0.3s; }
.status.success { color: #66e680; }
.status.error { color: #e66666; }
.header-spacer { flex: 1; }
.actions { display: flex; gap: 6px; }
.switchboard-actions { display: flex; align-items: center; gap: 10px; padding: 8px 24px; background: #13131e; border-bottom: 1px solid rgba(255,255,255,0.06); position: sticky; top: 90px; z-index: 98; }
.switchboard-actions .btn { font-size: 13px; }
.switchboard-actions .btn-discard { color: rgba(255,255,255,0.5); }
.switchboard-actions .btn-discard:hover:not(:disabled) { color: rgba(255,255,255,0.8); }

/* ── Environment management ── */
.env-management { margin-left: 12px; position: relative; }
.btn-env { font-size: 12px; padding: 5px 12px; background: #3c5a8a; color: #c8d4e8; border: 1px solid rgba(100,140,200,0.25); }
.btn-env:hover { background: #4a6da0; color: #e8eef8; }
.env-panel { position: absolute; top: 100%; right: 0; margin-top: 6px; width: 340px; background: #1a1a28; border: 1px solid rgba(255,255,255,0.12); border-radius: 8px; box-shadow: 0 8px 32px rgba(0,0,0,0.5); z-index: 200; padding: 14px; }
.env-panel-loading, .env-panel-error { font-size: 13px; color: #78788c; text-align: center; padding: 16px 0; }
.env-panel-error { color: #e66666; }
.env-panel-header { display: flex; justify-content: space-between; align-items: center; font-size: 13px; font-weight: 700; margin-bottom: 12px; color: #b4b4c8; }
.env-panel-current { font-size: 11px; font-weight: 400; color: #78788c; }
.env-cards { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.env-card { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 6px; background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.06); }
.env-card.current { border-color: rgba(255,255,255,0.15); background: rgba(255,255,255,0.07); }
.env-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.env-card-info { flex: 1; min-width: 0; }
.env-card-name { font-size: 13px; font-weight: 600; color: #e8e8f0; }
.env-current-tag { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; background: rgba(255,255,255,0.1); color: #78788c; padding: 1px 5px; border-radius: 3px; margin-left: 4px; }
.env-card-meta { font-size: 11px; color: #55556a; margin-top: 1px; }
.env-promote { border-top: 1px solid rgba(255,255,255,0.08); padding-top: 12px; }
.env-promote-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.8px; color: #78788c; margin-bottom: 8px; }
.env-promote-row { display: flex; align-items: center; gap: 8px; }
.env-select { background: #12121c; color: #e8e8f0; border: 1px solid rgba(255,255,255,0.15); border-radius: 5px; padding: 5px 8px; font-size: 12px; flex: 1; cursor: pointer; }
.env-select:focus { outline: none; border-color: rgba(255,255,255,0.3); }
.env-arrow { color: #78788c; font-size: 16px; flex-shrink: 0; }
.btn-promote { background: #3c6eb4; font-size: 12px; padding: 5px 14px; flex-shrink: 0; }
.sb-action-status { font-size: 12px; color: #78788c; margin-left: 8px; }
.tier-unlock-cb { accent-color: #8264c8; width: 13px; height: 13px; cursor: pointer; margin: 0 3px 0 0; vertical-align: middle; }
.tier-unlock-label { display: block; font-size: 10px; font-weight: 400; color: #66e680; cursor: pointer; margin-top: 2px; }
.tier-unlock-label.tier-locked { color: #e66666; }
.tier-unlock-label.tier-locked .tier-unlock-cb { accent-color: #e66666; }
.btn { padding: 6px 14px; border: none; border-radius: 6px; font-size: 13px; font-weight: 600; cursor: pointer; color: white; transition: opacity 0.15s; }
.btn:hover { opacity: 0.85; }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }
.btn-save { background: #3ca064; }
.btn-load { background: #3c6eb4; }
.btn-ghost { background: transparent; border: 1px solid rgba(255,255,255,0.2); color: rgba(255,255,255,0.6); }

/* ── User info in header ── */
.user-info { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #b4b4c8; }
.user-email { opacity: 0.7; }
.btn-signout { padding: 4px 10px; font-size: 12px; }

/* ── Tab bar ── */
.tab-bar { display: flex; gap: 0; background: #0a0a14; border-bottom: 1px solid rgba(255,255,255,0.08); padding: 0 24px; position: sticky; top: 49px; z-index: 99; }
.tab-btn { padding: 10px 20px; font-size: 13px; font-weight: 600; color: #78788c; background: transparent; border: none; border-bottom: 2px solid transparent; cursor: pointer; transition: all 0.15s; white-space: nowrap; }
.tab-btn:hover { color: #b4b4c8; }
.tab-btn.active { color: #e8e8f0; border-bottom-color: #3c6eb4; }
.tab-content { display: none; }
.tab-content.active { display: block; }
.tab-alert-badge { color: #e6c866; font-size: 14px; margin-left: 4px; animation: tab-badge-pulse 2s ease-in-out infinite; }
@keyframes tab-badge-pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.4; } }

/* ── Grid (switchboard) ── */
.group-header { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 1.5px; color: rgba(255,255,255,0.35); padding: 12px 0 4px 30px; border-top: 1px solid rgba(255,255,255,0.06); }
.group-header:first-child { border-top: none; padding-top: 4px; }
.category-row { display: flex; align-items: center; padding: 4px 0; min-height: 38px; }
.category-label { min-width: 180px; font-size: 13px; font-weight: 700; user-select: none; display: flex; align-items: center; gap: 4px; white-space: nowrap; flex-shrink: 0; }
.tiles-container { display: flex; flex-wrap: wrap; gap: 5px; flex: 1; align-items: center; min-height: 28px; }

/* ── Provider tiles ── */
.tile { display: inline-flex; align-items: center; gap: 5px; padding: 4px 8px; border-radius: 6px; border: 1px solid rgba(255,255,255,0.15); cursor: grab; position: relative; transition: background 0.2s, border-color 0.2s, box-shadow 0.2s; user-select: none; }
.tile:active { cursor: grabbing; }
.tile.dragging { opacity: 0.3; }
.tile.drag-over { border-color: #66e680 !important; border-style: dashed; }
.tile.primary { border-color: rgba(255,255,255,0.35); }
.badge { display: flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 10px; font-size: 11px; font-weight: 700; flex-shrink: 0; }
.badge.primary { background: rgba(255,255,255,0.85); color: #0a0a14; }
.badge.secondary { background: rgba(255,255,255,0.12); color: rgba(255,255,255,0.7); }
.tile-name { font-size: 13px; white-space: nowrap; }
.tile-metrics { display: flex; align-items: center; gap: 5px; font-size: 10px; color: rgba(255,255,255,0.45); margin-left: 2px; border-left: 1px solid rgba(255,255,255,0.08); padding-left: 6px; }
.tile-metrics:empty { display: none; border: none; padding: 0; }
.mv { font-weight: 600; }
.mv.good { color: #66e680; }
.mv.warn { color: #e6c866; }
.mv.bad { color: #e66666; }
.tile-remove { width: 18px; height: 18px; border: none; background: transparent; color: rgba(255,150,150,0.6); cursor: pointer; font-size: 14px; display: flex; align-items: center; justify-content: center; padding: 0; border-radius: 4px; margin-left: 2px; }
.tile-remove:hover { background: rgba(255,100,100,0.2); color: #ff8888; }
.tile-cost { font-size: 10px; color: rgba(255,255,255,0.3); }

/* ── Add button + dropdown ── */
.add-btn { width: 28px; height: 28px; border: 1px dashed rgba(255,255,255,0.12); background: rgba(255,255,255,0.03); color: rgba(255,255,255,0.35); border-radius: 6px; cursor: pointer; font-size: 16px; display: flex; align-items: center; justify-content: center; transition: all 0.15s; position: relative; }
.add-btn:hover { border-color: rgba(255,255,255,0.25); color: rgba(255,255,255,0.6); background: rgba(255,255,255,0.06); }
.add-dropdown { position: absolute; top: 100%; left: 0; margin-top: 4px; background: #1a1a2e; border: 1px solid rgba(255,255,255,0.15); border-radius: 6px; padding: 4px; z-index: 50; min-width: 200px; max-height: 240px; overflow-y: auto; box-shadow: 0 8px 24px rgba(0,0,0,0.5); }
.add-dropdown-item { padding: 6px 10px; cursor: pointer; border-radius: 4px; font-size: 13px; display: flex; justify-content: space-between; align-items: center; }
.add-dropdown-item:hover { background: rgba(255,255,255,0.08); }
.add-dropdown-item .cost { font-size: 11px; color: rgba(255,255,255,0.3); }

/* ── Heat map tile colors ── */
.heat-active { box-shadow: 0 0 8px rgba(40,200,80,0.3); }

/* ── Quality tier system ── */
.category-group { border-bottom: 1px solid rgba(255,255,255,0.04); }
.category-group:last-child { border-bottom: none; }

.tier-toggle { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; font-size: 16px; color: rgba(255,255,255,0.4); cursor: pointer; margin-right: 6px; transition: transform 0.15s, color 0.15s; user-select: none; flex-shrink: 0; }
.tier-toggle:hover { color: rgba(255,255,255,0.7); }
.tier-toggle.expanded { transform: rotate(90deg); color: rgba(255,255,255,0.6); }

.tier-row { padding-left: 20px; background: rgba(255,255,255,0.015); }
.tier-row .tiles-container { min-height: 26px; }

.tier-label { width: 140px; min-width: 140px; font-size: 12px; font-weight: 600; display: flex; align-items: center; gap: 6px; }
.tier-name-label { font-weight: 700; font-size: 12px; letter-spacing: 0.3px; text-transform: uppercase; }

.tier-badge { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 4px; font-size: 10px; font-weight: 700; color: #0a0a14; flex-shrink: 0; }

.tier-delete-btn { width: 16px; height: 16px; border: none; background: transparent; color: rgba(255,150,150,0.5); cursor: pointer; font-size: 13px; display: flex; align-items: center; justify-content: center; padding: 0; border-radius: 3px; }
.tier-delete-btn:hover { background: rgba(255,100,100,0.2); color: #ff8888; }

.add-tier-row { min-height: 28px; }
.add-tier-btn { border: 1px dashed rgba(255,255,255,0.1); background: rgba(255,255,255,0.02); color: rgba(255,255,255,0.3); border-radius: 6px; cursor: pointer; font-size: 12px; padding: 4px 12px; transition: all 0.15s; white-space: nowrap; }
.add-tier-btn:hover { border-color: rgba(255,255,255,0.2); color: rgba(255,255,255,0.5); background: rgba(255,255,255,0.05); }

.tier-dropdown { min-width: 140px; }

.empty-tier-hint { font-size: 11px; color: rgba(255,150,150,0.45); font-style: italic; padding: 2px 8px; }
.default-row { border-left: 3px solid #78788c; background: rgba(120,120,140,0.06); }
.default-label { font-style: italic; }
.default-fallback-hint { color: rgba(120,120,140,0.6); }

/* ── Login overlay ── */
.login-overlay { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 60vh; gap: 16px; }
.login-overlay h2 { font-size: 22px; font-weight: 700; color: #e8e8f0; }
.login-overlay p { font-size: 14px; color: #78788c; max-width: 360px; text-align: center; line-height: 1.5; }
.btn-login { padding: 10px 28px; font-size: 15px; font-weight: 600; background: #3c6eb4; border: none; border-radius: 8px; color: white; cursor: pointer; transition: opacity 0.15s; }
.btn-login:hover { opacity: 0.85; }

/* ── Access denied overlay ── */
.access-denied { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 60vh; gap: 12px; }
.access-denied h2 { font-size: 20px; font-weight: 700; color: #e66666; }
.access-denied p { font-size: 14px; color: #78788c; max-width: 400px; text-align: center; line-height: 1.5; }

/* ── Footer ── */
footer { padding: 10px 24px; background: #0a0a14; border-top: 1px solid rgba(255,255,255,0.06); font-size: 12px; color: #55556a; display: flex; gap: 24px; align-items: center; position: sticky; bottom: 0; }
footer .dot { width: 8px; height: 8px; border-radius: 50%; background: #55556a; display: inline-block; margin-right: 6px; }
footer .dot.live { background: #66e680; }

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 3px; }

/* ── Section padding (shared) ── */
.tab-section { padding: 20px 24px; }
.tab-section h2 { font-size: 16px; font-weight: 700; margin-bottom: 12px; color: #e8e8f0; }

/* ── Pill groups (shared) ── */
.pill-group { display: flex; gap: 2px; background: rgba(255,255,255,0.04); border-radius: 6px; padding: 2px; }
.pill { font-size: 12px; font-weight: 600; padding: 5px 12px; border-radius: 5px; border: none; background: transparent; color: #78788c; cursor: pointer; transition: all 0.15s; }
.pill:hover { color: #b4b4c8; }
.pill.active { background: rgba(60,110,180,0.35); color: #e8e8f0; }
.pill-green.active { background: rgba(102,230,128,0.2); color: #66e680; }
.toolbar-divider { width: 1px; height: 24px; background: rgba(255,255,255,0.08); }
.toolbar-spacer { flex: 1; }

/* ── Sort pills ── */
.sort-pills { display: flex; gap: 2px; background: rgba(255,255,255,0.04); border-radius: 6px; padding: 2px; align-items: center; }
.sort-label { font-size: 11px; color: #55556a; padding: 0 6px; white-space: nowrap; }
.sort-pill { font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 5px; border: none; background: transparent; color: #78788c; cursor: pointer; transition: all 0.15s; }
.sort-pill:hover { color: #b4b4c8; }
.sort-pill.active { background: rgba(60,110,180,0.35); color: #e8e8f0; }

/* ── Model info table ── */
.model-type-tabs { display: flex; gap: 2px; background: rgba(255,255,255,0.04); border-radius: 6px; padding: 2px; margin-bottom: 14px; flex-wrap: wrap; }
.model-type-tab { font-size: 12px; font-weight: 600; padding: 5px 12px; border-radius: 5px; border: none; background: transparent; color: #78788c; cursor: pointer; transition: all 0.15s; }
.model-type-tab:hover { color: #b4b4c8; }
.model-type-tab.active { background: rgba(60,110,180,0.35); color: #e8e8f0; }
.model-table { width: 100%; border-collapse: collapse; }
.model-table th { text-align: left; font-size: 12px; font-weight: 700; color: #78788c; padding: 6px 10px; border-bottom: 1px solid rgba(255,255,255,0.08); text-transform: uppercase; letter-spacing: 0.4px; }
.model-table td { font-size: 13px; padding: 7px 10px; border-bottom: 1px solid rgba(255,255,255,0.04); color: #b4b4c8; }
.model-table tr:hover td { background: rgba(255,255,255,0.03); }
.model-table .provider-name { color: #e8e8f0; font-weight: 600; white-space: nowrap; }
.model-table .cost-cell { color: #66e680; white-space: nowrap; font-size: 12px; font-family: 'Consolas', 'SF Mono', monospace; }
.model-table .desc-cell { color: #8888a0; line-height: 1.4; }
.model-table th.sortable { cursor: pointer; user-select: none; }
.model-table th.sortable:hover { color: #b4b4c8; }

/* ── History chart ── */
.history-toolbar { display: flex; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; align-items: center; }
.chart-zoom-hint { font-size: 11px; color: #55556a; }
.provider-toggles { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 12px; }
.provider-toggle { font-size: 12px; padding: 3px 9px; border-radius: 4px; border: 1px solid rgba(255,255,255,0.12); background: rgba(255,255,255,0.04); color: #78788c; cursor: pointer; transition: all 0.15s; display: flex; align-items: center; gap: 5px; }
.provider-toggle:hover { border-color: rgba(255,255,255,0.25); color: #b4b4c8; }
.provider-toggle.active { border-color: rgba(255,255,255,0.25); color: #e8e8f0; }
.provider-color-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.chart-container { position: relative; height: 350px; }
.history-status { font-size: 13px; color: #55556a; padding: 40px 0; text-align: center; }

/* ── Billing alerts ── */
.alerts-toolbar { display: flex; gap: 8px; margin-bottom: 12px; align-items: center; }
.alert-count { font-size: 12px; color: #78788c; }
.alert-count.has-errors { color: #e66666; font-weight: 600; }
.btn-sync { background: rgba(60,110,180,0.3); border: 1px solid rgba(60,110,180,0.5); color: #8ab8e8; }
.btn-sync:hover { background: rgba(60,110,180,0.45); }
.btn-clear-alerts { background: transparent; border: 1px solid rgba(255,255,255,0.15); color: #78788c; }
.alerts-list { max-height: 320px; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; }
.alert-row { display: flex; align-items: flex-start; gap: 10px; padding: 6px 10px; border-radius: 6px; font-size: 13px; line-height: 1.4; }
.alert-row.error { background: rgba(230,102,102,0.08); border-left: 3px solid #e66666; }
.alert-row.warning { background: rgba(230,200,102,0.06); border-left: 3px solid #e6c866; }
.alert-ts { font-size: 11px; color: #55556a; white-space: nowrap; min-width: 70px; }
.alert-severity { font-size: 11px; font-weight: 700; min-width: 54px; text-transform: uppercase; }
.alert-severity.error { color: #e66666; }
.alert-severity.warning { color: #e6c866; }
.alert-provider { font-size: 12px; font-weight: 600; color: #b4b4c8; min-width: 120px; white-space: nowrap; }
.alert-message { color: #8888a0; flex: 1; }
.sync-status { font-size: 12px; color: #55556a; margin-left: auto; }

/* ── Billing cost docs table ── */
.costdocs-toolbar { display: flex; gap: 12px; margin-bottom: 12px; align-items: center; flex-wrap: wrap; }
.costdocs-toolbar input { background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.12); border-radius: 6px; padding: 5px 12px; font-size: 13px; color: #e8e8f0; outline: none; min-width: 200px; }
.costdocs-toolbar input:focus { border-color: rgba(60,110,180,0.5); }
.costdocs-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.costdocs-table th { text-align: left; font-size: 11px; font-weight: 700; color: #78788c; padding: 6px 10px; border-bottom: 1px solid rgba(255,255,255,0.08); text-transform: uppercase; letter-spacing: 0.4px; cursor: pointer; user-select: none; }
.costdocs-table th:hover { color: #b4b4c8; }
.costdocs-table td { padding: 5px 10px; border-bottom: 1px solid rgba(255,255,255,0.04); color: #b4b4c8; }
.costdocs-table tr:hover td { background: rgba(255,255,255,0.03); }
.costdocs-table .key-cell { color: #e8e8f0; font-weight: 600; white-space: nowrap; }
.costdocs-table .cost-val { color: #66e680; font-family: 'Consolas', 'SF Mono', monospace; font-size: 12px; }
.auto-sync-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #66e680; margin-right: 4px; vertical-align: middle; }
.no-sync-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #55556a; margin-right: 4px; vertical-align: middle; }

/* ── Billing cost chart ── */
.cost-chart-toolbar { display: flex; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; align-items: center; }
.cost-chart-toolbar select { background: #1a1a2e; border: 1px solid rgba(255,255,255,0.15); border-radius: 6px; padding: 5px 10px; font-size: 13px; color: #e8e8f0; outline: none; cursor: pointer; }
.cost-summary { display: flex; gap: 24px; margin-bottom: 16px; flex-wrap: wrap; }
.cost-summary-card { background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08); border-radius: 8px; padding: 12px 20px; min-width: 140px; }
.cost-summary-card .label { font-size: 11px; color: #78788c; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 4px; }
.cost-summary-card .value { font-size: 20px; font-weight: 700; color: #66e680; font-family: 'Consolas', 'SF Mono', monospace; }

/* ── Help panel ── */
.help-toggle { padding: 6px 14px; font-size: 13px; font-weight: 600; background: rgba(60,110,180,0.2); border: 1px solid rgba(60,110,180,0.45); color: #8ab8e8; border-radius: 6px; cursor: pointer; transition: all 0.15s; }
.help-toggle:hover { background: rgba(60,110,180,0.35); border-color: rgba(60,110,180,0.6); color: #c0daf5; }
.help-toggle.active { background: rgba(60,110,180,0.35); border-color: rgba(60,110,180,0.65); color: #c0daf5; }
.help-panel { display: none; background: rgba(255,255,255,0.02); border-bottom: 1px solid rgba(255,255,255,0.06); padding: 0 24px; max-height: 0; overflow: hidden; transition: max-height 0.35s ease, padding 0.35s ease; }
.help-panel.open { display: block; max-height: 1200px; padding: 20px 24px; }
.help-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
@media (max-width: 900px) { .help-columns { grid-template-columns: 1fr; } }
.help-section { margin-bottom: 16px; }
.help-section h3 { font-size: 13px; font-weight: 700; color: #b4b4c8; margin-bottom: 8px; text-transform: uppercase; letter-spacing: 0.5px; }
.help-section p, .help-section li { font-size: 13px; color: #8888a0; line-height: 1.6; }
.help-section ul { padding-left: 16px; margin: 4px 0; }
.help-section li { margin-bottom: 4px; }
.help-section code { background: rgba(255,255,255,0.06); padding: 1px 5px; border-radius: 3px; font-size: 12px; color: #b4b4c8; }
.help-badge { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; border-radius: 9px; font-size: 10px; font-weight: 700; vertical-align: middle; margin: 0 2px; }
.help-badge.primary { background: rgba(255,255,255,0.85); color: #0a0a14; }
.help-badge.secondary { background: rgba(255,255,255,0.12); color: rgba(255,255,255,0.7); }
.help-color { display: inline-block; width: 10px; height: 10px; border-radius: 2px; vertical-align: middle; margin-right: 4px; }
.metric-legend { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
.metric-legend-item { display: flex; align-items: flex-start; gap: 6px; font-size: 12px; color: #8888a0; line-height: 1.5; }
.metric-legend-item strong { color: #b4b4c8; white-space: nowrap; }

/* ═══════════════════════════════════════════════════════════════════
   AI Dev Spend tab
   ═══════════════════════════════════════════════════════════════════ */

/* Sub-tab visibility */
.ds-subtab { display: none; }
.ds-subtab.active { display: block; }

/* Toolbar: sub-tabs + range + status + refresh in one row */
.ds-toolbar { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }

/* Summary cards grid */
.ds-cards-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ds-cards-grid.three-col { grid-template-columns: 1fr 1fr 1fr; }
.ds-cards-grid.four-col { grid-template-columns: 1fr 1fr 1fr 1fr; }
.ds-card { background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08); border-radius: 8px; padding: 14px 18px; }
.ds-card-label { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; color: #78788c; }
.ds-card-value { font-size: 26px; font-weight: 700; margin: 4px 0 2px; letter-spacing: -0.03em; }
.ds-card-sub { font-size: 11px; color: #55556a; }
.ds-card-value.green { color: #66e680; } .ds-card-value.blue { color: #59bff2; }
.ds-card-value.yellow { color: #e6c866; } .ds-card-value.purple { color: #a680f2; }
.ds-card-value.orange { color: #f2a64d; } .ds-card-value.cyan { color: #66cccc; }

/* Top row: cost table + cards side by side */
.ds-top-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.ds-cost-table-wrap { background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08); border-radius: 8px; padding: 14px 18px; }
.ds-cost-table-wrap h3 { font-size: 12px; font-weight: 700; color: #78788c; text-transform: uppercase; letter-spacing: 0.4px; margin-bottom: 10px; }
.ds-cost-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.ds-cost-table td { padding: 5px 8px; }
.ds-cost-table td:first-child { color: #b4b4c8; }
.ds-cost-table .num { text-align: right; font-weight: 600; color: #e8e8f0; font-variant-numeric: tabular-nums; }
.ds-cost-table .note { color: #55556a; font-size: 11px; }
.ds-cost-table .total-row td { border-top: 2px solid rgba(255,255,255,0.1); font-weight: 700; color: #e8e8f0; padding-top: 8px; }
.ds-cost-table .muted-row { opacity: 0.5; }

/* Charts layout */
.ds-charts-row { display: grid; gap: 12px; margin-bottom: 12px; }
.ds-charts-row.two-col { grid-template-columns: 2fr 1fr; }
.ds-chart-card { background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08); border-radius: 8px; padding: 14px 18px; margin-bottom: 12px; }
.ds-chart-card.full { grid-column: 1 / -1; }
.ds-chart-card h3 { font-size: 12px; font-weight: 700; color: #78788c; text-transform: uppercase; letter-spacing: 0.4px; margin-bottom: 10px; }
.ds-chart-wrap { position: relative; height: 260px; }
.ds-chart-wrap.donut { height: 260px; display: flex; align-items: center; justify-content: center; }
.ds-chart-wrap.hbar { min-height: 200px; }

/* Scrollable table containers */
.ds-scroll { max-height: 380px; overflow-y: auto; }

/* Tables inside dev spend */
#tab-devspend table { width: 100%; border-collapse: collapse; font-size: 12px; }
#tab-devspend thead th { text-align: left; font-size: 10px; font-weight: 700; color: #78788c; padding: 5px 8px; border-bottom: 1px solid rgba(255,255,255,0.08); text-transform: uppercase; letter-spacing: 0.4px; }
#tab-devspend tbody td { padding: 4px 8px; border-bottom: 1px solid rgba(255,255,255,0.04); color: #b4b4c8; }
#tab-devspend tbody tr:hover td { background: rgba(255,255,255,0.03); }
#tab-devspend .num { text-align: right; font-variant-numeric: tabular-nums; }
.ds-empty { text-align: center; padding: 20px 0 !important; color: #55556a; font-size: 12px; }
.ds-rank { font-weight: 700; color: #e6c866; width: 30px; text-align: center; }

/* Model badge + kind badges */
.ds-badge { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 11px; font-weight: 600; background: rgba(89,191,242,0.15); color: #59bff2; max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ds-kind { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 10px; font-weight: 600; }
.ds-kind.incl { background: rgba(102,230,128,0.15); color: #66e680; }
.ds-kind.usage { background: rgba(230,200,102,0.15); color: #e6c866; }
.ds-kind.api { background: rgba(166,128,242,0.15); color: #a680f2; }

/* Not configured message */
.ds-not-configured { text-align: center; padding: 60px 20px; color: #55556a; }
.ds-not-configured h3 { color: #b4b4c8; margin-bottom: 8px; font-size: 16px; }
.ds-not-configured code { background: rgba(255,255,255,0.06); padding: 2px 6px; border-radius: 4px; color: #59bff2; font-size: 12px; }

/* Responsive */
@media (max-width: 900px) {
    .ds-top-row, .ds-charts-row.two-col { grid-template-columns: 1fr; }
    .ds-cards-grid.three-col, .ds-cards-grid.four-col { grid-template-columns: 1fr 1fr; }
}

/* ═══════════════════════════════════════════════════════════════════
   Games tab
   ═══════════════════════════════════════════════════════════════════ */

/* Toolbar row */
.games-toolbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.games-toolbar h2 { margin-bottom: 0; }
.games-toolbar-spacer { flex: 1; }
.games-filter-input { background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.12); border-radius: 6px; padding: 5px 12px; font-size: 13px; color: #e8e8f0; outline: none; min-width: 160px; }
.games-filter-input:focus { border-color: rgba(60,110,180,0.5); }
.games-sort-select { background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.12); border-radius: 6px; padding: 5px 10px; font-size: 12px; color: #b4b4c8; outline: none; cursor: pointer; }
.games-sort-select:focus { border-color: rgba(60,110,180,0.5); }
.games-sort-select option { background: #1e1e2e; color: #e8e8f0; }
.games-status { font-size: 12px; color: #55556a; margin-bottom: 10px; }

/* Thumbnail grid — 16:9 tiles, width driven by --tile-w CSS var */
.games-grid { display: grid; grid-template-columns: repeat(auto-fill, var(--tile-w, 200px)); gap: 6px; --tile-w: 200px; }
.games-empty { grid-column: 1 / -1; text-align: center; padding: 40px 0; color: #55556a; font-size: 13px; }
.games-sentinel { grid-column: 1 / -1; height: 1px; }

/* Individual game cell — 16:9 aspect ratio via aspect-ratio property */
.game-cell { width: var(--tile-w, 200px); aspect-ratio: 16 / 9; border-radius: 6px; overflow: hidden; cursor: pointer; position: relative; border: 1px solid rgba(255,255,255,0.06); transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s; background-size: cover; background-position: center; }
.game-cell:hover { border-color: rgba(60,110,180,0.6); transform: scale(1.06); z-index: 10; box-shadow: 0 4px 16px rgba(0,0,0,0.5); }
.game-cell.loaded .game-cell-placeholder { display: none; }
.game-cell-placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; background: rgba(255,255,255,0.06); font-size: 28px; font-weight: 700; color: #55556a; transition: opacity 0.2s; }
.game-cell-placeholder.loading { animation: cell-pulse 1.2s ease-in-out infinite; }
@keyframes cell-pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.4; } }

/* Size slider */
.games-size-control { display: flex; align-items: center; gap: 6px; }
.games-size-label { font-size: 11px; color: #78788c; font-weight: 600; white-space: nowrap; }
.games-size-slider { width: 90px; accent-color: #3c6eb4; cursor: pointer; }

/* Hover tooltip (positioned via JS) */
.game-tooltip { position: fixed; z-index: 200; background: #1a1a2e; border: 1px solid rgba(255,255,255,0.15); border-radius: 8px; padding: 10px 14px; max-width: 280px; pointer-events: none; box-shadow: 0 8px 24px rgba(0,0,0,0.6); }
.game-tooltip-title { font-size: 13px; font-weight: 700; color: #e8e8f0; margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.game-tooltip-meta { font-size: 11px; color: #78788c; margin-bottom: 6px; }
.game-tooltip-desc { font-size: 12px; color: #8888a0; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.game-tooltip-none { font-style: italic; color: #55556a; }
.game-badge-public { color: #66e680; font-weight: 600; }
.game-badge-private { color: #78788c; font-weight: 600; }

/* Detail popup overlay */
.game-detail-overlay { position: fixed; inset: 0; z-index: 300; background: rgba(0,0,0,0.7); display: flex; align-items: center; justify-content: center; }
.game-detail-popup { position: relative; background: #16162a; border: 1px solid rgba(255,255,255,0.1); border-radius: 12px; padding: 28px; max-width: 560px; width: 90vw; max-height: 85vh; overflow-y: auto; box-shadow: 0 16px 48px rgba(0,0,0,0.7); }
.game-detail-close { position: absolute; top: 10px; right: 14px; background: transparent; border: none; color: rgba(255,255,255,0.4); font-size: 22px; cursor: pointer; line-height: 1; }
.game-detail-close:hover { color: #e66666; }

.game-detail-cover { width: 100%; max-height: 260px; object-fit: cover; border-radius: 8px; margin-bottom: 16px; transition: opacity 0.15s; }
.game-detail-cover-clickable { cursor: pointer; }
.game-detail-cover-clickable:hover { opacity: 0.8; }

/* Fullscreen cover lightbox */
.game-lightbox { position: fixed; inset: 0; z-index: 400; background: rgba(0,0,0,0.92); display: flex; align-items: center; justify-content: center; cursor: pointer; }
.game-lightbox img { max-width: 95vw; max-height: 95vh; object-fit: contain; border-radius: 8px; box-shadow: 0 0 60px rgba(0,0,0,0.6); }
.game-detail-no-cover { width: 100%; height: 120px; background: rgba(255,255,255,0.04); border-radius: 8px; display: flex; align-items: center; justify-content: center; color: #55556a; font-size: 13px; margin-bottom: 16px; }
.game-detail-title { font-size: 18px; font-weight: 700; color: #e8e8f0; margin-bottom: 8px; }
.game-detail-desc { font-size: 13px; color: #8888a0; line-height: 1.5; margin-bottom: 16px; }

.game-detail-table { width: 100%; border-collapse: collapse; }
.game-detail-table td { padding: 5px 8px; font-size: 13px; border-bottom: 1px solid rgba(255,255,255,0.04); }
.game-detail-key { color: #78788c; font-weight: 600; white-space: nowrap; width: 110px; }
.game-detail-val { color: #b4b4c8; word-break: break-all; }

/* User links in game detail */
.user-link { color: #59bff2; text-decoration: none; cursor: pointer; }
.user-link:hover { text-decoration: underline; color: #80d0ff; }

/* Text file links row in game detail */
.game-detail-files { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.game-detail-file-link { display: inline-flex; align-items: center; gap: 4px; padding: 5px 12px; font-size: 12px; font-weight: 600; color: #b8b8d0; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1); border-radius: 6px; cursor: pointer; transition: background 0.15s, color 0.15s; }
.game-detail-file-link:hover { background: rgba(89,191,242,0.15); color: #59bff2; border-color: rgba(89,191,242,0.3); }

/* Text file reader overlay */
.game-text-reader-overlay { position: fixed; inset: 0; z-index: 500; background: rgba(0,0,0,0.8); display: flex; align-items: center; justify-content: center; }
.game-text-reader-panel { background: #12122a; border: 1px solid rgba(255,255,255,0.1); border-radius: 12px; width: 90vw; max-width: 800px; max-height: 85vh; display: flex; flex-direction: column; box-shadow: 0 20px 60px rgba(0,0,0,0.8); }
.game-text-reader-header { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; border-bottom: 1px solid rgba(255,255,255,0.08); flex-shrink: 0; }
.game-text-reader-title { font-size: 15px; font-weight: 700; color: #e0e0f0; }
.game-text-reader-actions { display: flex; gap: 8px; align-items: center; }
.game-text-reader-copy { padding: 4px 14px; font-size: 12px; font-weight: 600; color: #b8b8d0; background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.12); border-radius: 5px; cursor: pointer; transition: background 0.15s, color 0.15s; }
.game-text-reader-copy:hover { background: rgba(89,191,242,0.15); color: #59bff2; border-color: rgba(89,191,242,0.3); }
.game-text-reader-close { background: transparent; border: none; color: rgba(255,255,255,0.4); font-size: 22px; cursor: pointer; line-height: 1; padding: 0 4px; }
.game-text-reader-close:hover { color: #e66666; }
.game-text-reader-body { margin: 0; padding: 20px; overflow-y: auto; flex: 1; font-family: 'Consolas', 'Monaco', 'Courier New', monospace; font-size: 13px; line-height: 1.6; color: #c0c0d8; white-space: pre-wrap; word-break: break-word; }

/* ═══ Users tab ═══ */
.users-toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }

/* Stats summary cards */
.users-stats { margin-bottom: 16px; }
.stats-period-bar { display: flex; gap: 4px; margin-bottom: 10px; }
.stats-period-btn { padding: 4px 12px; font-size: 12px; font-weight: 600; border: 1px solid rgba(255,255,255,0.1); border-radius: 5px; background: transparent; color: #78788c; cursor: pointer; transition: all 0.15s; }
.stats-period-btn:hover { color: #b4b4c8; border-color: rgba(255,255,255,0.2); }
.stats-period-btn.active { color: #e8e8f0; background: rgba(60,110,180,0.25); border-color: rgba(60,110,180,0.5); }
.stats-cards { display: flex; gap: 10px; flex-wrap: wrap; }
.stats-card { flex: 1 1 120px; min-width: 110px; padding: 12px 14px; background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.06); border-radius: 8px; }
.stats-card-value { font-size: 20px; font-weight: 700; line-height: 1.2; font-variant-numeric: tabular-nums; }
.stats-card-label { font-size: 11px; font-weight: 600; color: #78788c; margin-top: 4px; white-space: nowrap; }
.stats-card-sub { font-weight: 400; color: #55556a; }
.users-table { width: 100%; border-collapse: collapse; table-layout: auto; }
.users-table th { padding: 8px 10px; font-size: 12px; font-weight: 600; color: #78788c; text-align: left; border-bottom: 1px solid rgba(255,255,255,0.08); cursor: pointer; user-select: none; white-space: nowrap; }
.users-table th:hover { color: #b4b4c8; }
.users-table td { padding: 6px 10px; font-size: 13px; color: #b4b4c8; border-bottom: 1px solid rgba(255,255,255,0.04); }
.users-table td.num { font-variant-numeric: tabular-nums; }

/* Columns: 1=Name 2=Email 3=Games 4=Credits 5=Bought 6=Spent 7=$Credits 8=AICost 9=VIP 10=Internal 11=LastLogin 12=Joined */
.users-table th:nth-child(n+3), .users-table td:nth-child(n+3) { text-align: right; }
.users-table th:nth-child(9), .users-table td:nth-child(9),
.users-table th:nth-child(10), .users-table td:nth-child(10) { text-align: center; }    /* VIP & Internal centered */

.user-row { cursor: pointer; transition: background 0.1s; }
.user-row:hover { background: rgba(255,255,255,0.04); }
.user-badge-vip { color: #e6c866; font-weight: 700; font-size: 11px; }
.user-badge-internal { color: #a680f2; font-weight: 700; font-size: 11px; }
.users-pagination { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 0 4px; }
.users-pagination .pagination-btn { min-width: 32px; padding: 4px 8px; font-size: 14px; }
.users-pagination .pagination-btn[disabled] { opacity: 0.3; pointer-events: none; }
.users-pagination .pagination-info { font-size: 12px; color: #78788c; min-width: 100px; text-align: center; }
.user-profile-header { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; }
.user-profile-name { font-size: 18px; font-weight: 700; color: #e8e8f0; margin: 0; }
.credit-grant-form { display: flex; align-items: center; gap: 8px; padding: 10px 14px; margin-bottom: 12px; background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.08); border-radius: 8px; }
.credit-grant-form input { padding: 5px 8px; font-size: 13px; border: 1px solid rgba(255,255,255,0.12); border-radius: 4px; background: rgba(0,0,0,0.3); color: #e8e8f0; outline: none; }
.credit-grant-form input:focus { border-color: rgba(60,110,180,0.6); }

/* ── Admin actions panel (user profile) ── */
.admin-actions { display: flex; gap: 10px; flex-wrap: wrap; margin: 16px 0; }
.admin-action-card { flex: 1; min-width: 180px; background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.08); border-radius: 8px; padding: 12px 14px; }
.admin-action-card h3 { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: #78788c; margin: 0 0 8px; }
.admin-action-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.admin-action-row input { padding: 4px 8px; font-size: 13px; border: 1px solid rgba(255,255,255,0.12); border-radius: 4px; background: rgba(0,0,0,0.3); color: #e8e8f0; outline: none; width: 70px; }
.admin-action-row input:focus { border-color: rgba(60,110,180,0.6); }
.admin-action-status { font-size: 11px; color: #78788c; margin-top: 6px; min-height: 16px; }
.admin-badge { font-size: 11px; font-weight: 700; padding: 2px 10px; border-radius: 10px; display: inline-block; }
.admin-badge-on { background: rgba(60,192,100,0.15); color: #3cc064; }
.admin-badge-off { background: rgba(230,102,102,0.15); color: #e66666; }
.btn-sm { font-size: 11px; padding: 3px 10px; }

/* ── Beta requests tab ── */
.beta-row-handled td { opacity: 0.4; }
.beta-row-handled td.beta-actions { opacity: 1; }
.beta-actions { white-space: nowrap; }

/* ═══ Pricing section (inside Switchboard tab) ═══ */
.pricing-controls { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.pricing-controls label { font-size: 13px; font-weight: 600; color: #b4b4c8; white-space: nowrap; }
.pricing-controls select, .pricing-controls input[type="number"] { background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.12); border-radius: 6px; padding: 5px 10px; font-size: 13px; color: #e8e8f0; outline: none; }
.pricing-controls select:focus, .pricing-controls input[type="number"]:focus { border-color: rgba(60,110,180,0.5); }
.pricing-controls select option { background: #1e1e2e; color: #e8e8f0; }
.pricing-controls input[type="number"] { width: 70px; text-align: right; }

.pricing-effective { font-size: 12px; color: #66e680; font-weight: 600; margin-left: 4px; white-space: nowrap; }

.pricing-sub-heading { font-size: 13px; font-weight: 700; color: rgba(255,255,255,0.35); text-transform: uppercase; letter-spacing: 1px; margin: 18px 0 8px; }

.pricing-table { border-collapse: collapse; table-layout: auto; }
.pricing-table th { padding: 4px 8px; font-size: 12px; font-weight: 600; color: #78788c; text-align: right; border-bottom: 1px solid rgba(255,255,255,0.08); white-space: nowrap; }
.pricing-table th:first-child { text-align: left; }
.pricing-table td { padding: 3px 8px; font-size: 13px; color: #b4b4c8; border-bottom: 1px solid rgba(255,255,255,0.04); text-align: right; font-variant-numeric: tabular-nums; }
.pricing-table td:first-child { text-align: left; font-weight: 600; color: #e8e8f0; white-space: nowrap; }
.pricing-table tr.total-row td { border-top: 1px solid rgba(255,255,255,0.12); font-weight: 700; color: #e8e8f0; }
.pricing-table tr.override-total-row td { border-top: none; font-weight: 600; color: #b4b4c8; font-style: italic; }
.pricing-override-discount { font-size: 11px; margin-left: 6px; font-weight: 600; }

.pricing-packages { margin-bottom: 8px; }
.pricing-packages td.active-pkg { color: #66e680; }

.pricing-cell { line-height: 1.4; white-space: nowrap; vertical-align: top; padding-top: 4px !important; padding-bottom: 4px !important; }
.pricing-cell-provider { font-size: 9px; color: #6a6a90; letter-spacing: 0.02em; overflow: hidden; text-overflow: ellipsis; max-width: 120px; margin-bottom: 1px; }
.pricing-cell-cost { font-size: 11px; color: #55556a; margin-bottom: 2px; }

.pricing-cell-price-row { display: flex; align-items: center; gap: 2px; }
.pricing-cell-input { width: 52px; padding: 1px 4px; font-size: 12px; font-variant-numeric: tabular-nums; text-align: right; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.12); border-radius: 3px; color: #e8e8f0; outline: none; -moz-appearance: textfield; }
.pricing-cell-input::-webkit-inner-spin-button, .pricing-cell-input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.pricing-cell-input:focus { border-color: rgba(60,110,180,0.6); }
.pricing-cell-unit { font-size: 11px; color: #55556a; margin-right: 4px; }

.pricing-cell-total { font-size: 13px; color: #e8e8f0; font-weight: 600; }

.pricing-lock-toggle { background: none; border: none; cursor: pointer; font-size: 11px; padding: 0 2px; opacity: 0.4; transition: opacity 0.15s; line-height: 1; }
.pricing-lock-toggle:hover { opacity: 0.8; }
.pricing-lock-toggle.locked { opacity: 0.7; }
.pricing-cell-locked { background: rgba(255,200,50,0.04); }
.pricing-cell-locked .pricing-cell-input { border-color: rgba(255,200,50,0.2); }

.pricing-key { display: flex; gap: 24px; margin-bottom: 10px; font-size: 12px; color: #78788c; }
.pricing-key-item { display: inline-flex; align-items: center; gap: 6px; }
.pricing-key .pricing-cell-provider { font-size: 10px; color: #6a6a90; background: rgba(255,255,255,0.04); padding: 1px 6px; border-radius: 3px; display: inline; max-width: none; }
.pricing-key .pricing-cell-cost { font-size: 11px; color: #55556a; background: rgba(255,255,255,0.04); padding: 1px 6px; border-radius: 3px; }
.pk-sample-input { font-size: 11px; color: #e8e8f0; font-weight: 600; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.12); padding: 0 4px; border-radius: 3px; }

.pricing-matrix { margin-bottom: 8px; }

.pricing-actions { display: flex; align-items: center; gap: 10px; margin-top: 8px; flex-wrap: wrap; }
.pricing-actions .btn { font-size: 12px; padding: 3px 12px; }
.pricing-actions-label { font-size: 12px; font-weight: 600; color: #b4b4c8; margin-left: 12px; }
.pricing-actions-input { width: 50px; padding: 2px 6px; font-size: 12px; text-align: right; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.12); border-radius: 4px; color: #e8e8f0; outline: none; }

.pricing-gen-count { font-weight: 400; font-size: 11px; color: #55556a; }

/* ═══ Credit Calculator ═══ */
.pricing-calc-controls { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.pricing-calc-controls label { font-size: 13px; font-weight: 600; color: #b4b4c8; white-space: nowrap; }
.pricing-calc-controls select, .pricing-calc-controls input[type="number"] { background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.12); border-radius: 6px; padding: 5px 10px; font-size: 13px; color: #e8e8f0; outline: none; }
.pricing-calc-controls select:focus, .pricing-calc-controls input[type="number"]:focus { border-color: rgba(60,110,180,0.5); }
.pricing-calc-controls select option { background: #1e1e2e; color: #e8e8f0; }
.pricing-calc-controls input[type="number"] { width: 100px; text-align: right; }
.pricing-calc-hint { font-size: 11px; color: #55556a; margin-left: 4px; }

/* ═══ LLM Cost Rows (inline in pricing matrix) ═══ */
.llm-row td:first-child { color: #b4b4c8 !important; font-weight: 500 !important; font-style: italic; }

/* ═══ Color-coded USD columns ═══ */
.usd-customer { color: #e8b84d; }
.usd-revenue { color: #66e680; }

/* ═══════════════════════════════════════════════════════════════════
   Profile tab
   ═══════════════════════════════════════════════════════════════════ */

.profile-content { max-width: 720px; }

/* Header: avatar + name/email */
.profile-header { display: flex; align-items: center; gap: 18px; margin-bottom: 28px; }
.profile-avatar { width: 64px; height: 64px; border-radius: 50%; background: linear-gradient(135deg, #3c6eb4, #a680f2); display: flex; align-items: center; justify-content: center; font-size: 22px; font-weight: 700; color: #fff; flex-shrink: 0; letter-spacing: 0.5px; }
.profile-header-info { display: flex; flex-direction: column; gap: 4px; }
.profile-name { font-size: 22px; font-weight: 700; color: #e8e8f0; margin: 0; }
.profile-email { font-size: 13px; color: #78788c; }
.profile-vip-badge { display: inline-block; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.8px; padding: 2px 8px; border-radius: 4px; background: rgba(230,200,102,0.18); color: #e6c866; }
.profile-internal-badge { display: inline-block; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.8px; padding: 2px 8px; border-radius: 4px; background: rgba(166,128,242,0.18); color: #a680f2; margin-left: 6px; }

/* Stat cards grid */
.profile-stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; margin-bottom: 28px; }
.profile-stat-card { background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08); border-radius: 8px; padding: 14px 16px; }
.profile-stat-value { font-size: 22px; font-weight: 700; line-height: 1.2; font-variant-numeric: tabular-nums; }
.profile-stat-label { font-size: 11px; font-weight: 600; color: #78788c; margin-top: 4px; }

/* Account details card */
.profile-details-card { background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.06); border-radius: 10px; padding: 20px 24px; margin-bottom: 28px; }
.profile-details-card h3 { font-size: 13px; font-weight: 700; color: #b4b4c8; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 14px; }
.profile-details-table { width: 100%; border-collapse: collapse; }
.profile-details-table td { padding: 7px 0; font-size: 13px; border-bottom: 1px solid rgba(255,255,255,0.04); }
.profile-detail-key { color: #78788c; font-weight: 600; width: 160px; white-space: nowrap; }
.profile-detail-val { color: #e8e8f0; }

/* Invite section */
.profile-invite-section { background: rgba(60,110,180,0.08); border: 1px solid rgba(60,110,180,0.2); border-radius: 10px; padding: 20px 24px; }
.profile-invite-section h3 { font-size: 14px; font-weight: 700; color: #e8e8f0; margin-bottom: 6px; }
.profile-invite-desc { font-size: 13px; color: #8888a0; line-height: 1.5; margin-bottom: 14px; }
.profile-invite-desc strong { color: #e8e8f0; }
.profile-invite-actions { display: flex; align-items: center; gap: 12px; }
.profile-invite-btn { padding: 8px 20px; font-size: 13px; }
.profile-invite-status { font-size: 13px; color: #78788c; }

/* ═══════════════════════════════════════════════════════════════════
   Asset Library tab
   ═══════════════════════════════════════════════════════════════════ */

/* ── Stats table ── */
.al-stats-table { width: 100%; border-collapse: collapse; margin-top: 12px; }
.al-stats-table th { text-align: left; font-size: 11px; font-weight: 700; color: #78788c; text-transform: uppercase; letter-spacing: 0.5px; padding: 4px 12px; border-bottom: 1px solid rgba(255,255,255,0.08); }
.al-stats-table td { padding: 3px 12px; font-size: 13px; color: #c8c8d8; border-bottom: 1px solid rgba(255,255,255,0.04); }
.al-stats-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.al-cat-row { cursor: pointer; transition: background 0.15s; }
.al-cat-row:hover { background: rgba(89,191,242,0.08); }
.al-total-row td { font-weight: 700; color: #e8e8f0; border-top: 1px solid rgba(255,255,255,0.1); border-bottom: none; padding-top: 6px; }

/* ── Verify pills ── */
.al-verify-hint { font-size: 13px; color: #78788c; margin-bottom: 12px; }
.al-verify-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.al-verify-pill { display: flex; align-items: center; gap: 8px; padding: 8px 16px; border-radius: 8px; border: 1px solid rgba(255,255,255,0.1); background: rgba(255,255,255,0.04); color: #c8c8d8; font-size: 13px; cursor: pointer; transition: border-color 0.15s, background 0.15s; }
.al-verify-pill:hover { border-color: rgba(60,110,180,0.6); background: rgba(60,110,180,0.1); }
.al-verify-pill--empty { opacity: 0.4; cursor: default; }
.al-verify-pill--empty:hover { border-color: rgba(255,255,255,0.1); background: rgba(255,255,255,0.04); }
.al-pill-label { white-space: nowrap; }
.al-pill-badge { background: rgba(230,102,102,0.2); color: #e66666; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 10px; min-width: 18px; text-align: center; }
.al-verify-pill--empty .al-pill-badge { background: rgba(102,230,128,0.15); color: #66e680; }

/* ── Grid toolbar ── */
.al-grid-toolbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.al-grid-toolbar h2 { margin: 0; white-space: nowrap; }
.al-back-btn { font-size: 13px; padding: 4px 12px; }
.al-filter-dropdown { font-size: 12px; padding: 4px 8px; border-radius: 5px; border: 1px solid rgba(255,255,255,0.15); background: rgba(255,255,255,0.06); color: #c8c8d8; cursor: pointer; }
.al-filter-dropdown:focus { outline: none; border-color: #59bff2; }
.al-batch-actions { display: flex; align-items: center; gap: 8px; }
.al-selection-count { font-size: 12px; color: #78788c; white-space: nowrap; min-width: 70px; }
.al-btn-verify { font-size: 12px; padding: 5px 14px; background: rgba(102,230,128,0.15); color: #66e680; border: 1px solid rgba(102,230,128,0.3); border-radius: 6px; cursor: pointer; transition: background 0.15s; }
.al-btn-verify:hover { background: rgba(102,230,128,0.25); }
.al-btn-prefer { font-size: 12px; padding: 5px 14px; background: rgba(89,191,242,0.15); color: #59bff2; border: 1px solid rgba(89,191,242,0.3); border-radius: 6px; cursor: pointer; transition: background 0.15s; }
.al-btn-prefer:hover { background: rgba(89,191,242,0.25); }
.al-btn-delete { font-size: 12px; padding: 5px 14px; background: rgba(230,102,102,0.15); color: #e66666; border: 1px solid rgba(230,102,102,0.3); border-radius: 6px; cursor: pointer; transition: background 0.15s; }
.al-btn-delete:hover { background: rgba(230,102,102,0.25); }
.al-batch-separator { width: 1px; height: 20px; background: rgba(255,255,255,0.12); margin: 0 4px; }
.al-btn-verify-all { font-size: 12px; padding: 5px 14px; background: rgba(102,230,128,0.25); color: #66e680; border: 1px solid rgba(102,230,128,0.4); border-radius: 6px; cursor: pointer; font-weight: 600; transition: background 0.15s; }
.al-btn-verify-all:hover { background: rgba(102,230,128,0.4); }

/* ── Asset grid ── */
/* ── Pagination bar ── */
.al-pagination { display: flex; align-items: center; gap: 4px; margin-bottom: 8px; flex-wrap: wrap; }
.al-page-btn { font-size: 12px; min-width: 32px; padding: 4px 8px; border-radius: 4px; border: 1px solid rgba(255,255,255,0.1); background: rgba(255,255,255,0.04); color: #c8c8d8; cursor: pointer; transition: background 0.15s; }
.al-page-btn:hover:not(:disabled) { background: rgba(89,191,242,0.2); border-color: rgba(89,191,242,0.3); }
.al-page-btn:disabled { opacity: 0.3; cursor: default; }
.al-page-current { background: rgba(89,191,242,0.3); border-color: #59bff2; color: #fff; font-weight: 700; }
.al-page-ellipsis { color: #55556a; font-size: 12px; padding: 0 2px; }
.al-page-info { font-size: 12px; color: #78788c; margin-left: 12px; }

.al-grid { display: grid; grid-template-columns: repeat(auto-fill, var(--asset-tile-w, 200px)); gap: 6px; --asset-tile-w: 200px; }

.al-card { width: var(--asset-tile-w, 200px); aspect-ratio: 1; border-radius: 8px; overflow: hidden; cursor: pointer; position: relative; border: 2px solid rgba(255,255,255,0.06); transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s; background-size: cover; background-position: center; }
.al-card:hover { border-color: rgba(60,110,180,0.6); transform: scale(1.04); z-index: 10; box-shadow: 0 4px 16px rgba(0,0,0,0.5); }
.al-card.loaded .al-card-placeholder { display: none; }

.al-card-placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; background: rgba(255,255,255,0.06); font-size: 28px; font-weight: 700; color: #55556a; transition: opacity 0.2s; }
.al-card-placeholder.loading { animation: cell-pulse 1.2s ease-in-out infinite; }

/* Card states */
.al-card--preferred { border-color: rgba(89,191,242,0.5); }
.al-card--verified { border-color: rgba(102,230,128,0.3); }
.al-card--selected { border-color: #59bff2 !important; box-shadow: 0 0 0 2px rgba(89,191,242,0.3); }

/* Overlay at the bottom of the card */
.al-card-overlay { position: absolute; bottom: 0; left: 0; right: 0; padding: 6px 8px; background: linear-gradient(transparent, rgba(0,0,0,0.85)); pointer-events: none; }
.al-card-name { font-size: 11px; font-weight: 600; color: #e8e8f0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.al-card-meta { font-size: 10px; color: #8888a0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Checkbox (top-left) */
.al-card-checkbox { position: absolute; top: 6px; left: 6px; width: 22px; height: 22px; border-radius: 4px; border: 1.5px solid rgba(255,255,255,0.3); background: rgba(0,0,0,0.5); display: flex; align-items: center; justify-content: center; font-size: 12px; color: transparent; cursor: pointer; transition: background 0.15s, color 0.15s, border-color 0.15s; }
.al-card-checkbox:hover { border-color: #59bff2; }
.al-card--selected .al-card-checkbox { background: #59bff2; color: #fff; border-color: #59bff2; }

/* Prefer button (top-right) */
.al-card-prefer { position: absolute; top: 6px; right: 6px; width: 26px; height: 26px; border-radius: 50%; background: rgba(0,0,0,0.5); display: flex; align-items: center; justify-content: center; font-size: 14px; cursor: pointer; transition: background 0.15s, transform 0.15s; opacity: 0; }
.al-card:hover .al-card-prefer { opacity: 1; }
.al-card-prefer.active { opacity: 1; background: rgba(89,191,242,0.3); }
.al-card-prefer:hover { transform: scale(1.2); }

/* Detail button (bottom-right) */
.al-card-detail { position: absolute; bottom: 6px; right: 6px; width: 24px; height: 24px; border-radius: 50%; background: rgba(0,0,0,0.55); display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; font-style: italic; font-family: serif; color: rgba(255,255,255,0.7); cursor: pointer; transition: background 0.15s, transform 0.15s; opacity: 0; }
.al-card:hover .al-card-detail { opacity: 1; }
.al-card-detail:hover { transform: scale(1.2); background: rgba(89,191,242,0.4); color: #fff; }

/* ── Lightbox ── */
.al-detail { display: flex; gap: 24px; background: #1e1e2e; border-radius: 12px; padding: 24px; max-width: 90vw; max-height: 90vh; overflow: auto; position: relative; }
.al-detail-close { position: absolute; top: 8px; right: 12px; background: none; border: none; color: #78788c; font-size: 28px; cursor: pointer; line-height: 1; z-index: 1; }
.al-detail-close:hover { color: #e8e8f0; }
.al-detail-image { flex-shrink: 0; max-width: 45%; display: flex; align-items: flex-start; }
.al-detail-image img { max-width: 100%; max-height: 80vh; border-radius: 8px; object-fit: contain; }
.al-detail-meta { flex: 1; min-width: 300px; overflow-y: auto; max-height: 80vh; }
.al-detail-table { width: 100%; border-collapse: collapse; }
.al-detail-label { font-size: 11px; font-weight: 700; color: #78788c; text-transform: uppercase; letter-spacing: 0.5px; padding: 3px 12px 3px 0; vertical-align: top; white-space: nowrap; width: 1px; }
.al-detail-value { font-size: 13px; color: #c8c8d8; padding: 3px 0; word-break: break-word; border-bottom: 1px solid rgba(255,255,255,0.04); }
.al-detail-long { font-size: 12px; color: #a0a0b4; }
.al-detail-loading { color: #78788c; padding: 40px; text-align: center; }
@media (max-width: 800px) { .al-detail { flex-direction: column; } .al-detail-image { max-width: 100%; } }

/* ═══════════════════════════════════════════════════════════════════
   Feedback tab
   ═══════════════════════════════════════════════════════════════════ */

/* Toolbar */
.fb-toolbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.fb-toolbar h2 { margin-bottom: 0; }
.fb-count-label { font-size: 12px; color: #78788c; white-space: nowrap; }

/* Stats row */
.fb-stats-row { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.fb-stat-card { background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08); border-radius: 8px; padding: 14px 18px; min-width: 110px; }
.fb-stat-value { font-size: 26px; font-weight: 700; line-height: 1.2; font-variant-numeric: tabular-nums; color: #e8e8f0; }
.fb-stat-label { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; color: #78788c; margin-top: 4px; }

/* Rating distribution mini-chart */
.fb-dist-card { flex: 1; min-width: 280px; }
.fb-dist-chart { display: flex; align-items: flex-end; gap: 4px; height: 60px; }
.fb-dist-col { display: flex; flex-direction: column; align-items: center; flex: 1; height: 100%; cursor: default; }
.fb-dist-count { font-size: 9px; color: #55556a; height: 14px; line-height: 14px; }
.fb-dist-bar-wrap { flex: 1; width: 100%; display: flex; align-items: flex-end; }
.fb-dist-bar { width: 100%; border-radius: 2px 2px 0 0; min-height: 2px; transition: height 0.3s; }
.fb-dist-label { font-size: 10px; color: #78788c; margin-top: 3px; }

/* Feedback cards */
.fb-cards { display: flex; flex-direction: column; gap: 6px; }
.fb-card { background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.07); border-radius: 8px; padding: 12px 16px; transition: border-color 0.15s, background 0.15s; cursor: default; }
.fb-card:hover { border-color: rgba(255,255,255,0.15); background: rgba(255,255,255,0.04); }
.fb-card--problem { border-left: 3px solid rgba(230,102,102,0.4); }
.fb-card-header { display: flex; align-items: center; gap: 10px; }
.fb-card-spacer { flex: 1; }
.fb-card-meta { font-size: 11px; color: #55556a; white-space: nowrap; }
.fb-card-game { font-size: 11px; color: #55556a; margin-top: 5px; }
.fb-game-id { font-family: 'Consolas', 'SF Mono', monospace; font-size: 11px; color: #59bff2; }

/* Rating gauge — horizontal bar replacing stars */
.fb-rating-gauge { width: 80px; height: 6px; border-radius: 3px; background: rgba(255,255,255,0.08); overflow: hidden; flex-shrink: 0; }
.fb-rating-fill { height: 100%; border-radius: 3px; transition: width 0.3s; }
.fb-card-score { font-size: 13px; font-weight: 700; min-width: 32px; }

/* Expandable card body */
.fb-card-body { max-height: 0; overflow: hidden; transition: max-height 0.25s ease, margin-top 0.25s ease, opacity 0.25s ease; opacity: 0; margin-top: 0; }
.fb-card--expanded .fb-card-body { max-height: 600px; opacity: 1; margin-top: 10px; }
.fb-card-expand { font-size: 10px; color: #55556a; transition: transform 0.2s, color 0.15s; cursor: pointer; user-select: none; flex-shrink: 0; }
.fb-card:hover .fb-card-expand { color: #78788c; }
.fb-card--expanded .fb-card-expand { transform: rotate(90deg); color: #b4b4c8; }

.fb-card-section { font-size: 13px; color: #b4b4c8; line-height: 1.5; margin-top: 6px; padding: 8px 12px; background: rgba(255,255,255,0.02); border-radius: 6px; border-left: 2px solid rgba(255,255,255,0.08); }
.fb-section-label { font-weight: 600; color: #78788c; margin-right: 4px; }
.fb-badge { font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 10px; text-transform: uppercase; letter-spacing: 0.3px; }
.fb-badge-problem { background: rgba(230,102,102,0.15); color: #e66666; }

/* Pagination */
.fb-pagination { display: flex; align-items: center; gap: 8px; margin-top: 12px; justify-content: center; }

/* Empty state */
.fb-empty { text-align: center; padding: 40px 0; color: #55556a; font-size: 13px; }

/* AI Feature Request cards */
.fb-ai-list { display: flex; flex-direction: column; gap: 6px; }
.fb-ai-card { background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.07); border-radius: 8px; padding: 12px 16px; transition: border-color 0.15s, background 0.15s; cursor: default; }
.fb-ai-card:hover { border-color: rgba(255,255,255,0.15); background: rgba(255,255,255,0.04); }
.fb-ai-header { display: flex; align-items: center; gap: 10px; }
.fb-ai-title { font-size: 14px; font-weight: 700; color: #e8e8f0; }
.fb-ai-desc { font-size: 13px; color: #b4b4c8; line-height: 1.5; margin-top: 6px; }
.fb-ai-field { font-size: 12px; color: #8888a0; line-height: 1.5; margin-top: 6px; padding: 6px 12px; background: rgba(255,255,255,0.02); border-radius: 6px; border-left: 2px solid rgba(255,255,255,0.08); }
.fb-ai-cat { font-size: 10px; font-weight: 700; padding: 2px 10px; border-radius: 10px; text-transform: uppercase; letter-spacing: 0.5px; }
.fb-cat-gameplay { background: rgba(102,230,128,0.15); color: #66e680; }
.fb-cat-narrative { background: rgba(166,128,242,0.15); color: #a680f2; }
.fb-cat-visual { background: rgba(89,191,242,0.15); color: #59bff2; }
.fb-cat-audio { background: rgba(230,200,102,0.15); color: #e6c866; }
.fb-cat-general { background: rgba(255,255,255,0.08); color: #b4b4c8; }

/* Expandable AI cards reuse the same body pattern */
.fb-ai-card .fb-card-body { max-height: 0; overflow: hidden; transition: max-height 0.25s ease, margin-top 0.25s ease, opacity 0.25s ease; opacity: 0; margin-top: 0; }
.fb-ai-card.fb-card--expanded .fb-card-body { max-height: 600px; opacity: 1; margin-top: 8px; }
.fb-ai-card .fb-card-expand { font-size: 10px; color: #55556a; transition: transform 0.2s, color 0.15s; cursor: pointer; user-select: none; flex-shrink: 0; }
.fb-ai-card:hover .fb-card-expand { color: #78788c; }
.fb-ai-card.fb-card--expanded .fb-card-expand { transform: rotate(90deg); color: #b4b4c8; }

/* ── Changelog ── */
.changelog-wrap { padding: 8px 24px 0; }
.changelog-title { font-size: 14px; font-weight: 600; color: #b4b4c8; margin-bottom: 6px; }
.changelog-empty { font-size: 12px; color: #55556a; padding: 8px 0; }
.changelog-table { width: 100%; border-collapse: collapse; font-size: 12px; max-width: 900px; }
.changelog-table th { text-align: left; color: #55556a; font-weight: 500; padding: 4px 12px 4px 0; border-bottom: 1px solid rgba(255,255,255,0.06); }
.changelog-table td { padding: 5px 12px 5px 0; color: #b4b4c8; border-bottom: 1px solid rgba(255,255,255,0.03); vertical-align: top; }
.changelog-table td:first-child { white-space: nowrap; color: #78788c; width: 80px; }
.changelog-table td:nth-child(2) { white-space: nowrap; color: #59bff2; width: 100px; }
.changelog-env { white-space: nowrap; color: #78788c; font-size: 11px; }
.changelog-slot { white-space: nowrap; color: #e6c866; font-family: monospace; font-size: 11px; }
.changelog-desc { word-break: break-word; max-width: 500px; }
.changelog-more-btn { font-size: 11px; padding: 2px 10px; margin-top: 4px; color: #78788c; }
