:root {
    --sidebar: 238px;
    --topbar: 62px;
    --bg: #f6f7f9;
    --surface: #ffffff;
    --surface-soft: #fafbfc;
    --sidebar-bg: #0d0f12;
    --sidebar-hover: #181b20;
    --text: #101828;
    --muted: #667085;
    --muted-2: #98a2b3;
    --border: #e4e7ec;
    --border-strong: #d0d5dd;
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --dark: #111827;
    --green: #16a34a;
    --red: #dc2626;
    --amber: #d97706;
    --purple: #7c3aed;
    --cyan: #0891b2;
    --radius: 12px;
    --shadow: 0 1px 2px rgba(16,24,40,.04), 0 1px 3px rgba(16,24,40,.08);
}
* { box-sizing: border-box; }
html { min-height: 100%; }
body {
    margin: 0;
    min-height: 100vh;
    background: var(--bg);
    color: var(--text);
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 14px;
    line-height: 1.45;
}
a { color: inherit; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.icon-svg { display: inline-block; flex: 0 0 auto; }
.app-shell { min-height: 100vh; }
.sidebar {
    width: var(--sidebar);
    position: fixed;
    inset: 0 auto 0 0;
    background: var(--sidebar-bg);
    color: #d5d9e0;
    z-index: 60;
    display: flex;
    flex-direction: column;
    border-right: 1px solid #181b20;
}
.brand-block {
    height: var(--topbar);
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 16px;
    border-bottom: 1px solid rgba(255,255,255,.07);
}
.brand-mark {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: linear-gradient(145deg,#475569,#111827);
    border: 1px solid rgba(255,255,255,.15);
    display: grid;
    place-items: center;
    color: white;
    font-weight: 800;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.14);
}
.brand-name { color: #fff; font-weight: 700; line-height: 1.1; letter-spacing: -.02em; }
.brand-subtitle { font-size: 9px; color: #6f7784; letter-spacing: .13em; margin-top: 3px; font-weight: 700; }
.sidebar-nav { padding: 14px 10px; overflow-y: auto; flex: 1; }
.nav-section-label { color: #5f6672; font-weight: 700; font-size: 9px; letter-spacing: .14em; padding: 15px 10px 7px; }
.nav-section-label:first-child { padding-top: 0; }
.nav-link {
    height: 38px;
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 0 11px;
    margin: 2px 0;
    border-radius: 8px;
    color: #aab1bc;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: .15s ease;
}
.nav-link:hover { background: var(--sidebar-hover); color: #f4f6f8; }
.nav-link.active { background: #1c2026; color: #fff; box-shadow: inset 3px 0 0 #7c8797; }
.nav-icon { width: 19px; display: inline-grid; place-items: center; color: #8b93a0; }
.nav-link.active .nav-icon { color: #fff; }
.sidebar-profile {
    min-height: 72px;
    padding: 13px 14px;
    border-top: 1px solid rgba(255,255,255,.08);
    display: flex;
    align-items: center;
    gap: 10px;
}
.profile-avatar, .top-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: #e5e7eb;
    color: #344054;
    font-size: 11px;
    font-weight: 700;
}
.profile-avatar { background: #48505d; color: #fff; }
.profile-copy { min-width: 0; flex: 1; display: flex; flex-direction: column; }
.profile-copy strong { color: #f8fafc; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.profile-copy span { color: #747d89; font-size: 10px; }
.profile-logout { color: #737c89; display: grid; place-items: center; padding: 5px; border-radius: 6px; }
.profile-logout:hover { color: #fff; background: #1b1e24; }
.main-shell { margin-left: var(--sidebar); min-height: 100vh; }
.topbar {
    height: var(--topbar);
    background: rgba(255,255,255,.96);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 30;
    display: flex;
    align-items: center;
    padding: 0 22px;
    gap: 16px;
}
.top-search {
    width: 265px;
    height: 36px;
    border: 1px solid var(--border);
    background: var(--surface-soft);
    border-radius: 9px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 10px;
    color: var(--muted-2);
}
.top-search input { border: 0; outline: 0; background: transparent; min-width: 0; width: 100%; color: var(--text); font-size: 12px; }
.search-shortcut { border: 1px solid var(--border); border-radius: 5px; padding: 1px 5px; font-size: 9px; color: var(--muted-2); background: #fff; }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 9px; }
.topbar-divider { width: 1px; height: 22px; background: var(--border); margin: 0 2px; }
.icon-button {
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #667085;
    display: inline-grid;
    place-items: center;
    position: relative;
}
.icon-button:hover { background: #f2f4f7; color: #101828; }
.icon-button.has-dot::after { content: ''; position: absolute; right: 6px; top: 5px; width: 6px; height: 6px; border-radius: 50%; background: #ef4444; box-shadow: 0 0 0 2px white; }
.mobile-menu { display: none; }
.page-content { padding: 18px 22px 34px; max-width: 1800px; margin: 0 auto; }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin: 1px 0 18px; }
.page-heading h1 { margin: 0; font-size: 24px; line-height: 1.2; letter-spacing: -.035em; color: #0b0f16; }
.page-heading p { margin: 6px 0 0; color: var(--muted); font-size: 13px; }
.heading-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.button {
    min-height: 36px;
    padding: 8px 13px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    text-decoration: none;
    font-weight: 600;
    border: 1px solid transparent;
    line-height: 1;
    white-space: nowrap;
}
.button-sm { min-height: 32px; padding: 7px 11px; font-size: 12px; }
.button-dark { background: #687180; color: #fff; border-color: #687180; }
.button-dark:hover { background: #535b68; }
.button-primary { background: var(--primary); color: white; border-color: var(--primary); }
.button-primary:hover { background: var(--primary-dark); }
.button-secondary { background: white; color: #344054; border-color: var(--border-strong); }
.button-secondary:hover { background: #f9fafb; }
.button-danger { background: #fff; color: var(--red); border-color: #fecaca; }
.button-danger:hover { background: #fef2f2; }
.button-success { background: #16a34a; color: #fff; border-color: #16a34a; }
.button:disabled { opacity: .55; cursor: not-allowed; }
.alert { border-radius: 10px; padding: 11px 14px; display: flex; align-items: flex-start; gap: 9px; margin-bottom: 16px; border: 1px solid; font-size: 13px; }
.alert-success { color: #166534; background: #f0fdf4; border-color: #bbf7d0; }
.alert-error { color: #991b1b; background: #fef2f2; border-color: #fecaca; }
.alert-info { color: #1e40af; background: #eff6ff; border-color: #bfdbfe; }
.alert-warning { color: #92400e; background: #fffbeb; border-color: #fde68a; }
.stats-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 14px; margin-bottom: 16px; }
.stat-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 17px 18px 14px; box-shadow: var(--shadow); min-height: 136px; position: relative; overflow: hidden; }
.stat-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.stat-label { color: #667085; font-size: 12px; font-weight: 500; }
.stat-icon { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: #f2f4f7; color: #667085; }
.stat-icon.blue { background: #eaf3ff; color: #2583d8; }
.stat-icon.green { background: #eaf8f2; color: #0f9f8f; }
.stat-icon.amber { background: #fff4df; color: #d68b00; }
.stat-icon.purple { background: #f2edff; color: #7c3aed; }
.stat-value { font-size: 25px; font-weight: 750; letter-spacing: -.04em; margin-top: 5px; }
.stat-caption { margin-top: 7px; font-size: 11px; color: var(--muted); }
.stat-caption strong { color: #16a34a; }
.sparkline { position: absolute; left: 0; right: 0; bottom: 0; height: 31px; opacity: .8; }
.sparkline svg { width: 100%; height: 100%; }
.grid-2 { display: grid; grid-template-columns: minmax(0,1.75fr) minmax(300px,.75fr); gap: 14px; }
.grid-2-even { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-header { min-height: 58px; padding: 14px 17px; border-bottom: 1px solid #eef0f3; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.card-header h2, .card-header h3 { margin: 0; font-size: 15px; letter-spacing: -.01em; }
.card-header p { margin: 3px 0 0; color: var(--muted); font-size: 11px; }
.card-body { padding: 17px; }
.card-body.flush { padding: 0; }
.card-footer { border-top: 1px solid #eef0f3; padding: 12px 17px; }
.toolbar { background: white; border: 1px solid var(--border); border-radius: 11px; padding: 11px; margin-bottom: 14px; display: flex; align-items: center; gap: 9px; flex-wrap: wrap; box-shadow: var(--shadow); }
.search-field { position: relative; flex: 1 1 260px; max-width: 400px; }
.search-field svg { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--muted-2); }
.search-field input { width: 100%; height: 36px; padding: 0 11px 0 34px; border: 1px solid var(--border); border-radius: 8px; outline: 0; background: #fafbfc; }
.search-field input:focus, .form-control:focus { border-color: #94a3b8; box-shadow: 0 0 0 3px rgba(148,163,184,.15); background: #fff; }
.toolbar select, .form-control { height: 36px; border: 1px solid var(--border); border-radius: 8px; padding: 0 10px; color: #344054; background: #fff; outline: none; }
.toolbar select { min-width: 130px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; padding: 11px 14px; font-size: 10px; text-transform: uppercase; letter-spacing: .08em; color: #667085; background: #fafbfc; border-bottom: 1px solid var(--border); white-space: nowrap; }
td { padding: 12px 14px; border-bottom: 1px solid #eef0f3; color: #344054; font-size: 12px; vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fbfcfd; }
.table-primary { font-weight: 650; color: #101828; }
.table-secondary { color: #667085; font-size: 11px; margin-top: 2px; }
.table-link { color: #1d4ed8; font-weight: 600; text-decoration: none; }
.table-link:hover { text-decoration: underline; }
.status-badge { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 4px 8px; font-size: 10px; font-weight: 650; line-height: 1; white-space: nowrap; border: 1px solid transparent; }
.status-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status-blue { color: #1d4ed8; background: #eff6ff; border-color: #dbeafe; }
.status-purple { color: #6d28d9; background: #f5f3ff; border-color: #ede9fe; }
.status-amber { color: #b45309; background: #fffbeb; border-color: #fef3c7; }
.status-cyan { color: #0e7490; background: #ecfeff; border-color: #cffafe; }
.status-red { color: #b91c1c; background: #fef2f2; border-color: #fee2e2; }
.status-green { color: #15803d; background: #f0fdf4; border-color: #dcfce7; }
.status-gray { color: #667085; background: #f2f4f7; border-color: #e4e7ec; }
.kebab, .link-button { border: 0; background: transparent; color: #667085; padding: 5px; border-radius: 6px; display: inline-grid; place-items: center; }
.kebab:hover, .link-button:hover { background: #f2f4f7; color: #101828; }
.form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px 16px; }
.form-group { min-width: 0; }
.form-group.full { grid-column: 1 / -1; }
.form-label { display: block; font-size: 11px; font-weight: 650; color: #344054; margin-bottom: 6px; }
.form-label .required { color: #dc2626; }
.form-control { width: 100%; height: 40px; padding: 0 11px; font-size: 13px; }
textarea.form-control { min-height: 100px; height: auto; padding: 10px 11px; resize: vertical; }
.form-help { color: #7b8492; font-size: 10px; margin-top: 5px; }
.form-error { color: #b91c1c; font-size: 10px; margin-top: 5px; }
.form-section { padding: 18px; border-bottom: 1px solid #eef0f3; }
.form-section:last-child { border-bottom: 0; }
.form-section-title { margin: 0 0 14px; font-size: 13px; display: flex; align-items: center; gap: 8px; }
.form-actions { display: flex; justify-content: flex-end; gap: 8px; padding: 15px 18px; background: #fafbfc; border-top: 1px solid #eef0f3; border-radius: 0 0 var(--radius) var(--radius); }
.checkbox-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 9px; }
.checkbox-card { border: 1px solid var(--border); border-radius: 9px; padding: 10px; display: flex; gap: 9px; align-items: flex-start; background: #fff; }
.checkbox-card:hover { border-color: #b8c0cc; }
.checkbox-card input { margin-top: 2px; }
.checkbox-card strong { display: block; font-size: 11px; }
.checkbox-card span { color: var(--muted); font-size: 10px; display: block; margin-top: 2px; }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 13px 0; border-bottom: 1px solid #eef0f3; }
.switch-row:last-child { border-bottom: 0; }
.switch-copy strong { display: block; font-size: 12px; }
.switch-copy span { display: block; font-size: 10px; color: var(--muted); margin-top: 3px; }
.switch { position: relative; width: 40px; height: 22px; flex: 0 0 auto; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch-slider { position: absolute; inset: 0; border-radius: 999px; background: #d0d5dd; transition: .18s; }
.switch-slider::before { content: ''; position: absolute; width: 16px; height: 16px; border-radius: 50%; background: white; left: 3px; top: 3px; box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: .18s; }
.switch input:checked + .switch-slider { background: #344054; }
.switch input:checked + .switch-slider::before { transform: translateX(18px); }
.empty-state { text-align: center; padding: 44px 18px; color: var(--muted); }
.empty-state-icon { width: 48px; height: 48px; border-radius: 12px; background: #f2f4f7; display: grid; place-items: center; margin: 0 auto 12px; color: #98a2b3; }
.empty-state h3 { margin: 0 0 5px; color: #344054; font-size: 14px; }
.empty-state p { margin: 0 0 14px; font-size: 12px; }
.detail-grid { display: grid; grid-template-columns: minmax(0,1.65fr) minmax(280px,.75fr); gap: 14px; align-items: start; }
.info-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
.info-item { min-width: 0; }
.info-label { display: block; color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .07em; margin-bottom: 4px; }
.info-value { font-weight: 600; color: #273142; word-break: break-word; }
.file-list { display: grid; gap: 8px; }
.file-row { display: flex; align-items: center; gap: 10px; border: 1px solid var(--border); border-radius: 9px; padding: 10px; background: #fff; }
.file-icon { width: 34px; height: 34px; border-radius: 8px; background: #f2f4f7; color: #667085; display: grid; place-items: center; }
.file-copy { min-width: 0; flex: 1; }
.file-copy strong { display: block; font-size: 11px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.file-copy span { color: var(--muted); font-size: 10px; }
.timeline { position: relative; }
.timeline-item { display: grid; grid-template-columns: 22px minmax(0,1fr); gap: 10px; padding-bottom: 16px; position: relative; }
.timeline-item::before { content: ''; position: absolute; left: 10px; top: 21px; bottom: 0; width: 1px; background: #e4e7ec; }
.timeline-item:last-child::before { display: none; }
.timeline-marker { width: 21px; height: 21px; border-radius: 50%; background: #f2f4f7; color: #667085; display: grid; place-items: center; z-index: 1; }
.timeline-copy strong { display: block; font-size: 11px; }
.timeline-copy p { margin: 3px 0 0; color: #667085; font-size: 11px; }
.timeline-copy time { display: block; color: #98a2b3; font-size: 9px; margin-top: 4px; }
.assignment-card { border: 1px solid var(--border); border-radius: 10px; padding: 12px; background: #fafbfc; }
.assignment-person { display: flex; align-items: center; gap: 9px; margin-bottom: 10px; }
.assignment-person .profile-avatar { background: #e4e7ec; color: #344054; }
.mini-list { display: grid; gap: 7px; }
.mini-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 11px; padding: 8px 0; border-bottom: 1px solid #eef0f3; }
.mini-row:last-child { border-bottom: 0; }
.mini-row span { color: var(--muted); }
.progress-list { display: grid; gap: 15px; }
.progress-label { display: flex; justify-content: space-between; font-size: 10px; margin-bottom: 6px; }
.progress-label strong { font-weight: 600; }
.progress-track { height: 6px; background: #e4e7ec; border-radius: 999px; overflow: hidden; }
.progress-fill { height: 100%; background: #667085; border-radius: inherit; }
.pagination { display: flex; gap: 5px; justify-content: flex-end; margin-top: 14px; }
.page-link { min-width: 30px; height: 30px; border: 1px solid var(--border); border-radius: 7px; display: grid; place-items: center; text-decoration: none; color: #667085; background: #fff; font-size: 11px; }
.page-link.active { background: #344054; color: #fff; border-color: #344054; }
.modal-backdrop { position: fixed; inset: 0; background: rgba(16,24,40,.45); display: none; align-items: center; justify-content: center; padding: 20px; z-index: 100; }
.modal-backdrop.open { display: flex; }
.modal { width: min(560px,100%); max-height: calc(100vh - 40px); overflow: auto; background: #fff; border-radius: 13px; box-shadow: 0 24px 60px rgba(16,24,40,.25); }
.modal-header { padding: 16px 18px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.modal-header h3 { margin: 0; font-size: 15px; }
.modal-body { padding: 18px; }
.modal-footer { padding: 13px 18px; border-top: 1px solid var(--border); background: #fafbfc; display: flex; justify-content: flex-end; gap: 8px; }
.code-pill { padding: 3px 7px; border-radius: 6px; background: #f2f4f7; color: #344054; font-family: ui-monospace,SFMono-Regular,Menlo,monospace; font-size: 10px; }
.note-box { background: #f8fafc; border: 1px solid var(--border); border-left: 3px solid #667085; border-radius: 8px; padding: 11px 12px; color: #475467; font-size: 11px; }
.invoice-total { font-size: 22px; font-weight: 750; letter-spacing: -.03em; }
.hidden-field { color: #98a2b3; font-style: italic; }
.sidebar-overlay { display: none; }
.auth-page { min-height: 100vh; background: #f3f4f6; display: grid; place-items: center; padding: 28px 16px; }
.auth-card { width: min(430px,100%); background: #fff; border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 12px 30px rgba(16,24,40,.08); overflow: hidden; }
.auth-head { padding: 24px 26px; background: #111827; color: white; text-align: center; }
.auth-brand { display: inline-flex; align-items: center; gap: 9px; font-size: 19px; font-weight: 750; }
.auth-brand .brand-mark { width: 34px; height: 34px; }
.auth-head p { margin: 7px 0 0; color: #9ca3af; font-size: 12px; }
.auth-body { padding: 24px 26px; }
.auth-body .form-group { margin-bottom: 14px; }
.auth-footer { text-align: center; margin-top: 16px; color: var(--muted); font-size: 11px; }
.auth-footer a { color: #1d4ed8; text-decoration: none; font-weight: 600; }
.auth-note { margin-top: 16px; background: #f8fafc; border: 1px solid var(--border); border-radius: 9px; padding: 11px; color: #667085; font-size: 10px; line-height: 1.55; }
@media (max-width: 1150px) {
    .stats-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .grid-2, .detail-grid { grid-template-columns: 1fr; }
    .checkbox-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 820px) {
    .sidebar { transform: translateX(-100%); transition: transform .2s ease; }
    .sidebar.open { transform: translateX(0); }
    .main-shell { margin-left: 0; }
    .mobile-menu { display: inline-grid; }
    .top-search { width: min(260px,45vw); }
    .sidebar-overlay { position: fixed; inset: 0; background: rgba(16,24,40,.45); z-index: 50; }
    .sidebar-overlay.open { display: block; }
    .page-content { padding: 16px; }
}
@media (max-width: 620px) {
    .topbar { padding: 0 12px; }
    .top-search { display: none; }
    .topbar-actions .button { display: none; }
    .page-heading { align-items: flex-start; flex-direction: column; }
    .stats-grid, .grid-2-even, .form-grid, .info-grid, .checkbox-grid { grid-template-columns: 1fr; }
    .toolbar { align-items: stretch; }
    .toolbar select, .toolbar .button { width: 100%; }
    .search-field { max-width: none; }
    .page-heading h1 { font-size: 21px; }
}


/* V2.3 — secure Super Admin account access banner */
.impersonation-banner { min-height: 48px; padding: 9px 22px; background: #7c2d12; color: #fff7ed; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid rgba(255,255,255,.18); }
.impersonation-banner > div { min-width: 0; display: flex; align-items: baseline; gap: 9px; flex-wrap: wrap; }
.impersonation-banner strong { font-size: 11px; letter-spacing: .01em; }
.impersonation-banner span { font-size: 10px; color: #fed7aa; }
.impersonation-banner form { margin: 0; flex: 0 0 auto; }
.button-light { background: #fff; color: #7c2d12; border-color: #fff; }
.button-light:hover { background: #ffedd5; border-color: #ffedd5; }
@media (max-width: 620px) {
    .impersonation-banner { align-items: flex-start; flex-direction: column; padding: 10px 14px; }
    .impersonation-banner form, .impersonation-banner .button { width: 100%; }
}

/* V2.4 — Purple workflow layout with per-user accent color */
:root {
    --primary: #7c3aed;
    --primary-dark: #6430c9;
    --primary-darker: #4f239f;
    --primary-soft: rgba(124,58,237,.12);
    --primary-softer: rgba(124,58,237,.07);
    --primary-ring: rgba(124,58,237,.22);
    --primary-shadow: rgba(124,58,237,.28);
    --sidebar-bg: #17172f;
    --sidebar-hover: #22223f;
    --bg: #f5f5fb;
    --border: #e5e7f0;
    --border-strong: #d8dbea;
    --radius: 13px;
    --shadow: 0 2px 7px rgba(31,35,65,.05), 0 1px 2px rgba(31,35,65,.05);
}
body { background: var(--bg); }
.sidebar {
    background: linear-gradient(180deg, #17172f 0%, #191938 46%, #17172f 100%);
    border-right-color: rgba(255,255,255,.06);
    box-shadow: 8px 0 28px rgba(21,20,55,.06);
}
.brand-block { height: 64px; padding: 0 20px; }
.brand-mark {
    background: linear-gradient(145deg, var(--primary), var(--primary-dark));
    border-color: rgba(255,255,255,.22);
    box-shadow: 0 8px 18px var(--primary-shadow), inset 0 1px 0 rgba(255,255,255,.25);
}
.brand-name { font-size: 14px; }
.brand-subtitle { color: #8b8cad; }
.sidebar-nav { padding: 16px 12px; }
.nav-section-label { color: #6f7194; padding-left: 11px; }
.nav-link { height: 42px; border-radius: 9px; color: #bbbcd1; padding: 0 12px; }
.nav-link:hover { background: rgba(255,255,255,.055); color: #fff; }
.nav-link.active {
    background: linear-gradient(100deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff;
    box-shadow: 0 9px 22px var(--primary-shadow), inset 0 1px 0 rgba(255,255,255,.14);
}
.nav-icon { color: #8f90ab; }
.nav-link.active .nav-icon { color: #fff; }
.sidebar-profile { border-top-color: rgba(255,255,255,.08); background: rgba(10,10,28,.17); }
.profile-avatar { background: linear-gradient(145deg,var(--primary),var(--primary-dark)); box-shadow: 0 5px 14px var(--primary-shadow); }
.topbar { height: 64px; padding: 0 24px; border-bottom-color: #e7e8f1; }
.top-search { width: 300px; background: #fbfbfd; border-color: #e2e4ed; }
.top-search:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-ring); background: #fff; }
.icon-button { text-decoration: none; }
.icon-button:hover { background: var(--primary-softer); color: var(--primary); }
.top-user { display: flex; align-items: center; gap: 9px; padding-left: 2px; }
.top-user-copy { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.top-user-copy strong { font-size: 11px; color: #25263b; white-space: nowrap; max-width: 140px; overflow: hidden; text-overflow: ellipsis; }
.top-user-copy span { font-size: 9px; color: #8b8da2; margin-top: 2px; }
.top-avatar { background: var(--primary-soft); color: var(--primary-dark); border: 1px solid var(--primary-ring); }
.page-content { padding: 24px 28px 38px; }
.page-heading { margin-bottom: 20px; }
.page-heading h1 { font-size: 25px; color: #1d1e31; }
.page-heading p { color: #74778e; }
.button-primary, .button-dark {
    background: linear-gradient(100deg,var(--primary),var(--primary-dark));
    border-color: var(--primary);
    box-shadow: 0 5px 13px var(--primary-shadow);
}
.button-primary:hover, .button-dark:hover { background: linear-gradient(100deg,var(--primary-dark),var(--primary-darker)); border-color: var(--primary-dark); }
.button-secondary:hover { border-color: var(--primary-ring); color: var(--primary-dark); background: var(--primary-softer); }
.card, .toolbar { border-color: #e3e5ef; box-shadow: var(--shadow); }
.card-header { border-bottom-color: #ececf3; }
.card-header h2, .card-header h3 { color: #24253a; }
.stat-card { border-color: #e3e5ef; }
.stat-icon.purple, .stat-icon.blue { background: var(--primary-soft); color: var(--primary); }
.toolbar { padding: 12px; background: rgba(255,255,255,.96); }
.toolbar select, .form-control, .search-field input { border-color: #dfe1ec; }
.search-field input:focus, .form-control:focus, .toolbar select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-ring);
    outline: none;
}
.table-wrap table { width: 100%; border-collapse: collapse; }
.table-wrap thead th {
    background: #f9f9fc;
    color: #45475d;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: .045em;
    font-weight: 700;
    border-bottom: 1px solid #e6e7f0;
}
.table-wrap tbody tr { transition: background .15s ease; }
.table-wrap tbody tr:hover { background: var(--primary-softer); }
.table-link { color: var(--primary-dark); }
.link-button { color: var(--primary); }
.status-purple, .status-blue { color: var(--primary-dark); background: var(--primary-soft); }
.code-pill { background: #f2f2f8; color: #56586d; }
.note-box { border-left-color: var(--primary); background: var(--primary-softer); }
.switch input:checked + .switch-slider { background: var(--primary); }
.checkbox-card:has(input:checked) { border-color: var(--primary-ring); background: var(--primary-softer); }
.checkbox-card input { accent-color: var(--primary); }
.page-link.active { background: var(--primary); border-color: var(--primary); }
.auth-head { background: linear-gradient(120deg,#17172f,#252552); }
.auth-brand .brand-mark { background: linear-gradient(145deg,var(--primary),var(--primary-dark)); }
.auth-footer a { color: var(--primary-dark); }

/* Digitizer file format chooser */
.upload-dropzone {
    border: 1px dashed var(--primary-ring);
    background: var(--primary-softer);
    border-radius: 12px;
    padding: 14px;
}
.upload-dropzone input[type="file"] {
    width: 100%;
    min-height: 44px;
    border: 1px solid #dfe1ec;
    border-radius: 9px;
    background: #fff;
    padding: 8px;
    color: #4c4e62;
}
.upload-dropzone input[type="file"]::file-selector-button {
    border: 0;
    border-radius: 7px;
    padding: 8px 12px;
    margin-right: 10px;
    background: var(--primary-soft);
    color: var(--primary-dark);
    font-weight: 700;
    cursor: pointer;
}
.format-option-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 7px; margin-top: 11px; }
.format-option {
    min-width: 0;
    border: 1px solid #e1e3ec;
    background: #fff;
    border-radius: 8px;
    padding: 8px 9px;
    display: flex;
    align-items: center;
    gap: 7px;
}
.format-option strong { min-width: 38px; color: var(--primary-dark); font-size: 10px; }
.format-option span { min-width: 0; color: #7b7d90; font-size: 9px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.format-count { color: var(--primary-dark); background: var(--primary-soft); }

/* Appearance page */
.appearance-layout { align-items: start; }
.color-preset-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.color-preset {
    border: 1px solid #e0e2ec;
    border-radius: 10px;
    padding: 11px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: .15s ease;
    background: #fff;
}
.color-preset input { position: absolute; opacity: 0; pointer-events: none; }
.color-preset:hover, .color-preset.selected { border-color: var(--swatch); box-shadow: 0 0 0 3px color-mix(in srgb, var(--swatch) 18%, transparent); }
.color-swatch { width: 32px; height: 32px; border-radius: 9px; background: var(--swatch); box-shadow: inset 0 0 0 1px rgba(255,255,255,.24), 0 3px 9px color-mix(in srgb, var(--swatch) 28%, transparent); }
.color-preset span:last-child { display: flex; min-width: 0; flex-direction: column; }
.color-preset strong { font-size: 11px; }
.color-preset small { font-size: 9px; color: #8a8c9f; margin-top: 2px; }
.custom-color-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 18px; padding-top: 17px; border-top: 1px solid #ececf3; }
.custom-color-control { display: flex; align-items: center; gap: 8px; }
.custom-color-control input[type="color"] { width: 44px; height: 40px; padding: 3px; border: 1px solid #dfe1ec; border-radius: 9px; background: #fff; cursor: pointer; }
.color-code-input { width: 115px; font-family: ui-monospace,SFMono-Regular,Menlo,monospace; text-transform: uppercase; }
.appearance-actions { display: flex; justify-content: flex-end; gap: 8px; }
.preview-shell { min-height: 330px; border: 1px solid #e0e2ec; border-radius: 12px; overflow: hidden; display: grid; grid-template-columns: 120px 1fr; background: #f6f6fb; }
.preview-sidebar { background: #191934; color: #b8b9ce; padding: 14px 10px; }
.preview-logo { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 8px; background: var(--preview-accent); color: #fff; font-weight: 800; margin-bottom: 22px; }
.preview-nav { height: 31px; display: flex; align-items: center; gap: 7px; padding: 0 8px; margin-bottom: 5px; border-radius: 7px; font-size: 9px; }
.preview-nav span { width: 7px; height: 7px; border: 1px solid currentColor; border-radius: 2px; }
.preview-nav.active { color: #fff; background: var(--preview-accent); }
.preview-main { min-width: 0; }
.preview-topbar { height: 42px; background: #fff; border-bottom: 1px solid #e5e6ef; }
.preview-content { padding: 15px; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.preview-stat { background: #fff; border: 1px solid #e2e4ed; border-radius: 9px; padding: 12px; }
.preview-stat span { display: block; color: #85879a; font-size: 8px; }
.preview-stat strong { display: block; font-size: 18px; margin-top: 4px; color: #28293d; }
.preview-button { grid-column: 1/-1; border: 0; border-radius: 8px; min-height: 35px; background: var(--preview-accent); color: #fff; font-weight: 700; }

@media (max-width: 900px) {
    .top-user-copy { display: none; }
    .format-option-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 620px) {
    .page-content { padding: 17px 14px 30px; }
    .format-option-grid, .color-preset-grid { grid-template-columns: 1fr; }
    .custom-color-row { align-items: flex-start; flex-direction: column; }
    .custom-color-control { width: 100%; }
    .color-code-input { flex: 1; width: auto; }
    .preview-shell { grid-template-columns: 95px 1fr; }
}

/* V2.5 — Refined payroll-style shell and subtle interaction motion */
:root {
    --sidebar: 232px;
    --topbar: 64px;
    --bg: #f5f6fc;
    --surface: #ffffff;
    --surface-soft: #fafafe;
    --sidebar-bg: #111229;
    --sidebar-hover: rgba(255,255,255,.055);
    --text: #17182b;
    --muted: #70738a;
    --muted-2: #9699aa;
    --border: #e3e5ef;
    --border-strong: #d7dae7;
    --radius: 13px;
    --shadow: 0 1px 2px rgba(30,33,70,.04), 0 5px 18px rgba(30,33,70,.045);
    --shadow-hover: 0 9px 28px rgba(30,33,70,.09);
    --ease-ui: cubic-bezier(.2,.8,.2,1);
}
html { scroll-behavior: smooth; }
body.app-page { overflow-x: hidden; }
.app-shell { padding-top: var(--topbar); }

.topbar {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 90;
    height: var(--topbar);
    padding: 0 18px 0 0;
    background: rgba(255,255,255,.97);
    border-bottom: 1px solid #e5e7f0;
    box-shadow: 0 1px 0 rgba(26,28,55,.025);
    backdrop-filter: blur(16px);
    display: flex;
    align-items: center;
    gap: 14px;
}
.topbar-brand {
    width: var(--sidebar);
    height: 100%;
    padding: 0 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 0 0 var(--sidebar);
    text-decoration: none;
    border-right: 1px solid #e8e9f1;
    color: var(--text);
}
.topbar-brand-mark { width: 32px; height: 32px; border-radius: 50%; }
.topbar-brand-copy { display: flex; flex-direction: column; min-width: 0; line-height: 1.12; }
.topbar-brand-copy strong { font-size: 16px; letter-spacing: -.025em; white-space: nowrap; }
.topbar-brand-copy small { margin-top: 2px; font-size: 9px; color: #8a8da0; white-space: nowrap; }
.topbar .mobile-menu { flex: 0 0 auto; }
.topbar-actions { gap: 8px; }
.top-user {
    min-height: 42px;
    padding: 5px 8px 5px 5px;
    border: 1px solid #e4e6ee;
    border-radius: 12px;
    background: #f8f8fc;
}
.top-avatar { width: 31px; height: 31px; }

.sidebar {
    top: var(--topbar);
    bottom: 0;
    height: calc(100vh - var(--topbar));
    background: linear-gradient(180deg,#101126 0%,#171738 100%);
    border-right: 1px solid rgba(255,255,255,.07);
    box-shadow: 7px 0 24px rgba(18,19,45,.055);
}
.brand-block {
    height: 84px;
    padding: 0 20px;
    border-bottom: 1px solid rgba(255,255,255,.075);
}
.brand-block .brand-mark { width: 31px; height: 31px; border-radius: 50%; }
.brand-name { font-size: 13px; }
.brand-subtitle { font-size: 8px; color: #777a9e; }
.sidebar-nav { padding: 15px 12px 20px; }
.nav-section-label { padding: 16px 10px 7px; color: #676a8c; font-size: 8px; }
.nav-link {
    position: relative;
    min-height: 42px;
    height: auto;
    margin: 3px 0;
    border-radius: 10px;
    transition: color .18s var(--ease-ui), background .18s var(--ease-ui), transform .18s var(--ease-ui), box-shadow .18s var(--ease-ui);
    overflow: hidden;
}
.nav-link::before {
    content: '';
    position: absolute;
    left: -12px;
    width: 3px;
    height: 22px;
    border-radius: 0 5px 5px 0;
    background: rgba(255,255,255,.88);
    opacity: 0;
    transform: scaleY(.45);
    transition: .18s var(--ease-ui);
}
.nav-link:hover { transform: translateX(2px); }
.nav-link.active {
    background: linear-gradient(100deg,var(--primary),var(--primary-dark));
    box-shadow: 0 8px 19px var(--primary-shadow), inset 0 1px 0 rgba(255,255,255,.16);
}
.nav-link.active::before { opacity: 1; transform: scaleY(1); }
.nav-link:active { transform: translateX(2px) scale(.985); }
.sidebar-profile { min-height: 72px; }

.main-shell {
    margin-left: var(--sidebar);
    min-height: calc(100vh - var(--topbar));
}
.page-content { max-width: 1760px; padding: 22px 28px 38px; }
.page-heading { align-items: center; margin: 0 0 18px; }
.page-heading h1 { font-size: 24px; color: #191a2d; }
.page-heading p { font-size: 12px; color: #777a90; }

.card, .toolbar, .stat-card, .auth-card {
    transition: border-color .2s var(--ease-ui), box-shadow .2s var(--ease-ui), transform .2s var(--ease-ui);
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); border-color: color-mix(in srgb,var(--primary) 20%,var(--border)); }
.card { overflow: hidden; }
.card-header { min-height: 60px; padding: 14px 18px; }
.card-header h2, .card-header h3 { color: #202136; font-weight: 700; }
.card-header p { color: #808397; }
.card-body { padding: 18px; }
.toolbar { padding: 11px 12px; border-radius: 12px; }

.button, .icon-button, .page-link, .color-preset, .checkbox-card, .file-row, .kebab, .link-button {
    position: relative;
    overflow: hidden;
    -webkit-tap-highlight-color: transparent;
}
.button {
    border-radius: 9px;
    transition: transform .16s var(--ease-ui), box-shadow .16s var(--ease-ui), background .16s var(--ease-ui), border-color .16s var(--ease-ui), color .16s var(--ease-ui);
}
.button:hover { transform: translateY(-1px); }
.button:active { transform: translateY(0) scale(.975); }
.button-primary, .button-dark { box-shadow: 0 5px 13px var(--primary-shadow); }
.button-primary:hover, .button-dark:hover { box-shadow: 0 8px 20px var(--primary-shadow); }
.icon-button { transition: transform .15s var(--ease-ui), background .15s var(--ease-ui), color .15s var(--ease-ui); }
.icon-button:hover { transform: translateY(-1px); }
.icon-button:active { transform: scale(.93); }
.button.is-submitting { opacity: .72; pointer-events: none; }
.button.is-submitting::after {
    content: '';
    width: 13px;
    height: 13px;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: ui-spin .7s linear infinite;
}
.ui-ripple {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    background: rgba(255,255,255,.34);
    transform: translate(-50%,-50%) scale(0);
    animation: ui-ripple .52s ease-out forwards;
}
.button-secondary .ui-ripple, .icon-button .ui-ripple, .nav-link .ui-ripple, .color-preset .ui-ripple { background: var(--primary-soft); }

.form-control, .search-field input, .toolbar select, .top-search {
    transition: border-color .16s var(--ease-ui), box-shadow .16s var(--ease-ui), background .16s var(--ease-ui);
}
.form-control:hover, .search-field input:hover, .toolbar select:hover { border-color: #cfd3e1; }
.form-control:focus, .search-field input:focus, .toolbar select:focus { transform: none; }

.table-wrap { scrollbar-width: thin; scrollbar-color: #c9ccda transparent; }
th { padding: 12px 14px; background: #fafafe; color: #4d5067; }
td { padding: 13px 14px; }
tbody tr { transition: background .16s ease, box-shadow .16s ease; }
tbody tr:hover { background: var(--primary-softer); }
.table-link { text-underline-offset: 3px; }
.file-row { transition: transform .16s var(--ease-ui), border-color .16s var(--ease-ui), box-shadow .16s var(--ease-ui); }
.file-row:hover { transform: translateY(-1px); border-color: color-mix(in srgb,var(--primary) 25%,var(--border)); box-shadow: 0 5px 14px rgba(28,31,65,.055); }

.alert { animation: ui-alert-in .28s var(--ease-ui) both; }
.modal-backdrop { opacity: 0; visibility: hidden; display: flex; transition: opacity .18s ease, visibility .18s ease; }
.modal-backdrop.open { opacity: 1; visibility: visible; }
.modal { transform: translateY(8px) scale(.985); opacity: 0; transition: transform .2s var(--ease-ui), opacity .2s var(--ease-ui); }
.modal-backdrop.open .modal { transform: translateY(0) scale(1); opacity: 1; }

.page-content > * { opacity: 0; transform: translateY(5px); }
body.ui-ready .page-content > * { animation: ui-page-in .34s var(--ease-ui) forwards; }
body.ui-ready .page-content > *:nth-child(2) { animation-delay: .025s; }
body.ui-ready .page-content > *:nth-child(3) { animation-delay: .05s; }
body.ui-ready .page-content > *:nth-child(4) { animation-delay: .075s; }
body.ui-ready .page-content > *:nth-child(5) { animation-delay: .1s; }

.upload-dropzone {
    position: relative;
    border: 1px dashed color-mix(in srgb,var(--primary) 42%,#dfe1ec);
    transition: border-color .18s ease, background .18s ease, transform .18s ease;
}
.upload-dropzone:hover, .upload-dropzone.has-files { border-color: var(--primary); background: var(--primary-softer); transform: translateY(-1px); }
.upload-dropzone::after {
    content: attr(data-file-summary);
    display: block;
    min-height: 14px;
    margin-top: 7px;
    color: var(--primary-dark);
    font-size: 10px;
    font-weight: 650;
}
.format-option { transition: border-color .15s ease, background .15s ease, transform .15s ease; }
.format-option:hover { border-color: var(--primary-ring); background: var(--primary-softer); transform: translateY(-1px); }

@keyframes ui-page-in { to { opacity: 1; transform: none; } }
@keyframes ui-alert-in { from { opacity: 0; transform: translateY(-5px); } to { opacity: 1; transform: none; } }
@keyframes ui-ripple { to { transform: translate(-50%,-50%) scale(1); opacity: 0; } }
@keyframes ui-spin { to { transform: rotate(360deg); } }

@media (max-width: 900px) {
    .topbar-brand { width: auto; flex-basis: auto; padding-right: 13px; border-right: 0; }
    .topbar-brand-copy small { display: none; }
    .sidebar { top: var(--topbar); }
    .main-shell { margin-left: 0; }
}
@media (max-width: 700px) {
    .topbar { padding-right: 10px; gap: 7px; }
    .topbar-brand { padding-left: 12px; }
    .topbar-brand-copy strong { font-size: 14px; }
    .topbar-actions { margin-left: auto; }
    .topbar-actions > .button, .topbar-divider, .top-user-copy { display: none; }
    .top-user { border: 0; background: transparent; padding: 0; }
    .page-content { padding: 17px 14px 30px; }
}
@media (max-width: 430px) {
    .topbar-brand-copy { display: none; }
    .topbar-brand { padding-right: 3px; }
    .topbar-actions .icon-button:nth-of-type(2) { display: none; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
    .page-content > * { opacity: 1 !important; transform: none !important; }
}

/* Mobile data tables stay readable and scroll inside their card instead of crushing columns. */
@media (max-width: 700px) {
    .table-wrap table { min-width: 780px; }
    .table-wrap { overscroll-behavior-inline: contain; -webkit-overflow-scrolling: touch; }
}


/* Digit Portal V2.6 — reference workflow pages */
html, body, button, input, select, textarea { font-family: "Inter", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
.nav-group { margin: 3px 0 8px; }
.nav-group summary { list-style:none; display:grid; grid-template-columns:24px 1fr auto; align-items:center; min-height:38px; padding:0 10px; border-radius:9px; color:#d8daea; font-size:12px; font-weight:600; cursor:pointer; user-select:none; }
.nav-group summary::-webkit-details-marker { display:none; }
.nav-group summary:hover { background:rgba(255,255,255,.055); color:#fff; }
.nav-caret { font-size:14px; transition:transform .18s ease; }
.nav-group[open] .nav-caret { transform:rotate(180deg); }
.nav-sublink { display:flex; align-items:center; min-height:32px; margin:1px 0 1px 34px; padding:0 10px; border-radius:7px; color:#aeb1ca; text-decoration:none; font-size:11.5px; transition:background .16s ease,color .16s ease,transform .16s ease; }
.nav-sublink::before { content:""; width:5px; height:5px; border-radius:50%; background:currentColor; opacity:.5; margin-right:9px; }
.nav-sublink:hover,.nav-sublink.active { color:#fff; background:color-mix(in srgb,var(--primary) 26%,transparent); transform:translateX(2px); }
.order-form-shell { display:grid; grid-template-columns:minmax(0,1fr) 280px; gap:16px; align-items:start; }
.order-form-help { position:sticky; top:86px; }
.form-grid-3 { grid-template-columns:repeat(3,minmax(0,1fr)); }
.compact-section { padding-bottom:14px; }
.customer-summary { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; }
.customer-summary>div { border:1px solid var(--border); background:#fafbff; border-radius:9px; padding:10px 12px; }
.customer-summary span { display:block; color:var(--muted); font-size:10px; text-transform:uppercase; letter-spacing:.05em; margin-bottom:4px; }
.customer-summary strong { color:#1d2035; font-size:12px; overflow-wrap:anywhere; }
.check-list { display:grid; gap:10px; color:#4d5268; font-size:12px; }
.check-list span { padding:9px 10px; border-radius:8px; background:#f8f8fe; border:1px solid #ececf6; }
.large-textarea { min-height:125px; }
.order-count-pill { border-radius:999px; padding:6px 12px; background:color-mix(in srgb,var(--primary) 14%,white); color:var(--primary-dark); font-size:11px; font-weight:700; }
.reference-order-layout { display:grid; grid-template-columns:minmax(0,1fr) 310px; gap:16px; align-items:start; }
.reference-card-title { min-height:46px; display:flex; align-items:center; justify-content:space-between; gap:10px; padding:12px 16px; background:linear-gradient(90deg,color-mix(in srgb,var(--primary-dark) 85%,#0b1240),color-mix(in srgb,var(--primary) 70%,#17174f)); color:#fff; border-radius:12px 12px 0 0; font-weight:700; font-size:12px; }
.reference-card-title>span { display:flex; align-items:center; gap:7px; }
.reference-card-title .status-badge { background:rgba(255,255,255,.16); color:#fff; border-color:rgba(255,255,255,.22); }
.reference-design-name { margin:14px; padding:12px 14px; border:1px solid #e6e8f0; border-radius:10px; display:grid; grid-template-columns:120px 1fr; gap:12px; align-items:center; background:#fff; }
.reference-design-name span,.order-spec-row span,.summary-list span { color:#252941; font-size:11px; font-weight:700; }
.reference-design-name strong { color:#3b4058; font-size:12px; }
.order-spec-grid { display:grid; grid-template-columns:1fr 1fr; margin:0 14px 14px; border:1px solid #e7e9f1; border-radius:11px; overflow:hidden; }
.order-spec-row { min-height:42px; display:grid; grid-template-columns:120px 1fr; align-items:center; gap:10px; padding:8px 12px; border-bottom:1px solid #eceef4; }
.order-spec-row:nth-child(odd) { border-right:1px solid #eceef4; }
.order-spec-row:nth-last-child(-n+2) { border-bottom:0; }
.order-spec-row strong { color:#52566d; font-size:11px; font-weight:500; overflow-wrap:anywhere; }
.instruction-panel { margin:14px; border:1px solid #e5e7ef; border-radius:11px; overflow:hidden; }
.instruction-panel h3 { margin:0; padding:11px 14px; border-bottom:1px solid #e8eaf1; background:#fafbfe; display:flex; align-items:center; gap:7px; font-size:12px; color:#22263e; }
.instruction-panel>div { min-height:130px; padding:14px; color:#4f5469; font-size:12px; line-height:1.7; }
.changes-panel>div { min-height:auto; }
.change-line { display:grid; gap:4px; padding:10px 0; border-bottom:1px solid #eee; }
.reference-side-stack { display:grid; gap:14px; }
.summary-list>div { display:grid; grid-template-columns:90px 1fr; gap:10px; padding:11px 12px; border-bottom:1px solid #eceef4; }
.summary-list>div:last-child { border-bottom:0; }
.summary-list strong { font-size:11px; color:#4e5268; font-weight:500; }
.reference-files { padding:12px; display:grid; gap:8px; }
.reference-files a { display:flex; gap:8px; align-items:center; min-height:42px; border:1px solid #e6e8f0; border-radius:9px; padding:8px 10px; text-decoration:none; color:#34384e; font-size:11px; background:#fff; }
.reference-files a:hover { border-color:color-mix(in srgb,var(--primary) 45%,#e6e8f0); transform:translateY(-1px); }
.digitizer-note-area { min-height:120px; }
.ready-files-button { width:100%; min-height:44px; }
.modal-xl { width:min(1280px,calc(100vw - 30px)); }
.ready-files-modal .modal-body { background:#f7f8fc; }
.reference-modal-header { border-radius:12px 12px 0 0; }
.release-top-grid { display:grid; grid-template-columns:1fr 1fr; gap:14px; }
.release-details,.release-comments { background:#fff; border:1px solid #e5e7ef; border-radius:11px; overflow:hidden; }
.release-details .reference-card-title,.release-comments .reference-card-title { min-height:40px; border-radius:0; padding:10px 12px; }
.release-comments { padding-bottom:12px; }
.release-comments>label,.release-comments>select,.release-comments>textarea { margin-left:12px; width:calc(100% - 24px); }
.release-comments>label { margin-top:12px; display:block; }
.release-comments>select { margin-bottom:9px; }
.release-table input { min-width:100px; }
.release-unit { padding:10px 12px 12px; }
.ready-options-title { margin:16px 0 10px; font-size:12px; font-weight:700; color:#292d46; display:flex; align-items:center; gap:7px; }
.ready-option-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; }
.ready-option-card { background:#fff; border:1px solid #e4e6ef; border-radius:11px; overflow:hidden; }
.ready-option-card h3 { margin:0; padding:10px 12px; text-align:center; color:#fff; background:linear-gradient(90deg,var(--primary-dark),var(--primary)); font-size:12px; }
.upload-stack { padding:10px; display:grid; gap:7px; }
.compact-file-input { display:grid; grid-template-columns:52px 1fr; align-items:center; min-height:38px; gap:8px; padding:5px 7px; border:1px solid #e6e8ef; border-radius:7px; background:#fbfcff; font-size:10px; color:#686d82; }
.compact-file-input input { min-width:0; font-size:10px; }
.admin-customer-summary { margin:14px; }
@media(max-width:1100px){.form-grid-3{grid-template-columns:repeat(2,minmax(0,1fr))}.order-form-shell{grid-template-columns:1fr}.order-form-help{position:static}.reference-order-layout{grid-template-columns:1fr}.reference-side-stack{grid-template-columns:repeat(2,minmax(0,1fr))}.ready-option-grid{grid-template-columns:1fr}.release-top-grid{grid-template-columns:1fr}}
@media(max-width:700px){.form-grid-3,.customer-summary,.reference-side-stack{grid-template-columns:1fr}.order-spec-grid{grid-template-columns:1fr}.order-spec-row:nth-child(odd){border-right:0}.reference-design-name,.order-spec-row{grid-template-columns:100px 1fr}.modal-xl{width:calc(100vw - 12px)}.modal-footer{flex-wrap:wrap}.modal-footer .button{flex:1}}

/* V2.7 — Larger typography, workflow colors, clickable tabs, notifications, and date filters */
body { font-size: 15px; }
.nav-link { font-size: 14px; min-height: 46px; }
.nav-sublink { font-size: 13px; min-height: 36px; }
.nav-group summary { font-size: 13px; min-height: 42px; }
.nav-section-label { font-size: 9px; }
.top-search input { font-size: 14px; }
.top-user-copy strong { font-size: 13px; }
.top-user-copy span { font-size: 11px; }
.page-heading h1 { font-size: 28px; }
.page-heading p { font-size: 14px; }
.stat-label { font-size: 13px; }
.stat-value { font-size: 30px; }
.stat-caption { font-size: 12px; }
.card-header h2, .card-header h3 { font-size: 17px; }
.card-header p { font-size: 12px; }
th { font-size: 11px; padding: 13px 15px; }
td { font-size: 13px; padding: 14px 15px; }
.table-primary { font-size: 13px; }
.table-secondary { font-size: 12px; }
.button { font-size: 13px; }
.button-sm { font-size: 12px; }
.form-label { font-size: 12px; }
.form-control, .toolbar select, .toolbar input { font-size: 13px; }
.status-badge { font-size: 11px; padding: 5px 9px; font-weight: 700; }

/* Exact workflow colors requested by the portal owner. */
.status-new { color: #2563EB; background: #EFF6FF; border-color: #BFDBFE; }
.status-unassigned { color: #6B7280; background: #F3F4F6; border-color: #D1D5DB; }
.status-working { color: #F59E0B; background: #FFFBEB; border-color: #FCD34D; }
.status-approval { color: #7C3AED; background: #F5F3FF; border-color: #C4B5FD; }
.status-changes { color: #EF4444; background: #FEF2F2; border-color: #FCA5A5; }
.status-completed { color: #16A34A; background: #F0FDF4; border-color: #86EFAC; }
.status-assigned-person { color: #2563EB; background: #EFF6FF; border-color: #BFDBFE; }
.stat-icon.red { color:#EF4444; background:#FEF2F2; }

.stat-link { color: inherit; text-decoration: none; display: block; }
.workflow-tabs { display:flex; gap:8px; align-items:stretch; flex-wrap:wrap; margin:0 0 14px; }
.workflow-tab { min-height:44px; display:flex; align-items:center; gap:9px; padding:8px 13px; border:1px solid var(--border); border-radius:10px; background:#fff; color:#4B5563; text-decoration:none; font-size:12px; font-weight:700; transition:.18s ease; }
.workflow-tab strong { min-width:24px; height:24px; display:grid; place-items:center; border-radius:999px; background:#F3F4F6; color:#374151; font-size:11px; }
.workflow-tab:hover { transform:translateY(-1px); box-shadow:var(--shadow-hover); }
.workflow-tab.active { border-color:currentColor; box-shadow:0 6px 18px rgba(17,24,39,.08); }
.workflow-tab.tone-new.active { color:#2563EB; background:#EFF6FF; }
.workflow-tab.tone-unassigned.active { color:#6B7280; background:#F3F4F6; }
.workflow-tab.tone-working.active { color:#B45309; background:#FFFBEB; }
.workflow-tab.tone-approval.active { color:#7C3AED; background:#F5F3FF; }
.workflow-tab.tone-changes.active { color:#EF4444; background:#FEF2F2; }
.workflow-tab.tone-completed.active { color:#16A34A; background:#F0FDF4; }
.workflow-tab.tone-all.active { color:var(--primary); background:var(--primary-soft); }
.workflow-tab-form { margin-left:auto; }

.workflow-status-grid { display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); gap:10px; margin:0 0 14px; }
.workflow-status-grid.compact { grid-template-columns:repeat(4,minmax(0,1fr)); }
.workflow-status-card { min-height:76px; border:1px solid var(--border); border-left:4px solid currentColor; border-radius:12px; background:#fff; padding:14px 15px; display:flex; align-items:center; justify-content:space-between; gap:12px; text-decoration:none; box-shadow:var(--shadow); transition:.18s ease; }
.workflow-status-card:hover { transform:translateY(-2px); box-shadow:var(--shadow-hover); }
.workflow-status-card span { color:#4B5563; font-size:12px; font-weight:700; }
.workflow-status-card strong { font-size:24px; color:currentColor; }
.tone-new { color:#2563EB; }
.tone-unassigned { color:#6B7280; }
.tone-working { color:#F59E0B; }
.tone-approval { color:#7C3AED; }
.tone-changes { color:#EF4444; }
.tone-completed { color:#16A34A; }
.tone-all { color:var(--primary); }

.filter-toolbar { display:flex; flex-wrap:wrap; align-items:end; gap:9px; }
.filter-toolbar .search-field { flex:1 1 270px; }
.date-filter { display:grid; gap:4px; min-width:150px; }
.date-filter span { font-size:10px; color:var(--muted); font-weight:700; text-transform:uppercase; letter-spacing:.05em; }
.date-filter input { height:40px; border:1px solid var(--border); border-radius:8px; padding:0 10px; background:#fff; color:var(--text); }
.nav-badge { margin-left:auto; min-width:20px; height:20px; display:grid; place-items:center; border-radius:999px; background:#EF4444; color:#fff; font-size:10px; font-weight:800; }

.notification-menu { position:relative; }
.notification-trigger { position:relative; }
.notification-count { position:absolute; top:-5px; right:-5px; min-width:18px; height:18px; padding:0 4px; display:grid; place-items:center; border-radius:999px; background:#EF4444; color:#fff; border:2px solid #fff; font-size:9px; font-weight:800; }
.notification-dropdown { position:absolute; top:calc(100% + 12px); right:0; width:min(390px,calc(100vw - 24px)); background:#fff; border:1px solid var(--border); border-radius:14px; box-shadow:0 18px 50px rgba(17,24,39,.18); opacity:0; visibility:hidden; transform:translateY(-6px) scale(.98); transform-origin:top right; transition:.18s ease; z-index:160; overflow:hidden; }
.notification-menu.open .notification-dropdown { opacity:1; visibility:visible; transform:translateY(0) scale(1); }
.notification-head { display:flex; justify-content:space-between; align-items:center; padding:14px 16px; border-bottom:1px solid var(--border); }
.notification-head>div { display:grid; gap:2px; }
.notification-head strong { font-size:14px; }
.notification-head span { font-size:11px; color:var(--muted); }
.notification-head a,.notification-footer { color:var(--primary); text-decoration:none; font-size:11px; font-weight:700; }
.notification-list { max-height:380px; overflow:auto; }
.notification-item { margin:0; border-bottom:1px solid #EEF0F5; }
.notification-item button { width:100%; border:0; background:#fff; text-align:left; display:grid; grid-template-columns:8px 1fr; gap:10px; padding:12px 15px; cursor:pointer; }
.notification-item.unread button { background:#F8FAFF; }
.notification-item button:hover { background:var(--primary-softer); }
.notification-dot { width:7px; height:7px; margin-top:6px; border-radius:50%; background:#D1D5DB; }
.notification-item.unread .notification-dot { background:#2563EB; box-shadow:0 0 0 4px #DBEAFE; }
.notification-item strong { display:block; font-size:12px; color:#1F2937; }
.notification-item small { display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; margin-top:3px; color:#6B7280; font-size:11px; line-height:1.45; }
.notification-item time { display:block; margin-top:5px; color:#9CA3AF; font-size:9px; }
.notification-empty { padding:28px 16px; text-align:center; color:var(--muted); font-size:12px; }
.notification-footer { display:block; padding:12px 16px; text-align:center; border-top:1px solid var(--border); background:#FAFAFD; }
.notification-center-list { display:grid; }
.notification-center-item { display:grid; grid-template-columns:38px 1fr auto; gap:12px; align-items:center; padding:15px 18px; border-bottom:1px solid var(--border); }
.notification-center-item.unread { background:#F8FAFF; }
.notification-center-icon { width:36px; height:36px; display:grid; place-items:center; border-radius:10px; background:var(--primary-soft); color:var(--primary); }
.notification-center-copy strong { font-size:13px; }
.notification-center-copy p { margin:4px 0; color:#5F6478; font-size:12px; }
.notification-center-copy time { color:#9CA3AF; font-size:10px; }
.notification-center-actions { display:flex; gap:6px; }
.file-unavailable { display:inline-flex; align-items:center; gap:5px; color:#B91C1C; font-size:11px; font-weight:700; }

@media (max-width:1200px){ .workflow-status-grid { grid-template-columns:repeat(4,minmax(0,1fr)); } }
@media (max-width:760px){
  body { font-size:14px; }
  .page-heading h1 { font-size:24px; }
  .workflow-status-grid,.workflow-status-grid.compact { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .workflow-tab { flex:1 1 calc(50% - 8px); }
  .notification-center-item { grid-template-columns:36px 1fr; }
  .notification-center-actions { grid-column:2; }
  .date-filter { flex:1 1 145px; }
}
.reference-card-title .status-badge.status-new { color:#2563EB;background:#EFF6FF;border-color:#BFDBFE; }
.reference-card-title .status-badge.status-unassigned { color:#6B7280;background:#F3F4F6;border-color:#D1D5DB; }
.reference-card-title .status-badge.status-working { color:#F59E0B;background:#FFFBEB;border-color:#FCD34D; }
.reference-card-title .status-badge.status-approval { color:#7C3AED;background:#F5F3FF;border-color:#C4B5FD; }
.reference-card-title .status-badge.status-changes { color:#EF4444;background:#FEF2F2;border-color:#FCA5A5; }
.reference-card-title .status-badge.status-completed { color:#16A34A;background:#F0FDF4;border-color:#86EFAC; }
.nav-sublink { position:relative; overflow:hidden; }

/* V2.8 — Realtime notifications and readable 14px typography */
body.app-page { font-size:14px; }
body.app-page button,
body.app-page input,
body.app-page select,
body.app-page textarea { font-family:Inter,system-ui,-apple-system,"Segoe UI",sans-serif; font-size:14px; }
.nav-link,.nav-sublink,.nav-group summary { font-size:14px; }
.nav-link { min-height:48px; }
.nav-sublink { min-height:40px; }
.nav-group summary { min-height:46px; }
.nav-section-label { font-size:12px; }
.brand-name,.top-user-copy strong,.profile-copy strong { font-size:14px; }
.brand-subtitle,.topbar-brand-copy small,.top-user-copy span,.profile-copy span { font-size:12px; }
.top-search input,.page-heading p,.alert,.stat-label,.stat-caption,
.card-header p,.table-secondary,.form-label,.form-help,.form-error,
.form-section-title,.checkbox-card strong,.checkbox-card span,
.switch-copy strong,.switch-copy span,.empty-state p,.info-label,
.file-copy strong,.file-copy span,.timeline-copy strong,.timeline-copy p,
.timeline-copy time,.mini-row,.progress-label,.page-link,.code-pill,
.note-box,.auth-head p,.auth-footer,.auth-note,.impersonation-banner strong,
.impersonation-banner span,.format-option strong,.format-option span,
.color-preset strong,.color-preset small,.customer-summary span,
.customer-summary strong,.check-list,.order-count-pill,.reference-card-title,
.reference-design-name span,.reference-design-name strong,.order-spec-row span,
.order-spec-row strong,.summary-list span,.summary-list strong,
.instruction-panel h3,.instruction-panel>div,.reference-files a,
.ready-options-title,.ready-option-card h3,.compact-file-input,
.compact-file-input input,.workflow-tab,.workflow-tab strong,
.workflow-status-card span,.date-filter span,.file-unavailable { font-size:14px; }
th,td,.table-primary,.button,.button-sm,.form-control,.toolbar select,.toolbar input,
.status-badge { font-size:14px; }
th { letter-spacing:.055em; }
.card-header h2,.card-header h3 { font-size:18px; }
.page-heading h1 { font-size:30px; }
.stat-value { font-size:30px; }
.notification-head strong,.notification-head span,.notification-head a,
.notification-footer,.notification-item strong,.notification-item small,
.notification-item time,.notification-empty,.notification-center-copy strong,
.notification-center-copy p,.notification-center-copy time { font-size:14px; }
.notification-item button { padding:14px 16px; }
.notification-count,.nav-badge { font-size:11px; }
.notification-live-toast {
    position:fixed; right:22px; top:82px; z-index:250; width:min(380px,calc(100vw - 28px));
    display:grid; grid-template-columns:38px 1fr auto; gap:11px; align-items:start;
    padding:14px; border:1px solid color-mix(in srgb,var(--primary) 24%,#dfe3ec);
    border-radius:14px; background:#fff; color:#202438;
    box-shadow:0 18px 55px rgba(17,24,39,.2); opacity:0; transform:translateY(-12px) scale(.98);
    pointer-events:none; transition:opacity .2s ease,transform .2s ease;
}
.notification-live-toast.show { opacity:1; transform:translateY(0) scale(1); pointer-events:auto; }
.notification-live-toast-icon { width:38px; height:38px; display:grid; place-items:center; border-radius:11px; background:var(--primary-soft); color:var(--primary); }
.notification-live-toast-copy strong { display:block; font-size:14px; }
.notification-live-toast-copy span { display:block; margin-top:4px; color:#667085; font-size:14px; line-height:1.45; }
.notification-live-toast-close { border:0; background:transparent; color:#98A2B3; cursor:pointer; font-size:20px; line-height:1; padding:0 2px; }
.notification-sync-dot { position:absolute; right:2px; bottom:2px; width:7px; height:7px; border-radius:50%; background:#16A34A; border:2px solid #fff; opacity:0; transition:opacity .2s ease; }
.notification-menu.is-live .notification-sync-dot { opacity:1; }
@media (max-width:760px) {
  body.app-page { font-size:14px; }
  .page-heading h1 { font-size:26px; }
  .notification-live-toast { right:14px; top:72px; }
}

/* V2.9 — reference service navigation, order actions, quick view modals */
.nav-service-group{margin:5px 0 9px}.nav-service-link{display:grid;grid-template-columns:24px 1fr auto;align-items:center;min-height:44px;padding:0 10px;border-radius:10px;color:#e1e2ef;text-decoration:none;font-size:14px;font-weight:700;transition:.17s ease}.nav-service-link:hover,.nav-service-link.active{background:var(--primary);color:#fff;transform:translateX(1px)}.nav-service-submenu{display:grid;gap:1px;margin:2px 0 4px}.nav-service-submenu .nav-sublink{margin-left:34px;justify-content:space-between}.nav-service-count{min-width:22px;height:20px;padding:0 6px;display:inline-grid;place-items:center;border-radius:999px;background:#2d2765;color:#d8d9ef;font-size:12px;font-weight:800}.nav-service-link.active .nav-service-count{background:rgba(255,255,255,.2);color:#fff}.service-filter-strip{display:flex;gap:8px;flex-wrap:wrap;margin:0 0 14px}.service-filter-pill{min-height:42px;display:inline-flex;align-items:center;padding:0 15px;border:1px solid var(--border);border-radius:10px;background:#fff;color:#4b5064;text-decoration:none;font-size:14px;font-weight:700;transition:.18s ease}.service-filter-pill:hover{border-color:var(--primary);color:var(--primary);transform:translateY(-1px)}.service-filter-pill.active{background:var(--primary);border-color:var(--primary);color:#fff;box-shadow:0 7px 18px color-mix(in srgb,var(--primary) 25%,transparent)}
.reference-order-table{min-width:1500px}.reference-order-table th{background:#101a4d;color:#fff;white-space:nowrap}.reference-order-table tbody tr:hover td{background:#f8f9fd}.mini-action{position:relative;width:34px;height:34px;border:0;border-radius:9px;display:inline-grid;place-items:center;color:#fff;text-decoration:none;cursor:pointer;transition:transform .16s ease,filter .16s ease}.mini-action:hover{transform:translateY(-2px);filter:brightness(.96)}.mini-action.edit{background:#f59e0b}.mini-action.view{background:#2563eb}.mini-action.upload{background:#16a34a}.action-count{position:absolute;right:-6px;top:-6px;min-width:18px;height:18px;padding:0 4px;display:grid;place-items:center;border-radius:999px;background:#fff;color:#111827;border:1px solid #d7dae4;font-size:10px;font-weight:800}.instruction-action{display:inline-flex;align-items:center;gap:7px;text-decoration:none;color:#5b6075}.instruction-action b{width:30px;height:30px;border-radius:8px;display:grid;place-items:center;background:#2563eb;color:#fff;font-size:17px}.instruction-action:hover b{transform:translateY(-1px)}.quick-order-modal{width:min(1240px,calc(100vw - 30px));max-width:none}.quick-view-grid{display:grid;grid-template-columns:minmax(0,1.75fr) minmax(300px,.75fr);gap:18px}.quick-view-main{min-width:0}.quick-view-grid .card{margin:0}.quick-view-grid .reference-side-stack{display:grid;gap:14px}.quick-additional{margin-top:14px}.quick-additional h3{justify-content:space-between}.quick-additional h3>span{display:flex;align-items:center;gap:7px}.additional-note{padding:12px 0;border-bottom:1px solid var(--border)}.additional-note:last-child{border-bottom:0}.additional-note strong{font-size:14px}.additional-note span{margin-left:8px;color:var(--muted);font-size:12px}.additional-note p{margin:7px 0 0;line-height:1.6}.quick-files-head{display:flex;justify-content:space-between;gap:12px;align-items:center;margin-bottom:14px}.quick-files-head>div{display:grid;gap:4px}.quick-files-head span{color:var(--muted)}
@media(max-width:900px){.quick-view-grid{grid-template-columns:1fr}.service-filter-pill{flex:1 1 180px}.reference-order-table{min-width:1300px}}

/* V2.10 — same-page Edit / View / Uploaded Files modal workflow */
.instruction-action{border:0;background:transparent;font:inherit;cursor:pointer;padding:0}
.quick-edit-form{display:grid;gap:16px}
.quick-edit-head{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:2px 2px 12px;border-bottom:1px solid var(--border)}
.quick-edit-head>div{display:grid;gap:4px}.quick-edit-head>div>strong{font-size:18px}.quick-edit-head>div>span{font-size:13px;color:var(--muted)}
.quick-edit-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px 16px}
.quick-edit-grid .full{grid-column:1/-1}
.quick-edit-checks{display:flex;gap:12px;flex-wrap:wrap;padding:12px 14px;border:1px solid var(--border);background:#f8f9fd;border-radius:10px}
.quick-edit-checks label{display:flex;align-items:center;gap:8px;font-size:14px;font-weight:600;color:var(--text);cursor:pointer}
.quick-edit-checks input{width:17px;height:17px;accent-color:var(--primary)}
.form-help-inline{font-size:12px;color:var(--muted);font-weight:500;margin-left:5px}
.quick-edit-existing{border:1px solid var(--border);border-radius:12px;padding:14px 16px;background:#fbfbfd;display:grid;gap:7px}
.quick-edit-existing>strong{font-size:14px}.quick-edit-existing>span{font-size:13px;color:var(--muted)}
.quick-edit-error{margin:0}
.quick-edit-actions{display:flex;align-items:center;justify-content:flex-end;gap:10px;padding-top:2px}
.reference-file-unavailable{display:flex;align-items:center;gap:7px;padding:9px 0;color:#9ca3af;font-size:13px}
@media(max-width:1050px){.quick-edit-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:700px){.quick-edit-grid{grid-template-columns:1fr}.quick-edit-grid .full{grid-column:auto}.quick-edit-head{align-items:flex-start}.quick-edit-actions .button{flex:1}}

/* V2.11 — Refined sidebar navigation + custom scrollbars */
:root { --sidebar: 264px; }

/* Page scrollbar */
html {
    scrollbar-width: thin;
    scrollbar-color: #b7bcc9 #eef0f5;
}
html::-webkit-scrollbar { width: 10px; height: 10px; }
html::-webkit-scrollbar-track { background: #eef0f5; }
html::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg,#c1c5d1,#aeb4c3);
    border: 2px solid #eef0f5;
    border-radius: 999px;
}
html::-webkit-scrollbar-thumb:hover { background: linear-gradient(180deg,#aeb4c3,#979eaf); }

.sidebar {
    background:
        radial-gradient(circle at 18% -5%, color-mix(in srgb,var(--primary) 20%,transparent), transparent 32%),
        linear-gradient(180deg,#11122b 0%,#151633 50%,#12132d 100%);
    border-right: 1px solid rgba(255,255,255,.075);
    box-shadow: 10px 0 32px rgba(16,18,45,.075);
}
.brand-block {
    min-height: 86px;
    background: linear-gradient(180deg,rgba(255,255,255,.018),rgba(255,255,255,0));
}
.brand-mark {
    width: 34px !important;
    height: 34px !important;
    border-radius: 11px !important;
}
.brand-name { font-size: 15px; letter-spacing: -.025em; }
.brand-subtitle { margin-top: 4px; font-size: 9px; letter-spacing: .14em; }

/* Slim sidebar-only scrollbar */
.sidebar-nav {
    padding: 16px 11px 24px;
    scrollbar-width: thin;
    scrollbar-color: rgba(145,137,217,.55) transparent;
    scrollbar-gutter: stable;
    overscroll-behavior: contain;
}
.sidebar-nav::-webkit-scrollbar { width: 8px; }
.sidebar-nav::-webkit-scrollbar-track { background: transparent; margin: 8px 0; }
.sidebar-nav::-webkit-scrollbar-thumb {
    background: rgba(151,145,208,.46);
    border: 2px solid transparent;
    background-clip: padding-box;
    border-radius: 999px;
    min-height: 56px;
}
.sidebar-nav::-webkit-scrollbar-thumb:hover {
    background: color-mix(in srgb,var(--primary) 76%,#a8a7c4);
    border: 2px solid transparent;
    background-clip: padding-box;
}

.nav-section-label {
    margin: 5px 6px 7px;
    padding: 11px 5px 5px;
    color: #7e81a5;
    font-size: 10px;
    letter-spacing: .16em;
    font-weight: 800;
}
.nav-link {
    min-height: 44px;
    padding: 0 12px;
    border-radius: 11px;
    color: #c0c2d6;
    font-weight: 650;
    gap: 11px;
}
.nav-link .nav-icon { width: 20px; color: #8f92b0; }
.nav-link:hover {
    background: rgba(255,255,255,.055);
    color: #fff;
    transform: translateX(2px);
}
.nav-link.active {
    background: linear-gradient(100deg,var(--primary),var(--primary-dark));
    color: #fff;
    box-shadow: 0 8px 22px color-mix(in srgb,var(--primary) 28%,transparent), inset 0 1px 0 rgba(255,255,255,.15);
}

/* Each workflow becomes a visually separated sidebar group. */
.nav-service-group {
    position: relative;
    margin: 6px 0 10px;
    padding: 4px;
    border: 1px solid rgba(255,255,255,.045);
    border-radius: 13px;
    background: rgba(255,255,255,.018);
    transition: border-color .18s ease, background .18s ease, box-shadow .18s ease;
}
.nav-service-group:hover {
    border-color: rgba(255,255,255,.085);
    background: rgba(255,255,255,.028);
}
.nav-service-group:has(.nav-service-link.active),
.nav-service-group:has(.nav-sublink.active) {
    border-color: color-mix(in srgb,var(--primary) 42%,rgba(255,255,255,.08));
    background: color-mix(in srgb,var(--primary) 7%,rgba(255,255,255,.018));
    box-shadow: 0 9px 24px rgba(7,8,28,.16);
}
.nav-service-link {
    min-height: 46px;
    padding: 0 10px;
    border-radius: 10px;
    color: #e5e6f2;
    font-size: 14px;
    font-weight: 750;
    grid-template-columns: 24px minmax(0,1fr) auto;
}
.nav-service-link > span:nth-child(2) {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.nav-service-link:hover {
    background: rgba(255,255,255,.055);
    color: #fff;
    transform: none;
}
.nav-service-link.active {
    background: linear-gradient(100deg,var(--primary),var(--primary-dark));
    color: #fff;
    box-shadow: 0 7px 18px color-mix(in srgb,var(--primary) 22%,transparent);
    transform: none;
}
.nav-service-link .nav-icon { color: #a3a5c2; }
.nav-service-link.active .nav-icon { color: #fff; }
.nav-service-count {
    min-width: 24px;
    height: 22px;
    padding: 0 7px;
    border: 1px solid rgba(255,255,255,.055);
    background: #292956;
    color: #d8d9ef;
    font-size: 11px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.035);
}
.nav-service-link.active .nav-service-count {
    background: rgba(255,255,255,.18);
    border-color: rgba(255,255,255,.14);
}
.nav-service-submenu {
    position: relative;
    display: grid;
    gap: 2px;
    margin: 3px 3px 5px 13px;
    padding: 3px 0 3px 13px;
}
.nav-service-submenu::before {
    content: '';
    position: absolute;
    left: 3px;
    top: 7px;
    bottom: 7px;
    width: 1px;
    background: linear-gradient(180deg,transparent,rgba(159,162,197,.24) 15%,rgba(159,162,197,.24) 85%,transparent);
}
.nav-service-submenu .nav-sublink {
    margin: 0;
    min-height: 36px;
    padding: 0 9px 0 12px;
    border-radius: 9px;
    color: #aeb1ca;
    font-size: 13px;
    font-weight: 550;
    justify-content: space-between;
    transition: background .16s ease,color .16s ease,transform .16s ease;
}
.nav-service-submenu .nav-sublink::before {
    width: 5px;
    height: 5px;
    margin-right: 8px;
    box-shadow: 0 0 0 3px rgba(255,255,255,.018);
}
.nav-service-submenu .nav-sublink:hover {
    background: rgba(255,255,255,.045);
    color: #f4f4fb;
    transform: translateX(2px);
}
.nav-service-submenu .nav-sublink.active {
    background: color-mix(in srgb,var(--primary) 20%,transparent);
    color: #fff;
    font-weight: 700;
    transform: none;
}
.nav-service-submenu .nav-sublink.active::before {
    background: var(--primary);
    opacity: 1;
    box-shadow: 0 0 0 3px color-mix(in srgb,var(--primary) 18%,transparent);
}
.nav-service-submenu .nav-sublink.active .nav-service-count {
    color: #fff;
    background: color-mix(in srgb,var(--primary) 45%,#262650);
    border-color: color-mix(in srgb,var(--primary) 45%,transparent);
}

.sidebar-profile {
    min-height: 78px;
    padding: 13px 15px;
    background: rgba(7,8,24,.28);
    border-top: 1px solid rgba(255,255,255,.075);
    backdrop-filter: blur(8px);
}
.profile-avatar { width: 34px; height: 34px; }
.profile-copy strong { font-size: 13px; }
.profile-copy span { font-size: 11px; }
.profile-logout { width: 32px; height: 32px; border-radius: 9px; }

/* Tables/cards can scroll horizontally without the default chunky browser bar. */
.table-wrap,
.modal-body,
.quick-order-modal {
    scrollbar-width: thin;
    scrollbar-color: #c5c8d4 transparent;
}
.table-wrap::-webkit-scrollbar,
.modal-body::-webkit-scrollbar,
.quick-order-modal::-webkit-scrollbar { width: 8px; height: 8px; }
.table-wrap::-webkit-scrollbar-track,
.modal-body::-webkit-scrollbar-track,
.quick-order-modal::-webkit-scrollbar-track { background: transparent; }
.table-wrap::-webkit-scrollbar-thumb,
.modal-body::-webkit-scrollbar-thumb,
.quick-order-modal::-webkit-scrollbar-thumb {
    background: #c5c8d4;
    border-radius: 999px;
    border: 2px solid transparent;
    background-clip: padding-box;
}
.table-wrap::-webkit-scrollbar-thumb:hover,
.modal-body::-webkit-scrollbar-thumb:hover,
.quick-order-modal::-webkit-scrollbar-thumb:hover { background: #aeb3c1; background-clip: padding-box; }

@media (max-width: 820px) {
    :root { --sidebar: 278px; }
    .sidebar { box-shadow: 18px 0 55px rgba(8,9,28,.28); }
}


/* V2.12 — File recovery/previews, clean live notifications, and fixed workflow colors */
.notification-count[hidden],.nav-badge[hidden],[data-notification-mark-all][hidden]{display:none!important}
.notification-sync-dot{display:none!important}
.notification-trigger{border:1px solid transparent;transition:background .18s ease,border-color .18s ease,color .18s ease,box-shadow .18s ease}
.notification-trigger.has-unread{color:#dc2626;background:#fff7f7;border-color:#fecaca;box-shadow:0 0 0 3px rgba(239,68,68,.06)}
.notification-trigger.has-unread svg{animation:notificationBellNudge 3.4s ease-in-out infinite}
.notification-count{top:-7px;right:-7px;min-width:20px;height:20px;padding:0 5px;font-size:11px;line-height:1;background:#ef4444;box-shadow:0 3px 8px rgba(239,68,68,.28)}
.notification-dropdown{width:min(420px,calc(100vw - 24px));border-radius:16px;box-shadow:0 24px 64px rgba(17,24,39,.22)}
.notification-head{padding:15px 17px;background:#fbfcff}.notification-head strong{font-size:15px}.notification-head span{font-size:13px}
.notification-item button{grid-template-columns:9px 1fr;padding:14px 16px}.notification-item strong{font-size:14px}.notification-item small{font-size:13px}.notification-item time{font-size:12px}
.notification-empty{font-size:13px}.notification-footer{font-size:13px;padding:13px 16px}
@keyframes notificationBellNudge{0%,88%,100%{transform:rotate(0)}91%{transform:rotate(-8deg)}94%{transform:rotate(7deg)}97%{transform:rotate(-4deg)}}

/* Workflow stage colors stay identical for Admin, Super Admin, Client and Digitizer. */
.nav-service-submenu .nav-stage-new .nav-service-count{background:rgba(37,99,235,.18);border-color:rgba(96,165,250,.22);color:#93c5fd}
.nav-service-submenu .nav-stage-processing .nav-service-count{background:rgba(245,158,11,.16);border-color:rgba(251,191,36,.22);color:#fbbf24}
.nav-service-submenu .nav-stage-ready .nav-service-count{background:rgba(22,163,74,.17);border-color:rgba(74,222,128,.2);color:#86efac}
.nav-service-submenu .nav-stage-new.active{background:rgba(37,99,235,.16);color:#dbeafe}.nav-service-submenu .nav-stage-new.active::before{background:#2563eb;box-shadow:0 0 0 3px rgba(37,99,235,.18)}
.nav-service-submenu .nav-stage-processing.active{background:rgba(245,158,11,.14);color:#fef3c7}.nav-service-submenu .nav-stage-processing.active::before{background:#f59e0b;box-shadow:0 0 0 3px rgba(245,158,11,.16)}
.nav-service-submenu .nav-stage-ready.active{background:rgba(22,163,74,.14);color:#dcfce7}.nav-service-submenu .nav-stage-ready.active::before{background:#16a34a;box-shadow:0 0 0 3px rgba(22,163,74,.16)}

.uploaded-file-row{gap:12px}.uploaded-file-thumb{width:52px;height:52px;flex:0 0 52px;border-radius:9px;overflow:hidden;border:1px solid var(--border);background:#f5f6fa;display:block}
.uploaded-file-thumb img{width:100%;height:100%;display:block;object-fit:cover}.file-row-actions{display:flex;align-items:center;gap:7px;flex-wrap:wrap}.file-unavailable{color:#dc2626;font-weight:700;font-size:13px}
.reference-file-actions{display:grid;grid-template-columns:minmax(0,1fr) auto auto;align-items:center;gap:8px;padding:9px 10px;border:1px solid var(--border);border-radius:9px;background:#fbfcff}.reference-file-actions strong{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:13px}
@media(max-width:620px){.reference-file-actions{grid-template-columns:1fr}.reference-file-actions .button{width:100%;justify-content:center}.file-row-actions{width:100%}}

/* V2.13 — workflow accordion + pending approval badge */
.nav-service-link{
    width:100%;
    border:0;
    background:transparent;
    text-align:left;
    cursor:pointer;
    appearance:none;
    -webkit-appearance:none;
    grid-template-columns:24px minmax(0,1fr) auto 18px !important;
}
.nav-service-label{min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.nav-service-caret{display:grid;place-items:center;color:#8589a7;transition:transform .18s ease,color .18s ease}
.nav-service-group.is-open .nav-service-caret{transform:rotate(90deg);color:#fff}
.nav-service-submenu[hidden]{display:none !important}
.nav-service-group:not(.is-open){padding-bottom:4px}
.nav-service-group:not(.is-open) .nav-service-link.active{background:color-mix(in srgb,var(--primary) 13%,rgba(255,255,255,.025));box-shadow:none}
.nav-stage-all .nav-service-count{background:rgba(124,58,237,.16);color:#c4b5fd}
.nav-badge-approval{margin-left:auto;background:#ef4444 !important;color:#fff !important;box-shadow:0 0 0 3px rgba(239,68,68,.12)}
.pending-approval-card{border:1px solid #fde68a;background:linear-gradient(135deg,#fffbeb,#fff);box-shadow:0 8px 24px rgba(245,158,11,.08)}
.pending-approval-card .card-header{border-bottom-color:#fde68a}
.pending-client-row{background:#fffdf7}
.approval-actions{display:flex;gap:7px;flex-wrap:wrap;align-items:center}
.button-approve{background:#16a34a;color:#fff;border-color:#16a34a}
.button-approve:hover{background:#15803d;border-color:#15803d;color:#fff}


/* V2.14 — Client privacy + compact notification counters */
.notification-trigger {
    overflow: visible;
}
.notification-count {
    top: 3px;
    right: 3px;
    min-width: 15px;
    width: auto;
    height: 15px;
    padding: 0 3px;
    border: 1.5px solid #fff;
    font-size: 9px;
    line-height: 1;
    letter-spacing: -.02em;
    box-shadow: 0 2px 6px rgba(239,68,68,.28);
    transform: translate(35%,-35%);
    z-index: 3;
}
.notification-trigger:not(.has-unread) .notification-count,
.notification-count[hidden] { display:none !important; }
.topbar-actions .notification-menu {
    display:flex;
    align-items:center;
    justify-content:center;
}
@media (max-width: 700px) {
    .notification-count { top:2px; right:2px; transform:translate(25%,-25%); }
}

/* V2.15 — mobile responsiveness hardening */
@media (max-width: 700px) {
    html, body { max-width: 100%; overflow-x: hidden; }
    .main-shell, .page-content, .card, .toolbar, .stat-card { min-width: 0; max-width: 100%; }
    .page-content { width: 100%; }
    .page-heading { gap: 12px; }
    .heading-actions { width: 100%; }
    .heading-actions .button { width: 100%; justify-content: center; }

    .service-filter-strip {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        width: 100%;
    }
    .service-filter-pill {
        min-width: 0;
        width: 100%;
        justify-content: center;
        text-align: center;
        padding-inline: 10px;
    }
    .workflow-tabs {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        width: 100%;
    }
    .workflow-tab { width: 100%; justify-content: center; }

    .filter-toolbar {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-items: end;
        width: 100%;
    }
    .filter-toolbar .search-field { grid-column: 1 / -1; width: 100%; max-width: none; }
    .filter-toolbar .search-field input,
    .filter-toolbar select,
    .filter-toolbar .form-control,
    .filter-toolbar .date-filter,
    .filter-toolbar .button { width: 100%; min-width: 0; }
    .filter-toolbar .button { justify-content: center; }

    .card-header { align-items: flex-start; flex-wrap: wrap; gap: 10px; }
    .table-wrap { max-width: 100%; }

    .notification-dropdown {
        position: fixed;
        top: calc(var(--topbar) + 8px);
        left: 10px;
        right: 10px;
        width: auto;
        max-height: calc(100dvh - var(--topbar) - 18px);
        overflow-y: auto;
        transform-origin: top center;
    }

    .modal-backdrop { padding: 8px; }
    .modal, .modal-xl, .quick-order-modal {
        width: calc(100vw - 16px);
        max-width: calc(100vw - 16px);
        max-height: calc(100dvh - 16px);
    }
    .modal-body { padding: 14px; }
    .modal-header { padding: 14px; }
    .modal-footer { padding: 11px 14px; }
}

@media (max-width: 430px) {
    .topbar { padding-inline: 8px; gap: 5px; }
    .topbar-actions { gap: 4px; }
    .page-content { padding: 14px 10px 26px; }
    .page-heading h1 { font-size: 22px; }
    .page-heading p { line-height: 1.5; }

    .service-filter-strip { grid-template-columns: 1fr; }
    .filter-toolbar { grid-template-columns: 1fr; }
    .filter-toolbar .search-field,
    .filter-toolbar select,
    .filter-toolbar .date-filter,
    .filter-toolbar .button { grid-column: 1; }

    .workflow-status-grid,
    .workflow-status-grid.compact { grid-template-columns: 1fr; }

    .notification-dropdown { left: 6px; right: 6px; }
    .notification-head { padding-inline: 12px; }
    .notification-item button { padding-inline: 12px; }

    .modal-backdrop { padding: 6px; align-items: flex-start; }
    .modal, .modal-xl, .quick-order-modal {
        width: calc(100vw - 12px);
        max-width: calc(100vw - 12px);
        max-height: calc(100dvh - 12px);
        margin-top: 0;
        border-radius: 11px;
    }
    .modal-footer .button { min-width: 0; }
}

/* V2.16 — account management, profile center, clickable management filters */
.top-user-link { color: inherit; text-decoration: none; transition: background .16s ease, box-shadow .16s ease, transform .16s ease; }
.top-user-link:hover { background: var(--primary-soft); box-shadow: 0 0 0 1px color-mix(in srgb,var(--primary) 18%,transparent); transform: translateY(-1px); }

.management-stat-grid .stat-card { cursor: pointer; }
.management-stat-grid .stat-card.is-filter-active {
    border-color: color-mix(in srgb,var(--primary) 48%,var(--border));
    box-shadow: 0 10px 28px color-mix(in srgb,var(--primary) 13%,transparent);
}
.management-stat-grid .stat-card.is-filter-active::after {
    content: '';
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 3px;
    background: var(--primary);
}
.management-stat-grid.three { grid-template-columns: repeat(3,minmax(0,1fr)); }
.account-action-row { display:flex; gap:6px; flex-wrap:wrap; align-items:center; }
.modal-wide { max-width: 820px; }

.profile-overview-grid {
    display: grid;
    grid-template-columns: 1.35fr 1fr 1fr;
    gap: 14px;
    margin-bottom: 14px;
}
.profile-summary-card,
.profile-completion-card,
.account-meta-card { min-height: 176px; padding: 20px; }
.profile-summary-card { display:flex; align-items:center; gap:16px; }
.profile-summary-avatar {
    width: 68px; height:68px; border-radius:20px; flex:0 0 68px;
    display:grid; place-items:center; font-size:22px; font-weight:800; color:#fff;
    background:linear-gradient(145deg,var(--primary),var(--primary-dark));
    box-shadow:0 12px 30px var(--primary-shadow);
}
.profile-summary-copy { min-width:0; }
.profile-summary-copy .eyebrow,
.profile-completion-card .eyebrow { display:block; font-size:11px; font-weight:800; letter-spacing:.09em; color:var(--muted); margin-bottom:6px; }
.profile-summary-copy h2 { margin:0 0 5px; font-size:21px; line-height:1.25; }
.profile-summary-copy p { margin:0 0 12px; color:var(--muted); overflow-wrap:anywhere; }
.profile-completion-card { display:flex; flex-direction:column; justify-content:center; }
.profile-completion-head { display:flex; justify-content:space-between; align-items:flex-start; gap:10px; }
.profile-completion-head strong { display:block; font-size:30px; line-height:1; margin-top:4px; }
.profile-completion-icon { width:42px; height:42px; border-radius:12px; display:grid; place-items:center; background:var(--primary-soft); color:var(--primary); }
.profile-progress { height:8px; border-radius:999px; overflow:hidden; background:#eceef5; margin:18px 0 10px; }
.profile-progress span { display:block; height:100%; border-radius:inherit; background:linear-gradient(90deg,var(--primary),var(--primary-dark)); }
.profile-completion-card p { margin:0; color:var(--muted); line-height:1.5; }
.account-meta-card { display:flex; flex-direction:column; justify-content:center; }
.account-meta-card > div { display:flex; justify-content:space-between; gap:14px; padding:10px 0; border-bottom:1px solid var(--border); }
.account-meta-card > div:last-child { border-bottom:0; }
.account-meta-card span { color:var(--muted); }
.account-meta-card strong { text-align:right; }
.profile-form-card { margin-bottom:18px; }
.profile-security-confirm { margin:0 20px 4px; padding:16px; border:1px solid var(--border); border-radius:12px; background:#fafbfe; display:grid; grid-template-columns:1fr minmax(260px,360px); gap:20px; align-items:end; }
.profile-security-confirm strong { display:block; margin-bottom:4px; }
.profile-security-confirm p { margin:0; color:var(--muted); }
.profile-security-confirm .form-group { margin:0; }
.profile-form-actions { justify-content:flex-end; gap:8px; }

@media (max-width: 1100px) {
    .profile-overview-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .account-meta-card { grid-column:1 / -1; min-height:unset; }
    .management-stat-grid.three { grid-template-columns: repeat(3,minmax(0,1fr)); }
}
@media (max-width: 700px) {
    .profile-overview-grid { grid-template-columns:1fr; }
    .account-meta-card { grid-column:auto; }
    .profile-summary-card,
    .profile-completion-card,
    .account-meta-card { min-height:unset; }
    .profile-security-confirm { grid-template-columns:1fr; margin-inline:14px; gap:12px; }
    .profile-form-actions { flex-direction:column-reverse; }
    .profile-form-actions .button { width:100%; justify-content:center; }
    .management-stat-grid.three { grid-template-columns:1fr; }
    .modal-wide { max-width:calc(100vw - 16px); }
}
@media (max-width: 430px) {
    .profile-summary-card { align-items:flex-start; }
    .profile-summary-avatar { width:54px; height:54px; flex-basis:54px; border-radius:16px; font-size:18px; }
    .profile-summary-copy h2 { font-size:18px; }
    .account-meta-card > div { align-items:flex-start; flex-direction:column; gap:3px; }
    .account-meta-card strong { text-align:left; }
}
#client-list,#digitizer-list { scroll-margin-top: calc(var(--topbar) + 14px); }

/* ============================================================
   V2.17 — PREMIUM COMMERCIAL DESIGN SYSTEM
   Production SaaS polish: hierarchy, density, cards, tables,
   account menu, modals, accessible accent handling, mobile.
   ============================================================ */
:root{
    --sidebar:252px;
    --topbar:68px;
    --bg:#f5f6fa;
    --surface:#ffffff;
    --surface-soft:#f9fafc;
    --surface-raised:#ffffff;
    --sidebar-bg:#111827;
    --sidebar-hover:rgba(255,255,255,.055);
    --text:#151725;
    --muted:#667085;
    --muted-2:#98a2b3;
    --border:#e5e7ef;
    --border-strong:#d7dae4;
    --radius:14px;
    --radius-sm:10px;
    --radius-lg:18px;
    --shadow:0 1px 2px rgba(16,24,40,.03),0 8px 24px rgba(16,24,40,.045);
    --shadow-hover:0 2px 4px rgba(16,24,40,.04),0 16px 38px rgba(16,24,40,.09);
    --premium-ease:cubic-bezier(.2,.75,.25,1);
}
body.app-page{font-size:14px;line-height:1.5;background:
    radial-gradient(circle at 86% 2%,var(--primary-softer),transparent 24rem),
    var(--bg);color:var(--text)}
.app-shell{padding-top:var(--topbar)}

/* Top bar — one primary action, notifications, one account menu. */
.topbar{height:var(--topbar);padding:0 22px 0 0;gap:18px;background:rgba(255,255,255,.96);border-bottom:1px solid var(--border);box-shadow:0 1px 0 rgba(16,24,40,.02);backdrop-filter:blur(18px) saturate(145%)}
.topbar-brand{width:var(--sidebar);flex:0 0 var(--sidebar);padding:0 20px;border-right:1px solid var(--border)}
.topbar-brand-mark,.brand-mark{width:34px;height:34px;border-radius:10px;background:linear-gradient(145deg,var(--primary),var(--primary-dark));border:1px solid color-mix(in srgb,var(--primary) 72%,#fff);box-shadow:0 7px 18px var(--primary-shadow),inset 0 1px 0 rgba(255,255,255,.2)}
.topbar-brand-copy strong{font-size:16px;font-weight:800;letter-spacing:-.035em}.topbar-brand-copy small{font-size:10px;color:#8a90a2;letter-spacing:.01em}
.top-search{width:min(380px,31vw);height:40px;border-radius:11px;background:#f8f9fc;border:1px solid #e3e6ee;padding:0 12px;box-shadow:inset 0 1px 1px rgba(16,24,40,.015)}
.top-search:focus-within{background:#fff;border-color:var(--primary-ring);box-shadow:0 0 0 4px var(--primary-softer)}
.top-search input{font-size:13px}.search-shortcut{font-size:10px;border-color:#e1e4eb;color:#9297a7}
.topbar-actions{gap:8px}.topbar-divider{display:none}.topbar-actions>.button{min-height:40px;padding-inline:15px;border-radius:10px}
.icon-button{width:40px;height:40px;border-radius:10px}.icon-button:hover{background:var(--primary-softer);color:var(--primary-dark)}

/* Account dropdown */
.top-user-menu{position:relative}.top-user-trigger{border:1px solid #e3e6ee;background:#fff;min-height:44px;padding:5px 8px 5px 5px;border-radius:12px;display:flex;align-items:center;gap:9px;color:var(--text);transition:.18s var(--premium-ease)}
.top-user-trigger:hover{border-color:color-mix(in srgb,var(--primary) 24%,var(--border));background:var(--primary-softer);box-shadow:0 5px 16px rgba(16,24,40,.055)}
.top-user-copy{display:flex;flex-direction:column;min-width:0;text-align:left}.top-user-copy strong{font-size:12.5px;font-weight:750;max-width:150px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.top-user-copy span{font-size:10.5px;color:var(--muted)}
.top-avatar{background:var(--primary-soft);color:var(--primary-dark);border:1px solid var(--primary-ring);font-weight:800}.top-user-chevron{color:#98a2b3;display:grid;place-items:center;transition:transform .18s ease}.top-user-menu.open .top-user-chevron{transform:rotate(180deg)}
.top-user-dropdown{position:absolute;right:0;top:calc(100% + 10px);width:310px;background:#fff;border:1px solid var(--border);border-radius:16px;box-shadow:0 24px 70px rgba(15,23,42,.18);opacity:0;visibility:hidden;transform:translateY(-5px) scale(.985);transform-origin:top right;transition:.18s var(--premium-ease);overflow:hidden;z-index:170}
.top-user-menu.open .top-user-dropdown{opacity:1;visibility:visible;transform:none}.top-user-dropdown-head{padding:16px;display:flex;gap:11px;align-items:center;border-bottom:1px solid #edf0f4;background:linear-gradient(180deg,#fff,#fbfcfe)}.top-avatar-lg{width:38px;height:38px}.top-user-dropdown-head>div:last-child{min-width:0;display:flex;flex-direction:column}.top-user-dropdown-head strong{font-size:13px}.top-user-dropdown-head span{font-size:11px;color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.top-user-dropdown-links{padding:7px}.top-user-dropdown-links>a{display:grid;grid-template-columns:34px minmax(0,1fr);align-items:center;gap:9px;padding:9px;border-radius:10px;text-decoration:none;color:#344054;transition:.14s ease}.top-user-dropdown-links>a:hover{background:var(--primary-softer);color:var(--primary-dark)}.top-user-dropdown-links>a>span{width:34px;height:34px;border-radius:9px;background:#f2f4f7;display:grid;place-items:center;color:#667085}.top-user-dropdown-links>a:hover>span{background:var(--primary-soft);color:var(--primary-dark)}.top-user-dropdown-links strong,.top-user-dropdown-links small{display:block}.top-user-dropdown-links strong{font-size:12px}.top-user-dropdown-links small{font-size:10.5px;color:var(--muted);margin-top:1px}
.top-user-logout{margin:0 7px 7px;padding:10px 11px;border-top:1px solid #edf0f4;color:#b42318;text-decoration:none;display:flex;align-items:center;gap:9px;font-size:12px;font-weight:650;border-radius:9px}.top-user-logout:hover{background:#fff1f0}

/* Notification dropdown refinement */
.notification-trigger{border:1px solid transparent}.notification-trigger.has-unread{background:#fff7f6;border-color:#fee4e2;color:#d92d20}.notification-count{right:-3px;top:-4px;min-width:18px;height:18px;padding:0 4px;border:2px solid #fff;font-size:9px;font-weight:800;box-shadow:0 2px 6px rgba(217,45,32,.25)}
.notification-dropdown{width:min(410px,calc(100vw - 24px));border-radius:16px;border-color:#e4e7ec;box-shadow:0 24px 64px rgba(15,23,42,.18)}.notification-head{padding:15px 16px}.notification-head strong{font-size:14px}.notification-head span{font-size:11px}.notification-item button{padding:12px 15px}.notification-item.unread{background:var(--primary-softer)}.notification-item strong{font-size:12px}.notification-item small{font-size:11px;line-height:1.4}.notification-footer{padding:11px 16px;font-weight:650}

/* Sidebar — calm, commercial, less boxed. */
.sidebar{top:var(--topbar);height:calc(100vh - var(--topbar));background:linear-gradient(180deg,#111827 0%,#14182b 100%);border-right:1px solid rgba(255,255,255,.055);box-shadow:8px 0 30px rgba(15,23,42,.06)}
.sidebar .brand-block{display:none}.sidebar-nav{padding:16px 12px 22px}.nav-section-label{font-size:9px;color:#667085;letter-spacing:.15em;padding:18px 11px 7px}.nav-section-label:first-child{padding-top:2px}
.nav-link{min-height:42px;height:auto;padding:0 11px;margin:3px 0;border-radius:10px;color:#adb5c5;font-size:13.5px;font-weight:600}.nav-link:hover{background:rgba(255,255,255,.055);color:#fff;transform:none}.nav-link.active{background:linear-gradient(105deg,var(--primary),var(--primary-dark));box-shadow:0 8px 22px var(--primary-shadow);color:#fff}.nav-link.active::before{display:none}.nav-icon{color:#7d8799}.nav-link.active .nav-icon{color:#fff}.nav-badge{margin-left:auto}
.nav-service-group{margin:5px 0}.nav-service-link{min-height:44px;border-radius:10px;padding:0 10px;color:#c4cad6;background:transparent;border:1px solid transparent;box-shadow:none}.nav-service-link:hover{background:rgba(255,255,255,.05);color:#fff;transform:none}.nav-service-link.active{background:var(--primary-soft);border-color:rgba(255,255,255,.06);color:#fff;box-shadow:none}.nav-service-link.active .nav-icon{color:#fff}.nav-service-label{font-size:13.5px}.nav-service-count{min-width:22px;height:20px;font-size:11px;background:#252b42;color:#b9c0cf}.nav-service-link.active .nav-service-count{background:var(--primary);color:#fff}.nav-service-caret{opacity:.65}.nav-service-submenu{position:relative;margin:3px 0 8px 18px;padding:2px 0 2px 14px;border-left:1px solid rgba(255,255,255,.1)}.nav-service-submenu .nav-sublink{margin:1px 0;min-height:34px;border-radius:8px;padding:0 8px 0 10px;color:#8f98a9;font-size:12.5px}.nav-service-submenu .nav-sublink:hover{background:rgba(255,255,255,.045);color:#fff}.nav-service-submenu .nav-sublink.active{background:rgba(255,255,255,.075);color:#fff}.nav-sublink .nav-service-count{transform:scale(.92)}
.nav-stage-new.active{color:#93c5fd!important}.nav-stage-processing.active{color:#fbbf24!important}.nav-stage-ready.active{color:#86efac!important}
.sidebar-profile{min-height:76px;padding:12px 14px;background:rgba(5,9,20,.22);border-color:rgba(255,255,255,.07)}.profile-avatar{background:var(--primary);box-shadow:0 5px 14px var(--primary-shadow)}.profile-copy strong{font-size:12.5px}.profile-copy span{font-size:10.5px}

/* Main content and page hierarchy */
.main-shell{margin-left:var(--sidebar)}.page-content{max-width:1740px;padding:26px 30px 44px}.page-heading{margin:0 0 22px;align-items:center}.page-heading h1{font-size:28px;line-height:1.15;letter-spacing:-.045em;font-weight:800;color:#161827}.page-heading p{font-size:13px;color:#73788c;margin-top:7px;max-width:760px}.heading-actions{gap:9px}
.button{min-height:40px;border-radius:10px;padding:9px 14px;font-size:13px;font-weight:700;letter-spacing:-.005em;transition:.16s var(--premium-ease)}.button-sm{min-height:34px;padding:7px 11px;font-size:12px}.button-primary{background:linear-gradient(135deg,var(--primary),var(--primary-dark));border-color:var(--primary);box-shadow:0 7px 18px var(--primary-shadow)}.button-primary:hover{background:linear-gradient(135deg,var(--primary-dark),var(--primary-darker));box-shadow:0 10px 24px var(--primary-shadow)}.button-secondary{background:#fff;border-color:#d8dce6;color:#344054}.button-secondary:hover{background:#f8f9fb;border-color:#c7ccd8;color:#111827}.button-dark{background:#202536;border-color:#202536;color:#fff}.button-danger{background:#fff;color:#b42318;border-color:#fecdca}

/* Cards and clickable analytics */
.card,.stat-card,.toolbar{border:1px solid var(--border);box-shadow:var(--shadow);background:#fff}.card{border-radius:var(--radius-lg);overflow:hidden}.card-header{min-height:64px;padding:15px 18px;border-bottom:1px solid #edf0f4}.card-header h2,.card-header h3{font-size:15px;font-weight:750;color:#202334}.card-header p{font-size:11.5px;margin-top:4px}.card-body{padding:18px}.card-footer{padding:13px 18px;background:#fbfcfd}
.stats-grid{gap:14px;margin-bottom:18px}.stat-card{border-radius:15px;min-height:126px;padding:17px 18px;box-shadow:var(--shadow)}.stat-card.stat-link{cursor:pointer}.stat-card.stat-link::after{content:'→';position:absolute;right:17px;bottom:14px;font-size:16px;color:#b2b7c3;opacity:0;transform:translateX(-4px);transition:.16s ease}.stat-card.stat-link:hover::after{opacity:1;transform:none}.stat-card:hover{transform:translateY(-2px);border-color:color-mix(in srgb,var(--primary) 18%,var(--border));box-shadow:var(--shadow-hover)}.stat-card.is-filter-active{border-color:var(--primary-ring);box-shadow:0 0 0 3px var(--primary-softer),var(--shadow)}.stat-label{font-size:12.5px;font-weight:650}.stat-value{font-size:27px;font-weight:800;margin-top:8px}.stat-caption{font-size:11.5px;margin-top:7px}.stat-icon{width:40px;height:40px;border-radius:12px}
.workflow-status-grid{gap:12px}.workflow-status-card{border-radius:13px;min-height:78px;padding:14px 15px;box-shadow:var(--shadow);border-left-width:3px}.workflow-status-card span{font-size:12.5px}.workflow-status-card strong{font-size:25px}.workflow-status-card:hover{box-shadow:var(--shadow-hover);transform:translateY(-2px)}

/* Filter and service navigation become compact segmented controls. */
.service-filter-strip{display:inline-flex;max-width:100%;padding:4px;background:#eceef4;border:1px solid #e0e3eb;border-radius:13px;gap:3px;margin-bottom:14px;overflow-x:auto;scrollbar-width:none}.service-filter-strip::-webkit-scrollbar{display:none}.service-filter-pill{min-height:38px;padding:0 13px;border:0;border-radius:9px;background:transparent;font-size:12.5px;font-weight:700;white-space:nowrap;box-shadow:none}.service-filter-pill:hover{transform:none;background:#fff;color:var(--text)}.service-filter-pill.active{background:#fff;color:var(--primary-dark);box-shadow:0 1px 2px rgba(16,24,40,.06),0 4px 12px rgba(16,24,40,.06)}
.workflow-tabs{display:flex;gap:6px;margin-bottom:14px}.workflow-tab{min-height:38px;padding:0 13px;border-radius:10px;font-size:12.5px;background:#fff;border:1px solid var(--border);box-shadow:none}.workflow-tab.active{box-shadow:0 0 0 3px var(--primary-softer)}
.toolbar{border-radius:14px;padding:11px 12px;gap:9px;margin-bottom:14px}.search-field{max-width:480px}.search-field input,.toolbar select,.form-control{height:40px;border-radius:10px;border-color:#dfe3eb;font-size:13px;background:#fff}.search-field input{background:#fafbfc}.search-field input:focus,.form-control:focus,.toolbar select:focus{border-color:var(--primary-ring);box-shadow:0 0 0 4px var(--primary-softer)}.date-filter span,.form-label{font-size:11.5px;font-weight:700;color:#475467}.date-filter input{height:40px;border-radius:10px}

/* Tables: sticky headings, stronger hierarchy, restrained row hover. */
.table-wrap{position:relative;overflow:auto;scrollbar-gutter:stable}.table-wrap table{font-size:13px}.table-wrap thead th,table thead th{position:sticky;top:0;z-index:2;background:#f8f9fb;color:#5b6173;font-size:10.5px;font-weight:800;letter-spacing:.045em;text-transform:uppercase;padding:12px 14px;border-bottom:1px solid #e5e8ef;white-space:nowrap}.table-wrap td,table td{padding:14px;border-bottom:1px solid #eef0f4;vertical-align:middle}.table-wrap tbody tr:last-child td{border-bottom:0}.table-wrap tbody tr:hover{background:color-mix(in srgb,var(--primary) 4.5%,#fff)}.table-primary{font-size:13px;font-weight:700;color:#24283a}.table-secondary{font-size:11.5px;color:#7a8093;margin-top:2px}.table-link{font-weight:700;text-decoration:none;color:var(--primary-dark)}.table-link:hover{text-decoration:underline}.account-action-row{gap:6px}.link-button{width:34px;height:34px;border-radius:9px}
.code-pill,.order-count-pill{border-radius:999px;background:#f2f4f7;border:1px solid #e8eaf0;padding:4px 9px;font-size:10.5px;font-weight:700;color:#667085}
.status-badge{min-height:25px;padding:3px 9px;border-radius:999px;font-size:11px;font-weight:750;border-width:1px;white-space:nowrap}

/* Forms */
.form-section{padding:20px}.form-grid{gap:15px 16px}.form-label{margin-bottom:6px}.form-control{padding-inline:12px}.form-control:is(textarea){height:auto;min-height:92px;padding-block:10px;line-height:1.5}.form-actions{padding:14px 18px;background:#fbfcfd;border-color:#edf0f4}.checkbox-card{border-radius:11px;background:#fff}.switch-row{padding:14px 0}.switch-copy strong{font-size:12.5px}.switch-copy span{font-size:11px}
.form-section-heading{display:flex;align-items:center;gap:10px;margin-bottom:18px}.form-section-heading .section-icon{width:36px;height:36px;border-radius:10px;background:var(--primary-soft);color:var(--primary-dark);display:grid;place-items:center}.form-section-heading strong{display:block;font-size:13px}.form-section-heading span{display:block;color:var(--muted);font-size:11px;margin-top:2px}.premium-form-section{padding:0;border:0}

/* Modals / drawers */
.modal-backdrop{background:rgba(15,23,42,.54);backdrop-filter:blur(5px);padding:24px}.modal{width:min(620px,100%);max-height:min(88vh,900px);border-radius:18px;border:1px solid rgba(255,255,255,.65);box-shadow:0 30px 90px rgba(15,23,42,.28);overflow:hidden;background:#fff}.modal-wide{width:min(820px,100%)}.modal-xl{width:min(1180px,100%)}.modal-header{min-height:70px;padding:16px 19px;border-bottom:1px solid #edf0f4;align-items:flex-start}.modal-header h3{font-size:17px;margin:2px 0 0;letter-spacing:-.025em}.modal-header p{margin:4px 0 0;color:var(--muted);font-size:11.5px}.modal-eyebrow{font-size:9px;letter-spacing:.13em;color:var(--primary-dark);font-weight:800}.modal-close-button{width:34px;height:34px;font-size:20px}.modal-body{padding:20px;overflow-y:auto;max-height:calc(88vh - 140px)}.modal-footer{padding:13px 18px;border-top:1px solid #edf0f4;background:#fbfcfd;gap:8px}.premium-form-modal .modal-body{padding:20px}
.empty-state{padding:52px 20px}.empty-state-icon{width:52px;height:52px;border-radius:14px;background:var(--primary-softer);color:var(--primary-dark)}.empty-state h3{font-size:15px}.empty-state p{font-size:12px;max-width:420px;margin-inline:auto}

/* File and order panels */
.file-row{border-radius:11px;padding:11px}.file-icon{width:36px;height:36px;border-radius:9px}.file-copy strong{font-size:12px}.file-copy span{font-size:11px}.detail-grid,.grid-2,.grid-2-even{gap:16px}.info-label{font-size:10.5px}.info-value{font-size:13px}

/* Scrollbars */
.sidebar-nav,.table-wrap,.modal-body,.notification-list{scrollbar-width:thin;scrollbar-color:rgba(148,163,184,.5) transparent}.sidebar-nav::-webkit-scrollbar,.table-wrap::-webkit-scrollbar,.modal-body::-webkit-scrollbar,.notification-list::-webkit-scrollbar{width:7px;height:7px}.sidebar-nav::-webkit-scrollbar-thumb,.table-wrap::-webkit-scrollbar-thumb,.modal-body::-webkit-scrollbar-thumb,.notification-list::-webkit-scrollbar-thumb{background:rgba(148,163,184,.46);border-radius:999px;border:2px solid transparent;background-clip:padding-box}.sidebar-nav::-webkit-scrollbar-thumb:hover,.table-wrap::-webkit-scrollbar-thumb:hover,.modal-body::-webkit-scrollbar-thumb:hover,.notification-list::-webkit-scrollbar-thumb:hover{background:var(--primary);background-clip:padding-box}

/* Focus visibility and accent accessibility */
a:focus-visible,button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:3px solid var(--primary-ring);outline-offset:2px}.button-primary,.nav-link.active,.profile-avatar{color:#fff}

@media(max-width:1100px){
    :root{--sidebar:240px}.page-content{padding-inline:22px}.top-search{width:300px}.top-user-copy strong{max-width:110px}
}
@media(max-width:900px){
    .topbar{padding:0 12px;gap:8px}.topbar-brand{width:auto;flex:0 0 auto;border-right:0;padding:0 8px}.mobile-menu{display:inline-grid}.sidebar{top:var(--topbar);width:min(290px,86vw);transform:translateX(-102%);transition:transform .22s var(--premium-ease);box-shadow:18px 0 50px rgba(15,23,42,.22)}.sidebar.open{transform:none}.main-shell{margin-left:0}.page-content{padding:22px 18px 36px}.stats-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-2,.detail-grid{grid-template-columns:1fr}.top-user-dropdown{right:0}
}
@media(max-width:700px){
    :root{--topbar:62px}.topbar-brand-copy small{display:none}.top-search{display:none}.topbar-actions>.button{display:none}.top-user-copy,.top-user-chevron{display:none}.top-user-trigger{border:0;background:transparent;padding:0}.top-user-trigger:hover{background:transparent;box-shadow:none}.top-avatar{width:36px;height:36px}.page-content{padding:18px 13px 30px}.page-heading{align-items:flex-start;margin-bottom:17px}.page-heading h1{font-size:24px}.page-heading p{font-size:12.5px}.heading-actions{width:100%}.heading-actions .button{flex:1}.stats-grid{gap:10px}.stat-card{min-height:112px;padding:14px}.stat-value{font-size:24px}.stat-icon{width:36px;height:36px}.workflow-status-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.service-filter-strip{display:flex;width:100%;border-radius:11px}.service-filter-pill{flex:0 0 auto}.workflow-tabs{overflow-x:auto;scrollbar-width:none}.toolbar{display:grid;grid-template-columns:1fr 1fr;gap:8px}.toolbar .search-field{grid-column:1/-1;max-width:none}.toolbar .button{width:100%}.date-filter{min-width:0}.date-filter input{width:100%}.card{border-radius:14px}.card-header{padding:13px 14px;min-height:58px}.card-body{padding:14px}.table-wrap{margin-inline:0}.modal-backdrop{padding:8px;align-items:flex-end}.modal,.modal-wide,.modal-xl{width:100%;max-height:92vh;border-radius:18px 18px 10px 10px}.modal-header{min-height:64px;padding:14px}.modal-body{padding:15px;max-height:calc(92vh - 128px)}.modal-footer{padding:11px 13px}.modal-footer .button{flex:1}.top-user-dropdown{position:fixed;left:10px;right:10px;top:calc(var(--topbar) + 8px);width:auto}.notification-dropdown{position:fixed;left:10px;right:10px;top:calc(var(--topbar) + 8px);width:auto;max-height:calc(100vh - var(--topbar) - 20px)}
}
@media(max-width:430px){
    .topbar{padding-inline:9px}.topbar-brand-copy{display:none}.topbar-brand{padding:0 2px}.page-content{padding-inline:10px}.stats-grid{grid-template-columns:1fr}.workflow-status-grid{grid-template-columns:1fr 1fr}.toolbar{grid-template-columns:1fr}.toolbar>*{grid-column:1!important}.page-heading h1{font-size:23px}.service-filter-strip{padding:3px}.service-filter-pill{min-height:36px;padding-inline:11px;font-size:12px}.form-grid{grid-template-columns:1fr!important}.form-group.full{grid-column:auto!important}.top-user-dropdown,.notification-dropdown{left:7px;right:7px}.modal-backdrop{padding:5px}.modal{border-radius:16px 16px 8px 8px}
}

/* V2.17 authentication surfaces */
.auth-page{min-height:100vh;padding:32px 16px;background:
    radial-gradient(circle at 16% 18%,rgba(37,99,235,.12),transparent 28rem),
    radial-gradient(circle at 84% 82%,rgba(124,58,237,.10),transparent 30rem),
    #f6f7fb;display:grid;place-items:center}
.auth-card{width:min(460px,100%);border:1px solid rgba(217,221,232,.95);border-radius:20px;box-shadow:0 28px 80px rgba(15,23,42,.14),0 2px 8px rgba(15,23,42,.04);overflow:hidden;background:#fff}
.auth-head{padding:30px 30px 27px;background:linear-gradient(135deg,#111827 0%,#1d2540 100%);position:relative;overflow:hidden}
.auth-head::after{content:'';position:absolute;width:180px;height:180px;border-radius:50%;right:-70px;top:-100px;background:linear-gradient(135deg,rgba(255,255,255,.10),transparent)}
.auth-brand{position:relative;z-index:1;font-size:20px;font-weight:800;letter-spacing:-.035em}.auth-brand .brand-mark{width:38px;height:38px;border-radius:11px}.auth-head p{position:relative;z-index:1;font-size:12.5px;color:#b3bbca;margin-top:9px}.auth-body{padding:27px 30px 30px}.auth-body .form-group{margin-bottom:16px}.auth-body .form-control{height:44px}.auth-body>.alert{margin-bottom:18px}.auth-body .button{min-height:44px}.auth-footer{font-size:12px;line-height:1.5;margin-top:18px}.auth-footer a{color:var(--primary);font-weight:700}.auth-note{margin-top:18px;padding:13px 14px;border-radius:11px;background:#f8fafc;border:1px solid #e5e8ef;font-size:11px;line-height:1.6;color:#667085}
@media(max-width:480px){.auth-page{padding:14px}.auth-card{border-radius:17px}.auth-head{padding:25px 22px}.auth-body{padding:23px 21px 25px}}

/* =========================================================
   V2.18 — Premium Activity Center
   ========================================================= */
.activity-summary-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-bottom:14px}
.activity-summary-card{position:relative;display:flex;align-items:center;gap:13px;min-height:104px;padding:15px 16px;border:1px solid var(--border);border-radius:15px;background:#fff;box-shadow:var(--shadow);text-decoration:none;color:inherit;transition:transform .16s ease,border-color .16s ease,box-shadow .16s ease}
.activity-summary-card:hover{transform:translateY(-2px);border-color:color-mix(in srgb,var(--primary) 22%,var(--border));box-shadow:var(--shadow-hover)}
.activity-summary-card.is-active{border-color:var(--primary-ring);box-shadow:0 0 0 3px var(--primary-softer),var(--shadow)}
.activity-summary-icon{width:42px;height:42px;display:grid;place-items:center;border-radius:13px;flex:0 0 42px;background:var(--primary-softer);color:var(--primary)}
.activity-summary-icon.tone-blue{background:#eef4ff;color:#2563eb}.activity-summary-icon.tone-amber{background:#fff6e5;color:#d97706}.activity-summary-icon.tone-green{background:#ecfdf3;color:#079455}
.activity-summary-card>span:last-child{min-width:0;display:block}.activity-summary-card small{display:block;font-size:10.5px;font-weight:800;letter-spacing:.055em;color:#7a8193}.activity-summary-card strong{display:block;margin-top:4px;font-size:25px;line-height:1;font-weight:800;color:#202334}.activity-summary-card em{display:block;margin-top:7px;font-style:normal;font-size:11.5px;color:var(--muted)}
.activity-filter-toolbar{align-items:end}.activity-search-field{flex:1 1 360px;max-width:none}.activity-filter-toolbar select{max-width:190px}.activity-filter-toolbar .date-filter{min-width:145px}
.activity-feed-card{overflow:visible}.activity-feed-body{padding:0 18px}.activity-feed{position:relative}.activity-row{display:grid;grid-template-columns:42px minmax(0,1fr);gap:13px;padding:17px 0;border-bottom:1px solid #edf0f4}.activity-row:last-child{border-bottom:0}.activity-marker-wrap{position:relative;display:flex;justify-content:center}.activity-marker-wrap:after{content:'';position:absolute;top:37px;bottom:-18px;width:1px;background:#e7eaf0}.activity-row:last-child .activity-marker-wrap:after{display:none}.activity-marker{position:relative;z-index:1;width:34px;height:34px;border-radius:11px;display:grid;place-items:center;background:#f3f1ff;color:var(--primary);border:1px solid var(--primary-soft)}.activity-source-order .activity-marker{background:#fff7e8;color:#b54708;border-color:#fedf89}.activity-main{min-width:0}.activity-title-line{display:flex;align-items:flex-start;justify-content:space-between;gap:16px}.activity-title-line>div{display:flex;align-items:center;gap:8px;min-width:0;flex-wrap:wrap}.activity-title-line strong{font-size:13.5px;color:#25283a}.activity-title-line time{flex:0 0 auto;color:#8b91a2;font-size:11.5px;white-space:nowrap}.activity-source-pill{display:inline-flex;align-items:center;min-height:22px;padding:0 8px;border-radius:999px;background:#f5f6f8;border:1px solid #e7e9ee;color:#667085;font-size:10.5px;font-weight:700}.activity-description{margin:6px 0 10px;color:#5f6678;font-size:12.5px;line-height:1.55;overflow-wrap:anywhere}.activity-context{display:flex;align-items:center;gap:7px;flex-wrap:wrap}.activity-actor{display:inline-flex;align-items:center;gap:7px;margin-right:4px}.activity-actor .mini-avatar{width:27px;height:27px;border-radius:9px;display:grid;place-items:center;background:var(--primary-softer);color:var(--primary);font-size:9.5px;font-weight:800}.activity-actor>span:last-child{display:grid;line-height:1.15}.activity-actor b{font-size:11px;color:#35394c}.activity-actor small{font-size:9.5px;color:#9298a8;margin-top:2px}.activity-context-chip{display:inline-flex;align-items:center;gap:5px;min-height:27px;padding:0 9px;border:1px solid #e3e6ec;border-radius:8px;background:#fafbfc;color:#596174;font-size:10.5px;font-weight:600;text-decoration:none;max-width:260px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.activity-order-chip{color:var(--primary);border-color:var(--primary-soft);background:var(--primary-softer)}.activity-order-chip:hover{border-color:var(--primary-ring);background:#fff}.activity-ip{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;color:#667085}.activity-context .status-badge{min-height:27px}.activity-empty-state{padding:54px 20px}.empty-state-icon{display:grid;place-items:center;width:44px;height:44px;margin:0 auto 12px;border-radius:13px;background:var(--primary-softer);color:var(--primary)}.activity-pagination{align-items:center}.pagination-gap{display:grid;place-items:center;min-width:24px;color:#98a2b3}.activity-feed-card+.activity-pagination{margin-top:14px}
@media(max-width:1100px){.activity-summary-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.activity-filter-toolbar select{max-width:none}}
@media(max-width:700px){.activity-summary-grid{grid-template-columns:1fr 1fr;gap:9px}.activity-summary-card{min-height:96px;padding:13px;gap:10px}.activity-summary-icon{width:38px;height:38px;flex-basis:38px;border-radius:11px}.activity-summary-card strong{font-size:22px}.activity-summary-card em{font-size:10.5px}.activity-feed-body{padding:0 14px}.activity-row{grid-template-columns:36px minmax(0,1fr);gap:9px;padding:15px 0}.activity-marker{width:30px;height:30px;border-radius:9px}.activity-marker-wrap:after{top:33px}.activity-title-line{display:block}.activity-title-line time{display:block;margin-top:5px}.activity-context{gap:6px}.activity-actor{width:100%;margin:2px 0 4px}.activity-context-chip{max-width:100%}}
@media(max-width:430px){.activity-summary-grid{grid-template-columns:1fr}.activity-summary-card{min-height:86px}.activity-summary-card em{margin-top:5px}.activity-filter-toolbar{grid-template-columns:1fr}.activity-feed-card .card-header{align-items:flex-start}.activity-feed-card .order-count-pill{margin-top:3px}}

/* ============================================================
   V2.20 — READABILITY & TYPOGRAPHY PASS
   Larger commercial typography without increasing visual clutter.
   ============================================================ */
body.app-page{font-size:15px;line-height:1.55}

/* Topbar */
.topbar-brand-copy strong{font-size:17px}
.topbar-brand-copy small{font-size:11px}
.top-search input{font-size:14px}
.top-user-copy strong{font-size:13.5px}
.top-user-copy span{font-size:11.5px}
.notification-head strong{font-size:15px}
.notification-head span{font-size:12px}
.notification-item strong{font-size:13px}
.notification-item small{font-size:12px;line-height:1.45}

/* Sidebar */
.nav-section-label{font-size:10px}
.nav-link{font-size:14.5px}
.nav-service-label{font-size:14.5px}
.nav-service-submenu .nav-sublink{font-size:13.5px;min-height:36px}
.nav-service-count{font-size:11.5px}
.profile-copy strong{font-size:13.5px}
.profile-copy span{font-size:11.5px}

/* General page hierarchy */
.page-heading p{font-size:14px}
.button{font-size:13.5px}
.button-sm{font-size:12.5px}
.card-header h2,.card-header h3{font-size:16px}
.card-header p{font-size:12.5px;line-height:1.5}
.stat-label{font-size:13.5px}
.stat-caption{font-size:12.5px}
.workflow-status-card span{font-size:13.5px}
.service-filter-pill,.workflow-tab{font-size:13.5px}
.search-field input,.toolbar select,.form-control{font-size:14px}
.date-filter span,.form-label{font-size:12.5px}

/* Tables */
.table-wrap table{font-size:14px}
.table-wrap thead th,table thead th{font-size:11.5px}
.table-primary{font-size:14px}
.table-secondary{font-size:12.5px}
.code-pill,.order-count-pill{font-size:11.5px}
.status-badge{font-size:12px}

/* Activity Center — larger, more legible operational feed */
.activity-summary-card small{font-size:11.5px}
.activity-summary-card strong{font-size:27px}
.activity-summary-card em{font-size:12.5px;line-height:1.4}
.activity-title-line strong{font-size:15px;line-height:1.35}
.activity-title-line time{font-size:12.5px;line-height:1.4}
.activity-source-pill{min-height:24px;padding:0 9px;font-size:11.5px}
.activity-description{font-size:14px;line-height:1.6;margin:7px 0 11px}
.activity-actor .mini-avatar{width:30px;height:30px;font-size:10.5px}
.activity-actor b{font-size:12.5px}
.activity-actor small{font-size:11px;margin-top:2px}
.activity-context-chip{min-height:30px;padding:0 10px;font-size:12px}
.activity-context .status-badge{min-height:30px}
.activity-row{padding:19px 0;grid-template-columns:44px minmax(0,1fr);gap:14px}
.activity-marker{width:36px;height:36px}
.activity-marker-wrap:after{top:39px;bottom:-20px}

@media(max-width:700px){
    body.app-page{font-size:14.5px}
    .nav-link{font-size:14px}
    .nav-service-label{font-size:14px}
    .nav-service-submenu .nav-sublink{font-size:13px}
    .page-heading p{font-size:13.5px}
    .activity-summary-card small{font-size:11px}
    .activity-summary-card em{font-size:12px}
    .activity-title-line strong{font-size:14.5px}
    .activity-title-line time{font-size:12px}
    .activity-description{font-size:13.5px}
    .activity-actor b{font-size:12.5px}
    .activity-actor small{font-size:10.5px}
    .activity-context-chip{font-size:11.5px}
    .activity-row{grid-template-columns:38px minmax(0,1fr);gap:10px;padding:17px 0}
    .activity-marker{width:32px;height:32px}
    .activity-marker-wrap:after{top:35px}
}

/* ================================================================
   V2.21 — Commercial order table + production status controls
   ================================================================ */
.table-wrap table thead th,
.commercial-grid-table thead th{
    background:color-mix(in srgb,var(--primary) 14%,#f8fafc);
    color:color-mix(in srgb,var(--primary-darker) 72%,#344054);
    border-bottom:1px solid color-mix(in srgb,var(--primary) 24%,#dfe4ec);
}
.table-wrap table th + th,
.table-wrap table td + td,
.commercial-grid-table th + th,
.commercial-grid-table td + td{
    border-left:1px solid #d9dee8;
}
.table-wrap table tbody tr:hover td{
    border-left-color:color-mix(in srgb,var(--primary) 20%,#d9dee8);
}
.production-status-form{margin:0;display:inline-flex;align-items:center}
.production-status-select{
    min-width:112px;
    height:34px;
    padding:0 30px 0 12px;
    border-radius:999px;
    border:1px solid #d9dee8;
    font:750 12px/1 'Inter',sans-serif;
    cursor:pointer;
    outline:none;
    transition:border-color .15s ease,box-shadow .15s ease,background .15s ease;
}
.production-status-select:focus{box-shadow:0 0 0 3px var(--primary-softer)}
.production-status-select.production-status-new{color:#2563eb;background:#eff6ff;border-color:#bfdbfe}
.production-status-select.production-status-process{color:#b45309;background:#fffbeb;border-color:#fcd34d}
.production-status-select.production-status-edit{color:#7c3aed;background:#f5f3ff;border-color:#c4b5fd}
.production-status-select.production-status-revision{color:#dc2626;background:#fef2f2;border-color:#fca5a5}
.production-status-select.production-status-hold{color:#475569;background:#f1f5f9;border-color:#cbd5e1}
.production-status-badge.production-status-new{color:#2563eb;background:#eff6ff;border-color:#bfdbfe}
.production-status-badge.production-status-process{color:#b45309;background:#fffbeb;border-color:#fcd34d}
.production-status-badge.production-status-edit{color:#7c3aed;background:#f5f3ff;border-color:#c4b5fd}
.production-status-badge.production-status-revision{color:#dc2626;background:#fef2f2;border-color:#fca5a5}
.production-status-badge.production-status-hold{color:#475569;background:#f1f5f9;border-color:#cbd5e1}
@media(max-width:700px){
    .production-status-select{min-width:104px;height:36px;font-size:12px}
}
.compact-search-toolbar{
    width:min(560px,100%);
    padding:0;
    margin-bottom:14px;
    background:transparent;
    border:0;
    box-shadow:none;
    display:block;
}
.compact-search-toolbar .search-field{max-width:none;width:100%;min-height:42px;background:#fff;border:1px solid #dfe4ec;border-radius:11px;box-shadow:0 1px 2px rgba(16,24,40,.03)}
.compact-search-toolbar .search-field:focus-within{border-color:var(--primary);box-shadow:0 0 0 3px var(--primary-softer)}

/* ================================================================
   V2.22 — Ready-only archive filters
   ================================================================ */
.ready-stage-toolbar{
    display:flex;
    align-items:flex-end;
    gap:10px;
    flex-wrap:wrap;
}
.ready-stage-toolbar .search-field{
    flex:1 1 360px;
    max-width:none;
}
.ready-stage-toolbar select{min-width:150px}
.ready-stage-toolbar .date-filter{min-width:150px}
.ready-stage-toolbar .date-filter input{width:100%}
@media(max-width:820px){
    .ready-stage-toolbar{display:grid;grid-template-columns:1fr 1fr}
    .ready-stage-toolbar .search-field{grid-column:1/-1}
}
@media(max-width:430px){
    .ready-stage-toolbar{grid-template-columns:1fr}
    .ready-stage-toolbar>*{grid-column:1!important;width:100%}
}

/* V2.24 missing-file recovery controls */
.file-missing-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap;justify-content:flex-end}
.file-missing-actions form{display:flex;align-items:center;gap:8px;margin:0}
.file-replace-button{cursor:pointer;position:relative;white-space:nowrap}
.file-replace-button.is-loading{opacity:.7;pointer-events:none}
.file-repair-message{font-size:12px;color:#dc2626;max-width:220px}
.file-repair-message.success{color:#16a34a}
@media(max-width:700px){.file-missing-actions{width:100%;justify-content:flex-start}.file-repair-message{max-width:100%}}

/* V2.26 — inline admin assignment */
.inline-assignment-form{margin:0;min-width:0}
.inline-assignment-select{
    width:100%;min-width:138px;max-width:190px;height:36px;padding:0 30px 0 11px;
    border:1px solid #cbd5e1;border-radius:999px;background:#f8fafc;color:#475569;
    font:700 12.5px/1 Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
    outline:none;cursor:pointer;transition:border-color .16s ease,box-shadow .16s ease,background .16s ease,color .16s ease;
}
.inline-assignment-select:hover{border-color:var(--primary);background:#fff}
.inline-assignment-select:focus{border-color:var(--primary);box-shadow:0 0 0 3px var(--primary-softer);background:#fff}
.inline-assignment-select.assigned{color:#2563eb;background:#eff6ff;border-color:#bfdbfe}
.inline-assignment-select.unassigned{color:#64748b;background:#f8fafc;border-color:#cbd5e1}
@media (max-width:700px){.inline-assignment-select{min-width:132px;height:38px;font-size:13px}}


/* ==========================================================================
   V2.27 — Dashboard workflow cards, compact order preview, live activity
   ========================================================================== */
.dashboard-service-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:14px;
  margin:0 0 14px;
}
.dashboard-service-card{
  overflow:hidden;
  border:1px solid var(--border);
  border-radius:16px;
  background:#fff;
  box-shadow:var(--shadow);
}
.dashboard-service-head{
  min-height:76px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding:14px 18px 12px;
  border-bottom:1px solid var(--border);
  text-align:center;
}
.dashboard-service-head h2{
  margin:0;
  color:#202334;
  font-size:15px;
  font-weight:800;
  letter-spacing:-.015em;
}
.dashboard-service-icon{
  width:40px;
  height:40px;
  display:grid;
  place-items:center;
  border-radius:11px;
  color:var(--primary);
  background:var(--primary-softer);
  border:1px solid color-mix(in srgb,var(--primary) 14%,transparent);
}
.dashboard-service-metrics{
  display:grid;
  grid-template-columns:1fr 1fr;
}
.dashboard-service-metric{
  min-height:96px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding:13px;
  color:inherit;
  text-decoration:none;
  transition:background .15s ease;
}
.dashboard-service-metric+ .dashboard-service-metric{border-left:1px solid var(--border)}
.dashboard-service-metric:hover{background:#fafbfc}
.dashboard-service-metric strong{
  width:42px;
  height:42px;
  display:grid;
  place-items:center;
  border-radius:999px;
  font-size:17px;
  font-weight:800;
}
.dashboard-service-metric span{
  color:#475467;
  font-size:12.5px;
  font-weight:600;
}
.dashboard-service-metric.metric-new strong{color:#2563eb;background:#eaf2ff}
.dashboard-service-metric.metric-process strong{color:#079455;background:#e9f8f1}
.dashboard-service-actions{
  display:grid;
  grid-template-columns:1fr 1fr;
}
.dashboard-service-actions a{
  min-height:42px;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:9px 14px;
  color:#fff;
  text-decoration:none;
  font-size:13px;
  font-weight:800;
  transition:filter .15s ease;
}
.dashboard-service-actions a:hover{filter:brightness(.95)}
.service-action-new{background:#b71932}
.service-action-process{background:#243a79}
.dashboard-operational-grid{align-items:stretch}
.dashboard-operational-grid>.card{min-height:420px}
.dashboard-recent-table th{background:#d8eef5;color:#145a72}
.dashboard-live-head-actions{display:flex;align-items:center;gap:12px}
.live-tracking-pill{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:5px 8px;
  border-radius:999px;
  background:#ecfdf3;
  color:#027a48;
  border:1px solid #abefc6;
  font-size:10.5px;
  font-weight:800;
  letter-spacing:.02em;
}
.live-tracking-pill i{
  width:7px;height:7px;border-radius:50%;background:#12b76a;
  box-shadow:0 0 0 4px rgba(18,183,106,.12);
  animation:dashboardLivePulse 1.8s ease-in-out infinite;
}
@keyframes dashboardLivePulse{0%,100%{opacity:1}50%{opacity:.45}}
.dashboard-live-activity-card .timeline-copy strong{font-size:13px}
.dashboard-live-activity-card .timeline-copy p{font-size:12.5px;line-height:1.45}
.dashboard-live-activity-card .timeline-copy time{font-size:11.5px;line-height:1.4}
.dashboard-workflow-strip{margin-top:0;margin-bottom:0}

/* View modal: remove the duplicated outer heading/line and make the preview denser. */
.quick-order-modal.compact-view-mode{
  width:min(1060px,calc(100vw - 28px));
  max-height:min(90vh,840px);
}
.quick-order-modal.compact-view-mode>.modal-header{
  min-height:0;
  height:0;
  padding:0;
  border:0;
  overflow:visible;
  position:relative;
  z-index:20;
}
.quick-order-modal.compact-view-mode>.modal-header h3{display:none}
.quick-order-modal.compact-view-mode>.modal-header .icon-button{
  position:absolute;
  right:10px;
  top:10px;
  width:30px;
  height:30px;
  background:rgba(255,255,255,.94);
  border:1px solid #e4e7ec;
  box-shadow:0 3px 12px rgba(16,24,40,.10);
}
.quick-order-modal.compact-view-mode>.modal-body{
  padding:14px;
  max-height:min(90vh,840px);
}
.quick-order-modal.compact-view-mode .quick-view-grid{
  grid-template-columns:minmax(0,1.72fr) minmax(270px,.72fr);
  gap:14px;
}
.quick-order-modal.compact-view-mode .reference-card-title{
  min-height:40px;
  padding:9px 13px;
  border-radius:10px 10px 0 0;
  font-size:12px;
}
.quick-order-modal.compact-view-mode .reference-modal-header{padding-right:48px}
.quick-order-modal.compact-view-mode .reference-design-name{
  margin:10px 10px 8px;
  padding:9px 11px;
  grid-template-columns:110px 1fr;
}
.quick-order-modal.compact-view-mode .order-spec-grid{
  margin:0 10px 10px;
  border-radius:9px;
}
.quick-order-modal.compact-view-mode .order-spec-row{
  min-height:35px;
  grid-template-columns:112px 1fr;
  padding:6px 10px;
}
.quick-order-modal.compact-view-mode .instruction-panel{
  margin:10px;
  border-radius:9px;
}
.quick-order-modal.compact-view-mode .instruction-panel h3{padding:8px 11px}
.quick-order-modal.compact-view-mode .instruction-panel>div{
  min-height:64px;
  padding:10px 11px;
  line-height:1.5;
}
.quick-order-modal.compact-view-mode .quick-additional>div{min-height:52px}
.quick-order-modal.compact-view-mode .reference-side-stack{gap:10px}
.quick-order-modal.compact-view-mode .reference-side-stack>.card{border-radius:10px}
.quick-order-modal.compact-view-mode .summary-list>div{
  grid-template-columns:82px 1fr;
  padding:8px 10px;
}
.quick-order-modal.compact-view-mode .reference-files{padding:9px;gap:6px}
.quick-order-modal.compact-view-mode .reference-files a{
  min-height:36px;
  padding:6px 8px;
}
.quick-order-modal.compact-view-mode .note-box{
  margin:0;
  min-height:44px;
  border:0;
  border-left:3px solid var(--primary);
  border-radius:0 0 9px 9px;
  padding:10px 11px;
}

@media(max-width:900px){
  .dashboard-service-grid{grid-template-columns:1fr}
  .quick-order-modal.compact-view-mode .quick-view-grid{grid-template-columns:1fr}
}
@media(max-width:700px){
  .dashboard-service-head{min-height:68px}
  .dashboard-service-metric{min-height:84px}
  .dashboard-operational-grid>.card{min-height:0}
  .dashboard-live-head-actions{gap:8px}
  .quick-order-modal.compact-view-mode{width:100%;max-height:92vh}
  .quick-order-modal.compact-view-mode>.modal-body{max-height:92vh;padding:8px}
  .quick-order-modal.compact-view-mode .reference-design-name,
  .quick-order-modal.compact-view-mode .order-spec-row{grid-template-columns:100px 1fr}
}


/* ============================================================
   V2.28 — compact no-scroll Order Details preview
   ============================================================ */
@media (min-width: 901px){
  .quick-order-modal.compact-view-mode{
    width:min(990px,calc(100vw - 34px));
    max-height:none;
    overflow:visible;
    border-radius:14px;
  }
  .quick-order-modal.compact-view-mode>.modal-body{
    padding:10px;
    max-height:none;
    overflow:visible;
  }
  .quick-order-modal.compact-view-mode .quick-view-grid{
    grid-template-columns:minmax(0,1.7fr) minmax(260px,.7fr);
    gap:10px;
  }
  .quick-order-modal.compact-view-mode .reference-card-title{
    min-height:36px;
    padding:7px 11px;
    font-size:12px;
  }
  .quick-order-modal.compact-view-mode .reference-modal-header{padding-right:42px}
  .quick-order-modal.compact-view-mode .reference-design-name{
    margin:8px 8px 6px;
    padding:7px 9px;
    min-height:34px;
    grid-template-columns:104px 1fr;
  }
  .quick-order-modal.compact-view-mode .order-spec-grid{
    margin:0 8px 8px;
  }
  .quick-order-modal.compact-view-mode .order-spec-row{
    min-height:30px;
    padding:4px 8px;
    grid-template-columns:106px 1fr;
    font-size:12px;
  }
  .quick-order-modal.compact-view-mode .instruction-panel{
    margin:8px;
  }
  .quick-order-modal.compact-view-mode .instruction-panel h3{
    min-height:34px;
    padding:6px 9px;
    font-size:12px;
  }
  .quick-order-modal.compact-view-mode .instruction-panel>div{
    min-height:44px;
    padding:8px 9px;
    font-size:12px;
    line-height:1.4;
  }
  .quick-order-modal.compact-view-mode .reference-side-stack{gap:8px}
  .quick-order-modal.compact-view-mode .summary-list>div{
    grid-template-columns:78px 1fr;
    min-height:31px;
    padding:5px 8px;
    font-size:12px;
  }
  .quick-order-modal.compact-view-mode .reference-files{
    padding:7px;
    gap:5px;
  }
  .quick-order-modal.compact-view-mode .reference-files a,
  .quick-order-modal.compact-view-mode .reference-file-unavailable{
    min-height:31px;
    padding:5px 7px;
    font-size:11.5px;
    line-height:1.25;
  }
  .quick-order-modal.compact-view-mode .note-box{
    min-height:36px;
    padding:7px 9px;
    font-size:12px;
  }
}


/* ============================================================
   V2.29 — live Activity Center feed
   ============================================================ */
.activity-feed-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap;justify-content:flex-end}
.activity-live-badge{display:inline-flex;align-items:center;gap:6px;min-height:27px;padding:4px 9px;border-radius:999px;border:1px solid #bbf7d0;background:#f0fdf4;color:#15803d;font-size:12px;font-weight:700;white-space:nowrap}
.activity-live-dot{width:7px;height:7px;border-radius:50%;background:currentColor;box-shadow:0 0 0 3px rgba(34,197,94,.12)}
.activity-live-badge.is-live .activity-live-dot{animation:activityLivePulse 1.8s ease-in-out infinite}
.activity-live-badge.is-offline{border-color:#fed7aa;background:#fff7ed;color:#c2410c}
.activity-live-badge.is-offline .activity-live-dot{animation:none}
@keyframes activityLivePulse{0%,100%{opacity:1;transform:scale(1)}50%{opacity:.45;transform:scale(.82)}}
@media (max-width:620px){.activity-feed-actions{width:100%;justify-content:flex-start;margin-top:6px}}


/* V2.30 — true live activity tracking */
.activity-last-sync{font-size:12px;font-weight:600;color:var(--muted);white-space:nowrap}
@media(max-width:620px){.activity-last-sync{display:none}}

/* ============================================================
   V2.32 — dashboard focus layout, dynamic action colors,
   read-only Additional Instruction workflow
   ============================================================ */
.dashboard-focus-grid{
  display:grid;
  grid-template-columns:minmax(0,3fr) minmax(310px,1fr);
  gap:14px;
  align-items:stretch;
  margin:0 0 14px;
}
.dashboard-focus-grid .dashboard-service-grid-main{margin:0}
.dashboard-live-activity-top{min-width:0;min-height:100%;overflow:hidden}
.dashboard-live-activity-top .card-body{max-height:500px;overflow:auto;scrollbar-width:thin}
.dashboard-live-activity-top .timeline{min-width:0}
.dashboard-recent-orders-card{margin-top:0}

/* All operational action buttons follow the user's selected portal accent. */
.button-primary,
.button-dark,
.mini-action.edit,
.mini-action.view,
.mini-action.upload,
.instruction-action b,
.service-action-new,
.service-action-process,
.ready-files-button{
  background:linear-gradient(135deg,var(--primary),var(--primary-dark)) !important;
  border-color:var(--primary) !important;
  color:#fff !important;
  box-shadow:0 6px 16px var(--primary-shadow);
}
.button-primary:hover,
.button-dark:hover,
.mini-action:hover,
.instruction-action:hover b,
.service-action-new:hover,
.service-action-process:hover,
.ready-files-button:hover{
  background:linear-gradient(135deg,var(--primary-dark),var(--primary-darker)) !important;
  border-color:var(--primary-dark) !important;
  color:#fff !important;
}
.button-secondary{
  border-color:color-mix(in srgb,var(--primary) 24%,var(--border-strong));
  color:var(--primary-dark);
}
.button-secondary:hover{
  border-color:var(--primary-ring);
  background:var(--primary-softer);
  color:var(--primary-dark);
}
/* Preserve explicit destructive semantics. */
.button-danger{background:#fff !important;color:#b42318 !important;border-color:#fecdca !important;box-shadow:none !important}
.button-danger:hover{background:#fff5f4 !important;color:#912018 !important;border-color:#fda29b !important}

.additional-order-form{display:grid;gap:14px}
.additional-order-head{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:2px 2px 0}
.additional-order-head>div{display:grid;gap:3px}
.additional-order-head strong{font-size:16px;color:var(--text)}
.additional-order-head span{font-size:12px;color:var(--muted)}
.additional-readonly-card,.additional-entry-card{border:1px solid var(--border);border-radius:14px;background:#fff;box-shadow:var(--shadow)}
.additional-readonly-title{display:flex;align-items:center;gap:8px;min-height:44px;padding:10px 13px;border-bottom:1px solid var(--border);font-weight:800;color:var(--text)}
.additional-readonly-title>span{margin-left:auto;padding:3px 8px;border-radius:999px;background:#f2f4f7;color:#667085;font-size:10.5px;font-weight:800;text-transform:uppercase;letter-spacing:.04em}
.additional-readonly-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;padding:12px}
.additional-readonly-grid label{display:grid;gap:6px}
.additional-readonly-grid label>span{font-size:12px;font-weight:700;color:#475467}
.additional-readonly-grid .form-control[readonly]{background:#f8fafc;color:#475467;border-color:#e4e7ec;cursor:default;box-shadow:none}
.additional-readonly-grid .full{grid-column:1/-1}
.additional-entry-grid{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(280px,.8fr);gap:12px}
.additional-entry-card{padding:13px}
.additional-entry-card textarea{min-height:132px}
.additional-upload-zone{min-height:132px;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;gap:7px}
.additional-upload-zone strong{font-size:13px;color:var(--text)}
.additional-upload-zone span{font-size:11.5px;color:var(--muted)}
.additional-history-mini{display:grid;gap:7px;margin-top:12px;padding-top:10px;border-top:1px solid var(--border)}
.additional-history-mini>strong{font-size:12px;color:#344054}
.additional-history-mini>div{padding:8px 9px;border-radius:9px;background:#f8fafc;border:1px solid #edf0f4}
.additional-history-mini span{font-size:10.5px;color:var(--muted)}
.additional-history-mini p{margin:4px 0 0;font-size:12px;line-height:1.45}
.additional-existing-files{display:grid;gap:3px;margin-top:10px;padding:9px 10px;border-radius:9px;background:var(--primary-softer);border:1px solid var(--primary-ring)}
.additional-existing-files strong{font-size:12px;color:var(--primary-dark)}
.additional-existing-files span{font-size:11px;color:#667085}
.additional-instructions-panel .change-line{padding:9px 0}

@media(max-width:1180px){
  .dashboard-focus-grid{grid-template-columns:minmax(0,2fr) minmax(300px,1fr)}
}
@media(max-width:980px){
  .dashboard-focus-grid{grid-template-columns:1fr}
  .dashboard-live-activity-top .card-body{max-height:420px}
}
@media(max-width:760px){
  .additional-readonly-grid,.additional-entry-grid{grid-template-columns:1fr}
  .additional-readonly-grid .full{grid-column:auto}
}

/* ============================================================
   V2.34 — Client messages in Order View + bounded chat history
   ============================================================ */
.client-messages-card{min-width:0}
.client-messages-card .reference-card-title{display:flex;align-items:center;justify-content:space-between;gap:8px}
.client-messages-card .code-pill{margin-left:auto;min-height:22px;padding:2px 7px;font-size:10.5px;background:rgba(255,255,255,.18);border-color:rgba(255,255,255,.28);color:#fff}
.client-messages-scroll{
  max-height:188px;
  overflow-y:auto;
  overscroll-behavior:contain;
  padding:7px;
  display:grid;
  gap:7px;
  scrollbar-width:thin;
  scrollbar-color:color-mix(in srgb,var(--primary) 45%,#cbd5e1) transparent;
}
.client-messages-scroll::-webkit-scrollbar,.client-change-history-scroll::-webkit-scrollbar{width:6px;height:6px}
.client-messages-scroll::-webkit-scrollbar-track,.client-change-history-scroll::-webkit-scrollbar-track{background:transparent}
.client-messages-scroll::-webkit-scrollbar-thumb,.client-change-history-scroll::-webkit-scrollbar-thumb{background:color-mix(in srgb,var(--primary) 38%,#cbd5e1);border-radius:999px}
.client-message-item{border:1px solid var(--border);border-radius:9px;background:#fff;padding:8px 9px;min-width:0}
.client-message-head{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:4px}
.client-message-head strong{font-size:11.5px;color:var(--ink);min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.client-message-status{display:inline-flex;align-items:center;min-height:20px;padding:2px 7px;border-radius:999px;font-size:9.5px;font-weight:800;line-height:1;white-space:nowrap;border:1px solid #fed7aa;background:#fff7ed;color:#c2410c}
.client-message-status-done{border-color:#bbf7d0;background:#f0fdf4;color:#15803d}
.client-message-item p{margin:0;color:var(--text);font-size:11.5px;line-height:1.38;overflow-wrap:anywhere}
.client-message-item time{display:block;margin-top:5px;color:var(--muted);font-size:9.5px;font-weight:600}
.client-message-empty{margin:3px 2px;padding:7px 3px;font-size:11.5px}
.client-change-history-scroll{max-height:410px;overflow-y:auto;overscroll-behavior:contain;padding-right:4px;scrollbar-width:thin;scrollbar-color:color-mix(in srgb,var(--primary) 45%,#cbd5e1) transparent}

@media (min-width:901px){
  .quick-order-modal.compact-view-mode .client-messages-scroll{max-height:172px}
  .quick-order-modal.compact-view-mode .client-message-item{padding:6px 8px}
  .quick-order-modal.compact-view-mode .client-message-item p{font-size:11px}
}
@media (max-width:700px){
  .client-messages-scroll{max-height:220px}
  .client-change-history-scroll{max-height:340px}
}


/* ============================================================
   V2.35 — Local timezone + cancellation review + Trash workflow
   ============================================================ */
.order-cancel-requested td{
  background:linear-gradient(0deg,rgba(254,242,242,.78),rgba(254,242,242,.78));
  border-color:#fecaca !important;
}
.order-cancel-requested td:first-child{box-shadow:inset 3px 0 0 #ef4444}
.order-cancel-requested:hover td{background:#fff1f2}
.cancel-request-cell{display:grid;gap:3px;max-width:230px;margin-bottom:6px}
.cancel-request-cell strong{font-size:11px;color:#b42318}
.cancel-request-cell span{font-size:10.5px;line-height:1.35;color:#7f1d1d;overflow-wrap:anywhere}
.cancellation-request-card{border-color:#fecaca;background:#fff7f7}
.cancellation-request-card .card-header{background:#fff1f2}
.cancellation-request-card h3{color:#b42318}
.mini-action.trash{background:#fff !important;border-color:#fda29b !important;color:#b42318 !important;box-shadow:none !important}
.mini-action.trash:hover{background:#fff1f2 !important;border-color:#f87171 !important;color:#991b1b !important}
.order-trash-row td{background:#fafafa;color:#667085}
.order-trash-row td:first-child{box-shadow:inset 3px 0 0 #98a2b3}
.timezone-note{font-size:10.5px;color:var(--muted)}


/* V2.35 — Ready files redesign, release price block, and admin release modal */
.ready-release-modal .modal-body{background:#f6f8fc;padding:18px}
.release-top-grid{display:grid;grid-template-columns:minmax(0,1.15fr) minmax(0,.85fr);gap:16px;align-items:start}
.release-details,.release-comments,.release-price-card{background:#fff;border:1px solid #e5e9f2;border-radius:14px;overflow:hidden;box-shadow:0 10px 30px rgba(15,23,42,.04)}
.release-details .reference-card-title,.release-comments .reference-card-title,.release-price-card .reference-card-title{min-height:44px;padding:11px 14px;border-radius:0}
.release-table{width:100%;border-collapse:collapse}
.release-table th,.release-table td{padding:12px;border-bottom:1px solid #eef1f6;vertical-align:middle}
.release-table th{background:#f8fafc;color:#1f2a44;font-size:12px;text-align:left}
.release-table td strong{font-size:12px;color:#1f2a44}
.release-table tbody tr:last-child td{border-bottom:0}
.release-table .form-control[readonly]{background:#f8fafc;color:#556074}
.release-unit{padding:12px 14px 14px;border-top:1px solid #eef1f6}
.release-comments{padding-bottom:14px}
.release-comments .form-label,.release-comments .form-control{margin-left:14px;width:calc(100% - 28px)}
.release-comments .form-label{margin-top:14px;display:block}
.release-comments .form-control + .form-control,.release-comments select{margin-top:8px}
.large-textarea{min-height:170px;resize:vertical}
.release-price-card{margin-top:16px}
.release-price-body{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:16px;padding:16px 14px;align-items:start}
.release-price-fields{display:grid;gap:10px}
.release-price-inputs{display:grid;grid-template-columns:180px minmax(0,1fr);gap:12px}
.release-price-field{display:grid;gap:7px}
.release-price-help{margin:0}
.release-formats-note{font-size:12px;color:#5b6378}
.release-email-panel{display:grid;gap:8px;align-content:start;justify-items:end}
.release-email-button{min-width:170px;justify-content:center}
.release-email-sub{font-size:12px;color:#667085}
.release-role-strip{display:flex;align-items:center;gap:8px;padding:10px 14px;border-top:1px solid #eef1f6;background:#f9fbff;color:#42526b;font-size:12px;font-weight:600}
.ready-options-title{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:18px 0 10px;font-size:13px;font-weight:700;color:#1f2a44}
.ready-options-title span{display:flex;align-items:center;gap:8px}
.ready-options-title small{font-size:12px;font-weight:500;color:#667085}
.ready-option-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}
.ready-option-card{background:#fff;border:1px solid #e5e9f2;border-radius:14px;overflow:hidden;box-shadow:0 10px 30px rgba(15,23,42,.04)}
.ready-option-card h3{margin:0;padding:12px 14px;text-align:center;color:#fff;background:linear-gradient(90deg,var(--primary-dark),var(--primary));font-size:13px;letter-spacing:.02em}
.upload-stack{padding:12px;display:grid;gap:8px}
.compact-file-input{display:grid;grid-template-columns:60px 1fr;align-items:center;min-height:42px;gap:10px;padding:8px 10px;border:1px dashed #d3d9e6;border-radius:10px;background:#fbfcff;font-size:11px;color:#596174}
.compact-file-input span{font-weight:700;color:#24324a}
.compact-file-input input{min-width:0;font-size:11px}
.ready-download-card .ready-file-list{padding:12px;display:grid;gap:10px}
.ready-file-item{display:grid;gap:10px;padding:10px 12px;border:1px solid #e7ebf3;border-radius:12px;background:#fcfdff}
.ready-file-copy{display:grid;gap:4px}
.ready-file-copy strong{font-size:12px;color:#24324a;overflow-wrap:anywhere}
.ready-file-copy span{font-size:11px;color:#667085}
.ready-file-actions{display:flex;flex-wrap:wrap;align-items:center;gap:8px}
.ready-file-empty{padding:18px 12px;border:1px dashed #d3d9e6;border-radius:12px;background:#fbfcff;color:#667085;font-size:12px;text-align:center}
.status-pill{display:inline-flex;align-items:center;justify-content:center;min-height:28px;padding:0 10px;border-radius:999px;font-size:11px;font-weight:700;border:1px solid transparent}
.status-pill-success{background:#ecfdf3;color:#027a48;border-color:#abefc6}
.status-pill-danger{background:#fef3f2;color:#b42318;border-color:#fecdca}
.admin-release-actions{margin-top:2px}
@media(max-width:1100px){.release-top-grid,.release-price-body,.release-price-inputs,.ready-option-grid{grid-template-columns:1fr}.release-email-panel{justify-items:stretch}.release-email-button{width:100%}.ready-options-title{align-items:flex-start;flex-direction:column}}
@media(max-width:700px){.ready-release-modal .modal-body{padding:12px}.release-table th,.release-table td{padding:9px}.compact-file-input{grid-template-columns:1fr}.release-comments .form-label,.release-comments .form-control{margin-left:12px;width:calc(100% - 24px)}}

/* V2.35.2 — Order View modal requested desktop position */
@media (min-width:901px){
  #orderQuickModal.quick-view-positioned{
    align-items:flex-start;
    justify-content:flex-start;
    padding:14px 20px 24px 28px;
    overflow:auto;
  }
  #orderQuickModal.quick-view-positioned .quick-order-modal.compact-view-mode{
    margin:0;
    flex:0 0 auto;
  }
}
@media (max-width:900px){
  #orderQuickModal.quick-view-positioned{
    align-items:center;
    justify-content:center;
  }
}


/* V2.35.3 — exact Upload Ready Files modal requested by client */
.target-upload-modal{width:min(1240px,calc(100vw - 36px));max-height:calc(100vh - 40px);border-radius:14px;overflow:hidden}
.target-upload-modal .modal-header{min-height:58px;padding:0 20px;background:linear-gradient(90deg,var(--primary-dark),var(--primary));border-bottom:0}
.target-upload-modal .modal-header h3{font-size:14px;font-weight:800}
.target-upload-modal .modal-body{padding:20px;background:#f4f6fb;overflow:auto}
.target-release-top{display:grid;grid-template-columns:minmax(0,1.08fr) minmax(390px,.82fr);gap:18px}
.target-panel{background:#fff;border:1px solid #e0e5ef;border-radius:12px;overflow:hidden}
.target-panel-head{height:40px;display:flex;align-items:center;gap:8px;padding:0 16px;background:linear-gradient(90deg,var(--primary-dark),var(--primary));color:#fff;font-size:13px;font-weight:800}
.target-table-wrap{overflow-x:auto}
.target-release-table{width:100%;border-collapse:collapse;table-layout:fixed}
.target-release-table thead{background:#223a7d}
.target-release-table th{height:34px;padding:0 16px;color:#929cb5;font-size:11px;font-weight:800;letter-spacing:.02em;text-align:left}
.target-release-table th:first-child{width:28%}
.target-release-table td{height:49px;padding:8px 14px;border-bottom:1px solid #e8ebf2;vertical-align:middle}
.target-release-table tbody tr:last-child td{border-bottom:0}
.target-release-table td strong{font-size:12px;line-height:1.1;color:#111827}
.target-release-table .form-control{height:32px;padding:5px 9px;border-radius:7px;font-size:12px;background:#fff}
.target-comments-body{padding:14px}
.target-quick-row{display:grid;grid-template-columns:74px 1fr;gap:10px;align-items:center;margin-bottom:12px}
.target-quick-row label{font-size:12px;font-weight:700;color:#151a2d}
.target-quick-row .form-control{height:36px;font-size:12px}
.target-comments textarea{height:110px;min-height:110px;resize:vertical;padding:12px;font-size:12px}
.target-price-row{margin-top:20px;min-height:70px;display:grid;grid-template-columns:minmax(0,1fr) 190px;gap:16px;align-items:center;padding:14px 16px;background:#fff;border:1px solid #e0e5ef;border-radius:12px}
.target-price-left{display:grid;grid-template-columns:auto 310px minmax(280px,1fr);gap:16px;align-items:center}
.target-price-title{display:flex;align-items:center;gap:8px;white-space:nowrap;font-size:13px;color:#111827}
.target-currency-amount{display:grid;grid-template-columns:88px 1fr}
.target-currency-amount select{border-radius:8px 0 0 8px;border-right:0;font-weight:700}
.target-currency-amount input{border-radius:0 8px 8px 0}
.target-currency-amount .form-control{height:38px;font-size:12px}
.target-price-left p{margin:0;font-size:11px;line-height:1.45;color:#6b7280}
.target-email-cell{display:flex;justify-content:flex-end;border-left:1px solid #edf0f5;padding-left:16px}
.target-email-button{min-width:150px;height:40px;justify-content:center;gap:7px}
.target-ready-title{display:flex;align-items:center;gap:8px;margin:20px 0 12px;color:#635bff;font-size:13px;font-weight:800}
.target-option-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}
.target-option-card{background:#fff;border:1px solid #e0e5ef;border-radius:11px;overflow:hidden}
.target-option-card h3{margin:0;height:36px;display:flex;align-items:center;justify-content:center;background:linear-gradient(90deg,var(--primary-dark),var(--primary));color:#fff;font-size:13px;font-weight:800}
.target-upload-list{padding:12px;display:grid;gap:9px}
.target-file-input{display:flex;align-items:center;min-height:40px;border:1px solid #dfe4ee;border-radius:8px;padding:5px 12px;background:#fff}
.target-file-input input[type=file]{width:100%;font-size:11px;color:#70778a}
.target-file-input input[type=file]::file-selector-button{border:0;border-radius:7px;background:#eef1f7;color:#111827;font-weight:700;padding:7px 12px;margin-right:8px;cursor:pointer}
.target-modal-footer{min-height:68px;padding:12px 18px;background:#fff;border-top:1px solid #e3e6ee;gap:10px}
.target-modal-footer .button{min-width:86px;height:40px;font-weight:800}
.target-update-btn{background:#8e1231!important;border-color:#8e1231!important;color:#fff!important}
.target-release-btn{background:#ba1834!important;border-color:#ba1834!important;color:#fff!important}
@media(max-width:1050px){.target-release-top{grid-template-columns:1fr}.target-price-row{grid-template-columns:1fr}.target-price-left{grid-template-columns:1fr 1fr}.target-price-left p{grid-column:1/-1}.target-email-cell{border-left:0;padding-left:0;justify-content:flex-start}.target-option-grid{grid-template-columns:1fr}}
@media(max-width:700px){.target-upload-modal{width:calc(100vw - 12px);max-height:96vh}.target-upload-modal .modal-body{padding:12px}.target-price-left{grid-template-columns:1fr}.target-currency-amount{grid-template-columns:92px 1fr}.target-release-table th,.target-release-table td{padding-left:9px;padding-right:9px}.target-release-table th:first-child{width:24%}.target-modal-footer{flex-wrap:wrap}.target-modal-footer .button{flex:1}.target-quick-row{grid-template-columns:1fr;gap:6px}}


/* V2.35.4 — Orders table Upload button now opens the exact ready-file upload modal */
.quick-order-modal:has([data-ready-upload-form]){width:min(1240px,calc(100vw - 56px));max-height:calc(100vh - 72px)}
.quick-order-modal:has([data-ready-upload-form]) .modal-body{padding:20px;background:#f4f6fb;overflow:auto}
.quick-ready-upload-form{display:grid;gap:18px}
.exact-upload-top{grid-template-columns:minmax(0,1.15fr) minmax(360px,.85fr)}
.exact-release-price-row{display:grid;grid-template-columns:auto 120px 150px minmax(260px,1fr) auto;gap:0;align-items:center;background:#fff;border:1px solid #e2e6ef;border-radius:12px;overflow:hidden;min-height:70px;padding:14px 16px}
.exact-release-label{display:flex;align-items:center;gap:8px;padding-right:18px;white-space:nowrap;color:#171b30}
.exact-currency{border-radius:8px 0 0 8px!important}
.exact-amount{border-left:0!important;border-radius:0 8px 8px 0!important}
.exact-release-help{padding:0 16px;color:#6c7487;font-size:12px}
.exact-email-client{white-space:nowrap;justify-content:center}
.exact-ready-title{margin:0;color:#6555eb}
.exact-ready-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:18px}
.exact-file-input{display:block;padding:7px 10px;min-height:42px;border-style:solid;background:#fff}
.exact-file-input input{width:100%;font-size:11px}
.quick-ready-upload-actions{display:flex;justify-content:flex-end;gap:10px;margin:0 -20px -20px;padding:16px 20px;background:#fff;border-top:1px solid #e4e7ef;position:sticky;bottom:-20px;z-index:2}
.quick-ready-upload-actions .button{min-width:92px}
.quick-ready-upload-actions .button-release{background:#b51531;border-color:#b51531}
.quick-ready-upload-error{margin:0}
@media(max-width:1000px){.exact-upload-top,.exact-ready-grid{grid-template-columns:1fr}.exact-release-price-row{grid-template-columns:1fr 1fr;gap:10px}.exact-release-label,.exact-release-help,.exact-email-client{grid-column:1/-1}.exact-email-client{width:100%}}
@media(max-width:650px){.quick-order-modal:has([data-ready-upload-form]){width:calc(100vw - 14px)}.exact-release-price-row{grid-template-columns:1fr}.exact-release-label,.exact-release-help,.exact-email-client{grid-column:auto}.quick-ready-upload-actions{flex-wrap:wrap}.quick-ready-upload-actions .button{flex:1}}

.quick-order-modal.upload-ready-mode .modal-header{background:linear-gradient(90deg,var(--primary-dark),var(--primary));color:#fff;border-bottom:0;padding:16px 20px}
.quick-order-modal.upload-ready-mode .modal-header h3{color:#fff;font-size:14px}
.quick-order-modal.upload-ready-mode .modal-header .icon-button{color:#fff;background:transparent;border-color:transparent}
.quick-order-modal.upload-ready-mode .modal-header .icon-button:hover{background:rgba(255,255,255,.12)}

/* V2.35.6 — selective release checkboxes + ready-file format limits */
.target-ready-title small,.exact-ready-title small{margin-left:auto;font-size:11px;font-weight:600;color:#667085}
.selectable-upload-stack{gap:8px}
.ready-release-file{display:grid;grid-template-columns:26px minmax(0,1fr);gap:9px;align-items:center;min-height:42px;padding:7px 10px;border:1px solid #dce3ef;border-radius:9px;background:#f8fbff;cursor:pointer}
.ready-release-check{width:17px;height:17px;accent-color:var(--primary);cursor:pointer}
.ready-release-file-copy{display:grid;gap:2px;min-width:0}
.ready-release-file-copy strong{font-size:11px;color:#172033;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ready-release-file-copy small{font-size:10px;color:#768096}
.ready-new-file-row{display:grid;grid-template-columns:minmax(0,1fr);gap:8px;align-items:center}
.ready-new-check{display:flex;align-items:center;justify-content:center;min-height:40px;border:1px solid #dfe4ee;border-radius:8px;background:#f7f9fc;cursor:pointer}
.ready-new-file-row .target-file-input,.ready-new-file-row .exact-file-input{margin:0;min-width:0}
.release-selection-help{display:flex;align-items:center;gap:7px;padding:10px 12px;border:1px solid #dbe5f2;border-radius:9px;background:#f8fbff;color:#536177;font-size:11px}
.quick-ready-upload-error[hidden]{display:none!important}
@media(max-width:700px){.target-ready-title,.exact-ready-title{align-items:flex-start;flex-direction:column}.target-ready-title small,.exact-ready-title small{margin-left:0}.ready-new-file-row{grid-template-columns:minmax(0,1fr)}}


/* V2.35.7 fail-safe: content must remain visible even if app.js is stale, blocked or throws. */
.page-content > * { opacity:1 !important; transform:none !important; }
body.ui-ready .page-content > * { opacity:1 !important; transform:none !important; }


/* V2.35.11 — client New Order service chooser */
.service-choice-shell{max-width:1120px;margin:8px auto 0;padding:10px 0 34px}
.service-choice-heading{text-align:center;max-width:720px;margin:22px auto 28px}
.service-choice-kicker{display:inline-flex;align-items:center;justify-content:center;min-height:28px;padding:0 11px;border-radius:999px;background:#eef4ff;color:var(--primary);font-size:11px;font-weight:800;letter-spacing:.08em}
.service-choice-heading h2{margin:12px 0 8px;font-size:30px;line-height:1.15;color:#151a2b}
.service-choice-heading p{margin:0;color:#70778c;font-size:14px;line-height:1.7}
.service-choice-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:22px}
.service-choice-card{position:relative;display:grid;grid-template-columns:76px minmax(0,1fr);gap:18px;align-items:start;min-height:220px;padding:30px;border:1px solid #e0e6f0;border-radius:22px;background:#fff;text-decoration:none;box-shadow:0 18px 45px rgba(15,23,42,.07);transition:transform .18s ease,border-color .18s ease,box-shadow .18s ease;color:inherit;overflow:hidden}
.service-choice-card:before{content:"";position:absolute;inset:0 auto 0 0;width:5px;background:linear-gradient(180deg,var(--primary),var(--primary-dark));opacity:0;transition:opacity .18s ease}
.service-choice-card:hover{transform:translateY(-4px);border-color:color-mix(in srgb,var(--primary) 40%,#dfe5ef);box-shadow:0 24px 60px rgba(15,23,42,.11)}
.service-choice-card:hover:before{opacity:1}
.service-choice-icon{display:flex;align-items:center;justify-content:center;width:68px;height:68px;border-radius:18px;background:linear-gradient(145deg,color-mix(in srgb,var(--primary) 11%,#fff),#f8fbff);color:var(--primary);border:1px solid color-mix(in srgb,var(--primary) 20%,#e5eaf2)}
.service-choice-copy{display:grid;gap:11px;align-content:start}
.service-choice-copy>strong{font-size:21px;color:#172033}
.service-choice-copy>small{font-size:13px;line-height:1.65;color:#6c7489;max-width:430px}
.service-choice-cta{display:flex;align-items:center;gap:7px;margin-top:15px;color:var(--primary);font-size:13px;font-weight:800}
.service-choice-help{margin:22px auto 0;padding:13px 16px;max-width:760px;border:1px solid #e3e8f1;border-radius:12px;background:#fafcff;color:#687187;text-align:center;font-size:12px}
.selected-service-banner{display:flex;align-items:center;gap:11px;margin:0 0 14px;padding:12px 14px;border:1px solid #dce7f7;border-radius:12px;background:#f8fbff;color:#25334c}
.selected-service-banner>span{display:flex;color:var(--primary)}
.selected-service-banner>div{display:grid;gap:2px;min-width:0;flex:1}
.selected-service-banner strong{font-size:13px}
.selected-service-banner small{font-size:11px;color:#6d768b}
.selected-service-banner>a{font-size:12px;font-weight:800;color:var(--primary);text-decoration:none;white-space:nowrap}
@media(max-width:850px){.service-choice-grid{grid-template-columns:1fr}.service-choice-card{min-height:185px}.service-choice-heading h2{font-size:25px}}
@media(max-width:560px){.service-choice-shell{padding-top:0}.service-choice-card{grid-template-columns:1fr;padding:22px}.service-choice-icon{width:58px;height:58px}.selected-service-banner{align-items:flex-start;flex-wrap:wrap}.selected-service-banner>a{width:100%;padding-left:29px}}


/* V2.35.12 — four New Order choices + selective ready-file deletion */
.service-choice-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
.ready-release-file.existing-ready-file{grid-template-columns:26px minmax(0,1fr) auto;cursor:default}
.ready-send-select{display:flex;align-items:center;justify-content:center;cursor:pointer}
.ready-delete-select{display:flex;align-items:center;gap:5px;padding:5px 7px;border:1px solid #fecaca;border-radius:7px;background:#fff5f5;color:#b42318;font-size:10px;font-weight:700;cursor:pointer;white-space:nowrap}
.ready-delete-select input{accent-color:#d92d20}
.quick-ready-upload-actions .button-danger{min-width:120px}
@media(max-width:650px){.ready-release-file.existing-ready-file{grid-template-columns:26px minmax(0,1fr)}.ready-delete-select{grid-column:2;justify-self:start}.quick-ready-upload-actions .button-danger{min-width:0}}

/* V2.35.13 — Lock service/request type to the New Order card selection */
.fixed-order-field{display:flex;align-items:center;justify-content:space-between;gap:10px;background:#f7f9fc!important;color:#263249;font-weight:700;cursor:not-allowed;user-select:none}
.fixed-order-lock{display:inline-flex;align-items:center;gap:5px;padding:4px 8px;border-radius:999px;background:#eef3fb;color:#5b6780;font-size:10px;font-weight:800;white-space:nowrap}

/* v2.35.15: blank upload slots never show a release checkbox; checkbox appears only on saved uploaded files. */
.ready-new-file-row>.ready-new-check{display:none!important}
