/* =========================================================
   ZB耗材 · 物资报送平台
   ========================================================= */

:root {
  --bg: #f5f3ed;
  --bg-deep: #eeeae1;
  --surface: #ffffff;
  --surface-soft: #faf8f3;
  --surface-muted: #f2efe7;
  --ink: #18231f;
  --ink-2: #3f4b46;
  --muted: #7d8882;
  --muted-2: #9aa39e;
  --line: #e8e3d8;
  --line-strong: #d8d1c3;
  --brand: #17594c;
  --brand-dark: #0c372f;
  --brand-deep: #09261f;
  --brand-soft: #e7f1ed;
  --brand-mid: #2a7565;
  --accent: #df9d3e;
  --accent-dark: #b77a24;
  --accent-soft: #fbf0dd;
  --danger: #c4514a;
  --danger-soft: #fbecea;
  --blue: #3d6fa8;
  --blue-soft: #eaf0f8;
  --violet: #7657a3;
  --violet-soft: #f1ecf8;
  --green: #2f7d58;
  --green-soft: #e8f4ec;
  --amber: #b47a22;
  --amber-soft: #fbf0dd;
  --gray-soft: #f0efeb;
  --radius-xs: 8px;
  --radius-sm: 10px;
  --radius: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --shadow-xs: 0 1px 2px rgba(24, 35, 31, .04);
  --shadow-sm: 0 1px 2px rgba(24, 35, 31, .04), 0 6px 18px -12px rgba(24, 35, 31, .12);
  --shadow-md: 0 2px 4px rgba(24, 35, 31, .04), 0 18px 44px -24px rgba(24, 35, 31, .22);
  --shadow-lg: 0 30px 80px -30px rgba(9, 38, 31, .38);
  --sidebar-w: 252px;
  --font: "Segoe UI", "Microsoft YaHei UI", "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", system-ui, -apple-system, sans-serif;
  --font-num: "Segoe UI", "Bahnschrift", "DIN Alternate", system-ui, sans-serif;
}

* { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.no-scroll { overflow: hidden; }

::selection { background: #cfe3db; color: var(--brand-deep); }

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; }
img, svg { display: block; }
p, h1, h2, h3, h4 { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }

h1, h2, h3, h4 { font-weight: 650; letter-spacing: -.02em; }

:focus-visible {
  outline: 2px solid var(--brand-mid);
  outline-offset: 2px;
}

.hidden { display: none !important; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.svg-sprite {
  position: absolute; width: 0; height: 0; overflow: hidden;
}

.icon {
  width: 20px; height: 20px; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round;
}

/* Scrollbars */
* { scrollbar-width: thin; scrollbar-color: #c9c2b4 transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #ccc5b7; border-radius: 10px; border: 3px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: #b5ad9e; border: 3px solid transparent; background-clip: content-box; }

/* =========================================================
   Buttons
   ========================================================= */

.btn {
  --btn-bg: var(--brand);
  --btn-fg: #fff;
  --btn-border: var(--brand);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 40px; padding: 9px 16px;
  border: 1px solid var(--btn-border); border-radius: var(--radius-sm);
  background: var(--btn-bg); color: var(--btn-fg);
  font-size: 13.5px; font-weight: 600; letter-spacing: .01em;
  white-space: nowrap; user-select: none;
  transition: transform .15s ease, background .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.btn:hover { background: var(--brand-dark); border-color: var(--brand-dark); }
.btn:active { transform: translateY(1px); }
.btn .icon { width: 17px; height: 17px; stroke-width: 2; }
.btn:focus-visible { outline-offset: 2px; }
.btn-primary { --btn-bg: var(--brand); --btn-fg: #fff; --btn-border: var(--brand); box-shadow: 0 1px 1px rgba(9, 38, 31, .08); }
.btn-primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); box-shadow: 0 8px 20px -12px rgba(9, 38, 31, .6); }
.btn-secondary { --btn-bg: var(--surface); --btn-fg: var(--ink); --btn-border: var(--line-strong); }
.btn-secondary:hover { background: var(--surface-soft); border-color: #c4bcac; }
.btn-ghost { --btn-bg: transparent; --btn-fg: var(--ink-2); --btn-border: transparent; }
.btn-ghost:hover { background: rgba(23, 89, 76, .07); border-color: transparent; }
.btn-danger { --btn-bg: var(--danger); --btn-fg: #fff; --btn-border: var(--danger); }
.btn-danger:hover { background: #aa413b; border-color: #aa413b; }
.btn-danger-ghost { --btn-bg: transparent; --btn-fg: var(--danger); --btn-border: #eccac7; }
.btn-danger-ghost:hover { background: var(--danger-soft); border-color: #dfb2ae; }
.btn-accent { --btn-bg: var(--accent); --btn-fg: #332107; --btn-border: var(--accent); }
.btn-accent:hover { background: #e8aa4e; border-color: #e8aa4e; }
.btn-sm { min-height: 32px; padding: 5px 11px; font-size: 12.5px; border-radius: var(--radius-xs); }
.btn-sm .icon { width: 15px; height: 15px; }
.btn-lg { min-height: 48px; padding: 12px 22px; font-size: 14.5px; border-radius: 12px; }
.btn-block { width: 100%; }
.btn.is-loading { pointer-events: none; position: relative; color: transparent !important; }
.btn.is-loading > * { visibility: hidden; }
.btn.is-loading::after {
  content: ""; position: absolute; width: 17px; height: 17px;
  border: 2px solid rgba(255, 255, 255, .35); border-top-color: #fff;
  border-radius: 50%; animation: spin .7s linear infinite;
}
.btn-secondary.is-loading::after, .btn-ghost.is-loading::after { border-color: rgba(24,35,31,.2); border-top-color: var(--brand); }
@keyframes spin { to { transform: rotate(360deg); } }

.icon-button {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; padding: 0;
  background: transparent; border: 1px solid transparent; border-radius: 10px;
  color: var(--ink-2); transition: background .15s, color .15s, border-color .15s;
}
.icon-button:hover { background: rgba(24, 35, 31, .06); color: var(--ink); }
.icon-button .icon { width: 20px; height: 20px; }
.icon-button.is-active { background: var(--brand-soft); color: var(--brand); }

.text-button {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 2px; border: 0; background: none;
  color: var(--brand); font-size: 12.5px; font-weight: 600;
}
.text-button:hover { color: var(--brand-dark); text-decoration: underline; text-underline-offset: 3px; }
.text-button .icon { width: 14px; height: 14px; }

.link-button {
  border: 0; background: none; padding: 0; color: var(--brand);
  font-weight: 600; font-size: 13px;
}
.link-button:hover { text-decoration: underline; text-underline-offset: 3px; }

/* =========================================================
   Forms
   ========================================================= */

.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.field > label, .field-label {
  font-size: 12.5px; font-weight: 600; color: var(--ink-2);
  display: flex; align-items: center; gap: 4px; letter-spacing: .01em;
}
.field .required { color: var(--danger); font-weight: 700; }
.field .optional { color: var(--muted-2); font-weight: 400; font-size: 11.5px; margin-left: 2px; }
.field .hint { font-size: 11.5px; color: var(--muted); line-height: 1.45; }
.field .field-error { font-size: 11.5px; color: var(--danger); min-height: 0; }
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: var(--danger); box-shadow: 0 0 0 3px rgba(196, 81, 74, .09); }

.input-icon { position: relative; display: flex; align-items: center; }
.input-icon > .icon {
  position: absolute; left: 12px; width: 18px; height: 18px;
  color: var(--muted); pointer-events: none; z-index: 1;
}
.input-icon > input { padding-left: 39px; }
.input-icon-action > input { padding-right: 42px; }
.input-icon .icon-button { position: absolute; right: 3px; width: 34px; height: 34px; color: var(--muted); }
.input-icon .icon-button:hover { color: var(--ink); }

input, select, textarea {
  width: 100%; min-height: 42px; padding: 9px 12px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  color: var(--ink); font-size: 13.5px; line-height: 1.5;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
input::placeholder, textarea::placeholder { color: #adb4af; }
input:hover, select:hover, textarea:hover { border-color: #c7bfb0; }
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--brand-mid);
  box-shadow: 0 0 0 3px rgba(23, 89, 76, .12);
}
input:disabled, select:disabled, textarea:disabled { background: var(--surface-muted); color: var(--muted); cursor: not-allowed; }
textarea { min-height: 96px; resize: vertical; }
select {
  appearance: none; -webkit-appearance: none;
  padding-right: 36px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%237d8882' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
}
input[type="number"] { font-variant-numeric: tabular-nums; }
input[type="date"] { min-height: 42px; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid .span-2 { grid-column: 1 / -1; }
.form-alert {
  display: flex; align-items: flex-start; gap: 9px;
  padding: 11px 13px; margin: 0 0 16px;
  border: 1px solid #efc9c5; border-radius: var(--radius-sm);
  background: var(--danger-soft); color: #9e3f39;
  font-size: 12.5px; line-height: 1.5;
}
.form-alert::before { content: "!"; display: inline-flex; align-items: center; justify-content: center; flex: none; width: 17px; height: 17px; margin-top: 1px; border-radius: 50%; background: var(--danger); color: #fff; font-weight: 700; font-size: 11px; }
.form-note { font-size: 11.5px; color: var(--muted); text-align: center; line-height: 1.6; }

.segmented { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented label {
  display: flex; flex-direction: column; gap: 1px;
  padding: 9px 12px; border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm); background: var(--surface);
  cursor: pointer; transition: border-color .15s, background .15s, box-shadow .15s;
}
.segmented label strong { font-size: 12.5px; font-weight: 650; }
.segmented label small { font-size: 10.5px; color: var(--muted); }
.segmented label:hover { border-color: #c4bcac; }
.segmented input:checked + label { border-color: var(--brand); background: var(--brand-soft); box-shadow: 0 0 0 1px var(--brand) inset; }
.segmented input:checked + label strong { color: var(--brand); }
.segmented input:focus-visible + label { outline: 2px solid var(--brand-mid); outline-offset: 2px; }
.segmented.urgency input[value="urgent"]:checked + label { border-color: #d4912f; background: #fdf3e3; box-shadow: 0 0 0 1px #d4912f inset; }
.segmented.urgency input[value="urgent"]:checked + label strong { color: #9c6717; }
.segmented.urgency input[value="critical"]:checked + label { border-color: var(--danger); background: #fceded; box-shadow: 0 0 0 1px var(--danger) inset; }
.segmented.urgency input[value="critical"]:checked + label strong { color: var(--danger); }

/* =========================================================
   Auth
   ========================================================= */

.auth {
  min-height: 100vh; min-height: 100dvh;
  display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(480px, .92fr);
  background: var(--bg);
}

.auth-brand {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column;
  padding: 42px clamp(36px, 5vw, 76px) 32px;
  background:
    radial-gradient(760px 540px at 82% 8%, rgba(223, 157, 62, .13), transparent 62%),
    radial-gradient(700px 600px at 8% 100%, rgba(57, 132, 112, .22), transparent 60%),
    linear-gradient(148deg, #15443b 0%, #0d3029 52%, #08211c 100%);
  color: #edf5f1;
}
.auth-brand::before {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, .026) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .026) 1px, transparent 1px);
  background-size: 58px 58px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,.7), transparent 82%);
  pointer-events: none;
}
.auth-brand::after {
  content: ""; position: absolute; width: 560px; height: 560px;
  right: -290px; bottom: -290px; border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .09);
  box-shadow: 0 0 0 70px rgba(255,255,255,.018), 0 0 0 140px rgba(255,255,255,.015);
  pointer-events: none;
}
.auth-brand-top { position: relative; z-index: 1; }

.brand-lockup { display: inline-flex; align-items: center; gap: 11px; }
.brand-lockup-light { color: #f4f8f5; }
.brand-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; flex: none;
  color: #f1c27b;
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .13);
  border-radius: 10px;
}
.brand-mark svg { width: 26px; height: 26px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-size: 17px; font-weight: 700; letter-spacing: .08em; }
.brand-text small { margin-top: 3px; font-size: 9.5px; letter-spacing: .24em; color: rgba(237, 245, 241, .54); }

.auth-hero {
  position: relative; z-index: 1;
  max-width: 560px; margin: auto 0;
  padding: 44px 0 28px;
}
.auth-kicker {
  display: flex; align-items: center; gap: 9px;
  margin-bottom: 20px; font-size: 11.5px; font-weight: 600;
  letter-spacing: .16em; color: #d9b274;
}
.auth-kicker span { width: 26px; height: 1px; background: #d9b274; opacity: .7; }
.auth-hero h1 {
  font-size: clamp(38px, 4.4vw, 58px);
  line-height: 1.14; letter-spacing: -.045em;
  font-weight: 620; color: #f5f8f5;
}
.auth-hero h1 em { font-style: normal; color: #e9b76d; }
.auth-lead {
  margin-top: 20px; max-width: 440px;
  font-size: 14px; line-height: 1.9; color: rgba(235, 244, 239, .68);
}

.auth-preview {
  position: relative; margin-top: 34px; max-width: 430px;
  padding: 18px 20px 15px;
  background: rgba(255, 255, 255, .055);
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 18px;
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .6);
  backdrop-filter: blur(12px);
  transform: rotate(-1.1deg);
}
.auth-preview::before {
  content: ""; position: absolute; inset: 8px -7px -8px 8px;
  border: 1px solid rgba(255, 255, 255, .055); border-radius: 18px; z-index: -1;
}
.preview-head { display: flex; align-items: center; justify-content: space-between; }
.preview-dots { display: flex; gap: 5px; }
.preview-dots i { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,.2); }
.preview-dots i:first-child { background: #e9b76d; }
.preview-tag {
  padding: 3px 9px; border-radius: 100px;
  background: rgba(233, 183, 109, .14); border: 1px solid rgba(233, 183, 109, .3);
  color: #edc68c; font-size: 10px; letter-spacing: .06em;
}
.preview-title { margin-top: 15px; font-size: 16px; font-weight: 650; color: #f4f8f5; letter-spacing: -.01em; }
.preview-meta { margin-top: 5px; font-size: 10.5px; color: rgba(235, 244, 239, .45); }
.preview-lines { margin-top: 15px; display: flex; flex-direction: column; gap: 6px; }
.preview-line {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: 9px;
  background: rgba(255, 255, 255, .045);
  border: 1px solid rgba(255, 255, 255, .06);
  font-size: 11.5px; color: rgba(241, 247, 243, .78);
}
.preview-line b { margin-left: auto; font-weight: 600; color: #e9cfa1; font-variant-numeric: tabular-nums; }
.preview-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 23px; height: 23px; flex: none; border-radius: 6px;
  background: rgba(233, 183, 109, .12); color: #e4bc80;
  font-size: 9.5px; border: 1px solid rgba(233, 183, 109, .16);
}
.preview-foot {
  display: flex; align-items: center; gap: 7px;
  margin-top: 13px; padding-top: 11px;
  border-top: 1px solid rgba(255, 255, 255, .08);
  font-size: 9.5px; color: rgba(235, 244, 239, .45); letter-spacing: .02em;
}
.pulse-dot {
  position: relative; display: inline-block; width: 6px; height: 6px; flex: none;
  background: #64c39a; border-radius: 50%;
}
.pulse-dot::after {
  content: ""; position: absolute; inset: -3px; border-radius: 50%;
  border: 1px solid rgba(100, 195, 154, .45);
  animation: pulse 2.4s ease-out infinite;
}
@keyframes pulse {
  0% { transform: scale(.6); opacity: .9; }
  70%, 100% { transform: scale(1.6); opacity: 0; }
}

.auth-points {
  display: grid; grid-template-columns: 1fr 1fr; gap: 22px;
  margin-top: 32px; max-width: 440px;
}
.auth-points > div { display: flex; gap: 11px; align-items: flex-start; }
.point-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; flex: none; border-radius: 9px;
  background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .1);
  color: #e9b76d;
}
.point-icon .icon { width: 16px; height: 16px; }
.auth-points p { display: flex; flex-direction: column; gap: 2px; }
.auth-points strong { font-size: 12px; font-weight: 600; color: rgba(245, 249, 246, .9); }
.auth-points small { font-size: 10.5px; color: rgba(235, 244, 239, .48); line-height: 1.5; }
.auth-copyright { position: relative; z-index: 1; margin-top: 18px; font-size: 9.5px; letter-spacing: .03em; color: rgba(235, 244, 239, .32); }

.auth-panel {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 44px clamp(24px, 5vw, 64px) 30px;
  background:
    radial-gradient(600px 400px at 100% 0%, rgba(223, 157, 62, .05), transparent 60%),
    var(--bg);
}
.auth-card {
  width: 100%; max-width: 456px;
  padding: 36px 36px 30px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
}
.auth-card-head .eyebrow { margin-bottom: 7px; }
.auth-card-head h2 { font-size: 25px; line-height: 1.3; letter-spacing: -.035em; }
.auth-card-head > p:last-child { margin-top: 7px; color: var(--muted); font-size: 12.5px; line-height: 1.65; }

.eyebrow {
  font-size: 10.5px; font-weight: 700; letter-spacing: .16em;
  text-transform: uppercase; color: var(--brand-mid);
}

.auth-tabs {
  position: relative; display: grid; grid-template-columns: 1fr 1fr;
  gap: 0; margin: 25px 0 22px; padding: 4px;
  background: var(--surface-soft); border: 1px solid var(--line);
  border-radius: 11px;
}
.auth-tab {
  position: relative; z-index: 1; padding: 8px 10px;
  border: 0; background: none; border-radius: 8px;
  color: var(--muted); font-size: 13px; font-weight: 600;
  transition: color .2s;
}
.auth-tab.is-active { color: var(--ink); }
.auth-tab-indicator {
  position: absolute; z-index: 0; top: 4px; bottom: 4px; left: 4px;
  width: calc(50% - 4px); border-radius: 8px;
  background: var(--surface); border: 1px solid var(--line);
  box-shadow: 0 1px 3px rgba(24,35,31,.06);
  transition: transform .25s cubic-bezier(.4, 0, .2, 1);
}
.auth-tabs[data-active="register"] .auth-tab-indicator { transform: translateX(100%); }

.auth-form { display: flex; flex-direction: column; gap: 15px; }
.auth-form .form-grid { gap: 14px; }
.auth-form .btn { margin-top: 5px; }
.auth-form .form-note { margin-top: 1px; }

.auth-tip {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  margin-top: 20px; color: var(--muted-2); font-size: 10.5px;
}
.auth-tip .icon { width: 13px; height: 13px; }

/* =========================================================
   App shell
   ========================================================= */

.app {
  display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky; top: 0; z-index: 30;
  display: flex; flex-direction: column;
  height: 100vh; height: 100dvh;
  padding: 26px 18px 18px;
  background:
    radial-gradient(420px 300px at 15% 0%, rgba(223, 157, 62, .09), transparent 70%),
    radial-gradient(400px 350px at 100% 100%, rgba(57, 132, 112, .16), transparent 65%),
    linear-gradient(178deg, #113b33 0%, #0b2d27 55%, #09261f 100%);
  color: #eef5f1;
  overflow-y: auto;
}
.sidebar::before {
  content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255,255,255,.022) 1px, transparent 1px);
  background-size: 100% 48px;
  pointer-events: none;
}
.sidebar-top { position: relative; display: flex; align-items: center; justify-content: space-between; padding: 2px 8px; }
.sidebar-top .brand-mark { width: 34px; height: 34px; }
.sidebar-top .brand-mark svg { width: 24px; height: 24px; }
.sidebar-top .brand-text strong { font-size: 16px; }
.sidebar-close { display: none; color: rgba(255,255,255,.65); }
.sidebar-close:hover { background: rgba(255,255,255,.08); color: #fff; }

.workspace-pill {
  position: relative; display: flex; align-items: center; gap: 7px;
  margin: 24px 8px 12px; padding: 7px 10px;
  border: 1px solid rgba(255, 255, 255, .08); border-radius: 7px;
  background: rgba(255, 255, 255, .035);
  font-size: 9.5px; letter-spacing: .08em; color: rgba(238, 245, 241, .45);
}
.workspace-dot { width: 5px; height: 5px; border-radius: 50%; background: #d7a252; }

.main-nav { position: relative; display: flex; flex-direction: column; gap: 4px; margin-top: 10px; }
.nav-section-label {
  margin: 17px 10px 6px; font-size: 9px; font-weight: 700;
  letter-spacing: .18em; color: rgba(238, 245, 241, .26);
}
.nav-link {
  position: relative; display: flex; align-items: center; gap: 11px;
  min-height: 43px; padding: 9px 11px;
  border-radius: 9px; color: rgba(238, 245, 241, .65);
  font-size: 12.5px; font-weight: 500; letter-spacing: .01em;
  transition: color .15s, background .15s;
}
.nav-link .icon { width: 18px; height: 18px; opacity: .78; }
.nav-link:hover { background: rgba(255, 255, 255, .055); color: #fff; }
.nav-link.is-active { background: rgba(255, 255, 255, .09); color: #fff; font-weight: 600; }
.nav-link.is-active::before {
  content: ""; position: absolute; left: -18px; top: 11px; bottom: 11px;
  width: 3px; border-radius: 0 3px 3px 0; background: #e4aa54;
}
.nav-link.is-active .icon { color: #e9bd7d; opacity: 1; }
.nav-badge {
  margin-left: auto; min-width: 19px; height: 19px; padding: 0 5px;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(228, 170, 84, .18); color: #edc78d;
  border: 1px solid rgba(228, 170, 84, .2); border-radius: 6px;
  font-size: 9.5px; font-weight: 700; font-variant-numeric: tabular-nums;
}

.sidebar-bottom { position: relative; margin-top: auto; padding-top: 22px; }
.sidebar-help {
  display: flex; gap: 10px; align-items: flex-start;
  margin: 0 2px 16px; padding: 12px;
  border-radius: 11px;
  background: rgba(255, 255, 255, .045);
  border: 1px solid rgba(255, 255, 255, .07);
}
.help-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 27px; height: 27px; flex: none; border-radius: 7px;
  background: rgba(228, 170, 84, .12); color: #e8bc7c;
}
.help-icon .icon { width: 14px; height: 14px; }
.sidebar-help strong { display: block; font-size: 10.5px; font-weight: 600; color: rgba(255,255,255,.8); }
.sidebar-help p { margin-top: 2px; font-size: 9.5px; line-height: 1.55; color: rgba(238,245,241,.4); }

.sidebar-user {
  display: flex; align-items: center; gap: 9px;
  padding: 10px 9px; border-top: 1px solid rgba(255,255,255,.07);
}
.sidebar-user-info { min-width: 0; display: flex; flex-direction: column; }
.sidebar-user-info strong { font-size: 11.5px; font-weight: 600; color: rgba(255,255,255,.88); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-user-info small { font-size: 9.5px; color: rgba(238,245,241,.4); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-user .icon-button { margin-left: auto; width: 30px; height: 30px; color: rgba(238,245,241,.42); }
.sidebar-user .icon-button:hover { background: rgba(255,255,255,.07); color: #fff; }

.avatar {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; flex: none; border-radius: 50%;
  background: linear-gradient(145deg, #d9a45b, #b97c2f);
  color: #fff; font-size: 12px; font-weight: 700;
  letter-spacing: .02em; text-transform: uppercase;
  border: 1px solid rgba(255,255,255,.16);
}
.avatar.avatar-sm { width: 28px; height: 28px; font-size: 10.5px; }
.avatar.avatar-lg { width: 42px; height: 42px; font-size: 14px; }
.avatar.avatar-muted { background: linear-gradient(145deg, #6f8b83, #527067); }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  height: 68px; padding: 0 30px;
  background: rgba(245, 243, 237, .86);
  border-bottom: 1px solid rgba(216, 209, 195, .65);
  backdrop-filter: blur(16px);
}
.topbar-left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.menu-button { display: none; }
.breadcrumb { display: flex; align-items: center; gap: 7px; font-size: 11.5px; color: var(--muted); }
.breadcrumb .icon { width: 13px; height: 13px; color: var(--muted-2); }
.breadcrumb b { color: var(--ink-2); font-weight: 600; }
.topbar-right { display: flex; align-items: center; gap: 7px; }
.live-pill {
  display: inline-flex; align-items: center; gap: 7px;
  margin-right: 6px; padding: 5px 10px;
  background: rgba(255, 255, 255, .55); border: 1px solid var(--line);
  border-radius: 100px; color: var(--muted); font-size: 10px; letter-spacing: .02em;
}
.notif-wrap { position: relative; }
.notif-button { color: var(--ink-2); }
.notif-badge {
  position: absolute; top: 3px; right: 2px;
  min-width: 16px; height: 16px; padding: 0 4px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 100px; background: var(--danger); color: #fff;
  border: 2px solid var(--bg); font-size: 8.5px; font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.topbar-user {
  display: flex; align-items: center; gap: 9px;
  margin-left: 5px; padding: 4px 6px 4px 4px;
  border: 1px solid transparent; border-radius: 100px;
  background: transparent; text-align: left;
  transition: background .15s, border-color .15s;
}
.topbar-user:hover { background: rgba(255,255,255,.7); border-color: var(--line); }
.topbar-user-text { display: flex; flex-direction: column; line-height: 1.2; max-width: 100px; }
.topbar-user-text strong { font-size: 11.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar-user-text small { font-size: 9.5px; color: var(--muted); }
.topbar-user .chevron { width: 14px; height: 14px; color: var(--muted-2); }

.page {
  width: 100%; max-width: 1480px;
  margin: 0 auto; padding: 28px 30px 54px;
}
.page:focus { outline: none; }

.sidebar-scrim {
  display: none; position: fixed; inset: 0; z-index: 29;
  background: rgba(9, 26, 22, .48); backdrop-filter: blur(2px);
}

/* =========================================================
   Page header & cards
   ========================================================= */

.page-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 20px; margin-bottom: 24px;
}
.page-head-copy { min-width: 0; }
.page-head .eyebrow { margin-bottom: 7px; }
.page-head h1 { font-size: clamp(25px, 2.5vw, 31px); line-height: 1.25; letter-spacing: -.04em; font-weight: 640; }
.page-head .page-sub { margin-top: 7px; max-width: 640px; color: var(--muted); font-size: 12.5px; line-height: 1.65; }
.page-head .page-sub strong { color: var(--ink-2); font-weight: 600; }
.page-actions { display: flex; align-items: center; gap: 8px; flex: none; padding-bottom: 2px; }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-xs);
}
.card-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 16px; padding: 19px 22px 0;
}
.card-head h2, .card-title { font-size: 14.5px; font-weight: 650; letter-spacing: -.015em; }
.card-head p, .card-sub { margin-top: 4px; font-size: 11px; color: var(--muted); line-height: 1.55; }
.card-body { padding: 18px 22px 22px; }
.card-actions { display: flex; align-items: center; gap: 6px; flex: none; }

.section-sep { height: 1px; background: var(--line); margin: 20px 0; }

/* =========================================================
   Stat cards
   ========================================================= */

.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px; margin-bottom: 17px; }
.stat-card {
  position: relative; overflow: hidden;
  padding: 17px 18px 15px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-xs);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.stat-card:hover { transform: translateY(-1px); border-color: #ddd6c8; box-shadow: var(--shadow-sm); }
.stat-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.stat-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 33px; height: 33px; border-radius: 9px;
  background: var(--brand-soft); color: var(--brand);
}
.stat-icon .icon { width: 17px; height: 17px; }
.stat-icon.tone-amber { background: var(--amber-soft); color: var(--amber); }
.stat-icon.tone-blue { background: var(--blue-soft); color: var(--blue); }
.stat-icon.tone-green { background: var(--green-soft); color: var(--green); }
.stat-icon.tone-violet { background: var(--violet-soft); color: var(--violet); }
.stat-icon.tone-red { background: var(--danger-soft); color: var(--danger); }
.stat-kicker { font-size: 10.5px; font-weight: 600; letter-spacing: .03em; color: var(--muted); }
.stat-value {
  margin-top: 11px; font-family: var(--font-num);
  font-size: 31px; font-weight: 650; line-height: 1.05;
  letter-spacing: -.045em; font-variant-numeric: tabular-nums;
}
.stat-value small { margin-left: 5px; font-family: var(--font); font-size: 10px; font-weight: 500; letter-spacing: 0; color: var(--muted-2); }
.stat-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 9px; }
.stat-hint { font-size: 10px; color: var(--muted); line-height: 1.4; }
.stat-delta { display: inline-flex; align-items: center; gap: 2px; font-size: 9.5px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.stat-delta.up { color: var(--green); }
.stat-delta.down { color: var(--danger); }
.stat-delta .icon { width: 11px; height: 11px; }

/* =========================================================
   Dashboard
   ========================================================= */

.dashboard-grid {
  display: grid; grid-template-columns: minmax(0, 1.62fr) minmax(300px, 1fr);
  gap: 17px; margin-bottom: 17px;
}
.dashboard-grid.equal { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.trend-card .card-body { padding: 12px 22px 18px; }
.chart { display: flex; gap: 13px; height: 196px; margin-top: 8px; }
.chart-y {
  display: flex; flex-direction: column; justify-content: space-between;
  padding-bottom: 23px; width: 22px; flex: none;
  font-size: 9px; color: var(--muted-2); text-align: right;
  font-variant-numeric: tabular-nums;
}
.chart-main { position: relative; flex: 1; min-width: 0; display: flex; flex-direction: column; }
.chart-gridlines { position: absolute; inset: 0 0 23px; display: flex; flex-direction: column; justify-content: space-between; pointer-events: none; }
.chart-gridlines i { display: block; height: 1px; background: #f0ece3; }
.chart-bars { position: relative; z-index: 1; display: flex; align-items: stretch; gap: clamp(6px, 2.2vw, 18px); flex: 1; padding: 0 3px; }
.bar-col { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 7px; }
.bar-track { width: 100%; max-width: 38px; height: 100%; display: flex; align-items: flex-end; justify-content: center; }
.bar {
  position: relative; width: 100%; min-height: 3px;
  border-radius: 5px 5px 3px 3px;
  background: linear-gradient(180deg, #3f8978, #236454);
  box-shadow: 0 4px 12px -7px rgba(23, 89, 76, .7);
  transition: filter .15s, transform .15s;
}
.bar:hover { filter: brightness(1.08); transform: scaleX(1.04); }
.bar.is-zero { background: #e8e4da; box-shadow: none; }
.bar.is-today { background: linear-gradient(180deg, #e7b263, #d09033); box-shadow: 0 5px 14px -7px rgba(196, 126, 25, .75); }
.bar-col .bar-label { font-size: 9.5px; color: var(--muted); white-space: nowrap; }
.bar-col.is-today .bar-label { color: var(--amber); font-weight: 700; }
.bar-value {
  position: absolute; top: -18px; left: 50%; transform: translateX(-50%);
  font-family: var(--font-num); font-size: 9.5px; font-weight: 700;
  color: var(--ink-2); font-variant-numeric: tabular-nums;
}
.bar.is-zero .bar-value { color: var(--muted-2); font-weight: 500; }

.pending-list { display: flex; flex-direction: column; margin-top: 8px; }
.pending-item {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 0; border-bottom: 1px solid #f1ede5;
  cursor: pointer; transition: background .15s;
  text-align: left; width: 100%; border-left: 0; border-right: 0; border-top: 0; background: none;
}
.pending-item:last-child { border-bottom: 0; }
.pending-item:hover .pending-main strong { color: var(--brand); }
.pending-main { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 2px; }
.pending-main strong { font-size: 11.5px; font-weight: 600; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pending-main small { font-size: 10px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pending-time { flex: none; font-size: 9.5px; color: var(--muted-2); }
.pending-item .chevron { width: 14px; height: 14px; color: var(--muted-2); flex: none; }
.urgency-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--line-strong); flex: none; }
.urgency-dot.urgent { background: var(--accent); }
.urgency-dot.critical { background: var(--danger); }

.lower-grid { display: grid; grid-template-columns: minmax(0, 1.62fr) minmax(300px, 1fr); gap: 17px; }
.category-list { display: flex; flex-direction: column; gap: 12px; margin-top: 15px; }
.category-row { display: grid; grid-template-columns: 78px minmax(0, 1fr) 26px; align-items: center; gap: 10px; }
.category-name { font-size: 10.5px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.category-bar { height: 6px; border-radius: 10px; background: #f1ede4; overflow: hidden; }
.category-bar span { display: block; height: 100%; border-radius: inherit; background: var(--brand-mid); }
.category-row:nth-child(2) .category-bar span { background: #568f81; }
.category-row:nth-child(3) .category-bar span { background: #83ab9d; }
.category-row:nth-child(4) .category-bar span { background: #b9c9b9; }
.category-row:nth-child(5) .category-bar span { background: #dfb66f; }
.category-row:nth-child(6) .category-bar span { background: #d1c9b8; }
.category-count { font-family: var(--font-num); font-size: 10px; color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }
.top-subtitle { margin: 17px 0 5px; font-size: 9.5px; font-weight: 700; letter-spacing: .12em; color: var(--muted-2); text-transform: uppercase; }
.top-items { display: flex; flex-direction: column; }
.top-item { display: flex; align-items: center; gap: 9px; padding: 7px 0; border-bottom: 1px solid #f4f0e9; font-size: 11px; }
.top-item:last-child { border-bottom: 0; }
.top-rank { width: 16px; height: 16px; display: inline-flex; align-items: center; justify-content: center; border-radius: 4px; background: var(--surface-muted); color: var(--muted); font-family: var(--font-num); font-size: 8.5px; font-weight: 700; flex: none; }
.top-item:first-child .top-rank { background: var(--accent-soft); color: var(--accent-dark); }
.top-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top-qty { color: var(--muted); font-size: 9.5px; white-space: nowrap; }

.welcome-strip {
  position: relative; overflow: hidden;
  display: flex; align-items: center; gap: 24px;
  margin-bottom: 17px; padding: 22px 24px;
  background:
    radial-gradient(400px 200px at 100% 0%, rgba(223, 157, 62, .16), transparent 60%),
    linear-gradient(120deg, #123c33, #0c2f28);
  border-radius: var(--radius-lg); color: #f0f6f2;
}
.welcome-strip::after {
  content: ""; position: absolute; width: 220px; height: 220px; right: -80px; top: -100px;
  border: 1px solid rgba(255,255,255,.1); border-radius: 50%;
  box-shadow: 0 0 0 38px rgba(255,255,255,.025), 0 0 0 76px rgba(255,255,255,.015);
}
.welcome-copy { position: relative; z-index: 1; flex: 1; min-width: 0; }
.welcome-copy h2 { font-size: 19px; font-weight: 620; letter-spacing: -.02em; }
.welcome-copy p { margin-top: 5px; font-size: 11.5px; line-height: 1.6; color: rgba(240, 246, 242, .58); max-width: 520px; }
.welcome-actions { position: relative; z-index: 1; display: flex; gap: 8px; }
.welcome-actions .btn-secondary { --btn-bg: rgba(255,255,255,.08); --btn-fg: #f2f7f4; --btn-border: rgba(255,255,255,.14); }
.welcome-actions .btn-secondary:hover { background: rgba(255,255,255,.13); border-color: rgba(255,255,255,.22); }
.welcome-actions .btn-accent { --btn-bg: #e4aa54; --btn-fg: #2d1d05; --btn-border: #e4aa54; }
.welcome-actions .btn-accent:hover { background: #eeb964; border-color: #eeb964; }

.tips-list { display: flex; flex-direction: column; gap: 14px; margin-top: 14px; }
.tip-row { display: flex; gap: 10px; align-items: flex-start; }
.tip-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 21px; height: 21px; flex: none; border-radius: 50%;
  background: var(--brand-soft); color: var(--brand);
  font-family: var(--font-num); font-size: 9.5px; font-weight: 700;
}
.tip-row p { font-size: 11px; line-height: 1.6; color: var(--muted); }
.tip-row p strong { display: block; margin-bottom: 1px; color: var(--ink-2); font-weight: 600; font-size: 11.5px; }

/* =========================================================
   Tables
   ========================================================= */

.table-card { overflow: hidden; }
.table-card .card-head { padding-bottom: 13px; }
.table-wrap { width: 100%; overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; table-layout: fixed; text-align: left; }
.data-table th {
  padding: 10px 16px; background: #faf8f3;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  color: var(--muted); font-size: 9.5px; font-weight: 700;
  letter-spacing: .06em; white-space: nowrap;
}
.data-table th:first-child { padding-left: 22px; }
.data-table th:last-child { padding-right: 22px; }
.data-table td {
  padding: 13px 16px; border-bottom: 1px solid #f2eee6;
  font-size: 11.5px; color: var(--ink-2); vertical-align: middle;
  overflow: hidden;
}
.data-table td:first-child { padding-left: 22px; }
.data-table td:last-child { padding-right: 22px; }
.data-table tbody tr { cursor: pointer; transition: background .12s; }
.data-table tbody tr:hover { background: #fbfaf6; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.cell-no { font-family: var(--font-num); font-size: 10.5px; font-weight: 600; color: var(--ink); letter-spacing: .01em; white-space: nowrap; }
.cell-no > span { display: block; overflow: hidden; text-overflow: ellipsis; }
.cell-no small { display: block; margin-top: 2px; font-family: var(--font); font-size: 9px; font-weight: 400; color: var(--muted-2); letter-spacing: 0; }
.cell-person { display: flex; align-items: center; gap: 8px; min-width: 0; }
.cell-person-info { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.cell-person-info strong { font-size: 11.5px; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cell-person-info small { font-size: 9.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 160px; }
.item-summary { display: flex; flex-direction: column; gap: 2px; max-width: 250px; }
.item-summary strong { font-size: 11px; font-weight: 500; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item-summary small { font-size: 9.5px; color: var(--muted); }
.cell-date { font-family: var(--font-num); font-size: 10.5px; color: var(--ink-2); white-space: nowrap; font-variant-numeric: tabular-nums; }
.cell-date small { display: block; font-family: var(--font); font-size: 9px; color: var(--muted-2); margin-top: 1px; }
.cell-actions { display: flex; align-items: center; justify-content: flex-end; gap: 2px; }
.row-open {
  display: inline-flex; align-items: center; gap: 3px;
  padding: 5px 6px; border: 0; border-radius: 6px;
  background: none; color: var(--muted); font-size: 10.5px; font-weight: 600;
  white-space: nowrap;
}
.row-open:hover { background: var(--brand-soft); color: var(--brand); }
.row-open .icon { width: 13px; height: 13px; }

.status {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 8px; border-radius: 100px;
  font-size: 9.5px; font-weight: 650; letter-spacing: .01em; white-space: nowrap;
  background: var(--gray-soft); color: #6e7772;
}
.status::before { content: ""; width: 4px; height: 4px; border-radius: 50%; background: currentColor; opacity: .85; }
.status-pending { background: var(--amber-soft); color: #9a6617; }
.status-approved { background: var(--blue-soft); color: #356395; }
.status-ordered { background: var(--violet-soft); color: #6c4d98; }
.status-completed { background: var(--green-soft); color: #276c4a; }
.status-rejected { background: var(--danger-soft); color: #a8433d; }
.status-cancelled { background: #f0efeb; color: #7d857f; }

.urgency {
  display: inline-flex; align-items: center; padding: 3px 7px;
  border-radius: 5px; font-size: 9px; font-weight: 650; white-space: nowrap;
  background: var(--surface-muted); color: var(--muted);
}
.urgency.urgent { background: var(--accent-soft); color: #9a6617; }
.urgency.critical { background: var(--danger-soft); color: #a8433d; }

.role-chip {
  display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px;
  border-radius: 100px; font-size: 9.5px; font-weight: 600;
  background: var(--surface-muted); color: var(--muted); white-space: nowrap;
}
.role-chip.admin { background: var(--brand-soft); color: var(--brand); }
.role-chip .icon { width: 11px; height: 11px; }
.state-dot { display: inline-flex; align-items: center; gap: 5px; font-size: 10px; color: var(--muted); }
.state-dot::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--muted-2); }
.state-dot.active { color: var(--green); }
.state-dot.active::before { background: #45a577; box-shadow: 0 0 0 3px rgba(69,165,119,.12); }

.table-empty { padding: 56px 24px; text-align: center; }
.table-empty .empty-icon { margin: 0 auto 12px; }
.table-empty h3 { font-size: 13.5px; font-weight: 600; }
.table-empty p { margin: 4px auto 15px; max-width: 330px; font-size: 11px; line-height: 1.65; color: var(--muted); }

.empty-icon {
  display: flex; align-items: center; justify-content: center;
  width: 52px; height: 52px; border-radius: 15px;
  background: var(--surface-muted); color: var(--muted);
}
.empty-icon .icon { width: 24px; height: 24px; }

/* =========================================================
   Toolbar / filters / pagination
   ========================================================= */

.list-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-bottom: 14px; flex-wrap: wrap;
}
.filter-tabs {
  display: flex; align-items: center; gap: 2px; padding: 3px;
  background: #eeeae1; border: 1px solid #e5dfd3; border-radius: 9px;
  overflow-x: auto; max-width: 100%; scrollbar-width: none;
}
.filter-tabs::-webkit-scrollbar { display: none; }
.filter-tab {
  padding: 6px 11px; border: 0; border-radius: 6px; background: none;
  color: var(--muted); font-size: 10.5px; font-weight: 600; white-space: nowrap;
  transition: background .15s, color .15s, box-shadow .15s;
}
.filter-tab:hover { color: var(--ink-2); }
.filter-tab.is-active { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(24,35,31,.08); }
.toolbar-right { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.search-box { position: relative; width: 232px; }
.search-box .icon { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); width: 15px; height: 15px; color: var(--muted-2); pointer-events: none; }
.search-box input { min-height: 36px; padding: 7px 30px 7px 33px; font-size: 11.5px; border-radius: var(--radius-xs); background: var(--surface); }
.search-clear { position: absolute; right: 5px; top: 50%; transform: translateY(-50%); width: 25px; height: 25px; border: 0; background: none; border-radius: 5px; color: var(--muted); display: flex; align-items: center; justify-content: center; }
.search-clear:hover { background: var(--surface-muted); }
.search-clear .icon { position: static; transform: none; width: 12px; height: 12px; }
.select-sm { width: auto; min-height: 36px; padding: 6px 32px 6px 10px; font-size: 11px; border-radius: var(--radius-xs); background-position: right 9px center; }

.pagination { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 20px; border-top: 1px solid var(--line); }
.pagination-info { font-size: 10px; color: var(--muted); }
.pagination-info strong { color: var(--ink-2); font-weight: 600; }
.pagination-buttons { display: flex; align-items: center; gap: 5px; }
.page-btn {
  min-width: 30px; height: 30px; padding: 0 7px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); border-radius: 6px; background: var(--surface);
  color: var(--ink-2); font-size: 10px; font-weight: 600;
}
.page-btn:hover:not(:disabled) { border-color: var(--brand-mid); color: var(--brand); }
.page-btn:disabled { opacity: .4; }
.page-btn .icon { width: 13px; height: 13px; }
.page-current { padding: 0 7px; font-size: 10px; color: var(--muted); }

/* =========================================================
   Notifications
   ========================================================= */

.notif-popover {
  position: absolute; top: calc(100% + 12px); right: 0; z-index: 60;
  width: 352px; max-width: calc(100vw - 24px);
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-lg);
  overflow: hidden;
  animation: popIn .18s ease;
}
@keyframes popIn { from { opacity: 0; transform: translateY(-5px) scale(.99); } to { opacity: 1; transform: none; } }
.notif-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px 11px; border-bottom: 1px solid #f1ede5;
}
.notif-head > div { display: flex; align-items: baseline; gap: 8px; }
.notif-head strong { font-size: 12.5px; }
.notif-head span { font-size: 9px; color: var(--muted-2); }
.notif-list { max-height: 380px; overflow-y: auto; }
.notif-item {
  display: flex; align-items: flex-start; gap: 10px; width: 100%;
  padding: 12px 16px; border: 0; border-bottom: 1px solid #f4f0e9;
  background: none; text-align: left;
}
.notif-item:last-child { border-bottom: 0; }
.notif-item:hover { background: #fbfaf6; }
.notif-dot { width: 6px; height: 6px; margin-top: 6px; border-radius: 50%; background: var(--brand-mid); flex: none; }
.notif-dot.amber { background: var(--accent); }
.notif-main { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.notif-main strong { font-size: 10.5px; font-weight: 600; color: var(--ink); line-height: 1.4; }
.notif-main small { font-size: 9.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.notif-time { margin-left: auto; flex: none; font-size: 8.5px; color: var(--muted-2); white-space: nowrap; }
.notif-empty { padding: 30px 20px; text-align: center; color: var(--muted); font-size: 10.5px; }
.notif-empty .icon { margin: 0 auto 7px; width: 22px; height: 22px; color: var(--muted-2); }

/* =========================================================
   Compose request
   ========================================================= */

.compose-layout { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 17px; align-items: start; }
.compose-main { min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.form-card { padding: 22px; }
.form-section-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 18px; }
.form-section-head h2 { font-size: 14.5px; letter-spacing: -.015em; }
.form-section-head p { margin-top: 4px; font-size: 10.5px; color: var(--muted); line-height: 1.55; }
.section-badge {
  display: inline-flex; align-items: center; gap: 5px; flex: none;
  padding: 4px 8px; border-radius: 100px;
  background: var(--brand-soft); color: var(--brand);
  font-family: var(--font-num); font-size: 9px; font-weight: 700;
}
.section-badge .icon { width: 11px; height: 11px; }

.item-list { display: flex; flex-direction: column; gap: 11px; }
.item-editor {
  padding: 15px 16px 16px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.item-editor-head { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.item-number {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border-radius: 6px;
  background: var(--brand); color: #fff;
  font-family: var(--font-num); font-size: 9px; font-weight: 700;
}
.item-editor-head strong { font-size: 11px; color: var(--ink-2); font-weight: 650; }
.item-remove {
  display: inline-flex; align-items: center; gap: 4px; margin-left: auto;
  padding: 4px 6px; border: 0; border-radius: 5px; background: none;
  color: var(--muted); font-size: 9.5px;
}
.item-remove:hover { background: var(--danger-soft); color: var(--danger); }
.item-remove .icon { width: 12px; height: 12px; }
.item-grid { display: grid; grid-template-columns: 1fr 1fr 1fr 1fr; gap: 11px; }
.item-grid .span-2 { grid-column: span 2; }
.item-grid .span-full { grid-column: 1 / -1; }
.item-grid .field > label { font-size: 10.5px; }
.item-grid input, .item-grid select { min-height: 38px; font-size: 12px; padding: 7px 10px; }
.item-grid select { padding-right: 32px; background-position: right 10px center; }
.add-item-button {
  display: flex; align-items: center; justify-content: center; gap: 7px;
  width: 100%; margin-top: 11px; padding: 11px;
  border: 1px dashed #cfc7b8; border-radius: 10px;
  background: transparent; color: var(--muted);
  font-size: 11.5px; font-weight: 600;
  transition: border-color .15s, color .15s, background .15s;
}
.add-item-button:hover { border-color: var(--brand-mid); background: rgba(23,89,76,.035); color: var(--brand); }
.add-item-button .icon { width: 15px; height: 15px; }
.add-item-button:disabled { opacity: .45; }

.compose-note { margin-top: 16px; }
.compose-note textarea { min-height: 88px; }

.compose-summary { position: sticky; top: 86px; }
.summary-card { padding: 20px; }
.summary-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 15px; }
.summary-head h2 { font-size: 14px; }
.summary-head p { margin-top: 3px; font-size: 9.5px; color: var(--muted); }
.summary-count { font-family: var(--font-num); font-size: 23px; font-weight: 650; line-height: 1; letter-spacing: -.04em; white-space: nowrap; }
.summary-count small { margin-left: 2px; font-family: var(--font); font-size: 9px; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.summary-list { display: flex; flex-direction: column; gap: 1px; max-height: 250px; overflow-y: auto; margin: 0 -4px 15px; padding: 0 4px; }
.summary-item { display: flex; align-items: flex-start; gap: 8px; padding: 7px 0; border-bottom: 1px solid #f3efe7; }
.summary-item:last-child { border-bottom: 0; }
.summary-item-dot { width: 4px; height: 4px; margin-top: 6px; border-radius: 50%; background: var(--accent); flex: none; }
.summary-item-main { min-width: 0; flex: 1; }
.summary-item-main strong { display: block; font-size: 10.5px; font-weight: 600; color: var(--ink-2); line-height: 1.45; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.summary-item-main small { display: block; font-size: 9px; color: var(--muted); margin-top: 1px; }
.summary-item-qty { flex: none; font-family: var(--font-num); font-size: 9.5px; color: var(--brand); font-weight: 600; white-space: nowrap; }
.summary-empty { padding: 18px 10px; border: 1px dashed var(--line-strong); border-radius: 9px; text-align: center; color: var(--muted-2); font-size: 10px; line-height: 1.6; margin-bottom: 15px; }
.summary-meta { display: flex; flex-direction: column; gap: 8px; padding: 12px 0; margin-bottom: 14px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.summary-meta-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 10px; color: var(--muted); }
.summary-meta-row strong { color: var(--ink-2); font-weight: 600; font-size: 10px; text-align: right; }
.summary-tip { display: flex; gap: 7px; margin-top: 12px; padding: 9px 10px; background: var(--accent-soft); border-radius: 8px; }
.summary-tip .icon { width: 13px; height: 13px; color: var(--accent-dark); flex: none; margin-top: 1px; }
.summary-tip p { font-size: 9px; line-height: 1.55; color: #866126; }
.summary-submit { margin-top: 15px; }
.item-remove:disabled { opacity: .35; pointer-events: none; }

.page-warning { margin-bottom: 17px; align-items: center; }
.page-warning p { flex: 1; }
.page-warning .btn { flex: none; }

.mini-empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 24px 12px; text-align: center; color: var(--muted);
  font-size: 10.5px; line-height: 1.7;
}
.mini-empty .empty-icon { width: 40px; height: 40px; border-radius: 12px; margin-bottom: 8px; }
.mini-empty .empty-icon .icon { width: 19px; height: 19px; }
.mini-empty p { margin: 0; }

.error-panel {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 46px 22px; text-align: center;
}
.error-panel .empty-icon { margin-bottom: 12px; background: var(--danger-soft); color: var(--danger); }
.error-panel h2 { font-size: 15px; }
.error-panel p { margin: 5px 0 15px; font-size: 11px; color: var(--muted); line-height: 1.65; }

.table-count { font-size: 10.5px; color: var(--muted); white-space: nowrap; }

.data-table td[data-label=""]::before { display: none; }

/* =========================================================
   Drawer / detail
   ========================================================= */

.overlay {
  position: fixed; inset: 0; z-index: 80;
  background: rgba(9, 25, 21, .46);
  backdrop-filter: blur(3px);
  animation: fadeIn .2s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 81;
  width: min(620px, 100vw);
  display: flex; flex-direction: column;
  background: var(--bg);
  box-shadow: -30px 0 80px -30px rgba(9, 25, 21, .5);
  animation: drawerIn .28s cubic-bezier(.32, .72, .35, 1);
}
.drawer:focus { outline: none; }
@keyframes drawerIn { from { transform: translateX(40px); opacity: .6; } to { transform: none; opacity: 1; } }
.drawer-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 16px; padding: 23px 26px 18px;
  background: var(--surface); border-bottom: 1px solid var(--line);
}
.drawer-head-copy { min-width: 0; }
.drawer-head .eyebrow { margin-bottom: 5px; }
.drawer-title-row { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.drawer-title-row h2 { font-family: var(--font-num); font-size: 19px; font-weight: 650; letter-spacing: -.02em; }
.drawer-head-sub { margin-top: 5px; font-size: 10.5px; color: var(--muted); }
.drawer-close { flex: none; }
.drawer-content { flex: 1; overflow-y: auto; padding: 18px 26px 26px; }
.drawer-foot {
  padding: 13px 26px; background: var(--surface);
  border-top: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.drawer-foot-note { font-size: 9.5px; color: var(--muted-2); }
.drawer-foot-actions { display: flex; gap: 7px; flex-wrap: wrap; justify-content: flex-end; }

.detail-block { margin-bottom: 13px; }
.detail-block:last-child { margin-bottom: 0; }
.detail-card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; }
.detail-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.detail-card-head h3 { font-size: 11px; font-weight: 700; letter-spacing: .04em; color: var(--muted); text-transform: uppercase; }
.detail-card-head .text-button { font-size: 10px; }

.detail-meta-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px 18px; }
.meta-item { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.meta-item .meta-label { font-size: 9px; color: var(--muted-2); display: flex; align-items: center; gap: 4px; }
.meta-item .meta-label .icon { width: 11px; height: 11px; }
.meta-item .meta-value { font-size: 11px; color: var(--ink-2); font-weight: 500; line-height: 1.5; overflow-wrap: anywhere; }
.meta-item .meta-value.strong { font-weight: 600; color: var(--ink); }

.detail-items { width: 100%; border-collapse: collapse; }
.detail-items th { padding: 0 8px 7px; border-bottom: 1px solid var(--line); font-size: 8.5px; font-weight: 700; letter-spacing: .05em; color: var(--muted-2); text-align: left; white-space: nowrap; }
.detail-items th:first-child { padding-left: 0; }
.detail-items th:last-child { padding-right: 0; text-align: right; }
.detail-items td { padding: 10px 8px; border-bottom: 1px solid #f3efe7; font-size: 10.5px; color: var(--ink-2); vertical-align: top; }
.detail-items td:first-child { padding-left: 0; }
.detail-items td:last-child { padding-right: 0; text-align: right; }
.detail-items tr:last-child td { border-bottom: 0; padding-bottom: 0; }
.detail-item-name { font-weight: 600; color: var(--ink); font-size: 11px; }
.detail-item-sub { display: block; margin-top: 2px; font-size: 9px; color: var(--muted); line-height: 1.45; }
.detail-item-qty { font-family: var(--font-num); font-weight: 650; color: var(--brand); white-space: nowrap; font-size: 11px; }
.detail-item-cat { display: inline-block; padding: 2px 6px; border-radius: 4px; background: var(--surface-muted); color: var(--muted); font-size: 8.5px; white-space: nowrap; }

.note-box {
  padding: 11px 13px; border-radius: 9px;
  background: var(--surface-soft); border: 1px solid #f1ece2;
  font-size: 10.5px; color: var(--ink-2); line-height: 1.7; white-space: pre-wrap; overflow-wrap: anywhere;
}
.note-box.empty { color: var(--muted-2); font-style: normal; }
.note-box.admin { background: #fbf5e9; border-color: #f2e4c9; color: #6d5323; }
.note-label { display: flex; align-items: center; gap: 5px; margin-bottom: 6px; font-size: 9px; font-weight: 700; letter-spacing: .05em; color: var(--muted); text-transform: uppercase; }
.note-label .icon { width: 11px; height: 11px; }

.detail-admin-note { width: 100%; min-height: 82px; font-size: 11px; background: var(--surface-soft); }
.detail-note-actions { display: flex; justify-content: flex-end; margin-top: 8px; }

.timeline { position: relative; display: flex; flex-direction: column; gap: 0; }
.timeline-item { position: relative; display: flex; gap: 11px; padding-bottom: 15px; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-rail { position: relative; width: 17px; flex: none; display: flex; justify-content: center; }
.timeline-rail::before { content: ""; position: absolute; top: 5px; bottom: -15px; width: 1px; background: #e6e1d6; }
.timeline-item:last-child .timeline-rail::before { display: none; }
.timeline-dot { position: relative; z-index: 1; width: 8px; height: 8px; margin-top: 4px; border-radius: 50%; background: #c9c2b4; border: 2px solid var(--surface); box-shadow: 0 0 0 1px #ddd6c7; }
.timeline-item.is-done .timeline-dot { background: var(--brand-mid); box-shadow: 0 0 0 1px var(--brand-mid); }
.timeline-item.is-current .timeline-dot { background: var(--accent); box-shadow: 0 0 0 3px rgba(223,157,62,.16); }
.timeline-item.is-rejected .timeline-dot { background: var(--danger); box-shadow: 0 0 0 3px rgba(196,81,74,.13); }
.timeline-body { min-width: 0; flex: 1; }
.timeline-title { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.timeline-title strong { font-size: 10.5px; font-weight: 600; color: var(--ink-2); }
.timeline-title time { flex: none; font-size: 8.5px; color: var(--muted-2); white-space: nowrap; }
.timeline-body p { margin-top: 2px; font-size: 9.5px; color: var(--muted); line-height: 1.55; }
.timeline-note { margin-top: 4px; padding: 5px 7px; border-radius: 5px; background: var(--surface-soft); font-size: 9.5px; color: var(--ink-2); line-height: 1.5; }
.timeline-actor { display: inline-flex; align-items: center; gap: 4px; }

.detail-hero {
  display: flex; align-items: center; gap: 13px;
  padding: 14px; background: var(--surface); border: 1px solid var(--line);
  border-radius: 12px; margin-bottom: 13px;
}
.detail-hero .avatar { width: 40px; height: 40px; }
.detail-hero-info { min-width: 0; flex: 1; }
.detail-hero-info strong { display: block; font-size: 13px; font-weight: 650; }
.detail-hero-info span { display: block; margin-top: 2px; font-size: 10px; color: var(--muted); }
.detail-hero-tags { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; }

/* =========================================================
   Modals
   ========================================================= */

.modal-wrap {
  position: fixed; inset: 0; z-index: 90;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  background: rgba(9, 25, 21, .46);
  backdrop-filter: blur(3px);
  animation: fadeIn .18s ease;
}
.modal-card {
  width: 100%; max-width: 430px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 18px; box-shadow: var(--shadow-lg);
  padding: 25px 25px 20px;
  animation: modalIn .22s cubic-bezier(.34, 1.3, .64, 1);
}
.modal-card:focus { outline: none; }
@keyframes modalIn { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }
.modal-card.modal-wide { max-width: 520px; }
.modal-icon {
  display: flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; margin-bottom: 14px;
  border-radius: 12px; background: var(--brand-soft); color: var(--brand);
}
.modal-icon .icon { width: 21px; height: 21px; }
.modal-icon.danger { background: var(--danger-soft); color: var(--danger); }
.modal-icon.amber { background: var(--accent-soft); color: var(--accent-dark); }
.modal-card h2 { font-size: 18px; line-height: 1.35; letter-spacing: -.025em; }
.modal-card .modal-desc { margin-top: 7px; font-size: 11.5px; line-height: 1.7; color: var(--muted); }
.modal-card .modal-desc strong { color: var(--ink-2); font-weight: 600; }
.modal-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin-top: 20px; }
.modal-field { margin-top: 15px; }
.modal-hint { margin-top: 8px; padding: 9px 11px; background: var(--surface-soft); border-radius: 8px; font-size: 10px; color: var(--muted); line-height: 1.6; }

.success-card { text-align: center; padding-top: 30px; }
.success-mark {
  width: 58px; height: 58px; margin: 0 auto 15px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%; background: var(--green-soft); color: var(--green);
  animation: successPop .45s cubic-bezier(.34, 1.4, .64, 1);
}
.success-mark .icon { width: 28px; height: 28px; stroke-width: 2.2; }
@keyframes successPop { 0% { transform: scale(.5); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
.success-card h2 { font-size: 20px; }
.success-card .modal-desc { margin-top: 6px; }
.success-no {
  display: inline-flex; align-items: center; gap: 7px;
  margin-top: 14px; padding: 7px 12px; border-radius: 7px;
  background: var(--surface-soft); border: 1px solid var(--line);
  font-family: var(--font-num); font-size: 11.5px; font-weight: 600; color: var(--brand);
  letter-spacing: .02em;
}
.success-actions { display: flex; gap: 8px; margin-top: 20px; }
.success-actions .btn { flex: 1; }
.copy-value { display: flex; align-items: center; gap: 8px; margin-top: 12px; padding: 10px 12px; border-radius: 8px; background: var(--surface-soft); border: 1px dashed var(--line-strong); }
.copy-value code { flex: 1; font-family: ui-monospace, Consolas, monospace; font-size: 13px; letter-spacing: .1em; color: var(--ink); }

/* =========================================================
   Users / settings
   ========================================================= */

.mini-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 11px; margin-bottom: 15px; }
.mini-stat {
  display: flex; align-items: center; gap: 11px;
  padding: 13px 15px; background: var(--surface);
  border: 1px solid var(--line); border-radius: 11px;
}
.mini-stat-icon { width: 30px; height: 30px; border-radius: 8px; background: var(--surface-muted); display: flex; align-items: center; justify-content: center; color: var(--muted); flex: none; }
.mini-stat-icon .icon { width: 15px; height: 15px; }
.mini-stat p { display: flex; flex-direction: column; }
.mini-stat strong { font-family: var(--font-num); font-size: 18px; line-height: 1.1; font-weight: 650; letter-spacing: -.03em; }
.mini-stat small { font-size: 9.5px; color: var(--muted); margin-top: 1px; }

.user-cell { display: flex; align-items: center; gap: 9px; min-width: 150px; }
.user-cell-info { display: flex; flex-direction: column; gap: 1px; }
.user-cell-info strong { font-size: 11.5px; font-weight: 600; color: var(--ink); }
.user-cell-info small { font-size: 9.5px; color: var(--muted); }
.current-tag { display: inline-block; margin-left: 4px; padding: 1px 5px; border-radius: 4px; background: var(--brand-soft); color: var(--brand); font-size: 8px; font-weight: 600; vertical-align: 1px; }
.user-actions { display: flex; justify-content: flex-end; gap: 3px; flex-wrap: wrap; }
.user-actions .btn { min-height: 27px; padding: 3px 8px; font-size: 9.5px; border-radius: 5px; }
.user-actions .btn .icon { width: 12px; height: 12px; }
.user-actions .btn-icon-only { width: 28px; min-width: 28px; padding: 0; }
.user-actions .btn-icon-only .icon { width: 13px; height: 13px; }
.mobile-action-label { display: none; }

.settings-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(300px, .85fr); gap: 17px; align-items: start; }
.settings-stack { display: flex; flex-direction: column; gap: 14px; }
.profile-head { display: flex; align-items: center; gap: 13px; padding-bottom: 17px; margin-bottom: 17px; border-bottom: 1px solid var(--line); }
.profile-head .avatar { width: 52px; height: 52px; font-size: 17px; }
.profile-edit { margin-left: auto; flex: none; align-self: flex-start; }
.profile-head-info h2 { font-size: 17px; letter-spacing: -.02em; }
.profile-head-info p { margin-top: 3px; font-size: 10.5px; color: var(--muted); }
.profile-head-badges { display: flex; gap: 5px; margin-top: 6px; }
.profile-rows { display: flex; flex-direction: column; }
.profile-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 11px 0; border-bottom: 1px solid #f4f0e9; font-size: 11px; }
.profile-row:last-child { border-bottom: 0; }
.profile-row dt { color: var(--muted); display: flex; align-items: center; gap: 7px; }
.profile-row dt .icon { width: 14px; height: 14px; color: var(--muted-2); }
.profile-row dd { margin: 0; color: var(--ink-2); font-weight: 500; text-align: right; overflow-wrap: anywhere; }
.settings-form { display: flex; flex-direction: column; gap: 13px; margin-top: 15px; }
.settings-form .btn { align-self: flex-start; margin-top: 2px; }
.install-app-row { display: flex; align-items: center; gap: 12px; margin-bottom: 13px; }
.install-app-icon { width: 54px; height: 54px; border-radius: 13px; box-shadow: var(--shadow-sm); flex: none; }
.install-app-copy { display: flex; flex-direction: column; gap: 1px; }
.install-app-copy strong { font-size: 14px; font-weight: 650; letter-spacing: -.01em; }
.install-app-copy span { font-size: 10px; color: var(--muted); }
.install-app-button { margin-bottom: 14px; }
.install-app-button:disabled { background: var(--surface-muted); border-color: var(--line); color: var(--muted); opacity: 1; }
.install-instructions { display: flex; flex-direction: column; gap: 6px; padding: 11px 12px; background: var(--surface-soft); border: 1px solid #f1ece2; border-radius: 9px; }
.install-instructions p { font-size: 9.5px; line-height: 1.6; color: var(--muted); }
.install-instructions strong { color: var(--ink-2); font-weight: 600; margin-right: 4px; }
.install-note { margin-top: 9px; font-size: 8.8px; line-height: 1.6; color: var(--muted-2); }

.warning-box {
  display: flex; gap: 10px; padding: 13px 14px;
  background: var(--accent-soft); border: 1px solid #f0dfc2; border-radius: 10px;
}
.warning-box .icon { width: 17px; height: 17px; color: var(--accent-dark); flex: none; margin-top: 1px; }
.warning-box p { font-size: 10.5px; line-height: 1.65; color: #76551e; }
.warning-box p strong { display: block; margin-bottom: 2px; color: #5f4314; font-size: 11px; }
.info-list { display: flex; flex-direction: column; gap: 0; margin-top: 7px; }
.info-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 9px 0; border-bottom: 1px solid #f4f0e9; font-size: 10.5px; }
.info-row:last-child { border-bottom: 0; }
.info-row span { color: var(--muted); }
.info-row strong { font-weight: 500; color: var(--ink-2); font-family: var(--font-num); font-size: 10px; }
.info-row strong.mono { font-family: ui-monospace, Consolas, monospace; }
.settings-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }

/* =========================================================
   Toasts
   ========================================================= */

.toast-region {
  position: fixed; top: 20px; right: 20px; z-index: 120;
  display: flex; flex-direction: column; gap: 8px;
  width: min(360px, calc(100vw - 32px));
  pointer-events: none;
}
.toast {
  display: flex; align-items: flex-start; gap: 9px;
  padding: 12px 14px;
  background: #16362f; color: #f1f7f3;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 10px; box-shadow: 0 15px 40px -18px rgba(9,25,21,.7);
  font-size: 11.5px; line-height: 1.5;
  pointer-events: auto;
  animation: toastIn .25s cubic-bezier(.32,.72,.35,1);
}
.toast.is-leaving { animation: toastOut .2s ease forwards; }
.toast .icon { width: 16px; height: 16px; margin-top: 1px; flex: none; color: #84c5a7; }
.toast.error { background: #4a211f; border-color: rgba(255,255,255,.08); }
.toast.error .icon { color: #f0a8a3; }
.toast.info .icon { color: #edc68c; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-6px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateX(8px); } }

/* =========================================================
   Skeleton / loading
   ========================================================= */

.skeleton {
  position: relative; overflow: hidden;
  background: #ece8df; border-radius: 7px;
}
.skeleton::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.55), transparent);
  transform: translateX(-100%);
  animation: shimmer 1.4s infinite;
}
@keyframes shimmer { 100% { transform: translateX(100%); } }
.skeleton-page { display: flex; flex-direction: column; gap: 17px; padding-top: 10px; }
.skeleton-head { width: 42%; height: 32px; margin-bottom: 4px; }
.skeleton-sub { width: 56%; height: 14px; }
.skeleton-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 13px; }
.skeleton-card { height: 112px; border-radius: var(--radius); }
.skeleton-panel { height: 280px; border-radius: var(--radius); }

/* =========================================================
   Responsive
   ========================================================= */

@media (max-width: 1180px) {
  :root { --sidebar-w: 228px; }
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .compose-layout { grid-template-columns: minmax(0, 1fr) 300px; }
  .dashboard-grid { grid-template-columns: minmax(0, 1.45fr) minmax(280px, 1fr); }
  .lower-grid { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 1020px) {
  .auth { grid-template-columns: minmax(0, 1fr) minmax(430px, .95fr); }
  .auth-brand { padding: 34px 36px 26px; }
  .auth-hero h1 { font-size: 39px; }
  .auth-preview { max-width: 360px; }
  .auth-points { display: none; }
  .compose-layout { grid-template-columns: 1fr; }
  .compose-summary { position: static; order: 2; }
  .compose-main { order: 1; }
  .summary-card { display: grid; grid-template-columns: 1fr 1fr; gap: 0 22px; }
  .summary-head { grid-column: 1 / -1; }
  .summary-list { grid-column: 1; }
  .summary-side { grid-column: 2; }
  .summary-meta { border-top: 0; margin-top: 0; padding-top: 0; }
  .summary-tip { grid-column: 1 / -1; }
  .summary-submit { grid-column: 1 / -1; }
  .summary-card .btn-block { margin-top: 2px; }
}

@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed; left: 0; top: 0; bottom: 0; z-index: 40;
    width: min(280px, 86vw); height: 100dvh;
    transform: translateX(-102%);
    transition: transform .25s cubic-bezier(.32,.72,.35,1);
    box-shadow: 30px 0 80px -30px rgba(9,25,21,.5);
  }
  .app.sidebar-open .sidebar { transform: none; }
  .app.sidebar-open .sidebar-scrim { display: block; }
  .sidebar-close { display: inline-flex; }
  .menu-button { display: inline-flex; }
  .topbar { height: 62px; padding: 0 18px; }
  .page { padding: 22px 18px 44px; }
  .topbar-user-text, .topbar-user .chevron { display: none; }
  .topbar-user { margin-left: 0; padding: 3px; border: 0; }
  .dashboard-grid, .lower-grid, .dashboard-grid.equal { grid-template-columns: 1fr; }
  .settings-grid { grid-template-columns: 1fr; }
  .auth { grid-template-columns: 1fr; }
  .auth-brand { min-height: auto; padding: 26px 26px 30px; }
  .auth-hero { padding: 32px 0 0; max-width: none; }
  .auth-hero h1 { font-size: 36px; }
  .auth-lead { margin-top: 13px; font-size: 12.5px; max-width: 480px; }
  .auth-preview { display: none; }
  .auth-points { display: none; }
  .auth-copyright { display: none; }
  .auth-panel { padding: 24px 20px 34px; justify-content: flex-start; }
  .auth-card { max-width: 520px; padding: 28px 26px 24px; }
  .auth-brand::after { display: none; }
}

@media (min-width: 721px) and (max-width: 1120px) {
  .table-wrap { overflow-x: auto; }
  .data-table.table-full, .data-table.table-users { min-width: 850px; }
}

@media (max-width: 720px) {
  .page-head { flex-direction: column; align-items: flex-start; gap: 14px; }
  .page-actions { width: 100%; }
  .page-actions .btn { flex: 1; }
  .live-pill { display: none; }
  .breadcrumb { font-size: 10.5px; }
  .stat-grid { gap: 9px; }
  .stat-card { padding: 14px 14px 12px; }
  .stat-value { font-size: 26px; }
  .stat-hint { font-size: 9px; }
  .stat-kicker { font-size: 9.5px; }
  .stat-icon { width: 29px; height: 29px; }
  .stat-icon .icon { width: 15px; height: 15px; }
  .welcome-strip { flex-direction: column; align-items: flex-start; gap: 13px; padding: 18px; }
  .welcome-actions { width: 100%; }
  .welcome-actions .btn { flex: 1; }
  .chart { height: 170px; }
  .item-grid { grid-template-columns: 1fr 1fr; }
  .item-grid .span-2 { grid-column: span 2; }
  .item-grid .span-full { grid-column: 1 / -1; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .span-2 { grid-column: auto; }
  .segmented { grid-template-columns: 1fr; }
  .segmented label { flex-direction: row; align-items: baseline; gap: 6px; }
  .toolbar-right { width: 100%; }
  .search-box { width: auto; flex: 1 1 190px; min-width: 0; }
  .select-sm { flex: 0 0 auto; }
  .list-toolbar { gap: 9px; }
  .filter-tabs { width: 100%; }
  .table-card { border: 0; background: transparent; box-shadow: none; }
  .table-card .card-head { padding: 0 2px 10px; }
  .table-wrap { overflow: visible; }
  .data-table, .data-table tbody, .data-table tr, .data-table td { display: block; width: 100%; }
  .data-table colgroup { display: none; }
  .data-table thead { display: none; }
  .data-table td { overflow: visible; }
  .data-table tbody tr {
    margin-bottom: 9px; padding: 12px 15px;
    background: var(--surface); border: 1px solid var(--line);
    border-radius: 12px; box-shadow: var(--shadow-xs);
  }
  .data-table tbody tr:hover { background: var(--surface); }
  .data-table td {
    display: flex; align-items: flex-start; justify-content: space-between; gap: 15px;
    padding: 5px 0 !important; border: 0; font-size: 11px; text-align: right;
  }
  .data-table td::before {
    content: attr(data-label); flex: none;
    font-size: 9.5px; color: var(--muted-2); text-align: left; padding-top: 1px;
  }
  .data-table td.cell-no { display: flex; justify-content: space-between; width: 100%; padding-bottom: 8px !important; margin-bottom: 5px; border-bottom: 1px dashed #eee9df; font-size: 10.5px; }
  .data-table td.cell-no::before { content: "报送单号"; }
  .data-table td.cell-person { min-width: 0; }
  .data-table td.cell-actions { display: none; }
  .cell-person-info { align-items: flex-end; }
  .cell-person-info small { max-width: 190px; }
  .item-summary { max-width: 190px; align-items: flex-end; }
  .item-summary strong { white-space: normal; }
  .cell-date { font-size: 10px; }
  .pagination { padding: 12px 2px; border-top: 0; }
  .card-head { padding: 16px 17px 0; }
  .card-body { padding: 15px 17px 17px; }
  .trend-card .card-body { padding: 10px 17px 14px; }
  .chart-bars { gap: 5px; }
  .bar-track { max-width: 26px; }
  .bar-col .bar-label { font-size: 8.5px; }
  .bar-value { font-size: 8.5px; }
  .drawer { width: 100vw; }
  .drawer-head { padding: 19px 18px 15px; }
  .drawer-content { padding: 15px 18px 24px; }
  .drawer-foot { padding: 11px 18px; }
  .drawer-foot-note { display: none; }
  .detail-meta-grid { gap: 11px 14px; }
  .mini-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
  .mini-stat { padding: 10px 9px; gap: 8px; }
  .mini-stat-icon { width: 27px; height: 27px; }
  .mini-stat strong { font-size: 16px; }
  .mini-stat small { font-size: 8.5px; }
  .user-actions { justify-content: flex-end; width: 100%; gap: 5px; }
  .user-actions .btn-icon-only { width: auto; min-width: 0; padding: 0 8px; gap: 3px; }
  .mobile-action-label { display: inline; font-size: 9.5px; }
  .data-table td[data-label="成员"] { display: block; padding: 4px 0 10px !important; margin-bottom: 4px; border-bottom: 1px dashed #eee9df; }
  .data-table td[data-label="成员"]::before { display: none; }
  .data-table td[data-label="成员"] .user-cell-info { align-items: flex-start; }
  .data-table td[data-label=""] { padding-top: 9px !important; }
  .toast-region { top: 12px; right: 12px; }
  .notif-popover { position: fixed; top: 58px; left: 12px; right: 12px; width: auto; }
  .summary-card { display: block; }
  .summary-list { max-height: none; }
  .summary-meta { border-top: 1px solid var(--line); padding-top: 12px; margin-top: 12px; }
}

@media (max-width: 520px) {
  .auth-brand { padding: 22px 20px 26px; }
  .auth-hero h1 { font-size: 31px; }
  .auth-kicker { margin-bottom: 14px; font-size: 10.5px; }
  .auth-lead { font-size: 11.5px; line-height: 1.8; }
  .auth-panel { padding: 18px 12px 30px; }
  .auth-card { padding: 24px 18px 22px; border-radius: 20px; }
  .auth-card-head h2 { font-size: 22px; }
  .auth-form .form-grid { gap: 12px; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .stat-hint { display: none; }
  .stat-value small { display: none; }
  .page-head h1 { font-size: 24px; }
  .page-head .page-sub { font-size: 11.5px; }
  .topbar { padding: 0 12px; }
  .page { padding: 18px 12px 38px; }
  .stat-card { padding: 12px; }
  .stat-kicker { font-size: 9px; }
  .stat-value { font-size: 24px; margin-top: 8px; }
  .stat-foot { margin-top: 6px; }
  .card-head { padding: 14px 14px 0; }
  .card-body { padding: 13px 14px 15px; }
  .trend-card .card-body { padding: 8px 12px 12px; }
  .chart-y { display: none; }
  .chart { height: 155px; }
  .bar-track { max-width: 22px; }
  .bar-col .bar-label { font-size: 8px; }
  .topbar-user .avatar { width: 30px; height: 30px; font-size: 10.5px; }
  .notif-button { width: 34px; height: 34px; }
  .data-table tbody tr { padding: 11px 13px; }
  .item-editor { padding: 13px; }
  .item-grid { gap: 9px; }
  .form-card { padding: 17px 14px; }
  .summary-card { padding: 17px 15px; }
  .modal-card { padding: 21px 18px 17px; border-radius: 16px; }
  .modal-actions .btn { flex: 1; }
  .success-actions { flex-direction: column; }
  .profile-row { gap: 12px; font-size: 10.5px; }
  .profile-row dd { max-width: 60%; }
  .detail-card { padding: 14px; }
  .detail-items th:nth-child(2), .detail-items td:nth-child(2) { display: none; }
  .category-row { grid-template-columns: 70px minmax(0,1fr) 24px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .001ms !important;
  }
}
