:root {
    --sidebar: 260px;
    --navbar: 72px;
    --ink: #171717;
    --muted: #6f7378;
    --primary: #ef1822;
    --primary-dark: #bd0d16;
    --primary-soft: #fff0f1;
    --canvas: #f5f5f5;
    --line: #e5e5e5;
    --bs-primary: #ef1822;
    --bs-primary-rgb: 239, 24, 34;
    --bs-link-color: #d4101a;
    --bs-link-color-rgb: 212, 16, 26;
    --bs-link-hover-color: #a80b13;
    --bs-link-hover-color-rgb: 168, 11, 19;
    --bs-focus-ring-color: rgba(239, 24, 34, .22);
}

* { box-sizing: border-box; }
body { font-family: "Noto Sans Thai", "Segoe UI", Tahoma, sans-serif; background: var(--canvas); color: var(--ink); }
a, button, input, select, textarea { transition: border-color .18s ease, box-shadow .18s ease, background-color .18s ease, color .18s ease, transform .18s ease; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid rgba(239, 24, 34, .22); outline-offset: 2px; }

.navbar { height: var(--navbar); z-index: 1040; box-shadow: 0 1px 12px rgba(23, 32, 51, .04); }
.navbar-brand { color: var(--ink); font-size: 1rem; line-height: 1.05; }
.brand-subtitle { color: var(--muted); font-size: .61rem; font-weight: 600; letter-spacing: .04em; margin-top: 3px; }
.brand-mark, .login-logo { display: block; width: 40px; height: 40px; flex: 0 0 auto; object-fit: contain; border-radius: 50%; background: #fff; }
.brand-mark { box-shadow: 0 2px 8px rgba(0, 0, 0, .12); }
.login-logo { width: 112px; height: 112px; margin: auto; box-shadow: 0 12px 30px rgba(239, 24, 34, .2); }
.scanner-form { width: min(600px, 47vw); }
.search-box .input-group-text, .search-box .form-control { min-height: 42px; }
.search-box .form-control:focus { box-shadow: none; background: #fff !important; }
.search-box:focus-within { border-radius: .55rem; box-shadow: 0 0 0 .2rem rgba(239, 24, 34, .12); }
.search-shortcut kbd { color: #78849a; background: #e8ebf1; font-size: .67rem; font-weight: 700; border: 1px solid #d8dde7; }
.quick-create { align-items: center; gap: .4rem; min-height: 40px; padding-inline: .8rem; }
.user-menu { display: inline-flex; align-items: center; gap: .5rem; min-height: 42px; }
.user-avatar { width: 30px; height: 30px; display: inline-grid; place-items: center; border-radius: 9px; background: #ffe7e9; color: var(--primary); font-weight: 800; text-transform: uppercase; flex: 0 0 auto; }

.sidebar { position: fixed !important; top: var(--navbar); bottom: 0; left: 0; width: var(--sidebar) !important; background: #111 !important; color: #f1f1f1; border-right: 1px solid #292929 !important; z-index: 1030; }
.sidebar .offcanvas-body { width: 100%; overflow-y: auto; }
.sidebar-mobile-header { border-bottom: 1px solid rgba(255, 255, 255, .08); }
.sidebar-nav { width: 100%; }
.nav-section { font-size: .69rem; font-weight: 800; letter-spacing: .11em; text-transform: uppercase; color: #aeb2b8; padding: .5rem .75rem; }
.sidebar .side-link { display: flex; gap: .75rem; align-items: center; color: #ededed; text-decoration: none; padding: .72rem .78rem; border-radius: .7rem; margin: .12rem 0; border: 1px solid transparent; opacity: 1; }
.side-link:hover { color: #fff; background: #282828; transform: translateX(2px); }
.side-link.active { color: #fff; background: linear-gradient(90deg, rgba(239, 24, 34, .42), rgba(239, 24, 34, .12)); border-color: rgba(255, 91, 99, .2); box-shadow: inset 3px 0 #f51b26; }
.side-link i { width: 20px; text-align: center; color: #f3f3f3; font-size: 1.05rem; opacity: 1; }
.side-link.disabled-feature { opacity: .66; }
.sidebar-user { display: flex; gap: .65rem; align-items: center; margin-top: 1.25rem !important; padding: .8rem; border-top: 1px solid rgba(255, 255, 255, .08); }
.sidebar-user .user-avatar { color: #fff; background: rgba(239, 24, 34, .42); }
.sidebar-user strong, .sidebar-user small { display: block; line-height: 1.25; }
.sidebar-user small { color: #b9bdc3; font-size: .72rem; margin-top: .15rem; }

.main-content { margin-left: var(--sidebar); padding: 100px 30px 44px; min-height: 100vh; }
.page-header { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1.5rem; }
.page-header h1 { font-size: 1.65rem; font-weight: 750; margin: 0; }
.page-header p { color: var(--muted); margin: .25rem 0 0; }
.section-heading { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: .9rem; }
.section-heading h2 { font-size: 1.15rem; font-weight: 750; margin: 0; }
.section-heading p { color: var(--muted); font-size: .84rem; margin: .2rem 0 0; }
.last-updated { color: var(--muted); font-size: .78rem; }

.dashboard-hero { position: relative; overflow: hidden; display: flex; justify-content: space-between; align-items: center; gap: 2rem; min-height: 190px; padding: 2rem 2.2rem; color: #fff; background: linear-gradient(125deg, #171717 0%, #9e0b12 46%, #ef1822 100%); border-radius: 1.2rem; box-shadow: 0 15px 35px rgba(167, 10, 18, .22); }
.dashboard-hero::before, .dashboard-hero::after { content: ""; position: absolute; border-radius: 50%; background: rgba(255, 255, 255, .07); }
.dashboard-hero::before { width: 260px; height: 260px; right: -80px; top: -140px; }
.dashboard-hero::after { width: 170px; height: 170px; right: 22%; bottom: -130px; }
.dashboard-hero > * { position: relative; z-index: 1; }
.dashboard-eyebrow { display: block; font-size: .8rem; font-weight: 700; letter-spacing: .06em; color: #d9e0ff; margin-bottom: .4rem; }
.dashboard-hero h1 { font-size: clamp(1.45rem, 2.3vw, 2.05rem); font-weight: 800; margin: 0; }
.dashboard-hero p { color: #dfe5ff; margin: .55rem 0 0; }
.hero-actions { display: flex; gap: .65rem; flex-wrap: wrap; justify-content: flex-end; }
.hero-actions .btn { display: inline-flex; align-items: center; gap: .45rem; white-space: nowrap; min-height: 44px; font-weight: 700; }

.card-panel, .metric-card { border: 0; border-radius: 1rem; box-shadow: 0 3px 18px rgba(33, 43, 69, .06); }
.metric-card { position: relative; display: block; height: 100%; min-height: 142px; background: #fff; padding: 1.05rem; text-decoration: none; color: var(--ink); border: 1px solid transparent; }
.metric-link:hover { color: var(--ink); border-color: #f3c9cc; box-shadow: 0 10px 25px rgba(239, 24, 34, .1); transform: translateY(-2px); }
.metric-arrow { position: absolute; right: 1rem; top: 1rem; color: #abb4c4; font-size: .8rem; }
.metric-icon { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-size: 1.15rem; margin-bottom: .9rem; }
.metric-icon.blue { color: #d4101a; background: #ffe7e9; }
.metric-icon.orange { color: #ce7100; background: #fff1db; }
.metric-icon.green { color: #168a58; background: #ddf7ea; }
.metric-icon.red { color: #c73535; background: #ffe6e6; }
.metric-icon.purple { color: #333; background: #ececec; }
.metric-icon.cyan { color: #07809c; background: #dff7fc; }
.metric-value { font-weight: 800; font-size: 1.65rem; line-height: 1; }
.metric-label { color: var(--muted); font-size: .84rem; margin-top: .45rem; }

.quick-actions { display: flex; align-items: center; gap: .55rem; flex-wrap: wrap; padding: .8rem; background: #fff; border: 1px solid var(--line); border-radius: .9rem; }
.quick-actions-label { padding: .35rem .5rem; color: var(--muted); font-size: .78rem; font-weight: 700; }
.quick-actions a { display: inline-flex; align-items: center; gap: .4rem; padding: .5rem .7rem; color: #3a4760; background: #f7f8fb; border-radius: .55rem; text-decoration: none; font-size: .84rem; font-weight: 650; }
.quick-actions a:hover { color: var(--primary); background: var(--primary-soft); }
.panel-heading { padding: 1rem 1.2rem; border-color: var(--line); }

.table > :not(caption) > * > * { padding: .9rem 1rem; }
.table thead th { font-size: .73rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); background: #fafbfc; border-bottom-width: 1px; white-space: nowrap; }
.table tbody tr { border-color: #edf0f5; }
.clickable-row { cursor: pointer; }
.clickable-row:hover td { background: #f7f9ff; }
.empty-state { text-align: center !important; color: var(--muted); padding: 3rem !important; }
.empty-state i { font-size: 2rem; }
.empty-state p { margin: .5rem 0 0; }
.priority { display: inline-flex; padding: .3rem .55rem; border-radius: 999px; background: #edf0f5; color: #596579; font-size: .75rem; font-weight: 700; }
.priority-high { color: #b76800; background: #fff1db; }
.priority-urgent { color: #c73535; background: #ffe6e6; }
.priority-low { color: #168a58; background: #ddf7ea; }
.priority-waiting { color: #9b5b00; background: #fff0c7; }
.priority-vip { color: #6b2bbf; background: #f0e2ff; }
.filter-panel { border: 1px solid var(--line); }
.filter-title { display: flex; align-items: center; gap: .55rem; min-height: 28px; margin-bottom: 1rem; color: #34425a; font-weight: 750; }
.filter-title .badge { margin-left: auto; }
.filter-actions { display: flex; justify-content: flex-end; gap: .55rem; }
.filter-actions .btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; min-width: 130px; }
.result-toolbar { display: flex; justify-content: space-between; align-items: center; margin: 0 .2rem .65rem; }
.result-toolbar strong, .result-toolbar span { display: block; }
.result-toolbar span { color: var(--muted); font-size: .78rem; margin-top: .12rem; }
.claim-list-product { min-width: 220px; max-width: 420px; }
.claim-list-product strong, .claim-list-product small { display: block; }
.claim-list-product strong { color: #292929; font-size: .88rem; line-height: 1.4; }
.claim-list-product small { margin-top: .2rem; color: var(--muted); font-size: .76rem; }
.claim-filter-more { background: #fff; }
.recent-claim-detail { min-width: 290px; max-width: 620px; }
.recent-claim-detail strong, .recent-claim-detail small { display: block; }
.recent-claim-detail strong { color: #292929; font-size: .88rem; line-height: 1.4; }
.recent-claim-detail small { color: var(--muted); margin-top: .2rem; line-height: 1.35; }
.recent-claim-detail i { width: 18px; color: var(--primary); text-align: center; margin-right: .2rem; }
.recent-claim-detail .claim-symptom { color: #4d5156; }
.latest-note { display: flex; align-items: flex-start; gap: .4rem; min-width: 180px; max-width: 300px; color: #34383d; font-size: .82rem; line-height: 1.4; }
.latest-note i { color: var(--primary); margin-top: .08rem; }
.latest-note.is-empty { color: var(--muted); font-style: italic; }
.claim-age { display: inline-flex; align-items: center; justify-content: center; min-width: 58px; padding: .32rem .5rem; border-radius: 999px; font-size: .76rem; font-weight: 800; white-space: nowrap; }
.quick-claim-actions { display: inline-flex; flex-direction: column; align-items: stretch; gap: .45rem; min-width: 205px; }
.quick-status-form { display: grid; grid-template-columns: minmax(110px, 1fr) auto; gap: .35rem; }
.quick-status-form .btn { white-space: nowrap; }
.dashboard-print-ticket { display: none; }
.backup-panel { border: 1px solid #f3c9cc; }
.backup-setting { height: 100%; padding: 1rem; border: 1px solid var(--line); border-radius: .75rem; background: #fafafa; }
.backup-setting span, .backup-setting strong, .backup-setting small { display: block; }
.backup-setting span { color: var(--muted); font-size: .75rem; font-weight: 700; }
.backup-setting strong { margin-top: .35rem; color: var(--ink); font-size: 1rem; overflow-wrap: anywhere; }
.backup-setting small { margin-top: .3rem; color: var(--muted); }
.database-danger-zone { overflow: hidden; border: 1px solid #e5a4a8; border-radius: 1rem; background: #fffafa; box-shadow: 0 5px 22px rgba(154, 20, 28, .08); }
.database-restore-zone { overflow: hidden; border: 1px solid #e7ca7d; border-radius: 1rem; background: #fffdf6; box-shadow: 0 5px 22px rgba(124, 88, 13, .07); }
.database-danger-heading { display: flex; align-items: center; gap: .85rem; }
.database-danger-heading p { color: #76545a; font-size: .86rem; }
.database-danger-icon { display: grid; place-items: center; width: 46px; height: 46px; flex: 0 0 auto; color: #fff; border-radius: 13px; background: #cf1822; font-size: 1.25rem; }
.database-restore-icon { display: grid; place-items: center; width: 46px; height: 46px; flex: 0 0 auto; color: #4c3500; border-radius: 13px; background: #ffd970; font-size: 1.25rem; }
.database-reset-warning { color: #6f1015; border: 1px solid #f1c0c3; background: #fff0f1; box-shadow: none; }
.database-reset-warning ul { padding-left: 1.2rem; }
.database-reset-warning li + li { margin-top: .25rem; }
.database-reset-confirm { display: flex; align-items: flex-start; gap: .75rem; padding: 1rem; border: 1px solid #dfb1b4; border-radius: .8rem; background: #fff; cursor: pointer; }
.database-reset-confirm input { width: 1.15rem; height: 1.15rem; flex: 0 0 auto; margin-top: .15rem; accent-color: #cf1822; }
.database-reset-confirm strong, .database-reset-confirm small { display: block; }
.database-reset-confirm small { margin-top: .2rem; color: var(--muted); }
.database-reset-verification { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; padding: 1rem; border: 1px solid #efd6d8; border-radius: .8rem; background: #fff; }
.database-reset-verification code { padding: .12rem .35rem; color: #a70f17; border-radius: .3rem; background: #ffe8ea; font-family: inherit; font-weight: 800; }
.database-reset-form .btn-danger:disabled { cursor: not-allowed; opacity: .45; }
.product-picker { padding: 1rem; border: 1px solid #e2e4e8; border-radius: .9rem; background: #fafafa; }
.product-picker-header { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: .85rem; }
.product-picker-header strong, .product-picker-header small { display: block; }
.product-picker-header strong { color: #292929; }
.product-picker-header strong i { color: var(--primary); margin-right: .25rem; }
.product-picker-header small { margin-top: .12rem; color: var(--muted); font-size: .78rem; }
.product-picker-search { width: min(360px, 100%); flex: 0 1 360px; }
.product-choice-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .7rem; max-height: 310px; padding: .15rem; overflow-y: auto; }
.product-choice { display: flex; align-items: center; gap: .7rem; min-height: 88px; padding: .8rem; color: var(--ink); text-align: left; border: 1px solid #dedede; border-radius: .75rem; background: #fff; box-shadow: 0 2px 8px rgba(20, 20, 20, .03); }
.product-choice:hover { border-color: #f29ba0; background: #fff7f7; transform: translateY(-1px); }
.product-choice.is-selected { border-color: var(--primary); background: var(--primary-soft); box-shadow: 0 0 0 2px rgba(239, 24, 34, .12); }
.product-choice-icon { display: grid; place-items: center; width: 42px; height: 42px; flex: 0 0 auto; color: var(--primary); border-radius: 12px; background: #ffe4e6; font-size: 1.15rem; }
.product-choice-detail { min-width: 0; flex: 1; }
.product-choice-detail strong, .product-choice-detail span, .product-choice-detail small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.product-choice-detail strong { font-size: .92rem; }
.product-choice-detail span { margin-top: .15rem; color: #4e5359; font-size: .78rem; }
.product-choice-detail small { margin-top: .08rem; color: var(--muted); font-size: .72rem; }
.product-choice-check { flex: 0 0 auto; color: var(--primary); opacity: 0; }
.product-choice.is-selected .product-choice-check { opacity: 1; }
.product-choice-empty { padding: 1.25rem; color: var(--muted); text-align: center; border: 1px dashed #d9d9d9; border-radius: .7rem; background: #fff; }
.product-manual-divider { display: flex; align-items: center; gap: .8rem; color: var(--muted); font-size: .82rem; font-weight: 700; }
.product-manual-divider::before, .product-manual-divider::after { content: ""; height: 1px; flex: 1; background: var(--line); }
.product-manual-divider .btn { white-space: nowrap; }
.claim-source-card { border-left: 4px solid var(--primary); }
.vehicle-fields-title { display: flex; align-items: center; gap: .5rem; padding-top: .2rem; color: #3f444a; font-weight: 750; }
.vehicle-fields-title i { color: var(--primary); }
.vehicle-fields-title small { color: var(--muted); font-weight: 500; }

@media (max-width: 767.98px) {
    .database-reset-verification { grid-template-columns: 1fr; }
    .product-picker-header { align-items: stretch; flex-direction: column; }
    .product-picker-search { width: 100%; flex-basis: auto; }
    .product-choice-grid { grid-template-columns: 1fr; max-height: 280px; }
}

.branch-option, .permission-option { display: flex; gap: .65rem; align-items: flex-start; padding: .75rem; border: 1px solid #e4e8f0; border-radius: .65rem; background: #fafbfc; width: 100%; cursor: pointer; }
.permission-option small { display: block; color: var(--muted); font-family: monospace; }
.permission-module { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--primary); margin: 1.25rem 0 .6rem; }
.min-vh-75 { min-height: 75vh; }
.guest-page { background: radial-gradient(circle at 10% 10%, #ffe2e4, transparent 30%), radial-gradient(circle at 90% 80%, #ededed, transparent 32%), #f8f8f8; }
.form-label { color: #3d485d; font-weight: 650; font-size: .88rem; }
.form-control, .form-select, .input-group-text { border-color: #dce1ea; }
.form-control:focus, .form-select:focus { border-color: #ee6a72; box-shadow: 0 0 0 .2rem rgba(239, 24, 34, .12); }
.btn { border-radius: .58rem; }
.btn-primary { background: var(--primary); border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); }
.btn-outline-primary { color: var(--primary); border-color: var(--primary); }
.btn-outline-primary:hover, .btn-outline-primary:focus { color: #fff; background: var(--primary); border-color: var(--primary); }
.text-primary { color: var(--primary) !important; }
.bg-primary, .text-bg-primary { background-color: var(--primary) !important; }
.border-primary { border-color: var(--primary) !important; }
.alert { border: 0; border-radius: .8rem; box-shadow: 0 4px 18px rgba(33, 43, 69, .07); }
.step-heading { display: flex; align-items: center; gap: .75rem; margin-bottom: 1.15rem; }
.step-heading h2 { font-size: 1.05rem; font-weight: 800; margin: 0; }
.step-heading p { color: var(--muted); font-size: .82rem; margin: .15rem 0 0; }
.step-number { display: inline-grid; place-items: center; width: 34px; height: 34px; flex: 0 0 auto; border-radius: 10px; color: #fff; background: var(--primary); font-weight: 800; }
.advanced-details { border: 1px solid var(--line); border-radius: .7rem; background: #fafbfc; }
.advanced-details summary { cursor: pointer; padding: .7rem .85rem; color: #536077; font-size: .84rem; font-weight: 700; }
.advanced-details[open] { padding: 0 .85rem .85rem; }
.advanced-details[open] summary { margin-inline: -.85rem; padding-inline: .85rem; border-bottom: 1px solid var(--line); }
.advanced-card > summary { display: flex; justify-content: space-between; align-items: center; cursor: pointer; padding: 1rem 1.2rem; list-style: none; font-weight: 750; }
.advanced-card > summary::-webkit-details-marker { display: none; }
.advanced-card > summary span { display: inline-flex; align-items: center; gap: .5rem; }
.advanced-card > summary small { color: var(--muted); font-weight: 500; }
.submit-card { position: sticky; bottom: 12px; z-index: 20; border: 1px solid #f3c9cc; box-shadow: 0 12px 35px rgba(39, 20, 21, .14); }
.qr-ticket { border: 2px solid #f3c9cc; background: linear-gradient(135deg, #fff, #fff4f5); }
.qr-code-box { width: 190px; min-height: 190px; display: grid; place-items: center; padding: 5px; border: 1px solid var(--line); border-radius: .7rem; background: #fff; }
.qr-code-box img, .qr-code-box canvas { max-width: 100%; height: auto !important; }
.qr-ticket-url { word-break: break-all; font-size: .78rem; }
.barcode-ticket { border: 2px solid #f3c9cc; }
.barcode-ticket .card-header { flex-wrap: wrap; }
.barcode-label { height: 100%; padding: 1rem; border: 1px dashed #aebcdb; border-radius: .75rem; background: #fff; text-align: center; }
.barcode-label svg { display: block; width: 100%; max-width: 360px; height: 82px; margin-inline: auto; overflow: visible; shape-rendering: crispEdges; }
.barcode-serial { font-size: .9rem; font-weight: 700; letter-spacing: .04em; white-space: nowrap; }
.barcode-print-settings { margin-left: auto; }
.barcode-print-settings label > span { display: block; margin-bottom: .2rem; color: var(--muted); font-size: .7rem; font-weight: 700; }
.barcode-print-settings .input-group { width: 108px; }
.barcode-print-settings input { min-width: 0; text-align: center; }
.barcode-size-x { padding-bottom: .35rem; color: var(--muted); }
.barcode-print-hint { width: 100%; color: #b45309; font-weight: 700; text-align: right; }

@media (max-width: 1199.98px) {
    .dashboard-hero { padding: 1.7rem; }
}

@media (max-width: 991.98px) {
    .sidebar { top: 0; }
    .main-content { margin-left: 0; padding: 96px 18px 34px; }
    .scanner-form { width: min(430px, 48vw); }
    .dashboard-hero { min-height: 175px; }
}

@media (max-width: 767.98px) {
    .dashboard-hero { align-items: flex-start; flex-direction: column; gap: 1.2rem; }
    .hero-actions { justify-content: flex-start; }
    .table-mobile-stack { min-width: 0 !important; }
    .table-mobile-stack thead { display: none; }
    .table-mobile-stack tbody, .table-mobile-stack tr, .table-mobile-stack td { display: block; width: 100%; }
    .table-mobile-stack tbody { padding: .7rem; }
    .table-mobile-stack tbody tr { margin-bottom: .7rem; border: 1px solid var(--line); border-radius: .8rem; overflow: hidden; background: #fff; }
    .table-mobile-stack tbody tr:last-child { margin-bottom: 0; }
    .table-mobile-stack tbody td { display: flex; justify-content: space-between; align-items: center; gap: 1rem; text-align: right; padding: .65rem .8rem; border-bottom: 1px solid #eef1f5; }
    .table-mobile-stack tbody td:last-child { border-bottom: 0; }
    .table-mobile-stack tbody td::before { content: attr(data-label); color: var(--muted); font-size: .72rem; font-weight: 700; text-transform: uppercase; text-align: left; }
    .table-mobile-stack tbody td.empty-state { display: block; text-align: center !important; }
    .table-mobile-stack tbody td.empty-state::before { display: none; }
    .recent-claim-detail { min-width: 0; max-width: 70%; text-align: left; }
    .latest-note { min-width: 0; max-width: 70%; text-align: left; }
    .quick-claim-actions { width: min(70%, 330px); min-width: 0; }
}

@media (max-width: 575.98px) {
    .navbar { height: 68px; padding-inline: 10px !important; }
    .navbar-brand { font-size: .9rem; }
    .brand-mark { width: 34px; height: 34px; }
    .nav-menu-button { padding-inline: .25rem; margin-right: .25rem !important; }
    .scanner-form { position: absolute; top: 74px; left: 12px; width: calc(100vw - 24px); }
    .main-content { padding: 140px 12px 30px; }
    .page-header { align-items: flex-start; flex-direction: column; }
    .page-header .btn { width: 100%; }
    .page-header p { font-size: .85rem; }
    .section-heading { align-items: flex-start; gap: .5rem; }
    .last-updated { white-space: nowrap; }
    .dashboard-hero { padding: 1.35rem; border-radius: 1rem; }
    .dashboard-hero p { font-size: .86rem; }
    .hero-actions { width: 100%; }
    .hero-actions .btn { flex: 1 1 auto; justify-content: center; }
    .metric-card { min-height: 132px; padding: .9rem; }
    .metric-value { font-size: 1.4rem; }
    .quick-actions { align-items: stretch; }
    .quick-actions-label { width: 100%; }
    .quick-actions a { flex: 1 1 calc(50% - .55rem); }
    .panel-heading { align-items: flex-start !important; }
    .filter-actions { justify-content: stretch; }
    .filter-actions .btn { flex: 1; min-width: 0; }
    .submit-card { position: static; }
    .submit-card .card-body { align-items: stretch !important; flex-direction: column; }
    .submit-card .btn { width: 100%; }
    .qr-ticket .card-body { text-align: center; }
    .qr-code-box { margin-inline: auto; }
}

@media print {
    @page { size: A4 portrait; margin: 5mm; }
    body * { visibility: hidden !important; }
    .qr-ticket, .qr-ticket * { visibility: visible !important; }
    .qr-ticket { position: absolute; inset: 0 auto auto 0; width: 100%; border: 0; box-shadow: none; }
    .qr-ticket .no-print { display: none !important; }
    body.printing-barcodes .qr-ticket, body.printing-barcodes .qr-ticket * { visibility: hidden !important; }
    body.printing-barcodes .barcode-ticket, body.printing-barcodes .barcode-ticket * { visibility: visible !important; }
    body.printing-barcodes .dashboard-print-ticket { display: block !important; }
    body.printing-barcodes .barcode-ticket { position: absolute; inset: 0 auto auto 0; width: 100%; border: 0; box-shadow: none; }
    body.printing-barcodes .barcode-ticket .no-print, body.printing-barcodes .barcode-ticket .card-header { display: none !important; }
    body.printing-barcodes .barcode-ticket .card-body { display: flex !important; flex-wrap: wrap !important; align-items: flex-start; gap: 2mm; padding: 0 !important; }
    body.printing-barcodes .barcode-ticket .card-body > .row { width: 100%; }
    body.printing-barcodes .barcode-ticket .card-body > .barcode-label { flex: 0 0 var(--print-barcode-width, 60mm); }
    body.printing-barcodes .barcode-ticket .row { display: flex !important; gap: 2mm !important; margin: 0 !important; }
    body.printing-barcodes .barcode-ticket .row > * { width: var(--print-barcode-width, 60mm) !important; max-width: var(--print-barcode-width, 60mm) !important; flex: 0 0 var(--print-barcode-width, 60mm) !important; padding: 0 !important; }
    body.printing-barcodes .barcode-label { width: var(--print-barcode-width, 60mm); height: var(--print-barcode-height, 35mm); box-sizing: border-box; display: flex; flex-direction: column; justify-content: flex-start; overflow: hidden; padding: 2mm; border: .25mm dashed #777; border-radius: 0; break-inside: avoid; page-break-inside: avoid; }
    body.printing-barcodes .barcode-label svg { display: block; flex: 1 1 0; width: 100% !important; max-width: 100% !important; height: auto !important; min-height: 8mm; max-height: none; margin: 0 auto .8mm; overflow: visible; shape-rendering: crispEdges; }
    body.printing-barcodes .barcode-label .fw-semibold { display: none !important; }
    body.printing-barcodes .barcode-serial, body.printing-barcodes .barcode-label small { display: block; width: 100%; font-size: var(--print-barcode-text-size, 8pt); line-height: 1.05; letter-spacing: 0; white-space: nowrap; overflow: hidden; text-overflow: clip; }
}
