:root {
  --red: #c8102e;
  --red-deep: #8e0e20;
  --red-soft: #fbe9ec;
  --ink: #111827;
  --ink-2: #1f2937;
  --muted: #667085;
  --muted-2: #98a2b3;
  --line: #e9e3d9;
  --line-2: #eeeae3;
  --bg: #f4f1ea;
  --bg-2: #faf8f4;
  --card: #ffffff;
  --navy: #0b1220;
  --navy-2: #15243a;
  --gold: #c8a15a;
  --gold-soft: #f6ecd8;
  --green: #0e9f6e;
  --green-soft: #e7f8f1;
  --amber: #d97706;
  --amber-soft: #fff4e5;
  --blue: #1d4ed8;
  --blue-soft: #eef4ff;
  --violet: #7c3aed;
  --shadow-sm: 0 1px 2px rgba(17, 24, 39, .04), 0 8px 24px rgba(17, 24, 39, .04);
  --shadow: 0 2px 6px rgba(17, 24, 39, .04), 0 18px 48px rgba(17, 24, 39, .08);
  --shadow-lg: 0 30px 80px rgba(11, 18, 32, .22);
  --r-sm: 12px;
  --r: 18px;
  --r-lg: 26px;
  --font: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", "Segoe UI", sans-serif;
  --num: "DIN Alternate", "Bahnschrift", "Arial Narrow", var(--font);
  --safe-b: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background:
    radial-gradient(900px 500px at 78% -8%, rgba(200, 161, 90, .13), transparent 60%),
    radial-gradient(700px 500px at 5% 10%, rgba(200, 16, 46, .06), transparent 60%),
    linear-gradient(180deg, #f7f4ee 0%, var(--bg) 100%);
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: none; background: none; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4, p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
svg { display: block; }
::selection { background: rgba(200, 16, 46, .18); }
:focus-visible { outline: 2px solid rgba(200, 16, 46, .55); outline-offset: 2px; }

.boot-screen {
  min-height: 100vh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: var(--navy); color: #fff; gap: 8px;
}
.boot-mark {
  width: 64px; height: 64px; border-radius: 18px; background: linear-gradient(145deg, #d7182a, #8e0e20);
  display: grid; place-items: center; font-size: 34px; font-weight: 700;
  box-shadow: 0 20px 60px rgba(200, 16, 46, .35);
  animation: bootPulse 1.4s ease-in-out infinite;
}
.boot-logo { width: 92px; height: 64px; background: #fff; border-radius: 16px; display: grid; place-items: center; padding: 8px 10px; box-shadow: 0 20px 60px rgba(0,0,0,.35); animation: bootPulse 1.4s ease-in-out infinite; }
.boot-logo img { width: 100%; height: 100%; object-fit: contain; }
.boot-text { font-size: 22px; font-weight: 700; letter-spacing: 4px; margin-top: 12px; }
.boot-sub { color: #93a0b5; font-size: 12px; letter-spacing: 1px; }
@keyframes bootPulse { 0%, 100% { transform: translateY(0) scale(1); } 50% { transform: translateY(-5px) scale(1.03); } }

/* ---------------- Shell ---------------- */
.app-shell { min-height: 100vh; }
.sidebar {
  position: fixed; z-index: 40; top: 0; left: 0; bottom: 0; width: 248px;
  background:
    radial-gradient(420px 300px at 30% 0%, rgba(200, 16, 46, .24), transparent 60%),
    linear-gradient(180deg, #0d1627 0%, #0a111d 100%);
  color: #fff; display: flex; flex-direction: column; padding: 22px 16px 16px;
  border-right: 1px solid rgba(255, 255, 255, .06);
}
.brand { display: flex; align-items: center; gap: 11px; padding: 0 8px 22px; }
.brand-mark {
  width: 42px; height: 42px; border-radius: 13px;
  background: linear-gradient(145deg, #d7182a, #8e0e20);
  display: grid; place-items: center; font-size: 22px; font-weight: 800;
  box-shadow: 0 10px 26px rgba(200, 16, 46, .32), inset 0 1px rgba(255,255,255,.2);
  flex: 0 0 auto;
}
.brand-logo-sidebar { width: 44px; height: 36px; border-radius: 10px; padding: 4px 6px; box-shadow: none; }
.brand-logo-sidebar img { width: 100%; height: 100%; object-fit: contain; }
.brand-copy strong { display: block; font-size: 17px; letter-spacing: 2px; font-weight: 700; }
.brand-copy span { display: block; font-size: 9px; color: #8f9bb0; letter-spacing: 2.4px; margin-top: 1px; }
.side-nav { flex: 1; overflow-y: auto; scrollbar-width: none; }
.side-nav::-webkit-scrollbar { display: none; }
.nav-label { font-size: 10px; letter-spacing: 2.5px; color: #66738a; padding: 18px 12px 8px; font-weight: 600; }
.nav-item {
  width: 100%; display: flex; align-items: center; gap: 12px; padding: 11px 12px;
  color: #b7c0ce; border-radius: 12px; font-size: 13.5px; text-align: left;
  transition: .18s ease; margin-bottom: 2px; position: relative;
}
.nav-item svg { width: 18px; height: 18px; opacity: .85; }
.nav-item:hover { background: rgba(255,255,255,.055); color: #fff; }
.nav-item.active { background: linear-gradient(90deg, rgba(200, 16, 46, .92), rgba(200, 16, 46, .62)); color: #fff; box-shadow: 0 8px 20px rgba(200, 16, 46, .22); }
.nav-item.active svg { opacity: 1; }
.nav-badge {
  margin-left: auto; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: #fff; color: var(--red); font-size: 10px; font-weight: 700; display: grid; place-items: center;
}
.nav-item.active .nav-badge { background: #fff; }
.side-user {
  display: flex; align-items: center; gap: 10px; padding: 12px 10px; margin-top: 12px;
  border-top: 1px solid rgba(255,255,255,.08); cursor: pointer; border-radius: 12px;
}
.side-user:hover { background: rgba(255,255,255,.05); }
.side-user .avatar-head { width: 36px; height: 36px; flex: 0 0 auto; border-radius: 50%; overflow: hidden; background: #25324a; }
.side-user-copy { min-width: 0; flex: 1; }
.side-user-copy strong { display: block; font-size: 12.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-user-copy span { display: block; color: #8290a6; font-size: 10px; }
.side-live { display: flex; align-items: center; gap: 6px; padding: 10px 12px 0; color: #6f7d93; font-size: 9.5px; letter-spacing: .5px; }
.live-dot { width: 6px; height: 6px; border-radius: 50%; background: #3ddc97; box-shadow: 0 0 0 4px rgba(61,220,151,.1); }

.main { margin-left: 248px; min-height: 100vh; display: flex; flex-direction: column; }
.topbar {
  height: 72px; position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 15px;
  padding: 0 28px; background: rgba(244, 241, 234, .82);
  backdrop-filter: saturate(160%) blur(18px); -webkit-backdrop-filter: saturate(160%) blur(18px);
  border-bottom: 1px solid rgba(17, 24, 39, .05);
}
.topbar-title { display: flex; align-items: baseline; gap: 12px; min-width: 0; }
.topbar-title h1 { font-size: 19px; font-weight: 700; letter-spacing: .2px; white-space: nowrap; }
.topbar-title span { font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.topbar-spacer { flex: 1; }
.topbar-actions { display: flex; align-items: center; gap: 8px; }
.topbar-date { font-size: 11.5px; color: var(--muted); padding-right: 10px; white-space: nowrap; }
.icon-btn {
  width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px;
  color: var(--ink-2); background: rgba(255,255,255,.72); border: 1px solid rgba(17,24,39,.06);
  transition: .16s ease; position: relative; flex: 0 0 auto;
}
.icon-btn:hover { background: #fff; box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.icon-btn svg { width: 18px; height: 18px; }
.red-dot { position: absolute; top: 7px; right: 7px; width: 7px; height: 7px; border-radius: 50%; background: var(--red); border: 1.5px solid #fff; }
.bell-count { position: absolute; top: -5px; right: -4px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; background: var(--red); color: #fff; font-size: 9px; line-height: 18px; text-align: center; font-weight: 700; border: 2px solid var(--bg); box-shadow: 0 2px 6px rgba(200,16,46,.25); }
.top-avatar { width: 38px; height: 38px; border-radius: 50%; overflow: hidden; border: 2px solid #fff; box-shadow: var(--shadow-sm); cursor: pointer; background: var(--gold-soft); }
.top-avatar img, .top-avatar svg { width: 100%; height: 100%; object-fit: cover; }
.mobile-brand { display: none; }
.mobile-brand strong { white-space: nowrap; }
.page-wrap { padding: 24px 28px 80px; max-width: 1520px; width: 100%; margin: 0 auto; flex: 1; }
.page { animation: pageIn .35s ease both; }
@keyframes pageIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.bottom-nav { display: none; }
.mobile-more { display: none; }

/* ---------------- Shared ---------------- */
.card {
  background: var(--card); border: 1px solid rgba(17,24,39,.055); border-radius: var(--r);
  box-shadow: var(--shadow-sm);
}
.card-pad { padding: 20px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.section-head h2 { font-size: 16px; font-weight: 700; letter-spacing: .2px; }
.section-head .sub { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.section-head a, .link-btn { color: var(--red); font-size: 12px; font-weight: 600; display: inline-flex; align-items: center; gap: 2px; cursor: pointer; }
.link-btn svg { width: 14px; height: 14px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 38px; padding: 0 15px;
  border-radius: 11px; font-size: 12.5px; font-weight: 600; white-space: nowrap;
  transition: .16s ease; border: 1px solid transparent; user-select: none;
}
.btn svg { width: 16px; height: 16px; }
.btn:active { transform: scale(.985); }
.btn-primary { background: var(--red); color: #fff; box-shadow: 0 7px 18px rgba(200,16,46,.22); }
.btn-primary:hover { background: #b30e29; box-shadow: 0 9px 22px rgba(200,16,46,.28); }
.btn-dark { background: var(--navy); color: #fff; }
.btn-dark:hover { background: #17233a; }
.btn-gold { background: linear-gradient(135deg, #d3ae69, #b98b3e); color: #231a0c; }
.btn-ghost { background: #fff; border-color: var(--line); color: var(--ink-2); }
.btn-ghost:hover { border-color: #d7cfc1; background: #fdfcf9; }
.btn-soft { background: var(--red-soft); color: var(--red); }
.btn-soft:hover { background: #f8dde2; }
.btn-sm { height: 32px; padding: 0 11px; font-size: 11.5px; border-radius: 9px; }
.btn-lg { height: 46px; padding: 0 22px; font-size: 14px; border-radius: 13px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.btn-icon-only { width: 36px; height: 36px; padding: 0; }
.spinner { width: 14px; height: 14px; border-radius: 50%; border: 2px solid rgba(255,255,255,.35); border-top-color: #fff; display: inline-block; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.text-muted { color: var(--muted); }
.text-red { color: var(--red); }
.text-green { color: var(--green); }
.text-amber { color: var(--amber); }
.text-gold { color: var(--gold); }
.num { font-family: var(--num); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.mt-4 { margin-top: 4px; } .mt-8 { margin-top: 8px; } .mt-12 { margin-top: 12px; } .mt-16 { margin-top: 16px; } .mt-20 { margin-top: 20px; } .mt-24 { margin-top: 24px; }
.mb-8 { margin-bottom: 8px; } .mb-12 { margin-bottom: 12px; } .mb-16 { margin-bottom: 16px; } .mb-20 { margin-bottom: 20px; }
.row { display: flex; align-items: center; gap: 10px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.wrap { flex-wrap: wrap; }
.grow { flex: 1; }
.hide { display: none !important; }
.mobile-only { display: none; }
.divider { height: 1px; background: var(--line-2); margin: 14px 0; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }

.badge { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px; border-radius: 6px; font-size: 10px; font-weight: 600; background: #f2f4f7; color: var(--muted); white-space: nowrap; }
.badge.red { background: var(--red-soft); color: var(--red); }
.badge.green { background: var(--green-soft); color: var(--green); }
.badge.amber { background: var(--amber-soft); color: var(--amber); }
.badge.blue { background: var(--blue-soft); color: var(--blue); }
.badge.gold { background: var(--gold-soft); color: #9a742f; }
.badge.navy { background: #eef1f6; color: #334155; }
.status { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 600; color: var(--muted); }
.status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status.delivered { color: var(--green); }
.status.pending { color: var(--amber); }
.status.order { color: var(--blue); }
.status.cancel { color: var(--muted-2); }
.tag { display: inline-flex; align-items: center; height: 21px; padding: 0 8px; border-radius: 6px; font-size: 10px; background: #f7f5f0; color: var(--muted); }
.tag.red { background: var(--red-soft); color: var(--red); }
.tag.gold { background: var(--gold-soft); color: #92702e; }

.avatar { border-radius: 50%; overflow: hidden; background: var(--gold-soft); flex: 0 0 auto; display: grid; place-items: center; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar svg { width: 100%; height: 100%; }
.avatar-sm { width: 28px; height: 28px; }
.avatar-md { width: 38px; height: 38px; }
.avatar-lg { width: 54px; height: 54px; }
.avatar-xl { width: 84px; height: 84px; }
.avatar-stack { display: flex; }
.avatar-stack .avatar { border: 2px solid #fff; margin-left: -7px; }
.avatar-stack .avatar:first-child { margin-left: 0; }

.progress { height: 6px; border-radius: 6px; background: #f0ece5; overflow: hidden; }
.progress > span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #d7182a, #c8102e); transition: width .8s cubic-bezier(.2,.7,.2,1); }
.progress.green > span { background: linear-gradient(90deg, #18b981, #0e9f6e); }
.progress.gold > span { background: linear-gradient(90deg, #dfb96e, #b98b3e); }
.ring-wrap { position: relative; display: grid; place-items: center; flex: 0 0 auto; }
.ring-wrap svg { transform: rotate(-90deg); }
.ring-label { position: absolute; text-align: center; line-height: 1; }
.ring-label strong { font-family: var(--num); font-size: 21px; font-weight: 700; }
.ring-label span { display: block; font-size: 9px; color: var(--muted); margin-top: 3px; }

.empty { padding: 42px 20px; text-align: center; color: var(--muted); }
.empty-icon { width: 52px; height: 52px; margin: 0 auto 10px; border-radius: 16px; background: #f3f0ea; display: grid; place-items: center; color: #b9b0a2; }
.empty h3 { font-size: 14px; color: var(--ink-2); font-weight: 600; margin-bottom: 4px; }
.empty p { font-size: 11.5px; }
.skeleton { background: linear-gradient(90deg, #f1eee8 25%, #f8f6f2 37%, #f1eee8 63%); background-size: 400% 100%; animation: shimmer 1.4s infinite; border-radius: 10px; }
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }

/* ---------------- Login ---------------- */
.login-page { min-height: 100vh; display: grid; grid-template-columns: 1.08fr .92fr; background: #0b1220; }
.login-left {
  position: relative; overflow: hidden; color: #fff; padding: 54px 60px;
  display: flex; flex-direction: column; justify-content: space-between;
  background:
    radial-gradient(900px 600px at 15% 10%, rgba(200, 16, 46, .26), transparent 62%),
    radial-gradient(700px 500px at 95% 85%, rgba(200, 161, 90, .13), transparent 60%),
    linear-gradient(145deg, #0b1220 0%, #111c2e 58%, #2a1016 100%);
}
.login-left::before {
  content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 44px 44px; mask-image: linear-gradient(180deg, rgba(0,0,0,.7), transparent 75%);
}
.login-left::after {
  content: ""; position: absolute; width: 460px; height: 460px; border: 1px solid rgba(200,161,90,.22); border-radius: 50%;
  right: -120px; bottom: -160px; box-shadow: 0 0 0 60px rgba(200,161,90,.035), 0 0 0 120px rgba(200,161,90,.025);
}
.login-brand { display: flex; align-items: center; gap: 12px; position: relative; z-index: 1; }
.brand-logo-tile { width: 88px; height: 56px; background: #fff; border-radius: 12px; display: grid; place-items: center; padding: 7px 9px; box-shadow: 0 10px 24px rgba(0,0,0,.18); flex: 0 0 auto; }
.brand-logo-tile img { width: 100%; height: 100%; object-fit: contain; }
.sidebar .brand-logo-sidebar { width: 44px; height: 36px; border-radius: 10px; padding: 4px 6px; box-shadow: none; }
.mobile-brand .brand-logo-mobile { width: 36px; height: 30px; border-radius: 8px; padding: 3px 5px; box-shadow: none; }
.login-brand .brand-mark { width: 46px; height: 46px; font-size: 24px; }
.login-brand strong { font-size: 18px; letter-spacing: 3px; display: block; }
.login-brand span { font-size: 9px; color: #a3afc3; letter-spacing: 3px; display: block; }
.login-hero { position: relative; z-index: 1; max-width: 580px; padding: 50px 0 30px; }
.login-eyebrow { font-size: 10px; letter-spacing: 4px; color: var(--gold); font-weight: 600; display: flex; align-items: center; gap: 10px; }
.login-eyebrow::before { content: ""; width: 34px; height: 1px; background: var(--gold); }
.login-hero h1 { font-size: clamp(46px, 5.2vw, 76px); line-height: 1.08; font-weight: 800; letter-spacing: -1px; margin: 18px 0 20px; }
.login-hero h1 em { font-style: normal; color: #e9c987; }
.login-hero p { color: #a9b4c6; font-size: 14px; line-height: 1.9; max-width: 460px; }
.login-features { display: flex; gap: 30px; margin-top: 38px; flex-wrap: wrap; }
.login-feature strong { font-family: var(--num); font-size: 27px; display: block; color: #fff; }
.login-feature span { font-size: 10px; color: #8d9ab0; letter-spacing: 1px; }
.login-foot { position: relative; z-index: 1; color: #67758c; font-size: 10.5px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.login-right { background: #f6f2ea; display: flex; align-items: center; justify-content: center; padding: 40px; position: relative; }
.login-card { width: min(420px, 100%); background: #fff; border-radius: 26px; padding: 36px; box-shadow: 0 28px 90px rgba(11,18,32,.15); border: 1px solid rgba(255,255,255,.6); }
.login-card .eyebrow { font-size: 10px; letter-spacing: 2px; color: var(--red); font-weight: 700; }
.login-card-logo { display: flex; align-items: center; gap: 12px; padding-bottom: 20px; margin-bottom: 22px; border-bottom: 1px solid #f0e9de; }
.login-card-logo img { width: 92px; height: 56px; object-fit: contain; }
.login-card-logo strong { display: block; font-size: 16px; letter-spacing: 1.5px; }
.login-card-logo span { display: block; font-size: 9.5px; color: var(--muted); margin-top: 2px; letter-spacing: .5px; }
.login-card h2 { font-size: 25px; margin: 8px 0 6px; letter-spacing: -.3px; }
.login-card .login-desc { font-size: 12px; color: var(--muted); line-height: 1.7; margin-bottom: 26px; }
.field { margin-bottom: 15px; }
.field label { display: flex; align-items: center; justify-content: space-between; font-size: 11.5px; color: #475467; margin-bottom: 7px; font-weight: 600; }
.input, .select, .textarea {
  width: 100%; height: 44px; border: 1px solid #e5ded2; border-radius: 11px; background: #fcfbf8;
  padding: 0 13px; font-size: 13px; color: var(--ink); transition: .16s ease; outline: none;
}
.textarea { height: auto; min-height: 84px; padding: 11px 13px; resize: vertical; line-height: 1.6; }
.input::placeholder, .textarea::placeholder { color: #b3aca0; }
.input:focus, .select:focus, .textarea:focus { border-color: rgba(200,16,46,.55); background: #fff; box-shadow: 0 0 0 3px rgba(200,16,46,.08); }
.input-icon { position: relative; }
.input-icon svg { position: absolute; left: 13px; top: 13px; width: 17px; height: 17px; color: #9c9488; }
.input-icon .input { padding-left: 39px; }
.login-error { min-height: 18px; font-size: 11.5px; color: var(--red); margin-top: -4px; margin-bottom: 6px; }
.login-submit { margin-top: 4px; height: 46px; border-radius: 12px; font-size: 14px; }
.demo-box { margin-top: 24px; border-top: 1px dashed #e6dfd4; padding-top: 18px; }
.demo-box h4 { font-size: 10.5px; letter-spacing: 1.5px; color: #8d8578; font-weight: 600; margin-bottom: 10px; }
.demo-roles { display: flex; flex-wrap: wrap; gap: 6px; }
.demo-role {
  padding: 6px 10px; border-radius: 8px; background: #f7f4ee; border: 1px solid #eee8de;
  font-size: 10.5px; color: #5f574b; display: inline-flex; align-items: center; gap: 5px; transition: .15s;
}
.demo-role:hover { background: #fff; border-color: #d6cdbd; transform: translateY(-1px); }
.demo-role b { color: var(--ink); font-weight: 600; }
.demo-hint { margin-top: 10px; font-size: 9.5px; color: #a49b8e; line-height: 1.6; }
.login-mobile-brand { display: none; }

/* ---------------- Home ---------------- */
.home-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 20px; }
.home-greet h1 { font-size: 27px; font-weight: 700; letter-spacing: -.5px; }
.home-greet p { color: var(--muted); font-size: 12px; margin-top: 4px; }
.home-greet .name { color: var(--red); }
.today-chip { display: inline-flex; align-items: center; gap: 7px; font-size: 11px; color: var(--muted); background: rgba(255,255,255,.7); border: 1px solid rgba(17,24,39,.06); padding: 7px 11px; border-radius: 20px; }
.today-chip b { color: var(--ink); font-weight: 600; }
.hero {
  position: relative; overflow: hidden; border-radius: var(--r-lg); color: #fff; padding: 26px 28px; min-height: 218px;
  background:
    radial-gradient(600px 320px at 88% 20%, rgba(200,16,46,.4), transparent 65%),
    radial-gradient(500px 300px at 60% 120%, rgba(200,161,90,.16), transparent 60%),
    linear-gradient(118deg, #0a1120 0%, #142238 55%, #381019 100%);
  box-shadow: 0 22px 50px rgba(11,18,32,.18);
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.hero::before {
  content: ""; position: absolute; inset: 0; opacity: .5;
  background-image: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 40px 40px; mask-image: linear-gradient(90deg, rgba(0,0,0,.8), transparent 80%);
}
.hero::after {
  content: ""; position: absolute; width: 380px; height: 380px; border: 1px solid rgba(200,161,90,.18); border-radius: 50%;
  right: -80px; top: -190px; box-shadow: 0 0 0 50px rgba(200,161,90,.035), 0 0 0 100px rgba(200,161,90,.02);
}
.hero-content { position: relative; z-index: 2; max-width: 640px; }
.hero-kicker { display: flex; align-items: center; gap: 9px; font-size: 9.5px; letter-spacing: 3px; color: #e9c987; font-weight: 600; }
.hero-kicker .dot { width: 6px; height: 6px; border-radius: 50%; background: #e9c987; box-shadow: 0 0 0 5px rgba(233,201,135,.1); }
.hero-title { font-size: clamp(26px, 2.3vw, 36px); line-height: 1.25; font-weight: 700; margin: 14px 0 8px; letter-spacing: -.4px; }
.hero-title { text-wrap: balance; }
.hero-title em { font-style: normal; color: #f3d594; }
.hero-sub { color: #aeb9ca; font-size: 12px; line-height: 1.7; }
.hero-meta { display: flex; align-items: center; gap: 24px; margin-top: 21px; flex-wrap: wrap; }
.hero-meta-item strong { font-family: var(--num); font-size: 20px; font-weight: 700; }
.hero-meta-item span { display: block; font-size: 9.5px; color: #8592a8; margin-top: 1px; }
.hero-actions { display: flex; gap: 9px; margin-top: 20px; }
.hero-actions .btn-ghost { background: rgba(255,255,255,.09); border-color: rgba(255,255,255,.14); color: #fff; backdrop-filter: blur(8px); }
.hero-actions .btn-ghost:hover { background: rgba(255,255,255,.15); }
.hero-side { position: relative; z-index: 2; display: flex; align-items: center; gap: 20px; flex: 0 0 auto; padding-right: 4px; }
.hero-ring .ring-label strong { color: #fff; font-size: 30px; }
.hero-ring .ring-label span { color: #9ba8bc; }
.hero-mini-stats { display: flex; flex-direction: column; gap: 13px; border-left: 1px solid rgba(255,255,255,.1); padding-left: 20px; }
.hero-mini strong { font-family: var(--num); font-size: 18px; display: block; }
.hero-mini span { font-size: 9.5px; color: #8491a6; display: block; margin-top: 1px; }
.hero-mini b { color: #58d6a8; font-size: 9px; font-weight: 600; margin-left: 3px; }
.kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 14px; margin-top: 16px; }
.kpi { background: #fff; border: 1px solid rgba(17,24,39,.055); border-radius: 17px; padding: 16px 17px; box-shadow: var(--shadow-sm); position: relative; overflow: hidden; }
.kpi { width: 100%; text-align: left; cursor: pointer; color: inherit; font: inherit; transition: .16s ease; }
.kpi:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: rgba(200,16,46,.12); }
.kpi::after { content: ""; position: absolute; width: 74px; height: 74px; border-radius: 50%; right: -28px; top: -30px; background: var(--kpi-tint, rgba(200,16,46,.06)); }
.kpi-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.kpi-label { font-size: 11px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.kpi-icon { width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; background: var(--kpi-tint, #fbf0f2); color: var(--kpi-color, var(--red)); }
.kpi-icon svg { width: 15px; height: 15px; }
.kpi-value { font-family: var(--num); font-size: 30px; font-weight: 700; letter-spacing: -.5px; margin-top: 8px; line-height: 1.1; }
.kpi-value small { font-size: 11px; font-family: var(--font); font-weight: 600; color: var(--muted); margin-left: 3px; letter-spacing: 0; }
.kpi-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; font-size: 10px; color: var(--muted); }
.kpi-trend { display: inline-flex; align-items: center; gap: 2px; font-weight: 600; }
.kpi-trend.up { color: var(--green); } .kpi-trend.down { color: var(--red); }
.kpi-trend svg { width: 12px; height: 12px; }
.home-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(300px, .75fr); gap: 16px; margin-top: 16px; align-items: start; }
.home-col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.race-card { padding: 19px 19px 14px; overflow: hidden; }
.race-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.race-head h2 { font-size: 16px; font-weight: 700; display: flex; align-items: center; gap: 7px; }
.race-head h2 svg { color: var(--gold); width: 18px; height: 18px; }
.race-head p { font-size: 10.5px; color: var(--muted); margin-top: 3px; }
.seg { display: inline-flex; padding: 3px; background: #f5f2ec; border-radius: 9px; border: 1px solid #eee9e0; }
.seg button { padding: 5px 9px; border-radius: 6px; font-size: 10.5px; color: var(--muted); font-weight: 600; transition: .15s; }
.seg button.active { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.07); }
.race-track { position: relative; margin-top: 20px; padding: 2px 0 10px; }
.race-lane { position: relative; height: 58px; border-bottom: 1px dashed #f0ebe3; }
.race-lane:last-child { border-bottom: none; }
.lane-label { position: absolute; left: 0; top: 7px; width: 72px; z-index: 2; }
.lane-label strong { display: block; font-size: 11px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lane-label span { font-size: 9px; color: var(--muted); }
.lane-line { position: absolute; left: 80px; right: 4px; top: 30px; height: 1px; background: repeating-linear-gradient(90deg, #e7e1d7 0 5px, transparent 5px 11px); }
.lane-line::after { content: ""; position: absolute; right: 0; top: -5px; width: 9px; height: 9px; border-right: 2px solid #d8cfc0; border-top: 2px solid #d8cfc0; transform: rotate(45deg); }
.racer { position: absolute; top: 0; width: 42px; height: 52px; transition: left 1.2s cubic-bezier(.2,.75,.25,1); z-index: 1; }
.racer svg { width: 100%; height: 100%; overflow: visible; }
.racer .run-body { animation: runnerBob .62s ease-in-out infinite; transform-origin: center bottom; }
.racer .arm-a { animation: armSwing .62s ease-in-out infinite; transform-origin: 24px 30px; }
.racer .arm-b { animation: armSwing .62s ease-in-out infinite reverse; transform-origin: 18px 30px; }
.racer .leg-a { animation: legSwing .62s ease-in-out infinite; transform-origin: 22px 40px; }
.racer .leg-b { animation: legSwing .62s ease-in-out infinite reverse; transform-origin: 17px 40px; }
.racer.rank-1 .runner-crown { display: block; }
.racer .runner-crown { display: none; }
.racer-avatar { width: 40px; height: 40px; border-radius: 50%; background: #fff; box-shadow: 0 4px 12px rgba(17,24,39,.14); border: 2px solid #fff; display: grid; place-items: center; animation: avatarSway 1.9s ease-in-out infinite; animation-delay: var(--delay, 0s); transform-origin: center bottom; }
.racer-avatar .avatar { width: 36px; height: 36px; border-radius: 50%; }
.racer-crown { position: absolute; top: -13px; left: 50%; transform: translateX(-50%); font-size: 15px; filter: drop-shadow(0 2px 2px rgba(0,0,0,.15)); }
@keyframes avatarSway { 0%, 100% { transform: translateY(0) rotate(-1.5deg); } 50% { transform: translateY(-2px) rotate(1.8deg); } }
.rank-pill { font-family: var(--num); font-size: 9px; color: var(--muted); background: #f4f0e9; padding: 1px 5px; border-radius: 4px; margin-left: 4px; }
.race-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; border-top: 1px solid #f2ede5; padding-top: 11px; margin-top: 6px; font-size: 9.5px; color: var(--muted); }
.race-legend { display: flex; align-items: center; gap: 6px; }
.race-legend i { width: 6px; height: 6px; border-radius: 50%; background: var(--red); display: inline-block; }
@keyframes runnerBob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-2px); } }
@keyframes armSwing { 0%,100% { transform: rotate(18deg); } 50% { transform: rotate(-24deg); } }
@keyframes legSwing { 0%,100% { transform: rotate(-18deg); } 50% { transform: rotate(24deg); } }

.todo-card { padding: 19px; }
.todo-list { display: flex; flex-direction: column; gap: 8px; }
.todo-item { display: flex; align-items: center; gap: 11px; padding: 10px; border-radius: 12px; background: #fbfaf7; border: 1px solid #f1ede5; cursor: pointer; transition: .16s; }
.todo-item:hover { background: #fff; border-color: #e4dccf; transform: translateX(2px); }
.todo-icon { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; flex: 0 0 auto; }
.todo-icon svg { width: 16px; height: 16px; }
.todo-icon.amber { background: var(--amber-soft); color: var(--amber); }
.todo-icon.red { background: var(--red-soft); color: var(--red); }
.todo-icon.blue { background: var(--blue-soft); color: var(--blue); }
.todo-icon.gold { background: var(--gold-soft); color: #9a742f; }
.todo-icon.green { background: var(--green-soft); color: var(--green); }
.todo-copy { min-width: 0; flex: 1; }
.todo-copy strong { display: block; font-size: 11.5px; font-weight: 600; }
.todo-copy span { display: block; font-size: 9.5px; color: var(--muted); margin-top: 1px; }
.todo-count { font-family: var(--num); font-size: 17px; font-weight: 700; color: var(--ink-2); }
.todo-item > svg { width: 14px; height: 14px; color: #c3bbae; }

.news-card { padding: 19px; }
.news-list { display: flex; flex-direction: column; }
.news-item { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid #f3efe8; }
.news-item:last-child { border-bottom: none; padding-bottom: 0; }
.news-icon { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--red-soft); color: var(--red); flex: 0 0 auto; }
.news-icon svg { width: 15px; height: 15px; }
.news-avatar { width: 32px; height: 32px; flex: 0 0 auto; }
.news-avatar .avatar { width: 32px; height: 32px; }
.news-copy { min-width: 0; flex: 1; }
.news-copy strong { display: block; font-size: 11.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.news-copy span { display: block; font-size: 9.5px; color: var(--muted); margin-top: 1px; }
.news-time { font-size: 9px; color: #b0a99d; white-space: nowrap; }
.news-like { display: inline-flex; align-items: center; gap: 3px; font-size: 9.5px; color: var(--muted); }
.news-like svg { width: 12px; height: 12px; }
.quick-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px; padding: 18px; }
.quick-item { display: flex; flex-direction: column; gap: 7px; padding: 12px; border-radius: 13px; background: #fbfaf7; border: 1px solid #f1ede5; transition: .16s; cursor: pointer; text-align: left; }
.quick-item:hover { background: #fff; border-color: #e7dfd2; transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.quick-icon { width: 31px; height: 31px; border-radius: 10px; display: grid; place-items: center; background: var(--red-soft); color: var(--red); }
.quick-icon svg { width: 16px; height: 16px; }
.quick-item strong { font-size: 11.5px; font-weight: 600; }
.quick-item span { font-size: 9px; color: var(--muted); }
.insight-strip { display: flex; align-items: center; gap: 12px; padding: 13px 16px; background: linear-gradient(90deg, #fff9ec, #fffdf8); border: 1px solid #f0e5ca; border-radius: 14px; margin-top: 16px; }
.insight-strip .icon { width: 31px; height: 31px; border-radius: 10px; background: var(--gold-soft); color: #9a742f; display: grid; place-items: center; flex: 0 0 auto; }
.insight-strip .icon svg { width: 16px; height: 16px; }
.insight-strip p { font-size: 11px; color: #675a3e; line-height: 1.55; }
.insight-strip b { color: #3b2e14; }

/* ---------------- Page header ---------------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head h1 { font-size: 25px; letter-spacing: -.4px; font-weight: 700; }
.page-head p { font-size: 11.5px; color: var(--muted); margin-top: 4px; }
.page-head-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.page-toolbar { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; margin-bottom: 14px; }
.search-box { position: relative; flex: 1; min-width: 180px; max-width: 360px; }
.search-box svg { position: absolute; width: 16px; height: 16px; left: 12px; top: 11px; color: #a39b8e; }
.search-box input { height: 38px; padding-left: 36px; border-radius: 10px; background: #fff; border: 1px solid var(--line); font-size: 12px; }
.filter-tabs { display: flex; gap: 5px; overflow-x: auto; scrollbar-width: none; }
.filter-tabs::-webkit-scrollbar { display: none; }
.filter-tab { padding: 7px 11px; border-radius: 8px; font-size: 11px; color: var(--muted); white-space: nowrap; border: 1px solid transparent; }
.filter-tab.active { background: #fff; border-color: var(--line); color: var(--ink); box-shadow: var(--shadow-sm); font-weight: 600; }
.filter-tab:hover { color: var(--ink); }

/* ---------------- Orders ---------------- */
.order-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 14px; }
.order-card { background: #fff; border: 1px solid rgba(17,24,39,.06); border-radius: 17px; padding: 16px; cursor: pointer; transition: .18s; position: relative; overflow: hidden; }
.order-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--accent, var(--red)); opacity: 0; transition: .18s; }
.order-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: rgba(200,16,46,.12); }
.order-card:hover::before { opacity: 1; }
.order-card.pinned { border-color: rgba(200,16,46,.2); background: linear-gradient(180deg, #fff9f9, #fff 34%); }
.order-pin { display: inline-flex; align-items: center; gap: 4px; height: 20px; padding: 0 7px; border-radius: 6px; background: #fbe4e7; color: var(--red); font-size: 9px; font-weight: 600; margin-bottom: 8px; }
.order-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.order-customer { min-width: 0; }
.order-customer h3 { font-size: 14px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 180px; }
.order-customer p { font-size: 10px; color: var(--muted); margin-top: 3px; font-family: var(--num); letter-spacing: .2px; }
.order-amount { display: flex; gap: 11px; text-align: right; white-space: nowrap; }
.price-cell b { display: block; font-family: var(--num); font-size: 16px; font-weight: 700; }
.price-cell small { display: block; font-size: 8.5px; font-family: var(--font); color: var(--muted); font-weight: 400; margin-top: 1px; }
.order-amount small { font-size: 9px; font-family: var(--font); color: var(--muted); display: block; font-weight: 400; margin-top: 1px; }
.order-vehicle { display: flex; align-items: center; gap: 8px; background: #faf8f4; border-radius: 10px; padding: 9px 10px; margin-top: 12px; }
.order-vehicle svg { width: 19px; height: 19px; color: var(--red); flex: 0 0 auto; }
.order-vehicle strong { display: block; font-size: 11px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.order-vehicle span { display: block; font-size: 9px; color: var(--muted); margin-top: 1px; }
.order-vehicle .qty { margin-left: auto; font-family: var(--num); font-size: 15px; font-weight: 700; color: var(--red); }
.price-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.price-pair > div { padding: 9px 11px; border-radius: 10px; background: #faf8f4; border: 1px solid #f0ebe2; }
.price-pair span { display: block; font-size: 8.5px; color: var(--muted); }
.price-pair strong { display: block; font-family: var(--num); font-size: 18px; color: var(--red); margin-top: 2px; }
.order-meta { display: flex; align-items: center; gap: 5px; margin-top: 11px; flex-wrap: wrap; }
.order-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; border-top: 1px solid #f3efe8; margin-top: 12px; padding-top: 10px; }
.order-sales { display: flex; align-items: center; gap: 6px; font-size: 10px; color: var(--muted); }
.order-sales strong { color: var(--ink-2); font-weight: 600; }
.doc-mini { display: flex; align-items: center; gap: 5px; font-size: 9.5px; color: var(--muted); }
.doc-mini .bar { width: 34px; height: 4px; background: #f0ece5; border-radius: 4px; overflow: hidden; }
.doc-mini .bar i { display: block; height: 100%; border-radius: 4px; background: var(--green); }
.doc-mini.warn .bar i { background: var(--amber); }
.doc-mini.bad .bar i { background: var(--red); }
.order-detail-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 18px; }
.detail-section { border: 1px solid var(--line-2); border-radius: 13px; padding: 14px; }
.detail-section h4 { font-size: 11px; color: var(--muted); letter-spacing: .5px; font-weight: 600; margin-bottom: 10px; }
.kv { display: grid; grid-template-columns: 74px 1fr; gap: 8px; font-size: 11.5px; padding: 5px 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; color: var(--ink-2); font-weight: 500; }
.timeline { position: relative; padding-left: 17px; }
.timeline::before { content: ""; position: absolute; left: 4px; top: 4px; bottom: 4px; width: 1px; background: #eee7db; }
.timeline-item { position: relative; padding: 0 0 12px; font-size: 10.5px; color: var(--muted); }
.timeline-item::before { content: ""; position: absolute; left: -16px; top: 5px; width: 7px; height: 7px; border-radius: 50%; background: #d8cfc0; border: 2px solid #fff; }
.timeline-item:first-child::before { background: var(--red); }
.timeline-item strong { display: block; font-size: 11px; color: var(--ink-2); font-weight: 600; }
.timeline-item span { display: block; margin-top: 1px; }
.doc-check-list { display: flex; flex-direction: column; gap: 6px; }
.doc-check { display: flex; align-items: center; gap: 8px; font-size: 10.5px; padding: 7px 9px; border-radius: 8px; background: #faf8f4; }
.doc-check { width: 100%; text-align: left; border: 1px solid transparent; color: inherit; font: inherit; cursor: pointer; transition: .15s; }
.doc-check:hover { border-color: #e2d8c8; background: #fff; transform: translateX(2px); }
.doc-check .doc-go { margin-left: auto; color: #b7aea0; display: grid; place-items: center; }
.doc-check.returned { background: #fff5f5; border-color: #f3d4d8; }
.doc-return-mark { display: inline-block; margin-left: 4px; padding: 1px 5px; border-radius: 4px; background: #fbe4e7; color: var(--red); font-size: 8px; font-style: normal; font-weight: 600; white-space: nowrap; }
.doc-sub-title { font-size: 9px; color: var(--muted); letter-spacing: .6px; font-weight: 600; margin: 10px 0 5px; }
.doc-check .tick { width: 16px; height: 16px; border-radius: 50%; display: grid; place-items: center; flex: 0 0 auto; background: #f0ece5; color: #b4ab9d; }
.doc-check .tick svg { width: 10px; height: 10px; }
.doc-check.done .tick { background: var(--green); color: #fff; }
.doc-check.pending .tick { background: var(--gold); color: #fff; }
.doc-check.missing .tick { background: #f6e4e7; color: var(--red); }
.doc-check span { flex: 1; }
.doc-check b { font-size: 9px; font-weight: 500; color: var(--muted); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 0 12px; }
.form-grid .full { grid-column: 1 / -1; }
.form-section-title { font-size: 10px; letter-spacing: 1.5px; color: var(--red); font-weight: 700; margin: 14px 0 10px; display: flex; align-items: center; gap: 7px; }
.form-section-title::after { content: ""; height: 1px; flex: 1; background: #efe9df; }
.form-hint { font-size: 9.5px; color: var(--muted); margin-top: 4px; }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 0; }
.switch { position: relative; width: 38px; height: 22px; border-radius: 12px; background: #ded8cd; transition: .2s; flex: 0 0 auto; cursor: pointer; }
.switch::after { content: ""; position: absolute; width: 18px; height: 18px; border-radius: 50%; background: #fff; top: 2px; left: 2px; transition: .2s; box-shadow: 0 1px 2px rgba(0,0,0,.15); }
.switch.on { background: var(--red); }
.switch.on::after { left: 18px; }

/* ---------------- Materials ---------------- */
.material-summary { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 12px; margin-bottom: 16px; }
.mini-stat { padding: 14px 16px; background: #fff; border: 1px solid rgba(17,24,39,.055); border-radius: 14px; box-shadow: var(--shadow-sm); }
.mini-stat-btn { width: 100%; text-align: left; color: inherit; font: inherit; cursor: pointer; transition: .16s ease; }
.mini-stat-btn:hover { transform: translateY(-2px); border-color: rgba(200,16,46,.14); box-shadow: var(--shadow); }
.mini-stat-btn em { display: inline-flex; align-items: center; gap: 1px; margin-top: 7px; font-size: 9px; font-style: normal; color: var(--red); font-weight: 600; }
.mini-stat-btn.capacity-card { display: flex; }
.mini-stat span { font-size: 10px; color: var(--muted); }
.mini-stat strong { display: block; font-family: var(--num); font-size: 24px; margin-top: 4px; }
.mini-stat small { font-size: 9px; color: var(--muted); margin-left: 4px; }
.material-list { display: flex; flex-direction: column; gap: 10px; }
.material-row { display: grid; grid-template-columns: minmax(190px, 1.2fr) 1.25fr 130px 150px; gap: 18px; align-items: center; padding: 15px 17px; background: #fff; border: 1px solid rgba(17,24,39,.055); border-radius: 15px; transition: .16s; }
.material-row:hover { border-color: #e4dbcd; box-shadow: var(--shadow-sm); }
.mat-customer h3 { font-size: 13px; font-weight: 700; }
.mat-customer p { font-size: 10px; color: var(--muted); margin-top: 3px; }
.mat-customer .tags { display: flex; gap: 5px; margin-top: 7px; flex-wrap: wrap; }
.mat-docs { display: flex; gap: 4px; flex-wrap: wrap; }
.mat-doc { width: 26px; height: 26px; border-radius: 7px; display: grid; place-items: center; background: var(--green-soft); color: var(--green); }
.mat-doc.missing { background: #f8e6e9; color: var(--red); }
.mat-doc.pending { background: var(--gold-soft); color: #9a742f; }
.mat-doc svg { width: 13px; height: 13px; }
.mat-progress { font-size: 10px; color: var(--muted); }
.mat-progress strong { font-family: var(--num); font-size: 18px; color: var(--ink); display: block; }
.mat-progress .progress { margin-top: 5px; }
.mat-actions { display: flex; align-items: center; justify-content: flex-end; gap: 6px; }
.doc-type-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 8px; }
.doc-type-section { grid-column: 1 / -1; font-size: 9px; color: var(--muted); font-weight: 600; letter-spacing: .8px; padding: 4px 1px 0; }
.doc-type { border: 1px solid var(--line); border-radius: 11px; padding: 10px; background: #fcfbf8; cursor: pointer; transition: .15s; display: flex; align-items: center; gap: 8px; }
.doc-type:hover { border-color: #d8cdbb; background: #fff; }
.doc-type.active { border-color: var(--red); background: var(--red-soft); box-shadow: 0 0 0 2px rgba(200,16,46,.06); }
.doc-type .ico { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; background: #fff; color: var(--muted); }
.doc-type.active .ico { background: #fff; color: var(--red); }
.doc-type .ico svg { width: 15px; height: 15px; }
.doc-type strong { display: block; font-size: 10.5px; font-weight: 600; }
.doc-type span { display: block; font-size: 8.5px; color: var(--muted); margin-top: 1px; }
.doc-type-copy { min-width: 0; flex: 1; }
.doc-type-copy strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.doc-type-actions { display: flex; gap: 3px; flex: 0 0 auto; margin-left: auto; }
.doc-type .doc-type-actions { display: flex; margin-top: 0; }
.doc-type-actions button { width: 23px; height: 23px; border-radius: 7px; border: 1px solid #e6ded0; background: #fff; color: #9a9183; display: grid; place-items: center; padding: 0; }
.doc-type-actions button:hover { color: var(--red); border-color: #e9b7bd; background: var(--red-soft); }
.doc-type.active .doc-type-actions button { color: var(--red); border-color: #f0c9ce; }
.upload-zone {
  border: 1.5px dashed #ddd3c2; border-radius: 14px; background: #fcfbf7; min-height: 150px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px;
  text-align: center; padding: 18px; color: var(--muted); cursor: pointer; transition: .18s; position: relative; overflow: hidden;
}
.upload-zone:hover, .upload-zone.drag { border-color: var(--red); background: #fff9f8; }
.upload-zone .up-icon { width: 44px; height: 44px; border-radius: 13px; background: var(--red-soft); color: var(--red); display: grid; place-items: center; }
.upload-zone .up-icon svg { width: 22px; height: 22px; }
.upload-zone strong { color: var(--ink-2); font-size: 12px; font-weight: 600; }
.upload-zone span { font-size: 9.5px; }
.upload-zone .upload-actions { display: flex; gap: 7px; margin-top: 4px; }
.upload-preview { position: relative; width: 100%; max-height: 260px; overflow: hidden; border-radius: 12px; background: #f1ede5; }
.upload-preview img { width: 100%; max-height: 260px; object-fit: contain; }
.upload-preview .remove { position: absolute; top: 7px; right: 7px; width: 27px; height: 27px; border-radius: 50%; background: rgba(11,18,32,.65); color: #fff; display: grid; place-items: center; }
.ocr-panel { margin-top: 12px; border: 1px solid #e9e2d6; border-radius: 12px; padding: 12px; background: #fcfbf8; }
.ocr-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 9px; }
.ocr-head strong { font-size: 11px; display: flex; align-items: center; gap: 5px; }
.ocr-head strong svg { width: 14px; height: 14px; color: var(--red); }
.ocr-status { font-size: 9px; color: var(--muted); }
.ocr-fields { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 7px; }
.ocr-field { background: #fff; border: 1px solid #eee8dd; border-radius: 8px; padding: 7px 8px; }
.ocr-field span { display: block; font-size: 8px; color: var(--muted); }
.ocr-field strong { display: block; font-size: 10px; font-weight: 600; margin-top: 1px; word-break: break-all; }
.ocr-raw { margin-top: 8px; font-size: 9px; color: #8d8578; max-height: 80px; overflow: auto; white-space: pre-wrap; background: #f8f5ef; border-radius: 7px; padding: 7px; }
.ocr-progress { height: 5px; border-radius: 5px; background: #eee8dc; overflow: hidden; margin-top: 7px; }
.ocr-progress i { display: block; height: 100%; width: 0; background: var(--red); transition: width .3s; }
.credit-queue { display: grid; grid-template-columns: 1fr 340px; gap: 18px; align-items: start; }
.queue-card { padding: 18px; }
.queue-item { display: flex; gap: 11px; padding: 12px 0; border-bottom: 1px solid #f3efe8; align-items: flex-start; }
.credit-row { cursor: pointer; border-radius: 9px; padding-left: 7px; padding-right: 7px; margin: 0 -7px; }
.credit-row:hover { background: #fff8f3; }
.credit-row .doc-go { color: #c3bbae; align-self: center; }
.queue-item:last-child { border-bottom: none; }
.queue-item .check { margin-top: 2px; }
.checkbox { width: 17px; height: 17px; border-radius: 5px; border: 1.5px solid #cfc6b7; background: #fff; display: grid; place-items: center; cursor: pointer; flex: 0 0 auto; }
.checkbox.checked { background: var(--red); border-color: var(--red); color: #fff; }
.checkbox svg { width: 11px; height: 11px; }
.queue-info { flex: 1; min-width: 0; }
.queue-info h4 { font-size: 11.5px; font-weight: 600; }
.queue-info p { font-size: 9.5px; color: var(--muted); margin-top: 2px; }
.queue-info .progress { margin-top: 6px; }
.queue-side { position: sticky; top: 90px; }
.basket-total { display: flex; align-items: flex-end; justify-content: space-between; padding: 13px 0; border-bottom: 1px solid #f0ebe2; margin-bottom: 12px; }
.basket-total span { font-size: 10px; color: var(--muted); }
.basket-total strong { font-family: var(--num); font-size: 26px; }
.doc-preview-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px; }
.doc-preview { border: 1px solid #eee8dd; border-radius: 9px; overflow: hidden; background: #faf8f4; cursor: pointer; }
.doc-preview img { width: 100%; height: 84px; object-fit: cover; }
.doc-preview .cap { padding: 5px 6px; font-size: 8.5px; display: flex; align-items: center; justify-content: space-between; gap: 5px; }
.doc-preview .cap b { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.doc-verify-actions { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 12px; padding: 13px; border-radius: 12px; background: #fff8f0; border: 1px solid #f0e1c6; }
.doc-verify-actions strong { display: block; font-size: 12px; }
.doc-verify-actions p { font-size: 9.5px; color: var(--muted); margin-top: 2px; }

/* ---------------- Performance ---------------- */
.perf-hero { display: grid; grid-template-columns: 1.3fr .7fr; gap: 16px; margin-bottom: 16px; }
.perf-main { position: relative; overflow: hidden; background: linear-gradient(125deg, #0b1220, #17243a 55%, #43121c); border-radius: 22px; color: #fff; padding: 24px; min-height: 190px; }
.perf-main::after { content: ""; position: absolute; width: 320px; height: 320px; border: 1px solid rgba(200,161,90,.2); border-radius: 50%; right: -90px; top: -140px; box-shadow: 0 0 0 40px rgba(200,161,90,.03), 0 0 0 80px rgba(200,161,90,.02); }
.perf-main .eyebrow { font-size: 9px; letter-spacing: 3px; color: var(--gold); font-weight: 600; }
.perf-main h2 { font-size: 28px; margin-top: 7px; letter-spacing: -.5px; }
.perf-main p { font-size: 11px; color: #9eabbd; margin-top: 5px; }
.perf-numbers { display: flex; gap: 30px; margin-top: 24px; position: relative; z-index: 1; flex-wrap: wrap; }
.perf-num strong { font-family: var(--num); font-size: 26px; display: block; }
.perf-num span { font-size: 9px; color: #8b98ad; }
.perf-side { background: #fff; border: 1px solid rgba(17,24,39,.055); border-radius: 22px; padding: 22px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; box-shadow: var(--shadow-sm); }
.perf-side h3 { font-size: 12px; color: var(--muted); font-weight: 500; }
.perf-side .champ { display: flex; align-items: center; gap: 10px; }
.perf-side .champ-avatar { width: 62px; height: 72px; }
.champ-avatar .avatar { width: 62px; height: 62px; }
.perf-side .champ-info strong { display: block; font-size: 17px; font-weight: 700; }
.perf-side .champ-info span { font-size: 10px; color: var(--muted); }
.rank-board { display: grid; grid-template-columns: 1.15fr .85fr; gap: 16px; margin-bottom: 16px; }
.rank-list { padding: 19px; }
.rank-row { display: flex; align-items: center; gap: 11px; padding: 10px 0; border-bottom: 1px solid #f3efe8; }
.rank-row:last-child { border-bottom: none; }
.rank-no { width: 22px; font-family: var(--num); font-size: 15px; font-weight: 700; color: #b9b0a2; text-align: center; }
.rank-row:nth-child(1) .rank-no { color: var(--gold); }
.rank-row:nth-child(2) .rank-no { color: #8d98a7; }
.rank-row:nth-child(3) .rank-no { color: #a97a5b; }
.rank-avatar { width: 36px; height: 42px; flex: 0 0 auto; }
.rank-avatar .avatar { width: 36px; height: 36px; }
.rank-name { min-width: 0; width: 96px; }
.rank-name strong { display: block; font-size: 11.5px; font-weight: 600; }
.rank-name span { display: block; font-size: 9px; color: var(--muted); }
.rank-bar { flex: 1; }
.rank-bar .progress { height: 5px; }
.rank-bar .meta { display: flex; justify-content: space-between; font-size: 8.5px; color: var(--muted); margin-bottom: 4px; }
.rank-val { text-align: right; width: 50px; }
.rank-val strong { font-family: var(--num); font-size: 16px; }
.rank-val span { display: block; font-size: 8.5px; color: var(--muted); }
.rank-row.me { background: #fff8ed; margin: 0 -8px; padding-left: 8px; padding-right: 8px; border-radius: 10px; }
.chart-card { padding: 19px; }
.chart-card h3 { font-size: 13px; font-weight: 700; }
.chart-card .chart-sub { font-size: 9.5px; color: var(--muted); margin-top: 2px; margin-bottom: 12px; }
.chart-svg { width: 100%; height: auto; overflow: visible; }
.chart-legend { display: flex; gap: 12px; flex-wrap: wrap; font-size: 9.5px; color: var(--muted); margin-top: 8px; }
.chart-legend i { width: 7px; height: 7px; border-radius: 2px; display: inline-block; margin-right: 4px; }
.donut-wrap { display: flex; align-items: center; gap: 18px; }
.donut-wrap svg { width: 140px; height: 140px; flex: 0 0 auto; }
.donut-center { position: absolute; text-align: center; }
.donut-center strong { display: block; font-family: var(--num); font-size: 22px; }
.donut-center span { font-size: 8.5px; color: var(--muted); }
.donut-box { position: relative; display: grid; place-items: center; }
.donut-legend { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.donut-legend-item { display: flex; align-items: center; justify-content: space-between; font-size: 9.5px; color: var(--muted); }
.donut-legend-item span { display: flex; align-items: center; gap: 6px; }
.donut-legend-item i { width: 7px; height: 7px; border-radius: 2px; }
.donut-legend-item b { color: var(--ink-2); font-family: var(--num); font-size: 11px; }
.badge-row { display: flex; gap: 7px; flex-wrap: wrap; }
.medal { display: inline-flex; align-items: center; gap: 5px; padding: 6px 9px; border-radius: 8px; background: #fff8e8; border: 1px solid #f1e3c4; font-size: 9.5px; color: #8a682b; }
.medal svg { width: 13px; height: 13px; color: var(--gold); }
.personal-card { padding: 18px; display: flex; gap: 16px; align-items: center; margin-top: 16px; background: linear-gradient(100deg, #fffaf1, #fff); border: 1px solid #efe4cf; border-radius: 17px; }
.personal-card .avatar-xl { width: 70px; height: 82px; background: transparent; }
.personal-card .avatar-xl .avatar { width: 70px; height: 70px; }
.personal-info { flex: 1; }
.personal-info h3 { font-size: 16px; font-weight: 700; }
.personal-info p { font-size: 10px; color: var(--muted); margin-top: 2px; }
.personal-metrics { display: flex; gap: 20px; margin-top: 10px; flex-wrap: wrap; }
.personal-metrics div strong { font-family: var(--num); font-size: 18px; display: block; }
.personal-metrics div span { font-size: 8.5px; color: var(--muted); }

/* ---------------- Inventory ---------------- */
.inv-summary { display: grid; grid-template-columns: 1.1fr .9fr .9fr .9fr; gap: 12px; margin-bottom: 16px; }
.capacity-card { padding: 15px 17px; display: flex; align-items: center; gap: 16px; }
.capacity-card { width: 100%; text-align: left; background: #fff; border: 1px solid rgba(17,24,39,.055); border-radius: 17px; box-shadow: var(--shadow-sm); color: inherit; font: inherit; cursor: pointer; }
.capacity-card .gauge { position: relative; width: 76px; height: 76px; }
.capacity-card .gauge .ring-label strong { font-size: 19px; }
.capacity-copy strong { display: block; font-family: var(--num); font-size: 24px; }
.capacity-copy span { font-size: 9.5px; color: var(--muted); }
.kanban { display: grid; grid-template-columns: repeat(5, minmax(180px,1fr)); gap: 10px; overflow-x: auto; padding-bottom: 4px; }
.kanban-col { background: #f8f5ef; border: 1px solid #eee8dd; border-radius: 14px; padding: 10px; min-width: 180px; }
.kanban-head { display: flex; align-items: center; justify-content: space-between; padding: 2px 3px 9px; }
.kanban-head strong { font-size: 11px; font-weight: 600; }
.kanban-head span { font-family: var(--num); font-size: 10px; color: var(--muted); background: #fff; border-radius: 5px; padding: 1px 6px; }
.kanban-card { background: #fff; border: 1px solid #eee7db; border-radius: 10px; padding: 10px; margin-bottom: 7px; box-shadow: 0 1px 2px rgba(0,0,0,.02); }
.kanban-card h4 { font-size: 10.5px; font-weight: 600; }
.kanban-card p { font-size: 8.5px; color: var(--muted); margin-top: 2px; }
.kanban-card .progress { margin-top: 7px; height: 4px; }
.kanban-card .foot { display: flex; justify-content: space-between; gap: 6px; margin-top: 6px; font-size: 8px; color: var(--muted); }
.stock-table { width: 100%; border-collapse: collapse; font-size: 11px; }
.stock-table th { text-align: left; font-size: 9.5px; color: var(--muted); font-weight: 500; padding: 9px 10px; border-bottom: 1px solid #eee8dd; white-space: nowrap; }
.stock-table td { padding: 10px; border-bottom: 1px solid #f4f0e9; white-space: nowrap; }
.stock-table tr:last-child td { border-bottom: none; }
.stock-table tbody tr:hover { background: #fcfaf6; }
.vehicle-row { cursor: pointer; }
.vehicle-row:hover { background: #fffaf6 !important; }
.stock-model { font-weight: 600; }
.stock-age { font-family: var(--num); }
.stock-age.warn { color: var(--amber); font-weight: 700; }
.stock-age.bad { color: var(--red); font-weight: 700; }
.table-wrap { overflow-x: auto; border: 1px solid #eee8dd; border-radius: 14px; background: #fff; }
.stock-toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.vehicle-detail-hero { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 15px; border-radius: 13px; background: linear-gradient(110deg, #fff8ee, #fff); border: 1px solid #efe3cf; }
.vehicle-detail-hero > div { display: flex; gap: 5px; flex-wrap: wrap; }
.vehicle-detail-hero > strong { font-family: var(--num); font-size: 25px; color: var(--red); }

/* ---------------- Reports ---------------- */
.report-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; align-items: start; }
.report-paper { background: #fff; border: 1px solid #e9e2d6; border-radius: 20px; overflow: hidden; box-shadow: var(--shadow); }
.report-cover { position: relative; background: linear-gradient(125deg, #0b1220, #16243a 58%, #43121c); color: #fff; padding: 28px 30px; overflow: hidden; }
.report-cover::after { content: ""; position: absolute; right: -90px; top: -150px; width: 360px; height: 360px; border: 1px solid rgba(200,161,90,.25); border-radius: 50%; box-shadow: 0 0 0 45px rgba(200,161,90,.03), 0 0 0 90px rgba(200,161,90,.02); }
.report-cover .r-kicker { font-size: 9px; letter-spacing: 3px; color: var(--gold); }
.report-cover h2 { font-size: 26px; margin-top: 10px; letter-spacing: .3px; }
.report-cover p { font-size: 10px; color: #98a5b9; margin-top: 5px; }
.report-cover .r-stats { display: flex; gap: 26px; margin-top: 23px; flex-wrap: wrap; position: relative; z-index: 1; }
.report-cover .r-stat strong { font-family: var(--num); font-size: 25px; display: block; }
.report-cover .r-stat span { font-size: 8.5px; color: #8a97ab; }
.report-body { padding: 24px 28px 28px; }
.report-section { margin-bottom: 22px; }
.report-section:last-child { margin-bottom: 0; }
.report-section h3 { font-size: 13px; font-weight: 700; display: flex; align-items: center; gap: 7px; margin-bottom: 10px; }
.report-section h3::before { content: ""; width: 3px; height: 13px; border-radius: 2px; background: var(--red); }
.report-kpis { display: grid; grid-template-columns: repeat(4,1fr); gap: 8px; }
.report-kpi { background: #faf8f4; border: 1px solid #f0ebe2; border-radius: 10px; padding: 10px 11px; }
.report-kpi span { font-size: 8.5px; color: var(--muted); }
.report-kpi strong { display: block; font-family: var(--num); font-size: 18px; margin-top: 3px; }
.insight-list { display: flex; flex-direction: column; gap: 7px; }
.insight { display: flex; gap: 9px; padding: 9px 10px; border-radius: 9px; background: #fbfaf7; border: 1px solid #f1ece3; }
.insight .tag { flex: 0 0 auto; height: 18px; }
.insight p { font-size: 9.5px; color: #5c564c; line-height: 1.55; }
.insight p b { display: block; font-size: 10px; color: var(--ink-2); font-weight: 600; margin-bottom: 1px; }
.report-actions-card { position: sticky; top: 90px; }
.report-actions-card .btn { width: 100%; margin-bottom: 7px; }
.archive-list { display: flex; flex-direction: column; gap: 6px; max-height: 600px; overflow: auto; }
.archive-item { padding: 10px; border: 1px solid #f0ebe2; border-radius: 10px; cursor: pointer; background: #fcfbf8; transition: .15s; }
.archive-item:hover { background: #fff; border-color: #e1d7c7; }
.archive-item.active { background: var(--red-soft); border-color: rgba(200,16,46,.2); }
.archive-item strong { display: block; font-size: 10.5px; font-weight: 600; }
.archive-item span { display: block; font-size: 8.5px; color: var(--muted); margin-top: 2px; }
.report-tabs { display: flex; gap: 4px; background: #fff; border: 1px solid var(--line); padding: 3px; border-radius: 10px; }
.report-tabs button { padding: 6px 11px; border-radius: 7px; font-size: 10.5px; color: var(--muted); }
.report-tabs button.active { background: var(--navy); color: #fff; }
.presentation { position: fixed; inset: 0; z-index: 120; background: #070c15; display: flex; flex-direction: column; }
.pres-top { height: 60px; display: flex; align-items: center; justify-content: space-between; padding: 0 20px; color: #8e9bb0; font-size: 11px; border-bottom: 1px solid rgba(255,255,255,.08); }
.pres-stage { flex: 1; display: grid; place-items: center; padding: 20px 60px; }
.pres-slide { width: min(1100px, 92vw); aspect-ratio: 16/9; background: #fff; border-radius: 6px; box-shadow: 0 30px 100px rgba(0,0,0,.5); overflow: hidden; position: relative; }
.pres-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 42px; height: 42px; border-radius: 50%; background: rgba(255,255,255,.09); color: #fff; display: grid; place-items: center; }
.pres-nav.prev { left: 12px; } .pres-nav.next { right: 12px; }
.pres-bottom { height: 58px; display: flex; align-items: center; justify-content: center; gap: 10px; color: #8e9bb0; font-size: 10px; }
.pres-dot { width: 6px; height: 6px; border-radius: 50%; background: #374151; }
.pres-dot.active { background: var(--gold); width: 18px; border-radius: 3px; }
.slide-inner { padding: 7% 8%; height: 100%; display: flex; flex-direction: column; position: relative; overflow: hidden; }
.slide-inner.dark { background: #0b1220; color: #fff; }
.slide-kicker { font-size: 23px; font-size: 9px; letter-spacing: 3px; color: var(--red); font-weight: 700; }
.slide-inner.dark .slide-kicker { color: var(--gold); }
.slide-title { font-size: clamp(20px, 3.2vw, 38px); font-weight: 700; margin-top: 6px; letter-spacing: -.5px; }
.slide-sub { font-size: 14px; color: var(--muted); margin-top: 4px; }
.slide-metrics { display: grid; grid-template-columns: repeat(4,1fr); gap: 12px; margin-top: 6%; }
.slide-metric { background: #f8f5ef; border: 1px solid #ece5d8; border-radius: 8px; padding: 4%; }
.slide-metric span { font-size: 12px; color: var(--muted); }
.slide-metric strong { display: block; font-family: var(--num); font-size: clamp(20px,2.6vw,34px); margin-top: 3px; }
.slide-columns { display: grid; grid-template-columns: repeat(3,1fr); gap: 14px; margin-top: 6%; }
.slide-col { background: #151f32; border: 1px solid #263247; border-radius: 10px; padding: 5%; }
.slide-col h4 { font-size: 14px; color: var(--gold); margin-bottom: 8px; }
.slide-col p { font-size: 14px; color: #c7ceda; line-height: 1.8; }
.slide-foot { margin-top: auto; display: flex; justify-content: space-between; font-size: 9px; color: var(--muted); border-top: 1px solid #eee7db; padding-top: 2%; }
.slide-inner.dark .slide-foot { border-color: #263247; color: #6b778c; }
.slide-cover-number { position: absolute; right: 6.5%; top: 31%; text-align: right; z-index: 1; }
.slide-cover-number strong { display: block; font-family: var(--num); font-size: clamp(64px, 9vw, 118px); line-height: .9; font-weight: 700; color: #fff; letter-spacing: -3px; }
.slide-cover-number span { display: block; margin-top: 12px; font-size: 11px; color: #98a5b9; letter-spacing: 2px; }
.slide-cover-ring { position: absolute; right: -9%; top: -28%; width: 48%; height: 84%; border: 1px solid rgba(212,163,83,.22); border-radius: 50%; box-shadow: 0 0 0 48px rgba(212,163,83,.035), 0 0 0 96px rgba(212,163,83,.02); }

/* ---------------- Team / Profile ---------------- */
.team-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
.user-card { padding: 15px; display: flex; gap: 12px; align-items: center; background: #fff; border: 1px solid rgba(17,24,39,.055); border-radius: 15px; box-shadow: var(--shadow-sm); }
.user-card .avatar { width: 48px; height: 56px; border-radius: 12px; background: #f7f3eb; }
.user-card-copy { min-width: 0; flex: 1; }
.user-card-copy h3 { font-size: 12.5px; font-weight: 700; display: flex; align-items: center; gap: 5px; }
.user-card-copy p { font-size: 9.5px; color: var(--muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-card-copy .meta { display: flex; gap: 5px; align-items: center; margin-top: 5px; }
.user-card .more { align-self: flex-start; color: #b9b0a2; }
.target-list { display: flex; flex-direction: column; gap: 8px; }
.target-row { display: grid; grid-template-columns: minmax(190px, .9fr) 1.55fr 150px 180px; gap: 18px; align-items: center; padding: 13px 14px; border-radius: 13px; background: #fbfaf7; border: 1px solid #f1ece3; }
.target-person { display: flex; align-items: center; gap: 10px; min-width: 0; }
.target-person .avatar { width: 38px; height: 42px; }
.target-person strong { display: block; font-size: 12px; }
.target-person span { display: block; font-size: 9px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 150px; }
.target-numbers { display: flex; gap: 18px; flex-wrap: wrap; }
.target-numbers div span { display: block; font-size: 8.5px; color: var(--muted); }
.target-numbers div b { display: block; font-size: 11px; font-family: var(--num); margin-top: 1px; }
.target-input-wrap label { display: block; font-size: 8.5px; color: var(--muted); margin-bottom: 3px; }
.target-input { display: flex; align-items: center; gap: 5px; }
.target-input .input { height: 34px; font-family: var(--num); font-size: 15px; font-weight: 600; }
.target-input span { font-size: 9px; color: var(--muted); }
.target-progress .progress { height: 5px; }
.target-progress > span { display: block; font-size: 8.5px; color: var(--muted); margin-top: 4px; }
.perm-table { width: 100%; border-collapse: collapse; font-size: 10px; }
.perm-table th, .perm-table td { padding: 9px; border-bottom: 1px solid #f1ece3; text-align: center; }
.perm-table th:first-child, .perm-table td:first-child { text-align: left; }
.perm-table th { color: var(--muted); font-weight: 500; font-size: 9px; }
.perm-table .yes { color: var(--green); }
.perm-table .no { color: #c8c0b3; }
.profile-layout { display: grid; grid-template-columns: 360px 1fr; gap: 16px; align-items: start; }
.profile-preview { padding: 22px; text-align: center; background: linear-gradient(160deg, #fffaf1, #fff); border: 1px solid #eee4d2; border-radius: 20px; }
.profile-preview .big-avatar { width: 130px; height: 155px; margin: 0 auto 12px; }
.profile-preview h2 { font-size: 18px; font-weight: 700; }
.profile-preview p { font-size: 10px; color: var(--muted); margin-top: 3px; }
.profile-preview .badges { display: flex; justify-content: center; gap: 5px; margin-top: 10px; flex-wrap: wrap; }
.profile-preview-body { min-width: 0; flex: 1; }
.avatar-upload-panel { display: flex; align-items: center; gap: 18px; padding: 16px; border-radius: 15px; background: #faf8f4; border: 1px solid #efe8dd; }
.avatar-upload-preview { width: 92px; height: 92px; border-radius: 24px; overflow: hidden; background: #fff; box-shadow: var(--shadow-sm); flex: 0 0 auto; display: grid; place-items: center; }
.avatar-upload-preview .avatar { width: 86px; height: 86px; }
.avatar-upload-preview img { width: 100%; height: 100%; object-fit: cover; }
.avatar-upload-copy { flex: 1; }
.avatar-upload-copy strong { display: block; font-size: 13px; }
.avatar-upload-copy p { font-size: 10px; color: var(--muted); line-height: 1.6; margin-top: 3px; }
.avatar-options { display: grid; grid-template-columns: repeat(2,1fr); gap: 12px; }
.avatar-option-group h4 { font-size: 9.5px; color: var(--muted); letter-spacing: .8px; margin-bottom: 6px; font-weight: 600; }
.swatches { display: flex; gap: 6px; flex-wrap: wrap; }
.swatch { width: 26px; height: 26px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px #e3dbcd; cursor: pointer; }
.swatch.active { box-shadow: 0 0 0 2px var(--red); }
.mini-options { display: flex; gap: 5px; flex-wrap: wrap; }
.mini-option { padding: 5px 8px; border-radius: 7px; border: 1px solid #e8e1d5; background: #fcfbf8; font-size: 9px; cursor: pointer; }
.mini-option.active { border-color: var(--red); background: var(--red-soft); color: var(--red); }
.photo-upload { display: flex; align-items: center; gap: 10px; padding: 10px; background: #faf8f4; border: 1px solid #efe9df; border-radius: 11px; margin-top: 12px; }
.photo-upload .avatar { width: 42px; height: 42px; }
.photo-upload p { flex: 1; font-size: 9px; color: var(--muted); line-height: 1.5; }
.settings-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid #f2ede5; }
.settings-row:last-child { border-bottom: none; }
.settings-row strong { font-size: 11.5px; font-weight: 600; display: block; }
.settings-row span { font-size: 9.5px; color: var(--muted); display: block; margin-top: 1px; }
.audit-list { display: flex; flex-direction: column; gap: 5px; max-height: 300px; overflow: auto; }
.audit-item { display: flex; align-items: center; gap: 8px; font-size: 9px; color: var(--muted); padding: 7px 0; border-bottom: 1px solid #f4f0e9; }
.audit-item strong { color: var(--ink-2); font-weight: 600; white-space: nowrap; }
.audit-item span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.audit-item time { white-space: nowrap; color: #b1a99d; }

/* ---------------- Modal / Toast ---------------- */
.modal-backdrop { position: fixed; inset: 0; z-index: 100; background: rgba(11,18,32,.52); backdrop-filter: blur(5px); display: flex; align-items: center; justify-content: center; padding: 20px; animation: fadeIn .18s ease; }
@keyframes fadeIn { from { opacity: 0; } }
.modal { width: min(640px, 100%); max-height: 90vh; background: #fff; border-radius: 20px; box-shadow: var(--shadow-lg); display: flex; flex-direction: column; overflow: hidden; animation: modalIn .25s cubic-bezier(.2,.8,.2,1); }
.modal.wide { width: min(1000px, 100%); }
.modal.medium { width: min(820px, 100%); }
@keyframes modalIn { from { opacity: 0; transform: translateY(18px) scale(.985); } }
.modal-head { padding: 18px 22px 14px; border-bottom: 1px solid #f1ece3; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex: 0 0 auto; }
.modal-head h2 { font-size: 17px; font-weight: 700; }
.modal-head p { font-size: 10px; color: var(--muted); margin-top: 3px; }
.modal-close { width: 31px; height: 31px; border-radius: 9px; display: grid; place-items: center; color: var(--muted); background: #f7f4ee; flex: 0 0 auto; }
.modal-close:hover { background: #efe9df; color: var(--ink); }
.modal-body { padding: 18px 22px; overflow: auto; }
.modal-foot { padding: 13px 22px; border-top: 1px solid #f1ece3; display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; flex: 0 0 auto; background: #fdfcf9; }
.toast-root { position: fixed; z-index: 200; top: 18px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 7px; align-items: center; pointer-events: none; }
.toast { background: #111827; color: #fff; padding: 10px 15px; border-radius: 10px; font-size: 11.5px; box-shadow: 0 12px 30px rgba(0,0,0,.2); display: flex; align-items: center; gap: 8px; animation: toastIn .25s ease; max-width: 90vw; }
.toast.success { background: #0f5132; }
.toast.error { background: #7f1d1d; }
.toast.info { background: #1e3a5f; }
.toast svg { width: 15px; height: 15px; flex: 0 0 auto; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-8px); } }

/* Good news overlay */
.goodnews { position: fixed; inset: 0; z-index: 150; display: flex; align-items: center; justify-content: center; padding: 20px; background: radial-gradient(900px 600px at 50% 20%, rgba(200,16,46,.4), transparent 65%), rgba(7,12,21,.88); backdrop-filter: blur(8px); animation: fadeIn .25s; }
.gn-card { width: min(520px, 100%); background: linear-gradient(160deg, #fffdf9, #fff5e7); border-radius: 24px; overflow: hidden; box-shadow: 0 40px 120px rgba(0,0,0,.5); position: relative; animation: gnIn .5s cubic-bezier(.2,.8,.2,1); }
@keyframes gnIn { from { opacity: 0; transform: translateY(30px) scale(.94); } }
.gn-top { background: linear-gradient(125deg, #b5121b, #7f0c19); padding: 28px 26px 22px; color: #fff; position: relative; overflow: hidden; text-align: center; }
.gn-top::before, .gn-top::after { content: ""; position: absolute; width: 220px; height: 220px; border: 1px solid rgba(255,255,255,.12); border-radius: 50%; }
.gn-top::before { left: -100px; top: -110px; box-shadow: 0 0 0 28px rgba(255,255,255,.025); }
.gn-top::after { right: -80px; bottom: -130px; box-shadow: 0 0 0 34px rgba(255,255,255,.025); }
.gn-close { position: absolute; right: 12px; top: 12px; width: 30px; height: 30px; border-radius: 50%; background: rgba(255,255,255,.12); color: #fff; display: grid; place-items: center; z-index: 2; }
.gn-eyebrow { font-size: 9px; letter-spacing: 4px; color: #f0cf8e; font-weight: 700; position: relative; z-index: 1; }
.gn-title { font-size: 48px; font-weight: 800; letter-spacing: 8px; margin: 4px 0 2px; position: relative; z-index: 1; text-shadow: 0 4px 20px rgba(0,0,0,.2); }
.gn-sub { font-size: 11px; color: #f7d9b1; position: relative; z-index: 1; }
.gn-body { padding: 22px 26px 24px; }
.gn-person { display: flex; align-items: center; gap: 14px; }
.gn-avatar { width: 64px; height: 76px; flex: 0 0 auto; }
.gn-avatar .avatar { width: 64px; height: 64px; }
.gn-copy strong { font-size: 17px; font-weight: 700; display: block; }
.gn-copy p { font-size: 11px; color: var(--muted); margin-top: 2px; }
.gn-order { background: #fff; border: 1px solid #f0e4cf; border-radius: 13px; padding: 13px; margin-top: 14px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.gn-order span { font-size: 9.5px; color: var(--muted); }
.gn-order strong { display: block; font-size: 12.5px; margin-top: 2px; }
.gn-order .amt { font-family: var(--num); font-size: 19px; color: var(--red); text-align: right; }
.gn-actions { display: flex; gap: 8px; margin-top: 16px; }
.gn-actions .btn { flex: 1; }
.gn-note { text-align: center; font-size: 9px; color: #a49a8a; margin-top: 10px; }
.confetti-root { position: fixed; inset: 0; z-index: 160; pointer-events: none; overflow: hidden; }
.confetti-piece { position: absolute; width: 7px; height: 12px; border-radius: 2px; animation: confettiFall linear forwards; }
@keyframes confettiFall { 0% { transform: translateY(-20px) rotate(0deg); opacity: 1; } 100% { transform: translateY(105vh) rotate(720deg); opacity: 0; } }

/* Notification drawer */
.drawer-backdrop { position: fixed; inset: 0; z-index: 95; background: rgba(11,18,32,.35); backdrop-filter: blur(2px); animation: fadeIn .16s; }
.drawer { position: fixed; z-index: 96; top: 0; right: 0; bottom: 0; width: min(380px, 92vw); background: #fff; box-shadow: -20px 0 60px rgba(0,0,0,.18); display: flex; flex-direction: column; animation: drawerIn .22s ease; }
@keyframes drawerIn { from { transform: translateX(100%); } }
.drawer-head { padding: 18px 18px 13px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #f1ece3; }
.drawer-head h2 { font-size: 15px; font-weight: 700; }
.drawer-body { flex: 1; overflow: auto; padding: 8px 14px; }
.notice-item { display: flex; gap: 9px; padding: 11px 5px; border-bottom: 1px solid #f4f0e9; }
.notice-item.unread { background: #fffaf5; margin: 0 -8px; padding-left: 13px; padding-right: 13px; border-radius: 8px; }
.notice-icon { width: 29px; height: 29px; border-radius: 9px; background: var(--red-soft); color: var(--red); display: grid; place-items: center; flex: 0 0 auto; }
.notice-icon svg { width: 14px; height: 14px; }
.notice-copy { flex: 1; min-width: 0; }
.notice-copy strong { display: block; font-size: 10.5px; font-weight: 600; }
.notice-copy p { font-size: 9.5px; color: var(--muted); line-height: 1.5; margin-top: 1px; }
.notice-copy time { display: block; font-size: 8px; color: #b4aca0; margin-top: 3px; }

/* ---------------- Mobile ---------------- */
@media (max-width: 1180px) {
  .order-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .team-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .material-row { grid-template-columns: 1.1fr 1.2fr 120px; }
  .material-row .mat-actions { grid-column: 1 / -1; justify-content: flex-end; }
  .credit-queue { grid-template-columns: 1fr; }
  .queue-side { position: static; }
}
@media (max-width: 1020px) {
  .sidebar { transform: translateX(-100%); transition: transform .25s ease; box-shadow: 0 0 60px rgba(0,0,0,.3); }
  .sidebar.open { transform: translateX(0); }
  .sidebar-overlay { position: fixed; inset: 0; z-index: 39; background: rgba(11,18,32,.45); animation: fadeIn .2s; }
  .main { margin-left: 0; }
  .topbar { padding: 0 18px; height: 64px; }
  .page-wrap { padding: 20px 18px 86px; }
  .bottom-nav {
    display: flex; position: fixed; z-index: 50; left: 0; right: 0; bottom: 0;
    height: calc(62px + var(--safe-b)); padding: 6px 6px var(--safe-b);
    background: rgba(255,255,255,.92); backdrop-filter: blur(18px); border-top: 1px solid rgba(17,24,39,.07);
  }
  .bottom-item { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: #9b9387; font-size: 9px; border-radius: 11px; position: relative; }
  .bottom-item svg { width: 20px; height: 20px; }
  .bottom-item.active { color: var(--red); font-weight: 600; }
  .bottom-item.active::before { content: ""; position: absolute; top: -6px; width: 18px; height: 2px; border-radius: 2px; background: var(--red); }
  .topbar-date { display: none; }
  .mobile-brand { display: flex; align-items: center; gap: 8px; }
  .brand-logo-mobile { width: 36px; height: 30px; border-radius: 8px; padding: 3px 5px; box-shadow: none; }
  .brand-logo-mobile img { width: 100%; height: 100%; object-fit: contain; }
  .mobile-brand strong { white-space: nowrap; font-size: 13px; }
  .mobile-brand .brand-mark { width: 33px; height: 33px; border-radius: 10px; font-size: 17px; }
  .mobile-brand strong { font-size: 14px; letter-spacing: 1.5px; }
  .topbar-title h1 { font-size: 16px; }
  .topbar-title span { display: none; }
  .topbar .btn { display: none; }
  .mobile-only { display: grid; }
  .home-top { align-items: flex-start; }
  .home-greet h1 { font-size: 22px; }
  .hero { min-height: 200px; padding: 22px; }
  .hero-side { display: none; }
  .kpi-grid { grid-template-columns: repeat(2,1fr); }
  .home-grid { grid-template-columns: 1fr; }
  .perf-hero { grid-template-columns: 1fr; }
  .perf-side { flex-direction: row; justify-content: flex-start; }
  .rank-board { grid-template-columns: 1fr; }
  .report-layout { grid-template-columns: 1fr; }
  .report-actions-card { position: static; }
  .inv-summary { grid-template-columns: repeat(2,1fr); }
  .profile-layout { grid-template-columns: 1fr; }
  .profile-preview { display: flex; align-items: center; gap: 16px; text-align: left; }
  .profile-preview-body { text-align: left; }
  .profile-preview .big-avatar { width: 80px; height: 96px; margin: 0; }
  .profile-preview .badges { justify-content: flex-start; }
}
@media (max-width: 760px) {
  .login-page { grid-template-columns: 1fr; background: var(--bg); }
  .login-left { display: none; }
  .login-right { padding: 22px 18px 30px; min-height: 100vh; align-items: flex-start; background: radial-gradient(600px 400px at 50% 0%, #fff8ef, transparent 70%), var(--bg); }
  .login-card { margin-top: 10vh; padding: 26px 22px; border-radius: 22px; box-shadow: 0 20px 60px rgba(11,18,32,.1); }
  .login-mobile-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 26px; }
  .login-card-logo { display: none; }
  .login-mobile-brand .brand-logo-tile { width: 74px; height: 48px; }
  .login-mobile-brand .brand-mark { width: 42px; height: 42px; font-size: 22px; }
  .login-mobile-brand strong { font-size: 16px; letter-spacing: 2px; display: block; }
  .login-mobile-brand span { font-size: 8.5px; color: var(--muted); letter-spacing: 2px; display: block; }
  .page-head { align-items: flex-start; }
  .page-head h1 { font-size: 21px; }
  .page-head-actions { width: 100%; }
  .page-head-actions .btn { flex: 1; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .order-grid { grid-template-columns: 1fr; }
  .kpi-grid { gap: 9px; }
  .kpi { padding: 13px 14px; border-radius: 15px; }
  .kpi-value { font-size: 25px; }
  .kpi-label { font-size: 10px; }
  .hero { border-radius: 20px; padding: 20px; min-height: auto; }
  .hero-title { font-size: 24px; }
  .hero-sub { font-size: 11px; }
  .hero-meta { gap: 17px; margin-top: 16px; }
  .hero-meta-item strong { font-size: 17px; }
  .hero-actions { margin-top: 16px; }
  .hero-actions .btn { flex: 1; font-size: 11.5px; height: 36px; }
  .home-top { margin-bottom: 14px; }
  .today-chip { display: none; }
  .insight-strip { padding: 11px 12px; }
  .race-card, .todo-card, .news-card { padding: 15px; border-radius: 16px; }
  .race-track { margin-top: 14px; }
  .race-lane { height: 54px; }
  .lane-label { width: 64px; }
  .lane-line { left: 70px; }
  .racer { width: 38px; height: 48px; }
  .quick-grid { padding: 15px; gap: 7px; }
  .material-summary { grid-template-columns: repeat(2,1fr); gap: 8px; }
  .mini-stat { padding: 12px; }
  .material-row { grid-template-columns: 1fr; gap: 10px; padding: 14px; }
  .material-row .mat-actions { grid-column: auto; justify-content: flex-start; }
  .mat-docs { order: 2; }
  .mat-progress { display: flex; align-items: center; gap: 12px; }
  .mat-progress strong { font-size: 16px; }
  .mat-progress .progress { flex: 1; margin-top: 0; }
  .doc-type-grid { grid-template-columns: repeat(2,1fr); }
  .form-grid { grid-template-columns: 1fr; }
  .doc-check-list { grid-template-columns: 1fr; }
  .report-kpis { grid-template-columns: repeat(2,1fr); }
  .report-body { padding: 18px; }
  .report-cover { padding: 22px; }
  .report-cover h2 { font-size: 21px; }
  .report-cover .r-stats { gap: 18px; }
  .report-cover .r-stat strong { font-size: 20px; }
  .report-section h3 { font-size: 12px; }
  .team-grid { grid-template-columns: 1fr; }
  .target-row { grid-template-columns: 1fr; gap: 10px; }
  .target-numbers { gap: 14px; }
  .avatar-upload-panel { flex-direction: column; align-items: flex-start; }
  .avatar-upload-copy { width: 100%; }
  .modal-backdrop { padding: 0; align-items: flex-end; }
  .modal { width: 100%; max-height: 92vh; border-radius: 20px 20px 0 0; animation: sheetIn .26s cubic-bezier(.2,.8,.2,1); }
  @keyframes sheetIn { from { transform: translateY(100%); } }
  .modal-head { padding: 16px 18px 12px; }
  .modal-body { padding: 15px 18px; }
  .modal-foot { padding: 11px 18px calc(11px + var(--safe-b)); }
  .toast-root { top: auto; bottom: calc(78px + var(--safe-b)); }
  .modal-body .form-grid { grid-template-columns: 1fr; }
  .occlusion { }
  .gn-title { font-size: 42px; }
  .perf-main { padding: 20px; border-radius: 20px; }
  .perf-main h2 { font-size: 24px; }
  .perf-numbers { gap: 18px; margin-top: 18px; }
  .perf-num strong { font-size: 21px; }
  .rank-list, .chart-card { padding: 15px; }
  .rank-name { width: 80px; }
  .personal-card { padding: 15px; }
  .personal-card .avatar-xl { width: 56px; height: 66px; }
  .kanban { grid-template-columns: repeat(5, 168px); }
  .stock-table { font-size: 10px; }
  .inv-summary { grid-template-columns: repeat(2,1fr); gap: 8px; }
  .capacity-card { grid-column: 1 / -1; }
  .pres-stage { padding: 10px 15px; }
  .pres-nav { display: none; }
  .pres-top { height: 52px; }
  .pres-slide { width: 96vw; }
  .slide-columns { grid-template-columns: 1fr; }
  .slide-metrics { grid-template-columns: repeat(2,1fr); }
  .slide-inner { padding: 8% 7%; }
  .slide-col:nth-child(3) { display: none; }
  .drawer { width: 100%; }
  .login-card .login-desc { margin-bottom: 20px; }
  .avatar-options { grid-template-columns: 1fr; }
  .profile-preview { padding: 16px; }
  .page-wrap { padding-bottom: 90px; }
}
@media (max-width: 430px) {
  .mobile-brand strong { display: none; }
  .topbar-title h1 { font-size: 15px; }
}
@media (max-width: 390px) {
  .kpi-value { font-size: 22px; }
  .hero-title { font-size: 21px; }
  .hero-meta { gap: 12px; }
  .hero-meta-item strong { font-size: 15px; }
  .seg button { padding: 4px 7px; font-size: 9.5px; }
  .gn-title { font-size: 36px; }
}
