/* 2026 Swiss Luminous Fintech Workspace (Linear × Ramp × Pennylane × Stripe × Alpiva v6).
   Pure-white architectural inset frame, editorial calm, zero duplicated KPI banners, crisp 1px hairlines. */

@media (min-width: 1024px) {
  :root {
    --workspace-tint: #ECFDF5;
    --workspace-rule: #ECEEF2;
    --workspace-panel: #F8F9FA;
    --workspace-panel-hover: #F3F4F6;
  }

  /* ---- 1. Editorial Dashboard Welcome Header (Zero Duplication) ----------- */
  .dash {
    gap: 18px;
  }

  .dash-scope-bar {
    display: flex;
    justify-content: flex-end;
    margin-bottom: -8px;
  }

  .dash-hero {
    display: block;
    padding: 4px 0 16px;
    border-radius: 0;
    background: transparent;
    border-bottom: 1px solid #ECEEF2;
    color: var(--text-primary);
    box-shadow: none;
  }

  .app-shell:not(.is-alpiva) .dash-hero {
    background: transparent;
    box-shadow: none;
  }

  .dash-hero-top {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
  }

  .dash-hero-greet {
    display: grid;
    gap: 3px;
  }

  .dash-hero-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    width: fit-content;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.01em;
    margin-bottom: 2px;
  }

  .dash-hero-dot {
    display: none;
  }

  .app-shell:not(.is-alpiva) .dash-hero-dot {
    display: none;
  }

  .dash-hero-greet h1 {
    margin: 0;
    color: var(--text-primary);
    font-size: 25px;
    line-height: 1.16;
    font-weight: 600;
    letter-spacing: -0.03em;
  }

  .dash-hero-greet p {
    margin: 0;
    color: var(--text-muted);
    font-size: 13px;
  }

  .dash-hero-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
  }

  .dash-hero-cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 34px;
    padding: 0 13px;
    border-radius: 8px;
    border: 1px solid #E2E5EC;
    background: #FFFFFF;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
    transition: background-color 140ms ease, border-color 140ms ease, box-shadow 140ms ease;
  }

  .dash-hero-cta .ui-icon {
    color: var(--text-muted);
  }

  .dash-hero-cta:hover {
    background: #F9FAFB;
    border-color: #CBD5E1;
  }

  .dash-hero-cta.is-primary {
    background: #0C332B;
    border-color: #0C332B;
    color: #FFFFFF;
    font-weight: 600;
    box-shadow: 0 1px 2px rgba(7, 13, 12, .16);
  }

  .dash-hero-cta.is-primary .ui-icon {
    color: rgba(255, 255, 255, .86);
  }

  .dash-hero-cta.is-primary:hover {
    background: #082620;
    border-color: #082620;
  }

  .app-shell:not(.is-alpiva) .dash-hero-cta.is-primary {
    background: #0F1D36;
    border-color: #0F1D36;
    color: #FFFFFF;
  }

  .app-shell:not(.is-alpiva) .dash-hero-cta.is-primary:hover {
    background: #172B4D;
    border-color: #172B4D;
  }

  .app-shell:not(.is-alpiva) .dash-hero-cta.is-primary .ui-icon {
    color: #E2E8F0;
  }

  /* ---- 2. Unified Architectural Metric Strip (Joined Hairline Grid) ------ */
  .dash-kpis {
    gap: 0;
    border: 1px solid #E5E8EE;
    border-radius: 12px;
    background: #FFFFFF;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .025);
    overflow: hidden;
  }

  .dash-kpi,
  .dash-kpi:nth-child(n),
  .dash-kpi:first-child {
    padding: 18px 22px;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    gap: 8px;
    transition: background-color 140ms ease;
  }

  .dash-kpi + .dash-kpi {
    border-left: 1px solid #EEF1F4;
  }

  .dash-kpi:hover {
    border-color: #EEF1F4;
    background: #FAFBFD;
    box-shadow: none;
    transform: none;
  }

  .dash-kpi-label {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 12.5px;
    font-weight: 500;
    color: #64748B;
  }

  .dash-kpi-label > .ui-icon {
    width: 15px;
    height: 15px;
    padding: 0;
    border-radius: 0;
    background: transparent !important;
    color: #64748B !important;
    flex: none;
  }

  .dash-kpi-value {
    font-size: 25px;
    line-height: 1.15;
    font-weight: 600;
    letter-spacing: -0.028em;
    color: #0F172A;
  }

  .dash-kpi[data-kpi="profitCents"] .dash-kpi-value:not(.is-negative) {
    color: #0F172A;
  }

  .dash-kpi-value .unit {
    color: #64748B;
    font-size: 12.5px;
    font-weight: 500;
    margin-right: 4px;
  }

  /* ---- 3. Section Heads & Elevated Bento Cards ---------------------------- */
  .dash-section-head,
  .section-head {
    border-bottom-color: var(--border-hairline);
  }

  .dash-section-head {
    position: relative;
    border-top: 0;
    padding: 0 0 12px;
    margin-bottom: 12px;
    border-bottom: 1px solid var(--border-hairline);
  }

  .dash-section-head h2 {
    font-size: 15.5px;
    font-weight: 600;
    letter-spacing: -0.018em;
    color: var(--text-primary);
  }

  /* Ramp-style single-card Action Queue */
  .dash-tasks,
  .dash-onboarding {
    padding: 18px 22px 20px;
    border: 1px solid rgba(11, 18, 17, .06);
    border-radius: var(--radius-lg);
    background: #FFFFFF;
    box-shadow: var(--shadow-1);
  }

  .dash-task-grid {
    gap: 8px;
    padding: 0;
    margin-top: 0;
    border: 0;
    background: transparent;
  }

  .dash-task,
  .dash-task:nth-child(n) {
    padding: 11px 14px;
    border: 1px solid #E6E9EF;
    border-radius: 10px;
    background: #FFFFFF;
    box-shadow: none;
    transition: border-color var(--motion), background-color var(--motion);
  }

  .dash-task:hover {
    border-color: #CBD5E1;
    background: #FAFBFD;
    box-shadow: none;
  }

  .dash-task.is-warn,
  .dash-task.is-urgent {
    background: #FFFFFF;
    border-color: #E6E9EF;
  }

  .dash-task-count {
    justify-self: start;
    min-width: 28px;
    min-height: 28px;
    padding-inline: 6px;
    border-radius: 7px;
    background: #F1F5F9;
    color: #334155;
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
  }

  .dash-task.is-urgent .dash-task-count { background: #FEF2F2; color: #B91C1C; border: 1px solid #FECACA; }
  .dash-task.is-warn .dash-task-count { background: #FFFBEB; color: #B45309; border: 1px solid #FDE68A; }
  .dash-task-count.is-done { background: var(--bg-selected); color: var(--accent-text); }

  /* Progress-bar Onboarding Card */
  .dash-progress-track {
    display: inline-block;
    width: 120px;
    height: 7px;
    border-radius: 999px;
    background: #E8ECEF;
    overflow: hidden;
  }

  .dash-progress-fill {
    display: block;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #007A66 0%, #1EF0A3 100%);
  }

  .dash-steps {
    gap: 10px;
    margin-top: 0;
    border: 0;
    background: transparent;
  }

  .dash-step,
  .dash-step + .dash-step {
    padding: 13px 15px 34px;
    border: 1px solid transparent;
    border-radius: 12px;
    background: #F7F8FA;
    box-shadow: none;
    transition: border-color var(--motion), background-color var(--motion), box-shadow var(--motion);
  }

  .dash-step.is-done {
    background: var(--bg-selected);
    border-color: var(--petrol-200);
  }

  .dash-step:hover {
    border-color: rgba(0, 122, 102, .24);
    background: #FFFFFF;
    box-shadow: var(--shadow-1);
  }

  .dash-step-mark {
    width: 26px;
    height: 26px;
    border-radius: 8px;
  }

  .dash-step-action {
    right: 14px;
    bottom: 11px;
  }

  .dash-step-guide {
    margin-left: 36px;
    margin-top: 6px;
  }

  /* Chart, Due, Recent, Bank, Period floating Bento cards */
  .dash > :is(.dash-chart, .dash-due, .dash-recent, .dash-bank, .dash-period) {
    min-width: 0;
    padding: 20px 22px;
    border: 1px solid rgba(11, 18, 17, .06);
    border-radius: var(--radius-lg);
    background: #FFFFFF;
    box-shadow: var(--shadow-1);
  }

  .chart-gridline {
    stroke: #F1F5F9;
    stroke-dasharray: none;
  }

  .chart-baseline {
    stroke: #CBD5E1;
  }

  .chart-bar.is-income { fill: var(--chart-income); }
  .chart-bar.is-expense { fill: var(--chart-expense); }
  .dash-legend > span::before { border-radius: 999px; }

  /* ---- 4. Modern Page Headers --------------------------------------------- */
  .page-head {
    margin-bottom: 18px;
  }

  .page-head h1 {
    font-size: 26px;
    line-height: 32px;
    font-weight: 600;
    letter-spacing: -0.028em;
    color: var(--text-primary);
  }

  .head-info > summary {
    width: 28px;
    height: 28px;
    border-radius: 999px;
    color: var(--text-muted);
  }

  /* ---- 5. Clean Underline Tabs & Pill Switchers --------------------------- */
  .status-tabs,
  .report-nav,
  .contact-tabs {
    gap: 4px;
    padding: 0;
    border: 0;
    border-bottom: 1px solid var(--border-hairline);
    border-radius: 0;
    background: transparent;
  }

  .status-tabs a,
  .contact-tabs a,
  .report-nav button {
    border-radius: 8px 8px 0 0;
    padding: 7px 10px;
    color: var(--text-muted);
    font-weight: 500;
    transition: color var(--motion), background-color var(--motion), box-shadow var(--motion);
  }

  .status-tabs a:hover,
  .contact-tabs a:hover,
  .report-nav button:hover {
    background: rgba(11, 18, 17, .03);
    color: var(--text-primary);
    box-shadow: inset 0 -2px 0 rgba(11, 18, 17, .14);
  }

  .status-tabs a.active,
  .contact-tabs a.active,
  .report-nav button.active {
    background: transparent;
    color: var(--accent-text);
    font-weight: 600;
    box-shadow: inset 0 -2px 0 var(--accent);
  }

  /* Booking top switcher: sleek floating segmented pill */
  .status-tabs.booking-tabs {
    display: inline-flex;
    width: fit-content;
    max-width: 100%;
    gap: 3px;
    padding: 4px;
    margin-bottom: 14px;
    border: 1px solid rgba(11, 18, 17, .06);
    border-radius: 12px;
    background: #EAEEF1;
  }

  .status-tabs.booking-tabs a {
    min-height: 30px;
    padding: 4px 14px;
    border-radius: 9px;
    font-size: 13px;
    color: var(--text-secondary);
    box-shadow: none;
  }

  .status-tabs.booking-tabs a:hover {
    background: rgba(255, 255, 255, .6);
    color: var(--text-primary);
    box-shadow: none;
  }

  .status-tabs.booking-tabs a.active {
    background: #FFFFFF;
    color: var(--text-primary);
    font-weight: 600;
    box-shadow: 0 1px 3px rgba(10, 18, 17, .10);
  }

  .dash-scope {
    padding-inline: 0;
    border-width: 0 0 1px;
    border-radius: 0;
    background: transparent;
  }

  /* ---- 6. Stripe-Grade Floating Tables & Borderless Toolbars -------------- */
  .list-sheet .data-grid-toolbar {
    margin-bottom: 12px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  .contact-range {
    border: 1px solid rgba(11, 18, 17, .06);
    border-radius: var(--radius-lg);
    background: #FFFFFF;
    box-shadow: var(--shadow-1);
  }

  .list-sheet .data-grid > .table-wrap {
    border: 1px solid rgba(11, 18, 17, .065);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    background: #FFFFFF;
    box-shadow: var(--shadow-1);
  }

  .list-sheet .data-grid-footer {
    border: 1px solid rgba(11, 18, 17, .065);
    border-top: 1px solid #F0F3F5;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    background: #FAFBFD;
    padding: 7px 14px;
  }

  .data-grid-toolbar .grid-search.input {
    border: 1px solid rgba(11, 18, 17, .09);
    border-radius: 999px;
    background-color: #FFFFFF;
    height: 34px;
    padding-left: 32px;
    box-shadow: var(--shadow-1);
  }

  .data-grid-toolbar .grid-search.input:focus {
    border-color: var(--accent);
    background-color: #FFFFFF;
  }

  .filter-chip {
    border-style: solid;
    border-color: rgba(11, 18, 17, .09);
    border-radius: 999px;
    height: 32px;
    padding: 0 12px;
    background: #FFFFFF;
    color: var(--text-secondary);
    box-shadow: var(--shadow-1);
  }

  .filter-chip:hover,
  .grid-chip[open] > .filter-chip {
    border-color: var(--petrol-7);
    background: var(--petrol-2);
    color: var(--accent-text);
  }

  .filter-chip-group.is-active .filter-chip {
    border-radius: 999px 0 0 999px;
  }
  .filter-chip-clear {
    height: 32px;
    border-radius: 0 999px 999px 0;
  }

  /* Uppercase crisp table headers & buttery hover rows */
  .data-table th {
    background: #F9FAFB;
    color: #64716E;
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: 0.035em;
    text-transform: uppercase;
    border-bottom: 1px solid #ECEFF2;
  }

  .data-table td {
    border-bottom-color: #F1F4F6;
  }

  .data-table tbody tr:hover td {
    background: #F8FAFC;
  }

  /* Modern rounded status pills */
  .status-badge {
    padding: 3px 9px;
    border-radius: var(--radius-full);
    font-size: 11.5px;
    font-weight: 600;
  }

  /* Segmented button groups */
  .segmented {
    display: inline-flex;
    padding: 3px;
    gap: 2px;
    border-radius: 11px;
    background: #EAEEF1;
    border: 1px solid rgba(11, 18, 17, .05);
  }

  .segmented > .btn {
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--text-secondary);
    box-shadow: none;
    min-height: 28px;
    padding: 3px 12px;
  }

  .segmented > .btn:hover {
    background: rgba(255, 255, 255, .6);
    color: var(--text-primary);
  }

  .segmented > .btn[aria-pressed="true"],
  .segmented > .btn.active,
  .segmented > .btn.is-active {
    background: #FFFFFF;
    color: var(--text-primary);
    border-color: transparent;
    font-weight: 600;
    box-shadow: 0 1px 3px rgba(10, 18, 17, .10);
  }

  /* Settings left rail + proportioned Swiss editorial forms */
  .settings-nav-item {
    border-radius: 8px;
    padding: 7px 12px;
    font-weight: 500;
    color: var(--text-secondary);
    transition: background-color var(--motion), color var(--motion);
  }

  .settings-nav-item:hover {
    background: #F3F4F6;
    color: var(--text-primary);
  }

  .settings-nav-item[aria-current="true"] {
    background: #F3F4F6;
    color: var(--text-primary);
    font-weight: 600;
    box-shadow: inset 0 0 0 1px #E5E7EB;
  }

  .settings-panel > .card,
  .settings-main > .card {
    max-width: 780px;
  }

  /* Reports: whisper-thin table rules (no 2008 heavy borders) & compact filter strip */
  .report-sheet {
    border: 1px solid #EAECF0;
    border-radius: 12px;
    background: #FFFFFF;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .03);
    padding: 18px 22px;
  }

  .report-sheet .data-table th,
  .report-sheet .trial-table th,
  .report-sheet .statement-table th {
    border-bottom: 1px solid #E5E7EB !important;
    background: #F9FAFB;
    color: #6B7280;
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
  }

  .report-sheet .data-table td {
    padding-top: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #F3F4F6;
  }

  .report-sheet .data-table tbody tr:hover td {
    background: #F9FAFB;
  }

  .report-tabs-row {
    border-bottom-color: #EAECF0;
  }

  .worklist-items {
    border: 1px solid #EAECF0;
    border-radius: 12px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .03);
  }

  .worklist-callout {
    border-radius: 12px;
    border: 1px solid #E5E7EB;
    background: #F9FAFB;
    box-shadow: none;
  }

  /* Ablage 3-pane modern cards */
  .ab-root .ab-tree,
  .ab-root .ab-list,
  .ab-root .ab-preview {
    border: 1px solid #EAECF0;
    border-radius: 12px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .03);
  }
}

@media (forced-colors: active) and (min-width: 1024px) {
  .dash-hero,
  .dash-task-grid,
  .dash-task,
  .dash-kpis,
  .dash-kpi,
  .status-tabs,
  .report-nav,
  .contact-tabs,
  .contact-range {
    border-color: CanvasText;
  }
}

@media print {
  .dash-hero,
  .dash-tasks,
  .dash-onboarding,
  .dash-kpi,
  .detail-grid > .card.card-pad,
  .contact-statements > .contact-balance-card {
    box-shadow: none;
  }
}
