@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Playfair+Display:wght@650;700&display=swap');

:root {
  --navy: #071f3d;
  --blue: #0b568f;
  --blue-soft: #e9f3fa;
  --gold: #d5a63e;
  --gold-soft: #fff8e6;
  --red: #df2b35;
  --green: #167056;
  --amber: #986400;
  --danger: #aa3b43;
  --ink: #13283e;
  --muted: #65778b;
  --line: #dce6ef;
  --canvas: #f5f8fb;
  --white: #fff;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--canvas); color: var(--ink); font: 14px/1.5 'DM Sans', 'Noto Sans Sinhala', sans-serif; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .55; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, a:focus-visible { outline: 3px solid rgba(11, 86, 143, .23); outline-offset: 2px; }
a { color: inherit; }
h1, h2, h3, p { overflow-wrap: anywhere; }

.auth-shell { min-height: 100svh; display: grid; grid-template-columns: minmax(420px, 560px) 1fr; background: var(--white); }
.auth-card { width: 100%; max-width: 600px; margin: auto; padding: clamp(30px, 6vw, 76px); }
.secure-auth-entry { width: 100%; margin-top: 10px; }
.auth-logo { display: block; width: min(340px, 100%); height: 88px; object-fit: cover; object-position: center 43%; margin: 0 0 42px; }
.auth-card h1 { margin: 0 0 12px; font: 700 clamp(33px, 4vw, 48px)/1.08 'Playfair Display', 'Noto Sans Sinhala'; }
.auth-story { padding: clamp(45px, 8vw, 105px); display: flex; flex-direction: column; justify-content: center; color: white; background: var(--navy); }
.auth-story h2 { max-width: 700px; margin: 0 0 38px; font: 700 clamp(36px, 5vw, 66px)/1.04 'Playfair Display', 'Noto Sans Sinhala'; }
.auth-story ul { list-style: none; display: grid; gap: 13px; margin: 0; padding: 0; color: #d9e6f1; }
.auth-story li { max-width: 560px; padding: 0 0 13px; border-bottom: 1px solid rgba(255, 255, 255, .14); }
.eyebrow { margin: 0 0 8px; color: var(--blue); font-size: 10px; font-weight: 700; letter-spacing: 1.35px; }
.eyebrow.light { color: #f2cc70; }
.muted { color: var(--muted); }
.form-stack { display: grid; gap: 14px; margin-top: 25px; }
.security-note, .notice-box { display: grid; gap: 3px; margin-top: 22px; padding: 12px 14px; border-left: 3px solid var(--gold); border-radius: 7px; background: var(--gold-soft); color: #725d2d; font-size: 11px; }
.form-error { min-height: 18px; margin: 0; color: var(--danger); }

label { display: grid; gap: 6px; color: #50657a; font-size: 11px; font-weight: 700; }
input, select, textarea { width: 100%; min-height: 43px; border: 1px solid #cbd9e5; border-radius: 8px; padding: 10px 12px; background: #fbfdff; color: var(--ink); }
input[readonly] { background: #edf3f7; color: var(--muted); }
textarea { min-height: 100px; resize: vertical; }
fieldset { border: 1px solid var(--line); border-radius: 9px; padding: 14px; }
legend { padding: 0 7px; color: var(--navy); font-weight: 700; }
.radio-row { grid-template-columns: auto 1fr; align-items: center; padding: 9px 0; }
.radio-row input { width: auto; min-height: 0; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.form-grid .full { grid-column: 1 / -1; }
.form-actions { display: flex; justify-content: flex-end; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 18px; }

.button { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; border: 0; border-radius: 8px; padding: 0 14px; font-weight: 700; text-decoration: none; }
.button.primary { background: var(--blue); color: white; }
.button.secondary { background: var(--blue-soft); color: var(--blue); }
.button.quiet { background: transparent; color: var(--blue); }
.button.danger { background: #fdecee; color: var(--danger); }
.button.small { min-height: 34px; padding: 0 10px; font-size: 11px; }
.link-button { display: inline-flex; }
.text-button, .row-button { border: 0; background: transparent; color: var(--blue); font-size: 11px; font-weight: 700; }
.row-button { border: 1px solid #cbddeb; border-radius: 7px; padding: 6px 9px; background: white; }

.topbar { position: fixed; inset: 0 0 auto; z-index: 20; height: 70px; display: flex; align-items: center; justify-content: space-between; padding: 0 22px; border-bottom: 1px solid var(--line); background: white; }
.brand-button { display: flex; align-items: center; gap: 10px; height: 64px; overflow: hidden; border: 0; background: transparent; padding: 0; color: var(--muted); font-size: 9px; font-weight: 700; letter-spacing: .7px; }
.brand-button img { display: block; width: 190px; height: 53px; object-fit: cover; object-position: center 43%; }
.brand-button span { padding-left: 10px; border-left: 1px solid var(--line); }
.top-actions { display: flex; align-items: center; gap: 9px; }
.top-link, .menu-button { border: 0; background: transparent; color: var(--blue); font-weight: 700; }
.count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; border-radius: 99px; background: var(--blue-soft); font-size: 10px; }
.profile-button { display: flex; align-items: center; gap: 9px; border: 0; background: transparent; text-align: left; color: var(--ink); }
.profile-button > span:first-child { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; background: var(--blue-soft); color: var(--blue); font-size: 11px; font-weight: 700; }
.profile-button b, .profile-button small { display: block; }
.profile-button b { font-size: 11px; }
.profile-button small { color: var(--muted); font-size: 9px; }
.mobile-only { display: none; }

.sidebar { position: fixed; inset: 70px auto 0 0; z-index: 18; width: 235px; display: flex; flex-direction: column; overflow-y: auto; padding: 20px 13px; background: var(--navy); color: #d2e0ec; }
.sidebar nav { display: grid; flex: 0 0 auto; gap: 2px; }
.nav-label { margin: 17px 11px 5px; color: #7f98af; font-size: 8px; font-weight: 700; letter-spacing: 1.4px; }
.nav-label:first-child { margin-top: 0; }
.sidebar nav button { width: 100%; border: 0; border-radius: 8px; padding: 9px 11px; background: transparent; color: #cbd9e6; text-align: left; font-size: 12px; }
.sidebar nav button:hover, .sidebar nav button.active { background: #123f69; color: white; }
.sidebar-company { display: grid; flex: 0 0 auto; gap: 2px; margin: 38px 10px 4px; padding-top: 17px; border-top: 1px solid rgba(255,255,255,.12); color: #9eb2c4; font-size: 9px; }
.sidebar-company b, .sidebar-company a { color: white; text-decoration: none; }
.scrim { display: none; }

.content { max-width: 1500px; margin: 70px 0 0 235px; padding: 30px clamp(20px, 4vw, 52px) 65px; }
.page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; margin-bottom: 24px; }
.page-head h1 { margin: 0 0 7px; font: 700 clamp(28px, 3vw, 39px)/1.1 'Playfair Display', 'Noto Sans Sinhala'; }
.page-head p:not(.eyebrow) { max-width: 760px; margin: 0; color: var(--muted); }
.head-actions { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.panel { padding: 18px; border: 1px solid var(--line); border-radius: 13px; background: white; }
.exchange-rate-panel { margin-bottom: 17px; }
.panel.flush { padding: 0; overflow: hidden; }
.panel-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.panel-head h2 { margin: 0; font-size: 16px; }
.panel-head p { margin: 3px 0 0; color: var(--muted); font-size: 11px; }
.two-column, .approval-columns, .detail-sections { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.span-two { grid-column: 1 / -1; }

.quick-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 11px; margin-bottom: 18px; }
.quick-action { min-height: 132px; display: grid; align-content: center; gap: 5px; border: 1px solid var(--line); border-radius: 12px; padding: 15px; background: white; color: var(--ink); text-align: left; }
.quick-action:hover { border-color: #abc8de; background: #fbfdff; }
.quick-action > span { width: 31px; height: 31px; display: grid; place-items: center; border-radius: 8px; background: var(--blue-soft); color: var(--blue); font-weight: 700; }
.quick-action b { font-size: 13px; }
.quick-action small { color: var(--muted); font-size: 10px; }

.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0 0 17px; border: 1px solid var(--line); border-radius: 12px; background: white; overflow: hidden; }
.metrics-admin { margin-top: 0; }
.metric { min-height: 95px; display: grid; align-content: center; padding: 14px 16px; border-right: 1px solid var(--line); }
.metric:last-child { border-right: 0; }
.metric small { color: var(--muted); font-size: 9px; letter-spacing: .7px; }
.metric b { margin-top: 5px; font-size: 18px; }
.metric span { color: var(--muted); font-size: 9px; }
.mini-metrics { display: grid; grid-template-columns: repeat(3, 1fr); margin-bottom: 12px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.mini-metrics .metric { min-height: 75px; padding: 10px; }
.mini-metrics .metric b { font-size: 14px; }

.toolbar { display: flex; justify-content: space-between; gap: 10px; padding: 14px 17px; border-bottom: 1px solid var(--line); background: #fbfdff; }
.toolbar .search-input { width: min(390px, 100%); }
.toolbar select { width: auto; min-width: 150px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; min-width: 820px; border-collapse: collapse; }
th, td { padding: 12px 15px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { background: #fbfdff; color: #728598; font-size: 9px; letter-spacing: .65px; }
td { font-size: 11px; }
td b, td small { display: block; }
td small { margin-top: 3px; color: var(--muted); }

.badge { display: inline-flex; align-items: center; border-radius: 99px; padding: 4px 8px; background: #edf2f6; color: #5c6e7e; font-size: 9px; font-weight: 700; }
.badge.approved, .badge.paid, .badge.completed, .badge.confirmed, .badge.quote-sent { background: #e3f3eb; color: #116649; }
.badge.pending, .badge.waiting-customer, .badge.partially-paid, .badge.payment-pending, .badge.ticketing-pending, .badge.passenger-details-pending, .badge.submitted { background: #fff2d7; color: #875b00; }
.badge.rejected, .badge.cancelled, .badge.retry-required { background: #fde9eb; color: #97363d; }
.badge.not-added, .badge.unpaid, .badge.not-started { background: #edf2f6; color: #607080; }

.record-line, .document-row, .search-result { width: 100%; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 13px; border: 0; border-bottom: 1px solid var(--line); padding: 12px 0; background: transparent; color: var(--ink); text-align: left; }
.record-line:last-child, .document-row:last-child, .search-result:last-child { border-bottom: 0; }
.record-line b, .record-line small, .document-row b, .document-row small, .search-result b, .search-result small { display: block; }
.record-line small, .document-row small, .search-result small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.simple-list { display: grid; }
.list-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 13px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.list-row:last-child { border-bottom: 0; }
.list-row b, .list-row small { display: block; }
.list-row small { color: var(--muted); font-size: 10px; }
.list-row > span:last-child { text-align: right; }
.positive { color: var(--green); }
.negative { color: var(--danger); }

.detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.detail-grid div { display: grid; gap: 3px; }
.detail-grid small { color: var(--muted); font-size: 9px; letter-spacing: .6px; }
.note-box { margin-top: 20px; padding: 13px; border-radius: 9px; background: #f7fafc; }
.note-box p { margin: 4px 0 0; color: var(--muted); }
.document-list { display: grid; }
.document-row { grid-template-columns: auto 1fr auto; }
.document-actions { display: flex; align-items: center; justify-content: flex-end; gap: 7px; flex-wrap: wrap; }
.file-icon, .result-type { min-width: 40px; height: 34px; display: inline-grid; place-items: center; border-radius: 7px; background: var(--blue-soft); color: var(--blue); font-size: 8px; font-weight: 700; }
.document-preview { display: block; max-width: 100%; max-height: 62vh; margin: auto; border-radius: 9px; }
.document-frame { width: 100%; height: 62vh; border: 1px solid var(--line); border-radius: 9px; }

.search-hero { gap: 10px; font-size: 14px; }
.search-hero input { min-height: 54px; font-size: 16px; }
.search-results { margin-top: 15px; }
.search-result { grid-template-columns: auto 1fr auto; }
.approval-columns { align-items: start; }
.approval-card { display: grid; grid-template-columns: 1fr auto; gap: 13px; align-items: center; padding: 13px 0; border-bottom: 1px solid var(--line); }
.approval-card:last-child { border-bottom: 0; }
.approval-card b, .approval-card small { display: block; }
.approval-card small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.approval-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }

.report-grid { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.report-grid div { min-height: 78px; display: grid; align-content: center; padding: 11px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.report-grid div:nth-child(3n) { border-right: 0; }
.report-grid span, .report-grid small { color: var(--muted); font-size: 9px; }
.report-grid b { margin-top: 3px; }
.export-panel { margin-bottom: 16px; }
.integration-summary { display: flex; justify-content: space-between; align-items: center; gap: 18px; margin-bottom: 16px; }
.integration-summary h2, .integration-summary p { margin: 0; }
.integration-summary p { margin-top: 5px; color: var(--muted); }
.integration-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sender-settings { margin-bottom: 16px; }
.inline-settings { display: flex; align-items: end; gap: 10px; flex-wrap: wrap; }
.inline-settings label { flex: 1 1 260px; }
.service-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.service-card { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; min-height: 88px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: white; }
.service-card b, .service-card small { display: block; }
.service-card small { margin-top: 2px; color: var(--muted); font-size: 10px; }
.service-icon { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 8px; background: var(--blue-soft); color: var(--blue); font-weight: 800; }
.communication-log { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 14px; }
.communication-log div { padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: #fbfdff; }
.communication-log b, .communication-log small { display: block; }
.communication-log small { margin-top: 3px; color: var(--muted); }
.sop-row { display: grid; grid-template-columns: auto 1fr auto; gap: 13px; align-items: start; padding: 14px 0; border-bottom: 1px solid var(--line); }
.sop-row p { margin: 3px 0 0; color: var(--muted); font-size: 11px; }

.empty-state { padding: 28px 18px; color: var(--muted); text-align: center; }
.empty-state b, .empty-state span { display: block; }
.empty-state b { color: var(--ink); }
.empty-state span { margin-top: 4px; font-size: 11px; }
.dialog { width: min(670px, calc(100% - 24px)); max-height: 90vh; border: 0; border-radius: 15px; padding: 0; color: var(--ink); }
.dialog.wide { width: min(960px, calc(100% - 24px)); }
.dialog::backdrop { background: rgba(3, 20, 40, .68); }
.dialog-head { position: sticky; top: 0; z-index: 2; display: flex; justify-content: space-between; align-items: center; padding: 17px 20px; border-bottom: 1px solid var(--line); background: white; }
.dialog-head h2 { margin: 0; font-size: 18px; }
.dialog-head .eyebrow { margin-bottom: 2px; }
.dialog-close { border: 0; background: transparent; color: var(--blue); font-size: 24px; }
.dialog-body { padding: 20px; }
.toast { position: fixed; z-index: 60; bottom: 22px; left: 50%; transform: translate(-50%, 100px); max-width: calc(100% - 30px); border-radius: 9px; padding: 11px 16px; background: var(--navy); color: white; text-align: center; transition: .2s; }
.toast.show { transform: translate(-50%, 0); }
.profile-card { display: flex; align-items: center; gap: 13px; }
.profile-card > span { width: 50px; height: 50px; display: grid; place-items: center; border-radius: 50%; background: var(--blue-soft); color: var(--blue); font-weight: 700; }
.profile-card h3, .profile-card p { margin: 0; }
.company-block { display: grid; gap: 3px; margin-top: 17px; padding: 13px; background: #f7fafc; }
.security-note.secure { margin-top: 18px; border-color: #b8d2e8; background: #eef7ff; }
.onboarding-progress { display: grid; grid-template-columns: repeat(6, 1fr); gap: 7px; margin-bottom: 18px; }
.onboarding-progress div { display: grid; justify-items: center; gap: 5px; color: var(--muted); font-size: 9px; text-align: center; }
.onboarding-progress b { width: 29px; height: 29px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; background: white; }
.onboarding-progress .done { color: var(--green); font-weight: 700; }
.onboarding-progress .done b { border-color: #96d2bb; background: #e3f3eb; }
.profile-hero { display: flex; align-items: center; gap: 17px; margin-bottom: 16px; }
.profile-hero h2, .profile-hero p { margin: 0; }
.profile-hero p { margin-top: 4px; color: var(--muted); }
.staff-avatar, .staff-avatar-image, .staff-avatar-fallback { width: 78px; height: 78px; flex: 0 0 78px; border-radius: 50%; }
.staff-avatar { overflow: hidden; background: var(--blue-soft); }
.staff-avatar-image { display: block; object-fit: cover; }
.staff-avatar-fallback { display: grid; place-items: center; color: var(--blue); font-size: 21px; font-weight: 800; }
.status-cluster, .tab-strip { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 10px; }
.tab-strip { margin: 16px 0; padding-bottom: 9px; border-bottom: 1px solid var(--line); color: var(--blue); font-size: 9px; font-weight: 800; }
.alert-card { display: grid; gap: 4px; margin-bottom: 16px; padding: 13px 15px; border: 1px solid #e6b8bd; border-radius: 9px; background: #fff5f5; color: #7f2932; }
.agreement-scroll { max-height: 330px; overflow-y: auto; margin: 12px 0 18px; padding: 16px; border: 1px solid var(--line); border-radius: 8px; background: #fbfdff; line-height: 1.65; }
.currency-grid, .agreement-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 13px; margin-bottom: 16px; }
.currency-card { padding: 17px; border: 1px solid var(--line); border-radius: 12px; background: white; }
.currency-card h3 { margin: 0 0 9px; color: var(--blue); }
.currency-card div { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-top: 1px solid var(--line); }
.currency-card span { color: var(--muted); font-size: 10px; }
.currency-card b { font-size: 11px; }
.badge.invited, .badge.profile-incomplete, .badge.agreement-required, .badge.changes-requested, .badge.awaiting-review, .badge.eligible { background: #fff2d7; color: #875b00; }
.badge.suspended, .badge.inactive, .badge.expired, .badge.reversed { background: #fde9eb; color: #97363d; }
.badge.active, .badge.reviewed, .badge.signed-by-user { background: #e3f3eb; color: #116649; }

.print-sheet { max-width: 800px; margin: auto; padding: 30px; border: 1px solid var(--line); background: white; color: #172c42; }
.print-sheet > header { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding-bottom: 18px; border-bottom: 2px solid var(--red); }
.print-sheet > header img { width: 245px; height: 70px; object-fit: cover; object-position: center 43%; }
.print-sheet > header div { text-align: right; }
.print-sheet > header p, .print-sheet > header h2 { margin: 0; }
.document-company { display: grid; margin: 18px 0; font-size: 10px; }
.document-customer { margin: 24px 0; }
.document-customer span, .document-customer b { display: block; }
.document-customer span { color: var(--muted); font-size: 9px; }
.print-sheet table { min-width: 0; }
.document-totals { width: min(330px, 100%); margin: 18px 0 18px auto; }
.document-totals div { display: flex; justify-content: space-between; padding: 7px 0; border-bottom: 1px solid var(--line); }
.print-sheet footer { display: flex; justify-content: space-between; gap: 15px; margin-top: 35px; padding-top: 12px; border-top: 2px solid var(--blue); font-size: 10px; }
.pdf-help { display: grid; gap: 3px; max-width: 800px; margin: 14px auto 0; padding: 12px 14px; border: 1px solid #b8d2e8; border-radius: 8px; background: var(--blue-soft); color: var(--blue); }
.pdf-help span { color: var(--muted); font-size: 12px; }
.dialog-copy { margin-top: 0; color: var(--muted); }
.form-error { grid-column: 1 / -1; margin: 0 0 14px; border: 1px solid #efb2b2; border-radius: 9px; padding: 11px 13px; background: #fff0f0; color: #9d1c1c; font-weight: 700; }
.company-choice-grid { display: grid; gap: 10px; margin: 15px 0; }
.company-choice { display: grid; grid-template-columns: 42px 1fr auto; align-items: center; gap: 12px; width: 100%; padding: 14px; border: 1px solid var(--line); border-radius: 9px; background: white; color: var(--navy); text-align: left; }
.company-choice:hover { border-color: var(--blue); background: var(--blue-soft); }
.company-choice > span { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 7px; background: var(--navy); color: white; font-weight: 800; }
.company-choice div { display: grid; gap: 2px; }
.company-choice small { color: var(--muted); }
.company-choice strong { color: var(--blue); }

@media (max-width: 1120px) {
  .quick-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 900px) {
  .content { padding: 24px 20px 55px; }
  .two-column, .approval-columns, .detail-sections { grid-template-columns: 1fr; }
  .span-two { grid-column: auto; }
  .metrics { grid-template-columns: repeat(2, 1fr); }
  .service-grid { grid-template-columns: repeat(2, 1fr); }
  .currency-grid, .agreement-grid { grid-template-columns: repeat(2, 1fr); }
  .metric:nth-child(2) { border-right: 0; }
  .metric:nth-child(n+3) { border-top: 1px solid var(--line); }
}

@media (max-width: 720px) {
  .auth-shell { grid-template-columns: 1fr; }
  .auth-story { display: none; }
  .auth-card { padding: 28px 20px; }
  .auth-logo { width: min(300px, 100%); height: 76px; margin-bottom: 30px; }
  .integration-summary { align-items: stretch; flex-direction: column; }
  .integration-actions .button { flex: 1 1 155px; }
  .communication-log { grid-template-columns: 1fr; }
  .document-row { grid-template-columns: auto 1fr; }
  .document-actions { grid-column: 2; justify-content: flex-start; }
  .topbar { height: 62px; padding: 0 11px; }
  .mobile-only { display: inline-flex; }
  .menu-button { width: 36px; height: 36px; justify-content: center; font-size: 20px; }
  .brand-button { margin-right: auto; }
  .brand-button img { width: 145px; height: 45px; }
  .brand-button span, .profile-button > span:last-child, .top-link { display: none; }
  .sidebar { inset: 62px auto 0 0; width: min(286px, 86vw); transform: translateX(-100%); transition: transform .2s; }
  .sidebar.open { transform: translateX(0); }
  .scrim { position: fixed; inset: 62px 0 0; z-index: 17; display: block; border: 0; background: rgba(3, 20, 40, .58); }
  .content { margin: 62px 0 0; padding: 20px 13px 45px; }
  .page-head { display: grid; }
  .head-actions { justify-content: flex-start; }
  .quick-grid { grid-template-columns: repeat(2, 1fr); }
  .quick-action { min-height: 118px; }
  .form-grid, .detail-grid { grid-template-columns: 1fr; }
  .form-grid .full { grid-column: auto; }
  .toolbar { flex-direction: column; }
  .toolbar select { width: 100%; }
  .approval-card { grid-template-columns: 1fr; }
  .approval-actions { justify-content: flex-start; }
  .report-grid { grid-template-columns: repeat(2, 1fr); }
  .currency-grid, .agreement-grid { grid-template-columns: 1fr; }
  .onboarding-progress { grid-template-columns: repeat(3, 1fr); row-gap: 13px; }
  .profile-hero { align-items: flex-start; }
  .report-grid div:nth-child(3n) { border-right: 1px solid var(--line); }
  .report-grid div:nth-child(2n) { border-right: 0; }
  .print-sheet { padding: 18px; }
  .print-sheet > header { display: grid; }
  .print-sheet > header div { text-align: left; }
  .print-sheet > header img { width: 220px; }
}

@media (max-width: 470px) {
  .service-grid { grid-template-columns: 1fr; }
  .service-card { min-height: 76px; }
}

@media (max-width: 390px) {
  .quick-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .quick-action { min-height: 110px; padding: 12px; }
  .metrics { grid-template-columns: 1fr 1fr; }
  .metric { padding: 11px; }
  .dialog-body { padding: 15px; }
  .company-choice { grid-template-columns: 38px 1fr; }
  .company-choice > span { width: 38px; height: 38px; }
  .company-choice > strong { grid-column: 2; }
}

@page { size: A4; margin: 12mm; }

@media print {
  body > *:not(dialog) { display: none !important; }
  dialog[open] { position: static; display: block; width: 100%; max-width: none; max-height: none; margin: 0; border: 0; }
  .dialog-head, .no-print { display: none !important; }
  .dialog-body { padding: 0; }
  .print-sheet { border: 0; max-width: none; padding: 0; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  .print-sheet table, .print-sheet tr, .print-sheet footer { break-inside: avoid; }
}
