/* Wheelivo — shared styles on top of Bootstrap 5.3 (light + dark via data-bs-theme). */
:root {
  --wv-navy: #0b2a5b;
  --wv-navy-2: #12397a;
  --wv-red: #e11d2a;
  --wv-red-soft: #fde8ea;
  --wv-bg: #f3f6fb;
  --wv-surface: #ffffff;
  --wv-surface-2: #f8fafc;
  --wv-border: #e3e8f0;
  --wv-text: #0f172a;
  --wv-muted: #64748b;
  --wv-sidebar: #0b2a5b;
  --wv-sidebar-text: #c9d6ee;
  --wv-shadow: 0 1px 2px rgba(15, 23, 42, .05), 0 4px 16px rgba(15, 23, 42, .05);
  --cat-corporate: #dbeafe; --cat-family: #dcfce7; --cat-school: #ffedd5; --cat-vonly: #fef9c3; --cat-vd: #dcfce7;
  --bs-primary: #0b2a5b; --bs-primary-rgb: 11, 42, 91;
  --bs-link-color: #12397a; --bs-link-color-rgb: 18, 57, 122;
  --bs-body-font-family: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
[data-bs-theme="dark"] {
  --wv-bg: #0b1220;
  --wv-surface: #111a2e;
  --wv-surface-2: #0f172a;
  --wv-border: #22304d;
  --wv-text: #e2e8f0;
  --wv-muted: #94a3b8;
  --wv-sidebar: #070d1a;
  --wv-red-soft: rgba(225, 29, 42, .15);
  --wv-shadow: 0 1px 2px rgba(0, 0, 0, .4);
  --cat-corporate: rgba(59, 130, 246, .18); --cat-family: rgba(34, 197, 94, .16); --cat-school: rgba(249, 115, 22, .18);
  --cat-vonly: rgba(234, 179, 8, .18); --cat-vd: rgba(34, 197, 94, .16);
  --bs-primary: #5b8def; --bs-primary-rgb: 91, 141, 239;
  --bs-link-color: #8fb3ff; --bs-link-color-rgb: 143, 179, 255;
  --bs-body-bg: #0b1220;
  --bs-body-color: #e2e8f0;
  --bs-border-color: #22304d;
  --bs-tertiary-bg: #111a2e;
  --bs-secondary-bg: #16213a;
}
html, body { background: var(--wv-bg); color: var(--wv-text); }
body { font-size: .925rem; -webkit-font-smoothing: antialiased; }
a { text-decoration: none; }
.btn-primary { --bs-btn-bg: var(--wv-navy); --bs-btn-border-color: var(--wv-navy); --bs-btn-hover-bg: var(--wv-navy-2); --bs-btn-hover-border-color: var(--wv-navy-2); --bs-btn-active-bg: #082046; }
[data-bs-theme="dark"] .btn-primary { --bs-btn-bg: #2f5fcf; --bs-btn-border-color: #2f5fcf; --bs-btn-hover-bg: #3d6ee0; --bs-btn-hover-border-color: #3d6ee0; }
.btn-red { --bs-btn-color: #fff; --bs-btn-bg: var(--wv-red); --bs-btn-border-color: var(--wv-red); --bs-btn-hover-color: #fff; --bs-btn-hover-bg: #c41522; --bs-btn-hover-border-color: #c41522; }
.btn-soft { background: var(--wv-surface-2); border: 1px solid var(--wv-border); color: var(--wv-text); }
.btn-soft:hover { background: var(--wv-border); color: var(--wv-text); }
.btn.loading { position: relative; color: transparent !important; pointer-events: none; }
.btn.loading::after { content: ""; position: absolute; inset: 0; margin: auto; width: 1rem; height: 1rem; border: 2px solid currentColor; border-color: #fff #fff transparent transparent; border-radius: 50%; animation: spin .7s linear infinite; }
.btn-soft.loading::after, .btn-outline-secondary.loading::after { border-color: var(--wv-muted) var(--wv-muted) transparent transparent; }
@keyframes spin { to { transform: rotate(360deg); } }
.muted, .text-muted { color: var(--wv-muted) !important; }
.tiny { font-size: .75rem; }
.small2 { font-size: .82rem; }
.fw-800 { font-weight: 800; }
.ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ─── App shell ─────────────────────────────────────────── */
.sidebar { position: fixed; inset: 0 auto 0 0; width: 252px; background: var(--wv-sidebar); color: var(--wv-sidebar-text); overflow-y: auto; z-index: 1040; display: flex; flex-direction: column; padding: 12px 10px 16px; transition: transform .2s; }
.sidebar .brand { display: flex; align-items: center; gap: 10px; padding: 6px 8px 14px; border-bottom: 1px solid rgba(255,255,255,.08); margin-bottom: 8px; color: #fff; }
.sidebar .brand img { height: 38px; width: 38px; border-radius: 10px; background: #fff; object-fit: contain; padding: 2px; }
.sidebar .brand .n { font-weight: 800; font-size: .95rem; line-height: 1.15; }
.sidebar .brand .s { font-size: .7rem; opacity: .7; }
.sidebar .nl { font-size: .66rem; text-transform: uppercase; letter-spacing: .08em; color: #7f93b8; padding: 12px 10px 4px; font-weight: 700; }
.sidebar a.nv { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 9px; color: var(--wv-sidebar-text); font-weight: 500; font-size: .87rem; }
.sidebar a.nv i { font-size: 1.02rem; width: 20px; text-align: center; opacity: .9; }
.sidebar a.nv:hover { background: rgba(255,255,255,.07); color: #fff; }
.sidebar a.nv.active { background: linear-gradient(90deg, var(--wv-red), #f0434f); color: #fff; box-shadow: 0 4px 14px rgba(225,29,42,.35); }
.sidebar .foot { margin-top: auto; padding: 14px 8px 0; font-size: .7rem; color: #7f93b8; text-align: center; }
.sidebar .foot a { color: #fff; }
.topbar { position: sticky; top: 0; z-index: 1030; margin-left: 252px; height: 58px; display: flex; align-items: center; gap: 8px; padding: 0 18px; background: color-mix(in srgb, var(--wv-surface) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--wv-border); }
.topbar .ttl { font-weight: 700; font-size: 1.02rem; }
.icon-btn { width: 38px; height: 38px; border-radius: 10px; display: inline-grid; place-items: center; border: 1px solid var(--wv-border); background: var(--wv-surface); color: var(--wv-text); position: relative; }
.icon-btn:hover { background: var(--wv-surface-2); color: var(--wv-text); }
.icon-btn .dot { position: absolute; top: -4px; right: -4px; background: var(--wv-red); color: #fff; border-radius: 10px; font-size: .62rem; padding: 1px 5px; font-weight: 700; }
[data-bs-theme="light"] .theme-dark-ico, [data-bs-theme="dark"] .theme-light-ico { display: none; }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--wv-navy); color: #fff; display: inline-grid; place-items: center; font-weight: 700; font-size: .8rem; }
.page { margin-left: 252px; padding: 20px 22px 90px; max-width: 1500px; }
.sb-backdrop { display: none; }
@media (max-width: 991.98px) {
  .sidebar { transform: translateX(-100%); }
  body.sb-open .sidebar { transform: none; }
  body.sb-open .sb-backdrop { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 1035; }
  .topbar, .page { margin-left: 0; }
  .page { padding: 14px 12px 100px; }
}

/* ─── Cards & widgets ───────────────────────────────────── */
.card, .wcard { background: var(--wv-surface); border: 1px solid var(--wv-border); border-radius: 14px; box-shadow: var(--wv-shadow); }
.wcard { padding: 16px; }
.card-header { background: transparent; border-bottom: 1px solid var(--wv-border); font-weight: 700; }
.page-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 16px; }
.page-head h1 { font-size: 1.35rem; font-weight: 800; margin: 0; }
.page-head .sub { color: var(--wv-muted); font-size: .85rem; }
.kpi { background: var(--wv-surface); border: 1px solid var(--wv-border); border-radius: 14px; padding: 14px; height: 100%; box-shadow: var(--wv-shadow); display: flex; gap: 12px; align-items: center; color: var(--wv-text); }
a.kpi:hover { border-color: var(--bs-primary); color: var(--wv-text); }
.kpi .ic { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; font-size: 1.2rem; flex: none; }
.kpi .v { font-size: 1.3rem; font-weight: 800; line-height: 1.1; }
.kpi .l { font-size: .75rem; color: var(--wv-muted); font-weight: 600; }
.ic-blue { background: #dbeafe; color: #1d4ed8; } .ic-green { background: #dcfce7; color: #15803d; } .ic-red { background: #fee2e2; color: #b91c1c; }
.ic-amber { background: #fef3c7; color: #b45309; } .ic-purple { background: #f3e8ff; color: #7e22ce; } .ic-slate { background: #e2e8f0; color: #334155; }
.ic-cyan { background: #cffafe; color: #0e7490; } .ic-pink { background: #fce7f3; color: #be185d; }
[data-bs-theme="dark"] .ic-blue { background: rgba(59,130,246,.18); color: #93c5fd; } [data-bs-theme="dark"] .ic-green { background: rgba(34,197,94,.16); color: #86efac; }
[data-bs-theme="dark"] .ic-red { background: rgba(239,68,68,.16); color: #fca5a5; } [data-bs-theme="dark"] .ic-amber { background: rgba(245,158,11,.16); color: #fcd34d; }
[data-bs-theme="dark"] .ic-purple { background: rgba(168,85,247,.16); color: #d8b4fe; } [data-bs-theme="dark"] .ic-slate { background: rgba(148,163,184,.14); color: #cbd5e1; }
[data-bs-theme="dark"] .ic-cyan { background: rgba(6,182,212,.16); color: #67e8f9; } [data-bs-theme="dark"] .ic-pink { background: rgba(236,72,153,.16); color: #f9a8d4; }

.table { --bs-table-bg: transparent; margin: 0; }
.table > :not(caption) > * > * { padding: .55rem .7rem; border-bottom-color: var(--wv-border); vertical-align: middle; }
.table thead th { font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; color: var(--wv-muted); font-weight: 700; background: var(--wv-surface-2); white-space: nowrap; }
.table-hover > tbody > tr:hover > * { --bs-table-bg-state: var(--wv-surface-2); }
.table-wrap { overflow-x: auto; border-radius: 14px; }
td.num, th.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.form-control, .form-select { border-color: var(--wv-border); border-radius: 10px; font-size: .9rem; }
.form-label { font-size: .78rem; font-weight: 700; color: var(--wv-muted); margin-bottom: .25rem; }
.form-section { font-size: .78rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--wv-red); margin: 10px 0 2px; padding-top: 8px; border-top: 1px dashed var(--wv-border); }
.req::after { content: " *"; color: var(--wv-red); }

/* ─── Status pills & category colors ────────────────────── */
.pill { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 99px; font-size: .72rem; font-weight: 700; white-space: nowrap; }
.st-enquiry { background: #e0e7ff; color: #3730a3; } .st-confirmed { background: #dbeafe; color: #1d4ed8; } .st-pending { background: #fef3c7; color: #92400e; }
.st-assigned { background: #cffafe; color: #155e75; } .st-live { background: #dcfce7; color: #166534; } .st-done { background: #e2e8f0; color: #334155; } .st-cancel { background: #fee2e2; color: #991b1b; }
[data-bs-theme="dark"] .st-enquiry { background: rgba(99,102,241,.2); color: #c7d2fe; } [data-bs-theme="dark"] .st-confirmed { background: rgba(59,130,246,.2); color: #bfdbfe; }
[data-bs-theme="dark"] .st-pending { background: rgba(245,158,11,.2); color: #fde68a; } [data-bs-theme="dark"] .st-assigned { background: rgba(6,182,212,.2); color: #a5f3fc; }
[data-bs-theme="dark"] .st-live { background: rgba(34,197,94,.2); color: #bbf7d0; } [data-bs-theme="dark"] .st-done { background: rgba(148,163,184,.18); color: #e2e8f0; } [data-bs-theme="dark"] .st-cancel { background: rgba(239,68,68,.2); color: #fecaca; }
.live-dot { width: 9px; height: 9px; border-radius: 50%; background: #22c55e; display: inline-block; box-shadow: 0 0 0 0 rgba(34,197,94,.6); animation: pulse 1.6s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 8px rgba(34,197,94,0); } 100% { box-shadow: 0 0 0 0 rgba(34,197,94,0); } }
.cat-tag { padding: 2px 8px; border-radius: 6px; font-size: .72rem; font-weight: 600; color: var(--wv-text); border: 1px solid rgba(0,0,0,.05); }
.mode-vonly { background: var(--cat-vonly); } .mode-vd { background: var(--cat-vd); } .mode-pending { background: var(--wv-surface-2); }
[data-bs-theme="dark"] .cat-tag { filter: saturate(.9); }
.live-card { border-left: 4px solid #22c55e !important; }

/* ─── Booking calendar ──────────────────────────────────── */
.cal-wrap { overflow: auto; max-height: 70vh; border: 1px solid var(--wv-border); border-radius: 12px; }
.cal { border-collapse: separate; border-spacing: 0; font-size: .78rem; min-width: 100%; }
.cal th, .cal td { border-right: 1px solid var(--wv-border); border-bottom: 1px solid var(--wv-border); padding: 4px; min-width: 44px; text-align: center; background: var(--wv-surface); }
.cal thead th { position: sticky; top: 0; z-index: 2; background: var(--wv-surface-2); font-weight: 700; }
.cal td.veh, .cal th.veh { position: sticky; left: 0; z-index: 1; text-align: left; min-width: 170px; background: var(--wv-surface-2); font-weight: 600; }
.cal thead th.veh { z-index: 3; }
.cal td.busy { background: #fee2e2; color: #991b1b; font-weight: 700; cursor: pointer; }
.cal td.busy.live { background: #dcfce7; color: #166534; }
.cal td.maint { background: repeating-linear-gradient(45deg, #f1f5f9, #f1f5f9 4px, #e2e8f0 4px, #e2e8f0 8px); }
.cal td.free { color: #16a34a; }
.cal th.today, .cal td.today { box-shadow: inset 0 0 0 2px var(--wv-red); }
.cal .sum td { font-weight: 700; background: var(--wv-surface-2); }
[data-bs-theme="dark"] .cal td.busy { background: rgba(239,68,68,.22); color: #fecaca; }
[data-bs-theme="dark"] .cal td.busy.live { background: rgba(34,197,94,.22); color: #bbf7d0; }
[data-bs-theme="dark"] .cal td.maint { background: repeating-linear-gradient(45deg, #111a2e, #111a2e 4px, #1b2742 4px, #1b2742 8px); }

/* ─── Toasts ────────────────────────────────────────────── */
.toasts { position: fixed; top: 70px; right: 16px; z-index: 2000; display: flex; flex-direction: column; gap: 8px; max-width: calc(100vw - 32px); }
.wtoast { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-radius: 12px; background: #0f172a; color: #fff; box-shadow: 0 10px 30px rgba(0,0,0,.25); font-weight: 600; font-size: .88rem; animation: tin .25s; max-width: 420px; }
.wtoast.ok i { color: #4ade80; } .wtoast.err { background: #7f1d1d; } .wtoast.err i { color: #fecaca; } .wtoast.out { opacity: 0; transform: translateY(-8px); transition: .3s; }
@keyframes tin { from { opacity: 0; transform: translateY(-8px); } }

/* ─── Floating contact buttons (Soft Udyog) ─────────────── */
.float-contact { position: fixed; right: 16px; bottom: 18px; z-index: 1500; display: flex; flex-direction: column; gap: 10px; }
.float-contact a { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-size: 1.45rem; box-shadow: 0 8px 22px rgba(0,0,0,.25); transition: transform .15s; position: relative; }
.float-contact a:hover { transform: scale(1.08); color: #fff; }
.float-contact .wa { background: #25d366; }
.float-contact .call { background: var(--wv-red); }
.float-contact a span { position: absolute; right: 62px; white-space: nowrap; background: #0f172a; color: #fff; font-size: .75rem; font-weight: 600; padding: 4px 10px; border-radius: 8px; opacity: 0; pointer-events: none; transition: .15s; }
.float-contact a:hover span { opacity: 1; }
.app-float .float-contact a { width: 44px; height: 44px; font-size: 1.2rem; }

/* ─── Misc ──────────────────────────────────────────────── */
.empty { text-align: center; padding: 40px 16px; color: var(--wv-muted); }
.empty i { font-size: 2.4rem; display: block; margin-bottom: 8px; opacity: .5; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.photo-grid .ph { position: relative; border-radius: 12px; overflow: hidden; border: 1px solid var(--wv-border); aspect-ratio: 4/3; background: var(--wv-surface-2); }
.photo-grid .ph img { width: 100%; height: 100%; object-fit: cover; }
.photo-grid .ph .lbl { position: absolute; left: 6px; bottom: 6px; background: rgba(0,0,0,.6); color: #fff; font-size: .7rem; padding: 1px 7px; border-radius: 6px; }
.photo-grid .ph .del { position: absolute; right: 6px; top: 6px; }
.dl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px 18px; }
.dl-grid .k { font-size: .72rem; color: var(--wv-muted); font-weight: 700; text-transform: uppercase; letter-spacing: .03em; }
.dl-grid .v { font-weight: 600; }
.nav-tabs .nav-link { color: var(--wv-muted); font-weight: 600; }
.nav-tabs .nav-link.active { color: var(--wv-text); background: var(--wv-surface); border-color: var(--wv-border) var(--wv-border) var(--wv-surface); }
.announce { border-radius: 12px; padding: 10px 14px; background: var(--wv-red-soft); border: 1px solid rgba(225,29,42,.25); margin-bottom: 14px; }
.calc-box { background: var(--wv-surface-2); border: 1px dashed var(--wv-border); border-radius: 12px; padding: 12px; }
.calc-box .row-x { display: flex; justify-content: space-between; padding: 2px 0; }
.calc-box .tot { font-weight: 800; font-size: 1.05rem; border-top: 1px solid var(--wv-border); margin-top: 6px; padding-top: 6px; }
.sel-strike { text-decoration: line-through; opacity: .55; }
.perm-table td, .perm-table th { text-align: center; }
.perm-table td:first-child, .perm-table th:first-child { text-align: left; }
.fin-cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.fin-cal .d { background: var(--wv-surface); border: 1px solid var(--wv-border); border-radius: 10px; min-height: 64px; padding: 4px; font-size: .68rem; cursor: pointer; }
.fin-cal .d.out { opacity: .35; }
.fin-cal .d .n { font-weight: 800; font-size: .8rem; }
.fin-cal .d.today { border-color: var(--wv-red); }
.fin-cal .h { text-align: center; font-size: .68rem; font-weight: 700; color: var(--wv-muted); }
.fin-cal .e { color: #16a34a; font-weight: 700; } .fin-cal .x { color: #dc2626; font-weight: 700; }
@media print {
  .sidebar, .topbar, .float-contact, .no-print, .toasts { display: none !important; }
  .page { margin: 0; padding: 0; }
  body, html { background: #fff; }
  .card, .wcard { box-shadow: none; border: 0; }
}
