@font-face {
  font-family: 'Noto Sans SC';
  src: url('../assets/fonts/noto-sans-sc-regular.woff2') format('woff2');
  font-weight: 400; font-display: swap;
}
@font-face {
  font-family: 'Noto Sans SC';
  src: url('../assets/fonts/noto-sans-sc-bold.woff2') format('woff2');
  font-weight: 700; font-display: swap;
}

:root {
  --bg: #070d11;
  --panel: rgba(14, 24, 31, 0.82);
  --panel-solid: #0e1820;
  --panel-2: rgba(20, 34, 43, 0.7);
  --line: rgba(255, 255, 255, 0.075);
  --line-strong: rgba(255, 255, 255, 0.14);
  --text: #e9f1f3;
  --muted: #90a4ad;
  --dim: #61747d;
  --teal: #3ee6c4;
  --teal-soft: rgba(62, 230, 196, 0.12);
  --gold: #e8b45a;
  --gold-soft: rgba(232, 180, 90, 0.12);
  --blue: #63b3ed;
  --violet: #a78bfa;
  --bad: #f27777;
  --radius: 18px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }

.admin-bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; background: radial-gradient(ellipse at 10% -10%, #0f2b2c 0%, transparent 55%), radial-gradient(ellipse at 95% 0%, #1c1830 0%, transparent 45%), #070d11; }
.admin-bg i { position: absolute; border-radius: 999px; filter: blur(9px); opacity: 0.5; animation: drift 22s ease-in-out infinite alternate; }
.admin-bg i:nth-child(1) { width: 440px; height: 440px; background: radial-gradient(circle, rgba(62,230,196,0.16), transparent 65%); left: -80px; top: 8%; }
.admin-bg i:nth-child(2) { width: 520px; height: 520px; background: radial-gradient(circle, rgba(232,180,90,0.11), transparent 65%); right: -140px; top: 20%; animation-delay: -7s; }
.admin-bg i:nth-child(3) { width: 380px; height: 380px; background: radial-gradient(circle, rgba(99,179,237,0.1), transparent 65%); left: 42%; bottom: -180px; animation-delay: -13s; }
@keyframes drift { from { transform: translate3d(0,0,0) } to { transform: translate3d(40px,-34px,0) scale(1.08) } }

.admin-shell { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; }
.admin-side {
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column; gap: 18px;
  padding: 20px 16px;
  background: linear-gradient(180deg, rgba(11, 20, 26, 0.96), rgba(8, 15, 19, 0.9));
  border-right: 1px solid var(--line);
  backdrop-filter: blur(18px);
}
.admin-brand { display: flex; align-items: center; gap: 11px; padding: 4px 6px 16px; border-bottom: 1px solid var(--line); }
.admin-mark {
  width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center;
  font-weight: 800; font-size: 14px; letter-spacing: 1px; color: #07110f;
  background: linear-gradient(140deg, #76f2d8, #3eb9c4 55%, #e8b45a);
  box-shadow: 0 10px 26px rgba(62, 230, 196, 0.22);
}
.admin-brand strong { display: block; font-size: 14px; letter-spacing: 0.3px; }
.admin-brand small { display: block; margin-top: 3px; color: var(--dim); font-size: 10px; letter-spacing: 1.4px; }
.admin-nav { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.nav-label { margin: 14px 10px 5px; font-size: 10px; letter-spacing: 1.8px; color: var(--dim); }
.nav-item {
  display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 11px;
  color: var(--muted); font-size: 13px; border: 1px solid transparent; transition: 0.18s ease;
}
.nav-item:hover { color: var(--text); background: rgba(255,255,255,0.04); }
.nav-item.active { color: var(--teal); background: var(--teal-soft); border-color: rgba(62,230,196,0.2); box-shadow: inset 0 0 18px rgba(62,230,196,0.04); }
.nav-icon { width: 20px; text-align: center; opacity: 0.9; }
.admin-side-foot { display: flex; flex-direction: column; gap: 7px; padding-top: 14px; border-top: 1px solid var(--line); }
.side-link { display: block; padding: 7px 8px; font-size: 12px; color: var(--muted); border-radius: 8px; }
.side-link:hover { background: rgba(255,255,255,0.05); color: var(--text); }
.side-link.danger { text-align: left; width: 100%; }
.side-link.danger:hover { color: var(--bad); }
.admin-side-foot small { color: var(--dim); font-size: 10px; padding: 4px 8px; }

.admin-main { padding: 26px 32px 48px; max-width: 1560px; width: 100%; }
.admin-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.eyebrow { font-size: 10px; letter-spacing: 2.2px; color: var(--teal); opacity: 0.8; }
.admin-top h1 { margin: 6px 0 0; font-size: 25px; letter-spacing: 0.5px; }
.admin-top-actions { display: flex; align-items: center; gap: 10px; }
.status-pill { display: inline-flex; align-items: center; gap: 7px; font-size: 11px; color: var(--muted); border: 1px solid var(--line); padding: 7px 11px; border-radius: 999px; background: rgba(255,255,255,0.02); }
.status-pill .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 10px var(--teal); }

.flash { padding: 12px 15px; border-radius: 12px; margin-bottom: 16px; font-size: 13px; border: 1px solid var(--line-strong); background: var(--panel); }
.flash.good { border-color: rgba(62,230,196,0.3); color: var(--teal); background: rgba(62,230,196,0.08); }
.flash.bad { border-color: rgba(242,119,119,0.35); color: var(--bad); background: rgba(242,119,119,0.08); }
.notice { padding: 12px 15px; border-radius: 12px; font-size: 12.5px; margin-bottom: 16px; border: 1px solid var(--line); background: var(--panel); color: var(--muted); }
.notice.warn { border-color: rgba(232,180,90,0.32); background: var(--gold-soft); color: #f1d39a; }
.notice.bad { border-color: rgba(242,119,119,0.35); background: rgba(242,119,119,0.08); color: #ffb3b3; }
.notice a { color: var(--gold); text-decoration: underline; }

.kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 16px; }
.kpi {
  position: relative; overflow: hidden; padding: 17px 18px; border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(20, 34, 43, 0.82), rgba(11, 21, 27, 0.8));
  border: 1px solid var(--line); box-shadow: 0 12px 34px rgba(0,0,0,0.25);
}
.kpi::after { content: ''; position: absolute; right: -30px; top: -40px; width: 120px; height: 120px; border-radius: 50%; background: radial-gradient(circle, var(--teal-soft), transparent 70%); }
.kpi.teal::after { background: radial-gradient(circle, rgba(62,230,196,0.18), transparent 70%); }
.kpi.gold::after { background: radial-gradient(circle, rgba(232,180,90,0.18), transparent 70%); }
.kpi.blue::after { background: radial-gradient(circle, rgba(99,179,237,0.18), transparent 70%); }
.kpi.violet::after { background: radial-gradient(circle, rgba(167,139,250,0.18), transparent 70%); }
.kpi span { color: var(--muted); font-size: 11.5px; letter-spacing: 0.6px; }
.kpi strong { display: block; margin: 7px 0 5px; font-size: 29px; letter-spacing: -0.5px; }
.kpi.gold strong { color: var(--gold); }
.kpi.teal strong { color: var(--teal); }
.kpi small { color: var(--dim); font-size: 10.5px; }

.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
.card {
  background: linear-gradient(180deg, rgba(17, 29, 37, 0.78), rgba(9, 17, 22, 0.82));
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; box-shadow: 0 16px 40px rgba(0,0,0,0.22);
  margin-bottom: 16px;
}
.grid-2 > .card { margin-bottom: 0; }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 14px; }
.card-head h2 { margin: 0; font-size: 15px; letter-spacing: 0.3px; }
.card-head p { margin: 4px 0 0; color: var(--dim); font-size: 11.5px; }
.card-head .tag { font-size: 10px; color: var(--teal); border: 1px solid rgba(62,230,196,0.25); padding: 4px 8px; border-radius: 999px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 15px; border-radius: 10px; border: 1px solid var(--line-strong);
  background: rgba(255,255,255,0.04); color: var(--text); font-size: 12.5px;
  transition: 0.16s ease; white-space: nowrap;
}
.btn:hover { background: rgba(255,255,255,0.09); transform: translateY(-1px); }
.btn.small { padding: 7px 11px; font-size: 11.5px; }
.btn.tiny { padding: 5px 9px; font-size: 10.5px; border-radius: 8px; }
.btn.primary { background: linear-gradient(140deg, #4be8ca, #2fa9ae); color: #06110f; border-color: transparent; font-weight: 700; box-shadow: 0 10px 24px rgba(62,230,196,0.18); }
.btn.primary:hover { filter: brightness(1.06); }
.btn.danger { color: #ffb0b0; border-color: rgba(242,119,119,0.3); }
.btn.danger:hover { background: rgba(242,119,119,0.12); }
.btn.block { width: 100%; }

.table-wrap { overflow-x: auto; border-radius: 12px; border: 1px solid var(--line); }
.admin-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.admin-table th { text-align: left; font-weight: 500; color: var(--dim); font-size: 10.5px; letter-spacing: 1px; padding: 9px 12px; background: rgba(255,255,255,0.025); border-bottom: 1px solid var(--line); white-space: nowrap; }
.admin-table td { padding: 11px 12px; border-bottom: 1px solid rgba(255,255,255,0.04); vertical-align: middle; }
.admin-table tr:last-child td { border-bottom: 0; }
.admin-table tbody tr:hover { background: rgba(255,255,255,0.018); }
.admin-table.compact td, .admin-table.compact th { padding: 8px 10px; }
.row-link { color: var(--text); font-weight: 700; }
.row-link:hover { color: var(--teal); }
.sub { display: block; color: var(--dim); font-size: 10px; margin-top: 3px; }
.muted { color: var(--muted); }
.center { text-align: center; }
.gold-text { color: var(--gold); }
.ellipsis { max-width: 340px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pill { display: inline-block; padding: 3px 8px; border-radius: 999px; font-size: 10px; border: 1px solid var(--line-strong); color: var(--muted); }
.pill.good { color: var(--teal); border-color: rgba(62,230,196,0.28); background: rgba(62,230,196,0.07); }
.pill.bad { color: var(--bad); border-color: rgba(242,119,119,0.3); background: rgba(242,119,119,0.07); margin-left: 6px; }

.chart-bars { display: flex; align-items: flex-end; gap: 10px; height: 154px; padding: 8px 2px 0; }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 7px; height: 100%; }
.bar-stack { flex: 1; width: 100%; max-width: 42px; display: flex; flex-direction: column; justify-content: flex-end; gap: 3px; }
.bar-stack i { display: block; width: 100%; border-radius: 4px 4px 2px 2px; min-height: 3px; }
.bar-events { background: linear-gradient(180deg, #4be8ca, #218f95); box-shadow: 0 0 16px rgba(62,230,196,0.18); }
.bar-saves { background: linear-gradient(180deg, #efc877, #b08039); }
.bar-col span { font-size: 9.5px; color: var(--dim); }
.legend { display: flex; gap: 16px; margin-top: 12px; font-size: 10.5px; color: var(--muted); }
.legend .dot { display: inline-block; width: 7px; height: 7px; border-radius: 2px; margin-right: 5px; }
.dot.teal { background: var(--teal); } .dot.gold { background: var(--gold); }

.feed { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.feed li { display: flex; gap: 10px; align-items: flex-start; padding: 9px 2px; border-bottom: 1px solid rgba(255,255,255,0.04); font-size: 12px; }
.feed li:last-child { border-bottom: 0; }
.feed-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); margin-top: 5px; flex: none; }
.feed-dot.cloud_save, .feed-dot.save_local { background: var(--gold); }
.feed-dot.day_end { background: var(--teal); }
.feed-dot.achievement { background: var(--violet); }
.feed-dot.school_event { background: var(--blue); }
.feed-dot.player_new { background: #fff; }
.feed strong { font-weight: 700; }
.feed small { display: block; color: var(--dim); margin-top: 2px; }
.feed time { margin-left: auto; color: var(--dim); font-size: 10px; white-space: nowrap; }
.kind-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.kind-chip { display: inline-flex; align-items: center; gap: 8px; padding: 7px 11px; border-radius: 999px; border: 1px solid var(--line); background: rgba(255,255,255,0.025); font-size: 11px; color: var(--muted); }
.kind-chip b { color: var(--teal); }

.search { display: flex; gap: 7px; }
.search input { width: 180px; padding: 8px 11px; font-size: 12px; }
input, select, textarea {
  background: rgba(4, 10, 13, 0.55); border: 1px solid var(--line-strong);
  border-radius: 9px; padding: 9px 11px; outline: none; font-size: 12.5px;
  transition: border-color 0.16s ease, box-shadow 0.16s ease; width: 100%;
}
input:focus, select:focus, textarea:focus { border-color: rgba(62,230,196,0.45); box-shadow: 0 0 0 3px rgba(62,230,196,0.08); }
textarea { resize: vertical; min-height: 72px; }
input[type="checkbox"] { width: 17px; height: 17px; accent-color: var(--teal); }
label { display: flex; flex-direction: column; gap: 6px; font-size: 11px; color: var(--muted); }

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 14px; margin-bottom: 14px; }
.form-grid .full { grid-column: 1 / -1; }
.inline-form { display: flex; align-items: flex-end; gap: 10px; margin-top: 14px; }
.inline-form label { flex: 1; }
.inline { display: inline; }

.pager { display: flex; gap: 5px; margin-top: 14px; flex-wrap: wrap; }
.pager a { min-width: 30px; height: 30px; display: grid; place-items: center; border-radius: 8px; border: 1px solid var(--line); font-size: 11px; color: var(--muted); }
.pager a.active { background: var(--teal-soft); color: var(--teal); border-color: rgba(62,230,196,0.3); }
.tabs { display: flex; gap: 4px; padding: 3px; background: rgba(0,0,0,0.25); border-radius: 10px; border: 1px solid var(--line); }
.tabs a { padding: 6px 12px; border-radius: 8px; font-size: 11.5px; color: var(--muted); }
.tabs a.active { background: rgba(255,255,255,0.08); color: var(--text); }
.kind { font-size: 10.5px; color: var(--teal); border: 1px solid rgba(62,230,196,0.2); background: rgba(62,230,196,0.06); padding: 3px 8px; border-radius: 999px; white-space: nowrap; }

.detail-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 16px; }
.identity { display: flex; align-items: center; gap: 13px; }
.avatar { width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; font-size: 22px; font-weight: 700; background: linear-gradient(140deg, rgba(62,230,196,0.22), rgba(232,180,90,0.14)); border: 1px solid rgba(62,230,196,0.25); color: var(--teal); }
.identity h2 { margin: 0 0 4px; font-size: 20px; }
.identity p { margin: 0; color: var(--dim); font-size: 11.5px; }
.detail-actions { display: flex; gap: 8px; }
.kv-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px 18px; margin-bottom: 14px; }
.kv-grid span { display: block; font-size: 10.5px; color: var(--dim); margin-bottom: 3px; }
.kv-grid b { font-size: 13px; }
.save-row { display: flex; gap: 12px; align-items: flex-start; padding: 11px 0; border-bottom: 1px solid rgba(255,255,255,0.04); }
.save-row:last-child { border-bottom: 0; }
.save-row .slot { width: 34px; height: 28px; display: grid; place-items: center; border-radius: 8px; background: var(--gold-soft); color: var(--gold); font-size: 11px; font-weight: 700; flex: none; }
.save-row small { display: block; color: var(--dim); margin-top: 3px; font-size: 10.5px; }
.tips { margin: 0; padding-left: 17px; color: var(--muted); font-size: 12px; line-height: 1.9; }
.switch-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.switch-row { flex-direction: row; align-items: center; justify-content: space-between; gap: 15px; padding: 10px 12px; border-radius: 10px; background: rgba(255,255,255,0.02); border: 1px solid var(--line); }
.switch-row b { display: block; color: var(--text); font-size: 12.5px; }
.switch-row small { display: block; color: var(--dim); font-size: 10.5px; margin-top: 2px; }
.switch-row input { flex: none; }
.actions-cell { display: flex; gap: 5px; align-items: center; }

.login-body { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login-card {
  width: min(430px, 100%); padding: 34px 34px 28px; border-radius: 24px;
  background: linear-gradient(180deg, rgba(18, 31, 39, 0.94), rgba(8, 16, 21, 0.96));
  border: 1px solid var(--line-strong); box-shadow: 0 40px 100px rgba(0,0,0,0.55);
  backdrop-filter: blur(22px);
}
.login-brand { display: flex; gap: 11px; align-items: center; margin-bottom: 26px; }
.login-brand strong { display: block; font-size: 13px; }
.login-brand small { display: block; color: var(--dim); font-size: 9px; letter-spacing: 1.6px; margin-top: 3px; }
.login-card h1 { margin: 0 0 6px; font-size: 24px; }
.login-card > p { margin: 0 0 18px; color: var(--muted); font-size: 12.5px; }
.login-form { display: flex; flex-direction: column; gap: 14px; margin-top: 8px; }
.login-back { display: inline-block; margin-top: 18px; color: var(--dim); font-size: 11.5px; }
.login-back:hover { color: var(--teal); }

@media (max-width: 1120px) {
  .admin-shell { grid-template-columns: 218px minmax(0, 1fr); }
  .admin-main { padding: 22px 22px 40px; }
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .admin-shell { grid-template-columns: 1fr; }
  .admin-side { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 10px; padding: 12px 14px; }
  .admin-brand { border-bottom: 0; padding: 0; }
  .admin-nav { flex-direction: row; flex-wrap: wrap; width: 100%; gap: 4px; }
  .nav-label { display: none; }
  .nav-item { padding: 7px 10px; font-size: 11.5px; }
  .admin-side-foot { flex-direction: row; align-items: center; border-top: 0; padding-top: 0; width: 100%; }
  .admin-side-foot small { margin-left: auto; }
  .grid-2 { grid-template-columns: 1fr; }
  .admin-top { align-items: flex-start; flex-direction: column; }
}
@media (max-width: 620px) {
  .admin-main { padding: 16px 14px 32px; }
  .kpi-grid { grid-template-columns: 1fr 1fr; gap: 9px; }
  .kpi strong { font-size: 22px; }
  .form-grid { grid-template-columns: 1fr; }
  .detail-head { flex-direction: column; align-items: flex-start; }
  .kv-grid { grid-template-columns: 1fr 1fr; }
  .search input { width: 130px; }
  .login-card { padding: 26px 20px 22px; }
}

/* ===== 2.1 console refresh ===== */
:root {
  --side-w: 260px;
  --radius-lg: 22px;
  --glass: linear-gradient(180deg, rgba(19, 33, 42, 0.82), rgba(9, 18, 23, 0.9));
}
.admin-shell { grid-template-columns: var(--side-w) minmax(0, 1fr); }
.admin-main { padding: 28px 36px 56px; animation: mainIn 0.42s cubic-bezier(.2,.7,.3,1) both; }
@keyframes mainIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.admin-side { padding: 18px 14px 16px; gap: 14px; background: linear-gradient(180deg, rgba(12, 22, 28, 0.98), rgba(7, 13, 17, 0.96)); }
.admin-brand { position: relative; padding: 6px 8px 16px; }
.brand-copy { min-width: 0; }
.brand-copy strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 150px; }
.admin-mark { box-shadow: 0 12px 28px rgba(62, 230, 196, 0.28), inset 0 1px 0 rgba(255,255,255,0.4); }
.side-close { display: none; margin-left: auto; width: 30px; height: 30px; border-radius: 9px; border: 1px solid var(--line); background: rgba(255,255,255,0.04); color: var(--muted); font-size: 18px; line-height: 1; }
.nav-item { position: relative; padding: 10px 11px; font-size: 12.5px; }
.nav-icon {
  width: 30px; height: 30px; display: grid; place-items: center; border-radius: 9px;
  background: rgba(255,255,255,0.035); border: 1px solid transparent; font-size: 13px; flex: none;
}
.nav-item:hover .nav-icon { background: rgba(255,255,255,0.07); }
.nav-item.active .nav-icon { background: rgba(62,230,196,0.16); border-color: rgba(62,230,196,0.22); }
.nav-text { flex: 1; }
.nav-badge { min-width: 22px; height: 20px; padding: 0 6px; display: inline-grid; place-items: center; border-radius: 999px; background: rgba(62,230,196,0.16); color: var(--teal); font-size: 10px; }
.nav-item.active::after { content: ''; position: absolute; right: -14px; top: 10px; bottom: 10px; width: 3px; border-radius: 3px; background: var(--teal); box-shadow: 0 0 12px var(--teal); }
.side-health { display: flex; align-items: center; gap: 8px; padding: 9px 10px; margin-bottom: 4px; border-radius: 11px; border: 1px solid var(--line); background: rgba(255,255,255,0.025); font-size: 11px; color: var(--muted); }
.status-dot { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.status-dot.ok { background: var(--teal); box-shadow: 0 0 10px var(--teal); }
.status-dot.warn { background: var(--gold); box-shadow: 0 0 10px var(--gold); }
.side-link { display: flex; align-items: center; justify-content: space-between; }
.side-scrim { display: none; }

.top-title { display: flex; align-items: center; gap: 12px; min-width: 0; }
.menu-toggle { display: none; width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--line-strong); background: rgba(255,255,255,0.04); padding: 11px 10px; flex: none; }
.menu-toggle span { display: block; height: 2px; border-radius: 2px; background: var(--text); margin: 3px 0; }
.admin-top { position: relative; z-index: 1; }
.admin-top h1 { font-size: 27px; letter-spacing: 0.4px; }
.btn.ghost { background: transparent; }
.btn:active { transform: translateY(1px); }
.status-pill.warn .dot { background: var(--gold); box-shadow: 0 0 10px var(--gold); }

.kpi { background: var(--glass); border-radius: var(--radius-lg); transition: transform .2s ease, border-color .2s ease; }
.kpi:hover { transform: translateY(-2px); border-color: var(--line-strong); }
.kpi::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 2px; background: linear-gradient(90deg, transparent, rgba(62,230,196,0.55), transparent); opacity: .55; }
.kpi.gold::before { background: linear-gradient(90deg, transparent, rgba(232,180,90,0.6), transparent); }
.kpi.blue::before { background: linear-gradient(90deg, transparent, rgba(99,179,237,0.6), transparent); }
.kpi.violet::before { background: linear-gradient(90deg, transparent, rgba(167,139,250,0.6), transparent); }
.kpi strong { font-variant-numeric: tabular-nums; }
.kpi-spark { display: block; margin-top: 9px; color: rgba(62,230,196,0.75); font-size: 10px; letter-spacing: 2px; font-style: normal; white-space: nowrap; overflow: hidden; }
.compact-kpis .kpi { padding: 14px 16px; }
.compact-kpis .kpi strong { font-size: 23px; margin: 5px 0 3px; }

.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
.grid-3 > .card { margin-bottom: 0; }
.card { background: var(--glass); border-radius: var(--radius-lg); padding: 19px 20px; }
.card-head h2 { font-size: 14.5px; }
.card-head .tag { background: rgba(62,230,196,0.07); }

.admin-table th { position: sticky; top: 0; z-index: 1; backdrop-filter: blur(12px); }
.admin-table tbody tr { transition: background .14s ease; }
.admin-table tbody tr:nth-child(even) { background: rgba(255,255,255,0.012); }
.admin-table tbody tr:hover { background: rgba(62,230,196,0.045); }
.table-wrap { border-radius: 14px; }
.row-actions { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.sub { line-height: 1.5; }

.search.multi { flex-wrap: wrap; justify-content: flex-end; }
.search.multi select { width: auto; min-width: 104px; padding: 7px 9px; font-size: 11.5px; }
.filter-bar { justify-content: flex-start; margin-bottom: 14px; }
.filter-bar input[name="q"] { width: 220px; }

.slot-dist { display: flex; flex-direction: column; gap: 11px; margin: 4px 0 12px; }
.slot-bar { display: flex; align-items: center; gap: 10px; font-size: 11px; color: var(--muted); }
.slot-bar > span { width: 22px; color: var(--gold); font-weight: 700; }
.slot-bar b { width: 30px; text-align: right; color: var(--text); font-variant-numeric: tabular-nums; }
.slot-track { flex: 1; height: 8px; border-radius: 999px; background: rgba(255,255,255,0.06); overflow: hidden; }
.slot-track i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #2fa9ae, #4be8ca); box-shadow: 0 0 12px rgba(62,230,196,0.3); }
.text-link { display: inline-block; margin-top: 4px; color: var(--teal); font-size: 11.5px; }
.text-link:hover { text-decoration: underline; }

.quick-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.quick-item { display: flex; flex-direction: column; gap: 3px; padding: 11px 12px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255,255,255,0.022); transition: .16s ease; }
.quick-item:hover { border-color: rgba(62,230,196,0.3); background: rgba(62,230,196,0.06); transform: translateY(-1px); }
.quick-item b { font-size: 12px; }
.quick-item small { color: var(--dim); font-size: 10px; }
.compact-feed li { padding: 7px 2px; }
.feed-dot.admin { background: var(--gold); }
.feed-dot.login { background: var(--blue); }

.announce-list { display: flex; flex-direction: column; gap: 10px; }
.announce-card {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px 18px;
  padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line);
  background: rgba(255,255,255,0.02); border-left: 3px solid rgba(99,179,237,0.5);
}
.announce-card.type-good { border-left-color: var(--teal); }
.announce-card.type-warn { border-left-color: var(--gold); }
.announce-card.type-bad { border-left-color: var(--bad); }
.announce-card.is-off { opacity: 0.58; }
.announce-meta { display: flex; gap: 7px; align-items: center; flex-wrap: wrap; font-size: 10.5px; margin-bottom: 6px; }
.announce-main h3 { margin: 0 0 6px; font-size: 14px; }
.announce-main p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.7; word-break: break-word; }
.announce-actions { display: flex; gap: 5px; align-items: flex-start; flex-wrap: wrap; justify-content: flex-end; }
.pill.type-info { color: var(--blue); border-color: rgba(99,179,237,0.3); }
.pill.type-good { color: var(--teal); border-color: rgba(62,230,196,0.3); }
.pill.type-warn { color: var(--gold); border-color: rgba(232,180,90,0.3); }
.pill.type-bad { color: var(--bad); border-color: rgba(242,119,119,0.32); }
.pill.gold { color: var(--gold); border-color: rgba(232,180,90,0.32); background: var(--gold-soft); }
.inline-editor { grid-column: 1 / -1; border-top: 1px dashed var(--line); padding-top: 9px; }
.inline-editor summary { cursor: pointer; color: var(--muted); font-size: 11px; list-style: none; }
.inline-editor summary::-webkit-details-marker { display: none; }
.inline-editor summary::before { content: '＋ '; color: var(--teal); }
.inline-editor[open] summary::before { content: '－ '; }
.inline-editor .form-grid { margin-top: 10px; margin-bottom: 0; }
.check-row { flex-direction: row; align-items: center; gap: 8px; }
.mini-stats { display: flex; gap: 10px; margin-top: 14px; }
.mini-stats div { flex: 1; padding: 10px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255,255,255,0.02); }
.mini-stats span { display: block; color: var(--dim); font-size: 10px; }
.mini-stats b { font-size: 18px; color: var(--teal); }

.note-form { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.note-form button { margin-top: 8px; }
.save-row { align-items: center; }
.save-info { flex: 1; min-width: 0; }
.save-actions { display: flex; gap: 5px; align-items: center; flex: none; }
.slot-chip { display: inline-grid; place-items: center; min-width: 30px; height: 24px; border-radius: 7px; background: var(--teal-soft); color: var(--teal); font-size: 10.5px; font-weight: 700; }

.export-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.export-item { display: flex; flex-direction: column; gap: 4px; padding: 12px 13px; border-radius: 13px; border: 1px solid var(--line); background: rgba(255,255,255,0.02); transition: .16s ease; }
.export-item:hover { border-color: rgba(62,230,196,0.28); background: rgba(62,230,196,0.05); transform: translateY(-1px); }
.export-item b { font-size: 12.5px; }
.export-item small { color: var(--dim); font-size: 10.5px; line-height: 1.5; }
.export-item span { color: var(--teal); font-size: 10.5px; margin-top: 2px; }
.tip-inline { margin-top: 12px; padding: 9px 11px; border-radius: 10px; border: 1px dashed var(--line-strong); color: var(--dim); font-size: 10.5px; line-height: 1.6; }
.small-note { font-size: 10.5px; margin: 8px 0 0; line-height: 1.6; }
.compact-tips { font-size: 11px; line-height: 1.8; margin-top: 10px; }

.nav-locked { overflow: hidden; }
.admin-body::after { content: ''; position: fixed; inset: 0; pointer-events: none; z-index: -2; background-image: linear-gradient(rgba(255,255,255,0.018) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.018) 1px, transparent 1px); background-size: 46px 46px; mask-image: radial-gradient(ellipse at 50% 0%, #000 10%, transparent 72%); }

@media (max-width: 1240px) {
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .grid-3 > .card:last-child { grid-column: 1 / -1; }
}
@media (max-width: 1080px) {
  .admin-shell { grid-template-columns: 1fr; }
  .admin-side {
    position: fixed; inset: 0 auto 0 0; width: min(84vw, 300px); height: 100vh;
    z-index: 80; transform: translateX(-104%); transition: transform .26s cubic-bezier(.2,.7,.3,1);
    box-shadow: 30px 0 80px rgba(0,0,0,0.5);
  }
  .side-open .admin-side { transform: none; }
  .side-scrim { display: block; position: fixed; inset: 0; z-index: 70; background: rgba(3, 8, 11, 0.6); backdrop-filter: blur(3px); opacity: 0; pointer-events: none; transition: opacity .22s ease; }
  .side-open .side-scrim { opacity: 1; pointer-events: auto; }
  .side-close { display: block; }
  .menu-toggle { display: block; }
  .admin-main { padding: 22px 22px 44px; }
  .admin-top { align-items: flex-start; flex-direction: row; flex-wrap: wrap; }
  .admin-top-actions { margin-left: auto; }
}
@media (max-width: 860px) {
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .grid-3 > .card:last-child { grid-column: auto; }
  .search.multi { justify-content: flex-start; width: 100%; }
  .announce-card { grid-template-columns: 1fr; }
  .announce-actions { justify-content: flex-start; }
  .export-grid { grid-template-columns: 1fr; }
  .admin-top h1 { font-size: 22px; }
  .admin-top-actions .status-pill { display: none; }
}
@media (max-width: 560px) {
  .admin-main { padding: 16px 12px 34px; }
  .kpi-grid, .compact-kpis { grid-template-columns: 1fr 1fr; }
  .kpi strong { font-size: 20px; }
  .admin-top-actions .btn.ghost { display: none; }
  .search.multi input[name="q"], .filter-bar input[name="q"] { width: 100%; }
  .search.multi select, .filter-bar select { flex: 1; }
  .quick-grid { grid-template-columns: 1fr; }
  .kv-grid { grid-template-columns: 1fr; }
  .detail-actions { flex-wrap: wrap; }
  .save-row { flex-wrap: wrap; }
  .save-actions { width: 100%; justify-content: flex-end; }
  .announce-card { padding: 12px; }
  .tabs { width: 100%; }
  .tabs a { flex: 1; text-align: center; }
}
button.side-link { background: transparent; border: 0; width: 100%; text-align: left; cursor: pointer; font-size: 11.5px; }
button.side-link:hover { background: rgba(255,255,255,0.05); }

.btn.danger { background: rgba(242,119,119,0.1); border-color: rgba(242,119,119,0.34); color: #ffb9b9; }
.btn.danger:hover { background: rgba(242,119,119,0.18); }

@media (max-width: 1080px) {
  .admin-side { flex-direction: column; flex-wrap: nowrap; align-items: stretch; gap: 14px; padding: 18px 14px 16px; overflow-y: auto; }
  .admin-brand { border-bottom: 1px solid var(--line); padding: 6px 8px 16px; }
  .admin-nav { flex-direction: column; flex-wrap: nowrap; width: auto; gap: 4px; }
  .nav-label { display: block; }
  .nav-item { padding: 10px 11px; font-size: 12.5px; }
  .admin-side-foot { flex-direction: column; align-items: stretch; border-top: 1px solid var(--line); padding-top: 14px; width: auto; gap: 7px; }
  .admin-side-foot small { margin-left: 0; padding: 4px 8px; }
}
.kpi-spark { font-size: 14px; letter-spacing: 1px; line-height: 1; color: rgba(62,230,196,0.85); }

@media (max-width: 860px) {
  .card-head { flex-wrap: wrap; }
  .card-head > .search, .card-head > .tabs { width: 100%; }
  .admin-table { min-width: 690px; }
  .admin-table.compact { min-width: 520px; }
  .table-wrap { max-width: 100%; }
  .admin-top-actions { gap: 7px; }
}
.admin-shell, .admin-main, .admin-main > *, .grid-2, .grid-3, .card { min-width: 0; }
@media (max-width: 1080px) {
  .admin-shell { grid-template-columns: minmax(0, 1fr); }
}
