:root {
  --bg: #070b14;
  --card: rgba(12, 20, 36, .92);
  --line: rgba(94, 176, 255, .22);
  --text: #e7f2ff;
  --muted: #8aa0c2;
  --sider: #080e1c;
  --sider-active: rgba(62, 224, 255, .12);
  --blue: #3ee0ff;
  --red: #ff5d73;
  --orange: #ffb020;
  --green: #3dffb0;
  --glow: 0 0 24px rgba(62, 224, 255, .18);
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Segoe UI", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  color-scheme: dark;
}
body.app-body,
body.login-body {
  background-color: #070b14;
  background-image:
    linear-gradient(rgba(62, 224, 255, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(62, 224, 255, .045) 1px, transparent 1px),
    radial-gradient(900px 420px at 10% -10%, rgba(76, 141, 255, .18), transparent 60%);
  background-size: 42px 42px, 42px 42px, auto;
}
a { color: var(--blue); text-decoration: none; }
.shell { display: flex; min-height: 100vh; }
.sider {
  width: 220px;
  flex: 0 0 220px;
  background: linear-gradient(180deg, #0b1428 0%, #070c18 100%);
  color: #fff;
  border-right: 1px solid var(--line);
  box-shadow: inset -1px 0 0 rgba(62, 224, 255, .08);
}
.brand {
  height: 64px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 18px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 1px;
  border-bottom: 1px solid var(--line);
}
.brand-mark {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  background: var(--blue);
  box-shadow: 0 0 10px var(--blue);
}
.menu { padding: 12px 10px; }
.menu a {
  display: block;
  color: rgba(231, 242, 255, .78);
  padding: 12px 14px;
  margin-bottom: 6px;
  font-size: 14px;
  border-radius: 8px;
  border: 1px solid transparent;
}
.menu a:hover {
  color: #fff;
  background: rgba(62, 224, 255, .08);
  border-color: rgba(62, 224, 255, .16);
}
.menu a.active {
  color: #fff;
  background: var(--sider-active);
  border-color: rgba(62, 224, 255, .45);
  box-shadow: inset 3px 0 0 var(--blue), var(--glow);
}
.workspace { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  height: 56px;
  background: rgba(8, 14, 26, .88);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px;
  backdrop-filter: blur(8px);
}
.crumb { font-size: 14px; color: #c5d7f2; letter-spacing: .5px; }
.topbar-user { display: flex; align-items: center; gap: 12px; font-size: 13px; color: #c5d7f2; }
.topbar-user button {
  background: transparent;
  color: var(--blue);
  border: 1px solid rgba(62, 224, 255, .35);
  padding: 4px 10px;
}
.content { padding: 18px; }
.panel, .card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .28), inset 0 1px 0 rgba(255,255,255,.04);
}
.panel-toolbar {
  display: flex;
  gap: 8px;
  align-items: flex-end;
  flex-wrap: wrap;
  padding: 14px;
  border-bottom: 1px solid var(--line);
}
.panel-toolbar .field { min-width: 140px; }
.panel-body { padding: 0; overflow-x: auto; }
.card { padding: 18px; margin-bottom: 16px; }
h1 { font-size: 18px; margin: 0 0 12px; font-weight: 600; letter-spacing: 1px; }
label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
input, select, textarea {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid rgba(94, 176, 255, .28);
  border-radius: 8px;
  font: inherit;
  background: rgba(6, 12, 24, .85);
  color: var(--text);
  outline: none;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(62, 224, 255, .12);
}
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; }
.row > div { flex: 1; min-width: 140px; }
button, .btn {
  background: linear-gradient(180deg, #49e7ff 0%, #1aa8ff 100%);
  color: #041018;
  border: 0;
  border-radius: 8px;
  padding: 7px 14px;
  cursor: pointer;
  font: inherit;
  font-weight: 600;
  box-shadow: 0 0 16px rgba(62, 224, 255, .25);
}
button:hover, .btn:hover { filter: brightness(1.08); }
button.danger { background: linear-gradient(180deg, #ff7a8a, #e23b55); color: #fff; box-shadow: 0 0 12px rgba(255, 93, 115, .25); }
button.warn { background: linear-gradient(180deg, #ffc14d, #f08a12); color: #1a1204; }
button.ghost {
  background: transparent;
  color: #d5e6ff;
  border: 1px solid rgba(148, 180, 220, .35);
  box-shadow: none;
}
table { width: 100%; border-collapse: collapse; font-size: 13px; background: transparent; }
th, td { border-bottom: 1px solid rgba(94, 176, 255, .12); text-align: left; padding: 12px 10px; vertical-align: middle; }
th { color: #9eb4d4; font-weight: 600; background: rgba(62, 224, 255, .05); }
tbody tr:hover { background: rgba(62, 224, 255, .05); }
.flash { padding: 10px 12px; border-radius: 8px; margin-bottom: 12px; }
.flash.ok { background: rgba(61, 255, 176, .08); color: #7dffc8; border: 1px solid rgba(61, 255, 176, .35); }
.flash.err { background: rgba(255, 93, 115, .1); color: #ffb3be; border: 1px solid rgba(255, 93, 115, .4); }
.login-page { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px 16px; }
.login-wrap { width: 100%; max-width: 400px; }
.muted { color: var(--muted); font-size: 12px; }
code {
  font-family: Consolas, monospace;
  color: #9af6ff;
  background: rgba(62, 224, 255, .08);
  padding: 2px 6px;
  border-radius: 4px;
}
.tag { display: inline-block; padding: 2px 8px; border-radius: 999px; background: rgba(255,255,255,.06); color: #c5d7f2; border: 1px solid rgba(255,255,255,.08); }
.tag-ok { background: rgba(61, 255, 176, .1); color: #7dffc8; border-color: rgba(61, 255, 176, .35); }
.tag-off { background: rgba(255, 93, 115, .1); color: #ffb3be; border-color: rgba(255, 93, 115, .35); }
.actions { white-space: nowrap; }
.actions form { display: inline-block; margin-right: 4px; }
.actions button { padding: 4px 10px; font-size: 12px; }
.renew-form { display: inline-flex; align-items: center; gap: 4px; margin-right: 4px; vertical-align: middle; }
.renew-form input { width: 72px; padding: 4px 6px; }
.console-panel {
  background: linear-gradient(180deg, rgba(16, 28, 48, .96), rgba(8, 14, 26, .96));
  color: #fff;
  border-radius: 14px;
  padding: 22px 24px 16px;
  border: 1px solid var(--line);
  box-shadow: var(--glow);
}
.console-title {
  margin: 0;
  font-size: 26px;
  font-weight: 600;
  letter-spacing: 2px;
}
.console-desc { margin: 8px 0 0; color: #8aa0c2; font-size: 13px; }
.bar-chart {
  display: flex;
  align-items: flex-end;
  justify-content: space-around;
  gap: 12px;
  min-height: calc(var(--chart-h, 220px) + 72px);
  margin-top: 28px;
  padding: 0 8px;
}
.bar-col { flex: 1; max-width: 140px; display: flex; flex-direction: column; align-items: center; }
.bar-value { font-size: 28px; font-weight: 600; line-height: 1; margin-bottom: 10px; text-shadow: 0 0 12px currentColor; }
.bar-track {
  width: 56px;
  height: var(--chart-h, 220px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.bar-fill {
  width: 100%;
  border-radius: 14px 14px 6px 6px;
  min-height: 8px;
  box-shadow: 0 0 22px rgba(62, 224, 255, .22);
}
.bar-label { margin-top: 12px; font-size: 13px; color: #a8bdd8; text-align: center; }
.console-foot { margin: 18px 0 0; color: #6d82a3; font-size: 12px; }
@media (max-width: 900px) {
  .shell { flex-direction: column; }
  .sider { width: 100%; flex: none; border-right: 0; border-bottom: 1px solid var(--line); }
  .menu { display: flex; gap: 6px; overflow-x: auto; }
  .menu a { white-space: nowrap; margin-bottom: 0; }
  .bar-chart { gap: 6px; padding: 0; }
  .bar-track { width: 36px; }
  .bar-value { font-size: 20px; }
  .console-title { font-size: 22px; }
}
body.modal-open { overflow: hidden; }
.modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 14, .72);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 16px;
}
.modal-mask[hidden] { display: none !important; }
.modal {
  width: 100%;
  max-width: 440px;
  background: #0d1628;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--glow);
}
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
  letter-spacing: 1px;
}
.modal-close {
  background: transparent;
  color: #9eb4d4;
  font-size: 22px;
  line-height: 1;
  padding: 0 4px;
  box-shadow: none;
}
.modal-body { padding: 16px; }
.form-stack { display: flex; flex-direction: column; gap: 12px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.pager {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  color: var(--muted);
  font-size: 13px;
}
.pager a {
  border: 1px solid rgba(62, 224, 255, .35);
  border-radius: 8px;
  padding: 4px 10px;
}
.notice-board { display: flex; flex-direction: column; gap: 12px; margin-bottom: 16px; }
.notice-card {
  background: rgba(12, 20, 36, .92);
  border: 1px solid rgba(62, 224, 255, .28);
  border-left: 3px solid #3ee0ff;
  border-radius: 12px;
  padding: 14px 16px;
  box-shadow: 0 0 18px rgba(62, 224, 255, .08);
}
.notice-card h3 { margin: 4px 0 8px; font-size: 16px; letter-spacing: .5px; }
.notice-card p { margin: 0; color: #d5e6ff; line-height: 1.7; white-space: pre-wrap; }
.notice-meta { color: #8aa0c2; font-size: 12px; }
.notice-preview { max-width: 360px; color: #8aa0c2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
textarea { resize: vertical; min-height: 96px; }
