/* ==========================================================================
   众好物业 · 企业能力平台
   原生 CSS / 无外部依赖
   ========================================================================== */

:root {
  --ink-950: #081725;
  --ink-900: #0b1f33;
  --ink-850: #0d253b;
  --ink-800: #102a42;
  --ink-700: #1b3a55;
  --ink-600: #2b4a64;

  --gold-600: #a58449;
  --gold-500: #b89458;
  --gold-400: #c9a66b;
  --gold-300: #dcc08c;
  --gold-200: #ead8b6;
  --gold-100: #f5ecdd;
  --gold-050: #fbf7ef;

  --paper: #f4f6f7;
  --paper-warm: #f8f7f4;
  --card: #ffffff;
  --line: #e4e9ed;
  --line-strong: #cfd8df;
  --line-soft: #eef2f4;

  --text: #172735;
  --text-secondary: #526575;
  --text-muted: #8493a0;
  --text-faint: #a8b4bd;

  --success: #2f7d5d;
  --success-bg: #eaf4ef;
  --success-line: #cbe4d7;
  --warning: #a96d1f;
  --warning-bg: #fbf1e2;
  --warning-line: #efdabb;
  --danger: #b23e2f;
  --danger-bg: #faebe8;
  --danger-line: #f0d2cc;
  --info: #2e627f;
  --info-bg: #eaf2f7;
  --info-line: #d1e2ec;

  --font-sans: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", "Source Han Sans SC", "Segoe UI", sans-serif;
  --font-serif: "Songti SC", "STSong", "SimSun", "Noto Serif SC", Georgia, serif;
  --font-number: "DIN Alternate", "Bahnschrift", "Segoe UI", "Microsoft YaHei", sans-serif;
  --font-mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;

  --sidebar-width: 258px;
  --topbar-height: 74px;
  --content-max: 1540px;
  --radius-xs: 6px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 22px;

  --shadow-xs: 0 1px 2px rgba(9, 28, 43, 0.04);
  --shadow-sm: 0 3px 12px rgba(9, 28, 43, 0.055);
  --shadow-md: 0 14px 34px rgba(9, 28, 43, 0.085);
  --shadow-lg: 0 26px 70px rgba(9, 28, 43, 0.16);
  --shadow-gold: 0 12px 32px rgba(184, 148, 88, 0.18);

  --ease: cubic-bezier(0.2, 0.75, 0.25, 1);
  --speed: 180ms;
  --speed-slow: 320ms;
}

/* --------------------------------------------------------------------------
   Reset & base
   -------------------------------------------------------------------------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100%;
  color: var(--text);
  background: var(--paper);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body.is-login {
  background: var(--paper-warm);
}

body.nav-open {
  overflow: hidden;
}

html.has-overlay,
html.has-overlay body {
  overflow: hidden;
}

h1, h2, h3, h4, h5, p {
  margin: 0;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
}

a {
  color: inherit;
  text-decoration: none;
}

img,
svg {
  display: block;
}

ul, ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

::selection {
  background: var(--gold-200);
  color: var(--ink-900);
}

:focus-visible {
  outline: 2px solid var(--gold-500);
  outline-offset: 2px;
}

[hidden] {
  display: none !important;
}

::-webkit-scrollbar {
  width: 9px;
  height: 9px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: #c6d0d7;
  border: 2px solid transparent;
  background-clip: content-box;
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: #aab7c0;
  border: 2px solid transparent;
  background-clip: content-box;
}

.icon {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  stroke-width: 1.7;
  pointer-events: none;
}

.icon-sm {
  width: 15px;
  height: 15px;
}

.icon-lg {
  width: 22px;
  height: 22px;
}

.mono {
  font-family: var(--font-mono);
  letter-spacing: -0.2px;
}

.muted {
  color: var(--text-muted);
}

.text-warning {
  color: var(--warning) !important;
}

.text-danger {
  color: var(--danger) !important;
}

.text-success {
  color: var(--success) !important;
}

.text-gold {
  color: var(--gold-600) !important;
}

.nowrap {
  white-space: nowrap;
}

.noscript {
  padding: 60px;
  text-align: center;
  font-size: 16px;
}

/* --------------------------------------------------------------------------
   Boot
   -------------------------------------------------------------------------- */

.boot-screen {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  background:
    radial-gradient(circle at 50% 38%, rgba(184, 148, 88, 0.13), transparent 30%),
    linear-gradient(145deg, #07131f 0%, #0b1f33 55%, #102b41 100%);
  color: #f0eadf;
  transition: opacity 400ms var(--ease), visibility 400ms;
}

.boot-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.boot-brand img {
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.boot-brand div {
  display: flex;
  flex-direction: column;
}

.boot-brand strong {
  font-size: 22px;
  letter-spacing: 5px;
  font-weight: 600;
}

.boot-brand span {
  margin-top: 2px;
  color: var(--gold-300);
  font-size: 10px;
  letter-spacing: 4px;
}

.boot-line {
  width: 188px;
  height: 2px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.09);
  border-radius: 3px;
}

.boot-line i {
  display: block;
  width: 40%;
  height: 100%;
  background: linear-gradient(90deg, transparent, var(--gold-400), transparent);
  animation: bootSlide 1.4s infinite var(--ease);
}

.boot-screen p {
  color: rgba(240, 234, 223, 0.45);
  font-size: 11px;
  letter-spacing: 3px;
}

@keyframes bootSlide {
  from { transform: translateX(-100%); }
  to { transform: translateX(350%); }
}

/* --------------------------------------------------------------------------
   Authentication
   -------------------------------------------------------------------------- */

.auth-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(460px, 0.88fr);
  min-height: 100vh;
  background: var(--paper-warm);
}

.auth-visual {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding: 42px 54px 30px;
  color: #f2ede4;
  background:
    radial-gradient(circle at 16% 18%, rgba(201, 166, 107, 0.17), transparent 32%),
    radial-gradient(circle at 88% 82%, rgba(46, 98, 127, 0.2), transparent 36%),
    linear-gradient(138deg, #071420 0%, #0b1f33 52%, #102b43 100%);
}

.auth-visual::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.38;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.028) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(to bottom, black, transparent 88%);
}

.auth-visual::after {
  content: "";
  position: absolute;
  right: -180px;
  top: 15%;
  width: 430px;
  height: 430px;
  border: 1px solid rgba(201, 166, 107, 0.14);
  border-radius: 50%;
  box-shadow:
    0 0 0 48px rgba(201, 166, 107, 0.035),
    0 0 0 96px rgba(201, 166, 107, 0.022);
  pointer-events: none;
}

.auth-visual-grain {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.12;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.35'/%3E%3C/svg%3E");
}

.auth-visual-top {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.auth-brand img {
  width: 46px;
  height: 46px;
  border-radius: 10px;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.25);
}

.auth-brand div {
  display: flex;
  flex-direction: column;
}

.auth-brand strong {
  font-size: 19px;
  font-weight: 600;
  letter-spacing: 5px;
}

.auth-brand span {
  color: var(--gold-300);
  font-size: 9px;
  letter-spacing: 3.6px;
  margin-top: 2px;
}

.auth-visual-tag {
  padding: 8px 13px;
  border: 1px solid rgba(201, 166, 107, 0.24);
  border-radius: 999px;
  color: rgba(240, 234, 223, 0.66);
  font-size: 9px;
  letter-spacing: 2.4px;
  white-space: nowrap;
}

.auth-hero {
  position: relative;
  z-index: 2;
  max-width: 660px;
  margin-top: clamp(60px, 9vh, 122px);
}

.auth-eyebrow {
  display: flex;
  align-items: center;
  gap: 11px;
  color: var(--gold-300);
  font-size: 10px;
  letter-spacing: 3.4px;
  font-weight: 600;
}

.auth-eyebrow i {
  width: 26px;
  height: 1px;
  background: var(--gold-400);
}

.auth-hero h1 {
  margin: 24px 0 25px;
  color: #f7f2e9;
  font-family: var(--font-serif);
  font-size: clamp(58px, 6.7vw, 94px);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: 3px;
}

.auth-hero h1 em {
  color: var(--gold-300);
  font-style: normal;
  position: relative;
}

.auth-hero h1 em::after {
  content: "";
  position: absolute;
  left: 4%;
  right: 8%;
  bottom: -10px;
  height: 1px;
  background: linear-gradient(90deg, rgba(220, 192, 140, 0.65), transparent);
}

.auth-hero > p {
  max-width: 530px;
  color: rgba(238, 233, 222, 0.57);
  font-size: 13px;
  line-height: 2;
  letter-spacing: 0.3px;
}

.auth-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin-top: 44px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 24px;
  max-width: 560px;
}

.auth-metric {
  display: flex;
  flex-direction: column;
  padding-left: 22px;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
}

.auth-metric:first-child {
  padding-left: 0;
  border-left: 0;
}

.auth-metric strong {
  color: #f6f1e8;
  font-family: var(--font-number);
  font-size: 31px;
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.5px;
}

.auth-metric strong small {
  margin-left: 3px;
  color: var(--gold-300);
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 400;
}

.auth-metric span {
  margin-top: 6px;
  color: rgba(238, 233, 222, 0.46);
  font-size: 10px;
  letter-spacing: 1.2px;
}

.auth-architecture {
  position: absolute;
  z-index: 1;
  left: 0;
  right: 0;
  bottom: 62px;
  height: 38vh;
  min-height: 250px;
  opacity: 0.8;
  pointer-events: none;
  mask-image: linear-gradient(to top, black 30%, transparent 96%);
}

.auth-architecture svg {
  width: 100%;
  height: 100%;
}

.auth-visual-footer {
  position: relative;
  z-index: 2;
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.085);
  padding-top: 18px;
  color: rgba(239, 233, 223, 0.38);
  font-size: 10px;
  letter-spacing: 0.8px;
}

.auth-panel {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 42px 34px;
  background:
    radial-gradient(circle at 82% 12%, rgba(184, 148, 88, 0.075), transparent 27%),
    linear-gradient(180deg, #fbfaf7 0%, #f6f5f1 100%);
}

.auth-panel::before {
  content: "";
  position: absolute;
  inset: 26px;
  border: 1px solid rgba(11, 31, 51, 0.055);
  pointer-events: none;
}

.auth-panel-inner {
  width: 100%;
  max-width: 430px;
  position: relative;
  z-index: 1;
}

.auth-card {
  position: relative;
  padding: 38px 38px 28px;
  border: 1px solid rgba(205, 214, 220, 0.8);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 24px 70px rgba(24, 43, 58, 0.08);
  backdrop-filter: blur(16px);
}

.auth-card-head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 26px;
}

.auth-card-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border-radius: 10px;
  border: 1px solid var(--gold-200);
  background: var(--gold-050);
  color: var(--gold-600);
}

.auth-card-mark .icon {
  width: 20px;
  height: 20px;
}

/* 页眉小标：全站中文，字号按中文可读性取 11px（原 9.5px + 2.3px 字距是为英文
   大写设计的，中文会被拉散且过小）。颜色由 gold-600 提到 gold-700，
   在白底对比度约 5.9:1，满足小字正文要求。 */
.eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--gold-700);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.2px;
}

.eyebrow > span {
  display: inline-block;
  width: 18px;
  height: 1px;
  background: var(--gold-500);
}

.auth-card-head h2 {
  margin-top: 7px;
  color: var(--ink-900);
  font-family: var(--font-serif);
  font-size: 27px;
  font-weight: 600;
  letter-spacing: 1px;
}

.auth-card-head p {
  margin-top: 6px;
  color: var(--text-muted);
  font-size: 11.5px;
}

.auth-tabs {
  position: relative;
  display: flex;
  gap: 26px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 24px;
}

.auth-tab {
  position: relative;
  padding: 0 0 12px;
  border: 0;
  background: transparent;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.4px;
  transition: color var(--speed);
}

.auth-tab:hover {
  color: var(--text);
}

.auth-tab.is-active {
  color: var(--ink-900);
  font-weight: 600;
}

.auth-tab-ink {
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 52px;
  height: 2px;
  background: var(--gold-500);
  transition: transform var(--speed) var(--ease);
}

.auth-card[data-tab="register"] .auth-tab-ink {
  transform: translateX(78px);
  width: 76px;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.auth-form.shake {
  animation: formShake 360ms var(--ease);
}

@keyframes formShake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(5px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(3px); }
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.auth-field > span:first-child {
  color: var(--text-secondary);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.4px;
}

.auth-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.auth-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.auth-input-wrap > .icon {
  position: absolute;
  left: 14px;
  width: 16px;
  height: 16px;
  color: #97a5b1;
  transition: color var(--speed);
  z-index: 1;
}

.auth-input-wrap input {
  width: 100%;
  height: 48px;
  padding: 0 42px 0 40px;
  border: 1px solid #dfe5e9;
  border-radius: 9px;
  background: #f9fafb;
  color: var(--text);
  font-size: 13px;
  transition:
    border-color var(--speed),
    background var(--speed),
    box-shadow var(--speed);
}

.auth-input-wrap input::placeholder {
  color: #a8b4bd;
  font-size: 12px;
}

.auth-input-wrap input:hover {
  border-color: #cdd7de;
}

.auth-input-wrap input:focus {
  outline: none;
  border-color: var(--gold-400);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(184, 148, 88, 0.11);
}

.auth-input-wrap:focus-within > .icon {
  color: var(--gold-600);
}

.password-toggle {
  position: absolute;
  right: 7px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #95a3ae;
}

.password-toggle:hover {
  color: var(--text);
  background: #f1f4f5;
}

.password-toggle .icon {
  width: 17px;
  height: 17px;
}

.auth-form-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: -2px;
}

.check-inline {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--text-muted);
  font-size: 11px;
  cursor: pointer;
  user-select: none;
}

.check-inline input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.mini-check {
  display: grid;
  place-items: center;
  width: 15px;
  height: 15px;
  border: 1px solid #cbd5dc;
  border-radius: 4px;
  background: #fff;
  color: transparent;
  transition: all var(--speed);
}

.mini-check .icon {
  width: 11px;
  height: 11px;
  stroke-width: 2.6;
}

.check-inline input:checked + .mini-check {
  background: var(--ink-900);
  border-color: var(--ink-900);
  color: #fff;
}

.check-inline input:focus-visible + .mini-check {
  outline: 2px solid var(--gold-500);
  outline-offset: 2px;
}

.auth-help {
  color: var(--text-muted);
  font-size: 10.5px;
}

.btn-auth {
  width: 100%;
  height: 50px;
  margin-top: 2px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px 0 22px;
  border: 1px solid var(--ink-900);
  border-radius: 9px;
  background: var(--ink-900);
  color: #f7f2e8;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.6px;
  transition:
    background var(--speed),
    border-color var(--speed),
    transform var(--speed),
    box-shadow var(--speed);
}

.btn-auth .icon {
  width: 17px;
  height: 17px;
  color: var(--gold-300);
  transition: transform var(--speed) var(--ease);
}

.btn-auth:hover {
  background: var(--ink-800);
  border-color: var(--ink-800);
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(11, 31, 51, 0.16);
}

.btn-auth:hover .icon {
  transform: translateX(3px);
}

.btn-auth:disabled {
  opacity: 0.7;
  transform: none;
}

.auth-security {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 26px;
  padding-top: 18px;
  border-top: 1px solid var(--line-soft);
  color: var(--text-muted);
  font-size: 9.5px;
  letter-spacing: 0.4px;
}

.auth-security span {
  display: flex;
  align-items: center;
  gap: 5px;
}

.auth-security .icon {
  width: 12px;
  height: 12px;
  color: #9eabb6;
}

.auth-copyright {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-top: 24px;
  color: #a0acb5;
  font-size: 9.5px;
  letter-spacing: 0.3px;
}

.demo-access {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--line-soft);
}

.demo-access-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  color: var(--text-secondary);
  font-size: 10px;
  letter-spacing: 1px;
  font-weight: 600;
}

.demo-access-head i {
  color: var(--text-faint);
  font-style: normal;
  font-weight: 400;
  letter-spacing: 0;
}

.demo-accounts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.demo-account {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfc;
  text-align: left;
  transition: all var(--speed);
}

.demo-account > .icon {
  display: none;
}

.demo-account .demo-copy {
  flex: 1;
}

.demo-account .demo-copy strong {
  font-size: 10px;
  letter-spacing: 0;
}

.demo-account:hover {
  border-color: var(--gold-300);
  background: var(--gold-050);
}

.demo-avatar {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  flex: 0 0 auto;
  border-radius: 7px;
  background: var(--ink-900);
  color: var(--gold-200);
  font-family: var(--font-serif);
  font-size: 12px;
}

.demo-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.demo-copy strong {
  color: var(--text);
  font-size: 10.5px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.demo-copy small {
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 9px;
}

.demo-note {
  display: flex;
  align-items: flex-start;
  gap: 5px;
  margin-top: 10px;
  color: var(--text-faint);
  font-size: 9.5px;
  line-height: 1.6;
}

.demo-note .icon {
  width: 11px;
  height: 11px;
  margin-top: 2px;
}

.register-hint {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  color: var(--text-faint);
  font-size: 10px;
  line-height: 1.7;
}

.register-hint .icon {
  width: 12px;
  height: 12px;
  margin-top: 3px;
}

.auth-notice {
  margin: 0 0 18px;
}

.form-alert {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  padding: 10px 12px;
  border: 1px solid var(--danger-line);
  border-radius: 8px;
  background: var(--danger-bg);
  color: var(--danger);
  font-size: 11.5px;
  line-height: 1.6;
}

.form-alert .icon {
  width: 14px;
  height: 14px;
  margin-top: 2px;
}

/* --------------------------------------------------------------------------
   App shell
   -------------------------------------------------------------------------- */

.app-shell {
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar-scrim {
  display: none;
}

.sidebar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
  padding: 28px 20px 22px;
  color: rgba(236, 240, 242, 0.72);
  background:
    radial-gradient(circle at 8% 6%, rgba(201, 166, 107, 0.12), transparent 25%),
    linear-gradient(170deg, #071521 0%, #0a1d30 48%, #0c2438 100%);
}

.sidebar::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.33;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.024) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.024) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: linear-gradient(to bottom, black, transparent 92%);
}

.sidebar-glow {
  position: absolute;
  left: -100px;
  bottom: 8%;
  width: 290px;
  height: 290px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(201, 166, 107, 0.075), transparent 65%);
  pointer-events: none;
}

.brand-block {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 8px;
  border-radius: 10px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 9px;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.28);
}

.brand-word {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.brand-word strong {
  color: #f5f0e6;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 4px;
  line-height: 1.3;
}

.brand-word small {
  color: rgba(201, 166, 107, 0.68);
  font-size: 7.5px;
  letter-spacing: 2.5px;
  line-height: 1.4;
  margin-top: 2px;
}

.brand-rule {
  position: relative;
  z-index: 1;
  height: 1px;
  margin: 26px 8px 20px;
  background: linear-gradient(90deg, rgba(201, 166, 107, 0.3), rgba(255, 255, 255, 0.05), transparent);
}

.main-nav {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-caption {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 8px 10px;
  color: rgba(236, 240, 242, 0.3);
  font-size: 8.5px;
  font-weight: 600;
  letter-spacing: 2.4px;
}

.nav-caption i {
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.06);
}

.nav-caption-sub {
  margin-top: 22px;
}

.nav-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 46px;
  padding: 0 12px;
  border-radius: 9px;
  color: rgba(231, 237, 241, 0.62);
  font-size: 12.5px;
  letter-spacing: 0.4px;
  transition:
    color var(--speed),
    background var(--speed),
    transform var(--speed);
}

.nav-link::before {
  content: "";
  position: absolute;
  left: -20px;
  top: 13px;
  bottom: 13px;
  width: 2px;
  border-radius: 2px;
  background: transparent;
  transition: background var(--speed);
}

.nav-icon {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  border-radius: 7px;
  color: rgba(217, 225, 231, 0.47);
  transition: all var(--speed);
}

.nav-icon .icon {
  width: 17px;
  height: 17px;
}

.nav-text {
  flex: 1;
}

.nav-arrow {
  opacity: 0;
  transform: translateX(-4px);
  transition: all var(--speed);
}

.nav-arrow .icon {
  width: 13px;
  height: 13px;
  color: var(--gold-400);
}

.nav-link:hover {
  color: #f2ece2;
  background: rgba(255, 255, 255, 0.045);
}

.nav-link:hover .nav-icon {
  color: var(--gold-300);
}

.nav-link:hover .nav-arrow {
  opacity: 0.7;
  transform: translateX(0);
}

.nav-link.is-active {
  color: #f7f1e7;
  background: linear-gradient(90deg, rgba(201, 166, 107, 0.18), rgba(201, 166, 107, 0.055));
  box-shadow: inset 0 0 0 1px rgba(201, 166, 107, 0.13);
}

.nav-link.is-active::before {
  background: var(--gold-400);
  box-shadow: 0 0 12px rgba(201, 166, 107, 0.5);
}

.nav-link.is-active .nav-icon {
  color: var(--gold-300);
  background: rgba(201, 166, 107, 0.1);
}

.nav-link.is-active .nav-arrow {
  opacity: 0;
}

.nav-badge {
  display: inline-grid;
  place-items: center;
  min-width: 19px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: rgba(201, 166, 107, 0.2);
  color: var(--gold-200);
  font-family: var(--font-number);
  font-size: 9px;
  font-weight: 600;
}

.sidebar-panel {
  position: relative;
  z-index: 1;
  margin-top: auto;
  padding: 16px;
  border: 1px solid rgba(201, 166, 107, 0.14);
  border-radius: 12px;
  background:
    linear-gradient(145deg, rgba(201, 166, 107, 0.075), rgba(255, 255, 255, 0.018));
  margin-top: auto;
}

.sidebar-panel-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: rgba(236, 240, 242, 0.4);
  font-size: 8.5px;
  letter-spacing: 1.2px;
}

.status-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--gold-400);
}

.status-dot.is-live {
  box-shadow: 0 0 0 4px rgba(201, 166, 107, 0.1);
}

.sidebar-panel-main {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 10px 0 14px;
}

.sidebar-panel-main strong {
  color: #f0eade;
  font-family: var(--font-number);
  font-size: 24px;
  font-weight: 500;
  letter-spacing: 0.5px;
}

.sidebar-panel-main span {
  color: rgba(236, 240, 242, 0.3);
  font-size: 9px;
}

.sidebar-panel-foot {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding-top: 11px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  color: rgba(236, 240, 242, 0.3);
  font-size: 8.5px;
}

.sidebar-panel-foot span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.sidebar-panel-foot .icon {
  width: 10px;
  height: 10px;
}

.sidebar-footer {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 20px 8px 0;
  color: rgba(236, 240, 242, 0.22);
  font-size: 8.5px;
  letter-spacing: 0.4px;
}

.sidebar-slogan {
  color: rgba(201, 166, 107, 0.32);
  letter-spacing: 2px;
}

.main-shell {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 100vh;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  height: var(--topbar-height);
  padding: 0 34px;
  border-bottom: 1px solid rgba(216, 224, 229, 0.75);
  background: rgba(248, 249, 249, 0.88);
  backdrop-filter: blur(16px);
}

.topbar-left {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 12px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  color: var(--text-muted);
  font-size: 11px;
  letter-spacing: 0.3px;
}

.breadcrumb i {
  display: flex;
  color: #bbc5cd;
}

.breadcrumb .icon {
  width: 12px;
  height: 12px;
}

.breadcrumb strong {
  color: var(--text);
  font-weight: 600;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.data-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.65);
  color: var(--text-muted);
  font-size: 9.5px;
  letter-spacing: 0.3px;
  white-space: nowrap;
}

.data-chip .icon {
  width: 12px;
  height: 12px;
  color: var(--gold-600);
}

.topbar-divider {
  width: 1px;
  height: 24px;
  background: var(--line);
  margin: 0 3px;
}

.icon-btn {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--text-secondary);
  transition: all var(--speed);
}

.icon-btn:hover {
  color: var(--text);
  background: #fff;
  border-color: var(--line);
}

.icon-btn.danger:hover {
  color: var(--danger);
  background: var(--danger-bg);
  border-color: var(--danger-line);
}

.icon-btn .icon {
  width: 17px;
  height: 17px;
}

.bell-btn {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.7);
}

.bell-btn:hover {
  border-color: var(--gold-300);
  color: var(--gold-600);
}

.bell-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  display: inline-grid;
  place-items: center;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border: 2px solid #f8f9f9;
  border-radius: 999px;
  background: var(--danger);
  color: #fff;
  font-family: var(--font-number);
  font-size: 8px;
  font-weight: 600;
  line-height: 1;
}

.mobile-menu {
  display: none;
}

.user-menu-wrap {
  position: relative;
}

.user-trigger {
  display: flex;
  align-items: center;
  gap: 9px;
  height: 44px;
  padding: 0 7px 0 4px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  text-align: left;
  transition: all var(--speed);
}

.user-trigger:hover,
.user-trigger.is-open {
  background: #fff;
  border-color: var(--line);
}

.user-trigger-copy {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.user-trigger-copy strong {
  color: var(--text);
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.35;
}

.user-trigger-copy small {
  color: var(--text-muted);
  font-size: 9px;
  line-height: 1.35;
}

.user-chevron {
  width: 13px;
  height: 13px;
  margin-left: 3px;
  color: var(--text-faint);
  transition: transform var(--speed);
}

.user-trigger.is-open .user-chevron {
  transform: rotate(180deg);
}

.user-dropdown {
  position: absolute;
  top: calc(100% + 9px);
  right: 0;
  z-index: 70;
  width: 264px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--shadow-md);
  animation: dropdownIn 180ms var(--ease);
}

@keyframes dropdownIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

.user-dropdown-head {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 16px;
  border-bottom: 1px solid var(--line-soft);
  background: linear-gradient(135deg, #fbfaf6, #fff);
}

.user-dropdown-head > div {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.user-dropdown-head strong {
  font-size: 13px;
  font-weight: 600;
}

.user-dropdown-head span {
  color: var(--text-muted);
  font-size: 9.5px;
  margin-top: 2px;
}

.user-dropdown-body {
  padding: 7px;
}

.user-dropdown-body button {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 10px 10px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--text-secondary);
  font-size: 11.5px;
  text-align: left;
}

.user-dropdown-body button:hover {
  background: var(--paper);
  color: var(--text);
}

.user-dropdown-body button.is-danger:hover {
  background: var(--danger-bg);
  color: var(--danger);
}

.user-dropdown-body .icon {
  width: 15px;
  height: 15px;
}

.user-dropdown-foot {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 9px 16px;
  border-top: 1px solid var(--line-soft);
  background: #fafbfb;
  color: var(--text-faint);
  font-size: 8.5px;
}

.user-dropdown-foot .icon {
  width: 11px;
  height: 11px;
}

.page-container {
  flex: 1;
  width: 100%;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 28px 34px 34px;
  outline: none;
}

.app-footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  width: 100%;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 34px 24px;
  color: #9ca9b3;
  font-size: 9px;
  letter-spacing: 0.2px;
}

.app-footer span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.app-footer .icon {
  width: 10px;
  height: 10px;
}

.page-loading {
  min-height: 56vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: var(--text-muted);
  font-size: 11px;
  letter-spacing: 1px;
}

.spinner {
  display: inline-block;
  width: 17px;
  height: 17px;
  border: 2px solid rgba(11, 31, 51, 0.12);
  border-top-color: var(--gold-500);
  border-radius: 50%;
  animation: spin 700ms linear infinite;
}

.spinner-lg {
  width: 30px;
  height: 30px;
  border-width: 2.5px;
}

.btn-spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 1.8px solid rgba(255, 255, 255, 0.3);
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 700ms linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* --------------------------------------------------------------------------
   Typography / page head
   -------------------------------------------------------------------------- */

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
  padding-top: 4px;
}

.page-head-copy {
  min-width: 0;
}

.page-head .eyebrow {
  margin-bottom: 9px;
}

.page-title {
  color: var(--ink-900);
  font-family: var(--font-serif);
  font-size: 30px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: 0.8px;
}

.page-desc {
  margin-top: 8px;
  color: var(--text-muted);
  font-size: 11.5px;
  line-height: 1.7;
}

.page-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
  padding-bottom: 3px;
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 36px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-size: 11.5px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.2px;
  white-space: nowrap;
  transition:
    color var(--speed),
    background var(--speed),
    border-color var(--speed),
    transform var(--speed),
    box-shadow var(--speed);
}

.btn .icon {
  width: 15px;
  height: 15px;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn:disabled {
  opacity: 0.62;
  transform: none;
}

.btn-primary {
  background: var(--ink-900);
  border-color: var(--ink-900);
  color: #f8f4ec;
}

.btn-primary:hover {
  background: var(--ink-800);
  border-color: var(--ink-800);
  box-shadow: 0 8px 18px rgba(11, 31, 51, 0.14);
}

.btn-secondary {
  background: #fff;
  border-color: var(--line-strong);
  color: var(--text-secondary);
}

.btn-secondary:hover {
  border-color: var(--gold-300);
  color: var(--ink-900);
  background: var(--gold-050);
}

.btn-ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--text-secondary);
}

.btn-ghost:hover {
  background: #fff;
  color: var(--text);
}

.btn-gold {
  background: var(--gold-500);
  border-color: var(--gold-500);
  color: #fff;
}

.btn-gold:hover {
  background: var(--gold-600);
  border-color: var(--gold-600);
  box-shadow: var(--shadow-gold);
}

.btn-ghost-on-dark {
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.05);
  color: rgba(248, 244, 236, 0.78);
}

.btn-ghost-on-dark:hover {
  border-color: rgba(220, 192, 140, 0.36);
  color: #fff;
  background: rgba(255, 255, 255, 0.09);
}

.btn-danger {
  background: var(--danger);
  border-color: var(--danger);
  color: #fff;
}

.btn-danger:hover {
  background: #9e3326;
  border-color: #9e3326;
}

.btn-sm {
  height: 30px;
  padding: 0 10px;
  font-size: 10.5px;
  border-radius: 7px;
}

.btn-sm .icon {
  width: 13px;
  height: 13px;
}

.btn-lg {
  height: 42px;
  padding: 0 18px;
  font-size: 12.5px;
}

.btn-icon-only {
  width: 34px;
  padding: 0;
}

.link-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 500;
  white-space: nowrap;
  transition: color var(--speed);
}

.link-btn .icon {
  width: 12px;
  height: 12px;
  transition: transform var(--speed);
}

.link-btn:hover {
  color: var(--gold-600);
}

.link-btn:hover .icon {
  transform: translate(1px, -1px);
}

.is-busy {
  pointer-events: none;
}

/* --------------------------------------------------------------------------
   Form controls
   -------------------------------------------------------------------------- */

.form-stack {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 15px;
}

.form-grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.form-field.span-2 {
  grid-column: span 2;
}

.form-field.span-3 {
  grid-column: span 3;
}

.field-label {
  display: flex;
  align-items: center;
  gap: 3px;
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 500;
}

.field-label em {
  color: var(--danger);
  font-style: normal;
}

.input {
  width: 100%;
  height: 38px;
  padding: 0 11px;
  border: 1px solid #dfe5e9;
  border-radius: 7px;
  background: #fbfcfc;
  color: var(--text);
  font-size: 12px;
  transition:
    border-color var(--speed),
    background var(--speed),
    box-shadow var(--speed);
}

.input::placeholder {
  color: #a8b4bd;
}

.input:hover {
  border-color: #ccd6dd;
}

.input:focus {
  outline: none;
  border-color: var(--gold-400);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(184, 148, 88, 0.1);
}

.input:disabled {
  background: #f2f4f5;
  color: var(--text-muted);
}

.textarea {
  height: auto;
  min-height: 78px;
  padding: 9px 11px;
  line-height: 1.65;
  resize: vertical;
}

.select {
  appearance: none;
  padding-right: 30px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238493a0' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  cursor: pointer;
}

.field-hint {
  color: var(--text-faint);
  font-size: 9.5px;
  line-height: 1.5;
}

.form-note {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  padding: 10px 12px;
  border-radius: 8px;
  background: #f7f9fa;
  color: var(--text-muted);
  font-size: 10px;
  line-height: 1.7;
}

.form-note .icon {
  width: 13px;
  height: 13px;
  margin-top: 2px;
  color: var(--gold-600);
}

.form-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.check-field {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  cursor: pointer;
  user-select: none;
}

.check-field input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.check-box {
  display: grid;
  place-items: center;
  width: 16px;
  height: 16px;
  margin-top: 1px;
  flex: 0 0 auto;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: #fff;
  color: transparent;
  transition: all var(--speed);
}

.check-box .icon {
  width: 11px;
  height: 11px;
  stroke-width: 2.6;
}

.check-field input:checked + .check-box {
  background: var(--ink-900);
  border-color: var(--ink-900);
  color: #fff;
}

.check-field input:focus-visible + .check-box {
  outline: 2px solid var(--gold-500);
  outline-offset: 2px;
}

.check-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.check-copy strong {
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 500;
}

.check-copy small {
  color: var(--text-faint);
  font-size: 9.5px;
  line-height: 1.5;
}

.switch-field {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  cursor: pointer;
  user-select: none;
}

.switch-field input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.switch-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.switch-copy strong {
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 500;
}

.switch-copy small {
  color: var(--text-faint);
  font-size: 9.5px;
  line-height: 1.5;
}

.switch-track {
  position: relative;
  width: 32px;
  height: 18px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: #d8e0e5;
  transition: background var(--speed);
}

.switch-track span {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.16);
  transition: transform var(--speed) var(--ease);
}

.switch-field input:checked + .switch-track {
  background: var(--ink-800);
}

.switch-field input:checked + .switch-track span {
  transform: translateX(14px);
}

.switch-field input:focus-visible + .switch-track {
  outline: 2px solid var(--gold-500);
  outline-offset: 2px;
}

.search-box {
  position: relative;
  display: flex;
  align-items: center;
  min-width: 220px;
}

.search-box > .icon {
  position: absolute;
  left: 11px;
  width: 15px;
  height: 15px;
  color: var(--text-faint);
  pointer-events: none;
}

.search-box .input {
  height: 36px;
  padding-left: 34px;
  background: #fff;
}

.search-box .search-clear {
  position: absolute;
  right: 7px;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--text-faint);
}

.search-box .search-clear:hover {
  background: var(--paper);
  color: var(--text);
}

.search-box .search-clear .icon {
  width: 12px;
  height: 12px;
}

/* --------------------------------------------------------------------------
   Cards / panels
   -------------------------------------------------------------------------- */

.card {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--card);
  box-shadow: var(--shadow-xs);
}

.panel {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 22px 23px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--card);
  box-shadow: var(--shadow-xs);
  transition:
    border-color var(--speed),
    box-shadow var(--speed);
}

.panel:hover {
  border-color: #d9e1e6;
  box-shadow: var(--shadow-sm);
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.panel-head-wrap {
  flex-wrap: wrap;
}

.panel-eyebrow {
  display: block;
  color: var(--gold-700);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.8px;
  margin-bottom: 5px;
}

.panel-head h2 {
  color: var(--ink-900);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.3px;
  line-height: 1.35;
}

.panel-head p {
  margin-top: 3px;
  color: var(--text-muted);
  font-size: 9.5px;
  letter-spacing: 0.2px;
}

.panel-stat {
  color: var(--text-muted);
  font-family: var(--font-number);
  font-size: 10px;
  letter-spacing: 0.5px;
  white-space: nowrap;
  padding-top: 2px;
}

.panel-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--line-soft);
  color: var(--text-faint);
  font-size: 9px;
  line-height: 1.6;
}

.panel-foot > span:first-child {
  display: flex;
  align-items: center;
  gap: 4px;
}

.panel-foot .icon {
  width: 11px;
  height: 11px;
}

/* --------------------------------------------------------------------------
   Badges / avatars / pills
   -------------------------------------------------------------------------- */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 21px;
  padding: 2px 7px;
  border: 1px solid transparent;
  border-radius: 5px;
  font-size: 9px;
  font-weight: 500;
  line-height: 1.5;
  white-space: nowrap;
}

.badge-dot {
  width: 4px;
  height: 4px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: currentColor;
}

.badge-success {
  color: var(--success);
  background: var(--success-bg);
  border-color: var(--success-line);
}

.badge-warning {
  color: var(--warning);
  background: var(--warning-bg);
  border-color: var(--warning-line);
}

.badge-danger {
  color: var(--danger);
  background: var(--danger-bg);
  border-color: var(--danger-line);
}

.badge-info {
  color: var(--info);
  background: var(--info-bg);
  border-color: var(--info-line);
}

.badge-gold {
  color: var(--gold-600);
  background: var(--gold-050);
  border-color: var(--gold-200);
}

.badge-neutral {
  color: var(--text-muted);
  background: #f3f6f7;
  border-color: #e4eaed;
}

.badge-navy {
  color: #fff;
  background: var(--ink-800);
  border-color: var(--ink-800);
}

.badge-multi {
  color: #8a6530;
  background: linear-gradient(135deg, #faf2e2, #f4e6cb);
  border-color: #ead8b6;
  font-weight: 600;
}

.badge-multi .icon {
  width: 11px;
  height: 11px;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 7px;
  border-radius: 4px;
  background: #f3f6f7;
  color: var(--text-muted);
  font-size: 9px;
  line-height: 1.4;
  white-space: nowrap;
}

.tag-gold {
  background: var(--gold-050);
  color: var(--gold-600);
}

.tag-navy {
  background: #eef2f5;
  color: var(--ink-700);
}

.avatar {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 9px;
  background: #e9eef1;
  color: var(--ink-700);
  font-family: var(--font-serif);
  font-weight: 600;
  line-height: 1;
}

.avatar-sm {
  width: 30px;
  height: 30px;
  font-size: 12px;
  border-radius: 8px;
}

.avatar-md {
  width: 36px;
  height: 36px;
  font-size: 14px;
}

.avatar-lg {
  width: 44px;
  height: 44px;
  font-size: 17px;
}

.avatar-soft {
  background: linear-gradient(145deg, #eef2f4, #e1e8ed);
  color: var(--ink-700);
}

.avatar-gold {
  background: linear-gradient(145deg, var(--ink-800), var(--ink-900));
  color: var(--gold-200);
  box-shadow: inset 0 0 0 1px rgba(201, 166, 107, 0.25);
}

.avatar-img {
  background: #dbe4e9;
  color: var(--ink-700);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--success-bg);
  color: var(--success);
  font-size: 9px;
  white-space: nowrap;
}

.status-pill::before {
  content: "";
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
}

/* --------------------------------------------------------------------------
   Data tables / toolbar
   -------------------------------------------------------------------------- */

.table-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--card);
  box-shadow: var(--shadow-xs);
  overflow: hidden;
}

.table-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line-soft);
}

.table-card-head h2 {
  color: var(--ink-900);
  font-size: 14px;
  font-weight: 600;
}

.table-card-head p {
  color: var(--text-muted);
  font-size: 9.5px;
  margin-top: 2px;
}

.table-scroll {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
  text-align: left;
  /* 表格内所有数字使用等宽字形：金额、人数、日期纵向对齐，便于逐行比大小。 */
  font-variant-numeric: tabular-nums;
}

.data-table thead th {
  padding: 11px 13px;
  border-bottom: 1px solid var(--line);
  background: #f8fafb;
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.2px;
  white-space: nowrap;
  vertical-align: middle;
}

.data-table thead th:first-child,
.data-table tbody td:first-child {
  padding-left: 20px;
}

.data-table thead th:last-child,
.data-table tbody td:last-child {
  padding-right: 20px;
}

.data-table tbody td {
  padding: 13px;
  border-bottom: 1px solid var(--line-soft);
  color: var(--text-secondary);
  vertical-align: middle;
}

.data-table tbody tr {
  transition: background var(--speed);
}

.data-table tbody tr:hover {
  background: #fbfcfc;
}

.data-table tbody tr:last-child td {
  border-bottom: 0;
}

.data-table .cell-title {
  display: block;
  color: var(--text);
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1.5;
}

.data-table .cell-sub {
  display: block;
  color: var(--text-secondary);
  font-size: 10.5px;
  line-height: 1.5;
  margin-top: 2px;
}

.data-table .cell-strong {
  color: var(--text);
  font-weight: 600;
}

.data-table .cell-number {
  font-family: var(--font-number);
  color: var(--text);
  font-size: 13px;
  letter-spacing: 0.2px;
  font-variant-numeric: tabular-nums;
}

/* 数值列：右对齐 + 等宽数字，纵向比大小时不需要左右来回扫。
   表头用同一 class，保证表头与数据同侧对齐。 */
.data-table th.is-numeric,
.data-table td.is-numeric {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.data-table .cell-center {
  text-align: center;
}

.table-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  justify-content: flex-end;
}

.table-actions .icon-btn {
  width: 28px;
  height: 28px;
}

.table-actions .icon-btn .icon {
  width: 14px;
  height: 14px;
}

.table-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 20px;
  border-top: 1px solid var(--line-soft);
  background: #fcfdfd;
}

.toolbar-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 13px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--card);
  box-shadow: var(--shadow-xs);
  margin-bottom: 14px;
}

.toolbar-left,
.toolbar-right {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.filter-grid .form-field {
  gap: 4px;
}

.filter-grid .field-label {
  font-size: 9.5px;
  color: var(--text-muted);
}

.filter-grid .input {
  height: 34px;
  font-size: 11px;
}

.filter-actions {
  display: flex;
  align-items: flex-end;
  gap: 7px;
  padding-bottom: 0;
}

.segmented {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7f9fa;
}

.segmented button {
  height: 27px;
  padding: 0 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text-muted);
  font-size: 10px;
  white-space: nowrap;
  transition: all var(--speed);
}

.segmented button:hover {
  color: var(--text);
}

.segmented button.is-active {
  background: #fff;
  color: var(--ink-900);
  font-weight: 500;
  box-shadow: 0 1px 3px rgba(11, 31, 51, 0.08);
}

.segmented.mini {
  padding: 2px;
  border-color: var(--line-soft);
  background: #f8f9fa;
}

.segmented.mini button {
  height: 24px;
  padding: 0 8px;
  font-size: 9px;
}

.stat-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.mini-stat {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--card);
  box-shadow: var(--shadow-xs);
}

.mini-stat-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border-radius: 8px;
  background: #f2f5f6;
  color: var(--ink-700);
}

.mini-stat-icon .icon {
  width: 16px;
  height: 16px;
}

.mini-stat-icon.is-gold {
  background: var(--gold-050);
  color: var(--gold-600);
}

.mini-stat-icon.is-success {
  background: var(--success-bg);
  color: var(--success);
}

.mini-stat-icon.is-warning {
  background: var(--warning-bg);
  color: var(--warning);
}

.mini-stat-icon.is-danger {
  background: var(--danger-bg);
  color: var(--danger);
}

.mini-stat-copy {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.mini-stat-copy strong {
  color: var(--ink-900);
  font-family: var(--font-number);
  font-size: 20px;
  font-weight: 500;
  line-height: 1.2;
}

.mini-stat-copy strong small {
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 9px;
  margin-left: 2px;
}

.mini-stat-copy span {
  color: var(--text-muted);
  font-size: 9px;
}

/* --------------------------------------------------------------------------
   Pagination
   -------------------------------------------------------------------------- */

.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  width: 100%;
}

.pagination-total,
.pagination-meta {
  color: var(--text-muted);
  font-size: 9.5px;
}

.pagination-simple {
  color: var(--text-muted);
  font-size: 9.5px;
}

.pagination-controls {
  display: flex;
  align-items: center;
  gap: 3px;
}

.page-btn {
  display: grid;
  place-items: center;
  min-width: 27px;
  height: 27px;
  padding: 0 7px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-number);
  font-size: 10px;
}

.page-btn:hover:not(:disabled) {
  border-color: var(--line);
  background: #fff;
  color: var(--text);
}

.page-btn.is-active {
  background: var(--ink-900);
  color: #fff;
  border-color: var(--ink-900);
}

.page-btn:disabled {
  opacity: 0.35;
}

.page-btn .icon {
  width: 12px;
  height: 12px;
}

.page-ellipsis {
  color: var(--text-faint);
  font-size: 10px;
  padding: 0 2px;
}

/* --------------------------------------------------------------------------
   Modal / drawer / toast
   -------------------------------------------------------------------------- */

.modal-backdrop,
.drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(7, 20, 32, 0.5);
  backdrop-filter: blur(3px);
  opacity: 0;
  transition: opacity 220ms var(--ease);
}

.modal-backdrop.is-open,
.drawer-backdrop.is-open {
  opacity: 1;
}

.modal-backdrop {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px 18px;
  overflow-y: auto;
}

.modal-panel {
  width: 100%;
  max-height: calc(100vh - 56px);
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: var(--shadow-lg);
  transform: translateY(12px) scale(0.985);
  opacity: 0;
  transition:
    transform 240ms var(--ease),
    opacity 240ms var(--ease);
  overflow: hidden;
}

.modal-backdrop.is-open .modal-panel {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.modal-sm { max-width: 430px; }
.modal-md { max-width: 600px; }
.modal-lg { max-width: 820px; }
.modal-xl { max-width: 1040px; }

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 24px 17px;
  border-bottom: 1px solid var(--line-soft);
}

.modal-head .eyebrow {
  margin-bottom: 6px;
}

.modal-head h2 {
  color: var(--ink-900);
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: 0.4px;
}

.modal-head p {
  margin-top: 4px;
  color: var(--text-muted);
  font-size: 10.5px;
  line-height: 1.6;
}

.modal-close {
  margin-top: -3px;
  flex: 0 0 auto;
}

.modal-body {
  padding: 22px 24px;
  overflow-y: auto;
}

.modal-foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 15px 24px;
  border-top: 1px solid var(--line-soft);
  background: #fbfcfc;
}

.modal-foot:empty,
.drawer-foot:empty {
  display: none;
}

.modal-panel.is-busy .modal-body {
  pointer-events: none;
  opacity: 0.7;
}

.drawer-backdrop {
  display: flex;
  justify-content: flex-end;
}

.drawer-panel {
  display: flex;
  flex-direction: column;
  width: min(var(--drawer-width, 560px), calc(100vw - 30px));
  height: 100%;
  background: #fff;
  border-left: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: -24px 0 60px rgba(7, 20, 32, 0.18);
  transform: translateX(30px);
  opacity: 0.7;
  transition:
    transform 280ms var(--ease),
    opacity 280ms var(--ease);
}

.drawer-backdrop.is-open .drawer-panel {
  transform: translateX(0);
  opacity: 1;
}

.drawer-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 26px 18px;
  border-bottom: 1px solid var(--line-soft);
  background: linear-gradient(180deg, #fbfaf7, #fff);
}

.drawer-head .eyebrow {
  margin-bottom: 7px;
}

.drawer-head h2 {
  color: var(--ink-900);
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 600;
  line-height: 1.3;
}

.drawer-head p {
  margin-top: 5px;
  color: var(--text-muted);
  font-size: 10.5px;
  line-height: 1.65;
}

.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 22px 26px;
}

.drawer-foot {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
  padding: 15px 26px;
  border-top: 1px solid var(--line-soft);
  background: #fbfcfc;
}

.drawer-panel.is-busy .drawer-body {
  pointer-events: none;
  opacity: 0.7;
}

.drawer-section {
  margin-bottom: 22px;
}

.drawer-section:last-child {
  margin-bottom: 0;
}

.drawer-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
  color: var(--text-muted);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 1.4px;
  text-transform: uppercase;
}

.drawer-section-title i {
  flex: 1;
  height: 1px;
  background: var(--line-soft);
}

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 18px;
}

.detail-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.detail-item.span-2 {
  grid-column: span 2;
}

.detail-item dt,
.detail-item .detail-label {
  color: var(--text-muted);
  font-size: 9.5px;
}

.detail-item dd,
.detail-item .detail-value {
  margin: 0;
  color: var(--text);
  font-size: 11.5px;
  line-height: 1.65;
  word-break: break-word;
}

.detail-item .detail-value.mono {
  font-family: var(--font-mono);
  font-size: 10.5px;
}

.drawer-note {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  margin-top: 18px;
  padding: 11px 13px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: #fafcfc;
  color: var(--text-muted);
  font-size: 9.5px;
  line-height: 1.7;
}

.drawer-note .icon {
  width: 13px;
  height: 13px;
  margin-top: 1px;
  color: var(--gold-600);
}

.toast-stack {
  position: fixed;
  top: 22px;
  right: 22px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: min(360px, calc(100vw - 32px));
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 13px 13px 13px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  box-shadow: var(--shadow-md);
  pointer-events: auto;
  opacity: 0;
  transform: translateX(16px);
  transition:
    opacity 220ms var(--ease),
    transform 220ms var(--ease);
}

.toast.is-visible {
  opacity: 1;
  transform: translateX(0);
}

.toast.is-leaving {
  opacity: 0;
  transform: translateX(12px);
}

.toast-icon {
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  flex: 0 0 auto;
  border-radius: 7px;
  background: var(--success-bg);
  color: var(--success);
}

.toast-icon .icon {
  width: 15px;
  height: 15px;
}

.toast-error .toast-icon { background: var(--danger-bg); color: var(--danger); }
.toast-warning .toast-icon { background: var(--warning-bg); color: var(--warning); }
.toast-info .toast-icon { background: var(--info-bg); color: var(--info); }

.toast-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.toast-copy strong {
  color: var(--text);
  font-size: 11.5px;
  font-weight: 600;
}

.toast-copy span {
  color: var(--text-secondary);
  font-size: 10.5px;
  line-height: 1.6;
  word-break: break-word;
}

.toast-close {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--text-faint);
}

.toast-close:hover {
  background: var(--paper);
  color: var(--text);
}

.toast-close .icon {
  width: 12px;
  height: 12px;
}

.confirm-copy {
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.confirm-mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--info-bg);
  color: var(--info);
}

.confirm-mark.is-danger {
  background: var(--danger-bg);
  color: var(--danger);
}

.confirm-copy p {
  color: var(--text);
  font-size: 12px;
  line-height: 1.75;
}

.confirm-copy > span {
  color: var(--text-muted);
  font-size: 10.5px;
  line-height: 1.7;
}

/* --------------------------------------------------------------------------
   Attachments
   -------------------------------------------------------------------------- */

.attachment-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.attachment-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border: 1px solid var(--line-soft);
  border-radius: 7px;
  background: #fbfcfc;
}

.file-type {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  border-radius: 6px;
  background: var(--danger-bg);
  color: var(--danger);
}

.file-type .icon {
  width: 15px;
  height: 15px;
}

.attachment-copy {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
  flex: 1;
}

.attachment-copy strong {
  overflow: hidden;
  color: var(--text-secondary);
  font-size: 10px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.attachment-copy span {
  color: var(--text-faint);
  font-size: 8.5px;
}

.attachment-actions {
  display: flex;
  gap: 2px;
}

.attachment-actions .icon-btn {
  width: 25px;
  height: 25px;
}

.attachment-actions .icon-btn .icon {
  width: 13px;
  height: 13px;
}

.attachment-empty {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 14px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--text-faint);
  font-size: 9.5px;
}

.attachment-empty .icon {
  width: 13px;
  height: 13px;
}

/* --------------------------------------------------------------------------
   Empty / error / loading
   -------------------------------------------------------------------------- */

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 220px;
  padding: 34px 20px;
  text-align: center;
}

.empty-icon {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  margin-bottom: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(145deg, #fafbfb, #f2f5f6);
  color: #a4b0b9;
}

.empty-icon .icon {
  width: 25px;
  height: 25px;
}

.empty-state h3 {
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
}

.empty-state p {
  max-width: 360px;
  margin-top: 5px;
  color: var(--text-muted);
  font-size: 10px;
  line-height: 1.7;
}

.empty-action {
  margin-top: 16px;
}

.error-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 330px;
  padding: 40px;
  text-align: center;
}

.error-state > .icon {
  width: 34px;
  height: 34px;
  color: var(--danger);
  margin-bottom: 12px;
}

.error-state h3 {
  font-size: 14px;
  font-weight: 600;
}

.error-state p {
  margin: 5px 0 16px;
  color: var(--text-muted);
  font-size: 11px;
}

.chart-empty {
  display: grid;
  place-items: center;
  min-height: 150px;
  color: var(--text-faint);
  font-size: 10px;
  letter-spacing: 0.3px;
}

.skeleton {
  display: block;
  border-radius: 7px;
  background: linear-gradient(90deg, #eef2f4 25%, #f7f9fa 50%, #eef2f4 75%);
  background-size: 200% 100%;
  animation: skeletonBreathe 1.5s infinite linear;
}

@keyframes skeletonBreathe {
  from { background-position: 200% 0; }
  to { background-position: -200% 0; }
}

.skeleton-line { height: 10px; }
.skeleton-title { height: 24px; width: 55%; margin: 12px 0; }
.skeleton-dot { width: 28px; height: 28px; border-radius: 50%; }
.w-12 { width: 12%; }
.w-18 { width: 18%; }
.w-30 { width: 30%; }
.w-40 { width: 40%; }
.w-70 { width: 70%; }

.skeleton-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.skeleton-card {
  min-height: 160px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #fff;
}

.skeleton-hero {
  height: 280px;
  margin-bottom: 18px;
  border-radius: var(--radius-lg);
}

.skeleton-table {
  padding: 20px;
}

.skeleton-row {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line-soft);
}

.skeleton-row .skeleton-line {
  height: 12px;
}

.loading-inline {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 40px;
  color: var(--text-muted);
  font-size: 10.5px;
}

.page-error-wrap {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #fff;
}

/* --------------------------------------------------------------------------
   Dashboard
   -------------------------------------------------------------------------- */

.dashboard-hero {
  position: relative;
  overflow: hidden;
  min-height: 280px;
  padding: 32px 36px 54px;
  border-radius: var(--radius-xl);
  background:
    radial-gradient(circle at 82% 18%, rgba(201, 166, 107, 0.16), transparent 28%),
    linear-gradient(128deg, #071521 0%, #0b1f33 52%, #102c43 100%);
  color: #f2ede4;
  box-shadow: 0 18px 40px rgba(7, 21, 33, 0.16);
}

.dashboard-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.026) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.026) 1px, transparent 1px);
  background-size: 62px 62px;
  mask-image: linear-gradient(to right, black, transparent 80%);
  pointer-events: none;
}

.hero-ambient {
  position: absolute;
  right: -120px;
  top: -190px;
  width: 520px;
  height: 520px;
  border: 1px solid rgba(201, 166, 107, 0.1);
  border-radius: 50%;
  box-shadow:
    0 0 0 60px rgba(201, 166, 107, 0.025),
    0 0 0 120px rgba(201, 166, 107, 0.018);
  pointer-events: none;
}

.hero-lines {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 56%;
  height: 80%;
  opacity: 0.72;
  pointer-events: none;
  mask-image: linear-gradient(to left, black, transparent 92%);
}

.hero-content {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 368px;
  align-items: end;
  gap: 36px;
  min-height: 194px;
}

.hero-kicker {
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(220, 192, 140, 0.9);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1px;
}

.live-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--gold-300);
  box-shadow: 0 0 0 4px rgba(220, 192, 140, 0.1);
}

.hero-greeting {
  margin-top: 16px;
  color: rgba(242, 237, 228, 0.52);
  font-size: 11px;
  letter-spacing: 0.6px;
}

.hero-copy h1 {
  margin-top: 5px;
  color: #f7f2e8;
  font-size: clamp(31px, 3vw, 42px);
  font-weight: 500;
  letter-spacing: 1.5px;
  line-height: 1.24;
}

.hero-copy h1 em {
  color: var(--gold-300);
  font-family: var(--font-serif);
  font-style: normal;
  letter-spacing: 2px;
}

.hero-sub {
  margin-top: 9px;
  color: rgba(238, 233, 222, 0.44);
  font-size: 10.5px;
  line-height: 1.7;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 17px;
}

.hero-meta span {
  display: flex;
  align-items: center;
  gap: 5px;
  color: rgba(238, 233, 222, 0.46);
  font-size: 9px;
  letter-spacing: 0.2px;
}

.hero-meta .icon {
  width: 12px;
  height: 12px;
  color: rgba(201, 166, 107, 0.7);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 22px;
}

.hero-actions .btn {
  height: 34px;
  font-size: 10.5px;
}

.hero-actions .btn b {
  display: inline-grid;
  place-items: center;
  min-width: 18px;
  height: 17px;
  padding: 0 4px;
  margin-left: 2px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  font-family: var(--font-number);
  font-size: 8.5px;
  font-weight: 600;
}

.hero-health {
  align-self: stretch;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding: 18px 22px 8px;
  border: 1px solid rgba(201, 166, 107, 0.16);
  border-radius: 14px;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.01));
  backdrop-filter: blur(6px);
}

.hero-health-top {
  width: 100%;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: rgba(238, 233, 222, 0.3);
  font-size: 7.5px;
  letter-spacing: 1.6px;
}

.hero-health-top i {
  color: rgba(220, 192, 140, 0.55);
  font-style: normal;
  letter-spacing: 0.4px;
}

.hero-health .gauge {
  margin: 2px 0 3px;
}

.gauge {
  position: relative;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}

.gauge svg {
  position: absolute;
  inset: 0;
  transform: rotate(0deg);
}

.gauge-center {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  z-index: 1;
}

.gauge-center strong {
  color: var(--ink-900);
  font-family: var(--font-number);
  font-size: 32px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -1px;
}

.gauge-center strong small {
  font-size: 12px;
  margin-left: 1px;
}

.gauge-center span {
  color: var(--text-muted);
  font-size: 8px;
  letter-spacing: 0.6px;
}

.hero-health .gauge-center strong {
  color: #f6f0e5;
  font-size: 38px;
}

.hero-health .gauge-center span {
  color: rgba(238, 233, 222, 0.38);
}

.hero-health-metrics {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  align-items: center;
  width: 100%;
  margin-top: 2px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.hero-health-metrics > div {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.hero-health-metrics strong {
  color: #f4eee4;
  font-family: var(--font-number);
  font-size: 18px;
  font-weight: 500;
  line-height: 1.1;
}

.hero-health-metrics strong.is-warning {
  color: var(--gold-300);
}

.hero-health-metrics strong.is-danger {
  color: #e7a192;
}

.hero-health-metrics span {
  color: rgba(238, 233, 222, 0.34);
  font-size: 7.5px;
  letter-spacing: 0.2px;
  white-space: nowrap;
}

.v-line {
  width: 1px;
  height: 20px;
  background: rgba(255, 255, 255, 0.08);
}

.hero-index {
  position: absolute;
  right: 24px;
  bottom: 18px;
  color: rgba(238, 233, 222, 0.14);
  font-family: var(--font-number);
  font-size: 8px;
  letter-spacing: 2.4px;
  z-index: 2;
}

.kpi-grid {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: -38px;
  padding: 0 18px;
}

.kpi-card {
  position: relative;
  min-width: 0;
  padding: 17px 18px 14px;
  border: 1px solid rgba(220, 228, 233, 0.9);
  border-radius: var(--radius-md);
  background: #fff;
  box-shadow: 0 14px 34px rgba(8, 23, 37, 0.075);
  cursor: pointer;
  transition:
    transform var(--speed) var(--ease),
    box-shadow var(--speed),
    border-color var(--speed);
}

.kpi-card:hover {
  transform: translateY(-3px);
  border-color: var(--gold-200);
  box-shadow: 0 20px 44px rgba(8, 23, 37, 0.11);
}

.kpi-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.kpi-index {
  color: var(--text-faint);
  font-family: var(--font-number);
  font-size: 7.5px;
  letter-spacing: 1.1px;
}

.kpi-icon {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: 1px solid #ebeff2;
  background: #f8fafb;
  color: var(--ink-700);
}

.kpi-icon .icon {
  width: 15px;
  height: 15px;
}

.kpi-card-staff .kpi-icon {
  color: var(--gold-600);
  background: var(--gold-050);
  border-color: var(--gold-100);
}

.kpi-card-perf .kpi-icon {
  color: var(--teal, #3b7d78);
  background: #eef5f4;
  border-color: #d7e8e5;
}

.kpi-card-value .kpi-icon {
  color: var(--ink-700);
  background: #eef2f5;
}

.kpi-value {
  margin-top: 11px;
  color: var(--ink-900);
  font-family: var(--font-number);
  font-size: 33px;
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.8px;
}

.kpi-value small {
  margin-left: 4px;
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0;
}

.kpi-value.kpi-money {
  font-size: 27px;
  letter-spacing: -0.5px;
}

.kpi-value.is-restricted {
  color: var(--text-faint);
  font-family: var(--font-sans);
  font-size: 17px;
  font-weight: 500;
  letter-spacing: 0;
}

.kpi-label {
  margin-top: 2px;
  color: var(--text-secondary);
  font-size: 10px;
  letter-spacing: 0.4px;
}

.kpi-insight {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 12px;
  min-height: 18px;
}

.kpi-insight span {
  display: flex;
  align-items: center;
  gap: 3px;
  color: var(--text-muted);
  font-size: 8.5px;
}

.kpi-insight .icon {
  width: 11px;
  height: 11px;
}

.kpi-foot {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--line-soft);
  color: var(--text-faint);
  font-size: 8px;
}

.kpi-foot > span:not(.mini-track):not(.mini-spark):not(.ring-stat) {
  white-space: nowrap;
}

.kpi-foot b {
  margin-left: auto;
  color: var(--text-secondary);
  font-family: var(--font-number);
  font-size: 9px;
  font-weight: 500;
  white-space: nowrap;
}

.kpi-foot .ring-stat {
  width: 32px !important;
  height: 32px !important;
  flex: 0 0 auto;
}

.kpi-inline-dot {
  width: 6px;
  height: 6px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--gold-500);
  box-shadow: 0 0 0 3px rgba(184, 148, 88, 0.1);
}

.ring-stat {
  position: relative;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
}

.ring-stat svg {
  position: absolute;
  inset: 0;
}

.ring-stat b {
  margin: 0;
  color: var(--text-secondary);
  font-family: var(--font-number);
  font-size: 7px;
  font-weight: 500;
}

.kpi-foot .ring-stat b {
  font-size: 7px;
}

.mini-track {
  flex: 1;
  min-width: 40px;
}

.mini-track .stacked-bar {
  width: 100%;
}

.mini-spark {
  display: flex;
  align-items: center;
  width: 92px;
}

.kpi-card.is-locked {
  cursor: default;
  background: #fafbfb;
  box-shadow: none;
  border-style: dashed;
}

.kpi-card.is-locked:hover {
  transform: none;
  border-color: var(--line);
  box-shadow: none;
}

.kpi-locked-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 24px;
}

.kpi-locked-copy strong {
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
}

.kpi-locked-copy span {
  color: var(--text-faint);
  font-size: 9.5px;
}

.kpi-card.is-locked .kpi-foot {
  margin-top: 20px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.dashboard-grid-wide {
  align-items: stretch;
}

.panel-cert { grid-column: span 5; }
.panel-talent { grid-column: span 4; }
.panel-map { grid-column: span 3; }
.panel-warning { grid-column: span 7; }
.panel-trend { grid-column: span 5; }
.panel-quals { grid-column: span 7; }
.panel-recent { grid-column: span 5; }

/* Charts */

.donut-wrap {
  position: relative;
  flex: 0 0 auto;
}

.donut {
  display: block;
  overflow: visible;
}

.donut-seg {
  transition: stroke-dasharray 600ms var(--ease);
  cursor: default;
}

.donut-seg:hover {
  opacity: 0.82;
}

.donut-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  pointer-events: none;
}

.donut-center strong {
  color: var(--ink-900);
  font-family: var(--font-number);
  font-size: 32px;
  font-weight: 500;
  line-height: 1;
}

.donut-center span {
  color: var(--text-muted);
  font-size: 8.5px;
  letter-spacing: 0.5px;
}

.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 15px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--text-muted);
  font-size: 9px;
}

.legend-item i {
  width: 6px;
  height: 6px;
  border-radius: 2px;
}

.legend-item b {
  margin-left: 2px;
  color: var(--text);
  font-family: var(--font-number);
  font-size: 10px;
  font-weight: 500;
}

.chart-legend.is-compact {
  gap: 6px 10px;
}

.hbar-list {
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.hbar-row {
  display: grid;
  grid-template-columns: 60px minmax(0, 1fr) 42px;
  align-items: center;
  gap: 9px;
}

.hbar-label {
  color: var(--text-secondary);
  font-size: 9.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hbar-track {
  height: 5px;
  border-radius: 999px;
  background: #f0f3f5;
  overflow: hidden;
}

.hbar-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  animation: barGrow 700ms var(--ease) both;
  transform-origin: left;
}

@keyframes barGrow {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

.hbar-value {
  color: var(--ink-800);
  font-family: var(--font-number);
  font-size: 10px;
  text-align: right;
  white-space: nowrap;
}

.area-chart {
  width: 100%;
  min-width: 0;
}

.area-chart svg {
  width: 100%;
  height: auto;
  overflow: visible;
}

.chart-axis {
  fill: #96a4af;
  font-family: var(--font-number);
  font-size: 9px;
}

.column-chart {
  display: flex;
  align-items: flex-end;
  gap: 10px;
}

.column-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  height: 100%;
  gap: 5px;
}

.column-bar {
  width: 100%;
  max-width: 34px;
  border-radius: 4px 4px 2px 2px;
  animation: columnGrow 650ms var(--ease) both;
  transform-origin: bottom;
}

@keyframes columnGrow {
  from { transform: scaleY(0); }
  to { transform: scaleY(1); }
}

.column-value {
  color: var(--text-secondary);
  font-family: var(--font-number);
  font-size: 9px;
}

.column-label {
  color: var(--text-muted);
  font-size: 8.5px;
}

.stacked-bar {
  display: flex;
  width: 100%;
  overflow: hidden;
  background: #f0f3f5;
  gap: 2px;
}

.stacked-bar.is-rounded {
  border-radius: 999px;
}

.stacked-bar i {
  display: block;
  height: 100%;
  transition: width 500ms var(--ease);
}

.stacked-bar.is-empty {
  height: 8px;
  border-radius: 999px;
  background: #eff2f4;
}

.sparkline {
  overflow: visible;
}

/* Certificate panel */

.cert-overview {
  display: flex;
  align-items: center;
  gap: 18px;
  flex: 1;
}

.cert-donut {
  flex: 0 0 auto;
}

.cert-side {
  flex: 1;
  min-width: 0;
}

.cert-side .chart-legend {
  flex-direction: column;
  align-items: flex-start;
  gap: 7px;
}

.cert-warning-band {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding: 8px 9px;
  border: 1px solid var(--warning-line);
  border-radius: 7px;
  background: var(--warning-bg);
}

.cert-warning-band > span {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  border-radius: 6px;
  background: rgba(169, 109, 31, 0.1);
  color: var(--warning);
}

.cert-warning-band .icon {
  width: 13px;
  height: 13px;
}

.cert-warning-band > div {
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.cert-warning-band strong {
  color: var(--warning);
  font-family: var(--font-number);
  font-size: 16px;
  font-weight: 500;
  line-height: 1;
}

.cert-warning-band small {
  color: #9d7a4a;
  font-size: 8px;
}

.cert-warning-band i {
  margin-left: auto;
  color: #b08a58;
  font-size: 8px;
  font-style: normal;
  white-space: nowrap;
}

.cert-buckets {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  margin-top: 10px;
}

.cert-buckets > div {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  padding: 6px 3px;
  border-radius: 5px;
  background: #f8fafb;
}

.cert-buckets strong {
  color: var(--ink-800);
  font-family: var(--font-number);
  font-size: 12px;
  font-weight: 500;
}

.cert-buckets span {
  color: var(--text-faint);
  font-size: 7.5px;
  white-space: nowrap;
}

.cert-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  margin-top: 17px;
  padding-top: 15px;
  border-top: 1px solid var(--line-soft);
}

.cert-split-item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 2px 12px;
  border: 0;
  border-left: 1px solid var(--line-soft);
  background: transparent;
  text-align: left;
  transition: background var(--speed);
}

.cert-split-item:first-child {
  padding-left: 0;
  border-left: 0;
}

.cert-split-item:hover {
  background: #fbfcfc;
}

.cert-split-item > span:first-child {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--text-muted);
  font-size: 8px;
}

.cert-split-item > span .icon {
  width: 11px;
  height: 11px;
  color: var(--gold-600);
}

.cert-split-item strong {
  color: var(--ink-900);
  font-family: var(--font-number);
  font-size: 20px;
  font-weight: 500;
  line-height: 1.2;
}

.cert-split-item strong small {
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 8px;
  margin-left: 2px;
}

.cert-split-item i {
  color: var(--text-faint);
  font-size: 7.5px;
  font-style: normal;
}

.cert-split-item > .icon {
  position: absolute;
  right: 2px;
  top: 50%;
  width: 12px;
  height: 12px;
  color: var(--text-faint);
  opacity: 0;
  transform: translateY(-50%);
  transition: opacity var(--speed);
}

.cert-split-item:hover > .icon {
  opacity: 1;
}

.dashboard-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 160px;
  gap: 4px;
  text-align: center;
  color: var(--text-muted);
}

.dashboard-empty > .icon {
  width: 24px;
  height: 24px;
  color: #b7c1c9;
  margin-bottom: 4px;
}

.dashboard-empty strong {
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 500;
}

.dashboard-empty span {
  font-size: 9px;
  color: var(--text-faint);
}

/* Talent */

.talent-lead {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.talent-lead > div:first-child {
  display: flex;
  align-items: baseline;
  gap: 7px;
}

.talent-lead > div:first-child strong {
  color: var(--ink-900);
  font-family: var(--font-number);
  font-size: 31px;
  font-weight: 500;
  line-height: 1;
}

.talent-lead > div:first-child span {
  color: var(--text-muted);
  font-size: 9px;
}

.talent-badge {
  display: flex;
  align-items: baseline;
  gap: 3px;
  padding: 5px 8px;
  border: 1px solid var(--gold-200);
  border-radius: 6px;
  background: var(--gold-050);
}

.talent-badge b {
  color: var(--gold-600);
  font-family: var(--font-number);
  font-size: 13px;
  font-weight: 500;
}

.talent-badge span {
  color: #9d804f;
  font-size: 8px;
}

.edu-bars {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.edu-row {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) 35px 26px;
  align-items: center;
  gap: 8px;
}

.edu-label {
  color: var(--text-secondary);
  font-size: 9px;
  white-space: nowrap;
}

.edu-track {
  height: 5px;
  border-radius: 999px;
  background: #f1f4f5;
  overflow: hidden;
}

.edu-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  animation: barGrow 700ms var(--ease) both;
}

.edu-count {
  color: var(--ink-800);
  font-family: var(--font-number);
  font-size: 10px;
  text-align: right;
}

.edu-count small {
  color: var(--text-faint);
  font-family: var(--font-sans);
  font-size: 7.5px;
}

.edu-percent {
  color: var(--text-faint);
  font-family: var(--font-number);
  font-size: 8.5px;
  text-align: right;
}

.talent-foot {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 17px;
  padding-top: 13px;
  border-top: 1px solid var(--line-soft);
}

.talent-foot span {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--text-muted);
  font-size: 8.5px;
}

.talent-foot .icon {
  width: 11px;
  height: 11px;
  color: var(--gold-600);
}

/* Map */

.panel-map .panel-head {
  margin-bottom: 16px;
}

.panel-map .hbar-row {
  grid-template-columns: 45px minmax(0, 1fr) 31px;
  gap: 7px;
}

.map-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--line-soft);
}

.map-foot > span {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--text-faint);
  font-size: 8px;
}

.map-foot .icon {
  width: 10px;
  height: 10px;
}

/* Warning panel */

.warning-table {
  display: flex;
  flex-direction: column;
}

.warning-row {
  display: grid;
  grid-template-columns: 30px minmax(0, 1.45fr) 84px auto 14px;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 11px 4px;
  border: 0;
  border-bottom: 1px solid var(--line-soft);
  background: transparent;
  text-align: left;
  transition: background var(--speed);
}

.warning-row:last-child {
  border-bottom: 0;
}

.warning-row:hover {
  background: #fbfcfc;
}

.warning-row-icon {
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  border-radius: 7px;
  background: var(--warning-bg);
  color: var(--warning);
}

.warning-row.is-expired .warning-row-icon {
  background: var(--danger-bg);
  color: var(--danger);
}

.warning-row-icon .icon {
  width: 14px;
  height: 14px;
}

.warning-row-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.warning-row-main strong {
  overflow: hidden;
  color: var(--text);
  font-size: 10.5px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.warning-row-main small {
  overflow: hidden;
  color: var(--text-faint);
  font-size: 8.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.warning-row-date {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.warning-row-date strong {
  color: var(--text-secondary);
  font-family: var(--font-number);
  font-size: 10px;
  font-weight: 500;
}

.warning-row-date small {
  color: var(--text-faint);
  font-size: 7.5px;
}

.warning-row > .badge {
  justify-self: end;
}

.warning-row-arrow {
  color: var(--text-faint);
  opacity: 0;
  transform: translateX(-3px);
  transition: all var(--speed);
}

.warning-row:hover .warning-row-arrow {
  opacity: 1;
  transform: translateX(0);
}

.warning-row-arrow .icon {
  width: 12px;
  height: 12px;
}

.warning-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin-bottom: 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: var(--line-soft);
}

.warning-summary > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 14px;
  background: #fff;
}

.warning-summary strong {
  color: var(--ink-900);
  font-family: var(--font-number);
  font-size: 23px;
  font-weight: 500;
  line-height: 1.1;
}

.warning-summary span {
  color: var(--text-muted);
  font-size: 8.5px;
}

.warning-drawer-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.warning-drawer-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: #fff;
  text-align: left;
  transition: all var(--speed);
}

.warning-drawer-item:hover {
  border-color: var(--gold-200);
  background: var(--gold-050);
}

.warning-symbol {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  border-radius: 7px;
  background: var(--warning-bg);
  color: var(--warning);
}

.warning-drawer-item.is-expired .warning-symbol {
  background: var(--danger-bg);
  color: var(--danger);
}

.warning-symbol .icon {
  width: 15px;
  height: 15px;
}

.warning-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.warning-copy strong {
  overflow: hidden;
  color: var(--text);
  font-size: 10.5px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.warning-copy small {
  color: var(--text-faint);
  font-size: 8.5px;
}

.warning-days {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1px;
  flex: 0 0 auto;
  color: var(--warning);
  font-family: var(--font-number);
  font-size: 9.5px;
}

.warning-drawer-item.is-expired .warning-days {
  color: var(--danger);
}

.warning-days small {
  color: var(--text-faint);
  font-family: var(--font-sans);
  font-size: 8px;
}

.warning-drawer-loading {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 8px 0;
}

.warning-drawer-loading .skeleton-line {
  height: 54px;
  border-radius: 8px;
}

/* Trend */

.panel-trend .area-chart {
  margin-top: 2px;
}

.trend-foot {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 10px;
  padding-top: 13px;
  border-top: 1px solid var(--line-soft);
}

.trend-foot > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.trend-foot strong {
  color: var(--ink-900);
  font-family: var(--font-number);
  font-size: 17px;
  font-weight: 500;
  line-height: 1.2;
}

.trend-foot span {
  color: var(--text-faint);
  font-size: 8px;
}

.trend-note {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: auto;
  padding-top: 12px;
  color: var(--text-faint);
  font-size: 8px;
}

.trend-note .icon {
  width: 10px;
  height: 10px;
}

/* Qualifications */

.qual-list {
  display: flex;
  flex-direction: column;
}

.qual-row {
  display: grid;
  grid-template-columns: 31px minmax(0, 1fr) 72px auto 12px;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 11px 3px;
  border: 0;
  border-bottom: 1px solid var(--line-soft);
  background: transparent;
  text-align: left;
  transition: background var(--speed);
}

.qual-row:last-child {
  border-bottom: 0;
}

.qual-row:hover {
  background: #fbfcfc;
}

.qual-mark {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 7px;
  border: 1px solid var(--gold-100);
  background: var(--gold-050);
  color: var(--gold-600);
  font-family: var(--font-serif);
  font-size: 10px;
  font-weight: 600;
}

.qual-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.qual-copy strong {
  overflow: hidden;
  color: var(--text);
  font-size: 10.5px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.qual-copy small {
  overflow: hidden;
  color: var(--text-faint);
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.qual-date {
  display: flex;
  flex-direction: column;
  gap: 1px;
  color: var(--text-secondary);
  font-family: var(--font-number);
  font-size: 9.5px;
  text-align: right;
}

.qual-date small {
  color: var(--text-faint);
  font-family: var(--font-sans);
  font-size: 7.5px;
}

.qual-row > .icon {
  width: 12px;
  height: 12px;
  color: var(--text-faint);
  opacity: 0;
  transition: opacity var(--speed);
}

.qual-row:hover > .icon {
  opacity: 1;
}

/* Recent projects */

.recent-list {
  display: flex;
  flex-direction: column;
}

.recent-row {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 68px auto 12px;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 10px 3px;
  border: 0;
  border-bottom: 1px solid var(--line-soft);
  background: transparent;
  text-align: left;
  transition: background var(--speed);
}

.recent-row:last-child {
  border-bottom: 0;
}

.recent-row:hover {
  background: #fbfcfc;
}

.recent-location {
  display: grid;
  place-items: center;
  width: 36px;
  height: 29px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fafbfb;
  color: var(--text-secondary);
  font-family: var(--font-serif);
  font-size: 9px;
  letter-spacing: 0.4px;
}

.recent-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.recent-copy strong {
  overflow: hidden;
  color: var(--text);
  font-size: 10.5px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.recent-copy small {
  overflow: hidden;
  color: var(--text-faint);
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.recent-amount {
  color: var(--text-secondary);
  font-family: var(--font-number);
  font-size: 9.5px;
  text-align: right;
  white-space: nowrap;
}

.recent-row > .icon {
  width: 12px;
  height: 12px;
  color: var(--text-faint);
  opacity: 0;
  transition: opacity var(--speed);
}

.recent-row:hover > .icon {
  opacity: 1;
}

.dashboard-source {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
  padding: 0 4px;
  color: var(--text-faint);
  font-size: 8px;
  letter-spacing: 0.2px;
}

.dashboard-source span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.dashboard-source .icon {
  width: 10px;
  height: 10px;
}

.dashboard-skeleton .skeleton-hero {
  margin-bottom: 18px;
}

/* --------------------------------------------------------------------------
   Shared data page components
   -------------------------------------------------------------------------- */

.page-header-actions .btn {
  height: 35px;
}

.filter-card {
  margin-bottom: 14px;
  padding: 15px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--card);
  box-shadow: var(--shadow-xs);
}

.filter-card-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px;
}

.filter-card-row .form-field {
  flex: 1 1 145px;
  min-width: 130px;
}

.filter-card-row .search-box {
  flex: 1.5 1 220px;
}

.filter-card-divider {
  width: 1px;
  align-self: stretch;
  background: var(--line-soft);
  margin: 3px 4px;
}

.filter-more {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding-top: 12px;
  margin-top: 12px;
  border-top: 1px dashed var(--line);
}

.active-filters {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 11px;
}

.active-filters:empty {
  display: none;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 7px;
  border: 1px solid var(--gold-200);
  border-radius: 5px;
  background: var(--gold-050);
  color: #8f703f;
  font-size: 9px;
}

.filter-chip button {
  display: inline-flex;
  padding: 0;
  border: 0;
  background: transparent;
  color: #ad8f62;
}

.filter-chip .icon {
  width: 10px;
  height: 10px;
}

.data-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #fff, #fbfcfc);
  box-shadow: var(--shadow-xs);
  margin-bottom: 14px;
}

.data-summary-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-right: 18px;
  border-right: 1px solid var(--line-soft);
}

.data-summary-item:last-child {
  border-right: 0;
  padding-right: 0;
}

.data-summary-item strong {
  color: var(--ink-900);
  font-family: var(--font-number);
  font-size: 19px;
  font-weight: 500;
  line-height: 1.2;
}

.data-summary-item strong small {
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 8px;
  margin-left: 2px;
}

.data-summary-item span {
  color: var(--text-muted);
  font-size: 8.5px;
}

.person-cell {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.person-copy {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.person-copy strong {
  color: var(--text);
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
}

.person-copy span {
  color: var(--text-faint);
  font-family: var(--font-mono);
  font-size: 8px;
  white-space: nowrap;
}

.cell-icons {
  display: flex;
  align-items: center;
  gap: 4px;
}

.file-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 6px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fbfcfc;
  color: var(--text-muted);
  font-size: 8.5px;
  white-space: nowrap;
}

.file-pill .icon {
  width: 11px;
  height: 11px;
  color: var(--danger);
}

.file-pill:hover {
  border-color: var(--gold-300);
  color: var(--gold-600);
}

.multi-cert-note {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: var(--gold-600);
  font-size: 8px;
  margin-left: 4px;
}

.multi-cert-note .icon {
  width: 10px;
  height: 10px;
}

.row-expanded {
  background: #fbfcfc !important;
}

.expand-panel {
  padding: 0 !important;
  background: #fbfcfc;
}

.expand-panel-inner {
  padding: 18px 20px 20px;
  border-top: 1px solid var(--line-soft);
  animation: expandIn 260ms var(--ease);
}

@keyframes expandIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.expand-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1.5fr;
  gap: 18px;
}

.expand-block {
  min-width: 0;
}

.expand-block-title {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 9px;
  color: var(--text-muted);
  font-size: 8.5px;
  font-weight: 600;
  letter-spacing: 1px;
}

.expand-block-title .icon {
  width: 12px;
  height: 12px;
  color: var(--gold-600);
}

.info-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.info-list-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 6px;
  border-bottom: 1px dashed var(--line-soft);
  font-size: 9.5px;
}

.info-list-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.info-list-row span {
  color: var(--text-faint);
  flex: 0 0 auto;
}

.info-list-row strong {
  color: var(--text-secondary);
  font-weight: 500;
  text-align: right;
  word-break: break-word;
}

.cert-mini-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 9px;
}

.cert-mini-table th {
  padding: 5px 7px;
  border-bottom: 1px solid var(--line);
  color: var(--text-faint);
  font-weight: 400;
  text-align: left;
  white-space: nowrap;
}

.cert-mini-table td {
  padding: 6px 7px;
  border-bottom: 1px solid var(--line-soft);
  color: var(--text-secondary);
  vertical-align: middle;
}

.cert-mini-table tr:last-child td {
  border-bottom: 0;
}

.cert-mini-table .cell-title {
  font-size: 9.5px;
}

.cert-mini-table .cert-actions {
  white-space: nowrap;
  text-align: right;
}

.social-card {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.social-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.social-head strong {
  color: var(--text);
  font-size: 10px;
  font-weight: 500;
}

.social-meta {
  color: var(--text-muted);
  font-size: 8.5px;
  line-height: 1.6;
}

.social-months {
  display: flex;
  align-items: baseline;
  gap: 3px;
  color: var(--gold-600);
  font-family: var(--font-number);
  font-size: 17px;
}

.social-months span {
  color: var(--text-faint);
  font-family: var(--font-sans);
  font-size: 8px;
}

.empty-row td {
  padding: 0 !important;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 1320px) {
  :root {
    --sidebar-width: 238px;
  }

  .page-container {
    padding-left: 26px;
    padding-right: 26px;
  }

  .topbar {
    padding: 0 26px;
  }

  .app-footer {
    padding-left: 26px;
    padding-right: 26px;
  }

  .hero-content {
    grid-template-columns: minmax(0, 1fr) 330px;
  }

  .dashboard-hero {
    padding-left: 30px;
    padding-right: 30px;
  }

  .kpi-grid {
    padding: 0 12px;
  }

  .panel-cert { grid-column: span 6; }
  .panel-talent { grid-column: span 6; }
  .panel-map { grid-column: span 12; }
  .panel-map .hbar-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 9px 24px;
  }
  .panel-quals { grid-column: span 7; }
  .panel-recent { grid-column: span 5; }
}

@media (max-width: 1120px) {
  .auth-shell {
    grid-template-columns: minmax(0, 1fr) minmax(430px, 0.95fr);
  }

  .auth-visual {
    padding: 34px 38px 26px;
  }

  .auth-hero h1 {
    font-size: clamp(52px, 6.4vw, 74px);
  }

  .auth-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px 0;
  }

  .auth-metric:nth-child(3) {
    padding-left: 0;
    border-left: 0;
  }

  .auth-panel {
    padding: 30px 24px;
  }

  .auth-card {
    padding: 32px 30px 25px;
  }

  .hero-content {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .hero-health {
    display: grid;
    grid-template-columns: auto 150px auto;
    align-items: center;
    gap: 18px;
    padding: 14px 18px;
    align-self: auto;
  }

  .hero-health-top {
    display: none;
  }

  .hero-health-metrics {
    margin: 0;
    padding: 0;
    border-top: 0;
    gap: 14px;
    width: auto;
  }

  .hero-health .gauge {
    margin: 0;
  }

  .hero-health .gauge-center strong {
    font-size: 33px;
  }

  .dashboard-hero {
    padding-bottom: 64px;
  }

  .kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: -38px;
  }

  .panel-warning { grid-column: span 12; }
  .panel-trend { grid-column: span 12; }
  .panel-quals { grid-column: span 7; }
  .panel-recent { grid-column: span 5; }

  .skeleton-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stat-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .filter-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .expand-grid {
    grid-template-columns: 1fr 1fr;
  }

  .expand-grid .expand-block:last-child {
    grid-column: span 2;
  }
}

@media (max-width: 960px) {
  .app-shell {
    grid-template-columns: minmax(0, 1fr);
  }

  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 272px;
    transform: translateX(-102%);
    transition: transform 280ms var(--ease);
    box-shadow: 20px 0 60px rgba(7, 20, 32, 0.26);
    z-index: 90;
  }

  body.nav-open .sidebar {
    transform: translateX(0);
  }

  .sidebar-scrim {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 80;
    background: rgba(7, 20, 32, 0.48);
    opacity: 0;
    visibility: hidden;
    transition: opacity 260ms, visibility 260ms;
    backdrop-filter: blur(2px);
  }

  body.nav-open .sidebar-scrim {
    opacity: 1;
    visibility: visible;
  }

  .mobile-menu {
    display: inline-grid;
  }

  .topbar {
    padding: 0 18px;
  }

  .data-chip {
    display: none;
  }

  .page-container {
    padding: 22px 18px 30px;
  }

  .app-footer {
    padding: 0 18px 20px;
  }

  .auth-shell {
    display: block;
    min-height: 100vh;
  }

  .auth-visual {
    min-height: 380px;
    height: auto;
    padding: 28px 32px;
  }

  .auth-hero {
    margin-top: 40px;
    max-width: 700px;
  }

  .auth-hero h1 {
    font-size: 54px;
    margin: 16px 0 16px;
  }

  .auth-hero > p {
    max-width: 600px;
    font-size: 12px;
    line-height: 1.8;
  }

  .auth-metrics {
    margin-top: 26px;
    padding-top: 18px;
    max-width: 580px;
  }

  .auth-architecture {
    height: 220px;
    bottom: 20px;
    opacity: 0.55;
  }

  .auth-visual-footer {
    display: none;
  }

  .auth-visual-tag {
    display: none;
  }

  .auth-panel {
    min-height: auto;
    padding: 36px 22px 42px;
  }

  .auth-panel::before {
    inset: 16px;
  }

  .auth-card {
    max-width: 520px;
    margin: 0 auto;
    padding: 34px 34px 26px;
  }

  .auth-copyright {
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
  }

  .page-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
  }

  .page-actions {
    width: 100%;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 2px;
  }

  .page-actions::-webkit-scrollbar {
    display: none;
  }

  .dashboard-hero {
    padding: 26px 24px 58px;
  }

  .hero-lines {
    display: none;
  }

  .hero-health {
    grid-template-columns: 122px 1fr;
    gap: 14px;
  }

  .hero-health .gauge {
    width: 122px !important;
    height: 122px !important;
  }

  .hero-health .gauge svg {
    width: 122px;
    height: 122px;
  }

  .hero-health .gauge-center strong {
    font-size: 29px;
  }

  .hero-health-metrics {
    gap: 9px;
  }

  .hero-health-metrics strong {
    font-size: 16px;
  }

  .hero-health-metrics span {
    font-size: 7px;
  }

  .kpi-grid {
    padding: 0 8px;
  }

  .dashboard-grid {
    gap: 12px;
    margin-top: 12px;
  }

  .panel-cert { grid-column: span 12; }
  .panel-talent { grid-column: span 6; }
  .panel-map { grid-column: span 6; }
  .panel-quals { grid-column: span 12; }
  .panel-recent { grid-column: span 12; }
  .panel-map .hbar-list {
    display: flex;
  }

  .warning-row {
    grid-template-columns: 30px minmax(0, 1fr) auto 12px;
  }

  .warning-row-date {
    display: none;
  }

  .filter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .filter-more {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .data-summary {
    gap: 12px;
  }

  .data-summary-item {
    padding-right: 12px;
  }
}

@media (max-width: 720px) {
  .topbar {
    height: 64px;
    padding: 0 14px;
  }

  .breadcrumb > span:first-child {
    display: none;
  }

  .breadcrumb i {
    display: none;
  }

  .user-trigger-copy,
  .user-chevron {
    display: none;
  }

  .user-trigger {
    padding: 0 2px;
    border: 0;
  }

  .topbar-right {
    gap: 6px;
  }

  .topbar-divider {
    display: none;
  }

  .page-container {
    padding: 18px 14px 28px;
  }

  .app-footer {
    flex-direction: column;
    gap: 4px;
    padding: 0 14px 18px;
  }

  .page-title {
    font-size: 26px;
  }

  .page-desc {
    font-size: 10.5px;
  }

  .auth-visual {
    min-height: 330px;
    padding: 24px 22px;
  }

  .auth-visual::after {
    display: none;
  }

  .auth-brand img {
    width: 40px;
    height: 40px;
  }

  .auth-brand strong {
    font-size: 17px;
    letter-spacing: 4px;
  }

  .auth-hero {
    margin-top: 32px;
  }

  .auth-eyebrow {
    font-size: 8.5px;
    letter-spacing: 2px;
  }

  .auth-hero h1 {
    font-size: 45px;
    letter-spacing: 2px;
    margin: 15px 0 15px;
  }

  .auth-hero > p {
    font-size: 11px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .auth-metrics {
    margin-top: 22px;
    padding-top: 15px;
    gap: 12px 0;
  }

  .auth-metric strong {
    font-size: 25px;
  }

  .auth-architecture {
    display: none;
  }

  .auth-panel {
    padding: 26px 14px 34px;
  }

  .auth-panel::before {
    display: none;
  }

  .auth-card {
    padding: 26px 20px 22px;
    border-radius: 14px;
  }

  .auth-card-head {
    gap: 10px;
    margin-bottom: 20px;
  }

  .auth-card-mark {
    width: 36px;
    height: 36px;
  }

  .auth-card-head h2 {
    font-size: 23px;
  }

  .auth-card-head p {
    font-size: 10.5px;
  }

  .auth-field-row {
    grid-template-columns: 1fr;
  }

  .demo-accounts {
    grid-template-columns: 1fr;
  }

  .demo-account {
    padding: 8px 10px;
  }

  .auth-copyright {
    flex-direction: column;
    align-items: center;
    gap: 3px;
    text-align: center;
  }

  .auth-form-meta {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  .dashboard-hero {
    border-radius: 16px;
    padding: 22px 18px 52px;
  }

  .hero-copy h1 {
    font-size: 30px;
    letter-spacing: 0.5px;
  }

  .hero-sub {
    font-size: 10px;
  }

  .hero-meta {
    gap: 10px;
  }

  .hero-health {
    grid-template-columns: 1fr;
    justify-items: start;
    padding: 14px;
  }

  .hero-health .gauge {
    display: none;
  }

  .hero-health-metrics {
    grid-template-columns: 1fr auto 1fr auto 1fr;
    width: 100%;
  }

  .hero-actions {
    margin-top: 16px;
  }

  .hero-actions .btn {
    height: 32px;
    font-size: 9.5px;
  }

  .hero-index {
    display: none;
  }

  .kpi-grid {
    grid-template-columns: 1fr;
    margin-top: -34px;
    padding: 0 6px;
  }

  .kpi-card {
    padding: 15px 16px 13px;
  }

  .kpi-value {
    font-size: 29px;
  }

  .kpi-value.kpi-money {
    font-size: 24px;
  }

  .kpi-foot {
    margin-top: 9px;
  }

  .panel {
    padding: 18px 16px;
  }

  .panel-head {
    margin-bottom: 14px;
  }

  .panel-head h2 {
    font-size: 15px;
  }

  .panel-talent,
  .panel-map {
    grid-column: span 12;
  }

  .cert-overview {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
  }

  .cert-donut {
    display: flex;
    justify-content: center;
  }

  .cert-side .chart-legend {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 6px 14px;
  }

  .cert-split {
    margin-top: 14px;
  }

  .cert-warning-band {
    margin-top: 10px;
  }

  .warning-row {
    grid-template-columns: 28px minmax(0, 1fr) auto;
    gap: 9px;
  }

  .warning-row-arrow {
    display: none;
  }

  .warning-row > .badge {
    font-size: 8px;
  }

  .warning-table {
    margin: 0 -4px;
  }

  .panel-head-wrap {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .dashboard-grid-wide .panel {
    grid-column: span 12;
  }

  .qual-row {
    grid-template-columns: 30px minmax(0, 1fr) auto;
    gap: 8px;
  }

  .qual-date {
    display: none;
  }

  .qual-row > .badge {
    display: none;
  }

  .recent-row {
    grid-template-columns: 36px minmax(0, 1fr) auto;
  }

  .recent-amount {
    display: none;
  }

  .recent-row > .badge {
    display: none;
  }

  .trend-foot {
    grid-template-columns: 1fr 1fr;
  }

  .dashboard-source {
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
    line-height: 1.7;
  }

  .skeleton-grid {
    grid-template-columns: 1fr;
  }

  .skeleton-hero {
    height: 230px;
  }

  .form-grid,
  .form-grid-3 {
    grid-template-columns: 1fr;
  }

  .form-field.span-2,
  .form-field.span-3 {
    grid-column: span 1;
  }

  .modal-backdrop {
    padding: 0;
    align-items: flex-end;
  }

  .modal-panel {
    max-height: 92vh;
    border-radius: 16px 16px 0 0;
    transform: translateY(20px);
  }

  .modal-head {
    padding: 18px 18px 14px;
  }

  .modal-head h2 {
    font-size: 20px;
  }

  .modal-body {
    padding: 18px;
  }

  .modal-foot {
    padding: 12px 18px calc(12px + env(safe-area-inset-bottom));
  }

  .drawer-panel {
    width: 100%;
    max-width: none;
  }

  .drawer-head {
    padding: 20px 18px 15px;
  }

  .drawer-body {
    padding: 18px;
  }

  .drawer-foot {
    padding: 12px 18px calc(12px + env(safe-area-inset-bottom));
  }

  .detail-grid {
    grid-template-columns: 1fr;
  }

  .detail-item.span-2 {
    grid-column: span 1;
  }

  .toolbar-card {
    align-items: stretch;
    flex-direction: column;
  }

  .toolbar-left,
  .toolbar-right {
    width: 100%;
  }

  .search-box {
    min-width: 0;
    width: 100%;
  }

  .filter-grid,
  .filter-more {
    grid-template-columns: 1fr;
  }

  .filter-card-row .form-field,
  .filter-card-row .search-box {
    flex-basis: 100%;
    min-width: 0;
  }

  .filter-card-divider {
    display: none;
  }

  .stat-strip {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .mini-stat {
    padding: 11px 12px;
    gap: 8px;
  }

  .mini-stat-icon {
    width: 29px;
    height: 29px;
  }

  .mini-stat-copy strong {
    font-size: 17px;
  }

  .data-summary {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 14px;
    padding: 13px 14px;
  }

  .data-summary-item {
    border-right: 0;
    padding-right: 0;
  }

  .pagination {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .pagination-controls {
    width: 100%;
    justify-content: center;
  }

  .table-footer {
    padding: 12px 14px;
  }

  .table-card-head {
    padding: 14px;
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .data-table thead th:first-child,
  .data-table tbody td:first-child {
    padding-left: 14px;
  }

  .data-table thead th:last-child,
  .data-table tbody td:last-child {
    padding-right: 14px;
  }

  .expand-grid {
    grid-template-columns: 1fr;
  }

  .expand-grid .expand-block:last-child {
    grid-column: span 1;
  }

  .expand-panel-inner {
    padding: 14px;
  }

  .toast-stack {
    left: 14px;
    right: 14px;
    top: 12px;
    width: auto;
  }

  .warning-drawer-list {
    gap: 6px;
  }
}

@media (max-width: 420px) {
  .hero-copy h1 {
    font-size: 27px;
  }

  .hero-health-metrics strong {
    font-size: 15px;
  }

  .hero-health-metrics span {
    font-size: 6.5px;
  }

  .auth-hero h1 {
    font-size: 39px;
  }

  .stat-strip {
    grid-template-columns: 1fr;
  }
}

/* --------------------------------------------------------------------------
   No access
   -------------------------------------------------------------------------- */

.no-access-page {
  min-height: calc(100vh - var(--topbar-height) - 120px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}

.no-access-card {
  position: relative;
  width: min(520px, 100%);
  padding: 42px 44px 34px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: var(--shadow-sm);
  text-align: center;
}

.no-access-card::before {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(184, 148, 88, 0.12);
  border-radius: 11px;
  pointer-events: none;
}

.no-access-mark {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  margin: 0 auto 18px;
  border: 1px solid var(--gold-200);
  border-radius: 16px;
  background: var(--gold-050);
  color: var(--gold-600);
}

.no-access-mark .icon {
  width: 26px;
  height: 26px;
}

.no-access-card .eyebrow {
  justify-content: center;
  margin-bottom: 12px;
}

.no-access-card h1 {
  color: var(--ink-900);
  font-family: var(--font-serif);
  font-size: 25px;
  font-weight: 600;
  letter-spacing: 0.6px;
}

.no-access-card > p {
  margin-top: 11px;
  color: var(--text-muted);
  font-size: 11px;
  line-height: 1.9;
}

.no-access-meta {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--line-soft);
  color: var(--text-muted);
  font-size: 9.5px;
}

.no-access-meta b {
  color: var(--text-secondary);
  font-weight: 500;
}

.no-access-actions {
  margin-top: 22px;
}

.no-access-footer {
  margin-top: 18px;
  color: var(--text-faint);
  font-size: 8.5px;
  letter-spacing: 0.3px;
}

@media (max-width: 720px) {
  .no-access-card {
    padding: 34px 24px 28px;
  }

  .no-access-card h1 {
    font-size: 21px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
