* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: "Microsoft YaHei UI", "Microsoft YaHei", "Segoe UI", system-ui, -apple-system, sans-serif;
  color: #25303B;
  background: #F4F5F7;
  -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: inherit; }
button { font-family: inherit; }
.hidden { display: none !important; }

:root {
  --amber: #CE8D33;
  --amber-dark: #B4791F;
  --amber-soft: #FBF3E4;
  --line: #E7EAEE;
  --muted: #74808E;
  --danger: #C2492E;
  --ok: #2E8B57;
}

/* ---------- 登录 ---------- */
.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(1100px 520px at 12% -8%, #FDF1DC 0%, rgba(253,241,220,0) 60%),
    radial-gradient(900px 500px at 105% 108%, #EAF1F8 0%, rgba(234,241,248,0) 55%),
    #F4F5F7;
  padding: 40px 20px;
}
.login-card {
  width: 420px;
  background: #fff;
  border: 1px solid #EDEFF2;
  border-radius: 20px;
  padding: 34px 34px 26px;
  box-shadow: 0 24px 60px rgba(38, 48, 62, .12), 0 2px 6px rgba(38, 48, 62, .04);
}
.brand { display: flex; align-items: center; gap: 14px; }
.brand-mark {
  width: 52px; height: 52px; border-radius: 14px;
  background: linear-gradient(145deg, #E2A94D, #C9842A);
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 20px; letter-spacing: .5px;
  box-shadow: 0 8px 20px rgba(206, 141, 51, .35);
}
.brand-mark.small { width: 38px; height: 38px; border-radius: 11px; font-size: 15px; }
.brand-name { font-size: 21px; font-weight: 700; letter-spacing: .5px; }
.brand-name.sm { font-size: 16px; }
.brand-sub { font-size: 11px; color: #9AA5B2; letter-spacing: 2px; margin-top: 3px; }
.login-tip { color: var(--muted); font-size: 13px; margin: 22px 0 18px; }
.field { display: block; margin-bottom: 14px; }
.field span { display: block; font-size: 12.5px; color: #5C6875; margin-bottom: 7px; }
.field input {
  width: 100%; height: 44px; border: 1px solid #DFE4EA; border-radius: 11px;
  padding: 0 14px; font-size: 14px; outline: none; background: #FCFCFD;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.field input:focus { border-color: #E0B166; background: #fff; box-shadow: 0 0 0 3px rgba(206,141,51,.14); }
.login-msg { min-height: 18px; font-size: 12.5px; color: var(--danger); margin: -2px 0 10px; }

.btn {
  height: 36px; padding: 0 15px; border-radius: 10px; border: 1px solid transparent;
  font-size: 13.5px; cursor: pointer; transition: all .15s; background: #fff;
}
.btn.primary { background: linear-gradient(180deg, #D89A3F, #C4832A); color: #fff; box-shadow: 0 6px 16px rgba(206,141,51,.28); }
.btn.primary:hover { filter: brightness(1.04); }
.btn.block { width: 100%; height: 44px; font-size: 15px; margin-top: 4px; }
.btn.ghost { border-color: #E3E7EC; color: #4A5663; }
.btn.ghost:hover { border-color: #E0B166; color: #A6731F; background: var(--amber-soft); }
.btn.link { color: #8B96A3; height: 30px; padding: 0 6px; }
.btn.link:hover { color: var(--amber-dark); }
.btn.danger { color: var(--danger); border-color: #F0D5CF; }
.btn.danger:hover { background: #FDF0ED; }
.btn.sm { height: 29px; padding: 0 10px; font-size: 12.5px; border-radius: 8px; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.login-foot { margin-top: 18px; text-align: center; font-size: 11.5px; color: #A3ADB9; letter-spacing: .5px; }

/* ---------- 布局 ---------- */
.app { display: flex; min-height: 100vh; }
.side {
  width: 224px; flex: 0 0 224px; background: #FFFDFA; border-right: 1px solid #EEEFF2;
  padding: 22px 16px 16px; display: flex; flex-direction: column;
}
.side-brand { display: flex; align-items: center; gap: 11px; padding: 0 6px 22px; }
.nav { display: flex; flex-direction: column; gap: 4px; }
.nav-item {
  display: flex; align-items: center; gap: 11px; height: 42px; padding: 0 12px;
  border-radius: 11px; color: #58636F; font-size: 13.5px; cursor: pointer;
  border: 1px solid transparent; transition: all .15s;
}
.nav-item i { font-style: normal; width: 16px; text-align: center; color: #A9B3BF; font-size: 12px; }
.nav-item:hover { background: #FBF7EF; color: #3A4653; }
.nav-item.active { background: #FBF3E4; border-color: #F1DFC2; color: #A6731F; font-weight: 600; }
.nav-item.active i { color: var(--amber); }
.side-foot { margin-top: auto; padding: 14px 12px 4px; border-top: 1px solid #F1F2F5; }
.side-note { font-size: 11px; color: #A8B1BC; letter-spacing: 1px; }
.side-env { font-size: 12.5px; color: #6B7684; margin-top: 4px; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  height: 78px; padding: 0 26px; display: flex; align-items: center; justify-content: space-between;
  background: #fff; border-bottom: 1px solid #EEEFF2;
}
.topbar h1 { font-size: 19px; margin: 0; font-weight: 700; letter-spacing: .3px; }
.topbar .sub { font-size: 12.5px; color: #98A3B0; margin-top: 4px; }
.top-right { display: flex; align-items: center; gap: 10px; }
.user-chip { display: flex; align-items: center; gap: 9px; padding: 5px 12px 5px 6px; border: 1px solid #EEEFF2; border-radius: 11px; background: #FCFCFD; }
.avatar { width: 30px; height: 30px; border-radius: 9px; background: linear-gradient(145deg,#E2A94D,#C9842A); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 12.5px; }
.uname { font-size: 13px; font-weight: 600; }
.urole { font-size: 11px; color: #9BA5B1; margin-top: 1px; }

.views { flex: 1; padding: 22px 26px 30px; overflow: auto; }
.view { max-width: 1240px; margin: 0 auto; }

/* ---------- 卡片 / 表格 ---------- */
.card {
  background: #fff; border: 1px solid #EBEDF1; border-radius: 16px;
  box-shadow: 0 1px 2px rgba(30, 40, 55, .03);
}
.card-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; border-bottom: 1px solid #F1F2F5; }
.card-title { font-size: 14.5px; font-weight: 700; }
.card-title .dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--amber); margin-right: 8px; vertical-align: 2px; }
.card-body { padding: 16px 18px; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(162px, 1fr)); gap: 14px; margin-bottom: 16px; }
.stat {
  background: #fff; border: 1px solid #EBEDF1; border-radius: 15px; padding: 16px 17px;
  position: relative; overflow: hidden;
}
.stat::after { content: ""; position: absolute; right: -26px; top: -34px; width: 96px; height: 96px; border-radius: 50%; background: #FDF6EA; }
.stat .label { font-size: 12.5px; color: #8B96A3; }
.stat .value { font-size: 27px; font-weight: 700; margin-top: 7px; letter-spacing: .5px; position: relative; z-index: 1; }
.stat .unit { font-size: 12px; color: #9BA5B1; margin-left: 4px; font-weight: 400; }
.stat .hint { font-size: 11.5px; color: #A7B0BC; margin-top: 6px; }

.row2 { display: grid; grid-template-columns: 1.35fr 1fr; gap: 16px; }

table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 12px; color: #8B96A3; font-weight: 600; padding: 10px 12px; border-bottom: 1px solid #F1F2F5; white-space: nowrap; }
td { font-size: 13px; padding: 12px; border-bottom: 1px solid #F5F6F8; vertical-align: middle; }
tr:hover td { background: #FDFCFA; }
.tbl-wrap { overflow-x: auto; }
.empty { padding: 36px 0; text-align: center; color: #A6B0BC; font-size: 13px; }

.pill { display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: 999px; font-size: 11.5px; border: 1px solid transparent; }
.pill.ok { background: #EFF8F2; color: #2C8055; border-color: #D9EEE1; }
.pill.gray { background: #F4F6F8; color: #7C8794; border-color: #E8EBEF; }
.pill.warn { background: #FDF4E6; color: #B4791F; border-color: #F3E2C4; }
.pill.bad { background: #FDF0ED; color: var(--danger); border-color: #F2D8D2; }

.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.search { height: 36px; width: 240px; border: 1px solid #E3E7EC; border-radius: 10px; padding: 0 12px; font-size: 13px; outline: none; background: #fff; }
.search:focus { border-color: #E0B166; box-shadow: 0 0 0 3px rgba(206,141,51,.12); }
.spacer { flex: 1; }
.muted { color: #97A2AF; font-size: 12.5px; }
.mono { font-family: Consolas, "Courier New", monospace; letter-spacing: .4px; }

.pager { display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding: 12px 4px 0; }
.pager .pg { min-width: 30px; height: 30px; border-radius: 8px; border: 1px solid #E5E8EC; background: #fff; font-size: 12.5px; cursor: pointer; }
.pager .pg.active { background: var(--amber-soft); border-color: #EFD9B9; color: #A6731F; font-weight: 600; }

/* ---------- 表单 / 弹窗 ---------- */
.modal-mask {
  position: fixed; inset: 0; background: rgba(25, 34, 46, .38); backdrop-filter: blur(2px);
  display: flex; align-items: center; justify-content: center; z-index: 40; padding: 20px;
  animation: fadein .16s ease-out;
}
@keyframes fadein { from { opacity: 0 } to { opacity: 1 } }
.modal {
  width: 480px; max-width: 96vw; max-height: 88vh; overflow: auto; background: #fff;
  border-radius: 18px; box-shadow: 0 30px 80px rgba(20,28,40,.22);
  animation: pop .18s cubic-bezier(.2,.9,.3,1.2);
}
@keyframes pop { from { transform: translateY(8px) scale(.98); opacity: 0 } to { transform: none; opacity: 1 } }
.modal-head { padding: 20px 22px 6px; }
.modal-head h3 { margin: 0; font-size: 16.5px; }
.modal-head p { margin: 6px 0 0; font-size: 12.5px; color: #97A2AF; }
.modal-body { padding: 12px 22px 4px; }
.modal-foot { padding: 12px 22px 20px; display: flex; justify-content: flex-end; gap: 10px; }
.form-row { margin-bottom: 13px; }
.form-row label { display: block; font-size: 12.5px; color: #5C6875; margin-bottom: 6px; }
.form-row input, .form-row textarea, .form-row select {
  width: 100%; border: 1px solid #DFE4EA; border-radius: 10px; background: #FCFCFD;
  padding: 9px 12px; font-size: 13.5px; outline: none; font-family: inherit;
}
.form-row input, .form-row select { height: 40px; }
.form-row textarea { min-height: 110px; resize: vertical; line-height: 1.6; }
.form-row input:focus, .form-row textarea:focus, .form-row select:focus { border-color: #E0B166; background: #fff; box-shadow: 0 0 0 3px rgba(206,141,51,.12); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.inline { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: #5C6875; }
.hintline { font-size: 12px; color: #98A3B0; margin-top: 4px; }
.errline { color: var(--danger); font-size: 12.5px; min-height: 16px; margin: 2px 0 8px; }

/* ---------- 提示 ---------- */
.toasts { position: fixed; right: 22px; bottom: 22px; display: flex; flex-direction: column; gap: 10px; z-index: 60; }
.toast {
  min-width: 220px; max-width: 380px; background: #fff; border: 1px solid #E8EBEF; border-left: 3px solid var(--amber);
  border-radius: 11px; padding: 12px 15px; font-size: 13px; color: #3A4653;
  box-shadow: 0 14px 34px rgba(25,34,46,.12); animation: slidein .2s ease-out;
}
.toast.err { border-left-color: var(--danger); }
@keyframes slidein { from { transform: translateY(8px); opacity: 0 } to { transform: none; opacity: 1 } }

/* ---------- 公告列表 ---------- */
.ann-list { display: flex; flex-direction: column; gap: 12px; }
.ann {
  border: 1px solid #EBEDF1; border-radius: 14px; padding: 15px 17px; background: #fff;
}
.ann.important { border-left: 3px solid var(--danger); }
.ann.warn { border-left: 3px solid #D89A3F; }
.ann-head { display: flex; align-items: center; gap: 9px; }
.ann-title { font-size: 14px; font-weight: 600; }
.ann-time { font-size: 11.5px; color: #A6B0BC; }
.ann-body { font-size: 12.8px; color: #5F6B78; line-height: 1.75; margin-top: 8px; white-space: pre-wrap; }
.ann-actions { display: flex; gap: 8px; margin-top: 10px; }

.plan-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.plan {
  border: 1px solid #EBEDF1; border-radius: 15px; padding: 18px; background: #fff; position: relative;
}
.plan .pname { font-size: 15px; font-weight: 700; }
.plan .pdays { font-size: 12.5px; color: #8B96A3; margin-top: 4px; }
.plan .price { font-size: 24px; font-weight: 700; color: #B4791F; margin-top: 12px; }
.plan .price small { font-size: 12px; color: #A6B0BC; font-weight: 400; margin-left: 3px; }
.plan .pdesc { font-size: 12.2px; color: #7C8794; margin-top: 8px; line-height: 1.6; min-height: 38px; }
.plan .pactions { display: flex; gap: 8px; margin-top: 12px; }
.plan.off { opacity: .62; }

.code-box { background: #FBF9F4; border: 1px dashed #E8D6B6; border-radius: 12px; padding: 12px 14px; font-family: Consolas, monospace; font-size: 13px; line-height: 1.9; max-height: 200px; overflow: auto; color: #6B5528; }

/* ---------- 支付设置 ---------- */
.pay-head {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  background: #fff; border: 1px solid #EBEDF1; border-radius: 16px; padding: 18px 20px;
  margin-bottom: 16px; position: relative; overflow: hidden;
}
.pay-head::after { content: ""; position: absolute; right: -30px; top: -56px; width: 150px; height: 150px; border-radius: 50%; background: #FDF6EA; }
.pay-state { display: flex; align-items: center; gap: 14px; position: relative; z-index: 1; }
.pay-dot { width: 10px; height: 10px; border-radius: 50%; background: #D5DAE1; box-shadow: 0 0 0 4px #F1F3F6; }
.pay-dot.on { background: #2E8B57; box-shadow: 0 0 0 4px #E7F4EC; }
.pay-title { font-size: 16px; font-weight: 700; }
.pay-sub { font-size: 12.3px; color: #8B96A3; margin-top: 4px; }
.pay-actions { display: flex; gap: 10px; position: relative; z-index: 1; }
.card-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-top: 1px solid #F1F2F5; }
.form-row textarea.key-area { min-height: 96px; font-family: Consolas, "Courier New", monospace; font-size: 12px; letter-spacing: .2px; }
.checks { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.check-head { font-size: 13px; font-weight: 600; color: #4A5663; }
.check-item { display: flex; align-items: center; gap: 8px; font-size: 12.5px; border: 1px solid #EEF0F3; border-radius: 10px; padding: 9px 12px; background: #FCFCFD; }
.check-item.ok { border-color: #DFEFE5; background: #F7FBF8; }
.check-item.bad { border-color: #F5DED8; background: #FEF8F6; }
.check-item .ck { width: 18px; height: 18px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 11px; color: #fff; background: #B9C2CC; }
.check-item.ok .ck { background: #2E8B57; }
.check-item.bad .ck { background: #C2492E; }
.order-tag { font-family: Consolas, monospace; font-size: 11.5px; color: #8B96A3; }

@media (max-width: 1100px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .row2 { grid-template-columns: 1fr; }
  .plan-grid { grid-template-columns: 1fr; }
  .side { width: 190px; flex-basis: 190px; }
}
@media (max-width: 760px) {
  .side { display: none; }
  .topbar { height: auto; padding: 14px 16px; flex-wrap: wrap; gap: 10px; }
  .views { padding: 14px; }
}

.quota-line{display:flex;gap:12px;align-items:flex-end;flex-wrap:wrap;padding:14px 18px 16px}.quota-line .muted{max-width:520px;line-height:1.6}

/* ---------- 运营模式切换 ---------- */
.mode-card { margin-bottom: 16px; position: relative; overflow: hidden; }
.mode-card::after {
  content: ""; position: absolute; right: -46px; top: -70px; width: 170px; height: 170px;
  border-radius: 50%; background: radial-gradient(circle, #FBF3E4, rgba(251,243,228,0));
  pointer-events: none;
}
.mode-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 16px 18px 8px; position: relative; z-index: 1; }
.mode-option {
  text-align: left; border: 1px solid #E7EAEE; background: #FCFCFD; border-radius: 14px;
  padding: 16px 17px 14px; cursor: pointer; transition: border-color .18s, box-shadow .18s, transform .18s, background .18s;
  display: flex; flex-direction: column; gap: 6px; position: relative;
}
.mode-option:hover { transform: translateY(-1px); border-color: #DDE2E9; box-shadow: 0 8px 20px rgba(30,40,55,.07); }
.mode-option.active.free { border-color: #B9DFC8; background: linear-gradient(180deg, #F3FBF6, #FFF); box-shadow: 0 8px 22px rgba(46,139,87,.12); }
.mode-option.active.paid { border-color: #EFD8B3; background: linear-gradient(180deg, #FDF8EE, #FFF); box-shadow: 0 8px 22px rgba(206,141,51,.13); }
.mode-name { font-size: 15.5px; font-weight: 700; color: #27313D; }
.mode-option.active.free .mode-name { color: #24744A; }
.mode-option.active.paid .mode-name { color: #A6731F; }
.mode-desc { font-size: 12.3px; color: #74808E; line-height: 1.72; }
.mode-badge {
  align-self: flex-start; margin-top: 4px; font-size: 11px; padding: 2px 8px; border-radius: 999px;
  background: #F1F3F6; color: #8B96A3; border: 1px solid #E7EAEE;
}
.mode-option.active.free .mode-badge { background: #E8F6EE; color: #2C8055; border-color: #D3EEDD; }
.mode-option.active.paid .mode-badge { background: #FBF3E4; color: #B4791F; border-color: #F1DFC2; }
.mode-foot { padding: 8px 18px 16px; font-size: 12.5px; color: #5F6B78; display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; position: relative; z-index: 1; }
.mode-free-text { color: #2E8B57; }
.mode-paid-text { color: #B4791F; }
@media (max-width: 760px) { .mode-switch { grid-template-columns: 1fr; } }

