:root {
  --bg: #edf1f7;
  --panel: #ffffff;
  --panel-2: #f7f9fc;
  --rail: #14263b;
  --rail-2: #0f1d2f;
  --ink: #17243a;
  --muted: #66758c;
  --line: #dce3ed;
  --blue: #2168d6;
  --blue-2: #0b4ea4;
  --mint: #0e9f6e;
  --amber: #c47b09;
  --red: #c73c46;
  --violet: #7156cf;
  --shadow: 0 12px 34px rgba(24, 45, 76, .09);
  --radius: 14px;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background:
    radial-gradient(circle at 85% 0%, rgba(33, 104, 214, .08), transparent 30%),
    linear-gradient(135deg, #f6f8fb, var(--bg));
  color: var(--ink);
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
}
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
a { color: var(--blue); }
.hidden { display: none !important; }
.mono { font-family: "SFMono-Regular", Consolas, monospace; }
.muted { color: var(--muted); }

.login-page {
  min-height: 100vh; display: grid; place-items: center; padding: 28px 18px;
}
.login-card {
  width: 980px; max-width: 100%; min-height: 590px;
  display: grid; grid-template-columns: 420px minmax(0, 1fr);
  border-radius: 24px; overflow: hidden; background: var(--panel);
  border: 1px solid rgba(255,255,255,.65); box-shadow: 0 30px 90px rgba(20, 38, 59, .2);
}
.login-visual {
  position: relative; padding: 42px 38px; color: #fff; overflow: hidden;
  background:
    radial-gradient(circle at 75% 15%, rgba(68, 205, 164, .42), transparent 25%),
    radial-gradient(circle at 15% 80%, rgba(60, 116, 225, .34), transparent 32%),
    linear-gradient(155deg, #1c4b70, #12273e 58%, #0c1828);
}
.login-visual::after {
  content: ""; position: absolute; right: -100px; bottom: -120px;
  width: 360px; height: 360px; border: 1px solid rgba(255,255,255,.1);
  border-radius: 50%; box-shadow: 0 0 0 50px rgba(255,255,255,.025), 0 0 0 100px rgba(255,255,255,.02);
}
.brand-row { display: flex; align-items: center; gap: 13px; position: relative; z-index: 1; }
.brand-logo {
  width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center;
  background: linear-gradient(140deg, #2f8df5, #8159e8);
  color: #fff; font-size: 24px; font-weight: 800;
  box-shadow: 0 9px 26px rgba(46, 118, 229, .28);
}
.brand-row b { display: block; font-size: 18px; letter-spacing: 1px; }
.brand-row span { display: block; color: #aebfd2; font-size: 10px; letter-spacing: 1.6px; margin-top: 3px; }
.login-visual h1 { position: relative; z-index: 1; font-size: 30px; line-height: 1.3; margin: 78px 0 16px; letter-spacing: 1px; }
.login-visual .lead { position: relative; z-index: 1; margin: 0; color: #c2cfdd; line-height: 1.9; font-size: 14px; }
.login-points { position: relative; z-index: 1; display: grid; gap: 12px; margin-top: 34px; }
.login-points div { color: #d5e0eb; font-size: 13px; }
.login-points div::before { content: "✓"; color: #58deb5; margin-right: 9px; font-weight: 800; }
.visual-foot { position: absolute; left: 38px; bottom: 34px; color: #8095ad; font-size: 11px; z-index: 1; }
.login-form-panel { padding: 54px 48px 34px; display: flex; flex-direction: column; }
.login-kicker { color: var(--blue); font-size: 11px; font-weight: 800; letter-spacing: 2px; margin-bottom: 8px; }
.login-form-panel h2 { font-size: 26px; margin: 0 0 8px; }
.login-form-panel .sub { color: var(--muted); font-size: 13px; margin: 0 0 30px; line-height: 1.7; }
.field { margin-bottom: 16px; }
.field label { display: block; color: #4d5c70; font-size: 12px; font-weight: 700; margin-bottom: 7px; }
.field input, .field select, .field textarea {
  width: 100%; border: 1px solid var(--line); background: #fff;
  border-radius: 9px; padding: 0 12px; height: 42px; color: var(--ink); outline: none;
}
.field textarea { height: auto; min-height: 82px; padding: 10px 12px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: #6c9be8; box-shadow: 0 0 0 3px rgba(33,104,214,.1);
}
.login-btn {
  width: 100%; height: 44px; border: none; border-radius: 9px; color: #fff;
  background: linear-gradient(135deg, #2675e7, #1554b4); font-weight: 700;
  box-shadow: 0 10px 22px rgba(33,104,214,.22);
}
.error { color: var(--red); min-height: 20px; font-size: 12px; margin: 7px 0; }
.login-note { margin-top: auto; color: var(--muted); font-size: 11px; line-height: 1.8; }

.ops-shell { min-height: 100vh; display: flex; }
.ops-rail {
  width: 226px; flex: 0 0 226px; background: linear-gradient(180deg, var(--rail), var(--rail-2));
  color: #fff; display: flex; flex-direction: column; min-height: 100vh; position: sticky; top: 0;
}
.ops-brand { height: 70px; display: flex; align-items: center; gap: 11px; padding: 0 18px; border-bottom: 1px solid rgba(255,255,255,.08); }
.ops-brand .brand-logo {
  width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center;
  background: linear-gradient(140deg, #2f8df5, #8159e8);
  color: #fff; font-size: 20px; font-weight: 800;
  box-shadow: 0 7px 20px rgba(46, 118, 229, .3);
}
.ops-brand b { display: block; font-size: 15px; }
.ops-brand span { color: #8da2ba; font-size: 9px; letter-spacing: 1.2px; }
.ops-nav { padding: 15px 10px; display: grid; gap: 5px; }
.ops-nav button {
  border: none; background: transparent; color: #9eb0c5; height: 44px;
  display: flex; align-items: center; gap: 11px; padding: 0 13px;
  border-radius: 10px; text-align: left; font-size: 13px;
}
.ops-nav button:hover { color: #fff; background: rgba(255,255,255,.055); }
.ops-nav button.active {
  color: #fff; background: linear-gradient(90deg, rgba(45,145,255,.25), rgba(45,145,255,.05));
  box-shadow: inset 0 0 0 1px rgba(80,165,255,.22);
}
.ops-nav .ic { width: 18px; text-align: center; color: #70aef7; }
.ops-rail-foot { margin-top: auto; padding: 16px; color: #7e94ac; font-size: 10.5px; line-height: 1.8; border-top: 1px solid rgba(255,255,255,.07); }
.live-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #38ddb0; box-shadow: 0 0 0 3px rgba(56,221,176,.13); }
.ops-main { min-width: 0; flex: 1; display: flex; flex-direction: column; }
.ops-topbar {
  min-height: 70px; background: rgba(255,255,255,.9); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 12px; padding: 0 24px; position: sticky; top: 0; z-index: 20;
}
.ops-topbar h1 { font-size: 18px; margin: 0; }
.ops-topbar .sub { color: var(--muted); font-size: 11px; margin-top: 3px; }
.ops-topbar .spacer { flex: 1; }
.user-chip { display: flex; align-items: center; gap: 9px; padding-left: 13px; border-left: 1px solid var(--line); }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: linear-gradient(135deg, #2e6fd5, #7a5add); color: #fff; display: grid; place-items: center; font-weight: 800; }
.user-chip b { display: block; font-size: 12px; }
.user-chip span { display: block; color: var(--muted); font-size: 10px; margin-top: 2px; }
.ops-content { padding: 22px 24px 36px; }
.btn {
  border: 1px solid var(--line); background: #fff; color: #40516a;
  min-height: 35px; padding: 0 13px; border-radius: 8px; font-size: 12px; font-weight: 650;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
}
.btn:hover { border-color: #b5c6dc; }
.btn.primary { border-color: var(--blue); background: var(--blue); color: #fff; }
.btn.primary:hover { background: var(--blue-2); }
.btn.danger { color: var(--red); }
.btn.sm { min-height: 29px; padding: 0 9px; font-size: 11px; }
.page-head { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 18px; }
.page-head > div:first-child { flex: 1; }
.page-head h2 { margin: 0 0 5px; font-size: 22px; }
.page-head p { margin: 0; color: var(--muted); font-size: 12px; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.kpi {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 17px 18px; box-shadow: var(--shadow); min-width: 0;
}
.kpi .label { color: var(--muted); font-size: 11px; }
.kpi .value { font-size: 29px; font-weight: 800; margin-top: 7px; letter-spacing: -.5px; }
.kpi .value small { font-size: 11px; color: var(--muted); margin-left: 4px; font-weight: 500; }
.kpi .foot { margin-top: 7px; color: var(--muted); font-size: 10.5px; }
.kpi.blue .value { color: var(--blue); }
.kpi.mint .value { color: var(--mint); }
.kpi.amber .value { color: var(--amber); }
.kpi.violet .value { color: var(--violet); }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.panel-head { min-height: 54px; padding: 0 17px; display: flex; align-items: center; gap: 10px; border-bottom: 1px solid var(--line); }
.panel-head h3 { margin: 0; font-size: 14px; }
.panel-head .sub { color: var(--muted); font-size: 10.5px; }
.panel-head .spacer { flex: 1; }
.panel-body { padding: 16px 17px; }
.grid-2 { display: grid; grid-template-columns: 1.6fr 1fr; gap: 14px; margin-top: 14px; }
.empty { padding: 44px 16px; text-align: center; color: var(--muted); font-size: 12px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 12px; }
th { text-align: left; padding: 10px 12px; color: #6a788d; background: #f7f9fc; font-size: 10.5px; white-space: nowrap; }
td { padding: 12px; border-top: 1px solid #edf1f6; vertical-align: middle; }
td .sub { color: var(--muted); font-size: 10px; margin-top: 3px; }
.badge { display: inline-flex; align-items: center; border-radius: 20px; padding: 4px 8px; font-size: 10px; font-weight: 700; white-space: nowrap; }
.badge.green { background: #e9f8f2; color: #087b55; }
.badge.blue { background: #eaf2ff; color: #1558b0; }
.badge.amber { background: #fff5df; color: #9a6309; }
.badge.red { background: #fdeeee; color: #a32e37; }
.badge.gray { background: #eef1f5; color: #617088; }
.credential-box { background: #f5f8fc; border: 1px solid #d7e2ef; border-radius: 10px; padding: 13px; word-break: break-all; }
.copy-line { display: flex; align-items: center; gap: 8px; margin-top: 9px; }
.copy-line code { flex: 1; padding: 8px 10px; background: #fff; border: 1px solid var(--line); border-radius: 7px; }
.notice { background: #eef5ff; border: 1px solid #d6e5fb; border-radius: 10px; padding: 12px 13px; color: #38577c; font-size: 11.5px; line-height: 1.75; }
.notice.warn { background: #fff8e8; border-color: #f1ddb2; color: #805e1b; }
.event-list { display: grid; gap: 1px; }
.event { padding: 10px 0; border-bottom: 1px solid #eef1f5; display: grid; grid-template-columns: 62px 1fr; gap: 9px; }
.event:last-child { border-bottom: none; }
.event .time { color: var(--muted); font-size: 10px; }
.event b { font-size: 11.5px; }
.event p { margin: 3px 0 0; color: var(--muted); font-size: 10.5px; line-height: 1.55; }
.toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.toolbar input, .toolbar select { height: 34px; border: 1px solid var(--line); border-radius: 8px; padding: 0 10px; background: #fff; }
.toolbar input { width: 220px; }
.modal-mask { position: fixed; inset: 0; z-index: 100; background: rgba(10,24,42,.46); backdrop-filter: blur(4px); display: grid; place-items: center; padding: 18px; }
.modal {
  width: 620px; max-width: 100%; max-height: 92vh; overflow: auto;
  background: #fff; border-radius: 18px; box-shadow: 0 35px 100px rgba(8,24,45,.3);
}
.modal-head { padding: 19px 21px 14px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 10px; }
.modal-head h3 { margin: 0; font-size: 17px; }
.modal-head .close { margin-left: auto; border: none; background: none; font-size: 24px; color: #8290a4; }
.modal-body { padding: 18px 21px; }
.modal-foot { padding: 14px 21px 20px; display: flex; justify-content: flex-end; gap: 8px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.form-grid .full { grid-column: 1 / -1; }
.toast { position: fixed; right: 20px; bottom: 20px; z-index: 200; background: #14263b; color: #fff; padding: 12px 16px; border-radius: 10px; box-shadow: 0 14px 40px rgba(0,0,0,.2); font-size: 12px; }
.loading { padding: 40px; text-align: center; color: var(--muted); font-size: 12px; }

@media (max-width: 1050px) {
  .kpis { grid-template-columns: 1fr 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .login-card { grid-template-columns: 1fr; }
  .login-visual { min-height: 260px; padding: 28px; }
  .login-visual h1 { margin-top: 34px; font-size: 24px; }
  .login-points, .visual-foot { display: none; }
  .login-form-panel { padding: 30px 24px; }
  .ops-rail { width: 58px; flex-basis: 58px; position: fixed; left: 0; top: 0; bottom: 0; z-index: 30; }
  .ops-brand { padding: 0; justify-content: center; }
  .ops-brand .brand-logo { width: 36px; height: 36px; font-size: 19px; }
  .ops-brand > div:last-child, .ops-nav button span:last-child, .ops-rail-foot { display: none; }
  .ops-nav button { justify-content: center; padding: 0; }
  .ops-main { margin-left: 58px; }
  .ops-topbar { padding: 0 10px; min-height: 58px; }
  .ops-topbar h1 { font-size: 15px; }
  .ops-topbar .sub, .ops-topbar .refresh, .user-chip > div { display: none; }
  .user-chip { border: 0; padding: 0; }
  .ops-content { padding: 13px 10px 24px; }
  .page-head { flex-wrap: wrap; }
  .page-head > div:first-child { flex-basis: 100%; }
  .page-head h2 { font-size: 19px; }
  .kpis { grid-template-columns: 1fr 1fr; gap: 9px; }
  .kpi { padding: 13px; }
  .kpi .value { font-size: 23px; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .full { grid-column: auto; }
  table { min-width: 820px; }
  .toolbar input { width: 100%; }
  .toast { left: 70px; right: 10px; bottom: 12px; }
}
