:root {
  --ink: #172033;
  --muted: #687286;
  --line: #dfe4ec;
  --paper: #ffffff;
  --canvas: #f4f6fa;
  --navy: #111a2e;
  --navy-2: #1a2742;
  --gold: #d4a83d;
  --gold-2: #b6871d;
  --green: #197452;
  --green-bg: #e9f7f1;
  --red: #b43b45;
  --red-bg: #fff0f1;
  --orange: #9a6513;
  --orange-bg: #fff6df;
  --shadow: 0 14px 36px rgba(17, 26, 46, .08);
  --radius: 18px;
}

* { box-sizing: border-box; }
html { font-size: 16px; }
body { margin: 0; color: var(--ink); background: var(--canvas); font-family: "Segoe UI", Roboto, Arial, sans-serif; line-height: 1.5; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 255px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; padding: 24px 18px; display: flex; flex-direction: column; color: #eef2fb; background: linear-gradient(170deg, var(--navy) 0%, #0c1424 100%); z-index: 30; }
.brand { display: flex; gap: 12px; align-items: center; padding: 0 8px 26px; border-bottom: 1px solid rgba(255,255,255,.08); }
.brand > span:last-child { display: grid; }
.brand strong { font-size: 1rem; letter-spacing: .01em; }
.brand small { color: #a7b1c5; font-size: .78rem; }
.brand-mark { width: 58px; height: 58px; display: grid; place-items: center; color: var(--navy); background: var(--gold); border-radius: 17px; font-weight: 900; letter-spacing: -.05em; box-shadow: 0 10px 26px rgba(212, 168, 61, .2); }
.brand-mark.small { width: 42px; height: 42px; border-radius: 12px; font-size: .84rem; flex: 0 0 auto; }
.company-logo { display: block; object-fit: contain; background: #fff; border-radius: 12px; }
.company-logo.small { width: 42px; height: 42px; padding: 4px; flex: 0 0 auto; }
.company-logo.invoice-logo { width: 128px; height: 78px; object-position: center; }
.company-logo.preview { width: 130px; height: 90px; padding: 8px; border: 1px solid var(--line); }
.logo-setting { display: flex; align-items: center; gap: 22px; padding: 18px; background: #f7f8fb; border: 1px solid var(--line); border-radius: 14px; }
.logo-setting label { flex: 1; }
.sidebar nav { display: grid; gap: 4px; margin-top: 22px; overflow-y: auto; }
.nav-link { min-height: 44px; display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 11px; color: #b9c2d4; font-size: .92rem; font-weight: 600; }
.nav-link span { width: 22px; color: #8d99af; text-align: center; }
.nav-link:hover, .nav-link.active { color: #fff; background: rgba(255,255,255,.08); }
.nav-link.active span { color: var(--gold); }
.sidebar-footer { margin-top: auto; padding: 18px 8px 0; border-top: 1px solid rgba(255,255,255,.08); }
.user-chip { display: flex; align-items: center; gap: 10px; }
.user-chip > span { width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.18); border-radius: 50%; color: var(--gold); font-weight: 800; }
.user-chip div { display: grid; min-width: 0; }
.user-chip strong { font-size: .85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-chip small { color: #8f9bb0; }
.link-button { margin: 12px 0 0 44px; padding: 0; color: #aab4c7; background: none; border: 0; cursor: pointer; font-size: .8rem; }
.link-button:hover { color: #fff; }

.main-content { min-width: 0; }
.topbar { min-height: 92px; display: flex; align-items: center; gap: 16px; padding: 20px clamp(20px, 3vw, 42px); background: rgba(244,246,250,.92); border-bottom: 1px solid var(--line); backdrop-filter: blur(12px); }
.topbar h1 { margin: 1px 0 0; font-family: inherit; font-size: clamp(1.35rem, 2vw, 1.75rem); font-weight: 800; line-height: 1.15; letter-spacing: -.02em; }
.topbar-date { margin-left: auto; color: var(--muted); font-size: .88rem; }
.eyebrow { margin: 0; color: var(--gold-2); font-size: .71rem; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.menu-button { display: none; width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 11px; background: #fff; cursor: pointer; }
.page-content { width: min(1500px, 100%); margin: 0 auto; padding: clamp(20px, 3vw, 42px); }

.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.stat-card { min-height: 118px; display: flex; align-items: center; gap: 16px; padding: 22px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 8px 24px rgba(17,26,46,.04); transition: transform .2s, box-shadow .2s; }
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.stat-icon { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 14px; color: var(--gold-2); background: #fff8e8; font-size: 1.3rem; }
.stat-card div { display: grid; }
.stat-card small { color: var(--muted); }
.stat-card strong { font-family: inherit; font-size: 1.8rem; font-weight: 800; }
.summary-strip { margin-top: 16px; padding: 20px 24px; display: flex; align-items: center; gap: 38px; color: #fff; background: linear-gradient(120deg, var(--navy), var(--navy-2)); border-radius: var(--radius); }
.summary-strip div { display: grid; }
.summary-strip small { color: #aeb8ca; }
.summary-strip strong { font-size: 1.1rem; }
.summary-strip .button { margin-left: auto; }
.content-grid { display: grid; gap: 18px; margin-top: 18px; }
.content-grid.two-one { grid-template-columns: minmax(0, 1.7fr) minmax(280px, 1fr); }

.panel { margin-top: 18px; padding: 24px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 8px 24px rgba(17,26,46,.04); }
.panel.compact { padding: 20px 24px; }
.panel-heading { min-height: 44px; display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 20px; }
.panel-heading h2 { margin: 2px 0 0; font-family: inherit; font-size: 1.25rem; font-weight: 800; letter-spacing: -.015em; }
.panel-heading > a { color: var(--gold-2); font-size: .88rem; font-weight: 700; }
.record-count { color: var(--muted); font-size: .82rem; }
.page-actions { display: flex; justify-content: flex-end; gap: 10px; }
.page-actions.split > div { display: flex; gap: 10px; }

.button { min-height: 42px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 17px; border: 1px solid transparent; border-radius: 11px; cursor: pointer; font-weight: 750; font-size: .88rem; transition: transform .15s, background .15s, border-color .15s; }
.button:hover { transform: translateY(-1px); }
.button.primary { color: var(--navy); background: var(--gold); }
.button.primary:hover { background: #e0b64f; }
.button.secondary { color: var(--ink); background: #fff; border-color: var(--line); }
.button.ghost { color: var(--muted); background: transparent; border-color: transparent; }
.button.full { width: 100%; }
.button.small { min-height: 36px; padding: 7px 12px; }
.icon-button { width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 9px; color: var(--red); background: #fff; cursor: pointer; font-size: 1.2rem; }
.table-action { color: var(--gold-2); background: none; border: 0; font-weight: 750; cursor: pointer; white-space: nowrap; }

.alert { width: min(1500px, calc(100% - 40px)); margin: 18px auto 0; padding: 13px 16px; border: 1px solid; border-radius: 11px; font-size: .9rem; }
.alert.success { color: var(--green); background: var(--green-bg); border-color: #bee9d7; }
.alert.danger { color: var(--red); background: var(--red-bg); border-color: #ffcdd2; }
.alert.warning { color: var(--orange); background: var(--orange-bg); border-color: #f0dca7; }
.badge { display: inline-flex; align-items: center; min-height: 25px; padding: 3px 9px; border-radius: 999px; font-size: .72rem; font-weight: 800; white-space: nowrap; }
.badge.success { color: var(--green); background: var(--green-bg); }
.badge.warning { color: var(--orange); background: var(--orange-bg); }
.badge.danger { color: var(--red); background: var(--red-bg); }
.badge.neutral { color: #58647a; background: #edf0f5; }

.table-wrap { width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { padding: 11px 13px; color: var(--muted); background: #f7f8fb; border-bottom: 1px solid var(--line); text-align: left; font-size: .76rem; letter-spacing: .04em; text-transform: uppercase; }
td { padding: 14px 13px; border-bottom: 1px solid #edf0f5; vertical-align: middle; font-size: .88rem; }
td strong, td small { display: block; }
td small { margin-top: 2px; color: var(--muted); font-size: .76rem; }
tr:last-child td { border-bottom: 0; }

.form-panel { max-width: 1180px; margin-inline: auto; }
.stack-lg { display: grid; gap: 20px; }
.form-grid { display: grid; gap: 16px; }
.form-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.form-grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: end; }
label { display: grid; gap: 7px; color: #364156; font-size: .82rem; font-weight: 750; }
label small { color: var(--muted); font-weight: 500; }
input, select, textarea { width: 100%; min-height: 44px; padding: 10px 12px; color: var(--ink); background: #fff; border: 1px solid #cfd6e2; border-radius: 10px; outline: none; }
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(212,168,61,.14); }
fieldset { padding: 18px; border: 1px solid var(--line); border-radius: 14px; }
legend { padding: 0 8px; font-weight: 800; }
.form-actions { display: flex; gap: 10px; justify-content: flex-end; }
.check-row { display: flex; flex-wrap: wrap; gap: 20px; }
.check-row label { display: flex; align-items: center; }
.check-row input { width: 18px; min-height: 18px; }
.search-form { display: flex; gap: 8px; width: min(480px, 100%); }
.search-form input { flex: 1; }
.total-preview { padding: 18px 20px; display: flex; align-items: center; justify-content: space-between; color: #fff; background: var(--navy); border-radius: 13px; }
.total-preview strong { color: var(--gold); font-size: 1.2rem; }
.total-preview.compact { min-height: 78px; display: grid; justify-content: initial; align-content: center; }

.activity-list, .mini-list { display: grid; }
.activity-row { display: grid; grid-template-columns: 10px minmax(0,1fr) auto; align-items: center; gap: 12px; padding: 13px 0; border-bottom: 1px solid #edf0f5; }
.activity-row div, .mini-list span { display: grid; }
.activity-row small, .mini-list small { color: var(--muted); }
.activity-row time, .mini-list time { color: var(--muted); font-size: .78rem; white-space: nowrap; }
.priority { width: 8px; height: 8px; border-radius: 50%; background: #93a0b5; }
.priority.high { background: var(--red); }.priority.normal { background: var(--gold); }.priority.low { background: var(--green); }
.priority-label.high { color: var(--red); }.priority-label.normal { color: var(--orange); }.priority-label.low { color: var(--green); }
.mini-list > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid #edf0f5; }

.empty-state { min-height: 230px; display: grid; place-items: center; align-content: center; gap: 8px; color: var(--muted); text-align: center; }
.empty-state h3, .empty-state p { margin: 0; }
.empty-state h3 { color: var(--ink); }
.empty-state p { max-width: 420px; }
.empty-icon { font-size: 2rem; color: var(--gold); }

.airline-cell { display: flex; align-items: center; gap: 10px; min-width: 180px; }
.airline-cell img, .airline-card img { width: 42px; height: 42px; object-fit: contain; padding: 5px; background: #fff; border: 1px solid var(--line); border-radius: 10px; }
.airline-cell span:last-child, .airline-card div { display: grid; }
.airline-fallback { width: 42px; height: 42px; display: grid; place-items: center; color: var(--gold-2); background: #fff8e8; border-radius: 10px; font-weight: 900; }
.airline-fallback.large { width: 52px; height: 52px; }
.logo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.airline-card { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; }
.airline-card small { color: var(--muted); }

.package-grid { margin-top: 18px; display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 18px; }
.package-card { padding: 22px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 8px 24px rgba(17,26,46,.04); }
.package-top, .package-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.package-code { color: var(--gold-2); font-size: .75rem; font-weight: 850; letter-spacing: .06em; }
.package-card h2 { min-height: 54px; margin: 15px 0; font-family: inherit; font-size: 1.3rem; font-weight: 800; }
.package-meta { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 13px; background: #f7f8fb; border-radius: 12px; }
.package-meta span, .package-route div, .package-footer > div:first-child { display: grid; }
.package-meta small, .package-route small, .package-footer small, .package-footer span { color: var(--muted); font-size: .72rem; }
.package-meta strong { font-size: .85rem; }
.package-route { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 18px 0; }
.package-route div { padding-left: 11px; border-left: 3px solid var(--gold); }
.package-route span { color: var(--muted); font-size: .78rem; }
.package-footer { padding-top: 16px; border-top: 1px solid var(--line); }
.package-footer > div:first-child > strong { color: var(--navy); font-size: 1.1rem; }
.inclusions { display: grid; gap: 3px; text-align: right; }

.invoice-items { display: grid; gap: 8px; }
.invoice-record-picker { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: end; gap: 12px; padding: 15px; background: #f7f8fb; border: 1px solid var(--line); border-radius: 12px; }
.invoice-record-picker label { display: grid; gap: 6px; }
.invoice-record-picker small { color: var(--muted); font-size: .76rem; }
.invoice-item { display: grid; grid-template-columns: minmax(220px, 2fr) 90px 150px 120px 36px; align-items: center; gap: 9px; }
.invoice-item-head { color: var(--muted); font-size: .74rem; font-weight: 800; text-transform: uppercase; }
.invoice-item strong { text-align: right; }
.invoice-toolbar { display: flex; justify-content: flex-end; gap: 10px; margin-bottom: 16px; }
.invoice-toolbar .button:first-child { margin-right: auto; }
.status-form { display: flex; gap: 8px; }
.status-form select { min-height: 42px; }
.invoice-sheet { max-width: 1000px; margin: 0 auto; padding: clamp(28px, 5vw, 64px); background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.invoice-header { display: grid; grid-template-columns: minmax(0,1fr) auto minmax(0,1fr); align-items: start; gap: 24px; padding-bottom: 30px; border-bottom: 2px solid var(--navy); }
.invoice-company { max-width: 360px; }
.invoice-header h2 { margin: 16px 0 5px; font-family: inherit; font-weight: 800; }
.invoice-header p { margin: 0; color: var(--muted); }
.invoice-logo-center { min-width: 150px; display: grid; place-items: center; text-align: center; }
.invoice-title { display: grid; justify-items: end; align-content: start; gap: 5px; }
.invoice-title > span { font-family: inherit; font-size: 1.85rem; font-weight: 850; letter-spacing: -.025em; }
.invoice-title > strong { color: var(--gold-2); }
.invoice-parties { display: flex; justify-content: space-between; gap: 24px; margin: 32px 0; }
.invoice-parties > div:first-child { display: grid; }
.invoice-parties small { color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.invoice-parties p { margin: 5px 0 0; }
.invoice-dates { min-width: 300px; display: grid; gap: 10px; }
.invoice-dates span { display: flex; justify-content: space-between; gap: 20px; }
.invoice-table th:last-child, .invoice-table td:last-child, .invoice-table th:nth-child(3), .invoice-table td:nth-child(3) { text-align: right; }
.invoice-bottom { display: grid; grid-template-columns: 1fr 360px; gap: 35px; margin-top: 30px; }
.invoice-bottom p { color: var(--muted); }
.invoice-totals { display: grid; }
.invoice-totals span { display: flex; justify-content: space-between; gap: 20px; padding: 8px 0; border-bottom: 1px solid #edf0f5; }
.invoice-totals .grand { padding-top: 13px; color: var(--navy); font-size: 1.1rem; font-weight: 800; border-top: 2px solid var(--navy); }
.invoice-totals .balance { color: var(--gold-2); font-weight: 800; }
.invoice-terms-qr { display: grid; grid-template-columns: minmax(0,1fr) 140px; gap: 28px; align-items: end; margin-top: 32px; padding-top: 22px; border-top: 1px solid var(--line); }
.invoice-terms h3 { margin: 0 0 8px; font-size: .9rem; }
.invoice-terms p { margin: 0; color: var(--muted); font-size: .76rem; line-height: 1.55; }
.invoice-qr { display: grid; justify-items: center; gap: 5px; }
.invoice-qr small, .voucher-qr small { color: var(--muted); font-size: .67rem; }
.ticket-sheet { display: grid; gap: 24px; }
.ticket-sheet .invoice-header { margin-bottom: 0; }
.ticket-sheet .invoice-title > span { max-width: 290px; font-size: 1.45rem; text-align: right; }
.ticket-status-notice { padding: 12px 16px; color: #8a5800; background: #fff6dc; border: 1px solid #eed18a; border-radius: 10px; font-weight: 800; }
.ticket-airline-hero { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 22px; background: #f7f8fb; border: 1px solid var(--line); border-radius: 14px; }
.ticket-airline-brand { display: flex; align-items: center; gap: 14px; }
.ticket-airline-brand img { width: 76px; height: 76px; object-fit: contain; padding: 8px; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.ticket-airline-brand div, .ticket-reference, .ticket-passenger-grid > div, .ticket-detail-grid > div { display: grid; gap: 4px; }
.ticket-airline-brand small, .ticket-reference small, .ticket-passenger-grid small, .ticket-detail-grid small, .ticket-route-card small { color: var(--muted); font-size: .68rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.ticket-airline-brand strong { font-size: 1.25rem; }
.ticket-airline-brand span, .ticket-reference span, .ticket-passenger-grid span { color: var(--muted); font-size: .78rem; }
.ticket-reference { justify-items: end; text-align: right; }
.ticket-reference strong { font-size: 1.05rem; }
.ticket-passenger-grid, .ticket-detail-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; }
.ticket-detail-grid { grid-template-columns: repeat(4, minmax(0,1fr)); }
.ticket-passenger-grid > div, .ticket-detail-grid > div { min-height: 76px; padding: 15px; border-right: 1px solid var(--line); }
.ticket-passenger-grid > div:last-child, .ticket-detail-grid > div:last-child { border-right: 0; }
.ticket-route-card { display: grid; grid-template-columns: minmax(0,1fr) 170px minmax(0,1fr); align-items: center; padding: 24px; color: #fff; background: var(--navy); border-radius: 14px; }
.ticket-route-card > div:not(.ticket-route-line) { display: grid; gap: 4px; }
.ticket-route-card > div:last-child { justify-items: end; text-align: right; }
.ticket-route-card small, .ticket-route-card span { color: #c7cfdd; }
.ticket-route-card strong { color: #fff; font-family: inherit; font-size: 2.15rem; font-weight: 850; }
.ticket-route-line { position: relative; display: grid; place-items: center; }
.ticket-route-line::before { content: ''; position: absolute; right: 0; left: 0; height: 1px; background: rgba(255,255,255,.5); }
.ticket-route-line span { z-index: 1; display: grid; place-items: center; width: 34px; height: 34px; color: var(--navy); background: var(--gold); border-radius: 50%; }
.ticket-fare-table { width: min(480px,100%); margin-left: auto; }
.ticket-fare-table th:last-child, .ticket-fare-table td:last-child { text-align: right; }
.ticket-total-row { color: var(--navy); font-weight: 900; border-top: 2px solid var(--navy); }
.qr-code { display: block; width: 120px; height: 120px; background: #fff; }

.voucher-form-panel { max-width: 1450px; }
.inline-alert { width: 100%; margin: 0 0 18px; }
.repeat-table { width: 100%; margin-bottom: 12px; overflow-x: auto; }
.repeat-row { min-width: 1120px; display: grid; gap: 7px; align-items: center; margin-bottom: 7px; }
.repeat-row.traveler-row { grid-template-columns: 125px minmax(180px,1.5fr) 65px 100px 80px 110px 110px 110px 100px 36px; }
.repeat-row.hotel-row { grid-template-columns: 100px minmax(180px,1.5fr) 90px 80px 115px 120px 130px 130px 80px 36px; }
.repeat-head { padding: 0 4px; color: var(--muted); font-size: .69rem; font-weight: 800; text-transform: uppercase; }
.repeat-row input, .repeat-row select { min-height: 38px; padding: 7px 8px; font-size: .78rem; }

.voucher-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; margin-bottom: 16px; }
.voucher-toolbar > .button:first-child { margin-right: auto; }
.reject-form { display: flex; gap: 7px; }
.reject-form input { width: 220px; min-height: 42px; }
.voucher-document { display: grid; gap: 24px; overflow-x: auto; }
.voucher-page { width: 210mm; min-height: 277mm; position: relative; isolation: isolate; margin: 0 auto; padding: 12mm; overflow: hidden; color: #111; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow); font-family: Arial, sans-serif; font-size: 11px; line-height: 1.25; }
.voucher-page > *:not(.voucher-watermark) { position: relative; z-index: 1; }
.voucher-watermark { position: absolute; inset: 44% auto auto 50%; z-index: 0; transform: translate(-50%,-50%) rotate(-43deg); color: rgba(25,116,82,.15); font-size: 62px; font-weight: 900; letter-spacing: .02em; white-space: nowrap; }
.voucher-watermark.pending-approval { color: rgba(154,101,19,.13); }
.voucher-watermark.rejected { color: rgba(180,59,69,.14); }
.voucher-watermark.draft { color: rgba(104,114,134,.14); }
.voucher-header { min-height: 86px; display: grid; grid-template-columns: 1fr 180px 1fr; align-items: start; gap: 18px; border-bottom: 2px solid #111; }
.voucher-company, .voucher-operator { display: grid; gap: 4px; }
.voucher-company strong, .voucher-operator strong { color: #10195d; font-size: 13px; text-transform: uppercase; }
.voucher-operator { text-align: right; }
.voucher-logo-center { display: grid; place-items: center; text-align: center; }
.voucher-logo-center img { width: 145px; height: 75px; object-fit: contain; }
.voucher-logo-center .brand-mark { width: 72px; height: 60px; border-radius: 12px; }
.voucher-meta-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; margin: 8px 0; }
.voucher-meta-grid > div { display: flex; gap: 8px; }
.voucher-meta-grid span { color: #555; }
.voucher-title, .voucher-section-title { margin: 6px 0 0; padding: 3px 8px; text-align: center; background: #e4e4e4; border: 1px solid #111; font-size: 11px; font-weight: 800; }
.voucher-title { font-size: 12px; }
.voucher-keyline { display: grid; grid-template-columns: 1.5fr 1fr 1fr; border: 1px solid #111; border-top: 0; }
.voucher-keyline span { padding: 4px 7px; border-right: 1px solid #111; }
.voucher-keyline span:last-child { border-right: 0; }
.voucher-table { width: 100%; table-layout: fixed; border-collapse: collapse; font-size: 9px; }
.voucher-table th, .voucher-table td { padding: 4px 3px; color: #111; background: transparent; border: 1px solid #222; text-align: center; text-transform: none; letter-spacing: 0; font-size: inherit; word-break: break-word; }
.voucher-table th { background: #efefef; font-weight: 800; }
.voucher-table td strong, .voucher-table td small { display: initial; }
.compact-table { font-size: 8px; }
.compact-table th:nth-child(3), .compact-table td:nth-child(3) { width: 19%; text-align: left; }
.voucher-total td { font-weight: 800; text-align: right; }
.voucher-flight-qr { display: grid; grid-template-columns: minmax(0,1fr) 90px; gap: 8px; margin-top: 7px; }
.flight-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.voucher-qr { display: grid; justify-items: center; align-content: center; }
.voucher-qr .qr-code { width: 82px; height: 82px; }
.voucher-special { margin-top: 7px; padding-top: 5px; border-top: 1px dashed #777; color: #151562; font-size: 9px; }
.voucher-special p { margin: 3px 0 0; color: #111; }
.voucher-approval { position: absolute !important; right: 12mm; bottom: 9mm; left: 12mm; display: flex; justify-content: space-between; gap: 20px; padding-top: 6px; border-top: 1px solid #777; font-size: 9px; }
.voucher-instructions-page { padding: 18mm 16mm; font-family: "Noto Nastaliq Urdu", "Segoe UI", Tahoma, serif; }
.instructions-logo { margin-bottom: 14px; }
.voucher-instructions-page h2 { margin: 8px 0 24px; color: #10195d; text-align: center; font-size: 24px; }
.urdu-instructions { display: grid; gap: 16px; margin: 0; padding-right: 32px; font-size: 17px; line-height: 2.05; }
.instructions-note { margin-top: 28px; padding: 14px 18px; background: #f7f0dc; border-right: 4px solid var(--gold); font-size: 15px; line-height: 1.9; }

.verification-card { width: min(520px,100%); padding: 36px; background: #fff; border-radius: 22px; box-shadow: 0 30px 70px rgba(0,0,0,.28); text-align: center; }
.verification-logo { display: grid; place-items: center; margin-bottom: 20px; }
.verification-icon { width: 58px; height: 58px; display: grid; place-items: center; margin: 0 auto 14px; border-radius: 50%; color: #fff; font-size: 1.8rem; font-weight: 900; }
.verification-icon.success { background: var(--green); }
.verification-icon.danger { background: var(--red); }
.verification-card h1 { margin: 4px 0 22px; font-family: inherit; font-weight: 850; }
.verification-details { display: grid; gap: 0; margin: 0; text-align: left; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.verification-details div { display: flex; justify-content: space-between; gap: 16px; padding: 12px 15px; border-bottom: 1px solid var(--line); }
.verification-details div:last-child { border-bottom: 0; }
.verification-details dt { color: var(--muted); }
.verification-details dd { margin: 0; font-weight: 800; }
.verification-contact { margin: 20px 0 0; color: var(--muted); font-size: .8rem; }

.auth-page { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(circle at 20% 0%, #243554 0, transparent 38%), var(--navy); }
.login-card, .setup-card { width: min(440px, 100%); padding: 34px; background: #fff; border-radius: 22px; box-shadow: 0 30px 70px rgba(0,0,0,.28); }
.setup-card { width: min(850px, 100%); }
.login-card h1, .setup-card h1 { margin: 12px 0 4px; font-family: inherit; font-size: 1.8rem; font-weight: 850; letter-spacing: -.025em; }

.modal[hidden] { display: none; }
.modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 18px; }
.modal-backdrop { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; background: rgba(8,14,27,.7); border: 0; cursor: pointer; }
.modal-card { position: relative; z-index: 1; width: min(760px,100%); max-height: calc(100vh - 36px); overflow-y: auto; padding: 24px; background: #fff; border-radius: 18px; box-shadow: 0 30px 80px rgba(0,0,0,.3); }
.modal-close { width: 38px; height: 38px; display: grid; place-items: center; color: var(--muted); background: #f3f5f8; border: 0; border-radius: 10px; cursor: pointer; font-size: 1.4rem; }
.modal-open { overflow: hidden; }

.ledger-help { display: grid; gap: 3px; margin-bottom: 20px; padding: 14px 16px; color: #604600; background: #fff8e8; border: 1px solid #f0dca7; border-radius: 11px; }
.ledger-help span { color: #78642f; font-size: .82rem; }
.ledger-summary { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; margin-top: 18px; }
.ledger-summary > div { display: grid; gap: 5px; padding: 20px 22px; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 8px 24px rgba(17,26,46,.04); }
.ledger-summary small { color: var(--muted); }
.ledger-summary strong { font-size: 1.25rem; }
.ledger-balance.receivable { color: var(--green); }
.ledger-balance.payable { color: var(--red); }
.ledger-filter { display: flex; align-items: end; gap: 10px; margin-bottom: 16px; padding: 14px; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.ledger-filter label { display: grid; gap: 5px; color: var(--muted); font-size: .75rem; font-weight: 800; }
.ledger-filter input { min-height: 42px; padding: 8px 11px; border: 1px solid var(--line); border-radius: 10px; }
.ledger-sheet { display: grid; gap: 26px; }
.ledger-party { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); overflow: hidden; border: 1px solid var(--line); border-radius: 12px; }
.ledger-party > div { display: grid; gap: 4px; min-height: 84px; padding: 15px; border-right: 1px solid var(--line); }
.ledger-party > div:last-child { border-right: 0; }
.ledger-party small { color: var(--muted); font-size: .68rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.ledger-party span { color: var(--muted); font-size: .78rem; }
.ledger-table td:nth-last-child(-n+3), .ledger-table th:nth-last-child(-n+3) { text-align: right; }
.ledger-table tfoot th { color: var(--ink); font-weight: 850; }
.ledger-footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding-top: 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: .76rem; }
.ledger-footer strong { width: 100%; color: var(--navy); text-align: right; font-size: 1rem; }
.muted { color: var(--muted); }
.login-card .alert, .setup-card .alert { width: 100%; margin: 18px 0 0; }

.inline-form { display: inline; }

@media (max-width: 1120px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .form-grid.three, .form-grid.four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .content-grid.two-one { grid-template-columns: 1fr; }
}

@media (max-width: 820px) {
  .app-shell { display: block; }
  .sidebar { position: fixed; inset: 0 auto 0 0; width: 270px; transform: translateX(-102%); transition: transform .25s; box-shadow: 20px 0 60px rgba(0,0,0,.25); }
  .sidebar.open { transform: translateX(0); }
  .menu-button { display: grid; place-items: center; }
  .topbar { min-height: 78px; position: sticky; top: 0; z-index: 20; }
  .topbar-date { display: none; }
  .invoice-bottom, .invoice-terms-qr { grid-template-columns: 1fr; }
  .invoice-qr { justify-items: start; }
}

@media (max-width: 620px) {
  .page-content { padding: 16px; }
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat-card { min-height: 96px; padding: 15px; }
  .stat-icon { display: none; }
  .stat-card strong { font-size: 1.5rem; }
  .summary-strip { display: grid; gap: 14px; }
  .summary-strip .button { margin: 0; }
  .panel { padding: 18px 14px; border-radius: 14px; }
  .panel-heading { align-items: flex-start; }
  .form-grid.two, .form-grid.three, .form-grid.four { grid-template-columns: 1fr; }
  .form-actions { flex-direction: column; }
  .form-actions .button { width: 100%; }
  .search-form { display: grid; }
  .package-grid { grid-template-columns: 1fr; }
  .invoice-item { grid-template-columns: minmax(0,1fr) 70px 100px 34px; }
  .invoice-item > strong { display: none; }
  .invoice-item-head { display: none; }
  .invoice-record-picker { grid-template-columns: 1fr; }
  .invoice-sheet { padding: 22px 16px; border-radius: 0; }
  .invoice-header, .invoice-parties { display: grid; grid-template-columns: 1fr; }
  .invoice-logo-center { justify-items: start; }
  .invoice-title { justify-items: start; }
  .invoice-dates { min-width: 0; }
  .ticket-airline-hero { align-items: flex-start; }
  .ticket-passenger-grid, .ticket-detail-grid { grid-template-columns: 1fr; }
  .ticket-passenger-grid > div, .ticket-detail-grid > div { border-right: 0; border-bottom: 1px solid var(--line); }
  .ticket-passenger-grid > div:last-child, .ticket-detail-grid > div:last-child { border-bottom: 0; }
  .ticket-route-card { grid-template-columns: 1fr 60px 1fr; padding: 18px 14px; }
  .ticket-route-card strong { font-size: 1.6rem; }
  .ledger-summary { grid-template-columns: 1fr; }
  .ledger-filter { align-items: stretch; flex-direction: column; }
  .ledger-party { grid-template-columns: 1fr; }
  .ledger-party > div { border-right: 0; border-bottom: 1px solid var(--line); }
  .ledger-party > div:last-child { border-bottom: 0; }
}

@media print {
  body { background: #fff; }
  .sidebar, .topbar, .no-print, .alert, .page-actions, .modal { display: none !important; }
  .app-shell { display: block; }
  .page-content { padding: 0; }
  .invoice-sheet { max-width: none; padding: 0; border: 0; border-radius: 0; box-shadow: none; }
  .invoice-header { grid-template-columns: minmax(0,1fr) auto minmax(0,1fr); }
  .invoice-logo-center { justify-items: center; }
  .ticket-sheet { gap: 16px; }
  .ticket-airline-hero, .ticket-passenger-grid > div, .ticket-detail-grid > div, .ticket-route-card { break-inside: avoid; }
  .ledger-sheet { gap: 16px; }
  .voucher-document { display: block; overflow: visible; }
  .voucher-page { width: auto; min-height: calc(297mm - 16mm); margin: 0; padding: 8mm; border: 0; box-shadow: none; break-after: page; page-break-after: always; }
  .voucher-page:last-child { break-after: auto; page-break-after: auto; }
  .voucher-approval { right: 8mm; bottom: 5mm; left: 8mm; }
  @page { size: A4; margin: 8mm; }
}
