:root {
  /* Design tokens (Oriental Desk redesign) */
  --bg: oklch(0.16 0.012 264);
  --surface: oklch(0.195 0.014 264);
  --surface-2: oklch(0.235 0.016 264);
  --surface-3: oklch(0.28 0.018 264);
  --border: oklch(0.4 0.02 264 / 0.35);
  --border-strong: oklch(0.55 0.02 264 / 0.55);
  --text: oklch(0.95 0.006 264);
  --text-secondary: oklch(0.74 0.014 264);
  --text-muted: oklch(0.55 0.016 264);
  --accent: oklch(0.62 0.19 291);
  --accent-strong: oklch(0.75 0.16 291);
  --accent-soft: oklch(0.62 0.19 291 / 0.14);
  --accent-soft-border: oklch(0.62 0.19 291 / 0.4);
  --success: oklch(0.72 0.15 155);
  --success-soft: oklch(0.72 0.15 155 / 0.14);
  --warning: oklch(0.78 0.15 80);
  --warning-soft: oklch(0.78 0.15 80 / 0.16);
  --danger: oklch(0.68 0.18 25);
  --danger-soft: oklch(0.68 0.18 25 / 0.14);
  --info: oklch(0.72 0.13 235);
  --info-soft: oklch(0.72 0.13 235 / 0.14);

  /* Legacy aliases (existing selectors) */
  --bg-elevated: var(--surface);
  --surface-solid: var(--surface);
  --surface-hover: var(--surface-2);
  --muted: var(--text-muted);
  --accent-2: var(--accent-strong);
  --accent-hover: var(--accent-strong);
  --ok: var(--success);
  --user-bubble: oklch(0.28 0.04 264);
  --assistant-bubble: var(--surface-2);
  --shadow: none;
  --radius: 14px;
  --radius-sm: 8px;
  --topbar-h: 64px;
  font-family: "Manrope", "Segoe UI", system-ui, sans-serif;
  color-scheme: dark;
}

[data-theme="light"] {
  --bg: oklch(0.97 0.006 264);
  --surface: oklch(1 0 264);
  --surface-2: oklch(0.96 0.008 264);
  --surface-3: oklch(0.93 0.01 264);
  --border: oklch(0.55 0.02 264 / 0.18);
  --border-strong: oklch(0.45 0.02 264 / 0.28);
  --text: oklch(0.18 0.02 264);
  --text-secondary: oklch(0.42 0.02 264);
  --text-muted: oklch(0.58 0.02 264);
  --accent: oklch(0.52 0.19 291);
  --accent-strong: oklch(0.45 0.19 291);
  --accent-soft: oklch(0.52 0.19 291 / 0.12);
  --accent-soft-border: oklch(0.52 0.19 291 / 0.28);
  --success: oklch(0.52 0.15 155);
  --success-soft: oklch(0.52 0.15 155 / 0.12);
  --warning: oklch(0.62 0.15 80);
  --warning-soft: oklch(0.62 0.15 80 / 0.14);
  --danger: oklch(0.52 0.18 25);
  --danger-soft: oklch(0.52 0.18 25 / 0.12);
  --info: oklch(0.52 0.13 235);
  --info-soft: oklch(0.52 0.13 235 / 0.12);
  --user-bubble: oklch(0.94 0.02 264);
  --assistant-bubble: oklch(0.97 0.006 264);
  color-scheme: light;
}

[data-theme="light"] body {
  background: var(--bg);
}

.mono {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
}

/* Native selects + dropdown lists follow active theme */
select,
select option,
select optgroup {
  background-color: var(--surface-solid);
  color: var(--text);
}

select {
  border-color: var(--border-strong);
}

select:disabled,
select option:disabled {
  color: var(--muted);
}

[data-theme="light"] .topbar {
  background: rgba(255, 255, 255, 0.92);
}

* { box-sizing: border-box; }

*::-webkit-scrollbar { width: 6px; height: 6px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.14); border-radius: 999px; }
*::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.26); }
* { scrollbar-width: thin; scrollbar-color: rgba(255,255,255,0.14) transparent; }
[data-theme="light"] *::-webkit-scrollbar-thumb { background: rgba(16,24,32,0.12); }
[data-theme="light"] *::-webkit-scrollbar-thumb:hover { background: rgba(16,24,32,0.22); }
[data-theme="light"] * { scrollbar-color: rgba(16,24,32,0.12) transparent; }

html,
body {
  height: 100%;
  overflow: hidden;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  color: var(--text);
  background: var(--bg);
}

.hidden { display: none !important; }

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

.glass {
  background: var(--surface);
  border: 1px solid var(--border);
}

.app-shell {
  height: 100vh;
  height: 100dvh;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  height: var(--topbar-h);
  padding: 0 20px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  flex-shrink: 0;
  position: sticky;
  top: 0;
  z-index: 30;
}

.topbar-start,
.topbar-end {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.topbar-start {
  flex: 1 1 auto;
  overflow: hidden;
}

.topbar-end {
  flex-shrink: 0;
}

.topbar-divider {
  width: 1px;
  height: 22px;
  background: var(--border);
  flex-shrink: 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex-shrink: 0;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  border: none;
  background: transparent;
  padding: 0;
  font: inherit;
}

.brand-text {
  min-width: 0;
}

.brand-logo {
  height: 28px;
  width: auto;
  display: block;
  flex-shrink: 0;
}

[data-theme="light"] .brand-logo {
  filter: invert(1);
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 14px;
  box-shadow: 0 8px 24px rgba(91, 141, 239, 0.35);
}

.brand h1,
.brand-title {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
  white-space: nowrap;
}

.brand-integrations {
  margin: 1px 0 0;
  font-size: 10px;
  line-height: 1.35;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand-integrations:empty {
  display: none;
}

.subtitle {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.pill {
  font-size: 11px;
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  border: 1px solid var(--border);
}

.theme-toggle-btn {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  border-radius: 999px;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}

.theme-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.06);
}

[data-theme="light"] .theme-toggle-btn,
[data-theme="light"] .user-menu-btn,
[data-theme="light"] .pill {
  background: rgba(16, 24, 32, 0.03);
}

[data-theme="light"] .theme-toggle-btn:hover,
[data-theme="light"] .user-menu-btn:hover {
  background: rgba(16, 24, 32, 0.06);
}

[data-theme="light"] .composer textarea {
  scrollbar-color: rgba(16, 24, 32, 0.22) transparent;
}

[data-theme="light"] .composer textarea::-webkit-scrollbar-thumb {
  background: rgba(16, 24, 32, 0.18);
}

[data-theme="light"] .composer textarea::-webkit-scrollbar-thumb:hover {
  background: rgba(16, 24, 32, 0.28);
}

[data-theme="light"] .sidebar-chat-list {
  scrollbar-color: rgba(16, 24, 32, 0.18) transparent;
}

[data-theme="light"] .sidebar-chat-list::-webkit-scrollbar-thumb {
  background: rgba(16, 24, 32, 0.14);
}

.user-label {
  font-size: 13px;
  color: var(--muted);
}

.login-screen {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: grid;
  place-items: center;
  padding: 32px 20px;
}

.login-card {
  width: min(420px, 100%);
  border-radius: var(--radius);
  padding: 36px 32px;
  text-align: center;
}

.login-icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 18px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-size: 22px;
  color: var(--accent);
  background: rgba(91, 141, 239, 0.12);
  border: 1px solid rgba(91, 141, 239, 0.25);
}

.login-card h2 {
  margin: 0 0 8px;
  font-size: 22px;
  letter-spacing: -0.03em;
}

.login-card p {
  color: var(--muted);
  line-height: 1.55;
  margin: 0 0 24px;
}

.app-screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 16px 20px 20px;
  min-height: 0;
  overflow: hidden;
}

.app-body {
  display: grid;
  grid-template-columns: 196px minmax(0, 1fr);
  gap: 14px;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.app-body.app-body--full {
  grid-template-columns: minmax(0, 1fr);
}

.sidebar-column {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-self: stretch;
  height: 100%;
  max-height: 100%;
  min-height: 0;
  width: 196px;
  flex-shrink: 0;
  overflow: hidden;
}

.app-sidebar-panel {
  border-radius: var(--radius);
  padding: 10px 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 0;
}

#sidebar-chat-panel {
  flex: 0 1 auto;
  min-height: 0;
  overflow: hidden;
}

#sidebar-chat-panel.is-expanded {
  flex: 1 1 auto;
}

#sidebar-chat-subnav:not(.hidden) {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  margin-bottom: 0;
}

#sidebar-menu-panel {
  flex: 0 0 auto;
}

.app-sidebar {
  border-radius: var(--radius);
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-self: start;
  position: sticky;
  top: 88px;
}

.sidebar-label {
  margin: 4px 10px 8px;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  font-weight: 700;
}

.sidebar-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 12px;
}

.sidebar-group:last-child {
  margin-bottom: 0;
}

.sidebar-subnav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 2px 0 6px;
  padding-left: 4px;
}

.sidebar-sub-btn {
  display: block;
  width: 100%;
  text-align: left;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  border-radius: 8px;
  padding: 8px 10px;
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

/* Bindestreg foran undermenuer under hovedkategorier (inkl. Kampagner) */
.sidebar-subnav > .sidebar-sub-btn:not(.sidebar-sub-btn-primary):not(.btn-always-blue)::before {
  content: "- ";
  opacity: 0.9;
}

.sidebar-sub-btn:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}

.sidebar-sub-btn.active {
  color: var(--text);
  background: var(--surface-2);
  font-weight: 700;
  border-left: 3px solid var(--accent);
  margin-left: -3px;
  padding-left: calc(12px - 3px);
  border-color: transparent;
}

.sidebar-sub-btn-primary {
  color: white;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  font-weight: 600;
  margin-bottom: 4px;
}

.sidebar-sub-btn-primary:hover {
  color: white;
  filter: brightness(1.05);
}

.sidebar-chat-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  overflow-x: hidden;
  overflow-y: auto;
  margin-top: 2px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}

.sidebar-chat-list::-webkit-scrollbar {
  width: 5px;
}

.sidebar-chat-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.14);
  border-radius: 4px;
}

.sidebar-chat-list .chat-item-btn {
  padding: 5px 8px;
  font-size: 11px;
  line-height: 1.25;
}

.sidebar-chat-list .chat-item-delete {
  width: 22px;
  font-size: 13px;
}

.chat-layout-single {
  grid-template-columns: minmax(0, 1fr) !important;
  width: 100%;
}

.spy-toolbar {
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.spy-period-presets {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  flex-wrap: wrap;
}

.spy-preset-btn {
  font-size: 12px;
  padding: 7px 10px;
  white-space: nowrap;
}

.spy-range-field .spy-range-inputs {
  display: flex;
  align-items: center;
  gap: 6px;
}

.spy-range-field input[type="date"] {
  min-width: 0;
  width: 138px;
  padding: 7px 8px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 12px;
}

.spy-range-sep {
  color: var(--muted);
  font-size: 12px;
}

.style-details-period {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 14px;
}

.style-details-columns {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.style-details-col-head {
  margin-bottom: 10px;
}

.style-details-col-head h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.style-details-col-sub {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--muted);
}

.style-details-list {
  list-style: none;
  margin: 0;
  padding: 0 0 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.style-details-card {
  display: grid;
  grid-template-columns: 22px 64px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border-radius: var(--radius);
}

.style-details-rank {
  font-size: 18px;
  font-weight: 700;
  color: var(--accent);
  text-align: center;
}

.style-details-image {
  width: 64px;
  height: 64px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  font-size: 10px;
  color: var(--muted);
  text-align: center;
  padding: 4px;
}

.style-details-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.style-details-name {
  margin: 0 0 4px;
  font-size: 14px;
}

.style-details-meta {
  margin: 0 0 6px;
  font-size: 12px;
  color: var(--muted);
}

.style-details-stats {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
}

.style-details-empty {
  padding: 16px;
  color: var(--muted);
  font-size: 13px;
}

.sidebar-sub-btn-nested {
  margin-left: 10px;
  padding-left: 14px;
  font-size: 12px;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  width: calc(100% - 10px);
}

.sidebar-sub-btn-nested-2 {
  margin-left: 20px;
  padding-left: 14px;
  font-size: 12px;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  width: calc(100% - 20px);
}

.sidebar-sub-btn-nested-3 {
  margin-left: 30px;
  padding-left: 14px;
  font-size: 12px;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  width: calc(100% - 30px);
}

.klaviyo-content {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.klaviyo-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.klaviyo-title {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.klaviyo-period {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--muted);
}

.klaviyo-period-toggle {
  display: inline-flex;
  gap: 4px;
  padding: 3px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
}

.klaviyo-toggle-btn {
  border: none;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  padding: 7px 12px;
  border-radius: 8px;
  cursor: pointer;
}

.klaviyo-toggle-btn.active {
  color: var(--text);
  background: rgba(91, 141, 239, 0.18);
}

.klaviyo-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
}

.klaviyo-kpi {
  padding: 16px 18px;
  border-radius: var(--radius);
}

.klaviyo-kpi-label {
  margin: 0 0 8px;
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
  line-height: 1.35;
  min-height: 2.4em;
}

.klaviyo-kpi-value {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.klaviyo-kpi-value.is-up {
  color: var(--ok);
}

.klaviyo-kpi-value.is-down {
  color: var(--danger, #ff7b7b);
}

.klaviyo-kpi-meta {
  margin: 8px 0 0;
  font-size: 12px;
  color: var(--muted);
  min-height: 1.2em;
}

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

.klaviyo-chart-panel {
  min-height: 300px;
}

.klaviyo-table-panel {
  overflow: hidden;
}

.klaviyo-table-wrap {
  overflow-x: auto;
  margin-top: 4px;
}

.klaviyo-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.klaviyo-table th,
.klaviyo-table td {
  padding: 10px 12px;
  text-align: right;
  white-space: nowrap;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.klaviyo-table thead th {
  color: var(--muted);
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.klaviyo-table thead th:first-child,
.klaviyo-table tbody th {
  text-align: left;
  color: var(--text);
  font-weight: 600;
  position: sticky;
  left: 0;
  background: rgba(15, 18, 24, 0.96);
  z-index: 1;
}

.klaviyo-table tbody td {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.sidebar-sub-btn.is-parent-active {
  color: var(--text);
  background: rgba(91, 141, 239, 0.08);
}

.kampagner-content {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.kampagner-table .kampagner-cell-campaign {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 260px;
}

.kampagner-thumb {
  width: 56px;
  height: 56px;
  border-radius: 10px;
  overflow: hidden;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  display: grid;
  place-items: center;
}

.kampagner-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.kampagner-thumb-empty {
  font-size: 10px;
  color: var(--muted);
  text-align: center;
  padding: 4px;
  line-height: 1.2;
}

.kampagner-table .kampagner-name {
  display: block;
  color: var(--text);
  font-weight: 600;
  max-width: 280px;
  white-space: normal;
  line-height: 1.35;
}

.kampagner-table .kampagner-channel {
  display: inline-block;
  margin-top: 4px;
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 500;
}

.kampagner-empty {
  text-align: left !important;
  color: var(--muted);
  padding: 20px 12px !important;
}

.sidebar-nav-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  border-radius: 10px;
  padding: 11px 12px;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.sidebar-nav-btn:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}

.sidebar-nav-btn.active {
  color: white;
  border-color: transparent;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 8px 24px rgba(91, 141, 239, 0.22);
}

.sidebar-nav-btn.btn-always-blue {
  color: white;
  border-color: transparent;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 8px 24px rgba(91, 141, 239, 0.22);
}

.sidebar-nav-btn.btn-always-blue:hover {
  color: white;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}

/* Same blue fill as the old Dashboard nav buttons, submenu size unchanged. */
.sidebar-sub-btn.btn-always-blue,
.sidebar-sub-btn.btn-always-blue.active,
.sidebar-sub-btn.btn-always-blue:hover {
  color: white;
  border-color: transparent;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}

.sidebar-sub-btn.btn-always-blue:hover {
  filter: brightness(1.05);
}

.sidebar-nav-icon {
  width: 1.25rem;
  text-align: center;
  font-size: 15px;
  line-height: 1;
  opacity: 0.9;
}

.app-main {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

.area-tabs {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 1;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  border-radius: 0;
}

.area-tabs::-webkit-scrollbar {
  display: none;
}

.area-tab {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.01em;
  padding: 9px 12px;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s, box-shadow 0.15s;
}

.area-tab:hover {
  color: var(--text);
  background: var(--surface-2);
}

.area-tab.active {
  color: var(--text);
  background: var(--surface-2);
  box-shadow: inset 0 -2px 0 var(--accent);
}

.sales-channel-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  margin-bottom: 12px;
  padding: 4px;
  border-radius: var(--radius);
}

.sales-channel-tab {
  appearance: none;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: -0.01em;
  padding: 6px 12px;
  border-radius: calc(var(--radius) - 2px);
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.sales-channel-tab:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}

.sales-channel-tab.active {
  color: var(--text);
  border-color: var(--border-strong);
  background: rgba(255, 255, 255, 0.08);
}

.topbar-brand-field {
  margin: 0;
}

.topbar-brand-field .dash-brand-select {
  min-width: 140px;
  padding: 6px 10px;
  font-size: 12px;
}

.sidebar-brand-panel {
  border-radius: var(--radius);
  padding: 8px 10px;
  flex: 0 0 auto;
}

.sidebar-brand-panel .sidebar-brand-field {
  margin: 0;
  padding: 0;
}

.sidebar-group-panel {
  flex: 0 0 auto;
}

.sidebar-group-panel .sidebar-label {
  margin: 2px 8px 6px;
}

.sidebar-group-panel .sidebar-sub-btn {
  margin: 0;
}

.btn-danger {
  background: rgba(255, 123, 123, 0.12);
  color: var(--danger);
  border: 1px solid rgba(255, 123, 123, 0.35);
}

.btn-danger:hover {
  background: rgba(255, 123, 123, 0.2);
}

.finans-it-row-modal-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.finans-it-row-modal-actions-spacer {
  flex: 1 1 auto;
}

.sidebar-brand-field {
  display: block;
  margin: 0 0 8px;
  padding: 0 2px;
}

.sidebar-brand-field .dash-brand-select {
  width: 100%;
  min-width: 0;
  padding: 7px 10px;
  font-size: 12px;
}

.tooday-placeholder {
  position: absolute;
  inset: 0;
  z-index: 15;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(8, 12, 16, 0.55);
  backdrop-filter: blur(4px);
}

.tooday-placeholder-card {
  max-width: 420px;
  padding: 28px 32px;
  text-align: center;
}

.main-content-stack {
  position: relative;
  flex: 1 1 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.section-coming-soon {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.coming-soon-panel {
  padding: 36px 40px;
  text-align: center;
  max-width: 420px;
}

.sidebar-subnav-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sidebar-subnav-label {
  display: block;
  padding: 8px 10px 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.page-header-meta-only {
  margin-bottom: 10px;
}

.page-header-meta-only .dash-header-meta {
  align-items: flex-start;
  margin-left: auto;
}

#sidebar-area-panel {
  flex: 0 1 auto;
  min-height: 0;
  overflow: auto;
}

#sidebar-area-panel .sidebar-subnav {
  margin: 0;
  padding-left: 0;
}

#section-compliance {
  min-height: 0;
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
}

.csr-view {
  flex: 1 1 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.csr-view.hidden {
  display: none;
}

#csr-view-tc-check {
  overflow: auto;
  padding-bottom: 24px;
}

.compliance-frame,
.management-ai-frame {
  flex: 1 1 0;
  width: 100%;
  height: 100%;
  min-height: 0;
  border: 0;
  border-radius: var(--radius);
  background: var(--bg);
}

.tc-check-panel {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.tc-dropzone {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 22px 18px;
  border: 1px dashed rgba(255, 255, 255, 0.22);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.tc-dropzone:hover,
.tc-dropzone.is-dragover {
  border-color: rgba(91, 141, 239, 0.55);
  background: rgba(91, 141, 239, 0.08);
}

.tc-dropzone-title {
  font-weight: 600;
  color: var(--text);
}

.tc-dropzone-hint {
  font-size: 12px;
  color: var(--muted);
}

.tc-file-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.tc-file-list li {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 10px;
  align-items: center;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  font-size: 13px;
}

.tc-file-list li span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tc-file-list li em {
  color: var(--muted);
  font-style: normal;
  font-size: 12px;
}

.tc-check-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.tc-status {
  margin: 0;
  min-height: 1.2em;
}

.tc-conclusion {
  padding: 12px 14px;
  border-radius: 10px;
  font-weight: 600;
  margin-bottom: 12px;
}

.tc-conclusion.is-ok {
  background: rgba(46, 160, 110, 0.16);
  color: #9be7c4;
}

.tc-conclusion.is-error {
  background: rgba(220, 80, 80, 0.16);
  color: #ffb4b4;
}

.tc-scenario {
  margin: 0 0 12px;
  font-size: 13px;
  color: var(--muted);
}

.tc-doc-list {
  margin: 0 0 12px;
  padding-left: 18px;
  color: var(--muted);
  font-size: 13px;
}

.tc-table-wrap {
  overflow: auto;
  margin-bottom: 14px;
}

.tc-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.tc-table th,
.tc-table td {
  text-align: left;
  padding: 8px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  vertical-align: top;
}

.tc-table th {
  color: var(--muted);
  font-weight: 600;
  white-space: nowrap;
}

.tc-table tr.is-error td {
  background: rgba(220, 80, 80, 0.08);
}

.tc-table tr.is-warn td {
  background: rgba(220, 170, 60, 0.08);
}

.tc-diff {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
}

.tc-email {
  padding: 14px;
}

.tc-email-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.tc-email-head h3 {
  margin: 0;
  font-size: 15px;
}

.tc-email-copy-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tc-email-subject {
  margin: 0 0 8px;
  font-size: 13px;
}

.tc-email-body {
  margin: 0;
  white-space: pre-wrap;
  font: inherit;
  font-size: 13px;
  line-height: 1.45;
  color: var(--text);
  background: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
  padding: 12px;
}

.page-section {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

#section-dashboard,
#section-spy {
  overflow-y: auto;
}

#section-spy {
  padding-bottom: 28px;
}

.spy-subview:not(.hidden) {
  flex: 0 0 auto;
}

.page-header {
  margin-bottom: 16px;
  flex-shrink: 0;
}

.page-header-compact {
  margin-bottom: 12px;
}

.page-title {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.page-subtitle {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
  max-width: 62ch;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  flex: 1;
  align-content: start;
}

.page-header-dashboard {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.dash-header-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}

.dash-period-pill {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  border: 1px solid rgba(91, 141, 239, 0.35);
  background: rgba(91, 141, 239, 0.1);
  border-radius: 999px;
  padding: 5px 10px;
}

.dash-updated {
  font-size: 12px;
  color: var(--muted);
}

.dash-live-banner {
  padding: 14px 18px;
  border-radius: var(--radius);
  border: 1px solid rgba(62, 207, 142, 0.35);
  background: rgba(62, 207, 142, 0.08);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dash-live-main {
  font-size: 14px;
  line-height: 1.45;
}

.dash-live-main strong {
  color: var(--ok);
}

.dash-live-time {
  color: var(--muted);
  font-size: 12px;
  margin-left: 6px;
}

.dash-live-warn {
  color: var(--warn);
}

.dash-live-hint {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.45;
}

.dash-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px 16px;
  padding: 14px 16px;
  border-radius: var(--radius);
}

.dash-toolbar-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
}

.dash-toolbar-field > span {
  color: var(--text);
  font-weight: 500;
  opacity: 0.85;
}

.dash-toolbar-field select,
.dash-brand-select {
  min-width: 220px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--border-strong);
  background: var(--surface-solid);
  color: var(--text);
  font: inherit;
  font-size: 13px;
}

.dash-toolbar-field select option,
.dash-brand-select option {
  background: var(--surface-solid);
  color: var(--text);
}

.dash-brand-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.dash-brand-select {
  min-width: 200px;
  font-weight: 600;
}

.page-header-dashboard .page-title {
  margin-bottom: 8px;
}

.dash-refresh-btn {
  margin-left: auto;
  align-self: flex-end;
}

.dash-kpi-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.dash-kpi-source {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--accent);
  white-space: nowrap;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(91, 141, 239, 0.12);
  border: 1px solid rgba(91, 141, 239, 0.25);
}

.dash-email-meta {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.dash-email-source {
  margin: 0;
  font-size: 11px;
  color: var(--muted);
}

.dashboard-content {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-bottom: 8px;
}

.dashboard-state {
  padding: 28px;
  text-align: center;
  color: var(--muted);
}

.dashboard-state-error {
  color: var(--warn);
}

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

.dash-kpi-col {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.dash-kpi-col > .dash-kpi:not(.dash-kpi-sello) {
  flex: 1;
  min-height: 132px;
}

.dash-kpi {
  padding: 16px 18px;
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 108px;
}

.dash-kpi-sello {
  padding: 10px 12px;
  min-height: 0;
  opacity: 0.92;
  border: 1px solid rgba(139, 108, 248, 0.22);
  background: rgba(139, 108, 248, 0.06);
}

.dash-kpi-sello .dash-kpi-label {
  font-size: 11px;
}

.dash-kpi-sello .dash-kpi-value {
  font-size: 17px;
}

.dash-kpi-sello .dash-kpi-change {
  font-size: 11px;
}

.dash-kpi-sublabel {
  margin: 0;
  font-size: 11px;
  color: var(--muted);
  line-height: 1.3;
}

.dash-kpi-foot {
  min-height: 16px;
  margin-top: auto;
  font-size: 11px;
  color: var(--muted);
}

.dash-kpi-label {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
}

.dash-kpi-value {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.dash-kpi-change {
  margin: 0;
  font-size: 12px;
  font-weight: 600;
}

.dash-kpi-change.up { color: var(--ok); }
.dash-kpi-change.down { color: #f07178; }
.dash-kpi-change.neutral { color: var(--muted); }

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

.dash-panels-row--2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.dash-panels-row.dash-panels-row--2 > .dash-panel {
  grid-column: auto;
  min-width: 0;
}

.dash-panel {
  padding: 16px 18px 14px;
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  min-height: 260px;
}

.dash-panel-wide {
  grid-column: span 2;
}

.dash-panel-head h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
}

.dash-panel-sub {
  margin: 4px 0 12px;
  font-size: 12px;
  color: var(--muted);
}

.dash-chart-wrap {
  position: relative;
  flex: 1;
  min-height: 200px;
}

.dash-chart-wrap-donut {
  min-height: 180px;
  max-height: 220px;
}

.dash-chart-wrap-bar {
  min-height: 180px;
}

.dash-funnel-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 16px;
  margin-bottom: 12px;
  border-radius: var(--radius);
}

.dash-funnel-bar-label {
  margin: 0;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
  flex-shrink: 0;
}

.dash-funnel-bar .dash-funnel {
  flex: 1;
  padding: 0;
  min-height: 0;
  flex-wrap: nowrap;
  justify-content: flex-start;
  gap: 6px;
}

.dash-funnel-bar .dash-funnel-step {
  flex: 1 1 0;
  min-width: 72px;
  max-width: 140px;
  padding: 6px 8px;
}

.dash-funnel-bar .dash-funnel-num {
  font-size: 15px;
}

.dash-funnel-bar .dash-funnel-label {
  font-size: 10px;
  margin-top: 2px;
}

.dash-funnel-bar .dash-funnel-arrow {
  font-size: 14px;
}

.dash-chart-wrap-orders {
  min-height: 200px;
  max-height: 240px;
}

.dash-funnel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex: 1;
  padding: 12px 0;
  flex-wrap: wrap;
}

.dash-funnel-step-sub {
  flex: 0 1 calc(50% - 12px);
  min-width: 120px;
}

.dash-funnel-step {
  flex: 1;
  text-align: center;
  padding: 14px 8px;
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.18);
  border: 1px solid var(--border);
}

.dash-funnel-num {
  display: block;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.dash-funnel-label {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.dash-funnel-arrow {
  color: var(--muted);
  font-size: 18px;
  flex-shrink: 0;
}

.dash-stat-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
  justify-content: center;
}

.dash-stat-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}

.dash-stat-row:last-child {
  border-bottom: none;
}

.dash-stat-row span {
  color: var(--muted);
}

.dash-footnote {
  margin: 4px 2px 0;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}

.dashboard-card {
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.dashboard-card-wide {
  grid-column: 1 / -1;
}

.dashboard-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.dashboard-card h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
}

.dashboard-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.dashboard-badge {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 8px;
  white-space: nowrap;
}

.panel-header {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  padding: 0 4px 10px;
}

.user-menu {
  position: relative;
}

.user-menu-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  border-radius: 999px;
  padding: 8px 12px;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}

.user-menu-btn:hover {
  background: rgba(255, 255, 255, 0.06);
}

.user-menu-caret {
  color: var(--muted);
  font-size: 11px;
}

.user-menu-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  min-width: 160px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--surface-solid);
  box-shadow: var(--shadow);
  padding: 6px;
  z-index: 30;
}

.user-menu-item {
  width: 100%;
  text-align: left;
  border: none;
  background: transparent;
  color: var(--text);
  border-radius: 8px;
  padding: 10px 12px;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}

.user-menu-item:hover {
  background: rgba(255, 255, 255, 0.06);
}

a.user-menu-item {
  text-decoration: none;
  display: block;
}

.main-nav,
.automation-nav {
  display: flex;
  gap: 8px;
  padding: 0 4px 12px;
  overflow-x: auto;
  scrollbar-width: none;
}

.main-nav::-webkit-scrollbar,
.automation-nav::-webkit-scrollbar { display: none; }

.nav-btn {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  border-radius: 999px;
  padding: 9px 16px;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.nav-btn:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.nav-btn.active {
  color: white;
  border-color: transparent;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 8px 24px rgba(91, 141, 239, 0.28);
}

.section {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.section-chat {
  width: 100%;
  max-width: none;
  margin: 0;
  min-height: 0;
  flex: 1;
}

.section-automation {
  min-height: 0;
  flex: 1;
}

.chat-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
  gap: 10px;
  flex: 1;
  min-height: 0;
  width: 100%;
  overflow: hidden;
}

.chat-layout > * {
  min-height: 0;
}

.chat-main {
  display: flex;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
  width: 100%;
  flex: 1;
}

.chat-sidebar {
  border-radius: var(--radius-sm);
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
  overflow: hidden;
}

.chat-new-btn {
  width: 100%;
  justify-content: center;
  font-size: 12px;
  padding: 7px 8px;
  min-height: 32px;
}

.chat-list {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.chat-sidebar-title {
  margin: 2px 6px 4px;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  font-weight: 700;
}

.chat-item {
  display: flex;
  gap: 4px;
  align-items: stretch;
}

.chat-item-btn {
  flex: 1;
  min-width: 0;
  text-align: left;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text);
  border-radius: 6px;
  padding: 5px 7px;
  font: inherit;
  font-size: 11px;
  cursor: pointer;
  line-height: 1.25;
}

.chat-item-title {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-item-delete {
  flex-shrink: 0;
  width: 22px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  border-radius: 6px;
  font: inherit;
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
  opacity: 0.7;
}

.chat-item-delete:hover {
  color: var(--danger);
  background: rgba(255, 123, 123, 0.1);
  border-color: rgba(255, 123, 123, 0.25);
}

.chat-item-btn:hover {
  background: rgba(255, 255, 255, 0.04);
}

.chat-item-btn.active {
  background: rgba(91, 141, 239, 0.14);
  border-color: rgba(91, 141, 239, 0.28);
}

.chat-item-meta {
  display: none;
}

.messages {
  flex: 1;
  overflow-y: auto;
  padding: 4px 8px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
  width: 100%;
}

.bubble {
  max-width: min(72ch, 100%);
  padding: 10px 14px;
  border-radius: 16px;
  line-height: 1.55;
  font-size: 14px;
}

.bubble.user {
  align-self: flex-end;
  background: var(--user-bubble);
  border: 1px solid rgba(91, 141, 239, 0.25);
}

.bubble.assistant {
  align-self: flex-start;
  background: var(--assistant-bubble);
  border: 1px solid var(--border);
}

.bubble-time {
  display: block;
  font-size: 9px;
  font-weight: 500;
  color: var(--muted);
  margin-bottom: 4px;
  letter-spacing: 0.02em;
  opacity: 0.85;
}

.bubble-text {
  white-space: pre-wrap;
  word-break: break-word;
}

.bubble .role {
  display: none;
}

.composer {
  border-radius: var(--radius);
  padding: 14px;
  flex-shrink: 0;
}

.composer textarea {
  width: 100%;
  resize: none;
  overflow-x: hidden;
  overflow-y: hidden;
  min-height: 76px;
  max-height: 160px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.22);
  color: var(--text);
  padding: 12px 14px;
  font: inherit;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.18) transparent;
}

.composer textarea.is-scrollable {
  overflow-y: auto;
}

.composer textarea::-webkit-scrollbar {
  width: 6px;
}

.composer textarea::-webkit-scrollbar-track {
  background: transparent;
}

.composer textarea::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.16);
  border-radius: 4px;
}

.composer textarea::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.24);
}

.composer textarea:focus {
  outline: 2px solid rgba(91, 141, 239, 0.35);
  border-color: rgba(91, 141, 239, 0.5);
}

.composer-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
  gap: 12px;
}

.hint {
  color: var(--muted);
  font-size: 12px;
}

.btn {
  border: none;
  border-radius: var(--radius-sm);
  padding: 10px 16px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.12s, background 0.15s, opacity 0.15s;
}

.btn:active { transform: scale(0.98); }

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: white;
  box-shadow: 0 8px 20px rgba(91, 141, 239, 0.25);
}

.btn-primary:hover { filter: brightness(1.05); }

.btn-primary:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.btn-lg {
  padding: 12px 22px;
  min-width: 160px;
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border-strong);
}

.btn-ghost:hover { background: rgba(255, 255, 255, 0.04); }

.btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  border: 1px solid var(--border);
}

.error {
  color: var(--danger);
  margin-top: 14px;
  font-size: 14px;
}

.typing {
  color: var(--muted);
  font-style: italic;
}

.automation-layout {
  display: grid;
  grid-template-columns: 168px 1fr;
  grid-template-rows: minmax(0, 1fr);
  gap: 10px;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.automation-layout > * {
  min-height: 0;
}

.section-automation .automation-nav {
  flex-shrink: 0;
  padding: 0 2px 8px;
  gap: 6px;
}

.section-automation .automation-nav .nav-btn {
  padding: 6px 11px;
  font-size: 11px;
}

.section-automation .panel-header {
  padding: 0 2px 8px;
}

.task-sidebar,
.task-panel {
  border-radius: var(--radius);
  min-height: 0;
  overflow: auto;
}

.task-sidebar {
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.task-sidebar-title {
  margin: 4px 8px 10px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  font-weight: 700;
}

.task-nav-btn {
  width: 100%;
  text-align: left;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text);
  border-radius: 8px;
  padding: 8px 9px;
  font: inherit;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  line-height: 1.3;
}

.task-nav-btn:hover { background: rgba(255, 255, 255, 0.04); }

.task-nav-btn.active {
  background: rgba(91, 141, 239, 0.14);
  border-color: rgba(91, 141, 239, 0.28);
  color: white;
}

.task-panel {
  padding: 16px 18px;
  overflow: auto;
  font-size: 13px;
}

.placeholder-state {
  height: 100%;
  min-height: 320px;
  display: grid;
  place-content: center;
  text-align: center;
  gap: 8px;
}

.indkob-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-top: 12px;
}

.indkob-subview:not(.hidden) {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.indkob-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: end;
  padding: 14px 16px;
  margin-bottom: 12px;
  flex-shrink: 0;
}

.indkob-toolbar .dash-toolbar-field input,
.indkob-toolbar .dash-toolbar-field select,
.indkob-selected-avg input,
.indkob-settings-panel .dash-toolbar-field input,
.indkob-settings-panel .dash-toolbar-field select {
  min-width: 0;
  width: 100%;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--border-strong);
  background: var(--surface-solid);
  color: var(--text);
  font: inherit;
  font-size: 13px;
  overflow: hidden;
}

.indkob-toolbar .dash-toolbar-field input:focus,
.indkob-selected-avg input:focus,
.indkob-toolbar .dash-toolbar-field select:focus,
.indkob-settings-panel .dash-toolbar-field input:focus,
.indkob-settings-panel .dash-toolbar-field select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(91, 141, 239, 0.18);
}

.indkob-toolbar-right {
  margin-left: auto;
  display: flex;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: nowrap;
}

/* Search field at far left — not inside toolbar-right */
.indkob-toolbar > .indkob-search-field {
  margin-right: 0;
  flex: 0 1 260px;
}

.indkob-search-field {
  position: relative;
  flex: 0 1 280px;
  min-width: 200px;
}

.indkob-search-field {
  position: relative;
  flex: 0 1 280px;
  min-width: 200px;
}

.indkob-style-results {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 8;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px;
  min-width: min(360px, 80vw);
  max-height: 320px;
  overflow: auto;
  box-shadow: var(--shadow);
}

.indkob-style-hit {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  text-align: left;
  padding: 8px 10px;
  border: 0;
  background: transparent;
  color: inherit;
  border-radius: 8px;
  cursor: pointer;
}

.indkob-style-hit:hover {
  background: rgba(91, 141, 239, 0.12);
}

.indkob-style-hit-img {
  width: 44px;
  height: 54px;
  border-radius: 6px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.04);
}

.indkob-style-hit-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.indkob-style-hit-meta {
  color: var(--muted, #8b93a7);
  font-size: 0.85em;
}

.indkob-overview {
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow: auto;
  min-height: 0;
  padding-bottom: 16px;
}

.indkob-overview-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
}

.indkob-overview-kpi .dash-kpi-value {
  font-variant-numeric: tabular-nums;
}

.indkob-overview-table-wrap {
  padding: 16px;
}

.indkob-overview-table-wrap h3 {
  margin: 0 0 12px;
  font-size: 15px;
}

.indkob-th-help {
  cursor: help;
}

.indkob-plan {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.indkob-plan:not(.hidden) {
  flex: 1;
  min-height: 0;
  overflow: auto;
}

.indkob-plan-with-sales {
  display: grid;
  grid-template-columns: minmax(200px, 260px) minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.indkob-plan-main {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.indkob-sales-details {
  padding: 0;
  overflow: hidden;
}

.indkob-sales-details > summary {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  list-style: none;
  user-select: none;
}

.indkob-sales-details > summary::-webkit-details-marker { display: none; }

.indkob-sales-details > summary::before {
  content: "▶";
  font-size: 10px;
  color: var(--muted);
  transition: transform 0.15s;
  flex-shrink: 0;
}

.indkob-sales-details[open] > summary::before {
  transform: rotate(90deg);
}

.indkob-sales-details > summary > span:first-of-type {
  flex: 1;
}

.indkob-sales-sort {
  display: flex;
  gap: 4px;
}

.indkob-sales-sort button {
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  border-radius: 999px;
  padding: 4px 10px;
  font: inherit;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}

.indkob-sales-sort button.active {
  background: rgba(91, 141, 239, 0.16);
  border-color: rgba(91, 141, 239, 0.4);
  color: var(--text);
}

.indkob-sales-list {
  overflow: auto;
  flex: 1;
  min-height: 0;
  padding: 0;
}

.indkob-sales-list::-webkit-scrollbar { width: 6px; height: 6px; }
.indkob-sales-list::-webkit-scrollbar-track { background: transparent; }
.indkob-sales-list::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 999px; }
.indkob-sales-list::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.28); }

.indkob-sales-list table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.indkob-sales-list th,
.indkob-sales-list td {
  padding: 5px 6px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.indkob-sales-list th:last-child,
.indkob-sales-list td:last-child {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.indkob-plan-head {
  display: grid;
  grid-template-columns: 128px minmax(0, 1fr) auto 220px;
  gap: 14px;
  align-items: stretch;
  padding: 14px 16px;
}

.indkob-plan-info {
  min-width: 0;
}

.indkob-style-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 220px;
  min-width: 220px;
  max-width: 220px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  align-self: stretch;
}

.indkob-imageurl-label,
.indkob-min-label,
.indkob-fabric-label,
.indkob-cons-field,
.indkob-leadtime-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
}

.indkob-imageurl-label input,
.indkob-min-label .indkob-input-suffix-wrap,
.indkob-fabric-label input,
.indkob-fabric-label select,
.indkob-cons-field input,
.indkob-cons-field select,
.indkob-leadtime-field .indkob-input-suffix-wrap {
  width: 100%;
  min-width: 0;
}

.indkob-imageurl-label input {
  padding: 5px 8px;
  border-radius: 6px;
  border: 1px solid var(--border-strong);
  background: var(--surface-solid);
  color: var(--text);
  font: inherit;
  font-size: 12px;
  overflow: hidden;
}

.indkob-imageurl-label input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(91, 141, 239, 0.18);
}

.indkob-min-label input,
.indkob-fabric-label input,
.indkob-fabric-label select,
.indkob-cons-field input,
.indkob-cons-field select,
.indkob-leadtime-field input {
  width: 100%;
  min-width: 0;
  padding: 5px 8px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--surface-solid);
  color: var(--text);
  font: inherit;
  font-size: 12px;
  overflow: hidden;
}

.indkob-fabric-amount-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  align-items: center;
}

.indkob-fabric-amount-row input,
.indkob-fabric-amount-row select {
  width: 100%;
  min-width: 0;
  padding: 5px 8px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--surface-solid);
  color: var(--text);
  font: inherit;
  font-size: 12px;
  overflow: hidden;
}

.indkob-style-leadtime {
  width: 100%;
}

.indkob-fabric-hint {
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
}

.indkob-order-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 4px;
}

.indkob-order-header h3 {
  margin: 0;
  flex: 1;
}

.indkob-basket-check {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  cursor: pointer;
  user-select: none;
}

.indkob-basket-check input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
  cursor: pointer;
}

.indkob-override-qty {
  width: 100%;
  min-width: 0;
  padding: 4px 6px;
  border-radius: 6px;
  border: 1px solid rgba(79, 209, 165, 0.35);
  background: rgba(79, 209, 165, 0.12);
  color: var(--text);
  font: inherit;
  font-size: 18px;
  text-align: right;
  font-weight: 700;
}

.indkob-sizes-box {
  padding: 0;
  overflow: hidden;
}

.indkob-sizes-head {
  display: flex;
  align-items: center;
  padding: 10px 16px;
}

.indkob-sizes-title {
  font-weight: 600;
  font-size: 13px;
}

.indkob-runstock {
  padding: 0;
  overflow: hidden;
}

.indkob-runstock .indkob-table-wrap {
  overflow-x: auto;
}

.indkob-runstock .indkob-table {
  width: max-content;
  min-width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.indkob-runstock .indkob-table th:not(:first-child),
.indkob-runstock .indkob-table td:not(:first-child) {
  min-width: 2.4rem;
}

.indkob-runstock .indkob-table th:first-child,
.indkob-runstock .indkob-table td:first-child {
  position: sticky;
  left: 0;
  z-index: 2;
  background: var(--surface-solid, #16181d);
  min-width: 8.5rem;
}

.indkob-runstock .indkob-table thead th:first-child {
  z-index: 3;
}

.indkob-runstock-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px 16px;
  padding: 10px 16px 6px;
}

.indkob-runstock-head h3 {
  margin: 0;
  font-size: 14px;
}

.indkob-runstock-head p {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}

.indkob-order .indkob-col-actual,
.indkob-order td:nth-child(3),
.indkob-order th.indkob-col-actual {
  width: 1%;
  white-space: nowrap;
}

.indkob-order .indkob-col-home,
.indkob-order td:nth-child(4),
.indkob-order th.indkob-col-home {
  width: 1%;
  white-space: nowrap;
  padding-left: 4px;
}

.indkob-wanted-home {
  width: 100%;
  min-width: 0;
  padding: 4px 6px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--surface-solid);
  color: var(--text);
  font: inherit;
  font-size: 16px;
  font-weight: 700;
}

.indkob-missing,
input.indkob-missing,
select.indkob-missing {
  border-color: #e85d5d !important;
  box-shadow: 0 0 0 1px rgba(232, 93, 93, 0.28);
}

.indkob-missing-cell {
  box-shadow: inset 0 0 0 2px #e85d5d;
}

.indkob-runstock .indkob-table th.indkob-week-now,
.indkob-runstock .indkob-table td.indkob-week-now {
  border-left: 2px solid #3dd68c;
  border-right: 2px solid #3dd68c;
  background: transparent;
}

.indkob-runstock .indkob-table thead th.indkob-week-now {
  border-top: 2px solid #3dd68c;
}

.indkob-runstock .indkob-table tfoot tr:last-child td.indkob-week-now {
  border-bottom: 2px solid #3dd68c;
}

.indkob-po-row td:first-child,
.indkob-so-row td:first-child,
.indkob-arrival-row td:first-child {
  white-space: nowrap;
  font-weight: 600;
}

.indkob-settings-panel {
  width: min(920px, 100%);
}

.indkob-settings-panel .modal-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.indkob-settings-fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin: 8px 0 12px;
}

.indkob-settings-fields .dash-toolbar-field input {
  max-width: 180px;
}

.indkob-settings-subtitle {
  margin: 12px 0 4px;
  font-size: 15px;
}

.indkob-fabric-stock-head,
.indkob-fabric-stock-row {
  display: grid;
  grid-template-columns: minmax(140px, 1.6fr) 90px 80px 100px 40px;
  align-items: center;
  gap: 8px;
  font-size: 12px;
}

.indkob-fabric-stock-head {
  color: var(--muted);
  font-weight: 600;
  padding: 0 0 6px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 8px;
}

.indkob-fabric-stock-row {
  padding: 6px 0;
}

.indkob-fabric-stock-row span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.indkob-fabric-stock-row input,
.indkob-fabric-stock-row select {
  width: 100%;
  min-width: 0;
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid var(--border-strong);
  background: var(--surface-solid);
  color: var(--text);
  font: inherit;
  font-size: 12px;
  overflow: hidden;
}

.indkob-options-btn {
  font-size: 12px;
  white-space: nowrap;
}

.indkob-manual-split {
  width: 64px;
  padding: 4px 6px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--surface-solid);
  color: var(--text);
  font: inherit;
  font-size: 12px;
  text-align: right;
  overflow: hidden;
}

.indkob-toolbar input[type="number"],
.indkob-settings-panel input[type="number"],
.indkob-plan input[type="number"],
.indkob-table input[type="number"] {
  -moz-appearance: textfield;
  appearance: textfield;
  overflow: hidden;
}

.indkob-toolbar input[type="number"]::-webkit-outer-spin-button,
.indkob-toolbar input[type="number"]::-webkit-inner-spin-button,
.indkob-settings-panel input[type="number"]::-webkit-outer-spin-button,
.indkob-settings-panel input[type="number"]::-webkit-inner-spin-button,
.indkob-plan input[type="number"]::-webkit-outer-spin-button,
.indkob-plan input[type="number"]::-webkit-inner-spin-button,
.indkob-table input[type="number"]::-webkit-outer-spin-button,
.indkob-table input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.indkob-tab.in-basket {
  border-color: #4fd1a5;
}

.indkob-tab.in-basket.active {
  background: #4fd1a5;
  color: #000;
  border-color: #4fd1a5;
}

.indkob-tab.in-basket.has-suggest {
  border-color: #e07d2a;
}

.indkob-basket-content {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 4px;
}

.indkob-basket-wrap {
  padding: 16px;
}

.indkob-basket-header {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 12px;
}

.indkob-basket-header h3 {
  margin: 0;
  flex: 1;
}

.indkob-basket-count {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(255,255,255,0.07);
}

.indkob-basket-override {
  width: 90px;
  padding: 4px 6px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--surface-solid);
  color: var(--text);
  font: inherit;
  font-size: 12px;
  text-align: right;
}

.indkob-sales-box {
  display: flex;
  flex-direction: column;
  padding: 12px;
  min-height: 0;
  position: sticky;
  top: 12px;
  align-self: start;
  max-height: calc(100vh - 120px);
  overflow: hidden;
}

.indkob-sales-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  flex-shrink: 0;
}

.indkob-sales-head h3 {
  margin: 0;
  font-size: 14px;
  flex: 1;
}

.indkob-thumb {
  width: 128px;
  min-height: 100%;
  align-self: stretch;
  border-radius: 8px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.04);
}

.indkob-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.indkob-plan-info h3,
.indkob-style-no {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.3;
}

.indkob-style-no {
  margin-top: 4px;
  color: var(--text);
}

.indkob-kpis {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 8px 0 0;
  font-size: 0.92em;
  color: var(--muted);
}

.indkob-center-tools {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 8px;
  align-self: stretch;
}

.indkob-avg-col {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  align-self: stretch;
}


.indkob-qty-tools {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 132px;
  align-self: stretch;
}

.indkob-avg-box {
  min-width: 160px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
}

.indkob-avg-box table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.indkob-avg-box th {
  text-align: left;
  font-weight: 700;
  font-size: 13px;
  line-height: 1.4;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0 0 6px;
}

.indkob-avg-pick {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  padding: 5px 0;
  cursor: pointer;
  text-align: left;
}

.indkob-avg-pick:hover {
  color: var(--accent);
}

.indkob-avg-pick span:last-child {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

.indkob-selected-avg {
  min-width: 148px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(79, 209, 165, 0.12);
  border: 1px solid rgba(79, 209, 165, 0.35);
  flex: 0 0 auto;
}

.indkob-selected-avg span {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ok);
  margin-bottom: 6px;
}

.indkob-selected-avg input {
  font-size: 22px;
  font-weight: 700;
  background: transparent;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  padding: 6px 8px;
  flex: 1;
  min-width: 0;
}

.indkob-input-suffix-wrap {
  display: flex;
  align-items: center;
  gap: 0;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface-solid);
}

.indkob-selected-avg .indkob-input-suffix-wrap {
  background: transparent;
  border-color: rgba(79, 209, 165, 0.4);
}

.indkob-actual-box .indkob-input-suffix-wrap {
  background: transparent;
  border-color: rgba(79, 209, 165, 0.4);
}

.indkob-input-suffix-wrap input {
  flex: 1;
  min-width: 0;
  border: none !important;
  background: transparent !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

.indkob-input-suffix {
  flex-shrink: 0;
  padding: 0 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  pointer-events: none;
  user-select: none;
  border-left: 1px solid var(--border);
  background: rgba(255,255,255,0.04);
  display: flex;
  align-items: center;
  height: 100%;
}

/* Selected-avg suffix matches the large font */
.indkob-selected-avg .indkob-input-suffix {
  font-size: 14px;
  padding: 0 10px;
}

.indkob-home-box {
  display: flex;
  flex-direction: column;
  min-width: 132px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  flex: 1;
}

.indkob-actual-box {
  display: flex;
  flex-direction: column;
  min-width: 132px;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(79, 209, 165, 0.12);
  border: 1px solid rgba(79, 209, 165, 0.35);
  /* Same intrinsic height as .indkob-selected-avg */
  flex: 0 0 auto;
}

.indkob-home-box span,
.indkob-actual-box span {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 4px;
}

.indkob-actual-box span {
  color: var(--ok);
}

.indkob-home-hint {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
}

.indkob-table-wrap,
.indkob-order {
  padding: 12px;
  overflow: auto;
}

.indkob-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85em;
}

.indkob-table th,
.indkob-table td {
  padding: 5px 7px;
  text-align: right;
  white-space: nowrap;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.indkob-table th:first-child,
.indkob-table td:first-child {
  text-align: left;
}

.indkob-table .mono {
  font-variant-numeric: tabular-nums;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.92em;
}

.indkob-table td.is-neg {
  color: #e36b6b;
  font-weight: 600;
}

.indkob-table td.is-low {
  color: #e0b15a;
}

.indkob-table td.is-order {
  font-weight: 700;
  color: #7db0ff;
}

.indkob-table tfoot td {
  font-weight: 700;
  border-top: 1px solid var(--border-strong);
  background: rgba(255, 255, 255, 0.03);
}

.indkob-style-tabs {
  display: flex;
  gap: 3px;
  overflow-x: auto;
  padding: 8px 2px 2px;
  margin-top: 8px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

.indkob-tab {
  flex: 0 0 auto;
  min-width: 34px;
  padding: 6px 10px;
  border: 1px solid var(--border);
  background: var(--surface-solid);
  color: var(--muted);
  border-radius: 8px 8px 2px 2px;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
}

.indkob-tab:hover {
  color: var(--text);
  border-color: var(--border-strong);
}

.indkob-tab.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.indkob-tab.has-suggest {
  border-color: #e07d2a;
  color: #e07d2a;
}

.indkob-tab.has-suggest.active {
  background: #e07d2a;
  color: #fff;
  border-color: #e07d2a;
}

@media (max-width: 960px) {
  .indkob-plan-with-sales {
    grid-template-columns: 1fr;
  }

  .indkob-sales-box {
    max-height: 50vh;
    position: static;
  }

  .indkob-plan-head {
    grid-template-columns: 72px minmax(0, 1fr) auto;
  }

  .indkob-style-options {
    grid-column: 1 / -1;
    width: 100%;
    max-width: none;
  }

  .indkob-toolbar-right {
    margin-left: 0;
    width: 100%;
  }

  .indkob-search-field {
    flex: 1 1 220px;
  }
}

.dash-meta-placeholder {
  padding: 28px 24px;
  max-width: 520px;
  margin: 12px auto 0;
  place-items: center;
}

.dash-meta-placeholder .placeholder-text {
  max-width: 42ch;
  line-height: 1.45;
}

.meta-content {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.meta-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.meta-title {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.meta-period {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--muted);
}

.meta-period-toggle {
  display: inline-flex;
  gap: 4px;
  padding: 3px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
}

.meta-toggle-btn {
  border: none;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  padding: 7px 12px;
  border-radius: 8px;
  cursor: pointer;
}

.meta-toggle-btn.active {
  color: var(--text);
  background: rgba(91, 141, 239, 0.18);
}

.meta-section-title {
  margin: 8px 0 0;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.meta-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
}

.meta-kpi {
  padding: 16px 18px;
  border-radius: var(--radius);
}

.meta-kpi-label {
  margin: 0 0 8px;
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
  line-height: 1.35;
  min-height: 2.4em;
}

.meta-kpi-value {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.meta-kpi-value.is-up {
  color: var(--ok);
}

.meta-kpi-value.is-down {
  color: var(--danger, #ff7b7b);
}

.meta-kpi-meta {
  margin: 8px 0 0;
  font-size: 12px;
  color: var(--muted);
  min-height: 1.2em;
}

.meta-setup-banner {
  padding: 12px 16px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.45;
}

.meta-setup-banner p {
  margin: 0 0 6px;
}

.meta-setup-banner p:last-child {
  margin-bottom: 0;
}

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

.meta-chart-panel {
  min-height: 280px;
}

.meta-table-panel {
  overflow: hidden;
}

.meta-table-wrap {
  overflow-x: auto;
  margin-top: 4px;
}

.meta-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.meta-table th,
.meta-table td {
  padding: 10px 12px;
  text-align: right;
  white-space: nowrap;
  border-bottom: 1px solid var(--border);
}

.meta-table th:first-child,
.meta-table td:first-child,
.meta-table tbody th {
  text-align: left;
  font-weight: 600;
}

@media (max-width: 900px) {
  .meta-panels {
    grid-template-columns: 1fr;
  }
}

.placeholder-title {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.placeholder-text {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.task-runner h2 {
  margin: 0 0 6px;
  font-size: 17px;
  letter-spacing: -0.03em;
}

.task-runner .task-desc {
  margin: 0 0 14px;
  color: var(--muted);
  line-height: 1.45;
  max-width: 100%;
  font-size: 12px;
}

.file-field {
  margin-bottom: 14px;
}

.file-field label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  margin-bottom: 6px;
}

.file-input-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.file-dropzone {
  position: relative;
}

.file-dropzone-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 108px;
  padding: 18px 16px;
  border-radius: 14px;
  border: 1.5px dashed rgba(120, 150, 255, 0.35);
  background: linear-gradient(
    180deg,
    rgba(88, 110, 255, 0.08) 0%,
    rgba(0, 0, 0, 0.16) 100%
  );
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
  text-align: center;
}

.file-dropzone.dragover .file-dropzone-inner,
.file-dropzone.has-file .file-dropzone-inner {
  border-color: rgba(130, 160, 255, 0.75);
  background: linear-gradient(
    180deg,
    rgba(88, 110, 255, 0.16) 0%,
    rgba(0, 0, 0, 0.2) 100%
  );
}

.file-dropzone.dragover .file-dropzone-inner {
  transform: scale(1.01);
}

.file-dropzone-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: rgba(120, 150, 255, 0.18);
  color: #b8c8ff;
  font-size: 16px;
  font-weight: 700;
}

.file-dropzone-text {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.45;
}

.file-pick-btn {
  border: 0;
  background: none;
  padding: 0;
  font: inherit;
  color: #9eb4ff;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

.file-pick-btn:hover {
  color: #c5d2ff;
}

.file-dropzone-name {
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  color: #dfe7ff;
  word-break: break-all;
}

.file-field input[type="file"] {
  width: 100%;
  font: inherit;
  color: var(--muted);
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px dashed var(--border-strong);
  background: rgba(0, 0, 0, 0.18);
}

.task-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
  align-items: center;
}

.task-log {
  margin-top: 16px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid var(--border);
  font-family: ui-monospace, Consolas, monospace;
  font-size: 11px;
  line-height: 1.45;
  max-height: 220px;
  overflow: auto;
  white-space: pre-wrap;
  color: #c5d0dc;
}

.task-result {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: rgba(79, 209, 165, 0.08);
  border: 1px solid rgba(79, 209, 165, 0.22);
  color: var(--ok);
  font-size: 13px;
}

.task-error {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: rgba(255, 123, 123, 0.08);
  border: 1px solid rgba(255, 123, 123, 0.22);
  color: var(--danger);
  font-size: 13px;
  white-space: pre-wrap;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 20px;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
}

.modal-panel {
  position: relative;
  width: min(760px, 100%);
  max-height: calc(100vh - 40px);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
}

.confirm-panel {
  width: min(400px, 100%);
}

.confirm-text {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.modal-header h2 {
  margin: 0;
  font-size: 20px;
}

.modal-body {
  padding: 20px;
  overflow-y: auto;
}

.admin-subtabs {
  display: flex;
  gap: 4px;
  margin-bottom: 16px;
  padding: 4px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
}

.admin-subtab {
  appearance: none;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: calc(var(--radius-sm) - 2px);
  cursor: pointer;
}

.admin-subtab:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}

.admin-subtab.active {
  color: white;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}

.admin-users-layout {
  display: grid;
  grid-template-columns: minmax(180px, 240px) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.admin-users-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 420px;
  overflow: auto;
}

.admin-user-pick {
  appearance: none;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  width: 100%;
  text-align: left;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.12);
  color: var(--text);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  cursor: pointer;
  font: inherit;
}

.admin-user-pick:hover,
.admin-user-pick.active {
  border-color: rgba(91, 141, 239, 0.45);
  background: rgba(91, 141, 239, 0.12);
}

.admin-user-pick-name {
  font-weight: 600;
  font-size: 13px;
}

.admin-user-pick-email {
  font-size: 11px;
  color: var(--muted);
}

.admin-user-badge {
  margin-top: 4px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
}

.admin-user-editor {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  background: rgba(0, 0, 0, 0.12);
  min-height: 200px;
}

.admin-user-editor-head {
  margin-bottom: 12px;
}

.admin-user-editor-head h3 {
  margin: 0 0 4px;
  font-size: 16px;
}

.admin-perm-admin {
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.admin-perm-tree {
  max-height: 360px;
  overflow: auto;
  margin-bottom: 12px;
}

.admin-perm-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0 4px calc(var(--perm-depth, 0) * 14px);
  font-size: 13px;
  cursor: pointer;
}

.admin-perm-children {
  margin: 0;
}

.perm-level-select {
  margin-left: auto;
  min-width: 88px;
  padding: 4px 8px;
  font-size: 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--surface-solid);
  color: var(--text);
}

.perm-level-select option {
  background: var(--surface-solid);
  color: var(--text);
}

.admin-perm-item .admin-perm-label {
  flex: 1;
  min-width: 0;
}

.finans-it-content,
.management-ai-content {
  flex: 1;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
  padding: 0 0 16px;
  display: flex;
  flex-direction: column;
}

#finans-it-licenses-overview,
#finans-it-licenses-fordeling {
  padding-top: 0;
}

.finans-it-panel,
.management-ai-section {
  padding: 16px;
  margin-bottom: 14px;
  min-width: 0;
}

.finans-it-content > .finans-it-panel {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  margin-bottom: 0;
}

.finans-it-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
}

.finans-it-search-field {
  flex: 1 1 200px;
  min-width: 160px;
  margin: 0;
}

.finans-it-search-input {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  font: inherit;
  font-size: 13px;
}

.finans-it-search-input:focus {
  outline: 1px solid var(--accent);
  border-color: rgba(91, 141, 239, 0.45);
}

[data-theme="light"] .finans-it-search-input {
  background: #fff;
}

.finans-it-actions-col {
  width: 44px;
  min-width: 44px;
  max-width: 44px;
  text-align: center;
  padding-left: 4px !important;
  padding-right: 4px !important;
}

.finans-it-row-edit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}

.finans-it-row-edit-btn:hover {
  color: var(--text);
  border-color: rgba(91, 141, 239, 0.45);
  background: rgba(91, 141, 239, 0.12);
}

.finans-it-row-modal-panel {
  width: min(720px, 100%);
}

.finans-it-row-form {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px 16px;
  max-height: calc(100vh - 260px);
  overflow: auto;
  padding-right: 4px;
  margin-bottom: 16px;
}

.finans-it-form-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
}

.finans-it-form-field span {
  color: var(--muted);
  font-weight: 600;
  white-space: pre-wrap;
}

.finans-it-form-field input {
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  font: inherit;
  font-size: 13px;
}

.finans-it-form-field input:focus {
  outline: 1px solid var(--accent);
}

[data-theme="light"] .finans-it-form-field input {
  background: #fff;
}

.finans-it-table-wrap {
  overflow: auto;
  flex: 1;
  min-height: 0;
  min-width: 0;
  max-height: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  scrollbar-width: auto;
  scrollbar-color: rgba(255, 255, 255, 0.35) rgba(255, 255, 255, 0.06);
}

.finans-it-table-wrap::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}

.finans-it-table-wrap::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.28);
  border-radius: 8px;
}

[data-theme="light"] .finans-it-table-wrap {
  scrollbar-color: rgba(16, 24, 32, 0.35) rgba(16, 24, 32, 0.08);
}

.finans-it-table {
  width: max-content;
  min-width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.finans-it-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: rgba(12, 18, 24, 0.95);
  border-bottom: 1px solid var(--border-strong);
  padding: 8px 10px;
  text-align: left;
  white-space: nowrap;
  font-weight: 600;
}

.finans-it-sort-th {
  cursor: pointer;
}

.finans-it-sort-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  font-weight: inherit;
  cursor: pointer;
  white-space: nowrap;
}

.finans-it-sort-btn:focus-visible {
  outline: 1px solid var(--accent);
  outline-offset: 2px;
}

.finans-it-sort-ind {
  font-size: 10px;
  font-weight: 700;
  color: var(--muted);
  line-height: 1;
}

[data-theme="light"] .finans-it-table thead th {
  background: rgba(248, 250, 252, 0.98);
}

.finans-it-table td {
  border-bottom: 1px solid var(--border);
  padding: 5px 10px;
  vertical-align: top;
  min-width: 110px;
  max-width: 240px;
}

.finans-it-table tbody tr {
  height: auto;
}

.finans-it-cell-text {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  overflow: hidden;
  line-height: 1.35;
  max-height: calc(1.35em * 3);
  word-break: break-word;
}

.finans-it-table td.finans-it-col-name,
.finans-it-table th.finans-it-col-name {
  min-width: 180px;
  width: 200px;
  max-width: 240px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
}

.finans-it-table td.finans-it-col-body,
.finans-it-table th.finans-it-col-body {
  line-height: 1.35;
}

.finans-it-table td.finans-it-col-check,
.finans-it-table th.finans-it-col-check {
  min-width: 88px;
  max-width: 140px;
  text-align: center;
  vertical-align: middle;
}

.finans-it-table-wrap--wide .finans-it-col-name {
  position: sticky;
  left: 0;
  z-index: 2;
  background: var(--surface-solid);
}

.finans-it-table-wrap--wide thead th.finans-it-col-name {
  z-index: 4;
  background: rgba(12, 18, 24, 0.95);
}

[data-theme="light"] .finans-it-table-wrap--wide thead th.finans-it-col-name {
  background: rgba(248, 250, 252, 0.98);
}

.finans-it-table-wrap--wide .finans-it-actions-col {
  left: auto;
  right: 0;
}

.finans-it-table td.finans-it-actions-col {
  overflow: visible;
  max-height: none;
  vertical-align: middle;
}

.finans-it-table th.finans-it-actions-col,
.finans-it-table td.finans-it-actions-col {
  position: sticky;
  left: 0;
  z-index: 2;
  background: var(--surface-solid);
}

.finans-it-table thead th.finans-it-actions-col {
  z-index: 3;
}

.finans-it-table--overview,
.finans-it-table--fordeling {
  border-collapse: separate;
  border-spacing: 0;
}

.finans-it-table--overview .finans-it-actions-col,
.finans-it-table--fordeling .finans-it-actions-col {
  left: 0;
  right: auto;
  z-index: 6;
}

.finans-it-table--overview .finans-it-sticky-navn,
.finans-it-table--overview .finans-it-sticky-firma,
.finans-it-table--fordeling .finans-it-sticky-firma {
  position: sticky;
  z-index: 5;
  background: var(--surface-solid);
}

.finans-it-table--overview .finans-it-sticky-navn,
.finans-it-table--overview th.finans-it-sticky-navn,
.finans-it-table--overview td.finans-it-sticky-navn,
.finans-it-table--overview .finans-it-sticky-firma,
.finans-it-table--overview th.finans-it-sticky-firma,
.finans-it-table--overview td.finans-it-sticky-firma {
  min-width: 180px;
  width: 180px;
  max-width: 180px;
}

.finans-it-table--overview .finans-it-sticky-navn {
  left: 44px;
}

.finans-it-table--overview.finans-it-table--readonly .finans-it-sticky-navn {
  left: 0;
}

.finans-it-table--overview .finans-it-sticky-firma {
  left: 224px;
  box-shadow: 8px 0 10px -8px rgba(0, 0, 0, 0.45);
}

.finans-it-table--overview.finans-it-table--readonly .finans-it-sticky-firma {
  left: 180px;
}

.finans-it-table--fordeling .finans-it-sticky-firma {
  left: 44px;
  box-shadow: 8px 0 10px -8px rgba(0, 0, 0, 0.45);
}

.finans-it-table--fordeling.finans-it-table--readonly .finans-it-sticky-firma {
  left: 0;
}

.finans-it-table--overview thead th.finans-it-sticky-navn,
.finans-it-table--overview thead th.finans-it-sticky-firma,
.finans-it-table--overview thead th.finans-it-actions-col,
.finans-it-table--fordeling thead th.finans-it-sticky-firma,
.finans-it-table--fordeling thead th.finans-it-actions-col {
  z-index: 8;
  background: rgba(12, 18, 24, 0.98);
}

[data-theme="light"] .finans-it-table--overview thead th.finans-it-sticky-navn,
[data-theme="light"] .finans-it-table--overview thead th.finans-it-sticky-firma,
[data-theme="light"] .finans-it-table--overview thead th.finans-it-actions-col,
[data-theme="light"] .finans-it-table--fordeling thead th.finans-it-sticky-firma,
[data-theme="light"] .finans-it-table--fordeling thead th.finans-it-actions-col {
  background: rgba(248, 250, 252, 0.98);
}

.finans-it-catalog-assignees {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.02);
}

[data-theme="light"] .finans-it-catalog-assignees {
  background: rgba(15, 23, 42, 0.02);
}

.finans-it-catalog-assignees-label {
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}

.finans-it-catalog-assign-master {
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
  font-weight: 600;
}

.finans-it-catalog-assignee-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 6px 12px;
  max-height: 220px;
  overflow: auto;
}

.finans-it-catalog-assignee-firma {
  color: var(--muted);
  font-weight: 400;
  font-size: 12px;
}

.finans-it-catalog-assign-note {
  grid-column: 1 / -1;
  margin: 2px 0 0;
  font-size: 12px;
  color: var(--muted);
}

.finans-it-license-tabs {
  display: flex;
  gap: 4px;
  padding: 0 0 8px;
  flex-shrink: 0;
}

.finans-it-license-checks {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 8px 12px;
  padding: 8px 0 4px;
}

.finans-it-check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text);
  cursor: pointer;
}

.finans-it-check input {
  width: 16px;
  height: 16px;
  accent-color: #7c6cf0;
}

.finans-it-catalog-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: min(240px, calc(100vh - 520px));
  overflow: auto;
  margin: 12px 0;
}

.finans-it-catalog-row {
  display: grid;
  grid-template-columns: minmax(120px, 1.3fr) 80px 88px 118px 80px;
  gap: 10px;
  align-items: end;
}

.finans-it-catalog-add {
  display: grid;
  grid-template-columns: minmax(120px, 1.3fr) 80px 88px 118px 80px;
  gap: 10px;
  align-items: end;
  margin-bottom: 12px;
}

.finans-it-catalog-add-btn {
  grid-column: 1 / -1;
  justify-self: start;
}

.finans-it-catalog-modal-panel {
  width: min(1080px, 100%);
}

.finans-it-table th.finans-it-license-col,
.finans-it-table td.finans-it-license-col {
  text-align: center;
  min-width: 76px;
  max-width: 110px;
  padding-left: 6px;
  padding-right: 6px;
  vertical-align: middle;
}

.finans-it-table th.finans-it-license-col {
  white-space: normal;
  line-height: 1.25;
  font-size: 11px;
}

.finans-it-overview-check {
  display: block;
  margin: 0 auto;
  width: 16px;
  height: 16px;
  accent-color: #8b8b96;
  cursor: default;
  pointer-events: none;
  filter: grayscale(1);
  opacity: 0.72;
}

.finans-it-overview-check:disabled {
  cursor: default;
  opacity: 0.72;
}

.finans-it-table tr.finans-it-total-row td {
  font-weight: 700;
}

.finans-it-col-total {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.finans-it-catalog-row input[readonly],
.finans-it-catalog-add input[readonly] {
  opacity: 0.75;
  cursor: default;
}

.finans-it-form-field select {
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  font: inherit;
  font-size: 13px;
  width: 100%;
  cursor: pointer;
}

[data-theme="light"] .finans-it-form-field select {
  background: #fff;
}

.finans-it-form-field select option {
  background: var(--surface-solid);
  color: var(--text);
}

.finans-it-form-field select:focus {
  outline: 1px solid var(--accent);
}

.finans-it-table tr:hover td {
  background: rgba(255, 255, 255, 0.03);
}

.management-ai-section h3 {
  margin: 0 0 12px;
  font-size: 15px;
}

.management-ai-section + .management-ai-section {
  margin-top: 14px;
}

#section-finans-it,
#section-management-ai {
  flex: 1;
  min-height: 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.finans-it-subview {
  flex: 1;
  min-height: 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.admin-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
  margin-bottom: 14px;
  background: rgba(0, 0, 0, 0.15);
}

.admin-card-collapsible {
  padding: 0;
  overflow: hidden;
}

.admin-card-summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  cursor: pointer;
  user-select: none;
}

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

.admin-card-title {
  font-size: 16px;
  font-weight: 600;
}

.admin-card-chevron {
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg);
  transition: transform 0.15s ease;
  flex-shrink: 0;
  margin-top: -2px;
}

.admin-card-collapsible[open] .admin-card-chevron {
  transform: rotate(-135deg);
  margin-top: 2px;
}

.admin-card-body {
  padding: 12px 16px 16px;
  border-top: 1px solid var(--border);
}

.admin-card h3 {
  margin: 0 0 8px;
  font-size: 16px;
}

.admin-card p {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.admin-steps {
  margin: 0 0 12px 18px;
  padding: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.admin-steps li {
  margin-bottom: 8px;
}

.admin-hint {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(91, 141, 239, 0.08);
  border: 1px solid rgba(91, 141, 239, 0.2);
  color: var(--text);
  font-size: 12px;
  line-height: 1.5;
}

.admin-status {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 10px;
}

.admin-field {
  margin-bottom: 10px;
}

.admin-field label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--muted);
}

.admin-field input {
  width: 100%;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.22);
  color: var(--text);
  padding: 10px 12px;
  font: inherit;
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.admin-feedback {
  margin-top: 10px;
  font-size: 13px;
  white-space: pre-wrap;
}

.admin-feedback.ok { color: var(--ok); }
.admin-feedback.err { color: var(--danger); }

.admin-user-list {
  list-style: none;
  margin: 0 0 14px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.admin-user-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.admin-user-name {
  font-size: 13px;
  font-weight: 500;
  word-break: break-all;
}

.admin-user-empty {
  font-size: 13px;
  color: var(--muted);
  padding: 4px 0;
}

.btn-sm {
  padding: 4px 10px;
  font-size: 12px;
  min-height: 0;
}

@media (max-width: 1100px) {
  .app-body {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .dash-kpi-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .dash-panels-row {
    grid-template-columns: 1fr;
  }

  .dash-panel-wide {
    grid-column: span 1;
  }

  .area-tabs {
    overflow-x: auto;
    gap: 2px;
    padding: 4px;
  }

  .area-tab {
    padding: 7px 10px;
    font-size: 12px;
    white-space: nowrap;
  }

  .admin-users-layout {
    grid-template-columns: 1fr;
  }

  .sidebar-column {
    position: static;
    width: 100%;
    height: auto;
    max-height: none;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
    overflow: visible;
  }

  #sidebar-chat-panel {
    flex: 0 1 auto;
    max-height: none;
  }

  #sidebar-chat-panel.is-expanded {
    flex: 1 1 160px;
    max-height: 280px;
  }

  .sidebar-chat-list {
    max-height: 160px;
  }

  .style-details-columns {
    grid-template-columns: 1fr;
  }

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

  .klaviyo-panels {
    grid-template-columns: 1fr;
  }

  .app-sidebar-panel {
    flex: 1;
    min-width: 160px;
  }

  .app-sidebar {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
    padding: 10px;
    flex-shrink: 0;
  }

  .sidebar-label {
    width: 100%;
    margin-bottom: 4px;
  }

  .sidebar-nav-btn {
    flex: 1;
    min-width: 140px;
    justify-content: center;
  }

  .dashboard-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 800px) {
  .dash-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dash-funnel {
    flex-direction: column;
  }

  .dash-funnel-arrow {
    transform: rotate(90deg);
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .automation-layout {
    grid-template-columns: 1fr;
  }

  .chat-layout {
    grid-template-columns: 1fr;
  }

  .chat-sidebar {
    max-height: 200px;
    min-height: auto;
    height: auto;
  }

  .task-sidebar {
    flex-direction: row;
    flex-wrap: wrap;
    min-height: auto;
  }

  .task-sidebar-title {
    width: 100%;
  }
}

.spy-toggle-btn.is-pressed {
  border-color: rgba(91, 141, 239, 0.45);
  background: rgba(91, 141, 239, 0.16);
  color: var(--text);
}

.consignment-page-header {
  margin-bottom: 14px;
}

.consignment-page-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: end;
}

.consign-store-field {
  min-width: 260px;
}

.consign-store-combo {
  position: relative;
  min-width: 260px;
}

.consign-store-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 38px;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid var(--border, rgba(255, 255, 255, 0.12));
  background: var(--input-bg, rgba(0, 0, 0, 0.25));
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.consign-store-panel {
  position: absolute;
  z-index: 40;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  max-height: 320px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
  border-radius: 12px;
  border: 1px solid var(--border, rgba(255, 255, 255, 0.12));
  background: var(--panel-bg, #1a1d24);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
}

.consign-store-search {
  width: 100%;
  min-height: 34px;
  padding: 7px 10px;
  border-radius: 8px;
  border: 1px solid var(--border, rgba(255, 255, 255, 0.12));
  background: rgba(0, 0, 0, 0.2);
  color: inherit;
}

.consign-store-options {
  overflow: auto;
  max-height: 240px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.consign-store-option {
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
}

.consign-store-option:hover,
.consign-store-option.is-selected {
  background: rgba(255, 255, 255, 0.08);
}

.consignment-page-content {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.consignment-target-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.consignment-target-card {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
}

.consignment-thumb {
  width: 56px;
  height: 70px;
  border-radius: 8px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.04);
  display: grid;
  place-items: center;
}

.consignment-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.consignment-thumb-empty {
  color: var(--muted);
  font-size: 12px;
}

.consignment-target-name {
  margin: 0 0 2px;
  font-size: 14px;
  font-weight: 600;
}

.consignment-target-meta,
.consignment-target-sizes,
.consignment-target-scope {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}

.consignment-target-scope {
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 11px;
}

.consignment-search-results {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 12px 0;
  max-height: 240px;
  overflow: auto;
}

.consignment-search-item {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  text-align: left;
  width: 100%;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  color: inherit;
  border-radius: 10px;
  padding: 8px;
  cursor: pointer;
}

.consignment-search-item:hover {
  border-color: rgba(91, 141, 239, 0.4);
}

.consignment-search-item .consignment-thumb {
  width: 44px;
  height: 54px;
}

.consignment-search-item strong {
  display: block;
  font-size: 13px;
}

.consignment-size-editor {
  margin-top: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.consignment-editor-title {
  margin: 0 0 12px;
  font-weight: 600;
}

.consignment-size-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
  gap: 10px;
}

.consignment-size-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
}

.consignment-size-field input {
  width: 100%;
  padding: 8px;
  border-radius: 8px;
  border: 1px solid var(--border-strong);
  background: var(--surface-solid);
  color: var(--text);
  font: inherit;
}

.consignment-apply-all {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 14px 0;
  font-size: 13px;
}

.consignment-editor-actions {
  display: flex;
  justify-content: flex-end;
}

.consignment-reorder {
  padding: 14px 16px;
}

.consignment-reorder-title {
  margin: 0 0 10px;
  font-weight: 700;
}

.consignment-reorder-table-wrap {
  overflow: auto;
}

.consignment-reorder-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.consignment-reorder-table th,
.consignment-reorder-table td {
  text-align: left;
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.consignment-reorder-table th {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.consignment-files-box,
.consignment-channel-data {
  margin: 12px 0 18px;
}

.consignment-files-table,
.consignment-data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.consignment-files-table th,
.consignment-files-table td,
.consignment-data-table th,
.consignment-data-table td {
  text-align: left;
  padding: 7px 10px;
  border-bottom: 1px solid var(--border);
}

.consignment-files-table th,
.consignment-data-table th {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.consignment-channel-title {
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: 700;
}

/* ── Redesign components ── */

.topbar-brand-switcher .dash-brand-select {
  min-width: 130px;
  padding: 6px 28px 6px 10px;
  font-size: 12.5px;
  font-weight: 600;
  border-radius: 8px;
  background: var(--surface-2);
  border: 1px solid var(--border);
}

.topbar-search-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  min-width: 140px;
  border-radius: 8px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font: 500 12.5px inherit;
  cursor: pointer;
}

.topbar-search-btn:hover {
  color: var(--text-secondary);
  border-color: var(--border-strong);
}

.topbar-search-kbd {
  margin-left: auto;
  font-size: 10px;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 5px;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
}

.topbar-icon-btn {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  display: grid;
  place-items: center;
  cursor: pointer;
  position: relative;
  padding: 0;
}

.topbar-icon-btn:hover {
  color: var(--text);
  border-color: var(--border-strong);
}

.btn-ask-desk {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 13px;
  border-radius: 8px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-soft-border);
  color: var(--accent-strong);
  font-weight: 700;
  font-size: 12.5px;
  cursor: pointer;
}

.btn-ask-desk:hover {
  background: oklch(0.62 0.19 291 / 0.22);
}

.visually-hidden-meta {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.page-kicker {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0 0 9px;
}

.page-breadcrumb {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-muted);
  margin: 0 0 9px;
}

.page-header h1.page-title,
.page-header h2.page-title {
  margin: 0 0 6px;
  font-size: clamp(22px, 2.5vw, 27px);
  font-weight: 800;
  letter-spacing: -0.03em;
}

.page-subtitle {
  margin: 0;
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 700;
}

.status-badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 99px;
  background: currentColor;
}

.status-badge--success { background: var(--success-soft); color: var(--success); }
.status-badge--warning { background: var(--warning-soft); color: var(--warning); }
.status-badge--danger { background: var(--danger-soft); color: var(--danger); }
.status-badge--info { background: var(--info-soft); color: var(--info); }

.delta-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 700;
}

.delta-pill.up { background: var(--success-soft); color: var(--success); }
.delta-pill.down { background: var(--danger-soft); color: var(--danger); }
.delta-pill.neutral { background: var(--surface-3); color: var(--text-muted); }

.dash-kpi-value {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 25px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.dash-kpi-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
}

.dash-kpi {
  padding: 18px 20px;
  border-radius: 14px;
}

.dash-kpi-change.up { color: var(--success); }
.dash-kpi-change.down { color: var(--danger); }
.dash-kpi-change.neutral { color: var(--text-muted); }

.dash-kpi-foot .dash-kpi-sublabel {
  font-size: 11.5px;
  color: var(--text-muted);
}

/* Home overview */
.section-home {
  overflow-y: auto;
  padding: 32px 40px 40px;
}

.home-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.home-columns {
  display: grid;
  grid-template-columns: 1.55fr 1fr;
  gap: 20px;
  align-items: start;
}

.home-card {
  padding: 22px 24px;
  border-radius: 14px;
}

.home-card-title {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
}

.home-attention-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 4px;
  border-top: 1px solid var(--border);
  cursor: pointer;
  text-align: left;
  width: 100%;
  background: transparent;
  border-left: none;
  border-right: none;
  border-bottom: none;
  color: inherit;
  font: inherit;
}

.home-attention-row:hover {
  background: var(--surface-2);
}

.home-attention-icon {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

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

.home-shortcut {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 16px;
  border-radius: 10px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  cursor: pointer;
  text-align: left;
  color: inherit;
  font: inherit;
}

.home-shortcut:hover {
  border-color: var(--border-strong);
  background: var(--surface-3);
}

.home-shortcut-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}

.home-shortcut-meta {
  font-size: 11.5px;
  color: var(--text-muted);
}

.home-ai-panel {
  padding: 20px 22px;
}

.home-ai-suggestions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 14px;
}

.home-ai-chip {
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-size: 12.5px;
  color: var(--text-secondary);
  cursor: pointer;
  text-align: left;
}

.home-ai-chip:hover {
  border-color: var(--accent-soft-border);
  color: var(--text);
}

/* Empty / coming soon */
.coming-soon-state {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 40px;
  overflow-y: auto;
}

.coming-soon-inner {
  max-width: 440px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.coming-soon-icon {
  width: 72px;
  height: 72px;
  border-radius: 20px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-soft-border);
  display: grid;
  place-items: center;
  margin-bottom: 24px;
  color: var(--accent-strong);
  font-size: 28px;
}

.coming-soon-features {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: var(--border);
  border-radius: 12px;
  overflow: hidden;
  margin: 26px 0 28px;
  border: 1px solid var(--border);
}

.coming-soon-feature {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 13px 16px;
  background: var(--surface);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-secondary);
  text-align: left;
}

/* Chat drawer in chat section */
.chat-layout-with-sidebar {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 16px;
  height: 100%;
  min-height: 0;
}

.chat-sidebar-panel {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px;
  border-radius: 14px;
  min-height: 0;
  overflow: hidden;
}

.chat-sidebar-panel .sidebar-chat-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}

/* Finans IT license table groups */
.finans-it-table thead tr.finans-it-group-row th {
  background: var(--surface-3);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-align: center;
  border-bottom: 1px solid var(--border);
}

.finans-it-table thead tr.finans-it-col-row th {
  background: var(--surface-2);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.finans-it-table tbody tr:hover td {
  background: var(--surface-2);
}

.finans-it-col-name {
  font-weight: 700;
  position: sticky;
  left: 0;
  z-index: 2;
  background: var(--surface);
}

.finans-it-table tbody tr:hover .finans-it-col-name {
  background: var(--surface-2);
}

.finans-it-col-amount {
  text-align: right;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-weight: 600;
  font-size: 12.5px;
}

.finans-it-col-check {
  text-align: center;
  color: var(--success);
}

.finans-it-col-empty {
  text-align: center;
  color: var(--text-muted);
}

.finans-it-check-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--success);
}

.sidebar-column {
  border-right: 1px solid var(--border);
  background: var(--bg);
}

.sidebar-label {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 8px 12px 4px;
  margin: 0;
}

.app-sidebar-panel {
  background: transparent;
  border: none;
  box-shadow: none;
  border-radius: 0;
}

.sidebar-brand-panel {
  display: none;
}

.sidebar-column.is-hidden {
  display: none;
}

@media (max-width: 1100px) {
  .home-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .home-columns {
    grid-template-columns: 1fr;
  }
  .topbar-search-btn span:not(.topbar-search-kbd) {
    display: none;
  }
  .topbar-search-btn {
    min-width: auto;
    width: 34px;
    justify-content: center;
    padding: 7px;
  }
  .topbar-search-kbd {
    display: none;
  }
}

@media (max-width: 900px) {
  .area-tabs {
    display: none;
  }
  .home-kpi-grid {
    grid-template-columns: 1fr;
  }
}
