:root {
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: #202943;
  background: #f5f7fc;
  font-synthesis: none;
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; }
button, input { font: inherit; }
.site-header {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  color: #fff;
  background: linear-gradient(115deg, #101b45 0%, #17255c 54%, #33276d 100%);
  box-shadow: 0 9px 28px rgba(19, 33, 82, .14);
}
.site-header::after {
  content: "";
  position: absolute;
  inset: -150px -7% auto auto;
  width: 540px;
  height: 350px;
  transform: rotate(-20deg);
  border-radius: 100px;
  background: radial-gradient(ellipse, rgba(147, 124, 255, .25), transparent 70%);
  z-index: -1;
}
.header-inner { max-width: 1120px; margin: auto; padding: 25px 24px; display: flex; align-items: center; gap: 14px; }
.brand-mark { flex: 0 0 40px; height: 40px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.28); border-radius: 12px; background: rgba(255,255,255,.13); color: #fff; font-size: 21px; font-weight: 800; letter-spacing: -.08em; box-shadow: inset 0 1px rgba(255,255,255,.16); }
.brand-text strong { display: block; font-size: 17px; letter-spacing: .03em; line-height: 1.35; }
.brand-text span { display: block; margin-top: 3px; font-size: 12px; color: #b9c4ec; letter-spacing: .02em; }
main { max-width: 1120px; margin: 0 auto; padding: 42px 24px 60px; }
.intro { max-width: 800px; margin-bottom: 29px; }
.eyebrow { color: #5d65a8; font-size: 11px; font-weight: 800; letter-spacing: .17em; display: flex; align-items: center; gap: 9px; }
.eyebrow-dot { width: 4px; height: 4px; border-radius: 50%; background: #9286d5; }
h1 { margin: 13px 0 10px; color: #1a2444; font-size: clamp(29px, 3.5vw, 38px); font-weight: 760; letter-spacing: -.035em; line-height: 1.18; }
h2 { margin: 0; color: #222b48; font-size: 17px; font-weight: 700; letter-spacing: -.01em; }
p { color: #64718b; line-height: 1.75; margin: 0; font-size: 14px; }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.card { background: #fff; border: 1px solid #e7eaf3; border-radius: 18px; padding: 28px; box-shadow: 0 12px 35px rgba(30, 47, 94, .055), 0 2px 6px rgba(30, 47, 94, .018); margin-bottom: 20px; }
.grid .card { min-height: 298px; }
.card-heading { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.step-badge { width: 34px; height: 34px; flex: 0 0 34px; display: grid; place-items: center; border-radius: 10px; background: #eeefff; color: #5148ba; font-size: 12px; font-weight: 800; letter-spacing: .01em; }
.admin-badge { color: #697389; background: #f0f3f8; font-size: 18px; }
label { display: block; color: #44516c; font-size: 12px; font-weight: 700; margin: 17px 0 7px; }
input { width: 100%; min-height: 44px; border: 1px solid #d9dfed; border-radius: 10px; background: #fff; color: #202943; padding: 10px 13px; transition: border-color .15s, box-shadow .15s; }
input::placeholder { color: #a2aac0; }
input[type="file"] { padding: 8px 10px; color: #64718b; background: #fbfcff; font-size: 12px; }
input[type="file"]::file-selector-button { margin-right: 12px; padding: 7px 11px; border: 0; border-radius: 7px; background: #eef0fd; color: #5148ba; font-weight: 700; cursor: pointer; }
input:focus { outline: none; border-color: #7874db; box-shadow: 0 0 0 4px rgba(111, 103, 218, .13); }
button { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; border: 1px solid transparent; border-radius: 10px; background: #5b53c7; color: #fff; padding: 10px 16px; margin: 18px 8px 0 0; font-size: 13px; font-weight: 700; line-height: 1.25; cursor: pointer; box-shadow: 0 4px 11px rgba(83, 76, 183, .18); transition: background .15s, transform .15s, box-shadow .15s; }
button:hover { background: #4d45b1; transform: translateY(-1px); box-shadow: 0 6px 14px rgba(83, 76, 183, .23); }
button:focus-visible { outline: 3px solid #ada9f1; outline-offset: 2px; }
button.secondary { background: #f0f1fb; color: #4d4e9c; box-shadow: none; }
button.secondary:hover { background: #e6e8fa; box-shadow: none; }
button.danger { min-height: 32px; margin: 0; padding: 6px 11px; background: #fff0f1; color: #b23e52; box-shadow: none; }
button.danger:hover { background: #ffe3e7; box-shadow: none; }
button:disabled { opacity: .5; cursor: default; transform: none; }
.muted { margin: 20px 0 4px; color: #79869d; font-size: 12px; }
.notice { display: none; white-space: pre-wrap; word-break: break-word; margin-top: 18px; padding: 12px 14px; border: 1px solid #d9defb; border-radius: 10px; background: #f3f4ff; color: #3f4792; font-size: 12px; line-height: 1.6; }
.notice.visible { display: block; }
.notice.error { border-color: #f7ced6; background: #fff3f5; color: #a43449; }
.secret { display: block; overflow-wrap: anywhere; padding: 15px; background: #192344; color: #e3e8ff; border-radius: 10px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; line-height: 1.6; margin: 10px 0; }
.section-heading { margin: 28px 0 16px; padding-top: 24px; border-top: 1px solid #edf0f6; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-top: 18px; }
.stat { min-height: 87px; padding: 16px; background: #f7f8fd; border: 1px solid #edf0f8; border-radius: 12px; }
.stat b { display: block; color: #29355a; font-size: 21px; font-weight: 760; margin-top: 5px; overflow-wrap: anywhere; }
.stat small { color: #75819a; font-size: 11px; font-weight: 600; }
.scroll { width: 100%; overflow-x: auto; border: 1px solid #edf0f6; border-radius: 10px; }
table { width: 100%; border-collapse: collapse; font-size: 12px; }
th, td { text-align: left; border-bottom: 1px solid #edf0f6; padding: 12px 14px; white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fafbff; }
th { color: #6d7991; background: #f8f9fd; font-weight: 700; }
.hidden { display: none !important; }
.panel-heading, .subsection-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.panel-heading h2 { margin-top: 5px; font-size: 21px; }
.panel-kicker { color: #736bc5; font-size: 10px; font-weight: 800; letter-spacing: .18em; }
.capacity-pill { border: 1px solid #dfdefa; border-radius: 999px; background: #f5f4ff; color: #5149a8; padding: 8px 12px; font-size: 12px; font-weight: 750; white-space: nowrap; }
.action-row { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 5px; }
.action-row button { margin-right: 0; }
.subsection-heading { margin: 27px 0 13px; }
.subsection-heading .muted { margin: 0; }
.subsection-heading.section-heading { margin: 27px 0 16px; }
.subsection-heading p { margin-top: 5px; font-size: 12px; }
.accounts-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(245px, 1fr)); gap: 12px; }
.empty-state { grid-column: 1 / -1; padding: 20px; border: 1px dashed #d9deef; border-radius: 12px; background: #fbfcff; color: #7d89a0; font-size: 12px; line-height: 1.6; }
.account-tile { padding: 17px; border: 1px solid #e8ebf5; border-radius: 13px; background: linear-gradient(180deg, #fff, #fcfcff); }
.account-tile-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.account-tile strong { display: block; color: #25304e; font-size: 13px; }
.account-tile .account-label { color: #929bb0; font-size: 11px; font-weight: 700; margin-bottom: 4px; }
.status-pill { display: inline-flex; align-items: center; border-radius: 99px; padding: 5px 8px; background: #edf8f1; color: #238658; font-size: 10px; font-weight: 750; white-space: nowrap; }
.status-pill.warn { background: #fff4e4; color: #a36b1d; }
.status-pill.off { background: #f0f2f6; color: #748198; }
.account-kpis { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 11px; padding: 15px 0 12px; }
.account-kpis span { display: block; color: #8893a8; font-size: 10px; }
.account-kpis b { display: block; margin-top: 3px; color: #394461; font-size: 14px; overflow-wrap: anywhere; }
.account-quota { min-height: 17px; color: #7b87a0; font-size: 11px; line-height: 1.5; }
.account-actions { display: flex; align-items: center; gap: 6px; padding-top: 12px; margin-top: 10px; border-top: 1px solid #edf0f6; }
.account-actions button { min-height: 31px; padding: 6px 10px; margin: 0; font-size: 11px; box-shadow: none; }
.account-actions button:hover { box-shadow: none; }
.upload-bar { display: grid; grid-template-columns: minmax(180px, .8fr) minmax(200px, 1.4fr) auto; align-items: center; gap: 14px; margin-top: 17px; padding: 16px; border: 1px dashed #cdd1f0; border-radius: 12px; background: #fafaff; }
.upload-copy strong, .upload-copy span { display: block; }
.upload-copy strong { font-size: 12px; color: #394461; }
.upload-copy span { color: #8a94a9; font-size: 11px; margin-top: 4px; line-height: 1.4; }
.upload-bar button { margin: 0; white-space: nowrap; }
.preset-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 17px; }
.preset-row span { color: #7e89a0; font-size: 11px; font-weight: 700; margin-right: 4px; }
.preset-row button { min-height: 30px; margin: 0; padding: 6px 11px; border: 1px solid #e4e7f4; background: #fff; color: #68728e; box-shadow: none; font-size: 11px; }
.preset-row button:hover, .preset-row button.active { background: #eeedff; border-color: #c9c6f0; color: #554db5; box-shadow: none; transform: none; }
.form-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 0 15px; }
.form-grid label { margin-top: 4px; }
.form-submit { align-self: end; }
.form-submit button { width: 100%; margin: 0; }
.admin-stats { margin: 23px 0 0; }
.admin-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 17px; padding-top: 18px; border-top: 1px solid #edf0f6; }
.admin-toolbar span { color: #66718a; font-size: 12px; font-weight: 700; }
.admin-toolbar button { margin: 0; }
.subsection-heading input[type="search"] { max-width: 255px; min-height: 38px; font-size: 12px; }
#admin-account-search { max-width: 350px; }
.result-count { margin: -6px 0 10px; color: #79869d; font-size: 11px; }
.table-empty { color: #8a94a9; text-align: center; padding: 22px 14px; }
.admin-table { max-height: 480px; overflow: auto; }
.admin-table th { position: sticky; top: 0; z-index: 1; }
footer { max-width: 1120px; margin: auto; padding: 0 24px 33px; color: #99a3b4; font-size: 11px; text-align: center; }
@media (max-width: 700px) {
  .header-inner { padding: 18px 18px; }
  main { padding: 30px 16px 42px; }
  .grid { grid-template-columns: 1fr; gap: 0; }
  .card { padding: 22px 20px; border-radius: 15px; }
  .grid .card { min-height: 0; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .panel-heading, .subsection-heading { align-items: flex-start; }
  .subsection-heading { flex-direction: column; gap: 7px; }
  .upload-bar { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .form-submit { align-self: end; }
  .subsection-heading input[type="search"], #admin-account-search { max-width: none; }
  footer { padding: 0 16px 25px; }
}
@media (max-width: 440px) {
  .form-grid { grid-template-columns: 1fr; }
  .capacity-pill { font-size: 10px; padding: 7px 9px; }
}
@media (prefers-reduced-motion: reduce) {
  button, input { transition: none; }
}
