/* ============================================================
   CurtainPro Admin — consolidated clean stylesheet
   Single layer, no override chains
   ============================================================ */

:root {
  --bg: #f3f4f6;
  --bg-strong: #eceef1;
  --ink: #101114;
  --muted: #6b7280;
  --line: rgba(16, 17, 20, 0.1);
  --panel: rgba(255, 255, 255, 0.96);
  --panel-strong: #ffffff;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --accent-deep: #1d4ed8;
  --accent-soft: rgba(37, 99, 235, 0.08);
  --info: #0891b2;
  --teal: #101114;
  --teal-soft: rgba(16, 17, 20, 0.04);
  --warning: #8a6b1f;
  --danger: #8d3131;
  --success: #215b3d;
  --shadow: 0 18px 50px rgba(16, 17, 20, 0.06);
  --shadow-soft: 0 6px 20px rgba(16, 17, 20, 0.04);
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
}

/* Guided operations: a task rail, not another dashboard of numbers. */
.stock-task-header { display:flex; justify-content:space-between; align-items:center; gap:24px; margin-bottom:24px; }
.stock-task-header h2 { font-size:clamp(24px,3vw,34px); letter-spacing:-.04em; margin:6px 0; }
.stock-task-header p, .stock-task-hint { color:var(--muted); line-height:1.6; max-width:68ch; }
.stock-task-layout { display:grid; grid-template-columns:minmax(240px,320px) minmax(0,1fr); gap:24px; align-items:start; }
.stock-task-list { display:grid; gap:8px; }
.stock-task-mobile { display:none; }
.stock-task-choice { text-align:left; border:1px solid var(--line); background:var(--panel); border-radius:var(--radius-sm); padding:16px 18px; cursor:pointer; color:var(--ink); }
.stock-task-choice strong { display:block; font-size:14px; margin-bottom:5px; }
.stock-task-choice span { display:block; color:var(--muted); font-size:12px; line-height:1.5; }
.stock-task-choice[aria-pressed="true"] { border-color:var(--accent); box-shadow:inset 4px 0 var(--accent); background:var(--accent-soft); }
.stock-task-choice:focus-visible { outline:3px solid var(--info); outline-offset:3px; }
.stock-task-editor { padding:28px; min-width:0; }
.stock-task-editor h3 { font-size:24px; letter-spacing:-.03em; margin:8px 0; }
.stock-task-fields { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:20px; margin:24px 0; }
.stock-task-field { display:flex; flex-direction:column; gap:8px; min-width:0; font-size:13px; font-weight:600; }
.stock-task-field small { font-size:12px; font-weight:400; color:var(--muted); line-height:1.5; }
.stock-task-field input,.stock-task-field textarea { width:100%; font:inherit; }
.stock-task-wide { grid-column:1/-1; }
.stock-task-review { border-left:4px solid var(--info); padding:20px; margin-top:24px; background:var(--bg); border-radius:var(--radius-sm); }
.stock-task-review p { line-height:1.6; overflow-wrap:anywhere; }
.stock-task-review strong { font-variant-numeric:tabular-nums; }
.stock-task-review .ghost-button { margin:8px 8px 0 0; }
.stock-task-error { color:var(--danger); padding:12px 0; }
@media (max-width:760px) {
  .stock-task-header { align-items:flex-start; flex-direction:column; }
  .stock-task-layout,.stock-task-fields { grid-template-columns:1fr; }
  .stock-task-editor { padding:20px; }
  .stock-task-list { display:none; }
  .stock-task-mobile { display:flex; flex-direction:column; gap:8px; font-weight:600; }
  .stock-task-mobile select { width:100%; min-height:44px; }
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: clip;
  color: var(--ink);
  font-family: "Inter", "Segoe UI", system-ui, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.88), transparent 20rem),
    linear-gradient(180deg, #f5f6f8 0%, #eef0f3 100%);
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(16, 17, 20, 0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(16, 17, 20, 0.022) 1px, transparent 1px);
  background-size: 32px 32px;
  opacity: 0.04;
  pointer-events: none;
  z-index: 0;
}

.page-noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 12% 0%, rgba(255, 255, 255, 0.34), transparent 12rem),
    radial-gradient(circle at 100% 12%, rgba(255, 255, 255, 0.22), transparent 10rem);
  opacity: 0.15;
  z-index: 0;
}

h1, h2, h3 {
  margin: 0;
  font-family: "Inter", "Segoe UI", system-ui, sans-serif;
  letter-spacing: -0.04em;
  font-weight: 700;
}

p { margin: 0; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled, input:disabled, select:disabled, textarea:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.hidden,
[hidden] { display: none !important; }
.screen { min-height: 100vh; }

/* ── Shell layout ── */
/* ── Shell layout ── */
.shell {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

/* ── Workspace Topbar (Header) ── */
.workspace-topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid rgba(16, 17, 20, 0.06);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.03);
  padding: 0 24px;
}

.workspace-topbar-main {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 68px;
  gap: 20px;
  min-width: 0;
}

.workspace-topbar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  color: inherit;
  text-decoration: none;
  border-radius: 14px;
  transition: transform 140ms ease, opacity 140ms ease;
}

.workspace-topbar-brand:hover {
  opacity: 0.88;
  transform: translateY(-1px);
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--ink), #2b2e36);
  color: #ffffff;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(16, 17, 20, 0.15);
}

.brand-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.02em;
}

/* ── Header Navigation ── */
.header-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  min-width: 0;
  overflow-x: clip;
  overflow-y: visible;
  justify-content: center;
}

.nav-dropdown {
  position: relative;
}

.nav-dropdown::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  z-index: 179;
  width: max(100%, 270px);
  height: 16px;
  transform: translateX(-50%);
}

.nav-dropdown-trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 42px;
  padding: 0 16px;
  border-radius: 21px;
  border: none;
  background: transparent;
  color: #4b5563;
  font-size: 0.92rem;
  font-weight: 600;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-dropdown-trigger:hover,
.nav-dropdown:hover .nav-dropdown-trigger,
.nav-dropdown.is-menu-open .nav-dropdown-trigger {
  background: rgba(16, 17, 20, 0.04);
  color: var(--ink);
}

.nav-dropdown.is-active-group .nav-dropdown-trigger {
  background: var(--accent-soft);
  color: var(--accent-deep);
  box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.25);
}

.nav-dropdown-trigger .chevron {
  font-size: 0.75rem;
  opacity: 0.6;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-dropdown:hover .nav-dropdown-trigger .chevron,
.nav-dropdown.is-menu-open .nav-dropdown-trigger .chevron {
  transform: rotate(180deg);
}

.nav-direct-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 42px;
  padding: 0 16px;
  border-radius: 21px;
  border: none;
  background: transparent;
  color: #4b5563;
  font-size: 0.92rem;
  font-weight: 600;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
  white-space: nowrap;
}

.nav-direct-link:hover {
  background: rgba(16, 17, 20, 0.04);
  color: var(--ink);
  transform: translateY(-1px);
}

.nav-direct-link.active {
  background: var(--accent-soft);
  color: var(--accent-deep);
  box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.25);
}

.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 50%;
  z-index: 180;
  transform: translateX(-50%) translateY(8px);
  min-width: 250px;
  padding: 8px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(16, 17, 20, 0.06);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08), 0 4px 12px rgba(0, 0, 0, 0.04);
  display: none;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  gap: 2px;
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown.is-menu-open .nav-dropdown-menu {
  display: grid;
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 10px;
  color: #4b5563;
  font-size: 0.88rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-link[data-icon]::before,
.nav-direct-link[data-icon]::before,
.nav-dropdown-trigger[data-icon]::before,
.profile-menu-link[data-icon]::before {
  content: "";
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  background: currentColor;
  opacity: 0.7;
  mask: var(--nav-icon) center / contain no-repeat;
  -webkit-mask: var(--nav-icon) center / contain no-repeat;
  transition: opacity 0.15s ease;
}

[data-icon="chart"] { --nav-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='black' d='M2 13h12v1H1V2h1zm2-2h2V6H4zm3 0h2V3H7zm3 0h2V8h-2z'/%3E%3C/svg%3E"); }
[data-icon="warehouse"] { --nav-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='black' d='M1 6.5 8 2l7 4.5V14h-4V9H5v5H1zm2 0V12h1V7.7L8 5l4 2.7V12h1V6.5L8 3.6z'/%3E%3C/svg%3E"); }
[data-icon="wallet"] { --nav-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='black' d='M2 4.5A2.5 2.5 0 0 1 4.5 2H13v2H4.5a.5.5 0 0 0 0 1H14v8H4a2 2 0 0 1-2-2zm10 3h2v3h-2a1.5 1.5 0 0 1 0-3'/%3E%3C/svg%3E"); }
[data-icon="cart"] { --nav-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='black' d='M1 2h2l1.1 6.1A2 2 0 0 0 6.1 9.7h5.8A2 2 0 0 0 13.8 8l.8-4H4.2L4 2H1zm5 10.5A1.5 1.5 0 1 1 3 12.5a1.5 1.5 0 0 1 3 0m7 0A1.5 1.5 0 1 1 10 12.5a1.5 1.5 0 0 1 3 0'/%3E%3C/svg%3E"); }
[data-icon="tag"] { --nav-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='black' d='M2 7V2h5l7 7-5 5zm3-3a1 1 0 1 0 0 2 1 1 0 0 0 0-2'/%3E%3C/svg%3E"); }
[data-icon="factory"] { --nav-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='black' d='M1 14V7l4 2V7l4 2V3h6v11zM3 12h1v1H3zm3 0h1v1H6zm3 0h1v1H9zm3 0h1v1h-1zm0-7h1v2h-1z'/%3E%3C/svg%3E"); }
[data-icon="truck"] { --nav-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='black' d='M1 4h8v6h1V6h2.7L15 8.3V10h-1a2 2 0 0 1-4 0H6a2 2 0 0 1-4 0H1zm3 8a1 1 0 1 0 0-2 1 1 0 0 0 0 2m8 0a1 1 0 1 0 0-2 1 1 0 0 0 0 2'/%3E%3C/svg%3E"); }
[data-icon="list"] { --nav-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='black' d='M3 3h2v2H3zm3 0h7v2H6zM3 7h2v2H3zm3 0h7v2H6zM3 11h2v2H3zm3 0h7v2H6z'/%3E%3C/svg%3E"); }
[data-icon="fabric"] { --nav-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='black' d='M2 3h12v2H2zm0 3h12v7H2zm2 2v3h2V8zm3 0v3h2V8zm3 0v3h2V8z'/%3E%3C/svg%3E"); }
[data-icon="box"] { --nav-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='black' d='M2 4.5 8 2l6 2.5V12L8 14l-6-2zm2 .8v5.4l3 1.2V6.5zm8 0-3 1.2v5.4l3-1.2zM8 3.7 5.1 5 8 6.3 10.9 5z'/%3E%3C/svg%3E"); }
[data-icon="users"] { --nav-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='black' d='M6 7a2.5 2.5 0 1 1 0-5 2.5 2.5 0 0 1 0 5m5 1a2 2 0 1 1 0-4 2 2 0 0 1 0 4M1 13c0-2.2 2.2-4 5-4s5 1.8 5 4v1H1zm10 1v-1c0-1-.3-1.9-.9-2.7C11.9 10.5 15 12 15 14z'/%3E%3C/svg%3E"); }
[data-icon="building"] { --nav-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='black' d='M2 14V3l5-2v3h7v10zM4 5h1v1H4zm0 2h1v1H4zm0 2h1v1H4zm4-3h1v1H8zm2 0h1v1h-1zm2 0h1v1h-1zM8 8h1v1H8zm2 0h1v1h-1zm2 0h1v1h-1zM6 14v-2H4v2z'/%3E%3C/svg%3E"); }
[data-icon="people"] { --nav-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='black' d='M5 6a2 2 0 1 1 0-4 2 2 0 0 1 0 4m6 0a2 2 0 1 1 0-4 2 2 0 0 1 0 4M1 14c0-2.1 1.9-4 4-4s4 1.9 4 4zm8 0c0-1 .3-1.9.9-2.6A4.8 4.8 0 0 1 15 14z'/%3E%3C/svg%3E"); }
[data-icon="shield"] { --nav-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='black' d='M8 1 13 3v4c0 3.3-2.1 5.9-5 7-2.9-1.1-5-3.7-5-7V3zm2.2 4.1L7.4 8 6 6.6 5 7.6 7.4 10 11.2 6.2z'/%3E%3C/svg%3E"); }
[data-icon="settings"] { --nav-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='black' d='m6.7 1 .4 1.6a5.8 5.8 0 0 1 1.8 0L9.3 1h1.4l.4 1.8c.3.1.7.3 1 .6L13.8 3l1 1-1.1 1.4q.2.5.3 1l1.7.4v1.4l-1.7.4a4 4 0 0 1-.4 1l1.2 1.4-1 1-1.4-1.1a5 5 0 0 1-1 .4L10.7 15H9.3l-.4-1.7a5 5 0 0 1-1.1-.3L6.4 14l-1-1 1.1-1.4a4.3 4.3 0 0 1-.3-1L4.5 10V8.6l1.7-.4q.1-.5.3-1L5.4 5.8l1-1 1.4 1.1q.5-.2 1-.3L9.3 1zM8 6.2A1.8 1.8 0 1 0 8 9.8a1.8 1.8 0 0 0 0-3.6'/%3E%3C/svg%3E"); }
[data-icon="docs"] { --nav-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='black' d='M4 2h6l3 3v9H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2m5 1.5V6h2.5zM5 8h6v1H5zm0 2h6v1H5z'/%3E%3C/svg%3E"); }
[data-icon="logout"] { --nav-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='black' d='M2 2h5v2H4v8h3v2H2zm8.2 2.2L14 8l-3.8 3.8-1.4-1.4L10.2 9H6V7h4.2L8.8 5.6z'/%3E%3C/svg%3E"); }
[data-icon="plus"] { --nav-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='black' d='M8 2v12m6-6H2' stroke='black' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E"); }
[data-icon="exchange"] { --nav-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round' d='M2 5h10l-3-3m5 8H4l3 3'/%3E%3C/svg%3E"); }
[data-icon="refresh"] { --nav-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='black' d='M8 1.5A6.5 6.5 0 1 0 14.5 8h-2A4.5 4.5 0 1 1 8 3.5v-2zM14 6h-4V2l4 4z'/%3E%3C/svg%3E"); }

/* ── Modals ── */
.app-modal {
  padding: 0;
  border: none;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 25px 50px -12px rgba(16, 17, 20, 0.25);
  max-width: 500px;
  width: 100%;
  margin: auto;
}

.app-modal::backdrop {
  background: rgba(16, 17, 20, 0.4);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid #f0f2f5;
}

.modal-header h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: #101114;
}

.modal-close {
  background: transparent;
  border: none;
  font-size: 1.5rem;
  line-height: 1;
  color: #6b7280;
  cursor: pointer;
  padding: 4px;
  border-radius: 8px;
  transition: background 0.2s;
}

.modal-close:hover {
  background: #f3f4f6;
  color: #101114;
}

.import-modal {
  max-width: min(640px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  overflow: auto;
}

.import-modal-body {
  display: grid;
  gap: 12px;
  padding: 16px 20px 20px;
}

.import-modal-actions {
  align-items: center;
  justify-content: flex-end;
  padding-top: 2px;
}

.import-modal-result {
  display: grid;
  gap: 10px;
}

.nav-link:hover {
  background: rgba(16, 17, 20, 0.04);
  color: var(--ink);
  transform: translateX(4px);
}

.nav-link:hover::before {
  opacity: 1;
}

.nav-link.active {
  background: var(--accent-soft);
  color: var(--accent-deep);
  font-weight: 600;
}

.nav-link.active::before {
  opacity: 1;
}

.nav-divider {
  height: 1px;
  background: rgba(16, 17, 20, 0.06);
  margin: 6px 0;
}

.ghost-link {
  justify-content: center;
  font-size: 0.82rem;
  color: #6b7280;
  padding: 8px 14px;
}

/* ── Workspace ── */
.workspace {
  flex: 1;
  padding: 24px 32px 40px;
  min-width: 0;
  position: relative;
  z-index: 1;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
}

.workspace-heading {
  display: grid;
  gap: 6px;
  min-width: 0;
  max-width: 52rem;
  margin-bottom: 24px;
}

.page-breadcrumbs {
  display: flex;
  flex-wrap: nowrap;
  gap: 4px;
  align-items: center;
  min-height: 18px;
  min-width: 0;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  color: #7a818b;
  font-size: 0.74rem;
  font-weight: 600;
}

.page-breadcrumbs::-webkit-scrollbar {
  display: none;
}

.page-breadcrumb-item {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  flex: 0 0 auto;
}

.page-breadcrumb-link,
.page-breadcrumb-current {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  white-space: nowrap;
}

.page-breadcrumb-link {
  color: #5c6470;
  transition: color 0.15s ease;
}

.page-breadcrumb-link:hover {
  color: var(--accent);
}

.page-breadcrumb-current {
  color: #101114;
}

.page-breadcrumb-separator {
  color: #b1b8c1;
  margin: 0 2px;
}

.workspace-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.workspace-section-badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 8px;
  border-radius: 6px;
  border: 1px solid #d7dce2;
  background: #ffffff;
  color: #111214;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.workspace-context {
  color: #7a818b;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.workspace-heading h1 {
  font-size: clamp(1.8rem, 2.8vw, 2.4rem);
  line-height: 1.1;
  color: #101114;
  letter-spacing: -0.04em;
  font-weight: 700;
}

.workspace-copy {
  margin-top: 4px;
  max-width: 40rem;
  color: #6f7680;
  font-size: 0.9rem;
  line-height: 1.5;
}

.topbar-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-shrink: 0;
  min-width: 0;
}

.favorites-menu {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.favorites-menu::after {
  content: "";
  position: absolute;
  top: 100%;
  right: 0;
  left: 0;
  height: 10px;
}

.favorite-page-button {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(16, 17, 20, 0.08);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.94);
  color: #6b7280;
  box-shadow: 0 8px 20px rgba(16, 17, 20, 0.04);
  transition: border-color 140ms ease, background 140ms ease, color 140ms ease, transform 140ms ease;
}

.favorite-page-button::before {
  content: "";
  width: 18px;
  height: 18px;
  background: currentColor;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='m12 2.5 2.9 5.88 6.49.94-4.69 4.57 1.1 6.46L12 17.3l-5.8 3.05 1.1-6.46-4.69-4.57 6.49-.94z'/%3E%3C/svg%3E") center / contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='m12 2.5 2.9 5.88 6.49.94-4.69 4.57 1.1 6.46L12 17.3l-5.8 3.05 1.1-6.46-4.69-4.57 6.49-.94z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.favorite-page-button:hover,
.favorites-menu:focus-within .favorite-page-button,
.favorites-menu:hover .favorite-page-button {
  border-color: rgba(37, 99, 235, 0.22);
  background: #ffffff;
  color: var(--accent-deep);
  transform: translateY(-1px);
}

.favorite-page-button.is-active {
  border-color: rgba(234, 179, 8, 0.36);
  background: #fffbeb;
  color: #d97706;
  box-shadow: inset 0 0 0 1px rgba(234, 179, 8, 0.12);
}

.favorites-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 225;
  display: none;
  width: min(300px, calc(100vw - 32px));
  padding: 10px;
  border: 1px solid rgba(16, 17, 20, 0.08);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 24px 52px rgba(16, 17, 20, 0.14), 0 6px 16px rgba(16, 17, 20, 0.06);
  gap: 8px;
  transform: translateY(8px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 140ms ease, transform 140ms ease, visibility 140ms ease;
}

.favorites-menu:hover .favorites-dropdown,
.favorites-menu:focus-within .favorites-dropdown {
  display: grid;
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.favorites-dropdown-head {
  display: grid;
  gap: 2px;
  padding: 8px 10px;
}

.favorites-dropdown-head span {
  color: #101114;
  font-size: 0.82rem;
  font-weight: 800;
}

.favorites-dropdown-head small {
  color: #8a919e;
  font-size: 0.72rem;
  font-weight: 600;
}

.favorites-list {
  display: grid;
  gap: 4px;
}

.favorite-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  border-radius: 10px;
  transition: background 140ms ease;
}

.favorite-item:hover {
  background: rgba(37, 99, 235, 0.08);
}

.favorite-link {
  display: grid;
  min-height: 42px;
  padding: 7px 0 7px 10px;
  border-radius: 10px;
  color: #101114;
  text-decoration: none;
  transition: background 140ms ease, color 140ms ease;
}

.favorite-link:hover {
  color: var(--accent-deep);
}

.favorite-link-copy {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.favorite-link-copy strong,
.favorite-link-copy span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.favorite-link-copy strong {
  font-size: 0.82rem;
  font-weight: 750;
}

.favorite-link-copy span {
  color: #8a919e;
  font-size: 0.7rem;
  font-weight: 650;
}

.favorite-remove {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: #9ca3af;
  font-size: 1rem;
  line-height: 1;
}

.favorite-remove:hover {
  background: rgba(141, 49, 49, 0.08);
  color: #8d3131;
}

.favorites-empty {
  padding: 14px 10px 16px;
  color: #8a919e;
  font-size: 0.78rem;
  font-weight: 650;
  text-align: center;
}

.profile-menu {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-width: 0;
}

.profile-menu::after {
  content: "";
  position: absolute;
  top: 100%;
  right: 0;
  left: 0;
  height: 10px;
}

.account-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  max-width: min(340px, 38vw);
  min-width: 0;
  min-height: 42px;
  padding: 6px 10px 6px 8px;
  border-radius: 14px;
  border: 1px solid rgba(37, 99, 235, 0.12);
  background:
    radial-gradient(circle at top right, rgba(37, 99, 235, 0.12), transparent 40%),
    linear-gradient(145deg, rgba(255,255,255,0.98), rgba(248,250,252,0.96));
  color: #101114;
  text-decoration: none;
  transition: border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

.account-chip:hover {
  border-color: rgba(37, 99, 235, 0.26);
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.08);
  transform: translateY(-1px);
}

.account-chip.is-active {
  border-color: rgba(37, 99, 235, 0.3);
  box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.08);
}

.account-chip-avatar {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 10px;
  background: rgba(37, 99, 235, 0.12);
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  flex-shrink: 0;
}

.account-chip-copy {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.account-chip-copy strong {
  font-size: 0.82rem;
  font-weight: 700;
  color: #101114;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.account-chip-copy span {
  color: #6f7680;
  font-size: 0.72rem;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.profile-menu-chevron {
  color: #6b7280;
  font-size: 0.72rem;
  transition: transform 140ms ease;
  flex-shrink: 0;
}

.profile-menu:hover .profile-menu-chevron,
.profile-menu:focus-within .profile-menu-chevron {
  transform: rotate(180deg);
}

.profile-menu-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 220;
  display: none;
  width: min(320px, calc(100vw - 32px));
  padding: 10px;
  border: 1px solid rgba(16, 17, 20, 0.08);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 24px 52px rgba(16, 17, 20, 0.14), 0 6px 16px rgba(16, 17, 20, 0.06);
  gap: 4px;
  transform: translateY(8px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 140ms ease, transform 140ms ease, visibility 140ms ease;
}

.profile-menu:hover .profile-menu-dropdown,
.profile-menu:focus-within .profile-menu-dropdown {
  display: grid;
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.profile-menu-head {
  display: grid;
  gap: 6px;
  padding: 10px 12px 12px;
  border-radius: 12px;
  background: linear-gradient(145deg, rgba(248, 250, 252, 0.98), rgba(255, 255, 255, 0.96));
  border: 1px solid rgba(16, 17, 20, 0.06);
}

.profile-menu-kicker,
.profile-menu-section-label {
  color: #8a919e;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.profile-menu-head strong {
  color: #101114;
  font-size: 0.94rem;
  line-height: 1.2;
}

.profile-menu-head > span:not(.profile-menu-kicker) {
  color: #6f7680;
  font-size: 0.78rem;
  line-height: 1.35;
}

.profile-role-list {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.profile-role-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  max-width: 100%;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.09);
  color: var(--accent-deep);
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.2;
}

.profile-menu-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 38px;
  padding: 9px 12px;
  border-radius: 10px;
  color: #4b5563;
  font-size: 0.86rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 140ms ease, color 140ms ease, transform 140ms ease;
}

.profile-menu-action {
  width: 100%;
  border: none;
  background: transparent;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
}

.profile-menu-link:hover,
.profile-menu-link.is-active {
  background: rgba(37, 99, 235, 0.08);
  color: var(--accent-deep);
}

.profile-menu-link:hover {
  transform: translateX(1px);
}

.profile-menu-logout {
  color: #8d3131;
}

.profile-menu-logout:hover {
  background: rgba(141, 49, 49, 0.08);
  color: #8d3131;
}

.profile-menu-section {
  display: grid;
  gap: 4px;
  margin-top: 4px;
  padding-top: 8px;
  border-top: 1px solid rgba(16, 17, 20, 0.06);
}

.profile-menu-section[hidden] {
  display: none !important;
}

.profile-menu-section-label {
  padding: 0 12px 2px;
}

/* ── Page structure ── */
.page-root {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.section {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.hero-band {
  display: grid;
  grid-template-columns: minmax(0, 1.28fr) minmax(280px, 0.92fr);
  gap: 14px;
  padding: 18px 20px;
  border-radius: 18px;
  border: 1px solid rgba(37, 99, 235, 0.12);
  background:
    radial-gradient(circle at top right, rgba(37, 99, 235, 0.12), transparent 34%),
    linear-gradient(145deg, rgba(255,255,255,0.98), rgba(248,250,252,0.96));
  box-shadow: 0 10px 30px rgba(16, 17, 20, 0.04);
}

.hero-copy {
  display: grid;
  gap: 8px;
  align-content: start;
}

.hero-title {
  font-size: clamp(1.45rem, 2.8vw, 2.2rem);
  line-height: 1.02;
  color: #101114;
  letter-spacing: -0.04em;
  font-weight: 700;
}

.hero-description {
  max-width: 44rem;
  color: #6f7680;
  font-size: 0.92rem;
  line-height: 1.55;
}

.hero-kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.hero-kpi {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(37, 99, 235, 0.1);
  background: rgba(255, 255, 255, 0.78);
}

.hero-kpi-label {
  color: #6f7680;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
  word-break: normal;
  overflow-wrap: normal;
}

.hero-kpi-value {
  color: #101114;
  font-size: 1.18rem;
  font-weight: 700;
  letter-spacing: 0;
  word-break: normal;
}

.hero-kpi-hint {
  color: #6f7680;
  font-size: 0.76rem;
  line-height: 1.35;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 14px;
}

.section-heading h2 {
  font-size: 1.15rem;
  letter-spacing: -0.03em;
}

/* ── Grids ── */
.metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
}

.content-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.module-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.catalog-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.entity-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.section-split {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(340px, 1.1fr);
  gap: 14px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.9fr);
  gap: 14px;
  align-items: start;
}

.detail-layout.product-detail-main {
  grid-template-columns: minmax(0, 1fr);
}

.detail-hub-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.32fr) minmax(300px, 0.9fr);
  gap: 14px;
  align-items: start;
}

.document-side-stack {
  display: grid;
  gap: 14px;
}

.detail-subpanel-stack {
  display: grid;
  gap: 12px;
}

.section-tag {
  display: block;
  margin-bottom: 3px;
  color: var(--accent);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.users-layout-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(320px, 0.85fr);
  gap: 14px;
}

.users-detail-stack { display: grid; gap: 14px; }

.admin-dense-section { gap: 14px; }

.profile-page {
  gap: 16px;
}

.profile-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.32fr) minmax(300px, 0.86fr);
  gap: 14px;
  align-items: start;
}

.profile-side-stack {
  display: grid;
  gap: 14px;
}

.profile-form {
  gap: 14px;
}

.profile-summary-panel .status-chip-stack {
  margin-top: 10px;
}

/* ── Panels & Cards ── */
.panel {
  padding: 20px 24px;
  min-width: 0;
  border-radius: 16px;
  border: 1px solid #e4e7eb;
  background: #ffffff;
  box-shadow: 0 2px 6px rgba(16, 17, 20, 0.02), 0 4px 16px rgba(16, 17, 20, 0.03);
}

.wide-panel { margin-top: 12px; }

.dense-panel { padding: 16px; border-radius: 14px; }

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid #f0f2f5;
}

.panel-header h3 {
  font-size: 1rem;
  line-height: 1.2;
  color: #101114;
  letter-spacing: -0.02em;
}

.panel-header-spread {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid #f0f2f5;
}

.panel-in.panel-note {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 10px;
  border-radius: 12px;
  background: rgba(16, 17, 20, 0.04);
  color: #4b5563;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.metric-card {
  display: grid;
  align-content: start;
  gap: 6px;
  min-width: 0;
  min-height: 96px;
  padding: 16px 18px;
  border-radius: 16px;
  border: 1px solid rgba(16, 17, 20, 0.06);
  background: #ffffff;
  box-shadow: 0 4px 12px rgba(16, 17, 20, 0.02);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.metric-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(16, 17, 20, 0.04);
  border-color: rgba(16, 17, 20, 0.1);
}

.metric-label {
  color: #6b7280;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}

.metric-value {
  font-weight: 700;
  overflow-wrap: anywhere;
}

.metric-footnote {
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid #f0f2f5;
  color: #6f7680;
  font-size: 0.8rem;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.dashboard-analytics-shell {
  display: grid;
  gap: 16px;
  margin-top: 12px;
}

.dashboard-toolbar {
  display: flex;
  justify-content: flex-end;
  align-items: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.dashboard-range-switch {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.dashboard-filter-field,
.dashboard-filter-caption {
  display: grid;
  gap: 4px;
  min-width: 180px;
}

.dashboard-filter-field span,
.dashboard-filter-caption span,
.dashboard-highlight-label {
  color: #8a919d;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dashboard-filter-caption strong {
  font-size: 0.92rem;
  color: #101114;
}

.dashboard-highlight-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.dashboard-highlight-card {
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid #e4e7eb;
  background: #fafbfc;
}

.dashboard-highlight-card.tone-warning {
  border-color: rgba(138, 107, 31, 0.22);
  background: rgba(250, 245, 220, 0.78);
}

.dashboard-highlight-value {
  font-size: 1.4rem;
  line-height: 1;
  letter-spacing: -0.04em;
  color: #101114;
}

.dashboard-highlight-meta {
  color: #6f7680;
  font-size: 0.8rem;
  line-height: 1.4;
}

.dashboard-analytics-grid,
.dashboard-insight-grid,
.dashboard-panel-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.dashboard-control-layout {
  margin-top: 14px;
}

.dashboard-chart-card {
  display: grid;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid #e4e7eb;
  background: #fafbfc;
}

.dashboard-chart-shell {
  padding: 10px 10px 8px;
  border-radius: 14px;
  border: 1px solid #eceff3;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(247, 249, 252, 0.96)),
    linear-gradient(135deg, rgba(37, 99, 235, 0.04), transparent 55%);
}

.dashboard-chart-frame {
  display: grid;
  gap: 10px;
}

.dashboard-chart-svg {
  width: 100%;
  height: auto;
  display: block;
}

.dashboard-chart-axis,
.dashboard-chart-scale,
.dashboard-chart-footer,
.dashboard-chart-legend {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.dashboard-chart-axis,
.dashboard-chart-scale,
.dashboard-chart-footer {
  color: #6f7680;
  font-size: 0.76rem;
}

.dashboard-chart-axis span,
.dashboard-chart-scale span,
.dashboard-chart-footer span {
  line-height: 1.4;
}

.dashboard-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #4b5563;
  font-size: 0.78rem;
  font-weight: 500;
}

.dashboard-legend-swatch {
  display: inline-block;
  width: 18px;
  border-top: 3px solid var(--legend-color);
  border-radius: 999px;
}

.dashboard-legend-swatch.is-dashed {
  border-top-style: dashed;
}

.dashboard-legend-pill {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid #e1e5ea;
  background: rgba(255, 255, 255, 0.8);
  color: #4b5563;
  font-size: 0.76rem;
}

.dashboard-legend-pill strong {
  color: #101114;
  font-size: 0.88rem;
  letter-spacing: -0.02em;
}

.dashboard-chart-empty {
  display: grid;
  gap: 4px;
  justify-items: center;
  padding: 36px 18px;
  border-radius: 12px;
  border: 1px dashed rgba(16, 17, 20, 0.12);
  background: rgba(255, 255, 255, 0.76);
  text-align: center;
}

.dashboard-chart-empty strong {
  font-size: 0.92rem;
  color: #101114;
}

.dashboard-chart-empty span {
  color: #6f7680;
  font-size: 0.82rem;
  line-height: 1.45;
}

.dashboard-breakdown-list,
.dashboard-workshop-compare,
.dashboard-peak-list {
  display: grid;
  gap: 10px;
}

.dashboard-breakdown-row,
.dashboard-workshop-row,
.dashboard-peak-row {
  display: grid;
  gap: 6px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid #e8ebef;
  background: #fafbfc;
}

.dashboard-breakdown-head,
.dashboard-workshop-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
}

.dashboard-breakdown-head strong,
.dashboard-workshop-head strong,
.dashboard-peak-copy strong {
  font-size: 0.88rem;
  color: #101114;
}

.dashboard-breakdown-head span,
.dashboard-workshop-head span,
.dashboard-workshop-meta,
.dashboard-peak-copy span {
  color: #6f7680;
  font-size: 0.78rem;
  line-height: 1.4;
}

.dashboard-breakdown-meter {
  overflow: hidden;
  height: 8px;
  border-radius: 999px;
  background: #e9edf2;
}

.dashboard-breakdown-meter span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2563eb, #101114);
}

.dashboard-workshop-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.dashboard-peak-row {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.dashboard-peak-copy {
  display: grid;
  gap: 3px;
}

.finance-overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.85fr);
  gap: 14px;
}

.finance-chart-card {
  display: grid;
  gap: 12px;
  min-width: 0;
  padding: 16px;
  border: 1px solid #e4e7eb;
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.96)),
    linear-gradient(135deg, rgba(8, 145, 178, 0.04), transparent 56%);
  box-shadow: 0 8px 22px rgba(16, 17, 20, 0.04);
}

.finance-chart-card-wide {
  grid-row: span 2;
}

.finance-card-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.finance-card-head h3 {
  margin: 0;
}

.finance-period-panel {
  display: grid;
  justify-items: end;
  gap: 8px;
  min-width: min(100%, 560px);
}

.finance-period-toolbar {
  display: flex;
  justify-content: flex-end;
  align-items: flex-end;
  gap: 8px;
  flex-wrap: wrap;
  min-width: 0;
}

.finance-period-switch {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  flex-wrap: wrap;
  min-width: 0;
}

.finance-period-switch .nav-button.compact {
  min-height: 32px;
  padding: 6px 10px;
  border-radius: 9px;
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
}

.finance-period-field {
  display: grid;
  gap: 3px;
  width: 132px;
  min-width: 120px;
}

.finance-period-field span {
  color: #8a919d;
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.finance-period-field input {
  min-height: 32px;
  padding: 5px 8px;
  border-radius: 9px;
  font-size: 0.8rem;
}

.finance-period-caption {
  flex-basis: 100%;
  color: #6f7680;
  font-size: 0.74rem;
  line-height: 1.3;
  text-align: right;
  overflow-wrap: anywhere;
}

.finance-pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid #e1e5ea;
  background: #ffffff;
  color: #101114;
  font-size: 0.78rem;
  font-weight: 800;
  white-space: nowrap;
}

.finance-pill.tone-success {
  border-color: rgba(22, 163, 74, 0.24);
  color: #15803d;
  background: rgba(22, 163, 74, 0.08);
}

.finance-pill.tone-danger {
  border-color: rgba(220, 38, 38, 0.22);
  color: #b91c1c;
  background: rgba(220, 38, 38, 0.07);
}

.finance-chart-frame {
  position: relative;
  min-height: 332px;
  padding: 8px;
  border: 1px solid #edf0f4;
  border-radius: 12px;
  background: #ffffff;
}

.finance-chart-frame.compact {
  min-height: 260px;
}

.finance-chart-frame canvas {
  width: 100% !important;
  height: 100% !important;
}

.finance-attention-list,
.finance-signal-grid {
  display: grid;
  gap: 8px;
}

.finance-attention-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid #e8ebef;
  border-radius: 12px;
  background: #ffffff;
}

.finance-attention-item strong,
.finance-signal strong {
  color: #101114;
}

.finance-attention-item span,
.finance-signal span,
.finance-signal small {
  color: #6f7680;
  font-size: 0.78rem;
  line-height: 1.35;
}

.finance-attention-item b {
  color: #101114;
  font-size: 0.9rem;
  white-space: nowrap;
}

.finance-attention-item.tone-danger { border-color: rgba(220, 38, 38, 0.16); background: rgba(220, 38, 38, 0.04); }
.finance-attention-item.tone-warning { border-color: rgba(199, 106, 37, 0.2); background: rgba(199, 106, 37, 0.06); }
.finance-attention-item.tone-info { border-color: rgba(8, 145, 178, 0.2); background: rgba(8, 145, 178, 0.06); }
.finance-attention-item.tone-success { border-color: rgba(22, 163, 74, 0.2); background: rgba(22, 163, 74, 0.06); }

.finance-signal-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.finance-signal {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid #e8ebef;
  border-radius: 12px;
  background: #ffffff;
}

.finance-signal span {
  font-weight: 800;
}

.finance-signal strong {
  min-width: 0;
  overflow: hidden;
  font-size: 1.04rem;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.finance-signal.tone-success { border-color: rgba(22, 163, 74, 0.18); }
.finance-signal.tone-warning { border-color: rgba(199, 106, 37, 0.2); }
.finance-signal.tone-danger { border-color: rgba(220, 38, 38, 0.18); }
.finance-signal.tone-info { border-color: rgba(8, 145, 178, 0.2); }

.finance-payment-card {
  max-width: 860px;
}

@media (max-width: 1099px) {
  .finance-overview-grid {
    grid-template-columns: 1fr;
  }

  .finance-chart-card-wide {
    grid-row: auto;
  }
}

@media (max-width: 720px) {
  .finance-card-head,
  .finance-attention-item {
    align-items: flex-start;
    grid-template-columns: 1fr;
  }

  .finance-card-head {
    flex-direction: column;
  }

  .finance-period-panel,
  .finance-period-toolbar,
  .finance-period-switch,
  .finance-period-field {
    width: 100%;
    justify-items: stretch;
  }

  .finance-period-toolbar {
    justify-content: flex-start;
  }

  .finance-period-switch .nav-button.compact {
    flex: 1 1 86px;
    justify-content: center;
  }

  .finance-period-caption {
    text-align: left;
  }

  .finance-signal-grid {
    grid-template-columns: 1fr;
  }
}

.module-link-card {
  display: grid;
  gap: 5px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid #e4e7eb;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(16, 17, 20, 0.03);
  color: inherit;
  text-decoration: none;
  transition: border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

.module-link-card:hover {
  border-color: #d0d5dc;
  box-shadow: 0 4px 12px rgba(16, 17, 20, 0.06);
  transform: translateY(-1px);
}

.module-link-card strong {
  font-size: 0.96rem;
  color: #101114;
}

.module-link-card span {
  color: #6f7680;
  font-size: 0.8rem;
  line-height: 1.4;
}

.catalog-card, .entity-card {
  display: grid;
  gap: 7px;
  padding: 14px 16px 12px;
  border-radius: 14px;
  border: 1px solid #e4e7eb;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(16, 17, 20, 0.03);
}

.catalog-card-top, .entity-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.catalog-card strong, .entity-card h4 {
  font-size: 0.96rem;
  color: #101114;
  letter-spacing: -0.02em;
}

.catalog-count, .inline-badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 7px;
  border-radius: 999px;
  border: 1px solid #e3e7ec;
  background: #f7f8fa;
  color: #4b5563;
  font-size: 0.66rem;
  font-weight: 700;
}

.badge-flow {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.hr-import-panel {
  margin-top: 14px;
}

.catalog-description, .catalog-example, .entity-meta, .entity-code {
  color: #6f7680;
  font-size: 0.82rem;
  line-height: 1.4;
}

.entity-link-card {
  color: inherit;
  text-decoration: none;
  transition: border-color 140ms ease, transform 140ms ease;
}

.entity-link-card:hover {
  transform: translateY(-1px);
  border-color: #d0d5dc;
}

.signal-item, .shortcut-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 13px;
  border-radius: 12px;
  border: 1px solid #e7eaee;
  background: #fafbfc;
  color: inherit;
  text-decoration: none;
  transition: border-color 140ms ease, background 140ms ease, transform 140ms ease;
}

.signal-item:hover, .shortcut-card:hover {
  border-color: #d9dee5;
  background: #ffffff;
  transform: translateY(-1px);
}

.signal-copy, .shortcut-card {
  display: grid;
  gap: 3px;
}

.signal-value {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  color: #101114;
}

.shortcut-card strong { font-size: 0.9rem; color: #101114; }
.shortcut-card span, .signal-item span { color: #6f7680; font-size: 0.78rem; line-height: 1.4; }

.shortcut-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.alert-list { display: grid; gap: 8px; }

.alert-item {
  display: grid;
  gap: 5px;
  padding: 11px 13px;
  border-radius: 12px;
  border: 1px solid #e7eaee;
  background: #fafbfc;
}

.alert-item strong, .alert-item .table-link { font-size: 0.9rem; }

.deviation-banner {
  display: grid;
  gap: 8px;
  padding: 13px 15px;
  border-radius: 14px;
  border: 1px solid rgba(138, 107, 31, 0.28);
  background: rgba(250, 245, 220, 0.8);
}

.deviation-banner.block {
  border-color: rgba(141, 49, 49, 0.22);
  background: rgba(255, 240, 240, 0.8);
}

.deviation-banner-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: #101114;
}

.deviation-banner-copy {
  color: rgba(16, 17, 20, 0.72);
  font-size: 0.84rem;
  line-height: 1.4;
}

.deviation-list { display: grid; gap: 7px; }

.deviation-item {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 11px;
  border-radius: 10px;
  border: 1px dashed rgba(138, 107, 31, 0.22);
  background: rgba(255, 255, 255, 0.6);
}

.deviation-metrics {
  display: grid;
  gap: 2px;
  text-align: right;
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--danger);
}

.note-card {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid #e8ebef;
  background: #fafbfc;
}

.note-card strong { font-size: 0.9rem; color: #101114; }
.flow-note-card { border-style: dashed; }
.flow-note-stack { margin-top: 10px; }

.empty-state-card {
  display: grid;
  gap: 8px;
  padding: 24px 28px;
  border-radius: 16px;
  border: 1px solid rgba(16, 17, 20, 0.08);
  background: #ffffff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02), 0 1px 3px rgba(0, 0, 0, 0.03);
  align-items: center;
}

.empty-state-card strong { font-size: 0.95rem; color: #101114; font-weight: 600; }
.empty-state-card.danger {
  border: 1px solid rgba(225, 29, 72, 0.2);
  background: linear-gradient(145deg, #fffafa 0%, #fff0f2 100%);
  color: #881337;
}
.empty-state-card.danger strong {
  color: #9f1239;
}
.empty-state-card.danger .empty-state {
  color: #be123c;
}

.empty-state { color: #6f7680; font-size: 0.86rem; line-height: 1.5; margin: 0; }

.empty-state-inline {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 16px 12px;
  color: #8a919d;
  text-align: center;
}

.empty-state-inline svg {
  width: 48px;
  height: 48px;
  color: rgba(37, 99, 235, 0.48);
}

.fact-card {
  display: grid;
  gap: 4px;
  padding: 11px 13px;
  border-radius: 12px;
  border: 1px solid #e8ebef;
  background: #fafbfc;
}

.fact-label {
  color: #8a919d;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.fact-value { font-size: 0.96rem; line-height: 1.3; color: #101114; }

.detail-fact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.detail-note {
  display: grid;
  gap: 4px;
  margin-top: 10px;
  padding: 11px 13px;
  border-radius: 12px;
  border: 1px solid #e8ebef;
  background: #fafbfc;
}

.context-card {
  display: grid;
  gap: 6px;
  padding: 16px;
  border-radius: 16px;
  border: 1px solid rgba(16, 17, 20, 0.06);
  background: #ffffff;
  box-shadow: 0 4px 12px rgba(16, 17, 20, 0.02);
}

.context-card p { color: #6b7280; font-size: 0.88rem; line-height: 1.5; }

.inline-callout {
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid rgba(16, 17, 20, 0.08);
  background: rgba(16, 17, 20, 0.02);
}

.inline-callout strong { font-size: 0.9rem; font-weight: 600; }
.inline-callout span { color: #4b5563; font-size: 0.85rem; line-height: 1.45; }

.subpanel {
  display: grid;
  gap: 12px;
  padding: 16px;
  border-radius: 16px;
  border: 1px solid rgba(16, 17, 20, 0.06);
  background: #ffffff;
  box-shadow: 0 4px 12px rgba(16, 17, 20, 0.02);
}

.subpanel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.compact-subpanel { padding: 0; border: none; background: transparent; box-shadow: none; }

.process-rail {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.process-step {
  display: grid;
  gap: 4px;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid rgba(16, 17, 20, 0.06);
  background: #ffffff;
  color: inherit;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(16, 17, 20, 0.02);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

a.process-step:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(16, 17, 20, 0.04);
  border-color: rgba(16, 17, 20, 0.12);
}

.process-step-eyebrow {
  color: #6b7280;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.process-step strong { font-size: 0.9rem; font-weight: 600; line-height: 1.3; color: #111827; }
.process-step span { color: #6b7280; font-size: 0.8rem; line-height: 1.4; }

.process-step.tone-success { border-color: rgba(34, 197, 94, 0.2); background: rgba(34, 197, 94, 0.05); }
.process-step.tone-warning { border-color: rgba(234, 179, 8, 0.2); background: rgba(234, 179, 8, 0.05); }
.process-step.tone-danger  { border-color: rgba(239, 68, 68, 0.2); background: rgba(239, 68, 68, 0.05); }

.progress-meter {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(16, 17, 20, 0.06);
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(16, 17, 20, 0.02);
}

.progress-meter-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.progress-meter-copy { display: grid; gap: 2px; }
.progress-meter-copy strong { font-size: 0.86rem; color: #101114; }
.progress-meter-copy span, .progress-meter-foot { color: #6f7680; font-size: 0.76rem; line-height: 1.4; }

.progress-meter-value { font-size: 0.9rem; font-weight: 700; letter-spacing: -0.03em; color: #101114; }

.progress-meter-track {
  overflow: hidden;
  height: 6px;
  border-radius: 999px;
  background: #ececeb;
}

.progress-meter-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
}

.progress-meter.tone-success .progress-meter-fill { background: var(--success); }
.progress-meter.tone-warning .progress-meter-fill { background: var(--warning); }
.progress-meter.tone-danger  .progress-meter-fill { background: var(--danger); }

.relation-link {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid #e4e4e1;
  background: #fafaf9;
  text-decoration: none;
  transition: border-color 140ms ease, background 140ms ease;
}

.relation-link:hover { border-color: rgba(16,17,20,0.2); background: #ffffff; }
.relation-link strong { font-size: 0.88rem; font-weight: 600; color: #101114; }
.relation-link span { color: #6f7680; font-size: 0.76rem; text-align: right; line-height: 1.4; }

.relation-stack { display: grid; gap: 8px; }
.relation-empty { margin-top: 0; }

.signal-list { display: grid; gap: 8px; }

.line-item-grid { display: grid; gap: 10px; }

.line-item-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
  padding: 11px 13px;
  border-radius: 12px;
  border: 1px solid #e4e4e1;
  background: #fafaf9;
}

.line-item-row.is-highlighted {
  border-color: rgba(37, 99, 235, 0.42);
  background: rgba(37, 99, 235, 0.08);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.line-item-empty {
  margin: 0;
  padding: 14px;
  border: 1px dashed #d8dde7;
  border-radius: 12px;
  background: #f8fafc;
  color: #6f7680;
  font-size: 0.84rem;
  line-height: 1.45;
  text-align: center;
}

.line-item-main {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.sales-product-article-picker {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #f8fafc;
}

.sales-product-article-picker-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.sales-product-article-search {
  min-width: 0;
}

.sales-product-article-summary {
  display: grid;
  min-width: 84px;
  padding: 9px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #ffffff;
  text-align: center;
}

.sales-product-article-summary strong {
  color: #101114;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1;
}

.sales-product-article-summary span {
  color: #6f7680;
  font-size: 0.72rem;
  font-weight: 700;
}

.sales-product-article-results {
  display: grid;
  gap: 4px;
  max-height: 286px;
  overflow: auto;
  padding: 5px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #ffffff;
}

.sales-product-article-option {
  display: grid;
  grid-template-columns: minmax(120px, 0.72fr) minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  width: 100%;
  padding: 9px 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: #101114;
  text-align: left;
  transition: background 140ms ease, border-color 140ms ease, box-shadow 140ms ease;
}

.sales-product-article-option:hover {
  border-color: rgba(37, 99, 235, 0.24);
  background: rgba(37, 99, 235, 0.06);
}

.sales-product-article-option.is-selected {
  border-color: rgba(37, 99, 235, 0.36);
  background: #eef4ff;
}

.sales-product-article-option strong,
.sales-product-article-option span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sales-product-article-option strong {
  font-size: 0.86rem;
  font-weight: 800;
}

.sales-product-article-option span {
  color: #6f7680;
  font-size: 0.78rem;
}

.sales-product-article-option small {
  padding: 4px 8px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #4b5563;
  font-size: 0.72rem;
  font-weight: 800;
  white-space: nowrap;
}

.sales-product-article-option.is-selected small {
  background: rgba(37, 99, 235, 0.12);
  color: #1d4ed8;
}

.sales-product-article-empty {
  padding: 12px;
  color: #6f7680;
  font-size: 0.82rem;
  text-align: center;
}

.sales-product-selected-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  color: #6f7680;
  font-size: 0.78rem;
}

.sales-product-selected-head strong {
  color: #101114;
  font-size: 0.86rem;
}

@media (max-width: 720px) {
  .sales-product-article-picker-head,
  .sales-product-article-option {
    grid-template-columns: 1fr;
  }

  .sales-product-article-summary,
  .sales-product-article-option small {
    justify-self: start;
  }

  .sales-product-selected-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }
}

.smart-picker {
  position: relative;
  display: grid;
  gap: 6px;
  min-width: 0;
}

.smart-picker-control {
  position: relative;
  display: flex;
  align-items: center;
  min-width: 0;
}

.smart-picker-input {
  min-width: 0;
  padding-right: 38px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.smart-picker-clear {
  position: absolute;
  right: 6px;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: #8a919e;
  font-size: 1rem;
  line-height: 1;
}

.smart-picker-clear:hover {
  background: rgba(16, 17, 20, 0.06);
  color: #101114;
}

.smart-picker.is-disabled {
  opacity: 0.65;
  pointer-events: none;
}

.smart-picker-selection {
  display: none;
  gap: 2px;
  min-width: 0;
  min-height: 32px;
  padding: 7px 9px;
  border-radius: 8px;
  border: 1px solid rgba(16, 17, 20, 0.07);
  background: #f8fafc;
  font-size: 0.76rem;
  line-height: 1.25;
  overflow: hidden;
}

.smart-picker.has-value .smart-picker-selection {
  display: grid;
}

.smart-picker-selection strong {
  min-width: 0;
  overflow: hidden;
  color: #101114;
  font-size: 0.8rem;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.smart-picker-selection span {
  color: #6f7680;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.smart-picker-results {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  left: 0;
  z-index: 260;
  display: none;
  width: 100%;
  min-width: 0;
  max-height: 280px;
  overflow: auto;
  padding: 6px;
  border: 1px solid rgba(16, 17, 20, 0.12);
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 18px 44px rgba(16, 17, 20, 0.14);
}

.smart-picker.is-open .smart-picker-results {
  display: grid;
  gap: 3px;
}

.smart-picker-option {
  display: grid;
  gap: 2px;
  width: 100%;
  min-width: 0;
  padding: 8px 9px;
  border: none;
  border-radius: 7px;
  background: transparent;
  color: #101114;
  text-align: left;
}

.smart-picker-option:hover,
.smart-picker-option.is-active {
  background: rgba(37, 99, 235, 0.08);
}

.smart-picker-option span {
  min-width: 0;
  overflow: hidden;
  color: #101114;
  font-size: 0.84rem;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.smart-picker-option small {
  min-width: 0;
  overflow: hidden;
  color: #6f7680;
  font-size: 0.72rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.smart-picker-empty {
  padding: 10px;
  color: #6f7680;
  font-size: 0.82rem;
  text-align: center;
}

.smart-picker-quick-add {
  max-width: 560px;
}

.key-value-list { display: grid; gap: 0; border-top: 1px solid #f0f2f5; }

.key-value-item {
  display: grid;
  grid-template-columns: minmax(100px, 0.44fr) minmax(0, 1fr);
  align-items: start;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid #f0f2f5;
  font-size: 0.86rem;
}

.key-value-item:last-child { border-bottom: none; }
.key-value-item > * { min-width: 0; }
.key-value-item strong {
  line-height: 1.35;
  overflow-wrap: anywhere;
  text-align: right;
}

.compact-list { margin-bottom: 12px; }

/* ── Tables ── */
.table-shell {
  overflow: auto;
  border: 1px solid #e4e7eb;
  border-radius: 12px;
  background: #ffffff;
}

.compact-table { max-height: 280px; }
.tall-table { max-height: 520px; }

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  min-width: 560px;
  font-variant-numeric: tabular-nums;
}

thead {
  position: sticky;
  top: 0;
  background: #f8f9fb;
  box-shadow: inset 0 -1px 0 #e9edf2;
  z-index: 1;
}

th {
  padding: 8px 10px;
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #7a818b;
  text-align: left;
  border-bottom: 1px solid #eef1f4;
}

td {
  padding: 8px 10px;
  font-size: 0.87rem;
  color: #111214;
  border-bottom: 1px solid #eef1f4;
  vertical-align: top;
}

tbody tr:nth-child(even) { background: #fcfcfd; }
tbody tr:hover { background: #f5f7fa; }

.interactive-row { cursor: pointer; }

.table-primary-cell { display: grid; gap: 2px; }
.table-primary { font-weight: 600; }
.table-secondary { color: var(--muted); font-size: 0.84rem; margin-top: 2px; }
.table-subtext { color: #6f7680; font-size: 0.78rem; line-height: 1.35; margin-top: 2px; }

.table-link {
  color: #101114;
  font-weight: 600;
  text-decoration-color: rgba(16,17,20,0.2);
  text-underline-offset: 0.14em;
}
.table-link:hover { color: #000000; text-decoration-color: rgba(16,17,20,0.5); }
.button-link {
  appearance: none;
  background: transparent;
  border: 0;
  cursor: pointer;
  padding: 0;
  text-align: left;
}
.danger-link { color: #b42318; }

.table-action-stack { display: grid; gap: 3px; min-width: 0; }
.compact-action-stack { min-width: 0; }

.table-action-stack .icon-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  color: #6b7280;
  transition: all 0.15s ease;
}

.table-action-stack .icon-link:hover {
  background: rgba(37, 99, 235, 0.08);
  color: var(--accent);
}

.users-table-shell table { min-width: 840px; }
.strong-table-shell { border: 1px solid rgba(16,17,20,0.1); background: rgba(255,255,255,0.9); }
.strong-table { min-width: 880px; }
.strong-table thead { background: rgba(240,240,238,0.96); }
.strong-table th { font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.07em; color: #6f7680; }

.dense-table-shell table { font-size: 0.86rem; }
.status-chip-stack { display: flex; flex-wrap: wrap; gap: 5px; }

.picklist-row { cursor: pointer; }
.picklist-row.selected { background: rgba(16,17,20,0.05); }

.data-grid-shell {
  min-width: 0;
  max-width: 100%;
  border: 1px solid #e4e7eb;
  border-radius: 12px;
  background: #ffffff;
  overflow: hidden;
}

.data-grid-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px 14px;
  flex-wrap: wrap;
  padding: 10px 12px;
  border-bottom: 1px solid #eef1f4;
  background: linear-gradient(180deg, rgba(249,250,252,0.96), rgba(255,255,255,0.98));
}

.data-grid-summary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.84rem;
  color: #59606b;
}

.data-grid-summary strong {
  color: #111214;
  font-size: 0.95rem;
}

.data-grid-hint {
  flex: 1;
  min-width: 200px;
  font-size: 0.78rem;
  color: #6f7680;
}

.data-grid-actions {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
}

.data-grid-shell.is-empty .data-grid-actions button[data-grid-action^="download"],
.data-grid-shell.is-empty .data-grid-actions button[data-grid-action="print-table"] {
  opacity: 0.35;
  pointer-events: none;
}

.data-grid-host {
  min-width: 0;
  max-width: 100%;
  overflow-x: auto;
  background: #ffffff;
}

.data-grid-empty-state {
  min-height: 180px;
  justify-content: center;
  padding: 32px 20px;
}

/* ── Tabulator Premium Styles ── */
.data-grid-host .tabulator {
  width: 100% !important;
  max-width: 100%;
  border: none;
  background: transparent;
  font-size: 0.88rem;
  color: #1f2329;
  font-weight: 500;
}

.data-grid-host .tabulator-header {
  border-bottom: 1px solid rgba(16, 17, 20, 0.06);
  background: rgba(16, 17, 20, 0.015);
  position: sticky;
  top: 0;
  z-index: 10;
}

.data-grid-host .tabulator-header .tabulator-col {
  background: transparent;
  border-right: none;
}

.data-grid-host .tabulator-header .tabulator-col .tabulator-col-content {
  padding: 12px 14px;
}

.data-grid-host .tabulator-header .tabulator-col .tabulator-col-title {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #6b7280;
}

.data-grid-host .tabulator-header .tabulator-col.tabulator-sortable:hover {
  background: rgba(16, 17, 20, 0.04);
}

.data-grid-host .tabulator-header .tabulator-header-filter {
  padding: 4px 14px 8px;
  background: transparent;
  border-top: none;
}

.data-grid-host .tabulator-header .tabulator-header-filter input,
.data-grid-host .tabulator-header .tabulator-header-filter select {
  min-height: 28px;
  border-radius: 6px;
  border: 1px solid rgba(16, 17, 20, 0.08);
  background: #ffffff;
  font-size: 0.78rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
  transition: all 0.2s ease;
  padding: 0 8px;
}

.data-grid-host .tabulator-header .tabulator-header-filter input:focus,
.data-grid-host .tabulator-header .tabulator-header-filter select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
  outline: none;
}

.data-grid-host .tabulator-tableholder .tabulator-table {
  background: #ffffff;
}

.data-grid-host .tabulator-row {
  background: #ffffff;
  border-bottom: 1px solid rgba(16, 17, 20, 0.04);
  transition: background 0.15s ease;
  cursor: pointer;
}

.data-grid-host .tabulator-row:nth-child(even) {
  background: rgba(16, 17, 20, 0.006);
}

.data-grid-host .tabulator-row:hover {
  background: rgba(37, 99, 235, 0.05);
}

.data-grid-host .tabulator-row.tabulator-selected {
  background: var(--accent-soft);
}

.data-grid-host .tabulator-row.tabulator-row-inactive {
  background: rgba(16, 17, 20, 0.02);
  opacity: 0.8;
}

.data-grid-host .tabulator .row-select-col {
  text-align: center;
  padding: 0 4px;
}

.data-grid-host.tabulator .tabulator-group {
  background: rgba(16, 17, 20, 0.04) !important;
  border-bottom: 1px solid rgba(16, 17, 20, 0.08) !important;
  color: #374151 !important;
}

.data-grid-host.tabulator .tabulator-group .tabulator-group-toggle {
  color: #6b7280 !important;
  font-size: 1rem;
  margin-right: 8px;
}

.data-grid-host.tabulator .tabulator-group .tabulator-group-header {
  color: #374151 !important;
}

.data-grid-host.tabulator .tabulator-group span {
  color: #374151 !important;
  font-weight: 600;
}

.data-grid-host .tabulator-cell {
  padding: 12px 14px;
  border-right: none;
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.data-grid-host .tabulator-footer {
  padding: 8px 12px;
  border-top: 1px solid rgba(16, 17, 20, 0.06);
  background: #ffffff;
  border-radius: 0 0 12px 12px;
  font-weight: 500;
}

.data-grid-host .tabulator-footer .tabulator-footer-contents {
  display: flex !important;
  width: 100%;
  gap: 10px !important;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start !important;
}

.data-grid-host .tabulator-footer .tabulator-paginator {
  display: inline-flex !important;
  align-items: center;
  gap: 6px;
  justify-content: flex-start;
  flex-wrap: wrap;
  flex: 0 0 auto !important;
}

.data-grid-host .tabulator-footer .tabulator-paginator label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  color: #6b7280;
  white-space: nowrap;
}

.data-grid-host .tabulator-footer .tabulator-pages {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.data-grid-host .tabulator-page,
.data-grid-host .tabulator-footer .tabulator-page-size,
.data-grid-host .tabulator-footer .tabulator-page {
  min-height: 28px;
  min-width: 28px;
  padding: 0 8px;
  border: 1px solid rgba(16, 17, 20, 0.08);
  border-radius: 8px;
  background: #ffffff;
  color: #4b5563;
  font-size: 0.82rem;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
  cursor: pointer;
  transition: all 0.18s ease;
  line-height: 1;
  text-align: center;
  flex: 0 0 auto;
}

.data-grid-host .tabulator-page:hover:not(:disabled),
.data-grid-host .tabulator-footer .tabulator-page-size:hover {
  border-color: rgba(16, 17, 20, 0.18);
  background: rgba(16, 17, 20, 0.04);
  color: var(--ink);
}

.data-grid-host .tabulator-page:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.data-grid-host .tabulator-page.active,
.data-grid-host .tabulator-page.tabulator-page-active {
  border-color: #101114;
  background: #101114;
  color: #ffffff !important;
  box-shadow: 0 3px 10px rgba(16, 17, 20, 0.18);
  pointer-events: none;
}

.data-grid-host .tabulator-page:disabled,
.data-grid-host .tabulator-page.tabulator-page-disabled {
  opacity: 0.4;
  background: rgba(16, 17, 20, 0.02);
  cursor: not-allowed;
  pointer-events: none;
}

.data-grid-host .tabulator-footer .tabulator-page-counter,
.data-grid-host .tabulator-footer .tabulator-page-size {
  font-size: 0.82rem;
  color: #6b7280;
}

.data-grid-host .tabulator-footer .tabulator-page-size {
  min-width: 60px;
  padding: 0 8px;
  appearance: auto;
}

.data-grid-host .tabulator-footer .tabulator-page-counter {
  display: inline-flex !important;
  align-items: center;
  white-space: nowrap;
  min-height: 32px;
  padding: 0 10px;
  border-radius: 8px;
  background: rgba(16, 17, 20, 0.03);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
  margin-right: 10px !important;
}

.data-grid-host .tabulator-footer .tabulator-page-counter::after {
  content: "\00a0";
}

@media (max-width: 640px) {
  .data-grid-host .tabulator-footer {
    padding: 10px 12px;
  }

  .data-grid-host .tabulator-footer .tabulator-footer-contents {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .data-grid-host .tabulator-footer .tabulator-paginator {
    flex: 1 1 auto;
    justify-content: center;
  }

  .data-grid-host .tabulator-footer .tabulator-page-counter {
    justify-content: center;
    text-align: center;
  }
}

.data-grid-host .tabulator-responsive-collapse {
  border-top: 1px dashed rgba(16, 17, 20, 0.08);
  background: rgba(16, 17, 20, 0.01);
}

.numeric-cell {
  display: inline-block;
  min-width: 100%;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* ── Forms ── */
input, select, textarea {
  width: 100%;
  min-width: 0;
  min-height: 42px;
  padding: 10px 14px;
  border: 1px solid #d8dee7;
  border-radius: 10px;
  background: linear-gradient(180deg, #ffffff, #fbfcfe);
  color: #101114;
  font-size: 0.9rem;
  line-height: 1.35;
  text-overflow: ellipsis;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 1px 2px rgba(16, 17, 20, 0.02);
}

input:not([type="checkbox"]):not([type="radio"]),
select {
  overflow: hidden;
  white-space: nowrap;
}

input[type="search"]::-webkit-search-decoration,
input[type="search"]::-webkit-search-cancel-button,
input[type="search"]::-webkit-search-results-button,
input[type="search"]::-webkit-search-results-decoration {
  -webkit-appearance: none;
  appearance: none;
}

input:hover, select:hover, textarea:hover {
  border-color: rgba(16, 17, 20, 0.22);
  background: #ffffff;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft), 0 1px 2px rgba(16, 17, 20, 0.02);
  background: #ffffff;
}

select:not([multiple]) {
  -webkit-appearance: none;
  appearance: none;
  padding-right: 42px;
  cursor: pointer;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath d='M4.2 6.2 8 10l3.8-3.8' fill='none' stroke='%234b5563' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"),
    linear-gradient(180deg, #ffffff, #fbfcfe);
  background-position: right 14px center, 0 0;
  background-repeat: no-repeat, repeat;
  background-size: 16px 16px, auto;
}

select:not([multiple]):hover {
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath d='M4.2 6.2 8 10l3.8-3.8' fill='none' stroke='%23101114' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"),
    linear-gradient(180deg, #ffffff, #ffffff);
}

select:not([multiple]):focus {
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath d='M4.2 6.2 8 10l3.8-3.8' fill='none' stroke='%232563eb' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"),
    linear-gradient(180deg, #ffffff, #ffffff);
}

textarea { min-height: 84px; resize: vertical; }

input[type="checkbox"], input[type="radio"] {
  width: 18px;
  min-width: 18px;
  height: 18px;
  min-height: 18px;
  max-width: 18px;
  max-height: 18px;
  border-radius: 4px;
  border: 1.5px solid rgba(16, 17, 20, 0.24);
  appearance: none;
  -webkit-appearance: none;
  background: #fff;
  cursor: pointer;
  position: relative;
  transition: all 0.15s ease;
  box-shadow: none;
  padding: 0;
  margin: 0;
  flex: 0 0 auto;
}

input[type="radio"] {
  border-radius: 50%;
}

input[type="checkbox"]:checked, input[type="radio"]:checked {
  background: var(--accent);
  border-color: var(--accent);
}

input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 1px;
  width: 5px;
  height: 10px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

input[type="radio"]:checked::after {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  background: white;
}

.stack-form, .inline-form { display: grid; gap: 10px; }

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  align-items: start;
}

.field-span-2 { grid-column: 1 / -1; }

.field-grid > *,
.stack-form label,
.inline-form > *,
.compact-filter-grid > *,
.compact-filter-grid label {
  min-width: 0;
}

.inline-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.stack-form label {
  display: grid;
  gap: 5px;
  align-content: start;
}
.stack-form label span { color: #101114; font-size: 0.74rem; font-weight: 700; letter-spacing: 0.01em; }

.form-helper { margin: 2px 0 0; color: #6f7680; font-size: 0.81rem; }
.field-label {
  color: #101114;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.form-cluster { display: grid; gap: 7px; }

.profile-pill-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(148px, 1fr));
  gap: 8px;
}

.profile-pill {
  display: grid;
  gap: 3px;
  padding: 12px 13px;
  border-radius: 12px;
  border: 1px solid #d9e0ea;
  background: #f8fafc;
  color: #101114;
  text-align: left;
  transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.profile-pill strong { font-size: 0.84rem; }
.profile-pill span { color: #6f7680; font-size: 0.76rem; line-height: 1.35; }

.profile-pill:hover {
  border-color: rgba(37, 99, 235, 0.24);
  background: rgba(37, 99, 235, 0.04);
  transform: translateY(-1px);
}

.profile-pill.is-active {
  border-color: rgba(37, 99, 235, 0.36);
  background: rgba(37, 99, 235, 0.08);
  box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.12);
}

.compensation-preview {
  border-color: rgba(37, 99, 235, 0.18);
  background: linear-gradient(180deg, rgba(37, 99, 235, 0.06), rgba(37, 99, 235, 0.02));
}

.is-readonly-input {
  background: #f3f5f8;
  color: #6f7680;
  border-color: #dfe5ee;
}

.async-lookup {
  position: relative;
  display: grid;
  gap: 6px;
  min-width: 0;
}

.async-lookup-input {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.async-lookup-input.is-invalid {
  border-color: rgba(141,49,49,0.5);
  box-shadow: 0 0 0 3px rgba(141,49,49,0.1);
}

.async-lookup-panel {
  position: absolute;
  top: calc(100% - 2px);
  left: 0; right: 0;
  z-index: 20;
  display: grid;
  gap: 4px;
  width: 100%;
  min-width: 0;
  max-height: 220px;
  overflow-y: auto;
  padding: 6px;
  border: 1px solid rgba(16,17,20,0.1);
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 12px 32px rgba(16,17,20,0.1);
}

.async-lookup-option {
  display: grid;
  gap: 3px;
  width: 100%;
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: #101114;
  text-align: left;
  cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease;
}

.async-lookup-option strong {
  min-width: 0;
  overflow: hidden;
  font-size: 0.86rem;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.async-lookup-option span,
.async-lookup-summary {
  min-width: 0;
  overflow: hidden;
  color: rgba(16,17,20,0.58);
  font-size: 0.76rem;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.async-lookup-option:hover, .async-lookup-option.is-active {
  border-color: rgba(16,17,20,0.12);
  background: rgba(16,17,20,0.04);
}

.async-lookup-empty { padding: 9px; color: rgba(16,17,20,0.52); font-size: 0.8rem; }
.async-lookup-summary[data-tone='success'] { color: var(--success); }
.async-lookup-summary[data-tone='warning'] { color: var(--warning); }

.warehouse-action-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.warehouse-action-form > * { min-width: 0; }
.warehouse-action-form .field-span-2,
.warehouse-action-form .primary-button { grid-column: 1 / -1; }
.warehouse-action-form .primary-button { width: 100%; justify-content: center; }

.checkbox-label {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 52px;
  padding: 0 16px;
  border: 1px solid rgba(16, 17, 20, 0.1);
  border-radius: 12px;
  background: #ffffff;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}

.checkbox-label:hover {
  border-color: rgba(16, 17, 20, 0.2);
  background: rgba(16, 17, 20, 0.01);
}

.checkbox-label input[type="checkbox"] { flex-shrink: 0; }

.purchase-unit-checkbox {
  transition: all 0.2s ease;
}

.purchase-unit-checkbox:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.1);
}

.role-pick { margin: 0; padding: 0; border: 0; }
.role-pick legend { margin-bottom: 8px; color: #6f7680; font-size: 0.84rem; }

.checkbox-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.check-card {
  display: flex !important;
  align-items: flex-start;
  gap: 9px !important;
  padding: 11px 13px;
  border: 1px solid #e4e7eb;
  border-radius: 12px;
  background: #fafbfc;
}

.compact-checkbox-list {
  display: grid;
  gap: 8px;
}

.compact-checkbox-row {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  gap: 12px !important;
  min-height: 40px;
  padding: 9px 11px;
  border-radius: 10px;
  border: 1px solid #e4e7eb;
  background: #fafbfc;
}

.compact-checkbox-row input {
  width: 16px;
  height: 16px;
  margin: 0;
  flex-shrink: 0;
}

.compact-checkbox-copy {
  display: grid;
  gap: 2px;
}

.compact-checkbox-copy strong {
  font-size: 0.84rem;
}

.compact-checkbox-copy span {
  color: #6f7680;
  font-size: 0.74rem;
  line-height: 1.3;
}

.check-card input { width: auto; margin-top: 2px; flex-shrink: 0; }
.check-card small { display: block; margin-top: 3px; color: #6f7680; font-size: 0.76rem; }

.toggle-field { align-content: end; }
.toggle-field input[type="checkbox"] { width: 16px; height: 16px; }

/* ── Buttons ── */
.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 8px 18px;
  border: none;
  border-radius: 10px;
  background: var(--accent);
  color: #ffffff;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(37, 99, 235, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.primary-button:hover {
  background: var(--accent-hover);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

.primary-button:active {
  transform: translateY(1px);
  box-shadow: 0 2px 4px rgba(37, 99, 235, 0.1);
}

.primary-button:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px rgba(37,99,235,0.25);
}



.screen-reader-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.tab-panel,
.wizard-panel {
  display: grid;
  gap: 12px;
}

.tab-panel-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 6px;
  border: 1px solid rgba(16, 17, 20, 0.08);
  border-radius: 14px;
  background: rgba(16, 17, 20, 0.02);
}

.tab-panel-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 6px 14px;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: #4b5563;
  font-size: 0.88rem;
  font-weight: 600;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
}

.tab-panel-trigger:hover {
  background: rgba(16, 17, 20, 0.04);
  color: var(--ink);
}

.tab-panel-trigger.is-active {
  background: #ffffff;
  color: var(--accent);
  box-shadow: 0 2px 8px rgba(16, 17, 20, 0.08);
}

.tab-panel-badge {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.68rem;
  font-weight: 700;
}

.tab-panel-body,
.wizard-stage {
  display: grid;
  gap: 12px;
}

.tab-panel-content,
.wizard-stage-panel {
  min-width: 0;
}

.wizard-stepper {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
}

.wizard-step {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid #e4e7eb;
  background: #ffffff;
  text-align: left;
  transition: border-color 140ms ease, background 140ms ease, box-shadow 140ms ease;
}

.wizard-step:hover {
  border-color: #d5dce5;
}

.wizard-step.is-active {
  border-color: rgba(37, 99, 235, 0.24);
  background: rgba(37, 99, 235, 0.04);
  box-shadow: 0 1px 2px rgba(16, 17, 20, 0.04);
}

.wizard-step.is-done .wizard-step-index {
  background: rgba(33, 91, 61, 0.12);
  color: var(--success);
}

.wizard-step-index {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 700;
  flex-shrink: 0;
}

.wizard-step-copy {
  display: grid;
  gap: 3px;
}

.wizard-step-copy strong {
  font-size: 0.88rem;
}

.wizard-step-copy span {
  color: #6f7680;
  font-size: 0.76rem;
  line-height: 1.35;
}

.collapsible-section {
  border: 1px solid rgba(16, 17, 20, 0.08);
  border-radius: 14px;
  background: #ffffff;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(16, 17, 20, 0.02);
  transition: box-shadow 0.2s ease;
}

.collapsible-section:hover {
  box-shadow: 0 4px 12px rgba(16, 17, 20, 0.04);
}

.collapsible-summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  cursor: pointer;
  background: rgba(16, 17, 20, 0.015);
  transition: background 0.2s ease;
}

.collapsible-summary:hover {
  background: rgba(16, 17, 20, 0.04);
}

.collapsible-summary::-webkit-details-marker {
  display: none;
}

.collapsible-summary::after {
  content: "";
  width: 8px;
  height: 8px;
  flex-shrink: 0;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  transition: transform 160ms ease;
}

.collapsible-section[open] .collapsible-summary::after {
  transform: rotate(225deg);
}

.collapsible-summary-copy {
  display: grid;
  gap: 3px;
}

.collapsible-summary-copy strong {
  font-size: 0.9rem;
}

.collapsible-summary-copy span {
  color: #6f7680;
  font-size: 0.76rem;
  line-height: 1.35;
}

.collapsible-content {
  padding: 12px;
  border-top: 1px solid #eef1f4;
}

.unified-filter-bar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.unified-filter-main {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  flex: 1 1 360px;
}

.unified-filter-search {
  flex: 1 1 260px;
}

.unified-filter-search input {
  width: 100%;
}

.unified-filter-toggle {
  position: relative;
}

.unified-filter-toggle summary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 8px 12px;
  border: 1px solid #d7dde4;
  border-radius: 10px;
  background: #ffffff;
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

.unified-filter-toggle summary::-webkit-details-marker {
  display: none;
}

.unified-filter-count {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.68rem;
  font-weight: 700;
}

.unified-filter-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 8;
  min-width: min(92vw, 460px);
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid #e4e7eb;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 12px 30px rgba(16, 17, 20, 0.08);
}

.unified-filter-item {
  min-width: 0;
}

.unified-filter-item.is-wide {
  grid-column: 1 / -1;
}

.unified-filter-item label {
  display: grid;
  gap: 5px;
}

.unified-filter-item span {
  font-size: 0.74rem;
  font-weight: 700;
  color: #101114;
}

.unified-filter-meta {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ghost-button, .ghost-link, .back-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 8px 16px;
  border-radius: 10px;
  border: 1px solid rgba(16, 17, 20, 0.1);
  background: #ffffff;
  color: #4b5563;
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(16, 17, 20, 0.02);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.ghost-button:hover, .ghost-link:hover, .back-link:hover {
  border-color: #d1d5db;
  background: #f9fafb;
  color: #111827;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(16, 17, 20, 0.04);
}

.ghost-button:active, .ghost-link:active, .back-link:active {
  transform: translateY(1px);
  box-shadow: 0 1px 2px rgba(16, 17, 20, 0.02);
}

.ghost-button:focus-visible, .ghost-link:focus-visible,
.back-link:focus-visible, .nav-link:focus-visible,
.switch-button:focus-visible, .table-link:focus-visible {
  outline: 3px solid rgba(16,17,20,0.12);
  outline-offset: 2px;
}

.compact {
  min-height: 30px;
  padding: 5px 11px;
  font-size: 0.84rem;
}

.switch-button, .nav-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 8px 14px;
  border-radius: 10px;
  border: 1px solid rgba(16,17,20,0.1);
  background: rgba(255,255,255,0.5);
  color: #101114;
  font-size: 0.87rem;
  font-weight: 500;
  text-decoration: none;
  transition: background 140ms ease, border-color 140ms ease;
}

.switch-button.active, .nav-button.active {
  border-color: transparent;
  background: #111214;
  color: white;
}

.inline-actions, .map-action { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

.toolbar-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.toolbar-actions {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}

.workspace-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.workspace-filters .mini-input { min-width: 160px; }

.warehouse-workspace-section {
  gap: 10px;
}

.warehouse-command-panel {
  display: grid;
  gap: 10px;
}

.warehouse-command-bar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  flex-wrap: wrap;
}

.warehouse-command-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.warehouse-command-copy h3 {
  font-size: 1.06rem;
  line-height: 1.15;
}

.warehouse-quick-links {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
}

.warehouse-summary-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.warehouse-summary-item {
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid #e4e7eb;
  background: #f8fafc;
}

.warehouse-summary-item.is-warning {
  border-color: rgba(138, 107, 31, 0.22);
  background: rgba(254, 243, 199, 0.42);
}

.warehouse-summary-item.is-success {
  border-color: rgba(33, 91, 61, 0.18);
  background: rgba(209, 250, 229, 0.36);
}

.warehouse-summary-label {
  color: #6b7280;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.warehouse-summary-value {
  color: #101114;
  font-size: 1.2rem;
  line-height: 1;
  letter-spacing: -0.03em;
}

.warehouse-summary-hint {
  color: #6f7680;
  font-size: 0.74rem;
  line-height: 1.35;
}

.warehouse-command-tools {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  flex-wrap: wrap;
}

.warehouse-filters-compact {
  flex: 1 1 460px;
  justify-content: flex-start;
}

.warehouse-toolbar-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
}

.warehouse-tab-panel {
  display: grid;
  gap: 8px;
}

.warehouse-selection-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  padding: 10px 12px;
  border: 1px solid #e4e7eb;
  border-radius: 12px;
  background: #f8fafc;
}

.warehouse-selection-toolbar.has-selection {
  border-color: rgba(37, 99, 235, 0.22);
  background: rgba(37, 99, 235, 0.06);
}

.warehouse-selection-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.warehouse-selection-copy strong {
  color: #101114;
  font-size: 0.86rem;
  line-height: 1.25;
}

.warehouse-selection-copy span {
  color: #6f7680;
  font-size: 0.76rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.warehouse-selection-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 9px;
  border-radius: 999px;
  border: 1px solid rgba(16, 17, 20, 0.08);
  background: #ffffff;
  color: #4b5563;
  font-size: 0.76rem;
  font-weight: 800;
  white-space: nowrap;
}

.warehouse-selection-actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  flex-wrap: wrap;
}

.mini-input {
  min-height: 32px;
  padding: 6px 10px;
  border-radius: 9px;
  font-size: 0.86rem;
}

.action-button-stack { display: grid; gap: 5px; }

/* ── Status chips & badges ── */
.status-chip {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.status-chip.success { background: #dcfce7; color: #166534; }
.status-chip.warning { background: #fef08a; color: #854d0e; }
.status-chip.danger  { background: #fee2e2; color: #991b1b; }

.tag-chip {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  border: 1px solid rgba(16,17,20,0.08);
  background: #f4f4f4;
  color: #3a3a3a;
  font-size: 0.7rem;
  font-weight: 700;
}

.tag-chip-live { border-color: rgba(33,91,61,0.2); background: rgba(33,91,61,0.08); color: var(--success); }

.tag-list { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 10px; }
.compact-tag-list { gap: 5px; }
.chip-stack { display: flex; flex-wrap: wrap; gap: 6px; }

.role-badge { margin-right: 6px; margin-bottom: 6px; }

.env-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  border: 1px solid #d7dce2;
  background: #f7f8fa;
  color: #4b5563;
  font-size: 0.66rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ── Post-action feedback ── */
.post-action-feedback { margin-bottom: 12px; }

.post-action-feedback.success, .state-callout.success {
  padding: 11px 13px;
  border-radius: 12px;
  border: 1px solid rgba(33,91,61,0.18);
  background: rgba(33,91,61,0.06);
}

.post-action-feedback.warning, .state-callout.warning {
  padding: 11px 13px;
  border-radius: 12px;
  border: 1px solid rgba(138,107,31,0.2);
  background: rgba(138,107,31,0.06);
}

.post-action-feedback.danger, .state-callout.danger {
  padding: 11px 13px;
  border-radius: 12px;
  border: 1px solid rgba(141,49,49,0.18);
  background: rgba(141,49,49,0.06);
}

/* ── Toast ── */
.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 50;
  min-width: 250px;
  max-width: 390px;
  border-radius: 14px;
  color: white;
  background: #1a1a1f;
  box-shadow: 0 16px 48px rgba(16, 17, 20, 0.2);
  font-size: 0.88rem;
  padding: 13px 40px 13px 15px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.toast.hidden {
  display: none;
}

.toast-close {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.7);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 2px 6px;
  line-height: 1;
}

.toast-close:hover {
  color: white;
}

.toast.error { background: linear-gradient(135deg, #8d3131, #6e2121); }
.toast.warning {
  color: #101114;
  background: linear-gradient(135deg, rgba(244,210,100,0.97), rgba(235,190,70,0.95));
}

/* ── Auth ── */
.auth-screen {
  display: grid;
  place-items: center;
  padding: 40px 16px;
  position: relative;
  z-index: 1;
}

.auth-panel {
  width: min(100%, 440px);
  padding: 32px;
  border: 1px solid #e4e7eb;
  border-radius: 22px;
  background: rgba(255,255,255,0.97);
  box-shadow: 0 24px 60px rgba(16,17,20,0.07);
  backdrop-filter: blur(14px);
  animation: surface-rise 300ms ease;
}

.eyebrow {
  display: block;
  margin-bottom: 8px;
  color: var(--accent);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.auth-panel h1 {
  font-size: clamp(2rem, 5vw, 2.6rem);
  line-height: 0.96;
  color: #101114;
  letter-spacing: -0.04em;
}

.auth-copy {
  margin-top: 8px;
  max-width: 22rem;
  color: #6f7680;
  font-size: 0.88rem;
  line-height: 1.5;
}

.auth-form { display: grid; gap: 11px; margin-top: 18px; }
.auth-switch { display: flex; gap: 10px; margin-top: 16px; }
.auth-checkbox {
  display: inline-flex !important;
  align-items: center;
  gap: 10px;
  min-height: auto;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
}

.auth-checkbox input[type="checkbox"] {
  width: 18px;
  min-width: 18px;
  height: 18px;
  min-height: 18px;
  accent-color: var(--accent);
  cursor: pointer;
  flex-shrink: 0;
}

.auth-checkbox span {
  font-size: 0.9rem;
  color: #374151;
}

.hint { margin-top: 12px; color: #6f7680; font-size: 0.82rem; line-height: 1.45; }
.error-text { color: var(--danger); }
.muted { color: #6f7680; font-size: 0.84rem; }

/* ── Misc page sections ── */
.registry-head, .page-actions-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid #f0f2f5;
}

.registry-head h3, .page-actions-row h3 { font-size: 1rem; line-height: 1.2; color: #101114; }
.page-actions, .panel-inline-metrics, .inline-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.page-actions-row { margin-bottom: -2px; }
.registry-metrics { margin-bottom: 10px; }

.scope-checklist {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.scope-option {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  min-height: 88px;
  padding: 12px 13px;
  border-radius: 14px;
  border: 1px solid rgba(16, 17, 20, 0.08);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.96)),
    radial-gradient(circle at top right, rgba(37, 99, 235, 0.07), transparent 45%);
  transition: border-color 140ms ease, background 140ms ease, transform 140ms ease, box-shadow 140ms ease;
}

.scope-option:hover {
  transform: translateY(-1px);
  border-color: rgba(37, 99, 235, 0.18);
  box-shadow: 0 10px 24px rgba(16, 17, 20, 0.05);
}

.scope-option.is-selected {
  border-color: rgba(37, 99, 235, 0.24);
  background:
    linear-gradient(180deg, rgba(240, 246, 255, 0.98), rgba(248, 250, 252, 0.96)),
    radial-gradient(circle at top right, rgba(37, 99, 235, 0.12), transparent 50%);
}

.scope-option input {
  width: 16px;
  height: 16px;
  margin: 2px 0 0;
  accent-color: var(--accent);
}

.scope-option-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.scope-option-copy strong {
  color: #101114;
  font-size: 0.84rem;
  line-height: 1.25;
}

.scope-option-copy span {
  color: #66707d;
  font-size: 0.78rem;
  line-height: 1.45;
}

.scope-checklist.readonly {
  grid-template-columns: 1fr;
}

.scope-checklist.readonly .scope-option {
  min-height: auto;
  grid-template-columns: 1fr;
  background:
    linear-gradient(180deg, rgba(250, 251, 253, 0.98), rgba(245, 247, 250, 0.96)),
    radial-gradient(circle at top right, rgba(16, 17, 20, 0.04), transparent 45%);
  box-shadow: none;
  transform: none;
}

.scope-checklist.readonly .scope-option input {
  display: none;
}

.secret-inline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: #111214;
  color: #f8fafc;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.secret-inline code {
  flex: 1 1 280px;
  margin: 0;
  color: #f8fafc;
  font-size: 0.82rem;
  line-height: 1.55;
  overflow-wrap: anywhere;
  white-space: break-spaces;
}

.integration-reveal-card {
  border-color: rgba(37, 99, 235, 0.14);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(246, 249, 255, 0.96)),
    radial-gradient(circle at top right, rgba(37, 99, 235, 0.12), transparent 34%);
  box-shadow: 0 14px 32px rgba(37, 99, 235, 0.07);
}

.detail-panel { position: sticky; top: 14px; }
.detail-panel-anchor { scroll-margin-top: 76px; }

.compact-filter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  align-items: end;
  margin-bottom: 12px;
}

.compact-filter-grid label, .stack-form label, .auth-form label {
  display: grid;
  gap: 5px;
  align-content: start;
}
.compact-filter-grid label span, .stack-form label span { font-size: 0.74rem; font-weight: 700; color: #101114; }

.compact-toolbar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
  margin-bottom: 12px;
  padding: 11px;
  border: 1px solid #eceff3;
  border-radius: 12px;
  background: #f8f9fb;
}

.access-role-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.access-role-card { align-content: start; min-height: 110px; }

.warehouse-summary-grid, .warehouse-actions-grid { margin-top: 12px; }
.warehouse-actions-grid { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 12px; }
.warehouse-toolbar { align-items: center; }
.payroll-filters { justify-content: flex-start; }
.employee-role-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.wb-grid { align-items: start; }
.users-toolbar-row { margin-bottom: 0; }
.users-form .toolbar-actions { justify-content: flex-end; }
.users-filter-grid { align-items: end; }
.users-detail-card .tag-chip { margin-right: 6px; margin-bottom: 6px; }

.flow-rail {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.flow-step {
  display: grid;
  gap: 3px;
  padding: 10px 11px;
  border-radius: 12px;
  border: 1px solid rgba(16,17,20,0.08);
  background: #fafaf9;
}

.flow-step strong { font-size: 0.86rem; }
.flow-step span { color: #6f7680; font-size: 0.8rem; line-height: 1.4; }
.flow-step.done { border-color: rgba(33,91,61,0.18); background: rgba(33,91,61,0.06); }
.flow-step.active { border-color: rgba(16,17,20,0.14); background: rgba(16,17,20,0.04); }
.compact-flow-rail { margin-top: 12px; }

.inline-info-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  margin-left: 6px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 700;
  vertical-align: middle;
  cursor: help;
}

.production-inline-input {
  border-color: rgba(37, 99, 235, 0.22);
  background: var(--accent-soft);
}

.production-inline-input:focus {
  border-color: rgba(37, 99, 235, 0.48);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}



.pagination-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: transparent;
  border-top: none;
  font-weight: 500;
  width: 100%;
  gap: 10px;
  flex-wrap: wrap;
}

.pagination-summary {
  font-size: 0.82rem;
  color: #6b7280;
}

.pagination-size {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  color: #6b7280;
  white-space: nowrap;
}

.pagination-size select {
  min-height: 32px;
  min-width: 60px;
  padding: 0 8px;
  border: 1px solid rgba(16, 17, 20, 0.08);
  border-radius: 8px;
  background: #ffffff;
  color: #4b5563;
  font-size: 0.82rem;
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
  cursor: pointer;
  transition: all 0.18s ease;
  appearance: auto;
}

.pagination-size select:hover {
  border-color: rgba(16, 17, 20, 0.18);
  background: rgba(16, 17, 20, 0.04);
  color: var(--ink);
}

.pagination-actions {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  flex-wrap: wrap;
  justify-content: flex-end;
  flex: 1 1 320px;
  margin-left: auto;
}

.pagination-actions button {
  min-height: 32px;
  min-width: 32px;
  padding: 0 10px;
  border: 1px solid rgba(16, 17, 20, 0.08);
  border-radius: 8px;
  background: #ffffff;
  color: #4b5563;
  font-size: 0.82rem;
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
  cursor: pointer;
  transition: all 0.18s ease;
}

.pagination-actions button:hover:not(:disabled) {
  border-color: rgba(16, 17, 20, 0.18);
  background: rgba(16, 17, 20, 0.04);
  color: var(--ink);
}

.pagination-actions button:disabled {
  opacity: 0.4;
  background: rgba(16, 17, 20, 0.02);
  cursor: not-allowed;
}

.pagination-page {
  font-size: 0.82rem;
  color: #6b7280;
  padding: 0 10px;
}

.pagination-page-current {
  display: inline-grid;
  place-items: center;
  min-width: 28px;
  min-height: 28px;
  margin: 0 4px;
  padding: 0 8px;
  border-radius: 8px;
  background: #101114;
  color: #ffffff;
  font-weight: 700;
  line-height: 1;
}

/* ── Animations ── */
@keyframes surface-rise {
  from { opacity: 0; transform: translateY(7px); }
  to   { opacity: 1; transform: translateY(0); }
}

.workspace-topbar,
.page-root > .section > .panel,
.page-root > .section .metric-card,
.page-root > .section .table-shell,
.page-root > .section .shortcut-card,
.page-root > .section .signal-item,
.auth-panel {
  animation: surface-rise 200ms ease;
}

@media (prefers-reduced-motion: reduce) {
  .workspace-topbar,
  .page-root > .section > .panel,
  .page-root > .section .metric-card,
  .page-root > .section .table-shell,
  .page-root > .section .shortcut-card,
  .page-root > .section .signal-item,
  .auth-panel {
    animation: none;
  }
}

/* ── Responsive ── */
@media (max-width: 1200px) {
  .workspace { padding: 18px 18px 40px; }
  .metric-grid { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
  .dashboard-highlight-grid,
  .dashboard-analytics-grid,
  .dashboard-insight-grid,
  .dashboard-panel-grid { grid-template-columns: 1fr; }
  .module-grid, .catalog-grid, .flow-rail { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .content-grid, .dashboard-grid, .section-split,
  .detail-layout, .detail-hub-grid, .process-rail,
  .users-layout-grid, .shortcut-grid, .profile-layout,
  .hero-band { grid-template-columns: 1fr; }
  .line-item-main { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .detail-panel { position: static; }
}

@media (max-width: 1100px) {
  .workspace-topbar-main {
    flex-wrap: wrap;
    gap: 10px 12px;
    padding: 10px 0 0;
  }

  .workspace-topbar-brand {
    flex: 1 1 auto;
  }

  .topbar-actions {
    margin-left: auto;
    gap: 8px;
  }

  .account-chip {
    max-width: min(280px, 52vw);
  }

  .profile-menu-dropdown {
    right: 0;
    width: min(320px, calc(100vw - 24px));
  }

  .header-nav {
    order: 3;
    flex: 1 1 100%;
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
    overflow: visible;
    padding-bottom: 10px;
  }

  .nav-dropdown-menu {
    left: 0;
    transform: translateY(8px);
  }

  .nav-dropdown::after {
    left: 0;
    width: max(100%, 270px);
    transform: none;
  }

  .nav-dropdown:hover .nav-dropdown-menu,
  .nav-dropdown.is-menu-open .nav-dropdown-menu {
    transform: translateY(0);
  }
}

@media (max-width: 900px) {
  .workspace { padding: 16px 16px 36px; }
  .compact-toolbar, .two-column-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .warehouse-summary-strip { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .workspace-topbar-main {
    flex-wrap: wrap;
    gap: 12px;
  }
  .header-nav {
    order: 3;
    width: 100%;
    max-width: 100%;
    overflow: visible;
    justify-content: flex-start;
    flex-wrap: wrap;
    padding-bottom: 8px;
  }

  .workspace { padding: 12px 12px 28px; }

  .workspace-topbar {
    position: static;
    padding: 0 0 12px;
    gap: 10px;
  }

  .workspace-topbar-main {
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
  }

  .workspace-topbar.is-compact .workspace-topbar-main {
    flex-direction: row;
    align-items: flex-start;
  }

  .warehouse-command-tools,
  .warehouse-command-bar {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }

  .warehouse-quick-links,
  .warehouse-toolbar-actions {
    width: 100%;
  }

  .topbar-actions {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin-left: 0;
    align-items: center;
  }

  .profile-menu {
    flex: 1 1 0;
    width: 100%;
  }

  .favorites-dropdown {
    left: 0;
    right: auto;
  }

  .profile-menu-dropdown {
    left: 0;
    right: auto;
  }

  .workspace-topbar.is-compact .topbar-actions {
    width: 100%;
    margin-left: 0;
    justify-content: stretch;
  }

  .account-chip {
    max-width: 100%;
    width: 100%;
    justify-content: flex-start;
  }

  .ghost-button.sidebar-toggle {
    display: inline-flex;
  }

  .brand-mark { width: 28px; height: 28px; font-size: 0.66rem; }
  .brand-name { font-size: 0.86rem; }
  .user-card { padding: 7px 10px; }
  .metric-grid { grid-template-columns: 1fr; }
  .metric-card { padding: 14px 16px; }
  .metric-label { font-size: 0.66rem; letter-spacing: 0.06em; }

  .table-shell { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  table { min-width: 560px; }

  .compact-toolbar, .two-column-list,
  .detail-fact-grid, .field-grid,
  .warehouse-action-form,
  .warehouse-selection-toolbar { grid-template-columns: 1fr; }

  .page-actions-row, .registry-head { flex-direction: column; }
  .page-actions, .panel-inline-metrics,
  .inline-actions, .topbar-actions,
  .warehouse-selection-actions { width: 100%; }
  .secret-inline { align-items: flex-start; }
  .dashboard-toolbar,
  .dashboard-range-switch,
  .dashboard-chart-axis,
  .dashboard-chart-scale,
  .dashboard-chart-footer,
  .dashboard-chart-legend,
  .dashboard-workshop-meta { width: 100%; }
  .unified-filter-bar,
  .unified-filter-main,
  .wizard-stepper,
  .hero-kpi-grid { grid-template-columns: 1fr; }
  .unified-filter-main,
  .unified-filter-meta { width: 100%; }
  .unified-filter-toggle,
  .unified-filter-toggle summary,
  .unified-filter-dropdown { width: 100%; }
  .dashboard-filter-field,
  .dashboard-filter-caption,
  .scope-checklist,
  .dashboard-peak-row { grid-template-columns: 1fr; }
}


.nav-group:not([data-collapsed]) .nav-link {
  display: inline-flex;
}

/* ── Skeleton Loading ── */
@keyframes shimmer {
  100% {
    transform: translateX(100%);
  }
}

.skeleton-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.skeleton-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.skeleton-panel.short {
  max-width: 320px;
}

.skeleton-block {
  position: relative;
  overflow: hidden;
  background-color: #f3f4f6;
  height: 14px;
  border-radius: 7px;
}

.skeleton-block::after {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  transform: translateX(-100%);
  background-image: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0,
    rgba(255, 255, 255, 0.4) 20%,
    rgba(255, 255, 255, 0.8) 60%,
    rgba(255, 255, 255, 0)
  );
  animation: shimmer 1.5s infinite;
  content: '';
}

.skeleton-block.wide { width: 80%; }
.skeleton-block.medium { width: 55%; }
.skeleton-block.narrow { width: 30%; }

/* ── Premium Tabulator Enhancements ── */
.tabulator {
  border: none !important;
  background: transparent !important;
  font-family: inherit !important;
}

.tabulator-header {
  border-bottom: 2px solid rgba(16, 17, 20, 0.08) !important;
  background: rgba(255, 255, 255, 0.8) !important;
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 5;
}

.tabulator-col {
  background: transparent !important;
  border-right: 1px solid rgba(16, 17, 20, 0.04) !important;
}

.tabulator-col-title {
  color: var(--muted) !important;
  font-size: 0.75rem !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.05em !important;
}

.tabulator-row {
  border-bottom: 1px solid rgba(16, 17, 20, 0.04) !important;
  background: transparent !important;
  transition: background 0.15s ease;
  animation: fadeIn 0.4s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.tabulator-row:hover {
  background: rgba(16, 17, 20, 0.02) !important;
}

.tabulator-row.tabulator-selected {
  background: var(--accent-soft) !important;
}

.tabulator-cell {
  padding: 12px 14px !important;
  border-right: none !important;
}

.tabulator-frozen {
  background: #ffffff !important;
  box-shadow: 4px 0 10px rgba(0, 0, 0, 0.03);
  z-index: 2;
}



.tabulator-calcs {
  background: rgba(16, 17, 20, 0.02) !important;
  font-weight: 700 !important;
}

.data-grid-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 12px 16px;
  background: #ffffff;
  border-radius: 14px 14px 0 0;
  border: 1px solid rgba(16, 17, 20, 0.06);
  border-bottom: none;
  flex-wrap: wrap;
}

.data-grid-summary {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--muted);
}

.data-grid-summary strong {
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.data-grid-hint {
  font-size: 0.75rem;
  color: var(--muted);
  flex: 1;
}

.data-grid-actions {
  display: flex;
  gap: 8px;
}

/* ── Operational Data Density ── */
.table-shell th {
  padding: 6px 8px;
  font-size: 0.6rem;
  letter-spacing: 0.06em;
}

.table-shell td {
  padding: 6px 8px;
  font-size: 0.82rem;
  line-height: 1.25;
}

.table-primary-cell {
  gap: 1px;
  min-width: 0;
}

.table-subtext {
  margin-top: 0;
  font-size: 0.74rem;
  line-height: 1.24;
}

.data-grid-shell .data-grid-toolbar {
  gap: 8px 10px;
  padding: 8px 10px;
  border-radius: 10px 10px 0 0;
}

.data-grid-shell .data-grid-summary {
  font-size: 0.8rem;
}

.data-grid-shell .data-grid-summary strong {
  font-size: 0.88rem;
}

.data-grid-shell .data-grid-hint {
  font-size: 0.72rem;
  line-height: 1.25;
  min-width: 160px;
}

.data-grid-shell .data-grid-actions {
  gap: 6px;
}

.data-grid-shell .data-grid-actions .ghost-button.compact {
  min-height: 28px;
  padding: 0 8px;
  font-size: 0.78rem;
}

.data-grid-host .tabulator {
  font-size: 0.82rem !important;
}

.data-grid-host .tabulator-row { animation: none !important; }

.data-grid-host .tabulator-cell {
  padding: 5px 8px !important;
  min-height: 32px;
  line-height: 1.18;
}

.data-grid-host .tabulator-header .tabulator-col .tabulator-col-content {
  padding: 8px 10px !important;
}

.data-grid-host .tabulator-header .tabulator-col .tabulator-col-title {
  font-size: 0.63rem !important;
  line-height: 1.15;
  letter-spacing: 0.04em;
}

.data-grid-host .tabulator-header .tabulator-header-filter {
  padding: 2px 10px 6px !important;
}

.data-grid-host .tabulator-header .tabulator-header-filter input,
.data-grid-host .tabulator-header .tabulator-header-filter select {
  min-height: 24px;
  padding: 0 6px;
  border-radius: 5px;
  font-size: 0.74rem;
}

.data-grid-host .table-primary-cell {
  gap: 1px;
  min-width: 0;
}

.data-grid-host .table-primary-cell .table-link,
.data-grid-host .table-primary-cell strong,
.data-grid-host .table-primary {
  line-height: 1.15;
}

.data-grid-host .table-subtext {
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-top: 0;
  font-size: 0.68rem;
  line-height: 1.12;
}

.data-grid-host .table-action-stack {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
}

.data-grid-host .table-action-stack .icon-link {
  width: 24px;
  height: 24px;
  border-radius: 5px;
}

.data-grid-host .table-action-stack .table-link:not(.icon-link),
.data-grid-host .table-action-stack .muted {
  font-size: 0.74rem;
  line-height: 1.12;
}

.data-grid-host .status-chip {
  min-height: 18px;
  padding: 0 6px;
  font-size: 0.62rem;
  letter-spacing: 0.03em;
}

.numeric-range-filter {
  position: relative;
  display: block;
  min-width: 0;
}

.numeric-range-filter-trigger {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 5px;
  min-width: 0;
  width: 100%;
  min-height: 24px !important;
  padding: 0 8px !important;
  border: 1px solid rgba(107, 114, 128, 0.18);
  border-radius: 5px !important;
  background: #ffffff;
  color: #6b7280;
  font-size: 0.7rem !important;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  outline: none;
}

.numeric-range-filter-trigger::after {
  content: "";
  width: 6px;
  height: 6px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-1px) rotate(45deg);
  opacity: 0.65;
  flex: 0 0 auto;
}

.numeric-range-filter.has-filter .numeric-range-filter-trigger {
  border-color: rgba(37, 99, 235, 0.28);
  background: #eef4ff;
  color: #1d4ed8;
}

.numeric-range-filter.is-open .numeric-range-filter-trigger {
  border-color: rgba(37, 99, 235, 0.4);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.numeric-range-filter-popover {
  position: fixed;
  z-index: 1600;
  display: grid;
  gap: 8px;
  padding: 8px;
  border: 1px solid rgba(16, 17, 20, 0.08);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 14px 32px rgba(16, 17, 20, 0.13);
}

.numeric-range-filter.is-open .numeric-range-filter-popover {
  display: grid;
}

.numeric-range-filter-segments {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2px;
  padding: 2px;
  border-radius: 6px;
  background: #f4f6fa;
}

.numeric-range-filter-segments button {
  min-height: 24px;
  border: none;
  border-radius: 5px;
  background: transparent;
  color: #6b7280;
  font-size: 0.7rem;
  font-weight: 700;
  outline: none;
}

.numeric-range-filter-segments button.is-active {
  background: #ffffff;
  color: #101114;
  box-shadow: 0 1px 4px rgba(16, 17, 20, 0.08);
}

.numeric-range-filter-segments button:focus-visible {
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.18);
}

.numeric-range-filter-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.numeric-range-filter-popover label {
  display: grid;
  gap: 3px;
}

.numeric-range-filter-popover label span {
  color: #6b7280;
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
}

.numeric-range-filter-input {
  min-width: 0;
  width: 100%;
  min-height: 28px !important;
  padding: 0 8px !important;
  border: 1px solid rgba(16, 17, 20, 0.1);
  border-radius: 6px !important;
  background: #ffffff;
  color: #101114;
  font-size: 0.76rem !important;
}

.numeric-range-filter-popover .numeric-range-filter-exact-field {
  display: none;
}

.numeric-range-filter.is-exact .numeric-range-filter-range-fields,
.numeric-range-filter-popover.is-exact .numeric-range-filter-range-fields {
  display: none;
}

.numeric-range-filter.is-exact .numeric-range-filter-exact-field,
.numeric-range-filter-popover.is-exact .numeric-range-filter-exact-field {
  display: grid;
}

.numeric-range-filter-actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
}

.numeric-range-filter-actions .ghost-button.compact,
.numeric-range-filter-actions .primary-button.compact {
  min-height: 28px;
  padding: 0 11px;
  border-radius: 7px;
  font-size: 0.74rem;
  line-height: 1;
}

.numeric-range-filter-actions .primary-button.compact {
  box-shadow: 0 6px 14px rgba(37, 99, 235, 0.18);
}

.data-grid-host .tabulator-page,
.data-grid-host .tabulator-footer .tabulator-page-size,
.data-grid-host .tabulator-footer .tabulator-page {
  min-height: 26px;
  min-width: 26px;
  padding: 0 7px;
  border-radius: 6px;
  font-size: 0.78rem;
}

/* ── Column Menu Style ── */
.tabulator-menu {
  background: #ffffff !important;
  border: 1px solid rgba(16, 17, 20, 0.1) !important;
  border-radius: 10px !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1) !important;
  padding: 6px !important;
}

.tabulator-menu-item {
  padding: 8px 12px !important;
  border-radius: 6px !important;
  font-size: 0.85rem !important;
  transition: background 0.15s ease !important;
}

.tabulator-menu-item:hover {
  background: var(--accent-soft) !important;
  color: var(--accent-deep) !important;
}

/* ── Compact Tabulator Footer ── */
.data-grid-host .tabulator-footer .tabulator-footer-contents {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "counter paginator";
  align-items: center;
  justify-content: stretch !important;
  gap: 8px 12px !important;
  width: 100%;
}

.data-grid-host .tabulator-footer .tabulator-page-counter {
  grid-area: counter;
  justify-self: start;
  max-width: 100%;
  min-width: 0;
  margin-right: 0 !important;
  overflow: hidden;
  text-overflow: ellipsis;
}

.data-grid-host .tabulator-footer .tabulator-paginator {
  grid-area: paginator;
  justify-self: end;
  display: inline-flex !important;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  min-width: 0;
  margin-left: 0 !important;
  flex-wrap: wrap;
}

.data-grid-host .tabulator-footer .tabulator-paginator label {
  flex: 0 0 auto;
  max-width: max-content;
}

.data-grid-host .tabulator-footer .tabulator-page-size {
  width: auto !important;
  min-width: 70px;
  max-width: 96px;
  flex: 0 0 auto;
  padding: 0 8px;
}

@media (max-width: 640px) {
  .data-grid-host .tabulator-footer .tabulator-footer-contents {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "counter"
      "paginator";
  }

  .data-grid-host .tabulator-footer .tabulator-page-counter,
  .data-grid-host .tabulator-footer .tabulator-paginator {
    justify-self: stretch;
    justify-content: center;
  }
}

@media print {
  .workspace-topbar, .data-grid-toolbar, .tabulator-footer { display: none !important; }
  .tabulator-header, .tabulator-row { border: 1px solid #ddd !important; }
}

/* ── Metric Card Sparklines ── */
.metric-card {
  display: flex !important;
  justify-content: space-between;
  align-items: center;
}

.metric-card-main {
  flex: 1;
}

.metric-sparkline {
  width: 80px;
  height: 40px;
  flex-shrink: 0;
}

/* ── Dashboard Professional Layout ── */
.dashboard-analytics-main-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 20px;
  margin-bottom: 24px;
}

.dashboard-chart-main {
  background: #ffffff;
  padding: 20px;
  border-radius: 18px;
  border: 1px solid rgba(16, 17, 20, 0.04);
}

.dashboard-chart-side {
  background: #ffffff;
  padding: 20px;
  border-radius: 18px;
  border: 1px solid rgba(16, 17, 20, 0.04);
  display: flex;
  flex-direction: column;
}

.dashboard-chart-full {
  background: #ffffff;
  padding: 20px;
  border-radius: 18px;
  border: 1px solid rgba(16, 17, 20, 0.04);
  margin-bottom: 24px;
}

.dashboard-insight-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 20px;
}

.dashboard-highlight-column {
  display: grid;
  gap: 12px;
}

.dashboard-highlight-card {
  padding: 16px;
  background: #ffffff;
  border-radius: 16px;
  border: 1px solid rgba(16, 17, 20, 0.04);
  display: grid;
  gap: 4px;
}

.dashboard-highlight-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--muted);
  letter-spacing: 0.05em;
}

.dashboard-highlight-value {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--ink);
}

.dashboard-highlight-meta {
  font-size: 0.75rem;
  color: var(--muted);
}

/* ── Custom Tooltip ── */
.custom-chart-tooltip {
  background: rgba(16, 17, 20, 0.95);
  backdrop-filter: blur(8px);
  padding: 10px 14px;
  border-radius: 10px;
  color: #fff;
  font-size: 0.85rem;
  box-shadow: 0 10px 25px rgba(0,0,0,0.2);
  z-index: 1000;
  pointer-events: none;
  min-width: 140px;
}

.tooltip-title {
  font-weight: 700;
  margin-bottom: 6px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  padding-bottom: 4px;
}

.tooltip-value {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}

.tooltip-key {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

/* ── Doughnut Legend ── */
.custom-doughnut-legend {
  margin-top: 15px;
  display: grid;
  gap: 8px;
}

.legend-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.82rem;
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.legend-label {
  flex: 1;
  color: var(--muted);
}

.legend-value {
  font-weight: 700;
  color: var(--ink);
}

/* ── Dashboard Professional Layout ── */
.dashboard-analytics-shell {
  gap: 24px;
}

.dashboard-analytics-main-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: 24px;
}

.dashboard-chart-full {
  grid-column: 1 / -1;
}

.dashboard-insight-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 24px;
}

.dashboard-highlight-column {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.custom-doughnut-legend {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}

.legend-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
}

.legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.legend-value {
  margin-left: auto;
  font-weight: 600;
  color: var(--muted);
}

.custom-chart-tooltip {
  background: rgba(16, 17, 20, 0.95);
  backdrop-filter: blur(8px);
  border-radius: 10px;
  padding: 12px;
  color: white;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
  z-index: 1000;
}

.tooltip-title {
  font-weight: 700;
  margin-bottom: 8px;
  font-size: 0.85rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  padding-bottom: 4px;
}

.tooltip-value {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  margin-bottom: 4px;
}

.tooltip-key {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

@media (max-width: 720px) {
  .dashboard-analytics-shell {
    overflow: hidden;
  }

  .dashboard-analytics-main-grid,
  .dashboard-insight-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
  }

  .dashboard-chart-main,
  .dashboard-chart-side,
  .dashboard-chart-full,
  .dashboard-chart-card {
    min-width: 0;
    padding: 16px;
  }

  .dashboard-chart-frame {
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
  }

  .metric-card-main {
    min-width: 0;
  }

  .metric-sparkline {
    width: 64px;
  }
}
