:root {
  --ink: #273143;
  --muted: #778196;
  --faint: #a4adbc;
  --line: #e8ebf1;
  --surface: rgba(255, 255, 255, .88);
  --surface-strong: #fff;
  --violet: #6e5be8;
  --violet-2: #a090ff;
  --blue: #4387ef;
  --cyan: #2cb6bd;
  --orange: #ef9e47;
  --red: #db647b;
  --green: #45a87d;
  --shadow: 0 18px 55px rgba(55, 57, 91, .10);
  --shadow-soft: 0 7px 24px rgba(55, 57, 91, .07);
  --font: ui-rounded, "SF Pro Rounded", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { min-height: 100%; background: #f5f6fb; }
body { margin: 0; min-height: 100vh; color: var(--ink); font: 14px/1.55 var(--font); background: linear-gradient(135deg, #f8f8fc 0%, #f3f5fb 50%, #f9f8fc 100%); }
button, input, select, textarea { font: inherit; }
button { border: 0; cursor: pointer; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid rgba(110, 91, 232, .25); outline-offset: 2px; }
table { border-collapse: collapse; width: 100%; }

.ambient { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.ambient i { position: absolute; display: block; border-radius: 999px; filter: blur(80px); opacity: .35; }
.ambient i:nth-child(1) { width: 38vw; height: 38vw; left: -12vw; top: -14vw; background: #bdb4ff; }
.ambient i:nth-child(2) { width: 32vw; height: 32vw; right: -12vw; top: 8vh; background: #c4e9e9; }
.ambient i:nth-child(3) { width: 34vw; height: 34vw; left: 42vw; bottom: -22vw; background: #f7d6c4; }

.auth-layout { min-height: 100vh; display: grid; place-items: center; padding: 28px; }
.auth-card { width: min(100%, 470px); padding: 48px; border: 1px solid rgba(255,255,255,.9); border-radius: 30px; background: var(--surface); box-shadow: var(--shadow); backdrop-filter: blur(18px); }
.brand-mark { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 17px; color: #fff; font-weight: 900; letter-spacing: -.08em; background: linear-gradient(135deg, var(--violet), var(--blue)); box-shadow: 0 10px 24px rgba(92, 80, 205, .24); }
.eyebrow, .topbar-kicker { margin: 23px 0 7px; color: var(--violet); font-size: 11px; font-weight: 900; letter-spacing: .14em; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
.auth-card h1 { margin-bottom: 12px; font-size: 32px; letter-spacing: -.04em; }
.intro-copy { color: var(--muted); line-height: 1.75; }
.auth-card form { display: grid; gap: 9px; margin-top: 28px; }
label { color: #535e71; font-size: 13px; font-weight: 800; }
input, select, textarea { width: 100%; border: 1px solid #dfe3ec; border-radius: 13px; padding: 12px 14px; color: var(--ink); outline: none; background: rgba(255,255,255,.78); transition: .2s border-color, .2s box-shadow; }
input:focus, select:focus, textarea:focus { border-color: var(--violet-2); box-shadow: 0 0 0 4px rgba(160, 144, 255, .13); }
textarea { min-height: 120px; resize: vertical; }
.primary { min-height: 44px; padding: 0 20px; border-radius: 12px; color: #fff; font-weight: 800; background: linear-gradient(115deg, var(--violet), var(--blue)); box-shadow: 0 9px 18px rgba(91, 85, 205, .22); transition: .2s transform, .2s box-shadow; }
.primary:hover { transform: translateY(-1px); box-shadow: 0 12px 24px rgba(91, 85, 205, .28); }
.primary:disabled { cursor: wait; opacity: .55; transform: none; }
.wide { width: 100%; margin-top: 10px; }
.quiet { padding: 7px 0; color: var(--violet); background: transparent; font-weight: 800; }
.inline-actions { display: flex; justify-content: space-between; gap: 20px; }
.verify-target { margin: 0 0 5px; padding: 11px 13px; border-radius: 12px; color: #5c5791; background: #f1efff; }
output { display: block; min-height: 24px; margin-top: 16px; color: var(--red); font-weight: 700; }
.auth-footnote { margin: 25px 0 0; color: var(--faint); font-size: 12px; }

.app-shell { display: flex; min-height: 100vh; }
.sidebar { width: 252px; flex: 0 0 252px; display: flex; flex-direction: column; padding: 26px 17px 19px; border-right: 1px solid rgba(226,229,239,.8); background: rgba(250,250,253,.72); backdrop-filter: blur(18px); }
.sidebar-brand { display: flex; align-items: center; gap: 11px; padding: 4px 11px 26px; color: var(--ink); text-decoration: none; }
.brand-dot { width: 35px; height: 35px; display: grid; place-items: center; border-radius: 12px; color: #fff; font-size: 12px; font-weight: 900; letter-spacing: -.08em; background: linear-gradient(135deg, var(--violet), var(--blue)); }
.sidebar-brand strong, .sidebar-brand small { display: block; }
.sidebar-brand strong { font-size: 14px; }
.sidebar-brand small { margin-top: 1px; color: var(--faint); font-size: 10px; font-weight: 700; letter-spacing: .05em; }
.side-nav { display: grid; gap: 4px; }
.side-nav button { display: flex; align-items: center; gap: 12px; min-height: 43px; padding: 0 14px; border-radius: 12px; color: #727c8e; text-align: left; background: transparent; font-weight: 800; transition: .2s color, .2s background, .2s transform; }
.side-nav button span { width: 18px; color: #a0a8b7; font-size: 17px; text-align: center; }
.side-nav button:hover { color: var(--violet); background: rgba(239,237,255,.7); transform: translateX(2px); }
.side-nav button.active { color: #fff; background: linear-gradient(105deg, var(--violet), #8071e8); box-shadow: 0 9px 20px rgba(104,88,222,.2); }
.side-nav button.active span { color: #fff; }
.privacy-card { display: flex; gap: 10px; margin: auto 4px 16px; padding: 14px 11px; border: 1px solid #e9e7ff; border-radius: 15px; background: #f4f2ff; }
.privacy-icon { width: 23px; height: 23px; flex: 0 0 23px; display: grid; place-items: center; border-radius: 8px; color: #fff; background: var(--violet); font-size: 12px; font-weight: 900; }
.privacy-card strong { color: #5d55a2; font-size: 11px; }
.privacy-card p { margin: 3px 0 0; color: #8d8bac; font-size: 10px; line-height: 1.45; }
.sidebar-footer { display: flex; justify-content: space-between; color: #afb5c2; font-size: 10px; font-weight: 800; }
.live-dot { color: var(--green); }
.live-dot::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 4px; border-radius: 50%; background: currentColor; vertical-align: 1px; }
.workspace { min-width: 0; flex: 1; }
.topbar { display: flex; align-items: center; justify-content: space-between; min-height: 104px; padding: 25px clamp(24px, 4vw, 58px) 19px; border-bottom: 1px solid rgba(226,229,239,.78); background: rgba(255,255,255,.32); }
.topbar-kicker { margin: 0 0 2px; color: var(--faint); font-size: 11px; letter-spacing: .04em; text-transform: none; }
.topbar h2 { margin: 0; font-size: 26px; letter-spacing: -.04em; }
.topbar-actions { display: flex; align-items: center; gap: 12px; }
.admin-pill { max-width: 180px; overflow: hidden; color: #69658f; font-size: 12px; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.icon-button { width: 38px; height: 38px; border-radius: 12px; color: #757e90; background: #fff; box-shadow: var(--shadow-soft); font-size: 18px; }
.icon-button:hover { color: var(--violet); }
.content { max-width: 1420px; margin: 0 auto; padding: 36px clamp(24px, 4vw, 58px) 70px; }

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 26px; }
.page-head h3 { margin: 0 0 4px; font-size: 24px; letter-spacing: -.04em; }
.page-head p { margin: 0; color: var(--muted); }
.muted { color: var(--muted); }
.tiny { color: var(--faint); font-size: 11px; }
.panel { border: 1px solid rgba(231,233,241,.95); border-radius: 20px; background: var(--surface-strong); box-shadow: var(--shadow-soft); }
.panel-pad { padding: 22px; }
.grid { display: grid; gap: 16px; }
.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 15px; margin-bottom: 17px; }
.stat-card { min-height: 140px; padding: 19px 20px; border: 1px solid rgba(230,233,241,.95); border-radius: 19px; background: rgba(255,255,255,.9); box-shadow: var(--shadow-soft); }
.stat-label { display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 12px; font-weight: 800; }
.stat-label i { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 10px; color: var(--violet); background: #f0efff; font-style: normal; }
.stat-value { margin: 20px 0 3px; font-size: 29px; font-weight: 900; letter-spacing: -.06em; }
.stat-hint { color: var(--faint); font-size: 11px; }
.stat-card.green .stat-label i { color: var(--green); background: #eaf8f1; }
.stat-card.blue .stat-label i { color: var(--blue); background: #ebf3ff; }
.stat-card.orange .stat-label i { color: var(--orange); background: #fff4e5; }
.two-col { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(300px, 1fr); gap: 17px; }
.panel-title { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 18px; }
.panel-title h3 { margin: 0; font-size: 16px; }
.panel-title p { margin: 3px 0 0; color: var(--faint); font-size: 11px; }
.link-button { padding: 0; color: var(--violet); background: transparent; font-size: 12px; font-weight: 800; }
.trend { min-height: 260px; padding: 22px; }
.bars { height: 180px; display: flex; align-items: flex-end; gap: 7px; padding: 20px 0 0; border-bottom: 1px solid var(--line); }
.bar-group { min-width: 0; flex: 1; height: 100%; display: flex; align-items: flex-end; justify-content: center; gap: 3px; position: relative; }
.bar { width: 10px; min-height: 3px; border-radius: 6px 6px 0 0; background: linear-gradient(180deg, var(--violet-2), var(--violet)); }
.bar.active { background: linear-gradient(180deg, #89d4d3, var(--cyan)); }
.bar-label { position: absolute; top: calc(100% + 7px); color: var(--faint); font-size: 9px; transform: rotate(-35deg); white-space: nowrap; }
.legend { display: flex; gap: 17px; margin-top: 20px; color: var(--muted); font-size: 11px; }
.legend span::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 5px; border-radius: 3px; background: var(--violet); }
.legend span:last-child::before { background: var(--cyan); }
.quality-card { padding: 22px; }
.quality-rate { display: flex; align-items: baseline; gap: 8px; margin: 11px 0 15px; }
.quality-rate strong { font-size: 42px; letter-spacing: -.08em; }
.quality-rate span { color: var(--green); font-size: 12px; font-weight: 800; }
.progress { height: 8px; overflow: hidden; border-radius: 999px; background: #edf0f4; }
.progress i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--green), #9bd7b8); }
.mini-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 21px; }
.mini-metrics div { padding-top: 10px; border-top: 1px solid var(--line); }
.mini-metrics strong, .mini-metrics span { display: block; }
.mini-metrics strong { font-size: 17px; }
.mini-metrics span { margin-top: 2px; color: var(--faint); font-size: 11px; }
.callout { display: flex; align-items: flex-start; gap: 12px; margin-top: 17px; padding: 14px 16px; border-radius: 15px; color: #69658f; background: #f7f5ff; }
.callout b { color: var(--violet); }

.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; margin-bottom: 15px; }
.toolbar input, .toolbar select { width: auto; min-width: 125px; height: 40px; padding-top: 8px; padding-bottom: 8px; }
.toolbar input.search { min-width: 255px; }
.toolbar .primary { min-height: 40px; }
.table-panel { overflow: hidden; }
.data-table th { padding: 13px 15px; border-bottom: 1px solid var(--line); color: var(--faint); font-size: 10px; font-weight: 900; letter-spacing: .04em; text-align: left; text-transform: uppercase; white-space: nowrap; }
.data-table td { padding: 15px; border-bottom: 1px solid #f0f1f5; color: #4c5769; vertical-align: middle; }
.data-table tr:last-child td { border-bottom: 0; }
.data-table tr.clickable { cursor: pointer; }
.data-table tr.clickable:hover td { background: #faf9ff; }
.data-table strong { color: var(--ink); }
.empty { padding: 60px 20px; color: var(--faint); text-align: center; }
.badge { display: inline-flex; align-items: center; min-height: 24px; padding: 0 9px; border-radius: 999px; color: #667083; background: #f0f2f6; font-size: 11px; font-weight: 800; white-space: nowrap; }
.badge.green { color: #328263; background: #e7f6ee; }
.badge.violet { color: #6253bc; background: #efedff; }
.badge.orange { color: #ad702a; background: #fff3df; }
.badge.red { color: #b04e65; background: #ffedf0; }
.badge.blue { color: #3d73c6; background: #eaf2ff; }
.row-actions { display: flex; gap: 7px; }
.small-button { min-height: 30px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; color: var(--violet); background: #fff; font-size: 11px; font-weight: 800; }
.small-button:hover { border-color: #cfc8ff; background: #f8f7ff; }
.small-button.danger { color: var(--red); }
.next-row { display: flex; justify-content: center; padding: 14px; border-top: 1px solid var(--line); }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(290px, .7fr); gap: 17px; }
.detail-card { padding: 22px; }
.detail-card h3 { margin: 0 0 17px; font-size: 17px; }
.definition { display: grid; grid-template-columns: 135px 1fr; gap: 11px 18px; }
.definition dt { color: var(--faint); font-size: 12px; }
.definition dd { margin: 0; color: var(--ink); font-weight: 700; word-break: break-word; }
.feedback-body { min-height: 150px; padding: 16px; border-radius: 13px; color: #4d5666; background: #f8f9fb; white-space: pre-wrap; word-break: break-word; }
.activity { display: grid; grid-template-columns: 112px 1fr; gap: 12px; padding: 13px 0; border-top: 1px solid var(--line); }
.activity time { color: var(--faint); font-size: 11px; }
.activity p { margin: 0; color: #596475; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-grid .full { grid-column: 1 / -1; }
.form-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 13px; }
.notice-strip { margin-bottom: 16px; padding: 12px 15px; border: 1px solid #ffe4ba; border-radius: 13px; color: #9c6d2a; background: #fff9ed; }
.toast { position: fixed; right: 24px; bottom: 24px; z-index: 5; max-width: 340px; padding: 12px 16px; border-radius: 12px; color: #fff; background: rgba(39,49,67,.92); box-shadow: var(--shadow); opacity: 0; pointer-events: none; transform: translateY(12px); transition: .25s opacity, .25s transform; }
.toast.show { opacity: 1; transform: translateY(0); }

@media (max-width: 1050px) { .sidebar { width: 218px; flex-basis: 218px; } .stats-grid { grid-template-columns: repeat(2, 1fr); } .two-col, .detail-grid { grid-template-columns: 1fr; } }
@media (max-width: 720px) { .auth-card { padding: 34px 25px; } .app-shell { display: block; } .sidebar { width: 100%; padding: 12px 15px; border-right: 0; border-bottom: 1px solid var(--line); } .sidebar-brand { padding-bottom: 12px; } .side-nav { display: flex; overflow-x: auto; padding-bottom: 3px; } .side-nav button { flex: 0 0 auto; min-height: 37px; padding: 0 11px; font-size: 12px; } .side-nav button span { display: none; } .privacy-card, .sidebar-footer { display: none; } .topbar { min-height: 83px; padding: 17px 20px; } .topbar h2 { font-size: 21px; } .content { padding: 25px 18px 55px; } .stats-grid { grid-template-columns: 1fr 1fr; gap: 10px; } .stat-card { min-height: 120px; padding: 15px; } .stat-value { margin-top: 13px; font-size: 24px; } .page-head { display: block; } .page-head .toolbar { margin-top: 14px; } .toolbar input.search { min-width: 100%; } .toolbar input, .toolbar select { flex: 1; min-width: 0; } .data-table { min-width: 720px; } .table-panel { overflow-x: auto; } .panel-pad { padding: 16px; } .form-grid { grid-template-columns: 1fr; } .form-grid .full { grid-column: auto; } }
