/* ===== Base Reset ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: #f1f5f9;
  color: #1e293b;
  -webkit-font-smoothing: antialiased;
}

/* ===== CSS Variables ===== */
:root {
  --sidebar-width: 240px;
  --sidebar-collapsed: 64px;
  --header-height: 60px;
  --primary: #4f46e5;
  --primary-light: #6366f1;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --info: #3b82f6;
  --bg: #f1f5f9;
  --card-bg: #ffffff;
  --text: #1e293b;
  --text-muted: #64748b;
  --border: #e2e8f0;
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* ===== Animations ===== */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes slideInLeft {
  from { transform: translateX(-100%); }
  to { transform: translateX(0); }
}
@keyframes slideInRight {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

.fade-in { animation: fadeIn 0.3s ease-out; }
.slide-in-right { animation: slideInRight 0.3s ease-out; }

/* ===== Login Page ===== */
.login-bg {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.login-bg::before {
  content: '';
  position: absolute;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: rgba(255,255,255,0.05);
  top: -200px;
  right: -150px;
}
.login-bg::after {
  content: '';
  position: absolute;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: rgba(255,255,255,0.05);
  bottom: -150px;
  left: -100px;
}
.login-card {
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(20px);
  border-radius: 16px;
  box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25);
  z-index: 10;
}

/* ===== Sidebar ===== */
.sidebar {
  width: var(--sidebar-width);
  background: #1e293b;
  color: #cbd5e1;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 50;
  transition: width 0.3s ease, transform 0.3s ease;
  overflow-y: auto;
  overflow-x: hidden;
}
.sidebar.collapsed {
  width: var(--sidebar-collapsed);
}
.sidebar.collapsed .nav-text,
.sidebar.collapsed .sidebar-brand-text,
.sidebar.collapsed .nav-badge {
  display: none;
}
.sidebar.collapsed .nav-item {
  justify-content: center;
  padding-left: 0;
  padding-right: 0;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 20px;
  color: #94a3b8;
  text-decoration: none;
  transition: all 0.2s;
  border-left: 3px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  width: 100%;
  border-top: 0;
  border-right: 0;
  border-bottom: 0;
  background: transparent;
  font: inherit;
  text-align: left;
}

/* ===== Taste preview: restrained enterprise theme ===== */
:root {
  --primary: #203754;
  --primary-light: #315578;
  --bg: #f3f6f9;
  --card-bg: #ffffff;
  --text: #182536;
  --text-muted: #718096;
  --border: #dce4ec;
  --brand-gold: #4f6f91;
}

html, body {
  background:
    radial-gradient(circle at 82% 2%, rgba(71, 102, 137, 0.055), transparent 24rem),
    #f3f6f9;
  color: var(--text);
}

.login-bg {
  background:
    radial-gradient(circle at 72% 18%, rgba(92, 133, 173, 0.20), transparent 28rem),
    linear-gradient(145deg, #142439 0%, #203754 58%, #29445f 100%);
}

.sidebar {
  background: linear-gradient(180deg, #111f32 0%, #17283d 100%);
  color: #c9d1da;
  box-shadow: 14px 0 36px rgba(21, 37, 57, 0.09);
}

.nav-item {
  margin: 2px 12px;
  width: calc(100% - 24px);
  border-left: 0;
  border-radius: 8px;
  color: #9baabd;
  font-weight: 500;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.055);
  color: #f3f5f7;
  transform: translateX(2px);
}

.nav-item.active {
  background: linear-gradient(90deg, rgba(91, 128, 166, 0.24), rgba(91, 128, 166, 0.08));
  color: #e8f1fa;
  box-shadow: inset 2px 0 0 var(--brand-gold);
}

.main-wrapper > header {
  background: rgba(255, 255, 255, 0.90) !important;
  border-color: rgba(214, 224, 234, 0.86) !important;
  backdrop-filter: blur(14px);
}

.main-wrapper main {
  width: min(100%, 1560px);
  margin-inline: auto;
}

.stat-card .tabular-nums,
.stat-card p[class*="font-bold"] {
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.025em;
}

.bg-primary-600 { background-color: #203754 !important; }
.hover\:bg-primary-700:hover { background-color: #172b43 !important; }
.text-primary-600 { color: #315578 !important; }
.bg-primary-50 { background-color: #eef2f5 !important; }
.border-primary-500 { border-color: var(--brand-gold) !important; }

main .border-l-4 {
  border-left-color: var(--brand-gold) !important;
}

button, .btn, .nav-item {
  transition: color 180ms ease, background-color 180ms ease, border-color 180ms ease,
    box-shadow 180ms ease, transform 180ms ease;
}

button:active, .btn:active { transform: translateY(1px); }

.login-field-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  width: 1rem;
  text-align: center;
  transform: translateY(-50%);
  pointer-events: none;
  z-index: 1;
}

.form-input.login-field-input {
  padding-left: 3rem;
}

.sidebar-logo {
  display: block;
  width: min(100%, 172px);
  height: auto;
  object-fit: contain;
  flex-shrink: 0;
}

.sidebar-brand {
  display: flex;
  min-height: 84px;
  align-items: center;
  padding: 15px 20px;
}

.sidebar.collapsed .sidebar-brand {
  min-height: 72px;
  justify-content: center;
  padding: 12px 7px;
}

.sidebar.collapsed .sidebar-logo {
  width: 48px;
}

.region-summary-card {
  margin-top: 22px;
  margin-bottom: 22px;
  border: 1px solid rgba(211, 222, 233, 0.82);
  box-shadow: 0 10px 28px rgba(39, 48, 61, 0.055);
}

.region-summary-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 24px 15px;
  border-bottom: 1px solid rgba(215, 225, 235, 0.78);
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.region-summary-count {
  flex: 0 0 auto;
  padding: 5px 10px;
  border-radius: 999px;
  background: #edf3f8;
  color: #596477;
  font-size: 12px;
  font-weight: 600;
}

.region-summary-card .data-table thead {
  background: #f4f7fa;
}

.region-summary-card .data-table tfoot {
  background: #eef3f7;
}

.region-summary-card .data-table th,
.region-summary-card .data-table td {
  padding-top: 13px;
  padding-bottom: 13px;
}

.report-section-title {
  color: #41536b;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.5;
}

.report-section-title > span {
  font-weight: 400;
}

.stat-card .data-table thead th {
  color: #718198;
  font-weight: 500;
  background: #f3f6f9;
}

@media (max-width: 768px) {
  .region-summary-card {
    margin-top: 16px;
    margin-bottom: 16px;
  }

  .region-summary-header {
    padding: 15px 18px 13px;
  }
}
.nav-item:focus-visible,
.sidebar-overlay:focus-visible {
  outline: 3px solid #a5b4fc;
  outline-offset: -3px;
}
.nav-item:hover {
  background: rgba(255,255,255,0.05);
  color: #e2e8f0;
}
.nav-item.active {
  background: rgba(99,102,241,0.15);
  color: #818cf8;
  border-left-color: #6366f1;
}
.nav-item i {
  width: 20px;
  text-align: center;
  font-size: 16px;
  flex-shrink: 0;
}

/* ===== Main Content ===== */
.main-wrapper {
  margin-left: var(--sidebar-width);
  transition: margin-left 0.3s ease;
  min-height: 100vh;
}
.main-wrapper.collapsed {
  margin-left: var(--sidebar-collapsed);
}

/* ===== Cards ===== */
.stat-card {
  background: var(--card-bg);
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  transition: transform 0.2s, box-shadow 0.2s;
}
.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

/* ===== Table ===== */
.data-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  text-align: left;
}
.data-table thead th {
  background: #f8fafc;
  color: #64748b;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.data-table tbody td {
  padding: 12px 16px;
  border-bottom: 1px solid #f1f5f9;
  font-size: 14px;
  color: #334155;
}
.data-table tbody tr {
  transition: background 0.15s;
}
.data-table tbody tr:hover {
  background: #f8fafc;
}

/* ===== Badges ===== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
}
.badge-success { background: #d1fae5; color: #065f46; }
.badge-warning { background: #fef3c7; color: #92400e; }
.badge-info    { background: #dbeafe; color: #1e40af; }
.badge-danger  { background: #fee2e2; color: #991b1b; }
.badge-default { background: #f1f5f9; color: #475569; }

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  white-space: nowrap;
}
.btn-primary {
  background: var(--primary);
  color: #fff;
}
.btn-primary:hover {
  background: #4338ca;
}
.btn-secondary {
  background: #f1f5f9;
  color: #475569;
}
.btn-secondary:hover {
  background: #e2e8f0;
}
.btn-danger {
  background: var(--danger);
  color: #fff;
}
.btn-danger:hover {
  background: #dc2626;
}
.btn-ghost {
  background: transparent;
  color: #64748b;
}
.btn-ghost:hover {
  background: #f1f5f9;
}
.btn-sm {
  padding: 5px 10px;
  font-size: 13px;
}

/* ===== Form ===== */
.form-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: #475569;
  margin-bottom: 6px;
}
.form-input {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 14px;
  color: #1e293b;
  transition: border-color 0.2s, box-shadow 0.2s;
  background: #fff;
}
.form-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79,70,229,0.1);
}
.form-input.error {
  border-color: var(--danger);
}
.form-error {
  font-size: 12px;
  color: var(--danger);
  margin-top: 4px;
}

/* ===== Toast ===== */
.toast-container {
  position: fixed;
  top: 80px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  min-width: 280px;
  animation: slideInRight 0.3s ease-out;
}
.toast-success { border-left: 4px solid var(--success); }
.toast-error   { border-left: 4px solid var(--danger); }
.toast-info    { border-left: 4px solid var(--info); }
.toast-warning { border-left: 4px solid var(--warning); }

/* ===== Loading Spinner ===== */
.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid #e2e8f0;
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* ===== Mobile Overlay ===== */
.sidebar-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.5);
  z-index: 40;
  border: 0;
  width: 100%;
  cursor: pointer;
}
.sidebar-overlay.show {
  display: block;
}

/* ===== Initial data loading ===== */
.dashboard-loading { display: grid; gap: 24px; }
.skeleton { background: linear-gradient(90deg, #e2e8f0 25%, #f8fafc 37%, #e2e8f0 63%); background-size: 400% 100%; animation: skeleton-loading 1.2s ease-in-out infinite; border-radius: 12px; }
.skeleton-title { height: 80px; }
.skeleton-toolbar { display: flex; flex-wrap: wrap; gap: 12px; padding: 18px; background: #fff; border-radius: 12px; }
.skeleton-filter { width: 120px; height: 36px; }
.skeleton-stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; }
.skeleton-card { height: 100px; }
.skeleton-chart { height: 340px; }
@keyframes skeleton-loading { to { background-position: -400% 0; } }
@media (max-width: 768px) { .skeleton-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } .skeleton-chart { height: 260px; } }
@media (max-width: 640px) { .skeleton-stats { grid-template-columns: 1fr; } }

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.mobile-open {
    transform: translateX(0);
  }
  .main-wrapper {
    margin-left: 0 !important;
  }
}

@media (max-width: 768px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  .data-table-wrap {
    overflow-x: auto;
  }
  .hide-mobile {
    display: none !important;
  }
}

@media (max-width: 640px) {
  .stats-grid {
    grid-template-columns: 1fr !important;
  }
  .hide-sm {
    display: none !important;
  }
}

/* ===== Modal ===== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.5);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-box {
  background: #fff;
  border-radius: 12px;
  max-width: 500px;
  width: 100%;
  box-shadow: 0 25px 50px rgba(0,0,0,0.25);
  animation: fadeIn 0.2s ease-out;
}

/* ===== Pagination ===== */
.pagination-btn {
  padding: 6px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: #fff;
  color: #475569;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s;
}
.pagination-btn:hover:not(:disabled) {
  background: #f1f5f9;
}
.pagination-btn.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.pagination-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 48px 20px;
  color: #94a3b8;
}
.empty-state i {
  font-size: 48px;
  margin-bottom: 12px;
  color: #cbd5e1;
}

/* Taste preview overrides must remain last in the cascade. */
.login-bg { background: radial-gradient(circle at 72% 18%, rgba(92,133,173,.20), transparent 28rem), linear-gradient(145deg,#142439 0%,#203754 58%,#29445f 100%); }
.sidebar { background: linear-gradient(180deg,#111f32 0%,#17283d 100%); color:#c9d1da; box-shadow:14px 0 36px rgba(21,37,57,.09); }
.nav-item { margin:2px 12px; width:calc(100% - 24px); border-left:0; border-radius:8px; color:#9baabd; font-weight:500; }
.nav-item:hover { background:rgba(255,255,255,.055); color:#f3f5f7; transform:translateX(2px); }
.nav-item.active { background:linear-gradient(90deg,rgba(91,128,166,.24),rgba(91,128,166,.08)); color:#e8f1fa; border-left-color:transparent; box-shadow:inset 2px 0 0 var(--brand-gold); }
.main-wrapper > header { background:rgba(255,255,255,.90)!important; border-color:rgba(214,224,234,.86)!important; backdrop-filter:blur(14px); }
.main-wrapper main { width:min(100%,1560px); margin-inline:auto; }
.stat-card { background:rgba(255,255,255,.97); border:1px solid rgba(215,225,235,.90); border-radius:14px; box-shadow:0 10px 28px rgba(32,55,84,.055); }
.stat-card:hover { transform:translateY(-1px); border-color:rgba(100,132,164,.34); box-shadow:0 16px 36px rgba(32,55,84,.085); }
.data-table thead th { background:#f3f6f9; color:#6f7d8d; text-transform:none; letter-spacing:.025em; }
.data-table tbody tr:hover { background:#f6f9fb; }

/* Unified enterprise typography: keep every dashboard module in one visual voice. */
html,
body,
button,
input,
select,
textarea,
table {
  font-family: "Microsoft YaHei UI", "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", sans-serif;
}

* {
  font-style: normal;
}

body {
  color: #526176;
}

.main-wrapper h1,
.main-wrapper h2,
.main-wrapper h3,
.stat-card h1,
.stat-card h2,
.stat-card h3 {
  color: #3d4f66 !important;
  font-weight: 600 !important;
  letter-spacing: 0;
}

.main-wrapper .text-slate-800,
.stat-card .text-slate-800 {
  color: #43546a !important;
}

.main-wrapper .font-bold,
.stat-card .font-bold {
  font-weight: 600 !important;
}

.data-table,
.data-table th,
.data-table td {
  font-family: inherit !important;
  font-style: normal !important;
}

.data-table thead th,
.stat-card .data-table thead th {
  color: #74849a !important;
  font-size: 12px;
  font-weight: 500 !important;
  letter-spacing: 0 !important;
}

.data-table tbody td {
  color: #516176;
}

.data-table tfoot td {
  color: #42536a;
  font-weight: 600 !important;
}

/* Restrained liquid accents: decorative only, never over data tables. */
@keyframes liquidDrift {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(18px, -12px, 0) scale(1.06); }
}

.login-bg::before,
.login-bg::after {
  filter: blur(4px);
  animation: liquidDrift 12s ease-in-out infinite;
}

.login-bg::after {
  animation-delay: -5s;
  animation-direction: reverse;
}

.main-wrapper > header {
  /* 必须 visible：否则右侧用户下拉菜单会被 overflow:hidden 裁剪看不到 */
  overflow: visible;
}

.main-wrapper > header::after {
  content: "";
  position: absolute;
  top: -42px;
  right: 11%;
  width: 190px;
  height: 94px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(83, 119, 155, 0.10), rgba(95, 116, 143, 0.035) 54%, transparent 72%);
  filter: blur(7px);
  pointer-events: none;
  animation: liquidDrift 15s ease-in-out infinite;
}

.liquid-panel {
  background:
    radial-gradient(circle at 8% -45%, rgba(77, 116, 154, 0.09), transparent 31%),
    radial-gradient(circle at 94% 145%, rgba(71, 102, 137, 0.09), transparent 34%),
    rgba(255, 255, 255, 0.93) !important;
  backdrop-filter: blur(16px) saturate(112%);
  border-color: rgba(211, 222, 233, 0.86) !important;
}

.liquid-panel select {
  background-color: rgba(255, 255, 255, 0.72) !important;
  backdrop-filter: blur(8px);
}

.modal-backdrop {
  background: rgba(25, 37, 52, 0.34) !important;
  backdrop-filter: blur(3px);
  cursor: default;
}


@media (prefers-reduced-motion: reduce) {
  .login-bg::before,
  .login-bg::after,
  .main-wrapper > header::after {
    animation: none;
  }
}

/* ===== Region + production statistics: dashboard visual parity ===== */
.main-wrapper .unified-stats-page {
  --analytics-accent: #2f5d89;
  display: grid;
  gap: 18px;
}

.main-wrapper .unified-stats-page > :not([hidden]) ~ :not([hidden]) {
  margin-top: 0 !important;
}

.main-wrapper .unified-stats-page .liquid-panel {
  display: grid !important;
  min-height: 74px;
  grid-template-columns: max-content repeat(4, minmax(88px, 112px)) minmax(190px, 1fr) max-content;
  align-items: center;
  gap: 10px !important;
  padding: 15px 20px !important;
  border-radius: 15px;
  background: #fff !important;
}

.main-wrapper .unified-stats-page .liquid-panel > span:first-child {
  color: #344b63 !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  white-space: nowrap;
}

.main-wrapper .unified-stats-page .liquid-panel select {
  width: 100%;
  height: 38px;
  padding: 0 12px !important;
  border-color: #d8e1ea !important;
  border-radius: 9px !important;
  background: #fbfcfd !important;
  color: #40566e !important;
  font-size: 13.5px !important;
  font-weight: 500 !important;
}

.main-wrapper .unified-stats-page .liquid-panel > span.ml-auto {
  justify-self: end;
  margin-left: 0 !important;
  color: #718297 !important;
  font-size: 12.5px !important;
  font-weight: 500;
  white-space: nowrap;
}

.main-wrapper .unified-stats-page .liquid-panel .btn {
  min-height: 34px;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
}

.main-wrapper .unified-stats-page .unified-kpi-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 13px !important;
}

.main-wrapper .unified-stats-page .unified-kpi-grid > .stat-card {
  min-height: 118px;
  padding: 17px 16px !important;
  border-left-width: 1px !important;
  background: linear-gradient(155deg, #fff 0%, #fbfcfd 100%);
  box-shadow: none;
}

.main-wrapper .unified-stats-page .unified-kpi-grid > .stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 26px rgba(27, 48, 70, 0.07);
}

.main-wrapper .unified-stats-page .unified-kpi-grid > .stat-card p:first-child {
  color: #607389 !important;
  font-size: 12.5px !important;
  font-weight: 600 !important;
  letter-spacing: 0 !important;
}

.main-wrapper .unified-stats-page .unified-kpi-grid > .stat-card p:nth-child(2) {
  color: #182b42 !important;
  font-size: 23px !important;
  font-weight: 700 !important;
  line-height: 1.28;
  letter-spacing: -0.035em;
  white-space: nowrap;
}

.main-wrapper .unified-stats-page .unified-kpi-grid > .stat-card p:last-child:not(:nth-child(2)) {
  color: #6c7e92 !important;
  font-size: 12px !important;
  font-weight: 400 !important;
}

.main-wrapper .unified-stats-page .unified-chart-card {
  padding: 20px 22px;
  border-color: rgba(177, 191, 204, 0.56);
}

.main-wrapper .unified-stats-page .unified-chart-card h3 {
  margin-bottom: 2px !important;
  color: #1c3047 !important;
  font-size: 17px !important;
  font-weight: 700 !important;
}

.main-wrapper .unified-stats-page .unified-chart-card h3 span,
.main-wrapper .unified-stats-page .unified-chart-card > p {
  color: #718297 !important;
  font-size: 12.5px !important;
  font-weight: 500 !important;
}

.main-wrapper .unified-stats-page .unified-detail-card {
  border-color: rgba(177, 191, 204, 0.56);
}

.main-wrapper .unified-stats-page .unified-detail-card > div:first-child {
  min-height: 58px;
  display: flex;
  align-items: center;
  padding: 15px 20px !important;
  background: linear-gradient(180deg, #fbfcfd 0%, #f6f8fa 100%);
  border-bottom-color: #dce4eb !important;
}

.main-wrapper .unified-stats-page .unified-detail-card .data-table thead th {
  height: 48px;
  vertical-align: middle;
}

.main-wrapper .unified-stats-page .unified-detail-card .data-table tbody td {
  padding-top: 12px;
  padding-bottom: 12px;
}

.main-wrapper .unified-stats-page .unified-detail-card .data-table tbody .btn-ghost {
  background: #eef3f8;
  color: #4d6b8c;
  font-size: 12.5px;
  font-weight: 500;
}

.main-wrapper .unified-stats-page .unified-detail-card .data-table tbody .btn-ghost:hover {
  background: #e1e9f1;
  color: #304f70;
}

@media (max-width: 980px) {
  .main-wrapper .unified-stats-page .liquid-panel {
    grid-template-columns: max-content repeat(4, minmax(86px, 1fr));
  }

  .main-wrapper .unified-stats-page .liquid-panel > span.ml-auto {
    grid-column: 1 / -2;
    justify-self: start;
  }
}

@media (max-width: 760px) {
  .main-wrapper .unified-stats-page .liquid-panel {
    display: flex !important;
  }

  .main-wrapper .unified-stats-page .unified-kpi-grid {
    grid-template-columns: 1fr !important;
  }

  .main-wrapper .unified-stats-page .unified-kpi-grid > .stat-card {
    min-height: 104px;
  }
}

/* ===== Refined account popover + compact KPI typography (2026-08-10) ===== */
.header-account-trigger {
  min-height: 42px;
  padding: 5px 9px 5px 6px;
  border: 1px solid transparent;
  border-radius: 12px;
  color: #51677b;
  transition: background-color .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.header-account-trigger:hover,
.header-account-trigger.is-open {
  border-color: #dce5ec;
  background: #f5f8fa;
  box-shadow: 0 5px 16px rgba(20, 43, 66, .055);
}

.header-account-trigger .fa-chevron-down {
  transition: transform .2s ease;
}

.header-account-trigger.is-open .fa-chevron-down {
  transform: rotate(180deg);
}

.account-popover {
  width: 292px;
  margin-top: 10px;
  overflow: hidden;
  border: 1px solid rgba(210, 221, 230, .95);
  border-radius: 16px;
  background: rgba(255, 255, 255, .98);
  box-shadow: 0 22px 50px rgba(16, 38, 58, .18), 0 3px 10px rgba(16, 38, 58, .06);
  backdrop-filter: blur(16px);
  transform-origin: top right;
  animation: accountPopoverIn .18s ease-out both;
}

@keyframes accountPopoverIn {
  from { opacity: 0; transform: translateY(-5px) scale(.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.account-popover-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: linear-gradient(135deg, #f6f9fb, #eef3f6);
  border-bottom: 1px solid #e1e8ee;
}

.account-popover-avatar {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border-radius: 12px;
  background: linear-gradient(145deg, #24486b, #193650);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  box-shadow: 0 8px 18px rgba(36, 72, 107, .18);
}

.account-popover-identity { min-width: 0; }
.account-popover-name {
  overflow: hidden;
  color: #173149;
  font-size: 14px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-popover-meta {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 4px;
  color: #73869a;
  font-size: 11px;
}

.account-role-label {
  padding-left: 7px;
  border-left: 1px solid #cfd9e1;
  color: #8a6c28;
  font-weight: 600;
}

.account-popover-actions { padding: 7px; }
.account-popover-action {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 10px;
  border-radius: 11px;
  color: #425a70;
  text-align: left;
  transition: background-color .18s ease, color .18s ease, transform .18s ease;
}

.account-popover-action:hover {
  background: #f2f6f8;
  color: #183650;
  transform: translateX(2px);
}

.account-popover-action:active { transform: translateX(2px) scale(.99); }
.account-action-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border-radius: 9px;
  background: #eaf0f4;
  color: #3c617f;
  font-size: 12px;
}

.account-popover-action strong,
.account-popover-action small { display: block; }
.account-popover-action strong { font-size: 13px; font-weight: 650; }
.account-popover-action small { margin-top: 2px; color: #8797a6; font-size: 10px; }
.account-popover-logout { color: #66585a; }
.account-popover-logout:hover { background: #fff3f1; color: #b4443b; }
.account-popover-logout .account-action-icon { background: #f7eeee; color: #9a5a55; }

.main-wrapper .report-workspace .kpi-grid > .stat-card > .flex {
  position: relative;
  display: block !important;
  width: 100%;
}

.main-wrapper .report-workspace .kpi-grid > .stat-card > .flex > div:first-child {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 1;
}

.main-wrapper .report-workspace .kpi-grid > .stat-card > .flex > div:last-child {
  width: 100%;
  padding-right: 34px;
}

.main-wrapper .report-workspace .kpi-grid .text-lg {
  max-width: 100%;
  font-size: clamp(20px, 2.15vw, 25px) !important;
  line-height: 1.12 !important;
  white-space: nowrap;
}

@media (max-width: 1180px) {
  .main-wrapper .report-workspace .kpi-grid .text-lg {
    font-size: 21px !important;
  }
  .account-popover { width: 276px; }
}

.chart-period-note {
  margin-left: 8px;
  color: #74869a;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0;
}

.chart-unit-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  margin-left: 9px;
  padding: 3px 8px;
  border: 1px solid rgba(209, 164, 59, .28);
  border-radius: 7px;
  background: linear-gradient(135deg, rgba(255, 249, 229, .96), rgba(247, 236, 197, .86));
  color: #87651f !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  line-height: 1;
  letter-spacing: .02em;
  vertical-align: 2px;
  box-shadow: inset 0 1px rgba(255,255,255,.72);
}

@media (max-width: 760px) {
  .chart-unit-badge {
    margin-top: 6px;
    margin-left: 0;
  }
}

/* ===== SpendKart-inspired local dashboard preview (2026-08-10) =====
   Scoped to the main dashboard; login and other work areas stay unchanged. */
.main-wrapper:has(.spendkart-dashboard) {
  background:
    radial-gradient(circle at 88% 3%, rgba(57, 82, 112, .075), transparent 24rem),
    #f5f6f8;
}

.spendkart-dashboard {
  --sk-ink: #182230;
  --sk-body: #475467;
  --sk-muted: #7b8797;
  --sk-line: #e5e9ef;
  --sk-soft: #f7f8fa;
  --sk-accent: #24486b;
  --sk-positive: #16836f;
  gap: 20px;
}

.spendkart-dashboard > :not([hidden]) ~ :not([hidden]) {
  margin-top: 0 !important;
}

.spendkart-dashboard .stat-card {
  border: 1px solid var(--sk-line) !important;
  border-radius: 18px !important;
  background: rgba(255, 255, 255, .98) !important;
  box-shadow: 0 1px 2px rgba(17, 31, 48, .025), 0 12px 30px rgba(17, 31, 48, .035) !important;
}

.spendkart-dashboard .brand-banner {
  min-height: 84px;
  padding: 16px 22px !important;
  border-top: 0 !important;
  background:
    radial-gradient(circle at 91% 22%, rgba(209, 164, 59, .12), transparent 15rem),
    linear-gradient(106deg, #ffffff 0%, #f8f9fb 100%) !important;
  overflow: hidden;
}

.spendkart-dashboard .brand-banner::after {
  content: "";
  width: 176px;
  height: 176px;
  position: absolute;
  right: -72px;
  top: -88px;
  border-radius: 50%;
  border: 1px solid rgba(34, 72, 107, .09);
  box-shadow: 0 0 0 24px rgba(34, 72, 107, .025), 0 0 0 48px rgba(34, 72, 107, .018);
  pointer-events: none;
}

.spendkart-dashboard .brand-banner h1 {
  color: var(--sk-ink) !important;
  font-size: 21px !important;
  font-weight: 700 !important;
  letter-spacing: -.025em;
}

.spendkart-dashboard .brand-banner p {
  color: var(--sk-muted) !important;
  font-size: 12px !important;
  font-weight: 500 !important;
}

.spendkart-dashboard .liquid-panel {
  min-height: 78px;
  border-radius: 16px !important;
  background: #fff !important;
  box-shadow: none !important;
}

.spendkart-dashboard .liquid-panel select {
  height: 40px;
  border: 1px solid #dfe4ea !important;
  border-radius: 10px !important;
  background: var(--sk-soft) !important;
  color: #344054 !important;
  box-shadow: none;
}

.spendkart-dashboard .liquid-panel select:hover,
.spendkart-dashboard .liquid-panel select:focus {
  border-color: #9eacbc !important;
  background: #fff !important;
}

.spendkart-dashboard .data-status-bar {
  min-height: 60px;
  border-left: 0 !important;
  box-shadow: none !important;
}

.spendkart-dashboard .data-status-bar::before {
  content: "";
  width: 8px;
  height: 8px;
  margin-right: 2px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--sk-positive);
  box-shadow: 0 0 0 5px rgba(22, 131, 111, .10);
}

.spendkart-dashboard .stats-grid {
  gap: 14px !important;
}

.spendkart-dashboard .stats-grid > .stat-card {
  min-height: 126px;
  padding: 18px !important;
  position: relative;
  overflow: hidden;
  box-shadow: none !important;
}

.spendkart-dashboard .stats-grid > .stat-card::after {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 0;
  height: 2px;
  border-radius: 2px 2px 0 0;
  background: var(--sk-accent);
  opacity: 0;
  transform: scaleX(.35);
  transition: opacity 220ms ease, transform 220ms ease;
}

.spendkart-dashboard .stats-grid > .stat-card:hover {
  border-color: #cbd3dd !important;
  transform: translateY(-3px);
  box-shadow: 0 15px 34px rgba(23, 39, 57, .075) !important;
}

.spendkart-dashboard .stats-grid > .stat-card:hover::after {
  opacity: 1;
  transform: scaleX(1);
}

.spendkart-dashboard .stats-grid > .stat-card > .flex > div:first-child {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: #f1f4f7 !important;
  color: var(--sk-accent) !important;
}

.spendkart-dashboard .stats-grid > .stat-card p:first-child {
  color: #667085 !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  letter-spacing: .015em !important;
}

.spendkart-dashboard .stats-grid > .stat-card p:nth-child(2) {
  color: var(--sk-ink) !important;
  font-size: 24px !important;
  font-weight: 700 !important;
  letter-spacing: -.04em;
  font-variant-numeric: tabular-nums;
}

.spendkart-dashboard .stats-grid > .stat-card p:last-child {
  color: #8a94a3 !important;
  font-size: 11.5px !important;
}

.spendkart-dashboard .chart-card,
.spendkart-dashboard .region-summary-card {
  border-radius: 20px !important;
  box-shadow: none !important;
}

.spendkart-dashboard .chart-card {
  padding: 24px 24px 20px;
}

.spendkart-dashboard .chart-card h3,
.spendkart-dashboard .region-summary-card h3 {
  color: var(--sk-ink) !important;
  font-size: 17px !important;
  font-weight: 700 !important;
  letter-spacing: -.018em;
}

.spendkart-dashboard .data-table thead th {
  height: 48px;
  background: #f7f8fa !important;
  color: #667085 !important;
  border-bottom-color: #e7eaee !important;
}

.spendkart-dashboard .data-table tbody td {
  padding-top: 13px;
  padding-bottom: 13px;
  border-bottom-color: #edf0f3;
}

.spendkart-dashboard .data-table tbody tr:hover {
  background: #f8fafb !important;
}

/* Change-password dialog: isolated from data-table modal rules. */
.password-modal-layer {
  padding: 24px;
  z-index: 80 !important;
}

.password-modal-layer .modal-backdrop {
  background: rgba(16, 28, 43, .42) !important;
  backdrop-filter: blur(7px) saturate(92%);
}

.password-modal-card {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .75);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 32px 80px rgba(13, 27, 42, .24);
  animation: passwordModalIn 220ms cubic-bezier(.22, .8, .28, 1) both;
}

@keyframes passwordModalIn {
  from { opacity: 0; transform: translateY(10px) scale(.975); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.password-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 22px 24px 18px;
  border-bottom: 1px solid #edf0f3;
  background: linear-gradient(180deg, #fff 0%, #fbfcfd 100%);
}

.password-modal-heading {
  display: flex;
  align-items: center;
  gap: 13px;
}

.password-modal-icon {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border-radius: 12px;
  background: #eef3f7;
  color: #24486b;
}

.password-modal-heading h3 {
  color: #182230;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.35;
}

.password-modal-heading p {
  margin-top: 2px;
  color: #7b8797;
  font-size: 12.5px;
}

.password-modal-close {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #8a94a3;
}

.password-modal-close:hover { background: #f1f3f6; color: #344054; }

.password-modal-form {
  display: grid;
  gap: 15px;
  padding: 22px 24px 24px;
}

.password-field {
  display: grid;
  gap: 7px;
  color: #344054;
  font-size: 13px;
  font-weight: 600;
}

.password-input-wrap { position: relative; }

.password-input-wrap .form-input {
  width: 100%;
  height: 44px;
  padding-right: 44px;
  border-color: #dce2e8;
  border-radius: 11px;
  background: #fbfcfd;
  color: #243447;
  font-size: 14px;
}

.password-input-wrap .form-input:focus {
  border-color: #738ba2;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(54, 91, 126, .12);
}

.password-visibility {
  width: 38px;
  height: 38px;
  position: absolute;
  top: 3px;
  right: 3px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #98a2b3;
}

.password-visibility:hover { background: #f0f3f6; color: #475467; }

.password-modal-hint {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #7b8797;
  font-size: 12px;
  line-height: 1.5;
}

.password-modal-actions {
  display: grid;
  grid-template-columns: 1fr 1.45fr;
  gap: 10px;
  padding-top: 3px;
}

.password-modal-actions .btn {
  min-height: 42px;
  border-radius: 10px;
}

@media (max-width: 760px) {
  .spendkart-dashboard .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .password-modal-layer { padding: 14px; }
  .password-modal-header, .password-modal-form { padding-left: 18px; padding-right: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  .password-modal-card { animation: none; }
}

/* ===== Upload workspace: compact entry row + balanced activity area ===== */
.main-wrapper .upload-page {
  width: 100%;
  max-width: none;
}

.main-wrapper .upload-page > :not([hidden]) ~ :not([hidden]) {
  margin-top: 18px !important;
}

.main-wrapper .upload-card-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  gap: 14px !important;
}

.main-wrapper .upload-card-grid > .stat-card {
  display: flex;
  min-width: 0;
  min-height: 350px;
  flex-direction: column;
  padding: 16px !important;
  box-shadow: none;
}

.main-wrapper .upload-card-grid > .stat-card > .flex:first-child {
  margin-bottom: 12px !important;
  gap: 10px !important;
}

.main-wrapper .upload-card-grid > .stat-card > .flex:first-child > div:first-child {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  font-size: 16px;
}

.main-wrapper .upload-card-grid > .stat-card h3 {
  font-size: 15px !important;
  line-height: 1.35;
}

.main-wrapper .upload-card-grid > .stat-card > p.text-sm {
  min-height: 64px;
  margin-bottom: 10px !important;
  font-size: 12.5px !important;
  line-height: 1.65;
}

.main-wrapper .upload-card-grid > .stat-card > .border-dashed {
  display: flex;
  min-height: 154px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-top: auto;
  padding: 15px 10px !important;
  border-radius: 10px;
}

.main-wrapper .upload-card-grid > .stat-card > .border-dashed > i {
  margin-bottom: 8px !important;
  font-size: 27px !important;
}

.main-wrapper .upload-card-grid > .stat-card > .border-dashed p {
  margin-bottom: 9px !important;
  font-size: 12px !important;
}

.main-wrapper .upload-card-grid > .stat-card .btn {
  padding: 7px 10px;
  font-size: 12px;
  white-space: nowrap;
}

.main-wrapper .upload-card-grid > .stat-card > .mt-3 {
  min-height: 30px;
  margin-top: 9px !important;
}

.main-wrapper .upload-overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(520px, 1.25fr);
  grid-template-rows: auto 1fr;
  gap: 14px;
  align-items: stretch;
}

.main-wrapper .upload-status-card {
  grid-column: 1;
  grid-row: 1;
}

.main-wrapper .upload-instructions-card {
  grid-column: 1;
  grid-row: 2;
}

.main-wrapper .upload-history-card {
  display: flex;
  min-height: 0;
  grid-column: 2;
  grid-row: 1 / 3;
  flex-direction: column;
}

/* The legacy embedded history remains hidden during the layout migration. */
.main-wrapper .upload-status-card > div.mt-4:not(.flex) {
  display: none !important;
}

.main-wrapper .upload-status-card > .grid {
  grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
  gap: 10px !important;
}

.main-wrapper .upload-status-card > .grid > div {
  padding: 12px 8px !important;
}

.main-wrapper .upload-status-card > .grid p:first-child {
  font-size: 18px !important;
  line-height: 1.35;
}

.main-wrapper .upload-status-card > .mt-4.flex {
  flex-wrap: wrap;
  margin-top: 14px !important;
}

.main-wrapper .upload-history-table-wrap {
  min-height: 360px;
  max-height: 620px;
  flex: 1;
}

.main-wrapper .upload-history-table th:nth-child(1) { width: 13%; }
.main-wrapper .upload-history-table th:nth-child(2) { width: 12%; }
.main-wrapper .upload-history-table th:nth-child(3) { width: 22%; }
.main-wrapper .upload-history-table th:nth-child(4) { width: 43%; }
.main-wrapper .upload-history-table th:nth-child(5) { width: 10%; }

.main-wrapper .upload-history-table tbody td {
  padding: 11px 10px;
  vertical-align: middle;
}

.main-wrapper .upload-file-name {
  overflow: hidden;
  color: #40566e;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.main-wrapper .upload-history-empty {
  display: grid;
  min-height: 360px;
  flex: 1;
  place-content: center;
  gap: 10px;
  border: 1px dashed #d8e1ea;
  border-radius: 12px;
  color: #718297;
  text-align: center;
}

.main-wrapper .upload-history-empty i {
  font-size: 28px;
  color: #a9b7c6;
}

/* Production and shipping share this dialog. Keep utility columns fixed so
   the name and amount data cannot drift when the dialog width changes. */
.main-wrapper .production-stats-page .content-modal-layer .data-table th:first-child {
  width: 72px;
}

.main-wrapper .production-stats-page .content-modal-layer .data-table th:last-child {
  width: 150px;
}

@media (max-width: 1100px) {
  .main-wrapper .upload-card-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 980px) {
  .main-wrapper .upload-overview-grid {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }

  .main-wrapper .upload-status-card,
  .main-wrapper .upload-instructions-card,
  .main-wrapper .upload-history-card {
    grid-column: 1;
    grid-row: auto;
  }
}

@media (max-width: 760px) {
  .main-wrapper .upload-card-grid {
    grid-template-columns: 1fr !important;
  }

  .main-wrapper .upload-card-grid > .stat-card {
    min-height: 0;
  }

  .main-wrapper .upload-status-card > .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

.brand-banner {
  min-height: 68px;
  background:
    radial-gradient(circle at 88% 12%, rgba(72, 108, 145, 0.07), transparent 28%),
    rgba(255, 255, 255, 0.97) !important;
}

/* Unified context banner for secondary pages. */
.page-context-banner {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 104px;
  margin-bottom: 24px;
  padding: 20px 24px;
  overflow: hidden;
  border-radius: 16px;
  color: #fff;
  background:
    radial-gradient(circle at 87% 18%, rgba(209, 164, 59, .22), transparent 17rem),
    linear-gradient(116deg, #13283e 0%, #203f5d 62%, #294d6c 100%);
  box-shadow: 0 18px 38px rgba(22, 42, 62, .16);
}

.page-context-banner::after {
  content: "";
  position: absolute;
  right: -26px;
  top: -74px;
  z-index: -1;
  width: 196px;
  height: 196px;
  border: 1px solid rgba(255, 255, 255, .10);
  border-radius: 50%;
  box-shadow: 0 0 0 24px rgba(255, 255, 255, .035), 0 0 0 48px rgba(255, 255, 255, .022);
}

.page-context-icon {
  display: grid;
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 14px;
  color: #f1cf74;
  background: rgba(255, 255, 255, .08);
  font-size: 21px;
}

.page-context-copy { min-width: 0; }
.page-context-eyebrow {
  display: block;
  margin-bottom: 3px;
  color: rgba(230, 238, 246, .66);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .13em;
}
.page-context-copy h2 {
  color: #fff;
  font-size: 21px;
  font-weight: 700;
  line-height: 1.35;
}
.page-context-copy p {
  margin-top: 4px;
  color: rgba(230, 238, 246, .74);
  font-size: 13px;
  line-height: 1.55;
}
.page-context-brand {
  align-self: flex-end;
  margin-left: auto;
  padding-bottom: 2px;
  color: rgba(255, 255, 255, .56);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .08em;
  white-space: nowrap;
}

@media (max-width: 760px) {
  .page-context-banner {
    min-height: 92px;
    margin-bottom: 16px;
    padding: 16px;
  }
  .page-context-icon { width: 44px; height: 44px; flex-basis: 44px; }
  .page-context-copy h2 { font-size: 17px; }
  .page-context-copy p { font-size: 12px; }
  .page-context-brand { display: none; }
}

@media (max-width: 480px) {
  .page-context-banner { align-items: flex-start; gap: 12px; }
  .page-context-eyebrow { font-size: 9px; letter-spacing: .08em; }
}

.account-field {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 6px;
}

.account-field > span {
  color: #6f7f94;
  font-size: 12px;
  font-weight: 500;
}

.account-field .form-input {
  width: 100%;
}

button:focus-visible,
[role="button"]:focus-visible,
select:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid rgba(67, 105, 144, 0.72) !important;
  outline-offset: 2px;
}

@media (max-width: 640px) {
  .main-wrapper main {
    padding: 14px !important;
  }

  .brand-banner {
    min-height: 60px;
    padding: 12px 14px !important;
  }

  .brand-banner img {
    height: 38px !important;
  }

  .brand-banner h1 {
    font-size: 15px !important;
  }

  .liquid-panel {
    align-items: stretch !important;
    gap: 10px !important;
    padding: 14px !important;
  }

  .liquid-panel > span:first-child {
    width: 100%;
  }

  .liquid-panel > select {
    flex: 1 1 calc(50% - 5px);
    min-width: 0;
    height: 40px;
  }

  .liquid-panel > .ml-auto {
    display: grid;
    width: 100%;
    margin-left: 0 !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .liquid-panel > .ml-auto > button,
  .liquid-panel > button {
    min-height: 38px;
    justify-content: center;
  }

  .liquid-panel > .ml-auto > button:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }

  .stat-card canvas {
    min-height: 240px !important;
  }

  .data-table thead th,
  .data-table tbody td,
  .data-table tfoot td {
    padding-left: 12px;
    padding-right: 12px;
  }
}

/* ===== Executive dashboard visual system ===== */
.main-wrapper main {
  padding: 22px 26px !important;
}

.executive-dashboard > :not([hidden]) ~ :not([hidden]) {
  margin-top: 18px !important;
}

.executive-dashboard .stat-card {
  border: 1px solid #dbe3eb;
  border-radius: 15px;
  box-shadow: 0 5px 18px rgba(28, 48, 70, 0.045);
}

.executive-dashboard .stat-card:hover {
  transform: none;
  border-color: #cbd7e2;
  box-shadow: 0 7px 22px rgba(28, 48, 70, 0.065);
}

.executive-dashboard .brand-banner {
  min-height: 78px;
  padding: 13px 20px !important;
  gap: 15px !important;
  background: linear-gradient(108deg, #ffffff 0%, #f8fafc 100%) !important;
}

.executive-dashboard .brand-banner img {
  height: 43px !important;
}

.executive-dashboard .brand-banner h1 {
  color: #182b42 !important;
  font-size: 20px !important;
  font-weight: 700 !important;
  line-height: 1.35;
  letter-spacing: -0.015em;
}

.executive-dashboard .brand-banner p {
  margin-top: 2px;
  color: #60748b !important;
  font-size: 12.5px !important;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.executive-dashboard .liquid-panel {
  display: grid !important;
  min-height: 74px;
  grid-template-columns: max-content repeat(4, minmax(88px, 112px)) minmax(270px, 1fr);
  align-items: center !important;
  gap: 10px !important;
  padding: 15px 20px !important;
  background: #ffffff !important;
}

.executive-dashboard .liquid-panel > span:first-child {
  color: #344b63 !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  white-space: nowrap;
}

.executive-dashboard .liquid-panel select {
  width: 100%;
  height: 38px;
  padding: 0 12px !important;
  border-color: #d8e1ea !important;
  border-radius: 9px !important;
  background: #fbfcfd !important;
  color: #40566e !important;
  font-size: 13.5px !important;
  font-weight: 500 !important;
}

.executive-dashboard .liquid-panel > .ml-auto {
  justify-self: end;
  margin-left: 0 !important;
}

.executive-dashboard .liquid-panel button {
  min-height: 34px;
  padding: 6px 8px !important;
  border-radius: 8px !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  white-space: nowrap;
}

.executive-dashboard .data-status-bar {
  min-height: 62px;
  padding: 12px 18px !important;
  border-radius: 13px;
}

.executive-dashboard .data-status-bar .text-sm {
  color: #2d435b !important;
  font-weight: 600 !important;
}

.executive-dashboard .data-status-bar .text-xs {
  color: #65788e !important;
  font-size: 12.5px !important;
  font-weight: 400 !important;
}

.executive-dashboard .data-status-bar .btn {
  min-height: 34px;
  padding: 7px 13px;
  border-radius: 8px;
  background: #203b58;
  font-size: 12.5px;
  font-weight: 600;
}

.executive-dashboard .stats-grid {
  display: grid !important;
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  gap: 13px !important;
}

.executive-dashboard .stats-grid > .stat-card {
  min-height: 118px;
  padding: 17px 16px !important;
  border-left-width: 1px !important;
  overflow: hidden;
}

.executive-dashboard .stats-grid > .stat-card > .flex {
  position: relative;
  display: block !important;
}

.executive-dashboard .stats-grid > .stat-card > .flex > div:first-child {
  position: absolute;
  top: 0;
  right: 0;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  opacity: 0.92;
}

.executive-dashboard .stats-grid > .stat-card > .flex > div:last-child {
  display: grid;
  gap: 4px;
  padding-right: 34px;
}

.executive-dashboard .stats-grid > .stat-card p:first-child {
  color: #607389 !important;
  font-size: 12.5px !important;
  font-weight: 600 !important;
  line-height: 1.35;
}

.executive-dashboard .stats-grid > .stat-card p:nth-child(2) {
  color: #182b42 !important;
  font-size: 23px !important;
  font-weight: 700 !important;
  line-height: 1.28;
  letter-spacing: -0.035em;
  white-space: nowrap;
}

.executive-dashboard .stats-grid > .stat-card p:last-child {
  color: #6c7e92 !important;
  font-size: 12px !important;
  font-weight: 400 !important;
  line-height: 1.4;
  white-space: nowrap;
}

.executive-dashboard .chart-card {
  padding: 20px 22px;
}

.executive-dashboard .chart-card h3 {
  color: #1c3047 !important;
  font-size: 17px !important;
  font-weight: 700 !important;
}

.executive-dashboard .chart-card h3 + span {
  color: #718297 !important;
  font-size: 12.5px !important;
  font-weight: 500 !important;
}

@media (max-width: 860px) {
  .executive-dashboard .liquid-panel {
    grid-template-columns: max-content repeat(4, minmax(86px, 1fr));
  }

  .executive-dashboard .liquid-panel > .ml-auto {
    grid-column: 1 / -1;
    justify-self: end;
  }
}

@media (max-width: 760px) {
  .main-wrapper main {
    padding: 14px !important;
  }

  .executive-dashboard .liquid-panel {
    display: flex !important;
  }

  .executive-dashboard .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .executive-dashboard .stats-grid > .stat-card:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }
}

/* ===== Taste audit + restrained GSAP motion layer =====
   Content application only: the login screen deliberately stays untouched. */
.main-wrapper {
  background:
    radial-gradient(circle at 92% 0%, rgba(31, 70, 107, 0.055), transparent 28rem),
    #f3f6f8;
}

.main-wrapper main {
  width: min(100%, 1480px);
  margin-inline: auto;
}

.main-wrapper .stat-card {
  border-color: rgba(177, 191, 204, 0.62);
  box-shadow: 0 8px 26px rgba(30, 52, 74, 0.045);
  transition: border-color 220ms ease, box-shadow 220ms ease, transform 220ms ease;
}

.main-wrapper .stat-card:hover {
  border-color: rgba(137, 157, 177, 0.72);
  box-shadow: 0 12px 30px rgba(30, 52, 74, 0.075);
}

.main-wrapper button,
.main-wrapper .btn,
.main-wrapper select,
.main-wrapper .nav-item {
  transition: color 180ms ease, background-color 180ms ease, border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.main-wrapper button:active,
.main-wrapper .btn:active {
  transform: translateY(1px) scale(0.985);
}

.main-wrapper button:focus-visible,
.main-wrapper select:focus-visible,
.main-wrapper a:focus-visible {
  outline: 3px solid rgba(47, 93, 137, 0.22);
  outline-offset: 2px;
}

.main-wrapper .executive-dashboard .brand-banner {
  border-top: 2px solid #d1a43b;
  background:
    radial-gradient(circle at 96% 20%, rgba(209, 164, 59, 0.08), transparent 18rem),
    #fff !important;
}

.main-wrapper .executive-dashboard .data-status-bar {
  border-left: 3px solid #1e7b70;
  box-shadow: none;
}

.main-wrapper .executive-dashboard .stats-grid > .stat-card {
  background: linear-gradient(155deg, #fff 0%, #fbfcfd 100%);
  box-shadow: none;
}

.main-wrapper .executive-dashboard .stats-grid > .stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 26px rgba(27, 48, 70, 0.07);
}

.main-wrapper .executive-dashboard .chart-card,
.main-wrapper .executive-dashboard .region-summary-card {
  border-color: rgba(177, 191, 204, 0.56);
}

.main-wrapper .data-table tbody tr {
  transition: background-color 150ms ease;
}

.main-wrapper .data-table tbody tr:hover {
  background: rgba(237, 243, 247, 0.72) !important;
}

@media (prefers-reduced-motion: reduce) {
  .main-wrapper *,
  .main-wrapper *::before,
  .main-wrapper *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* ===== 2026-08 content typography refinement =====
   Deliberately scoped to the authenticated application. Login styles stay unchanged. */
.main-wrapper {
  --content-ink: #24364b;
  --content-heading: #17293f;
  --content-body: #3f536b;
  --content-secondary: #5d7087;
  --content-muted: #71839a;
  --content-border: #d9e2eb;
  --content-soft: #f4f7fa;
  color: var(--content-body);
  font-size: 14px;
  line-height: 1.62;
}

.main-wrapper > header h1,
.main-wrapper > header h1.font-bold {
  color: var(--content-heading) !important;
  font-size: 19px !important;
  font-weight: 700 !important;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.main-wrapper main h1,
.main-wrapper main h1.font-bold {
  color: var(--content-heading) !important;
  font-size: 20px !important;
  font-weight: 700 !important;
  line-height: 1.35;
  letter-spacing: -0.012em;
}

.main-wrapper main h2,
.main-wrapper main h3,
.main-wrapper main h2.font-bold,
.main-wrapper main h3.font-bold,
.main-wrapper .report-section-title,
.main-wrapper .region-summary-header h3 {
  color: var(--content-heading) !important;
  font-size: 17px !important;
  font-weight: 700 !important;
  line-height: 1.45;
  letter-spacing: -0.006em;
}

.main-wrapper main h1 .text-sm,
.main-wrapper main h2 .text-sm,
.main-wrapper main h3 .text-sm,
.main-wrapper .report-section-title > span {
  color: var(--content-secondary) !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  letter-spacing: 0;
}

/* Utility colors are strengthened only inside the signed-in content area. */
.main-wrapper .text-slate-800 { color: var(--content-heading) !important; }
.main-wrapper .text-slate-600 { color: #4c6077 !important; }
.main-wrapper .text-slate-500 { color: var(--content-secondary) !important; }
.main-wrapper .text-slate-400 { color: var(--content-muted) !important; }
.main-wrapper .text-xs { font-size: 13px; line-height: 1.55; }
.main-wrapper .text-sm { font-size: 14px; line-height: 1.58; }

.main-wrapper .stat-card {
  border-color: rgba(208, 219, 230, 0.96);
  box-shadow: 0 8px 24px rgba(31, 52, 77, 0.06);
}

.main-wrapper .stat-card:hover {
  border-color: rgba(127, 150, 175, 0.48);
  box-shadow: 0 13px 31px rgba(31, 52, 77, 0.085);
}

/* KPI cards: labels support the number instead of competing with it. */
.main-wrapper .stat-card p.text-xs.uppercase,
.main-wrapper .stat-card p.text-xs.tracking-wider {
  color: #60748c !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  letter-spacing: 0.025em !important;
}

.main-wrapper .stat-card p.text-2xl,
.main-wrapper .stat-card p.text-3xl,
.main-wrapper .stat-card p.text-xl.font-bold {
  color: var(--content-heading) !important;
  font-weight: 700 !important;
  letter-spacing: -0.025em;
}

/* Filters and controls keep a clear, compact enterprise rhythm. */
.main-wrapper .form-input,
.main-wrapper select,
.main-wrapper input,
.main-wrapper textarea {
  color: #334a63;
  font-size: 14px;
  font-weight: 500;
  border-color: #d6e0ea;
}

.main-wrapper button:not(.nav-item) {
  font-weight: 600;
}

/* Tables use one consistent typeface and a visible header/body hierarchy. */
.main-wrapper .data-table {
  color: var(--content-body);
  font-size: 14px;
}

.main-wrapper .data-table thead th,
.main-wrapper .stat-card .data-table thead th {
  background: #eef3f7;
  color: #4f647c !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  line-height: 1.45;
  letter-spacing: 0 !important;
  border-bottom: 1px solid #d5e0ea;
}

.main-wrapper .data-table tbody td {
  color: #3c5068;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.55;
  border-bottom-color: #e6ecf2;
}

.main-wrapper .data-table tbody td.font-medium,
.main-wrapper .data-table tbody td.font-semibold,
.main-wrapper .data-table tbody td.font-bold {
  color: #263b52 !important;
  font-weight: 600 !important;
}

.main-wrapper .data-table tfoot td {
  background: #e9f0f6;
  color: #243950 !important;
  font-size: 14px;
  font-weight: 700 !important;
  border-top: 1px solid #cfdae5;
}

.main-wrapper .region-summary-header {
  background: linear-gradient(180deg, #fbfcfd 0%, #f5f8fa 100%);
}

.main-wrapper .region-summary-count {
  color: #4d627a;
  font-weight: 600;
}

/* Sidebar text is clearer but remains subordinate to the content. */
.sidebar .sidebar-brand-text > div:first-child {
  color: #f3f6f9;
  font-weight: 700;
}

.sidebar .sidebar-brand-text .text-xs,
.sidebar .text-slate-500,
.sidebar .text-slate-600 {
  color: #9fb0c3 !important;
}

.sidebar nav > .sidebar-brand-text,
.sidebar nav > div.text-xs {
  color: #8194aa !important;
  font-size: 12px;
  font-weight: 600 !important;
  letter-spacing: 0.04em;
}

.sidebar .nav-item {
  color: #b4c1cf;
  font-size: 14px;
  font-weight: 500;
}

.sidebar .nav-item:hover { color: #f5f8fb; }
.sidebar .nav-item.active {
  color: #ffffff;
  font-weight: 600;
  background: linear-gradient(90deg, rgba(86, 127, 168, 0.30), rgba(86, 127, 168, 0.10));
}

@media (max-width: 640px) {
  .main-wrapper { font-size: 14px; }
  .main-wrapper > header h1 { font-size: 18px !important; }
  .main-wrapper main h1 { font-size: 18px !important; }
  .main-wrapper main h2,
  .main-wrapper main h3,
  .main-wrapper .report-section-title { font-size: 16px !important; }
  .main-wrapper .data-table { font-size: 13px; }
  .main-wrapper .data-table thead th,
  .main-wrapper .data-table tbody td,
  .main-wrapper .data-table tfoot td { font-size: 13px !important; }
}

/* ===== Dashboard hierarchy corrections ===== */
.main-wrapper .stats-grid > .stat-card {
  min-height: 108px;
  padding: 16px 17px;
}

.main-wrapper .stats-grid > .stat-card > .flex {
  height: 100%;
  align-items: center;
  gap: 14px;
}

.main-wrapper .stats-grid > .stat-card > .flex > div:last-child {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.main-wrapper .stats-grid > .stat-card p:first-child {
  color: #52677f !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  line-height: 1.35;
  letter-spacing: 0 !important;
}

.main-wrapper .stats-grid > .stat-card p:nth-child(2) {
  color: #1d3047 !important;
  font-size: 21px !important;
  font-weight: 650 !important;
  line-height: 1.35;
  letter-spacing: -0.02em;
}

.main-wrapper .stats-grid > .stat-card p:last-child {
  color: #6a7d93 !important;
  font-size: 12.5px !important;
  font-weight: 400 !important;
  line-height: 1.35;
}

/* A calmer table: names lead, numbers support, actions recede. */
.main-wrapper .data-table tbody td {
  color: #52667d;
  font-size: 13.5px;
  font-weight: 400;
}

.main-wrapper .data-table tbody td:first-child {
  color: #2d4259 !important;
  font-weight: 600 !important;
}

.main-wrapper .data-table tbody td.font-medium,
.main-wrapper .data-table tbody td.font-semibold,
.main-wrapper .data-table tbody td.font-bold {
  color: #334960 !important;
  font-weight: 600 !important;
}

.main-wrapper .region-summary-card .data-table tbody td {
  padding-top: 12px;
  padding-bottom: 12px;
}

.main-wrapper .region-summary-card .data-table .badge {
  min-width: 58px;
  justify-content: center;
  padding: 4px 9px;
  font-size: 12px;
  font-weight: 500;
}

.main-wrapper .region-summary-card .data-table tbody button {
  background: #eef3f8 !important;
  color: #4d6b8c !important;
  font-size: 12.5px !important;
  font-weight: 500 !important;
}

.main-wrapper .region-summary-card .data-table tbody button:hover {
  background: #e1e9f1 !important;
  color: #304f70 !important;
}

.main-wrapper .data-table tfoot td,
.main-wrapper .region-summary-card .data-table tfoot td {
  height: 52px;
  padding: 14px 16px !important;
  vertical-align: middle !important;
  line-height: 20px !important;
  color: #2d4259 !important;
  font-size: 13.5px !important;
  font-weight: 650 !important;
}

.main-wrapper .region-summary-card .data-table tfoot tr {
  height: 52px;
}

@media (max-width: 640px) {
  .main-wrapper .stats-grid > .stat-card {
    min-height: 102px;
    padding: 14px;
  }

  .main-wrapper .stats-grid > .stat-card p:nth-child(2) {
    font-size: 19px !important;
  }
}

/* System-wide KPI cards share the same visual grammar. */
.main-wrapper .stats-grid > .stat-card > .flex,
.main-wrapper .kpi-grid > .stat-card > .flex {
  position: relative;
  display: block !important;
}

.main-wrapper .stats-grid > .stat-card > .flex > div:first-child,
.main-wrapper .kpi-grid > .stat-card > .flex > div:first-child {
  position: absolute;
  top: 0;
  right: 0;
  width: 36px;
  height: 36px;
  border-radius: 10px;
}

.main-wrapper .stats-grid > .stat-card > .flex > div:last-child,
.main-wrapper .kpi-grid > .stat-card > .flex > div:last-child {
  display: grid;
  gap: 4px;
  padding-right: 38px;
}

.main-wrapper .stats-grid > .stat-card,
.main-wrapper .kpi-grid > .stat-card {
  border-left-width: 1px !important;
}

.main-wrapper .stats-grid > .stat-card p:first-child,
.main-wrapper .kpi-grid > .stat-card p:first-child {
  color: #607389 !important;
  font-size: 12.5px !important;
  font-weight: 600 !important;
}

.main-wrapper .stats-grid > .stat-card p:nth-child(2),
.main-wrapper .kpi-grid > .stat-card p:nth-child(2) {
  color: #1b2f46 !important;
  font-size: 22px !important;
  font-weight: 700 !important;
  line-height: 1.3;
}

.main-wrapper .stats-grid > .stat-card p:last-child,
.main-wrapper .kpi-grid > .stat-card p:last-child {
  color: #6c7e92 !important;
  font-size: 12px !important;
  font-weight: 400 !important;
}

/* Executive dashboard overrides must remain last in the cascade. */
.main-wrapper .executive-dashboard .stats-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  gap: 13px !important;
}

.main-wrapper .executive-dashboard .stats-grid > .stat-card {
  min-height: 118px;
  padding: 17px 16px !important;
  border-left-width: 1px !important;
}

.main-wrapper .executive-dashboard .stats-grid > .stat-card p:first-child {
  color: #607389 !important;
  font-size: 12.5px !important;
  font-weight: 600 !important;
}

.main-wrapper .executive-dashboard .stats-grid > .stat-card p:nth-child(2) {
  color: #182b42 !important;
  font-size: 23px !important;
  font-weight: 700 !important;
  line-height: 1.28;
}

.main-wrapper .executive-dashboard .stats-grid > .stat-card p:last-child {
  color: #6c7e92 !important;
  font-size: 12px !important;
  font-weight: 400 !important;
}

@media (max-width: 760px) {
  .main-wrapper .executive-dashboard .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .main-wrapper .executive-dashboard .stats-grid > .stat-card {
    min-height: 104px;
  }

  .main-wrapper .executive-dashboard .stats-grid > .stat-card p:nth-child(2) {
    font-size: 20px !important;
  }
}

/* Keep the approved preview layer last in the cascade. */
.main-wrapper .executive-dashboard.spendkart-dashboard .stat-card {
  border: 1px solid #e5e9ef !important;
  border-radius: 18px !important;
  background: rgba(255, 255, 255, .98) !important;
  box-shadow: 0 1px 2px rgba(17, 31, 48, .025), 0 12px 30px rgba(17, 31, 48, .035) !important;
}

.main-wrapper .executive-dashboard.spendkart-dashboard .brand-banner {
  min-height: 84px;
  padding: 16px 22px !important;
  border-top: 0 !important;
  background: radial-gradient(circle at 91% 22%, rgba(209, 164, 59, .12), transparent 15rem), linear-gradient(106deg, #fff 0%, #f8f9fb 100%) !important;
}

.main-wrapper .executive-dashboard.spendkart-dashboard .stats-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  gap: 14px !important;
}

.main-wrapper .executive-dashboard.spendkart-dashboard .stats-grid > .stat-card {
  min-height: 126px;
  padding: 18px !important;
  border-left-width: 1px !important;
  box-shadow: none !important;
}

.main-wrapper .executive-dashboard.spendkart-dashboard .stats-grid > .stat-card:hover {
  border-color: #cbd3dd !important;
  transform: translateY(-3px);
  box-shadow: 0 15px 34px rgba(23, 39, 57, .075) !important;
}

.main-wrapper .executive-dashboard.spendkart-dashboard .stats-grid > .stat-card p:first-child {
  color: #667085 !important;
  font-size: 12px !important;
  letter-spacing: .015em !important;
}

.main-wrapper .executive-dashboard.spendkart-dashboard .stats-grid > .stat-card p:nth-child(2) {
  color: #182230 !important;
  font-size: 24px !important;
  font-weight: 700 !important;
  letter-spacing: -.04em;
}

.main-wrapper .executive-dashboard.spendkart-dashboard .stats-grid > .stat-card p:last-child {
  color: #8a94a3 !important;
  font-size: 11.5px !important;
}

.main-wrapper .executive-dashboard.spendkart-dashboard .chart-card,
.main-wrapper .executive-dashboard.spendkart-dashboard .region-summary-card {
  border-radius: 20px !important;
  box-shadow: none !important;
}

.main-wrapper .executive-dashboard.spendkart-dashboard .data-table thead th {
  height: 48px;
  background: #f7f8fa !important;
  color: #667085 !important;
}

@media (max-width: 760px) {
  .main-wrapper .executive-dashboard.spendkart-dashboard .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

/* SpendKart preview v2: stronger composition and brand contrast. */
.main-wrapper:has(.spendkart-dashboard) {
  background:
    radial-gradient(circle at 84% -8%, rgba(209, 164, 59, .085), transparent 26rem),
    linear-gradient(180deg, #eef1f4 0%, #f6f7f9 24rem) !important;
}

.main-wrapper .executive-dashboard.spendkart-dashboard .brand-banner {
  min-height: 104px;
  padding: 20px 24px !important;
  border: 0 !important;
  background:
    radial-gradient(circle at 87% 18%, rgba(209, 164, 59, .22), transparent 17rem),
    linear-gradient(116deg, #13283e 0%, #203f5d 62%, #294d6c 100%) !important;
  box-shadow: 0 18px 38px rgba(22, 42, 62, .16) !important;
}

.main-wrapper .executive-dashboard.spendkart-dashboard .brand-banner::before {
  content: "经营数据中心";
  position: absolute;
  right: 26px;
  bottom: 20px;
  color: rgba(255, 255, 255, .62);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .14em;
}

.main-wrapper .executive-dashboard.spendkart-dashboard .brand-banner::after {
  border-color: rgba(255, 255, 255, .10);
  box-shadow: 0 0 0 24px rgba(255, 255, 255, .035), 0 0 0 48px rgba(255, 255, 255, .022);
}

.main-wrapper .executive-dashboard.spendkart-dashboard .brand-banner img {
  width: 148px !important;
  height: auto !important;
  max-height: 52px;
  object-fit: contain;
}

.main-wrapper .executive-dashboard.spendkart-dashboard .brand-banner h1 {
  color: #ffffff !important;
  font-size: 22px !important;
}

.main-wrapper .executive-dashboard.spendkart-dashboard .brand-banner p {
  color: rgba(230, 238, 246, .68) !important;
  letter-spacing: .025em;
}

.main-wrapper .executive-dashboard.spendkart-dashboard .liquid-panel {
  display: flex !important;
  flex-wrap: wrap !important;
  border: 0 !important;
  border-radius: 16px !important;
  box-shadow: 0 8px 24px rgba(22, 42, 62, .055) !important;
}

.main-wrapper .executive-dashboard.spendkart-dashboard .liquid-panel > select {
  width: auto !important;
  min-width: 112px;
  flex: 1 1 118px;
  max-width: 145px;
}

.main-wrapper .executive-dashboard.spendkart-dashboard .data-status-bar {
  border: 1px solid rgba(209, 218, 227, .88) !important;
  background: rgba(255, 255, 255, .74) !important;
  backdrop-filter: blur(14px);
}

.main-wrapper .executive-dashboard.spendkart-dashboard .stats-grid > .stat-card:first-child {
  border: 0 !important;
  background: linear-gradient(145deg, #18324c 0%, #274d70 100%) !important;
  box-shadow: 0 16px 30px rgba(22, 48, 72, .16) !important;
}

.main-wrapper .executive-dashboard.spendkart-dashboard .stats-grid > .stat-card:first-child p:first-child,
.main-wrapper .executive-dashboard.spendkart-dashboard .stats-grid > .stat-card:first-child p:last-child {
  color: rgba(225, 235, 244, .70) !important;
}

.main-wrapper .executive-dashboard.spendkart-dashboard .stats-grid > .stat-card:first-child p:nth-child(2) {
  color: #ffffff !important;
}

.main-wrapper .executive-dashboard.spendkart-dashboard .stats-grid > .stat-card:first-child > .flex > div:first-child {
  background: rgba(255, 255, 255, .11) !important;
  color: #f0c768 !important;
}

.main-wrapper .executive-dashboard.spendkart-dashboard .stats-grid > .stat-card:nth-child(2) {
  background: linear-gradient(155deg, #fff 0%, #fbf7ee 100%) !important;
}

.main-wrapper .executive-dashboard.spendkart-dashboard .chart-card {
  padding: 26px 26px 22px;
  border: 0 !important;
  box-shadow: 0 13px 34px rgba(22, 42, 62, .075) !important;
}

.main-wrapper .executive-dashboard.spendkart-dashboard .region-summary-card {
  border: 0 !important;
  box-shadow: 0 13px 34px rgba(22, 42, 62, .065) !important;
}

@media (max-width: 760px) {
  .main-wrapper .executive-dashboard.spendkart-dashboard .brand-banner::before { display: none; }
  .main-wrapper .executive-dashboard.spendkart-dashboard .brand-banner img { width: 116px !important; }
}

/* ===== Restrained liquid gunmetal sidebar preview (2026-08-10) ===== */
.sidebar {
  isolation: isolate;
  background:
    radial-gradient(ellipse at 18% 8%, rgba(174, 197, 216, .15), transparent 24%),
    radial-gradient(ellipse at 86% 74%, rgba(71, 111, 143, .12), transparent 34%),
    linear-gradient(118deg, #0c1b2a 0%, #162d42 35%, #0e2032 62%, #1d3549 100%) !important;
  background-size: 160% 160% !important;
  box-shadow: inset -1px 0 rgba(218, 231, 241, .12), 16px 0 42px rgba(10, 25, 39, .15) !important;
  animation: gunmetalFlow 18s ease-in-out infinite alternate;
}

.sidebar::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(104deg, transparent 0 24%, rgba(255, 255, 255, .055) 37%, transparent 49% 100%),
    repeating-linear-gradient(91deg, rgba(255,255,255,.012) 0 1px, transparent 1px 4px);
  background-size: 220% 100%, 100% 100%;
  mix-blend-mode: screen;
  opacity: .82;
  animation: metalSheen 14s cubic-bezier(.45, 0, .55, 1) infinite;
}

.sidebar::after {
  content: "";
  position: absolute;
  inset: 0 0 0 auto;
  width: 1px;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(180deg, transparent 2%, rgba(232, 239, 245, .42) 20%, rgba(209, 164, 59, .38) 52%, rgba(232, 239, 245, .20) 82%, transparent 98%);
  box-shadow: -5px 0 18px rgba(140, 176, 204, .10);
}

@keyframes gunmetalFlow {
  0% { background-position: 10% 10%; }
  100% { background-position: 88% 72%; }
}

@keyframes metalSheen {
  0%, 18% { background-position: 180% 0, 0 0; opacity: .34; }
  52% { opacity: .78; }
  82%, 100% { background-position: -90% 0, 0 0; opacity: .38; }
}

.sidebar-brand {
  position: relative;
  background: linear-gradient(180deg, rgba(255, 255, 255, .045), rgba(255, 255, 255, .012));
  border-bottom-color: rgba(199, 215, 228, .12) !important;
}

.sidebar-brand::after {
  content: "";
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: -1px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(209, 164, 59, .54), transparent);
}

.sidebar .nav-item {
  position: relative;
  overflow: hidden;
  color: #bdc9d4;
  border: 1px solid transparent;
}

.sidebar .nav-item:hover {
  color: #fff;
  border-color: rgba(201, 216, 228, .08);
  background: linear-gradient(100deg, rgba(255,255,255,.075), rgba(255,255,255,.025)) !important;
  box-shadow: inset 0 1px rgba(255,255,255,.035);
}

.sidebar .nav-item.active {
  color: #fff !important;
  border-color: rgba(218, 229, 237, .13);
  background:
    radial-gradient(circle at 12% 50%, rgba(209, 164, 59, .19), transparent 36%),
    linear-gradient(104deg, rgba(119, 153, 180, .24), rgba(67, 99, 125, .13)) !important;
  box-shadow: inset 2px 0 #d4aa4a, inset 0 1px rgba(255,255,255,.08), 0 8px 18px rgba(5, 18, 30, .14) !important;
}

.sidebar .nav-item.active::after {
  content: "";
  position: absolute;
  top: -60%;
  left: -42%;
  width: 28%;
  height: 220%;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.13), transparent);
  transform: rotate(16deg);
  animation: activeMetalGlint 6.8s ease-in-out infinite;
}

@keyframes activeMetalGlint {
  0%, 58% { left: -42%; opacity: 0; }
  68% { opacity: .65; }
  86%, 100% { left: 124%; opacity: 0; }
}

.sidebar .absolute.bottom-0 {
  background: linear-gradient(180deg, transparent, rgba(5, 17, 28, .20));
  border-top-color: rgba(198, 215, 228, .10) !important;
}

/* The KPI palette now repeats the dashboard's data semantics. */
.main-wrapper .executive-dashboard.spendkart-dashboard .stats-grid > .stat-card:nth-child(2) {
  border-color: rgba(209, 164, 59, .30) !important;
  background: linear-gradient(150deg, #fff 0%, #fbf5e9 100%) !important;
}

.main-wrapper .executive-dashboard.spendkart-dashboard .stats-grid > .stat-card:nth-child(2) > .flex > div:first-child {
  background: rgba(209, 164, 59, .13) !important;
  color: #9b7420 !important;
}

.main-wrapper .executive-dashboard.spendkart-dashboard .stats-grid > .stat-card:nth-child(3) {
  border-color: rgba(25, 118, 110, .22) !important;
  background: linear-gradient(150deg, #fff 0%, #edf7f5 100%) !important;
}

.main-wrapper .executive-dashboard.spendkart-dashboard .stats-grid > .stat-card:nth-child(3) > .flex > div:first-child {
  background: rgba(25, 118, 110, .10) !important;
  color: #19766e !important;
}

.main-wrapper .executive-dashboard.spendkart-dashboard .stats-grid > .stat-card:nth-child(4) {
  background: linear-gradient(150deg, #fff 0%, #f2f5f8 100%) !important;
}

.main-wrapper .executive-dashboard.spendkart-dashboard .stats-grid > .stat-card:nth-child(5) {
  border-color: rgba(79, 111, 145, .22) !important;
  background: linear-gradient(150deg, #fff 0%, #eef3f8 100%) !important;
}

@media (prefers-reduced-motion: reduce) {
  .sidebar,
  .sidebar::before,
  .sidebar .nav-item.active::after { animation: none !important; }
}

/* ===== Whole-site premium workspace system (2026-08-10) ===== */
:root {
  --gk-ink: #142b42;
  --gk-navy: #24486b;
  --gk-gold: #d1a43b;
  --gk-teal: #19766e;
  --gk-muted: #65788a;
  --gk-line: #dbe3ea;
  --gk-canvas: #f4f7f9;
  --gk-warm: #fbf8f1;
}

.main-content {
  background:
    radial-gradient(circle at 92% 2%, rgba(66, 106, 137, .075), transparent 28%),
    linear-gradient(180deg, #f7f9fb 0%, #f2f5f7 100%) !important;
  min-width: 0;
  overflow-x: clip;
}

.main-wrapper,
.main-wrapper main {
  min-width: 0;
  max-width: 100%;
}

.main-wrapper .premium-workspace {
  --tw-space-y-reverse: 0;
  color: var(--gk-ink);
}

.main-wrapper .premium-workspace > .stat-card,
.main-wrapper .premium-workspace > template > .stat-card,
.main-wrapper .premium-workspace .stat-card {
  border: 1px solid rgba(210, 220, 229, .92) !important;
  border-radius: 18px !important;
  background: rgba(255, 255, 255, .94) !important;
  box-shadow: 0 12px 34px rgba(21, 45, 67, .065) !important;
}

.main-wrapper .premium-workspace .liquid-panel,
.main-wrapper .premium-workspace > template > .stat-card:first-child {
  position: relative;
  overflow: hidden;
  border: 0 !important;
  background:
    linear-gradient(90deg, rgba(36, 72, 107, .045), transparent 36%),
    rgba(255, 255, 255, .96) !important;
  box-shadow: 0 10px 28px rgba(21, 45, 67, .055) !important;
}

.main-wrapper .premium-workspace .liquid-panel::before {
  content: "";
  position: absolute;
  left: 0;
  top: 16px;
  bottom: 16px;
  width: 3px;
  border-radius: 0 4px 4px 0;
  background: linear-gradient(180deg, var(--gk-navy), var(--gk-gold));
}

.main-wrapper .premium-workspace h2,
.main-wrapper .premium-workspace h3,
.main-wrapper .premium-workspace .font-bold {
  color: var(--gk-ink) !important;
  letter-spacing: -.015em;
}

.main-wrapper .premium-workspace h3 {
  font-size: 17px !important;
  line-height: 1.45;
}

.main-wrapper .premium-workspace .text-slate-400 {
  color: #718497 !important;
}

.main-wrapper .premium-workspace .text-slate-500,
.main-wrapper .premium-workspace .text-slate-600 {
  color: #556b7f !important;
}

.main-wrapper .premium-workspace select,
.main-wrapper .premium-workspace .form-input {
  min-height: 40px;
  border: 1px solid #d7e0e8 !important;
  border-radius: 11px !important;
  background-color: #fbfcfd !important;
  color: #334e68 !important;
  box-shadow: inset 0 1px 1px rgba(20, 43, 66, .025);
}

.main-wrapper .premium-workspace select:focus,
.main-wrapper .premium-workspace .form-input:focus {
  border-color: rgba(36, 72, 107, .55) !important;
  box-shadow: 0 0 0 3px rgba(36, 72, 107, .09) !important;
}

.main-wrapper .premium-workspace .kpi-grid,
.main-wrapper .premium-workspace .stats-grid {
  gap: 16px !important;
}

.main-wrapper .premium-workspace .kpi-grid > .stat-card,
.main-wrapper .premium-workspace .stats-grid > .stat-card,
.main-wrapper .premium-workspace.unified-stats-page > .grid > .stat-card {
  position: relative;
  overflow: hidden;
  min-height: 128px;
  border-left: 0 !important;
  background: linear-gradient(150deg, #fff 0%, #f6f9fb 100%) !important;
  box-shadow: 0 10px 28px rgba(21, 45, 67, .055) !important;
}

.main-wrapper .premium-workspace .kpi-grid > .stat-card::before,
.main-wrapper .premium-workspace .stats-grid > .stat-card::before,
.main-wrapper .premium-workspace.unified-stats-page > .grid > .stat-card::before {
  content: "";
  position: absolute;
  left: 20px;
  right: 20px;
  top: 0;
  height: 2px;
  border-radius: 0 0 4px 4px;
  background: linear-gradient(90deg, var(--gk-navy), rgba(36,72,107,.12));
}

.main-wrapper .premium-workspace .kpi-grid > .stat-card:nth-child(2)::before,
.main-wrapper .premium-workspace .stats-grid > .stat-card:nth-child(2)::before,
.main-wrapper .premium-workspace.unified-stats-page > .grid > .stat-card:nth-child(2)::before {
  background: linear-gradient(90deg, var(--gk-gold), rgba(209,164,59,.12));
}

.main-wrapper .premium-workspace .kpi-grid > .stat-card:nth-child(3)::before,
.main-wrapper .premium-workspace .stats-grid > .stat-card:nth-child(3)::before,
.main-wrapper .premium-workspace.unified-stats-page > .grid > .stat-card:nth-child(3)::before {
  background: linear-gradient(90deg, var(--gk-teal), rgba(25,118,110,.12));
}

.main-wrapper .premium-workspace .kpi-grid .text-lg,
.main-wrapper .premium-workspace .kpi-grid .text-2xl,
.main-wrapper .premium-workspace .stats-grid .text-lg,
.main-wrapper .premium-workspace .stats-grid .text-2xl {
  font-size: 25px !important;
  line-height: 1.15 !important;
  font-weight: 750 !important;
  color: var(--gk-ink) !important;
  letter-spacing: -.035em;
}

.main-wrapper .premium-workspace .data-table {
  border-collapse: separate;
  border-spacing: 0;
}

.main-wrapper .premium-workspace .data-table thead,
.main-wrapper .premium-workspace .data-table thead.bg-slate-50 {
  background: #edf2f5 !important;
}

.main-wrapper .premium-workspace .data-table th {
  height: 48px;
  color: #4c6479 !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  letter-spacing: .025em !important;
  text-transform: none !important;
  border-bottom: 1px solid #d8e1e8 !important;
}

.main-wrapper .premium-workspace .data-table td {
  height: 52px;
  color: #334e68;
  border-bottom-color: #e5ebf0 !important;
}

.main-wrapper .premium-workspace .data-table tbody tr:hover td {
  background: #f7f9fb !important;
}

.main-wrapper .premium-workspace .btn-primary,
.main-wrapper .premium-workspace button.bg-primary-600 {
  border-color: transparent !important;
  background: linear-gradient(135deg, #173551, #294f70) !important;
  color: #fff !important;
  box-shadow: 0 7px 16px rgba(26, 57, 84, .15);
}

.main-wrapper .report-workspace > template > .stat-card:nth-child(2),
.main-wrapper .report-workspace .stat-card.flex.items-center.gap-2 {
  padding: 7px !important;
  border: 1px solid #dce4eb !important;
  border-radius: 14px !important;
  background: #eef2f5 !important;
  box-shadow: none !important;
}

.main-wrapper .report-workspace .stat-card.flex.items-center.gap-2 button {
  min-width: 118px;
  border-radius: 10px !important;
}

.main-wrapper .report-workspace .stat-card.p-0,
.main-wrapper .accounts-workspace > section,
.main-wrapper .upload-workspace .upload-overview-grid > .stat-card {
  overflow: hidden;
}

.main-wrapper .upload-workspace .upload-card-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  gap: 14px !important;
}

.main-wrapper .upload-workspace .upload-card-grid > .stat-card {
  min-width: 0;
  padding: 18px !important;
}

.main-wrapper .upload-workspace .upload-card-grid .border-dashed {
  padding: 18px 10px !important;
  border: 1px dashed #bdcad5 !important;
  background: #f8fafb;
}

.main-wrapper .accounts-workspace form {
  border: 1px solid #dde5eb;
  background: #f6f8fa !important;
}

/* Dashboard KPIs now form one coherent set: hierarchy comes from accents, not one dark tile. */
.main-wrapper .executive-dashboard.spendkart-dashboard .stats-grid > .stat-card:first-child {
  border: 1px solid rgba(36, 72, 107, .20) !important;
  background: linear-gradient(150deg, #fff 0%, #edf3f7 100%) !important;
  box-shadow: 0 10px 28px rgba(21, 45, 67, .07) !important;
}

.main-wrapper .executive-dashboard.spendkart-dashboard .stats-grid > .stat-card:first-child p:first-child,
.main-wrapper .executive-dashboard.spendkart-dashboard .stats-grid > .stat-card:first-child p:last-child {
  color: #657b8e !important;
}

.main-wrapper .executive-dashboard.spendkart-dashboard .stats-grid > .stat-card:first-child p:nth-child(2) {
  color: var(--gk-ink) !important;
}

.main-wrapper .executive-dashboard.spendkart-dashboard .stats-grid > .stat-card:first-child > .flex > div:first-child {
  background: rgba(36, 72, 107, .09) !important;
  color: var(--gk-navy) !important;
}

@media (max-width: 1180px) {
  .main-wrapper .executive-dashboard.spendkart-dashboard .liquid-panel > .ml-auto.flex {
    width: 100%;
    margin-left: 0 !important;
    justify-content: flex-end;
    flex-wrap: wrap;
  }
}

@media (max-width: 1180px) {
  .main-wrapper .upload-workspace .upload-card-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 760px) {
  .main-wrapper .upload-workspace .upload-card-grid {
    grid-template-columns: 1fr !important;
  }
  .main-wrapper .premium-workspace .kpi-grid,
  .main-wrapper .premium-workspace .stats-grid { gap: 12px !important; }
}

/* ===== AI 数据助手（2026-08-19）===== */
.main-wrapper .ai-workspace { max-width: 960px; margin: 0 auto; }
.main-wrapper .ai-chat-card {
  background: #fff; border-radius: 16px; border: 1px solid #e2e8f0;
  box-shadow: 0 10px 30px rgba(15, 40, 68, .08); overflow: hidden;
  display: flex; flex-direction: column; height: calc(100vh - 220px); min-height: 480px;
}
.main-wrapper .ai-chat-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; border-bottom: 1px solid #eef2f6;
  background: linear-gradient(90deg, #f8fafc, #fff);
}
.main-wrapper .ai-clear-btn {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 12px; color: #65788a; background: #f1f5f9;
  border: 1px solid #e2e8f0; border-radius: 8px; padding: 6px 12px;
  cursor: pointer; transition: all .2s;
}
.main-wrapper .ai-clear-btn:hover { background: #fee2e2; color: #b91c1c; border-color: #fecaca; }
.main-wrapper .ai-chat-body {
  flex: 1; overflow-y: auto; padding: 20px; background: #f8fafc;
  display: flex; flex-direction: column; gap: 14px;
}
.main-wrapper .ai-empty { text-align: center; padding: 40px 20px; }
.main-wrapper .ai-suggestions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 16px; }
.main-wrapper .ai-suggestion-chip {
  display: inline-flex; align-items: center;
  font-size: 13px; color: #24486b; background: #fff;
  border: 1px solid #cbd9e8; border-radius: 999px; padding: 8px 16px;
  cursor: pointer; transition: all .2s;
}
.main-wrapper .ai-suggestion-chip:hover { background: #24486b; color: #fff; border-color: #24486b; }
.main-wrapper .ai-msg { display: flex; }
.main-wrapper .ai-msg-user { justify-content: flex-end; }
.main-wrapper .ai-msg-ai { justify-content: flex-start; }
.main-wrapper .ai-bubble {
  max-width: 82%; border-radius: 14px; padding: 12px 16px;
  box-shadow: 0 2px 8px rgba(15, 40, 68, .06);
}
.main-wrapper .ai-msg-user .ai-bubble {
  background: linear-gradient(135deg, #24486b, #1d3a57); color: #fff;
  border-bottom-right-radius: 4px;
}
.main-wrapper .ai-msg-ai .ai-bubble {
  background: #fff; color: #142b42; border: 1px solid #e2e8f0;
  border-bottom-left-radius: 4px;
}
.main-wrapper .ai-bubble-error { background: #fef2f2 !important; color: #991b1b !important; border-color: #fecaca !important; }
.main-wrapper .ai-bubble-role {
  display: block; font-size: 11px; font-weight: 700; letter-spacing: .05em;
  margin-bottom: 4px; opacity: .7; text-transform: uppercase;
}
.main-wrapper .ai-thinking { display: inline-flex; gap: 5px; padding: 6px 2px; }
.main-wrapper .ai-thinking span {
  width: 8px; height: 8px; border-radius: 50%; background: #24486b;
  animation: ai-bounce 1.2s infinite ease-in-out;
}
.main-wrapper .ai-thinking span:nth-child(2) { animation-delay: .15s; }
.main-wrapper .ai-thinking span:nth-child(3) { animation-delay: .3s; }
@keyframes ai-bounce { 0%, 80%, 100% { transform: scale(.6); opacity: .4; } 40% { transform: scale(1); opacity: 1; } }
.main-wrapper .ai-chat-input {
  display: flex; gap: 10px; padding: 14px 20px;
  border-top: 1px solid #eef2f6; background: #fff;
}
.main-wrapper .ai-input {
  flex: 1; border: 1px solid #cbd9e8; border-radius: 10px;
  padding: 12px 16px; font-size: 14px; color: #142b42;
  outline: none; transition: border-color .2s, box-shadow .2s;
}
.main-wrapper .ai-input:focus { border-color: #24486b; box-shadow: 0 0 0 3px rgba(36, 72, 107, .12); }
.main-wrapper .ai-input:disabled { background: #f1f5f9; color: #94a3b8; }
.main-wrapper .ai-send-btn {
  width: 46px; height: 46px; border-radius: 10px; border: none;
  background: linear-gradient(135deg, #24486b, #1d3a57); color: #fff;
  font-size: 15px; cursor: pointer; transition: all .2s; flex-shrink: 0;
}
.main-wrapper .ai-send-btn:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(36, 72, 107, .3); }
.main-wrapper .ai-send-btn:disabled { background: #cbd5e1; cursor: not-allowed; }
@media (max-width: 760px) {
  .main-wrapper .ai-chat-card { height: calc(100vh - 180px); }
  .main-wrapper .ai-bubble { max-width: 92%; }
}

/* ===== AI 回答 Markdown 渲染（2026-08-19）===== */
.main-wrapper .ai-bubble .ai-md-table {
  width: 100%; border-collapse: collapse; margin: 8px 0; font-size: 13px;
}
.main-wrapper .ai-bubble .ai-md-table th {
  background: rgba(36, 72, 107, .08); color: #24486b; font-weight: 700;
  padding: 6px 10px; border: 1px solid #dbe3ea; text-align: left;
}
.main-wrapper .ai-bubble .ai-md-table td {
  padding: 5px 10px; border: 1px solid #e5ebf1; color: inherit;
}
.main-wrapper .ai-msg-user .ai-bubble .ai-md-table th { background: rgba(255,255,255,.15); color: #fff; border-color: rgba(255,255,255,.25); }
.main-wrapper .ai-msg-user .ai-bubble .ai-md-table td { border-color: rgba(255,255,255,.2); }
.main-wrapper .ai-bubble .ai-md-list { margin: 6px 0 6px 4px; padding-left: 20px; list-style: disc; }
.main-wrapper .ai-bubble .ai-md-list li { margin: 3px 0; list-style: disc; }
.main-wrapper .ai-bubble .ai-md-quote {
  margin: 8px 0; padding: 6px 12px; border-left: 3px solid #d1a43b;
  background: rgba(209, 164, 59, .08); border-radius: 0 6px 6px 0;
  font-size: 13px; color: inherit;
}
.main-wrapper .ai-bubble .ai-md-code {
  margin: 8px 0; padding: 10px 12px; background: #f1f5f9;
  border: 1px solid #e2e8f0; border-radius: 8px; font-size: 12.5px;
  overflow-x: auto; font-family: Consolas, Monaco, monospace;
}
.main-wrapper .ai-msg-user .ai-bubble .ai-md-code { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.2); }
.main-wrapper .ai-bubble .ai-md-heading { margin: 8px 0 4px; font-weight: 700; }
.main-wrapper .ai-bubble code { background: rgba(36,72,107,.08); padding: 1px 5px; border-radius: 4px; font-size: 12.5px; }
.main-wrapper .ai-msg-user .ai-bubble code { background: rgba(255,255,255,.18); }

/* ===== AI 悬浮小组件（2026-08-19，每页右下角）===== */
.main-wrapper .ai-widget { position: fixed; right: 22px; top: 50%; transform: translateY(-50%); z-index: 9999; font-family: inherit; }
.main-wrapper .ai-widget-fab {
  width: 56px; height: 56px; border-radius: 50%; border: none; cursor: pointer;
  background: linear-gradient(135deg, #24486b, #1d3a57); color: #fff;
  font-size: 20px; box-shadow: 0 6px 20px rgba(20, 40, 68, .35);
  display: flex; align-items: center; justify-content: center;
  transition: transform .2s, box-shadow .2s;
}
.main-wrapper .ai-widget-fab:hover { transform: translateY(-2px) scale(1.04); box-shadow: 0 10px 26px rgba(20, 40, 68, .42); }
.main-wrapper .ai-widget-panel {
  position: fixed; right: 22px; top: 50%; transform: translateY(-50%);
  width: 400px; max-width: calc(100vw - 44px);
  height: min(600px, calc(100vh - 120px));
  background: #fff; border-radius: 16px; border: 1px solid #e2e8f0;
  box-shadow: 0 18px 50px rgba(15, 40, 68, .18);
  display: flex; flex-direction: column; overflow: hidden;
}
.main-wrapper .ai-widget-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; border-bottom: 1px solid #eef2f6;
  background: linear-gradient(90deg, #f8fafc, #fff); flex-shrink: 0;
}
.main-wrapper .ai-widget-clear {
  width: 32px; height: 32px; border-radius: 8px; border: 1px solid #e2e8f0;
  background: #f1f5f9; color: #65788a; cursor: pointer; font-size: 13px;
  display: flex; align-items: center; justify-content: center; transition: all .2s;
}
.main-wrapper .ai-widget-clear:hover { background: #fee2e2; color: #b91c1c; border-color: #fecaca; }
.main-wrapper .ai-widget-body {
  flex: 1; overflow-y: auto; padding: 14px 16px; background: #f8fafc;
  display: flex; flex-direction: column; gap: 12px;
}
.main-wrapper .ai-widget-empty { text-align: center; padding: 24px 8px; }
.main-wrapper .ai-widget-empty .ai-suggestions { flex-direction: column; align-items: stretch; gap: 6px; margin-top: 12px; }
.main-wrapper .ai-widget-empty .ai-suggestion-chip { justify-content: flex-start; text-align: left; }
@media (max-width: 760px) {
  .main-wrapper .ai-widget { right: 14px; bottom: 14px; }
  .main-wrapper .ai-widget-panel { width: calc(100vw - 28px); height: calc(100vh - 140px); bottom: 60px; }
}

/* ===== AI 悬浮头像小组件 v2（2026-08-19，可拖拽，腾讯云 ICP 备案助手风格）===== */
.main-wrapper .ai-widget { position: fixed; right: 22px; top: 50%; transform: translateY(-50%); z-index: 9999; font-family: inherit; }
.main-wrapper .ai-widget-fab {
  width: 56px; height: 56px; border-radius: 50%; border: none; cursor: grab;
  background: transparent; padding: 0; position: relative; touch-action: none;
  -webkit-user-select: none; user-select: none;
}
.main-wrapper .ai-widget-fab:active { cursor: grabbing; }
.main-wrapper .ai-widget-avatar {
  position: absolute; inset: 0; border-radius: 50%;
  background: linear-gradient(135deg, #24486b, #1d3a57); color: #fff;
  font-size: 15px; font-weight: 800; letter-spacing: .5px; border: 2px solid #fff;
  box-shadow: 0 4px 14px rgba(20, 40, 68, .35);
  display: flex; align-items: center; justify-content: center;
  transition: transform .15s, box-shadow .15s;
}
.main-wrapper .ai-widget-fab:hover .ai-widget-avatar { transform: scale(1.05); box-shadow: 0 6px 18px rgba(20, 40, 68, .45); }
.main-wrapper .ai-widget-badge {
  position: absolute; right: -1px; bottom: -1px; width: 20px; height: 20px;
  border-radius: 50%; background: #d1a43b; color: #fff; font-size: 10px;
  border: 2px solid #fff; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 6px rgba(20, 40, 68, .3);
}
.main-wrapper .ai-widget-panel {
  position: fixed; right: 22px; top: 50%; transform: translateY(-50%);
  width: 400px; max-width: calc(100vw - 44px);
  height: min(600px, calc(100vh - 120px));
  background: #fff; border-radius: 16px; border: 1px solid #e2e8f0;
  box-shadow: 0 18px 50px rgba(15, 40, 68, .18);
  display: flex; flex-direction: column; overflow: hidden;
}

/* ==========================================================================
   GitHub Primer 色调覆盖层 (2026-08-19)
   目的：去除 AI 感（靛蓝紫、深蓝渐变、玻璃拟态、大圆角重阴影），
   统一到 GitHub Primer 中性色调：白底 / #f6f8fa 浅灰 / 1px #d0d7de 边框 /
   文字 #1f2328 #59636e / 主操作绿 #0969da / 链接蓝 #0969da（克制使用）。
   本层放在文件末尾保证覆盖优先，可在出问题时整体删除回滚。
   ========================================================================== */

/* ---------- 1. 色板变量 ---------- */
:root {
  --primary: #0969da;          /* GitHub 蓝：主操作/按钮 */
  --primary-light: #218bff;    /* hover 态 */
  --primary-dark: #0550ae;     /* active 态 */
  --success: #1a7f37 !important;
  --warning: #9a6700 !important;
  --danger: #cf222e !important;
  --info: #0969da !important;
  --bg: #f6f8fa !important;
  --card-bg: #ffffff !important;
  --text: #1f2328 !important;
  --text-muted: #59636e !important;
  --text-subtle: #6e7781 !important;
  --border: #d0d7de !important;
  --brand-gold: #0969da;       /* 原品牌金改为蓝色强调 */
  --analytics-accent: #0969da !important;
}

/* ---------- 2. 页面基底：去渐变 ---------- */
html, body {
  background: #f6f8fa !important;
  color: #1f2328 !important;
}

body {
  color: #1f2328 !important;
}

/* ---------- 3. 登录页：白底卡片，去紫色渐变/光晕 ---------- */
.login-bg {
  background: #f6f8fa !important;
  min-height: 100vh !important;
}
.login-bg::before,
.login-bg::after {
  background: none !important;
  filter: none !important;
  animation: none !important;
}
.login-card {
  background: #ffffff !important;
  backdrop-filter: none !important;
  border: 1px solid #d0d7de !important;
  border-radius: 10px !important;
  box-shadow: 0 1px 3px rgba(31, 35, 40, 0.08) !important;
}
.login-card h1 { color: #1f2328 !important; }
.login-card .text-slate-500 { color: #59636e !important; }
.login-card .form-label { color: #1f2328; }

/* ---------- 4. 侧边栏：干净深灰底（GitHub 经典深色，无渐变无阴影） ---------- */
.sidebar {
  background: #24292f !important;
  color: #c9d1da !important;
  border-right: 1px solid #1f2428 !important;
  box-shadow: none !important;
}
.sidebar-brand { border-bottom: 1px solid #343b43 !important; }
.nav-item {
  margin: 2px 10px !important;
  width: calc(100% - 20px) !important;
  border-left: 0 !important;
  border-radius: 6px !important;
  color: #9baabd !important;
  font-weight: 500 !important;
}
.nav-item i { color: #9baabd !important; }
.nav-item:hover {
  background: rgba(255, 255, 255, 0.08) !important;
  color: #f0f6fc !important;
  transform: none !important;
}
.nav-item.active {
  background: rgba(9, 105, 218, 0.22) !important;
  color: #79b8ff !important;
  border-left-color: transparent !important;
  box-shadow: inset 2px 0 0 #0969da !important;
}
.nav-item.active i { color: #79b8ff !important; }
.nav-item:focus-visible { outline: 3px solid #ddf4ff; outline-offset: -3px; }
.sidebar .text-slate-600 { color: #8b98a5 !important; }
.sidebar .border-slate-700\/50, .sidebar [class*="border-slate-700"] { border-color: #343b43 !important; }
.sidebar .text-slate-300 { color: #e6edf3 !important; }
.sidebar .text-slate-500 { color: #8b98a5 !important; }
.sidebar .hover\:bg-white\/5:hover { background: rgba(255,255,255,0.08) !important; }
.sidebar .bg-primary-500, .sidebar [class*="bg-primary-500"] {
  background: #0969da !important;
}

/* ---------- 5. 头部：白底去玻璃拟态 ---------- */
.main-wrapper > header {
  background: #ffffff !important;
  border-color: #d0d7de !important;
  backdrop-filter: none !important;
  border-bottom: 1px solid #d0d7de !important;
}
.main-wrapper > header::after {
  background: none !important;
  animation: none !important;
}

/* ---------- 6. 卡片：白底 + 1px 边框 + 小圆角，去阴影 ---------- */
.stat-card {
  background: #ffffff !important;
  border: 1px solid #d0d7de !important;
  border-radius: 8px !important;
  box-shadow: none !important;
  padding: 18px 20px !important;
}
.stat-card:hover {
  transform: none !important;
  border-color: #9fb3c8 !important;
  box-shadow: none !important;
}
.stat-card h1, .stat-card h2, .stat-card h3,
.main-wrapper h1, .main-wrapper h2, .main-wrapper h3 {
  color: #1f2328 !important;
  letter-spacing: 0 !important;
}

/* ---------- 7. 统一面板（liquid-panel）去渐变 ---------- */
.liquid-panel {
  background: #ffffff !important;
  backdrop-filter: none !important;
  border-color: #d0d7de !important;
  border-radius: 8px !important;
}
.liquid-panel select {
  background-color: #ffffff !important;
  border-color: #d0d7de !important;
  border-radius: 6px !important;
  color: #1f2328 !important;
}
.main-wrapper .unified-stats-page .liquid-panel {
  border-radius: 8px !important;
}

/* ---------- 8. KPI 卡片 ---------- */
.main-wrapper .unified-stats-page .unified-kpi-grid > .stat-card {
  background: #ffffff !important;
  border: 1px solid #d0d7de !important;
  border-left-width: 1px !important;
  border-radius: 8px !important;
  box-shadow: none !important;
}
.main-wrapper .unified-stats-page .unified-kpi-grid > .stat-card:hover {
  transform: none !important;
  border-color: #9fb3c8 !important;
  box-shadow: none !important;
}
.main-wrapper .unified-stats-page .unified-kpi-grid > .stat-card p:first-child { color: #59636e !important; }
.main-wrapper .unified-stats-page .unified-kpi-grid > .stat-card p:nth-child(2) { color: #1f2328 !important; }

/* ---------- 9. 图表卡 / 明细卡 ---------- */
.main-wrapper .unified-stats-page .unified-chart-card,
.main-wrapper .unified-stats-page .unified-detail-card,
.chart-card,
.region-summary-card {
  border-color: #d0d7de !important;
  border-radius: 8px !important;
  box-shadow: none !important;
}
.main-wrapper .unified-stats-page .unified-chart-card h3,
.main-wrapper .unified-stats-page .unified-detail-card h3,
.chart-card h3, .region-summary-card h3 {
  color: #1f2328 !important;
}
.main-wrapper .unified-stats-page .unified-detail-card > div:first-child {
  background: #f6f8fa !important;
  border-bottom-color: #d0d7de !important;
}
.region-summary-header {
  background: #f6f8fa !important;
  border-bottom-color: #d0d7de !important;
}
.region-summary-count {
  background: #eef1f4 !important;
  color: #59636e !important;
}

/* ---------- 10. 表格：GitHub 风格 ---------- */
.data-table thead th,
.stat-card .data-table thead th,
.region-summary-card .data-table thead th {
  background: #f6f8fa !important;
  color: #59636e !important;
  font-weight: 600 !important;
  border-bottom: 1px solid #d0d7de !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
}
.data-table tbody td {
  color: #24292f !important;
  border-bottom: 1px solid #eaeef2 !important;
}
.data-table tbody tr:hover { background: #f6f8fa; }
.data-table tfoot td { color: #1f2328; }

/* ---------- 11. 按钮：GitHub 语义 ---------- */
.btn { border-radius: 6px; }
.btn-primary {
  background: #0969da !important;
  color: #fff !important;
}
.btn-primary:hover { background: #0550ae; }
.btn-primary:disabled, .btn-primary.disabled {
  background: #b3d4f0 !important;
  color: #fff !important;
  cursor: not-allowed !important;
  opacity: 0.65 !important;
}
.btn-secondary {
  background: #ffffff !important;
  border: 1px solid #d0d7de !important;
  color: #1f2328 !important;
}
.btn-secondary:hover { background: #f6f8fa; }
.btn-danger { background: #cf222e; }
.btn-danger:hover { background: #a40e26; }
.btn-ghost { color: #59636e; }
.btn-ghost:hover { background: #f6f8fa; color: #1f2328; }

/* 覆盖 Tailwind primary 按钮类 */
.bg-primary-600 { background-color: #0969da !important; }
.hover\:bg-primary-700:hover { background-color: #0550ae !important; }
.bg-primary-500 { background-color: #0969da !important; }
.bg-primary-50 { background-color: #ddf4ff !important; }
.text-primary-600 { color: #0969da !important; }
.text-primary-700 { color: #0550ae !important; }
.border-primary-500 { border-color: #0969da !important; }
.border-primary-300 { border-color: #b3d4f0 !important; }
.border-primary-100 { border-color: #ddf4ff !important; }
.accent-primary-600 { accent-color: #0969da; }

/* ---------- 12. 徽章：GitHub 语义色 ---------- */
.badge { border-radius: 6px; font-weight: 600; }
.badge-success { background: #eaf6ec; color: #1a7f37; }
.badge-warning { background: #fff8c5; color: #9a6700; }
.badge-info    { background: #ddf4ff; color: #0969da; }
.badge-danger  { background: #ffebe9; color: #cf222e; }
.badge-default { background: #eef1f4; color: #59636e; }

/* ---------- 13. 表单 ---------- */
.form-input {
  border-color: #d0d7de !important;
  border-radius: 6px !important;
  color: #1f2328 !important;
  background: #ffffff !important;
}
.form-input:focus {
  border-color: #0969da !important;
  box-shadow: 0 0 0 3px rgba(9, 105, 218, 0.15) !important;
}
.form-label { color: #1f2328; }

/* ---------- 14. 分页 / 空状态 ---------- */
.pagination-btn {
  border-color: #d0d7de !important;
  border-radius: 6px !important;
  background: #ffffff !important;
  color: #1f2328 !important;
}
.pagination-btn:hover:not(:disabled) { background: #f6f8fa; }
.pagination-btn.active {
  background: #0969da !important;
  border-color: #0969da !important;
}

/* ---------- 15. Toast ---------- */
.toast { border-radius: 8px; box-shadow: 0 8px 24px rgba(31, 35, 40, 0.12); }

/* ---------- 16. Modal ---------- */
.modal-box {
  border-radius: 10px !important;
  box-shadow: 0 16px 48px rgba(31, 35, 40, 0.18) !important;
  border: 1px solid #d0d7de !important;
}
.modal-backdrop { background: rgba(31, 35, 40, 0.45) !important; backdrop-filter: none; }

/* ---------- 17. 账户弹窗 / 密码弹窗 ---------- */
.account-popover {
  border-color: #d0d7de !important;
  border-radius: 10px !important;
  background: #ffffff !important;
  box-shadow: 0 8px 24px rgba(31, 35, 40, 0.12) !important;
  backdrop-filter: none !important;
}
.account-popover-head { background: #f6f8fa; border-bottom-color: #d0d7de; }
.account-popover-avatar { background: #0969da; box-shadow: none; }
.account-popover-action:hover { background: #f6f8fa; transform: none; }
.account-action-icon { background: #e6effa; color: #0550ae; }
.password-modal-card {
  border-color: #d0d7de !important;
  border-radius: 10px !important;
  box-shadow: 0 16px 48px rgba(31, 35, 40, 0.18) !important;
}
.password-modal-header { background: #ffffff; border-bottom-color: #eaeef2; }
.password-modal-icon { background: #ddf4ff; color: #0969da; }
.password-modal-layer .modal-backdrop { background: rgba(31, 35, 40, 0.45) !important; backdrop-filter: none; }

/* ---------- 18. spendkart 主看板：去渐变装饰 ---------- */
.main-wrapper:has(.spendkart-dashboard) { background: #f6f8fa; }
.spendkart-dashboard { --sk-accent: #0969da; --sk-positive: #0550ae; }
.spendkart-dashboard .stat-card {
  border-radius: 8px !important;
  box-shadow: none !important;
}
.spendkart-dashboard .brand-banner {
  background: #ffffff !important;
  border-bottom: 1px solid #d0d7de !important;
}
.spendkart-dashboard .brand-banner::after { display: none; }
.spendkart-dashboard .liquid-panel { border-radius: 8px !important; }
.spendkart-dashboard .chart-card,
.spendkart-dashboard .region-summary-card { border-radius: 8px !important; }
.spendkart-dashboard .stats-grid > .stat-card:hover {
  border-color: #9fb3c8 !important;
  transform: none !important;
  box-shadow: none !important;
}
.spendkart-dashboard .stats-grid > .stat-card::after { background: #0969da; }

/* ---------- 19. AI 悬浮助手按钮：去深蓝渐变 ---------- */
.main-wrapper .ai-widget-avatar {
  background: #0969da !important;
  border-color: #ffffff !important;
  box-shadow: 0 2px 8px rgba(31, 35, 40, 0.2) !important;
}
.main-wrapper .ai-widget-panel {
  border-radius: 10px !important;
  border-color: #d0d7de !important;
  box-shadow: 0 12px 40px rgba(31, 35, 40, 0.15) !important;
}

/* ---------- 20. 杂项强调色统一 ---------- */
main .border-l-4 { border-left-color: #0969da !important; }
.spinner { border-top-color: #0969da; }
.chart-unit-badge {
  background: #fff8c5 !important;
  border-color: #f2d245 !important;
  color: #9a6700 !important;
  box-shadow: none !important;
}
.skeleton { border-radius: 6px; }
.skeleton-toolbar { border-radius: 8px; }

/* 剩余渐变清理：统一成纯色 */
.region-summary-header { background: #f6f8fa; }
.stat-card { background: #ffffff; }

/* ---------- 21. premium-workspace 按钮：覆盖高优先级深蓝渐变 ---------- */
.main-wrapper .premium-workspace .btn-primary,
.main-wrapper .premium-workspace button.bg-primary-600 {
  border-color: transparent !important;
  background: #0969da !important;
  color: #fff !important;
  box-shadow: none !important;
}
.main-wrapper .premium-workspace .btn-primary:hover,
.main-wrapper .premium-workspace button.bg-primary-600:hover {
  background: #0550ae !important;
}
.bg-primary-100 { background-color: #ddf4ff !important; }

/* ---------- 22. 上报表头/其他 tailwind 主色残留 ---------- */
.border-primary-100 { border-color: #ddf4ff !important; }

/* ---------- 23. 顶端横幅：深色底 + 白色 logo 文字（与侧边栏统一） ---------- */
.executive-dashboard .brand-banner,
.spendkart-dashboard .brand-banner,
.brand-banner {
  background: #24292f !important;
  border: 1px solid #1f2428 !important;
  box-shadow: none !important;
}
.executive-dashboard .brand-banner::after,
.spendkart-dashboard .brand-banner::after,
.brand-banner::after {
  display: none !important;
}
.executive-dashboard .brand-banner h1,
.spendkart-dashboard .brand-banner h1,
.brand-banner h1 {
  color: #ffffff !important;
}
.executive-dashboard .brand-banner p,
.spendkart-dashboard .brand-banner p,
.brand-banner p {
  color: #9baabd !important;
}

/* ---------- 24. 页面上下文横幅：深灰底 + 白色 logo（与侧边栏/主看板统一） ---------- */
.page-context-banner {
  background: #24292f !important;
  border: 1px solid #1f2428 !important;
  box-shadow: none !important;
  border-radius: 10px !important;
  gap: 18px !important;
  min-height: 96px !important;
}
.page-context-logo {
  width: 132px !important;
  height: auto !important;
  object-fit: contain !important;
  flex: 0 0 auto !important;
}
.page-context-icon { display: none !important; }
.main-wrapper .page-context-banner .page-context-eyebrow {
  color: #8b98a5 !important;
  font-size: 10px !important;
  letter-spacing: 0.06em !important;
}
.main-wrapper .page-context-banner .page-context-copy h2 {
  color: #ffffff !important;
  font-size: 20px !important;
  font-weight: 700 !important;
  margin: 2px 0 4px !important;
}
.main-wrapper .page-context-banner .page-context-copy p {
  color: #9baabd !important;
  font-size: 13px !important;
  line-height: 1.55 !important;
  margin: 0 !important;
}
.page-context-brand {
  color: #6e7781 !important;
  font-size: 11px !important;
}

/* ===== MotionSites-inspired local preview (2026-08-21) =====
   Visual-only, reviewable layer. Keeps the existing Vue structure and business logic. */
:root {
  --motion-navy-950: #0a1b2b;
  --motion-navy-900: #10283e;
  --motion-navy-800: #183b57;
  --motion-navy-700: #245575;
  --motion-gold: #c9a45d;
  --motion-gold-soft: #eadab7;
  --motion-teal: #2f7f78;
  --motion-canvas: #eef3f6;
  --motion-surface: rgba(255, 255, 255, .92);
  --motion-border: rgba(94, 123, 146, .18);
  --motion-ink: #132c41;
  --motion-muted: #667b8e;
  --primary: #245575;
  --primary-light: #327197;
  --primary-dark: #183b57;
  --bg: var(--motion-canvas) !important;
  --text: var(--motion-ink) !important;
  --text-muted: var(--motion-muted) !important;
  --border: #d7e1e7 !important;
  --brand-gold: var(--motion-gold);
  --analytics-accent: var(--motion-teal) !important;
}

html {
  scroll-behavior: smooth;
  background: var(--motion-canvas) !important;
}

body {
  background:
    radial-gradient(circle at 83% -12%, rgba(47, 127, 120, .12), transparent 30rem),
    radial-gradient(circle at 25% 4%, rgba(201, 164, 93, .10), transparent 25rem),
    var(--motion-canvas) !important;
  color: var(--motion-ink) !important;
  font-family: "Segoe UI Variable", "Microsoft YaHei UI", "PingFang SC", sans-serif;
  font-feature-settings: "kern" 1, "tnum" 1;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  opacity: .32;
  background-image:
    linear-gradient(rgba(36, 85, 117, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(36, 85, 117, .035) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: linear-gradient(to bottom, #000, transparent 72%);
}

/* Login: cinematic depth without turning the data workspace into a landing page. */
.login-bg {
  min-height: 100dvh !important;
  overflow: hidden;
  background:
    radial-gradient(circle at 20% 18%, rgba(201, 164, 93, .22), transparent 27rem),
    radial-gradient(circle at 82% 72%, rgba(47, 127, 120, .28), transparent 32rem),
    linear-gradient(135deg, #081827 0%, #102b42 52%, #173e52 100%) !important;
}

.login-bg::before {
  display: block !important;
  position: absolute;
  width: 30rem;
  height: 30rem;
  left: -9rem;
  top: -11rem;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.12), transparent 68%) !important;
  filter: blur(2px) !important;
  animation: motion-orbit 12s ease-in-out infinite alternate !important;
}

.login-bg::after {
  display: block !important;
  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) !important;
  background-size: 42px 42px !important;
  mask-image: radial-gradient(circle at center, #000, transparent 76%);
}

.login-card {
  position: relative;
  z-index: 1;
  border: 1px solid rgba(255, 255, 255, .72) !important;
  border-radius: 22px !important;
  background: rgba(255, 255, 255, .93) !important;
  backdrop-filter: blur(22px) saturate(125%) !important;
  box-shadow: 0 30px 80px rgba(2, 17, 30, .35), inset 0 1px 0 rgba(255,255,255,.8) !important;
}

/* Navigation and chrome */
.sidebar {
  background:
    radial-gradient(circle at 12% 5%, rgba(201, 164, 93, .14), transparent 16rem),
    radial-gradient(circle at 90% 72%, rgba(47, 127, 120, .16), transparent 20rem),
    linear-gradient(180deg, var(--motion-navy-950), var(--motion-navy-900)) !important;
  border-right: 1px solid rgba(255,255,255,.07) !important;
  box-shadow: 18px 0 50px rgba(15, 43, 65, .11) !important;
}

.sidebar::before {
  background: linear-gradient(180deg, rgba(255,255,255,.05), transparent 25%, rgba(47,127,120,.07)) !important;
}

.sidebar-brand {
  border-bottom-color: rgba(255,255,255,.08) !important;
}

.sidebar .nav-item {
  border-radius: 10px !important;
  color: #a9b8c5 !important;
  transition: color .22s ease, background-color .22s ease, transform .22s ease !important;
}

.sidebar .nav-item:hover {
  color: #fff !important;
  background: rgba(255,255,255,.075) !important;
  transform: translateX(3px) !important;
}

.sidebar .nav-item.active {
  color: #fff !important;
  background: linear-gradient(90deg, rgba(201,164,93,.18), rgba(255,255,255,.055)) !important;
  box-shadow: inset 2px 0 0 var(--motion-gold), inset 0 1px 0 rgba(255,255,255,.06) !important;
}

.sidebar .nav-item.active i { color: var(--motion-gold-soft) !important; }

.main-wrapper {
  background:
    radial-gradient(circle at 92% 0, rgba(47,127,120,.08), transparent 24rem),
    linear-gradient(180deg, rgba(255,255,255,.38), transparent 18rem) !important;
}

.main-wrapper > header {
  background: rgba(246, 249, 251, .83) !important;
  border-bottom-color: rgba(117, 142, 160, .18) !important;
  backdrop-filter: blur(18px) saturate(130%) !important;
  box-shadow: 0 1px 0 rgba(255,255,255,.72) !important;
}

.main-wrapper > main {
  width: min(100%, 1500px);
  margin-inline: auto;
}

/* Hero bands: editorial scale, asymmetric ambient light, restrained motion. */
.executive-dashboard .brand-banner,
.spendkart-dashboard .brand-banner,
.brand-banner,
.page-context-banner {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.10) !important;
  border-radius: 18px !important;
  background:
    radial-gradient(circle at 78% 25%, rgba(47,127,120,.34), transparent 22rem),
    radial-gradient(circle at 55% -80%, rgba(201,164,93,.24), transparent 25rem),
    linear-gradient(118deg, var(--motion-navy-950), var(--motion-navy-800)) !important;
  box-shadow: 0 24px 55px rgba(22, 55, 80, .16), inset 0 1px 0 rgba(255,255,255,.08) !important;
}

.brand-banner { min-height: 92px; padding: 18px 22px !important; }
.page-context-banner { min-height: 106px !important; padding: 20px 24px !important; }

.brand-banner::before,
.page-context-banner::before {
  position: absolute;
  z-index: -1;
  width: 18rem;
  height: 18rem;
  right: -5rem;
  top: -9rem;
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 50%;
  content: "";
  box-shadow: 0 0 0 3rem rgba(255,255,255,.025), 0 0 0 6rem rgba(255,255,255,.018);
  animation: motion-orbit 10s ease-in-out infinite alternate;
}

.brand-banner::after,
.page-context-banner::after {
  display: block !important;
  position: absolute;
  z-index: -1;
  inset: auto 10% -1px 35%;
  height: 1px;
  content: "";
  background: linear-gradient(90deg, transparent, var(--motion-gold), transparent) !important;
  opacity: .65;
}

.executive-dashboard .brand-banner h1,
.spendkart-dashboard .brand-banner h1,
.brand-banner h1,
.main-wrapper .page-context-banner .page-context-copy h2 {
  color: #fff !important;
  letter-spacing: -.025em !important;
  text-wrap: balance;
}

.brand-banner h1 { font-size: 1.2rem !important; font-weight: 650 !important; }
.executive-dashboard .brand-banner p,
.spendkart-dashboard .brand-banner p,
.brand-banner p,
.main-wrapper .page-context-banner .page-context-copy p { color: #b8c6d1 !important; }
.main-wrapper .page-context-banner .page-context-eyebrow { color: var(--motion-gold-soft) !important; letter-spacing: .13em !important; }

/* Surfaces and KPI rhythm */
.stat-card,
.liquid-panel,
.main-wrapper .premium-workspace .stat-card {
  border: 1px solid var(--motion-border) !important;
  border-radius: 15px !important;
  background: var(--motion-surface) !important;
  box-shadow: 0 12px 32px rgba(25, 58, 82, .065), inset 0 1px 0 rgba(255,255,255,.85) !important;
  transition: transform .24s cubic-bezier(.2,.8,.2,1), border-color .24s ease, box-shadow .24s ease !important;
}

.stat-card:hover,
.main-wrapper .premium-workspace .stat-card:hover {
  transform: translateY(-2px) !important;
  border-color: rgba(47,127,120,.28) !important;
  box-shadow: 0 18px 42px rgba(25,58,82,.10), inset 0 1px 0 rgba(255,255,255,.92) !important;
}

.liquid-panel {
  background: rgba(255,255,255,.78) !important;
  backdrop-filter: blur(16px) saturate(125%) !important;
}

.data-status-bar {
  border-left: 3px solid var(--motion-teal) !important;
  background: linear-gradient(90deg, rgba(47,127,120,.07), rgba(255,255,255,.9) 28%) !important;
}

.main-wrapper .stats-grid,
.main-wrapper .kpi-grid { gap: 1rem !important; }

.main-wrapper .stats-grid > .stat-card,
.main-wrapper .kpi-grid > .stat-card {
  position: relative;
  overflow: hidden;
  min-height: 112px;
  padding: 18px !important;
}

.main-wrapper .stats-grid > .stat-card::after,
.main-wrapper .kpi-grid > .stat-card::after {
  position: absolute;
  right: -2rem;
  bottom: -3rem;
  width: 7rem;
  height: 7rem;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(47,127,120,.10), transparent 68%) !important;
  content: "";
  opacity: 0;
  transform: scale(.7);
  transition: opacity .28s ease, transform .28s ease;
}

.main-wrapper .stats-grid > .stat-card:hover::after,
.main-wrapper .kpi-grid > .stat-card:hover::after { opacity: 1; transform: scale(1); }

.main-wrapper .stats-grid > .stat-card p:nth-child(2),
.main-wrapper .kpi-grid > .stat-card p:nth-child(2) {
  color: var(--motion-ink) !important;
  font-weight: 650 !important;
  letter-spacing: -.025em !important;
  font-variant-numeric: tabular-nums;
}

.main-wrapper .stats-grid > .stat-card p:first-child,
.main-wrapper .kpi-grid > .stat-card p:first-child {
  color: #718698 !important;
  letter-spacing: .055em !important;
}

/* Controls */
.btn,
.main-wrapper button:not(.nav-item),
.main-wrapper select,
.form-input {
  transition: transform .18s ease, border-color .2s ease, background-color .2s ease, box-shadow .2s ease !important;
}

.btn:active,
.main-wrapper button:not(.nav-item):active { transform: scale(.98) !important; }

.btn-primary,
.bg-primary-600,
.main-wrapper .premium-workspace .btn-primary,
.main-wrapper .premium-workspace button.bg-primary-600 {
  border-color: transparent !important;
  background: linear-gradient(135deg, var(--motion-navy-700), var(--motion-teal)) !important;
  box-shadow: 0 8px 18px rgba(36,85,117,.18) !important;
}

.btn-primary:hover,
.main-wrapper .premium-workspace .btn-primary:hover,
.main-wrapper .premium-workspace button.bg-primary-600:hover {
  background: linear-gradient(135deg, var(--motion-navy-800), #286f69) !important;
  box-shadow: 0 11px 24px rgba(36,85,117,.24) !important;
}

.text-primary-600 { color: var(--motion-navy-700) !important; }
.text-primary-700 { color: var(--motion-navy-800) !important; }
.bg-primary-50 { background-color: #eaf1f5 !important; }
.bg-primary-100 { background-color: #dce9ee !important; }
.border-primary-500 { border-color: var(--motion-teal) !important; }

.main-wrapper select,
.form-input {
  border-color: #cfdae1 !important;
  border-radius: 9px !important;
  background-color: rgba(255,255,255,.92) !important;
}

.main-wrapper select:focus,
.form-input:focus {
  border-color: var(--motion-teal) !important;
  box-shadow: 0 0 0 3px rgba(47,127,120,.13) !important;
}

button:focus-visible,
a:focus-visible,
select:focus-visible,
input:focus-visible {
  outline: 3px solid rgba(201,164,93,.46) !important;
  outline-offset: 2px !important;
}

/* Tables and charts remain calm and readable. */
.chart-card,
.region-summary-card,
.main-wrapper .unified-stats-page .unified-chart-card,
.main-wrapper .unified-stats-page .unified-detail-card {
  border-radius: 16px !important;
  border-color: var(--motion-border) !important;
  box-shadow: 0 14px 36px rgba(25,58,82,.07) !important;
}

.data-table thead th,
.stat-card .data-table thead th,
.region-summary-card .data-table thead th {
  background: #edf3f6 !important;
  color: #5c7183 !important;
  border-bottom-color: #d5e0e6 !important;
  letter-spacing: .025em !important;
}

.data-table tbody tr { transition: background-color .18s ease; }
.data-table tbody tr:hover { background: rgba(47,127,120,.055) !important; }
.data-table tbody td { border-bottom-color: #e6edf1 !important; font-variant-numeric: tabular-nums; }

.chart-unit-badge {
  border-color: rgba(201,164,93,.35) !important;
  background: rgba(201,164,93,.11) !important;
  color: #876928 !important;
  border-radius: 7px !important;
}

/* Loading and overlays */
.skeleton {
  border-radius: 12px;
  background: linear-gradient(100deg, #dce6eb 22%, #f5f8fa 38%, #dce6eb 54%) !important;
  background-size: 220% 100% !important;
}

.skeleton-toolbar {
  border: 1px solid var(--motion-border);
  border-radius: 15px;
  background: rgba(255,255,255,.78);
  box-shadow: 0 12px 32px rgba(25,58,82,.05);
}

.modal-box,
.password-modal-card,
.account-popover {
  border-color: rgba(94,123,146,.20) !important;
  border-radius: 18px !important;
  box-shadow: 0 28px 70px rgba(8,31,49,.23) !important;
}

.modal-backdrop,
.password-modal-layer .modal-backdrop {
  background: rgba(8,27,43,.48) !important;
  backdrop-filter: blur(7px) !important;
}

.toast {
  border: 1px solid rgba(94,123,146,.18);
  border-radius: 12px;
  box-shadow: 0 16px 36px rgba(15,43,65,.16);
}

@keyframes motion-orbit {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(-10px, 10px, 0) scale(1.045); }
}

@media (max-width: 768px) {
  .brand-banner { min-height: 82px; padding: 16px !important; }
  .page-context-banner { min-height: 92px !important; padding: 16px !important; }
  .page-context-logo { width: 108px !important; }
  .main-wrapper .stats-grid > .stat-card,
  .main-wrapper .kpi-grid > .stat-card { min-height: 104px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

/* ===== Motion preview v2: stronger structural change ===== */
@media (min-width: 1025px) {
  .sidebar {
    top: 12px !important;
    bottom: 12px !important;
    left: 12px !important;
    width: 228px !important;
    border: 1px solid rgba(255,255,255,.09) !important;
    border-radius: 20px !important;
    box-shadow: 0 26px 70px rgba(7,28,45,.25) !important;
  }

  .sidebar.collapsed { width: 68px !important; }
  .main-wrapper { margin-left: 252px !important; }
  .main-wrapper.collapsed { margin-left: 92px !important; }

  .main-wrapper > header {
    position: sticky;
    z-index: 40;
    top: 12px;
    width: calc(100% - 32px);
    margin: 12px 16px 0;
    border: 1px solid rgba(255,255,255,.78) !important;
    border-radius: 16px;
    box-shadow: 0 12px 34px rgba(20,52,75,.085) !important;
  }

  .main-wrapper > main { padding-top: 1.65rem !important; }
}

.sidebar-logo {
  filter: drop-shadow(0 8px 18px rgba(0,0,0,.22));
}

.sidebar nav > div.text-xs,
.sidebar nav > .sidebar-brand-text {
  color: rgba(234,218,183,.63) !important;
  letter-spacing: .14em !important;
}

.main-wrapper > header h1 {
  color: var(--motion-ink) !important;
  font-size: 1.08rem !important;
  font-weight: 700 !important;
  letter-spacing: -.025em !important;
}

/* Make the dashboard hero unmistakably different from a generic admin header. */
.executive-dashboard .brand-banner,
.spendkart-dashboard .brand-banner {
  min-height: 138px !important;
  padding: 26px 30px !important;
  border-radius: 24px !important;
}

.executive-dashboard .brand-banner img,
.spendkart-dashboard .brand-banner img {
  height: 64px !important;
  filter: drop-shadow(0 10px 20px rgba(0,0,0,.22));
}

.executive-dashboard .brand-banner h1,
.spendkart-dashboard .brand-banner h1 {
  font-size: clamp(1.45rem, 2vw, 2rem) !important;
  line-height: 1.12 !important;
}

.executive-dashboard .brand-banner p,
.spendkart-dashboard .brand-banner p {
  margin-top: .5rem !important;
  font-size: .72rem !important;
  letter-spacing: .15em !important;
  text-transform: uppercase;
}

.executive-dashboard .brand-banner::after,
.spendkart-dashboard .brand-banner::after {
  right: 2rem;
  bottom: 1.35rem;
  left: auto;
  width: 9rem;
  height: auto;
  content: "LIVE DATA · 2026" !important;
  color: rgba(234,218,183,.78);
  background: none !important;
  font-size: .62rem;
  font-weight: 650;
  letter-spacing: .16em;
  text-align: right;
}

/* Bento KPI layout: one lead metric plus four supporting metrics. */
@media (min-width: 1025px) {
  .executive-dashboard:not(:has(.stats-grid > :nth-child(6))) .stats-grid,
  .spendkart-dashboard:not(:has(.stats-grid > :nth-child(6))) .stats-grid {
    grid-template-columns: 1.65fr repeat(4, minmax(0, 1fr)) !important;
  }
}

.executive-dashboard .stats-grid > .stat-card,
.spendkart-dashboard .stats-grid > .stat-card {
  min-height: 132px !important;
  border: 0 !important;
  border-radius: 18px !important;
  box-shadow: 0 18px 42px rgba(20,52,75,.10) !important;
}

.executive-dashboard .stats-grid > .stat-card:first-child,
.spendkart-dashboard .stats-grid > .stat-card:first-child {
  color: #fff !important;
  background:
    radial-gradient(circle at 88% 18%, rgba(201,164,93,.25), transparent 8rem),
    linear-gradient(135deg, #10283e, #245575) !important;
  box-shadow: 0 24px 48px rgba(16,40,62,.24) !important;
}

.executive-dashboard .stats-grid > .stat-card:first-child::before,
.spendkart-dashboard .stats-grid > .stat-card:first-child::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  height: auto;
  background: var(--motion-gold) !important;
}

.executive-dashboard .stats-grid > .stat-card:first-child p,
.spendkart-dashboard .stats-grid > .stat-card:first-child p,
.executive-dashboard .stats-grid > .stat-card:first-child .text-slate-800,
.spendkart-dashboard .stats-grid > .stat-card:first-child .text-slate-800 {
  color: #fff !important;
}

.executive-dashboard .stats-grid > .stat-card:first-child p:first-child,
.executive-dashboard .stats-grid > .stat-card:first-child p:last-child,
.spendkart-dashboard .stats-grid > .stat-card:first-child p:first-child,
.spendkart-dashboard .stats-grid > .stat-card:first-child p:last-child {
  color: #b9c8d3 !important;
}

.executive-dashboard .stats-grid > .stat-card:first-child p:nth-child(2),
.spendkart-dashboard .stats-grid > .stat-card:first-child p:nth-child(2) {
  margin-top: .22rem;
  color: #fff !important;
  font-size: 1.42rem !important;
}

.executive-dashboard .stats-grid > .stat-card:first-child > .flex > div:first-child,
.spendkart-dashboard .stats-grid > .stat-card:first-child > .flex > div:first-child {
  color: var(--motion-gold-soft) !important;
  background: rgba(255,255,255,.10) !important;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.12);
}

.executive-dashboard .stats-grid > .stat-card:nth-child(2),
.spendkart-dashboard .stats-grid > .stat-card:nth-child(2) {
  background: linear-gradient(145deg, #fbf8f0, #fff) !important;
}

.executive-dashboard .stats-grid > .stat-card:nth-child(3),
.spendkart-dashboard .stats-grid > .stat-card:nth-child(3) {
  background: linear-gradient(145deg, #eef7f5, #fff) !important;
}

.executive-dashboard .stats-grid > .stat-card:nth-child(4),
.executive-dashboard .stats-grid > .stat-card:nth-child(5),
.spendkart-dashboard .stats-grid > .stat-card:nth-child(4),
.spendkart-dashboard .stats-grid > .stat-card:nth-child(5) {
  background: linear-gradient(145deg, #f1f5f8, #fff) !important;
}

/* Turn filters into a compact control deck overlapping the hero slightly. */
.executive-dashboard > .liquid-panel,
.spendkart-dashboard > .liquid-panel {
  position: relative;
  z-index: 2;
  margin: -1.35rem 1.25rem 0 !important;
  padding: 14px 18px !important;
  border-color: rgba(255,255,255,.82) !important;
  border-radius: 15px !important;
  background: rgba(255,255,255,.88) !important;
  box-shadow: 0 20px 46px rgba(13,43,64,.15), inset 0 1px 0 #fff !important;
}

.executive-dashboard .data-status-bar,
.spendkart-dashboard .data-status-bar {
  margin-inline: 1.25rem;
  border: 0 !important;
  border-left: 3px solid var(--motion-teal) !important;
  border-radius: 11px !important;
  box-shadow: none !important;
}

/* Content modules get clear, branded headers instead of undifferentiated white cards. */
.executive-dashboard .chart-card,
.spendkart-dashboard .chart-card,
.main-wrapper .premium-workspace .unified-chart-card {
  padding: 0 24px 24px !important;
  overflow: hidden;
  border: 0 !important;
  border-radius: 20px !important;
  box-shadow: 0 20px 48px rgba(20,52,75,.10) !important;
}

.executive-dashboard .chart-card > .flex:first-child,
.spendkart-dashboard .chart-card > .flex:first-child,
.main-wrapper .premium-workspace .unified-chart-card > .flex:first-child {
  min-height: 68px;
  margin: 0 -24px 18px !important;
  padding: 14px 24px;
  border-bottom: 1px solid rgba(94,123,146,.15);
  background: linear-gradient(90deg, rgba(16,40,62,.055), rgba(47,127,120,.035));
}

.region-summary-card,
.main-wrapper .unified-stats-page .unified-detail-card,
.main-wrapper .report-workspace > .stat-card {
  overflow: hidden;
  border: 0 !important;
  border-radius: 20px !important;
  box-shadow: 0 20px 48px rgba(20,52,75,.09) !important;
}

.region-summary-header,
.main-wrapper .unified-stats-page .unified-detail-card > div:first-child {
  padding: 19px 24px !important;
  border-bottom: 0 !important;
  background:
    radial-gradient(circle at 85% 0, rgba(47,127,120,.23), transparent 15rem),
    linear-gradient(105deg, var(--motion-navy-900), var(--motion-navy-800)) !important;
}

.region-summary-header h3,
.main-wrapper .unified-stats-page .unified-detail-card > div:first-child h3 {
  color: #fff !important;
}

.region-summary-header p,
.main-wrapper .unified-stats-page .unified-detail-card > div:first-child p {
  color: #b6c5d0 !important;
}

.region-summary-count {
  border: 1px solid rgba(234,218,183,.24) !important;
  color: var(--motion-gold-soft) !important;
  background: rgba(201,164,93,.10) !important;
}

.data-table thead th,
.stat-card .data-table thead th,
.region-summary-card .data-table thead th {
  height: 50px;
  padding-inline: 16px !important;
  color: #445f73 !important;
  background: #e9f0f4 !important;
}

.data-table tbody td {
  height: 54px;
  padding-inline: 16px !important;
}

.data-table tbody tr:nth-child(even) { background: rgba(238,243,246,.45); }

.page-context-banner {
  min-height: 132px !important;
  margin-bottom: 1.5rem !important;
  border-radius: 22px !important;
}

.main-wrapper .page-context-banner .page-context-copy h2 {
  font-size: clamp(1.4rem, 2vw, 1.85rem) !important;
}

@media (max-width: 1024px) {
  .executive-dashboard > .liquid-panel,
  .spendkart-dashboard > .liquid-panel { margin-inline: .75rem !important; }
}

@media (max-width: 640px) {
  .executive-dashboard .brand-banner,
  .spendkart-dashboard .brand-banner { min-height: 112px !important; padding: 20px !important; }
  .executive-dashboard .brand-banner img,
  .spendkart-dashboard .brand-banner img { height: 46px !important; }
  .executive-dashboard .brand-banner::after,
  .spendkart-dashboard .brand-banner::after { display: none !important; }
  .executive-dashboard > .liquid-panel,
  .spendkart-dashboard > .liquid-panel { margin: -1rem .5rem 0 !important; }
  .executive-dashboard .data-status-bar,
  .spendkart-dashboard .data-status-bar { margin-inline: .5rem; }
}

/* High-specificity corrections for legacy dashboard preview selectors. */
@media (min-width: 1025px) {
  .main-wrapper .executive-dashboard.spendkart-dashboard .stats-grid {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)) !important;
  }
}

.main-wrapper .executive-dashboard.spendkart-dashboard .stats-grid > .stat-card {
  width: auto !important;
  min-width: 0 !important;
  border: 1px solid #cbd9e2 !important;
  background: #fff !important;
  box-shadow: 0 12px 28px rgba(24,59,87,.075) !important;
}

.main-wrapper .executive-dashboard.spendkart-dashboard .stats-grid > .stat-card:first-child {
  background: linear-gradient(145deg, #eef5f8, #fff) !important;
}

.main-wrapper .executive-dashboard.spendkart-dashboard .chart-card,
.main-wrapper .executive-dashboard.spendkart-dashboard .region-summary-card,
.main-wrapper .premium-workspace.unified-stats-page .unified-chart-card,
.main-wrapper .premium-workspace.unified-stats-page .unified-detail-card,
.main-wrapper .premium-workspace.report-workspace > .stat-card {
  border: 1px solid #cbd9e2 !important;
  background: #fff !important;
  box-shadow: 0 14px 32px rgba(24,59,87,.085) !important;
}

.main-wrapper .executive-dashboard.spendkart-dashboard .region-summary-card,
.main-wrapper .premium-workspace.unified-stats-page .unified-detail-card,
.main-wrapper .premium-workspace.report-workspace > .stat-card.p-0 {
  padding: 0 !important;
}

.main-wrapper .executive-dashboard.spendkart-dashboard .region-summary-header,
.main-wrapper .premium-workspace.unified-stats-page .unified-detail-card > div:first-child {
  width: 100% !important;
  margin: 0 !important;
  border-bottom: 1px solid #d7e2e8 !important;
  background: #f7fafb !important;
}

/* Submitter statistics: keep headers and values on the same column axis. */
.main-wrapper .submitter-stats-table th,
.main-wrapper .submitter-stats-table td {
  vertical-align: middle;
}

.main-wrapper .submitter-stats-table th:first-child,
.main-wrapper .submitter-stats-table td:first-child {
  text-align: left !important;
}

.main-wrapper .submitter-stats-table th:not(:first-child):not(:last-child),
.main-wrapper .submitter-stats-table td:not(:first-child):not(:last-child) {
  text-align: right !important;
}

.main-wrapper .submitter-stats-table th:last-child,
.main-wrapper .submitter-stats-table td:last-child {
  text-align: center !important;
}

/* ===== Browser comment cleanup (2026-08-21) =====
   One grid, one card language, no decorative bars without business meaning. */

/* Remove the unexplained blue status dot; the database icon already conveys state. */
.main-wrapper .data-status-bar::before,
.main-wrapper .executive-dashboard .data-status-bar::before,
.main-wrapper .spendkart-dashboard .data-status-bar::before {
  display: none !important;
  content: none !important;
}

/* Every primary dashboard block uses the same left and right edge. */
.main-wrapper .executive-dashboard > .brand-banner,
.main-wrapper .executive-dashboard > .liquid-panel,
.main-wrapper .executive-dashboard > .data-status-bar,
.main-wrapper .executive-dashboard > .stats-grid,
.main-wrapper .executive-dashboard > .chart-card,
.main-wrapper .executive-dashboard > .region-summary-card,
.main-wrapper .spendkart-dashboard > .brand-banner,
.main-wrapper .spendkart-dashboard > .liquid-panel,
.main-wrapper .spendkart-dashboard > .data-status-bar,
.main-wrapper .spendkart-dashboard > .stats-grid,
.main-wrapper .spendkart-dashboard > .chart-card,
.main-wrapper .spendkart-dashboard > .region-summary-card {
  width: 100% !important;
  margin-right: 0 !important;
  margin-left: 0 !important;
}

.main-wrapper .executive-dashboard > .liquid-panel,
.main-wrapper .spendkart-dashboard > .liquid-panel {
  margin-top: 16px !important;
}

/* Equal KPI cards: remove the asymmetric layout that made boxes look unfinished. */
@media (min-width: 1025px) {
  .main-wrapper .executive-dashboard .stats-grid,
  .main-wrapper .spendkart-dashboard .stats-grid {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)) !important;
  }
}

.main-wrapper .executive-dashboard .stats-grid > .stat-card,
.main-wrapper .spendkart-dashboard .stats-grid > .stat-card {
  min-width: 0;
  min-height: 124px !important;
  border: 1px solid #cbd9e2 !important;
  border-radius: 16px !important;
  background: #fff !important;
  box-shadow: 0 12px 28px rgba(24,59,87,.075) !important;
}

.main-wrapper .executive-dashboard .stats-grid > .stat-card:first-child,
.main-wrapper .spendkart-dashboard .stats-grid > .stat-card:first-child {
  color: var(--motion-ink) !important;
  background: linear-gradient(145deg, #eef5f8, #fff) !important;
  box-shadow: 0 12px 28px rgba(24,59,87,.075) !important;
}

.main-wrapper .executive-dashboard .stats-grid > .stat-card:first-child p,
.main-wrapper .spendkart-dashboard .stats-grid > .stat-card:first-child p,
.main-wrapper .executive-dashboard .stats-grid > .stat-card:first-child .text-slate-800,
.main-wrapper .spendkart-dashboard .stats-grid > .stat-card:first-child .text-slate-800 {
  color: var(--motion-ink) !important;
}

.main-wrapper .executive-dashboard .stats-grid > .stat-card:first-child p:first-child,
.main-wrapper .executive-dashboard .stats-grid > .stat-card:first-child p:last-child,
.main-wrapper .spendkart-dashboard .stats-grid > .stat-card:first-child p:first-child,
.main-wrapper .spendkart-dashboard .stats-grid > .stat-card:first-child p:last-child {
  color: #718698 !important;
}

.main-wrapper .executive-dashboard .stats-grid > .stat-card:first-child > .flex > div:first-child,
.main-wrapper .spendkart-dashboard .stats-grid > .stat-card:first-child > .flex > div:first-child {
  color: var(--motion-navy-700) !important;
  background: #e7f0f4 !important;
  box-shadow: none;
}

/* Remove dark bars from summaries/details and use the same quiet card header everywhere. */
.main-wrapper .region-summary-header,
.main-wrapper .unified-stats-page .unified-detail-card > div:first-child,
.main-wrapper .premium-workspace .unified-detail-card > div:first-child {
  min-height: 64px;
  padding: 16px 20px !important;
  border-bottom: 1px solid #d7e2e8 !important;
  background: #f7fafb !important;
  box-shadow: none !important;
}

.main-wrapper .region-summary-header h3,
.main-wrapper .unified-stats-page .unified-detail-card > div:first-child h3,
.main-wrapper .premium-workspace .unified-detail-card > div:first-child h3 {
  color: var(--motion-ink) !important;
}

.main-wrapper .region-summary-header p,
.main-wrapper .unified-stats-page .unified-detail-card > div:first-child p,
.main-wrapper .premium-workspace .unified-detail-card > div:first-child p {
  color: var(--motion-muted) !important;
}

.main-wrapper .region-summary-count {
  border: 1px solid #cfdae1 !important;
  color: #536b7d !important;
  background: #edf3f6 !important;
}

/* Give charts and data cards a visible edge; keep headings optically centered. */
.main-wrapper .chart-card,
.main-wrapper .region-summary-card,
.main-wrapper .unified-stats-page .unified-chart-card,
.main-wrapper .unified-stats-page .unified-detail-card,
.main-wrapper .report-workspace > .stat-card {
  border: 1px solid #cbd9e2 !important;
  background: #fff !important;
  box-shadow: 0 14px 32px rgba(24,59,87,.085) !important;
}

.main-wrapper .executive-dashboard .chart-card,
.main-wrapper .spendkart-dashboard .chart-card,
.main-wrapper .premium-workspace .unified-chart-card {
  padding: 20px 24px 24px !important;
}

.main-wrapper .executive-dashboard .chart-card > .flex:first-child,
.main-wrapper .spendkart-dashboard .chart-card > .flex:first-child,
.main-wrapper .premium-workspace .unified-chart-card > .flex:first-child {
  min-height: 44px;
  margin: 0 0 16px !important;
  padding: 0 !important;
  align-items: center !important;
  border-bottom: 0 !important;
  background: transparent !important;
}

.main-wrapper .report-workspace > .stat-card > .px-4.py-3.border-b {
  display: flex;
  min-height: 62px;
  align-items: center;
  padding: 16px 20px !important;
  border-bottom-color: #d7e2e8 !important;
  background: #fff !important;
}

/* The two stacked seven-column report tables now share exact column axes. */
.main-wrapper .report-workspace .comparison-grid-table th:first-child,
.main-wrapper .report-workspace .comparison-grid-table td:first-child,
.main-wrapper .report-workspace .submitter-stats-table th:first-child,
.main-wrapper .report-workspace .submitter-stats-table td:first-child {
  width: 250px !important;
  text-align: left !important;
  vertical-align: middle !important;
}

.main-wrapper .report-workspace .comparison-grid-table th:last-child,
.main-wrapper .report-workspace .comparison-grid-table td:last-child,
.main-wrapper .report-workspace .submitter-stats-table th:last-child,
.main-wrapper .report-workspace .submitter-stats-table td:last-child {
  width: 90px !important;
  text-align: center !important;
  vertical-align: middle !important;
}

.main-wrapper .report-workspace .comparison-grid-table th:not(:first-child):not(:last-child),
.main-wrapper .report-workspace .comparison-grid-table td:not(:first-child):not(:last-child),
.main-wrapper .report-workspace .submitter-stats-table th:not(:first-child):not(:last-child),
.main-wrapper .report-workspace .submitter-stats-table td:not(:first-child):not(:last-child) {
  text-align: right !important;
  vertical-align: middle !important;
}

@media (max-width: 640px) {
  .main-wrapper .executive-dashboard > .liquid-panel,
  .main-wrapper .spendkart-dashboard > .liquid-panel,
  .main-wrapper .executive-dashboard > .data-status-bar,
  .main-wrapper .spendkart-dashboard > .data-status-bar {
    margin-right: 0 !important;
    margin-left: 0 !important;
  }
}
/* Submitter detail: compact modal with an internal scroll surface shared by quote and drawing groups. */
.amount-breakdown {
  display: flex;
  flex-direction: column;
  gap: 2px;
  line-height: 1.25;
  white-space: nowrap;
  font-size: 12px;
  color: #64748b;
}
.amount-breakdown strong { color: #1e293b; font-weight: 700; }
.amount-breakdown-compact { margin-top: 2px; }
.amount-breakdown-table { align-items: flex-end; }
.amount-breakdown-note { white-space: nowrap; line-height: 1.35; }

.main-wrapper .submitter-detail-modal {
  padding: clamp(20px, 5vh, 56px) 16px;
}

.main-wrapper .submitter-detail-modal-card {
  max-height: min(68vh, 680px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, .28);
}

.main-wrapper .submitter-detail-modal-body {
  min-height: 0;
  max-height: min(55vh, 540px);
  overflow: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: #94a3b8 #eef2f6;
}

.main-wrapper .submitter-detail-modal-body:focus-visible {
  outline: 2px solid #2a7d88;
  outline-offset: -2px;
}

.main-wrapper .submitter-detail-modal-body::-webkit-scrollbar { width: 10px; height: 10px; }
.main-wrapper .submitter-detail-modal-body::-webkit-scrollbar-track { background: #eef2f6; }
.main-wrapper .submitter-detail-modal-body::-webkit-scrollbar-thumb { background: #94a3b8; border-radius: 999px; border: 2px solid #eef2f6; }
.main-wrapper .submitter-detail-modal-body thead th { position: sticky; top: 0; z-index: 2; background: #f4f7fa; box-shadow: 0 1px 0 rgba(148, 163, 184, .22); }
.main-wrapper .submitter-detail-modal-footer { flex: 0 0 auto; display: flex; align-items: center; justify-content: center; gap: 7px; padding: 8px 16px; color: #64748b; background: #f8fafc; border-top: 1px solid #e7edf2; font-size: 12px; }

@media (max-width: 720px) {
  .main-wrapper .submitter-detail-modal { padding: 14px 10px; }
  .main-wrapper .submitter-detail-modal-card { max-height: 76vh; border-radius: 16px; }
  .main-wrapper .submitter-detail-modal-body { max-height: 62vh; }
  .main-wrapper .submitter-detail-modal-header { padding: 14px 16px; }
}

/* Order structure analysis: same enterprise surfaces and modal language as the dashboard. */
.order-structure-page { color: #243447; }
.order-structure-toolbar { min-height: 60px; }
.order-list-filters input,
.order-list-filters select { height: 36px; border: 1px solid #d7e1eb; border-radius: 7px; background: #fff; color: #243447; padding: 0 10px; font-size: 12px; outline: none; }
.order-list-filters input:focus,
.order-list-filters select:focus { border-color: #315578; box-shadow: 0 0 0 3px rgba(49, 85, 120, .14); }
.order-structure-schedule { color: #6f7d8d; font-size: 12px; line-height: 1.55; padding: 0 3px; }
.order-structure-schedule i { color: #315578; margin-right: 6px; }
.order-structure-import-btn { margin-left: auto; white-space: nowrap; }
.order-structure-state { min-height: 180px; display: flex; align-items: center; justify-content: center; gap: 10px; color: #6f7d8d; }
.order-structure-state.error { color: #b42318; }
.order-structure-empty { min-height: 300px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px 24px 48px; text-align: center; }
.order-structure-empty-icon { width: 58px; height: 58px; display: grid; place-items: center; border-radius: 16px; background: #eaf0f5; color: #315578; font-size: 24px; margin-bottom: 14px; }
.order-structure-empty h3 { color: #203754; font-size: 18px; font-weight: 700; }
.order-structure-empty p { max-width: 620px; color: #6f7d8d; font-size: 13px; line-height: 1.75; margin: 7px 0 18px; }
.order-structure-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 22px; color: #6f7d8d; font-size: 12px; padding: 0 3px; }
.order-structure-meta i { color: #315578; margin-right: 5px; }
.order-chart-grid { display: grid; grid-template-columns: 1.08fr .92fr; gap: 12px; }
.order-chart-card { padding: 18px 20px 20px; }
.order-chart-card.wide { grid-column: 1 / -1; }
.order-chart-card h3,
.order-list-head h3 { color: #203754; font-size: 15px; font-weight: 700; border-left: 3px solid #315578; padding-left: 9px; margin-bottom: 15px; }
.order-card-note { color: #8492a2; font-size: 11px; line-height: 1.5; margin: -9px 0 13px 12px; }
.order-bar-row { display: grid; grid-template-columns: 132px minmax(120px, 1fr) 125px; align-items: center; gap: 12px; margin: 9px 0; font-size: 12px; }
.order-bar-row > span { text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.order-bar-row.rank > span { display: grid; grid-template-columns: 20px minmax(0, 1fr); align-items: center; gap: 7px; text-align: left; }
.order-bar-row.rank b { width: 20px; height: 20px; display: inline-grid; place-items: center; border-radius: 6px; background: #eaf0f5; color: #315578; font-size: 10px; }
.order-bar-track { height: 20px; overflow: hidden; border-radius: 5px; background: #eaf0f5; }
.order-bar-track i { display: block; height: 100%; min-width: 2px; border-radius: inherit; transition: width .25s ease; }
.order-bar-row > strong { color: #315578; font-weight: 700; font-variant-numeric: tabular-nums; }
.order-donut-layout { display: grid; grid-template-columns: 132px minmax(0, 1fr); align-items: center; gap: 24px; min-height: 138px; padding: 0 12px 2px; }
.order-donut-chart { position: relative; width: 128px; height: 128px; display: grid; place-items: center; border-radius: 50%; }
.order-donut-chart::after { content: ""; position: absolute; inset: 25%; border-radius: 50%; background: #fff; box-shadow: 0 0 0 1px rgba(49, 85, 120, .04); }
.order-donut-chart span { position: relative; z-index: 1; max-width: 76px; color: #203754; font-size: 12px; font-weight: 700; line-height: 1.15; text-align: center; font-variant-numeric: tabular-nums; }
.order-donut-chart small { display: block; color: #8492a2; font-size: 9px; font-weight: 600; margin-top: 2px; }
.order-donut-legend { display: grid; gap: 9px; min-width: 0; }
.order-donut-legend > div { display: grid; grid-template-columns: 10px 62px minmax(0, 1fr); align-items: center; gap: 8px; min-width: 0; font-size: 12px; }
.order-donut-legend i { width: 10px; height: 10px; border-radius: 2px; }
.order-donut-legend span { color: #344b63; white-space: nowrap; }
.order-donut-legend strong { overflow: hidden; color: #66798d; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; font-variant-numeric: tabular-nums; }
.order-list-card { padding: 0; overflow: hidden; }
.order-list-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; padding: 17px 18px 13px; border-bottom: 1px solid #e7edf2; }
.order-list-head h3 { margin-bottom: 4px; }
.order-list-head p { color: #8a97a6; font-size: 11px; padding-left: 12px; }
.order-list-filters { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 7px; }
.order-list-filters input { width: 210px; }
.order-table-scroll { width: 100%; overflow: auto; }
.order-structure-table { width: 100%; min-width: 820px; table-layout: fixed; }
.order-structure-table th:nth-child(1) { width: 48px; text-align: center; }
.order-structure-table th:nth-child(2) { width: 68px; }
.order-structure-table th:nth-child(3) { width: 144px; }
.order-structure-table th:nth-child(4) { width: 116px; padding-right: 18px; }
.order-structure-table th:nth-child(5) { width: 98px; padding-left: 18px; }
.order-structure-table th:nth-child(6) { width: 52px; text-align: right; }
.order-structure-table th:nth-child(7) { width: 102px; text-align: right; }
.order-structure-table th:nth-child(8) { width: 104px; }
.order-structure-table th:nth-child(9) { width: 64px; text-align: center; }
.order-structure-table th,
.order-structure-table td { vertical-align: middle; }
.order-structure-table td:nth-child(4) { padding-right: 18px; }
.order-structure-table th:nth-child(5),
.order-structure-table td:nth-child(5) { padding-left: 18px; border-left: 1px solid #dde5ec; }
.order-structure-table td { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.order-structure-table td:first-child,
.order-structure-table td:last-child { text-align: center; }
.order-row-index { color: #64788f; font-weight: 600; font-variant-numeric: tabular-nums; }
.order-type-badge,
.order-category-tag { display: inline-block; border-radius: 7px; padding: 2px 7px; font-size: 11px; line-height: 1.4; margin-right: 3px; }
.order-type-badge.project { background: rgba(49, 85, 120, .12); color: #315578; }
.order-type-badge.retail { background: rgba(166, 106, 54, .13); color: #8f5628; }
.order-category-tag { background: #edf2f7; color: #52677f; }
.order-detail-modal { padding: 28px 24px; }
.order-detail-modal-card {
  width: min(1180px, calc(100vw - 48px)) !important;
  max-height: min(82vh, 760px);
  margin: 0 !important;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, .28);
}
.order-detail-modal-header { flex: 0 0 auto; }
.order-detail-modal-body {
  min-height: 0;
  max-height: min(64vh, 600px);
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #b8c5d1 #eef2f6;
}
.order-detail-modal-body::-webkit-scrollbar { width: 8px; height: 8px; }
.order-detail-modal-body::-webkit-scrollbar-track { background: #eef2f6; }
.order-detail-modal-body::-webkit-scrollbar-thumb { border-radius: 999px; background: #b8c5d1; }
.order-detail-table { width: 100%; min-width: 1730px; table-layout: fixed; }
.order-detail-table th:nth-child(1) { width: 90px; }
.order-detail-table th:nth-child(2) { width: 190px; }
.order-detail-table th:nth-child(3) { width: 170px; }
.order-detail-table th:nth-child(4) { width: 150px; }
.order-detail-table th:nth-child(5) { width: 180px; }
.order-detail-table th:nth-child(6) { width: 110px; }
.order-detail-table th:nth-child(7) { width: 110px; }
.order-detail-table th:nth-child(8) { width: 90px; }
.order-detail-table th:nth-child(9) { width: 100px; }
.order-detail-table th:nth-child(10) { width: 115px; }
.order-detail-table th:nth-child(11) { width: 90px; }
.order-detail-table th:nth-child(12) { width: 115px; }
.order-detail-table th:nth-child(13) { width: 110px; }
.order-detail-table td {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.order-detail-table td:nth-child(2),
.order-detail-table td:nth-child(3) {
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  line-height: 1.35;
}
.order-detail-table thead th { position: sticky; top: 0; z-index: 2; }
.order-detail-row-matched td { background: #f0fdf8; }
.order-detail-row-matched:hover td { background: #e5f8f0; }
.order-match-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 64px; border-radius: 999px; padding: 3px 8px; font-size: 11px; font-weight: 700; line-height: 1.35; }
.order-match-badge.matched { color: #08705a; background: #dff7ed; border: 1px solid #9fdec9; }
.order-match-badge.reference { color: #718096; background: #f2f5f8; border: 1px solid #dce3ea; }
.order-modal-footer { flex: 0 0 auto; padding: 10px 18px; border-top: 1px solid #e7edf2; background: #f8fafc; color: #6f7d8d; text-align: center; font-size: 12px; }
@media (max-width: 680px) {
  .order-detail-modal { padding: 10px; }
  .order-detail-modal-card { width: calc(100vw - 20px) !important; max-height: 76vh; }
  .order-detail-modal-body { max-height: 58vh; }
}
.order-import-body { padding: 20px; }
.order-import-drop { min-height: 150px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; border: 1px dashed #9fb1c2; border-radius: 12px; background: #f7f9fc; color: #6f7d8d; cursor: pointer; transition: border-color .18s, background .18s; }
.order-import-drop:hover { border-color: #315578; background: #f1f5f9; }
.order-import-drop i { color: #315578; font-size: 28px; margin-bottom: 3px; }
.order-import-drop strong { color: #203754; font-size: 14px; }
.order-import-drop span { font-size: 11px; }
.order-import-drop input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.order-import-preview { display: grid; grid-template-columns: 1.2fr repeat(4, 1fr); gap: 8px; margin-top: 14px; }
.order-import-preview > div { min-width: 0; padding: 9px 10px; border-radius: 8px; background: #f3f6f9; }
.order-import-preview span { display: block; color: #8a97a6; font-size: 10px; margin-bottom: 3px; }
.order-import-preview strong { display: block; overflow: hidden; color: #243447; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; font-variant-numeric: tabular-nums; }
.order-import-error { display: flex; align-items: center; gap: 7px; margin-top: 12px; padding: 9px 11px; border-radius: 8px; background: #fef3f2; color: #b42318; font-size: 12px; }
.order-import-actions { display: flex; justify-content: flex-end; gap: 8px; padding: 13px 20px; border-top: 1px solid #e7edf2; background: #f8fafc; }
.order-customer-analysis { display: grid; gap: 12px; }
.order-customer-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; padding: 3px 3px 0; }
.order-customer-heading h3 { color: #203754; font-size: 18px; font-weight: 700; letter-spacing: -.01em; }
.order-customer-heading p { color: #728296; font-size: 12px; margin-top: 4px; }
.order-customer-filters { display: flex; align-items: center; gap: 7px; }
.order-customer-filters input,
.order-customer-filters select { height: 36px; border: 1px solid #d7e1eb; border-radius: 8px; background: #fff; color: #344b63; padding: 0 10px; font-size: 12px; outline: none; }
.order-customer-filters input { width: 220px; }
.order-customer-filters input:focus,
.order-customer-filters select:focus { border-color: #315578; box-shadow: 0 0 0 3px rgba(49,85,120,.13); }
.order-customer-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; }
.order-customer-metrics article { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: baseline; gap: 2px 10px; padding: 11px 13px 12px; border-left: 3px solid #315578; border-radius: 4px 10px 10px 4px; background: #edf2f6; }
.order-customer-metrics span { color: #64788f; font-size: 11px; font-weight: 600; }
.order-customer-metrics strong { grid-row: 1 / 3; grid-column: 2; color: #203754; font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums; }
.order-customer-metrics small { color: #8492a2; font-size: 10px; }
.order-customer-table-panel { padding: 0; overflow: hidden; }
.order-customer-table { width: 100%; min-width: 900px; table-layout: fixed; }
.order-customer-table th:nth-child(1) { width: 15%; }
.order-customer-table th:nth-child(2),
.order-customer-table th:nth-child(3) { width: 13%; }
.order-customer-table th:nth-child(4) { width: 18%; }
.order-customer-table th:nth-child(5) { width: 16%; }
.order-customer-table th:nth-child(6) { width: 7%; text-align: right; }
.order-customer-table th:nth-child(7) { width: 11%; text-align: right; }
.order-customer-table th:nth-child(8) { width: 7%; text-align: center; }
.order-customer-table td { vertical-align: middle; }
.order-customer-name { color: #203754; font-weight: 700; overflow-wrap: anywhere; }
.order-customer-type { display: grid; gap: 2px; }
.order-customer-type strong { font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
.order-customer-type span { color: #75879a; font-size: 10px; font-variant-numeric: tabular-nums; }
.order-customer-type small { color: #8795a5; font-size: 9px; line-height: 1.35; font-variant-numeric: tabular-nums; }
.order-customer-type.project strong { color: #315578; }
.order-customer-type.retail strong { color: #8f5628; }
.order-customer-dimensions { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }
.order-customer-dimensions > span { display: inline-flex; align-items: center; gap: 4px; max-width: 100%; padding: 3px 6px; border-radius: 6px; background: #edf2f6; color: #718296; font-size: 10px; line-height: 1.25; }
.order-customer-dimensions b { overflow: hidden; max-width: 92px; color: #405870; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.order-customer-dimensions.categories > span { background: rgba(49,85,120,.08); }
.order-customer-dimensions.categories b { max-width: none; }
.order-customer-dimensions em { color: #9aa7b5; font-size: 11px; font-style: normal; }
.order-customer-modal { padding: 24px; }
.order-customer-modal-card {
  width: min(1000px, calc(100vw - 48px)) !important;
  max-height: min(78vh, 720px) !important;
  margin: 0 !important;
  overflow: hidden;
  border: 1px solid rgba(148,163,184,.28);
}
.order-customer-modal-header { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 16px 20px 14px; border-bottom: 1px solid #e7edf2; }
.order-customer-modal-header h3 { color: #203754; font-size: 17px; font-weight: 700; }
.order-customer-modal-header p { color: #8492a2; font-size: 11px; margin-top: 4px; }
.order-customer-modal-header button { width: 32px; height: 32px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 8px; color: #8492a2; background: transparent; transition: color .18s, background .18s, transform .18s; }
.order-customer-modal-header button:hover { color: #315578; background: #edf2f6; }
.order-customer-modal-header button:active { transform: scale(.96); }
.order-customer-modal-body { min-height: 0; overflow: auto; padding: 18px 20px 22px; }
.order-customer-type-summary { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.order-customer-type-summary article { padding: 13px 14px 14px; border-radius: 11px; background: #edf2f6; }
.order-customer-type-summary article > div { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.order-customer-type-summary span { color: #536b82; font-size: 12px; font-weight: 650; }
.order-customer-type-summary strong { color: #203754; font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums; }
.order-customer-type-summary p { color: #718296; font-size: 10px; margin-top: 4px; font-variant-numeric: tabular-nums; }
.order-customer-type-summary article > i,
.order-customer-detail-row > i { display: block; overflow: hidden; height: 5px; margin-top: 9px; border-radius: 3px; background: #d9e3e9; }
.order-customer-type-summary article > i b,
.order-customer-detail-row > i b { display: block; height: 100%; border-radius: inherit; background: #315578; }
.order-customer-type-summary article.retail > i b { background: #a66a36; }
.order-customer-detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: start; }
.order-customer-detail-panel { overflow: hidden; border: 1px solid #dfe7ed; border-radius: 11px; background: #fff; }
.order-customer-detail-panel.products { grid-column: 1 / -1; }
.order-customer-detail-panel > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 13px; background: #f3f6f9; border-bottom: 1px solid #e3eaef; }
.order-customer-detail-panel h4 { color: #203754; font-size: 13px; font-weight: 700; }
.order-customer-detail-panel header span { color: #8492a2; font-size: 10px; }
.order-customer-detail-row { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 3px 16px; padding: 10px 13px 11px; border-bottom: 1px solid #edf1f4; }
.order-customer-detail-row:last-child { border-bottom: 0; }
.order-customer-detail-row > div { min-width: 0; }
.order-customer-detail-row > div strong { display: block; overflow: hidden; color: #344b63; font-size: 12px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.order-customer-detail-row > div span { display: block; color: #8291a0; font-size: 10px; margin-top: 2px; font-variant-numeric: tabular-nums; }
.order-customer-detail-row > p { display: grid; grid-template-columns: auto auto; align-items: baseline; gap: 0 6px; text-align: right; }
.order-customer-detail-row > p b { color: #315578; font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
.order-customer-detail-row > p small { color: #8492a2; font-size: 9px; }
.order-customer-detail-row > p em { grid-column: 1 / -1; color: #8492a2; font-size: 9px; font-style: normal; font-variant-numeric: tabular-nums; }
.order-customer-detail-row > i { grid-column: 1 / -1; margin-top: 4px; }
.order-customer-detail-row.category > i b { background: #4f83a8; }
.order-customer-detail-row.product > i b { background: #2f7f78; }
.order-customer-modal-footer { padding: 10px 20px; border-top: 1px solid #e7edf2; background: #f8fafc; color: #64788f; text-align: center; font-size: 11px; font-variant-numeric: tabular-nums; }
@media (max-width: 680px) {
  .order-customer-modal { padding: 10px; }
  .order-customer-modal-card { width: calc(100vw - 20px) !important; max-height: 82vh !important; }
  .order-customer-type-summary,
  .order-customer-detail-grid { grid-template-columns: 1fr; }
  .order-customer-detail-panel.products { grid-column: auto; }
}
.order-period-table { width: 100%; min-width: 920px; table-layout: fixed; }
.order-period-table thead tr:first-child th:first-child { width: 128px; text-align: left; vertical-align: middle; }
.order-period-table th:not(:first-child),
.order-period-table td:not(:first-child) { text-align: right; }
.order-period-table thead tr:nth-child(2) th { text-align: right; }
.order-period-table .order-period-group { border-left: 1px solid #cbd7e2; text-align: center !important; }
.order-period-table thead tr:nth-child(2) th:nth-child(5) { border-left: 1px solid #cbd7e2; }
.order-period-table th,
.order-period-table td { vertical-align: middle; }
.order-period-table tfoot td { background: #f3f6f9; color: #203754; }
.order-period-summary { display: grid; gap: 12px; }
.order-period-overview { display: grid; gap: 14px; padding: 4px 3px 0; }
.order-period-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; }
.order-period-heading h3 { color: #203754; font-size: 18px; font-weight: 700; letter-spacing: -.01em; }
.order-period-heading p { color: #728296; font-size: 12px; margin-top: 4px; }
.order-period-heading > span { color: #8a97a6; font-size: 11px; text-align: right; }
.order-period-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.order-period-metrics article { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; gap: 3px 10px; padding: 12px 14px 13px; border-left: 3px solid #315578; border-radius: 4px 10px 10px 4px; background: #edf2f6; }
.order-period-metrics span { color: #64788f; font-size: 11px; font-weight: 600; }
.order-period-metrics strong { grid-row: 1 / 3; grid-column: 2; color: #203754; font-size: 16px; font-weight: 700; font-variant-numeric: tabular-nums; }
.order-period-metrics small { color: #8492a2; font-size: 11px; }
.order-period-table-panel { overflow: hidden; }

@media (max-width: 1100px) {
  .order-chart-grid { grid-template-columns: 1fr; }
  .order-chart-card.wide { grid-column: auto; }
  .order-list-head { align-items: stretch; flex-direction: column; }
  .order-list-filters { justify-content: flex-start; }
  .order-customer-heading { align-items: stretch; flex-direction: column; }
  .order-customer-filters { justify-content: flex-start; }
}

@media (max-width: 680px) {
  .order-structure-toolbar select,
  .order-structure-toolbar input[type="date"],
  .order-structure-import-btn { width: 100%; }
  .order-structure-period-actions { width: 100%; margin-left: 0; }
  .order-bar-row { grid-template-columns: 88px minmax(80px, 1fr) 96px; gap: 7px; }
  .order-list-filters > * { width: 100% !important; }
  .order-customer-filters { flex-direction: column; }
  .order-customer-filters > * { width: 100% !important; }
  .order-customer-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .order-customer-type-summary,
  .order-customer-detail-grid { grid-template-columns: 1fr; }
  .order-customer-detail-panel.products { grid-column: auto; }
  .order-import-preview { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .order-period-heading { align-items: flex-start; flex-direction: column; gap: 6px; }
  .order-period-heading > span { text-align: left; }
  .order-period-metrics { grid-template-columns: 1fr; }
}
