:root {
  --bg: #f3f6fb;
  --ink: #101828;
  --muted: #667085;
  --line: #e4e9f2;
  --nav: #0b1324;
  --cyan: #18c7b4;
  --blue: #4169e1;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 14px -apple-system, BlinkMacSystemFont, "PingFang SC", sans-serif; }
.loginGate { min-height: 100vh; display: grid; place-items: center; overflow: hidden; position: relative; padding: 28px; background: radial-gradient(circle at 20% 15%, #153b5c 0, transparent 36%), radial-gradient(circle at 80% 85%, #114c46 0, transparent 32%), #07111f; }
.loginGlow { position: absolute; width: 360px; height: 360px; border-radius: 50%; filter: blur(72px); opacity: .24; pointer-events: none; }
.loginGlowOne { background: #3c7cff; top: -120px; right: 8%; }
.loginGlowTwo { background: #11d7b4; bottom: -150px; left: 4%; }
.loginCard { position: relative; z-index: 1; width: min(520px, 100%); padding: 46px; border-radius: 28px; color: white; background: linear-gradient(145deg, #ffffff16, #ffffff08); border: 1px solid #ffffff26; box-shadow: 0 36px 100px #0008; backdrop-filter: blur(18px); }
.loginBrand { display: flex; justify-content: space-between; align-items: center; color: #9db0c9; font-size: 11px; letter-spacing: .2em; }
.loginBrand span { display: grid; place-items: center; width: 48px; height: 48px; color: white; font-size: 16px; font-weight: 800; letter-spacing: 0; border-radius: 15px; background: linear-gradient(135deg, var(--cyan), #5678ff); box-shadow: 0 12px 30px #18c7b455; }
.loginEyebrow { margin: 48px 0 12px; color: #5de3d2; font-size: 12px; font-weight: 700; letter-spacing: .12em; }
.loginCard h1 { color: white; font-size: clamp(34px, 6vw, 52px); line-height: 1.08; letter-spacing: -.04em; }
.loginCopy { max-width: 410px; margin: 20px 0 28px; color: #aebbd0; font-size: 16px; line-height: 1.8; }
.feishuLogin { display: flex; justify-content: center; align-items: center; gap: 10px; width: 100%; padding: 14px 18px; border-radius: 12px; color: #07111f; background: white; text-decoration: none; font-weight: 700; box-shadow: 0 14px 36px #0005; }
.feishuLogin:hover { transform: translateY(-1px); box-shadow: 0 18px 42px #0006; }
.feishuLogin i { display: grid; place-items: center; width: 25px; height: 25px; border-radius: 7px; color: white; background: linear-gradient(135deg, #3370ff, #16c2b8); font-style: normal; font-size: 12px; }
.loginSafety { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 24px; color: #7f91aa; font-size: 11px; }
.loginSafety span::before { content: "✓"; margin-right: 5px; color: #31d6b7; }
.shell { min-height: 100vh; display: grid; grid-template-columns: 230px 1fr; }
aside { background: var(--nav); color: white; padding: 28px 18px; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; }
.brand { display: flex; gap: 12px; align-items: center; font-weight: 700; font-size: 16px; }
.brand > span { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: linear-gradient(135deg, var(--cyan), #5a7cff); }
.brand small { display: block; color: #8794aa; font-size: 10px; letter-spacing: .15em; margin-top: 4px; }
nav { margin-top: 44px; display: grid; gap: 8px; }
nav button { border: 0; background: none; color: #8f9cb1; text-align: left; padding: 12px 15px; border-radius: 10px; font: inherit; cursor: pointer; }
nav button.active, nav button:hover { background: #17243b; color: white; }
.system { margin-top: auto; background: #121f34; border: 1px solid #263651; border-radius: 12px; padding: 14px; line-height: 1.8; color: #d7dfec; }
.system i { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #33d69f; margin-right: 8px; box-shadow: 0 0 10px #33d69f; }
.system small { color: #8794aa; }
.sessionUser { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: auto; margin-bottom: 10px; padding: 0 3px; color: #aab6c9; font-size: 12px; }
.sessionUser span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sessionUser button { border: 0; color: #7f8da4; background: transparent; cursor: pointer; padding: 4px; }
.sessionUser button:hover { color: white; }
main { padding: 40px; max-width: 1500px; width: 100%; margin: auto; }
header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 26px; }
header p { color: var(--muted); margin: 0 0 5px; }
h1 { font-size: 30px; margin: 0; }
button, .recharge { font: inherit; }
.primary { border: 0; background: var(--ink); color: white; padding: 11px 16px; border-radius: 10px; cursor: pointer; }
.metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin: 20px 0; }
.metrics article, .panel { background: white; border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 8px 28px rgba(16, 24, 40, .04); }
.metrics article { padding: 20px; }
.metrics span { color: var(--muted); }
.metrics b { display: block; font-size: 30px; margin: 13px 0; }
.metrics small { color: #8a94a6; }
.metrics .accent { background: linear-gradient(135deg, #121d33, #223b64); color: white; }
.metrics .accent span, .metrics .accent small { color: #b8c7de; }
.panel { padding: 22px; margin-top: 16px; scroll-margin-top: 18px; }
.panelHead { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.panelHead h2 { margin: 0 0 5px; font-size: 18px; }
.panelHead p { margin: 0; color: var(--muted); }
.live { color: #12a980; background: #eafbf5; padding: 5px 9px; border-radius: 20px; }
.tableHead, .tableRow { display: grid; grid-template-columns: 1.65fr .58fr .75fr 1.05fr 1.2fr; align-items: center; gap: 14px; }
.tableHead { padding: 10px 12px; color: #8993a4; font-size: 12px; background: #f8fafc; border-radius: 9px; }
.tableRow { padding: 16px 12px; border-bottom: 1px solid #edf0f5; }
.tableRow:last-child { border: 0; }
.tableRow b, .tableRow a, .tableRow small { display: block; }
.tableRow a { font-size: 12px; color: var(--blue); text-decoration: none; margin: 5px 0; }
.tableRow small, .summary { color: var(--muted); font-size: 12px; }
.sourceTable { display: block; width: fit-content; color: #475467; background: #f2f4f7; border-radius: 5px; padding: 2px 6px; margin-top: 5px; font-size: 11px; }
.scheduleInput { padding: 7px 8px; min-width: 96px; background: #f8fafc; }
.switch { display: flex; align-items: center; gap: 8px; }
.switch input { display: none; }
.switch i { width: 34px; height: 19px; background: #ccd3df; border-radius: 20px; position: relative; }
.switch i::after { content: ""; position: absolute; width: 15px; height: 15px; background: white; border-radius: 50%; top: 2px; left: 2px; transition: .2s; }
.switch input:checked + i { background: var(--cyan); }
.switch input:checked + i::after { left: 17px; }
.switch em { font-style: normal; font-size: 12px; }
.rowActions { display: flex; gap: 6px; flex-wrap: wrap; }
.run, .issue button, .secondary, .delete { border: 1px solid var(--line); background: white; padding: 8px 10px; border-radius: 8px; cursor: pointer; }
.delete { color: #d92d20; border-color: #fecdca; }
.split { display: grid; grid-template-columns: 1.6fr .8fr; gap: 16px; }
.issue { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--line); padding: 12px 0; }
.issue span { color: #dc6803; margin-left: 10px; }
.issue p { margin: 6px 0; color: var(--muted); }
.reviewComposer { display: grid; grid-template-columns: 180px 1fr auto; gap: 10px; align-items: start; padding: 14px; background: #f8fafc; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 12px; }
.reviewComposer select, .reviewComposer textarea { border: 1px solid #d8deea; border-radius: 9px; padding: 10px; background: white; font: inherit; resize: vertical; }
.reviewComposer small { grid-column: 2 / -1; color: var(--muted); }
.quota { text-align: center; }
.quota .panelHead { text-align: left; }
.ring { width: 118px; height: 118px; border-radius: 50%; background: conic-gradient(var(--cyan) 0 0%, #edf1f6 0%); display: grid; place-items: center; margin: 10px auto; position: relative; }
.ring::after { content: ""; position: absolute; inset: 12px; border-radius: 50%; background: white; }
.ring strong { z-index: 1; font-size: 19px; }
.recharge { display: block; color: var(--blue); text-decoration: none; margin-top: 12px; }
.historyBadge { color: #475467; background: #f2f4f7; padding: 5px 9px; border-radius: 20px; font-size: 12px; }
.historyHead, .historyRow { display: grid; grid-template-columns: 1.15fr 1.5fr repeat(5, .45fr); gap: 12px; align-items: center; }
.historyHead { padding: 10px 12px; background: #f8fafc; color: #8993a4; font-size: 12px; border-radius: 9px; }
.historyRow { padding: 13px 12px; border-bottom: 1px solid #edf0f5; }
.historyRow span { color: var(--muted); }
.historyRow .updated { color: #067647; font-weight: 700; }
.historyRow .failed { color: #b42318; font-weight: 700; }
.alert { background: #fff3e8; color: #b54708; border: 1px solid #fedfbc; padding: 12px 16px; border-radius: 10px; }
.hidden { display: none; }
.empty { padding: 28px; text-align: center; color: var(--muted); }
.good { color: #168d72; }
.danger { color: #c4320a; }
dialog { border: 0; border-radius: 18px; padding: 0; width: min(560px, 90vw); box-shadow: 0 26px 80px #0b132455; }
dialog::backdrop { background: #0b132499; }
dialog form { padding: 26px; }
.dialogHead { display: flex; justify-content: space-between; align-items: start; }
.dialogHead h2 { margin: 0; }
.dialogHead p { color: var(--muted); }
.close { border: 0; background: none; font-size: 26px; cursor: pointer; }
label { display: grid; gap: 7px; margin: 15px 0; font-weight: 600; }
input { border: 1px solid #d8deea; border-radius: 9px; padding: 11px; font: inherit; }
select { border: 1px solid #d8deea; border-radius: 9px; padding: 11px; font: inherit; background: white; }
.formHint { display: block; color: var(--muted); margin-top: -5px; }
.formGrid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.full { width: 100%; margin-top: 8px; }
.error { color: #d92d20; }
#toast { position: fixed; right: 28px; bottom: 28px; background: #101828; color: white; padding: 12px 18px; border-radius: 10px; opacity: 0; transform: translateY(10px); transition: .2s; }
#toast.show { opacity: 1; transform: none; }

@media (max-width: 900px) {
  .loginCard { padding: 34px 26px; }
  .shell { grid-template-columns: 1fr; }
  aside { display: none; }
  main { padding: 22px; }
  .metrics { grid-template-columns: 1fr 1fr; }
  .split { grid-template-columns: 1fr; }
  .tableHead, .historyHead { display: none; }
  .tableRow, .historyRow { grid-template-columns: 1fr; gap: 9px; }
  .formGrid { grid-template-columns: 1fr; }
  .reviewComposer { grid-template-columns: 1fr; }
  .reviewComposer small { grid-column: auto; }
}
