:root{--bg:#f5f7fb;--panel:#fff;--panel-soft:#f8fafc;--text:#111827;--muted:#64748b;--line:#e5e7eb;--brand:#1d4ed8;--brand-soft:#dbeafe;--danger:#b91c1c;--success:#047857;--radius:var(--app-radius,13px);--shadow:0 18px 45px rgba(15,23,42,.08);font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}*{box-sizing:border-box}body{margin:0;color:var(--text);background:var(--bg)}a{color:inherit;text-decoration:none}.app-shell{min-height:100vh;display:grid;grid-template-columns:290px minmax(0,1fr)}.sidebar{position:sticky;top:0;height:100vh;padding:18px;background:#0f172a;color:#e5e7eb;overflow:auto}.brand{display:flex;align-items:center;gap:10px;font-weight:800;margin-bottom:22px}.brand-mark{display:grid;place-items:center;width:42px;height:42px;border-radius:14px;background:var(--brand);color:#fff;font-size:.85rem}.nav-stack{display:grid;gap:6px}.nav-stack a{padding:10px 12px;border-radius:13px;color:#cbd5e1;font-size:.92rem}.nav-stack a:hover,.nav-stack a:focus{background:rgba(255,255,255,.09);color:#fff}.content-shell{padding:24px;min-width:0}.page-stack{display:grid;gap:18px}.page-header,.panel{background:var(--panel);border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow)}.page-header{padding:22px}.split-header{display:flex;gap:16px;align-items:center;justify-content:space-between;flex-wrap:wrap}.page-header h1{margin:4px 0 6px;font-size:clamp(1.4rem,2vw,2rem)}.page-header p{margin:0;color:var(--muted)}.eyebrow{text-transform:uppercase;letter-spacing:.08em;font-weight:800;font-size:.75rem;color:var(--brand)!important}.panel{padding:18px}.toolbar,.actions-row{display:flex;flex-wrap:wrap;gap:12px;align-items:end}.toolbar{margin-bottom:16px}.field{display:grid;gap:6px;min-width:0}.field span{font-size:.82rem;font-weight:800;color:#334155}.field.wide{flex:1 1 360px}.field.compact{flex:0 1 180px}input,select,textarea{width:100%;min-height:42px;border:1px solid var(--line);border-radius:13px;background:#fff;color:var(--text);padding:9px 12px;outline:none}input:focus,select:focus,textarea:focus{border-color:var(--brand);box-shadow:0 0 0 4px var(--brand-soft)}.form-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:14px}.form-grid .wide{grid-column:span 2}.full{grid-column:1/-1}.check{display:flex;align-items:center;gap:8px;padding:11px 12px;border:1px solid var(--line);border-radius:13px;background:var(--panel-soft)}.check input{width:auto;min-height:auto}.btn{display:inline-flex;align-items:center;justify-content:center;min-height:38px;padding:8px 12px;border:1px solid var(--line);border-radius:12px;background:#fff;color:#0f172a;font-weight:800;cursor:pointer}.btn.primary{background:var(--brand);border-color:var(--brand);color:#fff}.btn.danger{background:#fff1f2;border-color:#fecdd3;color:var(--danger)}.btn.xs{min-height:30px;padding:5px 9px;font-size:.78rem}.alert{padding:12px 14px;border-radius:14px;border:1px solid var(--line);background:#fff}.alert.success{background:#ecfdf5;color:var(--success);border-color:#bbf7d0}.alert.danger{background:#fef2f2;color:var(--danger);border-color:#fecaca}.table-wrap{overflow:auto;border:1px solid var(--line);border-radius:16px;background:#fff}.data-table{width:100%;border-collapse:collapse;min-width:920px}.data-table th,.data-table td{padding:12px 14px;border-bottom:1px solid var(--line);text-align:left;vertical-align:top}.data-table th{background:var(--panel-soft);color:#334155;font-size:.78rem;text-transform:uppercase;letter-spacing:.04em}.data-table th button{border:0;background:transparent;font:inherit;text-transform:inherit;letter-spacing:inherit;color:inherit;cursor:pointer}.data-table small{display:block;color:var(--muted);margin-top:2px}.actions-cell{white-space:nowrap}.text-right{text-align:right!important}.empty-state{text-align:center;color:var(--muted);padding:30px!important}.pagination-wrap{margin-top:14px}.tabs{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:14px}.tabs a{padding:9px 12px;border-radius:999px;background:var(--panel-soft);border:1px solid var(--line);font-weight:800}.detail-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:12px}.detail-grid div{padding:12px;border:1px solid var(--line);border-radius:14px;background:var(--panel-soft)}.detail-grid strong{display:block;font-size:.78rem;color:#475569;margin-bottom:4px}.detail-grid span{font-weight:700}.code-block{padding:14px;background:#0f172a;color:#e5e7eb;border-radius:14px;overflow:auto}.badge{display:inline-flex;padding:4px 8px;border-radius:999px;background:var(--panel-soft);font-weight:800}@media(max-width:900px){.app-shell{grid-template-columns:1fr}.sidebar{position:relative;height:auto;padding:14px}.nav-stack{grid-template-columns:repeat(auto-fit,minmax(140px,1fr))}.content-shell{padding:14px}.form-grid .wide{grid-column:1/-1}.data-table{min-width:760px}}

/* ERP stabilization utilities: auth and dashboard */
.auth-page { min-height: 100vh; display: grid; place-items: center; background: #eef2f7; padding: 24px; }
.auth-shell { width: min(520px, 100%); }
.auth-card { display: grid; gap: 18px; }
.auth-heading { display: flex; gap: 14px; align-items: center; }
.form-grid.single { grid-template-columns: 1fr; }
.check-row { display: flex; align-items: center; gap: 8px; color: #475569; font-size: .92rem; }
.btn.full { width: 100%; justify-content: center; }
.alert.danger { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }
.small { font-size: .82rem; }
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 18px; padding: 12px 16px; border: 1px solid #e2e8f0; border-radius: 16px; background: rgba(255,255,255,.86); box-shadow: 0 8px 22px rgba(15,23,42,.05); }
.topbar > div { display: grid; gap: 2px; }
.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.metric-card { border: 1px solid #e2e8f0; border-radius: 18px; background: #fff; padding: 18px; box-shadow: 0 8px 24px rgba(15,23,42,.06); display: grid; gap: 6px; }
.metric-card span { color: #64748b; font-size: .82rem; text-transform: uppercase; letter-spacing: .06em; }
.metric-card strong { font-size: 1.8rem; color: #0f172a; }
.metric-card small { color: #64748b; }
.actions-row.wrap { flex-wrap: wrap; }
@media (max-width: 900px) { .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .topbar { align-items: flex-start; } }
@media (max-width: 560px) { .metric-grid { grid-template-columns: 1fr; } .auth-heading { align-items: flex-start; } }

/* Access-aware navigation and admin forms */
.nav-section{display:grid;gap:4px;margin:0 0 12px}.nav-section-title{padding:8px 10px 4px;color:#94a3b8;font-size:.68rem;text-transform:uppercase;letter-spacing:.08em;font-weight:900}.nav-stack a.active{background:rgba(255,255,255,.14);color:#fff}.muted{color:var(--muted)}.panel h2,.panel h3{margin-top:0}.wide{grid-column:span 2}@media(max-width:900px){.nav-section{margin:0}.nav-section-title{grid-column:1/-1}.wide{grid-column:1/-1}}

/* ERP CRUD stabilization helpers */
.error-text {
    color: #b91c1c;
    display: block;
    font-size: 0.78rem;
    margin-top: 0.25rem;
}
.field-card {
    background: rgba(15, 23, 42, 0.03);
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 0.85rem;
    padding: 0.85rem;
}
.field-title {
    color: #334155;
    display: block;
    font-size: 0.78rem;
    font-weight: 700;
    margin-bottom: 0.6rem;
    text-transform: uppercase;
}
.compact-check-grid {
    display: grid;
    gap: 0.5rem 1rem;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}
.readonly-grid {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}
.readonly-item {
    background: rgba(15, 23, 42, 0.03);
    border: 1px solid rgba(15, 23, 42, 0.07);
    border-radius: 0.75rem;
    padding: 0.75rem;
}
.readonly-item span {
    color: #64748b;
    display: block;
    font-size: 0.76rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    text-transform: uppercase;
}
.readonly-item strong {
    color: #0f172a;
    display: block;
    font-size: 0.95rem;
}


/* Restored nested sidebar navigation */
.nav-nested{display:grid;gap:8px}.nav-nested .nav-section{border:1px solid rgba(148,163,184,.16);border-radius:15px;background:rgba(15,23,42,.25);overflow:hidden;margin:0}.nav-nested summary{list-style:none;cursor:pointer;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:10px 12px;color:#cbd5e1}.nav-nested summary::-webkit-details-marker{display:none}.nav-nested summary:after{content:'▾';font-size:.72rem;color:#94a3b8;transition:transform .15s ease}.nav-nested details:not([open]) summary:after{transform:rotate(-90deg)}.nav-count{display:inline-flex;align-items:center;justify-content:center;min-width:22px;height:22px;border-radius:999px;background:rgba(255,255,255,.09);font-size:.7rem;color:#cbd5e1}.nav-section-links{display:grid;gap:4px;padding:0 8px 8px}.nav-section-links a{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:9px 10px;border-radius:11px}.nav-section-links a span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}@media(max-width:900px){.nav-nested{grid-template-columns:1fr}.nav-section-links{grid-template-columns:repeat(auto-fit,minmax(150px,1fr))}}

/* User complete form and polished login */
.form-stack{display:grid;gap:18px}.form-section{display:grid;gap:12px;border:1px solid var(--line);border-radius:18px;background:var(--panel-soft);padding:16px}.form-section h2{margin:0;color:#0f172a;font-size:1rem}.field-toggle{display:flex;gap:10px;align-items:flex-start;padding:11px 12px;border:1px solid var(--line);border-radius:14px;background:#fff}.field-toggle input{width:auto;min-height:auto;margin-top:3px}.field-toggle span{display:grid;gap:2px;font-size:.86rem;color:#334155}.field-toggle small{color:var(--muted);font-weight:500}.check-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:8px}.check-grid label{display:flex;gap:8px;align-items:center;padding:8px 10px;border:1px solid var(--line);border-radius:12px;background:#fff;font-weight:700}.check-grid input{width:auto;min-height:auto}.auth-page.polished{background:radial-gradient(circle at top left,#dbeafe,transparent 34%),linear-gradient(135deg,#eef2ff 0%,#f8fafc 48%,#e0f2fe 100%)}.auth-card.polished{border-radius:30px;padding:32px;border:1px solid rgba(148,163,184,.35);box-shadow:0 28px 80px rgba(15,23,42,.14)}.auth-card .field span{font-size:.9rem}.auth-subtitle{color:#475569;line-height:1.55}.auth-meta{display:flex;gap:8px;flex-wrap:wrap}.auth-pill{display:inline-flex;align-items:center;padding:6px 10px;border-radius:999px;background:#eff6ff;color:#1d4ed8;font-size:.76rem;font-weight:900}.password-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px}.password-row input{grid-column:1/-1}.auth-footer{display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap;color:var(--muted);font-size:.82rem}.auth-help{padding:12px;border-radius:16px;background:#f8fafc;border:1px dashed #cbd5e1;color:#475569;font-size:.84rem}@media(max-width:560px){.auth-card.polished{padding:22px;border-radius:22px}.form-section{padding:12px}}

/* System settings/navbar/footer stabilization - no npm required, edit this file directly. */
:root{
    --app-navbar-bg:#ffffff;
    --app-navbar-text:#0f172a;
    --app-sidebar-bg:#0f172a;
    --app-sidebar-text:#e5e7eb;
    --app-footer-bg:#ffffff;
    --app-footer-text:#64748b;
    --app-content-bg:#f1f5f9;
    --app-brand-color:#2563eb;
}
body{background:var(--app-content-bg)!important}.sidebar{background:var(--app-sidebar-bg)!important;color:var(--app-sidebar-text)!important}.sidebar .brand,.sidebar a,.nav-nested summary{color:var(--app-sidebar-text)!important}.brand-mark{background:var(--app-brand-color)!important;overflow:hidden}.brand-mark img,.brand-logo-preview img{width:100%;height:100%;object-fit:contain;display:block}.btn.primary{background:var(--app-brand-color)!important;border-color:var(--app-brand-color)!important}.content-shell{display:grid;grid-template-rows:auto 1fr auto;min-height:100vh;background:var(--app-content-bg)}.content-body{min-width:0}.app-navbar{position:sticky;top:0;z-index:20;margin:-22px -22px 18px;padding:12px 18px;background:var(--app-navbar-bg);color:var(--app-navbar-text);border-bottom:1px solid rgba(148,163,184,.25);display:flex;align-items:center;justify-content:space-between;gap:12px}.navbar-title{display:grid;gap:2px}.navbar-title small{color:currentColor;opacity:.7}.navbar-actions{display:flex;align-items:center;gap:10px}.navbar-dropdown{position:relative}.navbar-dropdown summary{list-style:none}.navbar-dropdown summary::-webkit-details-marker{display:none}.navbar-button{min-height:38px;display:inline-flex;align-items:center;gap:8px;padding:8px 10px;border:1px solid rgba(148,163,184,.35);border-radius:999px;background:rgba(255,255,255,.75);cursor:pointer;color:inherit}.navbar-button b{min-width:20px;height:20px;border-radius:999px;background:#ef4444;color:white;font-size:.7rem;display:inline-flex;align-items:center;justify-content:center}.profile-button span{width:24px;height:24px;border-radius:999px;background:var(--app-brand-color);color:#fff;display:inline-flex;align-items:center;justify-content:center;font-size:.75rem;font-weight:900}.navbar-menu{position:absolute;right:0;top:calc(100% + 8px);width:min(360px,88vw);padding:10px;border:1px solid rgba(148,163,184,.35);border-radius:16px;background:#fff;color:#0f172a;box-shadow:0 20px 60px rgba(15,23,42,.18);display:grid;gap:8px}.navbar-menu-head{display:grid;gap:2px;padding:6px 8px}.navbar-menu-head small{color:#64748b}.notification-item{display:grid;gap:4px;padding:10px;border:1px solid #e2e8f0;border-radius:12px;color:#0f172a;background:#fff}.notification-item.unread{border-color:#bfdbfe;background:#eff6ff}.notification-item small{color:#64748b}.notification-empty{padding:14px;color:#64748b;text-align:center}.profile-menu{width:220px}.profile-menu a,.profile-menu button{display:flex;width:100%;border:0;background:transparent;padding:10px;border-radius:10px;text-align:left;color:#0f172a;font-weight:800;cursor:pointer}.profile-menu a:hover,.profile-menu button:hover{background:#f1f5f9}.app-footer{display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap;margin:18px -22px -22px;padding:14px 22px;background:var(--app-footer-bg);color:var(--app-footer-text);border-top:1px solid rgba(148,163,184,.25);font-size:.84rem}.nav-count{display:none!important}.nav-nested .nav-section-title{font-size:.76rem;letter-spacing:.08em}.settings-intro{display:flex;justify-content:space-between;gap:14px;align-items:center;flex-wrap:wrap}.settings-note{padding:10px 12px;border:1px dashed #cbd5e1;border-radius:14px;background:#f8fafc;color:#475569}.settings-tabs{display:flex;gap:8px;flex-wrap:wrap}.settings-tabs button{border:1px solid #cbd5e1;background:#fff;color:#334155;border-radius:999px;padding:9px 13px;font-weight:900;cursor:pointer}.settings-tabs button.active{background:var(--app-brand-color);border-color:var(--app-brand-color);color:#fff}.settings-tab-panel h2{margin:0}.color-grid{grid-template-columns:repeat(auto-fit,minmax(220px,1fr))}.color-field{grid-template-columns:50px minmax(0,1fr);align-items:end}.color-field span{grid-column:1/-1}.color-field input[type=color]{height:42px;min-height:42px;padding:4px}.theme-preview{display:grid;grid-template-columns:150px 1fr;grid-template-areas:'nav nav' 'side content' 'footer footer';border:1px solid #cbd5e1;border-radius:18px;overflow:hidden}.preview-navbar{grid-area:nav;background:var(--preview-nav);color:var(--preview-nav-text);padding:12px;font-weight:900}.preview-sidebar{grid-area:side;background:var(--preview-side);color:var(--preview-side-text);padding:18px;min-height:100px}.preview-content{grid-area:content;background:var(--preview-content);padding:18px}.preview-content button{background:var(--preview-brand);border:0;border-radius:10px;color:#fff;padding:8px 12px}.preview-footer{grid-area:footer;background:var(--preview-footer);color:var(--preview-footer-text);padding:10px 12px}.brand-preview-card{display:flex;align-items:center;gap:12px;border:1px solid #e2e8f0;border-radius:18px;background:#fff;padding:12px}.brand-logo-preview{width:54px;height:54px;display:inline-flex;align-items:center;justify-content:center}.data-table.compact th,.data-table.compact td{padding:9px 10px}@media(max-width:900px){.app-navbar{position:relative;margin:-14px -14px 14px}.app-footer{margin:14px -14px -14px}.theme-preview{grid-template-columns:1fr;grid-template-areas:'nav' 'side' 'content' 'footer'}}
.auth-check input[type=checkbox]{width:18px!important;height:18px!important;min-height:18px!important;padding:0!important;flex:0 0 18px}.auth-brand-mark{width:42px;height:42px;display:inline-flex;align-items:center;justify-content:center}.auth-brand-mark img{width:100%;height:100%;object-fit:contain}
.password-input-wrap{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:stretch;border:1px solid var(--line);border-radius:13px;background:#fff;overflow:hidden;transition:border-color .15s ease,box-shadow .15s ease}.password-input-wrap:focus-within{border-color:var(--brand);box-shadow:0 0 0 4px var(--brand-soft)}.password-input-wrap .form-input{min-width:0;border:0!important;border-radius:0!important;box-shadow:none!important}.password-visibility-toggle{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-width:94px;padding:8px 12px;border:0;border-left:1px solid var(--line);background:#f8fafc;color:#1e3a5f;font:inherit;font-size:.8rem;font-weight:800;cursor:pointer}.password-visibility-toggle:hover{background:#eff6ff;color:#1d4ed8}.password-visibility-toggle:focus-visible{outline:3px solid rgba(37,99,235,.28);outline-offset:-3px}.password-visibility-toggle [data-password-toggle-icon]{font-size:.9rem;line-height:1}@media(max-width:380px){.password-visibility-toggle{min-width:78px;padding-inline:9px}.password-visibility-toggle [data-password-toggle-icon]{display:none}}

/* ERP async import progress + company context switcher */
.company-switcher{display:inline-flex;align-items:center;gap:8px;padding:7px 10px;border:1px solid rgba(148,163,184,.35);border-radius:999px;background:rgba(255,255,255,.78);font-size:.82rem;font-weight:800;color:inherit}.company-switcher span{opacity:.72}.company-switcher select{min-width:190px;border:0;background:transparent;color:inherit;font-weight:900;outline:none}.floating-import-progress{position:fixed;top:8px;left:50%;transform:translateX(-50%);z-index:80;width:min(640px,calc(100vw - 24px));display:grid;grid-template-columns:minmax(0,1fr) 180px auto auto;gap:10px;align-items:center;padding:9px 12px;border:1px solid rgba(37,99,235,.25);border-radius:999px;background:rgba(239,246,255,.98);box-shadow:0 16px 45px rgba(15,23,42,.18);color:#0f172a}.import-progress-copy{display:grid;gap:1px;min-width:0}.import-progress-copy strong{font-size:.82rem}.import-progress-copy span{font-size:.74rem;color:#475569;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.import-progress-track{height:8px;border-radius:999px;background:#dbeafe;overflow:hidden}.import-progress-track span{height:100%;display:block;border-radius:999px;background:#2563eb;transition:width .3s ease}.floating-import-progress b{font-size:.78rem;color:#1d4ed8}.import-progress-close{width:28px;height:28px;display:inline-flex;align-items:center;justify-content:center;border:0;border-radius:999px;background:rgba(15,23,42,.08);color:#0f172a;font-size:1.15rem;line-height:1;cursor:pointer;transition:background .2s ease,transform .2s ease}.import-progress-close:hover{background:rgba(15,23,42,.16);transform:scale(1.03)}.floating-import-progress.status-failed .import-progress-close,.floating-import-progress.status-finished_with_errors .import-progress-close{background:rgba(153,27,27,.10);color:#991b1b}.floating-import-progress.status-finished .import-progress-close{background:rgba(22,101,52,.10);color:#166534}.alert.info{background:#eff6ff;border-color:#bfdbfe;color:#1e40af}@media(max-width:900px){.company-switcher{max-width:100%;border-radius:14px}.company-switcher select{min-width:120px;max-width:42vw}.floating-import-progress{grid-template-columns:1fr auto auto;top:6px;border-radius:18px}.import-progress-track{grid-column:1/-1}.import-progress-close{width:30px;height:30px}}

.status-pill{display:inline-flex;align-items:center;border-radius:999px;padding:.2rem .55rem;font-size:.78rem;font-weight:700;background:#eef2ff;color:#1e3a8a;text-transform:capitalize;white-space:nowrap}.status-failed,.status-finished_with_errors{background:#fee2e2!important;color:#991b1b!important}.status-finished{background:#dcfce7!important;color:#166534!important}.status-running,.status-queued{background:#dbeafe!important;color:#1d4ed8!important}.floating-import-progress.status-failed,.floating-import-progress.status-finished_with_errors{border-color:#fecaca}.floating-import-progress small{display:block;color:var(--muted);font-size:.74rem;margin-top:.1rem}

/* 2026-06-09: tabbed detail/show pages and compact operational cards. */
.erp-tabs,.tabs{display:flex!important;gap:8px!important;flex-wrap:wrap!important;align-items:center!important;margin:0 0 14px!important}.erp-tabs a,.tabs a{display:inline-flex!important;align-items:center!important;justify-content:center!important;min-height:38px!important;padding:8px 13px!important;border:1px solid #cbd5e1!important;border-radius:999px!important;background:#fff!important;color:#334155!important;font-weight:900!important;text-decoration:none!important;box-shadow:0 1px 2px rgba(15,23,42,.04)!important}.erp-tabs a:hover,.tabs a:hover{border-color:var(--app-brand-color,var(--brand,#2563eb))!important;color:var(--app-brand-color,var(--brand,#2563eb))!important}.erp-tabs a.active,.tabs a.active{background:var(--app-brand-color,var(--brand,#2563eb))!important;border-color:var(--app-brand-color,var(--brand,#2563eb))!important;color:#fff!important}.detail-grid-compact{grid-template-columns:repeat(auto-fit,minmax(210px,1fr))}.detail-grid .wide{grid-column:span 2}.quick-card-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:12px;margin-top:14px}.quick-card{display:grid;gap:5px;padding:14px;border:1px solid #dbe3ef;border-radius:16px;background:#fff;box-shadow:0 8px 24px rgba(15,23,42,.05)}.quick-card.important{border-color:#bfdbfe;background:#eff6ff}.quick-card span{font-size:.78rem;font-weight:900;text-transform:uppercase;letter-spacing:.04em;color:#475569}.quick-card strong{font-size:1.18rem;line-height:1.2;word-break:break-word;color:#0f172a}.quick-card small{color:#64748b;line-height:1.35}.mt-compact{margin-top:14px}.record-show-page .panel h2{margin-top:0}@media(max-width:720px){.detail-grid .wide{grid-column:1/-1}.erp-tabs,.tabs{overflow:auto;flex-wrap:nowrap!important;padding-bottom:4px}.erp-tabs a,.tabs a{white-space:nowrap}}

/* Master data import detail */
.import-form-grid{grid-template-columns:minmax(220px,1fr) minmax(280px,1fr) auto;align-items:end}.import-history-table tr.is-selected td{background:#eff6ff}.import-detail-panel{display:grid;gap:16px}.import-detail-grid.detail-grid div strong{font-size:.76rem;text-transform:uppercase;letter-spacing:.04em}.import-detail-grid.detail-grid div span{display:block;margin-top:4px}.import-error-heading{align-items:end}.import-error-search{min-width:min(360px,100%)}.import-error-table{min-width:980px}.import-error-table td:nth-child(3){min-width:360px}.import-json-preview{max-width:680px;max-height:260px;margin-top:8px;font-size:.78rem;white-space:pre-wrap}.import-error-table details summary{list-style:none;width:max-content}.import-error-table details summary::-webkit-details-marker{display:none}@media(max-width:980px){.import-form-grid{grid-template-columns:1fr}.import-form-grid .actions-row{justify-content:flex-start}.import-error-heading{display:grid!important}.import-error-search{width:100%}}

/* Searchable select enhancer. Applies to normal single and multiple select fields without npm/build. */
.erp-native-select-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
.erp-search-select {
  position: relative;
  min-width: 170px;
  width: 100%;
  font-size: .9rem;
}
.erp-search-select__control {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--border, #d8dee7);
  border-radius: 10px;
  background: #fff;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}
.erp-search-select__control:focus-within,
.erp-search-select.is-open .erp-search-select__control {
  border-color: var(--primary, #2563eb);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
}
.erp-search-select__value {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text, #0f172a);
}
.erp-search-select__placeholder {
  color: #94a3b8;
}
.erp-search-select__search {
  flex: 1;
  min-width: 60px;
  border: 0 !important;
  outline: 0 !important;
  background: transparent !important;
  padding: 4px 2px !important;
  box-shadow: none !important;
  font-size: .9rem;
}
.erp-search-select__arrow {
  width: 9px;
  height: 9px;
  margin: 0 4px 4px auto;
  border-right: 2px solid #64748b;
  border-bottom: 2px solid #64748b;
  transform: rotate(45deg);
  flex: 0 0 9px;
  pointer-events: none;
  transition: transform .15s ease, margin .15s ease;
}
.erp-search-select.is-open .erp-search-select__arrow {
  margin-top: 5px;
  margin-bottom: 0;
  transform: rotate(225deg);
}
.erp-search-select__value { pointer-events: none; }
.erp-search-select__clear {
  border: 0;
  background: #f1f5f9;
  color: #475569;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1;
  margin-left: 2px;
  transition: background-color .15s ease, color .15s ease, transform .15s ease;
}
.erp-search-select__clear:hover,
.erp-search-select__clear:focus {
  background: #dbeafe;
  color: #1d4ed8;
  outline: none;
  transform: scale(1.03);
}
.erp-search-select__clear:active {
  transform: scale(.96);
}
.erp-search-select__dropdown {
  position: absolute;
  z-index: 80;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  max-height: 270px;
  overflow: auto;
  background: #fff;
  border: 1px solid var(--border, #d8dee7);
  border-radius: 12px;
  box-shadow: 0 18px 38px rgba(15, 23, 42, .16);
  padding: 6px;
}
.erp-search-select:not(.is-open) .erp-search-select__dropdown { display: none; }
.erp-search-select__option {
  width: 100%;
  display: block;
  border: 0;
  background: transparent;
  color: var(--text, #0f172a);
  text-align: left;
  min-height: 42px;
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
  line-height: 1.25;
}
.erp-search-select__option:hover,
.erp-search-select__option.is-highlighted {
  background: #eef6ff;
}
.erp-search-select__option.is-selected {
  background: #dbeafe;
  font-weight: 700;
}
.erp-search-select__option.is-disabled {
  opacity: .55;
  cursor: not-allowed;
}
.erp-search-select__empty {
  padding: 10px;
  color: #64748b;
  font-size: .85rem;
}
.erp-search-select__pills {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
  flex: 1;
  min-width: 0;
}
.erp-search-select__pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: 100%;
  border-radius: 999px;
  background: #e0f2fe;
  color: #075985;
  padding: 3px 7px;
  font-size: .78rem;
  font-weight: 700;
}
.erp-search-select__pill span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.erp-search-select__pill button {
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  padding: 0;
  font-weight: 900;
  line-height: 1;
}
.order-lines-table select,
.order-lines-table input {
  min-width: 110px;
}
.order-lines-table .erp-search-select {
  min-width: 240px;
}
.mini-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  margin-top: 12px;
}
.mini-summary > div {
  border: 1px solid var(--border, #d8dee7);
  border-radius: 12px;
  padding: 10px 12px;
  background: #f8fafc;
}
.mini-summary span {
  display: block;
  color: #64748b;
  font-size: .78rem;
  margin-bottom: 3px;
}
.mini-summary strong {
  display: block;
  color: #0f172a;
  font-size: 1rem;
}
@media (max-width: 768px) {
  .erp-search-select__dropdown { position: fixed; left: 12px; right: 12px; top: auto; bottom: 12px; max-height: 55vh; }
}

/* Role & Permission Manager ------------------------------------------------ */
.role-manager-page {
  gap: 14px;
}
.role-manager-page .panel {
  border-color: #e2e8f0;
  box-shadow: 0 14px 34px rgba(15, 23, 42, .06);
}
.role-manager-hero h2,
.role-manager-page h3 {
  margin: 0;
  color: #0f172a;
}
.role-manager-hero .eyebrow {
  margin: 0 0 4px;
}
.role-manager-hero .muted,
.role-manager-page .muted {
  margin: 6px 0 0;
  line-height: 1.45;
}
.role-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}
.role-stat-card {
  padding: 12px 14px;
  border: 1px solid #dbe3ef;
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff, #f8fafc);
}
.role-stat-card span,
.role-stat-card small {
  display: block;
  color: #64748b;
  font-size: .78rem;
}
.role-stat-card span {
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.role-stat-card strong {
  display: block;
  margin: 4px 0 2px;
  color: #0f172a;
  font-size: 1.08rem;
  line-height: 1.2;
}
.role-layout {
  display: grid;
  grid-template-columns: minmax(300px, 380px) minmax(0, 1fr);
  grid-template-areas:
    "form permissions"
    "roles permissions";
  gap: 14px;
  align-items: start;
}
.role-editor { grid-area: form; }
.role-list-panel { grid-area: roles; }
.permission-editor { grid-area: permissions; }
.section-title-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}
.section-title-row.compact {
  margin-bottom: 10px;
}
.status-pill,
.role-chip em,
.permission-check em {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: .72rem;
  font-style: normal;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}
.status-pill.success {
  background: #dcfce7;
  color: #166534;
}
.role-form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}
.role-form-grid .field span,
.permission-toolbar .field span {
  color: #334155;
  font-size: .78rem;
  font-weight: 900;
}
.role-form-grid input,
.role-form-grid select,
.permission-toolbar input {
  min-height: 40px;
  border-radius: 12px;
}
.field-error {
  color: #b91c1c;
  font-weight: 800;
}
.toggle-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid #dbe3ef;
  border-radius: 14px;
  background: #f8fafc;
  cursor: pointer;
}
.toggle-card input,
.permission-check input {
  width: 18px !important;
  height: 18px !important;
  min-width: 18px !important;
  min-height: 18px !important;
  padding: 0 !important;
  margin: 0;
  accent-color: var(--app-brand-color, var(--brand, #2563eb));
}
.toggle-card span {
  display: grid;
  gap: 2px;
}
.toggle-card strong {
  color: #0f172a;
  font-size: .88rem;
}
.toggle-card small {
  color: #64748b;
  font-size: .76rem;
}
.role-chip-grid {
  display: grid;
  gap: 8px;
  max-height: 420px;
  overflow: auto;
  padding-right: 2px;
}
.role-chip {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 10px 11px;
  border: 1px solid #dbe3ef;
  border-radius: 14px;
  background: #fff;
  color: #0f172a;
  text-align: left;
  cursor: pointer;
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.role-chip:hover {
  transform: translateY(-1px);
  border-color: #bfdbfe;
  box-shadow: 0 10px 24px rgba(15, 23, 42, .08);
}
.role-chip.active {
  border-color: var(--app-brand-color, var(--brand, #2563eb));
  background: #eff6ff;
  box-shadow: 0 10px 26px rgba(37, 99, 235, .12);
}
.role-chip span {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.role-chip strong,
.role-chip small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.role-chip strong {
  font-size: .9rem;
}
.role-chip small {
  color: #64748b;
  font-size: .76rem;
}
.role-chip em {
  background: #f1f5f9;
  color: #475569;
}
.role-chip.active em {
  background: var(--app-brand-color, var(--brand, #2563eb));
  color: #fff;
}
.permission-editor {
  min-width: 0;
}
.permission-toolbar {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(240px, 320px);
  gap: 12px;
  align-items: end;
  margin: 12px 0;
}
.compatibility-toggle {
  min-height: 64px;
}
.permission-module-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 8px;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  background: #f8fafc;
  margin-bottom: 12px;
}
.permission-module-tabs button {
  border: 1px solid #dbe3ef;
  border-radius: 999px;
  background: #fff;
  color: #334155;
  padding: 8px 11px;
  font-size: .76rem;
  font-weight: 900;
  cursor: pointer;
}
.permission-module-tabs button:hover {
  border-color: var(--app-brand-color, var(--brand, #2563eb));
  color: var(--app-brand-color, var(--brand, #2563eb));
}
.permission-module-tabs button.active {
  background: var(--app-brand-color, var(--brand, #2563eb));
  border-color: var(--app-brand-color, var(--brand, #2563eb));
  color: #fff;
}
.permission-groups {
  display: grid;
  gap: 12px;
}
.permission-group-card {
  border: 1px solid #dbe3ef;
  border-radius: 18px;
  background: #fff;
  overflow: hidden;
}
.permission-group-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
}
.permission-group-head strong,
.permission-group-head small {
  display: block;
}
.permission-group-head strong {
  color: #0f172a;
}
.permission-group-head small {
  color: #64748b;
  font-size: .77rem;
}
.permission-check-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 8px;
  padding: 12px;
}
.permission-check {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 58px;
  padding: 10px;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #fff;
  cursor: pointer;
}
.permission-check:hover {
  border-color: #bfdbfe;
  background: #f8fbff;
}
.permission-check:has(input:checked) {
  border-color: #93c5fd;
  background: #eff6ff;
}
.permission-check-body {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.permission-check strong,
.permission-check small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.permission-check strong {
  color: #0f172a;
  font-size: .88rem;
}
.permission-check small {
  color: #64748b;
  font-size: .74rem;
}
.permission-check em {
  background: #eef2ff;
  color: #3730a3;
}
@media (max-width: 1180px) {
  .role-layout {
    grid-template-columns: 1fr;
    grid-template-areas:
      "form"
      "roles"
      "permissions";
  }
  .role-chip-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    max-height: none;
  }
}
@media (max-width: 820px) {
  .role-stat-grid,
  .permission-toolbar {
    grid-template-columns: 1fr;
  }
  .permission-module-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
  }
  .permission-module-tabs button {
    white-space: nowrap;
  }
  .permission-check-grid {
    grid-template-columns: 1fr;
  }
  .permission-group-head {
    align-items: flex-start;
    flex-direction: column;
  }
}

.dashboard-shortcuts-panel .section-heading h2 { margin: 4px 0 4px; }
.shortcut-module-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 14px;
}
.shortcut-module-card {
    display: grid;
    gap: 14px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: linear-gradient(180deg, #ffffff 0%, var(--panel-soft) 100%);
}
.shortcut-module-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start;
}
.shortcut-module-head span {
    display: block;
    font-weight: 900;
    color: #0f172a;
}
.shortcut-module-head p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: .84rem;
    line-height: 1.4;
}
.shortcut-module-head strong {
    min-width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #e2e8f0;
    color: #0f172a;
    font-size: .9rem;
}
.shortcut-button-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(148px, 1fr));
    gap: 9px;
}
.shortcut-button {
    display: grid;
    gap: 3px;
    min-height: 72px;
    padding: 11px 12px;
    border: 1px solid #dbe3ef;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 8px 20px rgba(15, 23, 42, .04);
    transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.shortcut-button:hover,
.shortcut-button:focus {
    transform: translateY(-1px);
    border-color: var(--app-brand-color, var(--brand));
    box-shadow: 0 14px 30px rgba(15, 23, 42, .08);
}
.shortcut-button span {
    font-weight: 900;
    color: #0f172a;
}
.shortcut-button small {
    color: var(--muted);
    line-height: 1.35;
}
.shortcut-module-blue { border-top: 4px solid #2563eb; }
.shortcut-module-green { border-top: 4px solid #059669; }
.shortcut-module-purple { border-top: 4px solid #7c3aed; }
.shortcut-module-orange { border-top: 4px solid #ea580c; }
@media (max-width: 640px) {
    .shortcut-module-grid,
    .shortcut-button-grid { grid-template-columns: 1fr; }
}

/* ERP pagination hardening: keep Laravel default SVG arrows compact if any fallback view leaks them. */
.pagination-wrap svg,
.erp-pagination svg {
    width: 1rem;
    height: 1rem;
    max-width: 1rem;
    max-height: 1rem;
    display: inline-block;
    vertical-align: middle;
}

/* 2026-06-14 SaaS owner navbar/menu recovery + wrapping/tabs stabilization */
.app-navbar{flex-wrap:wrap!important;align-items:center!important}.navbar-actions{flex-wrap:wrap!important;justify-content:flex-end!important;max-width:100%!important}.navbar-button.guide-shortcut{font-weight:900;background:#eff6ff;border-color:#bfdbfe;color:#1d4ed8}.company-switcher,.role-switcher{display:inline-flex;align-items:center;gap:8px;min-height:42px;padding:6px 10px;border:1px solid #dbe3ef;border-radius:999px;background:#fff;color:#0f172a;white-space:nowrap}.company-switcher span,.role-switcher span,.navbar-chip{font-size:.82rem;font-weight:900}.company-switcher select,.role-switcher select{min-height:30px;border-radius:12px;padding:4px 28px 4px 8px;max-width:230px}.navbar-chip{display:inline-flex;align-items:center;min-height:38px;padding:8px 12px;border-radius:999px;background:#f1f5f9;color:#0f172a}.impersonation-banner{position:sticky;top:64px;z-index:19;margin:-8px 0 16px;padding:12px 14px;display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;border:1px solid #f59e0b;border-radius:16px;background:#fffbeb;color:#78350f;box-shadow:0 14px 34px rgba(120,53,15,.08)}.impersonation-banner div{display:grid;gap:2px}.impersonation-banner span{font-size:.9rem}.nav-empty{padding:12px;border:1px dashed rgba(226,232,240,.3);border-radius:14px;color:#cbd5e1;display:grid;gap:4px}.nav-empty small{color:#94a3b8}.erp-tabs button,.tabs button{display:inline-flex!important;align-items:center!important;justify-content:center!important;min-height:38px!important;padding:8px 13px!important;border:1px solid #cbd5e1!important;border-radius:999px!important;background:#fff!important;color:#334155!important;font-weight:900!important;text-decoration:none!important;box-shadow:0 1px 2px rgba(15,23,42,.04)!important;cursor:pointer!important}.erp-tabs button:hover,.tabs button:hover{border-color:var(--app-brand-color,var(--brand,#2563eb))!important;color:var(--app-brand-color,var(--brand,#2563eb))!important}.erp-tabs button.active,.tabs button.active{background:var(--app-brand-color,var(--brand,#2563eb))!important;border-color:var(--app-brand-color,var(--brand,#2563eb))!important;color:#fff!important}.sticky-tabs{position:sticky;top:74px;z-index:11;padding:8px;background:rgba(245,247,251,.88);backdrop-filter:blur(8px);border-radius:18px}.two-column-layout{display:grid;grid-template-columns:minmax(300px,.9fr) minmax(420px,1.4fr);gap:16px;align-items:start}.compact-form{gap:10px}.pill-check-grid,.permission-mini-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(210px,1fr));gap:8px;margin-top:8px}.permission-mini-grid{max-height:420px;overflow:auto;padding-right:4px}.pill-check{display:flex;gap:8px;align-items:flex-start;padding:9px 10px;border:1px solid #dbe3ef;border-radius:13px;background:#fff;min-width:0}.pill-check input{width:auto;min-height:auto;margin-top:3px}.pill-check span{display:grid;gap:2px;min-width:0;font-weight:800}.pill-check small{font-size:.72rem;color:#64748b;overflow-wrap:anywhere}.wrap-table th,.wrap-table td,.data-table th,.data-table td{overflow-wrap:anywhere;word-break:normal}.wrap-table code,.data-table code,.mini-pre,.log-detail-grid pre{white-space:pre-wrap;overflow-wrap:anywhere;word-break:break-word}.navigation-table-wrap{max-width:100%;overflow:auto}.metric-card.compact{min-width:160px;padding:12px;border:1px solid #dbe3ef;border-radius:16px;background:#fff;display:grid;gap:2px}.metric-card.compact span{font-size:.76rem;text-transform:uppercase;letter-spacing:.04em;font-weight:900;color:#64748b}.metric-card.compact strong{font-size:1.35rem}.metric-card.compact small{color:#64748b}.log-detail-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:10px;margin-top:10px}.log-detail-grid div{padding:10px;border:1px solid #e2e8f0;border-radius:12px;background:#f8fafc}.log-detail-grid strong{display:block;margin-bottom:6px}.log-detail-grid pre,.mini-pre{max-height:260px;overflow:auto;font-size:.78rem;background:#0f172a;color:#e5e7eb;border-radius:10px;padding:10px}.badge.success{background:#dcfce7;color:#166534}.muted-badge{background:#f1f5f9;color:#64748b}@media(max-width:1100px){.two-column-layout{grid-template-columns:1fr}.sticky-tabs{position:relative;top:auto}.company-switcher select,.role-switcher select{max-width:180px}}@media(max-width:720px){.app-navbar{position:relative!important}.navbar-actions{justify-content:flex-start!important}.company-switcher,.role-switcher{width:100%;justify-content:space-between;border-radius:16px}.company-switcher select,.role-switcher select{max-width:60%}.impersonation-banner{top:auto}.permission-mini-grid{max-height:300px}}

/* Reliable detail tabs, guide illustrations, product merge, document chips, password policy. */
.erp-tab-pane[hidden]{display:none!important}.tabs a.active,.erp-tabs a.active{background:var(--app-brand-color,var(--brand));border-color:var(--app-brand-color,var(--brand));color:#fff}.guide-illustration-panel{display:grid;gap:14px}.guide-illustration{display:block;width:100%;max-height:520px;object-fit:contain;border:1px solid #dbe3ef;border-radius:18px;background:#f8fafc;box-shadow:0 16px 38px rgba(15,23,42,.08)}.guide-card-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:12px}.guide-card{border:1px solid #dbe3ef;border-radius:16px;background:#fff;padding:14px;display:grid;gap:8px}.guide-card h3{margin:0}.guide-card ul,.guide-card ol{margin:0;padding-left:20px}.document-type-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:12px}.document-group-card{border:1px solid #dbe3ef;border-radius:16px;background:#fff;padding:12px;display:grid;gap:10px}.document-chip-list{display:flex;flex-wrap:wrap;gap:7px}.document-chip{border:1px solid #cbd5e1;background:#f8fafc;border-radius:999px;padding:7px 10px;font-size:.78rem;font-weight:900;color:#334155;cursor:pointer}.document-chip.active{background:var(--app-brand-color,var(--brand));border-color:var(--app-brand-color,var(--brand));color:#fff}.readonly-item{padding:12px;border:1px solid var(--line);border-radius:14px;background:var(--panel-soft);display:grid;gap:4px}.readonly-item span{font-size:.78rem;color:#475569;font-weight:800}.readonly-item strong{font-size:1rem}.row-selected-target{outline:2px solid #22c55e;outline-offset:-2px;background:#f0fdf4}.row-selected-source{outline:2px solid #f59e0b;outline-offset:-2px;background:#fffbeb}.merge-confirm-form{margin-top:14px}.compact-metrics{margin-bottom:12px}.mt-3{margin-top:1rem}.muted{color:var(--muted)}.two-column-layout{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.two-column-layout h3{margin:0 0 10px}.password-policy-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:12px}.password-policy-help{border:1px solid #bfdbfe;background:#eff6ff;border-radius:16px;padding:14px;display:grid;gap:8px}.password-policy-help ul{margin:0;padding-left:20px}.force-password-card{border:1px solid #fed7aa;background:#fff7ed;border-radius:16px;padding:14px;display:grid;gap:10px}.force-password-card strong{color:#9a3412}@media(max-width:1000px){.two-column-layout{grid-template-columns:1fr}.guide-illustration{max-height:none}}
.guide-step-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:12px}.guide-step-card{padding:14px;border:1px solid #dbe3ef;border-radius:16px;background:#f8fafc;display:grid;gap:8px}.guide-step-card strong{font-size:.95rem;color:#0f172a}.guide-step-card ol{margin:0;padding-left:18px;display:grid;gap:6px;color:#334155}.guide-step-card li{line-height:1.45}.mt-compact{margin-top:12px}.muted{color:#64748b}.btn.secondary{background:#f8fafc;color:#334155}.force-password-card{padding:12px 14px;border:1px solid #fed7aa;border-radius:16px;background:#fff7ed;display:grid;gap:5px}.force-password-card strong{color:#9a3412}.force-password-card span{color:#0f172a}.force-password-card small{color:#64748b}.quick-card-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:12px}.quick-card{padding:14px;border:1px solid #dbe3ef;border-radius:16px;background:#fff;display:grid;gap:4px}.quick-card.important{background:#eff6ff;border-color:#bfdbfe}.quick-card span{font-size:.78rem;text-transform:uppercase;letter-spacing:.04em;font-weight:900;color:#64748b}.quick-card strong{font-size:1.1rem}.quick-card small{color:#64748b}.detail-grid-compact{grid-template-columns:repeat(auto-fit,minmax(180px,1fr))}.detail-grid .wide{grid-column:span 2}@media(max-width:720px){.detail-grid .wide{grid-column:1/-1}.actions-row{align-items:stretch}.actions-row .btn,.actions-row button{width:auto}}

/* HR-assisted face enrollment for senior employees. */
.registration-table td{vertical-align:top;}
.btn[disabled],button[disabled]{opacity:.62;cursor:not-allowed;pointer-events:none;}

/* Kiosk/device registration code management. */
.registration-device-code-panel .guide-step-card{align-content:start}.device-code-display{display:grid;gap:3px;margin:8px 0 10px;padding:12px;border:1px dashed #93c5fd;border-radius:16px;background:#eff6ff}.device-code-display span{font-size:.76rem;text-transform:uppercase;letter-spacing:.05em;font-weight:900;color:#1d4ed8}.device-code-display strong{font-size:1.15rem;letter-spacing:.04em;color:#0f172a;overflow-wrap:anywhere}.device-code-display small,.compact-note{font-size:.82rem}.mini-table-wrap{margin-top:12px}.registration-code-table td,.registration-code-table th{vertical-align:top}.registration-row-actions{display:grid;gap:7px;min-width:260px}.inline-assignment-controls{display:grid;grid-template-columns:minmax(160px,1fr) auto;gap:6px;align-items:center}.inline-assignment-controls select{min-height:34px;border-radius:10px;padding:5px 28px 5px 8px;font-size:.82rem}.inline-assignment-controls .btn{white-space:nowrap}.registration-table .actions-cell{min-width:280px}@media(max-width:920px){.inline-assignment-controls{grid-template-columns:1fr}.registration-row-actions{min-width:220px}.registration-table .actions-cell{min-width:220px}}


/* Guide library audience/category/mobile index and professional SVG cards. */
.guide-filter-toolbar{display:grid;grid-template-columns:minmax(260px,1.4fr) repeat(5,minmax(130px,.55fr));gap:10px;align-items:end}.guide-card-index{display:grid;gap:12px}.guide-list-card{display:grid;grid-template-columns:220px minmax(0,1fr) auto;gap:14px;align-items:stretch;border:1px solid #dbe3ef;border-radius:18px;background:#fff;padding:12px;box-shadow:0 10px 28px rgba(15,23,42,.04)}.guide-list-illustration{display:grid;place-items:center;min-height:118px;border:1px solid #e2e8f0;border-radius:16px;background:#f8fafc;overflow:hidden}.guide-list-illustration img{width:100%;height:100%;object-fit:cover}.guide-list-illustration span{font-weight:900;font-size:1.5rem;color:#2563eb}.guide-list-content{display:grid;gap:7px;align-content:start;min-width:0}.guide-list-content h3{margin:0;font-size:1.05rem}.guide-list-content p{margin:0;color:#475569;line-height:1.45}.guide-list-content small{color:#64748b}.guide-list-actions{display:flex;gap:8px;align-items:center;justify-content:flex-end;flex-wrap:wrap}.guide-show-hero .document-chip-list{margin-top:10px}.guide-pro-layout{gap:18px}.guide-narrative{display:grid;gap:12px}.guide-narrative h2{margin:0}.guide-narrative p{margin:0;color:#334155}.form-grid.four{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}@media(max-width:1180px){.guide-filter-toolbar{grid-template-columns:repeat(3,minmax(0,1fr))}.guide-filter-toolbar .wide{grid-column:1/-1}.guide-list-card{grid-template-columns:180px minmax(0,1fr)}}@media(max-width:760px){.guide-filter-toolbar,.form-grid.four{grid-template-columns:1fr}.guide-list-card{grid-template-columns:1fr}.guide-list-illustration{min-height:150px}.guide-list-actions{justify-content:flex-start}.guide-list-actions .btn{flex:1 1 auto}}

/* 2026-06-17: UI theme customization and compact form control polish. */
:root{
  --app-body-bg:var(--app-content-bg,#f5f7fb);
  --app-body-text:var(--text,#111827);
  --app-font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  --app-base-font-size:14px;
  --app-navbar-font-family:inherit;
  --app-navbar-font-size:14px;
  --app-navbar-primary-font-size:var(--app-navbar-font-size);
  --app-navbar-module-font-size:var(--app-navbar-font-size);
  --app-sidebar-font-family:inherit;
  --app-sidebar-font-size:14px;
  --app-footer-font-family:inherit;
  --app-footer-font-size:13px;
  --app-radius:13px;
  --app-radius-sm:13px;
  --app-radius-lg:13px;
}
html{font-size:var(--app-base-font-size)!important;}
body{
  background:var(--app-body-bg)!important;
  color:var(--app-body-text)!important;
  font-family:var(--app-font-family)!important;
  font-size:var(--app-base-font-size)!important;
}
.app-shell{background:var(--app-body-bg)!important;color:var(--app-body-text)!important;}
.content-shell,.content-body{background:var(--app-content-bg)!important;}
.app-navbar,.navbar-title,.navbar-actions,.navbar-chip,.company-switcher,.role-switcher{
  font-family:var(--app-navbar-font-family)!important;
  font-size:var(--app-navbar-font-size)!important;
}
.sidebar,.sidebar .brand,.sidebar .nav-stack,.sidebar .nav-section-title,.sidebar a{
  font-family:var(--app-sidebar-font-family)!important;
  font-size:var(--app-sidebar-font-size)!important;
}
.app-footer{
  font-family:var(--app-footer-font-family)!important;
  font-size:var(--app-footer-font-size)!important;
}
.preview-content{background:var(--preview-content)!important;color:var(--preview-body-text,#111827)!important;}
.theme-preview{background:var(--preview-body,#f5f7fb)!important;}
.check input[type=checkbox],.mini-check input[type=checkbox],.pill-check input[type=checkbox],.permission-check-body input[type=checkbox],.auth-check input[type=checkbox],.data-table input[type=checkbox]{
  width:16px!important;
  height:16px!important;
  min-width:16px!important;
  min-height:16px!important;
  max-width:16px!important;
  max-height:16px!important;
  padding:0!important;
  margin:0!important;
  flex:0 0 16px!important;
  accent-color:var(--app-brand-color,var(--brand,#2563eb));
  box-shadow:none!important;
}
.mini-check{display:inline-flex!important;align-items:center!important;gap:6px!important;margin:0 8px 4px 0!important;font-size:.8rem!important;font-weight:800!important;color:#334155!important;white-space:nowrap!important;line-height:1.2!important;}
.component-basis-cell{min-width:150px!important;white-space:normal!important;}
.compact-table input,.compact-table select{min-height:36px!important;border-radius:10px!important;padding:7px 9px!important;font-size:.88rem!important;}
.compact-table th,.compact-table td{padding:8px 10px!important;vertical-align:middle!important;}
.settings-grid-form .soft-panel{box-shadow:none!important;border-style:solid!important;}
.settings-grid-form .setting-field small,.settings-tab-panel .field small{line-height:1.35!important;}

/* Checkbox normalization after compact table rules. */
input[type="checkbox"],
.check input[type="checkbox"],
.mini-check input[type="checkbox"],
.pill-check input[type="checkbox"],
.permission-check-body input[type="checkbox"],
.auth-check input[type="checkbox"],
.data-table input[type="checkbox"],
.compact-table input[type="checkbox"]{
  width:16px!important;
  height:16px!important;
  min-width:16px!important;
  min-height:16px!important;
  max-width:16px!important;
  max-height:16px!important;
  padding:0!important;
  margin:0!important;
  border-radius:4px!important;
  flex:0 0 16px!important;
  line-height:16px!important;
  vertical-align:middle!important;
  accent-color:var(--app-brand-color,var(--brand,#2563eb));
}

/* Comprehensive guide library: keep professional diagrams readable and uncropped. */
.guide-system-library{display:grid;gap:16px}.guide-sequence-gallery{display:grid;grid-template-columns:repeat(auto-fit,minmax(320px,1fr));gap:14px;align-items:start}.guide-sequence-figure{margin:0;border:1px solid #dbe3ef;border-radius:18px;background:#fff;box-shadow:0 12px 30px rgba(15,23,42,.06);overflow:hidden;display:grid;gap:0}.guide-sequence-figure img{display:block;width:100%;height:auto;max-height:820px;object-fit:contain;background:#f8fafc}.guide-sequence-figure figcaption{padding:8px 12px;border-top:1px solid #e2e8f0;background:#f8fafc;color:#475569;font-size:.78rem;font-weight:900}.guide-list-illustration img{object-fit:contain;background:#f8fafc}.guide-illustration{object-fit:contain}.prose-panel .guide-sequence-gallery{margin-bottom:14px}.prose-panel .guide-sequence-figure:first-child{grid-column:1/-1}.prose-panel .guide-sequence-figure:first-child img{max-height:980px}@media(max-width:780px){.guide-sequence-gallery{grid-template-columns:1fr}.guide-sequence-figure img{max-height:none}}

/* Resilient /system/guides images and graceful fallback. */
.guide-image-missing{object-fit:contain!important;background:#f8fafc!important}.guide-list-illustration img[src$="guide-placeholder.svg"],.guide-illustration[src$="guide-placeholder.svg"]{object-fit:contain;background:linear-gradient(135deg,#eff6ff,#ecfdf5)}.prose-panel img{max-width:100%;height:auto;border-radius:18px}.prose-panel img[src$="guide-placeholder.svg"]{border:1px dashed #94a3b8}

/* 2026-06-17: robust dropdown portal for dynamic line-entry forms. */
.erp-search-select__control:focus {
  outline: none;
}
.erp-search-select__dropdown--portal {
  position: fixed !important;
  z-index: 10050 !important;
  display: none;
  max-width: calc(100vw - 16px);
}
.erp-search-select__dropdown--portal.is-open {
  display: block;
}
.erp-search-select.has-empty-source + .erp-search-select__dropdown--portal,
.erp-search-select:not(.is-open) + .erp-search-select__dropdown--portal {
  display: none;
}
.order-lines-table .erp-search-select__control,
.data-table .erp-search-select__control {
  min-height: 42px;
  border-radius: 10px;
}
.order-lines-table .erp-search-select__search,
.data-table .erp-search-select__search {
  min-height: 28px;
  font-size: .84rem;
}
.erp-search-select__option {
  font-size: .86rem;
}
.erp-search-select__option:focus {
  outline: none;
  background: #eef6ff;
}
@media (max-width: 768px) {
  .erp-search-select__dropdown--portal {
    left: 12px !important;
    right: 12px !important;
    width: auto !important;
    max-height: 55vh !important;
  }
}

/* Standalone ERP module head menu in navbar and contextual sidebar submenu. */
.app-navbar{flex-wrap:wrap!important;align-items:center!important;}
.navbar-title{min-width:180px;}
.module-head-menu{display:flex;align-items:center;gap:6px;flex:1 1 420px;min-width:260px;overflow-x:auto;padding:2px 0;scrollbar-width:thin;}
.module-head-menu a{display:inline-flex;align-items:center;justify-content:center;min-height:34px;padding:7px 11px;border:1px solid rgba(148,163,184,.35);border-radius:999px;background:rgba(255,255,255,.68);color:var(--app-navbar-text,#0f172a);font-size:.8rem;font-weight:900;text-decoration:none;white-space:nowrap;box-shadow:0 1px 2px rgba(15,23,42,.04);}
.module-head-menu a:hover{border-color:var(--app-brand-color,var(--brand,#2563eb));color:var(--app-brand-color,var(--brand,#2563eb));}
.module-head-menu a.active{background:var(--app-brand-color,var(--brand,#2563eb));border-color:var(--app-brand-color,var(--brand,#2563eb));color:#fff;}
.sidebar-context-menu{gap:10px;}
.sidebar-context-head{display:grid;gap:2px;padding:10px 12px;border:1px solid rgba(148,163,184,.18);border-radius:14px;background:rgba(255,255,255,.06);color:var(--app-sidebar-text,#e5e7eb);}
.sidebar-context-head span{font-size:.68rem;font-weight:900;text-transform:uppercase;letter-spacing:.09em;opacity:.65;}
.sidebar-context-head strong{font-size:.92rem;line-height:1.2;}
.sidebar-submenu-links{padding:0;}
.sidebar-submenu-links a{border:1px solid rgba(148,163,184,.12);background:rgba(255,255,255,.04);}
.sidebar-submenu-links a.active{background:rgba(37,99,235,.22);border-color:rgba(96,165,250,.45);color:#fff!important;}
@media(max-width:1120px){.module-head-menu{order:3;flex-basis:100%;}.navbar-actions{margin-left:auto;}}
@media(max-width:720px){.module-head-menu{min-width:0;}.module-head-menu a{font-size:.76rem;padding:7px 9px;}.navbar-actions{width:100%;justify-content:flex-start;overflow-x:auto;padding-bottom:2px;}.company-switcher select,.role-switcher select{min-width:150px;}}

/* Two-row module navbar with compact sticky second row on long scroll. */
.app-navbar[data-sticky-module-navbar]{display:grid!important;grid-template-columns:1fr!important;gap:0!important;align-items:stretch!important;justify-content:stretch!important;margin:-22px -22px 18px!important;padding:0!important;overflow:visible!important;transition:box-shadow .2s ease,background-color .2s ease;}
.navbar-primary-row{display:flex;align-items:center;justify-content:space-between;gap:12px;min-width:0;padding:12px 18px;max-height:92px;opacity:1;transform:translateY(0);overflow:visible;transition:max-height .24s ease,padding .24s ease,opacity .18s ease,transform .24s ease;}
.navbar-module-row{display:block;min-width:0;padding:8px 18px 9px;border-top:1px solid rgba(148,163,184,.22);background:linear-gradient(180deg,rgba(248,250,252,.98),rgba(255,255,255,.96));transition:padding .2s ease,box-shadow .2s ease,background-color .2s ease;}
.app-navbar[data-sticky-module-navbar].is-condensed{box-shadow:0 12px 34px rgba(15,23,42,.10);}
.app-navbar[data-sticky-module-navbar].is-condensed .navbar-primary-row{max-height:0;padding-top:0;padding-bottom:0;opacity:0;transform:translateY(-10px);overflow:hidden;pointer-events:none;}
.app-navbar[data-sticky-module-navbar].is-condensed .navbar-module-row{padding-top:7px;padding-bottom:7px;background:rgba(255,255,255,.98);box-shadow:0 1px 0 rgba(148,163,184,.22) inset;}
.app-navbar[data-sticky-module-navbar] .navbar-title{min-width:180px;}
.app-navbar[data-sticky-module-navbar] .navbar-actions{min-width:0;display:flex;align-items:center;justify-content:flex-end;gap:10px;flex-wrap:wrap;}
.app-navbar[data-sticky-module-navbar] .module-head-menu{width:100%;display:flex;align-items:center;gap:8px;flex:0 1 auto;min-width:0;overflow-x:auto;overflow-y:hidden;padding:0;scrollbar-width:none;-ms-overflow-style:none;scroll-snap-type:x proximity;}
.app-navbar[data-sticky-module-navbar] .module-head-menu::-webkit-scrollbar{display:none;height:0;}
.app-navbar[data-sticky-module-navbar] .module-head-menu a{min-height:32px;padding:7px 12px;scroll-snap-align:start;}
.app-navbar[data-sticky-module-navbar].is-condensed .module-head-menu a{min-height:30px;padding-top:6px;padding-bottom:6px;}
@media(max-width:1120px){.app-navbar[data-sticky-module-navbar] .navbar-primary-row{align-items:flex-start;flex-wrap:wrap}.app-navbar[data-sticky-module-navbar] .navbar-actions{margin-left:0;justify-content:flex-start}.app-navbar[data-sticky-module-navbar] .module-head-menu{flex-basis:auto;}}
@media(max-width:900px){.app-navbar[data-sticky-module-navbar]{position:sticky!important;margin:-14px -14px 14px!important}.navbar-primary-row{padding:10px 14px}.navbar-module-row{padding:7px 14px}.app-navbar[data-sticky-module-navbar] .navbar-actions{width:100%;overflow-x:auto;flex-wrap:nowrap;padding-bottom:2px}.app-navbar[data-sticky-module-navbar] .navbar-title{min-width:0}.app-navbar[data-sticky-module-navbar] .profile-button strong{display:none}}
@media(max-width:720px){.app-navbar[data-sticky-module-navbar] .module-head-menu a{font-size:.75rem;padding:6px 9px}.app-navbar[data-sticky-module-navbar] .company-switcher select,.app-navbar[data-sticky-module-navbar] .role-switcher select{min-width:138px}}
@media(prefers-reduced-motion:reduce){.navbar-primary-row,.navbar-module-row,.app-navbar[data-sticky-module-navbar]{transition:none!important}}

/* Shared form-control and pagination polish.
   These utility classes make old Blade forms visually consistent while keeping existing
   .field / .check layout rules intact. */
.form-input,
.form-select,
.form-textarea,
.form-file {
    width: 100%;
    min-height: 42px;
    border: 1px solid var(--line, #e5e7eb);
    border-radius: 13px;
    background: #fff;
    color: var(--text, #111827);
    padding: 9px 12px;
    outline: none;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus,
.form-file:focus {
    border-color: var(--brand, #1d4ed8);
    box-shadow: 0 0 0 4px var(--brand-soft, #dbeafe);
}

.form-checkbox,
.form-radio {
    width: 1rem;
    min-width: 1rem;
    height: 1rem;
    min-height: 1rem;
    margin: 0;
    accent-color: var(--brand, #1d4ed8);
}

.field .form-checkbox,
.field .form-radio,
.check .form-checkbox,
.check .form-radio,
.field-toggle .form-checkbox,
.field-toggle .form-radio,
.check-grid .form-checkbox,
.check-grid .form-radio {
    width: 1rem;
    min-width: 1rem;
    height: 1rem;
    min-height: 1rem;
}

.erp-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 14px;
    color: #475569;
    font-size: .85rem;
}

.erp-pagination__summary {
    color: #64748b;
}

.erp-pagination__links {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.erp-pagination__item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    min-height: 34px;
    padding: 6px 10px;
    border: 1px solid var(--line, #e5e7eb);
    border-radius: 999px;
    background: #fff;
    color: #0f172a;
    font-weight: 800;
    line-height: 1;
    cursor: pointer;
}

.erp-pagination__item:hover,
.erp-pagination__item:focus {
    border-color: var(--brand, #1d4ed8);
    color: var(--brand, #1d4ed8);
    box-shadow: 0 0 0 3px var(--brand-soft, #dbeafe);
    outline: none;
}

.erp-pagination__item.is-active {
    background: var(--brand, #1d4ed8);
    border-color: var(--brand, #1d4ed8);
    color: #fff;
}

.erp-pagination__item.is-disabled,
.erp-pagination__item.is-ellipsis {
    cursor: not-allowed;
    opacity: .55;
    background: #f8fafc;
    color: #64748b;
}

.erp-pagination--simple {
    justify-content: flex-end;
}

@media (max-width: 640px) {
    .erp-pagination {
        align-items: stretch;
        justify-content: center;
    }

    .erp-pagination__summary {
        width: 100%;
        text-align: center;
    }

    .erp-pagination__links {
        justify-content: center;
    }
}

.import-template-note {
    margin-top: 14px;
    padding: 12px 14px;
    border: 1px solid var(--line, #e5e7eb);
    border-radius: 16px;
    background: #f8fafc;
}

.import-template-note summary {
    cursor: pointer;
    font-weight: 900;
    color: #0f172a;
}

.import-template-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 10px;
    margin-top: 12px;
}

.import-template-grid .mini-card {
    padding: 10px 12px;
    border: 1px solid var(--line, #e5e7eb);
    border-radius: 14px;
    background: #fff;
}

.import-template-grid .mini-card p {
    margin: 4px 0 6px;
    color: #64748b;
    font-size: .82rem;
}

.import-template-grid .mini-card small {
    color: #475569;
    font-weight: 800;
}

.progress-meter {
    width: 100%;
    min-width: 130px;
    height: 9px;
    overflow: hidden;
    border-radius: 999px;
    background: #e5e7eb;
}

.progress-meter.small {
    height: 7px;
}

.progress-meter > span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--brand, #2563eb);
    transition: width .2s ease;
}

.uat-check-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 8px;
    margin-top: 12px;
}

.import-uat-note {
    margin-top: 14px;
    padding: 12px 14px;
    border: 1px solid var(--line, #e5e7eb);
    border-radius: 16px;
    background: #fff7ed;
}

.import-uat-note summary {
    cursor: pointer;
    font-weight: 900;
    color: #9a3412;
}

/* Compact retry/review action helpers for import and reconciliation pages. */
.inline-form{display:inline-flex;align-items:center;gap:.4rem;margin:0}.compact-actions{align-items:center;gap:.5rem}.actions-cell{display:flex;flex-wrap:wrap;gap:.35rem;align-items:center}.btn.warning{background:#fffbeb;border-color:#fde68a;color:#92400e}.btn.success{background:#ecfdf5;border-color:#bbf7d0;color:#047857}.status-retry_pending,.status-retry_running{background:#fef3c7;color:#92400e}.status-accepted{background:#dcfce7;color:#166534}.status-rejected{background:#fee2e2;color:#991b1b}.status-needs_follow_up,.status-open{background:#e0f2fe;color:#075985}@media(max-width:720px){.inline-form,.compact-actions .btn,.compact-actions form{width:100%}.inline-form .btn{width:100%}}

/* Dynamic document line helpers and responsive sub-item grids. */
.order-lines-table td {
    vertical-align: top;
}

.line-hints {
    display: flex;
    flex-wrap: wrap;
    gap: .25rem .5rem;
    margin-top: .35rem;
    color: var(--text-muted, #64748b);
    font-size: .72rem;
    line-height: 1.35;
}

.line-hints span {
    display: inline-flex;
    max-width: 100%;
    white-space: normal;
}

@media (max-width: 1180px) {
    .order-lines-table {
        min-width: 980px;
    }

    .order-lines-table .form-input,
    .order-lines-table .form-select,
    .order-lines-table .js-searchable-select {
        min-width: 7rem;
    }
}

@media (max-width: 760px) {
    .table-wrap:has(.order-lines-table) {
        margin-inline: -.75rem;
        padding-inline: .75rem;
        scroll-snap-type: x proximity;
    }

    .order-lines-table th:first-child,
    .order-lines-table td:first-child {
        min-width: 18rem;
    }
}

/* Compact row actions and related-tab quick actions. */
.row-actions,
.quick-action-bar {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
    justify-content: flex-end;
}

.quick-action-bar {
    justify-content: flex-start;
    margin: .5rem 0 .85rem;
}

.data-table .actions-cell {
    min-width: 11rem;
    white-space: normal;
}

.data-table .actions-cell .btn,
.row-actions .btn,
.quick-action-bar .btn {
    line-height: 1.15;
    min-height: 1.9rem;
}

.btn.success {
    background: #16a34a;
    border-color: #15803d;
    color: #ffffff;
}

.btn.warning {
    background: #f59e0b;
    border-color: #d97706;
    color: #111827;
}

.btn.accent {
    background: #2563eb;
    border-color: #1d4ed8;
    color: #ffffff;
}

@media (max-width: 900px) {
    .row-actions,
    .quick-action-bar {
        justify-content: flex-start;
    }

    .data-table .actions-cell {
        min-width: 13rem;
    }
}

/* Partner portal and scaling/UI hardening */
.portal-page .catalog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 14px;
}
.portal-page .catalog-card {
    border: 1px solid var(--border, #dbe3ef);
    border-radius: 18px;
    background: var(--panel, #fff);
    padding: 14px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, .05);
    min-width: 0;
}
.portal-page .catalog-card h2 {
    font-size: 1rem;
    margin: 6px 0;
    line-height: 1.3;
}
.portal-page .catalog-card p,
.portal-page .catalog-card small {
    overflow-wrap: anywhere;
}
.portal-page .compact-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 10px;
}
.child-line-table-wrap {
    max-width: 100%;
    overflow-x: auto;
}
.child-line-table input,
.child-line-table select {
    min-width: 120px;
}
.child-line-table td:first-child select {
    min-width: 260px;
}
.portal-table-block + .portal-table-block {
    margin-top: 18px;
}
@media (max-width: 900px) {
    .responsive-toolbar,
    .portal-page .split-header {
        align-items: stretch;
        flex-direction: column;
    }
    .child-line-table {
        min-width: 760px;
    }
    .portal-page .compact-metrics {
        grid-template-columns: 1fr;
    }
}

/* Operational dashboard, breadcrumbs, module KPIs, report widgets */
.erp-breadcrumb-bar{display:flex;justify-content:space-between;align-items:center;gap:12px;margin:10px 0 14px;padding:8px 12px;border:1px solid #dbe3ef;border-radius:14px;background:rgba(255,255,255,.86);box-shadow:0 8px 22px rgba(15,23,42,.04)}
.erp-breadcrumbs{display:flex;align-items:center;gap:7px;flex-wrap:wrap;font-size:.82rem;color:#64748b}.erp-breadcrumbs a{color:#2563eb;font-weight:800}.erp-breadcrumbs strong{color:#0f172a}.module-kpi-strip{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin:0 0 14px}.module-kpi-card{border:1px solid #dbe3ef;border-radius:16px;background:#fff;padding:12px;box-shadow:0 10px 24px rgba(15,23,42,.05)}.module-kpi-card a,.module-kpi-card{display:grid;gap:4px}.module-kpi-card span,.ops-task-card span{font-size:.74rem;text-transform:uppercase;letter-spacing:.05em;font-weight:900;color:#64748b}.module-kpi-card strong,.ops-task-card strong{font-size:1.25rem;color:#0f172a}.module-kpi-card small,.ops-task-card small{color:#64748b}.tone-danger{border-color:#fecaca!important;background:#fff1f2!important}.tone-warning{border-color:#fed7aa!important;background:#fff7ed!important}.tone-info{border-color:#bfdbfe!important;background:#eff6ff!important}.ops-task-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:12px}.ops-task-card{display:grid;gap:8px;border:1px solid #dbe3ef;border-radius:16px;background:#fff;padding:14px}.finance-aging-grid.redesigned{grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:10px}.finance-aging-card.redesigned{padding:14px;border-radius:18px;border:1px solid #dbe3ef;background:linear-gradient(180deg,#fff,#f8fafc);box-shadow:0 10px 24px rgba(15,23,42,.05);display:grid;gap:5px}.finance-aging-card.redesigned span{font-size:.74rem;text-transform:uppercase;letter-spacing:.05em;font-weight:900;color:#64748b}.finance-aging-card.redesigned strong{font-size:1.25rem}.finance-aging-card.redesigned small{color:#64748b}.finance-aging-card.redesigned.is-total{border-color:#bfdbfe;background:#eff6ff}.report-widget-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(320px,1fr));gap:14px}.report-widget h2{margin:0}.chart-preview{display:grid;gap:10px;margin-top:10px}.chart-row{display:grid;grid-template-columns:minmax(90px,1fr) minmax(140px,2fr) minmax(80px,auto);gap:10px;align-items:center}.chart-row span{font-size:.82rem;font-weight:800;color:#334155}.chart-row strong{text-align:right}.chart-bar{height:12px;border-radius:999px;background:#e2e8f0;overflow:hidden}.chart-bar i{display:block;height:100%;width:var(--bar-width);border-radius:inherit;background:var(--app-brand-color,var(--brand))}.chart-donut .chart-preview,.chart-pie .chart-preview{border-left:8px solid var(--app-brand-color,var(--brand));padding-left:12px}.wip-help-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:12px}.wip-help-card{border:1px solid #dbe3ef;border-radius:16px;background:#f8fafc;padding:14px;display:grid;gap:6px}.wip-help-card strong{color:#0f172a}.order-progress-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:10px}.order-progress-card{padding:12px;border:1px solid #dbe3ef;border-radius:16px;background:#f8fafc;display:grid;gap:4px}.order-progress-bar{height:10px;border-radius:999px;background:#e2e8f0;overflow:hidden}.order-progress-bar i{display:block;height:100%;width:var(--progress);background:#2563eb}.show-tabs{position:sticky;top:78px;z-index:8;background:#fff;padding:8px;border:1px solid #e2e8f0;border-radius:14px}.app-navbar.is-condensed .navbar-primary-row{display:none!important}.app-navbar.is-condensed .navbar-module-row{border-top:0!important}.app-navbar[data-primary-hidden="true"] .navbar-primary-row{display:none!important}@media(max-width:1100px){.module-kpi-strip{grid-template-columns:repeat(2,minmax(0,1fr))}.show-tabs{position:relative;top:auto}}@media(max-width:640px){.module-kpi-strip,.report-widget-grid{grid-template-columns:1fr}.erp-breadcrumb-bar{align-items:flex-start;flex-direction:column}.chart-row{grid-template-columns:1fr}.chart-row strong{text-align:left}}
.dashboard-two-columns{display:grid;grid-template-columns:1.25fr .95fr;gap:14px}.builder-two-columns{align-items:start}.top-gap-sm{margin-top:12px}.help-stack{display:grid;gap:10px}.help-box{padding:14px;border:1px solid #dbe3ef;border-radius:16px;background:#f8fafc}.help-box strong{display:block;margin-bottom:4px;color:#0f172a}.help-box p{margin:0;color:#475569}.metric-card.tone-info{border-color:#bfdbfe;background:#eff6ff}.metric-card.tone-warning{border-color:#fed7aa;background:#fff7ed}.metric-card.tone-danger{border-color:#fecaca;background:#fff1f2}.compact-grid{gap:12px}@media(max-width:980px){.dashboard-two-columns{grid-template-columns:1fr}}
.chart-rich{display:grid;gap:14px;margin-top:12px}.chart-rich-pie{grid-template-columns:minmax(180px,220px) minmax(0,1fr);align-items:center;gap:18px}.chart-pie-visual{display:grid;place-items:center}.chart-pie-ring{--chart-gradient:conic-gradient(#2563eb 0 100%);width:180px;height:180px;border-radius:999px;background:var(--chart-gradient);display:grid;place-items:center;box-shadow:inset 0 0 0 1px rgba(15,23,42,.06),0 12px 30px rgba(15,23,42,.08)}.chart-pie-ring:not(.is-solid)::after{content:"";width:92px;height:92px;border-radius:999px;background:#fff;box-shadow:0 0 0 1px #e2e8f0 inset;grid-area:1/1}.chart-pie-center{grid-area:1/1;position:relative;z-index:2;display:grid;gap:2px;text-align:center}.chart-pie-center strong{font-size:1.25rem}.chart-pie-center small{color:#64748b}.chart-legend-list{display:grid;gap:10px}.chart-legend-list.compact{gap:8px}.chart-legend-item{display:flex;align-items:flex-start;gap:10px;padding:10px 12px;border:1px solid #e2e8f0;border-radius:14px;background:#f8fafc}.chart-legend-item.compact{padding:8px 10px}.chart-legend-dot{width:12px;height:12px;border-radius:999px;flex:0 0 12px;margin-top:4px}.chart-legend-item strong{display:block;font-size:.9rem;color:#0f172a}.chart-legend-item small{color:#64748b}.chart-rich-line{gap:12px}.chart-svg{width:100%;height:auto;border:1px solid #e2e8f0;border-radius:16px;background:linear-gradient(180deg,#fff,#f8fafc);padding:8px}.chart-axis{stroke:#cbd5e1;stroke-width:1.5}.chart-svg-label{font-size:10px;fill:#475569}.chart-legend-inline{display:flex;flex-wrap:wrap;gap:10px}.chart-legend-inline span{display:inline-flex;align-items:center;gap:6px;padding:6px 10px;border-radius:999px;background:#f8fafc;border:1px solid #e2e8f0;font-size:.8rem;color:#334155}.chart-legend-inline i{width:10px;height:10px;border-radius:999px;display:inline-block}.chart-column-bars{display:grid;grid-template-columns:repeat(auto-fit,minmax(62px,1fr));gap:12px;align-items:end;min-height:260px}.chart-column-item{display:grid;gap:8px;justify-items:center}.chart-column-item small{font-size:.72rem;color:#475569;text-align:center}.chart-column-track{height:180px;width:100%;max-width:46px;border-radius:14px;background:linear-gradient(180deg,#eef2ff,#e2e8f0);display:flex;align-items:flex-end;justify-content:center;padding:4px;box-shadow:inset 0 0 0 1px #dbe3ef}.chart-column-track i{display:block;width:100%;border-radius:10px 10px 8px 8px;min-height:12px}.chart-column-item strong{font-size:.78rem;color:#0f172a;text-align:center;word-break:break-word}.chart-rich-stacked{display:grid;gap:10px}.chart-stack-row{display:grid;grid-template-columns:minmax(140px,1fr) minmax(160px,2fr) auto;gap:10px;align-items:center}.chart-stack-label strong{display:block;font-size:.88rem}.chart-stack-label small{color:#64748b}.chart-stack-bar{height:16px;border-radius:999px;background:#e2e8f0;display:flex;overflow:hidden;box-shadow:inset 0 0 0 1px #dbe3ef}.chart-stack-bar i,.chart-stack-bar b{display:block;height:100%}.chart-stack-bar b{background:rgba(148,163,184,.32)}.chart-rich-metric{display:grid;grid-template-columns:minmax(180px,220px) minmax(0,1fr);gap:14px;align-items:start}.chart-metric-hero{padding:18px;border:1px solid #dbe3ef;border-radius:18px;background:linear-gradient(180deg,#eff6ff,#ffffff);display:grid;gap:6px}.chart-metric-hero small{font-size:.76rem;font-weight:800;text-transform:uppercase;letter-spacing:.04em;color:#475569}.chart-metric-hero strong{font-size:1.55rem;color:#0f172a}.chart-metric-hero span{color:#64748b;font-size:.85rem}@media(max-width:900px){.chart-rich-pie,.chart-rich-metric{grid-template-columns:1fr}.chart-stack-row{grid-template-columns:1fr}.chart-column-bars{min-height:200px}}


/* Professional palette system, compact production UI tokens, and theme-aware navigation. */
:root{
  --panel:var(--app-panel-bg,#ffffff);
  --panel-soft:var(--app-panel-soft-bg,#f8fafc);
  --line:var(--app-border-color,#e5e7eb);
  --brand:var(--app-brand-color,#2563eb);
  --brand-soft:var(--app-brand-soft-color,#dbeafe);
  --success:var(--app-success-color,#047857);
  --warning:var(--app-warning-color,#d97706);
  --danger:var(--app-danger-color,#b91c1c);
}
body{background:var(--app-body-bg,#f5f7fb)!important;color:var(--app-body-text,#111827)!important;}
.content-shell,.content-body{background:var(--app-content-bg,#f1f5f9)!important;}
.page-header,.panel,.metric-card,.quick-card,.shortcut-module-card,.finance-aging-card,.report-widget,.order-progress-card,.detail-grid div{
  background:var(--app-panel-bg,#ffffff)!important;
  border-color:var(--app-border-color,#e5e7eb)!important;
}
.soft-panel,.panel.soft-panel,.data-table th,.detail-grid div,.empty-state{
  background:var(--app-panel-soft-bg,#f8fafc)!important;
}
.app-navbar,.topbar,.navbar-title,.navbar-actions,.navbar-chip,.company-switcher,.role-switcher{
  background:var(--app-navbar-bg,#ffffff)!important;
  color:var(--app-navbar-text,#0f172a)!important;
}
.sidebar{
  background:var(--app-sidebar-bg,#ffffff)!important;
  color:var(--app-sidebar-text,#172033)!important;
  border-right:1px solid color-mix(in srgb,var(--app-sidebar-text,#172033) 12%,transparent);
  box-shadow:8px 0 24px rgba(15,23,42,.06);
}
.sidebar .brand,.sidebar .nav-section-title,.sidebar a,.sidebar span{
  color:var(--app-sidebar-text,#172033)!important;
}
.sidebar .brand-mark{
  background:var(--app-brand-color,#2563eb)!important;
  color:#ffffff!important;
}
.sidebar .nav-stack a,
.sidebar .nav-link,
.sidebar .submenu a{
  background:color-mix(in srgb,var(--app-sidebar-bg,#ffffff) 86%,var(--app-sidebar-text,#172033) 14%)!important;
  border:1px solid color-mix(in srgb,var(--app-sidebar-text,#172033) 13%,transparent)!important;
}
.sidebar .nav-stack a:hover,
.sidebar .nav-link:hover,
.sidebar .submenu a:hover,
.sidebar .nav-stack a.active,
.sidebar .nav-link.active{
  background:var(--app-brand-soft-color,#dbeafe)!important;
  border-color:color-mix(in srgb,var(--app-brand-color,#2563eb) 35%,transparent)!important;
  color:var(--app-body-text,#111827)!important;
}
.app-footer{background:var(--app-footer-bg,#ffffff)!important;color:var(--app-footer-text,#64748b)!important;border-top-color:var(--app-border-color,#e5e7eb)!important;}
input,select,textarea,.form-input,.form-select{
  border-color:var(--app-border-color,#e5e7eb)!important;
  background:var(--app-panel-bg,#ffffff)!important;
  color:var(--app-body-text,#111827)!important;
}
input:focus,select:focus,textarea:focus,.form-input:focus,.form-select:focus{
  border-color:var(--app-brand-color,#2563eb)!important;
  box-shadow:0 0 0 4px color-mix(in srgb,var(--app-brand-soft-color,#dbeafe) 82%,transparent)!important;
}
.btn.primary{
  background:var(--app-brand-color,#2563eb)!important;
  border-color:var(--app-brand-color,#2563eb)!important;
}
.btn.danger,.alert.danger{color:var(--app-danger-color,#b91c1c)!important;}
.alert.success{color:var(--app-success-color,#047857)!important;}
.badge,.status-badge{
  background:var(--app-brand-soft-color,#dbeafe)!important;
  color:color-mix(in srgb,var(--app-brand-color,#2563eb) 72%,#000 28%)!important;
}
.palette-card-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:12px;margin-top:14px;}
.palette-card{display:grid;gap:10px;padding:14px;border:1px solid var(--app-border-color,#dbe3ef);border-radius:18px;background:var(--app-panel-bg,#fff);box-shadow:0 10px 24px rgba(15,23,42,.05);}
.palette-card.is-selected{border-color:var(--app-brand-color,#2563eb);box-shadow:0 0 0 4px color-mix(in srgb,var(--app-brand-soft-color,#dbeafe) 70%,transparent);}
.palette-card strong{font-size:.98rem;color:var(--app-body-text,#111827);}
.palette-card p{margin:6px 0 0;color:#64748b;font-size:.82rem;line-height:1.35;}
.palette-preview-strip{display:grid;grid-template-columns:1.2fr 1fr 1.4fr;gap:6px;height:34px;}
.palette-preview-strip i{display:block;border-radius:12px;border:1px solid rgba(15,23,42,.08);}
.palette-selector-row{align-items:end;}
.alert.info{background:var(--app-brand-soft-color,#dbeafe);border-color:color-mix(in srgb,var(--app-brand-color,#2563eb) 25%,#ffffff);color:var(--app-body-text,#111827);}
@media(max-width:900px){.palette-card-grid{grid-template-columns:1fr}.palette-selector-row{grid-template-columns:1fr}}
.app-footer-rich{gap:12px;align-items:center}.footer-meta{display:inline-flex;gap:10px;align-items:center;flex-wrap:wrap}.footer-link{color:var(--app-brand-color,var(--brand));font-weight:800}.creator-credit{opacity:.78}.changelog-timeline{display:grid;gap:12px}.changelog-card h2{margin:4px 0}.changelog-body{margin-top:10px;padding:12px;border-radius:14px;background:var(--app-panel-soft-bg,#f8fafc);border:1px solid var(--app-border-color,#e5e7eb);color:#334155}.sales-channel-sync-page .outlet-card.is-selected{border-color:var(--app-brand-color,var(--brand));box-shadow:0 0 0 3px var(--app-brand-soft-color,#dbeafe)}.help-stack{display:grid;gap:10px}.help-box{padding:12px;border:1px solid var(--app-border-color,#e5e7eb);border-radius:14px;background:var(--app-panel-soft-bg,#f8fafc);display:grid;gap:4px}.help-box code{font-size:.78rem;color:#1d4ed8}.readonly-item.compact{padding:10px 12px;border:1px solid var(--app-border-color,#e5e7eb);border-radius:14px;background:var(--app-panel-soft-bg,#f8fafc);display:grid;gap:2px}.readonly-item.compact span{font-size:.74rem;text-transform:uppercase;font-weight:900;color:#64748b}.readonly-item.compact strong{font-size:1rem}.mini-card{border:1px solid var(--app-border-color,#e5e7eb);border-radius:16px;background:var(--app-panel-bg,#fff);padding:13px;display:grid;gap:10px}.mini-card-head{display:flex;justify-content:space-between;gap:10px;align-items:flex-start}.mini-meta{display:grid;gap:4px;color:#64748b;font-size:.82rem}.status-pill{display:inline-flex;padding:4px 8px;border-radius:999px;background:#f1f5f9;font-size:.72rem;font-weight:900}.status-pill.ok{background:#dcfce7;color:#166534}.input-xs{min-height:32px;border:1px solid var(--app-border-color,#e5e7eb);border-radius:10px;padding:5px 8px;background:#fff;max-width:150px}.grid-two{display:grid;grid-template-columns:1fr 1fr;gap:14px}.cards-3{grid-template-columns:repeat(auto-fit,minmax(260px,1fr))}@media(max-width:960px){.grid-two{grid-template-columns:1fr}.footer-meta{width:100%}}
.module-config-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(340px,1fr));gap:14px}.module-config-card{display:grid;gap:14px}.module-config-settings{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.module-config-settings div{padding:11px 12px;border:1px solid var(--line);border-radius:14px;background:var(--panel-soft)}.module-config-settings span{display:block;font-size:.72rem;text-transform:uppercase;letter-spacing:.05em;font-weight:900;color:var(--muted)}.module-config-settings strong{display:block;margin-top:4px;color:var(--text);font-size:.92rem}.module-config-actions{padding-top:2px}.module-settings-page .quick-card-grid{grid-template-columns:repeat(auto-fit,minmax(240px,1fr))}@media(max-width:720px){.module-config-grid{grid-template-columns:1fr}.module-config-settings{grid-template-columns:1fr}}
.pill-check-grid{display:flex;flex-wrap:wrap;gap:6px;min-width:240px}.pill-check{display:inline-flex;align-items:center;gap:5px;padding:5px 8px;border:1px solid var(--line);border-radius:999px;background:var(--panel-soft);font-size:.76rem;font-weight:800;color:#334155}.pill-check input{width:13px;min-height:13px;accent-color:var(--brand)}.input-xs{min-height:32px;padding:5px 8px;border-radius:10px;font-size:.82rem}.min-w-160{min-width:160px}.top-gap-sm{margin-top:10px}.soft-divider{border:0;border-top:1px solid var(--line);margin:14px 0}.align-start{align-items:start}

/* SO/PO/invoice line-entry card UI with read-only product snapshots. */
.erp-document-card {
    overflow: visible;
}

.erp-document-lines {
    display: grid;
    gap: 12px;
    margin-top: 12px;
}

.erp-document-line-card {
    border: 1px solid var(--border, #d8dee7);
    border-radius: 16px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    box-shadow: 0 10px 24px rgba(15, 23, 42, .045);
    padding: 12px;
}

.line-card-head {
    align-items: center;
    display: flex;
    gap: 10px;
    justify-content: space-between;
    margin-bottom: 10px;
}

.line-card-head > div {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.line-card-head strong {
    color: #0f172a;
    font-size: .94rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.line-number {
    color: var(--text-muted, #64748b);
    font-size: .72rem;
    font-weight: 900;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.line-product-grid {
    align-items: stretch;
    display: grid;
    gap: 10px;
    grid-template-columns: minmax(280px, .95fr) minmax(360px, 1.65fr);
}

.product-picker-field {
    min-width: 0;
}

.line-product-grid .erp-search-select,
.line-entry-grid .erp-search-select {
    min-width: 0;
    width: 100%;
}

.product-readonly-snapshot {
    border: 1px dashed #cbd5e1;
    border-radius: 14px;
    background: #f8fafc;
    padding: 10px;
}

.product-readonly-snapshot.is-empty {
    align-items: center;
    color: #64748b;
    display: flex;
    font-size: .82rem;
    min-height: 76px;
}

.snapshot-title-row {
    align-items: center;
    display: flex;
    gap: 8px;
    justify-content: space-between;
    margin-bottom: 8px;
}

.snapshot-title-row strong {
    color: #0f172a;
    font-size: .82rem;
}

.snapshot-title-row span {
    color: #64748b;
    font-size: .72rem;
    font-weight: 800;
}

.snapshot-grid {
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(5, minmax(118px, 1fr));
}

.snapshot-item {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #fff;
    display: grid;
    gap: 2px;
    min-width: 0;
    padding: 8px 9px;
}

.snapshot-item.is-wide {
    grid-column: span 2;
}

.snapshot-item span {
    color: #64748b;
    font-size: .68rem;
    font-weight: 900;
    letter-spacing: .02em;
    text-transform: uppercase;
}

.snapshot-item strong {
    color: #0f172a;
    font-size: .82rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.snapshot-item small {
    color: #64748b;
    font-size: .7rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.line-entry-grid {
    display: grid;
    gap: 9px;
    grid-template-columns: repeat(6, minmax(112px, 1fr));
    margin-top: 10px;
}

.delivery-entry-grid {
    grid-template-columns: minmax(220px, 1.5fr) repeat(7, minmax(112px, 1fr));
}

.receipt-entry-grid {
    grid-template-columns: repeat(5, minmax(130px, 1fr));
}

.compact-field {
    min-width: 0;
}

.note-field {
    grid-column: span 2;
}

.line-total-readonly output {
    align-items: center;
    border: 1px solid #dbeafe;
    border-radius: 12px;
    background: #eff6ff;
    color: #1d4ed8;
    display: flex;
    font-size: .88rem;
    font-weight: 900;
    min-height: 38px;
    padding: 8px 10px;
    text-align: right;
}

@media (max-width: 1280px) {
    .line-product-grid {
        grid-template-columns: 1fr;
    }

    .snapshot-grid {
        grid-template-columns: repeat(3, minmax(130px, 1fr));
    }

    .line-entry-grid,
    .delivery-entry-grid,
    .receipt-entry-grid {
        grid-template-columns: repeat(3, minmax(150px, 1fr));
    }

    .note-field {
        grid-column: span 3;
    }
}

@media (max-width: 760px) {
    .erp-document-line-card {
        padding: 10px;
    }

    .line-card-head {
        align-items: stretch;
        flex-direction: column;
    }

    .line-card-head .btn {
        width: 100%;
    }

    .snapshot-grid,
    .line-entry-grid,
    .delivery-entry-grid,
    .receipt-entry-grid {
        grid-template-columns: 1fr;
    }

    .snapshot-item.is-wide,
    .note-field {
        grid-column: auto;
    }
}

/* route-aware contextual sidebar states. */
.sidebar-context-head small{
  color:color-mix(in srgb,var(--app-sidebar-text,#172033) 72%,transparent);
  font-size:.74rem;
  line-height:1.25;
}
.sidebar-submenu-links a.active span::after{
  content:'•';
  margin-left:8px;
  color:var(--app-brand-color,#2563eb);
}

/* Robust tab navigation and related document links. */
.tabs-nav {
    align-items: center;
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    margin: 0 0 14px !important;
}

.tabs-nav a,
.tabs-nav button {
    align-items: center !important;
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 999px !important;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04) !important;
    color: #334155 !important;
    cursor: pointer !important;
    display: inline-flex !important;
    font-weight: 900 !important;
    justify-content: center !important;
    min-height: 38px !important;
    padding: 8px 13px !important;
    text-decoration: none !important;
}

.tabs-nav a:hover,
.tabs-nav button:hover {
    border-color: var(--app-brand-color, var(--brand, #2563eb)) !important;
    color: var(--app-brand-color, var(--brand, #2563eb)) !important;
}

.tabs-nav a.active,
.tabs-nav button.active {
    background: var(--app-brand-color, var(--brand, #2563eb)) !important;
    border-color: var(--app-brand-color, var(--brand, #2563eb)) !important;
    color: #ffffff !important;
}

.tab-section[hidden],
.panel[hidden] {
    display: none !important;
}

.related-link {
    white-space: nowrap;
}

.related-link-list {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
}

@media (max-width: 720px) {
    .tabs-nav {
        flex-wrap: nowrap !important;
        overflow: auto;
        padding-bottom: 4px;
    }

    .tabs-nav a,
    .tabs-nav button,
    .related-link {
        white-space: nowrap;
    }
}

/* Compact production dashboard/filter UI normalization. */
.module-dashboard-page .metric-grid,
.module-dashboard-page .module-kpi-strip,
.module-kpi-strip,
.metric-grid.four-columns,
.metric-grid.compact-grid {
    display: grid;
    gap: 10px !important;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)) !important;
}

.module-dashboard-page .metric-card,
.module-dashboard-page .module-kpi-card,
.module-kpi-card,
.metric-card,
.ops-task-card,
.finance-aging-card.redesigned {
    border-radius: 14px !important;
    min-height: 0 !important;
    padding: 10px 12px !important;
}

.module-dashboard-page .metric-card a,
.module-dashboard-page .module-kpi-card a,
.module-kpi-card a,
.metric-card a,
.ops-task-card a {
    display: grid;
    gap: 3px !important;
}

.module-dashboard-page .metric-card span,
.module-dashboard-page .module-kpi-card span,
.module-kpi-card span,
.metric-card span,
.ops-task-card span {
    font-size: .68rem !important;
    line-height: 1.15 !important;
}

.module-dashboard-page .metric-card strong,
.module-dashboard-page .module-kpi-card strong,
.module-kpi-card strong,
.metric-card strong,
.ops-task-card strong {
    font-size: clamp(1rem, 1.25vw, 1.25rem) !important;
    line-height: 1.05 !important;
}

.module-dashboard-page .metric-card small,
.module-dashboard-page .module-kpi-card small,
.module-kpi-card small,
.metric-card small,
.ops-task-card small {
    display: -webkit-box;
    font-size: .72rem !important;
    line-height: 1.25 !important;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.module-dashboard-page .ops-task-grid {
    display: grid;
    gap: 10px !important;
    grid-template-columns: repeat(auto-fit, minmax(205px, 1fr)) !important;
}

.module-dashboard-page .dashboard-two-columns,
.dashboard-two-columns {
    display: grid;
    gap: 14px !important;
    grid-template-columns: minmax(0, 1.15fr) minmax(320px, .85fr) !important;
}

.report-widget-grid {
    display: grid;
    gap: 14px !important;
    grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)) !important;
}

.panel > .toolbar.compact,
.toolbar.compact,
.filters-grid,
.filters-grid.compact-grid,
.filters-row,
.form-grid.three,
.form-grid.four,
.form-grid.four-columns,
.form-grid.finance-filter-grid {
    align-items: end !important;
    display: grid !important;
    gap: 10px !important;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)) !important;
}

.filters-grid .field:first-child,
.filters-row > input[type="search"],
.toolbar.compact > input[type="search"],
.form-grid.three .wide,
.form-grid.four .wide,
.form-grid.four-columns .wide {
    grid-column: span 2;
}

.filters-row > input,
.filters-row > select,
.toolbar.compact > input,
.toolbar.compact > select,
.filters-grid input,
.filters-grid select,
.form-grid.three input,
.form-grid.three select,
.form-grid.four input,
.form-grid.four select,
.form-grid.four-columns input,
.form-grid.four-columns select {
    min-height: 38px !important;
}

.section-heading.compact h2,
.split-header.compact h2,
.section-heading h2 {
    margin-bottom: 4px !important;
}

.canvassing-method-grid {
    display: grid;
    gap: 12px !important;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)) !important;
}

.canvassing-method-card {
    align-content: start;
    border: 1px solid var(--line, #dbe3ef);
    border-radius: 16px;
    display: grid;
    gap: 8px;
    padding: 12px;
}

.canvassing-method-card p {
    margin: 0;
}

.erp-pagination--compact {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: space-between;
    margin-top: 10px;
}

.erp-pagination--compact .erp-pagination__summary {
    color: var(--muted, #64748b);
    font-size: .78rem;
}

@media (max-width: 900px) {
    .module-dashboard-page .dashboard-two-columns,
    .dashboard-two-columns {
        grid-template-columns: 1fr !important;
    }

    .filters-grid .field:first-child,
    .filters-row > input[type="search"],
    .toolbar.compact > input[type="search"],
    .form-grid.three .wide,
    .form-grid.four .wide,
    .form-grid.four-columns .wide {
        grid-column: 1 / -1;
    }
}

/* product show overview analytics cockpit. */
.product-overview-pane {
    display: grid;
    gap: 14px;
}
.product-analytics-kpis {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)) !important;
}
.product-analytics-layout {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
}
.product-analytics-card {
    border: 1px solid var(--line, #dbe3ef);
    border-radius: 18px;
    background: linear-gradient(180deg, #fff, #f8fafc);
    display: grid;
    gap: 10px;
    min-width: 0;
    padding: 14px;
}
.product-analytics-card-wide {
    grid-column: span 2;
}
.product-analytics-card .chart-column-bars {
    min-height: 210px;
}
.product-analytics-card .chart-column-track {
    height: 140px;
}
.product-analytics-card .chart-pie-ring {
    height: 142px;
    width: 142px;
}
.product-analytics-card .chart-pie-ring:not(.is-solid)::after {
    height: 74px;
    width: 74px;
}
.product-insight-list {
    display: grid;
    gap: 8px;
    margin: 0;
    padding-left: 18px;
}
.product-insight-list li {
    color: var(--text, #0f172a);
    line-height: 1.45;
}
@media (max-width: 980px) {
    .product-analytics-layout {
        grid-template-columns: 1fr;
    }
    .product-analytics-card-wide {
        grid-column: auto;
    }
}

/* report/material-usage and dense operational forms/cards. */
.report-summary-grid,
.stats-grid,
.material-usage-standard-page .report-summary-grid {
    display: grid !important;
    gap: 10px !important;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)) !important;
}

.material-usage-standard-page .toolbar.compact-grid,
.toolbar.compact-grid,
.panel > .toolbar.compact-grid {
    align-items: end !important;
    display: grid !important;
    gap: 10px !important;
    grid-template-columns: repeat(auto-fit, minmax(165px, 1fr)) !important;
}

.material-usage-standard-page .toolbar.compact-grid .field,
.toolbar.compact-grid .field {
    min-width: 0 !important;
}

.material-usage-standard-page .toolbar.compact-grid .field.wide,
.toolbar.compact-grid .field.wide {
    grid-column: span 2;
}

.material-usage-standard-page .stat-card,
.report-summary-grid .stat-card,
.stats-grid .stat-card {
    border-radius: 14px !important;
    min-height: 0 !important;
    padding: 10px 12px !important;
}

.material-usage-standard-page .stat-card span,
.report-summary-grid .stat-card span,
.stats-grid .stat-card span {
    font-size: .68rem !important;
    line-height: 1.15 !important;
}

.material-usage-standard-page .stat-card strong,
.report-summary-grid .stat-card strong,
.stats-grid .stat-card strong {
    font-size: clamp(1rem, 1.25vw, 1.25rem) !important;
    line-height: 1.05 !important;
}

.material-usage-standard-page .stat-card small,
.report-summary-grid .stat-card small,
.stats-grid .stat-card small {
    display: -webkit-box;
    font-size: .72rem !important;
    line-height: 1.25 !important;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.material-usage-standard-page .data-table.compact th,
.material-usage-standard-page .data-table.compact td {
    padding: 7px 8px !important;
    vertical-align: top;
}

.material-usage-standard-page .report-performance-note {
    align-items: flex-start;
    display: grid;
    gap: 8px;
    grid-template-columns: minmax(0, 1fr) auto;
}

.product-minimum-stock-panel,
.batch-metadata-panel {
    border: 1px solid var(--line, #dbe3ef);
    border-radius: 16px;
    padding: 12px;
}

@media (max-width: 760px) {
    .material-usage-standard-page .toolbar.compact-grid .field.wide,
    .toolbar.compact-grid .field.wide {
        grid-column: auto;
    }
    .material-usage-standard-page .report-performance-note {
        grid-template-columns: 1fr;
    }
}

/* RBAC role duplicate visibility + cleanup UI */
.role-list-toolbar {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(130px, 170px) minmax(220px, 300px);
  gap: 8px;
  align-items: end;
  margin: 10px 0 12px;
}
.role-company-toggle {
  min-height: 58px;
  padding: 9px 10px;
}
.role-company-line {
  color: #2563eb !important;
  font-weight: 650;
}
.role-cleanup-report {
  margin: 12px 0;
}
.role-cleanup-list {
  display: grid;
  gap: 4px;
  margin-top: 8px;
  font-size: .78rem;
}
.role-cleanup-list span {
  display: block;
  padding: 6px 8px;
  border-radius: 10px;
  background: rgba(255,255,255,.62);
}
@media (max-width: 980px) {
  .role-list-toolbar {
    grid-template-columns: 1fr;
  }
}

/* Multi-language UI switcher */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.locale-switcher {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.locale-switcher .form-select {
  min-width: 92px;
  width: auto;
  height: 34px;
  padding-block: 4px;
}
.navbar-locale-switcher {
  min-width: 104px;
}
.auth-locale-switcher {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 10px;
}
.auth-locale-switcher .locale-switcher {
  padding: 6px 8px;
  border: 1px solid var(--app-border-color, #e5e7eb);
  border-radius: 999px;
  background: rgba(255, 255, 255, .86);
}

/* polished partner/customer/supplier/marketing overview analytics. */
.partner-analytics-overview {
    display: grid;
    gap: 14px;
}

.partner-overview-hero {
    align-items: stretch;
    background: linear-gradient(135deg, #eef5ff 0%, #ffffff 52%, #f8fafc 100%);
    border: 1px solid #dbeafe;
    border-radius: 22px;
    box-shadow: 0 16px 40px rgba(37, 99, 235, .08);
    display: grid;
    gap: 16px;
    grid-template-columns: minmax(0, 1fr) minmax(280px, .78fr);
    overflow: hidden;
    padding: 18px;
    position: relative;
}

.partner-overview-hero::before {
    background: radial-gradient(circle, rgba(37, 99, 235, .18), rgba(37, 99, 235, 0) 68%);
    content: "";
    height: 220px;
    inset: -110px -70px auto auto;
    position: absolute;
    width: 220px;
}

.partner-overview-hero__content,
.partner-overview-hero__meta {
    position: relative;
    z-index: 1;
}

.partner-overview-hero__content h2 {
    color: #0f172a;
    font-size: clamp(1.35rem, 2vw, 2rem);
    letter-spacing: -.035em;
    line-height: 1.12;
    margin: 4px 0 8px;
}

.partner-overview-hero__content p:not(.eyebrow) {
    color: #475569;
    margin: 0;
    max-width: 820px;
}

.partner-overview-hero__meta {
    align-content: start;
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(auto-fit, minmax(135px, 1fr));
}

.partner-overview-chip {
    background: rgba(255, 255, 255, .82);
    border: 1px solid #dbe3ef;
    border-radius: 16px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, .05);
    display: grid;
    gap: 4px;
    min-width: 0;
    padding: 11px 12px;
}

.partner-overview-chip small,
.partner-kpi-card span,
.partner-insight-strip span,
.partner-status-row span {
    color: #52627a;
    font-size: .68rem;
    font-weight: 900;
    letter-spacing: .055em;
    line-height: 1.15;
    text-transform: uppercase;
}

.partner-overview-chip strong {
    color: #0f172a;
    font-size: .98rem;
    font-weight: 950;
    line-height: 1.15;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.partner-overview-chip.is-primary {
    background: linear-gradient(180deg, #dbeafe 0%, #ffffff 100%);
    border-color: #bfdbfe;
}

.partner-kpi-grid,
.partner-insight-strip,
.partner-status-grid,
.partner-table-grid {
    display: grid;
    gap: 12px;
}

.partner-kpi-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.partner-kpi-card,
.partner-insight-strip > article,
.partner-status-card {
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid #dbe3ef;
    border-radius: 18px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, .055);
    display: grid;
    gap: 5px;
    min-height: 86px;
    min-width: 0;
    overflow: hidden;
    padding: 13px 14px;
    position: relative;
}

.partner-kpi-card::before,
.partner-insight-strip > article::before,
.partner-status-card::before {
    background: var(--partner-card-accent, #2563eb);
    border-radius: 0 999px 999px 0;
    content: "";
    inset: 12px auto 12px 0;
    opacity: .72;
    position: absolute;
    width: 3px;
}

.partner-kpi-card.tone-warning,
.partner-insight-strip > article:nth-child(1) {
    --partner-card-accent: #d97706;
    background: linear-gradient(180deg, #fffaf2 0%, #ffffff 100%);
    border-color: #fed7aa;
}

.partner-kpi-card.tone-success,
.partner-insight-strip > article:nth-child(2) {
    --partner-card-accent: #16a34a;
    background: linear-gradient(180deg, #f0fdf4 0%, #ffffff 100%);
    border-color: #bbf7d0;
}

.partner-kpi-card.tone-info,
.partner-insight-strip > article:nth-child(3) {
    --partner-card-accent: #2563eb;
    background: linear-gradient(180deg, #eff6ff 0%, #ffffff 100%);
    border-color: #bfdbfe;
}

.partner-kpi-card strong,
.partner-insight-strip strong {
    color: #0f172a;
    font-size: clamp(1.05rem, 1.45vw, 1.42rem);
    font-weight: 950;
    letter-spacing: -.025em;
    line-height: 1.08;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.partner-kpi-card small,
.partner-insight-strip small {
    color: #64748b;
    display: block;
    font-size: .76rem;
    line-height: 1.25;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.partner-insight-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.partner-chart-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
}

.partner-chart-card {
    min-height: 0;
}

.partner-chart-card .chart-column-bars {
    min-height: 210px;
}

.partner-chart-card .chart-column-track {
    height: 150px;
}

.partner-chart-card .chart-pie-ring {
    height: 150px;
    width: 150px;
}

.partner-chart-card .chart-pie-ring:not(.is-solid)::after {
    height: 78px;
    width: 78px;
}

.partner-status-section {
    display: grid;
    gap: 12px;
}

.partner-status-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.partner-status-card {
    background: #fff;
    box-shadow: none;
    gap: 10px;
    min-height: 0;
}

.partner-status-card h4 {
    color: #0f172a;
    font-size: .95rem;
    margin: 0 0 2px;
}

.partner-status-row {
    display: grid;
    gap: 7px;
}

.partner-status-row > div:first-child {
    align-items: center;
    display: flex;
    gap: 10px;
    justify-content: space-between;
}

.partner-status-row strong {
    color: #0f172a;
    font-size: .9rem;
}

.partner-status-bar {
    background: #e2e8f0;
    border-radius: 999px;
    height: 8px;
    overflow: hidden;
}

.partner-status-bar i {
    background: linear-gradient(90deg, #2563eb, #60a5fa);
    border-radius: inherit;
    display: block;
    height: 100%;
    min-width: 4px;
}

.partner-table-grid {
    grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
}

.partner-table-card .section-heading {
    margin-bottom: 8px;
}

@media (max-width: 980px) {
    .partner-overview-hero {
        grid-template-columns: 1fr;
    }

    .partner-insight-strip {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .partner-overview-hero,
    .partner-kpi-card,
    .partner-insight-strip > article,
    .partner-status-card {
        border-radius: 16px;
        padding: 12px;
    }

    .partner-kpi-grid,
    .partner-chart-grid,
    .partner-table-grid {
        grid-template-columns: 1fr;
    }
}

/* company-context-safe dashboard empty state. */
.dashboard-company-empty-panel {
    background: linear-gradient(135deg, #eff6ff 0%, #ffffff 55%, #f8fafc 100%);
    border-color: #bfdbfe;
}

.company-context-empty-state {
    align-items: center;
    display: grid;
    gap: 18px;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
}

.company-context-empty-state h2 {
    color: #0f172a;
    font-size: clamp(1.35rem, 2vw, 1.9rem);
    letter-spacing: -.035em;
    margin: 4px 0 8px;
}

.company-context-empty-state p:not(.eyebrow) {
    color: #475569;
    margin: 0;
    max-width: 760px;
}

.company-context-empty-form {
    background: rgba(255, 255, 255, .88);
    border: 1px solid #dbe3ef;
    border-radius: 18px;
    box-shadow: 0 14px 32px rgba(15, 23, 42, .06);
    display: grid;
    gap: 10px;
    padding: 14px;
}

.company-context-empty-form label {
    color: #334155;
    font-size: .78rem;
    font-weight: 900;
    letter-spacing: .045em;
    text-transform: uppercase;
}

.company-context-empty-form select {
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    min-height: 40px;
    padding: 8px 10px;
}

@media (max-width: 840px) {
    .company-context-empty-state {
        grid-template-columns: 1fr;
    }
}

/* fallback styling for legacy kpi-grid/kpi-card blocks used by reports. */
.kpi-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.kpi-grid.compact,
.kpi-grid.four {
    grid-template-columns: repeat(auto-fit, minmax(165px, 1fr));
}

.kpi-card {
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid #dbe3ef;
    border-radius: 18px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, .055);
    display: grid;
    gap: 5px;
    min-height: 82px;
    min-width: 0;
    padding: 13px 14px;
    position: relative;
}

.kpi-card::before {
    background: #2563eb;
    border-radius: 0 999px 999px 0;
    content: "";
    inset: 12px auto 12px 0;
    opacity: .72;
    position: absolute;
    width: 3px;
}

.kpi-card span {
    color: #52627a;
    font-size: .68rem;
    font-weight: 900;
    letter-spacing: .055em;
    line-height: 1.15;
    text-transform: uppercase;
}

.kpi-card strong {
    color: #0f172a;
    font-size: clamp(1.05rem, 1.45vw, 1.42rem);
    font-weight: 950;
    letter-spacing: -.025em;
    line-height: 1.08;
}

.kpi-card small {
    color: #64748b;
    font-size: .76rem;
    line-height: 1.25;
}

/* structured approval approver pickers and readable money-like inputs */
.money-input-wrap{display:flex;align-items:stretch;width:100%;border:1px solid var(--line);border-radius:13px;background:#fff;overflow:hidden;transition:border-color .15s ease,box-shadow .15s ease}.money-input-wrap:focus-within{border-color:var(--brand);box-shadow:0 0 0 4px var(--brand-soft)}.money-prefix{display:inline-flex;align-items:center;justify-content:center;min-width:48px;padding:0 12px;background:#f8fafc;border-right:1px solid var(--line);font-weight:900;color:#1e40af}.money-input-wrap .form-input,.money-input-wrap input{border:0!important;box-shadow:none!important;border-radius:0!important;min-height:42px;text-align:right;font-variant-numeric:tabular-nums}.approver-picker-field{align-content:start}.approver-multi-select{min-height:150px;padding:8px;background:#fff}.approver-multi-select option{padding:8px 10px;border-radius:8px;margin:2px 0}.selected-chip-list{display:flex;align-items:center;flex-wrap:wrap;gap:6px;min-height:28px;margin-top:2px}.selected-chip{display:inline-flex;align-items:center;gap:5px;border:1px solid #c7d2fe;background:#eef2ff;color:#3730a3;border-radius:999px;padding:4px 9px;font-size:.76rem;font-weight:900}.workflow-step-grid .approver-picker-field{grid-column:span 2}@media(max-width:980px){.workflow-step-grid .approver-picker-field{grid-column:1/-1}.approver-multi-select{min-height:130px}}@media(max-width:640px){.money-prefix{min-width:42px;padding:0 10px}.money-input-wrap .form-input,.money-input-wrap input{text-align:left}.approver-multi-select{min-height:120px}}

/* structured approval picker; avoids native multi-select duplicate values and adds removable chips. */
.approver-picker-panel{display:grid;gap:10px;width:100%;min-width:0}.selected-chip-list--boxed{align-items:flex-start;min-height:44px;padding:8px;border:1px dashed var(--line);border-radius:14px;background:#f8fafc}.selected-chip.removable{border:1px solid #c7d2fe;background:#eef2ff;color:#3730a3;cursor:pointer;transition:background .15s ease,border-color .15s ease,transform .15s ease}.selected-chip.removable:hover{background:#e0e7ff;border-color:#818cf8;transform:translateY(-1px)}.approver-option-list{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:8px;max-height:260px;overflow:auto;padding:8px;border:1px solid var(--line);border-radius:16px;background:#fff}.approver-option{display:flex;align-items:flex-start;gap:9px;width:100%;min-width:0;padding:9px 10px;border:1px solid #dbe4f0;border-radius:13px;background:#fff;color:var(--ink);text-align:left;cursor:pointer;transition:border-color .15s ease,background .15s ease,box-shadow .15s ease}.approver-option:hover{border-color:#93c5fd;background:#eff6ff}.approver-option.is-selected{border-color:#2563eb;background:#eff6ff;box-shadow:0 0 0 3px rgba(37,99,235,.09)}.approver-option-check{display:inline-flex;align-items:center;justify-content:center;flex:0 0 24px;width:24px;height:24px;border-radius:999px;background:#e0edff;color:#1d4ed8;font-size:.78rem;font-weight:900}.approver-option.is-selected .approver-option-check{background:#2563eb;color:#fff}.approver-option-body{display:grid;gap:2px;min-width:0}.approver-option-body strong{font-size:.82rem;line-height:1.25;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.approver-option-body small{font-size:.72rem;color:var(--muted);line-height:1.25;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.workflow-step-grid .approver-picker-field{grid-column:span 2}.money-input-wrap .form-input,.money-input-wrap input{font-variant-numeric:tabular-nums}.money-input-wrap .money-input::placeholder{color:#64748b;text-align:left}@media(max-width:980px){.workflow-step-grid .approver-picker-field{grid-column:1/-1}.approver-option-list{grid-template-columns:1fr;max-height:220px}}@media(max-width:640px){.approver-option-list{max-height:200px}.selected-chip.removable{max-width:100%;white-space:normal}.approver-option-body strong,.approver-option-body small{white-space:normal}}

/* Easier System Users creation wizard */
.user-access-hero h2{font-size:clamp(1.35rem,2vw,2rem)}
.user-create-wizard-panel form{display:grid;gap:16px}
.wizard-progress-strip{display:grid;grid-template-columns:repeat(4,minmax(150px,1fr));gap:10px}
.wizard-progress-item{display:flex;align-items:flex-start;gap:10px;padding:12px;border:1px solid var(--line);border-radius:16px;background:var(--panel-soft)}
.wizard-progress-item>.wizard-progress-badge,.wizard-progress-item>span:first-child,.wizard-step-number{display:inline-grid;place-items:center;flex:0 0 auto;width:30px;height:30px;border-radius:999px;background:#e2e8f0;color:#0f172a;font-weight:900;font-size:.84rem}
.wizard-progress-item.done>span,.wizard-step-number{background:var(--brand);color:#fff}
.wizard-progress-item strong,.wizard-step-heading strong{display:block;font-weight:900}
.wizard-progress-item small,.wizard-step-heading small{display:block;color:var(--muted);font-size:.78rem;margin-top:2px}
.wizard-progress-copy{display:block;min-width:0;width:auto!important;height:auto!important;text-align:left}.wizard-progress-copy strong,.wizard-progress-copy small{overflow-wrap:break-word;word-break:normal;white-space:normal}
.wizard-two-column{display:grid;grid-template-columns:minmax(280px,.9fr) minmax(360px,1.1fr);gap:14px;align-items:start}
.wizard-step-card{padding:14px;border:1px solid var(--line);border-radius:18px;background:#fff;box-shadow:0 10px 28px rgba(15,23,42,.05)}
.wizard-step-heading{display:flex;gap:10px;align-items:flex-start;margin-bottom:12px}
.wizard-step-heading p{margin:3px 0 0}
.company-search-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px;align-items:end;margin-bottom:10px}
.company-card-grid,.user-type-card-grid,.wizard-preset-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:10px}
.company-choice-card,.quick-role-card,.user-type-card{min-height:76px;display:flex;align-items:flex-start;gap:10px;text-align:left;border:1px solid var(--line);border-radius:16px;background:var(--panel-soft);padding:12px;cursor:pointer;color:var(--text)}
.company-choice-card,.quick-role-card{flex-direction:column}
.company-choice-card:hover,.quick-role-card:hover,.user-type-card:hover{border-color:var(--brand);box-shadow:0 0 0 3px var(--brand-soft)}
.company-choice-card.active,.quick-role-card.active,.user-type-card.active{border-color:var(--brand);background:var(--brand-soft);box-shadow:0 0 0 3px rgba(29,78,216,.10)}
.company-choice-card strong,.quick-role-card strong,.user-type-card strong{font-weight:900;line-height:1.25}
.company-choice-card small,.quick-role-card small,.user-type-card small{display:block;color:var(--muted);font-size:.78rem;line-height:1.35;margin-top:4px}
.user-type-card input{width:auto;min-height:auto;margin-top:3px}
.locked-context-card{padding:14px;border:1px solid var(--brand);border-radius:16px;background:var(--brand-soft)}
.locked-context-card strong,.locked-context-card small{display:block}
.identity-step-card{background:linear-gradient(180deg,#fff,#f8fafc)}
.quick-identity-grid{grid-template-columns:repeat(4,minmax(180px,1fr))}
.sticky-user-save-bar{position:sticky;bottom:14px;z-index:20;display:flex;justify-content:space-between;gap:12px;align-items:center;padding:12px 14px;border:1px solid #bfdbfe;border-radius:18px;background:rgba(255,255,255,.96);box-shadow:0 16px 42px rgba(15,23,42,.16);backdrop-filter:blur(10px)}
.sticky-user-save-bar small{display:block;color:var(--muted);margin-top:2px}
.wizard-details{border:1px solid var(--line);border-radius:18px;background:#fff;overflow:hidden}
.wizard-details>summary{display:flex;justify-content:space-between;gap:12px;align-items:center;list-style:none;padding:14px 16px;cursor:pointer;font-weight:900;background:var(--panel-soft)}
.wizard-details>summary::-webkit-details-marker{display:none}
.wizard-details>summary:after{content:'+';display:inline-grid;place-items:center;width:28px;height:28px;border-radius:999px;background:#e2e8f0;font-weight:900}
.wizard-details[open]>summary:after{content:'−'}
.wizard-details>summary small{display:block;color:var(--muted);font-weight:600;margin-top:2px}
.advanced-user-grid{padding:14px}
.manual-role-section{padding:12px;border:1px dashed var(--line);border-radius:16px;background:#fff}
@media(max-width:1100px){.wizard-progress-strip{grid-template-columns:repeat(2,minmax(140px,1fr))}.wizard-two-column{grid-template-columns:1fr}.quick-identity-grid{grid-template-columns:repeat(2,minmax(180px,1fr))}}
@media(max-width:720px){.wizard-progress-strip,.company-card-grid,.user-type-card-grid,.wizard-preset-grid,.quick-identity-grid{grid-template-columns:1fr}.company-search-row{grid-template-columns:1fr}.sticky-user-save-bar{position:static;align-items:stretch;flex-direction:column}.sticky-user-save-bar .actions-row{justify-content:stretch}.sticky-user-save-bar .btn{flex:1}}

/* System error log detail and copy-ready diagnostics */
.error-log-detail-grid .mono-break,
.error-log-show-page .mono-break{
  font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono",monospace;
  overflow-wrap:anywhere;
  word-break:break-word;
}
.error-log-copy-box{
  min-height:360px;
  font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono",monospace;
  font-size:.82rem;
  line-height:1.45;
  white-space:pre;
}
.error-log-code-block{
  max-height:520px;
  overflow:auto;
  white-space:pre-wrap;
  overflow-wrap:anywhere;
  word-break:break-word;
}
.copy-status{
  min-height:1.25rem;
  margin:.6rem 0 0;
}

/* Superadmin impersonation guardrail. */
.inline-action-form{display:inline-flex;margin:0}.btn.warning{background:#fffbeb;border-color:#fde68a;color:#92400e}.impersonation-banner{position:fixed;left:50%;bottom:18px;transform:translateX(-50%);z-index:120;width:min(920px,calc(100vw - 28px));display:flex;align-items:center;justify-content:space-between;gap:14px;padding:12px 14px;border:1px solid #f59e0b;border-radius:18px;background:rgba(255,251,235,.98);color:#78350f;box-shadow:0 20px 55px rgba(15,23,42,.22)}.impersonation-banner__copy{display:grid;gap:2px;min-width:0}.impersonation-banner__copy strong{font-size:.9rem;text-transform:uppercase;letter-spacing:.06em}.impersonation-banner__copy span{font-size:.86rem;line-height:1.35}.impersonation-banner__stop{white-space:nowrap}@media(max-width:720px){.impersonation-banner{align-items:stretch;flex-direction:column;bottom:10px;border-radius:16px}.impersonation-banner__stop{width:100%}}

/* readable business settings tabs/helpers */
.business-settings-page .compact-settings-guide{grid-template-columns:repeat(auto-fit,minmax(260px,1fr));}
.business-rules-panel .compact-tabs{padding:8px;border:1px solid #dbe3ef;border-radius:18px;background:#f8fafc;margin-bottom:14px!important;}
.business-rules-panel .compact-tabs a{gap:7px;}
.business-rules-panel .compact-tabs a small{display:inline-flex;align-items:center;justify-content:center;min-width:22px;height:22px;border-radius:999px;background:rgba(15,23,42,.08);font-size:.72rem;}
.business-rules-panel .compact-tabs a.active small{background:rgba(255,255,255,.22);color:#fff;}
.business-setting-field{padding:12px;border:1px solid #e2e8f0;border-radius:16px;background:#fff;align-content:start;}
.business-setting-field .help-text{display:block;margin-top:2px;color:#64748b;font-size:.76rem;line-height:1.4;}
.business-setting-field .error-text{display:block;margin-top:2px;color:#b91c1c;font-size:.76rem;font-weight:800;}
.active-settings-group{border:1px solid #dbe3ef;background:#f8fafc;box-shadow:none;}
.active-settings-group .business-settings-grid{grid-template-columns:repeat(auto-fit,minmax(300px,1fr));}
.active-settings-group textarea.form-textarea{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono",monospace;font-size:.82rem;line-height:1.45;}
@media(max-width:720px){.active-settings-group .business-settings-grid{grid-template-columns:1fr}.business-rules-panel .compact-tabs{overflow:auto;flex-wrap:nowrap!important}}

/* floating toasts, disabled searchable-select, product/supplier clarity. */
.erp-toast-region {
    position: fixed;
    right: 18px;
    top: max(16px, env(safe-area-inset-top));
    z-index: 120;
    display: grid;
    gap: 10px;
    width: min(420px, calc(100vw - 24px));
    pointer-events: none;
}

.erp-toast {
    pointer-events: auto;
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr) 30px;
    gap: 10px;
    align-items: start;
    padding: 12px;
    border: 1px solid var(--line, #e5e7eb);
    border-radius: 16px;
    background: rgba(255, 255, 255, .98);
    color: #0f172a;
    box-shadow: 0 20px 55px rgba(15, 23, 42, .18);
    animation: erpToastEnter .18s ease-out both;
}

.erp-toast.is-leaving {
    animation: erpToastLeave .18s ease-in both;
}

.erp-toast__icon {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    background: #e2e8f0;
    color: #334155;
}

.erp-toast__body {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.erp-toast__body strong {
    font-size: .88rem;
    color: #0f172a;
}

.erp-toast__body p {
    margin: 0;
    color: #475569;
    font-size: .82rem;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.erp-toast__close {
    width: 30px;
    height: 30px;
    border: 0;
    border-radius: 999px;
    background: rgba(15, 23, 42, .06);
    color: #334155;
    cursor: pointer;
    font-size: 1.1rem;
    line-height: 1;
}

.erp-toast__close:hover {
    background: rgba(15, 23, 42, .12);
}

.erp-toast.is-success {
    border-color: #bbf7d0;
    background: #f0fdf4;
}

.erp-toast.is-success .erp-toast__icon {
    background: #dcfce7;
    color: #166534;
}

.erp-toast.is-danger {
    border-color: #fecaca;
    background: #fef2f2;
}

.erp-toast.is-danger .erp-toast__icon {
    background: #fee2e2;
    color: #991b1b;
}

.erp-toast.is-warning {
    border-color: #fed7aa;
    background: #fff7ed;
}

.erp-toast.is-warning .erp-toast__icon {
    background: #ffedd5;
    color: #9a3412;
}

.erp-toast.is-info .erp-toast__icon {
    background: var(--app-brand-soft-color, #dbeafe);
    color: var(--app-brand-color, #2563eb);
}

@keyframes erpToastEnter {
    from { opacity: 0; transform: translateY(-8px) translateX(12px); }
    to { opacity: 1; transform: translateY(0) translateX(0); }
}

@keyframes erpToastLeave {
    from { opacity: 1; transform: translateY(0) translateX(0); }
    to { opacity: 0; transform: translateY(-6px) translateX(12px); }
}

.erp-search-select.is-disabled .erp-search-select__control {
    background: #f1f5f9;
    color: #64748b;
    cursor: not-allowed;
    opacity: .86;
    box-shadow: none !important;
}

.erp-search-select.is-disabled .erp-search-select__clear,
.erp-search-select.is-disabled .erp-search-select__arrow {
    opacity: .35;
}

.erp-lock-help {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #475569;
    font-size: .74rem;
    font-weight: 800;
}

.product-cost-stack {
    display: grid;
    gap: 2px;
}

.product-cost-stack strong {
    font-weight: 900;
}

.product-cost-stack small {
    color: #64748b;
    font-size: .72rem;
}

.product-index-help {
    margin: 0 0 12px;
    padding: 10px 12px;
    border: 1px dashed #bfdbfe;
    border-radius: 14px;
    background: #eff6ff;
    color: #1e3a8a;
    font-size: .84rem;
    line-height: 1.4;
}

.supplier-product-panel {
    display: grid;
    gap: 14px;
}

.supplier-product-form-card {
    border: 1px solid #dbe3ef;
    border-radius: 18px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    padding: 14px;
}

.supplier-product-form-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(180px, 1fr));
    gap: 12px;
    align-items: start;
}

.supplier-product-inline-brand {
    grid-column: 1 / -1;
}

.supplier-product-actions {
    grid-column: 1 / -1;
    justify-content: flex-end;
}

@media (max-width: 1180px) {
    .supplier-product-form-grid {
        grid-template-columns: repeat(2, minmax(180px, 1fr));
    }
}

@media (max-width: 760px) {
    .erp-toast-region {
        right: 12px;
        top: 12px;
    }

    .supplier-product-form-grid {
        grid-template-columns: 1fr;
    }
}

/* make toast overlay unmistakably floating and make locked line prices visibly read-only. */
.erp-toast-region {
    z-index: 10000;
}

.form-input[readonly],
.form-input:disabled,
.form-select:disabled,
textarea.form-textarea[readonly],
textarea.form-textarea:disabled {
    background: #f1f5f9 !important;
    color: #475569 !important;
    cursor: not-allowed !important;
    box-shadow: none !important;
}

.partner-show-page .show-tabs,
.partner-show-page .erp-tabs.show-tabs {
    position: sticky;
    top: var(--erp-sticky-tabs-top, 76px);
    z-index: 15;
    margin-bottom: 16px !important;
    padding: 8px;
    border: 1px solid #dbe3ef;
    border-radius: 18px;
    background: rgba(255, 255, 255, .96);
    backdrop-filter: blur(8px);
    box-shadow: 0 16px 36px rgba(15, 23, 42, .08);
}

.partner-show-page .erp-tab-pane {
    scroll-margin-top: calc(var(--erp-sticky-tabs-top, 76px) + 74px);
}

.supplier-product-form-card .field-card {
    overflow: visible;
}

.supplier-product-form-card .help-text,
.supplier-product-form-card .error-text {
    line-height: 1.35;
}

.supplier-product-form-card .form-grid.compact {
    grid-template-columns: minmax(180px, .9fr) minmax(220px, 1.1fr) minmax(240px, 1fr) auto;
    align-items: end;
}

@media (max-width: 980px) {
    .supplier-product-form-card .form-grid.compact {
        grid-template-columns: 1fr 1fr;
    }

    .supplier-product-form-card .form-grid.compact .actions-row {
        grid-column: 1 / -1;
        justify-content: flex-start;
    }
}

@media (max-width: 680px) {
    .partner-show-page .show-tabs,
    .partner-show-page .erp-tabs.show-tabs {
        position: relative;
        top: auto;
        overflow-x: auto;
        flex-wrap: nowrap !important;
    }

    .supplier-product-form-card .form-grid.compact {
        grid-template-columns: 1fr;
    }
}

/* modal-safe supplier product editor and separated role permission UI. */
.erp-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1100;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: calc(var(--erp-sticky-navbar-height, 96px) + 1rem) 1rem 1rem;
    background: rgba(15, 23, 42, 0.36);
    overflow-y: auto;
}

.erp-modal-panel {
    width: min(760px, 100%);
    max-height: calc(100vh - var(--erp-sticky-navbar-height, 96px) - 2rem);
    overflow: hidden;
    background: var(--surface, #fff);
    border: 1px solid var(--border, #d7e1ee);
    border-radius: var(--radius-lg, 18px);
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.24);
}

.erp-modal-panel.wide {
    width: min(1180px, 100%);
}

.erp-modal-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.1rem;
    border-bottom: 1px solid var(--border, #d7e1ee);
    background: linear-gradient(180deg, rgba(255,255,255,.94), rgba(248,250,252,.94));
}

.erp-modal-head h3 {
    margin: .15rem 0 0;
}

.erp-modal-body {
    max-height: calc(100vh - var(--erp-sticky-navbar-height, 96px) - 7rem);
    overflow: auto;
    padding: 1rem;
}

.erp-modal-form {
    margin: 0;
}

.supplier-product-toolbar {
    justify-content: flex-start;
    margin-bottom: 1rem;
}

.permission-groups {
    display: grid;
    gap: .9rem;
}

.permission-group-card {
    border: 1px solid var(--border, #d7e1ee);
    border-radius: var(--radius-lg, 16px);
    background: var(--surface-muted, #f8fafc);
    padding: .85rem;
}

.permission-group-head {
    display: flex;
    justify-content: space-between;
    gap: .75rem;
    align-items: center;
    margin-bottom: .7rem;
}

.permission-check-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: .55rem;
}

.permission-check {
    display: flex;
    gap: .55rem;
    align-items: flex-start;
    padding: .6rem;
    border: 1px solid var(--border, #d7e1ee);
    border-radius: var(--radius, 12px);
    background: #fff;
}

.permission-check small {
    display: block;
    color: var(--muted, #64748b);
    line-height: 1.35;
}

.permission-check.is-risky {
    border-color: rgba(251, 146, 60, .48);
    background: rgba(255, 247, 237, .72);
}

/* safer modal geometry for payment terms and supplier-product editor. */
.erp-modal-backdrop {
    align-items: center;
    padding: 1rem;
}
.erp-modal-panel {
    display: flex;
    flex-direction: column;
    max-height: min(88vh, 860px);
}
.erp-modal-panel.supplier-product-modal-panel {
    width: min(1120px, calc(100vw - 2rem));
}
.erp-modal-body {
    flex: 1 1 auto;
    min-height: 0;
    max-height: none;
    overflow: auto;
    overscroll-behavior: contain;
}
.sticky-modal-actions {
    position: sticky;
    bottom: -1rem;
    z-index: 2;
    margin: .5rem -1rem -1rem;
    padding: .85rem 1rem;
    background: linear-gradient(180deg, rgba(255,255,255,.72), var(--surface, #fff) 35%);
    border-top: 1px solid var(--border, #d7e1ee);
    justify-content: flex-end;
}
.supplier-product-modal-panel .supplier-product-form-card {
    border: 0;
    background: transparent;
    box-shadow: none;
    padding: 0;
}
.supplier-product-modal-panel .supplier-product-actions {
    position: sticky;
    bottom: -1rem;
    z-index: 2;
    margin: .5rem -1rem -1rem;
    padding: .85rem 1rem;
    background: linear-gradient(180deg, rgba(255,255,255,.72), var(--surface, #fff) 35%);
    border-top: 1px solid var(--border, #d7e1ee);
    justify-content: flex-end;
}
@media (max-width: 760px) {
    .erp-modal-backdrop {
        align-items: stretch;
        padding: .5rem;
    }
    .erp-modal-panel,
    .erp-modal-panel.wide,
    .erp-modal-panel.supplier-product-modal-panel {
        width: 100%;
        max-height: calc(100vh - 1rem);
    }
}

/* safer modal geometry for payment terms and supplier-product editor. */
.erp-modal-backdrop {
    align-items: center;
    padding: 1rem;
}
.erp-modal-panel {
    display: flex;
    flex-direction: column;
    max-height: min(88vh, 860px);
}
.erp-modal-panel.supplier-product-modal-panel {
    width: min(1120px, calc(100vw - 2rem));
}
.erp-modal-body {
    flex: 1 1 auto;
    min-height: 0;
    max-height: none;
    overflow: auto;
    overscroll-behavior: contain;
}
.sticky-modal-actions {
    position: sticky;
    bottom: -1rem;
    z-index: 2;
    margin: .5rem -1rem -1rem;
    padding: .85rem 1rem;
    background: linear-gradient(180deg, rgba(255,255,255,.72), var(--surface, #fff) 35%);
    border-top: 1px solid var(--border, #d7e1ee);
    justify-content: flex-end;
}
.supplier-product-modal-panel .supplier-product-form-card {
    border: 0;
    background: transparent;
    box-shadow: none;
    padding: 0;
}
.supplier-product-modal-panel .supplier-product-actions {
    position: sticky;
    bottom: -1rem;
    z-index: 2;
    margin: .5rem -1rem -1rem;
    padding: .85rem 1rem;
    background: linear-gradient(180deg, rgba(255,255,255,.72), var(--surface, #fff) 35%);
    border-top: 1px solid var(--border, #d7e1ee);
    justify-content: flex-end;
}
@media (max-width: 760px) {
    .erp-modal-backdrop {
        align-items: stretch;
        padding: .5rem;
    }
    .erp-modal-panel,
    .erp-modal-panel.wide,
    .erp-modal-panel.supplier-product-modal-panel {
        width: 100%;
        max-height: calc(100vh - 1rem);
    }
}

/* compact spacing and clearer action controls for PPIC/WIP/barcode screens. */
.input-action {
    display: flex;
    gap: .5rem;
    align-items: center;
}
.input-action > .form-input,
.input-action > .form-select {
    flex: 1 1 auto;
    min-width: 0;
}
.wrap-actions,
.actions-row.wrap-actions {
    flex-wrap: wrap;
    gap: .55rem;
}
.btn-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.45rem;
    height: 1.45rem;
    padding: 0 .38rem;
    margin-left: .3rem;
    border-radius: 999px;
    background: rgba(255,255,255,.26);
    font-size: .72rem;
    font-weight: 800;
}
.info-grid.compact-info-grid,
.wip-help-grid {
    gap: .75rem;
}
.info-card,
.wip-help-card {
    display: flex;
    flex-direction: column;
    gap: .35rem;
    line-height: 1.45;
}
.info-card strong,
.wip-help-card strong {
    display: block;
    margin-bottom: .08rem;
}
.material-followup-panel .section-heading {
    gap: .85rem;
}
.product-index-help {
    margin-top: .65rem;
    max-width: 980px;
}
.actions-cell {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
    align-items: center;
}
.badge.info {
    color: #075985;
    background: #e0f2fe;
    border-color: #bae6fd;
}
@media (max-width: 780px) {
    .input-action {
        flex-direction: column;
        align-items: stretch;
    }
    .wrap-actions .btn {
        width: 100%;
        justify-content: center;
    }
}

/* material planning selection and safer SPK posting guidance. */
.select-col {
    width: 3.25rem;
    text-align: center;
    white-space: nowrap;
}
.select-col input[type="checkbox"] {
    width: 1.05rem;
    height: 1.05rem;
    cursor: pointer;
}
.alert.info {
    color: #075985;
    background: #e0f2fe;
    border-color: #bae6fd;
}
.mb-3 { margin-bottom: .75rem; }

/* settings source badges and dense business-settings UI. */
.business-setting-label{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;line-height:1.25;}
.setting-source-badge{display:inline-flex;align-items:center;white-space:nowrap;border-radius:999px;padding:3px 8px;font-size:.68rem;font-weight:800;letter-spacing:.02em;border:1px solid #cbd5e1;background:#f8fafc;color:#475569;}
.setting-source-badge.source-company{border-color:#bfdbfe;background:#eff6ff;color:#1d4ed8;}
.setting-source-badge.source-global{border-color:#fde68a;background:#fffbeb;color:#92400e;}
.setting-source-badge.source-system-default{border-color:#e2e8f0;background:#f8fafc;color:#64748b;}
.business-settings-form .section-heading.compact{margin-bottom:10px;}
.business-settings-grid .business-setting-field{min-height:0;}
.business-settings-page .alert.info{border-color:#bfdbfe;background:#eff6ff;color:#1e3a8a;}
.business-settings-page .alert.info.small{font-size:.86rem;line-height:1.45;}
@media(max-width:720px){.business-setting-label{display:grid;gap:6px}.setting-source-badge{width:max-content}}

/* Approval/settings workbench polish */
.permission-check,
.permission-check span,
.permission-check strong,
.permission-check small,
.permission-check-grid,
.permission-group-card {
    min-width: 0;
}
.permission-check strong,
.permission-check small,
.data-table td,
.data-table th,
.notification-item strong,
.notification-item small {
    overflow-wrap: anywhere;
    word-break: normal;
}
.quick-card-grid button.quick-card {
    text-align: left;
    border: 1px solid #dbe3ef;
    cursor: pointer;
    font: inherit;
}
.quick-card-grid button.quick-card:hover {
    border-color: var(--app-brand-color, #2563eb);
    box-shadow: 0 10px 25px rgba(37, 99, 235, .08);
}
.document-templates-page .form-section {
    margin-top: 1rem;
}
.actions-row.compact { gap: .35rem; flex-wrap: wrap; }

/* Approval debug workbench contrast and text wrapping */
.approval-debug-workbench {
  display: grid;
  gap: 16px;
}
.approval-debug-section {
  border: 1px solid color-mix(in srgb, var(--app-border-color, #d6e0ef) 86%, var(--app-brand-color, #2563eb));
  border-radius: 18px;
  padding: 14px;
  background: linear-gradient(180deg, #ffffff, var(--app-panel-soft-bg, #f8fafc));
  box-shadow: 0 10px 30px rgba(15, 23, 42, .045);
  overflow-wrap: anywhere;
}
.approval-debug-conflicts {
  border-left: 5px solid #f59e0b;
}
.approval-debug-maintenance {
  border-left: 5px solid #2563eb;
}
.approval-debug-document {
  border-left: 5px solid #10b981;
}
.approval-debug-section-heading {
  display: grid;
  gap: 4px;
  margin-bottom: 12px;
}
.approval-debug-section-kicker {
  display: inline-flex;
  width: max-content;
  max-width: 100%;
  border-radius: 999px;
  padding: 4px 10px;
  background: var(--app-brand-soft-color, #dbeafe);
  color: var(--app-brand-color, #1d4ed8);
  font-size: .72rem;
  font-weight: 900;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.approval-debug-table-wrap .data-table th,
.approval-debug-table-wrap .data-table td,
.lifecycle-work-queue-panel .data-table th,
.lifecycle-work-queue-panel .data-table td {
  white-space: normal;
  overflow-wrap: anywhere;
}
.approval-debug-section details summary {
  padding: 8px 0;
  font-weight: 900;
  color: var(--app-brand-color, #2563eb);
}
@media (max-width: 980px) {
  .approval-debug-section {
    padding: 12px;
  }
}

/* finance ledger card access and sortable table headers */
.finance-card-table th,
.finance-card-table td,
.finance-ledger-table th,
.finance-ledger-table td {
  white-space: normal;
  overflow-wrap: anywhere;
}
.link-button {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  padding: 0;
  text-align: inherit;
}
.link-button:hover,
.link-button:focus {
  color: var(--app-brand-color, #2563eb);
  text-decoration: underline;
}
.finance-ledger-tab-panel [data-finance-ledger-card-access] {
  border-left: 4px solid var(--app-brand-color, #2563eb);
  padding-left: .75rem;
}

/* payment lifecycle split and non-IT approval wizard helpers */
.lifecycle-steps{display:grid;gap:12px}.lifecycle-step{display:grid;grid-template-columns:auto minmax(0,1fr);gap:10px;align-items:start;border:1px solid var(--line,#e5e7eb);border-radius:16px;background:var(--panel-soft,#f8fafc);padding:12px}.lifecycle-step-dot{display:inline-flex;align-items:center;justify-content:center;width:30px;height:30px;border-radius:999px;border:2px solid #cbd5e1;background:#fff;font-weight:900;color:#64748b}.lifecycle-step.is-done .lifecycle-step-dot{border-color:var(--success,#047857);background:#ecfdf5;color:var(--success,#047857)}.lifecycle-step.is-current{border-color:var(--app-brand-color,var(--brand,#2563eb));box-shadow:0 0 0 3px var(--app-brand-soft-color,var(--brand-soft,#dbeafe))}.lifecycle-step h3{margin:0 0 3px;font-size:.95rem}.lifecycle-step p{margin:0;color:var(--muted,#64748b);line-height:1.4}.lifecycle-step small{display:block;margin-top:4px;color:#475569;font-weight:800}.approval-business-wizard,.approval-scenario-cards{display:grid;gap:12px;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));margin-top:12px}.approval-business-wizard-card,.approval-scenario-card{border:1px solid var(--line,#e5e7eb);border-radius:16px;background:#fff;padding:13px;box-shadow:0 8px 24px rgba(15,23,42,.045)}.approval-business-wizard-card span,.approval-scenario-card span{display:inline-flex;align-items:center;justify-content:center;min-width:28px;height:28px;border-radius:999px;background:var(--app-brand-soft-color,var(--brand-soft,#dbeafe));color:var(--app-brand-color,var(--brand,#2563eb));font-weight:900;font-size:.82rem}.approval-business-wizard-card h4,.approval-scenario-card h4{margin:8px 0 4px;font-size:.96rem}.approval-business-wizard-card p,.approval-scenario-card p{margin:0;color:var(--muted,#64748b);line-height:1.4}.approval-non-it-copy{border-left:5px solid var(--app-brand-color,var(--brand,#2563eb));background:#eff6ff}.badge.status-authorized{background:#eef2ff;color:#3730a3}.badge.status-externally_paid{background:#fef3c7;color:#92400e}.badge.status-proof_uploaded{background:#ecfdf5;color:#047857}.badge.status-reconciled{background:#dcfce7;color:#166534}@media(max-width:720px){.lifecycle-step{grid-template-columns:1fr}.lifecycle-step-dot{width:26px;height:26px}.approval-business-wizard,.approval-scenario-cards{grid-template-columns:1fr}}
.approval-business-wizard-card strong,.approval-scenario-card strong{display:block;margin-bottom:6px;color:#0f172a;font-size:.96rem}.approval-business-wizard-card span,.approval-scenario-card span{display:block;min-width:0;height:auto;border-radius:0;background:transparent;color:var(--muted,#64748b);font-weight:500;font-size:.88rem;line-height:1.4}.approval-business-wizard-card small,.approval-scenario-card small{display:block;margin-top:6px;color:var(--app-brand-color,var(--brand,#2563eb));font-weight:800;line-height:1.35}.approval-business-wizard-card:before,.approval-scenario-card:before{content:'✓';display:inline-flex;align-items:center;justify-content:center;width:26px;height:26px;margin-bottom:8px;border-radius:999px;background:var(--app-brand-soft-color,var(--brand-soft,#dbeafe));color:var(--app-brand-color,var(--brand,#2563eb));font-weight:900}

/* Closing Period Reconciliation Guard */
.grid-4.compact-kpi-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:12px}.stack-xs{display:grid;gap:6px}.inline-status{display:flex;align-items:center;gap:8px;flex-wrap:wrap;border:1px solid var(--app-border-color,#e5e7eb);border-radius:12px;padding:6px 8px;background:var(--app-panel-soft-bg,#f8fafc);font-size:.8rem}.inline-status span{font-weight:800}.inline-status strong{margin-left:auto}.inline-status.ok{border-color:#bbf7d0;background:#f0fdf4;color:#166534}.inline-status.warning{border-color:#fde68a;background:#fffbeb;color:#92400e}.inline-status.blocker,.inline-status.danger{border-color:#fecaca;background:#fef2f2;color:#991b1b}.block{display:block}.grow-field{flex:1 1 260px}.accounting-closing-period-page .compact-table td{vertical-align:top}.accounting-closing-period-page .btn:disabled{opacity:.45;cursor:not-allowed}

/* Closing Checklist Sign-off */
.closing-signoff-panel,
[data-closing-checklist-signoff-panel]{border-left:5px solid var(--app-brand-color,var(--brand,#2563eb))}.action-stack{display:flex;flex-direction:column;gap:6px;align-items:flex-start}.accounting-closing-period-page [data-closing-checklist-signoff-status]{min-width:170px}.accounting-closing-period-page textarea.form-input{min-height:84px;resize:vertical}.badge.danger{background:#fef2f2;color:#991b1b}.badge.warning{background:#fffbeb;color:#92400e}.badge.success{background:#f0fdf4;color:#166534}@media(max-width:860px){.action-stack{align-items:stretch}.action-stack .btn{justify-content:center;width:100%}}

/* Closing Evidence Export */
.accounting-closing-period-page [data-closing-evidence-export]{border-style:dashed}.accounting-closing-period-page [data-closing-evidence-export-json]{font-size:12px}.accounting-closing-period-page[data-closing-evidence-export-page] .action-stack{min-width:140px}

/* Closing Evidence PDF/Excel Pack */
.accounting-closing-period-page [data-closing-evidence-print],
.accounting-closing-period-page [data-closing-evidence-excel]{white-space:nowrap}.accounting-closing-period-page [data-closing-evidence-excel]{border-style:solid}.accounting-closing-period-page [data-closing-evidence-print]{border-style:double}[data-closing-evidence-print-pack]{background:#e5e7eb}[data-closing-evidence-print-pack] table{font-variant-numeric:tabular-nums}

/* High-contrast floating toasts and tax period readiness layout. */
.erp-toast-region {
    z-index: 9999;
    gap: 12px;
    width: min(460px, calc(100vw - 24px));
}

.erp-toast {
    position: relative;
    grid-template-columns: 40px minmax(0, 1fr) 34px;
    gap: 12px;
    padding: 14px 14px 14px 16px;
    border: 2px solid rgba(255, 255, 255, .28);
    border-left-width: 8px;
    background: #111827;
    color: #ffffff;
    box-shadow: 0 28px 80px rgba(2, 6, 23, .44), 0 0 0 1px rgba(255,255,255,.08) inset;
}

.erp-toast__icon {
    width: 40px;
    height: 40px;
    border: 2px solid rgba(255,255,255,.72);
    background: rgba(255,255,255,.16);
    color: #ffffff;
    font-size: 1.05rem;
}

.erp-toast__body strong {
    display: block;
    color: #ffffff;
    font-size: .96rem;
    font-weight: 900;
    letter-spacing: .01em;
}

.erp-toast__body p {
    color: #f8fafc;
    font-size: .9rem;
    line-height: 1.45;
    font-weight: 750;
}

.erp-toast__close {
    width: 34px;
    height: 34px;
    border: 1px solid rgba(255,255,255,.48);
    background: rgba(255,255,255,.16);
    color: #ffffff;
    font-size: 1.2rem;
    font-weight: 900;
}

.erp-toast__close:hover,
.erp-toast__close:focus-visible {
    background: rgba(255,255,255,.28);
    outline: 3px solid rgba(255,255,255,.55);
    outline-offset: 2px;
}

.erp-toast.is-success {
    border-color: rgba(187, 247, 208, .86);
    border-left-color: #22c55e;
    background: linear-gradient(135deg, #064e3b 0%, #065f46 100%);
}

.erp-toast.is-success .erp-toast__icon {
    background: #16a34a;
    color: #ffffff;
}

.erp-toast.is-danger {
    border-color: rgba(254, 202, 202, .9);
    border-left-color: #ef4444;
    background: linear-gradient(135deg, #7f1d1d 0%, #991b1b 100%);
}

.erp-toast.is-danger .erp-toast__icon {
    background: #dc2626;
    color: #ffffff;
}

.erp-toast.is-warning {
    border-color: rgba(254, 215, 170, .94);
    border-left-color: #f59e0b;
    background: linear-gradient(135deg, #78350f 0%, #92400e 100%);
}

.erp-toast.is-warning .erp-toast__icon {
    background: #f59e0b;
    color: #111827;
    border-color: rgba(255,255,255,.88);
}

.erp-toast.is-info {
    border-color: rgba(191, 219, 254, .9);
    border-left-color: #3b82f6;
    background: linear-gradient(135deg, #1e3a8a 0%, #1d4ed8 100%);
}

.erp-toast.is-info .erp-toast__icon {
    background: #2563eb;
    color: #ffffff;
}

.tax-period-readiness-panel .section-heading {
    align-items: end;
}

.inline-period-filter {
    min-width: 220px;
    margin: 0;
}

.tax-period-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.stat-card.danger-soft {
    border-color: #fecaca;
    background: #fff1f2;
}

@media (max-width: 720px) {
    .erp-toast-region {
        right: 12px;
        left: 12px;
        width: auto;
    }

    .erp-toast {
        grid-template-columns: 36px minmax(0, 1fr) 32px;
        padding: 12px;
    }

    .erp-toast__icon {
        width: 36px;
        height: 36px;
    }

    .inline-period-filter {
        min-width: 100%;
    }
}

/* small status helper for read-only selected delivery addresses. */
.success-text{color:#166534;font-size:.78rem;font-weight:800;line-height:1.35;}
.delivery-logistics-card textarea[readonly],.delivery-logistics-card input[readonly]{background:#f0fdf4;border-color:#86efac;color:#14532d;}
/* operational process playbook */
.operational-process-playbook .playbook-stage-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: .75rem; }
.operational-process-playbook .playbook-stage-grid.compact { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.operational-process-playbook .process-stage-card { min-height: 100%; }
.operational-process-playbook .process-stage-card strong { display: block; margin: .35rem 0; }

/* grouped contextual sidebar for large central-system menu families. */
.sidebar-submenu-groups{display:grid;gap:8px;min-width:0;}
.sidebar-submenu-group{border:1px solid rgba(148,163,184,.16);border-radius:14px;background:rgba(255,255,255,.04);overflow:hidden;}
.sidebar-submenu-group summary{display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:38px;padding:9px 11px;cursor:pointer;list-style:none;font-size:.76rem;font-weight:900;letter-spacing:.03em;text-transform:uppercase;color:var(--app-sidebar-text,#172033);}
.sidebar-submenu-group summary::-webkit-details-marker{display:none;}
.sidebar-submenu-group summary::after{content:'▾';font-size:.7rem;opacity:.65;transition:transform .15s ease;}
.sidebar-submenu-group:not([open]) summary::after{transform:rotate(-90deg);}
.sidebar-submenu-group summary b{display:inline-flex;align-items:center;justify-content:center;min-width:21px;height:21px;border-radius:999px;background:rgba(148,163,184,.18);font-size:.68rem;font-weight:900;}
.sidebar-submenu-group .sidebar-submenu-links{padding:0 7px 8px;}

/* guard feedback and clearer operational action grouping. */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}
.info-grid.five-columns {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}
.info-card {
    min-width: 0;
    padding: 12px;
    border: 1px solid var(--line, #e5e7eb);
    border-radius: 14px;
    background: var(--panel-soft, #f8fafc);
}
.guard-feedback {
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr);
    align-items: start;
    width: 100%;
    min-width: 0;
    gap: 10px;
    border-left-width: 5px;
}
.guard-feedback__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    min-width: 30px;
    border: 1px solid currentColor;
    border-radius: 10px;
    font-weight: 900;
    line-height: 1;
}
.guard-feedback__body,
.guard-feedback__head,
.guard-feedback__head > div,
.guard-feedback__list,
.guard-feedback__next {
    min-width: 0;
}
.guard-feedback__body {
    display: grid;
    gap: 8px;
    overflow: hidden;
}
.guard-feedback__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: nowrap;
}
.guard-feedback__head > div {
    flex: 1 1 auto;
}
.guard-feedback__head strong,
.guard-feedback__head small,
.guard-feedback__list li,
.guard-feedback__next span {
    overflow-wrap: break-word;
    word-break: normal;
    white-space: normal;
}
.guard-feedback__head strong {
    display: block;
}
.guard-feedback__head small {
    display: block;
    margin-top: 2px;
    color: var(--muted, #64748b);
    font-weight: 700;
}
.guard-feedback__close {
    flex: 0 0 auto;
}
.guard-feedback__list {
    margin: 0;
    padding-left: 1.15rem;
    display: grid;
    gap: 4px;
}
.guard-feedback__actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
@media (max-width: 560px) {
    .guard-feedback {
        grid-template-columns: 26px minmax(0, 1fr);
    }
    .guard-feedback__icon {
        width: 26px;
        height: 26px;
        min-width: 26px;
        border-radius: 8px;
    }
}
.erp-runtime-guard-feedback {
    position: sticky;
    top: calc(var(--erp-sticky-navbar-height, 0px) + 8px);
    z-index: 19;
    margin-bottom: 12px;
    box-shadow: 0 16px 42px rgba(15, 23, 42, .12);
}
.ppic-command-center {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    align-items: stretch;
}
.ppic-command-step {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 10px;
    padding: 12px;
    border: 1px solid var(--line, #e5e7eb);
    border-radius: 16px;
    background: #fff;
}
.ppic-command-step.is-primary {
    border-color: var(--app-brand-color, var(--brand, #2563eb));
    background: var(--app-brand-soft-color, var(--brand-soft, #dbeafe));
}
.ppic-step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 999px;
    background: var(--app-brand-color, var(--brand, #2563eb));
    color: #fff;
    font-weight: 900;
    font-size: .82rem;
}
.ppic-command-step strong {
    display: block;
    margin-bottom: 2px;
}
.ppic-command-step small {
    display: block;
    color: var(--muted, #64748b);
    margin-bottom: 8px;
    line-height: 1.35;
}
.compact-actions {
    gap: 6px;
    align-items: center;
}
.ppic-context-tabs {
    border-bottom: 1px solid var(--line, #e5e7eb);
    padding-bottom: 10px;
}
.is-field-error,
[data-erp-field-error="1"] {
    border-color: var(--danger, #b91c1c) !important;
    box-shadow: 0 0 0 4px rgba(185, 28, 28, .12) !important;
}
@media (max-width: 1180px) {
    .ppic-command-center {
        grid-template-columns: 1fr;
    }
}
@media (max-width: 720px) {
    .info-grid.five-columns,
    .info-grid {
        grid-template-columns: 1fr;
    }
    .ppic-command-step {
        grid-template-columns: 1fr;
    }
}
.alert.warning {
    background: #fffbeb;
    border-color: #fde68a;
    color: #92400e;
}
.alert.danger,
.alert.error {
    background: #fef2f2;
    border-color: #fecaca;
    color: #991b1b;
}

/* Contextual sidebar grouping for operational Inventory and Sales menus. */
.sidebar-context-head {
    padding: 11px 12px;
}
.sidebar-submenu-group {
    background: rgba(248, 250, 252, .72);
}
.sidebar-submenu-group summary {
    align-items: flex-start;
    color: var(--app-sidebar-text, #172033);
    text-transform: none;
}
.sidebar-submenu-group summary > span {
    display: grid;
    gap: 2px;
    min-width: 0;
}
.sidebar-submenu-group summary strong {
    display: block;
    font-size: .78rem;
    letter-spacing: .04em;
    line-height: 1.18;
    text-transform: uppercase;
}
.sidebar-submenu-group summary small {
    display: block;
    color: rgba(71, 85, 105, .82);
    font-size: .68rem;
    font-weight: 650;
    letter-spacing: 0;
    line-height: 1.28;
    text-transform: none;
}
.sidebar-submenu-group .sidebar-submenu-links {
    display: grid;
    gap: 5px;
}
.sidebar-submenu-links a {
    min-height: 34px;
    padding: 8px 10px;
    background: rgba(255, 255, 255, .76);
    border-color: rgba(148, 163, 184, .26);
    color: var(--app-sidebar-text, #172033);
    line-height: 1.25;
}
.sidebar-submenu-links a:hover {
    border-color: rgba(37, 99, 235, .42);
    background: rgba(239, 246, 255, .88);
}
.sidebar-submenu-links a.active {
    background: rgba(37, 99, 235, .16);
    border-color: rgba(37, 99, 235, .5);
    color: var(--app-brand-color, #2563eb) !important;
}
.sidebar-submenu-links a.active span::after {
    margin-left: 6px;
}

/* Readable guide/changelog detail navigation. */
.reading-navigation-panel {
    display: grid;
    gap: 14px;
}
.reading-navigation-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
.reading-nav-card {
    display: grid;
    gap: 6px;
    min-height: 112px;
    padding: 14px;
    border: 1px solid rgba(148, 163, 184, .38);
    border-radius: var(--app-radius-lg, 18px);
    background: rgba(255, 255, 255, .88);
    color: inherit;
    text-decoration: none;
}
.reading-nav-card:hover {
    border-color: rgba(37, 99, 235, .45);
    box-shadow: 0 10px 24px rgba(15, 23, 42, .08);
    transform: translateY(-1px);
}
.reading-nav-card span {
    color: var(--app-brand-color, #2563eb);
    font-size: .73rem;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
}
.reading-nav-card strong {
    line-height: 1.25;
}
.reading-nav-card small {
    color: #64748b;
    line-height: 1.45;
}
.reading-nav-card.is-disabled {
    opacity: .72;
    background: rgba(248, 250, 252, .82);
}
.readable-list {
    display: grid;
    gap: 9px;
    padding-left: 1.25rem;
}
@media (max-width: 720px) {
    .reading-navigation-grid {
        grid-template-columns: 1fr;
    }
}

/* Human-friendly guide illustrations and changelog timestamps. */
.guide-hero-figure,
.guide-content-figure {
    margin: 0 0 16px;
    padding: 12px;
    border: 1px solid rgba(148, 163, 184, .28);
    border-radius: var(--app-radius-lg, 20px);
    background: linear-gradient(180deg, rgba(248, 250, 252, .96), rgba(255, 255, 255, .98));
    box-shadow: 0 14px 34px rgba(15, 23, 42, .06);
    display: grid;
    gap: 10px;
    overflow: hidden;
}
.guide-hero-figure .guide-illustration,
.guide-content-figure img {
    display: block;
    width: 100%;
    max-height: min(68vh, 760px);
    object-fit: contain;
    border: 1px solid rgba(203, 213, 225, .72);
    border-radius: 16px;
    background: #f8fafc;
}
.guide-hero-figure figcaption,
.guide-content-figure figcaption {
    color: #475569;
    font-size: .86rem;
    line-height: 1.45;
    font-weight: 700;
}
.guide-list-card {
    align-items: stretch;
}
.guide-list-illustration {
    background: linear-gradient(135deg, #f8fafc, #eef6ff);
}
.guide-list-illustration img {
    padding: 8px;
    object-fit: contain;
}
.changelog-date-stack {
    display: grid;
    gap: 4px;
    justify-items: end;
    align-content: start;
    min-width: 180px;
}
.changelog-date-stack small {
    color: #64748b;
    font-size: .76rem;
    font-weight: 800;
}
@media (max-width: 760px) {
    .guide-hero-figure,
    .guide-content-figure {
        padding: 9px;
        border-radius: 16px;
    }
    .guide-hero-figure .guide-illustration,
    .guide-content-figure img {
        max-height: none;
    }
    .changelog-date-stack {
        justify-items: start;
        min-width: 0;
    }
}

/* Multi-company access and guide illustration hardening. */
.multi-company-access-card{display:grid;gap:12px}.multi-company-table-wrap{width:100%;overflow:auto;border:1px solid rgba(203,213,225,.76);border-radius:16px;background:#fff}.multi-company-table-wrap .compact-table{min-width:860px}.multi-company-add-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(210px,1fr));gap:10px;align-items:end}.multi-company-role-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:10px}.role-pill{display:inline-flex;align-items:center;gap:6px;border:1px solid #bfdbfe;background:#eff6ff;color:#1d4ed8;border-radius:999px;padding:5px 10px;font-size:.78rem;font-weight:900}.guide-show-hero,.prose-panel,.guide-hero-figure,.guide-content-figure{min-width:0;max-width:100%;box-sizing:border-box}.guide-hero-figure,.guide-content-figure{width:100%;max-width:min(100%,1180px);margin-left:auto;margin-right:auto;overflow:hidden}.guide-hero-figure .guide-illustration,.guide-content-figure img,.prose-panel img{max-width:100%;width:100%;height:auto;box-sizing:border-box}.guide-hero-figure .guide-illustration{max-height:min(72vh,760px);object-fit:contain}.prose-panel{overflow-wrap:anywhere}.prose-panel svg,.prose-panel iframe{max-width:100%;height:auto}.guide-content-figure figcaption,.guide-hero-figure figcaption{overflow-wrap:anywhere}@media(max-width:780px){.multi-company-table-wrap .compact-table{min-width:720px}.multi-company-add-grid{grid-template-columns:1fr}.guide-hero-figure .guide-illustration{max-height:none}}

/* Access activity, simplified user form, and sortable list polish. */
.sortable-heading,
.data-table th > button[wire\:click^="sort"] {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    font-weight: 900;
    cursor: pointer;
    padding: 0;
    text-align: left;
}
.sortable-heading span,
.data-table th > button[wire\:click^="sort"] span {
    color: #2563eb;
    font-weight: 900;
}
.user-form-simple-help {
    margin: 12px 0;
    padding: 12px 14px;
    border: 1px solid rgba(37, 99, 235, .18);
    background: linear-gradient(135deg, rgba(239,246,255,.95), rgba(255,255,255,.98));
}
.mini-step-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 8px;
    margin: 10px 0;
}
.mini-step-grid span {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 10px;
    border: 1px solid rgba(191, 219, 254, .9);
    border-radius: 14px;
    background: rgba(255,255,255,.86);
    font-weight: 800;
}
.mini-step-grid b {
    display: inline-flex;
    width: 24px;
    height: 24px;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #2563eb;
    color: #fff;
}
[data-one-table-tabs] button,
[data-security-session-tabs] button {
    border: 1px solid rgba(148, 163, 184, .55);
    background: #fff;
    color: #0f172a;
}
[data-one-table-tabs] button.active,
[data-security-session-tabs] button.active {
    background: #2563eb;
    border-color: #2563eb;
    color: #fff;
}

/* Simple guided pages for low-literacy ERP users. */
.low-literacy-page .page-header p,
.low-literacy-page .muted,
.low-literacy-page li,
.low-literacy-page label span,
.company-setup-copy-page p,
.company-setup-copy-page li {
    line-height: 1.55;
}

.simple-guide-card {
    border-left: 5px solid var(--primary, #2563eb);
}

.copy-setup-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 10px;
    margin: 10px 0;
    padding-left: 0;
    list-style-position: inside;
}

.setup-copy-sections {
    margin-top: 14px;
}

.setup-copy-result-grid .stat-card strong {
    font-size: 1.35rem;
}

.code-block {
    white-space: pre-wrap;
    word-break: break-word;
    overflow-wrap: anywhere;
}

.option-card.danger-soft {
    border-color: rgba(220, 38, 38, 0.28);
    background: rgba(254, 242, 242, 0.72);
}

.user-form-page .simple-help-steps,
.user-form-page .multi-company-help-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
}

.user-form-page .simple-help-step {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 10px 12px;
    border: 1px solid var(--border-color, #d7e2f1);
    border-radius: 16px;
    background: #fff;
}

.user-form-page .simple-help-step b {
    display: inline-grid;
    place-items: center;
    min-width: 26px;
    height: 26px;
    border-radius: 999px;
    color: #fff;
    background: var(--primary, #2563eb);
}

.sales-delivery-index-page .delivery-post-help {
    line-height: 1.55;
}

/* Go-live simplicity: pages with many sections must show one table at a time. */
.one-table-anchor-tabs > section.panel[id],
.one-table-anchor-tabs > .erp-tab-pane[id],
.tabs-panel.one-table-per-tab > .tab-section {
    display: none;
}

.one-table-anchor-tabs > section.panel[id]:first-of-type,
.one-table-anchor-tabs > .erp-tab-pane[id]:first-of-type,
.tabs-panel.one-table-per-tab > .tab-section:first-of-type {
    display: block;
}

.one-table-anchor-tabs > section.panel[id]:target,
.one-table-anchor-tabs > .erp-tab-pane[id]:target,
.tabs-panel.one-table-per-tab > .tab-section:target {
    display: block !important;
}

/* JS-controlled tabs must override the default first-pane-only rule. */
.one-table-anchor-tabs > section.panel[id].active,
.one-table-anchor-tabs > .erp-tab-pane[id].active,
.tabs-panel.one-table-per-tab > .tab-section.active {
    display: block !important;
}

.one-table-anchor-tabs:has(> section.panel[id]:target) > section.panel[id]:first-of-type,
.one-table-anchor-tabs:has(> .erp-tab-pane[id]:target) > .erp-tab-pane[id]:first-of-type,
.tabs-panel.one-table-per-tab:has(> .tab-section:target) > .tab-section:first-of-type {
    display: none;
}

.one-table-anchor-tabs .tabs a,
.one-table-anchor-tabs .tabs-nav a,
.tabs-panel.one-table-per-tab .tabs-nav a {
    text-decoration: none;
}


/* Go-live simple-page helpers: one large table at a time and shorter helper text. */
.erp-auto-tabs-nav {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin: .75rem 0 1rem;
    padding: .5rem;
    border: 1px solid var(--border, #d9e2ec);
    border-radius: var(--radius, .75rem);
    background: var(--surface-muted, #f8fafc);
}

.erp-auto-tabs-nav .tab-link {
    border: 1px solid var(--border, #d9e2ec);
    border-radius: 999px;
    background: #fff;
    color: var(--text, #172033);
    cursor: pointer;
    font-weight: 600;
    padding: .45rem .85rem;
}

.erp-auto-tabs-nav .tab-link.active {
    background: var(--primary, #2563eb);
    border-color: var(--primary, #2563eb);
    color: #fff;
}

.erp-auto-table-pane[hidden] {
    display: none !important;
}

.erp-simple-line {
    display: block;
    margin-top: .2rem;
}

/* neat module dashboard tabs. */
.module-dashboard-page[data-disable-auto-flat-table-tabs="1"] .erp-auto-tabs-nav {
    display: none !important;
}

.module-dashboard-page .dashboard-flat-tabs {
    display: grid;
    gap: 14px;
    overflow: visible;
}

.module-dashboard-page .dashboard-tabs-heading {
    margin-bottom: 0;
}

.module-dashboard-page .dashboard-tabs-nav {
    align-items: center;
    background: #f8fafc;
    border: 1px solid var(--line, #dbe3ef);
    border-radius: 18px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
    padding: 8px;
}

.module-dashboard-page .dashboard-tabs-nav a {
    border: 1px solid var(--line, #dbe3ef);
    border-radius: 999px;
    color: var(--text, #0f172a);
    font-weight: 700;
    line-height: 1;
    padding: 10px 14px;
    text-decoration: none;
}

.module-dashboard-page .dashboard-tabs-nav a.active,
.module-dashboard-page .dashboard-tabs-nav a[aria-selected="true"] {
    background: var(--primary, #2563eb);
    border-color: var(--primary, #2563eb);
    color: #fff;
    box-shadow: 0 8px 18px rgba(37, 99, 235, .18);
}

.module-dashboard-page .dashboard-tab-pane {
    min-height: 0;
}

.module-dashboard-page .dashboard-tab-pane[hidden] {
    display: none !important;
}

.module-dashboard-page .dashboard-latest-table {
    max-height: 520px;
    overflow: auto;
}

.module-dashboard-page .dashboard-widget-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)) !important;
}

.module-dashboard-page .dashboard-widget-card {
    min-height: 0;
}

.module-dashboard-page .dashboard-list-card-grid {
    display: grid;
    gap: 8px;
}

.module-dashboard-page .dashboard-list-card {
    border: 1px solid var(--line, #dbe3ef);
    border-radius: 14px;
    display: grid;
    gap: 4px;
    padding: 10px 12px;
}

.module-dashboard-page .dashboard-list-card strong {
    color: var(--text, #0f172a);
}

.module-dashboard-page .dashboard-list-card span,
.module-dashboard-page .dashboard-list-card small {
    color: var(--muted, #64748b);
}

.module-dashboard-page .dashboard-list-card em {
    font-style: normal;
    font-weight: 700;
}

.module-dashboard-page .dashboard-help-stack {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

@media (max-width: 720px) {
    .module-dashboard-page .dashboard-tabs-nav {
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
    }

    .module-dashboard-page .dashboard-tabs-nav a {
        white-space: nowrap;
    }
}

/* professional, readable module dashboard widgets. */
.module-dashboard-page .dashboard-widget-heading {
    align-items: stretch;
    gap: 14px;
}

.module-dashboard-page .dashboard-widget-count-card {
    align-content: center;
    background: linear-gradient(180deg, #eff6ff, #ffffff);
    border: 1px solid #bfdbfe;
    border-radius: 18px;
    display: grid;
    gap: 4px;
    min-width: min(100%, 220px);
    padding: 14px 16px;
}

.module-dashboard-page .dashboard-widget-count-card span,
.module-dashboard-page .dashboard-stat-tile span {
    color: #475569;
    font-size: .72rem;
    font-weight: 900;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.module-dashboard-page .dashboard-widget-count-card strong {
    color: #0f172a;
    font-size: 1.7rem;
    line-height: 1;
}

.module-dashboard-page .dashboard-widget-count-card small {
    color: #64748b;
    line-height: 1.35;
}

.module-dashboard-page .dashboard-analytics-grid {
    align-items: stretch;
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 430px), 1fr));
    width: 100%;
}

.module-dashboard-page .dashboard-analytics-card {
    border-radius: 22px;
    display: grid;
    gap: 14px;
    min-height: 320px;
    min-width: 0;
    overflow: hidden;
    padding: 18px;
}

.module-dashboard-page .dashboard-analytics-card.widget-type-chart {
    min-height: 430px;
}

@media (min-width: 1320px) {
    .module-dashboard-page .dashboard-analytics-card.widget-type-chart.chart-donut,
    .module-dashboard-page .dashboard-analytics-card.widget-type-chart.chart-pie,
    .module-dashboard-page .dashboard-analytics-card.widget-type-chart.chart-line,
    .module-dashboard-page .dashboard-analytics-card.widget-type-chart.chart-multi_line,
    .module-dashboard-page .dashboard-analytics-card.widget-type-chart.chart-column,
    .module-dashboard-page .dashboard-analytics-card.widget-type-chart.chart-stacked_column {
        grid-column: span 2;
    }
}

.module-dashboard-page .dashboard-widget-card-head {
    align-items: flex-start;
    display: flex;
    gap: 12px;
    justify-content: space-between;
    min-width: 0;
}

.module-dashboard-page .dashboard-widget-card-head > div {
    min-width: 0;
}

.module-dashboard-page .dashboard-widget-card-head h3 {
    color: #0f172a;
    font-size: clamp(1rem, 1.2vw, 1.25rem);
    line-height: 1.2;
    margin: 0;
}

.module-dashboard-page .dashboard-widget-card-head .status-badge {
    flex: 0 1 auto;
    max-width: 42%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.module-dashboard-page .dashboard-chart-frame {
    align-content: stretch;
    background: linear-gradient(180deg, #ffffff, #f8fafc);
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    display: grid;
    min-height: 330px;
    min-width: 0;
    padding: 14px;
}

.module-dashboard-page .dashboard-chart-readable {
    align-content: center;
    min-width: 0;
}

.module-dashboard-page .chart-rich-pie.dashboard-chart-readable,
.module-dashboard-page .chart-rich-metric.dashboard-chart-readable {
    grid-template-columns: minmax(190px, 260px) minmax(260px, 1fr);
}

.module-dashboard-page .chart-pie-ring {
    height: clamp(170px, 18vw, 240px);
    width: clamp(170px, 18vw, 240px);
}

.module-dashboard-page .chart-pie-ring:not(.is-solid)::after {
    height: clamp(86px, 9vw, 118px);
    width: clamp(86px, 9vw, 118px);
}

.module-dashboard-page .dashboard-chart-legend {
    align-self: center;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr));
}

.module-dashboard-page .chart-legend-item {
    min-width: 0;
}

.module-dashboard-page .chart-legend-item > div {
    min-width: 0;
}

.module-dashboard-page .chart-legend-item strong {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.module-dashboard-page .chart-legend-item small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.module-dashboard-page .dashboard-chart-legend-inline {
    gap: 8px;
    max-height: 98px;
    overflow: auto;
    padding-right: 2px;
}

.module-dashboard-page .dashboard-column-bars {
    gap: clamp(10px, 1vw, 18px);
    grid-template-columns: repeat(auto-fit, minmax(72px, 1fr));
    min-height: 300px;
}

.module-dashboard-page .chart-column-track {
    max-width: 58px;
}

.module-dashboard-page .chart-column-item strong {
    max-width: 96px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.module-dashboard-page .dashboard-stat-tile-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
}

.module-dashboard-page .dashboard-stat-tile {
    background: linear-gradient(180deg, #eff6ff, #ffffff);
    border: 1px solid #bfdbfe;
    border-radius: 18px;
    display: grid;
    gap: 7px;
    padding: 16px;
}

.module-dashboard-page .dashboard-stat-tile strong {
    color: #0f172a;
    font-size: clamp(1.25rem, 2vw, 1.85rem);
    line-height: 1.05;
}

.module-dashboard-page .dashboard-stat-tile small {
    color: #64748b;
    line-height: 1.35;
}

.module-dashboard-page .dashboard-stat-tile a,
.module-dashboard-page .dashboard-table-card-list a {
    color: #2563eb;
    font-size: .82rem;
    font-weight: 800;
    text-decoration: none;
}

.module-dashboard-page .dashboard-table-card-list {
    display: grid;
    gap: 10px;
    max-height: 580px;
    overflow: auto;
    padding-right: 2px;
}

.module-dashboard-page .dashboard-table-card-list .dashboard-list-card {
    align-items: center;
    display: grid;
    gap: 10px;
    grid-template-columns: minmax(0, 1.2fr) minmax(120px, auto) auto;
}

.module-dashboard-page .dashboard-table-card-list .dashboard-list-card > div {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.module-dashboard-page .dashboard-table-card-list .dashboard-list-card strong,
.module-dashboard-page .dashboard-table-card-list .dashboard-list-card span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.module-dashboard-page .dashboard-widget-empty-card {
    min-height: 180px;
}

@media (max-width: 980px) {
    .module-dashboard-page .dashboard-chart-frame {
        min-height: 260px;
    }

    .module-dashboard-page .chart-rich-pie.dashboard-chart-readable,
    .module-dashboard-page .chart-rich-metric.dashboard-chart-readable {
        grid-template-columns: 1fr;
    }

    .module-dashboard-page .dashboard-table-card-list .dashboard-list-card {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .module-dashboard-page .dashboard-widget-card-head {
        display: grid;
    }

    .module-dashboard-page .dashboard-widget-card-head .status-badge {
        max-width: 100%;
        width: fit-content;
    }

    .module-dashboard-page .dashboard-analytics-card {
        padding: 14px;
    }
}

/* uniform, professional dashboard decision widgets. */
.module-dashboard-page .dashboard-decision-hero {
    align-items: stretch;
    display: grid;
    gap: 16px;
    grid-template-columns: minmax(0, 1fr) minmax(220px, 280px);
    margin-bottom: 16px;
}

.module-dashboard-page .dashboard-decision-hero h2,
.module-dashboard-page .dashboard-decision-section-head h3,
.module-dashboard-page .dashboard-widget-guide-card h3,
.module-dashboard-page .dashboard-pro-widget h4 {
    color: #0f172a;
    letter-spacing: -.02em;
    margin: 0;
}

.module-dashboard-page .dashboard-decision-hero p,
.module-dashboard-page .dashboard-decision-section-head p,
.module-dashboard-page .dashboard-pro-widget-head p,
.module-dashboard-page .dashboard-widget-guide-card p {
    color: #64748b;
    line-height: 1.5;
    margin: 6px 0 0;
}

.module-dashboard-page .dashboard-widget-guide-card {
    align-items: start;
    background: linear-gradient(180deg, #eff6ff, #ffffff);
    border: 1px solid #bfdbfe;
    border-radius: 22px;
    display: grid;
    gap: 18px;
    grid-template-columns: minmax(240px, .8fr) minmax(0, 1.2fr);
    margin-bottom: 18px;
    padding: 18px;
}

.module-dashboard-page .dashboard-widget-guide-card ol {
    counter-reset: dashboard-step;
    display: grid;
    gap: 10px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.module-dashboard-page .dashboard-widget-guide-card li {
    align-items: center;
    background: #ffffff;
    border: 1px solid #dbeafe;
    border-radius: 999px;
    color: #334155;
    display: grid;
    gap: 10px;
    grid-template-columns: auto 1fr;
    line-height: 1.4;
    padding: 9px 12px;
}

.module-dashboard-page .dashboard-widget-guide-card li::before {
    align-items: center;
    background: #2563eb;
    border-radius: 999px;
    color: #ffffff;
    content: counter(dashboard-step);
    counter-increment: dashboard-step;
    display: inline-flex;
    font-size: .78rem;
    font-weight: 900;
    height: 24px;
    justify-content: center;
    width: 24px;
}

.module-dashboard-page .dashboard-decision-board {
    display: grid;
    gap: 18px;
}

.module-dashboard-page .dashboard-decision-section {
    border: 1px solid #dbeafe;
    border-radius: 24px;
    display: grid;
    gap: 16px;
    padding: 18px;
}

.module-dashboard-page .dashboard-decision-section.tone-warning {
    background: linear-gradient(180deg, #fff7ed, #ffffff);
    border-color: #fed7aa;
}

.module-dashboard-page .dashboard-decision-section.tone-info {
    background: linear-gradient(180deg, #eff6ff, #ffffff);
    border-color: #bfdbfe;
}

.module-dashboard-page .dashboard-decision-section.tone-neutral {
    background: linear-gradient(180deg, #f8fafc, #ffffff);
    border-color: #dbeafe;
}

.module-dashboard-page .dashboard-decision-section.tone-plain {
    background: #ffffff;
}

.module-dashboard-page .dashboard-decision-section-head {
    align-items: start;
    display: grid;
    gap: 12px;
    grid-template-columns: minmax(0, 1fr) auto;
}

.module-dashboard-page .dashboard-decision-section-head > span {
    background: #ffffff;
    border: 1px solid #dbeafe;
    border-radius: 999px;
    color: #0f172a;
    font-size: .78rem;
    font-weight: 900;
    padding: 7px 12px;
    white-space: nowrap;
}

.module-dashboard-page .dashboard-widget-mosaic {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr));
}

.module-dashboard-page .dashboard-pro-widget {
    background: #ffffff;
    border: 1px solid #dbe3ef;
    border-radius: 20px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, .05);
    display: grid;
    gap: 14px;
    min-width: 0;
    padding: 16px;
}

.module-dashboard-page .dashboard-pro-widget.widget-type-chart,
.module-dashboard-page .dashboard-pro-widget.widget-type-table {
    grid-column: span 1;
}

@media (min-width: 1280px) {
    .module-dashboard-page .dashboard-pro-widget.widget-type-chart,
    .module-dashboard-page .dashboard-pro-widget.widget-type-table {
        grid-column: span 2;
    }
}

.module-dashboard-page .dashboard-pro-widget-head {
    align-items: start;
    display: grid;
    gap: 12px;
    grid-template-columns: minmax(0, 1fr) auto;
}

.module-dashboard-page .dashboard-pro-widget-head > div {
    min-width: 0;
}

.module-dashboard-page .dashboard-pro-widget-head h4 {
    font-size: clamp(1rem, 1.1vw, 1.2rem);
    line-height: 1.25;
}

.module-dashboard-page .dashboard-pro-widget-head > span {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 999px;
    color: #2563eb;
    font-size: .75rem;
    font-weight: 900;
    padding: 6px 10px;
    white-space: nowrap;
}

.module-dashboard-page .dashboard-chart-professional-frame,
.module-dashboard-page .dashboard-chart-frame {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    display: block;
    min-height: auto;
    padding: 14px;
}

.module-dashboard-page .chart-pro-panel {
    display: grid;
    gap: 14px;
    width: 100%;
}

.module-dashboard-page .chart-pro-summary {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.module-dashboard-page .chart-pro-summary > div {
    background: #ffffff;
    border: 1px solid #dbeafe;
    border-radius: 16px;
    display: grid;
    gap: 4px;
    padding: 12px 14px;
}

.module-dashboard-page .chart-pro-summary span,
.module-dashboard-page .chart-pro-row-main span {
    color: #64748b;
    font-size: .82rem;
}

.module-dashboard-page .chart-pro-summary strong {
    color: #0f172a;
    font-size: clamp(1.05rem, 1.4vw, 1.45rem);
    line-height: 1.15;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.module-dashboard-page .chart-pro-bar-list {
    display: grid;
    gap: 10px;
}

.module-dashboard-page .chart-pro-row {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    display: grid;
    gap: 8px;
    padding: 10px 12px;
}

.module-dashboard-page .chart-pro-row-main {
    align-items: baseline;
    display: grid;
    gap: 10px;
    grid-template-columns: minmax(0, 1fr) auto;
}

.module-dashboard-page .chart-pro-row-main strong {
    color: #0f172a;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.module-dashboard-page .chart-pro-track {
    background: #eaf0f8;
    border-radius: 999px;
    height: 10px;
    overflow: hidden;
}

.module-dashboard-page .chart-pro-track i {
    background: var(--bar-color, #2563eb);
    border-radius: inherit;
    display: block;
    height: 100%;
    min-width: 8px;
    width: var(--bar-width, 0%);
}

.module-dashboard-page .chart-pro-more {
    color: #64748b;
    font-size: .86rem;
    margin: 0;
}

.module-dashboard-page .dashboard-table-card-list {
    max-height: 420px;
}

.module-dashboard-page .dashboard-table-card-list .dashboard-list-card {
    grid-template-columns: minmax(0, 1fr) minmax(90px, auto) auto;
}

.module-dashboard-page .dashboard-stat-tile-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr));
}

.module-dashboard-page .dashboard-stat-tile {
    min-height: 150px;
}

/* Dashboard charts now use one professional format. Hide legacy SVG/pie/column fragments if older markup remains in cache. */
.module-dashboard-page .chart-pie-ring,
.module-dashboard-page .chart-svg,
.module-dashboard-page .chart-column-bars {
    max-width: 100%;
}

@media (max-width: 900px) {
    .module-dashboard-page .dashboard-decision-hero,
    .module-dashboard-page .dashboard-widget-guide-card,
    .module-dashboard-page .dashboard-decision-section-head,
    .module-dashboard-page .dashboard-pro-widget-head {
        grid-template-columns: 1fr;
    }

    .module-dashboard-page .dashboard-widget-mosaic {
        grid-template-columns: 1fr;
    }

    .module-dashboard-page .dashboard-pro-widget.widget-type-chart,
    .module-dashboard-page .dashboard-pro-widget.widget-type-table {
        grid-column: auto;
    }
}

/* Visual analytics charts: readable variety for dashboards and report pages. */
.chart-pro-panel,
.module-dashboard-page .chart-pro-panel,
.report-dashboard-page .chart-pro-panel,
.report-widget .chart-pro-panel {
    display: grid;
    gap: 14px;
    width: 100%;
}

.chart-pro-summary,
.module-dashboard-page .chart-pro-summary,
.report-dashboard-page .chart-pro-summary,
.report-widget .chart-pro-summary {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
}

.chart-pro-summary-card,
.module-dashboard-page .chart-pro-summary > div,
.report-dashboard-page .chart-pro-summary > div,
.report-widget .chart-pro-summary > div {
    background: linear-gradient(180deg, #ffffff, #f8fbff);
    border: 1px solid #dbeafe;
    border-radius: 16px;
    display: grid;
    gap: 4px;
    min-width: 0;
    padding: 12px 14px;
}

.chart-pro-summary-card span,
.chart-pro-row-main span,
.module-dashboard-page .chart-pro-summary span,
.module-dashboard-page .chart-pro-row-main span,
.report-dashboard-page .chart-pro-summary span,
.report-dashboard-page .chart-pro-row-main span,
.report-widget .chart-pro-summary span,
.report-widget .chart-pro-row-main span {
    color: #64748b;
    font-size: .82rem;
}

.chart-pro-summary-card strong,
.module-dashboard-page .chart-pro-summary strong,
.report-dashboard-page .chart-pro-summary strong,
.report-widget .chart-pro-summary strong {
    color: #0f172a;
    font-size: clamp(1rem, 1.25vw, 1.28rem);
    line-height: 1.15;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.chart-pro-visual-shell,
.module-dashboard-page .chart-pro-visual-shell,
.report-dashboard-page .chart-pro-visual-shell,
.report-widget .chart-pro-visual-shell {
    background: linear-gradient(180deg, #f8fafc, #ffffff);
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    min-width: 0;
    overflow: hidden;
    padding: 14px;
}

.chart-pro-polar,
.module-dashboard-page .chart-pro-polar,
.report-dashboard-page .chart-pro-polar,
.report-widget .chart-pro-polar {
    align-items: center;
    display: grid;
    gap: 16px;
    grid-template-columns: minmax(132px, 172px) minmax(0, 1fr);
}

.chart-pro-ring,
.module-dashboard-page .chart-pro-ring,
.report-dashboard-page .chart-pro-ring,
.report-widget .chart-pro-ring {
    align-items: center;
    aspect-ratio: 1;
    background: var(--chart-gradient, conic-gradient(#2563eb 0 100%));
    border-radius: 50%;
    box-shadow: inset 0 0 0 1px rgba(15, 23, 42, .08), 0 20px 40px rgba(15, 23, 42, .08);
    display: grid;
    justify-items: center;
    margin: 0 auto;
    max-width: 172px;
    position: relative;
    width: 100%;
}

.chart-pro-ring.is-donut::after,
.module-dashboard-page .chart-pro-ring.is-donut::after,
.report-dashboard-page .chart-pro-ring.is-donut::after,
.report-widget .chart-pro-ring.is-donut::after {
    background: #ffffff;
    border-radius: inherit;
    box-shadow: inset 0 0 0 1px rgba(226, 232, 240, .95);
    content: "";
    height: 58%;
    position: absolute;
    width: 58%;
}

.chart-pro-ring span,
.module-dashboard-page .chart-pro-ring span,
.report-dashboard-page .chart-pro-ring span,
.report-widget .chart-pro-ring span {
    display: grid;
    gap: 2px;
    line-height: 1.1;
    max-width: 72%;
    position: relative;
    text-align: center;
    z-index: 1;
}

.chart-pro-ring span strong,
.module-dashboard-page .chart-pro-ring span strong,
.report-dashboard-page .chart-pro-ring span strong,
.report-widget .chart-pro-ring span strong {
    color: #0f172a;
    font-size: clamp(.9rem, 1.2vw, 1.12rem);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.chart-pro-ring span small,
.module-dashboard-page .chart-pro-ring span small,
.report-dashboard-page .chart-pro-ring span small,
.report-widget .chart-pro-ring span small {
    color: #64748b;
    font-size: .74rem;
    font-weight: 800;
    text-transform: uppercase;
}

.chart-pro-legend,
.module-dashboard-page .chart-pro-legend,
.report-dashboard-page .chart-pro-legend,
.report-widget .chart-pro-legend {
    display: grid;
    gap: 8px;
    min-width: 0;
}

.chart-pro-legend-row,
.module-dashboard-page .chart-pro-legend-row,
.report-dashboard-page .chart-pro-legend-row,
.report-widget .chart-pro-legend-row,
.chart-pro-stack-card,
.module-dashboard-page .chart-pro-stack-card,
.report-dashboard-page .chart-pro-stack-card,
.report-widget .chart-pro-stack-card {
    align-items: center;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    display: grid;
    gap: 8px;
    grid-template-columns: auto minmax(0, 1fr) auto;
    min-width: 0;
    padding: 7px 10px;
}

.chart-pro-legend-row i,
.chart-pro-stack-card i,
.module-dashboard-page .chart-pro-legend-row i,
.module-dashboard-page .chart-pro-stack-card i,
.report-dashboard-page .chart-pro-legend-row i,
.report-dashboard-page .chart-pro-stack-card i,
.report-widget .chart-pro-legend-row i,
.report-widget .chart-pro-stack-card i {
    background: var(--legend-color, #2563eb);
    border-radius: 999px;
    display: block;
    height: 10px;
    width: 10px;
}

.chart-pro-legend-row span,
.chart-pro-stack-card span,
.module-dashboard-page .chart-pro-legend-row span,
.module-dashboard-page .chart-pro-stack-card span,
.report-dashboard-page .chart-pro-legend-row span,
.report-dashboard-page .chart-pro-stack-card span,
.report-widget .chart-pro-legend-row span,
.report-widget .chart-pro-stack-card span {
    color: #334155;
    font-weight: 800;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.chart-pro-legend-row strong,
.chart-pro-stack-card strong,
.module-dashboard-page .chart-pro-legend-row strong,
.module-dashboard-page .chart-pro-stack-card strong,
.report-dashboard-page .chart-pro-legend-row strong,
.report-dashboard-page .chart-pro-stack-card strong,
.report-widget .chart-pro-legend-row strong,
.report-widget .chart-pro-stack-card strong {
    color: #0f172a;
    font-size: .86rem;
    white-space: nowrap;
}

.chart-pro-line-card,
.module-dashboard-page .chart-pro-line-card,
.report-dashboard-page .chart-pro-line-card,
.report-widget .chart-pro-line-card {
    display: grid;
    gap: 8px;
}

.chart-pro-line-svg,
.module-dashboard-page .chart-pro-line-svg,
.report-dashboard-page .chart-pro-line-svg,
.report-widget .chart-pro-line-svg {
    background: linear-gradient(180deg, #ffffff, #f8fafc);
    border: 1px solid #dbeafe;
    border-radius: 16px;
    display: block;
    height: 184px;
    overflow: hidden;
    width: 100%;
}

.chart-pro-line-grid,
.module-dashboard-page .chart-pro-line-grid,
.report-dashboard-page .chart-pro-line-grid,
.report-widget .chart-pro-line-grid {
    fill: none;
    stroke: #e2e8f0;
    stroke-dasharray: 5 7;
    stroke-width: 1;
}

.chart-pro-line-area,
.module-dashboard-page .chart-pro-line-area,
.report-dashboard-page .chart-pro-line-area,
.report-widget .chart-pro-line-area {
    pointer-events: none;
}

.chart-pro-line-path,
.module-dashboard-page .chart-pro-line-path,
.report-dashboard-page .chart-pro-line-path,
.report-widget .chart-pro-line-path {
    fill: none;
    stroke: #2563eb;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 4;
}

.chart-pro-line-dot,
.module-dashboard-page .chart-pro-line-dot,
.report-dashboard-page .chart-pro-line-dot,
.report-widget .chart-pro-line-dot {
    fill: var(--dot-color, #2563eb);
    stroke: #ffffff;
    stroke-width: 3;
}

.chart-pro-axis-labels,
.module-dashboard-page .chart-pro-axis-labels,
.report-dashboard-page .chart-pro-axis-labels,
.report-widget .chart-pro-axis-labels {
    color: #64748b;
    display: flex;
    font-size: .78rem;
    gap: 8px;
    justify-content: space-between;
    min-width: 0;
}

.chart-pro-axis-labels span,
.module-dashboard-page .chart-pro-axis-labels span,
.report-dashboard-page .chart-pro-axis-labels span,
.report-widget .chart-pro-axis-labels span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.chart-pro-columns,
.module-dashboard-page .chart-pro-columns,
.report-dashboard-page .chart-pro-columns,
.report-widget .chart-pro-columns {
    align-items: end;
    display: grid;
    gap: 10px;
    grid-auto-columns: minmax(54px, 1fr);
    grid-auto-flow: column;
    min-height: 210px;
    overflow-x: auto;
    padding-bottom: 2px;
}

.chart-pro-column,
.module-dashboard-page .chart-pro-column,
.report-dashboard-page .chart-pro-column,
.report-widget .chart-pro-column {
    align-items: center;
    display: grid;
    gap: 7px;
    grid-template-rows: auto 132px auto;
    min-width: 58px;
}

.chart-pro-column strong,
.module-dashboard-page .chart-pro-column strong,
.report-dashboard-page .chart-pro-column strong,
.report-widget .chart-pro-column strong {
    color: #0f172a;
    font-size: .78rem;
    max-width: 90px;
    overflow: hidden;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.chart-pro-column span,
.module-dashboard-page .chart-pro-column span,
.report-dashboard-page .chart-pro-column span,
.report-widget .chart-pro-column span {
    align-self: end;
    background: var(--column-color, #2563eb);
    border-radius: 12px 12px 5px 5px;
    box-shadow: 0 12px 24px rgba(37, 99, 235, .12);
    display: block;
    min-height: 12px;
    width: 70%;
    height: var(--column-height, 20%);
}

.chart-pro-column small,
.module-dashboard-page .chart-pro-column small,
.report-dashboard-page .chart-pro-column small,
.report-widget .chart-pro-column small {
    color: #475569;
    font-size: .76rem;
    line-height: 1.15;
    max-width: 90px;
    overflow: hidden;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.chart-pro-stacked,
.module-dashboard-page .chart-pro-stacked,
.report-dashboard-page .chart-pro-stacked,
.report-widget .chart-pro-stacked {
    display: grid;
    gap: 12px;
}

.chart-pro-stack-strip,
.module-dashboard-page .chart-pro-stack-strip,
.report-dashboard-page .chart-pro-stack-strip,
.report-widget .chart-pro-stack-strip {
    background: #e2e8f0;
    border: 1px solid #dbeafe;
    border-radius: 999px;
    display: flex;
    height: 36px;
    overflow: hidden;
}

.chart-pro-stack-strip span,
.module-dashboard-page .chart-pro-stack-strip span,
.report-dashboard-page .chart-pro-stack-strip span,
.report-widget .chart-pro-stack-strip span {
    background: var(--stack-color, #2563eb);
    display: block;
    min-width: 8px;
    width: var(--stack-width, 0%);
}

.chart-pro-stack-cards,
.module-dashboard-page .chart-pro-stack-cards,
.report-dashboard-page .chart-pro-stack-cards,
.report-widget .chart-pro-stack-cards {
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.chart-pro-metric-focus,
.module-dashboard-page .chart-pro-metric-focus,
.report-dashboard-page .chart-pro-metric-focus,
.report-widget .chart-pro-metric-focus {
    background: linear-gradient(135deg, #eff6ff, #ffffff 58%, #f5f3ff);
    border: 1px solid #bfdbfe;
    border-radius: 20px;
    display: grid;
    gap: 7px;
    padding: 20px;
}

.chart-pro-metric-focus span,
.chart-pro-metric-focus small,
.module-dashboard-page .chart-pro-metric-focus span,
.module-dashboard-page .chart-pro-metric-focus small,
.report-dashboard-page .chart-pro-metric-focus span,
.report-dashboard-page .chart-pro-metric-focus small,
.report-widget .chart-pro-metric-focus span,
.report-widget .chart-pro-metric-focus small {
    color: #64748b;
    font-weight: 800;
}

.chart-pro-metric-focus strong,
.module-dashboard-page .chart-pro-metric-focus strong,
.report-dashboard-page .chart-pro-metric-focus strong,
.report-widget .chart-pro-metric-focus strong {
    color: #0f172a;
    font-size: clamp(1.8rem, 3vw, 3rem);
    line-height: 1;
}

.chart-pro-ranking,
.module-dashboard-page .chart-pro-ranking,
.report-dashboard-page .chart-pro-ranking,
.report-widget .chart-pro-ranking,
.chart-pro-bar-list,
.module-dashboard-page .chart-pro-bar-list,
.report-dashboard-page .chart-pro-bar-list,
.report-widget .chart-pro-bar-list {
    display: grid;
    gap: 9px;
}

.chart-pro-row,
.module-dashboard-page .chart-pro-row,
.report-dashboard-page .chart-pro-row,
.report-widget .chart-pro-row {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    display: grid;
    gap: 8px;
    padding: 10px 12px;
}

.chart-pro-row-main,
.module-dashboard-page .chart-pro-row-main,
.report-dashboard-page .chart-pro-row-main,
.report-widget .chart-pro-row-main {
    align-items: baseline;
    display: grid;
    gap: 10px;
    grid-template-columns: minmax(0, 1fr) auto;
}

.chart-pro-row-main strong,
.module-dashboard-page .chart-pro-row-main strong,
.report-dashboard-page .chart-pro-row-main strong,
.report-widget .chart-pro-row-main strong {
    color: #0f172a;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.chart-pro-track,
.module-dashboard-page .chart-pro-track,
.report-dashboard-page .chart-pro-track,
.report-widget .chart-pro-track {
    background: #eaf0f8;
    border-radius: 999px;
    height: 10px;
    overflow: hidden;
}

.chart-pro-track i,
.module-dashboard-page .chart-pro-track i,
.report-dashboard-page .chart-pro-track i,
.report-widget .chart-pro-track i {
    background: var(--bar-color, #2563eb);
    border-radius: inherit;
    display: block;
    height: 100%;
    min-width: 8px;
    width: var(--bar-width, 0%);
}

.chart-pro-more,
.module-dashboard-page .chart-pro-more,
.report-dashboard-page .chart-pro-more,
.report-widget .chart-pro-more {
    color: #64748b;
    font-size: .86rem;
    margin: 0;
}

@media (max-width: 760px) {
    .chart-pro-polar,
    .module-dashboard-page .chart-pro-polar,
    .report-dashboard-page .chart-pro-polar,
    .report-widget .chart-pro-polar {
        grid-template-columns: 1fr;
    }

    .chart-pro-row-main,
    .module-dashboard-page .chart-pro-row-main,
    .report-dashboard-page .chart-pro-row-main,
    .report-widget .chart-pro-row-main {
        grid-template-columns: 1fr;
    }
}

/* ERP form experience helpers. */
.is-field-error,
[aria-invalid="true"],
.is-invalid,
.field-error {
    border-color: #dc2626 !important;
    box-shadow: 0 0 0 4px rgba(220, 38, 38, .12) !important;
}

.erp-textarea-toolbar {
    align-items: center;
    background: #f8fafc;
    border: 1px solid #dbe3ee;
    border-bottom: 0;
    border-radius: 12px 12px 0 0;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 7px;
}

.erp-textarea-toolbar button {
    background: #ffffff;
    border: 1px solid #d8e0eb;
    border-radius: 999px;
    color: #0f172a;
    cursor: pointer;
    font-size: .76rem;
    font-weight: 800;
    min-height: 28px;
    padding: 4px 9px;
}

.erp-textarea-toolbar button:hover,
.erp-textarea-toolbar button:focus {
    border-color: var(--brand, #2563eb);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
}

textarea.has-erp-textarea-toolbar,
.form-textarea.has-erp-textarea-toolbar {
    border-top-left-radius: 0;
    border-top-right-radius: 0;
    min-height: 94px;
}

.company-context-locked {
    max-width: min(360px, 40vw);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Approval workflow compact candidate picker and optional limit settings. */
.approver-picker-dropdown {
    position: relative;
    width: 100%;
}

.approver-picker-dropdown[open] {
    z-index: 70;
}

.approver-picker-dropdown > summary {
    list-style: none;
}

.approver-picker-dropdown > summary::-webkit-details-marker {
    display: none;
}

.approver-picker-summary {
    align-items: center;
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    font-size: .82rem;
    font-weight: 850;
    gap: 10px;
    justify-content: space-between;
    min-height: 42px;
    padding: 9px 12px;
    transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}

.approver-picker-summary::after {
    content: '⌄';
    font-size: .95rem;
    line-height: 1;
    margin-left: auto;
    transition: transform .15s ease;
}

.approver-picker-summary small {
    color: var(--muted);
    font-size: .72rem;
    font-weight: 750;
    white-space: nowrap;
}

.approver-picker-dropdown[open] > .approver-picker-summary {
    background: #f8fbff;
    border-color: var(--brand);
    box-shadow: 0 0 0 3px var(--brand-soft);
}

.approver-picker-dropdown[open] > .approver-picker-summary::after {
    transform: rotate(180deg);
}

.approver-picker-dropdown__menu {
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: 0 18px 45px rgba(15, 23, 42, .16);
    display: grid;
    gap: 8px;
    left: 0;
    margin-top: 6px;
    max-width: 100%;
    padding: 10px;
    position: absolute;
    right: 0;
    top: 100%;
    z-index: 60;
}

.approver-picker-dropdown__menu .approver-option-list {
    max-height: 280px;
}

.authority-settings-disclosure {
    background: #fbfdff;
    border: 1px solid var(--line);
    border-radius: 14px;
    margin-top: 12px;
    overflow: hidden;
}

.authority-settings-disclosure > summary {
    list-style: none;
}

.authority-settings-disclosure > summary::-webkit-details-marker {
    display: none;
}

.authority-settings-summary {
    align-items: center;
    position: relative;
    cursor: pointer;
    display: flex;
    flex-wrap: wrap;
    gap: 7px 12px;
    justify-content: space-between;
    padding: 11px 13px;
}

.authority-settings-summary::after {
    content: '+';
    font-size: 1.1rem;
    font-weight: 900;
    margin-left: auto;
}

.authority-settings-summary span {
    font-size: .84rem;
    font-weight: 900;
}

.authority-settings-summary small {
    color: var(--muted);
    font-size: .72rem;
}

.authority-settings-disclosure[open] > .authority-settings-summary {
    border-bottom: 1px solid var(--line);
}

.authority-settings-disclosure[open] > .authority-settings-summary::after {
    content: '−';
}

.authority-settings-disclosure > .inline-authority-matrix {
    margin: 0 !important;
    padding: 12px;
}

@media (max-width: 760px) {
    .approver-picker-dropdown__menu {
        position: static;
        box-shadow: none;
    }

    .approver-picker-summary {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .authority-settings-summary {
        align-items: flex-start;
        flex-direction: column;
    }

    .authority-settings-summary::after {
        position: absolute;
        right: 14px;
    }
}

.approver-picker-dropdown__menu.is-static {
    box-shadow: none;
    left: auto;
    margin-top: 8px;
    position: static;
    right: auto;
    top: auto;
    z-index: auto;
}

.approval-hierarchy-summary {
    font-size: .76rem;
    line-height: 1.45;
}

/* Approval workflow business editor and diagnostic detail */
.approval-detail-hero .approval-summary-strip,
.approval-summary-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: .65rem;
    margin-top: 1rem;
}

.approval-summary-strip > div {
    display: flex;
    flex-direction: column;
    gap: .2rem;
    padding: .7rem .8rem;
    border: 1px solid var(--border-color, #d9e0e8);
    border-radius: var(--radius-md, 10px);
    background: var(--surface-muted, #f8fafc);
    min-width: 0;
}

.approval-summary-strip small,
.approval-flow-card small,
.approval-flow-node small {
    color: var(--text-muted, #64748b);
    font-size: .76rem;
}

.approval-summary-strip strong {
    overflow-wrap: anywhere;
}

.approval-routing-alert ul {
    margin: .45rem 0 0 1.1rem;
}

.approval-flow-map {
    display: grid;
    grid-template-columns: minmax(180px, .8fr) minmax(0, 3fr) minmax(180px, .8fr);
    gap: .8rem;
    align-items: stretch;
}

.approval-flow-node,
.approval-flow-card {
    position: relative;
    border: 1px solid var(--border-color, #d9e0e8);
    border-radius: var(--radius-md, 10px);
    background: var(--surface, #fff);
    padding: .85rem;
}

.approval-flow-node {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: .3rem;
    background: var(--surface-muted, #f8fafc);
}

.approval-flow-branches {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: .7rem;
}

.approval-flow-card h3 {
    margin: .3rem 0;
    font-size: 1rem;
}

.approval-flow-card p {
    margin: 0 0 .55rem;
    color: var(--text-muted, #64748b);
}

.approval-flow-card.is-valid {
    border-left: 4px solid var(--success, #16825d);
}

.approval-flow-card.is-blocked {
    border-left: 4px solid var(--danger, #b42318);
}

.approval-flow-order {
    position: absolute;
    top: .55rem;
    right: .55rem;
    display: grid;
    place-items: center;
    width: 1.65rem;
    height: 1.65rem;
    border-radius: 999px;
    background: var(--primary, #1f5b99);
    color: #fff;
    font-weight: 700;
    font-size: .78rem;
}

.approval-stage-stack {
    display: grid;
    gap: .9rem;
}

.approval-stage-card {
    border: 1px solid var(--border-color, #d9e0e8);
    border-radius: var(--radius-md, 10px);
    padding: .9rem;
    background: var(--surface, #fff);
}

.approval-stage-card h3,
.approval-stage-card h4 {
    margin: 0;
}

.approval-stage-card h4 {
    margin-top: .9rem;
    margin-bottom: .55rem;
    font-size: .92rem;
}

.approval-role-chips {
    display: flex;
    gap: .4rem;
    flex-wrap: wrap;
    margin-top: .7rem;
}

.approval-candidate-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: .65rem;
}

.approval-candidate-card {
    padding: .75rem;
    border: 1px solid var(--border-color, #d9e0e8);
    border-radius: var(--radius-sm, 8px);
    background: var(--surface-muted, #f8fafc);
}

.approval-candidate-card.valid {
    border-left: 4px solid var(--success, #16825d);
}

.approval-candidate-card.warning {
    border-left: 4px solid var(--warning, #b7791f);
}

.approval-candidate-card small {
    display: block;
    color: var(--text-muted, #64748b);
}

.approval-candidate-card p {
    margin: .45rem 0;
}

.approval-candidate-card dl {
    display: grid;
    gap: .25rem;
    margin: .45rem 0;
}

.approval-candidate-card dl > div {
    display: flex;
    justify-content: space-between;
    gap: .6rem;
    border-top: 1px dashed var(--border-color, #d9e0e8);
    padding-top: .25rem;
}

.approval-candidate-card dt {
    color: var(--text-muted, #64748b);
}

.approval-candidate-card dd {
    margin: 0;
    text-align: right;
    overflow-wrap: anywhere;
}

.approval-rejected-details {
    margin-top: .7rem;
    border-top: 1px solid var(--border-color, #d9e0e8);
    padding-top: .6rem;
}

.approval-rejected-details summary,
.approval-technical-settings summary {
    cursor: pointer;
    font-weight: 700;
}

.approval-rejected-list {
    display: grid;
    gap: .4rem;
    margin-top: .55rem;
}

.approval-rejected-list > div {
    display: flex;
    flex-direction: column;
    padding: .55rem;
    border-radius: var(--radius-sm, 8px);
    background: var(--surface-muted, #f8fafc);
}

.approval-technical-settings > summary {
    list-style: none;
}

.approval-technical-settings > summary::-webkit-details-marker {
    display: none;
}

.approval-technical-settings > summary > span {
    display: flex;
    flex-direction: column;
    gap: .2rem;
}

.approval-technical-settings > summary small {
    color: var(--text-muted, #64748b);
    font-weight: 400;
}

.table-subtext {
    display: block;
    margin-top: .25rem;
    color: var(--text-muted, #64748b);
}

.quick-card.static {
    cursor: default;
}

@media (max-width: 980px) {
    .approval-summary-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .approval-flow-map {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 620px) {
    .approval-summary-strip,
    .approval-candidate-grid {
        grid-template-columns: 1fr;
    }
}

/* Warehouse receiving: physical-goods-only workflow */
.warehouse-receiving-form .receiving-source-summary{margin:0;padding:10px;border:1px solid #dbeafe;border-radius:14px;background:#eff6ff}.warehouse-receiving-form .receiving-lines-panel{display:grid;gap:12px}.receiving-item-list{display:grid;gap:10px}.receiving-item-card{display:grid;gap:10px;padding:12px;border:1px solid #dbe3ef;border-radius:16px;background:#fff}.receiving-item-card.has-problem{border-color:#f59e0b;background:#fffbeb}.receiving-item-head{display:flex;justify-content:space-between;align-items:flex-start;gap:12px}.receiving-item-head h4{margin:2px 0 0;font-size:1rem}.receiving-ordered-strip{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.receiving-ordered-strip>div{display:grid;gap:2px;padding:9px 10px;border:1px solid #e2e8f0;border-radius:12px;background:#f8fafc}.receiving-ordered-strip span,.receiving-total-summary span{font-size:.72rem;font-weight:900;text-transform:uppercase;letter-spacing:.03em;color:#64748b}.receiving-input-grid{display:grid;grid-template-columns:repeat(4,minmax(150px,1fr));gap:10px;align-items:start}.receiving-input-grid .wide{grid-column:span 4}.important-field .form-input{font-weight:900;font-size:1.05rem;border-color:#93c5fd;background:#eff6ff}.input-with-suffix{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;border:1px solid #cbd5e1;border-radius:12px;background:#fff;overflow:hidden}.input-with-suffix .form-input{border:0!important;border-radius:0!important}.input-with-suffix>span{padding:0 10px;font-weight:900;color:#475569}.receiving-total-summary{margin-top:2px}.sticky-form-actions{position:sticky;bottom:8px;z-index:8;padding:10px;border:1px solid #dbe3ef;border-radius:14px;background:rgba(255,255,255,.96);box-shadow:0 10px 24px rgba(15,23,42,.08)}@media(max-width:1000px){.receiving-input-grid{grid-template-columns:repeat(2,minmax(160px,1fr))}.receiving-input-grid .wide{grid-column:span 2}}@media(max-width:640px){.receiving-ordered-strip,.receiving-input-grid{grid-template-columns:1fr}.receiving-input-grid .wide{grid-column:span 1}.receiving-item-head{align-items:stretch;flex-direction:column}.sticky-form-actions{position:relative;bottom:auto}}


/* observability controls and silent navbar error badge. */
.navbar-error-indicator-host { display: inline-flex; align-items: center; min-width: 0; }
.navbar-error-indicator { position: relative; color: var(--danger, #b42318); }
.navbar-error-indicator b { min-width: 1.25rem; height: 1.25rem; padding: 0 .3rem; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; background: var(--danger, #b42318); color: #fff; font-size: .72rem; line-height: 1; }
.error-log-bulk-actions { flex-wrap: wrap; }
.error-log-bulk-actions .form-select { width: auto; min-width: 10rem; }
.error-log-table .select-cell { width: 2.5rem; text-align: center; }
.visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }
.payment-operational-status small { display: block; margin-top: .25rem; max-width: 18rem; }
@media (max-width: 760px) { .error-log-list-toolbar { align-items: stretch; } .error-log-bulk-actions { width: 100%; } }

/* Guide audience, visual-helper, and low-literacy editor alignment */
.guide-kind-switcher,
.guide-kind-editor-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.guide-kind-card,
.guide-kind-choice {
    position: relative;
    display: grid;
    gap: 6px;
    min-width: 0;
    padding: 16px;
    border: 1px solid #cbd5e1;
    border-radius: 16px;
    background: #fff;
    color: #0f172a;
    text-align: left;
    cursor: pointer;
}

.guide-kind-card:hover,
.guide-kind-choice:hover,
.guide-kind-card.is-active,
.guide-kind-choice.is-active {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
}

.guide-kind-card small,
.guide-kind-choice small {
    color: #475569;
    line-height: 1.45;
}

.guide-kind-card .badge {
    position: absolute;
    top: 10px;
    right: 10px;
}

.guide-kind-choice input {
    position: absolute;
    top: 14px;
    right: 14px;
}

.guide-kind-editor-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.guide-editor-section {
    display: grid;
    gap: 14px;
    padding: 16px 0;
    border-bottom: 1px solid #e2e8f0;
}

.guide-editor-section:last-of-type {
    border-bottom: 0;
}

.guide-editor-section > h2 {
    margin: 0;
    font-size: 1.05rem;
}

.guide-permission-grid {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.guide-hero-panel {
    display: grid;
    gap: 14px;
}

.guide-hero-figure {
    display: grid;
    place-items: center;
    min-height: 220px;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    background: #f8fafc;
    overflow: hidden;
}

.guide-hero-figure img {
    width: 100%;
    max-height: min(62vh, 680px);
    object-fit: contain;
}

.guide-hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.guide-reading-panel .guide-content {
    max-width: 920px;
    margin: 0 auto;
    font-size: 1rem;
    line-height: 1.75;
}

.guide-reading-panel .guide-content h2,
.guide-reading-panel .guide-content h3 {
    margin-top: 1.4em;
    line-height: 1.3;
}

.guide-reading-panel .guide-content li {
    margin-bottom: .55rem;
}

.guide-reading-panel .guide-content pre {
    max-width: 100%;
    overflow: auto;
    padding: 14px;
    border-radius: 12px;
    background: #0f172a;
    color: #f8fafc;
}

.guide-visual-helper-grid,
.guide-helper-editor-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 14px;
}

.guide-visual-helper-card,
.guide-helper-editor-card,
.guide-upload-preview {
    display: grid;
    gap: 10px;
    margin: 0;
    padding: 12px;
    border: 1px solid #dbe3ef;
    border-radius: 16px;
    background: #fff;
}

.guide-visual-helper-card img,
.guide-helper-editor-card img,
.guide-upload-preview img {
    width: 100%;
    max-height: 360px;
    object-fit: contain;
    border-radius: 12px;
    background: #f8fafc;
}

.guide-visual-helper-card figcaption {
    color: #475569;
    line-height: 1.5;
}

@media (max-width: 820px) {
    .guide-kind-switcher,
    .guide-kind-editor-grid {
        grid-template-columns: 1fr;
    }

    .guide-reading-panel .guide-content {
        font-size: 1.02rem;
    }
}

/* Finance record pages and production resource readiness cockpit. */
.finance-record-hero,
.resource-readiness-hero {
    align-items: flex-start;
    border-color: var(--app-border-color, #dbe3ef);
    background:
        radial-gradient(circle at top right, color-mix(in srgb, var(--app-brand-color, #2563eb) 12%, transparent), transparent 42%),
        var(--app-panel-bg, #fff);
}

.finance-record-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.finance-record-kpis,
.resource-readiness-kpis {
    margin-bottom: 4px;
}

.finance-record-kpis .module-kpi-card,
.resource-readiness-kpis .module-kpi-card {
    min-height: 112px;
}

.finance-record-kpis .module-kpi-card strong,
.resource-readiness-kpis .module-kpi-card strong {
    overflow-wrap: anywhere;
}

.finance-action-panel {
    border-left: 4px solid var(--app-brand-color, #2563eb);
}

.finance-payment-request-workspace {
    display: grid;
    gap: 14px;
}

.payment-request-grid {
    align-items: end;
    border: 1px solid var(--app-border-color, #dbe3ef);
    border-radius: var(--app-border-radius, 13px);
    background: var(--app-panel-soft-bg, #f8fafc);
    padding: 14px;
}

.payment-request-action {
    align-self: end;
}

.payment-request-action .btn {
    width: 100%;
    min-height: 42px;
}

.production-resource-readiness-page .show-tabs,
.finance-payable-show-page .show-tabs,
.finance-payment-show-page .show-tabs {
    overflow-x: auto;
    scrollbar-width: thin;
}

.resource-readiness-form-grid {
    align-items: end;
}

.resource-readiness-split-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.resource-readiness-split-grid .subpanel {
    display: grid;
    gap: 14px;
    align-content: start;
}

.resource-readiness-split-grid .subpanel h3 {
    margin: 0;
}

.erp-empty-state {
    display: grid;
    justify-items: center;
    gap: 6px;
    min-height: 92px;
    padding: 18px;
    text-align: center;
}

.erp-empty-state__icon {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 999px;
    background: var(--app-brand-soft-color, #dbeafe);
    color: var(--app-brand-color, #2563eb);
    font-weight: 900;
}

.erp-empty-state p {
    max-width: 620px;
    margin: 0;
    color: var(--app-muted-text, #64748b);
}

@media (max-width: 980px) {
    .resource-readiness-split-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    .finance-record-hero .actions-row,
    .resource-readiness-hero .actions-row {
        width: 100%;
    }

    .finance-record-hero .btn,
    .resource-readiness-hero .btn,
    .payment-request-action .btn {
        width: 100%;
    }
}

/* Approval routing is operational evidence, not a hidden technical log. */
.approval-routing-summary {
    min-width: 0;
    border-left: 4px solid var(--app-brand-color, #2563eb);
}
.approval-routing-summary__meta {
    grid-template-columns: repeat(auto-fit, minmax(165px, 1fr));
}
.approval-routing-summary .data-table td,
.approval-routing-summary .data-table th {
    min-width: 0;
    overflow-wrap: anywhere;
    vertical-align: top;
}
.approval-routing-summary .empty-state {
    white-space: normal;
    overflow-wrap: anywhere;
}

/* Operational action center and compact navbar context controls. */
.locale-switcher{display:inline-flex;align-items:center;min-height:38px;padding:4px 7px;border:1px solid rgba(148,163,184,.35);border-radius:999px;background:#fff}.navbar-locale-switcher{min-width:auto}.navbar-locale-switcher .form-select{width:58px;min-width:58px;max-width:58px;border:0;background-color:transparent;font-weight:900;text-align:center;text-align-last:center;padding-left:6px;padding-right:22px}.company-switcher select{max-width:116px!important}.company-context-locked{max-width:120px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.navbar-action-icon.tone-approval b{background:#2563eb}.navbar-action-icon.tone-blocker b{background:#d97706}.action-reminder-strip{margin:0 0 14px;padding:10px 14px;border:1px solid #dbe3ef;border-radius:16px;background:#fff;display:grid;gap:9px}.action-reminder-heading{display:flex;align-items:baseline;justify-content:space-between;gap:12px}.action-reminder-heading small{color:#64748b}.action-reminder-items{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:8px}.action-reminder-item{display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:9px;align-items:center;padding:9px 10px;border:1px solid #e2e8f0;border-radius:13px;color:#0f172a;text-decoration:none;background:#f8fafc}.action-reminder-item:hover{border-color:var(--app-brand-color,#2563eb);box-shadow:0 4px 14px rgba(15,23,42,.07)}.action-reminder-item span:nth-child(2){display:grid;gap:2px;min-width:0}.action-reminder-item small{color:#64748b}.action-reminder-item em{font-style:normal;font-weight:900;font-size:.78rem;color:#1d4ed8;white-space:nowrap}.action-reminder-icon{width:30px;height:30px;border-radius:999px;display:inline-flex;align-items:center;justify-content:center;background:#dbeafe;color:#1d4ed8;font-weight:900}.action-reminder-item.tone-blocker .action-reminder-icon{background:#fef3c7;color:#92400e}.blocker-card-list{display:grid;gap:12px}.blocker-card{padding:15px;border:1px solid #dbe3ef;border-left:5px solid #d97706;border-radius:16px;background:#fff;display:grid;gap:13px}.blocker-card.severity-critical,.blocker-card.severity-error{border-left-color:#dc2626}.blocker-card-head{display:flex;justify-content:space-between;gap:12px;align-items:flex-start}.blocker-card-head>div{display:grid;gap:5px}.blocker-card-head small{color:#64748b}.blocker-explanation-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:10px}.blocker-explanation-grid>div{padding:10px;border:1px solid #e2e8f0;border-radius:12px;background:#f8fafc}.blocker-explanation-grid p{margin:5px 0 0;color:#475569;white-space:pre-line}.approval-inbox-page td small{display:block;margin-top:4px;color:#64748b;line-height:1.35}@media(max-width:720px){.action-reminder-heading{display:grid}.action-reminder-item{grid-template-columns:auto minmax(0,1fr)}.action-reminder-item em{grid-column:2}.blocker-card-head{display:grid}.locale-switcher .form-select{max-width:100%}.navbar-locale-switcher .form-select{width:58px;min-width:58px;max-width:58px}.company-switcher{width:auto!important}.company-switcher span,.company-switcher small{display:none}}

/* Action Center UI consistency recovery: one navbar control system, compact reminders, clear blocker hierarchy. */
:root{
  --navbar-control-height:40px;
  --navbar-control-radius:12px;
  --navbar-control-border:#d8e0eb;
  --navbar-control-bg:#fff;
  --navbar-control-shadow:0 1px 2px rgba(15,23,42,.04);
}
.app-navbar[data-sticky-module-navbar] .navbar-actions{gap:8px;align-items:center;flex-wrap:wrap}
.app-navbar[data-sticky-module-navbar] .navbar-actions>*{flex:0 0 auto}
.app-navbar[data-sticky-module-navbar] .navbar-button,
.app-navbar[data-sticky-module-navbar] .navbar-compact-select{
  min-height:var(--navbar-control-height);
  height:var(--navbar-control-height);
  border:1px solid var(--navbar-control-border);
  border-radius:var(--navbar-control-radius);
  background:var(--navbar-control-bg);
  box-shadow:var(--navbar-control-shadow);
  color:#0f172a;
}
.navbar-compact-select{display:inline-flex;align-items:center;padding:0 4px;overflow:hidden}
.navbar-compact-select .form-select{
  min-height:38px!important;
  height:38px!important;
  border:0!important;
  border-radius:9px!important;
  background-color:transparent!important;
  box-shadow:none!important;
  padding:0 28px 0 9px!important;
  font-size:.8rem;
  font-weight:900;
  color:#0f172a;
  cursor:pointer;
}
.navbar-locale-switcher{width:56px;min-width:56px;padding:0}
.navbar-locale-switcher .form-select{width:54px!important;min-width:54px!important;max-width:54px!important;text-align:center;text-align-last:center;padding-left:4px!important;padding-right:20px!important}
.navbar-company-context{width:108px;min-width:108px}
.navbar-company-context .form-select{width:106px;max-width:106px;text-overflow:ellipsis}
.navbar-role-context{width:184px;min-width:150px;max-width:220px}
.navbar-role-context .form-select{width:100%;max-width:100%;text-overflow:ellipsis}
.navbar-context-chip{display:inline-flex!important;align-items:center;justify-content:center;padding:0 12px!important;font-size:.8rem;font-weight:900;max-width:120px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.navbar-role-chip{display:inline-flex!important;align-items:center;gap:6px;padding:0 10px!important;max-width:210px;overflow:hidden;white-space:nowrap}
.navbar-role-chip>span{font-size:.7rem;font-weight:750;color:var(--text-muted,#64748b)}
.navbar-role-chip>strong{font-size:.82rem;overflow:hidden;text-overflow:ellipsis}
.navbar-guide-button{display:inline-flex!important;align-items:center;gap:7px;padding:0 12px!important;background:#eff6ff!important;border-color:#bfdbfe!important;color:#1d4ed8!important;font-size:.82rem}
.navbar-control-icon{width:18px;height:18px;display:block;fill:currentColor;flex:0 0 18px}
.navbar-indicator-host,.navbar-error-indicator-host{display:inline-flex;align-items:center;min-width:0}
.app-navbar[data-sticky-module-navbar] .navbar-action-icon{
  position:relative;
  display:inline-flex!important;
  align-items:center;
  justify-content:center;
  width:var(--navbar-control-height);
  min-width:var(--navbar-control-height);
  padding:0!important;
}
.navbar-action-icon b{
  position:absolute;
  top:-6px;
  right:-6px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:19px;
  height:19px;
  padding:0 5px;
  border:2px solid #fff;
  border-radius:999px;
  color:#fff;
  font-size:.66rem;
  font-weight:900;
  line-height:1;
}
.navbar-action-icon.tone-notification{color:#2563eb}.navbar-action-icon.tone-notification b{background:#2563eb}
.navbar-action-icon.tone-approval{color:#047857}.navbar-action-icon.tone-approval b{background:#047857}
.navbar-action-icon.tone-blocker{color:#b45309}.navbar-action-icon.tone-blocker b{background:#d97706}
.navbar-action-icon.tone-error{color:#b91c1c}.navbar-action-icon.tone-error b{background:#b91c1c}
.app-navbar[data-sticky-module-navbar] .profile-button{min-height:var(--navbar-control-height);height:var(--navbar-control-height);padding:0 12px 0 6px!important;gap:8px}
.profile-button>span{width:28px;height:28px;display:inline-grid;place-items:center;border-radius:999px;background:var(--app-brand-color,var(--brand,#2563eb));color:#fff;font-size:.76rem;font-weight:900}
.profile-button strong{font-size:.82rem;max-width:160px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

.action-reminder-strip{
  margin:0 0 14px;
  padding:10px 12px;
  border:1px solid #dbe3ef;
  border-radius:16px;
  background:#fff;
  display:grid;
  grid-template-columns:minmax(190px,.55fr) minmax(0,2fr);
  gap:10px;
  align-items:stretch;
  box-shadow:0 8px 22px rgba(15,23,42,.04);
}
.action-reminder-heading{display:flex;align-items:center;gap:9px;min-width:0;padding:3px 4px}
.action-reminder-heading>span:last-child{display:grid;gap:2px;min-width:0}
.action-reminder-heading strong{font-size:.85rem;color:#0f172a}
.action-reminder-heading small{font-size:.72rem;color:#64748b;line-height:1.3}
.action-reminder-heading-icon{width:28px;height:28px;display:grid;place-items:center;border-radius:9px;background:#fff7ed;color:#b45309;font-weight:900}
.action-reminder-items{display:grid;grid-template-columns:repeat(auto-fit,minmax(250px,1fr));gap:8px}
.action-reminder-item{display:grid;grid-template-columns:28px minmax(0,1fr) auto;gap:9px;align-items:center;min-height:54px;padding:8px 10px;border:1px solid #e2e8f0;border-radius:12px;background:#f8fafc;color:#0f172a;text-decoration:none}
.action-reminder-item:hover,.action-reminder-item:focus-visible{border-color:var(--app-brand-color,var(--brand,#2563eb));box-shadow:0 0 0 3px rgba(37,99,235,.10)}
.action-reminder-icon{width:28px;height:28px;display:grid;place-items:center;border-radius:9px;background:#dbeafe;color:#1d4ed8;font-weight:900}
.action-reminder-item.tone-blocker .action-reminder-icon{background:#fef3c7;color:#92400e}
.action-reminder-item.tone-approval .action-reminder-icon{background:#dcfce7;color:#166534}
.action-reminder-copy{display:grid;gap:1px;min-width:0}
.action-reminder-copy strong{font-size:.82rem;line-height:1.25;overflow-wrap:anywhere}
.action-reminder-copy small{font-size:.71rem;line-height:1.3;color:#64748b;overflow-wrap:anywhere}
.action-reminder-action{font-size:.72rem;font-weight:900;color:#1d4ed8;white-space:nowrap}

.blocker-center-hero{display:flex;align-items:center;justify-content:space-between;gap:16px;border-left:5px solid var(--app-brand-color,var(--brand,#2563eb))}
.blocker-total-pill{display:inline-flex;align-items:center;justify-content:center;min-height:34px;padding:6px 11px;border-radius:999px;background:#eff6ff;color:#1d4ed8;font-size:.78rem;font-weight:900;white-space:nowrap}
.blocker-filter-panel{padding:14px 16px}
.blocker-filter-grid{display:grid;grid-template-columns:minmax(280px,1fr) minmax(150px,190px) minmax(170px,210px);gap:12px;align-items:end}
.blocker-filter-grid .form-select[data-erp-search-select="0"]{min-height:42px}
.error-log-filter-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:12px;align-items:end}
.error-log-filter-grid .field.full{grid-column:1/-1}
@media(max-width:480px){.error-log-filter-grid{grid-template-columns:1fr}}
.blocker-card-list{display:grid;gap:12px}
.blocker-card{padding:16px;border:1px solid #dbe3ef;border-left:5px solid #d97706;border-radius:16px;background:#fff;display:grid;gap:14px;box-shadow:0 8px 24px rgba(15,23,42,.04)}
.blocker-card.severity-critical,.blocker-card.severity-error{border-left-color:#dc2626}
.blocker-card-head{display:flex;justify-content:space-between;gap:12px;align-items:flex-start}
.blocker-card-identity{display:grid;gap:6px;min-width:0}
.blocker-card-identity>strong{font-size:1rem;line-height:1.35;color:#0f172a}
.blocker-card-identity>small{color:#64748b;overflow-wrap:anywhere}
.blocker-card-badges{display:flex;gap:6px;flex-wrap:wrap}
.blocker-primary-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.blocker-primary-grid>section{padding:12px;border:1px solid #e2e8f0;border-radius:13px;background:#f8fafc;min-width:0}
.blocker-primary-grid>section>strong{display:block;font-size:.78rem;color:#334155;margin-bottom:5px}
.blocker-primary-grid p{margin:0;color:#475569;line-height:1.5;white-space:pre-line;overflow-wrap:anywhere}
.blocker-primary-grid .blocker-next-step{border-color:#bfdbfe;background:#eff6ff}
.blocker-meta-row{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin:0;padding:10px 12px;border:1px solid #e2e8f0;border-radius:13px;background:#fff}
.blocker-meta-row>div{min-width:0}
.blocker-meta-row dt{font-size:.7rem;font-weight:900;text-transform:uppercase;letter-spacing:.04em;color:#64748b}
.blocker-meta-row dd{margin:3px 0 0;font-size:.82rem;font-weight:800;color:#0f172a;overflow-wrap:anywhere}
.blocker-actions{justify-content:flex-end}
.blocker-empty-state{border:1px dashed #cbd5e1;border-radius:16px;background:#fff}

@media(max-width:1100px){
  .action-reminder-strip{grid-template-columns:1fr}
  .blocker-primary-grid{grid-template-columns:1fr}
}
@media(max-width:900px){
  .app-navbar[data-sticky-module-navbar] .navbar-actions{flex-wrap:nowrap;overflow-x:auto;overflow-y:visible;padding:7px 2px}
  .navbar-role-context{max-width:180px}
  .blocker-filter-grid{grid-template-columns:1fr 1fr}
  .blocker-filter-search{grid-column:1/-1}
}
@media(max-width:640px){
  .navbar-guide-button strong,.profile-button strong{display:none}
  .navbar-guide-button{width:40px;min-width:40px;padding:0!important;justify-content:center}
  .navbar-company-context{width:96px;min-width:96px}
  .navbar-company-context .form-select{width:94px;max-width:94px}
  .navbar-role-context{width:150px;min-width:150px}
  .action-reminder-items,.blocker-filter-grid,.blocker-meta-row{grid-template-columns:1fr}
  .blocker-filter-search{grid-column:auto}
  .action-reminder-item{grid-template-columns:28px minmax(0,1fr)}
  .action-reminder-action{grid-column:2}
  .blocker-center-hero{align-items:flex-start;flex-direction:column}
  .blocker-actions{justify-content:stretch}
  .blocker-actions .btn{width:100%}
}

/* Operational blocker resolution workbench */
.blocker-workbench-backdrop{overscroll-behavior:contain}
.blocker-workbench{display:grid;grid-template-rows:auto minmax(0,1fr) auto;gap:0;border-left:5px solid var(--app-brand-color,var(--brand,#2563eb));overflow:hidden}
.blocker-workbench-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px}
.blocker-workbench-head>div{display:grid;gap:4px;min-width:0}
.blocker-workbench-head h2,.blocker-workbench-head p{margin:0;overflow-wrap:anywhere;word-break:break-word}
.blocker-workbench-body{display:grid;align-content:start;gap:16px;min-height:0}
.blocker-workbench-intro{margin:0}
.blocker-workbench-summary{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:10px}
.blocker-workbench-summary>section{padding:12px;border:1px solid #dbe3ef;border-radius:12px;background:#f8fafc;min-width:0}
.blocker-workbench-summary p{margin:5px 0 0;color:#475569;white-space:pre-line;overflow-wrap:anywhere;word-break:break-word}
.blocker-workbench-summary small{display:block;margin-top:6px;color:#64748b;font-weight:800}
.blocker-assignment-grid{display:grid;grid-template-columns:minmax(260px,1fr) auto;gap:10px;align-items:end}
.blocker-action-note{max-width:100%}
.blocker-action-note textarea{width:100%;resize:vertical}
.blocker-workbench-actions{justify-content:flex-end;margin:0;padding:12px 16px;max-height:30vh;overflow:auto;background:#fff}
.blocker-workbench-actions .status-pill{max-width:min(100%,460px)}
.blocker-history{display:grid;gap:8px;border-top:1px solid #e2e8f0;padding-top:14px}
.blocker-history h3{margin:0;font-size:.95rem}
.blocker-history-item{display:grid;grid-template-columns:minmax(180px,.7fr) minmax(0,1.3fr);gap:12px;padding:10px 12px;border:1px solid #e2e8f0;border-radius:12px;background:#fff}
.blocker-history-item>div{display:grid;gap:3px;min-width:0}
.blocker-history-item strong,.blocker-history-item small,.blocker-history-item p{overflow-wrap:anywhere;word-break:break-word}
.blocker-history-item small{color:#64748b}
.blocker-history-item p{margin:0;color:#475569;white-space:pre-line}
@media(max-width:720px){.blocker-workbench-head{display:grid}.blocker-assignment-grid{grid-template-columns:1fr}.blocker-history-item{grid-template-columns:1fr}.blocker-workbench-actions{display:grid!important;grid-template-columns:1fr 1fr}.blocker-workbench-actions .btn,.blocker-workbench-actions>a.btn{width:100%}}
@media(max-width:520px){.blocker-workbench-actions{grid-template-columns:1fr}}

/* Module operational and analytics dashboard separation */
.module-operations-page,
.module-analytics-page {
  --analytics-ink: #0f172a;
  --analytics-muted: #64748b;
  --analytics-line: #dbe3ef;
  --analytics-soft: #f8fafc;
  --analytics-accent: var(--app-brand-color, var(--brand, #2563eb));
}

.module-operations-hero,
.module-analytics-hero {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--analytics-line);
  background:
    radial-gradient(circle at 90% 12%, rgba(37, 99, 235, .12), transparent 32%),
    linear-gradient(135deg, #ffffff 0%, #f8fbff 58%, #eef5ff 100%);
  box-shadow: 0 16px 42px rgba(15, 23, 42, .07);
}

.module-operations-hero::after,
.module-analytics-hero::after {
  position: absolute;
  right: -70px;
  bottom: -92px;
  width: 220px;
  height: 220px;
  border: 34px solid rgba(37, 99, 235, .06);
  border-radius: 999px;
  content: "";
  pointer-events: none;
}

.module-dashboard-purpose-note,
.module-analytics-purpose-note {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 8px;
  align-items: center;
  width: fit-content;
  max-width: 780px;
  margin-top: 12px;
  padding: 8px 11px;
  border: 1px solid #bfdbfe;
  border-radius: 12px;
  background: rgba(239, 246, 255, .88);
  color: #334155;
  font-size: .78rem;
  line-height: 1.45;
}

.module-dashboard-purpose-note strong,
.module-analytics-purpose-note strong {
  color: #1d4ed8;
}

.analytics-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 14px 16px;
  border-color: var(--analytics-line);
  background: #fff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, .04);
}

.analytics-toolbar-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 1fr));
  gap: 10px;
  min-width: 0;
}

.analytics-toolbar-meta > div {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: var(--analytics-soft);
}

.analytics-toolbar-meta span,
.analytics-period-control > span {
  color: var(--analytics-muted);
  font-size: .68rem;
  font-weight: 900;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.analytics-toolbar-meta strong {
  color: var(--analytics-ink);
  font-size: .82rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.analytics-period-control {
  display: grid;
  gap: 7px;
  justify-items: end;
  min-width: 0;
}

.analytics-period-switch {
  display: flex;
  gap: 5px;
  max-width: 100%;
  padding: 4px;
  overflow-x: auto;
  border: 1px solid #dbe3ef;
  border-radius: 13px;
  background: #f8fafc;
  scrollbar-width: thin;
}

.analytics-period-switch a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 6px 10px;
  border-radius: 9px;
  color: #475569;
  font-size: .75rem;
  font-weight: 850;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  transition: background .16s ease, color .16s ease, box-shadow .16s ease;
}

.analytics-period-switch a:hover,
.analytics-period-switch a:focus-visible {
  color: #1d4ed8;
  background: #eaf2ff;
}

.analytics-period-switch a.active {
  color: #fff;
  background: var(--analytics-accent);
  box-shadow: 0 7px 16px rgba(37, 99, 235, .22);
}

.module-analytics-shell {
  padding: 0;
  overflow: hidden;
  border-color: var(--analytics-line);
  box-shadow: 0 18px 44px rgba(15, 23, 42, .06);
}

.module-analytics-shell-head {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  justify-content: space-between;
  padding: 18px 20px 14px;
  background: linear-gradient(180deg, #fff, #fbfdff);
}

.module-analytics-shell-head > div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.module-analytics-shell-head h2,
.module-analytics-shell-head p {
  margin: 0;
  overflow-wrap: anywhere;
}

.module-analytics-shell-head h2 {
  color: var(--analytics-ink);
  font-size: 1.15rem;
}

.module-analytics-shell-head p:not(.eyebrow) {
  max-width: 760px;
  color: var(--analytics-muted);
  font-size: .83rem;
  line-height: 1.5;
}

.analytics-widget-count {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 9px;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  color: #1d4ed8;
  background: #eff6ff;
  font-size: .7rem;
  font-weight: 900;
  white-space: nowrap;
}

.analytics-submodule-tabs {
  display: flex;
  gap: 4px;
  padding: 0 16px 12px;
  overflow-x: auto;
  border-bottom: 1px solid #e2e8f0;
  background: #fbfdff;
  scrollbar-width: thin;
}

.analytics-submodule-tabs a {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 8px 12px;
  border: 1px solid transparent;
  border-radius: 10px;
  color: #475569;
  font-size: .78rem;
  font-weight: 850;
  text-decoration: none;
  white-space: nowrap;
}

.analytics-submodule-tabs a:hover,
.analytics-submodule-tabs a:focus-visible {
  border-color: #bfdbfe;
  color: #1d4ed8;
  background: #eff6ff;
}

.analytics-submodule-tabs a.active {
  border-color: #93c5fd;
  color: #1d4ed8;
  background: #dbeafe;
  box-shadow: inset 0 -2px 0 #2563eb;
}

.professional-analytics-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  padding: 18px 20px 22px;
  background: #f8fafc;
}

.professional-analytics-card {
  display: grid;
  align-content: start;
  min-width: 0;
  overflow: hidden;
  border: 1px solid #dbe3ef;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, .055);
}

.professional-analytics-card.is-wide {
  grid-column: 1 / -1;
}

.professional-analytics-card-head {
  padding: 16px 17px 13px;
  border-bottom: 1px solid #eef2f7;
}

.professional-analytics-card-head > div {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.professional-analytics-card-head h3,
.professional-analytics-card-head p {
  margin: 0;
  overflow-wrap: anywhere;
}

.professional-analytics-card-head h3 {
  color: var(--analytics-ink);
  font-size: 1rem;
  line-height: 1.35;
}

.professional-analytics-card-head p {
  color: var(--analytics-muted);
  font-size: .77rem;
  line-height: 1.5;
}

.professional-analytics-kickers {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.professional-analytics-kickers span {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 3px 7px;
  border-radius: 999px;
  color: #334155;
  background: #f1f5f9;
  font-size: .63rem;
  font-weight: 900;
  letter-spacing: .025em;
}

.professional-analytics-kickers span:first-child {
  color: #1e40af;
  background: #dbeafe;
}

.professional-analytics-chart {
  display: grid;
  gap: 14px;
  min-width: 0;
  padding: 14px 17px 16px;
}

.professional-analytics-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.professional-analytics-summary > div {
  display: grid;
  gap: 4px;
  min-width: 0;
  min-height: 66px;
  padding: 9px 10px;
  border: 1px solid #e2e8f0;
  border-radius: 11px;
  background: linear-gradient(180deg, #fff, #f8fafc);
}

.professional-analytics-summary span {
  color: #64748b;
  font-size: .66rem;
  font-weight: 800;
  line-height: 1.35;
}

.professional-analytics-summary strong {
  color: #0f172a;
  font-size: .9rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.professional-analytics-summary strong.is-positive {
  color: #166534;
}

.professional-analytics-summary strong.is-negative {
  color: #b91c1c;
}

.professional-analytics-visual {
  min-height: 220px;
  padding: 14px;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background:
    linear-gradient(rgba(226, 232, 240, .34) 1px, transparent 1px),
    linear-gradient(90deg, rgba(226, 232, 240, .34) 1px, transparent 1px),
    #fbfdff;
  background-size: 30px 30px;
}

.professional-line-chart {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 9px;
  min-height: 205px;
}

.professional-line-y-axis {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1px 0 24px;
  color: #64748b;
  font-size: .64rem;
  font-variant-numeric: tabular-nums;
  text-align: right;
  white-space: nowrap;
}

.professional-line-plot {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 7px;
  min-width: 0;
}

.professional-line-plot svg {
  width: 100%;
  height: 180px;
  overflow: visible;
}

.professional-line-grid {
  fill: none;
  stroke: #cbd5e1;
  stroke-dasharray: 4 6;
  stroke-width: 1;
}

.professional-line-area {
  stroke: none;
}

.professional-line-path {
  fill: none;
  stroke: #2563eb;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 3;
  vector-effect: non-scaling-stroke;
}

.professional-line-point {
  fill: #fff;
  stroke: #1d4ed8;
  stroke-width: 2.5;
  vector-effect: non-scaling-stroke;
}

.professional-line-x-axis {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(52px, 1fr);
  gap: 4px;
  min-width: 0;
  overflow-x: auto;
  color: #64748b;
  font-size: .62rem;
  text-align: center;
  scrollbar-width: thin;
}

.professional-line-x-axis span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.professional-horizontal-bars {
  display: grid;
  gap: 11px;
}

.professional-horizontal-bar {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.professional-horizontal-bar > div:first-child {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: baseline;
}

.professional-horizontal-bar span,
.professional-horizontal-bar strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

.professional-horizontal-bar span {
  color: #334155;
  font-size: .74rem;
  font-weight: 750;
}

.professional-horizontal-bar strong {
  color: #0f172a;
  font-size: .72rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.professional-horizontal-bar-track {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: #e2e8f0;
}

.professional-horizontal-bar-track i {
  display: block;
  width: var(--analytics-bar-width, 0%);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #1d4ed8, #60a5fa);
}

.professional-donut-layout {
  display: grid;
  grid-template-columns: minmax(150px, .7fr) minmax(0, 1.3fr);
  gap: 22px;
  align-items: center;
  min-height: 190px;
}

.professional-donut {
  display: grid;
  place-items: center;
  width: min(170px, 100%);
  aspect-ratio: 1;
  margin: auto;
  border-radius: 50%;
  background: var(--analytics-donut, conic-gradient(#e2e8f0 0 100%));
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, .05);
}

.professional-donut::after {
  grid-area: 1 / 1;
  width: 62%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 1px #e2e8f0;
  content: "";
}

.professional-donut > span {
  z-index: 1;
  grid-area: 1 / 1;
  display: grid;
  gap: 1px;
  color: #475569;
  text-align: center;
}

.professional-donut strong {
  color: #0f172a;
  font-size: 1.25rem;
}

.professional-donut small {
  font-size: .66rem;
  font-weight: 800;
}

.professional-donut-legend {
  display: grid;
  gap: 8px;
}

.professional-donut-legend > div {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-width: 0;
  padding-bottom: 7px;
  border-bottom: 1px solid #eef2f7;
}

.professional-donut-legend i {
  width: 9px;
  height: 9px;
  border-radius: 3px;
  background: var(--analytics-color, #2563eb);
}

.professional-donut-legend span,
.professional-donut-legend strong {
  min-width: 0;
  font-size: .72rem;
  overflow-wrap: anywhere;
}

.professional-donut-legend span {
  color: #475569;
}

.professional-donut-legend strong {
  color: #0f172a;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.professional-analytics-insight {
  display: grid;
  gap: 3px;
  padding: 10px 11px;
  border-left: 3px solid #2563eb;
  border-radius: 0 10px 10px 0;
  background: #eff6ff;
}

.professional-analytics-insight span {
  color: #1d4ed8;
  font-size: .65rem;
  font-weight: 900;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.professional-analytics-insight p {
  margin: 0;
  color: #334155;
  font-size: .75rem;
  line-height: 1.48;
  overflow-wrap: anywhere;
}

.professional-analytics-footer {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  justify-content: space-between;
  padding-top: 2px;
  border-top: 1px solid #eef2f7;
}

.professional-analytics-footer details {
  min-width: 0;
}

.professional-analytics-footer summary,
.professional-analytics-footer > a {
  color: #1d4ed8;
  font-size: .72rem;
  font-weight: 850;
  cursor: pointer;
}

.professional-analytics-footer > a {
  flex: 0 0 auto;
  text-decoration: none;
}

.professional-chart-data-list {
  display: grid;
  gap: 5px;
  margin-top: 8px;
  min-width: min(360px, 100%);
}

.professional-chart-data-list > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  padding: 6px 8px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
  font-size: .7rem;
}

.professional-chart-data-list span {
  color: #475569;
  overflow-wrap: anywhere;
}

.professional-chart-data-list strong {
  color: #0f172a;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.analytics-empty-state {
  margin: 18px 20px 22px;
  border: 1px dashed #94a3b8;
  border-radius: 16px;
  background: linear-gradient(145deg, #fff, #f8fafc);
}

@media (max-width: 1100px) {
  .analytics-toolbar {
    grid-template-columns: 1fr;
  }

  .analytics-period-control {
    justify-items: start;
  }
}

@media (max-width: 980px) {
  .professional-analytics-grid {
    grid-template-columns: 1fr;
  }

  .professional-analytics-card.is-wide {
    grid-column: auto;
  }
}

@media (max-width: 720px) {
  .analytics-toolbar-meta,
  .professional-analytics-summary,
  .professional-donut-layout {
    grid-template-columns: 1fr;
  }

  .module-analytics-shell-head,
  .professional-analytics-footer {
    display: grid;
  }

  .analytics-widget-count {
    width: fit-content;
  }

  .module-analytics-shell-head,
  .professional-analytics-grid {
    padding-right: 14px;
    padding-left: 14px;
  }

  .analytics-submodule-tabs {
    padding-right: 12px;
    padding-left: 12px;
  }

  .professional-line-chart {
    grid-template-columns: 1fr;
  }

  .professional-line-y-axis {
    display: none;
  }

  .professional-analytics-visual {
    min-height: 200px;
    padding: 11px;
  }
}

/* Curated module analytics workspace */
.analytics-command-bar {
  position: sticky;
  top: 8px;
  z-index: 18;
  border: 1px solid rgba(203, 213, 225, .92);
  box-shadow: 0 10px 30px rgba(15, 23, 42, .07);
}

.analytics-widget-warning {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, auto);
  gap: 12px 18px;
  align-items: start;
  margin: 0;
  border-color: #facc15;
  background: linear-gradient(135deg, #fffbeb, #fffdf5);
}

.analytics-widget-warning > div:first-child {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.analytics-widget-warning strong,
.analytics-widget-warning p {
  margin: 0;
  overflow-wrap: anywhere;
}

.analytics-widget-warning p {
  color: #713f12;
  font-size: .78rem;
  line-height: 1.5;
}

.analytics-widget-warning-references {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
  min-width: 0;
}

.analytics-widget-warning-references span {
  display: inline-flex;
  max-width: 100%;
  padding: 5px 8px;
  border: 1px solid #fde68a;
  border-radius: 999px;
  background: #fff;
  color: #854d0e;
  font-size: .68rem;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.analytics-workspace-layout {
  display: grid;
  grid-template-columns: minmax(210px, 250px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  isolation: isolate;
}

.analytics-section-rail {
  position: sticky;
  top: 104px;
  z-index: 1;
  display: grid;
  gap: 14px;
  min-width: 0;
  max-width: 100%;
  padding: 15px;
  overflow: hidden;
  border-color: #dbe3ef;
  background: linear-gradient(180deg, #fff 0%, #f8fafc 100%);
}

.analytics-section-rail-head {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 2px 3px 10px;
  border-bottom: 1px solid #e2e8f0;
}

.analytics-section-rail-head h2,
.analytics-section-rail-head p {
  margin: 0;
  overflow-wrap: anywhere;
}

.analytics-section-rail-head h2 {
  color: #0f172a;
  font-size: 1rem;
}

.analytics-section-rail-head p:not(.eyebrow) {
  color: #64748b;
  font-size: .75rem;
  line-height: 1.5;
}

.analytics-section-rail .analytics-submodule-tabs {
  display: grid;
  gap: 7px;
  width: 100%;
  min-width: 0;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  background: transparent;
}

.analytics-section-rail .analytics-submodule-tabs a {
  display: grid;
  gap: 3px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 0;
  padding: 10px 11px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  white-space: normal;
}

.analytics-section-rail .analytics-submodule-tabs a strong,
.analytics-section-rail .analytics-submodule-tabs a small {
  min-width: 0;
  overflow-wrap: anywhere;
}

.analytics-section-rail .analytics-submodule-tabs a strong {
  color: #334155;
  font-size: .78rem;
  line-height: 1.3;
}

.analytics-section-rail .analytics-submodule-tabs a small {
  color: #64748b;
  font-size: .66rem;
  font-weight: 600;
  line-height: 1.45;
}

.analytics-section-rail .analytics-submodule-tabs a:hover,
.analytics-section-rail .analytics-submodule-tabs a:focus-visible {
  border-color: #bfdbfe;
  background: #eff6ff;
  box-shadow: none;
}

.analytics-section-rail .analytics-submodule-tabs a.active {
  border-color: #93c5fd;
  background: linear-gradient(135deg, #eff6ff, #dbeafe);
  box-shadow: inset 3px 0 0 #2563eb;
}

.analytics-section-rail .analytics-submodule-tabs a.active strong {
  color: #1d4ed8;
}

.analytics-workspace-main {
  min-width: 0;
}

.analytics-section-stage {
  overflow: hidden;
  border-color: #dbe3ef;
  background: #fff;
  box-shadow: 0 14px 38px rgba(15, 23, 42, .055);
}

.analytics-section-stage-head {
  padding: 18px 20px 16px;
  background: linear-gradient(180deg, #fff 0%, #fbfdff 100%);
}

.analytics-section-stage-head .analytics-widget-count {
  align-self: start;
}

.professional-analytics-grid {
  gap: 18px;
  padding: 18px;
  background: #f6f8fb;
}

.professional-analytics-card {
  border-color: #d7e0eb;
  border-radius: 18px;
  box-shadow: 0 9px 26px rgba(15, 23, 42, .06);
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.professional-analytics-card:hover {
  border-color: #b8c7da;
  box-shadow: 0 13px 32px rgba(15, 23, 42, .09);
  transform: translateY(-1px);
}

.professional-analytics-card.is-featured {
  border-top: 4px solid #2563eb;
}

.professional-analytics-card.is-featured .professional-analytics-card-head {
  padding-top: 15px;
}

.professional-analytics-card.is-featured .professional-analytics-visual {
  min-height: 250px;
}

.professional-analytics-card.is-supporting .professional-analytics-visual {
  min-height: 210px;
}

.professional-analytics-card-head {
  padding: 16px 18px 14px;
}

.professional-analytics-card-head h3 {
  font-size: 1.02rem;
}

.professional-analytics-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  align-items: flex-start;
  padding: 0 0 12px;
  border-bottom: 1px solid #e8edf4;
}

.professional-analytics-summary > div {
  display: grid;
  gap: 3px;
  min-width: min(170px, 100%);
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.professional-analytics-summary span {
  font-size: .64rem;
  letter-spacing: .025em;
  text-transform: uppercase;
}

.professional-analytics-summary strong {
  font-size: .92rem;
}

.professional-analytics-visual {
  border-color: #dce4ee;
  background:
    linear-gradient(rgba(226, 232, 240, .25) 1px, transparent 1px),
    linear-gradient(90deg, rgba(226, 232, 240, .25) 1px, transparent 1px),
    #fff;
  background-size: 34px 34px;
}

.professional-horizontal-bar-track {
  height: 10px;
  background: #e7edf5;
}

.professional-horizontal-bar-track i {
  background: linear-gradient(90deg, #1d4ed8 0%, #3b82f6 65%, #93c5fd 100%);
}

.professional-donut {
  width: min(178px, 100%);
}

.professional-donut > span {
  width: 64%;
  padding: 4px;
}

.professional-donut strong {
  font-size: .9rem;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.professional-donut small {
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.professional-analytics-insight {
  border-left-color: #1d4ed8;
  background: linear-gradient(90deg, #eff6ff 0%, #f8fbff 100%);
}

.professional-analytics-footer {
  align-items: center;
}

@media (max-width: 1100px) {
  .analytics-widget-warning {
    grid-template-columns: 1fr;
  }

  .analytics-widget-warning-references {
    justify-content: flex-start;
  }

  .analytics-command-bar {
    position: static;
  }

  .analytics-workspace-layout {
    grid-template-columns: 1fr;
  }

  .analytics-section-rail {
    position: static;
    gap: 10px;
  }

  .analytics-section-rail .analytics-submodule-tabs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: thin;
  }

  .analytics-section-rail .analytics-submodule-tabs a {
    flex: 0 0 min(230px, 78vw);
    width: auto;
    max-width: min(230px, 78vw);
  }
}

@media (max-width: 720px) {
  .analytics-section-rail,
  .analytics-section-stage-head,
  .professional-analytics-grid {
    padding-right: 13px;
    padding-left: 13px;
  }

  .professional-analytics-summary {
    display: grid;
    grid-template-columns: 1fr;
    gap: 9px;
  }

  .professional-analytics-summary > div {
    min-width: 0;
  }

  .professional-analytics-card:hover {
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .professional-analytics-card {
    transition: none;
  }
}

/* Company context is always visible, including the zero-company onboarding state. */
.navbar-company-empty{
  display:inline-flex!important;
  align-items:center;
  gap:8px;
  width:auto;
  min-width:176px;
  max-width:220px;
  padding:0 11px!important;
  border-color:#f59e0b!important;
  background:#fffbeb!important;
  color:#92400e!important;
  text-decoration:none;
  overflow:hidden;
}
.navbar-company-empty:hover,.navbar-company-empty:focus-visible{
  border-color:#d97706!important;
  background:#fef3c7!important;
  color:#78350f!important;
  box-shadow:0 0 0 3px rgba(245,158,11,.18);
}
.navbar-company-empty.is-disabled{
  cursor:not-allowed;
  opacity:.82;
}
.navbar-company-empty-indicator{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:22px;
  height:22px;
  flex:0 0 22px;
  border-radius:999px;
  background:#f59e0b;
  color:#fff;
  font-size:.75rem;
  font-weight:950;
}
.navbar-company-empty-copy{
  display:grid;
  min-width:0;
  line-height:1.05;
  text-align:left;
}
.navbar-company-empty-copy strong,.navbar-company-empty-copy small{
  display:block;
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.navbar-company-empty-copy strong{font-size:.76rem;font-weight:900}
.navbar-company-empty-copy small{margin-top:3px;font-size:.66rem;font-weight:750;color:#a16207}
@media(max-width:720px){
  .navbar-company-empty{min-width:154px;max-width:176px;padding:0 9px!important}
  .navbar-company-empty-copy small{display:none}
}


/* 2026-07-30: reliable searchable-select hit targets and PR line selection. */
.erp-search-select__control{touch-action:manipulation;user-select:none}
.erp-search-select__search{min-height:34px!important;user-select:text}
.erp-search-select__clear{min-width:30px;min-height:30px}
.pr-material-choice{display:flex;align-items:flex-start;gap:.5rem;padding:.35rem 0;border-bottom:1px dashed #e2e8f0}
.pr-material-choice:last-child{border-bottom:0}
.pr-material-choice>input{margin-top:.2rem!important}
.action-supplier-field{min-width:14rem}
.action-helper{display:block;max-width:18rem;line-height:1.35}

/* Simplified finance timeline and one-button payment detail */
.simple-finance-timeline .timeline-list{display:grid;gap:0;margin-top:1rem}
.simple-finance-timeline .timeline-item{position:relative;display:grid;grid-template-columns:1.1rem minmax(0,1fr);gap:.75rem;padding:0 0 1rem}
.simple-finance-timeline .timeline-item:not(:last-child)::before{content:"";position:absolute;left:.34rem;top:1rem;bottom:0;width:2px;background:var(--line)}
.simple-finance-timeline .timeline-marker{position:relative;z-index:1;width:.8rem;height:.8rem;margin-top:.32rem;border:2px solid var(--app-brand-color,var(--brand));border-radius:999px;background:#fff}
.simple-finance-timeline .timeline-content{min-width:0;padding:.75rem .9rem;border:1px solid var(--line);border-radius:var(--radius);background:var(--panel-soft)}
.simple-finance-timeline .timeline-heading{display:flex;align-items:center;justify-content:space-between;gap:.75rem;flex-wrap:wrap}
.simple-finance-timeline .timeline-content p{margin:.35rem 0;line-height:1.5;overflow-wrap:anywhere}
.simple-payment-detail .stats-grid{grid-template-columns:repeat(auto-fit,minmax(190px,1fr))}
.simple-payment-detail .danger-zone{border-color:#fecaca;background:#fffafa}
.simple-payment-detail .actions-field{display:flex;align-items:end}
@media(max-width:720px){.simple-finance-timeline .timeline-item{grid-template-columns:.9rem minmax(0,1fr)}.simple-payment-detail .actions-row{width:100%}.simple-payment-detail .actions-row .btn{flex:1 1 12rem}}

/* 2026-07-31: finance/accounting daily-work hierarchy and collapsed technical audit. */
.finance-record-hero{align-items:flex-start}
.finance-record-badges{display:flex;flex-wrap:wrap;gap:.45rem;margin-top:.65rem}
.finance-advanced-audit{margin-top:1rem;border:1px solid var(--line);border-radius:var(--radius);background:var(--panel-soft);overflow:hidden}
.finance-advanced-audit>summary{cursor:pointer;list-style:none;padding:.85rem 1rem;font-weight:850;color:var(--text);background:color-mix(in srgb,var(--panel-soft) 82%,var(--app-brand-color,var(--brand)) 18%)}
.finance-advanced-audit>summary::-webkit-details-marker{display:none}
.finance-advanced-audit>summary::after{content:"+";float:right;font-size:1.15rem;line-height:1}
.finance-advanced-audit[open]>summary::after{content:"−"}
.finance-advanced-audit>p,.finance-advanced-audit>.table-wrap,.finance-advanced-audit>pre,.finance-advanced-audit>h3{margin-left:1rem;margin-right:1rem}
.finance-advanced-audit>.table-wrap:last-child,.finance-advanced-audit>pre:last-child{margin-bottom:1rem}
@media(max-width:720px){.finance-record-hero .actions-row{width:100%}.finance-record-hero .actions-row .btn{flex:1 1 11rem}.finance-advanced-audit>p,.finance-advanced-audit>.table-wrap,.finance-advanced-audit>pre,.finance-advanced-audit>h3{margin-left:.65rem;margin-right:.65rem}}

/* 2026-07-31: production operations workspace and compact multi-column tax filters. */
.tax-document-filter-grid{
  display:grid!important;
  grid-template-columns:minmax(260px,2fr) repeat(4,minmax(145px,1fr));
  gap:12px;
  align-items:end;
}
.tax-document-filter-grid>.field,
.tax-document-filter-grid>.index-order-controls,
.tax-document-filter-grid>.tax-filter-actions{min-width:0;margin:0}
.tax-document-filter-grid>.index-order-controls{
  grid-column:span 2;
  display:grid;
  grid-template-columns:repeat(2,minmax(145px,1fr));
  gap:12px;
  align-items:end;
}
.tax-filter-actions{
  display:flex;
  min-height:44px;
  align-items:center;
  justify-content:flex-end;
  gap:10px;
  flex-wrap:wrap;
}
.tax-filter-actions small{color:var(--muted);font-weight:700}

.production-workspace{
  margin:0 20px 12px;
  padding:12px 14px;
  border:1px solid color-mix(in srgb,var(--line) 78%,var(--app-brand-color,var(--brand)) 22%);
  border-radius:16px;
  background:linear-gradient(135deg,color-mix(in srgb,var(--panel) 94%,var(--app-brand-color,var(--brand)) 6%),var(--panel));
  box-shadow:0 8px 22px rgba(15,23,42,.05);
}
.production-workspace__context{display:grid;gap:5px;margin-bottom:10px}
.production-workspace__heading{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.production-workspace__heading>strong{font-size:1rem;color:var(--text)}
.production-workspace__stage{
  display:inline-flex;align-items:center;min-height:25px;padding:3px 9px;border-radius:999px;
  background:var(--panel-soft);border:1px solid var(--line);font-size:.72rem;font-weight:900;letter-spacing:.02em;text-transform:uppercase
}
.production-workspace__stage.tone-warning{background:#fff7ed;border-color:#fed7aa;color:#9a3412}
.production-workspace__stage.tone-info{background:#eff6ff;border-color:#bfdbfe;color:#1d4ed8}
.production-workspace__stage.tone-success{background:#ecfdf5;border-color:#a7f3d0;color:#047857}
.production-workspace__context p{margin:0;color:var(--text);line-height:1.45}
.production-workspace__context small{color:var(--muted);line-height:1.45}
.production-workspace__groups{display:flex;gap:10px;overflow-x:auto;padding:2px 0 4px;scrollbar-width:thin}
.production-workspace__group{flex:0 0 auto;min-width:190px;padding:8px;border:1px solid var(--line);border-radius:12px;background:var(--panel)}
.production-workspace__group>span{display:block;margin:0 4px 6px;color:var(--muted);font-size:.68rem;font-weight:900;letter-spacing:.04em;text-transform:uppercase}
.production-workspace__links{display:flex;gap:5px;flex-wrap:wrap}
.production-workspace__links a{
  display:inline-flex;align-items:center;min-height:32px;padding:5px 9px;border:1px solid transparent;border-radius:9px;
  color:var(--text);font-size:.78rem;font-weight:760;text-decoration:none;white-space:nowrap
}
.production-workspace__links a:hover,.production-workspace__links a:focus-visible{border-color:var(--line);background:var(--panel-soft)}
.production-workspace__links a.active{background:var(--app-brand-color,var(--brand));color:#fff;border-color:var(--app-brand-color,var(--brand))}

.production-module-shell .content-body{padding-top:2px}
.production-module-shell .page-stack,
.production-module-shell .pp-page,
.production-module-shell .ph-page{gap:14px}
.production-module-shell .page-header,
.production-module-shell .page-header-card,
.production-module-shell .pp-page-header,
.production-module-shell .ph-page-header{border-radius:16px}
.production-module-shell .page-header h1,
.production-module-shell .page-header h2,
.production-module-shell .page-header-card h1,
.production-module-shell .page-header-card h2{line-height:1.2;overflow-wrap:anywhere}
.production-module-shell .toolbar,
.production-module-shell .filter-bar,
.production-module-shell .filters-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(165px,1fr));
  gap:10px;
  align-items:end;
}
.production-module-shell .toolbar>.field.wide,
.production-module-shell .filter-bar>.field.wide,
.production-module-shell .filters-grid>.wide{grid-column:span 2}
.production-module-shell .form-input,
.production-module-shell .form-select,
.production-module-shell select,
.production-module-shell input[type="text"],
.production-module-shell input[type="search"],
.production-module-shell input[type="number"],
.production-module-shell input[type="date"]{min-height:44px}
.production-module-shell .data-table th{position:sticky;top:0;z-index:2;background:var(--panel-soft);vertical-align:bottom}
.production-module-shell .data-table td{vertical-align:top}
.production-module-shell .data-table td,.production-module-shell .data-table th{overflow-wrap:anywhere}
.production-module-shell .actions-row{row-gap:7px}
.production-module-shell .actions-row .btn{min-height:38px}
.production-module-shell .production-help-details>summary{cursor:pointer;padding:14px 16px;font-weight:850}
.production-module-shell .production-help-details[open]>summary{border-bottom:1px solid var(--line)}
.production-module-shell .production-help-details>.production-help-content{padding:14px 16px}
.production-module-shell .production-order-decision-strip{
  display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin-top:12px
}
.production-module-shell .production-order-decision-strip>div{
  min-width:0;padding:10px 12px;border:1px solid var(--line);border-radius:12px;background:var(--panel-soft)
}
.production-module-shell .production-order-decision-strip span{display:block;color:var(--muted);font-size:.72rem;font-weight:800;text-transform:uppercase}
.production-module-shell .production-order-decision-strip strong{display:block;margin-top:3px;overflow-wrap:anywhere}
.production-module-shell .production-order-index-stats{grid-template-columns:repeat(5,minmax(145px,1fr))}
.production-module-shell .production-order-filter-grid{grid-template-columns:minmax(250px,2fr) repeat(5,minmax(145px,1fr))}
.production-module-shell .production-next-action{display:grid;gap:4px;min-width:190px}
.production-module-shell .production-next-action small{line-height:1.35;color:var(--muted)}
.production-module-shell .schedule-overdue{color:#b91c1c;font-weight:850}
.production-module-shell .production-detail-tabs{overflow-x:auto;flex-wrap:nowrap;scrollbar-width:thin}
.production-module-shell .production-detail-tabs>button{white-space:nowrap;flex:0 0 auto}

@media(max-width:1280px){
  .tax-document-filter-grid{grid-template-columns:minmax(240px,2fr) repeat(3,minmax(145px,1fr))}
  .production-module-shell .production-order-index-stats{grid-template-columns:repeat(3,minmax(145px,1fr))}
  .production-module-shell .production-order-filter-grid{grid-template-columns:minmax(230px,2fr) repeat(3,minmax(145px,1fr))}
}
@media(max-width:900px){
  .production-workspace{margin:0 12px 10px;padding:10px}
  .production-workspace__context p{font-size:.86rem}
  .tax-document-filter-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .tax-document-filter-grid>.tax-filter-search{grid-column:1/-1}
  .tax-document-filter-grid>.index-order-controls{grid-column:1/-1}
  .tax-filter-actions{grid-column:1/-1;justify-content:flex-start}
  .production-module-shell .production-order-decision-strip{grid-template-columns:repeat(2,minmax(0,1fr))}
  .production-module-shell .production-order-index-stats{grid-template-columns:repeat(2,minmax(0,1fr))}
  .production-module-shell .production-order-filter-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .production-module-shell .production-order-filter-grid>.wide{grid-column:1/-1}
}
@media(max-width:620px){
  .tax-document-filter-grid,
  .tax-document-filter-grid>.index-order-controls,
  .production-module-shell .production-order-decision-strip,
  .production-module-shell .production-order-index-stats,
  .production-module-shell .production-order-filter-grid{grid-template-columns:1fr}
  .tax-document-filter-grid>*{grid-column:auto!important}
  .production-workspace__group{min-width:170px}
  .production-module-shell .toolbar>.field.wide,
  .production-module-shell .filter-bar>.field.wide,
  .production-module-shell .filters-grid>.wide{grid-column:auto}
}

/* Production operational flow closure — 2026-07-31 */
.production-module-shell .production-supply-flow{display:grid;gap:12px}
.production-module-shell .production-supply-flow__steps{
  display:grid;
  grid-template-columns:repeat(7,minmax(150px,1fr));
  gap:8px;
  overflow-x:auto;
  padding-bottom:4px;
  scrollbar-width:thin;
}
.production-module-shell .production-supply-flow__steps article{
  position:relative;
  display:flex;
  min-width:150px;
  gap:9px;
  align-items:flex-start;
  padding:10px;
  border:1px solid var(--line);
  border-radius:12px;
  background:var(--panel-soft);
}
.production-module-shell .production-supply-flow__steps article>span{
  display:inline-grid;
  flex:0 0 28px;
  width:28px;
  height:28px;
  place-items:center;
  border-radius:999px;
  background:var(--app-brand-color,var(--brand));
  color:#fff;
  font-weight:900;
}
.production-module-shell .production-supply-flow__steps article>div{display:grid;gap:3px;min-width:0}
.production-module-shell .production-supply-flow__steps strong{font-size:.82rem;line-height:1.3;overflow-wrap:anywhere}
.production-module-shell .production-supply-flow__steps small{color:var(--muted);font-size:.72rem;line-height:1.35;overflow-wrap:anywhere}
.production-module-shell .production-supply-flow__steps article:not(:last-child)::after{
  content:'›';
  position:absolute;
  right:-8px;
  top:50%;
  z-index:2;
  transform:translateY(-50%);
  color:var(--muted);
  font-size:1.1rem;
  font-weight:900;
}
.production-module-shell .status-pill.success,
.production-module-shell .badge.success{white-space:normal}
.production-module-shell .actions-field .btn[disabled]{cursor:wait;opacity:.72}
@media(max-width:900px){
  .production-module-shell .production-supply-flow__steps{grid-template-columns:repeat(7,minmax(180px,1fr))}
}

/* Production material supply visibility — 2026-07-31 */
.production-module-shell .production-material-supply-stats{
  grid-template-columns:repeat(auto-fit,minmax(170px,1fr));
}
.production-module-shell [data-production-material-supply-progress] .data-table td{
  vertical-align:top;
}
.production-module-shell [data-production-material-supply-progress] .mini-meta{
  gap:5px;
}
.production-module-shell [data-production-material-supply-progress] .mini-meta span{
  display:block;
  overflow-wrap:anywhere;
}
.production-module-shell [data-production-material-supply-progress] .compact-actions{
  align-items:flex-start;
  gap:5px;
}
.production-module-shell [data-production-material-supply-details] summary{
  cursor:pointer;
  list-style-position:outside;
}
.production-module-shell [data-production-material-supply-details][open] summary{
  margin-bottom:10px;
}
@media(max-width:900px){
  .production-module-shell .production-material-supply-stats{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:620px){
  .production-module-shell .production-material-supply-stats{grid-template-columns:1fr}
}

/* Production supply milestone and integrity closure */
.production-supply-milestones {
    border: 1px solid var(--border-color, #d8dee9);
    border-radius: var(--radius-lg, 14px);
    background: var(--surface, #fff);
    padding: 1rem;
}
.production-supply-milestone-list {
    display: grid;
    gap: .75rem;
    margin: .75rem 0 0;
    padding: 0;
    list-style: none;
}
.production-supply-milestone-item {
    display: grid;
    grid-template-columns: .75rem minmax(0, 1fr);
    gap: .65rem;
    align-items: start;
}
.production-supply-milestone-dot {
    width: .65rem;
    height: .65rem;
    margin-top: .35rem;
    border-radius: 999px;
    background: currentColor;
    color: var(--primary, #2457d6);
    box-shadow: 0 0 0 4px color-mix(in srgb, currentColor 14%, transparent);
}
.production-supply-milestone-heading {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: .35rem .75rem;
}
.production-supply-milestone-heading time {
    color: var(--muted-color, #667085);
    font-size: .82rem;
}
.production-supply-milestone-item p {
    margin: .2rem 0 0;
    color: var(--muted-color, #667085);
    overflow-wrap: anywhere;
}
[data-production-supply-integrity-alert] {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}
[data-production-supply-integrity-alert] p {
    margin: .25rem 0 0;
}
@media (max-width: 720px) {
    [data-production-supply-integrity-alert] {
        flex-direction: column;
    }
    [data-production-supply-integrity-alert] .btn {
        width: 100%;
    }
}

/* 2026-08-05: company-scoped branding workspace and runtime theme integrity. */
.company-branding-scope-card{
  display:grid;
  gap:12px;
  margin-bottom:16px;
  padding:14px 16px;
  border:1px solid var(--app-border-color,#dbe3ef);
  border-left:5px solid var(--app-brand-color,#2563eb);
  border-radius:var(--app-radius-lg,16px);
  background:var(--app-panel-bg,#fff);
  color:var(--app-body-text,#111827);
}
.company-branding-scope-main{display:flex;align-items:flex-start;gap:12px;min-width:0}
.company-branding-scope-icon{display:grid;place-items:center;flex:0 0 32px;width:32px;height:32px;border-radius:10px;background:var(--app-brand-soft-color,#dbeafe);color:var(--app-brand-color,#2563eb);font-weight:900}
.company-branding-scope-copy{display:grid;gap:6px;min-width:0;flex:1}
.company-branding-scope-heading{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap}
.company-branding-scope-heading strong{font-size:.96rem}
.company-branding-scope-copy p{margin:0;color:var(--muted,#64748b);line-height:1.45}
.company-branding-active-company{display:flex;align-items:center;gap:8px;flex-wrap:wrap;font-size:.84rem}
.company-branding-active-company span{color:var(--muted,#64748b)}
.company-branding-active-company strong{color:var(--app-body-text,#111827)}
.company-branding-scope-details{border-top:1px solid var(--app-border-color,#dbe3ef);padding-top:10px}
.company-branding-scope-details summary{cursor:pointer;color:var(--app-brand-color,#2563eb);font-size:.82rem;font-weight:800}
.company-branding-scope-details dl{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:10px 0 0}
.company-branding-scope-details dl>div{display:grid;gap:3px;padding:9px 10px;border:1px solid var(--app-border-color,#dbe3ef);border-radius:10px;background:var(--app-panel-soft-bg,#f8fafc)}
.company-branding-scope-details dt{font-size:.72rem;font-weight:800;text-transform:uppercase;color:var(--muted,#64748b)}
.company-branding-scope-details dd{margin:0;font-size:.82rem;font-weight:700;overflow-wrap:anywhere}
.company-branding-upload-error{margin:0;padding:9px 10px;border:1px solid #fecaca;border-radius:10px;background:#fef2f2;color:#991b1b;font-size:.84rem}
.company-branding-upload-error[hidden]{display:none!important}
@media(max-width:760px){.company-branding-scope-details dl{grid-template-columns:1fr}.company-branding-scope-heading{align-items:flex-start}}

/* Dense detail pages: native, accessible disclosure sections without JS dependency. */
.erp-collapsible-section {
    border: 1px solid var(--border, #d8dee8);
    border-radius: 14px;
    background: var(--surface, #fff);
    overflow: clip;
    margin-block: 12px;
}
.erp-collapsible-section__summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 16px;
    cursor: pointer;
    list-style: none;
    user-select: none;
}
.erp-collapsible-section__summary::-webkit-details-marker { display: none; }
.erp-collapsible-section__summary:focus-visible {
    outline: 3px solid color-mix(in srgb, currentColor 22%, transparent);
    outline-offset: -3px;
}
.erp-collapsible-section__heading {
    display: grid;
    gap: 4px;
    min-width: 0;
}
.erp-collapsible-section__heading > strong { font-size: 1rem; }
.erp-collapsible-section__heading > small { color: var(--muted, #667085); font-weight: 400; }
.erp-collapsible-section__meta { display: inline-flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.erp-collapsible-section__chevron { font-size: 1.2rem; transition: transform .16s ease; }
.erp-collapsible-section[open] .erp-collapsible-section__chevron { transform: rotate(180deg); }
.erp-collapsible-section__body { border-top: 1px solid var(--border, #d8dee8); padding: 16px; }

.sales-order-priority-card { overflow: visible; }
.sales-order-priority-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(300px, .9fr);
    gap: 18px;
    align-items: start;
}
.sales-order-priority-controls {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    align-items: start;
}
.sales-order-priority-reason { min-width: 0; }
.sales-fulfillment-policy { min-width: 0; border: 0; padding: 0; margin: 0; }
.sales-fulfillment-policy > legend { font-weight: 700; margin-bottom: 7px; }
.segmented-choice {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    padding: 4px;
    border: 1px solid var(--border, #d0d5dd);
    border-radius: 12px;
    background: var(--surface-muted, #f8fafc);
}
.segmented-choice__option {
    min-height: 42px;
    border: 1px solid transparent;
    border-radius: 9px;
    background: transparent;
    color: inherit;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    padding: 8px 12px;
}
.segmented-choice__option:hover { background: rgba(127, 127, 127, .08); }
.segmented-choice__option.active {
    border-color: var(--primary, #2563eb);
    background: var(--surface, #fff);
    box-shadow: 0 1px 3px rgba(16, 24, 40, .10);
}
.portal-order-number-link { font-weight: 700; text-decoration: none; }
.portal-order-number-link:hover { text-decoration: underline; }
.portal-order-detail-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }

@media (max-width: 1100px) {
    .sales-order-priority-grid { grid-template-columns: 1fr; }
    .portal-order-detail-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
    .sales-order-priority-controls,
    .portal-order-detail-grid { grid-template-columns: 1fr; }
    .segmented-choice { grid-template-columns: 1fr; }
    .erp-collapsible-section__summary { align-items: flex-start; }
}

/* Task-first sidebar: one-item sections are direct links, not accordions. */
.sidebar-submenu-direct {
    display: grid;
    min-width: 0;
}
.sidebar-submenu-direct > a {
    display: block;
    min-height: 46px;
    padding: 10px 11px;
    border: 1px solid rgba(148, 163, 184, .22);
    border-radius: 14px;
    background: rgba(248, 250, 252, .72);
}
.sidebar-submenu-direct > a > span {
    display: grid;
    gap: 3px;
    min-width: 0;
}
.sidebar-submenu-direct strong {
    color: inherit;
    font-size: .82rem;
    line-height: 1.2;
}
.sidebar-submenu-direct small {
    color: rgba(71, 85, 105, .82);
    font-size: .69rem;
    font-weight: 650;
    line-height: 1.3;
}
.sidebar-submenu-direct > a.active {
    background: rgba(37, 99, 235, .16);
    border-color: rgba(37, 99, 235, .5);
    color: var(--app-brand-color, #2563eb) !important;
}

.sidebar-submenu-direct[hidden] {
    display: none !important;
}
/* Supervisor approval queue: decision notes stay scoped to one reference and collapse by default. */
.approval-inbox-guidance{display:grid;gap:4px}.approval-inbox-guidance span{color:var(--muted)}.approval-decision-actions{display:grid;gap:8px;justify-items:end}.approval-decision-details{position:relative}.approval-decision-details>summary{list-style:none}.approval-decision-details>summary::-webkit-details-marker{display:none}.approval-decision-box{margin-top:8px;padding:12px;min-width:min(340px,78vw);display:grid;gap:9px;border:1px solid var(--line);border-radius:14px;background:var(--panel-soft);text-align:left}.approval-assignee-details{margin-top:6px}.approval-assignee-details summary{cursor:pointer;font-size:.78rem;font-weight:800;color:#475569}.approval-detail-link{margin-top:7px}.approval-inbox-table td:last-child{min-width:190px}@media(max-width:900px){.approval-inbox-toolbar .field.compact{flex:1 1 160px}.approval-decision-actions{justify-items:start}.approval-decision-box{min-width:min(320px,72vw)}}

/* Process transparency: lightweight, reusable show-page workflow summary. */
.process-transparency-panel {
    scroll-margin-top: 1rem;
}

.process-transparency-loading {
    min-height: 7rem;
}

.process-transparency-summary .quick-card strong {
    overflow-wrap: anywhere;
}

.process-transparency-source {
    margin-top: .75rem;
    font-size: .85rem;
}

.process-transparency-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.process-transparency-panel .panel-subsection {
    margin-top: 1rem;
    padding: 1rem;
    border: 1px solid var(--border, #d8e0ec);
    border-radius: .8rem;
    background: var(--surface, #fff);
}

.process-related-grid {
    display: grid;
    gap: .65rem;
}

.process-related-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    padding: .7rem .8rem;
    border: 1px solid var(--border, #d8e0ec);
    border-radius: .65rem;
}

.process-related-item > div {
    min-width: 0;
}

.process-related-item strong,
.process-related-item small {
    display: block;
    overflow-wrap: anywhere;
}

.process-compact-list,
.process-timeline-list {
    list-style: none;
    padding: 0;
    margin: .75rem 0 0;
}

.process-compact-list {
    display: grid;
    gap: .6rem;
}

.process-compact-list li {
    display: grid;
    gap: .2rem;
    padding-bottom: .6rem;
    border-bottom: 1px solid var(--border, #d8e0ec);
}

.process-timeline-list {
    display: grid;
    gap: 0;
}

.process-timeline-item {
    position: relative;
    display: grid;
    grid-template-columns: 1rem minmax(0, 1fr);
    gap: .7rem;
    padding: 0 0 1rem;
}

.process-timeline-item::before {
    content: '';
    position: absolute;
    left: .34rem;
    top: .65rem;
    bottom: -.15rem;
    width: 1px;
    background: var(--border, #d8e0ec);
}

.process-timeline-item:last-child::before {
    display: none;
}

.process-timeline-dot {
    position: relative;
    z-index: 1;
    width: .7rem;
    height: .7rem;
    margin-top: .25rem;
    border-radius: 999px;
    background: var(--primary, #2563eb);
}

.process-timeline-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .65rem;
}

.process-timeline-item p {
    margin: .25rem 0;
}

@media (max-width: 860px) {
    .process-transparency-grid {
        grid-template-columns: 1fr;
    }

    .process-related-item,
    .process-timeline-heading {
        align-items: flex-start;
        flex-direction: column;
    }
}

/* Recipe revision lifecycle: make the governed status transition obvious without exposing raw status edits. */
.recipe-status-workflow{scroll-margin-top:6.5rem}
.recipe-status-steps{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:.75rem;margin-top:1rem}
.recipe-status-step{display:flex;align-items:center;gap:.75rem;min-height:72px;padding:.8rem .9rem;border:1px solid var(--border-color,#d8dee8);border-radius:12px;background:var(--surface,#fff)}
.recipe-status-step__number{display:grid;place-items:center;flex:0 0 30px;height:30px;border-radius:999px;border:1px solid currentColor;font-weight:700}
.recipe-status-step div{display:grid;gap:.15rem;min-width:0}.recipe-status-step small{opacity:.72}
.recipe-status-step.is-complete{border-color:color-mix(in srgb,currentColor 24%,transparent)}
.recipe-status-step.is-current{border-width:2px;box-shadow:0 0 0 3px color-mix(in srgb,currentColor 7%,transparent)}
.recipe-next-action{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding-top:.9rem;border-top:1px solid var(--border-color,#d8dee8)}
.recipe-next-action p{margin:.2rem 0 0}.recipe-next-action .actions-row{justify-content:flex-end}
@media (max-width:980px){.recipe-status-steps{grid-template-columns:repeat(2,minmax(0,1fr))}.recipe-next-action{align-items:flex-start;flex-direction:column}.recipe-next-action .actions-row{justify-content:flex-start}}
@media (max-width:620px){.recipe-status-steps{grid-template-columns:1fr}}

/* Recipe/BOM editor: task-focused editing without the full Production workspace chrome. */
.recipe-editor{max-width:1240px;margin:0 auto;padding-bottom:5.5rem}
.recipe-editor__header{align-items:flex-start}
.recipe-editor__form{display:grid;gap:1rem}
.recipe-editor__jump{display:flex;gap:.45rem;flex-wrap:wrap;position:sticky;top:.5rem;z-index:8;padding:.55rem;border:1px solid var(--border,#d8e0ec);border-radius:.85rem;background:color-mix(in srgb,var(--surface,#fff) 94%,transparent);backdrop-filter:blur(8px)}
.recipe-editor__jump a{display:inline-flex;align-items:center;min-height:36px;padding:.45rem .72rem;border-radius:.65rem;text-decoration:none;font-weight:700}
.recipe-editor__jump a:hover,.recipe-editor__jump a:focus-visible{background:var(--surface-soft,#f3f6fb)}
.recipe-editor__section{scroll-margin-top:5.5rem}
.recipe-editor__section-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:1rem;margin-bottom:1rem}
.recipe-editor__section-heading h2,.recipe-editor__section-heading p{margin-top:0}
.recipe-editor__result-grid,.recipe-editor__process-selectors{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.9rem}
.recipe-editor__result-grid .wide,.recipe-editor__process-selectors .wide{grid-column:1/-1}
.recipe-editor__status{display:flex;align-items:center;justify-content:space-between;gap:.8rem;flex-wrap:wrap}
.recipe-editor__locked{max-width:780px;margin:1rem auto}
.recipe-material-list{display:grid;gap:.8rem}
.recipe-material-card{border:1px solid var(--border,#d8e0ec);border-radius:.9rem;background:var(--surface,#fff);overflow:hidden}
.recipe-material-card__top{display:grid;grid-template-columns:42px minmax(240px,1.7fr) 120px 110px minmax(170px,.9fr) auto;gap:.7rem;align-items:end;padding:.85rem}
.recipe-material-card__number{display:grid;place-items:center;width:32px;height:32px;border-radius:999px;background:var(--surface-soft,#eef3fa);font-weight:800;align-self:center}
.recipe-material-card__product,.recipe-material-card__stage{min-width:0}
.recipe-material-card__remove{align-self:end}
.recipe-material-card__details{padding:0 .85rem .85rem}
.recipe-material-card__details>summary{cursor:pointer;font-weight:700;color:var(--text-muted,#64748b);padding:.4rem 0}
.recipe-material-card__detail-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:.75rem;padding-top:.7rem}
.recipe-process-list{display:grid;gap:.8rem;margin-top:1rem}
.recipe-process-step{display:grid;grid-template-columns:46px minmax(0,1fr);gap:.85rem;padding:.9rem;border:1px solid var(--border,#d8e0ec);border-radius:.9rem;background:var(--surface,#fff)}
.recipe-process-step__sequence{display:grid;place-items:center;width:38px;height:38px;border-radius:999px;background:var(--surface-soft,#eef3fa);font-weight:800}
.recipe-process-step__body{min-width:0}
.recipe-process-step__heading{display:flex;align-items:flex-start;justify-content:space-between;gap:.75rem;flex-wrap:wrap}
.recipe-process-step__heading h3{margin:0}
.recipe-process-step__instruction{margin:.65rem 0 0;padding:.65rem .75rem;border-radius:.65rem;background:var(--surface-soft,#f5f7fb)}
.recipe-process-parameters{margin-top:.8rem;padding-top:.8rem;border-top:1px solid var(--border,#d8e0ec)}
.recipe-process-parameters__title{display:flex;align-items:flex-start;justify-content:space-between;gap:.75rem;flex-wrap:wrap;margin-bottom:.65rem}
.recipe-process-parameters__title small{max-width:650px}
.recipe-process-parameters__grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(250px,1fr));gap:.7rem}
.recipe-process-parameter{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.55rem;padding:.7rem;border:1px solid var(--border,#d8e0ec);border-radius:.7rem;background:var(--surface-soft,#f8fafc)}
.recipe-process-parameter__label{grid-column:1/-1;display:flex;align-items:center;justify-content:space-between;gap:.6rem;font-weight:700}
.recipe-reference-toggle{grid-column:1/-1;display:flex;align-items:flex-start;gap:.5rem;font-size:.9rem;color:var(--text-muted,#64748b)}
.recipe-reference-toggle input{margin-top:.18rem}
.recipe-route-parameters{margin-top:.7rem;display:flex;gap:.45rem;flex-wrap:wrap;align-items:center}
.recipe-editor__process-empty{padding:1rem;border:1px dashed var(--border,#d8e0ec);border-radius:.8rem}
.recipe-editor__advanced{border:1px solid var(--border,#d8e0ec);border-radius:.85rem;background:var(--surface,#fff)}
.recipe-editor__advanced>summary{cursor:pointer;padding:.85rem 1rem;font-weight:800}
.recipe-editor__advanced-body{padding:0 1rem 1rem}
.recipe-editor__actionbar{position:sticky;bottom:.6rem;z-index:12;display:flex;align-items:center;justify-content:flex-end;gap:.6rem;flex-wrap:wrap;margin-top:1rem;padding:.75rem;border:1px solid var(--border,#d8e0ec);border-radius:.9rem;background:color-mix(in srgb,var(--surface,#fff) 96%,transparent);box-shadow:0 10px 30px rgba(15,23,42,.12);backdrop-filter:blur(10px)}
.recipe-simple-status__main{display:flex;align-items:center;justify-content:space-between;gap:1rem}
.recipe-simple-status__main h2{margin:.5rem 0 .25rem;font-size:1.05rem}
.recipe-simple-status__main p{margin:0}
.recipe-simple-status__flow{display:flex;align-items:center;gap:.45rem;flex-wrap:wrap;font-size:.9rem;font-weight:700}
.recipe-simple-status__flow span{padding:.45rem .6rem;border-radius:999px;background:var(--surface-soft,#eef3fa)}
.recipe-simple-status__flow .is-complete,.recipe-simple-status__flow .is-ready{border:1px solid color-mix(in srgb,currentColor 25%,transparent)}
.recipe-simple-status__flow .is-blocked{opacity:.7}
.recipe-index__guidance p{margin:.25rem 0 0}

@media (max-width:1000px){
    .recipe-material-card__top{grid-template-columns:42px minmax(230px,1fr) 110px 100px}
    .recipe-material-card__stage{grid-column:2/4}.recipe-material-card__remove{grid-column:4}
}
@media (max-width:760px){
    .recipe-editor{padding-bottom:7rem}.recipe-editor__jump{position:static}
    .recipe-editor__result-grid,.recipe-editor__process-selectors{grid-template-columns:1fr}
    .recipe-editor__result-grid .wide,.recipe-editor__process-selectors .wide{grid-column:auto}
    .recipe-material-card__top{grid-template-columns:36px minmax(0,1fr)}
    .recipe-material-card__number{grid-row:1}.recipe-material-card__product{grid-column:2}
    .recipe-material-card__top>.field:not(.recipe-material-card__product),.recipe-material-card__stage{grid-column:2}
    .recipe-material-card__remove{grid-column:2;justify-self:start}
    .recipe-process-step{grid-template-columns:36px minmax(0,1fr)}
    .recipe-process-step__sequence{width:32px;height:32px}
    .recipe-process-parameter{grid-template-columns:1fr}
    .recipe-process-parameter__label,.recipe-reference-toggle{grid-column:1}
    .recipe-simple-status__main{align-items:flex-start;flex-direction:column}
    .recipe-editor__actionbar{bottom:.35rem}.recipe-editor__actionbar .btn{flex:1 1 auto}
}

/* Approval fallback confirmation: global, explicit, audit-safe. */
.approval-fallback-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: grid;
    place-items: center;
    padding: 1.25rem;
    background: color-mix(in srgb, #111827 52%, transparent);
    backdrop-filter: blur(2px);
}

.approval-fallback-modal {
    width: min(42rem, 100%);
    max-height: min(42rem, calc(100vh - 2.5rem));
    overflow: auto;
    background: var(--surface, #fff);
    border: 1px solid var(--border-color, #d7deea);
    border-radius: 1rem;
    box-shadow: 0 24px 80px rgb(15 23 42 / 28%);
    padding: 1.25rem;
}

.approval-fallback-modal .button-cluster.justify-end {
    justify-content: flex-end;
}

@media (max-width: 640px) {
    .approval-fallback-backdrop { padding: .75rem; align-items: end; }
    .approval-fallback-modal { width: 100%; max-height: 85vh; border-radius: 1rem 1rem .5rem .5rem; }
    .approval-fallback-modal .button-cluster { display: grid; grid-template-columns: 1fr; }
}

/* Operational configuration preset workspace */
.operational-preset-profile-grid,
.operational-preset-module-grid,
.operational-preset-summary-grid,
.operational-preset-parameter-grid,
.operational-preset-workflow-grid,
.operational-preset-impact-grid {
    display: grid;
    gap: 1rem;
}
.operational-preset-profile-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: 1.25rem; }
.operational-preset-module-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.operational-preset-summary-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.operational-preset-parameter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.operational-preset-workflow-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.operational-preset-impact-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 1rem; }
.operational-preset-profile,
.operational-preset-module,
.operational-preset-choice,
.operational-preset-confirmation {
    display: flex;
    gap: .75rem;
    border: 1px solid var(--border-color, #d7dfeb);
    border-radius: .85rem;
    padding: 1rem;
    background: var(--surface, #fff);
    cursor: pointer;
}
.operational-preset-profile,
.operational-preset-module { flex-direction: column; }
.operational-preset-profile.is-selected,
.operational-preset-module.is-selected,
.operational-preset-choice.is-selected {
    border-color: var(--primary, #2563eb);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--primary, #2563eb) 12%, transparent);
}
.operational-preset-profile__heading,
.operational-preset-module__heading { display: flex; align-items: center; gap: .6rem; }
.operational-preset-reconciliation { display: grid; gap: .75rem; margin-top: 1.25rem; }
.operational-preset-choice { align-items: flex-start; }
.operational-preset-choice span { display: grid; gap: .25rem; }
.operational-preset-preview-action { margin-top: 1.25rem; align-items: center; }
.operational-preset-pending-table { margin-top: 1rem; }
.operational-preset-confirmation { align-items: flex-start; margin-bottom: 1rem; font-weight: 650; }
.operational-preset-apply-panel { border-top: 3px solid var(--primary, #2563eb); }
.operational-preset-page .warning-card { border-color: #f0b44d; }
.operational-preset-page .input-group { display: flex; align-items: stretch; }
.operational-preset-page .input-prefix { display: inline-flex; align-items: center; padding: 0 .75rem; border: 1px solid var(--border-color, #d7dfeb); border-right: 0; border-radius: .55rem 0 0 .55rem; background: var(--surface-muted, #f5f7fb); }
.operational-preset-page .input-group .form-control { border-radius: 0 .55rem .55rem 0; }
.operational-preset-page .d-block { display: block; }
.operational-preset-page .alert.compact { padding: .65rem .8rem; }
.operational-preset-page .flow-preview-list.compact { margin-top: .75rem; }
@media (max-width: 1100px) {
    .operational-preset-profile-grid,
    .operational-preset-module-grid,
    .operational-preset-workflow-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .operational-preset-summary-grid,
    .operational-preset-impact-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
    .operational-preset-profile-grid,
    .operational-preset-module-grid,
    .operational-preset-summary-grid,
    .operational-preset-parameter-grid,
    .operational-preset-workflow-grid,
    .operational-preset-impact-grid { grid-template-columns: 1fr; }
}

/* Company operational readiness advisor */
.operational-readiness-page{--or-gap:14px}.operational-readiness-title-row{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.operational-readiness-hero .compact-copy{margin-top:6px}.operational-readiness-summary-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:12px}.operational-readiness-summary-grid .info-card{min-height:96px}.readiness-score-card{grid-column:span 1}.readiness-progress{height:7px;border-radius:999px;background:var(--surface-soft,#edf2f7);overflow:hidden;margin-top:10px}.readiness-progress>span{display:block;height:100%;background:currentColor;opacity:.72}.operational-readiness-filter-layout{display:grid;grid-template-columns:minmax(0,1fr) 220px;gap:16px;align-items:start}.operational-readiness-module-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-top:10px}.operational-readiness-module-choice{display:flex;gap:10px;align-items:flex-start;border:1px solid var(--border,#d7dfeb);border-radius:12px;padding:12px;background:var(--surface,#fff);cursor:pointer}.operational-readiness-module-choice.is-selected{border-color:var(--primary,#2563eb);box-shadow:0 0 0 1px color-mix(in srgb,var(--primary,#2563eb) 18%,transparent)}.operational-readiness-module-choice span{display:grid;gap:3px}.operational-readiness-module-choice small{color:var(--muted,#667085);line-height:1.35}.compact-actions{justify-content:flex-start}.operational-readiness-module-list{display:grid;gap:14px}.operational-readiness-module-score{display:grid;text-align:right}.operational-readiness-module-score strong{font-size:1.35rem}.operational-readiness-module-score small{color:var(--muted,#667085)}.operational-readiness-check-list{display:grid;gap:8px}.operational-readiness-check{display:grid;grid-template-columns:120px minmax(0,1fr) auto;gap:12px;align-items:start;border:1px solid var(--border,#d7dfeb);border-radius:12px;padding:12px 14px;background:var(--surface,#fff)}.operational-readiness-check.is-warning{background:color-mix(in srgb,#f59e0b 5%,var(--surface,#fff))}.operational-readiness-check.is-blocker{background:color-mix(in srgb,#ef4444 5%,var(--surface,#fff))}.operational-readiness-check.is-waived{opacity:.86;background:var(--surface-soft,#f7f9fc)}.operational-readiness-check__body p{margin:4px 0 6px;line-height:1.45}.operational-readiness-check__body small{display:block;color:var(--muted,#667085)}.operational-readiness-check__actions{display:flex;gap:6px;justify-content:flex-end;flex-wrap:wrap}.readiness-waiver-note{margin-top:8px;padding:8px 10px;border-radius:8px;background:var(--surface-soft,#edf2f7);font-size:.9rem}.operational-readiness-waiver-grid{display:grid;grid-template-columns:minmax(0,2fr) minmax(180px,1fr);gap:14px}.operational-readiness-waiver-panel{border-left:4px solid var(--warning,#f59e0b)}
@media (max-width:1100px){.operational-readiness-summary-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.operational-readiness-module-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.operational-readiness-filter-layout{grid-template-columns:1fr}.operational-readiness-status-filter{max-width:320px}.operational-readiness-check{grid-template-columns:100px minmax(0,1fr)}}
@media (max-width:720px){.operational-readiness-summary-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.operational-readiness-module-grid{grid-template-columns:1fr}.operational-readiness-check{grid-template-columns:1fr}.operational-readiness-check__actions{justify-content:flex-start}.operational-readiness-waiver-grid{grid-template-columns:1fr}.operational-readiness-module-score{text-align:left}}


/* Focused Recipe/BOM maintenance. Livewire navigate can preserve outer layout DOM,
   so hide production dashboard chrome whenever the recipe editor is actually present,
   not only when the first HTTP request route name matches. */
body.recipe-editor-shell .module-kpi-strip,
body.recipe-editor-shell [data-production-workspace],
body:has([data-recipe-editor]) .module-kpi-strip,
body:has([data-recipe-editor]) [data-production-workspace] {
    display: none !important;
}
body.recipe-editor-shell .content-body,
body:has([data-recipe-editor]) .content-body {
    padding-top: .75rem;
}
.recipe-editor {
    max-width: 1120px;
}
.recipe-editor__header {
    position: relative;
    padding: 1rem 1.1rem;
}
.recipe-editor__header-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: .55rem;
    flex-wrap: wrap;
}
.recipe-editor__header-copy {
    max-width: 720px;
}
.recipe-editor__header .eyebrow {
    margin-bottom: .2rem;
}
.recipe-editor__header h1 {
    margin: .1rem 0 .25rem;
}
.recipe-editor__header p {
    margin: 0;
}
.recipe-editor__section {
    padding: 1rem 1.1rem;
}
.recipe-editor__section .section-heading {
    margin-bottom: .8rem;
}
.recipe-editor__draft-note {
    display: flex;
    gap: .5rem;
    align-items: flex-start;
    margin-top: .7rem;
    padding: .65rem .75rem;
    border-radius: .65rem;
    background: var(--surface-soft,#f5f7fb);
    color: var(--text-muted,#64748b);
    font-size: .9rem;
}
.recipe-editor__draft-note strong {
    color: var(--text,#111827);
}
.recipe-editor__save-error {
    margin-bottom: .75rem;
}
.recipe-editor__jump {
    top: .35rem;
    padding: .4rem;
}
.recipe-editor__jump a {
    min-height: 32px;
    padding: .35rem .62rem;
}
.recipe-material-card__top {
    padding: .7rem .8rem;
}
.recipe-material-card__details {
    padding: 0 .8rem .7rem;
}
.recipe-process-step {
    padding: .75rem;
}
@media (max-width: 760px) {
    .recipe-editor__header-actions {
        width: 100%;
        justify-content: stretch;
    }
    .recipe-editor__header-actions .btn {
        flex: 1 1 auto;
    }
}

/* Recipe/BOM editor — align create/edit with the standard ERP show/form shell. */
.recipe-editor {
    width: 100%;
    max-width: none;
    margin: 0;
    padding-bottom: 6.75rem;
}
.recipe-editor__header {
    width: 100%;
    padding: 1.15rem 1.3rem;
}
.recipe-editor__header-copy {
    max-width: 760px;
}
.recipe-editor__header-meta {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: .65rem;
    flex-wrap: wrap;
}
.recipe-editor__status {
    justify-content: flex-end;
}
.recipe-editor__tabs {
    width: 100%;
    margin: 0;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scrollbar-width: thin;
}
.recipe-editor__tabs a {
    flex: 0 0 auto;
    white-space: nowrap;
}
.recipe-editor__form {
    width: 100%;
    gap: 1rem;
}
.recipe-editor__section {
    width: 100%;
    padding: 1.15rem 1.3rem;
}
.recipe-editor__section .section-heading.compact {
    margin-bottom: 1rem;
}
.recipe-editor__result-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    column-gap: 1rem;
    row-gap: .9rem;
}
.recipe-editor__process-selectors {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    column-gap: 1rem;
    row-gap: .9rem;
}
.recipe-editor__result-grid .wide,
.recipe-editor__process-selectors .wide {
    grid-column: 1 / -1;
}
.recipe-material-card {
    box-shadow: 0 1px 0 rgb(15 23 42 / 3%);
}
.recipe-material-card__top {
    grid-template-columns: 38px minmax(260px, 1.75fr) minmax(105px, .55fr) minmax(105px, .55fr) minmax(180px, .85fr) auto;
    gap: .8rem;
    padding: .85rem .9rem;
}
.recipe-material-card__details {
    padding: 0 .9rem .85rem;
    border-top: 1px solid transparent;
}
.recipe-material-card__details[open] {
    border-top-color: var(--border,#d8e0ec);
    background: color-mix(in srgb, var(--surface-soft,#f5f7fb) 55%, var(--surface,#fff));
}
.recipe-material-card__details > summary {
    padding-top: .7rem;
}
.recipe-process-step {
    padding: .9rem 1rem;
}
.recipe-editor__advanced > summary {
    display: grid;
    gap: .2rem;
}
.recipe-editor__advanced > summary span {
    color: var(--text-muted,#64748b);
    font-size: .9rem;
    font-weight: 500;
}
.recipe-editor__actionbar {
    width: 100%;
    bottom: .75rem;
    padding: .8rem .95rem;
    justify-content: space-between;
    border-radius: 1rem;
}
.recipe-editor__actionbar > div:first-child {
    display: grid;
    gap: .15rem;
    min-width: 220px;
}
.recipe-editor__actionbar > div:first-child small {
    color: var(--text-muted,#64748b);
}
@media (max-width: 1180px) {
    .recipe-editor__result-grid,
    .recipe-editor__process-selectors {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .recipe-material-card__top {
        grid-template-columns: 38px minmax(230px, 1fr) 110px 105px;
    }
    .recipe-material-card__stage {
        grid-column: 2 / 4;
    }
    .recipe-material-card__remove {
        grid-column: 4;
    }
}
@media (max-width: 760px) {
    .recipe-editor {
        padding-bottom: 8rem;
    }
    .recipe-editor__header {
        padding: 1rem;
    }
    .recipe-editor__header-meta {
        width: 100%;
        justify-content: space-between;
    }
    .recipe-editor__tabs {
        position: static;
    }
    .recipe-editor__section {
        padding: 1rem;
    }
    .recipe-editor__result-grid,
    .recipe-editor__process-selectors {
        grid-template-columns: 1fr;
    }
    .recipe-editor__result-grid .wide,
    .recipe-editor__process-selectors .wide {
        grid-column: auto;
    }
    .recipe-editor__actionbar {
        bottom: .35rem;
        align-items: stretch;
    }
    .recipe-editor__actionbar > div:first-child {
        width: 100%;
    }
    .recipe-editor__actionbar .actions-row {
        width: 100%;
    }
    .recipe-editor__actionbar .btn {
        flex: 1 1 0;
    }
}

/* Kiosk/focus mode for shop-floor touchscreens (Pusat Kerja Lini): hides every
   shell chrome element and lets only the page's own content fill the screen.
   Structural selectors so this stays correct even if partials inside
   .content-shell change — only .content-body is ever allowed through. */
.kiosk-shell .sidebar { display: none !important; }
.kiosk-shell .app-shell { grid-template-columns: 1fr; }
/* .kiosk-shell repeated: some chrome partials (e.g. the sticky module navbar in
   ui-responsive-support.css) carry two attribute selectors on top of their own
   class, tying this rule's specificity — repeating the class here breaks that
   tie in our favor regardless of which stylesheet loads last. */
.kiosk-shell.kiosk-shell .content-shell > *:not(.content-body) { display: none !important; }
.kiosk-shell .content-shell { padding: 0; }
.kiosk-shell .content-body { padding: 0; max-width: 100%; }

/* Production SPK managerial command center. This is a role-aware read-only
   projection of existing operational evidence, not a second workflow/status
   system. Keep manager scanning fast: current position first, exceptions next,
   lifecycle chronological, line responsibility grouped by line. */
.production-command-center {
    display: grid;
    gap: 1rem;
    border-top: .25rem solid var(--primary, #2563eb);
}

.production-command-center__heading {
    margin-bottom: 0;
}

.production-command-center__status {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: .5rem;
}

.production-command-center__snapshot {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: .75rem;
}

.production-command-center__snapshot > article {
    display: grid;
    min-width: 0;
    gap: .25rem;
    padding: .85rem 1rem;
    border: 1px solid var(--border-color, #d8dde6);
    border-radius: var(--radius, .75rem);
    background: var(--surface-soft, #f8fafc);
}

.production-command-center__snapshot > article > span,
.production-line-responsibility-meta span {
    color: var(--text-muted, #64748b);
    font-size: .78rem;
    font-weight: 750;
    letter-spacing: .025em;
    text-transform: uppercase;
}

.production-command-center__snapshot > article > strong {
    overflow-wrap: anywhere;
    font-size: 1.02rem;
}

.production-command-center__snapshot > article > small {
    color: var(--text-muted, #64748b);
    line-height: 1.45;
}

.production-command-center__snapshot > .production-command-center__next-action {
    grid-column: span 2;
    border-color: color-mix(in srgb, var(--primary, #2563eb) 35%, var(--border-color, #d8dde6));
    background: color-mix(in srgb, var(--primary, #2563eb) 6%, white);
}

.production-command-center__blockers {
    display: grid;
    gap: .75rem;
    padding: 1rem;
    border: 1px solid #e5b1b1;
    border-radius: var(--radius, .75rem);
    background: #fff8f8;
}

.production-command-center__blockers h3 {
    margin: .1rem 0 0;
}

.production-command-center__blocker-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr));
    gap: .65rem;
}

.production-command-center__blocker {
    display: grid;
    gap: .25rem;
    padding: .75rem .85rem;
    border: 1px solid var(--border-color, #d8dde6);
    border-left: .3rem solid #b56a00;
    border-radius: .65rem;
    background: white;
}

.production-command-center__blocker.tone-danger {
    border-left-color: #c62828;
}

.production-command-center__blocker span,
.production-command-center__blocker small {
    color: var(--text-muted, #64748b);
}

.production-command-center__timeline {
    padding: .8rem 1rem;
    border: 1px solid var(--border-color, #d8dde6);
    border-radius: var(--radius, .75rem);
    background: white;
}

.production-command-center__timeline > summary {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: .3rem .65rem;
    cursor: pointer;
}

.production-command-center__timeline > summary span {
    color: var(--text-muted, #64748b);
}

.production-manager-timeline {
    position: relative;
    display: grid;
    gap: 0;
    margin: 1rem 0;
    padding: 0;
    list-style: none;
}

.production-manager-timeline > li {
    position: relative;
    display: grid;
    grid-template-columns: 1.1rem minmax(0, 1fr);
    gap: .75rem;
    padding: 0 0 1rem;
}

.production-manager-timeline > li:not(:last-child)::before {
    content: '';
    position: absolute;
    top: .9rem;
    bottom: -.1rem;
    left: .48rem;
    width: 2px;
    background: var(--border-color, #d8dde6);
}

.production-manager-timeline__marker {
    z-index: 1;
    width: 1rem;
    height: 1rem;
    margin-top: .2rem;
    border: 3px solid white;
    border-radius: 50%;
    background: #2563eb;
    box-shadow: 0 0 0 1px #2563eb;
}

.production-manager-timeline > li.tone-success .production-manager-timeline__marker {
    background: #17843b;
    box-shadow: 0 0 0 1px #17843b;
}

.production-manager-timeline > li.tone-warning .production-manager-timeline__marker {
    background: #b56a00;
    box-shadow: 0 0 0 1px #b56a00;
}

.production-manager-timeline > li.tone-danger .production-manager-timeline__marker {
    background: #c62828;
    box-shadow: 0 0 0 1px #c62828;
}

.production-manager-timeline__body {
    display: grid;
    min-width: 0;
    gap: .2rem;
}

.production-manager-timeline__body time {
    color: var(--text-muted, #64748b);
    font-size: .78rem;
    font-weight: 700;
}

.production-manager-timeline__body > span {
    color: var(--text-muted, #64748b);
    overflow-wrap: anywhere;
}

.production-manager-timeline__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .4rem .7rem;
}

.production-manager-timeline__meta small {
    color: var(--text-muted, #64748b);
}

.production-line-responsibility-panel {
    display: grid;
    gap: .9rem;
    margin-bottom: 1rem;
    padding: 1rem;
    border: 1px solid var(--border-color, #d8dde6);
    border-radius: var(--radius, .75rem);
    background: var(--surface-soft, #f8fafc);
}

.production-line-responsibility-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 24rem), 1fr));
    gap: .8rem;
}

.production-line-responsibility-card {
    display: grid;
    min-width: 0;
    gap: .8rem;
    padding: 1rem;
    border: 1px solid var(--border-color, #d8dde6);
    border-radius: var(--radius, .75rem);
    background: white;
}

.production-line-responsibility-card > header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: .75rem;
}

.production-line-responsibility-card h4 {
    margin: .1rem 0 0;
    overflow-wrap: anywhere;
}

.production-line-responsibility-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .55rem;
}

.production-line-responsibility-meta > div {
    display: grid;
    min-width: 0;
    gap: .15rem;
}

.production-line-responsibility-meta strong {
    overflow-wrap: anywhere;
}

.production-line-responsibility-users {
    display: grid;
    gap: .45rem;
    padding-top: .65rem;
    border-top: 1px solid var(--border-color, #d8dde6);
}

.production-line-responsibility-user {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: .5rem .75rem;
    padding: .45rem 0;
}

.production-line-responsibility-user > div {
    display: grid;
    min-width: 0;
}

.production-line-responsibility-user small {
    color: var(--text-muted, #64748b);
}

.production-line-responsibility-actions {
    margin-top: auto;
}

.production-line-responsibility-note {
    margin: 0;
    font-size: .85rem;
}

@media (max-width: 1100px) {
    .production-command-center__snapshot {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 680px) {
    .production-command-center__snapshot,
    .production-line-responsibility-meta {
        grid-template-columns: 1fr;
    }

    .production-command-center__snapshot > .production-command-center__next-action {
        grid-column: auto;
    }

    .production-command-center__status,
    .production-command-center__status > *,
    .production-line-responsibility-actions,
    .production-line-responsibility-actions > * {
        width: 100%;
    }
}

/* Production information architecture: keep the full module map on the production dashboard only. */
.production-workspace--compact{
  padding:0;
  overflow:hidden;
}
.production-workspace--compact .production-workspace__compact-summary{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  min-height:44px;
  padding:8px 12px;
  cursor:pointer;
  list-style:none;
}
.production-workspace--compact .production-workspace__compact-summary::-webkit-details-marker{display:none}
.production-workspace--compact .production-workspace__compact-summary>span:first-child{display:flex;align-items:center;gap:8px;min-width:0}
.production-workspace--compact .production-workspace__compact-summary strong{font-size:.86rem}
.production-workspace--compact .production-workspace__compact-summary small,
.production-workspace--compact .production-workspace__compact-hint{color:var(--muted);font-size:.75rem}
.production-workspace--compact[open] .production-workspace__compact-summary{border-bottom:1px solid var(--line)}
.production-workspace--compact .production-workspace__groups{padding:8px 10px 10px}
.production-summary-guidance>summary,
.production-flow-transparency>summary{display:flex;justify-content:space-between;gap:12px;align-items:center;cursor:pointer}
.production-summary-guidance>summary span,
.production-flow-transparency>summary span{color:var(--muted);font-size:.82rem}
@media (max-width:720px){
  .production-workspace--compact .production-workspace__compact-hint{display:none}
  .production-summary-guidance>summary,
  .production-flow-transparency>summary{align-items:flex-start;flex-direction:column;gap:4px}
}

/* Production workspace launcher: keep task navigation available without repeating a large
   "Pelaksanaan SPK / Eksekusi Line" panel on every production page. */
.production-workspace--launcher{
  display:flex;align-items:center;justify-content:space-between;gap:12px;
  padding:7px 10px;margin-bottom:9px;border-radius:10px;background:var(--panel);
}
.production-workspace__launcher-context{display:flex;align-items:center;gap:10px;min-width:0}
.production-workspace__launcher-context>small{color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:58vw}
.production-workspace__launcher-label{display:flex;align-items:center;gap:6px;white-space:nowrap;color:var(--text)}
.production-workspace__launcher-label>span:last-child{color:var(--muted);font-weight:700}
.production-workspace__launcher-actions{display:flex;align-items:center;gap:6px;flex:0 0 auto}
.production-workspace__launcher-menu{position:relative}
.production-workspace__launcher-menu>summary{list-style:none;cursor:pointer}
.production-workspace__launcher-menu>summary::-webkit-details-marker{display:none}
.production-workspace__launcher-panel{
  position:absolute;right:0;top:calc(100% + 7px);z-index:50;display:grid;grid-template-columns:repeat(2,minmax(190px,1fr));
  gap:8px;width:min(620px,82vw);padding:10px;border:1px solid var(--line);border-radius:12px;background:var(--panel);
  box-shadow:0 14px 36px rgba(15,23,42,.16)
}
.production-workspace__launcher-panel .production-workspace__group{min-width:0}
@media (max-width:760px){
  .production-workspace--launcher{align-items:flex-start;flex-direction:column}
  .production-workspace__launcher-context{display:grid;gap:2px}
  .production-workspace__launcher-context>small{max-width:100%;white-space:normal}
  .production-workspace__launcher-actions{width:100%;justify-content:flex-end}
  .production-workspace__launcher-panel{position:fixed;left:12px;right:12px;top:auto;width:auto;grid-template-columns:1fr;max-height:70vh;overflow:auto}
}

/* Production order show: one-screen hierarchy first, operational detail behind tabs. */
.production-command-center__snapshot--focused{grid-template-columns:repeat(3,minmax(0,1fr))}
.production-order-overview-grid{grid-template-columns:repeat(4,minmax(0,1fr))}
.production-order-overview-details>summary{cursor:pointer}
.production-handoff-control{margin:0 0 16px;padding:12px;border:1px solid var(--line);border-radius:12px;background:var(--panel-soft)}
.production-output-entry .form-grid{align-items:start}
@media (max-width:1100px){
  .production-order-overview-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .production-command-center__snapshot--focused{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media (max-width:680px){
  .production-order-overview-grid,.production-command-center__snapshot--focused{grid-template-columns:1fr}
}

/* Production supply orchestration: compact end-to-end story above the detailed
   evidence table so PPIC/Production can see where a shortage currently sits. */
.production-module-shell .production-supply-flow {
    display:grid;
    grid-template-columns:repeat(6,minmax(0,1fr));
    gap:.5rem;
}
.production-module-shell .production-supply-flow-step {
    display:grid;
    grid-template-columns:auto minmax(0,1fr);
    gap:.5rem;
    align-items:center;
    min-width:0;
    padding:.65rem .7rem;
    border:1px solid var(--border);
    border-radius:.65rem;
    background:var(--surface);
}
.production-module-shell .production-supply-flow-step>span {
    display:grid;
    place-items:center;
    width:1.75rem;
    height:1.75rem;
    border-radius:999px;
    background:var(--surface-2,#f1f5f9);
    font-weight:800;
}
.production-module-shell .production-supply-flow-step strong,
.production-module-shell .production-supply-flow-step small {display:block;line-height:1.25}
.production-module-shell .production-supply-flow-step small {margin-top:.15rem;color:var(--muted);font-size:.75rem}
.production-module-shell .production-supply-flow-step.is-active {border-color:#93c5fd;background:#eff6ff}
.production-module-shell .production-supply-flow-step.is-active>span {background:#2563eb;color:#fff}
.production-module-shell .production-supply-flow-step.is-done {border-color:#86efac;background:#f0fdf4}
.production-module-shell .production-supply-flow-step.is-done>span {background:#15803d;color:#fff}
.production-module-shell .production-supply-flow-step.is-warning {border-color:#fcd34d;background:#fffbeb}
@media(max-width:1150px){.production-module-shell .production-supply-flow{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:700px){.production-module-shell .production-supply-flow{grid-template-columns:1fr}}

/* Production list/WIP guidance belongs to the shared application stylesheet;
   line-display-only styling remains in production-execution.css. */
.production-module-shell .production-order-role-guide{display:grid;gap:.9rem}
.production-module-shell .production-order-role-guide .split-header{align-items:start}
.production-module-shell .production-superadmin-reminder{max-width:32rem;margin:0}
.production-module-shell .production-superadmin-reminder span{display:block;margin-top:.25rem}
.production-module-shell .production-role-map{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.55rem}
.production-module-shell .production-role-map>span{padding:.65rem .75rem;border:1px solid var(--border);border-radius:.65rem;background:var(--surface-2,#f8fafc);line-height:1.35}
.production-module-shell .production-current-owner{display:block;margin-top:.35rem;padding-top:.35rem;border-top:1px dashed var(--border)}
.production-module-shell .production-wip-next-step{display:grid;grid-template-columns:minmax(0,1.6fr) minmax(12rem,.75fr) auto;gap:.9rem;align-items:center;padding:.9rem 1rem;border:1px solid #bfdbfe;border-left:.35rem solid #2563eb;border-radius:.75rem;background:#eff6ff}
.production-module-shell .production-wip-next-step>div:not(.production-wip-next-step-actions){display:grid;gap:.2rem}
.production-module-shell .production-wip-next-step small{color:#475569}
.production-module-shell .production-wip-next-step-actions{display:flex;flex-wrap:wrap;gap:.5rem;justify-content:flex-end}
@media(max-width:1000px){.production-module-shell .production-role-map{grid-template-columns:repeat(2,minmax(0,1fr))}.production-module-shell .production-wip-next-step{grid-template-columns:1fr}.production-module-shell .production-wip-next-step-actions{justify-content:flex-start}}
@media(max-width:640px){.production-module-shell .production-role-map{grid-template-columns:1fr}}


.production-order-howto {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .65rem;
}
.production-order-howto > div {
    display: grid;
    grid-template-columns: 2rem minmax(0, 1fr);
    column-gap: .55rem;
    align-items: start;
    padding: .7rem .8rem;
    border: 1px solid var(--border-color, #d7e0ea);
    border-radius: .7rem;
    background: var(--surface-subtle, #f8fafc);
}
.production-order-howto > div > span {
    grid-row: 1 / span 2;
    display: grid;
    width: 2rem;
    height: 2rem;
    place-items: center;
    border-radius: 50%;
    background: #dbeafe;
    color: #1d4ed8;
    font-weight: 900;
}
.production-order-howto strong { line-height: 1.25; }
.production-order-howto small { margin-top: .2rem; color: #64748b; line-height: 1.35; }
.production-role-guide-details { margin-top: .15rem; }
.production-role-guide-details > summary { cursor: pointer; font-weight: 800; color: #334155; }
.production-role-guide-details[open] > summary { margin-bottom: .65rem; }
@media (max-width: 900px) {
    .production-order-howto { grid-template-columns: 1fr; }
}

/* Production order index primary-work hierarchy */
.production-module-shell .production-order-view-switch{
  display:flex;
  justify-content:flex-start;
  align-items:center;
  margin:0;
}
.production-module-shell .production-order-primary-work{
  display:grid;
  gap:14px;
  border-color:#cbd5e1;
}
.production-module-shell .production-order-priority-strip{
  display:grid;
  grid-template-columns:repeat(5,minmax(0,1fr));
  gap:8px;
}
.production-module-shell .production-order-priority-chip{
  min-width:0;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:9px 11px;
  border:1px solid var(--line,var(--border,#d7e0ea));
  border-radius:11px;
  background:var(--panel-soft,var(--surface-2,#f8fafc));
  color:inherit;
  text-align:left;
  cursor:pointer;
}
.production-module-shell .production-order-priority-chip:hover,
.production-module-shell .production-order-priority-chip:focus-visible{
  border-color:#93c5fd;
  background:#eff6ff;
  outline:none;
}
.production-module-shell .production-order-priority-chip span{
  min-width:0;
  font-size:.78rem;
  font-weight:750;
  line-height:1.25;
  overflow-wrap:anywhere;
}
.production-module-shell .production-order-priority-chip strong{
  flex:0 0 auto;
  font-size:1.05rem;
  line-height:1;
}
.production-module-shell .production-order-priority-chip.is-danger{
  border-color:#fecaca;
  background:#fef2f2;
  color:#991b1b;
}
.production-module-shell .production-order-priority-chip.is-success{
  border-color:#bbf7d0;
  background:#f0fdf4;
  color:#166534;
}
.production-module-shell .production-order-help-details{
  margin-top:2px;
  border-style:dashed;
  background:var(--panel-soft,var(--surface-2,#f8fafc));
}
.production-module-shell .production-order-help-details>summary{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}
.production-module-shell .production-order-help-details>summary small{
  color:var(--muted);
  font-weight:500;
  text-align:right;
}
.production-module-shell .production-order-help-details:not([open])>.production-help-content{
  display:none;
}
@media(max-width:1100px){
  .production-module-shell .production-order-priority-strip{grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media(max-width:720px){
  .production-module-shell .production-order-priority-strip{grid-template-columns:repeat(2,minmax(0,1fr))}
  .production-module-shell .production-order-help-details>summary{align-items:flex-start;flex-direction:column}
  .production-module-shell .production-order-help-details>summary small{text-align:left}
}
@media(max-width:480px){
  .production-module-shell .production-order-priority-strip{grid-template-columns:1fr}
}

/* External partner portal: simple task-first cards without exposing internal ERP mechanics. */
.portal-action-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--space-3, 0.75rem);
}
.portal-action-card {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    min-width: 0;
    padding: 1rem;
    border: 1px solid var(--border-color, #d9dee7);
    border-radius: var(--radius-lg, 0.75rem);
    text-decoration: none;
    background: var(--surface, #fff);
}
.portal-action-card strong,
.portal-action-card span,
[data-external-primary-work] strong,
[data-external-primary-work] p,
[data-external-primary-work] td,
[data-external-primary-work] th {
    overflow-wrap: anywhere;
    word-break: break-word;
}
.portal-action-card:hover { box-shadow: var(--shadow-sm, 0 4px 14px rgba(0,0,0,.08)); }
@media (max-width: 900px) {
    .portal-action-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
    .portal-action-grid { grid-template-columns: 1fr; }
}
