:root {
    --navy-950: #040b24;
    --navy-900: #091637;
    --navy-850: #112349;
    --blue-600: #2f66e7;
    --blue-500: #3b82f6;
    --ink-900: #1b2538;
    --ink-700: #5f6f88;
    --ink-500: #8fa0ba;
    --bg-page: #f3f6fb;
    --card-bg: #ffffff;
    --line: #e1e8f3;
    --success: #14b37d;
    --warning: #d97706;
    --danger: #ef4444;
    --info: #2563eb;
    --purple: #8b5cf6;
    --radius-lg: 16px;
    --radius-md: 12px;
    --radius-sm: 8px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    color: var(--ink-900);
    background: var(--bg-page);
}

body.theme-dark {
    --bg-page: #0a1328;
    --card-bg: #101d38;
    --line: #25365b;
    --ink-900: #e3ecff;
    --ink-700: #b8c6e3;
    --ink-500: #9fb0d0;
    color: var(--ink-900);
    background: var(--bg-page);
}

body.theme-dark .app-topbar,
body.theme-dark .module-card,
body.theme-dark .modal-content,
body.theme-dark .auth-card,
body.theme-dark .notify-dropdown {
    background: var(--card-bg);
    border-color: var(--line);
    color: var(--ink-900);
}

body.theme-dark .app-content {
    background: var(--bg-page);
}

body.theme-dark .form-control,
body.theme-dark .form-select,
body.theme-dark .btn-light,
body.theme-dark .icon-btn,
body.theme-dark .table {
    background-color: #0e1a33;
    border-color: #2e4470;
    color: #dbe7ff;
}

body.theme-dark .btn-light:hover,
body.theme-dark .icon-btn:hover {
    background-color: #15264a;
}

body.theme-dark .page-title,
body.theme-dark .section-title,
body.theme-dark .module-header h3,
body.theme-dark .topbar-left h1,
body.theme-dark .profile-text strong,
body.theme-dark .table-link {
    color: #e8efff;
}

body.theme-dark .page-subtitle,
body.theme-dark .muted,
body.theme-dark .profile-text small,
body.theme-dark .module-header p,
body.theme-dark small.muted {
    color: #9db0d3;
}

a {
    color: inherit;
}

.form-control,
.form-select {
    border: 1px solid #d2dae8;
    border-radius: 10px;
    height: 44px;
}

.form-control:focus,
.form-select:focus {
    border-color: #8db0ff;
    box-shadow: 0 0 0 0.2rem rgba(59, 130, 246, 0.16);
}

.btn {
    border-radius: 10px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 600;
}

.btn-primary {
    background: var(--blue-600);
    border-color: var(--blue-600);
}

.btn-primary:hover {
    background: #1f56d8;
    border-color: #1f56d8;
}

.btn-light {
    background: #f8fafc;
    border: 1px solid #dae4f2;
    color: #334155;
}

.btn-success {
    background: #0da873;
    border-color: #0da873;
}

.btn-warning {
    background: #c57b0d;
    border-color: #c57b0d;
    color: #fff;
}

.btn-danger {
    background: #dc2626;
    border-color: #dc2626;
}

.app-body {
    min-height: 100vh;
}

.app-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 290px 1fr;
}

.app-sidebar {
    background: linear-gradient(180deg, var(--navy-900), var(--navy-950));
    color: #e5ecff;
    display: flex;
    flex-direction: column;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.brand-box {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    padding: 20px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.brand-icon {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--blue-600);
    color: #fff;
    font-size: 18px;
}

.brand-text {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 0.1px;
}

.brand-logo-img {
    width: 330px;
    height: 60px;
    object-fit: contain;
    border-radius: 6px;
    background: #fff;
    padding: 2px 6px;
}

.brand-fav-img {
    width: 26px;
    height: 26px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.25);
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 14px 12px;
    overflow-y: auto;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    text-decoration: none;
    border-radius: 10px;
    color: #d3def6;
    font-size: 16px;
    font-weight: 500;
}

.sidebar-link i {
    width: 18px;
    text-align: center;
}

.sidebar-link:hover,
.sidebar-link.active {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.sidebar-collapse-btn {
    margin: auto 12px 16px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(28, 44, 85, 0.75);
    color: #e9f0ff;
    border-radius: 8px;
    height: 38px;
}

.sidebar-logout-form {
    margin: 0 12px 16px;
}

.sidebar-logout-btn {
    width: 100%;
    height: 38px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: rgba(255, 255, 255, 0.08);
    color: #f3f7ff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 600;
}

.sidebar-logout-btn:hover {
    background: rgba(255, 255, 255, 0.14);
}

.app-main {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.app-topbar {
    background: #fff;
    border-bottom: 1px solid var(--line);
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.topbar-left h1 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: #1e293b;
}

.topbar-tags {
    display: flex;
    gap: 10px;
    margin-top: 0;
}

.tag-pill {
    border-radius: 999px;
    padding: 5px 12px;
    font-size: 12px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.tag-shift {
    background: #e8f0ff;
    color: #245ed7;
}

.tag-cctv {
    color: #475569;
}

.tag-cctv i {
    color: var(--success);
}

.tag-date {
    background: #eef3ff;
    color: #415175;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.mobile-nav-toggle {
    display: none;
}

.icon-btn {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: #fff;
    color: #556781;
}

.station-switch select {
    min-width: 240px;
    height: 38px;
    font-size: 13px;
}

.language-switch {
    margin: 0;
}

.language-switch .form-select {
    min-width: 148px;
    height: 38px;
    font-size: 13px;
}

.profile-pill {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-left: 12px;
    border-left: 1px solid var(--line);
}

.profile-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.profile-text strong {
    font-size: 13px;
}

.profile-text small {
    color: var(--ink-500);
    font-weight: 600;
    letter-spacing: 0.05em;
    font-size: 11px;
}

.profile-avatar {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: linear-gradient(160deg, #0b122f, #23345e);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 12px;
}

.profile-chevron {
    color: #8ea0ba;
    font-size: 12px;
}

.notify-btn {
    position: relative;
}

.notify-dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: #ef4444;
    border: 2px solid #fff;
    position: absolute;
    right: 8px;
    top: 7px;
}

.app-content {
    padding: 20px;
}

.app-developed-by {
    display: flex;
    align-items: center;
    justify-content:center;
    gap: 6px;
    padding: 0 20px 16px;
    font-size: 13px;
    color: #6e819d;
}

.app-developed-by a {
    color: #2f66e7;
    font-weight: 600;
    text-decoration: none;
}

.app-developed-by a:hover {
    text-decoration: underline;
}

.app-alert {
    border-radius: 10px;
    margin-bottom: 14px;
}

.page-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 14px;
}

.page-title {
    margin: 0;
    font-size: 28px;
    font-weight: 700;
    color: #192338;
}

.page-subtitle {
    margin: 6px 0 0;
    color: #6a7c97;
    font-size: 15px;
}

.page-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.module-card {
    background: var(--card-bg);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: 0 1px 0 rgba(15, 23, 42, 0.02);
}

.module-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--line);
}

.module-header h3 {
    margin: 0;
    font-size: 20px;
    color: #2a364d;
    font-weight: 700;
}

.module-header p {
    margin: 4px 0 0;
    color: #7b8ca6;
    font-size: 14px;
}

.module-header-inline {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.module-body {
    padding: 18px 20px;
}

.stack-gap {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.stat-grid {
    display: grid;
    gap: 12px;
}

.stat-grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.stat-grid-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.stat-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 14px;
    display: grid;
    gap: 6px;
}

.stat-card .icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
}

.bg-green { background: #10b981; }
.bg-blue { background: #3b82f6; }
.bg-amber { background: #f59e0b; }
.bg-purple { background: #8b5cf6; }

.stat-card .label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #7c8ca4;
    font-weight: 700;
}

.stat-card .value {
    font-size: 24px;
    font-weight: 800;
    color: #172033;
}

.stat-card .value.success,
.success { color: #089267; }

.stat-card .value.warning,
.warning { color: #cc7a08; }

.stat-card .value.danger,
.danger { color: #dc2626; }

.stat-card .value.info,
.info { color: #2563eb; }

.highlight-danger {
    border-color: #f5c8c8;
    background: #fff8f8;
}

.panel-grid {
    display: grid;
    gap: 12px;
}

.panel-grid-main {
    grid-template-columns: 2.2fr 1fr;
}

.panel-grid-equal {
    grid-template-columns: 1fr 1fr;
}

.chart-area {
    min-height: 330px;
}

.notice-item {
    border: 1px solid var(--line);
    border-left: 4px solid #94a3b8;
    border-radius: 10px;
    padding: 12px;
}

.notice-item h4 {
    margin: 0 0 4px;
    font-size: 17px;
}

.notice-item p {
    margin: 0;
    color: #5c6e89;
    font-size: 14px;
}

.notice-item small {
    color: #8da0ba;
    font-size: 12px;
}

.notice-item.critical { border-left-color: #ef4444; }
.notice-item.warning { border-left-color: #d97706; }
.notice-item.info { border-left-color: #3b82f6; }

.pump-mini-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.pump-mini-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 12px;
}

.pump-mini-card h4 {
    margin: 0;
    font-size: 18px;
}

.pump-mini-card strong {
    font-size: 28px;
    margin-right: 4px;
}

.pump-mini-card small {
    color: #8ca0bb;
}

.muted-title {
    color: #6f82a0;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 12px;
    font-weight: 700;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    display: inline-block;
}

.status-dot.success { background: #10b981; }
.status-dot.warning { background: #f59e0b; }
.status-dot.danger { background: #ef4444; }

.app-progress {
    height: 10px;
    background: #edf2fa;
    border-radius: 999px;
}

.progress-bar.success,
.status-pill.success { background: #dcfce7; color: #0a8f63; }

.progress-bar.warning,
.status-pill.warning { background: #fff4db; color: #c67a05; }

.progress-bar.danger,
.status-pill.danger { background: #ffe4e4; color: #d33b3b; }

.progress-bar.info,
.status-pill.info { background: #e6efff; color: #245ed7; }

.status-pill.neutral {
    background: #f1f5f9;
    color: #5b6b84;
}

.status-pill {
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 10px;
    display: inline-flex;
    align-items: center;
}

.muted,
small.muted {
    color: #7d8da7;
}

.app-table {
    margin: 0;
    --bs-table-bg: transparent;
    --bs-table-striped-bg: #f8fbff;
    --bs-table-hover-bg: #f4f8ff;
}

.app-table thead th {
    border-top: 0;
    border-bottom: 1px solid var(--line);
    color: #60708a;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-size: 12px;
    font-weight: 700;
    padding: 12px;
}

.app-table tbody td {
    border-color: #e8eef7;
    padding: 12px;
    vertical-align: middle;
}

.panel {
    background: var(--card-bg);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 16px;
}

.panel-title {
    margin: 0 0 12px;
    font-size: 18px;
    font-weight: 700;
    color: #2a364d;
}

.table.table-tight {
    margin: 0;
    --bs-table-bg: transparent;
    --bs-table-striped-bg: #f8fbff;
    --bs-table-hover-bg: #f4f8ff;
}

.table.table-tight thead th {
    border-top: 0;
    border-bottom: 1px solid var(--line);
    color: #60708a;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-size: 12px;
    font-weight: 700;
    padding: 10px;
}

.table.table-tight tbody td {
    border-color: #e8eef7;
    color: #1f2d45;
    padding: 10px;
    vertical-align: middle;
}

.table-link {
    color: #2f66e7;
    font-weight: 600;
    text-decoration: none;
}

.table-footer {
    color: #62728c;
    padding: 10px 4px 4px;
}

.totals-row td {
    background: #f3f7fc;
}

.settings-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 12px;
    align-items: start;
}

.settings-nav .module-body {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.settings-link {
    text-decoration: none;
    border-radius: 9px;
    padding: 9px 10px;
    color: #425570;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}

.settings-link.active,
.settings-link:hover {
    background: #edf3ff;
    color: #245ed7;
}

.toggle-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 10px 12px;
    background: #fbfdff;
    gap: 10px;
}

.toggle-row small {
    color: #7b8ca6;
}

.threshold-input {
    width: 64px;
    height: 36px;
    border: 1px solid #ccd6e8;
    border-radius: 8px;
    text-align: center;
}

.report-filter-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    width:1000px;
}

.reports-layout {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 12px;
}

.report-item {
    border: 1px solid #dce6f2;
    border-radius: 12px;
    padding: 12px;
    text-decoration: none;
    display: grid;
    grid-template-columns: 40px 1fr auto;
    gap: 10px;
    align-items: center;
    color: #28364c;
}

.report-item strong {
    display: block;
    font-size: 16px;
}

.report-item small {
    color: #7c8ca4;
    font-size: 13px;
}

.report-item.active,
.report-item:hover {
    border-color: #2f66e7;
    background: #eef4ff;
}

.report-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: #e9f1ff;
    color: #265fe0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.report-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.summary-box {
    border-radius: 10px;
    padding: 12px;
    border: 1px solid var(--line);
}

.summary-box span {
    color: #61728e;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.summary-box strong {
    display: block;
    font-size: 30px;
    margin-top: 4px;
}

.summary-box.green { background: #ecfdf5; }
.summary-box.blue { background: #eff6ff; }
.summary-box.amber { background: #fffbeb; }
.summary-box.neutral { background: #f8fafc; }

.alert-banner {
    border-radius: 12px;
    padding: 12px 14px;
    border: 1px solid;
}

.alert-banner h4 {
    margin: 0 0 4px;
    font-size: 17px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.alert-banner p {
    margin: 0;
}

.alert-banner.danger {
    background: #fff3f3;
    border-color: #f7c8c8;
    color: #af2b2b;
}

.alert-banner.warning {
    background: #fffaeb;
    border-color: #f2dea4;
    color: #9f6600;
}

.workflow-row {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
}

.workflow-row.compact {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.workflow-step {
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 12px;
    text-align: center;
    color: #7f8ea6;
}

.workflow-step span {
    width: 36px;
    height: 36px;
    border-radius: 999px;
    border: 2px solid #d3deef;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
    font-weight: 700;
}

.workflow-step strong {
    display: block;
    color: #2d3b51;
}

.workflow-step small {
    color: #8da0b9;
}

.workflow-step.active span {
    border-color: var(--blue-600);
    color: var(--blue-600);
}

.workflow-step.done span {
    border-color: var(--success);
    background: #d1fae5;
    color: var(--success);
}

.customer-grid,
.invoice-grid,
.shift-summary-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.customer-grid span,
.invoice-grid span,
.shift-summary-grid span {
    color: #7386a3;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 12px;
    font-weight: 700;
}

.customer-grid strong,
.invoice-grid strong,
.shift-summary-grid strong {
    display: block;
    margin-top: 3px;
    font-size: 20px;
}

.customer-grid small,
.shift-summary-grid small {
    color: #8799b3;
}

.invoice-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--line);
    padding-top: 10px;
}

.invoice-total span {
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #5f7088;
    font-weight: 700;
}

.invoice-total strong {
    color: #0a9669;
    font-size: 38px;
}

.pump-badge {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: #ecf2ff;
    color: #2f66e7;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.summary-list div {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--line);
}

.summary-list div.total {
    border-bottom: 0;
    padding-top: 16px;
}

.pay-chip {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 10px;
    padding: 12px;
}

.pay-chip span {
    display: inline-flex;
    gap: 8px;
    align-items: center;
    font-weight: 600;
}

.pay-chip.cash { background: #e8faf1; }
.pay-chip.mobile { background: #f3edff; }
.pay-chip.card { background: #e9f0ff; }

.tank-cards {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.tank-card {
    border-radius: 14px;
    border: 1px solid var(--line);
    background: #fff;
    padding: 14px;
}

.tank-card header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.tank-card h3 {
    margin: 0;
    font-size: 24px;
}

.tank-card.success { border-color: #ccefdc; }
.tank-card.warning { border-color: #f5dda6; }
.tank-card.danger { border-color: #f5c4c4; }

.tank-metrics {
    display: grid;
    gap: 6px;
}

.tank-metrics div {
    display: flex;
    justify-content: space-between;
}

.formula-box {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8fbff;
    padding: 10px;
    color: #5a6b85;
    font-size: 13px;
}

.pump-live-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.pump-live-card {
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 12px;
}

.pump-live-card header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.pump-live-card h4 {
    margin: 0;
    font-size: 24px;
}

.pump-live-card .line {
    display: flex;
    justify-content: space-between;
    margin-top: 5px;
}

.section-title {
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-size: 18px;
    margin-bottom: 8px;
    color: #39495f;
    font-weight: 800;
}

.total-line {
    display: flex;
    justify-content: space-between;
    border-top: 1px solid var(--line);
    padding-top: 10px;
    text-transform: uppercase;
    font-weight: 700;
}

.tank-dip-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.tank-dip-grid label,
.summary-list label {
    display: grid;
    gap: 6px;
    color: #6d7e99;
    font-weight: 600;
}

.recon-box {
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 12px;
    background: #fcfdff;
}

.recon-box h5 {
    margin-top: 0;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-size: 16px;
}

.recon-box div {
    display: flex;
    justify-content: space-between;
    margin-bottom: 6px;
}

.signature-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.signature-box {
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 10px;
}

.signature-box h6 {
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-size: 12px;
    color: #6f829f;
}

.signature-area {
    height: 84px;
    border: 1px dashed #c9d5e9;
    border-radius: 8px;
    display: grid;
    place-items: center;
    color: #94a4bd;
    margin: 8px 0;
}

.auth-page {
    min-height: 100vh;
    background: radial-gradient(circle at 15% 50%, #071130, #0a173f 45%, #14284f);
    display: grid;
    place-items: center;
    padding: 18px;
}

.auth-wrap {
    width: min(400px, 96vw);
}

.auth-card {
    border-radius: 20px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 22px 55px rgba(5, 12, 38, 0.35);
}

.auth-card-register {
    width: min(660px, 96vw);
}

.auth-brand-panel {
    background: #2f66e7;
    color: #fff;
    text-align: center;
    padding: 22px 18px;
}

.auth-brand-icon {
    width: 74px;
    height: 74px;
    border-radius: 999px;
    background: #fff;
    color: #2f66e7;
    margin: 0 auto 10px;
    display: grid;
    place-items: center;
    font-size: 34px;
}

.auth-brand-panel h1 {
    margin: 0;
    font-size: 38px;
    font-weight: 800;
}

.auth-brand-panel p {
    margin: 6px 0 0;
    opacity: 0.95;
    font-size: 17px;
}

.auth-form-panel {
    padding: 26px 28px 22px;
}

.auth-form-panel h2 {
    text-align: center;
    font-size: 30px;
    margin: 0;
    font-weight: 800;
}

.auth-form-panel > p {
    text-align: center;
    color: #657793;
    margin: 8px 0 14px;
}

.auth-form {
    display: grid;
    gap: 10px;
}

.auth-label {
    font-weight: 700;
    color: #2f3d54;
    margin-bottom: 2px;
}

.auth-input-wrap {
    position: relative;
}

.auth-input-wrap .bi {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #90a1bb;
}

.auth-input-wrap input {
    padding-left: 40px;
}

.auth-input-wrap.has-toggle input {
    padding-right: 42px;
}

.auth-toggle {
    position: absolute;
    right: 8px;
    top: 7px;
    border: 0;
    background: transparent;
    color: #8ea1bb;
    width: 30px;
    height: 30px;
}

.auth-meta-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #5f6f88;
    margin-top: 2px;
}

.auth-link {
    text-decoration: none;
    color: #2f66e7;
}

.auth-submit {
    width: 100%;
    height: 46px;
    font-size: 20px;
}

.auth-divider {
    margin: 14px 0;
    text-align: center;
    position: relative;
    color: #6f809a;
}

.auth-divider:before,
.auth-divider:after {
    content: "";
    position: absolute;
    top: 50%;
    width: 37%;
    border-top: 1px solid #d9e2f0;
}

.auth-divider:before { left: 0; }
.auth-divider:after { right: 0; }

.auth-socials {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.auth-socials .btn {
    border: 1px solid #d5dfee;
    background: #fff;
}

.auth-bottom-text {
    text-align: center;
    margin: 14px 0 0;
    color: #5f718b;
}

.auth-footer {
    text-align: center;
    margin-top: 16px;
    color: #000;
    font-size: 14px;
}
body.theme-dark .auth-footer {
    text-align: center;
    margin-top: 16px;
    color: #9fb0ca;
    font-size: 14px;
}

.auth-footer a,
.maintenance-footer a {
    color: #c5d6ff;
    font-weight: 600;
    text-decoration: none;
}

.auth-footer a:hover,
.maintenance-footer a:hover {
    text-decoration: underline;
}

.perm-tag {
    width: 22px;
    height: 22px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.perm-tag.full { color: #0a8f63; }
.perm-tag.view { color: #d07a06; }
.perm-tag.none { color: #dd3e3e; }

.perm-legend {
    display: flex;
    gap: 16px;
    color: #667990;
    margin-top: 8px;
}

.compliance-item,
.compliance-row,
.deadline-item,
.deadline-compact {
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.compliance-item h4,
.compliance-row h4,
.deadline-item h4,
.deadline-compact h4 {
    margin: 0;
    font-size: 22px;
}

.compliance-item p,
.compliance-row p,
.deadline-item p,
.deadline-compact p {
    margin: 2px 0;
    color: #687a95;
}

.compliance-item strong,
.deadline-item strong,
.deadline-compact strong {
    font-size: 18px;
}

.compliance-item.success,
.compliance-row.success { background: #ecfdf5; border-color: #c8edd9; }
.compliance-item.warning,
.compliance-row.warning { background: #fffbeb; border-color: #f4deb0; }
.compliance-item.danger,
.compliance-row.danger { background: #fff1f1; border-color: #f4cbcb; }
.compliance-item.info,
.compliance-row.info { background: #eef4ff; border-color: #d4e2ff; }

.state-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: #10b981;
}

.compliance-item.warning .state-dot { background: #d97706; }
.compliance-item.danger .state-dot { background: #ef4444; }

.date-chip {
    width: 56px;
    height: 56px;
    border-radius: 8px;
    background: #f2f5fc;
    color: #4f607a;
    display: grid;
    place-items: center;
    text-align: center;
}

.date-chip span {
    font-size: 11px;
    font-weight: 700;
}

.date-chip strong {
    font-size: 20px;
}

.deadline-item.danger,
.deadline-compact.danger {
    border-color: #f2bcbc;
    background: #fff1f1;
}

.deadline-item.warning,
.deadline-compact.warning {
    border-color: #f0dda9;
    background: #fffaeb;
}

.deadline-item.info,
.deadline-compact.info {
    border-color: #cfdfff;
    background: #eff4ff;
}

.deadline-item.neutral,
.deadline-compact.neutral {
    border-color: #dde7f3;
    background: #f8fafd;
}

.badge-round {
    width: 36px;
    height: 36px;
    border-radius: 999px;
    background: #eef3ff;
    color: #3b82f6;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.toggle-field {
    border: 1px solid var(--line);
    border-radius: 10px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 10px;
}

.crumb-nav {
    color: #6f809a;
    font-size: 15px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.crumb-nav .bi {
    font-size: 11px;
    color: #94a3b8;
}

.deposit-slip-preview {
    min-height: 450px;
    border: 1px solid #d8e1ef;
    border-radius: 12px;
    background: #f7f9fc;
    display: grid;
    place-items: center;
    text-align: center;
}

.deposit-slip-icon {
    font-size: 56px;
    color: #98a7bc;
}

.deposit-slip-preview h4 {
    margin: 8px 0 2px;
    font-size: 22px;
}

.deposit-slip-preview p {
    color: #73859f;
    margin-bottom: 12px;
}

.deposit-meta-grid {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.deposit-meta-grid article {
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #f8fbff;
    padding: 10px;
}

.deposit-meta-grid span {
    display: block;
    color: #6d7f9a;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-size: 12px;
    font-weight: 700;
}

.deposit-meta-grid strong {
    font-size: 18px;
}

.deposit-timeline {
    display: grid;
    gap: 14px;
    position: relative;
}

.deposit-timeline:before {
    content: "";
    position: absolute;
    left: 17px;
    top: 4px;
    bottom: 4px;
    width: 2px;
    background: #dfE8F6;
}

.deposit-timeline-item {
    display: grid;
    grid-template-columns: 34px 1fr;
    gap: 10px;
    position: relative;
}

.deposit-timeline-item .dot {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    position: relative;
    z-index: 1;
}

.deposit-timeline-item .dot.info { background: #3b82f6; }
.deposit-timeline-item .dot.success { background: #10b981; }
.deposit-timeline-item .dot.warning { background: #f59e0b; }
.deposit-timeline-item .dot.purple { background: #8b5cf6; }

.deposit-timeline-item h4 {
    margin: 0;
    font-size: 18px;
}

.deposit-timeline-item p {
    margin: 2px 0;
    color: #64748b;
}

.deposit-timeline-item small {
    color: #8799b2;
}

.dropzone-box {
    border: 2px dashed #c7d7ee;
    border-radius: 12px;
    padding: 28px;
    text-align: center;
    display: grid;
    gap: 8px;
    background: #f9fbff;
}

.dropzone-box i {
    font-size: 40px;
    color: #97abc9;
}

.dropzone-box h4 {
    margin: 0;
    font-size: 30px;
    color: #334155;
}

.dropzone-box p {
    margin: 0;
    color: #677995;
    font-size: 18px;
}

.dropzone-box small {
    color: #8fa0b8;
}

.file-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid var(--line);
    background: #f8fafd;
    border-radius: 10px;
    padding: 10px 12px;
    gap: 10px;
}

.file-meta {
    display: flex;
    align-items: center;
    gap: 10px;
}

.file-meta i {
    font-size: 20px;
}

.file-meta strong {
    display: block;
    font-size: 18px;
}

.file-meta p {
    margin: 0;
    color: #70839e;
}

.table-link.danger {
    color: #dc2626;
}

.compliance-history {
    display: grid;
    gap: 14px;
}

.history-row {
    display: grid;
    grid-template-columns: 38px 1fr auto;
    gap: 12px;
    align-items: start;
}

.history-icon {
    width: 38px;
    height: 38px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.history-icon.info { background: #e8f0ff; color: #2563eb; }
.history-icon.warning { background: #fff4db; color: #c67a05; }
.history-icon.success { background: #dcfce7; color: #0a8f63; }
.history-icon.danger { background: #ffe4e4; color: #d33b3b; }

.history-copy h4 {
    margin: 0;
    font-size: 20px;
}

.history-copy p {
    margin: 2px 0;
    color: #5f7088;
    font-size: 15px;
}

.history-copy small {
    color: #7f8fa8;
    font-size: 13px;
}

.history-date {
    color: #70839f;
    white-space: nowrap;
    font-size: 14px;
}

.profile-split {
    display: grid;
    grid-template-columns: 360px 1fr;
    overflow: hidden;
}

.profile-summary {
    border-right: 1px solid var(--line);
    padding: 24px;
    text-align: center;
    background: #fbfdff;
}

.profile-photo {
    width: 108px;
    height: 108px;
    border-radius: 999px;
    background: linear-gradient(150deg, #0b1f45, #3d6ad6);
    color: #fff;
    margin: 0 auto 12px;
    display: grid;
    place-items: center;
    font-size: 34px;
    font-weight: 800;
    position: relative;
}

.profile-photo-edit {
    width: 40px;
    height: 40px;
    border-radius: 999px;
    border: 2px solid #fff;
    background: #2f66e7;
    color: #fff;
    position: absolute;
    right: -4px;
    bottom: 0;
}

.profile-summary h3 {
    margin: 0 0 8px;
    font-size: 38px;
}

.profile-summary .status-pill {
    margin: 4px 2px;
}

.profile-contact {
    margin-top: 18px;
    border-top: 1px solid var(--line);
    padding-top: 12px;
    text-align: left;
}

.profile-contact p {
    margin: 6px 0;
    color: #4f627d;
    display: flex;
    gap: 10px;
    align-items: center;
    font-size: 14px;
}

.profile-form-wrap {
    padding: 20px 24px;
}

.profile-form-actions {
    margin-top: 6px;
    border-top: 1px solid var(--line);
    padding-top: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.password-strength {
    height: 8px;
    border-radius: 999px;
    overflow: hidden;
    background: #e8eef8;
}

.password-strength .bar {
    height: 100%;
    border-radius: 999px;
    background: #eab308;
}

.twofa-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.twofa-row h4 {
    margin: 0;
    font-size: 24px;
}

.twofa-row p {
    margin: 4px 0 0;
    color: #677994;
}

.session-list-card {
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.session-list-card.current {
    border-color: #c8edd9;
    background: #ecfdf5;
}

.session-device p,
.session-device small {
    margin: 0;
    color: #64748b;
}

.session-table tbody tr.current {
    background: #eff6ff;
}

.tips-list {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 8px;
}

.tips-list li {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #4f627d;
}

.master-filter-row {
    display: grid;
    grid-template-columns: 1fr 180px 180px;
    gap: 10px;
}

.search-field {
    position: relative;
}

.search-field i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #8ea0ba;
}

.search-field .form-control {
    padding-left: 38px;
}

.master-entity {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
}

.master-entity i {
    font-size: 18px;
}

.pagination-lite {
    display: flex;
    gap: 6px;
}

.health-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.health-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.health-title h3 {
    margin: 0;
    font-size: 20px;
}

.health-rows {
    display: grid;
    gap: 6px;
}

.health-rows div {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 15px;
}

.health-rows span {
    color: #546784;
}

.health-note {
    border-top: 1px solid var(--line);
    margin: 10px 0 0;
    padding-top: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.metric-item {
    text-align: center;
}

.metric-item strong {
    display: block;
    font-size: 42px;
    line-height: 1.1;
}

.metric-item span {
    color: #5d6f89;
    font-size: 15px;
}

.auth-state-panel h2 {
    margin-top: 4px;
}

.auth-state-icon {
    width: 80px;
    height: 80px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    margin: 0 auto 12px;
    font-size: 30px;
}

.auth-state-icon.info {
    background: #e7efff;
    color: #2f66e7;
}

.auth-state-icon.danger {
    background: #fee2e2;
    color: #dc2626;
}

.auth-alert {
    border-radius: 12px;
    border: 1px solid;
    padding: 12px;
    text-align: left;
}

.auth-alert h4 {
    margin: 0 0 4px;
    font-size: 19px;
}

.auth-alert p {
    margin: 0;
    text-align: left;
}

.auth-alert.warning {
    background: #fffaeb;
    border-color: #f2dea4;
    color: #9f6600;
}

.auth-alert.danger {
    background: #fff3f3;
    border-color: #f7c8c8;
    color: #af2b2b;
}

.maintenance-page {
    min-height: 100vh;
    background: #f5f7fb;
    color: #1f2a40;
}

.maintenance-wrap {
    width: min(760px, 94vw);
    margin: 36px auto 24px;
}

.maintenance-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 18px;
}

.maintenance-brand h1 {
    margin: 0;
    font-size: 42px;
}

.maintenance-brand p {
    margin: 0;
    color: #566986;
    font-size: 18px;
}

.maintenance-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 28px;
    text-align: center;
}

.maintenance-icon {
    width: 100px;
    height: 100px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    margin: 0 auto 12px;
    color: #2f66e7;
    background: #e8f0ff;
    font-size: 46px;
}

.maintenance-card h2 {
    margin: 0;
    font-size: 52px;
}

.maintenance-card > p {
    color: #4f627d;
    margin: 10px auto 16px;
    max-width: 640px;
    font-size: 20px;
}

.maintenance-stats {
    border: 1px solid #dbe6f7;
    border-radius: 12px;
    background: #f4f8ff;
    padding: 14px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    text-align: center;
}

.maintenance-stats div {
    display: grid;
    gap: 4px;
}

.maintenance-stats div + div {
    border-left: 1px solid #d4e0f3;
}

.maintenance-stats span {
    color: #44556f;
    font-size: 15px;
}

.maintenance-stats strong {
    font-size: 40px;
    line-height: 1.2;
}

.maintenance-stats small {
    color: #475a77;
    font-size: 16px;
}

.maintenance-support {
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid var(--line);
}

.maintenance-support p {
    margin: 0 0 6px;
    color: #4e607b;
    font-size: 16px;
}

.maintenance-support a {
    text-decoration: none;
    color: #2f66e7;
    font-weight: 700;
    font-size: 22px;
}

.maintenance-note {
    margin-top: 16px;
    border-top: 1px solid var(--line);
    padding-top: 14px;
    color: #60728c;
    font-size: 16px;
}

.maintenance-footer {
    text-align: center;
    margin-top: 18px;
    color: #7f91ad;
    font-size: 15px;
}

.text-purple {
    color: #8b5cf6;
}

.text-amber {
    color: #d97706;
}

.profile-pill-link {
    text-decoration: none;
    color: inherit;
}

.mobile-nav-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(7, 15, 38, 0.45);
    z-index: 1100;
}

.mobile-nav-backdrop[hidden] {
    display: none !important;
}

.quick-actions-btn {
    background: var(--blue-600);
    border-color: var(--blue-600);
    color: #fff;
}

.quick-actions-btn:hover {
    background: #1f56d8;
    border-color: #1f56d8;
}

.notify-wrap {
    position: relative;
}

.notify-dropdown {
    position: absolute;
    right: 0;
    top: 46px;
    width: min(360px, 90vw);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: 0 16px 35px rgba(15, 23, 42, 0.18);
    z-index: 50;
}

.notify-dropdown[hidden] {
    display: none !important;
}

.notify-dropdown-head,
.notify-dropdown-foot {
    padding: 10px 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--line);
}

.notify-dropdown-foot {
    border-bottom: 0;
    border-top: 1px solid var(--line);
    justify-content: flex-end;
}

.notify-dropdown-body {
    max-height: 380px;
    overflow-y: auto;
    padding: 8px;
    display: grid;
    gap: 8px;
}

.notify-item {
    border: 1px solid #dde6f4;
    border-left: 4px solid #94a3b8;
    border-radius: 10px;
    padding: 10px;
    background: #fff;
}

.notify-item h4 {
    margin: 0;
    font-size: 14px;
}

.notify-item p {
    margin: 4px 0;
    color: #4f627e;
    font-size: 13px;
}

.notify-item small {
    color: #7e90aa;
    font-size: 12px;
}

.notify-item.warning { border-left-color: #d97706; }
.notify-item.critical { border-left-color: #ef4444; }
.notify-item.info { border-left-color: #3b82f6; }

.quick-modal-nav {
    gap: 8px;
}

.quick-modal-nav .nav-link {
    border-radius: 999px;
    padding: 6px 12px;
    font-weight: 700;
    color: #475a78;
    background: #eef3fb;
}

.quick-modal-nav .nav-link.active {
    background: var(--blue-600);
    color: #fff;
}

.quick-action-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.quick-action-card {
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 14px;
    display: grid;
    gap: 5px;
    text-decoration: none;
    color: #25344f;
    background: #fbfdff;
}

.quick-action-card i {
    font-size: 18px;
    color: var(--blue-600);
}

.quick-action-card strong {
    font-size: 15px;
}

.quick-action-card small {
    color: #687a95;
}

.quick-action-card:hover {
    border-color: #2f66e7;
    background: #eef4ff;
}

.quick-form .form-label {
    font-weight: 700;
    color: #455774;
}

.quick-info-grid {
    display: grid;
    gap: 10px;
}

.quick-info-card {
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 12px;
    background: #fbfdff;
}

.quick-info-card strong {
    display: block;
    margin-top: 2px;
    font-size: 18px;
    color: #1f2d45;
}

.spa-loader {
    position: fixed;
    right: 20px;
    bottom: 20px;
    width: 48px;
    height: 48px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid #dce6f4;
    display: grid;
    place-items: center;
    z-index: 1100;
    box-shadow: 0 8px 25px rgba(15, 23, 42, 0.15);
}

@media (max-width: 1500px) {
    .brand-text { font-size: 18px; }
    .page-title { font-size: 24px; }
    .page-subtitle { font-size: 14px; }
    .module-header h3 { font-size: 18px; }
    .pump-live-card h4,
    .tank-card h3,
    .compliance-item h4,
    .compliance-row h4,
    .deadline-item h4,
    .deadline-compact h4 { font-size: 18px; }
}

@media (max-width: 1200px) {
    .app-shell { grid-template-columns: 240px 1fr; }
    .stat-grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .panel-grid-main,
    .panel-grid-equal,
    .reports-layout,
    .settings-layout,
    .pump-live-grid,
    .tank-cards,
    .customer-grid,
    .invoice-grid,
    .shift-summary-grid,
    .signature-grid,
    .tank-dip-grid,
    .report-filter-grid,
    .workflow-row,
    .workflow-row.compact,
    .pump-mini-grid,
    .health-grid,
    .metrics-grid,
    .master-filter-row,
    .profile-split,
    .deposit-meta-grid {
        grid-template-columns: 1fr;
    }

    .profile-summary {
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }

    .history-row {
        grid-template-columns: 34px 1fr;
    }

    .history-date {
        grid-column: 2;
    }
}

@media (max-width: 860px) {
    .app-shell { grid-template-columns: 1fr; }
    .mobile-nav-toggle { display: inline-flex; }
    .app-sidebar {
        display: flex;
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
        width: min(82vw, 320px);
        z-index: 1200;
        transform: translateX(-105%);
        transition: transform 0.22s ease;
        box-shadow: 0 18px 36px rgba(4, 11, 36, 0.35);
    }
    .app-body.mobile-nav-open .app-sidebar {
        transform: translateX(0);
    }
    .app-body.mobile-nav-open {
        overflow: hidden;
    }

    .app-content {
        padding: 14px;
    }

    .module-card,
    .panel {
        border-radius: 12px;
    }

    .app-topbar { flex-direction: column; align-items: flex-start; }
    .topbar-left { width: 100%; }
    .topbar-left h1 { font-size: 16px; }
    .topbar-tags { flex-wrap: wrap; margin-top: 0; }
    .topbar-tags:empty { display: none; }
    .topbar-right { width: 100%; flex-wrap: wrap; }
    .language-switch .form-select { min-width: 140px; }
    .profile-pill { border-left: 0; padding-left: 0; }
    .station-switch select { min-width: 180px; }
    .page-head { flex-direction: column; }
    .page-actions { width: 100%; }
    .page-actions .btn { flex: 1; }

    .module-body,
    .panel {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .form-control,
    .form-select {
        font-size: 16px;
    }

    .btn {
        height: 40px;
    }

    .btn-sm {
        height: 34px;
        font-size: 12px;
        padding: 0 10px;
    }

    .module-body .d-flex.gap-2,
    .panel .d-flex.gap-2,
    .module-body .d-flex.justify-content-end.gap-2,
    .panel .d-flex.justify-content-end.gap-2 {
        flex-wrap: wrap;
    }

    .module-body .d-flex.gap-2 .btn,
    .panel .d-flex.gap-2 .btn,
    .module-body .d-flex.justify-content-end.gap-2 .btn,
    .panel .d-flex.justify-content-end.gap-2 .btn {
        flex: 1 1 160px;
    }

    .table.app-table,
    .table.table-tight {
        min-width: 560px;
    }

    .table.app-table thead th,
    .table.app-table tbody td,
    .table.table-tight thead th,
    .table.table-tight tbody td {
        font-size: 12px;
        padding: 8px;
        white-space: nowrap;
    }

    .table.table-tight td .btn,
    .table.app-table td .btn {
        margin-bottom: 4px;
    }
    .auth-card-register,
    .auth-wrap { width: min(96vw, 720px); }
    .auth-form-panel { padding: 20px 16px; }

    .deposit-slip-preview {
        min-height: 320px;
    }

    .maintenance-wrap {
        margin-top: 20px;
    }

    .maintenance-brand {
        justify-content: center;
    }

    .maintenance-stats {
        grid-template-columns: 1fr;
    }

    .maintenance-stats div + div {
        border-left: 0;
        border-top: 1px solid #d4e0f3;
        padding-top: 10px;
    }

    .maintenance-support a {
        font-size: 24px;
    }

    .quick-action-grid {
        grid-template-columns: 1fr;
    }
}

/* Final dark theme overrides (kept at file end to win cascade) */
body.theme-dark {
    --bg-page: #0a1328;
    --card-bg: #101c37;
    --line: #253a63;
    --ink-900: #e6efff;
    --ink-700: #b7c7e3;
    --ink-500: #98abca;
    background: var(--bg-page);
    color: var(--ink-900);
}

body.theme-dark .app-main,
body.theme-dark .app-content {
    background: var(--bg-page);
}

body.theme-dark .app-topbar,
body.theme-dark .module-card,
body.theme-dark .panel,
body.theme-dark .stat-card,
body.theme-dark .summary-box,
body.theme-dark .tank-card,
body.theme-dark .pump-live-card,
body.theme-dark .notice-item,
body.theme-dark .recon-box,
body.theme-dark .signature-box,
body.theme-dark .quick-action-card,
body.theme-dark .quick-info-card,
body.theme-dark .toggle-row,
body.theme-dark .session-list-card,
body.theme-dark .dropzone-box,
body.theme-dark .deposit-meta-grid article,
body.theme-dark .file-row,
body.theme-dark .notify-dropdown,
body.theme-dark .modal-content,
body.theme-dark .profile-summary,
body.theme-dark .profile-form-wrap,
body.theme-dark .auth-alert,
body.theme-dark .workflow-step,
body.theme-dark .report-item,
body.theme-dark .health-note,
body.theme-dark .summary-list div,
body.theme-dark .date-chip,
body.theme-dark .pay-chip {
    background: var(--card-bg);
    border-color: var(--line);
    color: var(--ink-900);
}

body.theme-dark .module-header,
body.theme-dark .module-body,
body.theme-dark .app-topbar,
body.theme-dark .notify-dropdown-head,
body.theme-dark .notify-dropdown-foot,
body.theme-dark .profile-contact,
body.theme-dark .profile-form-actions,
body.theme-dark .history-row,
body.theme-dark .table > :not(caption) > * > * {
    border-color: var(--line);
}

body.theme-dark .app-table {
    --bs-table-bg: transparent;
    --bs-table-striped-bg: #112246;
    --bs-table-hover-bg: #17305f;
    color: var(--ink-900);
}

body.theme-dark .table.table-tight {
    --bs-table-bg: transparent;
    --bs-table-striped-bg: #112246;
    --bs-table-hover-bg: #17305f;
    color: var(--ink-900);
}

body.theme-dark .app-table thead th {
    color: #9eb1d3;
}

body.theme-dark .app-table tbody td {
    color: #dbe8ff;
    border-color: #2a4270;
}

body.theme-dark .form-control,
body.theme-dark .form-select,
body.theme-dark .icon-btn,
body.theme-dark .btn-light,
body.theme-dark .threshold-input,
body.theme-dark .search-field .form-control {
    background: #0d1830;
    border-color: #2e4677;
    color: #e6efff;
}

body.theme-dark .form-control::placeholder {
    color: #8ea2c6;
}

body.theme-dark .form-control[readonly],
body.theme-dark .form-control:disabled {
    background: #142343;
    color: #9cb0d1;
}

body.theme-dark .btn-light:hover,
body.theme-dark .icon-btn:hover {
    background: #16284d;
    border-color: #3a568b;
    color: #f4f8ff;
}

body.theme-dark .page-title,
body.theme-dark .section-title,
body.theme-dark .module-header h3,
body.theme-dark .topbar-left h1,
body.theme-dark .profile-text strong,
body.theme-dark .quick-info-card strong,
body.theme-dark .summary-box strong,
body.theme-dark .history-copy h4,
body.theme-dark .maintenance-card h2 {
    color: #edf3ff;
}

body.theme-dark .page-subtitle,
body.theme-dark .muted,
body.theme-dark .profile-text small,
body.theme-dark .module-header p,
body.theme-dark small.muted,
body.theme-dark .table-footer,
body.theme-dark .history-copy p,
body.theme-dark .history-copy small,
body.theme-dark .metric-item span,
body.theme-dark .app-developed-by {
    color: #9bb0d4;
}

body.theme-dark .table-link,
body.theme-dark a.table-link {
    color: #89b1ff;
}

body.theme-dark .app-developed-by a {
    color: #8cb6ff;
}

body.theme-dark .quick-modal-nav .nav-link {
    background: #1a2f58;
    color: #cad8f2;
}

body.theme-dark .quick-modal-nav .nav-link.active {
    background: var(--blue-600);
    color: #fff;
}

body.theme-dark .tag-shift {
    background: #1a2f58;
    color: #acc7ff;
}

body.theme-dark .tag-cctv {
    color: #b8c8e2;
}

body.theme-dark .alert {
    border-color: transparent;
}

body.theme-dark .alert-success {
    background: #0f2e26;
    color: #8ce8c4;
}

body.theme-dark .alert-danger {
    background: #3a1f2a;
    color: #ffb1bf;
}

body.theme-dark .alert-warning {
    background: #3b2b15;
    color: #ffd18d;
}

body.theme-dark .notify-item {
    background: #0d1830;
    border-color: #2a3e67;
}

body.theme-dark .notify-item h4 {
    color: #eaf1ff;
}

body.theme-dark .notify-item p,
body.theme-dark .notify-item small {
    color: #9fb3d6;
}

body.theme-dark .pump-mini-card {
    background: var(--card-bg);
    border-color: #2b426e;
}

body.theme-dark .pump-mini-card h4,
body.theme-dark .pump-mini-card strong {
    color: #edf3ff;
}

body.theme-dark .pump-mini-card small,
body.theme-dark .muted-title {
    color: #9eb2d5;
}

body.theme-dark .panel {
    background: var(--card-bg);
    border-color: var(--line);
}

body.theme-dark .panel-title {
    color: #edf3ff;
}

body.theme-dark .table.table-tight {
    --bs-table-bg: transparent;
    --bs-table-striped-bg: #112246;
    --bs-table-hover-bg: #17305f;
    color: var(--ink-900);
}

body.theme-dark .table.table-tight thead th {
    color: #9eb1d3;
    border-bottom-color: #2a4270;
}

body.theme-dark .table.table-tight tbody td {
    color: #dbe8ff;
    border-color: #2a4270;
}

body.theme-dark .table.table-tight .text-muted {
    color: #9db1d4 !important;
}

body.theme-dark .btn-outline-warning {
    color: #ffd58e;
    border-color: #9a7a3c;
}

body.theme-dark .btn-outline-warning:hover {
    color: #1b2238;
    background: #ffd58e;
    border-color: #ffd58e;
}

body.theme-dark .btn-outline-success {
    color: #8ce8c4;
    border-color: #2f7a5f;
}

body.theme-dark .btn-outline-success:hover {
    color: #102233;
    background: #8ce8c4;
    border-color: #8ce8c4;
}

body.theme-dark .btn-outline-danger {
    color: #ffb1bf;
    border-color: #8d4250;
}

body.theme-dark .btn-outline-danger:hover {
    color: #1b2238;
    background: #ffb1bf;
    border-color: #ffb1bf;
}

body.theme-dark .compliance-item,
body.theme-dark .compliance-row,
body.theme-dark .deadline-item,
body.theme-dark .deadline-compact,
body.theme-dark .deposit-slip-preview,
body.theme-dark .deposit-timeline-item,
body.theme-dark .history-row,
body.theme-dark .health-grid .module-card,
body.theme-dark .customer-grid,
body.theme-dark .invoice-grid,
body.theme-dark .shift-summary-grid {
    color: #d8e7ff;
}

body.theme-dark .compliance-item h4,
body.theme-dark .compliance-row h4,
body.theme-dark .deadline-item h4,
body.theme-dark .deadline-compact h4,
body.theme-dark .deposit-slip-preview h4,
body.theme-dark .deposit-meta-grid strong,
body.theme-dark .deposit-timeline-item h4,
body.theme-dark .file-meta strong,
body.theme-dark .customer-grid strong,
body.theme-dark .invoice-grid strong,
body.theme-dark .shift-summary-grid strong,
body.theme-dark .invoice-total strong,
body.theme-dark .tank-card h3,
body.theme-dark .pump-live-card h4,
body.theme-dark .health-title h3,
body.theme-dark .metric-item strong {
    color: #edf3ff;
}

body.theme-dark .compliance-item p,
body.theme-dark .compliance-row p,
body.theme-dark .deadline-item p,
body.theme-dark .deadline-compact p,
body.theme-dark .deposit-slip-preview p,
body.theme-dark .deposit-meta-grid span,
body.theme-dark .deposit-timeline-item p,
body.theme-dark .deposit-timeline-item small,
body.theme-dark .file-meta p,
body.theme-dark .history-date,
body.theme-dark .customer-grid span,
body.theme-dark .customer-grid small,
body.theme-dark .invoice-grid span,
body.theme-dark .shift-summary-grid span,
body.theme-dark .shift-summary-grid small,
body.theme-dark .tank-metrics div,
body.theme-dark .summary-list label,
body.theme-dark .summary-list span,
body.theme-dark .health-rows span,
body.theme-dark .crumb-nav,
body.theme-dark .crumb-nav .bi,
body.theme-dark .invoice-total span {
    color: #9eb2d5;
}

body.theme-dark .deposit-slip-preview {
    background: #0e1a33;
    border-color: #2b416d;
}

body.theme-dark .deposit-slip-icon,
body.theme-dark .dropzone-box i,
body.theme-dark .search-field i {
    color: #8ea8d4;
}

body.theme-dark .dropzone-box {
    background: #0d1830;
    border-color: #2f4675;
}

body.theme-dark .deposit-timeline:before {
    background: #2b416d;
}

body.theme-dark .totals-row td,
body.theme-dark .session-table tbody tr.current,
body.theme-dark .table.app-table tbody tr.current {
    background: #152b56;
}

body.theme-dark .compliance-item.success,
body.theme-dark .compliance-row.success {
    background: #113825;
    border-color: #1f6f4e;
}

body.theme-dark .compliance-item.warning,
body.theme-dark .compliance-row.warning {
    background: #3b2c12;
    border-color: #7e5c1d;
}

body.theme-dark .compliance-item.danger,
body.theme-dark .compliance-row.danger {
    background: #3a1e29;
    border-color: #7f3949;
}

body.theme-dark .compliance-item.info,
body.theme-dark .compliance-row.info {
    background: #162c52;
    border-color: #2f5ea5;
}

body.theme-dark .deadline-item.danger,
body.theme-dark .deadline-compact.danger {
    background: #3a1f2a;
    border-color: #854154;
}

body.theme-dark .deadline-item.warning,
body.theme-dark .deadline-compact.warning {
    background: #3b2b14;
    border-color: #826225;
}

body.theme-dark .deadline-item.info,
body.theme-dark .deadline-compact.info {
    background: #162d53;
    border-color: #2f5fa8;
}

body.theme-dark .deadline-item.neutral,
body.theme-dark .deadline-compact.neutral {
    background: #132442;
    border-color: #304d7e;
}

body.theme-dark .status-pill.success {
    background: #123f2e;
    color: #7ce8bc;
}

body.theme-dark .status-pill.warning {
    background: #433113;
    color: #ffd58e;
}

body.theme-dark .status-pill.danger {
    background: #4a2230;
    color: #ffb8c5;
}

body.theme-dark .status-pill.info {
    background: #1d3d75;
    color: #bcd2ff;
}

body.theme-dark .status-pill.neutral {
    background: #22385f;
    color: #c6d7f5;
}
