/* =========================================================
   有方智碳 · 能碳管理平台
   Visual language: forest / ivory / brass, editorial, airy.
   Deliberately unlike a conventional dense admin template.
   ========================================================= */

:root {
  --forest: #0e3b2e;
  --forest-deep: #082a20;
  --pine: #145c4a;
  --moss: #2f7d5e;
  --leaf: #6fa287;
  --lime: #dcebd2;
  --gold: #d9a441;
  --gold-soft: #f0dfb9;
  --sand: #f4f0e6;
  --sand-deep: #ebe4d5;
  --paper: #fffdf8;
  --ink: #1c2b25;
  --muted: #6e7b72;
  --line: #e3ddcd;
  --line-strong: #d3c9b4;
  --danger: #b5523b;
  --blue: #345c7a;
  --shadow: 0 18px 44px rgba(25, 42, 34, 0.08);
  --shadow-soft: 0 8px 24px rgba(25, 42, 34, 0.06);
  --radius: 20px;
  --radius-sm: 12px;
  --serif: "Songti SC", "STSong", "Noto Serif SC", "SimSun", serif;
  --sans: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", "Hiragino Sans GB", sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-font-smoothing: antialiased; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 88% 4%, rgba(217, 164, 65, 0.08), transparent 28rem),
    radial-gradient(circle at 6% 92%, rgba(47, 125, 94, 0.08), transparent 32rem),
    var(--sand);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.65;
}

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
img { max-width: 100%; display: block; }

::selection { background: var(--gold-soft); color: var(--forest); }

/* ---------- shared ---------- */

.eyebrow {
  margin: 0 0 10px;
  color: var(--moss);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.eyebrow.light { color: rgba(220, 235, 210, 0.72); }

h1, h2, h3, h4 {
  margin: 0;
  color: var(--forest);
  font-family: var(--serif);
  font-weight: 600;
  letter-spacing: 0.01em;
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.brand-mark { width: 42px; height: 42px; }
.brand-lockup strong {
  display: block;
  color: var(--forest);
  font-family: var(--serif);
  font-size: 19px;
  letter-spacing: 0.08em;
}
.brand-lockup small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 8px;
  letter-spacing: 0.14em;
}
.on-dark .brand-lockup strong, .login-stage .brand-lockup strong { color: #f6f1e4; }
.on-dark .brand-lockup small, .login-stage .brand-lockup small { color: rgba(220, 235, 210, 0.56); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 10px 18px;
  background: transparent;
  color: var(--forest);
  font-size: 13px;
  font-weight: 600;
  transition: 0.18s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:disabled { opacity: 0.65; cursor: wait; transform: none; }
.btn-primary {
  background: var(--forest);
  color: #f8f3e7;
  box-shadow: 0 10px 22px rgba(14, 59, 46, 0.18);
}
.btn-primary:hover { background: var(--pine); }
.btn-ghost {
  border-color: var(--line-strong);
  color: var(--forest);
  background: rgba(255, 253, 248, 0.6);
}
.btn-ghost:hover { border-color: var(--moss); }
.btn-block { width: 100%; }
.btn-arrow { font-size: 16px; line-height: 1; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}
.badge::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}
.badge.green { color: var(--moss); background: #e8f0e6; }
.badge.gold { color: #946a18; background: #f6ecd3; }
.badge.red { color: var(--danger); background: #f7e6e1; }
.badge.blue { color: var(--blue); background: #e6edf2; }
.badge.muted { color: #7b8179; background: #eeeae0; }

/* =========================================================
   LOGIN
   ========================================================= */

.login-body { overflow-x: hidden; }

.login-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(420px, 0.88fr);
  min-height: 100vh;
}

.login-stage {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  padding: 44px 56px 36px;
  background:
    radial-gradient(circle at 78% 18%, rgba(217, 164, 65, 0.16), transparent 24rem),
    radial-gradient(circle at 12% 86%, rgba(111, 162, 135, 0.16), transparent 28rem),
    linear-gradient(145deg, var(--forest-deep), var(--forest) 55%, #174a3b);
  color: #f1ecde;
}
.login-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(220, 235, 210, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(220, 235, 210, 0.045) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: linear-gradient(180deg, transparent, #000 24%, #000 78%, transparent);
  pointer-events: none;
}
.login-stage::after {
  content: "";
  position: absolute;
  right: -110px;
  top: 16%;
  width: 420px;
  height: 420px;
  border: 1px solid rgba(217, 164, 65, 0.24);
  border-radius: 50%;
  box-shadow: 0 0 0 24px rgba(217, 164, 65, 0.04), 0 0 0 72px rgba(217, 164, 65, 0.025);
  pointer-events: none;
}
.stage-top, .stage-copy, .stage-points, .stage-foot { position: relative; z-index: 1; }
.stage-top { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.stage-badge {
  border: 1px solid rgba(220, 235, 210, 0.22);
  border-radius: 999px;
  padding: 7px 14px;
  color: rgba(241, 236, 222, 0.8);
  font-size: 11px;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.stage-copy { max-width: 640px; padding: 8vh 0 4vh; }
.stage-copy h1 {
  color: #f7f1e2;
  font-size: clamp(42px, 4.6vw, 70px);
  line-height: 1.2;
  letter-spacing: 0.02em;
}
.stage-copy h1 em {
  color: var(--gold);
  font-style: normal;
  border-bottom: 1px solid rgba(217, 164, 65, 0.55);
}
.stage-lead {
  max-width: 510px;
  margin: 24px 0 0;
  color: rgba(241, 236, 222, 0.72);
  font-size: 15px;
  line-height: 1.9;
}
.stage-points {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  border-top: 1px solid rgba(220, 235, 210, 0.16);
  border-bottom: 1px solid rgba(220, 235, 210, 0.16);
}
.stage-point { padding: 22px 22px 22px 0; }
.stage-point + .stage-point { border-left: 1px solid rgba(220, 235, 210, 0.16); padding-left: 22px; }
.point-index {
  display: block;
  margin-bottom: 10px;
  color: var(--gold);
  font-family: var(--serif);
  font-size: 24px;
}
.stage-point strong {
  display: block;
  color: #f7f1e2;
  font-size: 14px;
  letter-spacing: 0.02em;
}
.stage-point p {
  margin: 6px 0 0;
  color: rgba(241, 236, 222, 0.62);
  font-size: 12px;
  line-height: 1.7;
}
.stage-foot {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 22px;
  color: rgba(241, 236, 222, 0.5);
  font-size: 11px;
  letter-spacing: 0.05em;
}
.stage-foot .dot { width: 3px; height: 3px; border-radius: 50%; background: rgba(241, 236, 222, 0.4); }

.login-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 44px 40px;
  background: var(--paper);
}
.panel-inner { width: 100%; max-width: 416px; }
.panel-head h2 { font-size: 34px; }
.panel-head p { margin: 10px 0 0; color: var(--muted); font-size: 13px; }

.role-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 28px 0 26px;
}
.role-tab {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fbf8f0;
  padding: 12px 12px 11px;
  text-align: left;
  transition: 0.18s ease;
}
.role-tab .tab-num {
  color: var(--muted);
  font-family: var(--serif);
  font-size: 10px;
  letter-spacing: 0.1em;
}
.role-tab > span:not(.tab-num) { margin-top: 3px; color: var(--forest); font-size: 13px; font-weight: 600; }
.role-tab small { color: var(--muted); font-size: 10px; }
.role-tab:hover { border-color: var(--line-strong); background: #fffdf8; }
.role-tab.active {
  border-color: var(--forest);
  background: var(--forest);
  box-shadow: 0 12px 24px rgba(14, 59, 46, 0.14);
}
.role-tab.active .tab-num { color: var(--gold); }
.role-tab.active > span:not(.tab-num) { color: #f7f1e2; }
.role-tab.active small { color: rgba(241, 236, 222, 0.62); }

.login-form { display: grid; gap: 16px; }
.field { display: grid; gap: 7px; }
.field > span { color: var(--muted); font-size: 11px; letter-spacing: 0.05em; }
.field input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbf8f0;
  padding: 13px 14px;
  color: var(--ink);
  font-size: 14px;
  outline: none;
  transition: 0.18s ease;
}
.field input::placeholder { color: #adb3aa; }
.field input:focus { border-color: var(--moss); background: #fffdf8; box-shadow: 0 0 0 3px rgba(47, 125, 94, 0.1); }
.form-error {
  min-height: 18px;
  margin: -2px 0 -2px;
  color: var(--danger);
  font-size: 12px;
}
.login-form .btn-primary { margin-top: 2px; padding: 13px 18px; }
.login-form .btn-primary.is-loading { opacity: 0.75; }

.login-note {
  display: grid;
  gap: 9px;
  margin-top: 26px;
  border-top: 1px solid var(--line);
  padding-top: 18px;
}
.note-line { display: flex; gap: 12px; align-items: baseline; }
.note-line span { color: var(--moss); font-size: 10px; letter-spacing: 0.12em; }
.note-line p { margin: 0; color: var(--muted); font-size: 11px; }
.panel-foot { margin: 26px 0 0; color: #9a9f96; font-size: 10px; letter-spacing: 0.04em; }
.panel-foot a { color: var(--moss); border-bottom: 1px solid rgba(47, 125, 94, 0.3); }

/* =========================================================
   APP SHELL
   ========================================================= */

.shell {
  display: grid;
  grid-template-columns: 268px minmax(0, 1fr);
  min-height: 100vh;
}

.rail {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  overflow: hidden;
  padding: 26px 20px 20px;
  background:
    radial-gradient(circle at 18% 0%, rgba(217, 164, 65, 0.14), transparent 18rem),
    linear-gradient(165deg, #0b3026, var(--forest) 58%, #0a2c24);
  color: #e9e4d7;
}
.rail::after {
  content: "";
  position: absolute;
  right: -70px;
  bottom: 8%;
  width: 240px;
  height: 240px;
  border: 1px solid rgba(217, 164, 65, 0.14);
  border-radius: 50%;
  box-shadow: 0 0 0 18px rgba(217, 164, 65, 0.03), 0 0 0 54px rgba(217, 164, 65, 0.02);
  pointer-events: none;
}
.rail-brand { position: relative; z-index: 1; display: flex; align-items: center; gap: 11px; }
.rail-brand .brand-mark { width: 38px; height: 38px; }
.rail-brand strong { display: block; color: #f7f1e2; font-family: var(--serif); font-size: 18px; letter-spacing: 0.08em; }
.rail-brand small { display: block; margin-top: 1px; color: rgba(220, 235, 210, 0.5); font-size: 8px; letter-spacing: 0.14em; }

.role-chip {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 26px 0 22px;
  border: 1px solid rgba(220, 235, 210, 0.16);
  border-radius: 12px;
  padding: 10px 11px;
  background: rgba(255, 253, 248, 0.04);
}
.role-chip .chip-icon {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(217, 164, 65, 0.16);
  color: var(--gold);
  font-family: var(--serif);
  font-size: 13px;
}
.role-chip strong { display: block; color: #f3eddf; font-size: 11px; font-weight: 600; letter-spacing: 0.04em; }
.role-chip small { display: block; color: rgba(220, 235, 210, 0.5); font-size: 9px; }

.rail-nav { position: relative; z-index: 1; display: grid; gap: 3px; }
.nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  border: 0;
  border-radius: 10px;
  padding: 10px 11px;
  background: transparent;
  color: rgba(233, 228, 215, 0.62);
  text-align: left;
  transition: 0.16s ease;
}
.nav-item .nav-index { color: rgba(220, 235, 210, 0.34); font-family: var(--serif); font-size: 9px; width: 15px; }
.nav-item .nav-label { flex: 1; font-size: 12px; letter-spacing: 0.03em; }
.nav-item:hover { background: rgba(255, 253, 248, 0.05); color: #f3eddf; }
.nav-item.active {
  background: rgba(217, 164, 65, 0.12);
  color: #f7f1e2;
  box-shadow: inset 2px 0 0 var(--gold);
}
.nav-item.active .nav-index { color: var(--gold); }

.rail-foot { position: relative; z-index: 1; margin-top: auto; padding-top: 26px; }
.rail-user {
  display: flex;
  align-items: center;
  gap: 10px;
  border-top: 1px solid rgba(220, 235, 210, 0.14);
  padding-top: 16px;
}
.avatar {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #f0e2c1;
  color: var(--forest);
  font-family: var(--serif);
  font-size: 14px;
  font-weight: 700;
}
.rail-user strong { display: block; color: #f3eddf; font-size: 11px; }
.rail-user small { display: block; color: rgba(220, 235, 210, 0.46); font-size: 9px; }
.rail-meta { display: flex; justify-content: space-between; margin-top: 14px; color: rgba(220, 235, 210, 0.38); font-size: 9px; letter-spacing: 0.06em; }

.main { min-width: 0; padding: 26px 38px 44px; }

.topbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 18px;
}
.topbar .eyebrow { margin-bottom: 6px; }
.topbar h1 { font-size: 31px; line-height: 1.2; }
.top-actions { display: flex; align-items: center; gap: 12px; padding-bottom: 2px; }
.top-date { color: var(--muted); font-size: 11px; letter-spacing: 0.04em; white-space: nowrap; }
.top-actions .btn { padding: 7px 13px; font-size: 11px; }

/* ---------- page bits ---------- */

.view { animation: rise 0.32s ease both; }
@keyframes rise {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

.context-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}
.context-head h2 { font-size: 23px; }
.context-head p { margin: 7px 0 0; color: var(--muted); font-size: 12px; }
.context-tags { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }

.hero-band {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 92% 8%, rgba(217, 164, 65, 0.13), transparent 18rem),
    linear-gradient(120deg, #fffdf8, #f8f3e8);
  padding: 24px 28px;
  box-shadow: var(--shadow-soft);
}
.hero-band::after {
  content: "";
  position: absolute;
  right: 24%;
  bottom: -70px;
  width: 200px;
  height: 200px;
  border: 1px solid rgba(47, 125, 94, 0.12);
  border-radius: 50%;
}
.hero-copy { position: relative; z-index: 1; max-width: 620px; }
.hero-copy h2 { font-size: 28px; line-height: 1.3; }
.hero-copy p { margin: 9px 0 0; color: var(--muted); font-size: 12px; line-height: 1.8; }
.hero-stats { position: relative; z-index: 1; display: flex; align-items: center; gap: 28px; flex-shrink: 0; }
.hero-stat strong { display: block; color: var(--forest); font-family: var(--serif); font-size: 30px; line-height: 1.1; }
.hero-stat span { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; letter-spacing: 0.04em; }
.hero-stat + .hero-stat { border-left: 1px solid var(--line); padding-left: 28px; }

.grid-kpi { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.kpi-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  padding: 20px 20px 18px;
  box-shadow: var(--shadow-soft);
}
.kpi-card::before {
  content: "";
  position: absolute;
  left: 20px;
  top: 0;
  width: 34px;
  height: 3px;
  background: var(--gold);
}
.kpi-card .kpi-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.kpi-card .kpi-label { color: var(--muted); font-size: 11px; letter-spacing: 0.04em; }
.kpi-card .kpi-mark { color: var(--leaf); font-size: 16px; }
.kpi-value { margin: 14px 0 2px; color: var(--forest); font-family: var(--serif); font-size: 34px; line-height: 1.1; }
.kpi-value small { margin-left: 5px; color: var(--muted); font-family: var(--sans); font-size: 11px; font-weight: 400; }
.kpi-bottom { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; }
.kpi-bottom span { color: var(--muted); font-size: 10px; }
.delta { font-size: 11px; font-weight: 600; }
.delta.up { color: #a45c33; }
.delta.down { color: var(--moss); }
.delta.flat { color: var(--muted); }
.delta.good { color: var(--moss); }
.delta.bad { color: #a45c33; }

.grid-2 { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.65fr); gap: 16px; margin-bottom: 18px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 18px; }

.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  padding: 22px 22px 20px;
  box-shadow: var(--shadow-soft);
}
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 16px; }
.card-head h3 { font-size: 17px; }
.card-head p { margin: 5px 0 0; color: var(--muted); font-size: 10px; }
.card-head .badge { margin-top: 2px; }
.card-link { border: 0; background: transparent; color: var(--moss); font-size: 11px; font-weight: 600; }
.card-link:hover { text-decoration: underline; }

.chart-wrap { position: relative; overflow: hidden; }
.chart { width: 100%; height: auto; display: block; }
.chart-legend { display: flex; gap: 16px; margin-top: 10px; }
.chart-legend span { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 10px; }
.chart-legend i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }

.donut-wrap { display: flex; flex-direction: column; align-items: center; gap: 18px; padding: 8px 0 4px; }
.donut {
  position: relative;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  padding: 10px;
  box-shadow: inset 0 0 0 1px rgba(255, 253, 248, 0.7);
}
.donut::after {
  content: "";
  position: absolute;
  inset: 26px;
  border-radius: 50%;
  background: var(--paper);
  box-shadow: 0 0 0 1px var(--line);
}
.donut-center { position: absolute; inset: 0; z-index: 1; display: grid; place-items: center; text-align: center; }
.donut-center strong { display: block; color: var(--forest); font-family: var(--serif); font-size: 21px; line-height: 1.1; }
.donut-center small { display: block; margin-top: 3px; color: var(--muted); font-size: 9px; }
.legend-list { width: 100%; display: grid; gap: 8px; }
.legend-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 11px; }
.legend-row .legend-name { display: flex; align-items: center; gap: 7px; color: var(--muted); }
.legend-row .legend-name i { width: 7px; height: 7px; border-radius: 50%; }
.legend-row b { color: var(--forest); font-family: var(--serif); font-size: 13px; font-weight: 600; }

.data-table { width: 100%; border-collapse: collapse; }
.data-table th {
  color: var(--muted);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-align: left;
  padding: 0 7px 9px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.data-table td {
  padding: 11px 7px;
  border-bottom: 1px solid #f0ece2;
  color: var(--ink);
  font-size: 11px;
  vertical-align: middle;
}
.data-table tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover td { background: #fbf8f0; }
.data-table .num { text-align: right; font-variant-numeric: tabular-nums; color: var(--forest); }
.data-table .name { font-weight: 600; color: var(--forest); }
.data-table .sub { color: var(--muted); font-size: 10px; }
.table-wrap { overflow-x: auto; }
.table-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 14px; color: var(--muted); font-size: 10px; }

.task-list { display: grid; gap: 0; }
.task-item { display: flex; gap: 13px; padding: 13px 0; border-bottom: 1px solid #f0ece2; }
.task-item:last-child { border-bottom: 0; padding-bottom: 0; }
.task-item:first-child { padding-top: 0; }
.task-dot { position: relative; flex-shrink: 0; width: 9px; height: 9px; margin-top: 5px; border: 2px solid var(--moss); border-radius: 50%; background: var(--paper); }
.task-dot.gold { border-color: var(--gold); }
.task-dot.muted { border-color: #b9bcb3; }
.task-body { flex: 1; min-width: 0; }
.task-body strong { display: block; color: var(--forest); font-size: 12px; font-weight: 600; line-height: 1.5; }
.task-body p { margin: 3px 0 0; color: var(--muted); font-size: 10px; }
.task-meta { flex-shrink: 0; color: var(--muted); font-size: 10px; text-align: right; line-height: 1.5; }
.task-meta b { display: block; color: var(--gold); font-weight: 600; }

.cert-list { display: grid; gap: 15px; }
.cert-row { display: grid; gap: 7px; }
.cert-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.cert-top strong { color: var(--forest); font-size: 12px; }
.cert-top span { color: var(--muted); font-size: 10px; }
.cert-bar { height: 5px; border-radius: 99px; background: #ece6d7; overflow: hidden; }
.cert-bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--moss), var(--gold)); }
.cert-foot { display: flex; justify-content: space-between; color: var(--muted); font-size: 9px; }

.pipeline {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 8px;
}
.pipe-step {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fbf8f0;
  padding: 12px 10px;
  min-height: 94px;
}
.pipe-step::after {
  content: "→";
  position: absolute;
  right: -7px;
  top: 44%;
  color: var(--line-strong);
  font-size: 10px;
}
.pipe-step:last-child::after { display: none; }
.pipe-step .pipe-num { color: var(--muted); font-family: var(--serif); font-size: 9px; }
.pipe-step strong { display: block; margin-top: 4px; color: var(--forest); font-size: 11px; }
.pipe-step b { display: block; margin-top: 8px; color: var(--gold); font-family: var(--serif); font-size: 19px; line-height: 1; }
.pipe-step small { display: block; margin-top: 3px; color: var(--muted); font-size: 9px; }
.pipe-step.hot { border-color: rgba(217, 164, 65, 0.55); background: #fff9ec; }

.policy-grid { display: grid; gap: 12px; }
.policy-card {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #fbf8f0;
  padding: 15px 16px;
}
.policy-card:hover { border-color: var(--line-strong); background: #fffdf8; }
.policy-main { min-width: 0; }
.policy-top { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin-bottom: 5px; }
.policy-top .badge { padding: 3px 8px; font-size: 10px; }
.policy-card h4 { font-size: 14px; line-height: 1.5; }
.policy-card p { margin: 6px 0 0; color: var(--muted); font-size: 10px; line-height: 1.7; }
.policy-meta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; color: #8d948b; font-size: 9px; }
.policy-side { flex-shrink: 0; text-align: right; }
.policy-side strong { display: block; color: var(--gold); font-family: var(--serif); font-size: 13px; }
.policy-side small { display: block; margin-top: 3px; color: var(--muted); font-size: 9px; }

.usage-bars { display: grid; gap: 13px; }
.usage-row { display: grid; grid-template-columns: 48px 1fr 60px; align-items: center; gap: 10px; }
.usage-row span { color: var(--muted); font-size: 10px; }
.usage-row .usage-track { height: 7px; border-radius: 99px; background: #ece6d7; overflow: hidden; }
.usage-row .usage-track i { display: block; height: 100%; border-radius: 99px; background: var(--moss); }
.usage-row b { color: var(--forest); font-size: 10px; text-align: right; font-weight: 500; }

.activity { display: grid; gap: 0; }
.activity-item { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid #f0ece2; }
.activity-item:last-child { border-bottom: 0; }
.activity-time { flex-shrink: 0; width: 74px; color: var(--muted); font-size: 9px; }
.activity-text { color: var(--ink); font-size: 11px; line-height: 1.6; }
.activity-text::before { content: "·"; margin-right: 6px; color: var(--gold); }

.health-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.health-item { display: flex; align-items: center; justify-content: space-between; gap: 8px; border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px; }
.health-item strong { color: var(--forest); font-size: 11px; }
.health-item span { color: var(--moss); font-size: 9px; }
.health-item small { display: block; color: var(--muted); font-size: 9px; }

.client-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.client-card { border: 1px solid var(--line); border-radius: 15px; background: #fbf8f0; padding: 15px 16px; }
.client-card:hover { background: #fffdf8; border-color: var(--line-strong); }
.client-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.client-top h4 { font-size: 13px; line-height: 1.5; }
.client-top .score { color: var(--gold); font-family: var(--serif); font-size: 19px; }
.client-top .score small { color: var(--muted); font-family: var(--sans); font-size: 9px; }
.client-meta { display: flex; flex-wrap: wrap; gap: 6px 12px; margin-top: 8px; color: var(--muted); font-size: 10px; }
.client-note { margin: 9px 0 0; color: #8a9188; font-size: 10px; line-height: 1.6; }

.doc-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
.doc-card { display: flex; gap: 12px; align-items: flex-start; border: 1px solid var(--line); border-radius: 14px; background: #fbf8f0; padding: 14px; }
.doc-icon { display: grid; place-items: center; flex-shrink: 0; width: 34px; height: 40px; border: 1px solid var(--line-strong); border-radius: 6px; color: var(--moss); font-family: var(--serif); font-size: 9px; }
.doc-card strong { display: block; color: var(--forest); font-size: 11px; line-height: 1.5; }
.doc-card p { margin: 4px 0 0; color: var(--muted); font-size: 9px; }
.doc-card .badge { margin-top: 7px; }

.deliverable-list { display: grid; gap: 10px; }
.deliverable { display: flex; align-items: center; justify-content: space-between; gap: 12px; border: 1px solid var(--line); border-radius: 13px; background: #fbf8f0; padding: 12px 14px; }
.deliverable strong { display: block; color: var(--forest); font-size: 12px; }
.deliverable small { display: block; margin-top: 3px; color: var(--muted); font-size: 9px; }
.deliverable .badge { flex-shrink: 0; }

.empty {
  display: grid;
  place-items: center;
  min-height: 180px;
  border: 1px dashed var(--line-strong);
  border-radius: 14px;
  color: var(--muted);
  font-size: 11px;
  text-align: center;
}

/* ---------- modal / form ---------- */

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  place-items: center;
  background: rgba(8, 42, 32, 0.44);
  backdrop-filter: blur(4px);
  padding: 20px;
}
.modal-backdrop.open { display: grid; }
.modal {
  width: min(560px, 100%);
  max-height: 88vh;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--paper);
  padding: 26px;
  box-shadow: 0 30px 80px rgba(8, 42, 32, 0.24);
}
.modal h3 { font-size: 22px; }
.modal p { margin: 7px 0 0; color: var(--muted); font-size: 11px; }
.modal-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; margin-top: 20px; }
.modal-form .field { display: grid; gap: 5px; }
.modal-form .field span { color: var(--muted); font-size: 10px; }
.modal-form .field input { padding: 10px 12px; font-size: 12px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 60;
  max-width: 360px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--forest);
  color: #f7f1e2;
  padding: 12px 16px;
  font-size: 11px;
  box-shadow: 0 16px 34px rgba(8, 42, 32, 0.22);
  opacity: 0;
  transform: translateY(8px);
  transition: 0.2s ease;
  pointer-events: none;
}
.toast.show { opacity: 1; transform: none; }

/* ---------- responsive ---------- */

@media (max-width: 1180px) {
  .hero-band { flex-direction: column; }
  .hero-stats { width: 100%; border-top: 1px solid var(--line); padding-top: 16px; }
  .hero-copy { max-width: none; }
  .donut-wrap { flex-direction: row; align-items: center; justify-content: center; gap: 38px; padding: 14px 0 6px; }
  .donut-wrap .legend-list { width: 220px; }
  .grid-kpi { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-2 { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .pipeline { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .pipe-step:nth-child(4n)::after { display: none; }
}

@media (max-width: 980px) {
  .login-shell { grid-template-columns: 1fr; }
  .login-stage { min-height: auto; padding: 30px 28px 24px; }
  .stage-copy { padding: 8vh 0 5vh; }
  .stage-points { grid-template-columns: 1fr; }
  .stage-point { padding: 16px 0; }
  .stage-point + .stage-point { border-left: 0; border-top: 1px solid rgba(220, 235, 210, 0.16); padding-left: 0; }
  .stage-foot { flex-wrap: wrap; }
  .login-panel { padding: 40px 28px 48px; }
  .shell { grid-template-columns: 1fr; }
  .rail { position: relative; min-height: auto; padding: 18px 20px; }
  .rail-nav { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 12px; }
  .nav-item { justify-content: center; }
  .nav-item .nav-index { display: none; }
  .rail-foot { margin-top: 12px; padding-top: 12px; }
  .rail-meta { display: none; }
  .main { padding: 22px 20px 36px; }
  .hero-band { flex-direction: column; }
  .hero-stats { flex-wrap: wrap; }
  .hero-stat + .hero-stat { padding-left: 18px; }
  .client-grid, .doc-grid { grid-template-columns: 1fr; }
  .health-grid { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
  .donut-wrap { flex-direction: column; gap: 18px; }
  .donut-wrap .legend-list { width: 100%; }
  .topbar { flex-direction: column; align-items: flex-start; gap: 12px; }
  .top-actions { width: 100%; justify-content: space-between; }
  .grid-kpi { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr; }
  .pipeline { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pipe-step:nth-child(2n)::after { display: none; }
  .context-head { flex-direction: column; align-items: flex-start; }
  .context-tags { justify-content: flex-start; }
  .policy-card { flex-direction: column; }
  .policy-side { text-align: left; }
  .modal-form { grid-template-columns: 1fr; }
  .role-tabs { grid-template-columns: 1fr; }
  .role-tab { flex-direction: row; align-items: center; gap: 8px; }
  .role-tab .tab-num { margin-right: 2px; }
  .stage-badge { display: none; }
  .stage-copy h1 { font-size: 40px; }
}


