/* ==========================================================================
   FuelGuard UI – Bootstrap 5.3 theme (mobile, tablet, desktop · light & dark)
   ========================================================================== */
:root {
    --fg-navy: #0b1324;
    --fg-navy-2: #111c33;
    --fg-amber: #f59e0b;
    --fg-orange: #f97316;
    --fg-teal: #0d9488;
    --fg-bg: #f3f5fa;
    --fg-card: #ffffff;
    --fg-border: #e7eaf3;
    --fg-input-border: #dfe3ec;
    --fg-text: #1e293b;
    --fg-heading: #0f172a;
    --fg-muted: #64748b;
    --fg-soft: #eef1f7;
    --fg-soft-2: #f8fafc;
    --fg-brand-soft: #fff7ed;
    --fg-topbar: rgba(255, 255, 255, .86);
    --fg-radius: 18px;
    --fg-shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 8px 24px rgba(15, 23, 42, .06);
    --fg-shadow-hover: 0 2px 4px rgba(15, 23, 42, .05), 0 16px 36px rgba(15, 23, 42, .09);
    --fg-sidebar-w: 268px;
    --fg-sidebar-mini: 78px;
    --bs-body-font-family: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --bs-link-color: #c2410c;
    --bs-link-color-rgb: 194, 65, 12;
    --bs-link-hover-color: #9a3412;

    /* tints: background / foreground */
    --t-success-bg: #dcfce7; --t-success-fg: #15803d;
    --t-warning-bg: #fef3c7; --t-warning-fg: #b45309;
    --t-danger-bg: #fee2e2;  --t-danger-fg: #b91c1c;
    --t-primary-bg: #dbeafe; --t-primary-fg: #1d4ed8;
    --t-info-bg: #cffafe;    --t-info-fg: #0e7490;
    --t-secondary-bg: #f1f5f9; --t-secondary-fg: #475569;
    --t-dark-bg: #e2e8f0;    --t-dark-fg: #0f172a;
    --t-teal-bg: #ccfbf1;    --t-teal-fg: #0f766e;
    --t-orange-bg: #ffedd5;  --t-orange-fg: #c2410c;
    --t-purple-bg: #ede9fe;  --t-purple-fg: #6d28d9;
}

[data-bs-theme="dark"] {
    --fg-bg: #0b1120;
    --fg-card: #131c2e;
    --fg-border: #22304a;
    --fg-input-border: #2b3a57;
    --fg-text: #dbe2ee;
    --fg-heading: #f1f5f9;
    --fg-muted: #93a1b8;
    --fg-soft: #1b263b;
    --fg-soft-2: #182235;
    --fg-brand-soft: rgba(245, 158, 11, .12);
    --fg-topbar: rgba(15, 22, 38, .86);
    --fg-shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
    --fg-shadow-hover: 0 2px 4px rgba(0, 0, 0, .35), 0 16px 36px rgba(0, 0, 0, .35);
    --bs-body-bg: #0b1120;
    --bs-body-color: #dbe2ee;
    --bs-link-color: #fb923c;
    --bs-link-color-rgb: 251, 146, 60;
    --bs-link-hover-color: #fdba74;

    --t-success-bg: rgba(34, 197, 94, .16);  --t-success-fg: #4ade80;
    --t-warning-bg: rgba(245, 158, 11, .16); --t-warning-fg: #fbbf24;
    --t-danger-bg: rgba(239, 68, 68, .16);   --t-danger-fg: #f87171;
    --t-primary-bg: rgba(59, 130, 246, .16); --t-primary-fg: #60a5fa;
    --t-info-bg: rgba(6, 182, 212, .16);     --t-info-fg: #22d3ee;
    --t-secondary-bg: rgba(148, 163, 184, .14); --t-secondary-fg: #cbd5e1;
    --t-dark-bg: rgba(226, 232, 240, .12);   --t-dark-fg: #e2e8f0;
    --t-teal-bg: rgba(20, 184, 166, .16);    --t-teal-fg: #2dd4bf;
    --t-orange-bg: rgba(249, 115, 22, .16);  --t-orange-fg: #fb923c;
    --t-purple-bg: rgba(139, 92, 246, .18);  --t-purple-fg: #a78bfa;
}

body { background: var(--fg-bg); color: var(--fg-text); font-family: var(--bs-body-font-family); -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4, h5, h6, .h4, .h5 { color: var(--fg-heading); }
.text-muted { color: var(--fg-muted) !important; }
.min-w-0 { min-width: 0; }
.fw-800 { font-weight: 800; }
.small-xs { font-size: .72rem; }
.text-teal { color: var(--fg-teal) !important; }
.border, .border-bottom, .border-top { border-color: var(--fg-border) !important; }
.theme-icon-light { display: none; }
[data-bs-theme="dark"] .theme-icon-light { display: inline-block; }
[data-bs-theme="dark"] .theme-icon-dark { display: none; }

/* ---------- Splash ---------- */
.splash { position: fixed; inset: 0; z-index: 3000; display: flex; align-items: center; justify-content: center;
    background: radial-gradient(1200px 600px at 20% 10%, #1e2b4d 0%, var(--fg-navy) 55%); transition: opacity .45s ease, visibility .45s; }
.splash.hide { opacity: 0; visibility: hidden; }
.splash-inner { text-align: center; color: #fff; padding: 24px; }
.splash-logo { width: 92px; height: 92px; margin: 0 auto 18px; border-radius: 28px; display: grid; place-items: center; font-size: 46px;
    background: linear-gradient(135deg, var(--fg-amber), var(--fg-orange)); box-shadow: 0 18px 50px rgba(249, 115, 22, .45); animation: fgPulse 1.6s ease-in-out infinite; }
.splash-title { font-size: 1.9rem; font-weight: 800; letter-spacing: -.02em; }
.splash-sub { color: rgba(255, 255, 255, .65); font-size: .9rem; margin-top: 4px; }
.splash-bar { width: 180px; height: 4px; border-radius: 4px; background: rgba(255, 255, 255, .12); margin: 22px auto 0; overflow: hidden; }
.splash-bar span { display: block; height: 100%; width: 40%; background: var(--fg-amber); border-radius: 4px; animation: fgBar 1s ease-in-out infinite; }
@keyframes fgPulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.06); } }
@keyframes fgBar { 0% { transform: translateX(-100%); } 100% { transform: translateX(260%); } }

/* ---------- Shell ---------- */
.app-shell { display: flex; min-height: 100vh; }
.app-sidebar { background: linear-gradient(180deg, var(--fg-navy) 0%, var(--fg-navy-2) 100%); color: #cbd5e1; }
@media (min-width: 992px) {
    .app-sidebar { position: fixed; inset: 0 auto 0 0; width: var(--fg-sidebar-w); display: flex; flex-direction: column; z-index: 1030; transition: width .2s ease; }
    .app-main { margin-left: var(--fg-sidebar-w); transition: margin-left .2s ease; }
    /* Mini (icon-only) sidebar */
    .sidebar-mini .app-sidebar { width: var(--fg-sidebar-mini); }
    .sidebar-mini .app-main { margin-left: var(--fg-sidebar-mini); }
    .sidebar-mini .brand-text, .sidebar-mini .nav-label, .sidebar-mini .nav-group-title, .sidebar-mini .nav-badge { display: none !important; }
    .sidebar-mini .sidebar-brand { justify-content: center; padding-inline: 10px; }
    .sidebar-mini .nav-link-app { justify-content: center; padding: 11px 0; }
    .sidebar-mini .nav-link-app i { width: auto; font-size: 1.2rem; }
    .sidebar-mini .sidebar-nav { padding-top: 14px; }
    .sidebar-mini .sidebar-footer { display: flex; justify-content: center; padding-inline: 8px; }
}
@media (max-width: 991.98px) {
    .app-sidebar.offcanvas-lg { width: 290px; }
    .app-sidebar { display: flex; flex-direction: column; }
}
.sidebar-brand { display: flex; align-items: center; justify-content: space-between; padding: 20px 18px 14px; border-bottom: 1px solid rgba(255, 255, 255, .06); }
.brand-logo { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; font-size: 20px; color: #fff; flex-shrink: 0;
    background: linear-gradient(135deg, var(--fg-amber), var(--fg-orange)); box-shadow: 0 8px 20px rgba(249, 115, 22, .35); }
.brand-logo-img { background: #fff; overflow: hidden; }
.brand-logo-img img { width: 100%; height: 100%; object-fit: contain; }
.brand-name { color: #fff; font-weight: 800; font-size: 1.1rem; letter-spacing: -.01em; }
.brand-sub { color: rgba(255, 255, 255, .5); font-size: .72rem; max-width: 170px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-nav { flex: 1; overflow-y: auto; padding: 10px 12px 20px; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .15) transparent; }
.nav-group-title { text-transform: uppercase; font-size: .66rem; letter-spacing: .12em; color: rgba(255, 255, 255, .35); font-weight: 700; padding: 16px 12px 6px; }
.nav-link-app { display: flex; align-items: center; gap: 12px; padding: 10px 12px; margin: 2px 0; border-radius: 12px; color: #cbd5e1; text-decoration: none; font-size: .9rem; font-weight: 500; transition: all .15s ease; }
.nav-link-app i { font-size: 1.1rem; width: 22px; text-align: center; color: #94a3b8; transition: color .15s; }
.nav-link-app:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.nav-link-app:hover i { color: var(--fg-amber); }
.nav-link-app.active { background: linear-gradient(90deg, rgba(245, 158, 11, .22), rgba(245, 158, 11, .05)); color: #fff; box-shadow: inset 3px 0 0 var(--fg-amber); }
.nav-link-app.active i { color: var(--fg-amber); }
.sidebar-footer { padding: 14px 18px; border-top: 1px solid rgba(255, 255, 255, .06); }

.app-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.app-topbar { position: sticky; top: 0; z-index: 1020; display: flex; align-items: center; gap: 6px; padding: 10px 18px;
    background: var(--fg-topbar); backdrop-filter: saturate(180%) blur(12px); border-bottom: 1px solid var(--fg-border); }
.pump-select { max-width: 280px; border: 0; background-color: var(--fg-soft); }
.app-content { padding: 22px; padding-bottom: 110px; }
@media (min-width: 992px) { .app-content { padding: 28px 32px 40px; } }
@media (max-width: 575.98px) { .app-content { padding: 14px 12px 110px; } .app-topbar { padding: 8px 10px; } }

.btn-icon { width: 42px; height: 42px; border-radius: 12px; display: inline-grid; place-items: center; padding: 0; border: 0; background: transparent; color: var(--fg-text); }
.btn-icon:hover, .btn-icon:focus-visible { background: var(--fg-soft); color: var(--fg-heading); }
.avatar { width: 40px; height: 40px; border-radius: 12px; display: inline-grid; place-items: center; font-weight: 700; font-size: .9rem; flex-shrink: 0; overflow: hidden; }
.avatar-sm { width: 34px; height: 34px; border-radius: 10px; font-size: .78rem; }
.avatar-lg { width: 56px; height: 56px; border-radius: 16px; font-size: 1.1rem; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }

/* Bell */
.bell-menu { width: 360px; max-width: calc(100vw - 20px); overflow: hidden; }
.bell-list { max-height: 360px; overflow-y: auto; }
.bell-item:hover { background: var(--fg-soft-2); }
.bell-ring { display: inline-block; animation: ring 2.4s ease-in-out infinite; transform-origin: 50% 0; }
@keyframes ring { 0%, 86%, 100% { transform: rotate(0); } 88% { transform: rotate(14deg); } 92% { transform: rotate(-12deg); } 96% { transform: rotate(8deg); } }

/* ---------- Bottom nav (mobile) + FAB ---------- */
.bottom-nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 1025; display: flex; justify-content: space-around; background: var(--fg-card);
    border-top: 1px solid var(--fg-border); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); box-shadow: 0 -6px 24px rgba(15, 23, 42, .08); }
.bottom-nav a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; text-decoration: none; color: var(--fg-muted); font-size: .68rem; font-weight: 600; padding: 4px 0; border-radius: 12px; }
.bottom-nav a i { font-size: 1.3rem; }
.bottom-nav a.active { color: var(--fg-orange); }
.fab { position: fixed; right: 16px; bottom: calc(84px + env(safe-area-inset-bottom)); z-index: 1024; width: 58px; height: 58px; border-radius: 18px; border: 0;
    display: grid; place-items: center; font-size: 1.5rem; color: #fff; background: linear-gradient(135deg, var(--fg-amber), var(--fg-orange));
    box-shadow: 0 14px 30px rgba(249, 115, 22, .45); transition: transform .15s ease; }
.fab:active { transform: scale(.94); }

/* ---------- Page header ---------- */
.page-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 20px; }
.page-head .ph-icon { width: 48px; height: 48px; border-radius: 15px; display: grid; place-items: center; font-size: 22px; color: #fff;
    background: linear-gradient(135deg, var(--fg-amber), var(--fg-orange)); box-shadow: 0 10px 24px rgba(249, 115, 22, .28); flex-shrink: 0; }
.page-head h1 { font-size: 1.35rem; font-weight: 800; margin: 0; letter-spacing: -.02em; }
.page-head p { margin: 0; color: var(--fg-muted); font-size: .86rem; }
.breadcrumb-mini { font-size: .76rem; color: var(--fg-muted); margin-bottom: 2px; }
.breadcrumb-mini a { color: var(--fg-muted); text-decoration: none; }
.breadcrumb-mini a:hover { color: var(--bs-link-color); }

/* ---------- Buttons ---------- */
.btn { border-radius: 12px; font-weight: 600; padding: .55rem 1rem; }
.btn-sm { border-radius: 10px; padding: .35rem .7rem; }
.btn-brand { color: #fff; border: 0; background: linear-gradient(135deg, var(--fg-amber), var(--fg-orange)); box-shadow: 0 8px 18px rgba(249, 115, 22, .28); }
.btn-brand:hover, .btn-brand:focus, .btn-brand:active { color: #fff !important; filter: brightness(1.05); box-shadow: 0 10px 22px rgba(249, 115, 22, .38); }
.btn-soft { background: var(--fg-soft); color: var(--fg-text); border: 0; }
.btn-soft:hover { background: var(--fg-border); color: var(--fg-heading); }
.btn-soft-success { background: var(--t-success-bg); color: var(--t-success-fg); border: 0; }
.btn-soft-success:hover { filter: brightness(.95); color: var(--t-success-fg); background: var(--t-success-bg); }
.btn-soft-danger { background: var(--t-danger-bg); color: var(--t-danger-fg); border: 0; }
.btn-soft-danger:hover { filter: brightness(.95); color: var(--t-danger-fg); background: var(--t-danger-bg); }
.btn-soft-primary { background: var(--fg-brand-soft); color: var(--t-orange-fg); border: 0; }
.btn-soft-primary:hover { filter: brightness(.96); color: var(--t-orange-fg); background: var(--t-orange-bg); }
.btn-xl { padding: .95rem 1.4rem; font-size: 1.05rem; border-radius: 16px; }
.btn-check:checked + .btn-seg { background: var(--fg-heading); color: var(--fg-card); }
.btn-seg { background: var(--fg-soft); border: 0; color: var(--fg-text); }

/* ---------- Cards ---------- */
.card-x { background: var(--fg-card); border: 1px solid var(--fg-border); border-radius: var(--fg-radius); box-shadow: var(--fg-shadow); }
.data-card { background: var(--fg-card); border: 1px solid var(--fg-border); border-radius: var(--fg-radius); box-shadow: var(--fg-shadow);
    padding: 16px; height: 100%; display: flex; flex-direction: column; gap: 12px; transition: transform .15s ease, box-shadow .15s ease; position: relative; overflow: hidden; }
.data-card:hover { transform: translateY(-2px); box-shadow: var(--fg-shadow-hover); }
.data-card .dc-top { display: flex; align-items: flex-start; gap: 12px; }
.data-card .dc-icon { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; font-size: 20px; flex-shrink: 0; }
.data-card .dc-title { font-weight: 700; font-size: .98rem; margin: 0; line-height: 1.3; word-break: break-word; color: var(--fg-heading); }
.data-card .dc-sub { color: var(--fg-muted); font-size: .8rem; }
.data-card .dc-meta { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 12px; }
.data-card .dc-meta.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.data-card .dc-meta.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.data-card .dc-meta .k { font-size: .7rem; color: var(--fg-muted); text-transform: uppercase; letter-spacing: .04em; font-weight: 600; }
.data-card .dc-meta .v { font-size: .9rem; font-weight: 700; word-break: break-word; color: var(--fg-heading); }
.data-card .dc-foot { margin-top: auto; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding-top: 10px; border-top: 1px dashed var(--fg-border); }
.data-card.accent-success { box-shadow: inset 4px 0 0 #16a34a, var(--fg-shadow); }
.data-card.accent-warning { box-shadow: inset 4px 0 0 #f59e0b, var(--fg-shadow); }
.data-card.accent-danger { box-shadow: inset 4px 0 0 #dc2626, var(--fg-shadow); }
.data-card.accent-primary { box-shadow: inset 4px 0 0 #2563eb, var(--fg-shadow); }
a.data-card, a.data-card:hover { color: inherit; text-decoration: none; }
@media (max-width: 575.98px) { .data-card .dc-meta.cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.tint-success { background: var(--t-success-bg); color: var(--t-success-fg); }
.tint-warning { background: var(--t-warning-bg); color: var(--t-warning-fg); }
.tint-danger { background: var(--t-danger-bg); color: var(--t-danger-fg); }
.tint-primary { background: var(--t-primary-bg); color: var(--t-primary-fg); }
.tint-info { background: var(--t-info-bg); color: var(--t-info-fg); }
.tint-secondary { background: var(--t-secondary-bg); color: var(--t-secondary-fg); }
.tint-dark { background: var(--t-dark-bg); color: var(--t-dark-fg); }
.tint-teal { background: var(--t-teal-bg); color: var(--t-teal-fg); }
.tint-orange { background: var(--t-orange-bg); color: var(--t-orange-fg); }
.tint-purple { background: var(--t-purple-bg); color: var(--t-purple-fg); }

.chip { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 999px; font-size: .73rem; font-weight: 700; white-space: nowrap; }

/* ---------- Stat tiles ---------- */
.stat { background: var(--fg-card); border: 1px solid var(--fg-border); border-radius: var(--fg-radius); box-shadow: var(--fg-shadow); padding: 16px; display: flex; gap: 14px; align-items: center; height: 100%; }
.stat .s-icon { width: 50px; height: 50px; border-radius: 15px; display: grid; place-items: center; font-size: 22px; flex-shrink: 0; }
.stat .s-label { font-size: .76rem; color: var(--fg-muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.stat .s-value { font-size: 1.3rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.2; word-break: break-word; color: var(--fg-heading); }
.stat .s-hint { font-size: .75rem; color: var(--fg-muted); }
a:hover > .stat { box-shadow: var(--fg-shadow-hover); }
@media (max-width: 575.98px) {
    .stat { padding: 12px; gap: 10px; flex-direction: column; align-items: flex-start; }
    .stat .s-icon { width: 40px; height: 40px; font-size: 18px; border-radius: 12px; }
    .stat .s-value { font-size: 1.08rem; }
}

.hero-card { border-radius: 22px; padding: 22px; color: #fff; position: relative; overflow: hidden;
    background: radial-gradient(600px 300px at 90% -20%, rgba(245, 158, 11, .45), transparent 60%), linear-gradient(135deg, #0b1324, #1e2b4d); box-shadow: 0 18px 40px rgba(11, 19, 36, .25); }
.hero-card .hero-icon { position: absolute; right: -10px; bottom: -24px; font-size: 140px; opacity: .08; }
[data-bs-theme="dark"] .hero-card { border: 1px solid var(--fg-border); }

/* Quick actions */
.quick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; }
.quick { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 8px; border-radius: 16px; background: var(--fg-card);
    border: 1px solid var(--fg-border); text-decoration: none; color: var(--fg-text); font-weight: 600; font-size: .8rem; text-align: center; transition: all .15s; box-shadow: var(--fg-shadow); }
.quick i { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; font-size: 1.25rem; }
.quick:hover { transform: translateY(-2px); color: var(--fg-heading); box-shadow: var(--fg-shadow-hover); }

/* ---------- Gauges / progress ---------- */
.tank-gauge { height: 10px; border-radius: 10px; background: var(--fg-soft); overflow: hidden; }
.tank-gauge span { display: block; height: 100%; border-radius: 10px; background: linear-gradient(90deg, #22c55e, #16a34a); transition: width .6s ease; }
.tank-gauge.low span { background: linear-gradient(90deg, #f87171, #dc2626); }
.tank-gauge.mid span { background: linear-gradient(90deg, #fbbf24, #f59e0b); }
.tank-gauge.thin { height: 6px; }
.ring { --p: 0; --c: #16a34a; width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0;
    background: conic-gradient(var(--c) calc(var(--p) * 1%), var(--fg-soft) 0); }
.ring span { width: 50px; height: 50px; border-radius: 50%; background: var(--fg-card); display: grid; place-items: center; font-weight: 800; font-size: .85rem; color: var(--fg-heading); }

/* Bars chart */
.bars { display: flex; align-items: flex-end; gap: 8px; height: 190px; }
.bars .bar { flex: 1; text-align: center; min-width: 0; }
.bars .bar .fill { border-radius: 8px 8px 4px 4px; margin: 0 auto; max-width: 46px; background: linear-gradient(180deg, #fbbf24, #f97316); transition: height .5s ease; }
.bars .bar.today .fill { background: linear-gradient(180deg, #34d399, #0d9488); }

/* ---------- Filters ---------- */
.filter-bar { background: var(--fg-card); border: 1px solid var(--fg-border); border-radius: var(--fg-radius); padding: 12px; margin-bottom: 18px; box-shadow: var(--fg-shadow); }
.filter-toggle { display: none; }
@media (max-width: 767.98px) {
    .filter-toggle { display: flex; width: 100%; align-items: center; justify-content: space-between; background: transparent; border: 0; padding: 2px 4px; font-weight: 700; color: var(--fg-heading); }
    .filter-bar .filter-body { display: none; margin-top: 10px; }
    .filter-bar.open .filter-body { display: block; }
}
.search-box { position: relative; }
.search-box i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--fg-muted); z-index: 2; }
.search-box .form-control { padding-left: 40px; }

/* ---------- Forms ---------- */
.form-control, .form-select { border-radius: 12px; border-color: var(--fg-input-border); padding: .62rem .9rem; font-size: .93rem; background-color: var(--fg-card); color: var(--fg-text); }
.form-control:focus, .form-select:focus { border-color: var(--fg-amber); box-shadow: 0 0 0 .22rem rgba(245, 158, 11, .18); background-color: var(--fg-card); color: var(--fg-text); }
.form-control::placeholder { color: #a0a9ba; }
[data-bs-theme="dark"] .form-control::placeholder { color: #64748b; }
.form-label { font-weight: 600; font-size: .83rem; color: var(--fg-text); margin-bottom: .35rem; }
.input-group-modern .input-group-text { background: var(--fg-soft-2); border-color: var(--fg-input-border); color: var(--fg-muted); border-radius: 12px 0 0 12px; min-width: 44px; justify-content: center; }
.input-group-modern .form-control, .input-group-modern .form-select { border-radius: 0 12px 12px 0; }
.input-group-modern .form-control:not(:last-child) { border-radius: 0; }
.input-group-modern .input-group-text:last-child { border-radius: 0 12px 12px 0; }
.form-control.is-invalid, .form-select.is-invalid { background-image: none; padding-right: .9rem; }
.form-control.is-valid, .form-select.is-valid { background-image: none; padding-right: .9rem; border-color: #86efac; }
.parsley-msg span, .invalid-feedback { font-size: .76rem; font-weight: 600; }
.form-check-input:checked { background-color: var(--fg-orange); border-color: var(--fg-orange); }

.choice-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice label { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; padding: 14px 10px; border: 2px solid var(--fg-border); border-radius: 16px; cursor: pointer; font-weight: 600; font-size: .85rem; background: var(--fg-card); transition: all .15s; height: 100%; }
.choice label i { font-size: 1.6rem; }
.choice input:checked + label { border-color: var(--fg-amber); background: var(--fg-brand-soft); box-shadow: 0 6px 16px rgba(245, 158, 11, .18); }
.choice input:focus-visible + label { outline: 2px solid var(--fg-orange); }

/* OK / Not OK toggle (checklists) */
.okbar { display: flex; gap: 6px; }
.okbar input { display: none; }
.okbar label { flex: 1; text-align: center; padding: 8px 10px; border-radius: 12px; border: 2px solid var(--fg-border); font-weight: 700; font-size: .82rem; cursor: pointer; background: var(--fg-card); }
.okbar input.ok:checked + label { border-color: #16a34a; background: var(--t-success-bg); color: var(--t-success-fg); }
.okbar input.nok:checked + label { border-color: #dc2626; background: var(--t-danger-bg); color: var(--t-danger-fg); }
.check-item { border: 1px solid var(--fg-border); border-radius: 14px; padding: 12px; margin-bottom: 10px; }

.photo-preview { width: 100%; max-height: 220px; object-fit: cover; border-radius: 14px; border: 1px solid var(--fg-border); }
.thumb { width: 54px; height: 54px; border-radius: 12px; object-fit: cover; border: 1px solid var(--fg-border); }

/* ---------- Modal / dropdown / alerts ---------- */
.modal-content { border: 0; border-radius: 22px; box-shadow: 0 30px 80px rgba(15, 23, 42, .25); background: var(--fg-card); }
.modal-header { border-bottom: 1px solid var(--fg-border); padding: 16px 20px; }
.modal-header .modal-title { font-weight: 800; font-size: 1.05rem; display: flex; align-items: center; gap: 10px; }
.modal-header .mt-icon { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; background: var(--fg-brand-soft); color: var(--fg-orange); }
.modal-body { padding: 20px; }
.modal-footer { border-top: 1px solid var(--fg-border); padding: 12px 20px; }
@media (max-width: 575.98px) { .modal-fullscreen-sm-down .modal-content { border-radius: 0; } }
.dropdown-menu { background: var(--fg-card); border-color: var(--fg-border); }
.callout { border-radius: 14px; padding: 10px 14px; font-size: .85rem; display: flex; gap: 10px; align-items: flex-start; }
.callout i { font-size: 1.05rem; margin-top: 1px; }

/* ---------- Empty / load more / skeleton ---------- */
.empty-state { text-align: center; padding: 48px 20px; background: var(--fg-card); border: 2px dashed var(--fg-border); border-radius: var(--fg-radius); }
.empty-state .es-icon { width: 80px; height: 80px; border-radius: 24px; margin: 0 auto 14px; display: grid; place-items: center; font-size: 36px; background: var(--fg-brand-soft); color: var(--fg-orange); }
.load-more-wrap { text-align: center; margin: 22px 0 6px; }
.load-more-wrap .btn { min-width: 200px; }
.end-of-list { color: var(--fg-muted); font-size: .8rem; }
.end-of-list::before, .end-of-list::after { content: ''; display: inline-block; width: 40px; height: 1px; background: var(--fg-border); vertical-align: middle; margin: 0 10px; }
.skeleton { background: linear-gradient(90deg, var(--fg-soft) 25%, var(--fg-soft-2) 37%, var(--fg-soft) 63%); background-size: 400% 100%; animation: sk 1.2s ease infinite; border-radius: 12px; }
@keyframes sk { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
.loading-dim { opacity: .55; pointer-events: none; transition: opacity .15s; }

/* ---------- Wizard / tabs ---------- */
.wizard-steps, .tab-pills { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 18px; scrollbar-width: none; }
.wizard-steps .ws { flex: 1; min-width: 110px; display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 14px; background: var(--fg-card); border: 1px solid var(--fg-border); font-size: .8rem; font-weight: 600; color: var(--fg-muted); white-space: nowrap; }
.wizard-steps .ws .n { width: 26px; height: 26px; border-radius: 9px; display: grid; place-items: center; background: var(--fg-soft); font-size: .78rem; }
.wizard-steps .ws.active { border-color: var(--fg-amber); color: var(--fg-heading); box-shadow: 0 6px 16px rgba(245, 158, 11, .15); }
.wizard-steps .ws.active .n { background: var(--fg-amber); color: #fff; }
.wizard-steps .ws.done .n { background: #16a34a; color: #fff; }
.tab-pills .tp { white-space: nowrap; display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 12px; background: var(--fg-card); border: 1px solid var(--fg-border);
    font-weight: 600; font-size: .85rem; color: var(--fg-text); cursor: pointer; }
.tab-pills .tp.active { background: var(--fg-heading); color: var(--fg-card); border-color: var(--fg-heading); }

/* Report rows */
.report-row { display: grid; gap: 4px 14px; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); padding: 12px 14px; border-bottom: 1px solid var(--fg-border); }
.report-row:last-child { border-bottom: 0; }
.report-row .k { font-size: .68rem; text-transform: uppercase; letter-spacing: .04em; color: var(--fg-muted); font-weight: 600; }
.report-row .v { font-weight: 700; font-size: .88rem; color: var(--fg-heading); word-break: break-word; }

/* ---------- Login ---------- */
.guest-body { min-height: 100vh; background: var(--fg-navy); }
.auth-wrap { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.auth-art { position: relative; overflow: hidden; color: #fff; padding: 48px; display: flex; flex-direction: column; justify-content: space-between;
    background: radial-gradient(900px 500px at 10% 0%, rgba(245, 158, 11, .35), transparent 60%), radial-gradient(700px 500px at 100% 100%, rgba(13, 148, 136, .35), transparent 60%), var(--fg-navy); }
.auth-art .big-icon { position: absolute; right: -60px; bottom: -60px; font-size: 380px; opacity: .06; }
.auth-feature { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 18px; }
.auth-feature i { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; background: rgba(255, 255, 255, .08); color: var(--fg-amber); font-size: 20px; flex-shrink: 0; }
.auth-form-side { background: var(--fg-bg); display: flex; align-items: center; justify-content: center; padding: 32px 18px; }
.auth-card { width: 100%; max-width: 420px; }
@media (max-width: 991.98px) { .auth-wrap { grid-template-columns: 1fr; } .auth-art { display: none; } .auth-form-side { min-height: 100vh; } }

/* ---------- Toastr ---------- */
#toast-container > div.toast { border-radius: 14px; box-shadow: 0 12px 30px rgba(15, 23, 42, .2); opacity: 1; padding: 14px 16px 14px 18px; background-image: none !important; font-family: var(--bs-body-font-family); font-weight: 500; width: 340px; }
#toast-container > div .toast-message { display: flex; align-items: flex-start; gap: 8px; line-height: 1.35; }
#toast-container > div .toast-message i { margin: 1px 0 0 0 !important; font-size: 1.05rem; }
#toast-container > .toast-success { background-color: #15803d; }
#toast-container > .toast-error { background-color: #b91c1c; }
#toast-container > .toast-warning { background-color: #b45309; }
#toast-container > .toast-info { background-color: #1e3a8a; }
@media (max-width: 575.98px) { #toast-container.toast-top-right { top: 10px; right: 10px; left: 10px; } #toast-container > div.toast { width: 100%; } }

/* ---------- Print ---------- */
@media print {
    .app-sidebar, .app-topbar, .bottom-nav, .fab, .filter-bar, .no-print, #toast-container { display: none !important; }
    .app-main { margin: 0 !important; }
    .app-content { padding: 0 !important; }
    body { background: #fff !important; }
    .data-card, .card-x, .stat { box-shadow: none !important; break-inside: avoid; }
}
