:root {
  --bg: #f3f6fb;
  --surface: #ffffff;
  --surface-soft: #f8fafd;
  --surface-muted: #f1f5fa;
  --border: #e4eaf2;
  --border-strong: #d5ddea;
  --text: #172033;
  --text-soft: #45516a;
  --muted: #7a869c;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-soft: #eaf1ff;
  --primary-softer: #f4f8ff;
  --green: #0f8a5f;
  --green-soft: #e7f8f0;
  --red: #dc2626;
  --red-dark: #b91c1c;
  --red-soft: #fdecec;
  --amber: #b45309;
  --amber-soft: #fff5e6;
  --purple: #7c3aed;
  --purple-soft: #f2ecff;
  --sidebar: #0d1729;
  --sidebar-soft: #16233b;
  --sidebar-text: #a9b6cd;
  --radius: 12px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.04);
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.04), 0 10px 30px rgba(16, 24, 40, 0.06);
  --shadow-lg: 0 24px 60px rgba(15, 23, 42, 0.24);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", system-ui, -apple-system, sans-serif;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
body.modal-open { overflow: hidden; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
svg { flex: none; }
h1, h2, h3, h4, p { margin: 0; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.text-danger { color: var(--red-dark); }
.small { font-size: 12px; }
.nowrap { white-space: nowrap; }
.ico { width: 18px; height: 18px; }

/* ---------- shared components ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 9px 16px; border-radius: 9px; border: 1px solid var(--border-strong);
  background: var(--surface); color: var(--text-soft); font-weight: 600;
  font-size: 13px; line-height: 1.4; transition: all .16s ease; white-space: nowrap;
  text-decoration: none;
}
.btn:hover { border-color: #c3cedd; background: #fbfcfe; text-decoration: none; }
.btn:disabled { opacity: .6; cursor: not-allowed; }
.btn .ico { width: 16px; height: 16px; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; box-shadow: 0 4px 12px rgba(37, 99, 235, .22); }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); }
.btn-success { background: var(--green); border-color: var(--green); color: #fff; box-shadow: 0 4px 12px rgba(15, 138, 95, .18); }
.btn-success:hover { background: #0b7551; border-color: #0b7551; }
.btn-danger { background: var(--red); border-color: var(--red); color: #fff; }
.btn-danger:hover { background: var(--red-dark); border-color: var(--red-dark); }
.btn-danger-ghost { color: var(--red); border-color: #f3c7c7; background: #fff; }
.btn-danger-ghost:hover { background: var(--red-soft); border-color: #eeb4b4; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--text-soft); }
.btn-ghost:hover { background: var(--surface-muted); border-color: transparent; }
.btn-sm { padding: 6px 11px; font-size: 12px; border-radius: 8px; }
.btn-sm .ico { width: 14px; height: 14px; }
.btn-block { width: 100%; }
.btn.is-loading { pointer-events: none; }

.icon-btn {
  width: 36px; height: 36px; border-radius: 9px; border: 1px solid transparent;
  background: transparent; color: var(--muted); display: inline-flex; align-items: center;
  justify-content: center; transition: all .15s ease;
}
.icon-btn:hover { background: var(--surface-muted); color: var(--text); }
.icon-btn .ico { width: 18px; height: 18px; }

.field { display: flex; flex-direction: column; gap: 7px; }
.field > label { font-size: 13px; font-weight: 600; color: var(--text-soft); }
.field > label .req { color: var(--red); margin-left: 2px; }
.field .hint { font-size: 12px; color: var(--muted); line-height: 1.5; }
.check-line {
  display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600;
  color: var(--text-soft); cursor: pointer;
}
.check-line input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--primary); }
.input, .select, .textarea {
  width: 100%; border: 1px solid var(--border-strong); border-radius: 9px;
  background: #fff; padding: 10px 12px; font-size: 14px; color: var(--text);
  outline: none; transition: border-color .15s ease, box-shadow .15s ease;
}
.textarea { resize: vertical; min-height: 96px; line-height: 1.65; }
.input:focus, .select:focus, .textarea:focus {
  border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
}
.input::placeholder, .textarea::placeholder { color: #a5afc0; }
.select {
  appearance: none; -webkit-appearance: none; padding-right: 34px;
  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='%237a869c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
}
.input[type="date"] { min-height: 43px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-grid .span-2 { grid-column: span 2; }
.form-error {
  display: none; background: var(--red-soft); border: 1px solid #f4c9c9;
  color: var(--red-dark); border-radius: 9px; padding: 10px 12px; font-size: 13px;
}
.form-error.show { display: block; }

.badge {
  display: inline-flex; align-items: center; padding: 2px 9px; border-radius: 999px;
  font-size: 12px; font-weight: 600; line-height: 1.7; white-space: nowrap;
}
.sev-high { background: var(--red-soft); color: var(--red-dark); }
.sev-mid { background: var(--amber-soft); color: var(--amber); }
.sev-low { background: var(--surface-muted); color: var(--text-soft); }
.badge-green { background: var(--green-soft); color: var(--green); }
.badge-blue { background: var(--primary-soft); color: var(--primary-dark); }
.badge-gray { background: var(--surface-muted); color: var(--muted); }
.badge-red { background: var(--red-soft); color: var(--red-dark); }
.badge-amber { background: var(--amber-soft); color: var(--amber); }

.lamp-wrap { display: inline-flex; align-items: center; gap: 9px; font-weight: 600; color: var(--text-soft); white-space: nowrap; }
.lamp {
  width: 10px; height: 10px; border-radius: 50%; background: var(--green);
  box-shadow: 0 0 0 3px rgba(15, 138, 95, .14); flex: none;
}
.lamp-wrap.is-red .lamp {
  background: var(--red);
  box-shadow: 0 0 0 3px rgba(220, 38, 38, .14), 0 0 10px rgba(220, 38, 38, .45);
  animation: lampPulse 2.4s ease-in-out infinite;
}
.lamp-wrap.is-red .lamp-text { color: var(--red-dark); }
.lamp-wrap.is-green .lamp-text { color: var(--green); }
.lamp-large { gap: 12px; font-size: 15px; }
.lamp-large .lamp { width: 14px; height: 14px; }
@keyframes lampPulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(220, 38, 38, .15), 0 0 8px rgba(220, 38, 38, .35); }
  50% { box-shadow: 0 0 0 6px rgba(220, 38, 38, .06), 0 0 16px rgba(220, 38, 38, .55); }
}
@media (prefers-reduced-motion: reduce) {
  .lamp-wrap.is-red .lamp { animation: none; }
}

.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.card-pad { padding: 22px 24px; }
.card-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 16px;
  padding: 20px 24px 0;
}
.card-head h2 { font-size: 16px; font-weight: 700; letter-spacing: -.01em; }
.card-head p { font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.card-body { padding: 20px 24px 24px; }
.section-title { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 700; }
.section-title .ico { width: 17px; height: 17px; color: var(--primary); }

/* ---------- boot / auth ---------- */
.boot-screen {
  position: fixed; inset: 0; display: flex; align-items: center; justify-content: center;
  background: var(--bg); color: var(--muted); gap: 12px; z-index: 200;
}
.spinner {
  width: 16px; height: 16px; border: 2px solid currentColor; border-right-color: transparent;
  border-radius: 50%; display: inline-block; animation: spin .7s linear infinite; flex: none;
}
@keyframes spin { to { transform: rotate(360deg); } }

.auth-layout {
  min-height: 100vh; display: grid; grid-template-columns: minmax(380px, 1.05fr) minmax(420px, .95fr);
  background: #fff;
}
.auth-brand-panel {
  position: relative; overflow: hidden; padding: 54px 58px;
  background: radial-gradient(circle at 80% 8%, rgba(37, 99, 235, .42), transparent 38%),
              radial-gradient(circle at 12% 92%, rgba(16, 185, 129, .2), transparent 36%),
              linear-gradient(150deg, #0b1526 0%, #10203b 55%, #0c1a31 100%);
  color: #fff; display: flex; flex-direction: column; justify-content: space-between;
}
.auth-brand-panel::after {
  content: ""; position: absolute; width: 430px; height: 430px; border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .07); right: -180px; bottom: -140px;
  box-shadow: 0 0 0 80px rgba(255, 255, 255, .018), 0 0 0 160px rgba(255, 255, 255, .012);
}
.auth-brand { display: flex; flex-direction: column; align-items: flex-start; gap: 18px; position: relative; z-index: 1; }
.auth-logo-plate {
  width: min(286px, 100%); background: #fff; border-radius: 14px; padding: 13px 18px;
  box-shadow: 0 12px 34px rgba(0, 0, 0, .2);
}
.auth-logo-plate img { display: block; width: 100%; height: auto; }
.auth-brand-copy { display: grid; gap: 2px; }
.auth-brand-name { font-size: 18px; font-weight: 700; letter-spacing: .02em; }
.auth-brand-sub { font-size: 12px; color: rgba(255, 255, 255, .55); margin-top: 1px; }
.auth-hero { position: relative; z-index: 1; max-width: 470px; }
.auth-hero .eyebrow {
  display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 600;
  color: #93c5fd; background: rgba(37, 99, 235, .16); border: 1px solid rgba(96, 165, 250, .28);
  padding: 5px 12px; border-radius: 999px; letter-spacing: .06em;
}
.auth-hero h1 { font-size: 38px; line-height: 1.3; letter-spacing: -.02em; margin: 22px 0 16px; font-weight: 700; }
.auth-hero h1 em { font-style: normal; color: #60a5fa; }
.auth-hero > p { color: rgba(255, 255, 255, .62); font-size: 14.5px; line-height: 1.85; max-width: 420px; }
.auth-features { display: grid; gap: 16px; margin-top: 38px; }
.auth-feature { display: flex; gap: 14px; align-items: flex-start; }
.auth-feature .f-icon {
  width: 38px; height: 38px; border-radius: 10px; background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(255, 255, 255, .1); display: flex; align-items: center; justify-content: center;
  color: #93c5fd; flex: none;
}
.auth-feature b { display: block; font-size: 14px; font-weight: 600; }
.auth-feature span { font-size: 12.5px; color: rgba(255, 255, 255, .5); }
.auth-brand-foot { position: relative; z-index: 1; font-size: 12px; color: rgba(255, 255, 255, .38); }
.auth-card-wrap { display: flex; align-items: center; justify-content: center; padding: 48px 32px; background: #fff; }
.auth-card { width: 100%; max-width: 402px; }
.auth-card-logo { margin-bottom: 26px; }
.auth-card-logo img { display: block; height: 46px; width: auto; }
.auth-card .auth-kicker { font-size: 12px; font-weight: 700; color: var(--primary); letter-spacing: .12em; text-transform: uppercase; }
.auth-card h2 { font-size: 26px; letter-spacing: -.02em; margin: 10px 0 6px; }
.auth-card > p { color: var(--muted); font-size: 13.5px; margin-bottom: 28px; }
.auth-card form { display: grid; gap: 17px; }
.auth-card .input { padding: 11px 13px; }
.auth-actions { margin-top: 6px; }
.auth-actions .btn { width: 100%; padding: 11px 16px; font-size: 14px; }
.auth-meta { display: flex; justify-content: space-between; align-items: center; margin-top: 22px; font-size: 12.5px; color: var(--muted); }
.auth-footer-note { margin-top: 32px; padding-top: 18px; border-top: 1px solid var(--border); font-size: 12px; color: var(--muted); line-height: 1.7; }
.pw-field { position: relative; }
.pw-field .input { padding-right: 44px; }
.pw-toggle {
  position: absolute; right: 5px; top: 50%; transform: translateY(-50%);
  border: 0; background: transparent; color: var(--muted); padding: 6px; border-radius: 7px;
}
.pw-toggle:hover { background: var(--surface-muted); color: var(--text); }

/* ---------- app shell ---------- */
.app-shell { display: flex; min-height: 100vh; }
.sidebar {
  width: 244px; flex: none; background: var(--sidebar); color: var(--sidebar-text);
  padding: 22px 16px 18px; display: flex; flex-direction: column; gap: 26px;
  position: sticky; top: 0; height: 100vh; z-index: 40;
}
.brand { display: flex; align-items: center; gap: 12px; padding: 0 8px; }
.brand-logo-plate {
  width: 74px; height: 40px; flex: none; border-radius: 9px; background: #fff;
  display: flex; align-items: center; justify-content: center; padding: 4px 6px;
  box-shadow: 0 5px 14px rgba(0, 0, 0, .22);
}
.brand-logo-plate img { display: block; max-width: 100%; max-height: 100%; }
.brand-mark {
  width: 40px; height: 40px; border-radius: 11px; flex: none;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(145deg, #3b82f6, #1d4ed8); color: #fff;
  font-weight: 700; font-size: 18px; letter-spacing: .02em;
  box-shadow: 0 6px 18px rgba(37, 99, 235, .35);
}
.brand-name { color: #f1f5fb; font-size: 15px; font-weight: 700; letter-spacing: .01em; line-height: 1.4; }
.brand-sub { color: #71809a; font-size: 11.5px; letter-spacing: .02em; }
.nav { display: flex; flex-direction: column; gap: 4px; }
.nav-label { font-size: 10.5px; letter-spacing: .14em; color: #5c6b84; padding: 0 12px 8px; text-transform: uppercase; }
.nav-item {
  display: flex; align-items: center; gap: 11px; border: 0; background: transparent;
  color: var(--sidebar-text); padding: 10px 12px; border-radius: 9px; text-align: left;
  font-size: 13.5px; font-weight: 500; transition: all .15s ease; position: relative;
}
.nav-item .ico { width: 18px; height: 18px; opacity: .82; }
.nav-item:hover { background: rgba(255, 255, 255, .055); color: #fff; }
.nav-item.active { background: linear-gradient(90deg, rgba(37, 99, 235, .28), rgba(37, 99, 235, .13)); color: #fff; }
.nav-item.active::before {
  content: ""; position: absolute; left: -16px; top: 9px; bottom: 9px; width: 3px;
  border-radius: 0 3px 3px 0; background: #60a5fa;
}
.nav-item.active .ico { color: #93c5fd; opacity: 1; }
.sidebar-foot { margin-top: auto; padding: 0 12px; }
.sidebar-foot .side-company { font-size: 12px; color: #8b9ab2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-foot .side-version { font-size: 11px; color: #56657e; margin-top: 5px; }
.sidebar-foot .side-link {
  display: inline-flex; align-items: center; gap: 6px; color: #7f90aa; font-size: 12px;
  margin-top: 13px;
}
.sidebar-foot .side-link:hover { color: #bfdbfe; text-decoration: none; }
.main-wrap { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  height: 66px; flex: none; display: flex; align-items: center; justify-content: space-between;
  gap: 20px; padding: 0 30px; background: rgba(255, 255, 255, .92);
  border-bottom: 1px solid var(--border); backdrop-filter: blur(10px);
  position: sticky; top: 0; z-index: 30;
}
.topbar-title h1 { font-size: 17px; font-weight: 700; letter-spacing: -.01em; }
.topbar-title p { font-size: 11.5px; color: var(--muted); margin-top: 1px; }
.topbar-right { display: flex; align-items: center; gap: 14px; }
.topbar-link { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); }
.topbar-link:hover { color: var(--primary); text-decoration: none; }
.topbar-link .ico { width: 15px; height: 15px; }
.user-chip { display: flex; align-items: center; gap: 9px; padding-left: 14px; border-left: 1px solid var(--border); }
.avatar {
  width: 35px; height: 35px; border-radius: 50%; background: var(--primary-soft);
  color: var(--primary-dark); display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 13px; flex: none;
}
.user-meta b { display: block; font-size: 12.5px; font-weight: 600; line-height: 1.4; }
.user-meta small { display: block; font-size: 11px; color: var(--muted); }
.notify-wrap { position: relative; }
.notify-btn { position: relative; }
.notify-count {
  position: absolute; top: 1px; right: -2px; min-width: 17px; height: 17px; padding: 0 4px;
  border-radius: 999px; background: var(--red); color: #fff; font-size: 10px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center; border: 2px solid #fff;
  line-height: 1;
}
.notify-panel {
  position: absolute; right: 0; top: calc(100% + 10px); width: 370px; max-height: 460px;
  background: #fff; border: 1px solid var(--border); border-radius: 12px;
  box-shadow: 0 18px 48px rgba(15, 23, 42, .18); z-index: 70; overflow: hidden;
}
.notify-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 13px 15px; border-bottom: 1px solid var(--border); background: #fbfcfe;
}
.notify-head b { font-size: 13.5px; }
.notify-head span { display: block; font-size: 11px; color: var(--muted); margin-top: 2px; }
.notify-readall {
  border: none; background: transparent; color: var(--primary); font-size: 12px;
  font-weight: 600; cursor: pointer; padding: 4px 0; white-space: nowrap;
}
.notify-readall:hover { text-decoration: underline; }
.notify-list { max-height: 390px; overflow-y: auto; }
.notify-item {
  padding: 12px 15px; border-top: 1px solid #f1f3f7; cursor: pointer; transition: background .15s ease;
}
.notify-item:first-child { border-top: none; }
.notify-item:hover { background: var(--surface-muted); }
.notify-item.unread { background: #f8fbff; }
.notify-item.unread:hover { background: #eef5ff; }
.notify-item-title { font-size: 13px; font-weight: 600; color: var(--text); display: flex; gap: 8px; align-items: flex-start; }
.notify-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--primary); flex: none; margin-top: 5px; }
.notify-item-body { font-size: 12px; color: var(--text-soft); line-height: 1.65; margin-top: 5px; word-break: break-word; }
.notify-item-time { font-size: 11px; color: var(--muted); margin-top: 6px; }
.notify-empty { padding: 34px 16px; text-align: center; color: var(--muted); font-size: 12.5px; }
.main-content { padding: 26px 30px 64px; width: 100%; max-width: 1560px; margin: 0 auto; }

/* ---------- dashboard / stats ---------- */
.page-intro { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.page-intro h2 { font-size: 21px; letter-spacing: -.02em; }
.page-intro p { font-size: 13px; color: var(--muted); margin-top: 4px; }
.page-actions { display: flex; gap: 10px; align-items: center; }
.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 15px; margin-bottom: 20px; }
.stat-grid.stat-grid-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.stat-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
  padding: 18px 19px; display: flex; align-items: center; gap: 15px; box-shadow: var(--shadow-sm);
  position: relative; overflow: hidden;
}
.stat-card::after {
  content: ""; position: absolute; right: -26px; top: -26px; width: 86px; height: 86px;
  border-radius: 50%; background: currentColor; opacity: .035;
}
.stat-icon {
  width: 42px; height: 42px; border-radius: 11px; display: flex; align-items: center;
  justify-content: center; flex: none;
}
.stat-icon .ico { width: 20px; height: 20px; }
.stat-icon.red { background: var(--red-soft); color: var(--red); }
.stat-icon.amber { background: var(--amber-soft); color: var(--amber); }
.stat-icon.blue { background: var(--primary-soft); color: var(--primary); }
.stat-icon.gray { background: var(--surface-muted); color: var(--muted); }
.stat-icon.green { background: var(--green-soft); color: var(--green); }
.stat-value { font-size: 26px; font-weight: 700; letter-spacing: -.02em; line-height: 1.2; }
.stat-label { font-size: 12.5px; color: var(--muted); margin-top: 1px; }
.stat-note { font-size: 11px; color: var(--muted); margin-top: 4px; }
.stat-note strong { color: var(--red); font-weight: 600; }

/* ---------- filters / tables ---------- */
.filter-bar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 14px 16px; background: var(--surface); border: 1px solid var(--border);
  border-bottom: 0; border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.search-box { position: relative; flex: 1; min-width: 210px; max-width: 340px; }
.search-box .ico { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); width: 16px; height: 16px; }
.search-box .input { padding-left: 37px; }
.filter-bar .select { width: auto; min-width: 128px; padding-top: 9px; padding-bottom: 9px; font-size: 13px; }
.filter-spacer { flex: 1; }
.filter-count { color: var(--muted); font-size: 12px; margin-left: auto; }
.table-card { background: var(--surface); border: 1px solid var(--border); border-radius: 0 0 var(--radius-lg) var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-sm); }
.table-card.standalone { border-radius: var(--radius-lg); }
.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.data-table th {
  text-align: left; padding: 11px 16px; background: var(--surface-soft); color: var(--muted);
  font-size: 11.5px; font-weight: 600; letter-spacing: .03em; white-space: nowrap;
  border-bottom: 1px solid var(--border);
}
.data-table td { padding: 14px 16px; border-bottom: 1px solid #eef2f8; vertical-align: middle; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr { transition: background .12s ease; }
.data-table tbody tr:hover { background: #fafcff; }
.data-table tr.clickable { cursor: pointer; }
.cell-title { font-weight: 600; color: var(--text); max-width: 320px; }
.cell-title .sub { display: block; font-weight: 400; color: var(--muted); font-size: 11.5px; margin-top: 3px; }
.cell-no { font-family: "Cascadia Mono", Consolas, monospace; font-size: 12px; color: var(--text-soft); white-space: nowrap; }
.cell-muted { color: var(--muted); font-size: 12.5px; }
.cell-right { text-align: right; }
.action-row { display: inline-flex; gap: 6px; justify-content: flex-end; }
.table-empty { padding: 46px 20px; text-align: center; color: var(--muted); }

.empty-state { padding: 56px 24px; text-align: center; display: flex; flex-direction: column; align-items: center; }
.empty-icon {
  width: 58px; height: 58px; border-radius: 16px; background: var(--primary-softer);
  color: var(--primary); display: flex; align-items: center; justify-content: center; margin-bottom: 16px;
}
.empty-icon .ico { width: 26px; height: 26px; }
.empty-state h3 { font-size: 15px; font-weight: 700; }
.empty-state p { color: var(--muted); font-size: 13px; margin-top: 6px; max-width: 380px; }
.empty-state .btn { margin-top: 18px; }

/* ---------- detail page ---------- */
.back-link {
  display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: 13px;
  background: none; border: 0; padding: 0 0 14px; font-weight: 500;
}
.back-link:hover { color: var(--primary); }
.back-link .ico { width: 16px; height: 16px; }
.detail-hero {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 24px 26px; display: flex; align-items: flex-start; justify-content: space-between;
  gap: 24px; box-shadow: var(--shadow-sm); margin-bottom: 18px; position: relative; overflow: hidden;
}
.detail-hero::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
  background: var(--red);
}
.detail-hero.is-closed::before { background: var(--green); }
.detail-hero-main { min-width: 0; }
.detail-hero .hero-top { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 9px; }
.hero-no { font-family: "Cascadia Mono", Consolas, monospace; font-size: 12px; color: var(--muted); background: var(--surface-muted); padding: 2px 8px; border-radius: 6px; }
.detail-hero h2 { font-size: 22px; line-height: 1.4; letter-spacing: -.015em; word-break: break-word; }
.hero-meta { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 11px; color: var(--muted); font-size: 12.5px; }
.hero-meta span { display: inline-flex; align-items: center; gap: 6px; }
.hero-meta .ico { width: 15px; height: 15px; }
.detail-hero-side { display: flex; flex-direction: column; align-items: flex-end; gap: 14px; flex: none; }
.closed-banner {
  display: flex; align-items: flex-start; gap: 12px; background: var(--green-soft);
  border: 1px solid #bfe9d7; color: #0b6b4b; border-radius: var(--radius-lg);
  padding: 16px 18px; margin-bottom: 18px; font-size: 13px;
}
.closed-banner .ico { color: var(--green); margin-top: 1px; }
.closed-banner b { display: block; font-size: 13.5px; margin-bottom: 2px; }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(300px, .85fr); gap: 18px; align-items: start; }
.detail-stack { display: flex; flex-direction: column; gap: 18px; }
.info-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px 22px; }
.info-item label { display: block; font-size: 11.5px; color: var(--muted); margin-bottom: 3px; }
.info-item .value { font-size: 13.5px; font-weight: 500; word-break: break-word; }
.description-text { white-space: pre-wrap; word-break: break-word; color: var(--text-soft); font-size: 13.5px; line-height: 1.85; }
.divider { height: 1px; background: var(--border); margin: 18px 0; }

.submission-list { display: flex; flex-direction: column; gap: 12px; }
.submission-card { border: 1px solid var(--border); border-radius: 12px; overflow: hidden; background: #fff; }
.submission-card summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; gap: 12px;
  padding: 14px 17px; background: var(--surface-soft); border-bottom: 1px solid transparent;
}
.submission-card[open] summary { border-bottom-color: var(--border); }
.submission-card summary::-webkit-details-marker { display: none; }
.submission-card summary:hover { background: #f4f8fd; }
.version-pill {
  background: var(--primary-soft); color: var(--primary-dark); border-radius: 7px;
  font-size: 11.5px; font-weight: 700; padding: 2px 9px; flex: none;
}
.submission-meta { min-width: 0; }
.submission-meta b { display: block; font-size: 13px; font-weight: 600; }
.submission-meta span { display: block; font-size: 11.5px; color: var(--muted); }
.submission-chevron { margin-left: auto; color: var(--muted); transition: transform .15s ease; }
.submission-card[open] .submission-chevron { transform: rotate(180deg); }
.submission-body { padding: 18px 17px; }
.d-block { border: 1px solid #edf1f7; border-radius: 10px; padding: 14px 16px; margin-bottom: 10px; background: #fcfdff; }
.d-block:last-child { margin-bottom: 0; }
.d-label { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 700; color: var(--primary-dark); margin-bottom: 7px; }
.d-label .d-code {
  background: var(--primary); color: #fff; border-radius: 5px; padding: 0 6px;
  font-size: 10.5px; line-height: 1.7; letter-spacing: .02em;
}
.d-text { white-space: pre-wrap; word-break: break-word; font-size: 13px; color: var(--text-soft); line-height: 1.8; }
.attachment-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.file-chip {
  display: inline-flex; align-items: center; gap: 7px; max-width: 100%;
  border: 1px solid var(--border); border-radius: 8px; padding: 6px 10px;
  background: var(--surface-soft); color: var(--text-soft); font-size: 12px;
}
.file-chip:hover { border-color: #b9cdf0; background: var(--primary-softer); text-decoration: none; }
.file-chip .ico { width: 14px; height: 14px; color: var(--primary); }
.file-chip-name { max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-chip-size { color: var(--muted); font-size: 11px; white-space: nowrap; }
.side-card-note { font-size: 12px; color: var(--muted); line-height: 1.75; }
.side-card-note b { color: var(--text-soft); font-weight: 600; }
.due-warning { display: flex; gap: 8px; align-items: flex-start; color: var(--amber); background: var(--amber-soft); border: 1px solid #f5ddb5; border-radius: 9px; padding: 10px 12px; font-size: 12px; margin-top: 16px; }
.due-warning .ico { width: 15px; height: 15px; margin-top: 2px; }
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { position: relative; padding: 0 0 20px 22px; }
.timeline li::before {
  content: ""; position: absolute; left: 4px; top: 6px; width: 7px; height: 7px;
  border-radius: 50%; background: var(--border-strong); box-shadow: 0 0 0 3px #fff;
}
.timeline li::after {
  content: ""; position: absolute; left: 7px; top: 16px; bottom: 0; width: 1px; background: var(--border);
}
.timeline li:last-child { padding-bottom: 0; }
.timeline li:last-child::after { display: none; }
.timeline li.highlight::before { background: var(--primary); }
.timeline .t-action { font-size: 13px; font-weight: 600; }
.timeline .t-meta { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.timeline .t-detail { font-size: 12.5px; color: var(--text-soft); margin-top: 5px; white-space: pre-wrap; }

/* ---------- forms ---------- */
.form-stack { display: grid; gap: 17px; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 4px; }
.issue-form { display: grid; grid-template-columns: 1fr 1fr; gap: 17px; }
.issue-form .span-2 { grid-column: span 2; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; }
.confirm-text { font-size: 13.5px; color: var(--text-soft); line-height: 1.85; }

.upload-box {
  border: 1.5px dashed var(--border-strong); border-radius: 11px; background: var(--surface-soft);
  padding: 20px; text-align: center; transition: all .15s ease; cursor: pointer;
}
.upload-box:hover, .upload-box.dragover { border-color: var(--primary); background: var(--primary-softer); }
.upload-box .ico { width: 24px; height: 24px; color: var(--muted); margin-bottom: 6px; }
.upload-box b { display: block; font-size: 13px; font-weight: 600; }
.upload-box span { font-size: 11.5px; color: var(--muted); }
.upload-box input[type="file"] { display: none; }
.selected-files { display: flex; flex-direction: column; gap: 7px; margin-top: 10px; }
.selected-file {
  display: flex; align-items: center; gap: 9px; border: 1px solid var(--border);
  border-radius: 8px; padding: 8px 10px; background: #fff; font-size: 12.5px;
}
.selected-file .ico { color: var(--primary); width: 15px; height: 15px; }
.selected-file .name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.selected-file .size { color: var(--muted); font-size: 11px; }
.selected-file button { border: 0; background: transparent; color: var(--muted); padding: 2px; border-radius: 5px; }
.selected-file button:hover { color: var(--red); background: var(--red-soft); }
.selected-file button .ico { width: 14px; height: 14px; }

/* ---------- account pages ---------- */
.account-table .avatar { width: 32px; height: 32px; font-size: 12px; }
.name-cell { display: flex; align-items: center; gap: 10px; }
.name-cell b { display: block; font-size: 13px; font-weight: 600; }
.name-cell small { display: block; color: var(--muted); font-size: 11px; }
.pill-active { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--green); font-weight: 600; }
.pill-active::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--green); }
.pill-inactive { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); font-weight: 600; }
.pill-inactive::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #b1bac9; }
.settings-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(300px, .8fr); gap: 18px; align-items: start; }
.settings-stack { display: flex; flex-direction: column; gap: 18px; }
.setting-row { display: flex; justify-content: space-between; gap: 20px; padding: 12px 0; border-bottom: 1px solid #eef2f8; font-size: 13px; }
.setting-row:last-child { border-bottom: 0; padding-bottom: 0; }
.setting-row label { color: var(--muted); }
.setting-row .value { font-weight: 500; text-align: right; word-break: break-all; }
.info-tip {
  display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 9px;
  background: var(--primary-softer); border: 1px solid #dbe8ff; color: var(--text-soft); font-size: 12.5px; line-height: 1.7;
}
.info-tip .ico { color: var(--primary); width: 16px; height: 16px; margin-top: 1px; }

/* ---------- supplier portal ---------- */
.portal-page { min-height: 100vh; background: var(--bg); }
.portal-header {
  height: 68px; background: rgba(255, 255, 255, .95); border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 30; backdrop-filter: blur(10px);
}
.portal-header-inner {
  max-width: 1200px; height: 100%; margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
}
.portal-brand { display: flex; align-items: center; gap: 12px; }
.portal-logo { height: 38px; width: auto; display: block; flex: none; }
.portal-brand-name { font-size: 14.5px; font-weight: 700; color: var(--text); line-height: 1.4; }
.portal-brand-sub { font-size: 11px; color: var(--muted); }
.portal-nav {
  display: flex; align-items: center; gap: 4px; padding: 4px;
  background: var(--surface-muted); border-radius: 10px; flex: none;
}
.portal-nav-item {
  display: inline-flex; align-items: center; gap: 6px; border: 0; background: transparent;
  color: var(--text-soft); font-size: 12.5px; font-weight: 600; padding: 7px 14px;
  border-radius: 8px; transition: all .15s ease; white-space: nowrap;
}
.portal-nav-item .ico { width: 15px; height: 15px; opacity: .8; }
.portal-nav-item:hover { color: var(--primary); }
.portal-nav-item.active {
  background: #fff; color: var(--primary-dark); box-shadow: var(--shadow-sm);
}
.portal-nav-item.active .ico { opacity: 1; }
.portal-user { display: flex; align-items: center; gap: 12px; }
.portal-user-name { font-size: 12.5px; color: var(--text-soft); font-weight: 600; max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.portal-main { max-width: 1200px; margin: 0 auto; padding: 28px 24px 64px; }
.portal-hero {
  display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: 20px;
}
.portal-hero h1 { font-size: 24px; letter-spacing: -.02em; }
.portal-hero p { color: var(--muted); font-size: 13px; margin-top: 5px; }
.portal-date { font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.notice-banner {
  display: flex; align-items: flex-start; gap: 11px; background: #fff; border: 1px solid var(--border);
  border-left: 3px solid var(--red); border-radius: var(--radius); padding: 13px 16px;
  font-size: 12.5px; color: var(--text-soft); margin-bottom: 22px; line-height: 1.7;
}
.notice-banner .ico { color: var(--red); width: 17px; height: 17px; margin-top: 1px; }
.notice-banner b { color: var(--text); }
.portal-filters {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 16px;
}
.portal-filters .search-box { max-width: 320px; }
.portal-filters .select { width: auto; min-width: 130px; padding-top: 9px; padding-bottom: 9px; font-size: 13px; }
.supplier-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
.supplier-issue-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
  padding: 19px 20px; box-shadow: var(--shadow-sm); cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
  display: flex; flex-direction: column; gap: 13px; position: relative; overflow: hidden;
}
.supplier-issue-card::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--red);
}
.supplier-issue-card.is-closed::before { background: var(--green); }
.supplier-issue-card:hover {
  transform: translateY(-2px); border-color: #cddcf3;
  box-shadow: 0 12px 30px rgba(16, 24, 40, .09);
}
.sic-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sic-no { font-family: "Cascadia Mono", Consolas, monospace; font-size: 11.5px; color: var(--muted); }
.supplier-issue-card h3 { font-size: 15px; font-weight: 700; line-height: 1.5; letter-spacing: -.01em; word-break: break-word; }
.sic-meta { display: flex; align-items: center; gap: 13px; flex-wrap: wrap; color: var(--muted); font-size: 12px; }
.sic-meta span { display: inline-flex; align-items: center; gap: 5px; }
.sic-meta .ico { width: 14px; height: 14px; }
.sic-ack {
  display: flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 600;
  color: var(--amber); background: var(--amber-soft); border-radius: 7px; padding: 6px 9px;
}
.sic-ack .ico { width: 14px; height: 14px; }
.sic-ack.is-overdue { color: var(--red-dark); background: var(--red-soft); }
.sic-ack.is-rejected { color: var(--red-dark); background: var(--red-soft); }
.sic-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding-top: 12px; border-top: 1px solid #eef2f8; color: var(--muted); font-size: 11.5px;
}
.sic-foot .link-more { color: var(--primary); font-weight: 600; display: inline-flex; align-items: center; gap: 4px; }
.sic-foot .link-more .ico { width: 14px; height: 14px; }
.standard-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
.standard-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
  padding: 18px 20px; box-shadow: var(--shadow-sm); display: flex;
  flex-direction: column; gap: 12px; transition: border-color .15s ease, box-shadow .15s ease;
}
.standard-card:hover { border-color: #cddcf3; box-shadow: 0 10px 26px rgba(16, 24, 40, .07); }
.standard-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.standard-card-top h3 { font-size: 15px; font-weight: 700; line-height: 1.5; margin-top: 7px; word-break: break-word; }
.standard-code {
  font-family: "Cascadia Mono", Consolas, monospace; font-size: 11.5px;
  color: var(--muted); margin-top: 4px;
}
.standard-file-icon {
  width: 40px; height: 40px; border-radius: 10px; background: var(--primary-soft);
  color: var(--primary); display: flex; align-items: center; justify-content: center; flex: none;
}
.standard-file-icon .ico { width: 20px; height: 20px; }
.standard-desc {
  font-size: 12.5px; color: var(--text-soft); line-height: 1.75; white-space: pre-wrap;
  word-break: break-word; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
  overflow: hidden;
}
.standard-card-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding-top: 12px; border-top: 1px solid #eef2f8; margin-top: auto;
}
.standard-file-meta {
  display: flex; flex-direction: column; gap: 2px; min-width: 0;
  color: var(--text-soft); font-size: 11.5px;
}
.standard-file-meta span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.standard-card-actions { display: flex; align-items: center; gap: 8px; flex: none; }
.standard-card-actions .btn { white-space: nowrap; }
.standard-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 2px; }
.folder-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.folder-item { position: relative; }
.folder-card {
  width: 100%; height: 100%; display: flex; align-items: flex-start; gap: 14px;
  text-align: left; font: inherit; color: inherit; cursor: pointer;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; padding: 18px; box-shadow: var(--shadow-sm);
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.folder-card:hover {
  border-color: #cddcf3; box-shadow: 0 10px 26px rgba(16, 24, 40, .07);
  transform: translateY(-1px);
}
.folder-icon {
  width: 42px; height: 42px; flex: none; border-radius: 11px; display: flex;
  align-items: center; justify-content: center; background: #fdf3dd; color: #b7791f;
}
.folder-icon .ico { width: 21px; height: 21px; }
.folder-card-all .folder-icon { background: var(--primary-soft); color: var(--primary); }
.folder-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; padding-right: 8px; }
.folder-body b { font-size: 14.5px; font-weight: 700; color: var(--text); word-break: break-word; }
.folder-meta { font-size: 12px; color: var(--primary-dark); font-weight: 600; }
.folder-desc {
  font-size: 12px; color: var(--muted); line-height: 1.65;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.folder-actions {
  position: absolute; top: 10px; right: 10px; display: flex; gap: 2px;
  opacity: 0; transition: opacity .15s ease;
}
.folder-item:hover .folder-actions, .folder-item:focus-within .folder-actions { opacity: 1; }
@media (hover: none) { .folder-actions { opacity: 1; } }
.folder-actions .icon-btn { background: #fff; border: 1px solid var(--border); }
.standard-crumbs { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.standard-crumbs .btn .ico { width: 14px; height: 14px; }
.crumb-sep { color: #c4ccd9; }
.crumb-current { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 700; }
.crumb-current .ico { width: 16px; height: 16px; color: #b7791f; }
.crumb-desc { font-size: 12px; color: var(--muted); }
.standard-preview { display: flex; flex-direction: column; gap: 12px; }
.standard-preview-frame {
  width: 100%; height: min(64vh, 640px); border: 1px solid var(--border);
  border-radius: 10px; background: #f6f8fb; display: block;
}
.standard-preview-image-wrap {
  border: 1px solid var(--border); border-radius: 10px; background: #f6f8fb;
  padding: 10px; display: flex; justify-content: center; overflow: auto; max-height: 64vh;
}
.standard-preview-image { max-width: 100%; max-height: 62vh; border-radius: 6px; display: block; }
.standard-preview-note {
  display: flex; gap: 9px; align-items: flex-start; font-size: 12px; line-height: 1.7;
  color: var(--text-soft); background: var(--surface-soft); border: 1px solid var(--border);
  border-radius: 9px; padding: 10px 13px;
}
.standard-preview-note .ico { width: 15px; height: 15px; color: var(--primary); margin-top: 1px; flex: none; }
.standard-preview-actions { align-items: center; }
.standard-preview-meta { margin-right: auto; color: var(--muted); font-size: 12px; word-break: break-all; }
.issue-panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 22px 24px; box-shadow: var(--shadow-sm); margin-bottom: 18px; }
.issue-panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.issue-panel-head h2 { font-size: 16px; font-weight: 700; }
.issue-panel-head p { color: var(--muted); font-size: 12.5px; margin-top: 3px; }
.steps-hint { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.step-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--muted); background: var(--surface-soft); border: 1px solid var(--border); border-radius: 999px; padding: 3px 10px; }
.step-chip b { color: var(--primary); }
.submit-note { display: flex; gap: 10px; align-items: flex-start; background: var(--amber-soft); border: 1px solid #f4dfbc; color: #8a5b12; padding: 12px 14px; border-radius: 9px; font-size: 12.5px; line-height: 1.7; margin: 18px 0; }
.submit-note .ico { width: 16px; height: 16px; margin-top: 2px; flex: none; }
.ack-panel {
  display: flex; gap: 14px; align-items: flex-start; padding: 17px 19px;
  border: 1px solid #f4dfbc; background: #fffaf0; border-radius: 12px; margin-bottom: 18px;
}
.ack-panel.is-rejected { border-color: #f0b9b9; background: #fff5f5; }
.ack-panel.is-accepted { border-color: #b7e3cf; background: #f2fbf7; }
.ack-panel-icon {
  width: 38px; height: 38px; border-radius: 10px; flex: none; display: flex;
  align-items: center; justify-content: center; background: #fdeccd; color: #b45309;
}
.ack-panel.is-rejected .ack-panel-icon { background: #fee2e2; color: var(--red); }
.ack-panel.is-accepted .ack-panel-icon { background: #d9f3e6; color: var(--green); }
.ack-panel-icon .ico { width: 19px; height: 19px; }
.ack-panel-main { flex: 1; min-width: 0; }
.ack-panel-main h3 { font-size: 15px; margin-bottom: 5px; }
.ack-panel-main p { font-size: 12.5px; line-height: 1.75; color: var(--text-soft); }
.ack-panel-main .ack-deadline { font-weight: 600; color: #9a3412; }
.ack-panel.is-rejected .ack-deadline { color: var(--red-dark); }
.ack-reason {
  margin-top: 10px; padding: 10px 12px; border-radius: 8px; background: rgba(255,255,255,.75);
  border: 1px solid rgba(185, 28, 28, .18); font-size: 12.5px; line-height: 1.7;
  white-space: pre-wrap; word-break: break-word;
}
.ack-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 13px; }
.ack-meta { font-size: 11.5px; color: var(--muted); margin-top: 9px; }
.ack-locked {
  display: flex; gap: 11px; align-items: flex-start; padding: 14px 16px;
  border: 1px dashed #e3c58d; background: #fffdf7; border-radius: 9px;
  color: var(--text-soft); font-size: 12.5px; line-height: 1.75;
}
.ack-locked .ico { width: 17px; height: 17px; margin-top: 2px; color: var(--amber); }
.ack-locked b { display: block; color: var(--text); }
.ack-locked span { display: block; }
.portal-closed { display: flex; gap: 12px; align-items: flex-start; border: 1px solid #bfe9d7; background: var(--green-soft); border-radius: var(--radius); padding: 16px 18px; color: #0b6b4b; font-size: 13px; line-height: 1.75; }
.portal-closed .ico { width: 18px; height: 18px; margin-top: 2px; }
.portal-closed b { display: block; }

/* ---------- modal / toast ---------- */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(15, 23, 42, .46); z-index: 100;
  display: flex; align-items: flex-start; justify-content: center; padding: 7vh 20px 30px;
  overflow-y: auto; opacity: 0; transition: opacity .18s ease; backdrop-filter: blur(3px);
}
.modal-backdrop.show { opacity: 1; }
.modal {
  width: 100%; background: #fff; border-radius: 16px; box-shadow: var(--shadow-lg);
  transform: translateY(10px) scale(.99); transition: transform .18s ease; margin: auto 0;
}
.modal-backdrop.show .modal { transform: translateY(0) scale(1); }
.modal-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 16px;
  padding: 22px 24px 0;
}
.modal-head h3 { font-size: 18px; font-weight: 700; letter-spacing: -.01em; }
.modal-sub { font-size: 12.5px; color: var(--muted); margin-top: 4px; line-height: 1.6; }
.modal-body { padding: 20px 24px; }
.modal-foot { padding: 0 24px 22px; }
.modal .form-grid { gap: 16px; }
.modal-close { margin-top: -4px; margin-right: -6px; }

.toast-root {
  position: fixed; top: 18px; right: 20px; z-index: 300; display: flex;
  flex-direction: column; gap: 9px; pointer-events: none;
}
.toast {
  display: flex; align-items: center; gap: 9px; background: #fff; border: 1px solid var(--border);
  border-radius: 10px; padding: 11px 15px; box-shadow: 0 12px 30px rgba(15, 23, 42, .14);
  font-size: 13px; font-weight: 500; color: var(--text); min-width: 220px; max-width: 400px;
  opacity: 0; transform: translateY(-6px); transition: all .2s ease;
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast .ico { width: 17px; height: 17px; }
.toast.success .ico { color: var(--green); }
.toast.error { border-color: #f2caca; }
.toast.error .ico { color: var(--red); }

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
  .stat-grid, .stat-grid.stat-grid-5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .detail-grid { grid-template-columns: 1fr; }
  .info-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .settings-grid { grid-template-columns: 1fr; }
}
@media (max-width: 960px) {
  .app-shell { display: block; }
  .sidebar {
    width: 100%; height: auto; position: sticky; top: 0; padding: 10px 14px;
    flex-direction: row; align-items: center; gap: 16px; overflow-x: auto;
  }
  .sidebar .brand { padding: 0; flex: none; }
  .brand-name { font-size: 13.5px; }
  .brand-sub { display: none; }
  .brand-mark { width: 34px; height: 34px; font-size: 15px; }
  .brand-logo-plate { width: 66px; height: 36px; padding: 3px 5px; }
  .nav { flex-direction: row; gap: 3px; flex: 1; }
  .nav-label { display: none; }
  .nav-item { padding: 8px 10px; font-size: 12.5px; white-space: nowrap; }
  .nav-item.active::before { display: none; }
  .nav-item .ico { width: 16px; height: 16px; }
  .sidebar-foot { display: none; }
  .topbar { top: 57px; padding: 0 20px; height: 60px; }
  .main-content { padding: 20px 20px 56px; }
  .auth-layout { grid-template-columns: 1fr; }
  .auth-brand-panel { display: none; }
  .detail-hero { flex-direction: column; }
  .detail-hero-side { flex-direction: row; align-items: center; width: 100%; justify-content: space-between; }
  .supplier-grid { grid-template-columns: 1fr; }
  .standard-grid { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .main-content { padding: 16px 14px 50px; }
  .data-table { min-width: 680px; }
  .cell-title { max-width: 220px; }
  #standardMainHost .data-table { min-width: 980px; }
  .topbar { padding: 0 14px; }
  .topbar-title p { display: none; }
  .topbar-title h1 { font-size: 15px; }
  .topbar-right { gap: 8px; }
  .notify-panel { position: fixed; left: 12px; right: 12px; top: 122px; width: auto; max-height: 70vh; }
  .topbar-link { display: none; }
  .user-meta { display: none; }
  .user-chip { padding-left: 10px; }
  .brand-text { display: none; }
  .sidebar { gap: 10px; }
  .nav-item span { display: none; }
  .nav-item { padding: 9px 11px; }
  .stat-grid { gap: 10px; }
  .stat-card { padding: 14px; gap: 11px; }
  .stat-icon { width: 36px; height: 36px; }
  .stat-icon .ico { width: 17px; height: 17px; }
  .stat-value { font-size: 22px; }
  .stat-label { font-size: 11.5px; }
  .page-intro { flex-direction: column; align-items: flex-start; gap: 12px; }
  .page-intro h2 { font-size: 19px; }
  .page-actions { width: 100%; }
  .page-actions .btn { flex: 1; }
  .filter-bar { padding: 12px; }
  .search-box { max-width: none; width: 100%; flex: 1 0 100%; }
  .filter-bar .select { flex: 1; min-width: 0; }
  .filter-count { display: none; }
  .info-grid { grid-template-columns: 1fr 1fr; gap: 14px; }
  .form-grid, .issue-form { grid-template-columns: 1fr; }
  .form-grid .span-2, .issue-form .span-2 { grid-column: span 1; }
  .detail-hero { padding: 20px; }
  .detail-hero h2 { font-size: 19px; }
  .detail-hero-side { flex-direction: column; align-items: stretch; }
  .detail-hero-side .btn { width: 100%; }
  .detail-hero-side .lamp-wrap { justify-content: flex-start; }
  .card-pad { padding: 18px; }
  .card-head { padding: 18px 18px 0; }
  .card-body { padding: 16px 18px 20px; }
  .modal-backdrop { padding: 0; }
  .modal { border-radius: 16px 16px 0 0; margin-top: auto; max-width: none !important; }
  .modal-body { padding: 18px 20px; }
  .modal-head { padding: 20px 20px 0; }
  .modal-foot { padding: 0 20px 20px; }
  .auth-card-wrap { padding: 36px 22px; align-items: flex-start; }
  .auth-card { max-width: 100%; padding-top: 6vh; }
  .portal-header { height: auto; }
  .portal-header-inner { padding: 8px 14px; flex-wrap: wrap; row-gap: 6px; }
  .portal-brand-name { font-size: 13px; }
  .portal-brand-sub { display: none; }
  .portal-logo { height: 30px; }
  .portal-user-name { display: none; }
  .portal-nav { order: 3; width: 100%; justify-content: center; }
  .portal-nav-item { flex: 1; justify-content: center; padding: 7px 10px; font-size: 12px; }
  .portal-main { padding: 20px 14px 50px; }
  .portal-hero { flex-direction: column; align-items: flex-start; gap: 6px; }
  .portal-hero h1 { font-size: 21px; }
  .portal-filters .search-box { max-width: none; width: 100%; flex: 1 0 100%; }
  .folder-grid { grid-template-columns: 1fr; }
  .folder-actions { opacity: 1; }
  .folder-desc { -webkit-line-clamp: 3; }
  .standard-card-foot { align-items: flex-start; flex-direction: column; }
  .standard-card-actions { width: 100%; }
  .standard-card-actions .btn { flex: 1; justify-content: center; }
  .standard-preview-frame { height: 58vh; }
  .standard-preview-meta { width: 100%; margin-bottom: 6px; }
  .standard-preview-actions { flex-wrap: wrap; }
  .issue-panel { padding: 18px; }
  .submission-card summary { padding: 12px 13px; }
  .submission-body { padding: 14px 13px; }
  .d-block { padding: 12px 13px; }
  .file-chip-name { max-width: 150px; }
  .toast-root { left: 14px; right: 14px; top: 12px; }
  .toast { max-width: none; }
}
@media (max-width: 420px) {
  .info-grid { grid-template-columns: 1fr; }
  .stat-label { font-size: 11px; }
}
