/* ============================================================
   NORDE 官网管理后台 · 样式
   沿用官网品牌色（藏青 + 橙），中文界面
   ============================================================ */

:root {
  --navy-950: #0A1623;
  --navy-900: #0B1724;
  --navy-800: #14293D;
  --navy-700: #1D3A54;
  --orange: #FF5A1F;
  --orange-dark: #E64A12;
  --orange-soft: #FFF2EA;
  --bg: #F4F5F7;
  --ink: #16222E;
  --ink-mid: #4E5D6B;
  --ink-soft: #7C8B99;
  --line: #E5E9ED;
  --white: #FFFFFF;
  --red: #D93B3B;
  --green: #1E8E5A;
  --blue: #2563A8;
  --amber: #B7791F;
  --r: 8px;
  --r-lg: 12px;
  --sh: 0 10px 30px rgba(11, 23, 36, .10);
  --sh-sm: 0 2px 8px rgba(11, 23, 36, .06);
  --ff: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  font-family: var(--ff);
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

/* 关键：hidden 属性必须真正生效。
   下方 .boot/.gate/.shell/.modal 等容器都写了 display，
   会覆盖浏览器对 [hidden] 的默认隐藏规则，必须显式压回来 */
[hidden] { display: none !important; }

/* ---------------------------------------------------------- 启动 */
.boot {
  position: fixed; inset: 0; z-index: 90;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 14px; background: var(--navy-950); color: #fff;
}
.boot__mark { font-size: 26px; letter-spacing: .22em; font-weight: 700; }
.boot__text { color: rgba(255, 255, 255, .55); font-size: 13px; }
.boot__text--err { color: #ffb4a0; max-width: 320px; text-align: center; line-height: 1.7; }
.boot__retry { margin-top: 4px; color: #fff; border-color: rgba(255, 255, 255, .35); }
.boot__retry:hover { background: rgba(255, 255, 255, .1); }

/* ---------------------------------------------------------- 登录 / 待开通 */
.gate {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 28px 20px;
  background:
    radial-gradient(900px 480px at 15% -10%, rgba(255, 90, 31, .16), transparent 60%),
    var(--navy-950);
}
.gate__card {
  width: 100%; max-width: 388px;
  background: var(--white);
  border-radius: var(--r-lg);
  padding: 34px 30px 26px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .35);
}
.gate__brand { display: flex; align-items: baseline; gap: 10px; margin-bottom: 24px; }
.gate__logo { font-size: 21px; font-weight: 800; letter-spacing: .2em; color: var(--navy-900); }
.gate__sub { font-size: 12.5px; color: var(--ink-soft); }
.gate__lead { margin: 0 0 18px; color: var(--ink-mid); font-size: 13.5px; }
.gate__or {
  display: flex; align-items: center; gap: 12px;
  margin: 18px 0; color: var(--ink-soft); font-size: 12px;
}
.gate__or::before, .gate__or::after {
  content: ""; flex: 1; height: 1px; background: var(--line);
}
.gate__note {
  margin: 18px 0 0; padding-top: 15px; border-top: 1px solid var(--line);
  font-size: 12px; color: var(--ink-soft); line-height: 1.7;
}

/* 登录方式切换：做成两个等宽的页签，当前方式实心，
   避免用户在两套表单之间来回找入口 */
.gate__tabs {
  display: grid; grid-template-columns: 1fr 1fr; gap: 4px;
  padding: 4px; margin: 0 0 20px;
  background: #f4f2ef; border-radius: calc(var(--r) + 2px);
}
.gate__tab {
  appearance: none; border: 0; cursor: pointer;
  padding: 9px 6px; border-radius: var(--r);
  font: inherit; font-size: 13px; font-weight: 600;
  color: var(--ink-soft); background: transparent;
  transition: background .15s, color .15s, box-shadow .15s;
}
.gate__tab:hover { color: var(--ink); }
.gate__tab.is-on {
  color: var(--ink); background: var(--white);
  box-shadow: 0 1px 3px rgba(20, 18, 16, .12);
}

.fl { display: block; font-size: 12.5px; font-weight: 600; color: var(--ink-mid); margin: 0 0 6px; }

.in {
  width: 100%; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: var(--r);
  font: inherit; color: var(--ink); background: var(--white);
  transition: border-color .15s, box-shadow .15s;
}
.in:focus {
  outline: none; border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(255, 90, 31, .13);
}
.in--bad { border-color: var(--red); }
.in--sm { padding: 7px 10px; font-size: 13px; }
.in--search { max-width: 320px; }
textarea.in { resize: vertical; min-height: 60px; }
select.in { cursor: pointer; }

form .in { margin-bottom: 14px; }
.inrow { display: flex; gap: 8px; margin-bottom: 14px; }
.inrow .in { margin-bottom: 0; }
.inrow .btn { flex: 0 0 auto; white-space: nowrap; }

.ferr { margin: -9px 0 12px; font-size: 12px; color: var(--red); }
.fmsg { margin: 12px 0 0; font-size: 12.5px; }
.fmsg--ok { color: var(--green); }
.fmsg--err { color: var(--red); }

/* ---------------------------------------------------------- 按钮 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 16px; border: 1px solid transparent; border-radius: var(--r);
  font: inherit; font-size: 13.5px; font-weight: 600;
  cursor: pointer; transition: background .15s, border-color .15s, color .15s;
  background: transparent; color: var(--ink);
}
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn--primary { background: var(--orange); color: #fff; }
.btn--primary:hover:not(:disabled) { background: var(--orange-dark); }
.btn--ghost { border-color: var(--line); background: var(--white); color: var(--ink); }
.btn--ghost:hover:not(:disabled) { border-color: var(--ink-soft); }
.btn--danger { background: var(--red); color: #fff; }
.btn--danger:hover:not(:disabled) { background: #B92F2F; }
.btn--text { color: var(--ink-mid); padding: 6px 8px; }
.btn--text:hover:not(:disabled) { color: var(--orange); }
.btn--sm { padding: 6px 12px; font-size: 12.5px; }
.btn--block { width: 100%; margin-top: 4px; }
.btn--wechat { border-color: #07C160; color: #07C160; background: var(--white); }
.btn--wechat:hover { background: #F2FDF7; }

/* ---------------------------------------------------------- 主框架 */
.shell { display: flex; min-height: 100vh; }

.side {
  flex: 0 0 232px;
  background: var(--navy-950);
  color: rgba(255, 255, 255, .82);
  display: flex; flex-direction: column;
  padding: 22px 14px 16px;
}
.side__brand { padding: 0 10px 22px; display: flex; flex-direction: column; gap: 3px; }
.side__brand span { font-size: 17px; font-weight: 800; letter-spacing: .2em; color: #fff; }
.side__brand em { font-style: normal; font-size: 11.5px; color: rgba(255, 255, 255, .42); }

.side__nav { display: flex; flex-direction: column; gap: 3px; flex: 1; }
.navi {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: var(--r);
  color: rgba(255, 255, 255, .74); text-decoration: none;
  font-size: 13.5px; transition: background .15s, color .15s;
}
.navi:hover { background: rgba(255, 255, 255, .07); color: #fff; text-decoration: none; }
.navi.is-on { background: var(--orange); color: #fff; font-weight: 600; }
.navi__ico { width: 17px; text-align: center; font-size: 13px; opacity: .9; }
.navi__t { flex: 1; }
.navi__badge {
  background: #fff; color: var(--orange); font-size: 11px;
  padding: 1px 7px; border-radius: 20px; font-weight: 700;
}
.navi.is-on .navi__badge { background: rgba(255, 255, 255, .95); }

.side__foot {
  border-top: 1px solid rgba(255, 255, 255, .1);
  padding-top: 13px; display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.who { display: flex; flex-direction: column; overflow: hidden; }
.who__n { font-size: 13px; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.who__r { font-size: 11.5px; color: rgba(255, 255, 255, .45); }
.side__foot .btn--text { color: rgba(255, 255, 255, .6); flex: 0 0 auto; }
.side__foot .btn--text:hover { color: var(--orange); }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.topbar {
  display: flex; align-items: center; gap: 14px;
  height: 60px; padding: 0 24px;
  background: var(--white); border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 20;
}
.topbar__t { margin: 0; font-size: 16px; font-weight: 700; }
.topbar__r { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.hamb { display: none; border: none; background: none; font-size: 19px; cursor: pointer; color: var(--ink); }

.view { padding: 22px 24px 60px; }

/* ---------------------------------------------------------- 工具栏 */
.bar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; margin-bottom: 16px;
}
.bar__l { display: flex; gap: 10px; align-items: center; }
.chips { display: flex; gap: 7px; flex-wrap: wrap; }
.chip {
  padding: 6px 13px; border: 1px solid var(--line); border-radius: 20px;
  background: var(--white); font: inherit; font-size: 12.5px; color: var(--ink-mid);
  cursor: pointer; transition: all .15s;
}
.chip:hover { border-color: var(--ink-soft); }
.chip.is-on { background: var(--navy-900); border-color: var(--navy-900); color: #fff; font-weight: 600; }

/* ---------------------------------------------------------- 统计卡 */
.stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 12px; margin-bottom: 18px;
}
.stat {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 15px 16px; text-align: left; cursor: pointer; font: inherit;
  display: flex; flex-direction: column; gap: 2px;
  transition: box-shadow .15s, transform .15s, border-color .15s;
}
.stat:hover { box-shadow: var(--sh-sm); transform: translateY(-1px); border-color: var(--ink-soft); }
.stat--hl { border-color: var(--orange); background: var(--orange-soft); }
.stat__n { font-size: 25px; font-weight: 800; line-height: 1.1; color: var(--navy-900); }
.stat--hl .stat__n { color: var(--orange-dark); }
.stat__t { font-size: 12.5px; color: var(--ink-soft); }

/* ---------------------------------------------------------- 表格 */
.listarea { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.tbl { width: 100%; border-collapse: collapse; }
.tbl th {
  text-align: left; font-size: 12px; font-weight: 600; color: var(--ink-soft);
  padding: 11px 16px; background: #FAFBFC; border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.tbl td { padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: none; }
.row { cursor: pointer; transition: background .12s; }
.row:hover { background: #F8FAFC; }
.cell__main { font-weight: 600; font-size: 13.5px; }
.cell__sub { font-size: 12.5px; color: var(--ink-soft); word-break: break-word; }

.tag {
  display: inline-block; padding: 2px 10px; border-radius: 20px;
  font-size: 11.5px; font-weight: 600; white-space: nowrap;
}
.tag--red { background: #FEECEC; color: var(--red); }
.tag--blue { background: #EAF1FA; color: var(--blue); }
.tag--amber { background: #FDF4E3; color: var(--amber); }
.tag--green { background: #E9F6EF; color: var(--green); }
.tag--gray { background: #EFF2F5; color: var(--ink-soft); }

.pager {
  display: flex; align-items: center; justify-content: center; gap: 14px;
  padding: 14px; border-top: 1px solid var(--line);
}
.pager__i { font-size: 12.5px; color: var(--ink-soft); }

.muted { color: var(--ink-soft); padding: 22px 20px; text-align: center; font-size: 13px; }
.muted--err { color: var(--red); }
.muted--sm { padding: 14px; font-size: 12.5px; }

/* ---------------------------------------------------------- 详情 */
.detail { display: flex; flex-direction: column; gap: 22px; }
.dsec { }
.dsec__t {
  margin: 0 0 12px; font-size: 13px; font-weight: 700; color: var(--ink-mid);
  padding-bottom: 8px; border-bottom: 1px solid var(--line);
}
.kv { display: flex; gap: 14px; padding: 5px 0; font-size: 13.5px; }
.kv__k { flex: 0 0 84px; color: var(--ink-soft); font-size: 12.5px; padding-top: 1px; }
.kv__v { flex: 1; min-width: 0; word-break: break-word; }
.lnk { color: var(--blue); }

.quote {
  margin: 0; padding: 13px 15px; background: #F8FAFC;
  border: 1px solid var(--line); border-radius: var(--r);
  font-family: var(--ff); font-size: 13.5px; line-height: 1.75;
  white-space: pre-wrap; word-break: break-word; color: var(--ink);
}

.frow { display: flex; gap: 14px; align-items: flex-end; flex-wrap: wrap; }
.fld { display: flex; flex-direction: column; gap: 5px; min-width: 138px; }
.frow__act { margin-left: auto; }

.notes { display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; }
.note { background: #F8FAFC; border: 1px solid var(--line); border-radius: var(--r); padding: 11px 13px; }
.note__hd { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 5px; }
.note__who { font-size: 12.5px; font-weight: 600; }
.note__when { font-size: 11.5px; color: var(--ink-soft); }
.note__bd { font-size: 13px; white-space: pre-wrap; word-break: break-word; }
.noteadd { display: flex; flex-direction: column; gap: 9px; align-items: flex-start; }
.noteadd .in { width: 100%; }
.cfm { margin: 0; font-size: 14px; line-height: 1.7; }

/* ---------------------------------------------------------- 弹窗 */
.modal { position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; padding: 24px; }
.modal__bd { position: absolute; inset: 0; background: rgba(10, 22, 35, .55); opacity: 0; transition: opacity .16s; }
.modal__pn {
  position: relative; background: var(--white); border-radius: var(--r-lg);
  width: 100%; max-width: 640px; max-height: 86vh;
  display: flex; flex-direction: column;
  box-shadow: 0 26px 70px rgba(0, 0, 0, .3);
  opacity: 0; transform: translateY(10px); transition: opacity .16s, transform .16s;
}
.modal.is-in .modal__bd { opacity: 1; }
.modal.is-in .modal__pn { opacity: 1; transform: none; }
.modal__hd {
  display: flex; align-items: center; gap: 12px;
  padding: 17px 22px; border-bottom: 1px solid var(--line);
}
.modal__t { margin: 0; font-size: 15px; font-weight: 700; flex: 1; }
.modal__x { border: none; background: none; font-size: 15px; cursor: pointer; color: var(--ink-soft); padding: 4px 6px; }
.modal__x:hover { color: var(--ink); }
.modal__cnt { padding: 22px; overflow-y: auto; }
.modal__ft {
  display: flex; justify-content: flex-end; gap: 9px;
  padding: 15px 22px; border-top: 1px solid var(--line);
}

/* ---------------------------------------------------------- 轻提示 */
.toasts {
  position: fixed; z-index: 80; right: 22px; bottom: 22px;
  display: flex; flex-direction: column; gap: 9px; align-items: flex-end;
}
.toast {
  background: var(--navy-900); color: #fff;
  padding: 11px 17px; border-radius: var(--r); font-size: 13px;
  box-shadow: var(--sh); opacity: 0; transform: translateY(8px);
  transition: opacity .22s, transform .22s; max-width: 340px;
}
.toast.is-in { opacity: 1; transform: none; }
.toast--err { background: var(--red); }

/* ---------------------------------------------------------- 待开通 */
.pend { text-align: center; padding: 8px 0 18px; }
.pend__ico { font-size: 30px; margin-bottom: 10px; }
.pend__t { margin: 0 0 7px; font-weight: 700; font-size: 15px; }
.pend__d { margin: 0; font-size: 13px; color: var(--ink-mid); line-height: 1.7; }

/* ---------------------------------------------------------- 响应式 */
@media (max-width: 860px) {
  .side {
    position: fixed; inset: 0 auto 0 0; z-index: 40;
    transform: translateX(-100%); transition: transform .22s;
    box-shadow: 0 0 40px rgba(0, 0, 0, .3);
  }
  .side.is-open { transform: none; }
  .hamb { display: block; }
  .view { padding: 16px 14px 50px; }
  .topbar { padding: 0 14px; }
  .in--search { max-width: none; }
  .bar__l { width: 100%; }
  .bar__l .in { width: 100%; }
  .tbl th:nth-child(3), .tbl td:nth-child(3),
  .tbl th:nth-child(4), .tbl td:nth-child(4) { display: none; }
  .modal { padding: 10px; }
  .modal__cnt { padding: 16px; }
  .kv { flex-direction: column; gap: 1px; }
  .kv__k { flex: none; }
  .frow { flex-direction: column; align-items: stretch; }
  .frow__act { margin-left: 0; }
  .toasts { left: 14px; right: 14px; bottom: 14px; align-items: stretch; }

  .form__row { flex-direction: column; gap: 14px; }
  .att { flex-direction: column; align-items: flex-start; }
  .att__r { width: 100%; }
  .cell__act { text-align: left; }
}

/* ============================================================
   内容管理：区块、表单、上传、附件
   ============================================================ */

.block { margin-bottom: 22px; }
.block__hd {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-bottom: 11px;
}
.block__t { margin: 0; font-size: 13px; font-weight: 700; color: var(--ink-mid); }

.chip__off { opacity: .5; font-size: 11px; }
.chip--act { border-style: dashed; color: var(--ink-soft); background: transparent; }
.chip--act:hover { border-color: var(--orange); color: var(--orange); background: var(--orange-soft); }

/* ---------------------------------------------------------- 表单 */
.form { display: flex; flex-direction: column; gap: 14px; }
.form__row { display: flex; gap: 14px; }
.form__row > .fld { flex: 1; min-width: 0; }
.form .fld { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.form .in { margin-bottom: 0; }
.form .btn--block { align-self: flex-start; }

.ck { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; cursor: pointer; }
.ck input { width: 16px; height: 16px; accent-color: var(--orange); cursor: pointer; }
.ckrow { display: flex; gap: 24px; flex-wrap: wrap; }

.dsc { border: 1px solid var(--line); border-radius: var(--r); padding: 11px 14px; }
.dsc summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--ink-mid); }
.dsc__bd { display: flex; flex-direction: column; gap: 14px; padding-top: 14px; }

/* ---------------------------------------------------------- 上传 */
.upimg { display: flex; flex-direction: column; gap: 9px; align-items: flex-start; }
.upimg__pv {
  border: 1px solid var(--line); border-radius: var(--r);
  padding: 6px; background: #F8FAFC;
}
.upimg__i { display: block; max-width: 260px; max-height: 170px; border-radius: 5px; }

/* ---------------------------------------------------------- 说明书 */
.atts__wrap { display: flex; flex-direction: column; gap: 22px; }
.atts { display: flex; flex-direction: column; gap: 9px; }
.att {
  display: flex; align-items: center; gap: 12px;
  border: 1px solid var(--line); border-radius: var(--r); padding: 11px 13px;
}
.att__l { flex: 1; min-width: 0; }
.att__n { font-size: 13.5px; font-weight: 600; word-break: break-all; }
.att__m { font-size: 12px; color: var(--ink-soft); }
.att__r { display: flex; gap: 4px; flex: 0 0 auto; }

/* ---------------------------------------------------------- 正文工具栏 */
.tbar { display: flex; gap: 5px; flex-wrap: wrap; margin-bottom: 7px; }
.tbtn {
  padding: 4px 10px; border: 1px solid var(--line); border-radius: 5px;
  background: #FAFBFC; font: inherit; font-size: 12px; color: var(--ink-mid);
  cursor: pointer; transition: all .15s;
}
.tbtn:hover { border-color: var(--orange); color: var(--orange); background: var(--orange-soft); }
.in--body {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 12.5px; line-height: 1.75;
}

/* ---------------------------------------------------------- 表格操作 */
.cell__act { white-space: nowrap; text-align: right; }
.btn--warn { color: var(--red); }
.btn--warn:hover:not(:disabled) { color: #B92F2F; }
.tag + .tag { margin-left: 5px; }
