:root { color-scheme: light; }
body { min-height:100vh; color:#17253a; background:radial-gradient(circle at 10% 0,#e8f1ff 0,transparent 31%),linear-gradient(180deg,#f5f8fc,#edf2f8); }
.admin-shell { width:min(1320px,calc(100% - 36px)); margin:0 auto; padding:20px 0 48px; }
.admin-header { position:sticky; top:0; z-index:20; display:flex; align-items:center; justify-content:space-between; gap:16px; margin-bottom:24px; padding:10px 0; background:rgba(244,248,252,.88); backdrop-filter:blur(16px); }
.admin-brand { display:flex; align-items:center; gap:12px; color:inherit; text-decoration:none; }
.admin-brand .mark { width:44px; height:44px; border-radius:13px; font-size:14px; }
.admin-brand span:last-child { display:grid; gap:2px; }
.admin-brand strong { font-size:18px; }
.admin-brand small { color:#738198; }
.admin-nav { display:flex; align-items:center; gap:9px; }
.link-button { display:inline-flex; align-items:center; justify-content:center; text-decoration:none; }
.live-state,.status-chip,.health-pill { display:inline-flex; align-items:center; gap:7px; border-radius:999px; font-size:12px; font-weight:750; }
.live-state { color:#317052; }
.live-state i,.health-pill i { width:8px; height:8px; border-radius:50%; background:#28a36a; box-shadow:0 0 0 5px rgba(40,163,106,.1); }
.live-state.offline { color:#a4473e; }
.live-state.offline i { background:#ce5b4f; box-shadow:0 0 0 5px rgba(206,91,79,.1); }
.locked-panel { width:min(560px,100%); margin:14vh auto 0; padding:46px 34px; border:1px solid #d8e2f0; border-radius:24px; background:rgba(255,255,255,.94); box-shadow:0 24px 70px rgba(31,51,82,.13); text-align:center; }
.locked-panel.hidden,.dashboard.hidden { display:none!important; }
.locked-icon { display:grid; place-items:center; width:58px; height:58px; margin:0 auto 16px; border-radius:18px; background:#eef3fb; font-size:26px; }
.locked-panel h1 { margin:0; font-size:25px; }
.locked-panel p { margin:10px auto 24px; color:#687991; line-height:1.7; }
.locked-panel .primary { display:inline-flex; min-width:160px; }
.welcome-row { display:flex; align-items:flex-end; justify-content:space-between; gap:20px; margin:0 2px 18px; }
.welcome-row h1 { margin:3px 0 6px; font-size:30px; letter-spacing:-.03em; }
.eyebrow { margin:0; color:#5073aa; font-size:10px; font-weight:850; letter-spacing:.16em; }
.muted { color:#75849a; font-size:12px; }
.health-pill { padding:9px 13px; border:1px solid #cce8da; background:#f2fbf6; color:#28724d; }
.health-pill.warning { border-color:#ead9a8; background:#fffaf0; color:#946b11; }
.health-pill.danger { border-color:#eccac7; background:#fff6f5; color:#a43e36; }
.health-pill.warning i { background:#d49b26; box-shadow:0 0 0 5px rgba(212,155,38,.1); }
.health-pill.danger i { background:#ce5b4f; box-shadow:0 0 0 5px rgba(206,91,79,.1); }
.protection-banner { display:grid; grid-template-columns:auto minmax(0,1fr) auto; align-items:center; gap:12px; margin-bottom:12px; padding:13px 16px; border:1px solid #cde7da; border-radius:14px; background:#f3fbf6; color:#2c694b; }
.protection-banner>i { width:10px; height:10px; border-radius:50%; background:#31a56b; box-shadow:0 0 0 6px rgba(49,165,107,.1); }
.protection-banner>div { display:grid; gap:3px; }
.protection-banner strong { font-size:13px; }.protection-banner span,.protection-banner small { font-size:12px; color:#668174; }
.protection-banner.guarded { border-color:#ecdcae; background:#fffaf0; color:#866313; }.protection-banner.guarded>i { background:#d49b26; box-shadow:0 0 0 6px rgba(212,155,38,.1); }
.protection-banner.critical { border-color:#eccbc7; background:#fff5f4; color:#a03d35; }.protection-banner.critical>i { background:#ce5b4f; box-shadow:0 0 0 6px rgba(206,91,79,.1); }
.summary-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; margin-bottom:12px; }
.summary-card,.admin-card { border:1px solid #d9e3ef; background:rgba(255,255,255,.92); box-shadow:0 10px 30px rgba(35,57,87,.055); }
.summary-card { min-width:0; padding:18px; border-radius:16px; }
.summary-card span { display:block; color:#6a7a91; font-size:12px; }
.summary-card strong { display:block; margin-top:7px; color:#173963; font-size:28px; line-height:1; }
.summary-card small { display:block; margin-top:9px; color:#8793a5; overflow-wrap:anywhere; }
.admin-grid { display:grid; gap:12px; margin-bottom:12px; }
.two-column { grid-template-columns:1fr 1fr; }
.admin-card { min-width:0; padding:19px; border-radius:18px; }
.card-head { display:flex; align-items:flex-start; justify-content:space-between; gap:14px; margin-bottom:15px; }
.card-head h2 { margin:3px 0 0; font-size:17px; }
.control-row { display:flex; align-items:center; justify-content:space-between; gap:20px; min-height:68px; border-top:1px solid #ebf0f6; cursor:pointer; }
.control-row span { display:grid; gap:4px; }
.control-row strong { color:#294567; font-size:13px; }
.control-row small { color:#78879a; line-height:1.45; }
.control-row input[type=checkbox] { appearance:none; flex:none; width:46px; height:26px; border-radius:999px; background:#cbd5e2; position:relative; transition:.18s; }
.control-row input[type=checkbox]::after { content:""; position:absolute; top:3px; left:3px; width:20px; height:20px; border-radius:50%; background:#fff; box-shadow:0 2px 6px rgba(20,35,55,.22); transition:.18s; }
.control-row input[type=checkbox]:checked { background:#396fe0; }
.control-row input[type=checkbox]:checked::after { transform:translateX(20px); }
.control-row select { min-width:110px; height:38px; border:1px solid #cbd7e7; border-radius:9px; background:#fff; color:#2d4d76; padding:0 9px; }
.resource-grid { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.resource-meter { padding:13px; border-radius:12px; background:#f6f9fd; }
.resource-meter header { display:flex; justify-content:space-between; gap:8px; color:#52667f; font-size:12px; }
.resource-meter header strong { color:#234a78; }
.resource-meter progress { width:100%; height:8px; margin:11px 0 6px; accent-color:#4976dd; }
.resource-meter small { color:#8491a2; }
.status-chip { padding:5px 9px; background:#eef3fa; color:#58708e; }
.status-chip.good { background:#edf9f2; color:#2d7650; }
.status-chip.bad { background:#fff1ef; color:#ae4c43; }
.queue-list,.provider-list { display:grid; gap:8px; }
.queue-item,.provider-item { display:grid; align-items:center; gap:10px; min-height:54px; padding:10px 12px; border:1px solid #e1e8f1; border-radius:11px; background:#fafcff; }
.queue-item { grid-template-columns:minmax(90px,1fr) auto; }
.queue-item strong,.provider-item strong { color:#29486f; font-size:13px; }
.queue-item small,.provider-item small { color:#7b899a; }
.queue-numbers { text-align:right; }
.queue-numbers b { color:#2a5a98; }
.provider-item { grid-template-columns:auto minmax(0,1fr) auto; }
.provider-dot { width:9px; height:9px; border-radius:50%; background:#39a66d; }
.provider-dot.cooling { background:#d99b2d; }
.provider-meta { display:grid; gap:3px; min-width:0; }
.provider-meta small { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.provider-latency { color:#56708e; font-size:12px; text-align:right; }
.backup-status { display:grid; grid-template-columns:auto minmax(0,1fr); gap:11px; align-items:center; min-height:74px; padding:14px; border:1px solid #e0e8f2; border-radius:12px; background:#f8fbff; }
.backup-status>i { width:12px; height:12px; border-radius:50%; background:#8a98aa; }
.backup-status.completed>i { background:#31a56b; box-shadow:0 0 0 6px rgba(49,165,107,.1); }.backup-status.running>i,.backup-status.starting>i { background:#4775e0; box-shadow:0 0 0 6px rgba(71,117,224,.1); }.backup-status.failed>i { background:#ce5b4f; box-shadow:0 0 0 6px rgba(206,91,79,.1); }
.backup-status div { display:grid; gap:4px; }.backup-status strong { color:#29486f; font-size:14px; }.backup-status span,.backup-note { color:#748399; font-size:12px; line-height:1.55; }
.backup-note { margin:12px 2px 0; }
.alert-list { display:grid; gap:8px; max-height:250px; overflow:auto; }
.alert-item { display:grid; grid-template-columns:auto minmax(0,1fr) auto; gap:10px; align-items:start; padding:11px; border:1px solid #e4eaf2; border-radius:11px; background:#fbfcfe; }
.alert-item>i { width:9px; height:9px; margin-top:5px; border-radius:50%; background:#dc9d2c; }.alert-item.critical>i { background:#cf5b4f; }
.alert-item>div { display:grid; gap:3px; min-width:0; }.alert-item strong { color:#304b6d; font-size:13px; }.alert-item small { color:#7b899a; line-height:1.45; overflow-wrap:anywhere; }
.alert-item button { align-self:center; white-space:nowrap; }.alert-empty { margin:14px 2px; color:#718299; font-size:13px; }
.trend-card { margin-bottom:12px; }
.legend { display:flex; gap:13px; color:#75849a; font-size:11px; }
.legend span { display:flex; align-items:center; gap:5px; }
.legend i { width:8px; height:8px; border-radius:50%; }
.text-dot { background:#4775e0; }.request-dot { background:#8a62d7; }
.trend-chart { display:grid; grid-template-columns:repeat(7,minmax(72px,1fr)); gap:10px; min-height:200px; align-items:end; overflow-x:auto; padding:8px 2px 0; }
.trend-day { display:grid; grid-template-rows:1fr auto auto; min-width:72px; height:190px; gap:7px; text-align:center; }
.trend-columns { display:flex; align-items:flex-end; justify-content:center; gap:5px; min-height:125px; }
.trend-bar { width:20px; min-height:3px; border-radius:6px 6px 2px 2px; background:linear-gradient(180deg,#6f92ea,#3970de); }
.trend-bar.requests { background:linear-gradient(180deg,#ad8bea,#7b52d1); }
.trend-values { color:#5f7087; font-size:10px; white-space:nowrap; }
.trend-day time { color:#8290a1; font-size:10px; }
.system-history-card { margin-bottom:12px; }
.history-card-head { align-items:center; }
.history-card-head h2 { margin-bottom:5px; }
.history-card-head p { margin:0; }
.history-toolbar { display:grid; justify-items:end; gap:7px; }
.range-switch { display:flex; padding:3px; border:1px solid #d9e3ef; border-radius:11px; background:#f3f7fc; }
.range-switch button { min-width:58px; height:32px; border:0; border-radius:8px; background:transparent; color:#62758f; font:inherit; font-size:12px; cursor:pointer; }
.range-switch button:hover { color:#2f5c99; }
.range-switch button.active { background:#fff; color:#275ca6; font-weight:800; box-shadow:0 2px 8px rgba(39,75,126,.12); }
.metric-history-empty { margin-bottom:12px; padding:11px 13px; border:1px solid #e1e8f2; border-radius:11px; background:#f7faff; color:#6e7f95; font-size:12px; }
.metric-history-empty.hidden { display:none; }
.metric-chart-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:11px; }
.metric-chart-card { min-width:0; padding:14px; border:1px solid #e0e7f0; border-radius:13px; background:linear-gradient(180deg,#fbfdff,#f7faff); }
.metric-chart-card>header { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; }
.metric-chart-card h3 { margin:0 0 4px; color:#29486f; font-size:14px; }
.metric-chart-card header small { color:#7d8b9e; line-height:1.4; }
.metric-chart-card>header>span { flex:none; padding:3px 7px; border-radius:7px; background:#edf3fb; color:#65809f; font-size:10px; }
.metric-legend { display:flex; flex-wrap:wrap; gap:6px 12px; min-height:36px; margin:10px 0 2px; }
.metric-legend span { display:inline-flex; align-items:center; gap:5px; color:#718197; font-size:10px; }
.metric-legend i { width:8px; height:8px; border-radius:50%; background:var(--series-color); }
.metric-legend b { color:#3d5675; font-weight:750; }
.metric-svg-wrap { width:100%; overflow:hidden; }
.metric-svg-wrap svg { display:block; width:100%; height:auto; min-height:190px; }
.metric-grid-line { stroke:#dfe7f1; stroke-width:1; stroke-dasharray:4 5; vector-effect:non-scaling-stroke; }
.metric-line { stroke-width:2; stroke-linecap:round; stroke-linejoin:round; vector-effect:non-scaling-stroke; }
.metric-hit { fill:transparent; cursor:pointer; }
.metric-hit:hover { fill:rgba(57,111,224,.16); stroke:#4775e0; stroke-width:1; vector-effect:non-scaling-stroke; }
.metric-axis-text { fill:#8794a5; font-size:10px; }
.ai-cost-card { margin-bottom:12px; }
.ai-metric-summary { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:9px; margin-bottom:11px; }
.ai-metric-summary .summary-card { padding:14px; box-shadow:none; background:#f8fbff; }
.ai-metric-summary .summary-card strong { font-size:23px; }
.ai-breakdown-grid { display:grid; grid-template-columns:1fr 1fr; gap:11px; margin-top:11px; }
.ai-breakdown-grid>section { min-width:0; padding:14px; border:1px solid #e0e7f0; border-radius:13px; background:#fbfdff; }
.ai-breakdown-grid h3 { margin:0 0 10px; color:#29486f; font-size:14px; }
.ai-breakdown-grid td small { color:#8390a2; }
.metric-detail-panel { width:min(1180px,100%); }
.peak-summary-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:9px; }
.peak-summary-grid article { display:grid; gap:6px; padding:13px; border:1px solid #dee7f1; border-radius:11px; background:#fff; }
.peak-summary-grid span { color:#74849a; font-size:11px; }
.peak-summary-grid strong { color:#244d7e; font-size:20px; }
.table-wrap { overflow:auto; }
table { width:100%; border-collapse:collapse; font-size:12px; }
th { padding:10px; color:#728197; font-size:10px; letter-spacing:.05em; text-align:left; white-space:nowrap; border-bottom:1px solid #dfe7f1; }
td { max-width:290px; padding:12px 10px; color:#43566f; border-bottom:1px solid #edf1f6; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.task-status { display:inline-flex; padding:4px 8px; border-radius:999px; background:#eef3fa; color:#58708e; font-weight:700; }
.task-status.completed { background:#edf9f2; color:#2d7650; }.task-status.running,.task-status.reserved { background:#edf4ff; color:#3262b0; }.task-status.failed { background:#fff1ef; color:#ae4c43; }.task-status.pending { background:#fff8e9; color:#956c18; }.task-status.refunded,.task-status.cancelled { background:#f3f4f7; color:#687386; }
.user-card { margin-bottom:12px; }
.user-card-head { align-items:center; }
.user-tools { display:flex; align-items:center; gap:8px; }
.user-tools input,.user-tools select,.field input { height:40px; border:1px solid #cdd9e8; border-radius:10px; background:#fff; color:#294567; padding:0 11px; outline:none; }
.user-tools input { width:min(260px,34vw); }
.user-tools input:focus,.user-tools select:focus,.field input:focus { border-color:#5b82df; box-shadow:0 0 0 3px rgba(70,113,218,.1); }
.user-pagination { display:flex; align-items:center; justify-content:space-between; gap:12px; padding-top:14px; }
.user-pagination div { display:flex; gap:8px; }
#userTableBody td:first-child strong,#userTableBody td:first-child small { display:block; }
#userTableBody td:first-child small { margin-top:3px; color:#8290a2; }
.account-status,.risk-chip { display:inline-flex; padding:4px 8px; border-radius:999px; font-size:11px; font-weight:750; }
.plan-chip { display:inline-flex; padding:4px 8px; border-radius:999px; background:#edf3ff; color:#315f9d; font-size:11px; font-weight:750; }
.account-status.active,.risk-chip.low { background:#edf9f2; color:#2d7650; }
.account-status.suspended,.risk-chip.high { background:#fff1ef; color:#ae4c43; }
.risk-chip.medium { background:#fff8e9; color:#956c18; }
.admin-modal.hidden { display:none; }
.modal-open { overflow:hidden; }
.admin-modal { position:fixed; inset:0; z-index:80; display:grid; place-items:center; padding:18px; }
.admin-modal-backdrop { position:absolute; inset:0; background:rgba(22,35,55,.52); backdrop-filter:blur(8px); }
.admin-modal-panel { position:relative; width:min(920px,100%); max-height:min(88vh,920px); overflow:auto; border:1px solid rgba(215,226,240,.95); border-radius:22px; background:#f8fbff; box-shadow:0 28px 90px rgba(15,28,50,.28); }
.admin-modal-panel>header { position:sticky; top:0; z-index:2; display:flex; align-items:flex-start; justify-content:space-between; gap:20px; padding:22px 24px 17px; border-bottom:1px solid #e0e8f2; background:rgba(248,251,255,.94); backdrop-filter:blur(16px); }
.admin-modal-panel h2 { margin:4px 0 3px; color:#193b65; }
.icon-close { width:38px; height:38px; border:0; border-radius:10px; background:#eaf0f8; color:#526a87; font-size:25px; cursor:pointer; }
.user-modal-content { display:grid; gap:12px; padding:18px 24px 26px; }
.user-control-section,.user-detail-grid>section { padding:17px; border:1px solid #dce5f0; border-radius:14px; background:#fff; }
.user-control-section h3,.user-detail-grid h3 { margin:0 0 12px; color:#29486f; font-size:15px; }
.quota-heading,.daily-quota-heading { display:flex; align-items:flex-start; justify-content:space-between; gap:14px; }
.quota-heading h3,.daily-quota-heading h3 { margin-bottom:4px; }.quota-heading p,.daily-quota-heading span { margin:0; color:#7a899d; font-size:11px; }
.current-plan { flex:none; padding:6px 10px; border-radius:999px; background:#eaf2ff; color:#2d5fa8; font-size:12px; }
.quota-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:8px; margin-top:13px; }
.quota-grid.daily { margin-top:10px; }.daily-quota-heading { margin-top:18px; padding-top:15px; border-top:1px solid #e7edf4; }
.quota-stat { display:grid; gap:5px; min-width:0; padding:11px; border:1px solid #e0e7f0; border-radius:11px; background:#f8fbff; }
.quota-stat span { color:#6d7d91; font-size:11px; }.quota-stat strong { color:#254b7b; font-size:14px; overflow-wrap:anywhere; }.quota-stat small { color:#8a96a6; font-size:10px; }
.field { display:grid; gap:6px; color:#52667f; font-size:12px; }
.field>input { width:100%; box-sizing:border-box; }
.limit-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:9px; margin-top:12px; }
.limit-grid.three { grid-template-columns:repeat(3,minmax(0,1fr)); }
.field-note { margin:9px 0 13px; color:#8290a2; font-size:11px; }
.notice-strip { padding:12px 14px; border:1px solid #dbe4ef; border-radius:11px; background:#eef4fb; color:#526b8a; font-size:12px; }
.danger-button { min-height:40px; border:1px solid #e6bebb; border-radius:10px; background:#fff3f2; color:#a64139; padding:0 14px; font-weight:700; cursor:pointer; }
.user-detail-grid { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.detail-list { display:grid; gap:7px; max-height:220px; margin:0; padding:0; overflow:auto; list-style:none; }
.detail-list li { display:grid; grid-template-columns:minmax(0,1fr) auto auto; gap:8px; align-items:center; padding:9px 0; border-bottom:1px solid #edf1f6; color:#4d6078; font-size:11px; }
.detail-list li span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }.detail-list li time,.detail-list li small { color:#8794a5; }
.detail-list .task-detail-item { grid-template-columns:minmax(0,1fr) auto; }.task-detail-item .task-usage { grid-column:1/-1; color:#4f6f98; }.task-detail-item time { grid-column:1/-1; }
.task-usage-cell { color:#45678f; }
.action-state { min-height:18px; margin:0; color:#26704a; font-size:12px; }.action-state.error { color:#ad443b; }
@media(max-width:960px){.summary-grid{grid-template-columns:repeat(2,1fr)}.two-column{grid-template-columns:1fr}.queue-provider-grid{grid-template-columns:1fr}.metric-chart-grid,.ai-breakdown-grid{grid-template-columns:1fr}.ai-metric-summary{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:680px){.admin-shell{width:min(100% - 18px,620px);padding-top:8px}.admin-header{align-items:flex-start;flex-direction:column}.admin-nav{width:100%;display:grid;grid-template-columns:1fr auto auto}.admin-nav .live-state{grid-column:1/-1}.admin-nav .link-button{display:none}.welcome-row{align-items:flex-start;flex-direction:column}.welcome-row h1{font-size:25px}.protection-banner{grid-template-columns:auto 1fr}.protection-banner small{grid-column:2}.summary-grid{grid-template-columns:1fr 1fr;gap:8px}.summary-card{padding:14px}.summary-card strong{font-size:23px}.admin-card{padding:15px}.resource-grid{grid-template-columns:1fr}.control-row{gap:12px}.trend-chart{grid-template-columns:repeat(7,78px)}.card-head{align-items:flex-start;flex-direction:column}.history-toolbar{width:100%;justify-items:start}.range-switch{width:100%;overflow-x:auto}.range-switch button{flex:1;min-width:58px}.metric-chart-card{padding:11px}.metric-svg-wrap{overflow-x:auto}.metric-svg-wrap svg{min-width:590px}.peak-summary-grid{grid-template-columns:1fr 1fr}.legend{flex-wrap:wrap}.user-tools{display:grid;width:100%;grid-template-columns:1fr auto auto}.user-tools input{width:100%}.admin-modal{padding:0}.admin-modal-panel{width:100%;max-height:100vh;height:100vh;border-radius:0}.admin-modal-panel>header,.user-modal-content{padding-left:15px;padding-right:15px}.limit-grid,.limit-grid.three,.user-detail-grid,.quota-grid{grid-template-columns:1fr 1fr}.detail-list li{grid-template-columns:minmax(0,1fr) auto}.detail-list li time{grid-column:1/-1}.user-pagination{align-items:flex-start}}
@media(max-width:420px){.user-tools{grid-template-columns:1fr 1fr}.user-tools input{grid-column:1/-1}.limit-grid,.limit-grid.three,.user-detail-grid,.quota-grid,.ai-metric-summary,.peak-summary-grid{grid-template-columns:1fr}.quota-heading,.daily-quota-heading{align-items:flex-start;flex-direction:column}.summary-grid{grid-template-columns:1fr}.user-pagination{flex-direction:column}.user-pagination div{width:100%}.user-pagination button{flex:1}}
