/* =====================================================================================
   Swiss CRM design system — premium control-room aesthetic
   Navy gradient heroes · frosted-glass panels · coloured icon chips · 950-weight tabular numerals
   ===================================================================================== */

:root {
    --sw-navy-950: #050E1F;
    --sw-navy-900: #0B1F3A;
    --sw-navy-850: #0E2645;
    --sw-navy-800: #102A4C;
    --sw-navy-700: #15315C;
    --sw-navy-600: #1E3A8A;
    --sw-accent: #E11D48;
    --sw-accent-600: #BE123C;

    --sw-bg: #EEF2F7;
    --sw-bg-2: #E5EAF2;
    --sw-surface: rgba(255, 255, 255, .82);
    --sw-surface-solid: #FFFFFF;
    --sw-border: rgba(15, 23, 42, .08);
    --sw-border-strong: rgba(15, 23, 42, .14);
    --sw-text: #0F172A;
    --sw-text-2: #334155;
    --sw-muted: #64748B;
    --sw-faint: #94A3B8;

    --t-primary: #2563EB;
    --t-success: #16A34A;
    --t-warning: #D97706;
    --t-danger: #DC2626;
    --t-info: #0891B2;
    --t-neutral: #64748B;
    --t-purple: #7C3AED;
    --t-pink: #DB2777;
    --t-teal: #0D9488;
    --t-indigo: #4F46E5;
    --t-slate: #475569;
    --t-orange: #EA580C;

    --sw-radius: 16px;
    --sw-radius-sm: 10px;
    --sw-radius-xs: 7px;
    --sw-shadow: 0 1px 2px rgba(11, 31, 58, .06), 0 12px 32px -14px rgba(11, 31, 58, .22);
    --sw-shadow-lg: 0 24px 60px -20px rgba(11, 31, 58, .35);
    --sw-sidebar-w: 268px;
    --sw-topbar-h: 64px;
    --sw-font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    --sw-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Consolas, monospace;
    --bs-body-font-family: var(--sw-font);
    --bs-body-color: var(--sw-text);
    --bs-border-color: var(--sw-border-strong);
    --bs-primary: #2563EB;
    --bs-primary-rgb: 37, 99, 235;
    --bs-link-color: #1D4ED8;
    --bs-link-hover-color: #1E40AF;
}

html, body { height: 100%; }
body {
    font-family: var(--sw-font);
    background: var(--sw-bg);
    color: var(--sw-text);
    font-size: 14px;
    -webkit-font-smoothing: antialiased;
    font-feature-settings: "cv11", "ss01";
}
a { text-decoration: none; }
code, .font-mono, .sw-mono { font-family: var(--sw-mono); }
::selection { background: rgba(37, 99, 235, .18); }

/* Tabular numerals */
.sw-num, .text-num { font-variant-numeric: tabular-nums; }
.sw-num { font-weight: 950; letter-spacing: -.02em; }
.sw-num-lg { font-size: 1.9rem; line-height: 1.1; }
.sw-num-xl { font-size: 2.6rem; line-height: 1; }
.fw-950 { font-weight: 950 !important; }
.fw-800 { font-weight: 800 !important; }
.text-muted-2 { color: var(--sw-muted) !important; }
.text-faint { color: var(--sw-faint) !important; }
.small-caps { font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 700; color: var(--sw-muted); }

/* ------------------------------------------------------------------ App shell */
.sw-app { display: flex; min-height: 100vh; }

.sw-sidebar {
    position: fixed; inset: 0 auto 0 0; width: var(--sw-sidebar-w); z-index: 1040;
    background:
        radial-gradient(120% 60% at 0% 0%, rgba(37, 99, 235, .22) 0%, transparent 60%),
        radial-gradient(90% 50% at 100% 100%, rgba(225, 29, 72, .12) 0%, transparent 60%),
        linear-gradient(180deg, var(--sw-navy-900) 0%, var(--sw-navy-950) 100%);
    color: #CBD5E1; display: flex; flex-direction: column;
    border-right: 1px solid rgba(255, 255, 255, .06);
    transition: transform .25s ease, width .25s ease;
}
.sw-brand { display: flex; align-items: center; gap: 12px; padding: 18px 20px; color: #fff; }
.sw-brand-mark {
    width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; font-weight: 950; font-size: 17px;
    background: linear-gradient(135deg, #2563EB, #1E3A8A 60%, #E11D48); box-shadow: 0 8px 20px -6px rgba(37, 99, 235, .7);
}
.sw-brand-name { font-weight: 800; letter-spacing: -.01em; font-size: 15px; line-height: 1.1; }
.sw-brand-sub { font-size: 11px; color: #7C8DB0; letter-spacing: .08em; text-transform: uppercase; }
.sw-nav { flex: 1; overflow-y: auto; padding: 6px 12px 24px; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.12) transparent; }
.sw-nav-group { margin-top: 6px; }
.sw-nav-group-head {
    display: flex; align-items: center; gap: 10px; width: 100%; border: 0; background: transparent; color: #8FA3C7;
    font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; padding: 10px 10px 6px; cursor: pointer;
}
.sw-nav-group-head .bi-chevron-down { margin-left: auto; transition: transform .2s; font-size: 10px; }
.sw-nav-group.collapsed .bi-chevron-down { transform: rotate(-90deg); }
.sw-nav-group.collapsed .sw-nav-items { display: none; }
.sw-nav-item {
    position: relative; display: flex; align-items: center; gap: 11px; padding: 8px 10px; margin: 1px 0; border-radius: 10px;
    color: #C3CFE4; font-weight: 500; font-size: 13.5px; transition: background .15s, color .15s;
}
.sw-nav-item i { font-size: 16px; width: 20px; text-align: center; color: #7F93B8; transition: color .15s; }
.sw-nav-item:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.sw-nav-item:hover i { color: #fff; }
.sw-nav-item.active { background: linear-gradient(90deg, rgba(37, 99, 235, .32), rgba(37, 99, 235, .08)); color: #fff; font-weight: 600; }
.sw-nav-item.active::before { content: ""; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: #60A5FA; }
.sw-nav-item.active i { color: #93C5FD; }
.sw-nav-badge { margin-left: auto; background: var(--sw-accent); color: #fff; font-size: 10.5px; font-weight: 800; border-radius: 999px; padding: 1px 7px; }
.sw-sidebar-foot { padding: 14px 16px; border-top: 1px solid rgba(255, 255, 255, .06); font-size: 12px; color: #7C8DB0; }

.sw-main { flex: 1; margin-left: var(--sw-sidebar-w); min-width: 0; display: flex; flex-direction: column; }

.sw-topbar {
    position: sticky; top: 0; z-index: 1030; height: var(--sw-topbar-h); display: flex; align-items: center; gap: 12px; padding: 0 22px;
    background: rgba(11, 31, 58, .92); backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px);
    border-bottom: 1px solid rgba(255, 255, 255, .06); color: #E2E8F0;
}
.sw-topbar .btn-icon { color: #CBD5E1; }
.sw-topbar .btn-icon:hover { color: #fff; background: rgba(255, 255, 255, .08); }
.sw-search { position: relative; flex: 1; max-width: 560px; }
.sw-search input {
    width: 100%; height: 40px; border-radius: 12px; border: 1px solid rgba(255, 255, 255, .1); background: rgba(255, 255, 255, .07);
    color: #fff; padding: 0 14px 0 40px; outline: none; transition: background .15s, border-color .15s;
}
.sw-search input::placeholder { color: #8FA3C7; }
.sw-search input:focus { background: rgba(255, 255, 255, .12); border-color: rgba(96, 165, 250, .6); }
.sw-search > i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: #8FA3C7; }
.sw-search kbd { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); background: rgba(255,255,255,.1); color: #9FB2D3; border: 0; font-size: 11px; }
.sw-search-results {
    position: absolute; top: 46px; left: 0; right: 0; background: #fff; color: var(--sw-text); border-radius: 14px; box-shadow: var(--sw-shadow-lg);
    border: 1px solid var(--sw-border); max-height: 70vh; overflow: auto; display: none; padding: 6px;
}
.sw-search-results.show { display: block; }
.sw-search-hit { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 10px; color: var(--sw-text); }
.sw-search-hit:hover, .sw-search-hit.focus { background: #F1F5F9; }
.sw-search-hit .t { font-weight: 600; }
.sw-search-hit .s { font-size: 12px; color: var(--sw-muted); }
.sw-topbar-actions { display: flex; align-items: center; gap: 6px; margin-left: auto; }

.btn-icon {
    width: 40px; height: 40px; display: inline-grid; place-items: center; border-radius: 11px; border: 0; background: transparent; position: relative; font-size: 18px;
}
.btn-icon .sw-count {
    position: absolute; top: 4px; right: 4px; min-width: 17px; height: 17px; border-radius: 999px; background: var(--sw-accent); color: #fff;
    font-size: 10px; font-weight: 800; display: grid; place-items: center; padding: 0 4px; box-shadow: 0 0 0 2px var(--sw-navy-900);
}

.sw-timer {
    display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 12px 0 10px; border-radius: 11px; border: 1px solid rgba(255, 255, 255, .12);
    background: rgba(255, 255, 255, .06); color: #E2E8F0; font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap;
}
.sw-timer.running { background: rgba(22, 163, 74, .18); border-color: rgba(74, 222, 128, .45); color: #DCFCE7; }
.sw-timer .dot { width: 8px; height: 8px; border-radius: 50%; background: #64748B; }
.sw-timer.running .dot { background: #4ADE80; box-shadow: 0 0 0 0 rgba(74, 222, 128, .7); animation: sw-pulse 1.6s infinite; }
.sw-timer .time { font-family: var(--sw-mono); font-variant-numeric: tabular-nums; }
@keyframes sw-pulse { 0% { box-shadow: 0 0 0 0 rgba(74, 222, 128, .6); } 70% { box-shadow: 0 0 0 8px rgba(74, 222, 128, 0); } 100% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0); } }

.sw-user-btn { display: flex; align-items: center; gap: 10px; border: 0; background: transparent; color: #E2E8F0; padding: 4px 6px 4px 4px; border-radius: 12px; }
.sw-user-btn:hover { background: rgba(255, 255, 255, .08); }
.sw-user-btn .name { font-weight: 600; font-size: 13px; line-height: 1.1; text-align: left; }
.sw-user-btn .role { font-size: 11px; color: #8FA3C7; }

.sw-content { flex: 1; }

/* Dropdown menus */
.dropdown-menu { border-radius: 14px; border: 1px solid var(--sw-border); box-shadow: var(--sw-shadow-lg); padding: 6px; font-size: 13.5px; }
.dropdown-item { border-radius: 9px; padding: 7px 10px; display: flex; align-items: center; gap: 10px; }
.dropdown-item i { color: var(--sw-muted); width: 18px; text-align: center; }
.dropdown-header { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; font-weight: 700; }
.sw-notify-menu { width: 380px; max-height: 480px; overflow: auto; }
.sw-notify-item { display: flex; gap: 10px; padding: 9px 10px; border-radius: 10px; color: var(--sw-text); }
.sw-notify-item:hover { background: #F1F5F9; }
.sw-notify-item.unread { background: #EFF6FF; }
.sw-notify-item .t { font-weight: 600; font-size: 13px; }
.sw-notify-item .m { font-size: 12px; color: var(--sw-muted); }

/* ------------------------------------------------------------------ Hero */
.sw-hero {
    position: relative; overflow: hidden; color: #fff; padding: 26px 32px 84px;
    background:
        radial-gradient(60% 120% at 100% 0%, rgba(37, 99, 235, .45) 0%, transparent 55%),
        radial-gradient(40% 90% at 0% 100%, rgba(225, 29, 72, .18) 0%, transparent 60%),
        linear-gradient(135deg, var(--sw-navy-900) 0%, #12305A 55%, var(--sw-navy-600) 100%);
}
.sw-hero::after {
    content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
    background-image: linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px);
    background-size: 28px 28px; mask-image: linear-gradient(180deg, rgba(0,0,0,.9), transparent 90%); -webkit-mask-image: linear-gradient(180deg, rgba(0,0,0,.9), transparent 90%);
}
.sw-hero > * { position: relative; z-index: 1; }
.sw-hero-compact { padding-bottom: 64px; }
.sw-hero-flat { padding-bottom: 26px; }
.sw-breadcrumb { display: flex; flex-wrap: wrap; gap: 6px; font-size: 12.5px; color: #9FB2D3; margin-bottom: 10px; }
.sw-breadcrumb a { color: #BFD0EE; }
.sw-breadcrumb a:hover { color: #fff; }
.sw-breadcrumb .sep { opacity: .5; }
.sw-hero-row { display: flex; align-items: flex-start; gap: 18px; flex-wrap: wrap; }
.sw-hero-icon {
    width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; font-size: 26px; flex-shrink: 0;
    background: linear-gradient(135deg, rgba(255,255,255,.18), rgba(255,255,255,.04)); border: 1px solid rgba(255,255,255,.18);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 10px 30px -10px rgba(0,0,0,.5); backdrop-filter: blur(6px);
}
.sw-hero-title { font-size: 26px; font-weight: 800; letter-spacing: -.02em; margin: 0; line-height: 1.2; }
.sw-hero-sub { color: #BFD0EE; margin-top: 4px; font-size: 14px; }
.sw-hero-meta { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 10px; color: #C7D5EE; font-size: 13px; }
.sw-hero-meta i { color: #93C5FD; margin-right: 5px; }
.sw-hero-actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.sw-hero-stats { display: flex; gap: 28px; flex-wrap: wrap; margin-top: 18px; }
.sw-hero-stat .v { font-weight: 950; font-size: 24px; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.sw-hero-stat .l { font-size: 11.5px; color: #9FB2D3; text-transform: uppercase; letter-spacing: .08em; font-weight: 600; }
.sw-hero .sw-badge { background: rgba(255, 255, 255, .14); color: #fff; border-color: rgba(255,255,255,.2); }

.sw-body { padding: 0 32px 40px; margin-top: -56px; position: relative; z-index: 2; }
.sw-hero-flat + .sw-body { margin-top: 22px; }

/* ------------------------------------------------------------------ Cards (frosted glass) */
.sw-card {
    background: var(--sw-surface); backdrop-filter: saturate(160%) blur(16px); -webkit-backdrop-filter: saturate(160%) blur(16px);
    border: 1px solid rgba(255, 255, 255, .7); outline: 1px solid var(--sw-border); outline-offset: -1px;
    border-radius: var(--sw-radius); box-shadow: var(--sw-shadow); margin-bottom: 20px; min-width: 0;
}
.sw-card-header { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--sw-border); flex-wrap: wrap; }
.sw-card-title { font-weight: 700; font-size: 15px; margin: 0; letter-spacing: -.01em; display: flex; align-items: center; gap: 10px; }
.sw-card-sub { font-size: 12.5px; color: var(--sw-muted); }
.sw-card-actions { margin-left: auto; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.sw-card-body { padding: 18px 20px; }
.sw-card-footer { padding: 12px 20px; border-top: 1px solid var(--sw-border); display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.sw-card-flush .sw-card-body { padding: 0; }
.sw-card-dark { background: linear-gradient(135deg, var(--sw-navy-900), var(--sw-navy-700)); color: #E2E8F0; border-color: rgba(255,255,255,.08); outline-color: transparent; }
.sw-card-dark .sw-card-header { border-color: rgba(255,255,255,.08); }
.sw-card-dark .text-muted-2, .sw-card-dark .sw-card-sub { color: #9FB2D3 !important; }
.sw-card-accent { border-top: 3px solid var(--sw-accent); }
.sw-section-title { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; font-weight: 700; color: var(--sw-muted); margin: 6px 0 12px; }

/* ------------------------------------------------------------------ Icon chips */
.sw-chip { display: inline-grid; place-items: center; border-radius: 12px; flex-shrink: 0; position: relative; }
.sw-chip-sm { width: 30px; height: 30px; font-size: 14px; border-radius: 9px; }
.sw-chip-md { width: 40px; height: 40px; font-size: 18px; }
.sw-chip-lg { width: 52px; height: 52px; font-size: 23px; border-radius: 15px; }
.sw-chip-primary { background: linear-gradient(135deg, rgba(37,99,235,.16), rgba(37,99,235,.06)); color: var(--t-primary); box-shadow: inset 0 0 0 1px rgba(37,99,235,.18); }
.sw-chip-success { background: linear-gradient(135deg, rgba(22,163,74,.16), rgba(22,163,74,.06)); color: var(--t-success); box-shadow: inset 0 0 0 1px rgba(22,163,74,.18); }
.sw-chip-warning { background: linear-gradient(135deg, rgba(217,119,6,.18), rgba(217,119,6,.06)); color: var(--t-warning); box-shadow: inset 0 0 0 1px rgba(217,119,6,.2); }
.sw-chip-danger { background: linear-gradient(135deg, rgba(220,38,38,.16), rgba(220,38,38,.06)); color: var(--t-danger); box-shadow: inset 0 0 0 1px rgba(220,38,38,.18); }
.sw-chip-info { background: linear-gradient(135deg, rgba(8,145,178,.16), rgba(8,145,178,.06)); color: var(--t-info); box-shadow: inset 0 0 0 1px rgba(8,145,178,.18); }
.sw-chip-neutral { background: linear-gradient(135deg, rgba(100,116,139,.16), rgba(100,116,139,.06)); color: var(--t-neutral); box-shadow: inset 0 0 0 1px rgba(100,116,139,.18); }
.sw-chip-purple { background: linear-gradient(135deg, rgba(124,58,237,.16), rgba(124,58,237,.06)); color: var(--t-purple); box-shadow: inset 0 0 0 1px rgba(124,58,237,.18); }
.sw-chip-pink { background: linear-gradient(135deg, rgba(219,39,119,.16), rgba(219,39,119,.06)); color: var(--t-pink); box-shadow: inset 0 0 0 1px rgba(219,39,119,.18); }
.sw-chip-teal { background: linear-gradient(135deg, rgba(13,148,136,.16), rgba(13,148,136,.06)); color: var(--t-teal); box-shadow: inset 0 0 0 1px rgba(13,148,136,.18); }
.sw-chip-indigo { background: linear-gradient(135deg, rgba(79,70,229,.16), rgba(79,70,229,.06)); color: var(--t-indigo); box-shadow: inset 0 0 0 1px rgba(79,70,229,.18); }
.sw-chip-slate { background: linear-gradient(135deg, rgba(71,85,105,.18), rgba(71,85,105,.06)); color: var(--t-slate); box-shadow: inset 0 0 0 1px rgba(71,85,105,.2); }
.sw-chip-orange { background: linear-gradient(135deg, rgba(234,88,12,.16), rgba(234,88,12,.06)); color: var(--t-orange); box-shadow: inset 0 0 0 1px rgba(234,88,12,.18); }
.sw-chip-solid { color: #fff !important; box-shadow: 0 8px 18px -8px currentColor; }
.sw-chip-glass { background: rgba(255,255,255,.14); color: #fff; box-shadow: inset 0 0 0 1px rgba(255,255,255,.2); }

/* ------------------------------------------------------------------ KPI */
.sw-kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; margin-bottom: 20px; }
.sw-kpi {
    background: var(--sw-surface); backdrop-filter: saturate(160%) blur(16px); -webkit-backdrop-filter: saturate(160%) blur(16px);
    border: 1px solid rgba(255,255,255,.7); outline: 1px solid var(--sw-border); outline-offset: -1px; border-radius: var(--sw-radius);
    box-shadow: var(--sw-shadow); padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; position: relative; overflow: hidden; color: var(--sw-text);
}
a.sw-kpi:hover { transform: translateY(-2px); box-shadow: var(--sw-shadow-lg); transition: all .2s; }
.sw-kpi-top { display: flex; align-items: center; gap: 12px; }
.sw-kpi-label { font-size: 12.5px; color: var(--sw-muted); font-weight: 600; }
.sw-kpi-value { font-size: 28px; font-weight: 950; letter-spacing: -.03em; font-variant-numeric: tabular-nums; line-height: 1; }
.sw-kpi-foot { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--sw-muted); }
.sw-delta { font-weight: 700; font-size: 12px; display: inline-flex; align-items: center; gap: 2px; }
.sw-delta.up { color: var(--t-success); }
.sw-delta.down { color: var(--t-danger); }
.sw-kpi .sw-spark { position: absolute; right: 0; bottom: 0; width: 45%; height: 48px; opacity: .9; }

/* ------------------------------------------------------------------ Badges */
.sw-badge {
    display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 600; line-height: 1.5;
    border: 1px solid transparent; white-space: nowrap;
}
.sw-badge i.bi { font-size: 11px; }
.sw-badge .sw-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; display: inline-block; }
.sw-badge-primary { background: #EFF6FF; color: #1D4ED8; border-color: #DBEAFE; }
.sw-badge-success { background: #F0FDF4; color: #15803D; border-color: #DCFCE7; }
.sw-badge-warning { background: #FFFBEB; color: #B45309; border-color: #FEF3C7; }
.sw-badge-danger { background: #FEF2F2; color: #B91C1C; border-color: #FEE2E2; }
.sw-badge-info { background: #ECFEFF; color: #0E7490; border-color: #CFFAFE; }
.sw-badge-neutral { background: #F8FAFC; color: #475569; border-color: #E2E8F0; }
.sw-badge-purple { background: #F5F3FF; color: #6D28D9; border-color: #EDE9FE; }
.sw-badge-pink { background: #FDF2F8; color: #BE185D; border-color: #FCE7F3; }
.sw-badge-teal { background: #F0FDFA; color: #0F766E; border-color: #CCFBF1; }
.sw-badge-indigo { background: #EEF2FF; color: #4338CA; border-color: #E0E7FF; }
.sw-badge-slate { background: #F1F5F9; color: #334155; border-color: #E2E8F0; }
.sw-badge-orange { background: #FFF7ED; color: #C2410C; border-color: #FFEDD5; }

.sw-priority { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; }
.sw-priority-low { color: #64748B; }
.sw-priority-medium, .sw-priority-normal { color: #0891B2; }
.sw-priority-high { color: #D97706; }
.sw-priority-critical, .sw-priority-urgent { color: #DC2626; }

/* ------------------------------------------------------------------ Buttons */
.btn { border-radius: 10px; font-weight: 600; font-size: 13.5px; padding: .5rem .95rem; display: inline-flex; align-items: center; gap: 7px; justify-content: center; }
.btn-sm { font-size: 12.5px; padding: .32rem .7rem; border-radius: 9px; gap: 5px; }
.btn-lg { font-size: 15px; padding: .7rem 1.2rem; border-radius: 12px; }
.btn-sw-primary { background: linear-gradient(135deg, var(--sw-navy-700), var(--sw-navy-900)); color: #fff; border: 1px solid var(--sw-navy-900); box-shadow: 0 6px 16px -8px rgba(11,31,58,.7); }
.btn-sw-primary:hover, .btn-sw-primary:focus { color: #fff; background: linear-gradient(135deg, var(--sw-navy-600), var(--sw-navy-800)); }
.btn-sw-accent { background: linear-gradient(135deg, #F43F5E, var(--sw-accent-600)); color: #fff; border: 1px solid var(--sw-accent-600); box-shadow: 0 6px 16px -8px rgba(225,29,72,.8); }
.btn-sw-accent:hover, .btn-sw-accent:focus { color: #fff; filter: brightness(1.06); }
.btn-sw-blue { background: linear-gradient(135deg, #3B82F6, #1D4ED8); color: #fff; border: 1px solid #1D4ED8; box-shadow: 0 6px 16px -8px rgba(37,99,235,.8); }
.btn-sw-blue:hover { color: #fff; filter: brightness(1.06); }
.btn-sw-success { background: linear-gradient(135deg, #22C55E, #15803D); color: #fff; border: 1px solid #15803D; }
.btn-sw-success:hover { color: #fff; filter: brightness(1.05); }
.btn-sw-danger { background: linear-gradient(135deg, #EF4444, #B91C1C); color: #fff; border: 1px solid #B91C1C; }
.btn-sw-danger:hover { color: #fff; filter: brightness(1.05); }
.btn-sw-ghost { background: #fff; color: var(--sw-text); border: 1px solid var(--sw-border-strong); }
.btn-sw-ghost:hover { background: #F8FAFC; color: var(--sw-text); border-color: #CBD5E1; }
.btn-sw-light { background: rgba(255, 255, 255, .12); color: #fff; border: 1px solid rgba(255, 255, 255, .22); backdrop-filter: blur(6px); }
.btn-sw-light:hover { background: rgba(255, 255, 255, .2); color: #fff; }
.btn-sw-white { background: #fff; color: var(--sw-navy-900); border: 1px solid #fff; box-shadow: 0 8px 20px -10px rgba(0,0,0,.5); }
.btn-sw-white:hover { background: #F1F5F9; color: var(--sw-navy-900); }
.btn-sw-link { background: transparent; border: 0; color: #1D4ED8; padding-left: 0; padding-right: 0; }
.btn-soft-danger { background: #FEF2F2; color: #B91C1C; border: 1px solid #FEE2E2; }
.btn-soft-danger:hover { background: #FEE2E2; color: #991B1B; }
.btn-soft-success { background: #F0FDF4; color: #15803D; border: 1px solid #DCFCE7; }
.btn-soft-success:hover { background: #DCFCE7; color: #166534; }
.btn-soft-primary { background: #EFF6FF; color: #1D4ED8; border: 1px solid #DBEAFE; }
.btn-soft-primary:hover { background: #DBEAFE; color: #1E40AF; }
.btn-soft-warning { background: #FFFBEB; color: #B45309; border: 1px solid #FEF3C7; }
.btn-soft-warning:hover { background: #FEF3C7; color: #92400E; }
.btn-icon-sm { width: 32px; height: 32px; padding: 0; border-radius: 9px; display: inline-grid; place-items: center; }

/* ------------------------------------------------------------------ Toolbar & filters */
.sw-toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 14px 20px; border-bottom: 1px solid var(--sw-border); }
.sw-toolbar .form-control, .sw-toolbar .form-select { height: 38px; font-size: 13.5px; }
.sw-toolbar-search { position: relative; min-width: 240px; flex: 1; max-width: 380px; }
.sw-toolbar-search i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--sw-faint); }
.sw-toolbar-search input { padding-left: 34px; }
.sw-segment { display: inline-flex; background: #F1F5F9; border-radius: 11px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.sw-segment a, .sw-segment button { border: 0; background: transparent; color: var(--sw-text-2); font-size: 12.5px; font-weight: 600; padding: 6px 12px; border-radius: 9px; white-space: nowrap; }
.sw-segment a.active, .sw-segment button.active { background: #fff; color: var(--sw-text); box-shadow: 0 1px 3px rgba(15,23,42,.12); }
.sw-segment .count { font-size: 11px; color: var(--sw-muted); margin-left: 4px; font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------------ Tables */
.sw-table-wrap { overflow-x: auto; }
.sw-table { width: 100%; margin: 0; border-collapse: separate; border-spacing: 0; font-size: 13.5px; }
.sw-table thead th {
    position: sticky; top: 0; background: rgba(248, 250, 252, .95); z-index: 1; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em;
    color: var(--sw-muted); padding: 10px 14px; border-bottom: 1px solid var(--sw-border); white-space: nowrap; text-align: left;
}
.sw-table thead th a { color: inherit; }
.sw-table tbody td { padding: 11px 14px; border-bottom: 1px solid var(--sw-border); vertical-align: middle; }
.sw-table tbody tr:last-child td { border-bottom: 0; }
.sw-table tbody tr { transition: background .12s; }
.sw-table tbody tr:hover { background: rgba(37, 99, 235, .035); }
.sw-table tbody tr[data-href] { cursor: pointer; }
.sw-table tfoot td { padding: 11px 14px; font-weight: 700; border-top: 1px solid var(--sw-border-strong); background: #F8FAFC; }
.sw-table .num, .sw-table .text-end { text-align: right; font-variant-numeric: tabular-nums; }
.sw-table .t-main { font-weight: 600; color: var(--sw-text); }
.sw-table .t-sub { font-size: 12px; color: var(--sw-muted); }
.sw-table-compact tbody td { padding: 7px 12px; }
.sw-cell-flex { display: flex; align-items: center; gap: 10px; min-width: 0; }
.sw-cell-flex > div { min-width: 0; }

/* Pager */
.sw-pager { display: flex; align-items: center; gap: 10px; padding: 12px 20px; border-top: 1px solid var(--sw-border); font-size: 12.5px; color: var(--sw-muted); flex-wrap: wrap; }
.sw-pager .pagination { margin: 0 0 0 auto; gap: 4px; }
.sw-pager .page-link { border-radius: 8px !important; border: 1px solid var(--sw-border); color: var(--sw-text-2); font-weight: 600; min-width: 34px; text-align: center; }
.sw-pager .page-item.active .page-link { background: var(--sw-navy-900); border-color: var(--sw-navy-900); color: #fff; }

/* ------------------------------------------------------------------ Tabs */
.sw-tabs { display: flex; gap: 4px; padding: 0 16px; border-bottom: 1px solid var(--sw-border); overflow-x: auto; scrollbar-width: none; }
.sw-tabs::-webkit-scrollbar { display: none; }
.sw-tab { position: relative; display: inline-flex; align-items: center; gap: 7px; padding: 13px 12px; color: var(--sw-muted); font-weight: 600; font-size: 13.5px; white-space: nowrap; border: 0; background: transparent; }
.sw-tab:hover { color: var(--sw-text); }
.sw-tab.active { color: var(--sw-navy-900); }
.sw-tab.active::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 3px; border-radius: 3px 3px 0 0; background: linear-gradient(90deg, #2563EB, #1E3A8A); }
.sw-tab .count { background: #F1F5F9; color: var(--sw-text-2); font-size: 11px; border-radius: 999px; padding: 0 7px; font-variant-numeric: tabular-nums; }
.sw-tab-pane { display: none; }
.sw-tab-pane.active { display: block; }

/* ------------------------------------------------------------------ Forms */
.form-label { font-size: 12.5px; font-weight: 600; color: var(--sw-text-2); margin-bottom: 5px; }
.form-control, .form-select { border-radius: 10px; border-color: #D5DDE8; font-size: 14px; padding: .5rem .75rem; background-color: #fff; }
.form-control:focus, .form-select:focus { border-color: #60A5FA; box-shadow: 0 0 0 4px rgba(37, 99, 235, .12); }
.form-control-sm, .form-select-sm { border-radius: 8px; font-size: 13px; }
.form-text { font-size: 12px; color: var(--sw-muted); }
.form-check-input:checked { background-color: var(--t-primary); border-color: var(--t-primary); }
.form-switch .form-check-input { width: 2.4em; height: 1.3em; }
.input-group-text { border-radius: 10px; background: #F8FAFC; border-color: #D5DDE8; color: var(--sw-muted); font-size: 13px; }
.field-validation-error, .text-danger.field-validation-error { font-size: 12px; font-weight: 500; }
.input-validation-error { border-color: #F87171 !important; }
.validation-summary-errors ul { margin: 0; padding-left: 18px; }
.sw-form-section { padding: 18px 20px; border-bottom: 1px solid var(--sw-border); }
.sw-form-section:last-child { border-bottom: 0; }
.sw-form-section-title { font-size: 13px; font-weight: 700; margin-bottom: 14px; display: flex; align-items: center; gap: 8px; }
.sw-form-section-title i { color: var(--t-primary); }
.sw-field-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px 18px; }
.sw-field-grid .span-2 { grid-column: span 2; }
.sw-field-grid .span-all { grid-column: 1 / -1; }
.sw-form-actions { position: sticky; bottom: 0; z-index: 5; display: flex; gap: 10px; justify-content: flex-end; padding: 14px 20px; background: rgba(255,255,255,.92); backdrop-filter: blur(10px); border-top: 1px solid var(--sw-border); border-radius: 0 0 var(--sw-radius) var(--sw-radius); }
.sw-required::after { content: " *"; color: var(--t-danger); }
.sw-option-card { display: block; border: 1.5px solid var(--sw-border-strong); border-radius: 12px; padding: 12px 14px; cursor: pointer; transition: all .15s; background: #fff; }
.sw-option-card:hover { border-color: #93C5FD; }
.btn-check:checked + .sw-option-card, .sw-option-card.active { border-color: var(--t-primary); background: #EFF6FF; box-shadow: 0 0 0 3px rgba(37,99,235,.12); }

/* Tom Select harmonisation */
.ts-wrapper .ts-control { border-radius: 10px; border-color: #D5DDE8; min-height: 38px; padding: 6px 10px; font-size: 14px; box-shadow: none; }
.ts-wrapper.focus .ts-control { border-color: #60A5FA; box-shadow: 0 0 0 4px rgba(37, 99, 235, .12); }
.ts-dropdown { border-radius: 12px; border-color: var(--sw-border); box-shadow: var(--sw-shadow-lg); font-size: 13.5px; overflow: hidden; }
.ts-dropdown .option { padding: 8px 12px; }
.ts-dropdown .option .sub { display: block; font-size: 11.5px; color: var(--sw-muted); }
.ts-dropdown .active { background: #EFF6FF; color: var(--sw-text); }

/* Quill */
.sw-rich { border-radius: 10px; overflow: hidden; border: 1px solid #D5DDE8; background: #fff; }
.sw-rich .ql-toolbar { border: 0 !important; border-bottom: 1px solid #E2E8F0 !important; background: #F8FAFC; }
.sw-rich .ql-container { border: 0 !important; font-family: var(--sw-font); font-size: 14px; min-height: 180px; }
.sw-prose { line-height: 1.7; color: var(--sw-text-2); }
.sw-prose h1, .sw-prose h2, .sw-prose h3 { color: var(--sw-text); font-weight: 800; letter-spacing: -.01em; margin-top: 1.3em; }
.sw-prose img { max-width: 100%; border-radius: 10px; }
.sw-prose pre { background: var(--sw-navy-950); color: #E2E8F0; padding: 14px; border-radius: 10px; font-family: var(--sw-mono); font-size: 13px; }
.sw-prose blockquote { border-left: 3px solid #93C5FD; padding-left: 14px; color: var(--sw-muted); }
.sw-prose table { width: 100%; border-collapse: collapse; }
.sw-prose table td, .sw-prose table th { border: 1px solid var(--sw-border-strong); padding: 6px 10px; }

/* ------------------------------------------------------------------ Definition lists & stats */
.sw-dl { display: grid; grid-template-columns: minmax(120px, 38%) 1fr; gap: 9px 14px; margin: 0; font-size: 13.5px; }
.sw-dl dt { color: var(--sw-muted); font-weight: 500; }
.sw-dl dd { margin: 0; color: var(--sw-text); font-weight: 500; word-break: break-word; }
.sw-stat-list { list-style: none; margin: 0; padding: 0; }
.sw-stat-list li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 0; border-bottom: 1px dashed var(--sw-border-strong); font-size: 13.5px; }
.sw-stat-list li:last-child { border-bottom: 0; }
.sw-stat-list .v { font-weight: 800; font-variant-numeric: tabular-nums; }
.sw-mini-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 1px; background: var(--sw-border); border-radius: 12px; overflow: hidden; }
.sw-mini-stat { background: #fff; padding: 12px 14px; }
.sw-mini-stat .l { font-size: 11.5px; color: var(--sw-muted); font-weight: 600; }
.sw-mini-stat .v { font-size: 19px; font-weight: 950; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }

/* ------------------------------------------------------------------ Avatars */
.sw-avatar { display: inline-grid; place-items: center; border-radius: 50%; color: #fff; font-weight: 700; flex-shrink: 0; box-shadow: 0 0 0 2px #fff; text-transform: uppercase; }
.sw-avatar-xs { width: 22px; height: 22px; font-size: 9.5px; }
.sw-avatar-sm { width: 30px; height: 30px; font-size: 11.5px; }
.sw-avatar-md { width: 38px; height: 38px; font-size: 14px; }
.sw-avatar-lg { width: 56px; height: 56px; font-size: 20px; }
.sw-avatar-stack { display: inline-flex; }
.sw-avatar-stack .sw-avatar + .sw-avatar { margin-left: -8px; }

/* ------------------------------------------------------------------ Progress */
.sw-progress { height: 8px; border-radius: 999px; background: #E2E8F0; overflow: hidden; }
.sw-progress-bar { height: 100%; border-radius: 999px; background: linear-gradient(90deg, #3B82F6, #1D4ED8); transition: width .6s ease; }
.sw-progress-bar.success { background: linear-gradient(90deg, #4ADE80, #16A34A); }
.sw-progress-bar.warning { background: linear-gradient(90deg, #FBBF24, #D97706); }
.sw-progress-bar.danger { background: linear-gradient(90deg, #F87171, #DC2626); }
.sw-progress-bar.purple { background: linear-gradient(90deg, #A78BFA, #7C3AED); }
.sw-progress-thin { height: 5px; }
.sw-ring { position: relative; width: 84px; height: 84px; }
.sw-ring svg { transform: rotate(-90deg); }
.sw-ring .v { position: absolute; inset: 0; display: grid; place-items: center; font-weight: 950; font-variant-numeric: tabular-nums; font-size: 18px; }

/* ------------------------------------------------------------------ Timeline */
.sw-timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.sw-timeline::before { content: ""; position: absolute; left: 19px; top: 6px; bottom: 6px; width: 2px; background: linear-gradient(180deg, #CBD5E1, transparent); }
.sw-tl-item { position: relative; display: flex; gap: 14px; padding: 0 0 18px; }
.sw-tl-item .sw-chip { z-index: 1; box-shadow: 0 0 0 4px var(--sw-bg), inset 0 0 0 1px rgba(15,23,42,.06); background-color: #fff; }
.sw-tl-body { flex: 1; min-width: 0; padding-top: 2px; }
.sw-tl-title { font-weight: 600; font-size: 13.5px; }
.sw-tl-title a { color: var(--sw-text); }
.sw-tl-title a:hover { color: var(--t-primary); }
.sw-tl-meta { font-size: 12px; color: var(--sw-muted); margin-top: 2px; display: flex; gap: 10px; flex-wrap: wrap; }
.sw-tl-detail { font-size: 13px; color: var(--sw-text-2); margin-top: 6px; background: #F8FAFC; border: 1px solid var(--sw-border); border-radius: 10px; padding: 8px 12px; white-space: pre-line; }
.sw-tl-amount { margin-left: auto; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.sw-timeline-compact .sw-tl-item { padding-bottom: 12px; }
.sw-timeline-compact::before { left: 14px; }

/* ------------------------------------------------------------------ Kanban */
.sw-kanban { display: flex; gap: 14px; overflow-x: auto; padding-bottom: 12px; align-items: flex-start; min-height: 60vh; }
.sw-kanban-col { flex: 0 0 290px; background: rgba(255,255,255,.55); backdrop-filter: blur(10px); border: 1px solid var(--sw-border); border-radius: 16px; display: flex; flex-direction: column; max-height: calc(100vh - 220px); }
.sw-kanban-head { padding: 12px 14px; border-bottom: 1px solid var(--sw-border); position: relative; }
.sw-kanban-head::before { content: ""; position: absolute; top: -1px; left: 14px; right: 14px; height: 3px; border-radius: 0 0 3px 3px; background: var(--col, #3B82F6); }
.sw-kanban-head .t { font-weight: 700; font-size: 13.5px; display: flex; align-items: center; gap: 8px; }
.sw-kanban-head .s { font-size: 12px; color: var(--sw-muted); font-variant-numeric: tabular-nums; margin-top: 2px; }
.sw-kanban-cards { padding: 10px; display: flex; flex-direction: column; gap: 10px; overflow-y: auto; min-height: 80px; flex: 1; }
.sw-kanban-card { background: #fff; border: 1px solid var(--sw-border); border-radius: 12px; padding: 11px 12px; box-shadow: 0 1px 2px rgba(15,23,42,.05); cursor: grab; transition: box-shadow .15s, transform .15s; color: var(--sw-text); display: block; }
.sw-kanban-card:hover { box-shadow: var(--sw-shadow); transform: translateY(-1px); color: var(--sw-text); }
.sw-kanban-card .t { font-weight: 600; font-size: 13.5px; line-height: 1.35; }
.sw-kanban-card .s { font-size: 12px; color: var(--sw-muted); margin-top: 3px; }
.sw-kanban-card .f { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 9px; font-size: 12px; }
.sw-kanban-card.rotting { border-left: 3px solid var(--t-warning); }
.sw-sortable-ghost { opacity: .35; }
.sw-sortable-drag { box-shadow: var(--sw-shadow-lg) !important; transform: rotate(1.5deg); }

/* ------------------------------------------------------------------ Empty state */
.sw-empty { text-align: center; padding: 48px 20px; color: var(--sw-muted); }
.sw-empty .sw-chip { margin-bottom: 14px; }
.sw-empty h5 { color: var(--sw-text); font-weight: 700; font-size: 16px; margin-bottom: 6px; }
.sw-empty p { max-width: 420px; margin: 0 auto 16px; font-size: 13.5px; }

/* ------------------------------------------------------------------ Line items editor */
.sw-lines { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13.5px; }
.sw-lines thead th { font-size: 11px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--sw-muted); padding: 8px 8px; border-bottom: 1px solid var(--sw-border); background: #F8FAFC; white-space: nowrap; }
.sw-lines tbody td { padding: 6px 6px; border-bottom: 1px solid var(--sw-border); vertical-align: top; }
.sw-lines .form-control, .sw-lines .form-select { font-size: 13px; padding: .38rem .55rem; border-radius: 8px; }
.sw-lines .num input { text-align: right; font-variant-numeric: tabular-nums; }
.sw-lines .line-total { font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; padding-top: 12px !important; white-space: nowrap; }
.sw-lines .handle { cursor: grab; color: var(--sw-faint); padding-top: 12px !important; }
.sw-lines tr.is-section td { background: #F1F5F9; }
.sw-lines tr.is-section input { font-weight: 700; }
.sw-lines tr.is-optional td { background: #FFFBEB; }
.sw-totals { margin-left: auto; min-width: 320px; }
.sw-totals .row-t { display: flex; justify-content: space-between; padding: 6px 0; font-size: 13.5px; font-variant-numeric: tabular-nums; }
.sw-totals .row-t.grand { border-top: 2px solid var(--sw-navy-900); margin-top: 6px; padding-top: 10px; font-size: 18px; font-weight: 950; }
.sw-margin-good { color: var(--t-success); }
.sw-margin-warn { color: var(--t-warning); }
.sw-margin-bad { color: var(--t-danger); }

/* ------------------------------------------------------------------ Signature & upload */
.sw-signature { border: 2px dashed #CBD5E1; border-radius: 14px; background: #fff; position: relative; touch-action: none; }
.sw-signature canvas { width: 100%; height: 200px; display: block; border-radius: 12px; }
.sw-signature .clear { position: absolute; top: 8px; right: 8px; }
.sw-signature .hint { position: absolute; bottom: 10px; left: 0; right: 0; text-align: center; color: var(--sw-faint); font-size: 12px; pointer-events: none; }
.sw-dropzone { border: 2px dashed #CBD5E1; border-radius: 14px; padding: 22px; text-align: center; color: var(--sw-muted); background: rgba(248,250,252,.7); transition: all .15s; cursor: pointer; }
.sw-dropzone.drag { border-color: #3B82F6; background: #EFF6FF; color: #1D4ED8; }
.sw-file-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--sw-border); }
.sw-file-row:last-child { border-bottom: 0; }
.sw-thumb { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; background: #F1F5F9; display: grid; place-items: center; color: var(--sw-muted); font-size: 20px; overflow: hidden; flex-shrink: 0; }

/* ------------------------------------------------------------------ Heatmap */
.sw-heatmap { border-collapse: separate; border-spacing: 3px; font-size: 11.5px; width: 100%; }
.sw-heatmap th { font-weight: 600; color: var(--sw-muted); text-align: center; padding: 2px 0; white-space: nowrap; }
.sw-heatmap th.row-h { text-align: right; padding-right: 8px; color: var(--sw-text-2); font-size: 12.5px; }
.sw-heatmap td { height: 30px; min-width: 26px; border-radius: 6px; text-align: center; font-variant-numeric: tabular-nums; font-weight: 700; color: #fff; background: #EEF2F7; position: relative; }
.sw-heatmap td.zero { color: transparent; }
.sw-heatmap td:hover { outline: 2px solid var(--sw-navy-900); outline-offset: 1px; z-index: 2; }
.sw-legend { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--sw-muted); }
.sw-legend span { width: 22px; height: 10px; border-radius: 3px; display: inline-block; }

/* ------------------------------------------------------------------ Misc */
.sw-divider { height: 1px; background: var(--sw-border); margin: 14px 0; }
.sw-kv { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.sw-link-card { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 14px; background: #fff; border: 1px solid var(--sw-border); color: var(--sw-text); transition: all .15s; }
.sw-link-card:hover { border-color: #93C5FD; box-shadow: var(--sw-shadow); color: var(--sw-text); transform: translateY(-1px); }
.sw-grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.sw-sla { font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; display: inline-flex; align-items: center; gap: 4px; }
.sw-sla.ok { color: var(--t-success); }
.sw-sla.warn { color: var(--t-warning); }
.sw-sla.breach { color: var(--t-danger); }
.sw-callout { border-radius: 12px; padding: 12px 14px; display: flex; gap: 12px; align-items: flex-start; font-size: 13.5px; }
.sw-callout-info { background: #EFF6FF; color: #1E3A8A; border: 1px solid #DBEAFE; }
.sw-callout-warning { background: #FFFBEB; color: #78350F; border: 1px solid #FEF3C7; }
.sw-callout-danger { background: #FEF2F2; color: #7F1D1D; border: 1px solid #FEE2E2; }
.sw-callout-success { background: #F0FDF4; color: #14532D; border: 1px solid #DCFCE7; }
.sw-sticky-side { position: sticky; top: calc(var(--sw-topbar-h) + 16px); }
.sw-color-swatch { width: 16px; height: 16px; border-radius: 5px; display: inline-block; box-shadow: inset 0 0 0 1px rgba(0,0,0,.1); vertical-align: middle; }
.sw-code-box { font-family: var(--sw-mono); background: var(--sw-navy-950); color: #E2E8F0; border-radius: 12px; padding: 14px 16px; font-size: 14px; letter-spacing: .06em; word-break: break-all; }
.sw-calendar { display: grid; grid-template-columns: repeat(7, 1fr); gap: 1px; background: var(--sw-border); border-radius: 12px; overflow: hidden; }
.sw-calendar .dow { background: #F8FAFC; padding: 8px; font-size: 11px; font-weight: 700; color: var(--sw-muted); text-transform: uppercase; text-align: center; }
.sw-calendar .day { background: #fff; min-height: 110px; padding: 6px; font-size: 12px; }
.sw-calendar .day.other { background: #FAFBFC; color: var(--sw-faint); }
.sw-calendar .day.today { box-shadow: inset 0 0 0 2px #3B82F6; }
.sw-calendar .day .d { font-weight: 700; margin-bottom: 4px; }
.sw-calendar .evt { display: block; border-radius: 6px; padding: 2px 6px; margin-bottom: 3px; font-size: 11.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #fff; }

/* Toasts */
.sw-toasts { position: fixed; right: 20px; bottom: 20px; z-index: 2000; display: flex; flex-direction: column; gap: 10px; }
.sw-toast { min-width: 300px; max-width: 420px; background: var(--sw-navy-900); color: #fff; border-radius: 14px; padding: 12px 14px; display: flex; gap: 12px; align-items: flex-start; box-shadow: var(--sw-shadow-lg); animation: sw-in .25s ease; border-left: 4px solid #60A5FA; }
.sw-toast.success { border-left-color: #4ADE80; }
.sw-toast.danger { border-left-color: #F87171; }
.sw-toast.warning { border-left-color: #FBBF24; }
.sw-toast .x { margin-left: auto; background: transparent; border: 0; color: #9FB2D3; }
@keyframes sw-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* Modal */
.modal-content { border-radius: 18px; border: 0; box-shadow: var(--sw-shadow-lg); }
.modal-header { border-bottom: 1px solid var(--sw-border); padding: 16px 20px; }
.modal-title { font-weight: 700; font-size: 16px; }
.modal-footer { border-top: 1px solid var(--sw-border); }

/* ------------------------------------------------------------------ Auth */
.sw-auth {
    min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr;
    background: radial-gradient(70% 90% at 0% 0%, rgba(37,99,235,.45) 0%, transparent 60%), radial-gradient(50% 60% at 100% 100%, rgba(225,29,72,.25), transparent 60%), linear-gradient(135deg, var(--sw-navy-950), var(--sw-navy-800));
}
.sw-auth-side { color: #fff; padding: 56px; display: flex; flex-direction: column; position: relative; overflow: hidden; }
.sw-auth-side::after { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px); background-size: 34px 34px; mask-image: radial-gradient(80% 80% at 30% 40%, #000, transparent); -webkit-mask-image: radial-gradient(80% 80% at 30% 40%, #000, transparent); }
.sw-auth-side > * { position: relative; z-index: 1; }
.sw-auth-headline { font-size: 40px; font-weight: 900; letter-spacing: -.03em; line-height: 1.1; margin-top: auto; max-width: 520px; }
.sw-auth-points { margin-top: 26px; display: grid; gap: 12px; max-width: 460px; }
.sw-auth-point { display: flex; gap: 12px; align-items: center; color: #C7D5EE; }
.sw-auth-panel { display: grid; place-items: center; padding: 32px; }
.sw-auth-card { width: 100%; max-width: 440px; background: rgba(255,255,255,.96); border-radius: 22px; padding: 34px; box-shadow: 0 40px 80px -30px rgba(0,0,0,.6); }
.sw-auth-card h1 { font-size: 24px; font-weight: 800; letter-spacing: -.02em; }
.sw-otp input { font-family: var(--sw-mono); font-size: 26px; letter-spacing: .5em; text-align: center; font-weight: 700; }
.sw-qr { background: #fff; padding: 12px; border-radius: 14px; border: 1px solid var(--sw-border); display: inline-block; }
.sw-recovery-codes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.sw-recovery-codes code { background: #F1F5F9; border-radius: 8px; padding: 8px 10px; text-align: center; font-size: 14px; color: var(--sw-navy-900); font-weight: 600; }

/* ------------------------------------------------------------------ Customer Zone */
.pz-topnav { position: sticky; top: 0; z-index: 1030; background: rgba(11, 31, 58, .94); backdrop-filter: blur(14px); color: #fff; border-bottom: 1px solid rgba(255,255,255,.06); }
.pz-topnav .inner { max-width: 1320px; margin: 0 auto; display: flex; align-items: center; gap: 16px; padding: 0 24px; height: 64px; }
.pz-links { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.pz-links::-webkit-scrollbar { display: none; }
.pz-link { color: #C3CFE4; padding: 8px 12px; border-radius: 10px; font-weight: 600; font-size: 13.5px; white-space: nowrap; display: inline-flex; gap: 7px; align-items: center; }
.pz-link:hover { color: #fff; background: rgba(255,255,255,.07); }
.pz-link.active { color: #fff; background: rgba(37,99,235,.35); }
.pz-container { max-width: 1320px; margin: 0 auto; }
.pz-app .sw-hero { padding-left: max(24px, calc((100vw - 1320px) / 2 + 24px)); padding-right: max(24px, calc((100vw - 1320px) / 2 + 24px)); }
.pz-app .sw-body { max-width: 1320px; margin-left: auto; margin-right: auto; padding-left: 24px; padding-right: 24px; }

/* ------------------------------------------------------------------ Field app (mobile) */
.fld-app { min-height: 100vh; background: var(--sw-bg); padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
.fld-header {
    position: sticky; top: 0; z-index: 1030; color: #fff; padding: calc(12px + env(safe-area-inset-top)) 16px 14px;
    background: radial-gradient(80% 140% at 100% 0%, rgba(37,99,235,.5), transparent 60%), linear-gradient(135deg, var(--sw-navy-900), var(--sw-navy-700));
    box-shadow: 0 10px 30px -18px rgba(0,0,0,.7);
}
.fld-header .row1 { display: flex; align-items: center; gap: 10px; }
.fld-header .title { font-size: 18px; font-weight: 800; letter-spacing: -.01em; line-height: 1.2; }
.fld-header .sub { font-size: 12.5px; color: #BFD0EE; }
.fld-back { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: rgba(255,255,255,.1); color: #fff; font-size: 18px; }
.fld-content { padding: 14px; }
.fld-card { background: #fff; border-radius: 16px; box-shadow: var(--sw-shadow); border: 1px solid var(--sw-border); margin-bottom: 12px; overflow: hidden; }
.fld-card-body { padding: 14px; }
.fld-card-head { padding: 12px 14px; border-bottom: 1px solid var(--sw-border); font-weight: 700; display: flex; align-items: center; gap: 10px; }
.fld-list-item { display: flex; align-items: center; gap: 12px; padding: 14px; border-bottom: 1px solid var(--sw-border); color: var(--sw-text); min-height: 64px; }
.fld-list-item:last-child { border-bottom: 0; }
.fld-list-item:active { background: #F1F5F9; }
.fld-list-item .t { font-weight: 700; font-size: 15px; line-height: 1.25; }
.fld-list-item .s { font-size: 13px; color: var(--sw-muted); }
.fld-btn-xl { width: 100%; min-height: 56px; font-size: 16px; border-radius: 14px; font-weight: 700; }
.fld-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.fld-tabbar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 1040; display: grid; grid-template-columns: repeat(5, 1fr);
    background: rgba(255,255,255,.94); backdrop-filter: blur(14px); border-top: 1px solid var(--sw-border); padding-bottom: env(safe-area-inset-bottom);
}
.fld-tab { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 9px 0 8px; color: var(--sw-muted); font-size: 11px; font-weight: 600; }
.fld-tab i { font-size: 21px; }
.fld-tab.active { color: var(--sw-navy-900); }
.fld-tab.active i { color: var(--t-primary); }
.fld-status-strip { display: flex; gap: 6px; overflow-x: auto; padding: 2px 0 6px; scrollbar-width: none; }
.fld-step { flex: 1; min-width: 70px; text-align: center; font-size: 11px; font-weight: 700; color: var(--sw-faint); }
.fld-step .bar { height: 5px; border-radius: 3px; background: #E2E8F0; margin-bottom: 5px; }
.fld-step.done { color: var(--t-success); }
.fld-step.done .bar { background: var(--t-success); }
.fld-step.current { color: var(--t-primary); }
.fld-step.current .bar { background: var(--t-primary); }
.fld-check { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-bottom: 1px solid var(--sw-border); }
.fld-check .form-check-input { width: 26px; height: 26px; margin-top: 0; flex-shrink: 0; }
.fld-app .form-control, .fld-app .form-select { min-height: 46px; font-size: 16px; border-radius: 12px; }
.fld-offline { display: none; background: #FEF3C7; color: #78350F; font-size: 12.5px; font-weight: 600; text-align: center; padding: 6px; }
.fld-offline.show { display: block; }

/* ------------------------------------------------------------------ Public pages */
.pub-shell { min-height: 100vh; background: var(--sw-bg); }
.pub-top { background: linear-gradient(135deg, var(--sw-navy-900), var(--sw-navy-600)); color: #fff; padding: 22px 0 90px; }
.pub-container { max-width: 1040px; margin: 0 auto; padding: 0 20px; }
.pub-body { margin-top: -70px; padding-bottom: 50px; }

/* ------------------------------------------------------------------ Print */
.print-doc { max-width: 900px; margin: 0 auto; background: #fff; padding: 40px 44px; color: #0F172A; font-size: 13px; }
.print-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; padding-bottom: 18px; border-bottom: 3px solid var(--sw-navy-900); }
.print-title { font-size: 28px; font-weight: 900; letter-spacing: -.02em; color: var(--sw-navy-900); text-transform: uppercase; }
.print-meta { display: grid; grid-template-columns: auto auto; gap: 4px 16px; font-size: 12.5px; }
.print-meta dt { color: #64748B; font-weight: 500; }
.print-meta dd { margin: 0; font-weight: 700; text-align: right; }
.print-parties { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin: 22px 0; }
.print-parties h6 { font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: #64748B; font-weight: 700; margin-bottom: 6px; }
.print-table { width: 100%; border-collapse: collapse; margin-top: 10px; }
.print-table th { background: var(--sw-navy-900); color: #fff; font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; padding: 8px 10px; text-align: left; }
.print-table td { padding: 8px 10px; border-bottom: 1px solid #E2E8F0; vertical-align: top; }
.print-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.print-table tr.section td { background: #F1F5F9; font-weight: 700; }
.print-totals { width: 320px; margin-left: auto; margin-top: 14px; }
.print-totals .r { display: flex; justify-content: space-between; padding: 5px 0; font-variant-numeric: tabular-nums; }
.print-totals .r.g { border-top: 2px solid var(--sw-navy-900); margin-top: 4px; padding-top: 9px; font-size: 17px; font-weight: 900; }
.print-foot { margin-top: 30px; padding-top: 14px; border-top: 1px solid #E2E8F0; font-size: 11.5px; color: #64748B; }
.print-toolbar { position: sticky; top: 0; background: var(--sw-navy-900); padding: 10px; text-align: center; z-index: 10; }
@media print {
    .print-toolbar, .no-print { display: none !important; }
    body { background: #fff !important; }
    .print-doc { padding: 0; max-width: none; }
    @page { size: A4; margin: 14mm; }
}

/* ------------------------------------------------------------------ Responsive */
.sw-sidebar-backdrop { display: none; }
@media (max-width: 1199.98px) {
    .sw-sidebar { transform: translateX(-100%); box-shadow: var(--sw-shadow-lg); }
    .sw-app.nav-open .sw-sidebar { transform: none; }
    .sw-app.nav-open .sw-sidebar-backdrop { display: block; position: fixed; inset: 0; background: rgba(5,14,31,.55); z-index: 1035; }
    .sw-main { margin-left: 0; }
}
@media (min-width: 1200px) {
    .sw-app.nav-collapsed .sw-sidebar { width: 76px; }
    .sw-app.nav-collapsed .sw-main { margin-left: 76px; }
    .sw-app.nav-collapsed .sw-brand-text, .sw-app.nav-collapsed .sw-nav-group-head span, .sw-app.nav-collapsed .sw-nav-item span, .sw-app.nav-collapsed .sw-sidebar-foot, .sw-app.nav-collapsed .sw-nav-group-head .bi-chevron-down { display: none; }
    .sw-app.nav-collapsed .sw-nav-item { justify-content: center; }
    .sw-app.nav-collapsed .sw-nav-group.collapsed .sw-nav-items { display: block; }
}
@media (max-width: 767.98px) {
    .sw-hero { padding: 20px 16px 76px; }
    .sw-hero-title { font-size: 21px; }
    .sw-hero-actions { margin-left: 0; width: 100%; }
    .sw-body { padding: 0 12px 30px; }
    .sw-topbar { padding: 0 10px; gap: 6px; }
    .sw-timer .label, .sw-user-btn .name, .sw-user-btn .role, .sw-search kbd { display: none; }
    .sw-card-header, .sw-card-body, .sw-toolbar { padding-left: 14px; padding-right: 14px; }
    .sw-dl { grid-template-columns: 1fr; gap: 2px 0; }
    .sw-dl dd { margin-bottom: 8px; }
    .sw-field-grid .span-2 { grid-column: 1 / -1; }
    .sw-auth { grid-template-columns: 1fr; }
    .sw-auth-side { display: none; }
    .sw-totals { min-width: 0; width: 100%; }
    .sw-kpi-value { font-size: 23px; }
    .print-parties { grid-template-columns: 1fr; }
    .sw-toasts { left: 12px; right: 12px; bottom: 12px; }
    .sw-toast { min-width: 0; max-width: none; }
    .sw-notify-menu { width: calc(100vw - 20px); max-width: 380px; }
    .sw-table-wrap > .sw-lines { min-width: 760px; }
    .sw-recovery-codes { grid-template-columns: 1fr; }
}
@media print {
    .sw-sidebar, .sw-topbar, .sw-sidebar-backdrop, .sw-toasts, .fld-tabbar, .pz-topnav { display: none !important; }
    .sw-main { margin-left: 0 !important; }
}
.validation-summary-valid { display: none !important; }

/* utilities */
.min-w-0 { min-width: 0 !important; }
.cursor-pointer { cursor: pointer; }
