/* Adapted from Vynex Bulk-whatsapp's operational design system. */
:root{--paper:hsl(40 33% 98%);--surface:#fff;--surface-subtle:hsl(40 20% 97%);--ink:hsl(240 10% 10%);--muted:hsl(240 5% 40%);--border:hsl(40 10% 85%);--control:hsl(40 10% 75%);--primary:#17171c;--primary-ink:#fff;--client-accent:#7c3bed;--client-secondary:#2bb3f3;--soft:color-mix(in srgb,var(--primary) 6%,var(--surface));--active:color-mix(in srgb,var(--primary) 9%,var(--surface));--radius-card:4px;--chart-1:#7c3bed;--chart-2:#1982b0;--chart-3:#ae3863;--chart-4:#3c5075;--chart-5:#936b4c}
html[data-mode=dark]{color-scheme:dark;--paper:hsl(240 10% 10%);--surface:hsl(240 8% 12%);--surface-subtle:hsl(240 8% 15%);--ink:hsl(40 33% 98%);--muted:hsl(240 5% 68%);--border:hsl(240 5% 25%);--control:hsl(240 5% 36%);--danger:#fb7185}
html[data-mode=light]{color-scheme:light}#app:before{content:'';position:fixed;inset:0 0 auto;height:3px;background:linear-gradient(90deg,#7c3bed,#ef43b0,#2bb3f3);z-index:80;pointer-events:none}
h1{font-size:28px;font-weight:700;letter-spacing:-.025em}h2{font-size:22px}h3{font-size:16px;font-weight:500}button,a,input,select,textarea{transition:background-color .2s ease,border-color .2s ease,color .2s ease}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:2px solid var(--purple);outline-offset:3px}
.btn{border-radius:4px;font-size:14px;min-height:32px;padding:5px 12px;font-weight:500}.btn.primary{border-radius:999px;background:var(--primary);border-color:var(--primary);color:var(--primary-ink)}.btn.primary:hover{background:color-mix(in srgb,var(--primary) 86%,var(--ink));border-color:color-mix(in srgb,var(--primary) 86%,var(--ink))}.btn:disabled{background:var(--surface-subtle);color:var(--muted);border-color:var(--border)}.btn:not(.primary):hover,.icon-btn:hover{background:var(--soft);color:var(--ink)}
.workspace-sheet{background:var(--paper);border:0;border-radius:0;max-width:1600px;margin:auto}.workspace-bar{height:64px;border-bottom:1px solid var(--border);background:var(--surface)}.sidebar{border-right:1px solid var(--border)}.nav a{color:var(--muted);border-radius:4px}.nav a.active{background:var(--active);color:var(--primary)}.nav a:hover{background:var(--surface-subtle)}.brand{padding:24px 20px 12px}.workspace-brand{min-height:40px;display:flex;align-items:center}.client-logo{display:block;max-height:40px;max-width:160px;width:auto!important;height:auto!important;object-fit:contain;background:#fff;padding:4px 8px;border-radius:4px}.client-logo[hidden]{display:none}.client-wordmark,.client-logo-fallback{font-family:'Space Grotesk',sans-serif;font-weight:600;font-size:20px;line-height:1.25;overflow-wrap:anywhere}.header-client .client-logo{max-width:120px;max-height:32px}.parent-link{display:flex;align-items:center;justify-content:center;gap:6px;font-size:11px}.parent-link img{width:78px;height:26px;background:#fff;padding:3px 5px;border-radius:3px}.workspace-switch{width:calc(100% - 32px);background:transparent}.workspace-card{border-radius:4px;background:var(--surface);box-shadow:none}.workspace-card-logo{height:40px;display:flex;align-items:center;color:var(--muted)}.workspace-card-logo .client-logo{max-width:140px;max-height:40px}
.card,.stat,.modal,.onboarding{border-radius:4px}.stats{border:0;gap:16px;background:transparent;overflow:visible}.stat,.stat:first-child,.stat:nth-child(-n+2),.stat:last-child{border:1px solid var(--border);background:var(--surface);padding:20px;border-radius:4px}.stat .stat-value{font-family:'DM Sans',sans-serif;font-size:30px;font-weight:600;line-height:1;margin-top:16px}.stat .stat-label{font-size:14px}.stat small{line-height:20px}.grid-2{gap:16px}.card-pad{padding:20px}.avatar{background:var(--soft);color:var(--ink)}.bar-track{background:var(--surface-subtle)}.notice,.banner{background:var(--soft);color:var(--ink);border-color:var(--border)}.settings-body .code,.code{background:var(--surface-subtle);color:var(--ink)}input,select,textarea{border-radius:4px;color:var(--ink)}input::placeholder,textarea::placeholder{color:var(--muted)}.search input{background:var(--surface)}
.settings-shell{display:grid;grid-template-columns:188px minmax(0,1fr);gap:28px;align-items:start}.settings-section-nav{position:sticky;top:24px}.settings-rail{display:flex;flex-direction:column;gap:4px}.settings-rail>small{font-size:11px;letter-spacing:.09em;padding:8px 12px}.settings-rail button{border:0;background:transparent;color:var(--muted);text-align:left;display:flex;align-items:center;gap:10px;padding:10px 12px;border-radius:4px;font-weight:500;font-size:13px}.settings-rail button .icon{width:16px;height:16px}.settings-rail button:hover{background:var(--surface-subtle);color:var(--ink)}.settings-rail button.active{background:var(--active);color:var(--primary)}.settings-mobile-select{display:none}.settings-layout{min-width:0;width:100%;max-width:1100px}.settings-panel-head{margin-bottom:24px}.settings-panel-head h2{font-size:24px}.settings-card>.card-title{padding:16px 20px}.settings-card .settings-body{padding:20px}.settings-card{margin-bottom:16px}.settings-actions{gap:10px}.settings-body .field>span{display:block;margin-bottom:8px}
.brand-editor-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px;align-items:start}.logo-upload-preview{min-height:104px;padding:20px;border:1px dashed var(--control);background:var(--surface-subtle);display:flex;align-items:center;justify-content:center;margin-bottom:20px}.logo-upload-preview .client-logo{max-width:240px;max-height:72px}.brand-color-fields{display:grid;gap:16px}.color-field>span{display:block;font-size:13px;margin-bottom:6px}.color-field>div{display:flex;gap:8px}.color-field input[type=color]{width:48px;padding:4px;flex-shrink:0}.color-field input[data-color-text]{width:100%;min-width:0;font-variant-numeric:tabular-nums}.brand-palette{margin-top:16px}.brand-palette>div{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px}.brand-palette select{width:100%;margin-top:6px}.color-swatch{background:var(--surface);border:1px solid var(--border);padding:8px;border-radius:4px;color:var(--ink);font-size:11px}.color-swatch i{display:block;background:var(--swatch);width:48px;height:26px;border-radius:3px;margin-bottom:5px}.brand-sample{background:#faf9f7;color:#17171c;border:1px solid #dad7d1;padding:18px;border-radius:4px}.brand-sample[data-mode=dark]{background:#17171c;color:#faf9f7;border-color:#40404b}.brand-sample>span{font-size:11px;opacity:.7}.brand-sample>strong{display:block;font-family:'Space Grotesk',sans-serif;margin:6px 0 16px}.brand-sample button{background:var(--sample-primary);color:var(--sample-ink);border:0;border-radius:999px;padding:7px 14px;pointer-events:none}.brand-sample-bars{height:54px;display:flex;align-items:end;gap:6px;margin-bottom:20px}.brand-sample-bars i{width:24%;height:60%;background:var(--sample-accent)}.brand-sample-bars i:nth-child(2){height:85%;background:var(--sample-secondary)}.brand-sample-bars i:nth-child(3){height:40%}.brand-sample-bars i:nth-child(4){height:100%;background:var(--sample-secondary)}
.chart-panel{min-width:0}.chart-panel .card-title{align-items:start}.chart-panel small{line-height:1.5}.trend-chart{width:100%;height:auto;max-height:260px;display:block}.trend-chart text{font-family:'DM Sans',sans-serif;font-size:11px;fill:var(--muted)}.chart-grid{stroke:var(--border);stroke-dasharray:3 3;stroke-width:1}.trend-area{animation:chart-reveal .7s ease-out;transform-origin:center bottom}.trend-line{stroke-width:2;fill:none;stroke:var(--chart-1)}.chart-point{fill:var(--chart-1);stroke:var(--surface);stroke-width:2}.chart-point:hover,.chart-point:focus{r:5;outline:none}.chart-tooltip{min-height:22px;font-size:12px;color:var(--muted);margin-top:8px}.chart-data{margin-top:10px;font-size:12px;color:var(--muted)}.chart-data summary{cursor:pointer}.chart-data table{margin-top:10px}.chart-data td,.chart-data th{padding:6px 10px}.donut-layout{display:flex;gap:24px;align-items:center;padding:16px 0;flex-wrap:wrap}.donut-figure{position:relative;flex:0 0 176px;height:176px}.donut-figure svg{width:176px;height:176px;transform:rotate(-90deg)}.donut-total{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;pointer-events:none}.donut-total strong{font-size:22px;font-weight:600;font-variant-numeric:tabular-nums}.donut-legend{flex:1;min-width:150px;display:grid;gap:12px}.donut-legend>div{display:flex;align-items:center;gap:8px;font-size:13px}.donut-legend strong{margin-left:auto;font-variant-numeric:tabular-nums}.donut-slice{transition:opacity .2s;animation:chart-opacity .7s ease-out}.donut-slice:hover,.donut-slice:focus{opacity:.72;outline:none}.chart-empty{padding:52px 20px;text-align:center;color:var(--muted);font-size:13px}.trend-heading{margin-bottom:16px}.dashboard-graphs{margin-bottom:24px}
@keyframes chart-reveal{from{opacity:.3;transform:scaleY(.7)}to{opacity:1;transform:scaleY(1)}}@keyframes chart-opacity{from{opacity:.2}to{opacity:1}}
@media(min-width:1001px){.sidebar{width:240px}.main{margin-left:240px;padding:0}.workspace-sheet{min-height:calc(100dvh - 64px)}}
@media(max-width:1199px){.brand-editor-grid{grid-template-columns:1fr}.stats{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:1023px){.settings-shell{grid-template-columns:1fr;gap:20px}.settings-section-nav{position:static}.settings-rail{display:none}.settings-mobile-select{display:block;font-size:13px;font-weight:500}.settings-mobile-select select{display:block;margin-top:8px;width:100%;min-height:44px}}
@media(max-width:639px){h1{font-size:25px}.workspace-sheet{padding:20px 16px}.workspace-bar{height:52px;padding:0 16px}.stats{grid-template-columns:1fr;gap:8px}.stat,.stat:first-child{display:grid;grid-template-columns:1fr auto;gap:4px 12px;padding:12px}.stat .stat-value{grid-column:2;grid-row:1/3;margin:0;align-self:center;font-size:28px}.stat small{grid-column:1;margin:0}.stat .stat-icon{display:none}.btn,.btn.small,.icon-btn,input,select{min-height:44px}.icon-btn{min-width:44px}.grid-2{gap:16px}.card-pad{padding:16px}.settings-actions{flex-wrap:wrap}.settings-actions .btn{flex:1}.donut-layout{justify-content:center;gap:20px}.donut-legend{flex-basis:100%}.brand-sample{margin-top:20px}.workspace-card{padding:20px}.toolbar{align-items:stretch}.toolbar input[type=date]{min-width:0;flex:1}}
html[data-motion=reduced] *,html[data-motion=reduced] *:before,html[data-motion=reduced] *:after{animation:none!important;transition:none!important;scroll-behavior:auto!important}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}
@media print{#app:before,.settings-section-nav,.chart-data{display:none!important}.workspace-sheet{background:white}.chart-panel{break-inside:avoid}.stats{grid-template-columns:repeat(4,1fr)}.trend-area,.donut-slice{animation:none}body{-webkit-print-color-adjust:exact;print-color-adjust:exact}}

html[data-mode=dark] td{border-color:var(--border)}html[data-mode=dark] .badge,html[data-mode=dark] .badge[style]{background:var(--surface-subtle);color:var(--ink)}html[data-mode=dark] .badge.active,html[data-mode=dark] .badge.completed{background:#153426;color:#bbf7d0}html[data-mode=dark] .badge.paused,html[data-mode=dark] .badge.overdue{background:#362b15;color:#fef08a}html[data-mode=dark] .badge.archived{background:var(--surface-subtle);color:var(--muted)}html[data-mode=dark] .timeline-item p{color:var(--muted)}html[data-mode=dark] .bulkbar{background:var(--surface-subtle)}::selection{background:var(--active);color:var(--ink)}.settings-body input[type=file]{width:100%;max-width:100%}.brand-sample button{min-height:32px}.logo-upload-preview .client-wordmark{overflow-wrap:anywhere;text-align:center}

.nav a.active,.settings-rail button.active{color:var(--primary-readable,var(--ink))}
