﻿:root {
  color-scheme: light;
  --bg: #f5f7fb;
  --panel: rgba(255,255,255,.82);
  --panel-solid: #ffffff;
  --text: #111827;
  --muted: #667085;
  --border: rgba(17,24,39,.10);
  --accent: #2563eb;
  --accent-2: #06b6d4;
  --success: #16a34a;
  --warning: #d97706;
  --danger: #dc2626;
  --shadow: 0 24px 60px rgba(15, 23, 42, .10);
  --radius: 24px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 20% 0%, rgba(37,99,235,.14), transparent 34rem),
    radial-gradient(circle at 86% 12%, rgba(6,182,212,.18), transparent 28rem),
    linear-gradient(135deg, #f8fafc 0%, #eef3fb 100%);
}

button, input, select { font: inherit; }
button { cursor: pointer; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 88px 1fr; }
.sidebar {
  position: sticky; top: 0; height: 100vh; padding: 18px 14px;
  display: flex; flex-direction: column; align-items: center; gap: 22px;
  border-right: 1px solid rgba(255,255,255,.78);
  background: rgba(255,255,255,.54); backdrop-filter: blur(18px);
}
.brand-mark {
  width: 48px; height: 48px; display: grid; place-items: center; border-radius: 18px;
  color: white; font-weight: 800; letter-spacing: -.06em;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 16px 36px rgba(37,99,235,.28);
}
.side-nav { display: flex; flex-direction: column; gap: 10px; width: 100%; }
.nav-item, .side-foot {
  width: 100%; border: 0; border-radius: 16px; padding: 12px 4px;
  background: transparent; color: var(--muted); font-size: 13px; text-align: center;
}
.nav-item.active { background: #111827; color: white; box-shadow: var(--shadow); }
.side-foot { margin-top: auto; color: #98a2b3; }

.workspace { padding: 34px; max-width: 1440px; width: 100%; margin: 0 auto; }
.topbar { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; margin-bottom: 26px; }
.eyebrow { margin: 0 0 8px; color: var(--accent); font-size: 12px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
h1 { margin: 0; font-size: clamp(34px, 5vw, 68px); letter-spacing: -.06em; line-height: .95; }
h2 { margin: 0; font-size: 20px; letter-spacing: -.02em; }
p { margin: 6px 0 0; color: var(--muted); }

.ghost-btn, .switch-btn {
  border: 1px solid var(--border); background: var(--panel-solid); color: var(--text);
  border-radius: 14px; padding: 10px 14px; box-shadow: 0 10px 24px rgba(15,23,42,.06);
}
.ghost-btn:hover, .switch-btn:hover { transform: translateY(-1px); border-color: rgba(37,99,235,.32); }
.switch-btn { background: #111827; color: white; border-color: #111827; }
.switch-btn:disabled { cursor: wait; opacity: .55; }
.switch-btn.current-btn:disabled { cursor: default; opacity: .72; background: #ecfdf3; color: #15803d; border-color: rgba(22,163,74,.28); }

.summary-grid { display: grid; grid-template-columns: 1.35fr repeat(3, 1fr); gap: 14px; margin-bottom: 16px; }
.summary-card, .panel {
  background: var(--panel); border: 1px solid rgba(255,255,255,.78); border-radius: var(--radius);
  box-shadow: var(--shadow); backdrop-filter: blur(18px);
}
.summary-card { min-height: 132px; padding: 22px; display: flex; flex-direction: column; justify-content: flex-end; }
.summary-card.primary { background: linear-gradient(135deg, rgba(17,24,39,.96), rgba(37,99,235,.90)); color: white; }
.summary-card .label { color: var(--muted); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; }
.summary-card.primary .label, .summary-card.primary small { color: rgba(255,255,255,.68); }
.summary-card strong { margin-top: 12px; font-size: 26px; letter-spacing: -.04em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.summary-card small { margin-top: 6px; color: var(--muted); }

.panel { padding: 22px; margin-top: 16px; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 18px; margin-bottom: 18px; }
.panel-head.compact { margin-bottom: 10px; }
.filters { display: flex; gap: 10px; align-items: center; }
.filters input, .filters select {
  height: 42px; border: 1px solid var(--border); border-radius: 14px; background: rgba(255,255,255,.78);
  padding: 0 12px; outline: none; color: var(--text);
}
.filters input { width: min(36vw, 360px); }
.filters input:focus, .filters select:focus { border-color: rgba(37,99,235,.45); box-shadow: 0 0 0 4px rgba(37,99,235,.10); }

.account-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 12px; }
.account-card {
  position: relative; padding: 16px; border: 1px solid var(--border); border-radius: 20px;
  background: rgba(255,255,255,.74); transition: transform .18s ease, border-color .18s ease, background .18s ease;
}
.account-card:hover { transform: translateY(-2px); border-color: rgba(37,99,235,.30); background: rgba(255,255,255,.94); }
.account-card.current { border-color: rgba(22,163,74,.52); box-shadow: inset 0 0 0 1px rgba(22,163,74,.18); }
.card-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.identity { min-width: 0; }
.email { display: block; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.meta { margin-top: 4px; color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.badges { display: flex; gap: 6px; flex-wrap: wrap; margin: 14px 0 16px; }
.badge { border-radius: 999px; padding: 5px 9px; font-size: 12px; font-weight: 700; background: #eef2ff; color: #3730a3; }
.badge.cn { background: #ecfeff; color: #0e7490; }
.badge.ok { background: #dcfce7; color: #15803d; }
.badge.warn { background: #fef3c7; color: #b45309; }
.card-bottom { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.card-id { min-width: 0; color: #98a2b3; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.empty { padding: 34px; text-align: center; color: var(--muted); border: 1px dashed var(--border); border-radius: 20px; }

.path-list { display: grid; gap: 10px; margin: 0; }
.path-list div { display: grid; grid-template-columns: 120px 1fr; gap: 12px; padding: 12px 0; border-top: 1px solid var(--border); }
.path-list dt { color: var(--muted); font-weight: 700; }
.path-list dd { margin: 0; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; overflow-wrap: anywhere; }

.toast {
  position: fixed; right: 22px; bottom: 22px; max-width: min(520px, calc(100vw - 44px));
  padding: 14px 16px; border-radius: 16px; color: white; background: rgba(17,24,39,.94);
  box-shadow: var(--shadow); opacity: 0; transform: translateY(12px); pointer-events: none; transition: .2s ease;
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast.error { background: rgba(185,28,28,.95); }
.toast.success { background: rgba(21,128,61,.95); }

@media (max-width: 900px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .workspace { padding: 22px; }
  .summary-grid { grid-template-columns: 1fr 1fr; }
  .panel-head, .filters { flex-direction: column; align-items: stretch; }
  .filters input { width: 100%; }
}

@media (max-width: 560px) {
  .summary-grid, .account-list { grid-template-columns: 1fr; }
  .path-list div { grid-template-columns: 1fr; }
}
.card-actions { display: flex; gap: 8px; align-items: center; flex-shrink: 0; }
.mini-btn { padding: 9px 10px; font-size: 13px; }
.quota-box { margin: 0 0 14px; padding: 12px; border-radius: 16px; background: #f8fafc; border: 1px solid rgba(15,23,42,.08); }
.quota-box.muted { color: var(--muted); font-size: 13px; }
.quota-box.low { background: #fff7ed; }
.quota-box.medium { background: #fffbeb; }
.quota-box.high { background: #f0fdf4; }
.quota-line, .quota-meta { display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.quota-line strong { font-size: 15px; }
.quota-line span, .quota-meta { color: var(--muted); font-size: 12px; }
.quota-bar { height: 8px; margin: 9px 0 8px; overflow: hidden; border-radius: 999px; background: rgba(15,23,42,.10); }
.quota-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #16a34a, #06b6d4); }
.quota-box.medium .quota-bar i { background: linear-gradient(90deg, #d97706, #facc15); }
.quota-box.low .quota-bar i { background: linear-gradient(90deg, #dc2626, #f97316); }
.quota-groups { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; color: var(--muted); font-size: 12px; }
.quota-groups span { border-radius: 999px; background: rgba(255,255,255,.72); padding: 4px 8px; }
