:root {
  --navy: #17233b;
  --navy-2: #223252;
  --orange: #ff8a3d;
  --orange-soft: #fff1e8;
  --ink: #1b2434;
  --muted: #667085;
  --line: #e4e8ef;
  --surface: #ffffff;
  --canvas: #f4f6f9;
  --green: #14804a;
  --red: #b42318;
  --blue: #175cd3;
  --radius: 16px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--canvas);
  font-synthesis: none;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; background: var(--canvas); }
button, input, textarea, select { font: inherit; }
button, select { cursor: pointer; }
button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, a:focus-visible { outline: 3px solid rgba(255, 138, 61, .35); outline-offset: 2px; }

.sidebar { position: fixed; inset: 0 auto 0 0; width: 252px; padding: 28px 20px 20px; background: var(--navy); color: white; display: flex; flex-direction: column; z-index: 5; }
.brand { color: white; display: flex; align-items: center; gap: 12px; text-decoration: none; padding: 0 8px 30px; }
.brand-mark { width: 42px; height: 38px; border-radius: 10px; display: block; overflow: hidden; background: #0e1729; }
.brand-mark img { width: 100%; height: 100%; display: block; object-fit: cover; object-position: center; }
.brand strong, .brand small { display: block; line-height: 1.1; letter-spacing: .08em; }
.brand small { font-size: 10px; opacity: .65; margin-top: 4px; }
.nav { display: grid; gap: 8px; }
.nav a { position: relative; color: #c9d2e3; text-decoration: none; padding: 12px 13px; border-radius: 10px; display: flex; align-items: center; gap: 12px; font-size: 14px; font-weight: 650; }
.nav a:hover { background: rgba(255,255,255,.07); color: white; }
.nav a.active { background: rgba(255,138,61,.14); color: white; }
.nav a.active::before { content: ""; position: absolute; left: -20px; width: 4px; height: 24px; border-radius: 0 4px 4px 0; background: var(--orange); }
.nav a span { width: 20px; text-align: center; font-size: 17px; }
.nav a em { margin-left: auto; font-size: 9px; font-style: normal; letter-spacing: .08em; color: #8e9ab0; }
.nav a.disabled { cursor: default; opacity: .64; }
.sidebar-foot { margin-top: auto; padding: 16px 10px 4px; border-top: 1px solid rgba(255,255,255,.1); display: flex; align-items: center; gap: 10px; }
.company-avatar { width: 34px; height: 34px; border-radius: 50%; background: #2f4268; display: grid; place-items: center; font-size: 11px; font-weight: 800; }
.sidebar-foot strong, .sidebar-foot small { display: block; }
.sidebar-foot strong { font-size: 13px; }.sidebar-foot small { color: #95a2b8; font-size: 11px; margin-top: 2px; }

.shell { margin-left: 252px; padding: 30px 38px 56px; max-width: 1600px; }
.topbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.topbar-actions { display: flex; align-items: center; gap: 9px; }
.eyebrow { margin: 0 0 5px; color: var(--orange); font-size: 11px; font-weight: 800; letter-spacing: .13em; }
.topbar h1 { margin: 0; font-size: clamp(26px, 3vw, 34px); letter-spacing: -.035em; }
.menu-button { display: none; border: 0; background: transparent; font-size: 24px; }
.primary-button, .secondary-button, .ghost-button { border: 0; border-radius: 10px; min-height: 42px; padding: 0 17px; font-weight: 750; }
.primary-button { background: var(--orange); color: #291408; box-shadow: 0 6px 16px rgba(255,138,61,.22); }
.primary-button:hover { background: #ff9c5c; }
.secondary-button { background: var(--navy); color: white; }
.ghost-button { color: var(--ink); background: transparent; border: 1px solid var(--line); }

.intro-panel { position: relative; overflow: hidden; color: white; background: var(--navy); border-radius: 20px; padding: 27px 30px; display: flex; align-items: end; justify-content: space-between; gap: 30px; box-shadow: 0 16px 32px rgba(23,35,59,.12); }
.intro-panel::after { content: ""; position: absolute; right: 17%; top: -80px; width: 180px; height: 260px; background: var(--orange); opacity: .12; transform: rotate(28deg); }
.intro-kicker { color: #aab6c9; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; }
.intro-panel h2 { position: relative; margin: 8px 0 7px; font-size: clamp(20px, 2.6vw, 29px); letter-spacing: -.025em; max-width: 720px; z-index: 1; }
.intro-panel p { color: #b9c2d2; margin: 0; font-size: 14px; }
.intro-number { position: relative; z-index: 1; min-width: 180px; text-align: right; }
.intro-number span, .intro-number strong { display: block; }.intro-number span { color: #b9c2d2; font-size: 12px; }.intro-number strong { font-size: 24px; margin-top: 6px; }

.metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 18px 0; }
.metrics article { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 18px 19px; display: grid; gap: 6px; }
.metrics span { color: var(--muted); font-size: 13px; font-weight: 650; }.metrics strong { font-size: 25px; letter-spacing: -.03em; }.metrics small { color: #98a2b3; font-size: 11px; }
.metrics .accent { border-color: #ffd7bb; background: linear-gradient(135deg, #fff 60%, var(--orange-soft)); }
.metrics .accent strong { color: #cf5b10; }

.content-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.card-heading { padding: 22px 24px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--line); }
.card-heading h2 { margin: 0; font-size: 18px; }.card-heading p { margin: 5px 0 0; color: var(--muted); font-size: 13px; }
.table-tools { display: flex; gap: 10px; }
.search { height: 40px; width: min(260px, 32vw); border: 1px solid var(--line); border-radius: 9px; display: flex; align-items: center; gap: 8px; padding: 0 11px; color: var(--muted); }
.search input { border: 0; outline: 0; width: 100%; color: var(--ink); background: transparent; }
select { min-height: 40px; border: 1px solid var(--line); border-radius: 9px; background: white; color: var(--ink); padding: 0 30px 0 11px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 760px; }
th, td { padding: 15px 24px; text-align: left; border-bottom: 1px solid #eef0f4; font-size: 13px; }
th { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .07em; background: #fafbfc; }
td strong { font-size: 13px; }.right { text-align: right; }
.customer-cell span { display: block; color: var(--muted); margin-top: 3px; font-size: 11px; }
.source-reference { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; }
.status-pill { display: inline-flex; align-items: center; gap: 6px; border-radius: 20px; padding: 5px 9px; font-size: 11px; font-weight: 750; }
.status-pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status-draft { color: #5d6573; background: #eef0f3; }.status-sent { color: var(--blue); background: #eaf2ff; }.status-accepted { color: var(--green); background: #e7f7ee; }.status-rejected { color: var(--red); background: #feeeee; }
.status-unpaid, .status-overdue { color: var(--red); background: #feeeee; }.status-partial { color: #b54708; background: #fff3e0; }.status-paid { color: var(--green); background: #e7f7ee; }.status-cancelled { color: #5d6573; background: #eef0f3; }
.view-button { border: 1px solid var(--line); background: white; border-radius: 8px; padding: 7px 10px; font-weight: 700; color: var(--navy); }
.empty-state { text-align: center; padding: 54px 20px 60px; }.empty-icon { margin: auto; width: 54px; height: 54px; display: grid; place-items: center; border-radius: 16px; background: var(--orange-soft); color: var(--orange); font-size: 24px; }.empty-state h3 { margin: 16px 0 7px; }.empty-state p { color: var(--muted); max-width: 420px; margin: 0 auto 20px; font-size: 14px; }

dialog { border: 0; padding: 0; color: var(--ink); box-shadow: 0 30px 80px rgba(15,23,42,.25); }
dialog::backdrop { background: rgba(12,20,35,.62); backdrop-filter: blur(3px); }
.quotation-dialog { width: min(980px, calc(100vw - 32px)); max-height: 92vh; border-radius: 18px; }
.quotation-dialog form { display: flex; flex-direction: column; max-height: 92vh; }
.dialog-head { padding: 22px 26px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; }.dialog-head h2 { margin: 0; font-size: 23px; }.icon-button { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line); background: white; font-size: 23px; color: var(--muted); }
.form-scroll { overflow-y: auto; padding: 2px 26px 28px; }
.form-section { padding: 25px 0; border-bottom: 1px solid var(--line); }.form-section:last-child { border: 0; }
.section-title { display: flex; gap: 12px; margin-bottom: 18px; }.section-title > span { width: 28px; height: 28px; flex: 0 0 28px; display: grid; place-items: center; border-radius: 8px; background: var(--orange-soft); color: #d55b0c; font-size: 11px; font-weight: 800; }.section-title h3 { margin: 0 0 3px; font-size: 16px; }.section-title p { margin: 0; color: var(--muted); font-size: 12px; }
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 15px; padding-left: 40px; }.form-grid.two { max-width: 620px; }.form-grid .full { grid-column: 1 / -1; }
label > span { display: block; font-size: 12px; color: #4c5668; font-weight: 700; margin-bottom: 7px; }
input, textarea { width: 100%; border: 1px solid #d9dee7; border-radius: 9px; padding: 10px 11px; color: var(--ink); background: white; }
input { min-height: 42px; } textarea { resize: vertical; }
input:focus, textarea:focus, select:focus { border-color: var(--orange); outline: 3px solid rgba(255,138,61,.12); }
.items-header, .item-row { display: grid; grid-template-columns: minmax(220px, 1fr) 90px 130px 130px 38px; gap: 10px; align-items: center; padding-left: 40px; }.items-header { color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 7px; }.item-row { margin-bottom: 9px; }.item-row output { text-align: right; font-weight: 750; font-size: 13px; }.remove-item { width: 34px; height: 34px; border-radius: 8px; border: 0; background: #fff1f0; color: var(--red); font-size: 18px; }.add-item { margin: 7px 0 0 40px; background: white; border: 1px dashed #bbc3d0; color: var(--navy); min-height: 38px; border-radius: 9px; padding: 0 13px; font-weight: 750; }
.totals-section { display: grid; grid-template-columns: 1fr 340px; gap: 28px; padding-left: 40px; }.notes-grid { display: grid; gap: 15px; }.totals-box { padding: 17px; border-radius: 12px; background: #f8f9fb; border: 1px solid var(--line); }.totals-box > div, .totals-box > label { display: grid; grid-template-columns: 1fr 130px; align-items: center; margin-bottom: 12px; }.totals-box div span { font-size: 12px; color: var(--muted); }.totals-box strong { text-align: right; }.totals-box label > span { margin: 0; }.totals-box input { text-align: right; min-height: 38px; }.totals-box .grand-total { margin: 16px -17px -17px; padding: 16px 17px; background: var(--navy); color: white; border-radius: 0 0 12px 12px; }.totals-box .grand-total span { color: #bec7d6; }.totals-box .grand-total strong { font-size: 20px; }
.payment-terms-field { display: grid; gap: 10px; }
.payment-terms-field select { width: 100%; }
.payment-terms-field small { margin-top: -3px; color: var(--muted); font-size: 10px; line-height: 1.45; }
.dialog-actions { min-height: 72px; border-top: 1px solid var(--line); padding: 14px 26px; display: flex; justify-content: flex-end; align-items: center; gap: 10px; }.dialog-actions p { margin: 0 auto 0 0; color: var(--red); font-size: 12px; }

.preview-dialog { width: min(1040px, calc(100vw - 26px)); max-height: 94vh; background: #e8ebf0; border-radius: 16px; }.preview-toolbar { position: sticky; top: 0; z-index: 2; display: flex; justify-content: space-between; align-items: center; padding: 13px 18px; background: white; border-bottom: 1px solid var(--line); }.preview-actions { display: flex; gap: 9px; }.paper { width: 780px; min-height: 1040px; margin: 28px auto; padding: 56px 62px; background: white; box-shadow: 0 8px 28px rgba(15,23,42,.12); }.paper-head { display: flex; justify-content: space-between; border-bottom: 3px solid var(--navy); padding-bottom: 24px; }.paper-brand { font-size: 22px; font-weight: 900; color: var(--navy); letter-spacing: .06em; }.paper-brand i { color: var(--orange); font-style: normal; }.paper-head h2 { margin: 0; font-size: 28px; letter-spacing: .12em; }.paper-meta { margin: 26px 0 34px; display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }.paper-meta h3 { font-size: 10px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }.paper-meta p { white-space: pre-line; line-height: 1.6; font-size: 13px; }.paper table { min-width: 0; }.paper th, .paper td { padding: 11px 9px; }.paper-summary { width: 310px; margin: 25px 0 30px auto; }.paper-summary div { display: flex; justify-content: space-between; padding: 7px 0; font-size: 13px; }.paper-summary .paper-total { border-top: 2px solid var(--navy); margin-top: 6px; padding-top: 12px; font-size: 18px; font-weight: 850; }.paper-notes { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; margin-top: 38px; }.paper-notes h3 { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }.paper-notes p { font-size: 12px; line-height: 1.65; white-space: pre-line; }.paper-footer { margin-top: 70px; padding-top: 13px; border-top: 1px solid var(--line); color: var(--muted); font-size: 10px; display: flex; justify-content: space-between; }
.paper-company { display: flex; align-items: flex-start; gap: 14px; }
.paper-logo-box { width: 118px; height: 45px; flex: none; overflow: hidden; border-radius: 5px; background: #090f1b; }
.paper-logo-box img { width: 100%; height: 100%; display: block; object-fit: cover; object-position: center; }
.paper-company p { margin: 1px 0 0; max-width: 190px; color: var(--muted); font-size: 9px; line-height: 1.55; }
.paper-company p strong { color: var(--ink); font-size: 10px; }
.paper-head > div:last-child { text-align: right; }
.paper-summary { margin-bottom: 22px; }
.payment-card { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 22px; margin: 18px 0 28px; padding: 16px 18px; border-left: 4px solid var(--orange); background: #f7f8fa; }
.payment-card div span, .payment-card div strong { display: block; }
.payment-card div span { margin-bottom: 4px; color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .08em; }
.payment-card div strong { font-size: 13px; }
.payment-card p { grid-column: 1 / -1; margin: 4px 0 0; color: var(--muted); font-size: 10px; }
.payment-card .payment-schedule { grid-column: 1 / -1; margin-top: 8px; padding-top: 12px; border-top: 1px solid #dfe3e9; }
.payment-card .payment-schedule p { margin-top: 5px; color: var(--ink); font-size: 10px; line-height: 1.6; white-space: pre-line; }
.paper-notes { margin-top: 28px; }
.paper-footer { margin-top: 48px; gap: 28px; font-size: 9px; }
.paper-footer span:first-child { max-width: 430px; }
.toast { position: fixed; right: 24px; bottom: 24px; transform: translateY(120px); opacity: 0; transition: .25s ease; background: var(--navy); color: white; padding: 13px 17px; border-radius: 10px; box-shadow: 0 12px 35px rgba(15,23,42,.25); z-index: 30; font-size: 13px; }.toast.show { transform: translateY(0); opacity: 1; }

[hidden] { display: none !important; }
.auth-locked > .sidebar, .auth-locked > .shell { filter: blur(7px); pointer-events: none; user-select: none; }
.auth-gate { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; background: radial-gradient(circle at 70% 20%, rgba(255,138,61,.15), transparent 32%), rgba(10,17,31,.93); }
.auth-card { width: min(430px, 100%); padding: 34px; border-radius: 20px; background: white; box-shadow: 0 30px 90px rgba(0,0,0,.32); }
.auth-logo { width: 138px; height: 52px; overflow: hidden; border-radius: 7px; background: #090f1b; margin-bottom: 26px; }
.auth-logo img { width: 100%; height: 100%; object-fit: cover; object-position: center; }
.auth-card h1 { margin: 0 0 8px; font-size: 28px; letter-spacing: -.035em; }
.auth-copy { margin: 0 0 22px; color: var(--muted); font-size: 14px; line-height: 1.55; }
.auth-card form { display: grid; gap: 15px; }
.auth-card .primary-button { width: 100%; margin-top: 2px; }
.auth-message { min-height: 18px; margin: -2px 0 0; color: var(--red); font-size: 12px; }
.logout-button { margin-left: auto; width: 32px; height: 32px; border: 1px solid rgba(255,255,255,.12); border-radius: 8px; background: transparent; color: #b9c3d5; }
.logout-button:hover { color: white; background: rgba(255,255,255,.08); }
.customer-summary { margin-bottom: 18px; padding: 22px 25px; border-radius: 16px; display: flex; align-items: center; justify-content: space-between; gap: 24px; background: var(--navy); color: white; }
.customer-summary div span, .customer-summary div strong { display: block; }.customer-summary div span { color: #aeb9ca; font-size: 12px; }.customer-summary div strong { margin-top: 4px; font-size: 27px; }.customer-summary p { margin: 0; color: #c2cad7; font-size: 13px; }
.customer-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; padding: 20px; }
.customer-card { min-width: 0; padding: 18px; border: 1px solid var(--line); border-radius: 13px; background: #fff; }
.customer-card-head { display: flex; align-items: flex-start; gap: 11px; }.customer-initials { width: 38px; height: 38px; flex: 0 0 38px; display: grid; place-items: center; border-radius: 11px; background: var(--orange-soft); color: #c9560c; font-size: 12px; font-weight: 850; }.customer-card h3 { margin: 1px 0 3px; font-size: 14px; }.customer-card .company-name { color: var(--muted); font-size: 11px; }.customer-card dl { margin: 17px 0 0; display: grid; gap: 8px; }.customer-card dl div { display: grid; grid-template-columns: 58px 1fr; gap: 8px; font-size: 11px; }.customer-card dt { color: var(--muted); }.customer-card dd { margin: 0; overflow-wrap: anywhere; }.customer-card-actions { margin-top: 15px; padding-top: 13px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; }.customer-card-actions button { border: 0; background: transparent; color: var(--blue); font-size: 11px; font-weight: 750; }
.customer-dialog { width: min(720px, calc(100vw - 32px)); border-radius: 18px; }.customer-form-body { padding: 24px 26px 28px; }.customer-form-body .form-grid { padding-left: 0; }
.receipt-scan-panel { display: grid; grid-template-columns: 78px minmax(0, 1fr) auto; gap: 14px; align-items: center; margin-bottom: 20px; padding: 14px; border: 1px solid var(--line); border-radius: 13px; background: #f7f8fa; }
.receipt-scan-preview { width: 78px; height: 78px; display: grid; place-items: center; overflow: hidden; border: 1px dashed #bbc3d0; border-radius: 10px; background: white; color: var(--muted); font-size: 25px; }
.receipt-scan-preview img { width: 100%; height: 100%; object-fit: cover; }
.receipt-scan-copy strong { display: block; font-size: 13px; }.receipt-scan-copy p { margin: 4px 0 7px; color: var(--muted); font-size: 11px; line-height: 1.45; }.receipt-scan-copy small { color: var(--muted); font-size: 10px; }.receipt-scan-copy small.scanning { color: var(--blue); }.receipt-scan-copy small.success { color: var(--green); }.receipt-scan-copy small.error { color: var(--red); }
.receipt-file-button { display: inline-flex; align-items: center; justify-content: center; cursor: pointer; text-align: center; font-size: 11px; }
.receipt-remove-button { grid-column: 3; min-height: 30px; padding: 0 8px; color: var(--red); font-size: 10px; }
.receipt-view-link { color: var(--blue); font-size: 11px; font-weight: 800; text-decoration: none; }.receipt-view-link:hover { text-decoration: underline; }.muted-dash { color: var(--muted); }
.section-gap { margin-top: 22px; }
.button-link { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.supplier-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; padding: 20px; }
.supplier-card { min-width: 0; padding: 18px; border: 1px solid var(--line); border-radius: 13px; background: white; }.supplier-card > div:first-child { display: grid; grid-template-columns: 40px 1fr; column-gap: 10px; align-items: center; }.supplier-card h3 { margin: 0; font-size: 14px; }.supplier-card p { grid-column: 2; margin: 3px 0 0; color: var(--muted); font-size: 11px; overflow-wrap: anywhere; }.supplier-card dl { margin: 17px 0 0; padding-top: 13px; border-top: 1px solid var(--line); }.supplier-card dl div { display: flex; justify-content: space-between; padding: 4px 0; font-size: 11px; }.supplier-card dt { color: var(--muted); }.supplier-card dd { margin: 0; font-weight: 750; }.supplier-card .supplier-balance { margin-top: 4px; color: var(--red); font-size: 12px; }
.payroll-toolbar { display: flex; align-items: flex-end; gap: 10px; margin-bottom: 18px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 14px; background: white; }.payroll-toolbar label { min-width: 190px; }.payroll-toolbar input { min-height: 42px; }
.clock-help { margin: 14px 0; color: var(--muted); font-size: 12px; }.clock-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 18px; }
.clock-page { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: radial-gradient(circle at 70% 20%, rgba(255,138,61,.18), transparent 32%), var(--navy); }.clock-card { width: min(460px, 100%); padding: 34px; border-radius: 22px; background: white; box-shadow: 0 30px 90px rgba(0,0,0,.32); }.clock-card h1 { margin: 0 0 8px; font-size: 30px; }.clock-live { margin: 0 0 24px; color: var(--muted); font-size: 13px; }.clock-card form { display: grid; gap: 15px; }.clock-result { min-height: 42px; margin: 2px 0 0; padding: 11px; border-radius: 9px; background: #f5f6f8; color: var(--muted); font-size: 12px; line-height: 1.5; }.clock-result.success { background: #e7f7ee; color: var(--green); }.clock-result.error { background: #feeeee; color: var(--red); }.clock-back { display: block; margin-top: 18px; color: var(--blue); text-align: center; font-size: 12px; }
.clock-links { display: flex; justify-content: center; gap: 20px; }.clock-links .clock-back { margin-top: 18px; }
.row-actions { display: flex; gap: 6px; justify-content: flex-end; }.danger-button { color: var(--red); border-color: #f4c7c7; }.full-action { width: 100%; }.invite-copy { margin: 0 0 16px; color: var(--muted); font-size: 13px; line-height: 1.5; }
.portal-auth-page { min-height: 100vh; padding: 28px 16px; background: radial-gradient(circle at 80% 10%, rgba(255,138,61,.15), transparent 30%), #eef1f5; }.onboarding-card { width: min(850px, 100%); margin: auto; padding: 34px; border-radius: 22px; background: white; box-shadow: 0 22px 70px rgba(15,23,42,.13); }.onboarding-card h1 { margin: 0 0 8px; }.onboarding-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }.onboarding-grid .full { grid-column: 1 / -1; }.account-setup { margin: 24px 0 18px; padding-top: 22px; border-top: 1px solid var(--line); }.account-setup h2 { margin: 0 0 14px; font-size: 18px; }
.staff-portal-page { min-width: 320px; background: var(--canvas); }.staff-portal-head { height: 78px; display: flex; align-items: center; justify-content: space-between; padding: 0 max(20px, calc((100vw - 1240px) / 2)); background: var(--navy); color: white; }.staff-portal-head .brand { position: static; }.staff-portal-head > div { display: flex; align-items: center; gap: 12px; }.staff-portal-head .ghost-button { min-height: 34px; padding: 0 11px; border-color: rgba(255,255,255,.2); color: white; }.staff-portal-shell { max-width: 1240px; margin: auto; padding: 30px 20px 50px; }.portal-welcome { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 18px; padding: 28px; border-radius: 18px; background: var(--navy); color: white; }.portal-welcome h1 { margin: 0; font-size: 30px; }.portal-welcome p:not(.eyebrow) { margin: 6px 0 0; color: #b9c3d5; }.portal-clock { min-width: 270px; padding: 16px; border-radius: 12px; background: rgba(255,255,255,.08); }.portal-clock > span { display: block; margin-bottom: 10px; color: #dbe2ec; font-size: 12px; }.portal-clock > div { display: flex; gap: 8px; }.portal-month { display: flex; justify-content: flex-end; margin: 0 0 18px; }.portal-month label { width: 190px; }.portal-columns { display: grid; grid-template-columns: 1.35fr .85fr; gap: 20px; }.portal-form { display: grid; gap: 13px; padding: 20px; }.portal-form .form-grid { padding-left: 0; }.leave-history { padding: 0 20px 20px; }.leave-history > div { display: grid; grid-template-columns: 1fr auto auto; gap: 9px; align-items: center; padding: 9px 0; border-top: 1px solid var(--line); font-size: 10px; }.leave-history em { padding: 4px 7px; border-radius: 12px; font-style: normal; }.leave-approved { color: var(--green); background: #e7f7ee; }.leave-rejected { color: var(--red); background: #feeeee; }.leave-pending { color: #9a5a00; background: #fff3e0; }.payslip-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); }.payslip-grid div { display: flex; justify-content: space-between; padding: 15px 18px; background: white; font-size: 12px; }.payslip-grid .payslip-total { grid-column: 1 / -1; background: var(--navy); color: white; font-size: 16px; }
.saved-customer-field { margin-bottom: 3px; padding: 12px; border-radius: 11px; background: #f7f8fa; border: 1px solid var(--line); }.saved-customer-field select { width: 100%; }
.dialog-head p { margin: 5px 0 0; color: var(--muted); font-size: 12px; }
.payment-balance-card { display: grid; grid-template-columns: repeat(3, 1fr); margin-bottom: 15px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.payment-balance-card div { padding: 14px 16px; background: #f8f9fb; border-right: 1px solid var(--line); }.payment-balance-card div:last-child { border-right: 0; background: var(--orange-soft); }
.payment-balance-card span, .payment-balance-card strong { display: block; }.payment-balance-card span { color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .06em; }.payment-balance-card strong { margin-top: 4px; font-size: 16px; }
.milestone-buttons { display: flex; gap: 8px; margin-bottom: 20px; }.milestone-buttons button { border: 1px solid var(--line); border-radius: 8px; padding: 8px 11px; background: white; color: var(--navy); font-size: 11px; font-weight: 750; }.milestone-buttons button:hover { border-color: var(--orange); background: var(--orange-soft); }
.payment-form-grid { padding-left: 0; }.payment-form-grid select { width: 100%; }
.payment-history { margin: 26px 0 5px; padding-top: 20px; border-top: 1px solid var(--line); }.payment-history h3 { margin: 0 0 10px; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }.payment-history-list { display: grid; gap: 7px; }.payment-history-row { display: grid; grid-template-columns: 100px 1fr 120px 78px; gap: 12px; align-items: center; padding: 9px 11px; border-radius: 8px; background: #f7f8fa; font-size: 10px; }.payment-history-row strong { font-size: 11px; text-align: right; }.receipt-link { border: 0; background: transparent; color: var(--blue); font-size: 10px; font-weight: 800; }
.report-filters { display: flex; align-items: end; gap: 12px; margin: 18px 0; padding: 16px 18px; border: 1px solid var(--line); border-radius: 14px; background: white; }.report-filters label { min-width: 180px; }.report-filters .primary-button { margin-bottom: 0; }.report-category-list { padding: 10px 24px 22px; }.report-category-row { display: grid; grid-template-columns: 180px 1fr 130px; gap: 14px; align-items: center; padding: 13px 0; border-bottom: 1px solid var(--line); font-size: 13px; }.report-category-row:last-child { border-bottom: 0; }.report-category-row .bar { height: 8px; border-radius: 8px; background: var(--orange-soft); overflow: hidden; }.report-category-row .bar i { display: block; height: 100%; border-radius: inherit; background: var(--orange); }.report-category-row strong { text-align: right; }
.receipt-paper { min-height: 720px; }.receipt-heading { margin: 34px 0; text-align: center; }.receipt-heading h2 { margin: 0; font-size: 30px; letter-spacing: .12em; }.receipt-heading p { margin: 7px 0 0; color: var(--muted); font-size: 12px; }.receipt-amount { margin: 24px 0; padding: 24px; text-align: center; border-radius: 12px; background: var(--navy); color: white; }.receipt-amount span, .receipt-amount strong { display: block; }.receipt-amount span { color: #bcc6d6; font-size: 10px; letter-spacing: .1em; }.receipt-amount strong { margin-top: 6px; font-size: 30px; }.receipt-details { display: grid; grid-template-columns: 1fr 1fr; gap: 0 34px; }.receipt-details div { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 12px; }.receipt-details span { color: var(--muted); }.receipt-details strong { text-align: right; }

@media (max-width: 1050px) { .metrics { grid-template-columns: repeat(2, 1fr); }.totals-section { grid-template-columns: 1fr; }.totals-box { max-width: 440px; margin-left: auto; width: 100%; } }
@media (max-width: 1050px) { .customer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 1050px) { .supplier-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) {
  .sidebar { transform: translateX(-100%); transition: transform .25s; box-shadow: 10px 0 30px rgba(15,23,42,.22); }.sidebar.open { transform: translateX(0); }
  .shell { margin-left: 0; padding: 22px 16px 40px; }.menu-button { display: block; margin-right: 8px; }.topbar > div:not(.topbar-actions) { margin-right: auto; }.topbar .primary-button { padding: 0 12px; font-size: 12px; }
  .intro-panel { align-items: start; flex-direction: column; padding: 24px; }.intro-number { text-align: left; }.metrics { grid-template-columns: 1fr 1fr; }.card-heading { align-items: stretch; flex-direction: column; }.table-tools { flex-direction: column; }.search { width: 100%; }
  .form-grid { grid-template-columns: 1fr; padding-left: 0; }.form-grid .full { grid-column: auto; }.items-header { display: none; }.item-row { padding-left: 0; grid-template-columns: 1fr 1fr 38px; border: 1px solid var(--line); border-radius: 11px; padding: 11px; }.item-row input:first-child { grid-column: 1 / -1; }.item-row output { grid-column: 1 / 3; text-align: left; }.totals-section { padding-left: 0; }.add-item { margin-left: 0; }.paper { width: calc(100% - 24px); margin: 12px; padding: 28px 24px; }.paper-meta, .paper-notes { grid-template-columns: 1fr; }.preview-toolbar { align-items: stretch; gap: 8px; }.preview-actions { flex: 1; }.preview-actions select { min-width: 0; flex: 1; }
}
@media (max-width: 760px) {
  .paper-head { flex-direction: column; }
  .paper-head > div:last-child { text-align: left; }
  .paper-company { flex-direction: column; }
  .payment-card { grid-template-columns: 1fr; }
  .payment-card p { grid-column: 1; }
  .paper-footer { flex-direction: column; gap: 6px; }
  .preview-actions { flex-wrap: wrap; justify-content: flex-end; }
  .payment-balance-card { grid-template-columns: 1fr; }.payment-balance-card div { border-right: 0; border-bottom: 1px solid var(--line); }.payment-balance-card div:last-child { border-bottom: 0; }
  .payment-history-row { grid-template-columns: 1fr 1fr; }.payment-history-row strong { text-align: left; }.receipt-details { grid-template-columns: 1fr; }
  .receipt-scan-panel { grid-template-columns: 68px 1fr; }.receipt-scan-preview { width: 68px; height: 68px; }.receipt-file-button { grid-column: 1 / -1; }.receipt-remove-button { grid-column: 1 / -1; }
  .payroll-toolbar { align-items: stretch; flex-direction: column; }.payroll-toolbar label, .payroll-toolbar button { width: 100%; }.supplier-grid { grid-template-columns: 1fr; }
  .onboarding-grid, .portal-columns { grid-template-columns: 1fr; }.onboarding-grid .full { grid-column: auto; }.portal-welcome { align-items: stretch; flex-direction: column; }.portal-clock { min-width: 0; }.payslip-grid { grid-template-columns: 1fr; }.payslip-grid .payslip-total { grid-column: auto; }.staff-portal-head { padding: 0 14px; }.staff-portal-head > div > strong { display: none; }.row-actions { flex-direction: column; }
}
@media (max-width: 480px) { .metrics { grid-template-columns: 1fr; }.topbar h1 { font-size: 24px; }.intro-panel h2 { font-size: 21px; }.dialog-actions { padding: 12px 16px; }.dialog-actions p { display: none; }.topbar-actions { gap: 6px; }.topbar-actions button { padding: 0 9px; font-size: 10px; } }
@media (max-width: 600px) { .customer-grid { grid-template-columns: 1fr; }.customer-summary { align-items: flex-start; flex-direction: column; }.auth-card { padding: 27px 22px; } }

.staff-app-card { width: min(500px, 100%); }
.staff-app-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin: 0 0 22px; padding: 4px; border-radius: 11px; background: #eef1f5; }
.staff-app-tabs button { min-height: 40px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font-size: 12px; font-weight: 800; }
.staff-app-tabs button.active { background: white; color: var(--navy); box-shadow: 0 3px 12px rgba(15,23,42,.1); }
.staff-panel-copy { margin: 0 0 16px; color: var(--muted); font-size: 12px; }
#portalPanel > form, #quickClockPanel > form { display: grid; gap: 15px; }
#portalPanel .primary-button { width: 100%; }
.onboarding-id-card { margin: 0 0 22px; padding: 18px 20px; border-left: 4px solid var(--orange); border-radius: 11px; background: var(--navy); color: white; }
.onboarding-id-card span, .onboarding-id-card strong, .onboarding-id-card small { display: block; }
.onboarding-id-card span { color: #b9c3d5; font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.onboarding-id-card strong { margin: 5px 0; color: var(--orange); font-size: 27px; letter-spacing: .06em; }
.onboarding-id-card small { color: #b9c3d5; font-size: 10px; }

.pwa-install-banner { position: fixed; left: 50%; bottom: max(14px, env(safe-area-inset-bottom)); z-index: 200; width: min(560px, calc(100vw - 24px)); transform: translateX(-50%); display: grid; grid-template-columns: 46px minmax(0, 1fr) auto 28px; gap: 11px; align-items: center; padding: 12px; border: 1px solid rgba(255,255,255,.14); border-radius: 16px; background: rgba(23,35,59,.97); color: white; box-shadow: 0 18px 55px rgba(0,0,0,.3); backdrop-filter: blur(14px); }
.pwa-install-banner img { width: 46px; height: 46px; border-radius: 11px; }
.pwa-install-banner strong, .pwa-install-banner span { display: block; }
.pwa-install-banner strong { margin-bottom: 3px; font-size: 13px; }
.pwa-install-banner span { color: #c6cfdd; font-size: 10px; line-height: 1.35; }
.pwa-install-action { min-height: 36px; padding: 0 13px; border: 0; border-radius: 9px; background: var(--orange); color: #17233b; font-size: 11px; font-weight: 850; }
.pwa-install-close { width: 28px; height: 28px; border: 0; background: transparent; color: #c6cfdd; font-size: 20px; }
@media (max-width: 480px) { .pwa-install-banner { grid-template-columns: 42px minmax(0, 1fr) 28px; }.pwa-install-banner img { width: 42px; height: 42px; }.pwa-install-action { grid-column: 1 / -1; width: 100%; }.pwa-install-close { grid-column: 3; grid-row: 1; } }

@media print {
  body * { visibility: hidden !important; }
  #quotationPreview, #quotationPreview * { visibility: visible !important; }
  #quotationPreview { position: absolute; inset: 0; width: 100%; min-height: 0; margin: 0; padding: 18mm 16mm; box-shadow: none; }
  body.printing-invoice #quotationPreview, body.printing-invoice #quotationPreview * { visibility: hidden !important; }
  body.printing-invoice #invoicePreview, body.printing-invoice #invoicePreview * { visibility: visible !important; }
  body.printing-invoice #invoicePreview { position: absolute; inset: 0; width: 100%; min-height: 0; margin: 0; padding: 18mm 16mm; box-shadow: none; }
  body.printing-receipt #quotationPreview, body.printing-receipt #quotationPreview *, body.printing-receipt #invoicePreview, body.printing-receipt #invoicePreview * { visibility: hidden !important; }
  body.printing-receipt #receiptPreview, body.printing-receipt #receiptPreview * { visibility: visible !important; }
  body.printing-receipt #receiptPreview { position: absolute; inset: 0; width: 100%; min-height: 0; margin: 0; padding: 18mm 16mm; box-shadow: none; }
  @page { size: A4; margin: 0; }
}
