@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500;600&family=Instrument+Sans:ital,wght@0,400;0,500;0,600;0,700;0,800;1,400&display=swap");

/* DECIVIQ Visual Identity V2 — final, shared presentation layer. */
:root {
  color-scheme: dark;
  --dq-bg: #08090a;
  --dq-sidebar: #0a0b0d;
  --dq-surface: #0d0f12;
  --dq-surface-raised: #111318;
  --dq-surface-hover: #15181d;
  --dq-border: rgba(255, 255, 255, 0.09);
  --dq-border-strong: rgba(255, 255, 255, 0.15);
  --dq-text: #f1f2f4;
  --dq-text-secondary: #aeb3bd;
  --dq-muted: #9298a5;
  --dq-purple: #8b5cf6;
  --dq-purple-bright: #a78bfa;
  --dq-gold: #c2a66b;
  --dq-red: #ef5d6b;
  --dq-amber: #e7a64a;
  --dq-blue: #6fa9ff;
  --dq-teal: #34c9bc;
  --dq-green: #46d996;
  --dq-page: var(--dq-bg);
  --dq-sidebar-bg: var(--dq-sidebar);
  --dq-surface-1: var(--dq-surface);
  --dq-surface-2: var(--dq-surface-raised);
  --dq-surface-3: var(--dq-surface-hover);
  --dq-card: var(--dq-surface-raised);
  --dq-card-raised: var(--dq-surface-hover);
  --dq-line: var(--dq-border);
  --dq-line-strong: var(--dq-border-strong);
  --dq-text-primary: var(--dq-text);
  --dq-text-muted: var(--dq-muted);
  --dq-radius: 6px;
  --dq-radius-lg: 8px;
  --dq-shadow: none;
  font-family: "Instrument Sans", Inter, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
body, button, input, select, textarea { font-family: "Instrument Sans", Inter, Arial, sans-serif; }
.eyebrow, .meta-label, .section-kicker, .panel-kicker, .workspace-sidebar .nav-label, .nav-section-label,
.lane-badge, .confidence-badge, .brief-evidence-chip, .flow-label, .decision-card span, .data-chip {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  letter-spacing: .075em;
  text-transform: uppercase;
}

.deciviq-bars { position: relative; top: -2px; display: inline-flex; align-items: end; gap: 3px; height: 17px; vertical-align: middle; }
.deciviq-bars i { width: 4px; border-radius: 1px 1px 0 0; display: block; background: rgba(139,92,246,.42); }
.deciviq-bars i:nth-child(1) { height: 7px; }
.deciviq-bars i:nth-child(2) { height: 12px; background: rgba(139,92,246,.7); }
.deciviq-bars i:nth-child(3) { height: 17px; background: var(--dq-purple); }

/* Landing: editorial, calm, no synthetic purple fog. */
body:has(.page-shell) { background: var(--dq-bg); color: var(--dq-text); }
body:has(.page-shell)::before { opacity: .22 !important; background-image: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px) !important; background-size: 56px 56px !important; }
.page-shell, .auth-shell, .landing-shell { background: transparent !important; }
.brand-logo { filter: none; }
.hero-copy h1, .hero-content h1, .landing-copy h1 { max-width: 13ch; letter-spacing: -.055em; line-height: .98; }
.hero-copy .eyebrow, .hero-copy p { max-width: 53ch; }
.hero-decision-flow, .hero-flow { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.hero-flow-pill, .hero-decision-flow span { border: 1px solid var(--dq-border-strong); border-radius: 999px; background: rgba(255,255,255,.025); padding: 7px 12px; box-shadow: none; font: 500 11px "IBM Plex Mono", monospace; letter-spacing: .06em; text-transform: uppercase; }
.hero-flow-signal { color: #c6b3ff; border-color: rgba(139,92,246,.55); }
.hero-flow-cause { color: #a9cbff; border-color: rgba(111,169,255,.55); }
.hero-flow-action { color: #84e4da; border-color: rgba(52,201,188,.55); }
.hero-decision-flow i, .hero-flow i { color: var(--dq-gold); font-style: normal; }
.auth-card, .demo-card, .login-card { border: 1px solid var(--dq-border-strong) !important; background: var(--dq-surface) !important; box-shadow: none !important; border-radius: 8px !important; }

/* Shared controls and surfaces. */
button, .button, .btn, input, select, textarea {
  border-radius: 6px !important;
  box-shadow: none !important;
}
input, select, textarea { background: #10141b !important; border-color: var(--dq-border-strong) !important; color: var(--dq-text) !important; }
input:focus, select:focus, textarea:focus { outline: 2px solid rgba(139,92,246,.55); outline-offset: 1px; }
button:not(.nav-item), .button, .btn { transition: background .16s ease, border-color .16s ease, color .16s ease, transform .16s ease; }
button:hover, .button:hover, .btn:hover { transform: translateY(-1px); }
.primary-button, .btn-primary, button.primary { background: var(--dq-purple) !important; border-color: var(--dq-purple) !important; color: white !important; }

/* The password visibility switch is anchored inside its input, not a floating CTA. */
.toggle-password,
.toggle-password:hover,
.toggle-password:focus-visible {
  transform: translateY(-50%) !important;
}
.toggle-password:hover,
.toggle-password:focus-visible {
  border-color: rgba(167, 139, 250, .72) !important;
  background: rgba(139, 92, 246, .14) !important;
  box-shadow: 0 0 0 1px rgba(167, 139, 250, .14), 0 0 16px rgba(139, 92, 246, .24) !important;
}

/* Workspace shell and navigation. */
body:has(.workspace-shell) { background: var(--dq-bg); color: var(--dq-text); }
.workspace-shell, .workspace-app { background: var(--dq-bg) !important; }
.workspace-main { background-color: var(--dq-bg) !important; background-image: linear-gradient(rgba(255,255,255,.027) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.027) 1px, transparent 1px) !important; background-size: 56px 56px !important; }
.workspace-sidebar, .sidebar { background: var(--dq-sidebar) !important; border-right: 1px solid var(--dq-border) !important; }
.workspace-sidebar .brand, .sidebar .brand { border-bottom-color: var(--dq-border) !important; }
.workspace-sidebar a, .workspace-sidebar button, .sidebar a, .sidebar button { border-radius: 5px !important; box-shadow: none !important; }
.workspace-sidebar .nav-item.active, .sidebar .nav-item.active { background: rgba(139,92,246,.13) !important; color: var(--dq-text) !important; border-left: 2px solid var(--dq-purple) !important; }
.workspace-sidebar .nav-item.active::before, .sidebar .nav-item.active::before { display: none !important; }
.workspace-sidebar .nav-item:hover, .sidebar .nav-item:hover { background: rgba(255,255,255,.045) !important; }
.sidebar .nav-item.is-active { background: rgba(139,92,246,.13) !important; color: var(--dq-text) !important; border-left: 2px solid var(--dq-purple) !important; }
.sidebar-section-label { margin: 14px 10px 4px; color: var(--dq-muted); font: 600 10px "IBM Plex Mono", monospace; letter-spacing: .1em; text-transform: uppercase; }
.sidebar-section-label:first-child { margin-top: 0; }
.sidebar-coming-soon { display: grid; gap: 4px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--dq-border); }
.sidebar-coming-soon .sidebar-section-label { margin-top: 0; }
.sidebar-coming-soon-note { margin: 0 10px 5px; color: var(--dq-text-secondary); font-size: 11px; line-height: 1.4; }
.sidebar .nav-item.is-muted { opacity: .7; cursor: not-allowed; }

.workspace-header, .content-header, .workspace-toolbar, .toolbar, .panel, .section-panel, .module-card,
.analytics-panel, .product-panel, .team-panel, .targets-panel, .report-panel, .decision-lanes {
  background: var(--dq-surface) !important;
  border: 1px solid var(--dq-border) !important;
  box-shadow: none !important;
  border-radius: 8px !important;
}
.workspace-header { padding: 28px 30px !important; }
.workspace-header h1 { font-size: clamp(30px, 3vw, 42px) !important; letter-spacing: -.045em !important; }
.daily-brief-header { border-left: 2px solid var(--dq-purple) !important; }
.workspace-main .eyebrow { color: var(--dq-purple-bright) !important; font-size: 11px !important; line-height: 1.35 !important; }
.daily-brief-eyebrow { display: inline-flex; align-items: center; gap: 8px; }
.daily-brief-eyebrow .deciviq-bars { top: -1px; }
.module-eyebrow { display: inline-flex; align-items: center; gap: 8px; }
.module-icon { position: relative; top: -1px; width: 17px; height: 17px; flex: 0 0 17px; fill: none; stroke: var(--dq-purple-bright); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 0 5px rgba(139, 92, 246, .2)); }
.module-icon--analytics { opacity: .92; }
.module-icon--targets { opacity: .86; }
.module-icon--products { opacity: .78; }
.module-icon--team { opacity: .9; }
.module-icon--reports { opacity: .94; }
.toolbar, .workspace-toolbar { padding: 16px 18px !important; gap: 16px !important; align-items: center !important; }
.live-brief-context { display: grid; gap: 4px; }
.live-brief-context strong { font-size: 17px; letter-spacing: -.015em; }
.brief-evidence-chip { display: inline-flex; width: fit-content; padding: 4px 7px; border: 1px solid var(--dq-border); color: var(--dq-text-secondary); background: transparent; border-radius: 4px; font-size: 10px; }
.live-brief-actions { gap: 10px !important; align-items: end !important; }

/* Daily Brief: more deliberate hierarchy and breathing room at a glance. */
#dailyView .toolbar {
  margin-bottom: 22px !important;
  padding: 20px 24px !important;
  gap: 26px !important;
}
#dailyView .live-brief-context { gap: 7px !important; }
#dailyView .live-brief-context strong { font-size: clamp(19px, 1.55vw, 23px) !important; line-height: 1.15 !important; }
#dailyView .live-brief-context small { max-width: 620px; color: var(--dq-text-secondary) !important; font-size: 13px !important; line-height: 1.5 !important; }
#dailyView .brief-evidence-chip { margin-top: 5px !important; padding: 6px 9px !important; font-size: 11px !important; }
#dailyView .live-brief-actions { gap: 12px !important; }
#dailyView .kpi-grid { margin-top: 18px !important; margin-bottom: 40px !important; }
#dailyView .brief-heading { margin-top: 0 !important; margin-bottom: 18px !important; align-items: center !important; }
#dailyView .brief-heading h2 { font-size: clamp(27px, 2vw, 33px) !important; line-height: 1.08 !important; }
#dailyView .brief-count { font-size: 13px !important; line-height: 1.45 !important; }
#dailyView .decision-card { margin-top: 0 !important; padding: 28px 30px !important; }
#dailyView .decision-card .decision-topline { min-height: 36px !important; padding-bottom: 15px !important; }
#dailyView .decision-card .decision-title-row { padding-bottom: 24px !important; }
#dailyView .decision-card .decision-title-row .eyebrow { margin-bottom: 10px !important; color: var(--dq-purple-bright) !important; font-size: 11px !important; line-height: 1.45 !important; letter-spacing: .095em !important; }
#dailyView .decision-card .decision-title-row h3 { font-size: clamp(27px, 2.25vw, 35px) !important; line-height: 1.08 !important; }
#dailyView .decision-card .decision-flow > article { min-height: 118px !important; padding: 20px 22px !important; }
#dailyView .decision-card .flow-label { font-size: 10px !important; letter-spacing: .12em !important; }
#dailyView .decision-card .decision-flow p { font-size: 14px !important; line-height: 1.55 !important; }
#dailyView .decision-card .lane-badge, #dailyView .decision-card .confidence-badge { padding: 6px 9px !important; font-size: 10px !important; }
#dailyView .decision-card .decision-actions .text-button { font-size: 13px !important; color: var(--dq-purple-bright) !important; }
#dailyView .priority-stack { gap: 10px !important; margin-top: 14px !important; }
#dailyView .priority-stack-card { min-height: 62px !important; }
#dailyView .lanes-section { margin-top: 20px !important; padding: 26px 28px !important; }
#dailyView .lanes-heading { align-items: center !important; margin-bottom: 18px !important; }
#dailyView .lanes-heading > p { align-self: center; margin: 0 !important; text-align: right; font-size: 13px !important; line-height: 1.45 !important; }
#dailyView .lane-card { min-height: 126px !important; padding: 18px !important; }
#dailyView .lane-card-copy strong { font-size: 14px !important; }
#dailyView .lane-card-copy small, #dailyView .lane-card-copy em, #dailyView .lane-card-copy p { font-size: 11px !important; line-height: 1.45 !important; }

/* KPI strip: a connected operating readout instead of floating colourful tiles. */
.kpi-grid, .analytics-kpi-grid, .brief-kpi-grid { gap: 0 !important; border: 1px solid var(--dq-border) !important; border-radius: 8px !important; overflow: hidden; background: var(--dq-surface) !important; }
.kpi-card, .metric-card, .analytics-kpi, .analytics-kpi-card { min-height: 126px; background: var(--dq-surface) !important; border: 0 !important; border-right: 1px solid var(--dq-border) !important; border-radius: 0 !important; box-shadow: none !important; }
.kpi-card:last-child, .metric-card:last-child, .analytics-kpi:last-child, .analytics-kpi-card:last-child { border-right: 0 !important; }
.kpi-card::before, .metric-card::before, .analytics-kpi::before, .analytics-kpi-card::before { height: 2px !important; opacity: 1 !important; background: var(--dq-blue) !important; box-shadow: none !important; }
.kpi-card.positive::before, .metric-card.positive::before, .analytics-kpi.positive::before, .analytics-kpi-card.positive::before { background: var(--dq-green) !important; }
.kpi-card.negative::before, .metric-card.negative::before, .analytics-kpi.negative::before, .analytics-kpi-card.negative::before { background: var(--dq-red) !important; }
.analytics-kpi.is-positive::before { background: var(--dq-green) !important; }
.analytics-kpi.is-negative::before { background: var(--dq-red) !important; }
.analytics-kpi.is-watchlist::before { background: var(--dq-amber) !important; }
.analytics-kpi.is-basic::before { background: var(--dq-muted) !important; }
.analytics-kpi.is-neutral::before { background: var(--dq-blue) !important; }
.kpi-card h3, .metric-card h3, .analytics-kpi-card h3 { letter-spacing: -.035em !important; }

/* Decision object. Priority colour lives on a thin rail, never in a noisy card fill. */
.decision-card, .priority-card, .decision-object { position: relative; overflow: hidden; border: 1px solid var(--dq-border) !important; border-left: 3px solid var(--dq-blue) !important; border-radius: 8px !important; background: var(--dq-surface) !important; box-shadow: none !important; }
.decision-card::before, .priority-card::before, .decision-object::before { display: none !important; }
.decision-card[data-lane="priority"], .decision-card.priority, .priority-card.priority { border-left-color: var(--dq-red) !important; }
.decision-card[data-lane="watchlist"], .decision-card.watchlist, .priority-card.watchlist { border-left-color: var(--dq-amber) !important; }
.decision-card[data-lane="success"], .decision-card.success, .priority-card.success { border-left-color: var(--dq-green) !important; }
.decision-card[data-lane="neutral"], .decision-card.neutral, .priority-card.neutral { border-left-color: var(--dq-blue) !important; }
.decision-card h3, .priority-card h3 { max-width: 31ch; font-size: clamp(22px, 2.1vw, 32px) !important; line-height: 1.05 !important; letter-spacing: -.04em !important; color: var(--dq-text) !important; }
.decision-title-row { gap: 18px !important; align-items: start !important; }
.impact-callout { border: 1px solid var(--dq-border-strong) !important; border-radius: 5px !important; background: transparent !important; color: var(--dq-text-secondary) !important; box-shadow: none !important; }
.decision-tags, .lane-badge, .confidence-badge { gap: 6px; }
.lane-badge, .confidence-badge { border-radius: 4px !important; padding: 5px 7px !important; background: transparent !important; border: 1px solid var(--dq-border) !important; font-size: 10px !important; }
.decision-flow, .live-decision-flow { display: grid !important; grid-template-columns: 1fr 1fr 1fr !important; gap: 0 !important; border-top: 1px solid var(--dq-border) !important; }
.decision-flow > *, .live-decision-flow > * { padding: 16px 18px !important; background: transparent !important; border: 0 !important; border-right: 1px solid var(--dq-border) !important; border-radius: 0 !important; box-shadow: none !important; }
.decision-flow > *:last-child, .live-decision-flow > *:last-child { border-right: 0 !important; }
.decision-flow span, .live-decision-flow span, .flow-label { color: var(--dq-purple-bright) !important; font-size: 10px !important; }
.decision-flow p, .live-decision-flow p { margin: 7px 0 0 !important; color: var(--dq-text-secondary) !important; line-height: 1.45 !important; }
.flow-cause span, .decision-flow .cause span { color: var(--dq-blue) !important; }
.flow-action span, .decision-flow .action span { color: var(--dq-teal) !important; }
.why-matters, .decision-footer { border-top: 1px solid var(--dq-border) !important; background: transparent !important; }

/* Analytics and operational modules. */
.analytics-layout, .workspace-grid, .analytics-grid { gap: 14px !important; }
.chart-panel, .analytics-panel, .chart-card { background: var(--dq-surface) !important; border: 1px solid var(--dq-border) !important; border-radius: 8px !important; box-shadow: none !important; }
.chart-panel h2, .analytics-panel h2, .panel h2 { letter-spacing: -.025em !important; }
.chart-scroll, .sales-chart-scroll { scrollbar-color: var(--dq-purple) transparent; scrollbar-width: thin; }
.chart-scroll::-webkit-scrollbar, .sales-chart-scroll::-webkit-scrollbar { height: 6px; }
.chart-scroll::-webkit-scrollbar-thumb, .sales-chart-scroll::-webkit-scrollbar-thumb { background: var(--dq-purple); border-radius: 99px; }
.sales-bar, .chart-bar { border-radius: 3px 3px 0 0 !important; background: var(--dq-purple) !important; box-shadow: none !important; }
.sales-bar.is-selected, .chart-bar.is-selected { outline: 1px solid var(--dq-gold); outline-offset: 3px; }
.week-divider { border-left: 1px solid rgba(194,166,107,.6) !important; }

/* A clicked trading day is a persistent filter, not only a hover state. */
.bar-chart.is-period-scrollable .bar-column.is-filtered {
  z-index: 2;
  border-radius: 6px 6px 3px 3px;
  background: linear-gradient(180deg, rgba(98, 106, 119, .42), rgba(54, 60, 70, .24) 62%, rgba(35, 39, 47, .08));
  box-shadow: inset 0 0 0 1px rgba(166, 174, 186, .48), 0 10px 22px rgba(0, 0, 0, .24);
}
.bar-chart.is-period-scrollable .bar-column.is-filtered .bar-actual {
  box-shadow: 0 0 20px rgba(190, 151, 255, .6);
}
.bar-chart.is-period-scrollable .bar-column.is-filtered b,
.bar-chart.is-period-scrollable .bar-column.is-filtered > span:first-child { color: #f4f1f8; }
.data-panel, .comparison-panel, .top-styles, .product-mix, .report-list { background: var(--dq-surface) !important; border: 1px solid var(--dq-border) !important; border-radius: 8px !important; }
.store-comparison-row, .top-style-row, .product-list-row { border-color: var(--dq-border) !important; background: transparent !important; box-shadow: none !important; }
.store-comparison-row:hover, .top-style-row:hover, .product-list-row:hover { background: var(--dq-surface-hover) !important; }

/* Tables, team and targets: compact operational workspaces. */
table { border-collapse: collapse; background: var(--dq-surface) !important; }
th { color: var(--dq-muted) !important; font: 500 11px "IBM Plex Mono", monospace !important; letter-spacing: .07em; text-transform: uppercase; background: var(--dq-surface) !important; }
td, th { border-color: var(--dq-border) !important; }
tr:hover td { background: var(--dq-surface-hover) !important; }
.employee-row, .team-row { cursor: pointer; }
.employee-row:hover, .team-row:hover { background: var(--dq-surface-hover) !important; }
.score-badge, .score-pill { border-radius: 4px !important; box-shadow: none !important; }
.target-day, .day-card { border: 1px solid var(--dq-border) !important; border-radius: 6px !important; background: var(--dq-surface-raised) !important; box-shadow: none !important; }
.target-day.selected, .day-card.selected { border-color: var(--dq-gold) !important; }
.target-kpi-panel, .kpi-targets { background: var(--dq-surface) !important; border: 1px solid var(--dq-border) !important; border-radius: 8px !important; }

/* Readability polish: explanatory text stays secondary without becoming cryptic. */
.analytics-kpi small, .team-method-note, .chart-hint, .product-data-note, .crm-card-explainer, .crm-history-note { color: var(--dq-text-secondary) !important; font-size: 12px !important; line-height: 1.5 !important; }
.analytics-table-wrap td { font-size: 13px !important; line-height: 1.45 !important; }
.feedback-choice { min-height: 36px; font-size: 12px; }
.feedback-selection { font-size: 12px; line-height: 1.45; }
.product-action-summary { display: flex; align-items: center; justify-content: space-between; gap: 22px; margin: 2px 0 14px; padding: 19px 21px; border: 1px solid var(--dq-border); border-left: 3px solid var(--dq-blue); border-radius: 8px; background: var(--dq-surface); }
.product-action-summary h2 { margin: 4px 0 7px; color: var(--dq-text); font-size: clamp(19px, 1.6vw, 24px); letter-spacing: -.025em; }
.product-action-summary p:not(.eyebrow) { max-width: 720px; margin: 0; color: var(--dq-text-secondary); font-size: 13px; line-height: 1.5; }
.product-action-summary > span { flex: 0 0 auto; color: var(--dq-text-secondary); font: 600 10px "IBM Plex Mono", monospace; letter-spacing: .07em; text-align: right; text-transform: uppercase; }
.product-action-summary.is-priority { border-left-color: var(--dq-red); }
.product-action-summary.is-priority .eyebrow, .product-action-summary.is-priority > span { color: var(--dq-red); }
.product-action-summary.is-watchlist { border-left-color: var(--dq-amber); }
.product-action-summary.is-watchlist .eyebrow, .product-action-summary.is-watchlist > span { color: var(--dq-amber); }
.product-action-summary.is-positive { border-left-color: var(--dq-green); }
.product-action-summary.is-positive .eyebrow, .product-action-summary.is-positive > span { color: var(--dq-green); }

/* Reports: a restrained operational library, never a dashboard imitation. */
.reports-page-content { display: grid; gap: 16px; }
.reports-toolbar, .reports-library { border: 1px solid var(--dq-border) !important; border-radius: 8px; background: var(--dq-surface) !important; }
.reports-toolbar { display: flex; align-items: end; justify-content: space-between; gap: 24px; padding: 24px; }
.reports-toolbar h2 { margin: 4px 0 7px; font-size: clamp(23px, 2.1vw, 30px); letter-spacing: -.035em; }
.reports-toolbar p:not(.eyebrow) { max-width: 650px; margin: 0; color: var(--dq-text-secondary); }
.reports-library { padding: 22px; }
.reports-library .panel-heading { margin-bottom: 16px; }
.reports-table td { vertical-align: top; padding-top: 14px !important; padding-bottom: 14px !important; }
.reports-table td > strong, .reports-table td > small { display: block; }
.reports-table td > small { margin-top: 4px; color: var(--dq-muted); font-size: 11px; }
.report-row-actions { display: flex; flex-wrap: wrap; justify-content: end; gap: 9px; }
.report-status { display: inline-flex; padding: 3px 7px; border: 1px solid var(--dq-border-strong); border-radius: 4px; font: 600 10px "IBM Plex Mono", monospace; text-transform: uppercase; letter-spacing: .06em; }
.report-status-ready { color: var(--dq-green); border-color: rgba(80, 210, 143, .42); }
.report-status-generating { color: var(--dq-blue); border-color: rgba(107, 162, 255, .42); }
.report-status-failed { color: var(--dq-red); border-color: rgba(255, 93, 126, .42); }
.text-button-danger { color: var(--dq-red) !important; }
.reports-empty, .reports-loading { min-height: 170px; display: grid; place-content: center; justify-items: center; text-align: center; gap: 11px; color: var(--dq-text-secondary); border: 1px dashed var(--dq-border); border-radius: 6px; }
.reports-empty > span { width: 38px; color: var(--dq-purple-bright); }
.reports-empty .ui-icon { width: 34px; height: 34px; }
.reports-empty h3 { margin: 0; color: var(--dq-text); font-size: 18px; }
.reports-empty p { max-width: 430px; margin: 4px 0 0; }
.reports-dialog { width: min(680px, calc(100vw - 32px)); padding: 0; color: var(--dq-text); background: transparent; border: 0; }
.reports-dialog::backdrop { background: rgba(0,0,0,.68); backdrop-filter: blur(4px); }
.reports-dialog-card { padding: 26px; border: 1px solid var(--dq-border-strong); border-radius: 10px; background: var(--dq-surface-raised); box-shadow: 0 24px 70px rgba(0,0,0,.42); }
.reports-dialog-header { display: flex; justify-content: space-between; align-items: start; gap: 18px; }
.reports-dialog-header h2 { margin: 4px 0 7px; font-size: 26px; letter-spacing: -.035em; }
.reports-dialog-header p:not(.eyebrow) { margin: 0; color: var(--dq-text-secondary); }
.reports-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 22px; }
.reports-dialog label { display: grid; gap: 7px; color: var(--dq-text-secondary); font: 600 10px "IBM Plex Mono", monospace; letter-spacing: .07em; text-transform: uppercase; }
.reports-dialog input, .reports-dialog select, .reports-dialog textarea { width: 100%; box-sizing: border-box; font: 400 14px "Geist", system-ui, sans-serif; letter-spacing: normal; text-transform: none; }
.reports-period-preview { min-height: 19px; margin: 12px 0 0; color: var(--dq-purple-bright); font: 500 11px "IBM Plex Mono", monospace; }
.reports-store-picker { margin: 16px 0 0; padding: 13px; border: 1px solid var(--dq-border); border-radius: 6px; }
.reports-store-picker legend { padding: 0 5px; color: var(--dq-muted); font: 600 10px "IBM Plex Mono", monospace; letter-spacing: .07em; text-transform: uppercase; }
.reports-store-picker > div { display: flex; flex-wrap: wrap; gap: 8px; }
.report-store-option { display: inline-flex !important; grid-auto-flow: column; align-items: center; gap: 8px; padding: 7px 9px; border: 1px solid var(--dq-border); border-radius: 4px; color: var(--dq-text) !important; font: 500 12px "Geist", system-ui, sans-serif !important; letter-spacing: normal !important; text-transform: none !important; }
.report-store-option input { width: 14px !important; height: 14px; }
.reports-note-field { margin-top: 16px; }
.reports-note-field span { color: var(--dq-muted); font-weight: 400; }
.reports-note-field textarea { resize: vertical; min-height: 90px; }
.reports-content-preview { margin-top: 16px; padding: 15px 16px; border: 1px solid var(--dq-border); border-left: 3px solid var(--dq-purple-bright); border-radius: 6px; background: rgba(124, 58, 237, .055); }
.reports-content-preview .eyebrow { margin: 0 0 5px; }
.reports-content-preview strong { display: block; font-size: 14px; }
.reports-content-preview ul { display: grid; gap: 5px; margin: 10px 0 0; padding-left: 18px; color: var(--dq-text-secondary); font-size: 12px; line-height: 1.45; }
.reports-generation-status { min-height: 19px; margin: 12px 0 0; color: var(--dq-blue); font-size: 13px; }
.reports-dialog-actions { display: flex; justify-content: end; gap: 10px; margin-top: 20px; }

/* Admin becomes an implementation console, not a rainbow dashboard. */
body:has(.admin-shell), body:has(.platform-admin-shell) { background: var(--dq-bg) !important; color: var(--dq-text) !important; }
.admin-shell, .platform-admin-shell { background: var(--dq-bg) !important; }
.admin-panel, .admin-card, .company-card, .source-card, .import-card, .mapping-card { background: var(--dq-surface) !important; border: 1px solid var(--dq-border) !important; border-radius: 8px !important; box-shadow: none !important; }
.admin-panel h2, .admin-card h2 { letter-spacing: -.025em !important; }
.status-ready,
.source-status.is-ready,
.source-status-item.is-ready dd,
.data-readiness__track.is-ready strong,
.target-status-grid .is-ready strong { color: var(--dq-green) !important; }
.status-missing, .is-missing { color: var(--dq-red) !important; }

@media (max-width: 900px) {
  .workspace-header { padding: 22px !important; }
  .toolbar, .workspace-toolbar, .live-brief-actions { align-items: stretch !important; }
  .decision-flow, .live-decision-flow { grid-template-columns: 1fr !important; }
  .decision-flow > *, .live-decision-flow > * { border-right: 0 !important; border-bottom: 1px solid var(--dq-border) !important; }
  .decision-flow > *:last-child, .live-decision-flow > *:last-child { border-bottom: 0 !important; }
  .kpi-grid, .analytics-kpi-grid, .brief-kpi-grid { overflow-x: auto; }
  .kpi-card, .metric-card, .analytics-kpi-card { min-width: 176px; }
  .reports-toolbar { align-items: start; flex-direction: column; }
  .reports-form-grid { grid-template-columns: 1fr; }
  .reports-table { min-width: 830px; }
}

@media (max-width: 760px) {
  .sidebar-nav .sidebar-section-label { flex-basis: 100%; margin: 8px 2px 0; }
  .sidebar-nav .sidebar-coming-soon { display: contents; }
  .sidebar-nav .sidebar-coming-soon-note { flex: 0 0 220px; margin: 0; padding: 6px 2px; }
  .sidebar .nav-item, .sidebar .nav-item.is-muted { display: flex !important; min-height: 44px; }
  .feedback-choice { min-height: 40px; padding-inline: 11px; }
  .product-action-summary { align-items: flex-start; flex-direction: column; gap: 9px; padding: 17px; }
  .product-action-summary > span { text-align: left; }
  .full-overview-table .analytics-table-wrap { position: relative; }
  .full-overview-table .analytics-table-wrap th:first-child, .full-overview-table .analytics-table-wrap td:first-child { position: sticky; left: 0; z-index: 2; background: var(--dq-surface-raised) !important; box-shadow: 8px 0 12px rgba(0,0,0,.16); }
  .full-overview-table .analytics-table-wrap th:first-child { z-index: 3; }
}

/* Scoped workspace polish: keep the dark canvas, layout and semantic icons. */
.workspace-shell :is(.kpi-grid, .analytics-kpi-grid, .brief-kpi-grid) { overflow: visible; }
.workspace-shell :is(.analytics-kpi, .kpi-card, .metric-card, .analytics-kpi-card) {
  --kpi-accent: var(--dq-blue);
  position: relative;
  isolation: isolate;
  transition: transform 160ms ease, background-color 160ms ease, box-shadow 160ms ease;
}
.workspace-shell :is(.analytics-kpi, .kpi-card, .metric-card, .analytics-kpi-card):is(.is-positive, .positive, .tone-success) { --kpi-accent: var(--dq-green); }
.workspace-shell :is(.analytics-kpi, .kpi-card, .metric-card, .analytics-kpi-card):is(.is-negative, .negative, .tone-priority) { --kpi-accent: var(--dq-red); }
.workspace-shell :is(.analytics-kpi, .kpi-card, .metric-card, .analytics-kpi-card):is(.is-watchlist, .tone-watchlist) { --kpi-accent: var(--dq-amber); }
.workspace-shell :is(.analytics-kpi, .kpi-card, .metric-card, .analytics-kpi-card)::before {
  content: "";
  position: absolute;
  z-index: 2;
  inset: 0 0 auto;
  height: 2px !important;
  background: var(--kpi-accent) !important;
  box-shadow: 0 1px 5px color-mix(in srgb, var(--kpi-accent) 40%, transparent) !important;
  opacity: 1 !important;
  pointer-events: none;
}
.workspace-shell :is(.analytics-kpi, .kpi-card, .metric-card, .analytics-kpi-card):is(:hover, :focus-visible, :focus-within) {
  z-index: 3;
  background: var(--dq-surface-hover) !important;
  box-shadow: inset 0 0 0 1px rgba(174, 189, 212, .32), 0 3px 8px rgba(0, 0, 0, .2) !important;
}
@media (hover: hover) and (pointer: fine) {
  .workspace-shell :is(.analytics-kpi, .kpi-card, .metric-card, .analytics-kpi-card):hover { transform: translateY(-2px); }
}
.workspace-shell :is(.analytics-kpi, .kpi-card):focus-visible { outline: 2px solid var(--dq-purple-bright) !important; outline-offset: 3px; }
/* Receipt and entry counts are operating context, not tiny badge metadata. */
.workspace-shell .analytics-kpi .analytics-kpi-value { gap: 10px; }
.workspace-shell .analytics-kpi .analytics-kpi-context {
  max-width: 100%;
  padding: 6px 10px;
  border: 1px solid rgba(174, 189, 212, .35);
  border-radius: 999px !important;
  background: #1b2330;
  color: #edf2fa !important;
  font-size: .875rem !important;
  font-weight: 600 !important;
  line-height: 1.45;
  letter-spacing: normal;
  text-transform: none;
  white-space: normal;
  overflow-wrap: anywhere;
}
#dailyView .decision-card { border-top-color: rgba(164, 181, 205, .25) !important; border-right-color: rgba(164, 181, 205, .25) !important; border-bottom-color: rgba(164, 181, 205, .25) !important; background: #101318 !important; }
#dailyView .decision-flow { border: 1px solid rgba(164, 181, 205, .23) !important; }
#dailyView .decision-flow > * { background: #14181f !important; border-color: rgba(164, 181, 205, .23) !important; }
#dailyView .priority-stack-card { border-top-color: rgba(164, 181, 205, .22); border-right-color: rgba(164, 181, 205, .22); border-bottom-color: rgba(164, 181, 205, .22); }

/* Each target is a separate short dashed segment, never an average or filled bar. */
#analyticsView .bar-column .bar-target-marker {
  position: absolute;
  z-index: 3;
  display: block;
  left: 12%;
  width: 76%;
  height: 0;
  min-height: 0;
  border: 0;
  border-top: 2px dashed var(--dq-gold);
  border-radius: 0;
  background: none;
  box-shadow: none;
  filter: none;
  transform: translateY(1px);
  pointer-events: none;
}
#analyticsView .bar-column .bar-actual { min-height: 0; }
#analyticsView .bar-column .bar-plot { transform: none; max-width: none; }

/* Products: connected readout, compact alert, selectable table, measured detail. */
#productsContent .products-kpi-strip { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 14px; }
#productsContent .products-kpi-strip strong { font-size: clamp(20px, 1.6vw, 28px); }
#productsContent .products-kpi-strip .analytics-kpi:last-child strong { font-size: clamp(17px, 1.3vw, 22px); }
.product-availability-alert { display: flex; align-items: center; gap: 13px; margin-bottom: 14px; padding: 13px 16px; border: 1px solid var(--dq-border-strong); border-left: 3px solid var(--dq-blue); border-radius: 5px; background: var(--dq-surface-raised); }
.product-availability-alert > .ui-icon { flex: 0 0 20px; }
.product-availability-alert strong { font-size: 14px; }
.product-availability-alert p { margin: 0; padding-left: 14px; border-left: 1px solid var(--dq-border-strong); color: var(--dq-text-secondary); font-size: 13px; line-height: 1.5; }
.product-availability-alert.tone-priority { border-left-color: var(--dq-red); }
.product-availability-alert.tone-watchlist { border-left-color: var(--dq-amber); }
.product-availability-alert.tone-positive { border-left-color: var(--dq-green); }
.product-stock-status { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; font-size: 12px; }
.product-stock-status i { width: 7px; height: 7px; flex-shrink: 0; border-radius: 50%; background: currentColor; }
.product-stock-status.tone-priority, .product-availability-alert.tone-priority > .ui-icon { color: var(--dq-red); }
.product-stock-status.tone-watchlist, .product-availability-alert.tone-watchlist > .ui-icon { color: var(--dq-amber); }
.product-stock-status.tone-positive, .product-availability-alert.tone-positive > .ui-icon { color: var(--dq-green); }
.product-stock-status.tone-neutral, .product-availability-alert.tone-neutral > .ui-icon { color: var(--dq-blue); }
#productsContent .products-overview-table .analytics-table-wrap { margin-top: 12px; }
#productsContent .products-overview-table table { min-width: 1050px; }
#productsContent .products-overview-table th { background: var(--dq-surface-raised) !important; }
#productsContent .products-overview-table :is(td, th) { border-right: 1px solid var(--dq-border); }
#productsContent .products-overview-table :is(td, th):last-child { border-right: 0; }
#productsContent .products-overview-table .numeric { text-align: right; font-variant-numeric: tabular-nums; }
#productsContent .products-overview-table tr.is-product-selected td { background: rgba(139, 92, 246, .1) !important; }
#productsContent .products-overview-table tr.is-product-selected td:first-child { box-shadow: inset 3px 0 var(--dq-purple); }
.product-style-button { border: 0; background: transparent; color: var(--dq-text); font: inherit; font-weight: 600; padding: 6px 2px; text-align: left; cursor: pointer; }
[data-product-column-sort] { display: inline-flex; align-items: center; gap: 9px; padding: 5px 0; border: 0; background: transparent; color: inherit; font: inherit; text-transform: inherit; text-align: inherit; cursor: pointer; }
[data-product-column-sort] span { color: var(--dq-purple-bright); }
.product-detail-panel { margin-top: 16px; }
.product-detail-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--dq-border-strong); }
.product-detail-grid article { padding: 18px; background: #14181f; }
.product-detail-grid article + article { border-left: 1px solid var(--dq-border-strong); }
.product-detail-label { display: flex; align-items: center; gap: 8px; color: var(--dq-purple-bright); font: 500 12px "IBM Plex Mono", monospace; text-transform: uppercase; }
.product-detail-grid article:nth-child(2) .product-detail-label { color: var(--dq-blue); }
.product-detail-grid article:nth-child(3) .product-detail-label { color: var(--dq-teal); }
.product-detail-grid p { color: var(--dq-text-secondary); font-size: 14px; line-height: 1.6; }
.product-detail-grid small { color: var(--dq-muted); font-size: 12px; line-height: 1.5; }
.product-attributes { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 14px; color: var(--dq-text-secondary); font-size: 12px; }
@media (max-width: 900px) {
  #productsContent .products-kpi-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .product-availability-alert { flex-wrap: wrap; gap: 9px; }
  .product-availability-alert p { flex-basis: 100%; padding: 0; border: 0; }
  .product-detail-grid { grid-template-columns: 1fr; }
  .product-detail-grid article + article { border-left: 0; border-top: 1px solid var(--dq-border-strong); }
}
@media (max-width: 480px) {
  #productsContent .products-kpi-strip { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .workspace-shell :is(.analytics-kpi, .kpi-card, .metric-card, .analytics-kpi-card):hover { transform: none !important; }
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
