/* Gasoil Vouchers module (I.T.L.-style) */

.gasoil-overlay {
    position: fixed; inset: 0;
    background: rgba(15, 23, 42, 0.45); backdrop-filter: blur(2px);
    z-index: 10000; display: none;
}
.gasoil-overlay.open { display: block; }

.gasoil-app {
    position: absolute; inset: 0;
    background: #f1f5f9;
    display: flex; flex-direction: column;
}

/* App bar */
.gasoil-appbar {
    display: flex; align-items: center; gap: 16px;
    padding: 0 18px; height: 54px;
    background: #fff; border-bottom: 1px solid #e2e8f0;
    flex-shrink: 0;
}
.gasoil-appbar-title { font-size: 16px; font-weight: 800; color: #0f172a; white-space: nowrap; }
.gasoil-appbar-title i { color: #f59e0b; margin-right: 8px; }
.gasoil-search {
    flex: 1; max-width: 420px; margin-left: auto;
    padding: 8px 14px; border: 1px solid #e2e8f0; border-radius: 999px;
    font-size: 13px; background: #f8fafc;
}
.gasoil-search:focus { outline: 2px solid #fbbf24; outline-offset: -1px; background: #fff; }
.gasoil-close {
    border: none; background: transparent; cursor: pointer;
    font-size: 17px; color: #64748b; padding: 8px 10px; border-radius: 8px;
}
.gasoil-close:hover { background: #f1f5f9; color: #0f172a; }
.gasoil-map-btn {
    border: 1px solid #e2e8f0; background: #f8fafc; cursor: pointer;
    font-size: 13px; font-weight: 700; color: #334155;
    padding: 7px 14px; border-radius: 999px; white-space: nowrap;
    display: inline-flex; align-items: center; gap: 6px;
}
.gasoil-map-btn:hover { background: #fef3c7; border-color: #fbbf24; color: #92400e; }
.gasoil-avatar {
    display: inline-flex; align-items: center; justify-content: center;
    width: 28px; height: 28px; border-radius: 50%;
    background: #fef3c7; color: #92400e; font-size: 11px; font-weight: 800;
}
.gasoil-print-tpl { max-width: 220px; padding: 5px 8px; font-size: 12px; }
.gasoil-tpl-dialog { max-width: 720px; width: 95vw; }
.gasoil-code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12px; }
body.theme-dark .gasoil-map-btn { background: #0f172a; border-color: #334155; color: #f1f5f9; }
body.theme-dark .gasoil-avatar { background: #292208; color: #fbbf24; }

/* Built-in (locked) templates */
.gasoil-builtin-row td { background: #f8fafc; }
.gasoil-builtin-badge {
    display: inline-flex; align-items: center; gap: 4px; margin-left: 6px;
    font-size: 10px; font-weight: 700; color: #64748b;
    background: #e2e8f0; padding: 1px 7px; border-radius: 999px; vertical-align: middle;
}
.gasoil-builtin-desc { font-size: 11.5px; color: #94a3b8; font-weight: 400; }
body.theme-dark .gasoil-builtin-row td { background: #16202f; }
body.theme-dark .gasoil-builtin-badge { background: #334155; color: #cbd5e1; }

/* ── Visual template designer ─────────────────────────────────── */
.gasoil-designer-overlay { z-index: 100001; }
.gasoil-designer {
    background: #f1f5f9; border-radius: 14px; width: 97vw; height: 94vh;
    display: flex; flex-direction: column; overflow: hidden;
}
.gd-topbar {
    display: flex; align-items: center; gap: 8px; padding: 10px 14px;
    background: #fff; border-bottom: 1px solid #e2e8f0; flex-shrink: 0; flex-wrap: wrap;
}
.gd-title { font-weight: 800; font-size: 14px; color: #0f172a; white-space: nowrap; }
.gd-title i { color: #f59e0b; margin-right: 6px; }
.gd-topbar .gasoil-input { padding: 6px 10px; font-size: 13px; }
#gdName { width: 200px; }
#gdDocType { width: 180px; }
.gd-margin-lbl, .gd-default-lbl { font-size: 12px; color: #475569; display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
#gdMargin { width: 56px; }
.gd-spacer { flex: 1; }
.gd-body { flex: 1; display: flex; min-height: 0; }

.gd-palette {
    width: 210px; background: #fff; border-right: 1px solid #e2e8f0;
    padding: 12px; overflow-y: auto; flex-shrink: 0;
}
.gd-palette-title { font-size: 11px; font-weight: 800; text-transform: uppercase; color: #94a3b8; margin-bottom: 8px; }
.gd-pal-item {
    display: flex; align-items: center; gap: 8px; padding: 8px 10px; margin-bottom: 6px;
    background: #f8fafc; border: 1px dashed #cbd5e1; border-radius: 8px;
    font-size: 12.5px; font-weight: 600; color: #334155; cursor: grab;
}
.gd-pal-item:hover { border-color: #f59e0b; background: #fef3c7; }
.gd-pal-item i { color: #f59e0b; width: 16px; text-align: center; }
.gd-field-list { display: flex; flex-wrap: wrap; gap: 4px; }
.gd-field-chip {
    font-family: ui-monospace, Menlo, monospace; font-size: 10px;
    background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe;
    padding: 2px 6px; border-radius: 6px; cursor: default;
}

.gd-canvas-wrap { flex: 1; overflow: auto; padding: 18px; display: flex; justify-content: center; align-items: flex-start; }
.gd-canvas-outer { padding-bottom: 30px; }
.gd-page {
    position: relative; background: #fff; border-radius: 2px;
    box-shadow: 0 4px 24px rgba(15, 23, 42, 0.18); flex-shrink: 0;
}
.gd-margins {
    position: absolute; border: 1.5px dashed #f87171; border-radius: 1px;
    pointer-events: none;
}
.gd-margins::after {
    content: "page extremities"; position: absolute; top: -16px; left: 0;
    font-size: 9px; color: #f87171; font-weight: 700; white-space: nowrap;
}
.gd-blocks { position: absolute; overflow-y: auto; padding: 2px; }
.gd-empty-hint {
    height: 100%; display: flex; align-items: center; justify-content: center;
    color: #94a3b8; font-size: 13px; gap: 8px; text-align: center; padding: 20px;
}
.gd-block {
    position: relative; border: 1px solid transparent; border-radius: 6px;
    padding: 4px 6px; margin-bottom: 2px; cursor: pointer;
}
.gd-block:hover { border-color: #cbd5e1; }
.gd-block.selected { border-color: #f59e0b; background: #fffbeb; }
.gd-block.drop-before { box-shadow: 0 -3px 0 #f59e0b; }
.gd-block-tools {
    position: absolute; top: -10px; right: 4px; display: none; gap: 2px;
    background: #fff; border: 1px solid #e2e8f0; border-radius: 6px; padding: 1px 3px; z-index: 5;
}
.gd-block:hover .gd-block-tools, .gd-block.selected .gd-block-tools { display: inline-flex; align-items: center; }
.gd-block-type { font-size: 9px; font-weight: 800; text-transform: uppercase; color: #94a3b8; margin: 0 4px 0 2px; }
.gd-tool {
    border: none; background: transparent; cursor: pointer; color: #64748b;
    font-size: 11px; padding: 2px 4px; border-radius: 4px;
}
.gd-tool:hover { background: #f1f5f9; }
.gd-tool.danger { color: #ef4444; }
.gd-ph {
    font-style: normal; font-family: ui-monospace, Menlo, monospace; font-size: 9.5px;
    background: #eff6ff; color: #1d4ed8; padding: 0 4px; border-radius: 4px;
}
.gd-bp-heading { font-weight: 800; text-transform: uppercase; }
.gd-bp-heading.sz-lg { font-size: 17px; } .gd-bp-heading.sz-md { font-size: 14px; } .gd-bp-heading.sz-sm { font-size: 12px; }
.ta-left { text-align: left; } .ta-center { text-align: center; } .ta-right { text-align: right; }
.gd-bp-text { font-size: 11px; color: #1e293b; }
.gd-bp-field { font-size: 11px; }
.gd-bp-row { display: flex; gap: 6px; }
.gd-bp-cell {
    flex: 1; border: 1px solid #cbd5e1; border-radius: 4px; padding: 3px 6px; font-size: 10px;
}
.gd-bp-cell span { display: block; font-size: 8px; font-weight: 800; text-transform: uppercase; color: #64748b; }
.gd-bp-table { width: 100%; border-collapse: collapse; }
.gd-bp-table th, .gd-bp-table td { border: 1px solid #94a3b8; padding: 3px 5px; font-size: 9.5px; }
.gd-bp-table th { background: #e2e8f0; }
.gd-bp-divider { border: none; border-top: 1.5px solid #334155; margin: 6px 0; }
.gd-bp-cutline {
    border-top: 1.5px dashed #334155; margin: 10px 0 4px; text-align: center; position: relative;
}
.gd-bp-cutline i, .gd-bp-cutline { font-size: 9px; color: #64748b; font-weight: 700; }
.gd-bp-cutline { padding-top: 2px; }
.gd-bp-keys { width: 100%; border-collapse: collapse; font-size: 10.5px; }
.gd-bp-keys td { padding: 2px 4px; vertical-align: top; }
.gd-bp-keys .gd-bp-key { font-weight: 800; white-space: nowrap; color: #1e293b; }
.gd-bp-raw {
    font-size: 10px; color: #475569; background: #f8fafc; border: 1px dashed #cbd5e1;
    border-radius: 4px; padding: 4px 7px;
}
.gd-bp-raw i { color: #94a3b8; margin-right: 4px; }
.gd-bp-sig { font-size: 10px; margin-top: 10px; }
.gd-bp-sigline { border-bottom: 1px solid #334155; height: 20px; margin-top: 2px; }
.gd-bp-spacer {
    background: repeating-linear-gradient(45deg, #f1f5f9, #f1f5f9 6px, #e2e8f0 6px, #e2e8f0 12px);
    border-radius: 4px; display: flex; align-items: center; justify-content: center; min-height: 8px;
}
.gd-bp-spacer span { font-size: 8px; color: #94a3b8; }

/* Read-only designer (built-in layout visual view) */
.gd-readonly .gd-palette, .gd-readonly .gd-props { opacity: .55; pointer-events: none; }
.gd-readonly .gd-block { cursor: default; }
.gd-readonly .gd-block .gd-block-tools { display: none !important; }
.gd-readonly .gd-block:hover { border-color: #cbd5e1; }
.gd-readonly .gd-block.selected { border-color: #94a3b8; background: #f8fafc; }
.gd-readonly-badge {
    display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 700;
    color: #92400e; background: #fef3c7; border: 1px solid #fde68a; padding: 3px 9px; border-radius: 999px;
}
.gd-readonly .gasoil-input:disabled { background: #f1f5f9; color: #64748b; }

.gd-props {
    width: 270px; background: #fff; border-left: 1px solid #e2e8f0;
    padding: 12px; overflow-y: auto; flex-shrink: 0;
}
.gd-props-empty { color: #94a3b8; font-size: 12.5px; display: flex; gap: 8px; align-items: center; margin-top: 6px; }
.gd-p-lbl { display: block; font-size: 12px; font-weight: 700; color: #334155; margin-bottom: 10px; }
.gd-p-lbl .gasoil-input { margin-top: 4px; width: 100%; }
.gd-p-hint { font-weight: 400; color: #94a3b8; font-size: 11px; }
.gd-cell-row { display: flex; gap: 4px; margin-bottom: 5px; align-items: center; }
.gd-cell-row .gasoil-input { padding: 5px 7px; font-size: 12px; }
.gp-cell-label { width: 90px; flex-shrink: 0; }
.gd-table-editor-wrap { overflow-x: auto; margin-bottom: 8px; }
.gd-table-editor { border-collapse: collapse; width: 100%; }
.gd-table-editor th, .gd-table-editor td { border: 1px solid #cbd5e1; padding: 0; position: relative; }
.gd-table-editor th { background: #f1f5f9; }
.gd-th-input, .gd-td-input {
    border: none; background: transparent; width: 100%; min-width: 52px;
    padding: 4px 6px; font-size: 11px; outline: none;
}
.gd-th-input { font-weight: 700; }
.gd-th-input:focus, .gd-td-input:focus { background: #fef3c7; }
.gd-col-del, .gd-row-del {
    border: none; background: #fee2e2; color: #ef4444; cursor: pointer;
    font-size: 10px; font-weight: 800; border-radius: 3px; padding: 0 4px;
}
.gd-col-del { position: absolute; top: 1px; right: 1px; }
.gd-row-del-td { border: none !important; padding-left: 4px !important; }
.gd-table-btns { display: flex; gap: 5px; flex-wrap: wrap; }
.gasoil-btn.sm { padding: 4px 10px; font-size: 11.5px; }
.gd-preview-page { background: #fff; padding: 18px; border: 1px solid #e2e8f0; border-radius: 6px; color: #000; }

body.theme-dark .gasoil-designer { background: #0f172a; }
body.theme-dark .gd-topbar, body.theme-dark .gd-palette, body.theme-dark .gd-props { background: #1e293b; border-color: #334155; }
body.theme-dark .gd-title { color: #f1f5f9; }
body.theme-dark .gd-pal-item { background: #0f172a; border-color: #475569; color: #cbd5e1; }
body.theme-dark .gd-p-lbl { color: #cbd5e1; }

/* Main layout: side menu + content */
.gasoil-main { flex: 1; display: flex; min-height: 0; }

.gasoil-sidemenu {
    width: 76px; background: #fff; border-right: 1px solid #e2e8f0;
    display: flex; flex-direction: column; align-items: stretch;
    padding: 10px 8px; gap: 4px; flex-shrink: 0; overflow-y: auto;
}
.gasoil-side-item {
    position: relative;
    display: flex; flex-direction: column; align-items: center; gap: 4px;
    padding: 10px 4px; border: none; border-radius: 10px;
    background: transparent; cursor: pointer;
    color: #64748b; font-size: 10.5px; font-weight: 600;
}
.gasoil-side-item i { font-size: 17px; }
.gasoil-side-item:hover { background: #f1f5f9; color: #0f172a; }
.gasoil-side-item.active { background: #fef3e2; color: #d97706; }
.gasoil-side-item.accent { color: #f59e0b; }
.gasoil-side-sep { height: 1px; background: #e2e8f0; margin: 6px 4px; }
.gasoil-badge {
    position: absolute; top: 4px; right: 8px;
    background: #ef4444; color: #fff; border-radius: 999px;
    font-size: 9.5px; font-weight: 800; font-style: normal;
    min-width: 16px; height: 16px; line-height: 16px; text-align: center; padding: 0 4px;
}

.gasoil-content { flex: 1; overflow-y: auto; padding: 20px 24px; min-width: 0; }

/* View header */
.gasoil-view-head {
    display: flex; align-items: center; justify-content: space-between;
    gap: 12px; margin-bottom: 14px; flex-wrap: wrap;
}
.gasoil-view-head h2 { font-size: 17px; font-weight: 800; color: #0f172a; margin: 0; }
.gasoil-count { color: #94a3b8; font-weight: 600; }
.gasoil-head-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* Inputs & buttons */
.gasoil-input {
    padding: 8px 10px; border: 1px solid #cbd5e1; border-radius: 8px;
    font-size: 13px; color: #0f172a; background: #fff; min-width: 0;
}
.gasoil-input:focus { outline: 2px solid #fbbf24; outline-offset: -1px; border-color: #f59e0b; }
.gasoil-btn {
    border: 1px solid #cbd5e1; background: #fff; color: #0f172a;
    padding: 8px 14px; border-radius: 8px; font-size: 13px; font-weight: 600;
    cursor: pointer; display: inline-flex; align-items: center; gap: 6px;
}
.gasoil-btn:hover { background: #f1f5f9; }
.gasoil-btn.primary { background: #f59e0b; border-color: #f59e0b; color: #fff; }
.gasoil-btn.primary:hover { background: #d97706; }
.gasoil-btn.primary.lg { padding: 10px 22px; font-size: 14px; }
.gasoil-btn:disabled { opacity: 0.55; cursor: default; }

/* Tables */
.gasoil-table-wrap { overflow-x: auto; border: 1px solid #e2e8f0; border-radius: 12px; background: #fff; }
.gasoil-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.gasoil-table th {
    text-align: left; padding: 10px 12px; background: #f8fafc;
    color: #475569; font-size: 11px; text-transform: uppercase; letter-spacing: 0.4px;
    border-bottom: 1px solid #e2e8f0; white-space: nowrap;
}
.gasoil-table td { padding: 9px 12px; border-bottom: 1px solid #f1f5f9; color: #0f172a; white-space: nowrap; }
.gasoil-table tr:last-child td { border-bottom: none; }
.gasoil-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.gasoil-vrow { cursor: pointer; }
.gasoil-vrow:hover td { background: #fffbeb; }
.gasoil-vno { font-weight: 700; }
.gasoil-vno-lg { font-weight: 800; font-size: 16px; }

/* Status chips */
.gasoil-status {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 2px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 700;
}
.gasoil-status.st-approval { background: #fef3e2; color: #d97706; }
.gasoil-status.st-approved { background: #e3effb; color: #3b82f6; }
.gasoil-status.st-rejected { background: #fde6e6; color: #ef4444; }
.gasoil-status.st-progress { background: #f1e8fd; color: #8b5cf6; }
.gasoil-status.st-completed { background: #e6f7ee; color: #10b981; }
.gasoil-status.st-cancelled { background: #f1f5f9; color: #64748b; }

/* Row action buttons */
.gasoil-actions { display: flex; gap: 4px; }
.gasoil-mini-btn {
    border: 1px solid #e2e8f0; background: #fff; color: #64748b;
    width: 28px; height: 28px; border-radius: 7px; cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center; font-size: 12px;
}
.gasoil-mini-btn:hover { background: #f1f5f9; color: #0f172a; }
.gasoil-mini-btn.ok { color: #10b981; border-color: #a7f3d0; }
.gasoil-mini-btn.ok:hover { background: #e6f7ee; }
.gasoil-mini-btn.danger { color: #ef4444; border-color: #fecaca; }
.gasoil-mini-btn.danger:hover { background: #fde6e6; }

/* Detail overlay (voucher detail / dialogs) */
.gasoil-detail-overlay {
    position: fixed; inset: 0; z-index: 10001;
    background: rgba(15, 23, 42, 0.5);
    display: flex; align-items: center; justify-content: center; padding: 24px;
}
.gasoil-detail {
    background: #fff; border-radius: 14px; width: min(760px, 100%);
    max-height: calc(100vh - 60px); display: flex; flex-direction: column;
    box-shadow: 0 24px 64px rgba(15, 23, 42, 0.3); overflow: hidden;
}
.gasoil-form-dialog { width: min(680px, 100%); }
.gasoil-complete-dialog { width: min(560px, 100%); }
.gasoil-detail-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 18px; border-bottom: 1px solid #e2e8f0; font-weight: 700; font-size: 14.5px;
}
.gasoil-detail-body { padding: 16px 18px; overflow-y: auto; }
.gasoil-detail-actions {
    display: flex; gap: 8px; justify-content: flex-end;
    padding: 12px 18px; border-top: 1px solid #e2e8f0;
}
.gasoil-detail-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 10px 16px; margin-bottom: 6px;
}
.gasoil-detail-grid label {
    display: block; font-size: 11px; font-weight: 700; color: #94a3b8;
    text-transform: uppercase; letter-spacing: 0.4px; margin-bottom: 2px;
}
.gasoil-detail-grid > div > div { font-size: 13.5px; color: #0f172a; }
.gasoil-detail-section {
    font-size: 11.5px; font-weight: 800; color: #d97706;
    text-transform: uppercase; letter-spacing: 0.6px; margin: 14px 0 8px;
}
.gasoil-history { display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; color: #475569; }
.gasoil-history i { width: 16px; color: #94a3b8; }
.gasoil-notes { font-size: 13px; color: #475569; white-space: pre-wrap; }

.gasoil-complete-note { font-size: 13.5px; color: #475569; margin-top: 0; }
.gasoil-sensor-note {
    background: #e6f7ee; color: #065f46; border-radius: 10px;
    padding: 10px 12px; font-size: 12.5px; margin-top: 10px;
}
.gasoil-sensor-note.warn { background: #fef3e2; color: #92400e; }
.gasoil-computed { margin-top: 10px; font-size: 13px; color: #0f172a; }

/* Split view (clients) */
.gasoil-split { display: flex; gap: 18px; min-height: 0; height: 100%; }
.gasoil-split-left { width: 300px; flex-shrink: 0; overflow-y: auto; }
.gasoil-split-right { flex: 1; min-width: 0; overflow-y: auto; }
.gasoil-client-list { display: flex; flex-direction: column; gap: 6px; }
.gasoil-client-item {
    border: 1px solid #e2e8f0; border-radius: 10px; padding: 10px 14px;
    background: #fff; cursor: pointer;
}
.gasoil-client-item:hover { border-color: #fbbf24; }
.gasoil-client-item.active { border-color: #f59e0b; background: #fffbeb; }
.gasoil-client-name { font-weight: 700; font-size: 13.5px; color: #0f172a; }
.gasoil-client-meta { font-size: 11.5px; color: #94a3b8; margin-top: 2px; }
.gasoil-client-props { margin-bottom: 8px; }
.gasoil-toggle-label {
    display: inline-flex; align-items: center; gap: 8px;
    font-size: 13px; color: #475569; cursor: pointer;
}

/* Forms */
.gasoil-form-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px; margin-bottom: 12px;
}
.gasoil-form-grid label, .gasoil-full {
    display: flex; flex-direction: column; gap: 5px;
    font-size: 12px; font-weight: 600; color: #475569;
}
.gasoil-full { margin-bottom: 12px; }

/* Wizard */
.gasoil-wizard { max-width: 860px; margin: 0 auto; }
.gasoil-wizard-steps {
    display: flex; align-items: center; gap: 8px;
    margin-bottom: 22px; flex-wrap: wrap;
}
.gasoil-wstep {
    display: flex; align-items: center; gap: 8px;
    font-size: 13px; font-weight: 600; color: #94a3b8;
}
.gasoil-wstep-n {
    width: 26px; height: 26px; border-radius: 999px;
    background: #e2e8f0; color: #64748b;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 12px; font-weight: 800;
}
.gasoil-wstep.active { color: #0f172a; }
.gasoil-wstep.active .gasoil-wstep-n { background: #f59e0b; color: #fff; }
.gasoil-wstep.done { color: #10b981; }
.gasoil-wstep.done .gasoil-wstep-n { background: #e6f7ee; color: #10b981; }
.gasoil-wstep-line { flex: 1; min-width: 20px; height: 2px; background: #e2e8f0; }
.gasoil-wizard-body h3 { font-size: 15px; font-weight: 800; color: #0f172a; margin: 0 0 14px; }
.gasoil-wizard-nav {
    display: flex; justify-content: space-between; gap: 8px; margin-top: 18px;
}
.gasoil-wizard-summary {
    margin-top: 14px; padding: 10px 14px; border-radius: 10px;
    background: #f8fafc; border: 1px solid #e2e8f0; font-size: 12.5px; color: #475569;
}

.gasoil-choice-row { display: flex; gap: 8px; }
.gasoil-choice {
    flex: 1; border: 1.5px solid #e2e8f0; border-radius: 10px;
    background: #fff; padding: 12px; font-size: 13.5px; font-weight: 700;
    color: #475569; cursor: pointer;
}
.gasoil-choice.sm { padding: 8px; font-size: 12.5px; }
.gasoil-choice:hover { border-color: #fbbf24; }
.gasoil-choice.active { border-color: #f59e0b; background: #fffbeb; color: #d97706; }

.gasoil-route-info {
    display: flex; gap: 16px; flex-wrap: wrap;
    padding: 10px 14px; border-radius: 10px; font-size: 12.5px;
    background: #fef3e2; color: #92400e; margin-top: 10px;
}
.gasoil-warn-box {
    background: #fde6e6; color: #991b1b; border-radius: 10px;
    padding: 12px 14px; font-size: 13px; margin-top: 12px;
}
.gasoil-ok-box {
    background: #e6f7ee; color: #065f46; border-radius: 10px;
    padding: 10px 14px; font-size: 13px; margin-top: 12px;
}
.gasoil-info-box {
    background: #e3effb; color: #1e40af; border-radius: 10px;
    padding: 10px 14px; font-size: 13px; margin-top: 8px;
}

/* Stat cards */
.gasoil-stat-cards {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 12px; margin-bottom: 16px;
}
.gasoil-stat {
    border: 1px solid #e2e8f0; border-radius: 12px; padding: 14px 16px;
    background: #fff;
}
.gasoil-stat-val { font-size: 19px; font-weight: 800; color: #0f172a; }
.gasoil-stat-lbl { font-size: 11px; color: #64748b; margin-top: 4px; text-transform: uppercase; letter-spacing: 0.4px; }

/* Print row in voucher detail */
.gasoil-detail-print {
    display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
    padding: 10px 18px; border-top: 1px solid #e2e8f0; background: #f8fafc;
}
.gasoil-print-label { font-size: 12px; font-weight: 700; color: #64748b; margin-right: 4px; }
.gasoil-print-btn {
    border: 1px solid #cbd5e1; background: #fff; color: #0f172a;
    padding: 6px 11px; border-radius: 8px; font-size: 12px; font-weight: 600;
    cursor: pointer; display: inline-flex; align-items: center; gap: 5px;
}
.gasoil-print-btn:hover { background: #fef3e2; border-color: #f59e0b; }
.gasoil-print-btn:disabled { opacity: 0.45; cursor: default; }
.gasoil-print-btn:disabled:hover { background: #fff; border-color: #cbd5e1; }
body.theme-dark .gasoil-detail-print { background: #1e293b; border-color: #334155; }
body.theme-dark .gasoil-print-btn { background: #0f172a; border-color: #475569; color: #f1f5f9; }

/* Empty / misc */
.gasoil-empty { text-align: center; color: #94a3b8; padding: 40px 12px; font-size: 13.5px; }
.gasoil-empty i { display: block; font-size: 26px; margin-bottom: 8px; }
.gasoil-empty.error { color: #ef4444; }

/* Toast */
.gasoil-toast {
    position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%) translateY(20px);
    background: #0f172a; color: #fff; padding: 11px 20px; border-radius: 10px;
    font-size: 13.5px; font-weight: 600; z-index: 10002; opacity: 0;
    transition: opacity 0.25s, transform 0.25s; pointer-events: none;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.3);
}
.gasoil-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.gasoil-toast.error { background: #ef4444; }

/* ── Print documents (A5) ─────────────────────────────────────── */
#gasoilPrintHost { display: none; }

@media print {
    body.gasoil-printing > *:not(#gasoilPrintHost) { display: none !important; }
    body.gasoil-printing #gasoilPrintHost { display: block !important; }

    /* @page size/orientation/margin injected per-template by gasoil-print.js */

    .gp-doc { font-family: Arial, Helvetica, sans-serif; color: #000; font-size: 10.5px; }
    .gp-title { font-size: 16px; font-weight: 800; text-align: center; margin-bottom: 8px; text-transform: uppercase; }
    .gp-title-sm { font-size: 13px; font-weight: 800; text-align: center; margin-bottom: 6px; }
    .gp-head-row { display: flex; justify-content: space-between; font-size: 10.5px; margin-bottom: 6px; }
    .gp-info { width: 100%; border-collapse: collapse; margin-bottom: 8px; }
    .gp-info td { padding: 2.5px 4px; font-size: 10.5px; vertical-align: top; }
    .gp-k { font-weight: 800; white-space: nowrap; color: #000; }
    .gp-load { width: 100%; border-collapse: collapse; margin-bottom: 6px; }
    .gp-load td { border: 1px solid #000; height: 22px; padding: 2px 4px; }
    .gp-load-k { font-weight: 700; width: 18%; white-space: nowrap; }
    .gp-comment-row { margin: 6px 0; font-size: 10.5px; }
    .gp-line { border-bottom: 1px solid #000; height: 14px; margin-top: 2px; }
    .gp-exp { width: 100%; border-collapse: collapse; margin: 6px 0; }
    .gp-exp th, .gp-exp td { border: 1px solid #000; padding: 3px 3px; font-size: 8.5px; text-align: center; }
    .gp-exp th { background: #eee; font-weight: 800; }
    .gp-exp td.gp-k { text-align: left; }
    .gp-total { font-weight: 800; white-space: nowrap; }
    .gp-fuel { width: 100%; border-collapse: collapse; margin: 6px 0; }
    .gp-fuel th, .gp-fuel td { border: 1px solid #000; padding: 4px; font-size: 10px; text-align: center; }
    .gp-fuel th { background: #eee; font-weight: 800; }
    .gp-foot-row { margin-top: 8px; font-size: 10.5px; }
    .gp-sig-row { display: flex; gap: 24px; margin-top: 14px; }
    .gp-sig-row.single { justify-content: flex-end; }
    .gp-sig-row > div { flex: 1; font-size: 10px; }
    .gp-sig-line { border-bottom: 1px solid #000; height: 22px; margin-top: 4px; }
    .gp-receipt { padding-bottom: 8px; }
    .gp-cut-line {
        border-top: 1.5px dashed #000; margin: 10px 0; position: relative; text-align: center;
    }
    .gp-cut-line i { background: #fff; padding: 0 8px; position: relative; top: -8px; }
    .gp-custom-head { text-align: center; font-weight: 800; font-size: 12px; margin-bottom: 6px; text-transform: uppercase; }
    .gp-custom-foot { margin-top: 10px; font-size: 9.5px; text-align: center; color: #333; }
    .gp-custom { font-size: 11px; }
}

/* Screen preview of print docs (optional debugging) */
#gasoilPrintHost:not(:empty) { /* stays hidden on screen */ }

/* Dark theme */
body.theme-dark .gasoil-app { background: #0f172a; }
body.theme-dark .gasoil-appbar, body.theme-dark .gasoil-sidemenu { background: #1e293b; border-color: #334155; }
body.theme-dark .gasoil-appbar-title, body.theme-dark .gasoil-view-head h2,
body.theme-dark .gasoil-wizard-body h3, body.theme-dark .gasoil-stat-val,
body.theme-dark .gasoil-client-name, body.theme-dark .gasoil-table td,
body.theme-dark .gasoil-detail-grid > div > div { color: #f1f5f9; }
body.theme-dark .gasoil-search, body.theme-dark .gasoil-input,
body.theme-dark .gasoil-btn, body.theme-dark .gasoil-mini-btn,
body.theme-dark .gasoil-choice, body.theme-dark .gasoil-stat,
body.theme-dark .gasoil-client-item, body.theme-dark .gasoil-table-wrap,
body.theme-dark .gasoil-detail { background: #0f172a; border-color: #334155; color: #f1f5f9; }
body.theme-dark .gasoil-side-item { color: #94a3b8; }
body.theme-dark .gasoil-side-item.active { background: #292208; color: #fbbf24; }
body.theme-dark .gasoil-table th { background: #1e293b; border-color: #334155; color: #94a3b8; }
body.theme-dark .gasoil-vrow:hover td { background: #292208; }
body.theme-dark .gasoil-client-item.active, body.theme-dark .gasoil-choice.active { background: #292208; }
body.theme-dark .gasoil-detail-head, body.theme-dark .gasoil-detail-actions { border-color: #334155; }
body.theme-dark .gasoil-wizard-summary { background: #1e293b; border-color: #334155; }

@media (max-width: 720px) {
    .gasoil-content { padding: 14px; }
    .gasoil-split { flex-direction: column; }
    .gasoil-split-left { width: 100%; }
    .gasoil-side-item span { display: none; }
    .gasoil-sidemenu { width: 56px; }
    .gasoil-detail-overlay { padding: 8px; }
}
