:root{--navy:#10233f;--blue:#1d6fe8;--teal:#11a6a6;--soft:#f5f8fc;--muted:#6b7280;--border:#e7edf5;--danger:#dc3545;--sidebar:#ffffff;--ink:#172033;}
*{box-sizing:border-box}body{margin:0;font-family:Inter,Segoe UI,Arial,sans-serif;background:var(--soft);color:var(--ink)}.app-shell{display:flex;min-height:100vh}.sidebar{width:280px;background:var(--sidebar);color:#172033;padding:22px;position:fixed;inset:0 auto 0 0;overflow:auto;border-right:1px solid var(--border);box-shadow:8px 0 30px rgba(16,35,63,.04)}.brand{display:flex;gap:12px;align-items:center;margin-bottom:28px;padding-bottom:18px;border-bottom:1px solid var(--border)}.brand-mark{width:46px;height:46px;border-radius:16px;background:linear-gradient(135deg,var(--blue),var(--teal));display:grid;place-items:center;font-weight:800;color:#fff}.brand small{display:block;color:#667085}.nav-section{font-size:11px;text-transform:uppercase;letter-spacing:.12em;color:#98a2b3;margin:18px 8px 7px;font-weight:800}.nav-link{color:#344054;border-radius:13px;padding:10px 12px;margin:2px 0;display:flex;align-items:center;gap:10px;font-weight:650}.nav-link i{font-size:17px;width:21px;text-align:center;color:#1d6fe8}.nav-link:hover{background:#eef6ff;color:#10233f}.nav-link:hover i{color:#0b5ed7}.main{margin-left:280px;width:calc(100% - 280px)}.topbar{min-height:92px;background:#fff;border-bottom:1px solid var(--border);padding:18px 28px;display:flex;align-items:center;justify-content:space-between;position:sticky;top:0;z-index:5}.page-title{font-size:26px;margin:0;font-weight:750}.page-subtitle{margin:2px 0 0;color:var(--muted)}.user-chip{display:flex;align-items:center;gap:8px;background:#f8fafc;border:1px solid var(--border);padding:8px 10px;border-radius:16px}.user-chip small{color:var(--muted)}.content{padding:28px}.cardx{background:#fff;border:1px solid var(--border);border-radius:22px;box-shadow:0 8px 28px rgba(16,35,63,.06);padding:22px;margin-bottom:20px}.metric{padding:20px;border-radius:22px;background:#fff;border:1px solid var(--border);box-shadow:0 8px 28px rgba(16,35,63,.05)}.metric h3{font-size:32px;margin:0}.metric span{color:var(--muted)}.badge-soft{border-radius:999px;padding:6px 11px;font-size:12px}.badge-received{background:#e8f1ff;color:#0d6efd}.badge-pending_assignment,.badge-review_pending{background:#fff5db;color:#9a6700}.badge-assigned,.badge-in_progress{background:#e7f8f8;color:#087f7f}.badge-correction_required,.badge-reassigned_correction{background:#ffe8ea;color:#b42318}.badge-approved,.badge-report_sent,.badge-closed{background:#e9f9ef;color:#0f7a36}.table{vertical-align:middle}.form-control,.form-select{border-radius:12px;border-color:#dbe5f0}.btn{border-radius:12px}.btn-primary{background:linear-gradient(135deg,var(--blue),#1556b8);border:0}.btn-success{background:linear-gradient(135deg,#10a35a,#0d864a);border:0}.section-title{font-size:18px;font-weight:750;margin-bottom:14px}.empty{padding:36px;text-align:center;color:var(--muted);border:1px dashed #cbd5e1;border-radius:20px;background:#fff}.form-section{border:1px solid var(--border);background:#fbfdff;border-radius:18px;padding:18px;margin-bottom:18px}.form-section h5{font-size:16px;font-weight:800;margin:0 0 4px;color:#10233f}.form-section .section-help{color:var(--muted);font-size:13px;margin:0 0 14px}.form-label{font-weight:700;color:#1f2a44;margin-bottom:6px}.required::after{content:" *";color:var(--danger);font-weight:800}.help-text{display:block;color:var(--muted);font-size:12px;margin-top:5px;line-height:1.35}.input-icon{position:relative}.input-icon .form-control,.input-icon .form-select{padding-left:40px}.input-icon span{position:absolute;left:14px;top:50%;transform:translateY(-50%);opacity:.65}.form-actions{display:flex;gap:10px;align-items:center;margin-top:18px;flex-wrap:wrap}.toggle-row{display:flex;align-items:center;gap:10px;padding:11px 13px;border:1px solid var(--border);border-radius:14px;background:white}.badge-required{font-size:11px;color:#b42318;background:#ffe8ea;border-radius:999px;padding:4px 8px}.module-note{padding:14px 16px;border-radius:16px;background:#eef6ff;border:1px solid #cfe6ff;color:#16457a;margin-bottom:16px}.field-error{color:#b42318;font-size:12px;margin-top:5px}.compact-label{font-size:12px;font-weight:700;color:#344054;margin-bottom:4px}.table .form-control,.table .form-select{min-width:120px}.select-help{border:1px dashed #cbd5e1;border-radius:14px;padding:12px;background:#fcfcfd;color:#667085;font-size:13px}.actions-cell{white-space:nowrap}.rating-pill{display:inline-flex;gap:2px;color:#f59e0b;font-size:14px}.muted-small{font-size:12px;color:#667085}.multi-select{min-height:120px}
@media(max-width:900px){.sidebar{position:static;width:100%}.app-shell{display:block}.main{margin-left:0;width:100%}.topbar{height:auto;gap:12px;align-items:flex-start;flex-direction:column}}
.top-actions{display:flex;align-items:center;gap:12px;flex-wrap:wrap;justify-content:flex-end}.sample-search{position:relative}.sample-search i{position:absolute;left:12px;top:50%;transform:translateY(-50%);color:#667085}.sample-search input{height:42px;border:1px solid var(--border);border-radius:14px;padding:8px 12px 8px 38px;min-width:250px;background:#fff}.sample-link{font-weight:800;text-decoration:none;color:#10233f}.sample-link:hover{color:#0d6efd;text-decoration:underline}.timeline{position:relative;margin:0;padding:0;list-style:none}.timeline li{display:flex;gap:12px;margin:0 0 14px}.timeline-dot{width:13px;height:13px;border-radius:50%;background:#1d6fe8;margin-top:5px;box-shadow:0 0 0 5px #e8f1ff}.timeline-card{border:1px solid var(--border);border-radius:14px;padding:10px 12px;background:#fff;flex:1}.result-chain{border-left:4px solid #dbeafe;padding-left:14px}.result-version{background:#fff;border:1px solid var(--border);border-radius:18px;padding:14px;margin-bottom:12px}.customer-combo{position:relative}.customer-results{position:absolute;z-index:20;left:0;right:0;background:#fff;border:1px solid var(--border);border-radius:14px;box-shadow:0 12px 28px rgba(16,35,63,.12);max-height:260px;overflow:auto;margin-top:6px;display:none}.customer-option{padding:11px 14px;cursor:pointer;border-bottom:1px solid #f1f5f9}.customer-option:last-child{border-bottom:0}.customer-option:hover{background:#eef6ff}.badge-review_pending,.badge-result_submitted{background:#fff5db;color:#9a6700}.badge-report_generated{background:#edf4ff;color:#1556b8}.badge-invoice_generated,.badge-invoice_sent,.badge-payment_pending{background:#f3e8ff;color:#6d28d9}.badge-payment_received,.badge-approved,.badge-report_sent,.badge-closed{background:#e9f9ef;color:#0f7a36}.btn-badge-fix{min-width:150px;text-align:center;white-space:normal;line-height:1.25;padding:10px 14px}
@media(max-width:900px){.top-actions{width:100%;justify-content:flex-start}.sample-search input{min-width:100%;width:100%}.sample-search{width:100%}}

/* v0.8 colourful SaaS dashboard/cards */
.content > .row.g-3.mb-4 > div:nth-child(1) .metric{background:linear-gradient(135deg,#e8f1ff,#ffffff);border-left:5px solid #1d6fe8}
.content > .row.g-3.mb-4 > div:nth-child(2) .metric{background:linear-gradient(135deg,#fff5db,#ffffff);border-left:5px solid #f59e0b}
.content > .row.g-3.mb-4 > div:nth-child(3) .metric{background:linear-gradient(135deg,#e9f9ef,#ffffff);border-left:5px solid #12b76a}
.content > .row.g-3.mb-4 > div:nth-child(4) .metric{background:linear-gradient(135deg,#f3e8ff,#ffffff);border-left:5px solid #7c3aed}
.content > .row.g-3.mb-4 > div:nth-child(5) .metric{background:linear-gradient(135deg,#e7f8f8,#ffffff);border-left:5px solid #11a6a6}
.content > .row.g-3.mb-4 > div:nth-child(6) .metric{background:linear-gradient(135deg,#ffe8ea,#ffffff);border-left:5px solid #dc3545}
.metric{position:relative;overflow:hidden;transition:.18s ease}.metric:after{content:"";position:absolute;right:-22px;top:-24px;width:90px;height:90px;border-radius:50%;background:rgba(255,255,255,.6)}.metric:hover{transform:translateY(-2px);box-shadow:0 14px 34px rgba(16,35,63,.12)}
.cardx{position:relative;overflow:hidden}.cardx:before{content:"";position:absolute;left:0;top:0;right:0;height:4px;background:linear-gradient(90deg,#1d6fe8,#11a6a6,#7c3aed)}
.table tbody tr:hover{background:#f8fbff}.sample-link{color:#1556b8}.sample-link:before{content:"\F3E7";font-family:"bootstrap-icons";font-weight:normal;margin-right:5px;color:#11a6a6}
.invoice-chip{display:flex;align-items:center;gap:12px;background:linear-gradient(135deg,#f3e8ff,#ffffff);border:1px solid #eadcff;border-radius:18px;padding:12px 14px}.invoice-chip i{font-size:24px;color:#7c3aed}.invoice-total-box{margin-left:auto;max-width:360px;background:linear-gradient(135deg,#eef6ff,#ffffff);border:1px solid var(--border);border-radius:18px;padding:16px;display:grid;gap:8px}.invoice-total-box div{display:flex;justify-content:space-between}.invoice-total-box .grand{font-size:18px;border-top:1px solid var(--border);padding-top:8px;color:#10233f}
.badge-draft{background:#eef6ff;color:#1556b8}.badge-sent{background:#e9f9ef;color:#0f7a36}.badge-paid{background:#e9f9ef;color:#0f7a36}.badge-partially_paid{background:#fff5db;color:#9a6700}.badge-overdue{background:#ffe8ea;color:#b42318}.badge-cancelled{background:#f2f4f7;color:#667085}

/* v0.9 colourful cards, search autocomplete, timeline cards */
.metric{position:relative; overflow:hidden; border:0!important; color:#09203f; background:linear-gradient(135deg,#ffffff 0%,#eef7ff 100%)!important; box-shadow:0 16px 35px rgba(31,58,147,.10)!important;}
.metric:before{content:""; position:absolute; right:-30px; top:-30px; width:100px; height:100px; border-radius:999px; background:rgba(13,110,253,.12)}
.metric:nth-child(1), .row > div:nth-child(1) .metric{background:linear-gradient(135deg,#eff6ff,#ffffff)!important;}
.row > div:nth-child(2) .metric{background:linear-gradient(135deg,#fff7ed,#ffffff)!important;}
.row > div:nth-child(3) .metric{background:linear-gradient(135deg,#ecfdf5,#ffffff)!important;}
.row > div:nth-child(4) .metric{background:linear-gradient(135deg,#f5f3ff,#ffffff)!important;}
.row > div:nth-child(5) .metric{background:linear-gradient(135deg,#fdf2f8,#ffffff)!important;}
.row > div:nth-child(6) .metric{background:linear-gradient(135deg,#ecfeff,#ffffff)!important;}
.metric h3{font-weight:800; font-size:2.2rem; margin-bottom:.25rem;}
.metric span{font-weight:600; color:#526175;}
.sample-link{font-weight:800; color:#0d47a1; text-decoration:none;}
.sample-link:hover{text-decoration:underline;}
.global-search{position:relative; min-width:330px;}
.global-search-results{display:none; position:absolute; top:calc(100% + 8px); left:0; right:0; z-index:5000; background:#fff; border:1px solid #dbe7f5; border-radius:18px; box-shadow:0 18px 45px rgba(15,23,42,.16); padding:8px; max-height:360px; overflow:auto;}
.global-search-option{display:block; padding:10px 12px; border-radius:14px; color:#0f172a; text-decoration:none;}
.global-search-option:hover{background:#eef6ff;}
.global-search-option strong{display:block; font-size:.95rem;}
.global-search-option span{display:block; color:#4b5563; font-size:.86rem;}
.global-search-option small{display:inline-block; margin-top:3px; color:#0d9488; text-transform:capitalize;}
.search-empty{padding:12px; color:#64748b;}
.customer-combo{position:relative;}
.customer-results{display:none; position:absolute; top:calc(100% + 8px); left:0; right:0; z-index:3000; background:#fff; border:1px solid #dbe7f5; border-radius:18px; box-shadow:0 18px 45px rgba(15,23,42,.15); padding:8px; max-height:330px; overflow:auto;}
.customer-option{padding:11px 12px; border-radius:14px; cursor:pointer;}
.customer-option:hover{background:#eff6ff;}
.status-card{border:1px solid #e5edf6; border-radius:20px; padding:14px; background:linear-gradient(135deg,#ffffff,#f8fbff); box-shadow:0 10px 26px rgba(15,23,42,.06);}
.status-card .status-icon{width:42px;height:42px;border-radius:14px;display:flex;align-items:center;justify-content:center;background:#e0f2fe;color:#075985;font-size:20px;}
.mail-card{background:linear-gradient(135deg,#f0fdf4,#ffffff); border:1px solid #bbf7d0; border-radius:18px; padding:14px;}
.payment-card{background:linear-gradient(135deg,#fff7ed,#ffffff); border:1px solid #fed7aa; border-radius:18px; padding:14px;}
.invoice-logo{max-height:64px; max-width:160px; object-fit:contain;}
.recipient-list{max-height:220px; overflow:auto; border:1px solid #e5edf6; border-radius:16px; padding:10px; background:#fff;}
.recipient-item{display:flex; gap:8px; padding:8px; border-bottom:1px solid #f1f5f9;}
.recipient-item:last-child{border-bottom:0;}
@media print{.sidebar,.topbar,.form-actions,.no-print{display:none!important}.main{margin:0!important}.content{padding:0!important}.cardx{box-shadow:none!important;border:0!important}.invoice-print{font-size:12px}}

/* v1.0 logo, floating shortcut icons and template designer */
.brand-logo{width:58px;height:58px;border-radius:16px;background:#fff;display:grid;place-items:center;border:1px solid var(--border);box-shadow:0 8px 18px rgba(16,35,63,.08);overflow:hidden;flex:0 0 58px}.brand-logo img{max-width:50px;max-height:50px;object-fit:contain}.brand-mark{display:none}.shortcut-card{overflow:visible}.shortcut-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(120px,1fr));gap:12px}.shortcut-tile{position:relative;text-decoration:none;color:#10233f;border:1px solid #dbe7f5;background:#fff;border-radius:22px;padding:18px 12px 14px;text-align:center;font-weight:750;min-height:112px;display:flex;align-items:center;justify-content:flex-end;flex-direction:column;box-shadow:0 12px 26px rgba(16,35,63,.08);transition:.18s ease}.shortcut-tile i{position:absolute;top:-18px;width:46px;height:46px;border-radius:18px;display:grid;place-items:center;color:#fff;background:linear-gradient(135deg,#1d6fe8,#11a6a6);font-size:22px;box-shadow:0 10px 25px rgba(29,111,232,.26)}.shortcut-tile.primary i{background:linear-gradient(135deg,#1d6fe8,#1556b8)}.shortcut-tile.success i{background:linear-gradient(135deg,#10a35a,#0d864a)}.shortcut-tile.warning i{background:linear-gradient(135deg,#f59e0b,#d97706)}.shortcut-tile:hover{transform:translateY(-3px);box-shadow:0 18px 35px rgba(16,35,63,.15);color:#0d47a1}.action-card{display:flex;justify-content:space-between;align-items:center;gap:12px;border:1px solid #e5edf6;background:linear-gradient(135deg,#fff,#f8fbff);border-radius:18px;padding:14px;margin-bottom:12px}.invoice-template-option{display:block;border:1px solid #e2e8f0;border-radius:22px;padding:14px;background:#fff;cursor:pointer;min-height:220px;transition:.18s ease}.invoice-template-option input{float:right}.invoice-template-option.selected,.invoice-template-option:hover{border-color:#1d6fe8;box-shadow:0 14px 34px rgba(29,111,232,.12)}.invoice-template-option strong{display:block;margin-top:12px;color:#10233f}.invoice-template-option small{display:block;color:#667085;line-height:1.35}.template-preview{height:120px;border-radius:16px;border:1px solid #e5edf6;padding:12px;background:#fbfdff}.preview-head{height:32px;display:flex;justify-content:space-between;align-items:center;border-bottom:2px solid #1d6fe8}.preview-head span{width:42px;height:22px;background:#1d6fe8;border-radius:8px}.preview-head b{font-size:12px}.preview-lines{padding-top:12px}.preview-lines i{display:block;height:8px;background:#e5edf6;border-radius:99px;margin-bottom:7px}.preview-lines i:nth-child(1){width:90%}.preview-lines i:nth-child(2){width:70%}.preview-lines i:nth-child(3){width:82%}.preview-total{margin-left:auto;margin-top:6px;width:80px;height:20px;border-radius:8px;background:#dbeafe}.template-modern .preview-head{background:linear-gradient(135deg,#1d6fe8,#11a6a6);border:0;border-radius:10px;padding:5px;color:#fff}.template-modern .preview-head span{background:#fff}.template-compact{height:92px}.template-compact .preview-lines i{height:6px;margin-bottom:5px}.template-premium{border:2px solid #1d6fe8;background:#fff}.form-control-color{width:72px;height:45px}.sidebar .nav-link[href*="tests"]{display:flex}.status-card,.action-card{break-inside:avoid}

/* v1.2: floating quick action menu removed as requested */
.quick-float-wrap{display:none!important}
/* v1.5 invoice workflow */
.invoice-customer-block{border:1px solid #dbe7ff;border-radius:18px;padding:14px;margin:14px 0;background:linear-gradient(135deg,#ffffff,#f8fbff)}
.customer-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:10px}
.compact-action-card{padding:12px 14px;margin:8px 0;border-radius:16px}
.invoice-total-box{display:flex;gap:18px;justify-content:flex-end;align-items:center;background:#f8fbff;border:1px solid #dbe7ff;border-radius:18px;padding:14px;margin:16px 0;flex-wrap:wrap}
.invoice-total-box .grand{font-size:1.15rem;color:#0a3d91}
.recipient-list{border:1px solid #dbe7ff;border-radius:16px;padding:10px;background:#fff;max-height:260px;overflow:auto}
.recipient-item{display:flex;gap:10px;padding:10px;border-bottom:1px dashed #e6eefc;cursor:pointer}
.recipient-item:last-child{border-bottom:0}.mail-card{background:#f7fafc;border:1px dashed #cbd5e1;border-radius:16px;padding:14px;color:#475569}

/* v1.6 invoice selection UX */
.selectable-invoice-card { border-color: #b7f0cf; background: linear-gradient(135deg,#ffffff,#f4fff8); }
.already-invoiced-card { opacity: .92; background: #fafafa; }
.invoice-sample-check { width: 1.25rem; height: 1.25rem; cursor:pointer; }
.customer-head .btn[disabled] { cursor:not-allowed; opacity:.75; }

/* v1.7 productivity dashboard and assignment UX */
.badge-soft{font-weight:800;letter-spacing:.01em;display:inline-flex;align-items:center;justify-content:center;min-height:30px}.status-card strong,.timeline-card strong{font-weight:850}.assign-table-wrap{overflow-x:auto}.assign-table th,.assign-table td{vertical-align:middle}.assignment-form{min-width:820px}.multi-instrument-select{min-height:106px}.metric{position:relative;overflow:hidden}.metric::after{content:"";position:absolute;right:-28px;top:-28px;width:96px;height:96px;border-radius:50%;background:rgba(29,111,232,.09);border:3px solid rgba(29,111,232,.08)}.metric-blue{background:linear-gradient(135deg,#eef6ff,#ffffff)}.metric-green{background:linear-gradient(135deg,#ecfdf3,#ffffff)}.metric-amber{background:linear-gradient(135deg,#fffbeb,#ffffff)}.metric-purple{background:linear-gradient(135deg,#f4efff,#ffffff)}.metric-rose{background:linear-gradient(135deg,#fff1f2,#ffffff)}.metric-teal{background:linear-gradient(135deg,#ecfeff,#ffffff)}.analytics-card{background:linear-gradient(135deg,#ffffff,#f8fbff);border-top:5px solid transparent;border-image:linear-gradient(90deg,#1d6fe8,#11a6a6,#7c3aed) 1}.analytics-chip{display:inline-flex;align-items:center;gap:7px;padding:8px 12px;border-radius:999px;background:#eef6ff;color:#1556b8;font-weight:800;font-size:13px}.workload-row{display:grid;grid-template-columns:minmax(150px,1fr) 180px 48px;align-items:center;gap:12px;padding:12px 0;border-bottom:1px solid #eef2f7}.workload-row:last-child{border-bottom:0}.workload-row strong{display:block;color:#10233f}.workload-row small{display:block;color:#667085}.occupancy-meter{height:12px;background:#eef2f7;border-radius:999px;overflow:hidden}.occupancy-meter span{display:block;height:100%;border-radius:999px;background:linear-gradient(90deg,#1d6fe8,#11a6a6,#7c3aed)}.workload-row b{font-size:13px;color:#10233f;text-align:right}@media(max-width:768px){.workload-row{grid-template-columns:1fr}.assignment-form{min-width:680px}}
