@font-face{font-family:Inter;src:url('/assets/fonts/InterVariable.woff2') format('woff2');font-style:normal;font-weight:400 700;font-display:swap}
:root{color-scheme:light;--bg:#f6f8fc;--sidebar:#0f172a;--surface:#ffffff;--raised:#f8fafc;--border:#e2e8f0;--text:#0f172a;--secondary:#334155;--muted:#5b6b82;--primary:#2563eb;--hover:#1d4ed8;--success:#15803d;--warning:#a16207;--danger:#b91c1c;--info-bg:#e8f1ff;--info-text:#1e40af;--success-bg:#e7f6ec;--success-text:#166534;--warning-bg:#fff4ce;--warning-text:#854d0e;--danger-bg:#feecec;--danger-text:#991b1b;font-family:Inter,system-ui,-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;color:var(--text);background:var(--bg);font-synthesis:none}*{box-sizing:border-box}body{margin:0;overflow-wrap:anywhere}a{color:var(--primary);text-decoration:none}a:hover{color:#1e40af}button,input,select,textarea{font:inherit;font-size:16px}button,.download-link{min-height:44px;touch-action:manipulation}button,.download-link{display:inline-flex;align-items:center;justify-content:center;gap:8px;border:1px solid transparent;border-radius:6px;background:var(--primary);color:white;padding:11px 16px;font-weight:600;cursor:pointer;transition:background .15s,border-color .15s}button:hover,.download-link:hover{background:var(--hover);color:white}button:disabled{opacity:.5;cursor:default}.secondary{background:var(--raised);border-color:var(--border);color:var(--secondary)}.secondary:hover{background:#e1eaf7;color:var(--text);border-color:#9baec7}.danger{background:var(--danger-bg);color:var(--danger-text)}.text-button{background:transparent;color:var(--primary);padding:8px 0;font-size:14px;justify-content:start}.text-button:hover{background:transparent;color:#1e40af}input,select,textarea{width:100%;min-width:0;border:1px solid #334155;border-radius:8px;padding:11px 12px;margin-top:7px;background:#ffffff;color:var(--text)}input::placeholder,textarea::placeholder{color:#64748b}input[readonly]{background:var(--bg);color:var(--secondary)}input[type=color]{min-height:46px;padding:6px}input:focus,select:focus,textarea:focus{border-color:var(--hover);outline:2px solid #2563eb55;outline-offset:1px}button:focus-visible,a:focus-visible{outline:2px solid #60a5fa;outline-offset:3px}label{display:block;font-size:13px;font-weight:500;color:var(--secondary)}h1{font-size:28px;letter-spacing:-.8px;line-height:1.2;margin:8px 0 10px;font-weight:800}h2{font-size:20px;letter-spacing:-.4px;margin:0;font-weight:700}h3{font-size:16px;margin:0;font-weight:600}p{line-height:1.6}.muted,small{color:var(--muted)}.eyebrow{font-size:10px;letter-spacing:1.5px;text-transform:uppercase;font-weight:600;color:var(--muted);margin:0}.brand{font-size:22px;letter-spacing:1.5px;font-weight:800;color:var(--text);display:block}.brand span{display:block;color:var(--muted);font-size:9px;letter-spacing:2px;margin-top:5px}header{height:76px;display:flex;align-items:center;justify-content:space-between;gap:16px;padding:16px 32px;border-bottom:1px solid var(--border);background:var(--bg);margin-left:232px}header>.brand{font-size:14px;letter-spacing:.4px;font-weight:500;color:var(--secondary)}header>.brand span{display:none}.account{display:flex;align-items:center;gap:14px;color:var(--muted);font-size:12px;min-width:0}.account span{max-width:300px;overflow-wrap:anywhere}.account button{font-size:13px}.workspace{margin-left:232px;max-width:1560px;padding:32px;min-width:0}.title-row{display:flex;justify-content:space-between;align-items:center;gap:20px;margin-bottom:24px}.title-row>div{min-width:0}.title-row p{margin-bottom:0;font-size:14px}.title-actions{display:flex;gap:8px;flex-wrap:wrap}.module-nav{position:fixed;inset:0 auto 0 0;width:232px;padding:28px 16px;background:var(--sidebar);border-right:1px solid var(--border);display:flex;flex-direction:column;gap:4px;overflow:auto;z-index:20}.sidebar-brand{padding:0 12px 30px}.sidebar-label{font-size:10px;text-transform:uppercase;letter-spacing:1.6px;color:var(--muted);padding:24px 12px 8px}.module-nav>a:not(.brand){display:flex;align-items:center;gap:12px;color:var(--muted);font-size:14px;border-radius:8px;padding:12px;min-height:44px}.module-nav>a:hover{color:var(--text);background:var(--raised)}.module-nav>a[aria-current=page]{background:var(--info-bg);color:var(--info-text);box-shadow:inset 2px 0 var(--primary)}.nav-icon{width:18px;height:18px;flex-shrink:0}.sidebar-note{font-size:11px;color:var(--muted);padding:24px 12px 0;margin-top:auto}.menu-toggle,.nav-overlay{display:none}.toolbar{display:flex;align-items:flex-end;gap:12px;flex-wrap:wrap;margin:24px 0}.search{flex:1;max-width:360px;min-width:0}.toolbar>button{flex-shrink:0}.plate-filters{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:12px;margin:16px 0 24px}.list{border:1px solid var(--border);border-radius:8px;overflow:hidden;background:var(--surface)}.table-wrap{overflow:auto}table{width:100%;border-collapse:collapse;text-align:left;font-size:13px}th{font-size:11px;font-weight:500;color:var(--muted);background:#edf3fb}th,td{padding:16px;border-bottom:1px solid var(--border);overflow-wrap:anywhere;white-space:normal}tbody tr:hover{background:var(--raised)}tbody tr:last-child td{border-bottom:0}td small{display:block;margin-top:5px}td:first-child{font-weight:600}td .secondary{font-size:12px;padding:8px 12px;margin:2px}td:last-child{min-width:155px}.url-cell{max-width:240px}.url-cell a{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:220px}.badge{display:inline-flex;align-items:center;gap:6px;padding:5px 9px;border-radius:6px;background:#e9eef5;color:var(--secondary);font-size:11px;white-space:nowrap}.badge.active,.badge.success{background:var(--success-bg);color:var(--success-text)}.badge.pending,.badge.warning{background:var(--warning-bg);color:var(--warning-text)}.badge.inactive,.badge.danger{background:var(--danger-bg);color:var(--danger-text)}.status-color{display:inline-block;width:8px;height:8px;border-radius:50%;flex-shrink:0}.pagination{display:flex;justify-content:flex-end;align-items:center;gap:12px;flex-wrap:wrap;margin-top:20px;color:var(--muted);font-size:13px}.pagination button{font-size:13px}#empty,.empty-state{padding:30px;color:var(--muted);text-align:center}#message:empty,#form-message:empty,#reference-message:empty{display:none}[role=status],[role=alert]{font-size:14px;color:var(--secondary)}#form-message,#reference-message,#destination-message{color:var(--danger-text)}dialog{width:760px;max-width:calc(100vw - 32px);max-height:calc(100dvh - 32px);overflow:auto;border:1px solid #334155;border-radius:8px;padding:28px;background:var(--surface);color:var(--text);box-shadow:0 16px 48px #17243b26}dialog::backdrop{background:#050914aa;backdrop-filter:blur(3px)}.dialog-title{display:flex;justify-content:space-between;align-items:center;gap:16px;margin-bottom:24px}.dialog-title h2{min-width:0;overflow-wrap:anywhere}.dialog-title button{flex-shrink:0}.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}.form-grid>*{min-width:0}.wide{grid-column:1/-1}.field label+label{margin-top:12px}.form-footer{display:flex;justify-content:flex-end;gap:12px;flex-wrap:wrap;margin-top:24px}#reference-dialog,#confirmation{width:440px}#reference-form label{margin-top:16px}dl{display:grid;grid-template-columns:170px minmax(0,1fr);gap:14px;font-size:14px}dt{color:var(--muted)}dd{margin:0;overflow-wrap:anywhere}.qr-panel{display:flex;align-items:center;gap:24px;padding:20px;border:1px solid var(--border);border-radius:8px;margin-bottom:24px;background:var(--raised)}.qr-panel img{width:224px;max-width:100%;height:auto;min-width:0;flex-shrink:0;border-radius:0;aspect-ratio:1}.qr-info{min-width:0}.qr-info strong{font-size:22px}.qr-info p{font-size:13px;color:var(--muted)}.qr-info button{margin-top:12px}.nfc-url{margin-top:12px}.download-link{font-size:13px;max-width:100%;overflow-wrap:anywhere}.history-panel,.backup-panel{border-top:1px solid var(--border);margin-top:28px;padding-top:24px}.history-panel ol,.timeline{list-style:none;padding:0}.history-panel li,.timeline li{padding:16px 0;border-bottom:1px solid var(--border);font-size:14px}.history-panel li p,.timeline p{margin:8px 0;overflow-wrap:anywhere}.analytics-panel{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin:24px 0}.analytics-panel>div{background:var(--raised);padding:18px;border-radius:8px;min-width:0}.analytics-panel strong{display:block;font-size:27px;font-weight:600;letter-spacing:-.7px}.analytics-panel span{font-size:12px;color:var(--muted)}.record-list{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}.record-card{padding:20px;background:var(--surface);border:1px solid var(--border);border-radius:8px;min-width:0;margin:8px 0}.record-card h2{font-size:17px}.record-card p{font-size:13px;margin:10px 0}.record-card p strong{font-weight:500;color:var(--muted)}.record-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:16px}.record-actions button{font-size:13px}#profile-body h2{margin:26px 0 16px}#profile-body>a{display:inline-block;padding:12px 0;min-height:44px}#profile-body form{margin:18px 0}#profile-body select[multiple]{min-height:140px}.sale-item{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;padding:16px;border:1px solid var(--border);border-radius:6px;margin:16px 0}.sale-item>label:first-child{grid-column:1/-1}#sale-items h2{margin-top:24px}.kanban{grid-column:1/-1;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}.kanban-column{background:#eaf0f8;padding:16px;border-radius:8px;border-top:3px solid #667085;min-width:0}.kanban-column>h2{font-size:16px}.kanban .record-card{padding:16px}.kanban label{margin-top:12px}.kanban h3{font-size:16px}.kanban .record-card>button{width:100%;font-size:13px}.report-period{display:grid;grid-template-columns:repeat(3,minmax(0,1fr)) auto;align-items:end;gap:16px;margin:24px 0}.metric-value{font-size:28px!important;font-weight:600;letter-spacing:-.7px;color:var(--text)}.report-group{margin:32px 0}.backup-panel p{max-width:850px;color:var(--muted);font-size:14px}.backup-panel .secondary{margin:12px 0}.status-row{display:flex;align-items:center;flex-wrap:wrap;gap:8px;padding:14px 0;border-bottom:1px solid var(--border)}.status-row strong{flex:1;min-width:150px;font-size:14px;font-weight:500}#status-list{margin:20px 0}.login-page{min-height:100dvh;display:grid;place-items:center;padding:24px;background:var(--bg)}.login-card{max-width:440px;width:100%;padding:40px;border:1px solid var(--border);border-radius:8px;background:var(--surface)}.login-card .brand{margin-bottom:36px}.login-card h1{font-size:26px}.login-card p{font-size:14px;color:var(--muted)}.login-card form{margin-top:26px}.login-card label{margin-top:18px}.login-card button{width:100%;margin:18px 0}.login-card small{font-size:11px}.login-mark{width:42px;height:42px;display:grid;place-items:center;background:#2563eb1a;border:1px solid #2563eb33;border-radius:8px;margin-bottom:22px;color:var(--primary)}.overview-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px}.overview-grid a{color:inherit}.overview-grid .record-card{margin:0}.dashboard-columns{display:grid;grid-template-columns:1.1fr 1fr;gap:24px;margin-top:32px}.section-heading{display:flex;justify-content:space-between;align-items:center;gap:16px;margin-bottom:16px}.section-heading a{font-size:13px}.activity-row{display:flex;gap:12px;align-items:center;padding:15px 0;border-bottom:1px solid var(--border)}.activity-row>div{min-width:0;flex:1}.activity-row p{margin:0;font-size:13px}.activity-row small{font-size:11px}.activity-dot{width:7px;height:7px;background:#60a5fa;border-radius:50%;flex-shrink:0}.settings-section{padding:24px;border:1px solid var(--border);border-radius:8px;background:var(--surface);margin:24px 0}.settings-section p{color:var(--muted);font-size:13px}.settings-section form{max-width:760px}.settings-section .form-footer{justify-content:flex-start}.client-list{display:block}.client-list .table-wrap{border:1px solid var(--border);border-radius:8px;background:var(--surface)}.portal-page header,.portal-page .workspace{margin-left:0}.portal-page .workspace{margin:auto;max-width:1100px}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}[hidden]{display:none!important}
@media(min-width:1800px){.workspace{margin-right:auto}}
@media(max-width:1100px){.plate-filters{grid-template-columns:repeat(3,minmax(0,1fr))}.overview-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.record-list,.kanban{grid-template-columns:repeat(2,minmax(0,1fr))}.dashboard-columns{grid-template-columns:minmax(0,1fr)}.report-period{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:900px){header{margin-left:0;padding:16px 20px}.workspace{margin-left:0;padding:28px 20px}.menu-toggle{display:inline-flex;flex-shrink:0}.module-nav{transform:translateX(-100%);visibility:hidden;transition:transform .18s,visibility .18s;width:252px}.nav-open .module-nav{transform:translateX(0);visibility:visible}.nav-open .nav-overlay{display:block;position:fixed;inset:0;background:#0008;z-index:19;border:0;border-radius:0;padding:0}.account span{max-width:200px}.table-wrap{overflow:visible}table,tbody,tr,td{display:block;width:100%}thead{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}tr{padding:16px;border-bottom:1px solid var(--border)}tr:last-child{border:0}td{border:0;padding:7px 0;min-width:0!important}td::before{content:attr(data-label);display:block;font-size:11px;color:var(--muted);font-weight:500;margin-bottom:5px}td:first-child{font-size:17px}td:last-child{display:flex;flex-wrap:wrap;gap:8px}td:last-child::before{flex-basis:100%}.url-cell{max-width:none}.url-cell a{white-space:normal;max-width:none}.plate-filters{grid-template-columns:repeat(2,minmax(0,1fr))}#content.client-list{display:block}}
@media(max-width:650px){header{height:70px;padding:12px 16px;gap:8px}header>.brand{display:none}.portal-page header>.brand{display:block}.account{margin-left:auto}.account span{display:none}.workspace{padding:24px 16px}.title-row{flex-direction:column;align-items:flex-start;gap:18px}.title-row>button,.title-actions{width:100%}.title-actions>*{flex:1}h1{font-size:26px}.form-grid,.record-list,.kanban,.report-period,.plate-filters{grid-template-columns:minmax(0,1fr)}.wide{grid-column:auto}.toolbar{gap:10px}.search{max-width:none;flex-basis:100%}.toolbar>button{flex:1}.pagination{justify-content:center;gap:8px}.form-footer>button{flex:1}.sale-item{grid-template-columns:minmax(0,1fr)}dialog{padding:20px}.dialog-title h2{font-size:19px}.dialog-title>button{padding:10px}.qr-panel{flex-direction:column;text-align:center;padding:16px;gap:14px}.qr-info button,.qr-info .download-link{width:100%}dl{grid-template-columns:minmax(0,1fr);gap:6px}dd{margin-bottom:10px}.analytics-panel{grid-template-columns:repeat(2,minmax(0,1fr))}.login-page{padding:16px}.login-card{padding:28px}.record-card{padding:16px}#filters>label,#filters>a{width:100%}.status-row strong{flex-basis:100%}.status-row button{flex:1}.backup-panel .download-link,.backup-panel button{width:100%;text-align:center}.overview-grid{gap:10px}.overview-grid .record-card{padding:16px}.overview-grid h2{font-size:13px}.section-heading{align-items:flex-start}.settings-section{padding:18px}.account button{padding:10px 12px}}
@media(max-height:600px){.login-page{place-items:start center}.login-card .brand{margin-bottom:22px}}
@media(prefers-reduced-motion:reduce){*{transition:none!important;scroll-behavior:auto!important}}

.truncate-url{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;line-height:1.5}.client-name{display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}.client-list td:first-child small{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.client-list th{overflow-wrap:normal;word-break:normal}.client-list th:first-child{width:26%}.client-list th:nth-child(2){width:17%}.client-list th:nth-child(3){width:15%}.client-list th:nth-child(4){width:11%}.client-list th:nth-child(5){width:6%}.client-list th:nth-child(6){width:12%}.client-list th:last-child{width:13%}@media(min-width:901px){.client-list table{table-layout:fixed}.client-list .record-actions{margin:0}.client-list td .secondary{padding:8px 10px}}
.record-card>h2,.kanban .record-card>h3{display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}

/* KTIVAR: light operational adaptation of DESIGN-dell-1996.md. */
header{background:var(--surface)}
a:hover{text-decoration:underline;text-underline-offset:3px}
a.download-link:hover,.module-nav a:hover{text-decoration:none}
.sidebar-brand{color:var(--primary)}
.module-nav>a:not(.brand){color:var(--secondary);font-weight:550}
.module-nav>a[aria-current=page]{color:var(--info-text);font-weight:700;background:var(--info-bg)}
.title-row{padding-bottom:20px;border-bottom:2px solid #c7dafb}
.eyebrow{color:var(--primary);font-size:11px;font-weight:700}
label{font-size:14px;font-weight:600}
input,select,textarea{border-color:#a6b6cc}
input:disabled,select:disabled,textarea:disabled{background:#edf1f6;color:#52647d;opacity:1}
.secondary:hover{background:#e1eaf7}
.danger{background:var(--danger-bg);border-color:#efb8b8;color:var(--danger-text)}
.danger:hover{background:#fbdada;border-color:#dc9292;color:#7f1d1d}
.success-action{background:var(--success);color:white}
.success-action:hover{background:#166534}
.text-button:hover{color:var(--info-text)}
.badge{font-size:12px;font-weight:650;border:1px solid #c7d2e2;white-space:normal}
.badge.success,.badge.active{border-color:#aed4bc}
.badge.warning,.badge.pending,.badge.production{background:var(--warning-bg);color:var(--warning-text);border-color:#e3cd83}
.badge.danger,.badge.inactive{border-color:#efb8b8}
.badge.info,.badge.stock,.badge.configured,.badge.ready,.badge.delivered{background:var(--info-bg);color:var(--info-text);border-color:#b6cdf3}
.state-line{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.tone-info{--tone-bg:var(--info-bg);--tone-ink:var(--info-text);--tone-border:#2563eb}
.tone-success{--tone-bg:var(--success-bg);--tone-ink:var(--success-text);--tone-border:#15803d}
.tone-warning{--tone-bg:var(--warning-bg);--tone-ink:var(--warning-text);--tone-border:#d4a017}
.tone-danger{--tone-bg:var(--danger-bg);--tone-ink:var(--danger-text);--tone-border:#b91c1c}
.metric-card{background:var(--tone-bg,var(--info-bg));border-top:4px solid var(--tone-border,var(--primary))}
.metric-card h2{font-weight:700;border-bottom:1px solid #17243b20;padding-bottom:12px;line-height:1.4}
.metric-card .metric-value{color:var(--tone-ink,var(--text));font-variant-numeric:tabular-nums;margin-top:16px}
.overview-grid>a{border-radius:8px}
.overview-grid>a:hover{text-decoration:none}
.overview-grid>a:hover .record-card{border-color:var(--primary)}
.dashboard-columns>section{background:var(--surface);border:1px solid var(--border);border-radius:8px;padding:22px;min-width:0}
.section-heading{border-bottom:1px solid var(--border);padding-bottom:14px}
.analytics-panel>div{background:var(--tone-bg,var(--info-bg));border:1px solid var(--border);border-top:3px solid var(--tone-border,#8bb5f9)}
.analytics-panel strong{color:var(--tone-ink,var(--info-text));font-variant-numeric:tabular-nums}
.login-card{border-top:4px solid var(--primary)}
.login-mark{color:var(--primary);background:var(--info-bg)}
.empty-state,#empty{border:1px dashed #a6b6cc;border-radius:6px;background:var(--raised)}
p[role=alert]:not(:empty){color:var(--danger-text);background:var(--danger-bg);border-left:3px solid var(--danger);padding:12px;border-radius:4px}
p[role=status]:not(:empty){padding:10px 12px;background:var(--info-bg);border-left:3px solid var(--primary);border-radius:4px;color:var(--info-text)}
p[role=status][data-tone=success]:not(:empty){background:var(--success-bg);border-color:var(--success);color:var(--success-text)}
p[role=status][data-tone=danger]:not(:empty){background:var(--danger-bg);border-color:var(--danger);color:var(--danger-text)}
p[role=status][data-tone=warning]:not(:empty){background:var(--warning-bg);border-color:#d4a017;color:var(--warning-text)}
p[role]:empty{display:none}
@media(max-width:650px){.dashboard-columns>section{padding:16px}.title-row{padding-bottom:18px}.metric-card h2{padding-bottom:10px}}

.badge.success{background:var(--success-bg);color:var(--success-text);border-color:#aed4bc}

/* Operational refinements: preserve the approved light palette and existing components. */
.filter-summary{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin:12px 0;color:var(--muted);font-size:13px}
.filter-summary button{font-size:13px;padding:8px 12px}
.more-filters{grid-column:2/-1;min-width:0;align-self:start}
summary{cursor:pointer;min-height:44px;padding:12px 0;font-weight:650;color:var(--secondary);overflow-wrap:anywhere}
summary:focus-visible{outline:2px solid var(--primary);outline-offset:3px;border-radius:4px}
.more-filters>.plate-filters{padding:12px 0 0;margin:0;grid-template-columns:repeat(2,minmax(0,1fr))}
.disclosure{border-top:1px solid var(--border);padding:8px 0;margin-top:12px;min-width:0}
.disclosure>summary{font-size:16px;color:var(--text)}
.disclosure[open]>summary{margin-bottom:12px}
.grouped-fields{display:block}
.form-section{border:0;border-top:1px solid var(--border);padding:16px 0 8px;margin:16px 0;min-width:0}
.form-section legend{padding:0 12px 0 0;font-size:16px;font-weight:700;color:var(--text)}
.form-section .form-grid{margin:0}
.attention-panel{padding:20px;border:1px solid var(--border);border-left:4px solid var(--primary);background:var(--surface);border-radius:8px;margin:20px 0}
.attention-panel h2{border:0;background:transparent;padding:0}
.section-title{margin:24px 0 12px}
#metrics{display:block}.metric-group{margin:24px 0}.metric-group>h2{margin-bottom:12px}
.metric-card h2{font-size:15px;letter-spacing:0}.metric-card .metric-value{font-size:30px}
.record-card{padding:18px}.record-actions{gap:8px}thead th{font-size:12px}tbody tr:hover{background:#f6f9ff}
.qr-info{display:flex;flex-direction:column;align-items:flex-start;gap:8px}.qr-info p{margin:4px 0}.qr-info button{max-width:100%}
#view-edit:not(:only-child){background:var(--raised);border-color:var(--border);color:var(--secondary)}
#profile-body>.disclosure .record-card{margin:10px 0}
@media(min-width:901px){.table-wrap td button{font-size:13px;padding:8px 10px}.record-list{gap:16px}}
@media(max-width:650px){.more-filters{grid-column:1/-1}.more-filters>.plate-filters{grid-template-columns:1fr}.filter-summary{align-items:flex-start;flex-direction:column}.form-section{padding-top:12px}.attention-panel{padding:16px}.qr-info{align-items:stretch}.metric-card .metric-value{font-size:28px}}

/* Shared B2B application layer. Layout and data contracts remain unchanged. */
:root{--sidebar-width:232px;--space-1:4px;--space-2:8px;--space-3:12px;--space-4:16px;--space-6:24px;--space-8:32px}
body{font-size:14px;line-height:1.5}h1{font-size:30px;font-weight:700;letter-spacing:-.75px;margin:0 0 6px}h2{font-weight:600}h3{font-weight:600}p{line-height:1.5}small{font-size:12px}
header{height:60px;padding:8px 28px;margin-left:var(--sidebar-width);background:var(--surface)}
.workspace{margin-left:var(--sidebar-width);padding:24px 28px;max-width:1600px}
.module-nav{width:var(--sidebar-width);padding:20px 12px 12px;background:var(--sidebar);border-right:0;gap:2px;color:#e2e8f0}
.module-nav .sidebar-brand{padding:0 12px 16px;font-size:22px;letter-spacing:1px;font-weight:700;color:#f8fafc}
.module-nav .sidebar-brand span{color:#94a3b8;font-size:9px;letter-spacing:1.4px}
.module-nav .sidebar-label{color:#94a3b8;font-size:10px;padding:20px 12px 6px;letter-spacing:1.2px}
.module-nav>a:not(.brand){color:#cbd5e1;font-weight:500;font-size:14px;border-radius:6px;padding:10px 12px;min-height:44px;transition:background .18s,color .18s}
.module-nav>a:not(.brand):hover{color:#f8fafc;background:#1e293b}
.module-nav>a[aria-current=page]{color:#f8fafc;background:#1e293b;font-weight:600;box-shadow:inset 3px 0 #60a5fa}
.module-nav .sidebar-note{color:#94a3b8;margin-bottom:12px;padding:20px 12px 0;font-size:12px}
.collapse-toggle{background:transparent;color:#cbd5e1;border-top:1px solid #334155;border-radius:0;font-size:12px;justify-content:flex-start;padding:10px 12px;min-height:44px}
.collapse-toggle:hover{background:#1e293b;color:white}
.app-breadcrumb,.dialog-context{display:flex;align-items:center;gap:10px;color:var(--muted);font-size:13px;min-width:0}
.app-breadcrumb strong{color:var(--secondary);font-weight:500}.dialog-context{margin-bottom:12px}.dialog-context span:last-child{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.account{gap:0}.user-menu{position:relative}.user-menu>summary{display:flex;align-items:center;gap:8px;list-style:none;padding:0 6px;color:var(--secondary);font-size:13px;font-weight:500}
.user-menu>summary::-webkit-details-marker{display:none}.user-avatar{width:32px;height:32px;border-radius:50%;background:#e8eef8;color:#334155;display:grid;place-items:center;font-weight:600;font-size:11px;flex-shrink:0}
.account .user-name{max-width:210px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.user-panel{position:absolute;right:0;top:calc(100% + 8px);width:280px;max-width:calc(100vw - 32px);z-index:30;padding:12px;background:white;border:1px solid var(--border);border-radius:8px;box-shadow:0 8px 24px #0f172a18}
.account .user-panel #email{display:block;color:var(--muted);font-size:12px;max-width:none;padding:4px 8px 12px;overflow-wrap:anywhere}
.user-panel a,.user-panel button{display:flex;justify-content:flex-start;width:100%;min-height:44px;padding:10px 8px;border:0;border-radius:6px;background:transparent;color:var(--secondary);font-size:14px;font-weight:500}
.user-panel a:hover,.user-panel button:hover{background:var(--raised);color:var(--text);text-decoration:none}
.title-row{border:0;padding-bottom:0;margin-bottom:20px;gap:16px;align-items:center}.title-row p{margin:0;font-size:14px}.eyebrow{display:none}
button,.download-link{font-weight:500;padding:9px 14px;border-radius:6px;font-size:14px}button:active,.download-link:active{filter:brightness(.96)}button:disabled{opacity:.45;filter:none;cursor:not-allowed}
.secondary{background:white;border-color:var(--border);color:var(--secondary)}.secondary:hover{background:#f1f5f9;border-color:#cbd5e1}
.text-button,.text-link{background:transparent;color:var(--primary);border:0;box-shadow:none;font-weight:500;text-align:left;justify-content:flex-start;padding:8px 4px}
.text-button:hover,.text-link:hover{background:transparent;color:var(--hover);text-decoration:underline}.text-link:disabled{cursor:wait}
.tertiary{background:transparent;border-color:transparent;color:var(--secondary)}.tertiary:hover{background:#edf2f7;color:var(--text)}
label{font-size:13px;font-weight:500}input,select,textarea{border-color:#cbd5e1;border-radius:6px;margin-top:6px;min-height:44px;padding:9px 12px;font-size:16px}
input:focus,select:focus,textarea:focus{outline:2px solid #2563eb55;outline-offset:1px;border-color:var(--primary)}
button:focus-visible,a:focus-visible,summary:focus-visible{outline:2px solid #2563eb;outline-offset:3px}.module-nav :focus-visible{outline-color:#93c5fd}
.filters-toolbar{padding:12px;border:1px solid var(--border);background:white;border-radius:8px;margin:16px 0 8px;align-items:flex-end;gap:10px}
.filters-toolbar>.search{flex:1 1 260px;max-width:none}.filter-controls{display:contents}.filter-controls>label{flex:0 1 180px;min-width:140px}
.filters-toolbar .more-filters{position:relative;grid-column:auto;align-self:flex-end;flex:0 0 auto;margin:0}
.filters-toolbar .more-filters>summary{padding:9px 12px;border:1px solid var(--border);border-radius:6px;font-size:14px;font-weight:500;min-height:44px;color:var(--secondary);background:white}
.filters-toolbar .more-filters[open]>summary{border-color:#93a9ca;background:#f8fafc}
.filters-toolbar .more-filters>.plate-filters{position:absolute;right:0;top:calc(100% + 8px);width:520px;max-width:calc(100vw - 64px);z-index:15;padding:16px;background:white;border:1px solid var(--border);border-radius:8px;box-shadow:0 8px 24px #0f172a18;gap:12px}
.filter-summary{margin:8px 0 12px;gap:6px;align-items:center;font-size:12px}.result-count{margin-right:auto;color:var(--muted)}
.filter-summary .filter-chip{display:inline-flex;align-items:center;max-width:100%;padding:6px 10px;min-height:44px;background:#eef2f7;border:1px solid var(--border);color:#334155;font-size:12px;border-radius:6px;overflow-wrap:anywhere}
.filter-summary .filter-chip:hover{background:#e2e8f0}.filter-summary .text-button{font-size:12px;padding:6px 8px}
.metric-card{background:white;border:1px solid var(--border);border-radius:8px;box-shadow:none}.metric-card h2{color:var(--muted);border:0;padding:0;font-size:13px;font-weight:500;line-height:1.4}
.metric-card .metric-value{color:var(--text);font-size:30px;margin:12px 0 8px;font-weight:600}.metric-card small{display:block;font-size:12px}.metric-card p:last-child{margin-bottom:0}
.analytics-panel{gap:12px;margin:16px 0}.analytics-panel>div{padding:16px 18px;background:white;border:1px solid var(--border);border-top:1px solid var(--border)}
.analytics-panel strong{color:var(--text);font-size:30px;font-weight:600}.analytics-panel span{font-size:12px}.analytics-panel .featured-metric{border-top:3px solid var(--primary);padding-top:14px}
.overview-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}.overview-grid .record-card{padding:20px}
.dashboard-columns{margin-top:24px;gap:20px}.dashboard-columns>section{padding:20px}.section-heading{padding-bottom:12px;margin-bottom:8px}.section-heading h2{font-size:18px}
.attention-panel{border-left:0;padding:20px;margin:20px 0;background:white}.attention-panel>h2{font-size:18px;margin-bottom:12px}.attention-item{display:flex;justify-content:space-between;align-items:center;gap:16px;padding:12px 0;border-top:1px solid var(--border)}
.attention-item:first-of-type{border-top:0;padding-top:0}.attention-item p{margin:0}.attention-item small{display:block;margin-top:3px}.attention-item a{flex-shrink:0;font-size:13px;min-height:44px;display:inline-flex;align-items:center}
.dashboard-shortcuts{display:flex;gap:8px;flex-wrap:wrap;margin:12px 0 20px}.dashboard-shortcuts a{background:white;border:1px solid var(--border);color:var(--secondary);min-height:44px;padding:10px 14px;border-radius:6px;font-size:13px}
.dashboard-shortcuts a:hover{background:#f1f5f9;text-decoration:none}.scan-note{font-size:12px;color:var(--muted);margin:8px 0 16px}
.record-card{margin:0;padding:16px}.record-actions{margin-top:12px}.record-card h2{font-weight:600}.record-card p{margin:8px 0;font-size:14px}.metric-group{margin:20px 0}.metric-group>h2{font-size:18px}
.table-wrap table{font-size:14px}.table-wrap th{background:#f8fafc;font-size:12px;font-weight:500;color:var(--muted);padding:12px 14px}
.table-wrap td{padding:12px 14px;line-height:1.4}.table-wrap td:first-child{font-weight:600}.table-wrap tbody tr:hover{background:#f8fafc}
.client-list td:first-child .text-link{font-weight:600;color:var(--text);display:-webkit-box;padding:4px 0;min-height:44px;max-width:100%;line-height:1.4}
.client-list td:first-child .text-link:hover{color:var(--primary)}.client-list td:last-child{min-width:0}
.plates-table{table-layout:fixed;min-width:880px}.plates-table th:nth-child(1){width:130px}.plates-table th:nth-child(2){width:140px}.plates-table th:nth-child(3){width:22%}.plates-table th:nth-child(4){width:23%}.plates-table th:nth-child(5){width:80px}.plates-table th:last-child{width:140px}
.plate-code{font-family:ui-monospace,SFMono-Regular,Consolas,monospace;font-size:13px;font-weight:600;white-space:nowrap;padding:8px 0;color:var(--primary);min-height:44px}
.destination-preview{display:flex;align-items:center;gap:6px;min-width:0}.destination-preview span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0;flex:1}.destination-preview button{padding:8px;flex-shrink:0}
.badge{font-size:12px;font-weight:500;border-color:transparent;padding:4px 8px}.badge.inactive{background:#f1f5f9;border-color:#e2e8f0;color:#475569}.badge.stock{background:#fffbeb;border-color:#f5df9f;color:#92400e}
.badge.info,.badge.configured,.badge.ready,.badge.delivered{background:#eff6ff;border-color:#dbeafe;color:#1e40af}
.kanban{display:flex;gap:16px;overflow-x:auto;scroll-snap-type:x proximity;padding-bottom:12px;min-width:0}.kanban-column{flex:1 0 288px;max-width:360px;padding:12px;background:#eef2f7;border:1px solid var(--border);border-top:3px solid #94a3b8;border-radius:8px;scroll-snap-align:start}
.kanban-column>h2{font-size:15px;font-weight:600}.kanban-summary{font-size:12px;margin:6px 0 12px;color:var(--muted)}.kanban .record-card{margin-top:10px;padding:14px}.kanban .record-card h3{font-size:14px;line-height:1.4}
.kanban .record-card p{font-size:13px}.kanban .record-card .state-line{margin-top:8px}.kanban-empty{padding:12px 0;font-size:12px;color:var(--muted)}.kanban-column>button{font-size:13px}
.kanban .record-card>button{font-size:13px;margin-top:8px}.kanban label{font-size:12px;margin-top:10px}.kanban select{font-size:16px}
.empty-state,#empty{padding:20px;background:#f8fafc;border:1px dashed var(--border);font-size:14px}.empty-state h2{font-size:16px}.empty-state p{margin:8px 0 12px}
dialog{border:1px solid var(--border);padding:24px;border-radius:10px;box-shadow:0 16px 48px #0f172a30}dialog::backdrop{background:#0f172a80;backdrop-filter:none}
.dialog-title{margin-bottom:18px}.dialog-title h2{font-size:20px;font-weight:600}.form-footer{padding-top:16px;border-top:1px solid var(--border);margin-top:24px;gap:8px}.form-section legend{font-size:15px;font-weight:600}
.qr-panel{background:#f8fafc;padding:16px}.qr-info strong{font-size:20px;font-family:ui-monospace,SFMono-Regular,Consolas,monospace}.qr-info button{margin-top:0}
.settings-section{padding:16px;margin:16px 0}.report-period{gap:12px;margin:16px 0}.report-group{margin:24px 0}.backup-panel{padding-top:20px;margin-top:24px}
@media(min-width:901px){body.nav-collapsed{--sidebar-width:76px}.nav-collapsed .module-nav{padding-left:8px;padding-right:8px}.nav-collapsed .nav-label,.nav-collapsed .sidebar-label,.nav-collapsed .sidebar-note,.nav-collapsed .sidebar-brand span{display:none}.nav-collapsed .module-nav>a:not(.brand){justify-content:center;padding:12px}.nav-collapsed .sidebar-brand{font-size:12px;letter-spacing:.2px;padding:4px 0 20px;text-align:center}.nav-collapsed .collapse-toggle{justify-content:center}.table-wrap th{position:sticky;top:0;z-index:1}}
@media(max-width:1100px){.filters-toolbar>.search{flex-basis:220px}.overview-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:900px){header,.workspace{margin-left:0}header{padding:8px 20px}.workspace{padding:24px 20px}.collapse-toggle{display:none}.module-nav{width:252px}.plates-table{min-width:0;table-layout:auto}.plates-table td{padding:8px 0}.plates-table td:first-child .plate-code{font-size:16px}.table-wrap th{position:static}.account .user-name{max-width:160px}.kanban-column{flex-basis:280px}.destination-preview span{white-space:nowrap}.app-breadcrumb{font-size:12px;gap:6px}.filter-summary{flex-direction:row;align-items:center}}
@media(max-width:650px){header{height:60px;padding:8px 16px;gap:8px}.workspace{padding:20px 16px}.app-breadcrumb>span{display:none}.app-breadcrumb{flex:1}.account .user-name{display:none}.account .user-avatar{display:grid}.title-row{margin-bottom:16px;gap:12px}.title-row h1,h1{font-size:28px}.title-row>button{width:auto;min-width:140px}.title-actions{width:100%;flex-wrap:wrap}.title-actions>*{flex:0 1 auto}.filters-toolbar{padding:10px;gap:10px}.filters-toolbar>.search{flex-basis:100%}.filter-controls>label{flex:1 1 140px;min-width:0}.filters-toolbar>button{flex:0 0 auto}.filters-toolbar .more-filters{flex:1 1 auto;min-width:0}.filters-toolbar .more-filters>summary{text-align:left}.filters-toolbar .more-filters>.plate-filters{position:static;width:auto;max-width:none;box-shadow:none;padding:12px 0 0;border:0;grid-template-columns:1fr}.filters-toolbar .more-filters[open]{flex-basis:100%;order:10}.filter-summary .result-count{flex-basis:100%}.overview-grid{grid-template-columns:1fr;gap:10px}.overview-grid .record-card{padding:16px}.metric-card .metric-value{font-size:28px}.attention-panel{padding:16px}.attention-item{align-items:flex-start;flex-direction:column;gap:4px}.dashboard-columns>section{padding:16px}.kanban-column{flex:0 0 260px;max-width:calc(100vw - 44px)}.user-menu>summary{padding:0}.user-panel{right:0}.qr-info button{margin-top:0}.plate-code{white-space:nowrap}.table-wrap td{padding:8px 0}}
@media(prefers-reduced-motion:no-preference){dialog[open]{animation:dialog-enter .16s ease-out}@keyframes dialog-enter{from{opacity:0;transform:translateY(4px)}to{opacity:1;transform:translateY(0)}}}

.analytics-page .dashboard-columns>section:first-child{order:2}.analytics-page .dashboard-columns>section:last-child{order:1}
#scan-message:not(:empty){background:transparent;border:0;padding:0;color:var(--muted);font-size:12px}

.plate-client-name{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;font-weight:500}
.plates-table td small{display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden}
.kanban-column>h2{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.kanban .record-card p:not(.state-line){display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
@media(min-width:901px){.list .table-wrap,.client-list .table-wrap{max-height:calc(100dvh - 290px);overflow:auto}}
@media(max-width:650px){.title-row{align-items:stretch}.title-row>button{align-self:flex-start}}

.module-nav .sidebar-brand{min-height:44px}

.badge.success{background:var(--success-bg);color:var(--success-text);border-color:#aed4bc}
/* Keep dialog actions available while long forms and details scroll. */
dialog .form-footer{position:sticky;bottom:-24px;z-index:2;background:var(--surface);margin-left:-24px;margin-right:-24px;margin-bottom:-24px;padding:16px 24px;border-radius:0 0 10px 10px}

/* Official brand and shared header finishing; preserve the operational layout. */
.brand-logo{display:block;width:100%;height:auto;object-fit:contain}.brand-symbol{display:none}
.module-nav .sidebar-brand{display:flex;align-items:center;justify-content:center;background:#fff;border-radius:8px;padding:10px 12px;margin:0 8px 6px;min-height:60px;flex-shrink:0}
.module-nav .sidebar-brand .brand-logo{width:168px;max-width:100%;height:auto}
.login-card .login-brand{display:block;width:224px;max-width:100%;margin-bottom:28px}
.portal-page header>.brand{display:block;width:148px;max-width:calc(100% - 90px)}
header{border-bottom:1px solid var(--border);gap:20px;box-shadow:0 1px 0 #ffffff80}
.app-breadcrumb{flex:1;overflow:hidden;white-space:nowrap}.app-breadcrumb strong{overflow:hidden;text-overflow:ellipsis}
.account{flex-shrink:0;margin-left:auto}.user-menu>summary{min-height:44px;border-radius:6px;padding:4px 8px;gap:10px;transition:background .16s}
.user-menu>summary:hover,.user-menu[open]>summary{background:var(--raised)}
.account .user-identity{display:flex;flex-direction:column;align-items:flex-start;gap:0;min-width:0;max-width:210px}
.account .user-name{display:block;font-size:13px;font-weight:600;line-height:18px;max-width:100%}
.account .user-email{display:block;font-size:11px;color:var(--muted);line-height:16px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}
.account .user-avatar{display:grid;width:34px;height:34px;font-size:12px;background:#eff6ff;color:#1e40af;border:1px solid #dbeafe}
.account .user-chevron{display:block;color:var(--muted);font-size:16px}
.account .user-panel-name{display:block;padding:4px 8px 0;font-size:14px;color:var(--text)}
.account .user-panel #email{padding-top:2px;margin-bottom:6px;border-bottom:1px solid var(--border)}
.user-panel #logout{margin-top:6px;border-top:1px solid var(--border);border-radius:0 0 6px 6px;color:var(--danger)}
.workspace>.title-row{padding-top:2px}.title-row>div:first-child{min-width:0}.title-row p{max-width:760px}
@media(min-width:901px){.nav-collapsed .module-nav .sidebar-brand{margin:0 0 6px;padding:6px;min-height:48px}.nav-collapsed .sidebar-brand .brand-logo{display:none}.nav-collapsed .sidebar-brand .brand-symbol{display:block;width:36px;height:36px}}
@media(max-width:650px){header{gap:8px}.account .user-identity{display:none}.account .user-panel-name{display:block}.account .user-chevron{display:block}.user-menu>summary{padding:4px;gap:4px}.app-breadcrumb{min-width:0}.portal-page header>.brand{width:136px}}
@media(prefers-reduced-motion:reduce){.user-menu>summary{transition:none}}

/* Official Inter typography: one shared scale, without changing operational layouts. */
:root{
 --font-family:"Inter",system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
 --font-weight-regular:400;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;
 --text-xs:.75rem;--text-sm:.8125rem;--text-md:.875rem;--text-lg:1rem;--text-xl:1.25rem;--text-2xl:1.75rem;--text-3xl:2.25rem;
 --line-height-xs:1rem;--line-height-sm:1.125rem;--line-height-md:1.25rem;--line-height-lg:1.5rem;--line-height-xl:1.75rem;--line-height-2xl:2.25rem;--line-height-3xl:2.75rem;
 --tracking-tight:-.02em;--tracking-heading:-.01em;--tracking-normal:0;--tracking-label:.01em;--tracking-uppercase:.08em;
 --type-page-title:700 var(--text-2xl)/var(--line-height-2xl) var(--font-family);
 --type-section-title:600 var(--text-xl)/var(--line-height-xl) var(--font-family);
 --type-card-title:600 var(--text-lg)/var(--line-height-lg) var(--font-family);
 --type-body:400 var(--text-md)/var(--line-height-md) var(--font-family);
 --type-label:500 var(--text-sm)/var(--line-height-sm) var(--font-family);
 --type-caption:400 var(--text-xs)/var(--line-height-xs) var(--font-family);
 font-family:var(--font-family);font-optical-sizing:auto;font-feature-settings:"kern","liga","calt";
}
body{font:var(--type-body);letter-spacing:var(--tracking-normal)}
h1,.title-row h1,.login-card h1{font:var(--type-page-title);letter-spacing:var(--tracking-tight)}
h2,.section-heading h2,.attention-panel>h2,.metric-group>h2,.dialog-title h2,.section-title{font:var(--type-section-title);letter-spacing:var(--tracking-heading)}
h3,.record-card h2,.record-card h3,.kanban .record-card h3,.empty-state h2{font:var(--type-card-title);letter-spacing:-.005em}
p,.title-row p,.empty-state p{font:var(--type-body)}
small,.login-card small,.activity-row small,.record-card small,.qr-info p,.scan-note,.analytics-panel span,.account .user-panel #email{font:var(--type-caption);letter-spacing:.005em}
.record-card p,.history-panel li p,.timeline p{font-size:var(--text-sm);line-height:var(--line-height-sm);font-weight:400}
label,.kanban label{font:var(--type-label);letter-spacing:0}
input,select,textarea{font-family:var(--font-family);font-size:var(--text-lg);font-weight:400;line-height:var(--line-height-md)}
input::placeholder,textarea::placeholder{font-weight:400}
button,.download-link,.table-wrap td button,.record-actions button,.kanban .record-card>button,.kanban-column>button,.filters-toolbar .more-filters>summary{font-family:var(--font-family);font-size:var(--text-md);font-weight:500;line-height:var(--line-height-md);letter-spacing:0}
.module-nav>a:not(.brand){font-size:var(--text-md);font-weight:500;line-height:var(--line-height-md)}
.module-nav>a[aria-current=page]{font-weight:600}
.module-nav .sidebar-label{font-size:.6875rem;font-weight:500;line-height:var(--line-height-xs);letter-spacing:var(--tracking-uppercase)}
.app-breadcrumb,.dialog-context{font-size:var(--text-sm);font-weight:400;line-height:var(--line-height-sm)}
.app-breadcrumb strong{font-weight:500}
.account .user-name{font-size:var(--text-md);font-weight:600;line-height:var(--line-height-md)}
.account .user-email{font-size:var(--text-xs);font-weight:400;line-height:var(--line-height-xs)}
.table-wrap table,.table-wrap td{font-size:var(--text-sm);font-weight:400;line-height:var(--line-height-sm)}
.table-wrap th{font-size:var(--text-xs);font-weight:600;line-height:var(--line-height-xs)}
.table-wrap td:first-child,.client-list td:first-child .text-link{font-weight:500}
.table-wrap td::before{font-size:var(--text-xs);line-height:var(--line-height-xs)}
.metric-card h2{font-size:var(--text-sm);font-weight:600;line-height:var(--line-height-sm);letter-spacing:0}
.metric-value,.metric-card .metric-value,.analytics-panel strong{font-size:var(--text-2xl)!important;font-weight:700;line-height:2.125rem;letter-spacing:var(--tracking-tight)}
.metric-card small{line-height:var(--line-height-sm)}
.data,.metric,.currency,.date,.percentage,.table-number,.metric-value,.analytics-panel strong,.table-wrap td,.kanban-summary,#sale-total,.history-panel,.timeline,.activity-row small{font-variant-numeric:tabular-nums lining-nums}
.identifier,.plate-code,.qr-info strong{font-family:var(--font-family);font-size:var(--text-sm);font-weight:500;line-height:var(--line-height-sm);letter-spacing:var(--tracking-label);font-variant-numeric:tabular-nums slashed-zero}
.qr-info strong{font-size:var(--text-xl);line-height:var(--line-height-xl)}
.destination-preview,.url-cell,.nfc-url{font-size:var(--text-sm);font-weight:400;line-height:var(--line-height-sm)}
.badge{font-size:var(--text-xs);font-weight:500;line-height:var(--line-height-xs);letter-spacing:var(--tracking-label)}
.result-count,.filter-summary,.filter-summary .filter-chip,.filter-summary .text-button,.collapse-toggle,.sidebar-note,.kanban-summary,.kanban-empty,.attention-item small{font-size:var(--text-xs);line-height:var(--line-height-xs)}
.activity-row p,.attention-item a{font-size:var(--text-sm);line-height:var(--line-height-sm)}
.module-nav .sidebar-brand .brand-logo{width:136px}
@media(max-width:900px){h1,.title-row h1,.login-card h1{font-size:1.625rem;line-height:2.125rem}.plates-table td:first-child .plate-code{font-size:var(--text-sm)}}
@media(max-width:650px){h1,.title-row h1,.login-card h1{font-size:1.5rem;line-height:2rem}.table-wrap td{font-size:var(--text-md);line-height:var(--line-height-md)}.metric-value,.metric-card .metric-value,.analytics-panel strong{font-size:var(--text-2xl)!important}}

/* Keep the compact topbar at normal size; allow space when text is explicitly enlarged. */
header{height:max(60px,calc(var(--text-md) * 3 + 12px))}

/* Reusable modular summaries: prioritize related data without changing the shell. */
.summary-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px;margin:20px 0;align-items:start}
.summary-grid-wide{grid-template-columns:minmax(0,1.65fr) minmax(0,1fr)}
.summary-panel{background:var(--surface);border:1px solid var(--border);border-radius:10px;padding:24px;min-width:0}
.summary-panel .section-heading{margin-top:0}.summary-panel .section-heading h2{margin:0}.summary-panel .activity-row:last-child{border-bottom:0}
.summary-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;padding:16px 0;border-bottom:1px solid var(--border);margin-bottom:20px}
.summary-stats .metric-value{color:var(--text);margin:8px 0}.summary-stats small{color:var(--muted)}
.summary-panel .activity-row{justify-content:space-between;gap:16px}.summary-panel .activity-row>div{min-width:0}.summary-panel .activity-row:has(.activity-dot){justify-content:flex-start}.summary-panel .activity-row>strong{flex-shrink:0;font-variant-numeric:tabular-nums}
.summary-panel .analytics-panel{border:0;background:transparent;padding:16px 0;margin-bottom:0}.summary-panel .analytics-panel>div{min-width:0}
.analytics-page .summary-grid:has(#attention){grid-template-columns:1fr}.analytics-page #recent{max-width:100%}
@media(max-width:1100px){.summary-grid-wide{grid-template-columns:1fr}.summary-stats{gap:12px}}
@media(max-width:650px){.summary-grid{grid-template-columns:1fr;gap:16px;margin:16px 0}.summary-panel{padding:16px}.summary-stats{grid-template-columns:1fr}.summary-panel .section-heading{flex-wrap:wrap;gap:8px}.summary-panel .analytics-panel{grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}}
.summary-panel .activity-row p,.summary-panel .activity-row small{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}
.summary-stats>.metric-card{border:0;border-radius:0;padding:0;background:transparent;box-shadow:none;min-width:0}

/* Mobile navigation; the original desktop topbar and sidebar remain intact. */
.app-shell>header[hidden]{display:none}.bottom-nav,.nav-close{display:none}
.settings-account{background:var(--surface);border:1px solid var(--border);border-radius:10px;padding:20px;margin:0 0 24px;gap:16px;align-items:center}
.settings-account .user-avatar{display:grid;flex:0 0 40px;width:40px;height:40px}
.settings-account .user-identity{max-width:none;display:flex;flex-direction:column;gap:4px;min-width:0;flex:1}
.settings-account .user-name{display:block;max-width:none;white-space:normal;font:var(--type-card-title)}
.settings-account #email{display:block;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font:var(--type-caption);color:var(--muted)}
.settings-account #logout{flex-shrink:0;background:var(--surface);border-color:var(--border);color:var(--secondary)}
@media(max-width:900px){
 .app-shell .workspace{padding-top:max(24px,calc(16px + env(safe-area-inset-top,0px)));padding-bottom:calc(100px + env(safe-area-inset-bottom,0px))}
 .bottom-nav{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));position:fixed;inset:auto 0 0;z-index:40;min-height:68px;padding:6px max(8px,env(safe-area-inset-right,0px)) calc(6px + env(safe-area-inset-bottom,0px)) max(8px,env(safe-area-inset-left,0px));background:var(--surface);border-top:1px solid var(--border);box-shadow:0 -2px 12px #0f172a08}
 .bottom-nav>a,.bottom-nav>button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;min-width:0;min-height:56px;padding:6px 4px;border:0;border-radius:8px;background:transparent;color:var(--muted);font:var(--type-caption);font-weight:500;text-decoration:none}
 .bottom-nav .nav-icon{display:block;width:22px;height:22px;flex:none}
 .bottom-nav [aria-current=page],.bottom-nav .current-section{color:var(--info-text);background:var(--info-bg)}
 .bottom-nav>a:hover,.bottom-nav>button:hover{background:var(--raised);color:var(--text)}
 .app-shell .module-nav{z-index:60;padding-top:max(12px,env(safe-area-inset-top,0px));padding-bottom:calc(16px + env(safe-area-inset-bottom,0px))}
 .app-shell.nav-open .nav-overlay{z-index:50}.app-shell.nav-open{overflow:hidden}
 .nav-close{display:flex;justify-content:flex-end;background:transparent;color:#e2e8f0;padding:10px 8px;min-height:44px;font:var(--type-label);border:1px solid #334155}
 .nav-close:hover{background:#1e293b;color:white}.settings-account{padding:16px;gap:12px}
}
.settings-account .user-name{color:var(--text)}
@media(max-width:900px) and (orientation:landscape){.app-shell .workspace{padding-left:max(20px,env(safe-area-inset-left,0px));padding-right:max(20px,env(safe-area-inset-right,0px))}}
@media(max-width:900px){.bottom-nav [aria-current=page]:hover,.bottom-nav .current-section:hover{color:var(--info-text);background:var(--info-bg)}}
.field-error{display:block;margin-top:6px;color:var(--danger-text);font-size:var(--text-sm,13px);line-height:1.5}
[aria-invalid=true]{border-color:var(--danger)}
/* Keep dialog context readable when record names are long. */
.dialog-context>:first-child{flex-shrink:0;white-space:nowrap}
@media(max-width:900px){#profile .dialog-title h2{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3;overflow:hidden}}

/* Plate selection reuses the existing list and remains available in mobile cards. */
.plate-bulk{display:flex;align-items:center;flex-wrap:wrap;gap:12px;padding:12px 16px;margin:12px 0;border:1px solid var(--border);border-radius:8px;background:var(--surface)}
.plate-bulk label{margin:0}.plate-bulk>label:has(select){min-width:180px;flex:1}.plate-bulk>span{font-size:var(--text-sm);color:var(--muted)}
.plate-bulk .select-page,.plate-selection{display:inline-flex;align-items:center;gap:8px;min-height:44px;cursor:pointer}
.plate-selection{margin:0 4px 0 0;min-width:32px;vertical-align:middle;justify-content:center}
.plate-bulk input[type=checkbox],.plate-selection input[type=checkbox]{width:20px;height:20px;min-height:20px;padding:0;margin:0;flex-shrink:0;accent-color:var(--primary)}
.plate-bulk input:focus-visible,.plate-selection input:focus-visible{outline:2px solid var(--primary);outline-offset:3px}
.plates-table th:first-child{width:170px}
@media(max-width:650px){.plate-bulk{padding:12px;gap:8px}.plate-bulk .select-page{flex:1 1 100%}.plate-bulk>label:has(select){flex-basis:100%;min-width:0}.plate-bulk>button{flex:1}.plate-bulk>span{flex-basis:100%}}

@media(max-width:650px){.plate-bulk #bulk-download{flex-basis:100%;order:1}}

/* Profile photo with blue active ring. */
.account .user-avatar.has-photo{background:linear-gradient(145deg,#123b87,#2563eb 52%,#60a5fa 77%,#1e40af);padding:2px;border:0;box-sizing:border-box;overflow:hidden}
.account .user-avatar.has-photo img{display:block;width:100%;height:100%;min-width:0;min-height:0;object-fit:cover;object-position:center;border:1.5px solid white;border-radius:50%;box-sizing:border-box}

/* KTIVAR UX foundation — Phase A. Additive visual refinement; no layout or data contract changes. */
:root{
 --ui-radius-sm:6px;
 --ui-radius-md:10px;
 --ui-radius-lg:12px;
 --ui-shadow-rest:0 1px 2px rgba(15,23,42,.035);
 --ui-shadow-hover:0 5px 18px rgba(15,23,42,.065);
 --ui-border-subtle:#e2e8f0;
 --ui-focus-ring:rgba(37,99,235,.18);
 --ui-transition:160ms ease;
}
/* Comfortable panels: soften edges and keep content hierarchy unchanged. */
.app-shell .summary-panel,
.app-shell .settings-section,
.app-shell .record-card{
 border-color:var(--ui-border-subtle);
 border-radius:var(--ui-radius-lg);
 box-shadow:var(--ui-shadow-rest);
}
.app-shell .summary-panel .section-heading,
.app-shell .section-heading{min-width:0}
.app-shell .section-heading h2{letter-spacing:-.015em}
.app-shell .summary-panel .muted,
.app-shell .scan-note{line-height:1.55}
.app-shell .overview-grid>a .record-card{
 transition:border-color var(--ui-transition),box-shadow var(--ui-transition);
}
@media(hover:hover){
 .app-shell .overview-grid>a:hover .record-card{
  border-color:#bfdbfe;
  box-shadow:var(--ui-shadow-hover);
 }
}
.app-shell .overview-grid>a:focus-visible .record-card{
 border-color:var(--primary);
 box-shadow:0 0 0 3px var(--ui-focus-ring);
}
/* Quiet secondary actions, keeping primary blue and destructive semantics intact. */
.app-shell .dashboard-shortcuts a{
 border-radius:var(--ui-radius-md);
 transition:border-color var(--ui-transition),background-color var(--ui-transition);
}
@media(hover:hover){
 .app-shell .dashboard-shortcuts a:hover{background:#eff6ff;border-color:#bfdbfe}
}
/* Refine account action and visible keyboard focus without changing navigation. */
.app-shell .user-menu>summary{border-radius:var(--ui-radius-md);cursor:pointer}
.app-shell .user-menu>summary:focus-visible{
 outline:2px solid var(--primary);
 outline-offset:3px;
}
.app-shell :is(button,a,input,select,textarea):focus-visible{
 outline-offset:3px;
}
/* Preserve accessibility for reduced-motion users. */
@media(prefers-reduced-motion:reduce){
 .app-shell .overview-grid>a .record-card,
 .app-shell .dashboard-shortcuts a{transition:none}
}

/* Dashboard Phase B — visible operational hierarchy without modifying data or API logic. */
body:not(.analytics-page) #operations-section{
 margin:8px 0 28px;
}
body:not(.analytics-page) #operations-section>.section-heading{
 display:flex;
 align-items:center;
 padding:0 0 15px;
 margin-bottom:15px;
 border-bottom:1px solid #e2e8f0;
}
body:not(.analytics-page) #operations-section>.section-heading h2{
 font-size:19px;
 letter-spacing:-.025em;
 color:var(--text);
}
body:not(.analytics-page) #overview-metrics{
 display:grid;
 grid-template-columns:repeat(3,minmax(0,1fr));
 gap:16px;
}
body:not(.analytics-page) #overview-metrics>a{
 min-width:0;
 display:block;
 color:inherit;
 border-radius:14px;
 text-decoration:none;
}
body:not(.analytics-page) #overview-metrics .record-card{
 min-height:158px;
 height:100%;
 display:flex;
 flex-direction:column;
 align-items:flex-start;
 gap:0;
 padding:23px 24px;
 border:1px solid #dbe4f0;
 border-radius:14px;
 background:linear-gradient(160deg,#fff 62%,#f6f9ff 100%);
 box-shadow:0 2px 9px rgba(15,23,42,.035);
}
body:not(.analytics-page) #overview-metrics .record-card h2{
 font-size:13px;
 font-weight:600;
 color:var(--secondary);
 border:0;
 padding:0;
 line-height:1.4;
}
body:not(.analytics-page) #overview-metrics .metric-value{
 font-size:clamp(28px,2.6vw,36px);
 line-height:1.15;
 font-weight:700;
 letter-spacing:-.035em;
 color:var(--text);
 font-variant-numeric:tabular-nums;
 margin:15px 0 9px;
}
body:not(.analytics-page) #overview-metrics .record-card small{
 margin-top:auto;
 line-height:1.5;
 font-size:12px;
 color:var(--muted);
}
body:not(.analytics-page) #scan-section{
 background:linear-gradient(150deg,#fff 60%,#f7faff);
}
body:not(.analytics-page) #scan-section .analytics-panel{
 display:grid;
 grid-template-columns:repeat(4,minmax(0,1fr));
 gap:12px;
 padding:16px 0 7px;
}
body:not(.analytics-page) #scan-section .analytics-panel>div{
 display:flex;
 flex-direction:column;
 justify-content:center;
 gap:6px;
 min-height:98px;
 border:1px solid #e1e9f4;
 border-radius:10px;
 padding:16px;
 background:rgba(255,255,255,.82);
}
body:not(.analytics-page) #scan-section .analytics-panel .featured-metric{
 border:1px solid #bfdbfe;
 background:#eff6ff;
 padding:16px;
}
body:not(.analytics-page) #scan-section .analytics-panel strong{
 font-size:clamp(23px,2vw,30px);
 font-weight:700;
 letter-spacing:-.025em;
 font-variant-numeric:tabular-nums;
 line-height:1.2;
}
body:not(.analytics-page) #scan-section .analytics-panel span{
 font-size:12px;
 color:var(--muted);
 line-height:1.4;
}
body:not(.analytics-page) .summary-grid-wide{
 align-items:stretch;
}
body:not(.analytics-page) .summary-grid-wide>.summary-panel{
 height:100%;
}
body:not(.analytics-page) #commercial-section .summary-stats{
 gap:12px;
}
body:not(.analytics-page) #commercial-section .summary-stats>.metric-card{
 border-radius:9px;
 padding:12px;
 background:#f8fafc;
 min-width:0;
}
body:not(.analytics-page) #commercial-section .summary-stats .metric-value{
 font-size:clamp(17px,1.7vw,23px);
 overflow-wrap:anywhere;
}
body:not(.analytics-page) .summary-panel .activity-row{
 border-radius:7px;
 padding-left:6px;
 padding-right:6px;
}
@media(hover:hover){
 body:not(.analytics-page) .summary-panel a.activity-row:hover{
  background:#f4f8ff;
  text-decoration:none;
 }
 body:not(.analytics-page) #overview-metrics>a:hover .record-card{
  border-color:#93c5fd;
  box-shadow:0 9px 22px rgba(37,99,235,.09);
 }
}
body:not(.analytics-page) .summary-panel a.activity-row:focus-visible{
 outline:2px solid var(--primary);
 outline-offset:2px;
}
@media(max-width:1150px){
 body:not(.analytics-page) #scan-section .analytics-panel{
  grid-template-columns:repeat(2,minmax(0,1fr));
 }
}
@media(max-width:800px){
 body:not(.analytics-page) #overview-metrics{
  grid-template-columns:repeat(2,minmax(0,1fr));
 }
}
@media(max-width:650px){
 body:not(.analytics-page) #operations-section{margin:4px 0 24px}
 body:not(.analytics-page) #overview-metrics{grid-template-columns:1fr;gap:10px}
 body:not(.analytics-page) #overview-metrics .record-card{
  min-height:0;
  padding:17px 18px;
 }
 body:not(.analytics-page) #overview-metrics .metric-value{
  font-size:30px;
  margin:9px 0 7px;
 }
 body:not(.analytics-page) #scan-section .analytics-panel{
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:9px;
 }
 body:not(.analytics-page) #scan-section .analytics-panel>div{
  min-height:90px;
  padding:12px;
 }
 body:not(.analytics-page) #commercial-section .summary-stats{
  grid-template-columns:1fr;
 }
}
@media(prefers-reduced-motion:reduce){
 body:not(.analytics-page) #overview-metrics>a .record-card{
  transition:none;
 }
}

/* KTIVAR neutral UI and two accessible appearance palettes.
   Light is the default. Blue is reserved for actions, focus and selection. */
:root{
 --ui-surface-muted:#f8fafc;
 --ui-surface-hover:#f1f5f9;
 --ui-surface-selected:#eff6ff;
 --ui-border-soft:#e2e8f0;
 --ui-interactive-border:#cbd5e1;
 --ui-elevation:0 1px 3px rgba(15,23,42,.025);
}
body{background:var(--bg);color:var(--text)}
/* Shared, low-noise light refinement across operation, commercial and settings. */
.app-shell .record-card,.app-shell .summary-panel,.app-shell .settings-section,
.app-shell .attention-panel,.app-shell .filters-toolbar{
 box-shadow:var(--ui-elevation);
}
.app-shell .record-card,.app-shell .summary-panel,.app-shell .settings-section{
 border-radius:10px;
}
.app-shell .section-heading{border-bottom-color:var(--border)}
.app-shell .section-heading h2{font-weight:600}
.app-shell .user-panel,.app-shell .filters-toolbar .more-filters>.plate-filters{
 background:var(--surface);
}
.app-shell .dashboard-shortcuts a{background:var(--surface)}
/* The earlier dashboard gradients were stronger than the chosen references. */
html[data-theme="light"] body:not(.analytics-page) #overview-metrics .record-card{
 background:var(--surface);
 border-color:var(--border);
 box-shadow:var(--ui-elevation);
}
html[data-theme="light"] body:not(.analytics-page) #scan-section{
 background:var(--surface);
}
html[data-theme="light"] body:not(.analytics-page) #scan-section .analytics-panel>div{
 background:var(--surface);
 border-color:var(--border);
}
html[data-theme="light"] body:not(.analytics-page) #scan-section .analytics-panel .featured-metric{
 background:var(--ui-surface-selected);
 border-color:#bfdbfe;
}
html[data-theme="light"] body:not(.analytics-page) #commercial-section .summary-stats>.metric-card{
 background:var(--ui-surface-muted);
}
.theme-control{padding:12px 8px 10px;border-top:1px solid var(--border)}
.theme-control-label{display:block;margin-bottom:9px;color:var(--muted);font-size:12px;font-weight:600}
.theme-options{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:4px;padding:4px;background:var(--raised);border:1px solid var(--border);border-radius:9px}
.theme-options button,.app-shell .theme-options button{
 display:block;width:100%;min-width:0;min-height:36px;padding:8px 4px;border:1px solid transparent;
 background:transparent;color:var(--secondary);font-size:12px;line-height:1.3;border-radius:6px;
}
.theme-options button[aria-pressed="true"],.app-shell .theme-options button[aria-pressed="true"]{
 background:var(--surface);border-color:var(--border);color:var(--text);
 box-shadow:0 1px 2px rgba(15,23,42,.06);font-weight:600;
}
.theme-options button:hover,.app-shell .theme-options button:hover{
 background:var(--ui-surface-hover);color:var(--text);
}
.theme-options button:focus-visible{outline:2px solid var(--primary);outline-offset:2px}
.settings-theme{display:none;max-width:560px;margin:0 0 22px;padding:16px;background:var(--surface);border:1px solid var(--border);border-radius:10px}
@media(max-width:900px){.settings-theme{display:block}}
/* Dark theme uses the same layout and shared tokens, not inverted photographs or brand SVGs. */
html[data-theme="dark"]{
 color-scheme:dark;
 --bg:#0b0b0c;
 --sidebar:#111112;
 --surface:#19191b;
 --raised:#242426;
 --border:#333337;
 --text:#f5f5f6;
 --secondary:#dedee2;
 --muted:#aaaab2;
 --primary:#3b82f6;
 --hover:#2563eb;
 --info-bg:#192b42;
 --info-text:#bfdbfe;
 --success-bg:#153628;
 --success-text:#a7f3d0;
 --warning-bg:#38301d;
 --warning-text:#fde68a;
 --danger-bg:#382123;
 --danger-text:#fecaca;
 --ui-surface-muted:#202022;
 --ui-surface-hover:#29292c;
 --ui-surface-selected:#192a40;
 --ui-border-soft:#333337;
 --ui-interactive-border:#58585e;
 --ui-elevation:none;
 --ui-shadow-rest:none;
 --ui-shadow-hover:0 4px 16px rgba(0,0,0,.18);
 --ui-focus-ring:rgba(96,165,250,.25);
}
/* Components contain some historical fixed light colors; explicitly cover them. */
html[data-theme="dark"] body,
html[data-theme="dark"] header,
html[data-theme="dark"] .workspace{color:var(--text);background:var(--bg)}
html[data-theme="dark"] header{background:var(--surface);border-color:var(--border)}
html[data-theme="dark"] .module-nav{background:var(--sidebar)}
html[data-theme="dark"] .module-nav>a:not(.brand):hover,
html[data-theme="dark"] .module-nav>a[aria-current=page]{background:var(--ui-surface-selected)}
html[data-theme="dark"] :is(.record-card,.metric-card,.summary-panel,.settings-section,.attention-panel,.filters-toolbar,.login-card,.portal-page .record-card,.plate-bulk,.settings-account,.user-panel,.theme-control,.settings-theme,.dashboard-columns>section){
 background:var(--surface);border-color:var(--border);color:var(--text);box-shadow:none;
}
html[data-theme="dark"] :is(.filters-toolbar .more-filters>summary,.filters-toolbar .more-filters>.plate-filters,.filter-summary .filter-chip,.kanban-column,.empty-state,#empty,.qr-panel,.user-avatar,.bottom-nav,.form-section,.disclosure,.more-filters,.login-mark){
 background:var(--raised);border-color:var(--border);color:var(--text);
}
html[data-theme="dark"] :is(.table-wrap th,thead th){background:var(--raised);color:var(--secondary);border-color:var(--border)}
html[data-theme="dark"] :is(.table-wrap td,tbody td,thead,tbody tr){border-color:var(--border);color:var(--text)}
html[data-theme="dark"] :is(tbody tr:hover,.table-wrap tbody tr:hover){background:var(--ui-surface-hover)}
html[data-theme="dark"] :is(input,select,textarea){
 background:#141416;border-color:var(--ui-interactive-border);color:var(--text);color-scheme:dark;
}
html[data-theme="dark"] :is(input,textarea)::placeholder{color:#b0bdd0}
html[data-theme="dark"] input[readonly]{background:var(--raised);color:var(--secondary)}
html[data-theme="dark"] :is(.secondary,.dashboard-shortcuts a,.filters-toolbar .more-filters>summary,.bottom-nav>a,.bottom-nav>button,.user-panel a,.user-panel button){
 background:var(--surface);border-color:var(--border);color:var(--secondary);
}
html[data-theme="dark"] :is(.secondary:hover,.dashboard-shortcuts a:hover,.user-panel a:hover,.user-panel button:hover,.bottom-nav>a:hover,.bottom-nav>button:hover){
 background:var(--ui-surface-hover);color:var(--text);
}
html[data-theme="dark"] a{color:#93c5fd}
html[data-theme="dark"] :is(.text-button,.text-link,.section-heading a,.activity-row a,.plate-code){color:#93c5fd}
html[data-theme="dark"] .theme-options button{color:var(--secondary)}
html[data-theme="dark"] .theme-options button[aria-pressed="true"]{color:#fff}
html[data-theme="dark"] :is(.activity-row,.section-heading,.form-footer,.summary-stats,.form-section,.disclosure,.user-panel,.table-wrap,.plate-bulk){
 border-color:var(--border);
}
html[data-theme="dark"] .badge.inactive{background:#28282a;border-color:var(--border);color:#d4d4d8}
html[data-theme="dark"] .badge.stock{background:#42331e;border-color:#70532e;color:#fde68a}
html[data-theme="dark"] :is(.badge.info,.badge.configured,.badge.ready,.badge.delivered){background:#1d3046;border-color:#36516f;color:#bfdbfe}
html[data-theme="dark"] .badge.success{background:var(--success-bg);border-color:#27664f;color:var(--success-text)}
html[data-theme="dark"] .filter-summary .filter-chip:hover{background:var(--ui-surface-hover)}
html[data-theme="dark"] .analytics-panel>div{background:var(--surface);border-color:var(--border)}
html[data-theme="dark"] .analytics-panel .featured-metric{background:var(--ui-surface-selected);border-color:#4a7fbd}
html[data-theme="dark"] .analytics-panel strong,
html[data-theme="dark"] .metric-card .metric-value{color:var(--text)}
html[data-theme="dark"] body:not(.analytics-page) #overview-metrics .record-card,
html[data-theme="dark"] body:not(.analytics-page) #scan-section,
html[data-theme="dark"] body:not(.analytics-page) #scan-section .analytics-panel>div,
html[data-theme="dark"] body:not(.analytics-page) #commercial-section .summary-stats>.metric-card{
 background:var(--surface);border-color:var(--border);box-shadow:none;
}
html[data-theme="dark"] body:not(.analytics-page) #scan-section .analytics-panel .featured-metric{
 background:var(--ui-surface-selected);border-color:#4777ad;
}
html[data-theme="dark"] .summary-panel .activity-row:has(a):hover,
html[data-theme="dark"] .summary-panel a.activity-row:hover{background:var(--ui-surface-hover)}
html[data-theme="dark"] dialog{
 background:var(--surface);border-color:var(--border);color:var(--text);box-shadow:0 20px 60px rgba(0,0,0,.3);
}
html[data-theme="dark"] dialog::backdrop{background:rgba(0,0,0,.72)}
html[data-theme="dark"] .user-panel{background:var(--surface)}
html[data-theme="dark"] .theme-options{background:var(--raised);border-color:var(--border)}
html[data-theme="dark"] .theme-options button[aria-pressed="true"]{background:#303035;border-color:var(--ui-interactive-border);color:#fff}
html[data-theme="dark"] .theme-options button:hover{background:var(--ui-surface-hover)}
html[data-theme="dark"] .bottom-nav [aria-current=page],
html[data-theme="dark"] .bottom-nav .current-section{background:var(--ui-surface-selected);color:#bfdbfe}
html[data-theme="dark"] .kanban-column{background:#1b283b}
html[data-theme="dark"] .kanban .record-card{background:var(--surface)}
html[data-theme="dark"] .user-avatar{background:#262628;color:var(--text)}
html[data-theme="dark"] .login-card .brand-logo,
html[data-theme="dark"] .portal-page .brand-logo{background:#fff;border-radius:8px;padding:6px}
html[data-theme="dark"] .app-breadcrumb strong{color:var(--secondary)}
html[data-theme="dark"] .settings-account #email{color:var(--muted)}
/* Print always uses readable paper surfaces, regardless of current theme. */
@media print{
 html[data-theme="dark"]{color-scheme:light;--bg:#fff;--surface:#fff;--raised:#f8fafc;--text:#0f172a;--secondary:#334155;--muted:#475569;--border:#d4dce5}
}

/* KTIVAR Dashboard reference design: structural layout with real data, 2026.
   Scope intentionally limited to the Dashboard; Analytics keeps its existing presentation.
   Neutral Studio Admin-like hierarchy with the KTIVAR brand. */
body:not(.analytics-page).app-shell .workspace:has(#operations-section){
 max-width:1760px;
 padding:30px clamp(18px,2.25vw,36px) 48px;
}
body:not(.analytics-page) .dashboard-overline{
 display:flex;align-items:center;justify-content:space-between;gap:16px;
 margin:4px 0 13px;
}
body:not(.analytics-page) .dashboard-overline h2{
 font-size:13px;font-weight:600;letter-spacing:0;color:var(--secondary);margin:0;
}
body:not(.analytics-page) .dashboard-overline span{
 font-size:12px;color:var(--muted);
}
body:not(.analytics-page) #operations-section{
 margin:4px 0 25px;
}
body:not(.analytics-page) #overview-metrics{
 display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:13px;
}
body:not(.analytics-page) #overview-metrics>a{
 display:block;min-width:0;border-radius:12px;
}
body:not(.analytics-page) #overview-metrics .record-card{
 display:flex;flex-direction:column;align-items:stretch;gap:0;
 min-height:142px;height:100%;padding:19px 20px 17px;
 border:1px solid var(--border);border-radius:12px;background:var(--surface);
 box-shadow:none;
}
body:not(.analytics-page) #overview-metrics .dashboard-kpi-top{
 display:flex;align-items:center;justify-content:space-between;gap:12px;
}
body:not(.analytics-page) #overview-metrics .record-card h2{
 font-size:13px;font-weight:500;line-height:1.4;color:var(--muted);
}
body:not(.analytics-page) #overview-metrics .dashboard-kpi-arrow{
 display:grid;place-items:center;flex-shrink:0;
 width:25px;height:25px;border:1px solid var(--border);
 border-radius:7px;background:var(--raised);font-size:13px;
 color:var(--muted);
}
body:not(.analytics-page) #overview-metrics .metric-value{
 font-size:clamp(27px,2.3vw,34px);font-weight:700;line-height:1.13;
 letter-spacing:-.035em;color:var(--text);margin:13px 0 10px;
 font-variant-numeric:tabular-nums;
}
body:not(.analytics-page) #overview-metrics .record-card small{
 margin-top:auto;font-size:12px;line-height:1.45;color:var(--muted);
}
@media(hover:hover){
 body:not(.analytics-page) #overview-metrics>a:hover .record-card{
  border-color:var(--ui-interactive-border);
  box-shadow:0 3px 10px rgba(15,23,42,.035);
 }
}
body:not(.analytics-page) #overview-metrics>a:focus-visible .record-card{
 outline:2px solid var(--primary);outline-offset:3px;
}
/* Visible analytical composition, with no simulated chart series. */
body:not(.analytics-page) .dashboard-analysis{
 grid-template-columns:minmax(0,1.58fr) minmax(300px,1fr);
 gap:16px;margin:0 0 16px;align-items:stretch;
}
body:not(.analytics-page) .dashboard-analysis>.summary-panel,
body:not(.analytics-page) #commercial-section>.summary-panel,
body:not(.analytics-page) .summary-grid:has(#attention)>.summary-panel{
 border:1px solid var(--border);
 background:var(--surface);
 box-shadow:none;
 border-radius:12px;padding:23px 24px;
 min-width:0;
}
body:not(.analytics-page) .dashboard-analysis .section-heading{
 display:flex;align-items:flex-start;justify-content:space-between;
 flex-wrap:wrap;gap:8px 16px;margin:0;padding:0 0 18px;
 border-bottom:1px solid var(--border);
}
body:not(.analytics-page) .dashboard-analysis .section-heading h2,
body:not(.analytics-page) #commercial-section .section-heading h2,
body:not(.analytics-page) .summary-grid:has(#attention) .section-heading h2{
 font-size:16px;letter-spacing:-.015em;font-weight:600;
}
body:not(.analytics-page) .panel-subtitle{
 color:var(--muted);font-size:12px;line-height:1.55;
 margin:4px 0 0;
}
body:not(.analytics-page) .dashboard-analysis .section-heading a{
 flex-shrink:0;font-size:12px;font-weight:500;
 padding:5px 0;
}
body:not(.analytics-page) #scan-section .analytics-panel{
 display:grid;grid-template-columns:repeat(4,minmax(0,1fr));
 gap:11px;padding:23px 0 21px;margin:0;
}
body:not(.analytics-page) #scan-section .analytics-panel>div{
 display:flex;flex-direction:column;gap:10px;
 justify-content:center;min-height:108px;
 border:1px solid var(--border);border-radius:9px;
 background:var(--ui-surface-muted);padding:15px 13px;
}
body:not(.analytics-page) #scan-section .analytics-panel strong{
 font-size:clamp(23px,2.05vw,30px);
 font-weight:650;letter-spacing:-.03em;line-height:1.2;
 color:var(--text);
}
body:not(.analytics-page) #scan-section .analytics-panel span{
 font-size:12px;color:var(--muted);line-height:1.4;
}
body:not(.analytics-page) #scan-section .analytics-panel .featured-metric{
 background:var(--ui-surface-selected);
 border:1px solid var(--border);padding:15px 13px;
}
body:not(.analytics-page) .dashboard-analysis-note{
 display:flex;align-items:flex-start;gap:9px;
 color:var(--muted);font-size:12px;line-height:1.6;
 padding:12px 0 0;border-top:1px solid var(--border);
}
body:not(.analytics-page) .analysis-dot{
 display:block;flex:0 0 7px;width:7px;height:7px;margin-top:6px;
 border-radius:50%;background:var(--primary);opacity:.8;
}
body:not(.analytics-page) .ranked-plate{
 display:block;min-width:0;padding:14px 0;
 border-bottom:1px solid var(--border);
 text-decoration:none;color:inherit;
}
body:not(.analytics-page) .ranked-plate:last-child{border-bottom:0}
body:not(.analytics-page) .ranked-plate-main{
 display:flex;align-items:center;gap:12px;
}
body:not(.analytics-page) .ranked-plate-index{
 display:grid;place-items:center;flex:0 0 29px;
 height:29px;background:var(--raised);border:1px solid var(--border);
 border-radius:8px;font-size:12px;font-weight:600;color:var(--secondary);
}
body:not(.analytics-page) .ranked-plate-detail{
 min-width:0;display:flex;flex:1;flex-direction:column;gap:2px;
}
body:not(.analytics-page) .ranked-plate-detail strong{
 color:var(--text);font-size:13px;font-weight:600;
 white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
body:not(.analytics-page) .ranked-plate-detail span{
 color:var(--muted);font-size:12px;
 white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
body:not(.analytics-page) .ranked-plate-count{
 flex:0 0 auto;font-variant-numeric:tabular-nums;
 color:var(--text);font-size:14px;font-weight:650;
}
body:not(.analytics-page) .ranked-plate-track{
 height:5px;background:var(--raised);border-radius:99px;
 overflow:hidden;margin:11px 0 0 41px;
}
body:not(.analytics-page) .ranked-plate-fill{
 display:block;height:100%;border-radius:99px;
 background:var(--primary);
}
@media(hover:hover){
 body:not(.analytics-page) .ranked-plate:hover .ranked-plate-detail strong{color:var(--primary)}
}
body:not(.analytics-page) #commercial-section{
 gap:16px;margin:0 0 16px;
}
body:not(.analytics-page) #commercial-section .section-heading{
 border-bottom:1px solid var(--border);padding-bottom:15px;margin-bottom:14px;
}
body:not(.analytics-page) #commercial-section .section-heading a{
 align-self:center;
}
body:not(.analytics-page) #commercial-section .summary-stats{
 border:0;padding:7px 0 16px;gap:12px;
}
body:not(.analytics-page) #commercial-section .summary-stats>.metric-card{
 padding:12px;background:var(--ui-surface-muted);
 border:1px solid var(--border);border-radius:9px;
}
body:not(.analytics-page) #commercial-section .summary-stats .metric-value{
 font-size:clamp(17px,1.55vw,23px);
 font-weight:650;line-height:1.3;word-break:break-word;
}
body:not(.analytics-page) .summary-grid:has(#attention){
 gap:16px;margin:0 0 18px;
}
body:not(.analytics-page) .summary-panel .activity-row{
 border-bottom:1px solid var(--border);
 padding:12px 5px;border-radius:0;
}
body:not(.analytics-page) #shortcuts-section{
 padding:4px 0 2px;
}
body:not(.analytics-page) .dashboard-shortcuts{
 gap:8px;margin:10px 0 0;
}
body:not(.analytics-page) .dashboard-shortcuts a{
 background:var(--surface);
 border:1px solid var(--border);
 border-radius:8px;
}
html[data-theme="dark"] body:not(.analytics-page) #overview-metrics .record-card,
html[data-theme="dark"] body:not(.analytics-page) .dashboard-analysis>.summary-panel,
html[data-theme="dark"] body:not(.analytics-page) #commercial-section>.summary-panel,
html[data-theme="dark"] body:not(.analytics-page) .summary-grid:has(#attention)>.summary-panel{
 background:var(--surface);border-color:var(--border);box-shadow:none;
}
html[data-theme="dark"] body:not(.analytics-page) #scan-section .analytics-panel>div,
html[data-theme="dark"] body:not(.analytics-page) #commercial-section .summary-stats>.metric-card{
 background:var(--ui-surface-muted);border-color:var(--border);
}
html[data-theme="dark"] body:not(.analytics-page) #scan-section .analytics-panel .featured-metric{
 background:var(--ui-surface-selected);border-color:var(--border);
}
html[data-theme="dark"] body:not(.analytics-page) .ranked-plate-fill{background:#60a5fa}
@media(max-width:1200px){
 body:not(.analytics-page) .dashboard-analysis{grid-template-columns:1fr}
}
@media(max-width:1050px){
 body:not(.analytics-page) #overview-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:700px){
 body:not(.analytics-page) .dashboard-analysis .section-heading{flex-direction:column}
 body:not(.analytics-page) #scan-section .analytics-panel{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:650px){
 body:not(.analytics-page).app-shell .workspace:has(#operations-section){
  padding:20px 16px 100px;
 }
 body:not(.analytics-page) #operations-section{margin:4px 0 18px}
 body:not(.analytics-page) #overview-metrics{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
 body:not(.analytics-page) #overview-metrics .record-card{
  padding:15px 13px;min-height:137px;
 }
 body:not(.analytics-page) #overview-metrics .metric-value{font-size:27px;margin:10px 0 8px}
 body:not(.analytics-page) #overview-metrics .record-card h2{font-size:12px}
 body:not(.analytics-page) #overview-metrics .record-card small{font-size:11px}
 body:not(.analytics-page) .dashboard-analysis>.summary-panel,
 body:not(.analytics-page) #commercial-section>.summary-panel,
 body:not(.analytics-page) .summary-grid:has(#attention)>.summary-panel{
  padding:18px 16px;
 }
 body:not(.analytics-page) #scan-section .analytics-panel>div{min-height:91px;padding:12px}
 body:not(.analytics-page) .dashboard-overline span{display:none}
 body:not(.analytics-page) #commercial-section .summary-stats{grid-template-columns:1fr}
}

/* KTIVAR product-wide visual foundation — November 2026.
   Shared systems across Dashboard, Clientes, Placas, CRM, Produtos,
   Vendas, Atividades, Analytics, Relatórios and Configurações.
   Uses existing HTML/JS, real records and theme tokens; no new dependency. */
:root{
 --ds-radius-xs:6px;--ds-radius-sm:8px;--ds-radius-md:11px;--ds-radius-lg:14px;
 --ds-panel-padding:22px;--ds-control-height:44px;
 --ds-subtle:var(--raised);--ds-panel:var(--surface);
 --ds-outline:var(--border);--ds-shadow:none;
 --ds-accent-subtle:var(--ui-surface-selected,#eff6ff);
 --ds-focus-color:var(--primary);
}
html[data-theme="dark"]{--ds-shadow:none;--ds-accent-subtle:#1d3558}
.app-shell{
 background:var(--bg);color:var(--text);
 font-variant-numeric:tabular-nums;
}
.app-shell .workspace{
 width:auto;max-width:1760px;
 padding:28px clamp(18px,2.2vw,36px) 50px;
}
.app-shell .title-row{
 gap:20px;margin-bottom:22px;
 align-items:center;
}
.app-shell .title-row h1{
 font-size:clamp(24px,2.15vw,30px);
 letter-spacing:-.035em;line-height:1.2;font-weight:700;
}
.app-shell .title-row .muted{
 margin:5px 0 0;
 max-width:78ch;
 line-height:1.55;
 color:var(--muted);
}
.app-shell .title-actions{align-items:center;gap:8px}
.app-shell .title-actions>a,.app-shell .title-actions>button{
 border-radius:var(--ds-radius-sm);
}
.app-shell .section-heading{
 display:flex;align-items:flex-start;
 justify-content:space-between;gap:12px;
 padding-bottom:13px;margin-bottom:15px;
}
.app-shell .section-heading h2,
.app-shell .section-title{
 font-size:16px;font-weight:600;letter-spacing:-.015em;line-height:1.45;
}
.app-shell .section-heading a{font-size:12px;font-weight:550}
.app-shell .module-nav>a:not(.brand){
 border-radius:var(--ds-radius-sm);
}
.app-shell .module-nav .sidebar-label{
 font-weight:600;letter-spacing:.095em;
}
.app-shell :is(.record-card,.summary-panel,.settings-section,.attention-panel,.report-group,.backup-panel,.list){
 background:var(--ds-panel);
 border:1px solid var(--ds-outline);
 border-radius:var(--ds-radius-md);
 box-shadow:var(--ds-shadow);
}
.app-shell :is(.record-card,.settings-section,.summary-panel,.report-group){
 min-width:0;
}
.app-shell .record-card h2,.app-shell .record-card h3{
 letter-spacing:-.012em;line-height:1.45;font-weight:600;
}
.app-shell :is(.record-card,.summary-panel,.settings-section,.report-group) :is(p,small){
 line-height:1.55;
}
.app-shell .record-card .muted{color:var(--muted)}
.app-shell .record-list{gap:13px}
.app-shell :is(.metric-card,.summary-panel) .metric-value{
 font-variant-numeric:tabular-nums;
 font-weight:700;letter-spacing:-.03em;
}
.app-shell .metric-card h2{font-size:13px;font-weight:500}
.app-shell .metric-card small{font-size:12px}
.app-shell :is(.filters-toolbar,.toolbar,.report-period){
 gap:10px;align-items:flex-end;
}
.app-shell .filters-toolbar,.app-shell .report-period{
 background:var(--surface);
 border:1px solid var(--border);
 border-radius:var(--ds-radius-md);
 padding:13px;
 box-shadow:none;
}
.app-shell .filters-toolbar .more-filters>summary,
.app-shell :is(button,.download-link){
 border-radius:var(--ds-radius-sm);
}
.app-shell :is(input,select,textarea){
 border:1px solid var(--ui-interactive-border,var(--border));
 background:var(--surface);
 color:var(--text);
 border-radius:var(--ds-radius-sm);
}
.app-shell :is(input,select,textarea):focus{
 outline:2px solid var(--ui-focus-ring,rgba(37,99,235,.22));
 outline-offset:1px;
 border-color:var(--primary);
}
.app-shell :is(button,a,summary,input,select,textarea):focus-visible{
 outline:2px solid var(--ds-focus-color);
 outline-offset:3px;
}
.app-shell .more-filters>.plate-filters{
 background:var(--surface);border-radius:var(--ds-radius-md);
}
.app-shell .filter-chip{
 background:var(--raised);border-color:var(--border);border-radius:99px;
}
.app-shell .filter-summary{
 min-height:0;margin:9px 0 14px;
}
.app-shell .table-wrap{
 overflow-x:auto;overscroll-behavior-x:contain;
 background:var(--surface);
 border-radius:inherit;
}
.app-shell :is(.list,table){border-color:var(--border)}
.app-shell table{
 width:100%;border-collapse:separate;border-spacing:0;
 font-variant-numeric:tabular-nums;
}
.app-shell :is(.table-wrap th,thead th){
 font-size:12px;font-weight:600;letter-spacing:0;
 color:var(--muted);
 background:var(--raised);
 border-bottom:1px solid var(--border);
 padding:12px 15px;
}
.app-shell :is(.table-wrap td,tbody td){
 padding:12px 15px;
 vertical-align:middle;line-height:1.5;
 border-bottom:1px solid var(--border);
}
.app-shell :is(.table-wrap tbody tr,tbody tr){
 transition:background-color .14s ease;
}
.app-shell :is(.table-wrap tbody tr:hover,tbody tr:hover){
 background:var(--ui-surface-hover);
}
.app-shell :is(.table-wrap tbody tr:last-child td,tbody tr:last-child td){
 border-bottom:0;
}
.app-shell :is(.pagination,.record-actions){
 gap:8px;
}
.app-shell .pagination{
 border-top:1px solid var(--border);
 padding-top:13px;
 margin-top:15px;
 font-size:12px;
}
.app-shell .pagination button{min-height:40px}
.app-shell .badge{
 border:1px solid transparent;
 border-radius:99px;padding:4px 8px;
 font-weight:550;font-size:12px;line-height:1.35;
}
.app-shell :is(.empty-state,#empty){
 background:var(--raised);
 border:1px dashed var(--border);
 border-radius:var(--ds-radius-md);
 color:var(--muted);
 padding:24px 18px;
}
.app-shell :is(dialog,#record-editor,#profile,#editor){
 border-radius:var(--ds-radius-lg);
 border-color:var(--border);
 background:var(--surface);
 color:var(--text);
}
.app-shell dialog .dialog-title{
 border-bottom:1px solid var(--border);
 padding-bottom:14px;margin-bottom:20px;
}
.app-shell dialog .form-section{
 border-top:1px solid var(--border);
}
.app-shell dialog .form-footer{
 border-top:1px solid var(--border);
 margin-top:19px;padding-top:16px;
}
.app-shell .kanban{
 gap:13px;align-items:flex-start;
}
.app-shell .kanban-column{
 border:1px solid var(--border);
 border-radius:var(--ds-radius-md);
 background:var(--raised);
 padding:13px;
 min-width:0;
}
.app-shell .kanban-column>h2{
 font-size:14px;font-weight:600;letter-spacing:-.012em;
}
.app-shell .kanban .record-card{
 border-radius:var(--ds-radius-sm);
 padding:13px;
 background:var(--surface);
}
.app-shell .kanban-summary{font-size:12px;line-height:1.5}
.app-shell .kanban-empty{font-size:12px}
.app-shell .dashboard-shortcuts a{
 border-radius:var(--ds-radius-sm);
}
.app-shell .user-panel{border-radius:var(--ds-radius-md)}
.app-shell .theme-options button{border-radius:var(--ds-radius-xs)}
.app-shell :is(.backup-panel,.report-group,.report-period){
 border-color:var(--border);
}
.app-shell .report-period :is(input,select){min-width:0}
.app-shell :is(.analytics-panel,.summary-stats){min-width:0}
.app-shell .analytics-panel>div{
 border-radius:var(--ds-radius-sm);
 border-color:var(--border);
 background:var(--raised);
}
/* Keep UI contrast linked to semantic palette in both light and dark modes. */
html[data-theme="dark"] .app-shell :is(.filters-toolbar,.report-period,.list,.record-card,.summary-panel,.settings-section,.backup-panel,.report-group){
 background:var(--surface);border-color:var(--border);
}
html[data-theme="dark"] .app-shell :is(.table-wrap th,thead th){background:var(--raised)}
html[data-theme="dark"] .app-shell :is(.table-wrap tbody tr:hover,tbody tr:hover){background:var(--ui-surface-hover)}
html[data-theme="dark"] .app-shell .kanban-column{background:var(--raised)}
html[data-theme="dark"] .app-shell .kanban .record-card{background:var(--surface)}
html[data-theme="dark"] .app-shell .filters-toolbar input,
html[data-theme="dark"] .app-shell .report-period :is(input,select){
 background:#141416;border-color:var(--ui-interactive-border);color:var(--text);
}
html[data-theme="dark"] .app-shell .analytics-panel>div{background:var(--raised)}
@media(min-width:901px){
 .app-shell .workspace{min-height:calc(100dvh - 60px)}
 .app-shell .module-nav .sidebar-note{font-size:11px}
}
@media(max-width:900px){
 .app-shell .workspace{padding:22px 20px 105px}
}
@media(max-width:650px){
 .app-shell .workspace{padding:20px 16px 105px}
 .app-shell .title-row{align-items:flex-start}
 .app-shell .title-row h1{font-size:24px}
 .app-shell .title-actions{width:100%}
 .app-shell :is(.filters-toolbar,.report-period){padding:12px;gap:9px}
 .app-shell :is(.record-card,.summary-panel,.settings-section){border-radius:10px}
 .app-shell :is(.table-wrap th,thead th){padding:11px 12px}
 .app-shell :is(.table-wrap td,tbody td){padding:12px}
 .app-shell .pagination{justify-content:center}
 .app-shell .kanban-column{flex-basis:286px}
}
@media(prefers-reduced-motion:reduce){
 .app-shell :is(.table-wrap tbody tr,tbody tr){transition:none}
}

/* Shape-matched loading state avoids layout jumps on first visit. */
body:not(.analytics-page) #overview-metrics .ui-skeleton-kpi,
body:not(.analytics-page) #scan-metrics .ui-skeleton-scan,
body:not(.analytics-page) #top-plates .ui-skeleton-row{
 position:relative;overflow:hidden;
 background:var(--raised);border:1px solid var(--border);
 border-radius:var(--ds-radius-md,11px);
}
body:not(.analytics-page) #overview-metrics .ui-skeleton-kpi{min-height:142px}
body:not(.analytics-page) #scan-metrics .ui-skeleton-scan{min-height:108px}
body:not(.analytics-page) #top-plates .ui-skeleton-row{min-height:65px;margin:10px 0}
body:not(.analytics-page) .ui-skeleton::before,
body:not(.analytics-page) .ui-skeleton::after{
 content:"";position:absolute;left:15px;height:11px;border-radius:5px;
 background:var(--border);
}
body:not(.analytics-page) .ui-skeleton::before{top:22px;width:53%}
body:not(.analytics-page) .ui-skeleton::after{top:49px;width:31%;height:22px}
body:not(.analytics-page) .ui-skeleton-row::after{height:9px;top:40px}
@media(max-width:650px){
 body:not(.analytics-page) #overview-metrics .ui-skeleton-kpi{min-height:137px}
 body:not(.analytics-page) #scan-metrics .ui-skeleton-scan{min-height:91px}
}

/* Shared result composition: clients, products, sales, deals, activities, settings. */
.app-shell .module-data-shell{
 margin-top:12px;padding:19px 20px 17px;
 border:1px solid var(--border);
 border-radius:var(--ds-radius-md,11px);
 background:var(--surface);
 min-width:0;
}
.app-shell .module-data-heading{
 display:flex;align-items:center;justify-content:space-between;
 border-bottom:1px solid var(--border);
 margin:0 0 17px;padding:0 0 14px;
}
.app-shell .module-data-heading h2{
 margin:0;font-size:15px;letter-spacing:-.01em;
 color:var(--text);font-weight:600;
}
.app-shell .module-data-shell>.record-list{
 margin:0;
}
.app-shell .module-data-shell .client-list .table-wrap{
 border:1px solid var(--border);
 border-radius:var(--ds-radius-sm,8px);
 overflow:auto;
 background:var(--surface);
}
.app-shell[data-ui-module="clients"] .module-data-shell .client-list{
 display:block;
}
.app-shell[data-ui-module="deals"] .module-data-shell{
 padding-bottom:10px;
}
.app-shell[data-ui-module="deals"] .module-data-shell .kanban{
 margin:0;
}
.app-shell[data-ui-module="config"] .module-data-shell{
 border-color:transparent;background:transparent;padding:0;
}
.app-shell[data-ui-module="config"] .module-data-heading{
 border-color:var(--border);
}
.app-shell[data-ui-module="config"] .settings-section{
 margin:0 0 14px;
}
html[data-theme="dark"] .app-shell .module-data-shell{
 background:var(--surface);border-color:var(--border);
}
html[data-theme="dark"] .app-shell[data-ui-module="config"] .module-data-shell{
 background:transparent;border-color:transparent;
}
@media(max-width:650px){
 .app-shell .module-data-shell{
  padding:15px 13px 14px;
  margin-top:10px;
 }
 .app-shell .module-data-heading{margin-bottom:13px}
 .app-shell[data-ui-module="deals"] .module-data-shell{
  padding:15px 8px 10px;
 }
}

/* Real plates and reporting page composition; never hides data or actions. */
.app-shell .plate-list-panel{
 border:1px solid var(--border);
 border-radius:var(--ds-radius-md,11px);
 background:var(--surface);
 overflow:hidden;
}
.app-shell .plate-list-panel>.module-data-heading{
 margin:0;padding:15px 19px;
 background:var(--surface);
}
.app-shell .plate-list-panel>.table-wrap{
 border-radius:0;
}
.app-shell .plate-list-panel #empty{
 margin:12px;
}
.app-shell .report-overview,
.app-shell .report-operation{
 min-width:0;
 margin:17px 0;
 padding:19px 20px;
 background:var(--surface);
 border:1px solid var(--border);
 border-radius:var(--ds-radius-md,11px);
}
.app-shell .report-overview>.module-data-heading,
.app-shell .report-operation>.module-data-heading{
 margin-bottom:13px;
}
.app-shell .report-overview #metrics{
 grid-template-columns:repeat(3,minmax(0,1fr));
 gap:14px;
}
.app-shell .report-overview .metric-group{
 min-width:0;margin:0;
}
.app-shell .report-overview .metric-group>h2{
 font-size:13px;line-height:1.5;
 font-weight:600;color:var(--secondary);
 margin:0 0 10px;
}
.app-shell .report-overview .metric-group>.record-list{
 display:grid;grid-template-columns:repeat(2,minmax(0,1fr));
 gap:8px;
}
.app-shell .report-overview .metric-card,
.app-shell .report-overview .record-card{
 min-height:0;margin:0;border:1px solid var(--border);
 border-radius:var(--ds-radius-sm,8px);
 padding:14px;
}
.app-shell .report-operation .analytics-panel{
 margin:0;
}
html[data-theme="dark"] .app-shell :is(.report-overview,.report-operation,.plate-list-panel){
 background:var(--surface);border-color:var(--border);
}
@media(max-width:1200px){
 .app-shell .report-overview #metrics{
  grid-template-columns:repeat(2,minmax(0,1fr));
 }
}
@media(max-width:800px){
 .app-shell .report-overview #metrics{
  grid-template-columns:1fr;
 }
}
@media(max-width:650px){
 .app-shell :is(.report-overview,.report-operation){padding:15px 13px}
 .app-shell .report-overview .metric-group>.record-list{
  grid-template-columns:1fr;
 }
 .app-shell .plate-list-panel>.module-data-heading{padding:13px}
}

/* Real browser review: keep heading copy together at every width. */
body:not(.analytics-page) .panel-heading-copy{
 flex:1 1 auto;min-width:0;
}
body:not(.analytics-page) .panel-heading-copy h2{
 overflow-wrap:normal;word-break:normal;
 font-size:16px;line-height:1.35;
}
body:not(.analytics-page) .panel-heading-copy .panel-subtitle{
 margin-top:5px;line-height:1.5;
}
body:not(.analytics-page) #commercial-section .section-heading,
body:not(.analytics-page) .summary-grid:has(#attention) .section-heading{
 display:flex;align-items:flex-start;flex-wrap:wrap;gap:8px 14px;
}
body:not(.analytics-page) #commercial-section .section-heading>a{
 flex:0 0 auto;align-self:flex-start;padding:3px 0;
}

/* Browser-reviewed: report breakdowns should use the full available width. */
.app-shell[data-ui-module="reports"] #breakdowns .report-group{
 margin:14px 0;padding:18px 20px;
 border:1px solid var(--border);border-radius:var(--ds-radius-md,11px);
 background:var(--surface);
}
.app-shell[data-ui-module="reports"] #breakdowns .report-group>h2{
 font-size:15px;line-height:1.45;font-weight:600;
 margin:0 0 13px;
}
.app-shell[data-ui-module="reports"] #breakdowns .report-group>.record-list{
 display:grid;
 grid-template-columns:repeat(auto-fit,minmax(min(100%,240px),1fr));
 gap:11px;
}
.app-shell[data-ui-module="reports"] #breakdowns .report-group .record-card{
 margin:0;min-width:0;padding:14px;
}
@media(max-width:650px){
 .app-shell[data-ui-module="reports"] #breakdowns .report-group{padding:15px 13px}
}

/* KTIVAR V2 — approved visual reference, shared composition, November 2026.
   No simulated charts, fake actions, arbitrary data or new UI dependencies. */
html[data-theme="light"]{
 --bg:#f9fbff;
 --sidebar:#f9fbff;
 --surface:#fff;
 --raised:#f4f7fc;
 --border:#e2e8f0;
 --ui-surface-hover:#edf3ff;
 --ui-surface-selected:#e8f0ff;
 --muted:#52627c;
 --secondary:#334155;
}
/* Dark theme inherits a single neutral graphite palette from the shared tokens. */
/* NAVIGATION: restore the light, low-noise sidebar seen in the approved example. */
.app-shell .module-nav{
 background:var(--sidebar);border-right:1px solid var(--border);
 width:224px;padding:22px 14px 16px;gap:5px;
}
html[data-theme="light"] .app-shell .module-nav{
 color:#18243b;
}
.app-shell .module-nav .sidebar-brand{
 padding:3px 13px 18px;min-height:61px;
}
html[data-theme="light"] .app-shell .sidebar-brand{
 background:transparent;border:0;border-radius:0;box-shadow:none;
}
.app-shell .module-nav .brand-logo{
 max-width:155px;height:auto;
}
.app-shell .module-nav .sidebar-label{
 padding:18px 11px 8px;margin-top:5px;
 border-top:1px solid var(--border);
 color:var(--muted);font-size:11px;font-weight:650;
 text-transform:uppercase;letter-spacing:.055em;
}
.app-shell .module-nav .sidebar-label:first-of-type{
 border-top:0;padding-top:12px;
}
.app-shell .module-nav>a:not(.brand){
 min-height:42px;gap:12px;border-radius:8px;
 padding:10px 13px;font-size:13px;font-weight:500;
 color:var(--secondary);line-height:1.35;
}
.app-shell .module-nav .nav-icon{width:19px;height:19px;stroke-width:1.7}
.app-shell .module-nav>a:not(.brand):hover{
 background:var(--ui-surface-hover);color:var(--text);
}
.app-shell .module-nav>a[aria-current=page],
html[data-theme="dark"] .app-shell .module-nav>a[aria-current=page]{
 background:var(--ui-surface-selected);
 color:var(--primary);font-weight:650;box-shadow:none;
}
html[data-theme="dark"] .app-shell .module-nav>a:not(.brand){color:var(--secondary)}
html[data-theme="dark"] .app-shell .module-nav>a[aria-current=page]{color:#93c5fd}
.app-shell .module-nav .sidebar-note{display:none}
.app-shell .module-nav .collapse-toggle{
 margin-top:auto;border-top:1px solid var(--border);
 color:var(--muted);font-size:12px;
}
@media(min-width:901px){
 .app-shell:not(.nav-collapsed) header,
 .app-shell:not(.nav-collapsed) .workspace{margin-left:224px}
}
/* TOPBAR: genuine module navigation search and existing account/theme actions. */
.app-shell>header{
 height:72px;background:var(--surface);
 border-bottom:1px solid var(--border);
 padding:11px clamp(18px,2.15vw,34px);
 gap:14px;
}
.app-shell>header .app-breadcrumb{
 flex:0 0 auto;max-width:210px;
 color:var(--muted);font-size:12px;
}
.app-shell>header .app-breadcrumb strong{color:var(--secondary)}
.app-shell>header .account{margin-left:auto;flex:0 0 auto}
.app-shell .global-command{
 position:relative;flex:1 1 390px;max-width:440px;
 margin-left:clamp(8px,2.3vw,42px);min-width:180px;
}
.app-shell .global-command #global-command-input{
 display:block;width:100%;height:41px;min-height:41px;
 margin:0;padding:9px 62px 9px 37px;
 background:var(--raised);border:1px solid var(--border);
 border-radius:10px;color:var(--text);
 font-size:13px;font-weight:400;
}
.app-shell .global-command::before{
 content:"";position:absolute;top:13px;left:14px;
 height:12px;width:12px;
 border:1.8px solid var(--muted);border-radius:50%;
 pointer-events:none;z-index:1;
}
.app-shell .global-command::after{
 content:"";position:absolute;top:24px;left:25px;
 width:6px;height:1.7px;background:var(--muted);
 transform:rotate(48deg);transform-origin:left center;
 pointer-events:none;z-index:1;
}
.app-shell .global-command kbd{
 position:absolute;right:10px;top:8px;
 padding:3px 6px;border:1px solid var(--border);
 border-radius:5px;color:var(--muted);background:var(--surface);
 font:500 11px/17px Inter,system-ui,sans-serif;pointer-events:none;
}
.app-shell .command-results{
 position:absolute;z-index:40;top:calc(100% + 7px);left:0;right:0;
 max-height:320px;overflow:auto;padding:6px;
 border:1px solid var(--border);border-radius:10px;
 background:var(--surface);box-shadow:0 12px 24px rgba(15,23,42,.12);
}
.app-shell .command-results[hidden]{display:none}
.app-shell .command-results>a{
 display:block;padding:11px 12px;border-radius:7px;
 color:var(--text);font-size:13px;font-weight:500;
}
.app-shell .command-results>a:hover,.app-shell .command-results>a:focus-visible{
 background:var(--ui-surface-selected);
}
.app-shell .command-results>p{margin:0;padding:10px;color:var(--muted);font-size:13px}
.app-shell>header .header-theme-toggle{
 height:41px;width:41px;min-height:41px;flex:0 0 41px;
 background:var(--surface);color:var(--secondary);
 border:1px solid var(--border);border-radius:9px;
 padding:0;font-size:23px;font-weight:400;
}
.app-shell>header .header-theme-toggle:hover{
 background:var(--raised);color:var(--primary);
}
.app-shell>header .user-menu>summary{
 min-height:43px;
}
.app-shell>header .user-avatar{
 width:39px;height:39px;flex:0 0 39px;
}
.app-shell>header .user-name{
 color:var(--text);font-weight:650;font-size:13px;
}
.app-shell>header .user-email{
 color:var(--muted);font-size:11px;
}
/* PAGE SCALE: match the reference's rhythm and reduce stacked panel chrome. */
.app-shell .workspace{
 padding-top:25px;
 background:var(--bg);
}
.app-shell .title-row{
 margin-bottom:26px;align-items:center;
}
.app-shell .title-row h1{
 font-size:clamp(26px,2.3vw,32px);
 font-weight:700;letter-spacing:-.036em;
 margin:0;
}
.app-shell .title-row p{font-size:13px;margin-top:7px}
body:not(.analytics-page).app-shell .workspace:has(#operations-section){
 padding-top:26px;
}
body:not(.analytics-page) #overview-metrics{
 display:grid;grid-template-columns:repeat(4,minmax(0,1fr));
 gap:14px;
}
body:not(.analytics-page) #overview-metrics .record-card{
 min-height:126px;max-height:none;
 padding:19px 20px;align-items:stretch;
 border:1px solid var(--border);border-radius:12px;
 background:var(--surface);box-shadow:none;
}
body:not(.analytics-page) #overview-metrics .dashboard-kpi-top{
 align-items:center;justify-content:flex-start;gap:15px;
}
body:not(.analytics-page) #overview-metrics .kpi-icon{
 display:grid;place-items:center;flex:0 0 46px;
 width:46px;height:46px;border-radius:10px;
 background:var(--ui-surface-selected);color:var(--primary);
}
body:not(.analytics-page) #overview-metrics .kpi-icon svg{
 width:25px;height:25px;
}
body:not(.analytics-page) #overview-metrics .kpi-copy{
 display:flex;flex-direction:column;gap:7px;min-width:0;
}
body:not(.analytics-page) #overview-metrics .record-card h2{
 font-size:13px;font-weight:500;color:var(--secondary);
 line-height:1.35;
}
body:not(.analytics-page) #overview-metrics .metric-value{
 margin:0;font-size:30px;font-weight:700;line-height:1;
 letter-spacing:-.04em;
}
body:not(.analytics-page) #overview-metrics .record-card small{
 display:block;padding:11px 0 0;
 font-size:11px;line-height:1.5;
 color:var(--muted);
}
body:not(.analytics-page) .dashboard-analysis{
 grid-template-columns:minmax(0,1.67fr) minmax(300px,1fr);
 gap:16px;margin-bottom:17px;
}
body:not(.analytics-page) .dashboard-analysis>.summary-panel{
 padding:19px 23px 20px;border-radius:12px;
}
body:not(.analytics-page) .dashboard-analysis .section-heading{
 padding:0 0 17px;margin:0 0 16px;
}
body:not(.analytics-page) .dashboard-analysis .section-heading h2{
 font-size:18px;font-weight:650;
}
body:not(.analytics-page) .panel-subtitle{
 font-size:12px;color:var(--muted);margin-top:3px;
}
body:not(.analytics-page) .access-scale{
 display:grid;gap:15px;margin:18px 1px 22px;
}
body:not(.analytics-page) .access-scale-row{
 min-width:0;display:grid;gap:8px;
}
body:not(.analytics-page) .access-scale-label{
 display:flex;align-items:center;justify-content:space-between;
 color:var(--secondary);font-size:12px;
}
body:not(.analytics-page) .access-scale-label strong{
 color:var(--text);font-size:12px;font-variant-numeric:tabular-nums;
}
body:not(.analytics-page) .access-scale-track{
 height:13px;background:var(--raised);
 border:1px solid var(--border);border-radius:6px;
 overflow:hidden;
}
body:not(.analytics-page) .access-scale-fill{
 display:block;height:100%;background:var(--primary);
 border-radius:5px;
}
body:not(.analytics-page) #scan-section .analytics-panel{
 border-top:1px solid var(--border);
 padding:17px 0 9px;gap:0;
}
body:not(.analytics-page) #scan-section .analytics-panel>div,
body:not(.analytics-page) #scan-section .analytics-panel .featured-metric,
html[data-theme="dark"] body:not(.analytics-page) #scan-section .analytics-panel>div{
 min-height:65px;display:flex;
 flex-direction:column-reverse;justify-content:center;
 padding:8px 13px;background:transparent;border:0;
 border-right:1px solid var(--border);border-radius:0;
 gap:4px;
}
body:not(.analytics-page) #scan-section .analytics-panel>div:first-child{padding-left:0}
body:not(.analytics-page) #scan-section .analytics-panel>div:last-child{border-right:0}
body:not(.analytics-page) #scan-section .analytics-panel strong{
 font-size:21px;line-height:1.3;
}
body:not(.analytics-page) #scan-section .analytics-panel span{
 font-size:11px;
}
body:not(.analytics-page) .dashboard-analysis-note{
 font-size:11px;padding-top:12px;margin-top:3px;
}
body:not(.analytics-page) .ranked-plate{
 padding:17px 0;
}
body:not(.analytics-page) .ranked-plate-index{
 background:var(--raised);
 border:0;border-radius:8px;
 font-size:12px;
}
body:not(.analytics-page) .ranked-plate:first-child .ranked-plate-index{
 background:#fff3cf;color:#a56500;
}
html[data-theme="dark"] body:not(.analytics-page) .ranked-plate:first-child .ranked-plate-index{
 background:#473720;color:#fde68a;
}
body:not(.analytics-page) .ranked-plate-track{
 height:7px;margin-top:12px;
}
body:not(.analytics-page) .ranked-plate-fill{
 background:#3984ef;
}
body:not(.analytics-page) #commercial-section{
 grid-template-columns:repeat(2,minmax(0,1fr));
}
body:not(.analytics-page) #commercial-section>.summary-panel,
body:not(.analytics-page) .summary-grid:has(#attention)>.summary-panel{
 padding:20px 21px;
}
/* Shared modules: consistent lighter toolbar/list proportions. */
.app-shell .module-data-shell,.app-shell .plate-list-panel,
.app-shell .report-overview,.app-shell .report-operation{
 border-radius:12px;box-shadow:none;
}
.app-shell .filters-toolbar{
 background:var(--surface);border-color:var(--border);
 border-radius:10px;
}
.app-shell :is(.record-card,.settings-section,.summary-panel,.report-group){
 box-shadow:none;
}
.app-shell .table-wrap th{background:var(--raised)}
.app-shell .module-data-heading{font-size:15px}
@media(max-width:1250px){
 body:not(.analytics-page) .dashboard-analysis{
  grid-template-columns:1fr;
 }
}
@media(max-width:1150px){
 body:not(.analytics-page) #overview-metrics{
  grid-template-columns:repeat(2,minmax(0,1fr));
 }
 .app-shell .global-command{max-width:345px}
}
@media(max-width:900px){
 .app-shell>header .global-command,.app-shell>header .header-theme-toggle{
  display:none;
 }
 .app-shell .module-nav{width:min(310px,88vw)}
 body:not(.analytics-page).app-shell .workspace:has(#operations-section){
  padding:20px 18px 105px;
 }
}
@media(max-width:650px){
 body:not(.analytics-page) #overview-metrics{gap:10px}
 body:not(.analytics-page) #overview-metrics .record-card{
  padding:15px 12px;min-height:125px;
 }
 body:not(.analytics-page) #overview-metrics .kpi-icon{
  width:35px;height:35px;flex-basis:35px;
 }
 body:not(.analytics-page) #overview-metrics .kpi-icon svg{width:20px;height:20px}
 body:not(.analytics-page) #overview-metrics .dashboard-kpi-top{gap:9px}
 body:not(.analytics-page) #overview-metrics .record-card h2{font-size:11px}
 body:not(.analytics-page) #overview-metrics .metric-value{font-size:25px}
 body:not(.analytics-page) .dashboard-analysis>.summary-panel{
  padding:17px 16px;
 }
 body:not(.analytics-page) #scan-section .analytics-panel>div,
 body:not(.analytics-page) #scan-section .analytics-panel .featured-metric{
  padding:9px 7px;min-height:65px;
 }
 body:not(.analytics-page) #scan-section .analytics-panel>div:nth-child(2){
  border-right:0;
 }
 body:not(.analytics-page) #scan-section .analytics-panel>div:first-child{padding-left:7px}
 body:not(.analytics-page) #commercial-section{grid-template-columns:1fr}
 body:not(.analytics-page) .access-scale{gap:13px}
}

/* Responsive sidebar close control follows the selected theme's readable colors. */
.app-shell .module-nav .nav-close{
 background:var(--surface);color:var(--secondary);
 border:1px solid var(--border);border-radius:8px;
 padding:10px 12px;
}
.app-shell .module-nav .nav-close:hover{
 background:var(--ui-surface-hover);color:var(--text);
}
html[data-theme="dark"] .app-shell .module-nav .nav-close{
 background:var(--raised);color:#f1f5f9;border-color:var(--border);
}

/* Sidebar collapsed state must override the expanded V2 dimensions. */
@media(min-width:901px){
 .app-shell.nav-collapsed .module-nav{width:76px;padding-left:8px;padding-right:8px}
 .app-shell.nav-collapsed>header,.app-shell.nav-collapsed .workspace{margin-left:76px}
 .app-shell.nav-collapsed .module-nav>a:not(.brand){justify-content:center;padding:12px}
 .app-shell.nav-collapsed .module-nav .sidebar-brand{padding:6px;min-height:48px}
}

/* Approved reference: three coherent commercial/CRM/activity panels on desktop. */
@media(min-width:1201px){
 body:not(.analytics-page) #commercial-section{
  grid-template-columns:repeat(3,minmax(0,1fr));
 }
}
body:not(.analytics-page) #commercial-section>.summary-panel{
 min-width:0;
}
body:not(.analytics-page) #commercial-section .section-heading{
 min-height:60px;
}
body:not(.analytics-page) #commercial-section .section-heading>a{
 font-size:11px;
}
body:not(.analytics-page) #commercial-section .summary-stats{
 display:flex;flex-direction:column;gap:0;padding:1px 0 8px;
}
body:not(.analytics-page) #commercial-section .summary-stats>.metric-card,
html[data-theme="dark"] body:not(.analytics-page) #commercial-section .summary-stats>.metric-card{
 display:flex;align-items:center;justify-content:space-between;
 flex-direction:row;gap:10px;
 border:0;border-bottom:1px solid var(--border);
 border-radius:0;padding:10px 2px;background:transparent;
 color:var(--text);text-decoration:none;
}
body:not(.analytics-page) #commercial-section .summary-stats>.metric-card small{
 font-size:12px;min-width:0;color:var(--secondary);
}
body:not(.analytics-page) #commercial-section .summary-stats>.metric-card .metric-value{
 font-size:clamp(14px,1.25vw,17px);
 margin:0;white-space:nowrap;color:var(--text);
}
body:not(.analytics-page) #commercial-section .summary-panel .activity-row{
 padding:11px 2px;
}
body:not(.analytics-page) #commercial-section .summary-panel .activity-row p{
 display:-webkit-box;
 -webkit-line-clamp:2;-webkit-box-orient:vertical;
 overflow:hidden;overflow-wrap:anywhere;
}
body:not(.analytics-page) .dashboard-recent .activity-row{
 padding:13px 1px;
}
body:not(.analytics-page) .dashboard-followup{
 grid-template-columns:1fr;margin:0 0 16px;
}
body:not(.analytics-page) .dashboard-followup>#attention{
 padding:17px 20px;
}
@media(min-width:1201px){
 body:not(.analytics-page) .dashboard-followup>#attention{
  max-width:100%;
 }
}
@media(max-width:1200px){
 body:not(.analytics-page) #commercial-section{
  grid-template-columns:repeat(2,minmax(0,1fr));
 }
}
@media(max-width:760px){
 body:not(.analytics-page) #commercial-section{
  grid-template-columns:1fr;
 }
}

/* Browser-reviewed finishing: align compact panel titles and their real actions. */
@media(min-width:761px){
 body:not(.analytics-page) #commercial-section .section-heading{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  align-items:start;column-gap:7px;row-gap:5px;
 }
 body:not(.analytics-page) #commercial-section .section-heading>a{
  grid-column:2;grid-row:1;font-size:11px;
  white-space:nowrap;align-self:start;margin-top:1px;
 }
 body:not(.analytics-page) #commercial-section .section-heading>.panel-heading-copy{
  grid-column:1;grid-row:1;min-width:0;
 }
}
body:not(.analytics-page).app-shell #commercial-section .summary-stats>.metric-card{
 background:transparent;
}

/* Approved charcoal theme: neutral layered blacks across all modules.
   Shared semantic values above control app shell, forms, tables, CRM and reports.
   Blue is reserved for affordances, focus and selected states. */
html[data-theme="dark"] :is(body,.workspace){background:var(--bg);color:var(--text)}
html[data-theme="dark"] .app-shell .module-nav{background:var(--sidebar);border-color:var(--border)}
html[data-theme="dark"] .app-shell>header{background:#131315;border-color:var(--border)}
html[data-theme="dark"] .app-shell :is(.record-card,.summary-panel,.settings-section,.module-data-shell,.plate-list-panel,.report-overview,.report-operation,.filters-toolbar,.list,.attention-panel,.report-group,.user-panel,.settings-theme){
 background:var(--surface);border-color:var(--border);box-shadow:none;
}
html[data-theme="dark"] .app-shell :is(.kanban-column,.empty-state,#empty,.form-section){background:var(--raised);border-color:var(--border)}
html[data-theme="dark"] .app-shell :is(input,textarea,select){
 background:#141416;border-color:var(--ui-interactive-border);color:var(--text);
}
html[data-theme="dark"] .app-shell :is(input,textarea)::placeholder{color:var(--muted)}
html[data-theme="dark"] .app-shell :is(.table-wrap th,thead th){background:var(--raised);color:var(--secondary)}
html[data-theme="dark"] .app-shell :is(.table-wrap tbody tr:hover,tbody tr:hover){background:var(--ui-surface-hover)}
html[data-theme="dark"] .app-shell :is(.global-command #global-command-input,.global-command kbd){
 background:var(--raised);border-color:var(--border);color:var(--text);
}
html[data-theme="dark"] .app-shell .header-theme-toggle{
 background:var(--raised);border-color:var(--border);color:var(--secondary);
}
html[data-theme="dark"] .app-shell .header-theme-toggle:hover{background:var(--ui-surface-hover);color:#93c5fd}
html[data-theme="dark"] .app-shell .command-results{box-shadow:0 12px 28px #0009}
html[data-theme="dark"] .app-shell .module-nav>a[aria-current=page]{
 background:var(--ui-surface-selected);color:#93c5fd;
}
html[data-theme="dark"] .app-shell .module-nav>a:not(.brand):hover{
 background:var(--ui-surface-hover);color:var(--text);
}
html[data-theme="dark"] .app-shell .dashboard-shortcuts a{
 background:var(--surface);border-color:var(--border);
}
html[data-theme="dark"] .app-shell .analytics-panel>div{
 background:var(--raised);border-color:var(--border);
}
html[data-theme="dark"] body:not(.analytics-page) #overview-metrics .kpi-icon{
 background:var(--ui-surface-selected);color:#93c5fd;
}
html[data-theme="dark"] .app-shell .nav-close{background:var(--raised);color:var(--text);border-color:var(--border)}
html[data-theme="dark"] .app-shell .nav-close:hover{background:var(--ui-surface-hover)}
html[data-theme="dark"] .app-shell .bottom-nav{background:var(--sidebar);border-color:var(--border)}

/* Optional product metadata: long descriptions remain readable in both themes. */
.app-shell .product-description{
 white-space:pre-line;
 overflow-wrap:anywhere;
 line-height:1.6;
 color:var(--secondary);
}
.app-shell #record-fields label[hidden]{display:none}
.app-shell #record-fields textarea[name="description"]{
 min-height:108px;
 width:100%;
 resize:vertical;
 line-height:1.6;
}
