/* =====================================================================
   Ream Taxi — të gjitha stilet
   1. BAZA (ngjyrat, butonat, fushat, autocomplete, distinktivët)
   2. FAQJA PUBLIKE    (body.site)
   3. PANELI I ADMINIT (body.adm)
   ===================================================================== */
:root {
  --brand: #ffc72c;
  --brand-dark: #e5a900;
  --brand-ink: #1a1400;
  --ink: #0f172a;
  --ink-2: #334155;
  --muted: #64748b;
  --line: #e2e8f0;
  --line-2: #cbd5e1;
  --bg: #f6f7f9;
  --card: #ffffff;
  --green: #16a34a;
  --green-bg: #dcfce7;
  --blue: #2563eb;
  --blue-bg: #dbeafe;
  --amber: #b45309;
  --amber-bg: #fef3c7;
  --red: #dc2626;
  --red-bg: #fee2e2;
  --gray-bg: #f1f5f9;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 1px 3px rgba(15, 23, 42, .08);
  --shadow-lg: 0 10px 30px rgba(15, 23, 42, .12), 0 2px 6px rgba(15, 23, 42, .06);
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 15px; line-height: 1.5; color: var(--ink); background: var(--bg); }
a { color: inherit; }
img, svg { display: block; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; letter-spacing: -.01em; }
p { margin: 0; }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }

.icon { width: 18px; height: 18px; flex: none; }
.icon-sm { width: 15px; height: 15px; flex: none; }
.icon-lg { width: 22px; height: 22px; flex: none; }

/* ---------- Butonat */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 16px; border-radius: var(--radius-sm);
  border: 1px solid transparent; background: var(--gray-bg); color: var(--ink);
  font-weight: 600; font-size: 14px; text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background .15s, border-color .15s, opacity .15s, transform .05s;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--brand); color: var(--brand-ink); }
.btn-primary:hover { background: var(--brand-dark); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: #1e293b; }
.btn-outline { background: #fff; border-color: var(--line-2); }
.btn-outline:hover { background: var(--gray-bg); }
.btn-ghost { background: transparent; }
.btn-ghost:hover { background: var(--gray-bg); }
.btn-danger { background: var(--red-bg); color: var(--red); }
.btn-danger:hover { background: #fecaca; }
.btn-success { background: var(--green); color: #fff; }
.btn-success:hover { background: #15803d; }
.btn-sm { height: 32px; padding: 0 11px; font-size: 13px; gap: 6px; }
.btn-lg { height: 52px; padding: 0 22px; font-size: 16px; border-radius: var(--radius); }
.btn-block { width: 100%; }
.btn-icon { width: 40px; padding: 0; }
.btn-icon.btn-sm { width: 32px; }

/* ---------- Format */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label, .label { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.input, .select, .textarea {
  width: 100%; height: 42px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: var(--radius-sm);
  background: #fff; color: var(--ink); font: inherit; font-size: 15px; outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.textarea { height: auto; min-height: 80px; padding: 10px 12px; resize: vertical; line-height: 1.45; }
.select { appearance: none; padding-right: 34px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%2364748b' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--ink); box-shadow: 0 0 0 3px rgba(15, 23, 42, .08); }
.input.is-invalid, .select.is-invalid { border-color: var(--red); }
.field-error { font-size: 12.5px; color: var(--red); }
.hint { font-size: 12.5px; color: var(--muted); }
.row { display: grid; gap: 12px; grid-template-columns: 1fr 1fr; }
@media (max-width: 520px) { .row.row-stack { grid-template-columns: 1fr; } }

.check { display: flex; align-items: center; gap: 10px; cursor: pointer; font-size: 14px; }
.check input { width: 18px; height: 18px; accent-color: var(--ink); }

/* Segmented control */
.segmented { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; padding: 4px; gap: 4px; background: var(--gray-bg); border-radius: 10px; }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented label { display: flex; align-items: center; justify-content: center; gap: 6px; height: 36px; border-radius: 7px; font-weight: 600; font-size: 14px; color: var(--muted); cursor: pointer; }
.segmented input:checked + label { background: #fff; color: var(--ink); box-shadow: var(--shadow); }
.segmented input:focus-visible + label { outline: 2px solid var(--ink); }

/* Stepper */
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line-2); border-radius: var(--radius-sm); overflow: hidden; background: #fff; }
.stepper button { width: 42px; height: 40px; border: 0; background: transparent; font-size: 20px; cursor: pointer; }
.stepper button:hover { background: var(--gray-bg); }
.stepper button:disabled { color: var(--line-2); cursor: default; background: transparent; }
.stepper output { min-width: 34px; text-align: center; font-weight: 700; }

/* ---------- Autocomplete adresash */
.place { position: relative; }
.place-list {
  position: absolute; z-index: 50; left: 0; right: 0; top: calc(100% + 4px);
  margin: 0; padding: 4px; list-style: none; background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius-sm); box-shadow: var(--shadow-lg); max-height: 300px; overflow-y: auto;
}
.place-list li { display: flex; gap: 10px; align-items: flex-start; padding: 9px 10px; border-radius: 6px; cursor: pointer; }
.place-list li[aria-selected="true"], .place-list li:hover { background: var(--gray-bg); }
.place-list .p-main { font-weight: 600; font-size: 14px; }
.place-list .p-sub { font-size: 12.5px; color: var(--muted); }
.place-list .icon { color: var(--muted); margin-top: 2px; }
.place-list .p-empty { color: var(--muted); font-size: 13px; cursor: default; }
.place-list .p-empty:hover { background: transparent; }

/* ---------- Distinktivë */
.badge { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px; border-radius: 99px; font-size: 12px; font-weight: 600; white-space: nowrap; background: var(--gray-bg); color: var(--ink-2); }
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: .85; }
.badge.no-dot::before { display: none; }
.badge-pending, .badge-amber { background: var(--amber-bg); color: var(--amber); }
.badge-accepted, .badge-blue, .badge-busy { background: var(--blue-bg); color: var(--blue); }
.badge-completed, .badge-green, .badge-free { background: var(--green-bg); color: var(--green); }
.badge-cancelled, .badge-red { background: var(--red-bg); color: var(--red); }
.badge-offline, .badge-off_shift, .badge-inactive { background: var(--gray-bg); color: var(--muted); }

.spinner { width: 18px; height: 18px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }
.mono { font-variant-numeric: tabular-nums; }
.brand-mark { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; background: var(--brand); color: var(--brand-ink); flex: none; }
.notice { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: var(--radius-sm); font-size: 14px; }
.notice a { font-weight: 600; }
.notice-error { background: var(--red-bg); color: #991b1b; }
.notice-warn { background: var(--amber-bg); color: #92400e; }
.notice-info { background: var(--blue-bg); color: #1e40af; }
.notice-success { background: var(--green-bg); color: #166534; }
.place-list .p-cat { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }

/* =====================================================================
   2. FAQJA PUBLIKE (body.site)
   ===================================================================== */
body.site { background: #fff; min-height: 100vh; }
.site .app { min-height: 100vh; display: flex; flex-direction: column; }
.site .topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  height: 60px; padding: 0 16px; padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right));
  background: var(--ink); color: #fff;
}
.site .brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: #fff; min-width: 0; }
.site .brand img { max-height: 38px; max-width: 180px; object-fit: contain; }
.site .brand-name { font-weight: 800; font-size: 17px; letter-spacing: -.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.site .top-right { display: flex; align-items: center; gap: 8px; }
.site .topbar .btn-outline { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .25); }
.site .topbar .btn-outline:hover { background: rgba(255, 255, 255, .08); }
.site .lang { display: flex; gap: 4px; }
.site .lang a { display: inline-flex; align-items: center; gap: 6px; padding: 5px 8px; border: 1px solid rgba(255, 255, 255, .25); border-radius: 8px; font-size: 12.5px; font-weight: 700; color: #cbd5e1; text-decoration: none; opacity: .75; }
.site .lang a:hover { opacity: 1; }
.site .lang a.active { background: #fff; color: var(--ink); border-color: #fff; opacity: 1; }
.site .lang .flag { width: 22px; height: 16px; border-radius: 2px; object-fit: cover; box-shadow: 0 0 0 1px rgba(0, 0, 0, .15); }

/* Telefoni me prefiks shteti (faqja publike + paneli) */
.tel { position: relative; display: flex; }
.tel .input { border-top-left-radius: 0; border-bottom-left-radius: 0; min-width: 0; }
.tel-cc { display: inline-flex; align-items: center; gap: 6px; flex: none; padding: 0 9px; border: 1px solid var(--line-2); border-right: 0; border-radius: var(--radius-sm) 0 0 var(--radius-sm); background: #f8fafc; font: inherit; font-weight: 600; color: var(--ink); cursor: pointer; }
.tel-cc:hover { background: #f1f5f9; }
.tel-caret { font-size: 10px; color: #64748b; }
.tel .flag, .tel-menu .flag { width: 20px; height: 15px; border-radius: 2px; object-fit: cover; flex: none; box-shadow: 0 0 0 1px rgba(0, 0, 0, .12); }
.tel-menu { position: absolute; z-index: 60; top: calc(100% + 4px); left: 0; width: min(320px, 100%); max-width: 92vw; background: #fff; border: 1px solid var(--line-2); border-radius: var(--radius-sm); box-shadow: 0 12px 32px rgba(15, 23, 42, .16); overflow: hidden; }
.tel-search { width: 100%; height: 38px; padding: 0 12px; border: 0; border-bottom: 1px solid var(--line); font: inherit; outline: none; }
.tel-menu ul { list-style: none; margin: 0; padding: 4px 0; max-height: 260px; overflow-y: auto; }
.tel-menu li { display: flex; align-items: center; gap: 10px; padding: 7px 12px; cursor: pointer; font-size: 14px; }
.tel-menu li:hover { background: #f1f5f9; }
.tel-menu li.active { background: #eef2ff; font-weight: 600; }
.tel-menu li.sep { border-bottom: 1px solid var(--line); margin-bottom: 4px; padding-bottom: 9px; }
.tel-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tel-dial { color: #64748b; font-variant-numeric: tabular-nums; }
.tel-none { color: #64748b; cursor: default; }
.adm .tel-cc { padding: 0 7px; font-size: 13px; }
@media (max-width: 420px) { .site .topbar .btn span { display: none; } .site .topbar .btn { width: 36px; padding: 0; } }

.site .layout { flex: 1; display: grid; grid-template-columns: minmax(380px, 460px) 1fr; min-height: 0; }
.site .panel { padding: 28px 28px 40px; overflow-y: auto; height: calc(100vh - 60px); border-right: 1px solid var(--line); }
.site .map-wrap { position: relative; height: calc(100vh - 60px); }
.site .map { position: absolute; inset: 0; background: #e5e7eb; }
.site .map-mobile { display: none; }
@media (max-width: 860px) {
  .site .layout { grid-template-columns: 1fr; }
  .site .panel { height: auto; padding: 18px 16px 32px; border-right: 0; overflow: visible; }
  .site .map-wrap { display: none; }
  .site .map-mobile { display: block; height: 260px; margin: 0 -16px; position: relative; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
  .site .map-mobile .map { position: absolute; inset: 0; }
}

.site .booking { display: flex; flex-direction: column; gap: 18px; }
.site .intro h1 { font-size: 26px; font-weight: 800; letter-spacing: -.03em; }
.site .intro p { margin-top: 4px; font-size: 14px; }
.site .route-box { position: relative; display: flex; gap: 10px; padding: 10px 10px 10px 14px; border: 1px solid var(--line-2); border-radius: var(--radius); background: #fff; }
.site .route-line { display: flex; flex-direction: column; align-items: center; padding: 18px 0; }
.site .route-line .dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.site .route-line .dot-a { background: var(--ink); }
.site .route-line .dot-b { background: var(--brand-dark); border-radius: 2px; }
.site .route-line .dash { flex: 1; width: 2px; margin: 4px 0; background: repeating-linear-gradient(var(--line-2) 0 4px, transparent 4px 8px); }
.site .route-fields { flex: 1; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.site .input-route { border: 0; background: var(--gray-bg); height: 46px; padding-right: 40px; font-weight: 500; }
.site .input-route:focus { box-shadow: 0 0 0 2px var(--ink); background: #fff; }
.site .locate { position: absolute; right: 6px; top: 7px; width: 32px; height: 32px; display: grid; place-items: center; border: 0; border-radius: 8px; background: transparent; color: var(--ink-2); cursor: pointer; }
.site .locate:hover { background: #fff; }
.site .locate.loading .icon-sm { animation: spin 1s linear infinite; }
.site .swap { align-self: center; width: 34px; height: 34px; border: 1px solid var(--line-2); border-radius: 50%; background: #fff; cursor: pointer; font-size: 17px; line-height: 1; color: var(--ink-2); flex: none; }
.site .swap:hover { background: var(--gray-bg); }
.site .quote { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 16px; border-radius: var(--radius); background: var(--ink); color: #fff; }
.site .quote-stats { display: flex; gap: 22px; }
.site .quote .q-label { display: block; font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; opacity: .65; font-weight: 600; }
.site .quote strong { font-size: 16px; font-weight: 700; }
.site .quote-price { text-align: right; }
.site .quote-price strong { font-size: 24px; color: var(--brand); letter-spacing: -.02em; }
.site .quote.loading { opacity: .6; }
.site .group { display: flex; flex-direction: column; gap: 10px; margin: 0; padding: 0; border: 0; min-width: 0; }
.site .group legend { margin-bottom: 10px; padding: 0; }
.site .group-inline { flex-direction: row; align-items: center; justify-content: space-between; }
.site .fine { font-size: 12px; color: var(--muted); text-align: center; margin-top: -6px; }
.site .hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.site .success { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 30px 0; }
.site .success-icon { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: var(--green-bg); color: var(--green); margin-bottom: 10px; animation: pop .35s ease-out; }
.site .success-icon .icon-lg { width: 30px; height: 30px; stroke-width: 3; }
@keyframes pop { from { transform: scale(.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.site .success h2 { font-size: 24px; font-weight: 800; }
.site .success-contact { width: 100%; display: flex; flex-direction: column; gap: 4px; margin: 10px 0 16px; padding: 14px 16px; border-radius: var(--radius); background: var(--green-bg); color: #166534; font-size: 14px; }
.site .success-contact strong { display: inline-flex; align-items: center; justify-content: center; gap: 6px; font-size: 16px; }
.site .success-list { width: 100%; margin: 0 0 14px; padding: 4px 16px; border: 1px solid var(--line); border-radius: var(--radius); text-align: left; }
.site .success-list div { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.site .success-list div:last-child { border-bottom: 0; }
.site .success-list dt { color: var(--muted); font-size: 14px; flex: none; }
.site .success-list dd { margin: 0; font-weight: 600; text-align: right; font-size: 14px; }
.site .success-note { font-size: 14px; color: var(--ink-2); margin-bottom: 14px; }
.site .closed { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding: 60px 10px; }
.site .closed-icon { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--amber-bg); color: var(--amber); }
.site .closed h1 { font-size: 22px; }
.marker { width: 18px; height: 18px; border-radius: 50%; border: 4px solid #fff; box-shadow: 0 1px 6px rgba(0, 0, 0, .35); }
.marker-a { background: var(--ink); }
.marker-b { background: var(--brand-dark); border-radius: 4px; }

/* =====================================================================
   3. PANELI I ADMINIT (body.adm) — kompakt, klasik
   ===================================================================== */
body.adm { background: #eef0f3; font-size: 13.5px; }
.adm .btn { height: 30px; padding: 0 10px; font-size: 13px; border-radius: 4px; gap: 6px; }
.adm .btn-sm { height: 26px; padding: 0 8px; font-size: 12.5px; }
.adm .btn-icon { width: 30px; padding: 0; }
.adm .btn-icon.btn-sm { width: 26px; }
.adm .input, .adm .select { height: 32px; font-size: 13.5px; border-radius: 4px; padding: 0 9px; }
.adm .select { padding-right: 28px; background-position: right 7px center; }
.adm .textarea { font-size: 13.5px; border-radius: 4px; padding: 7px 9px; min-height: 60px; }
.adm .field { gap: 4px; }
.adm .field > label, .adm .label { font-size: 12px; }
.adm .badge { height: 20px; padding: 0 7px; font-size: 11.5px; border-radius: 3px; gap: 5px; }
.adm .badge::before { width: 6px; height: 6px; }
.adm .notice { padding: 7px 10px; font-size: 13px; border-radius: 4px; margin-bottom: 10px; }
.adm .segmented { padding: 3px; border-radius: 5px; }
.adm .segmented label { height: 28px; font-size: 13px; border-radius: 4px; }
.adm .row { gap: 10px; }

/* Shiriti i sipërm */
.adm-top { position: sticky; top: 0; z-index: 40; display: flex; align-items: stretch; gap: 4px; height: 46px; padding: 0 12px; background: var(--ink); color: #cbd5e1; }
.adm-brand { display: flex; align-items: center; gap: 8px; padding-right: 14px; margin-right: 4px; border-right: 1px solid rgba(255, 255, 255, .1); color: #fff; font-weight: 800; text-decoration: none; white-space: nowrap; }
.adm-brand .brand-mark { width: 26px; height: 26px; border-radius: 6px; }
.adm-brand .brand-mark .icon { width: 15px; height: 15px; }
.adm-nav { display: flex; align-items: stretch; overflow-x: auto; scrollbar-width: none; flex: 1; min-width: 0; }
.adm-nav::-webkit-scrollbar { display: none; }
.adm-nav a { display: flex; align-items: center; gap: 6px; padding: 0 11px; color: #cbd5e1; text-decoration: none; font-weight: 500; white-space: nowrap; border-bottom: 3px solid transparent; border-top: 3px solid transparent; }
.adm-nav a:hover { color: #fff; background: rgba(255, 255, 255, .05); }
.adm-nav a.active { color: #fff; border-bottom-color: var(--brand); }
.adm-nav .count { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--brand); color: var(--brand-ink); font-size: 11px; font-weight: 700; display: grid; place-items: center; }
.adm-right { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.adm-user { color: #cbd5e1; text-decoration: none; font-size: 13px; }
a.adm-user:hover { color: #fff; }
.adm-right .btn-ghost { color: #cbd5e1; }
.adm-right .btn-ghost:hover { background: rgba(255, 255, 255, .08); color: #fff; }
@media (max-width: 700px) { .adm-user span, .adm-new span { display: none; } .adm-brand > span:not(.brand-mark) { display: none; } .adm-brand { padding-right: 8px; } }

.adm-main { padding: 12px 14px 30px; }
.page-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.page-head h1 { font-size: 16px; font-weight: 700; margin-right: auto; }
/* Treguesi "Live" i Qendrës */
.page-head h1.has-live { margin-right: 0; }
.live { display: inline-flex; align-items: center; gap: 6px; margin-right: auto; padding: 2px 8px; border-radius: 99px; background: var(--green-bg); color: #166534; font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; animation: live-pulse 1.6s ease-in-out infinite; }
.live.off { background: var(--red-bg); color: var(--red); }
.live.off::before { animation: none; }
@keyframes live-pulse { 50% { opacity: .25; } }
.page-head .back { color: var(--muted); text-decoration: none; display: inline-flex; align-items: center; gap: 4px; font-size: 13px; }

/* Kutitë dhe tabelat */
.box { background: #fff; border: 1px solid #d9dde3; border-radius: 4px; margin-bottom: 12px; min-width: 0; }
.box-head { display: flex; align-items: center; gap: 8px; min-height: 34px; padding: 4px 10px; background: #f6f7f9; border-bottom: 1px solid #e3e6ea; flex-wrap: wrap; }
.box-head h2 { font-size: 12.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: var(--ink-2); margin-right: auto; }
.box-head .muted { font-size: 12.5px; }
.box-body { padding: 10px; }
.box-foot { display: flex; justify-content: flex-end; gap: 6px; padding: 8px 10px; border-top: 1px solid #e3e6ea; background: #fafbfc; }
.box .empty-row { padding: 14px 10px; color: var(--muted); text-align: center; }

.tbl-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th { text-align: left; font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; padding: 6px 8px; border-bottom: 1px solid #e3e6ea; white-space: nowrap; background: #fafbfc; }
.tbl td { padding: 6px 8px; border-bottom: 1px solid #eceef1; vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr:hover { background: #f8fafc; }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tbl .nw { white-space: nowrap; }
.tbl .sub { display: block; font-size: 11.5px; color: var(--muted); line-height: 1.3; }
.tbl .id { font-weight: 700; text-decoration: none; }
.tbl .id:hover { text-decoration: underline; }
.tbl .route { max-width: 380px; }
.tbl .route div { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tbl .acts { display: flex; gap: 4px; justify-content: flex-end; align-items: center; flex-wrap: nowrap; }
.tbl .acts form { display: contents; }
.tbl tr.late td { background: #fff1f2; }
.tbl a { color: inherit; }
.select-xs { height: 26px !important; font-size: 12.5px !important; padding: 0 24px 0 6px !important; width: auto; max-width: 150px; }
.pin { display: inline-block; width: 7px; height: 7px; border-radius: 50%; flex: none; margin-right: 5px; transform: translateY(-1px); }
.pin-a { background: var(--ink); }
.pin-b { background: var(--brand-dark); border-radius: 1px; }
.when-asap { font-weight: 700; color: var(--red); }
.text-red { color: var(--red); }
.text-green { color: var(--green); }

/* Shiriti i shifrave */
.kpis { display: flex; flex-wrap: wrap; background: #fff; border: 1px solid #d9dde3; border-radius: 4px; margin-bottom: 12px; }
.kpi { flex: 1 1 120px; padding: 7px 12px; border-right: 1px solid #eceef1; }
.kpi:last-child { border-right: 0; }
.kpi span { display: block; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; font-weight: 600; }
.kpi strong { font-size: 18px; font-weight: 800; font-variant-numeric: tabular-nums; }
.kpi strong small { font-size: 12px; color: var(--muted); font-weight: 600; }
.kpi.warn { background: #fffbeb; }
.kpi.warn strong { color: var(--amber); }

.dash { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 12px; align-items: start; }
@media (max-width: 1100px) { .dash { grid-template-columns: 1fr; } }
.cols-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: start; }
.cols-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
@media (max-width: 860px) { .cols-2, .cols-3 { grid-template-columns: 1fr; } }
.stack { display: flex; flex-direction: column; gap: 10px; }

/* Filtrat */
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; }
.filters .field { min-width: 130px; }
.filters .grow { flex: 1; min-width: 180px; }
.chips { display: flex; flex-wrap: wrap; gap: 4px; }
.chip { display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 9px; border-radius: 3px; border: 1px solid #d9dde3; background: #fff; text-decoration: none; font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.chip:hover { background: var(--gray-bg); }
.chip.active { background: var(--ink); color: #fff; border-color: var(--ink); }
.chip b { font-weight: 700; opacity: .65; }
.pager { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 7px 10px; border-top: 1px solid #e3e6ea; font-size: 12.5px; color: var(--muted); }

/* Detajet */
.dl { display: grid; grid-template-columns: 130px 1fr; gap: 5px 12px; margin: 0; font-size: 13px; }
.dl dt { color: var(--muted); }
.dl dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 9px 16px; font-size: 12.5px; }
.timeline li::before { content: ""; position: absolute; left: 2px; top: 6px; width: 7px; height: 7px; border-radius: 50%; background: var(--line-2); }
.timeline .t-accepted::before, .timeline .t-assigned::before { background: var(--blue); }
.timeline .t-completed::before { background: var(--green); }
.timeline .t-cancelled::before, .timeline .t-expired::before, .timeline .t-alert::before { background: var(--red); }
.timeline time { display: block; font-size: 11.5px; color: var(--muted); }
.msg-body { white-space: pre-wrap; font-size: 12.5px; max-width: 560px; max-height: 54px; overflow: hidden; cursor: pointer; }
.msg-body.expanded { max-height: none; }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid #d9dde3; margin-bottom: 12px; overflow-x: auto; }
.tabs a { padding: 7px 12px; text-decoration: none; font-weight: 600; font-size: 13px; color: var(--muted); border: 1px solid transparent; border-bottom: 0; border-radius: 4px 4px 0 0; margin-bottom: -1px; white-space: nowrap; }
.tabs a:hover { color: var(--ink); }
.tabs a.active { color: var(--ink); background: #fff; border-color: #d9dde3; }
.section-title { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin-top: 4px; }
.code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; background: var(--gray-bg); padding: 6px 8px; border-radius: 4px; word-break: break-all; display: block; }
.vars { display: flex; flex-wrap: wrap; gap: 4px; }
.vars code { font-size: 11.5px; background: var(--gray-bg); padding: 1px 5px; border-radius: 3px; cursor: pointer; }
.tpl { padding: 10px; border-bottom: 1px solid #eceef1; display: flex; flex-direction: column; gap: 6px; }
.tpl:last-child { border-bottom: 0; }
.tpl-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tpl .textarea { font-size: 12.5px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.bars { display: flex; align-items: flex-end; gap: 3px; height: 110px; }
.bars .bar { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 3px; height: 100%; min-width: 0; }
.bars .bar i { display: block; width: 100%; max-width: 22px; background: var(--ink); border-radius: 2px 2px 0 0; min-height: 2px; }
.bars .bar.today i { background: var(--brand-dark); }
.bars .bar small { font-size: 10px; color: var(--muted); }
.state-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; background: var(--line-2); }
.state-dot.free { background: var(--green); }
.state-dot.busy { background: var(--blue); }

/* Paneli anësor i rezervimit të ri */
.drawer { position: fixed; inset: 0; z-index: 60; visibility: hidden; }
.drawer.open { visibility: visible; }
.drawer-backdrop { position: absolute; inset: 0; background: rgba(15, 23, 42, .35); opacity: 0; transition: opacity .15s; }
.drawer.open .drawer-backdrop { opacity: 1; }
.drawer-panel { position: absolute; right: 0; top: 0; bottom: 0; width: min(440px, 100%); background: #fff; display: flex; flex-direction: column; transform: translateX(100%); transition: transform .18s ease; box-shadow: var(--shadow-lg); }
.drawer.open .drawer-panel { transform: none; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 8px 12px; background: var(--ink); color: #fff; }
.drawer-head h2 { font-size: 14px; }
.drawer-head .btn-ghost { color: #fff; }
.drawer-head .btn-ghost:hover { background: rgba(255, 255, 255, .1); }
.drawer-body { flex: 1; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.drawer-foot { display: flex; justify-content: flex-end; gap: 6px; padding: 8px 12px; border-top: 1px solid #e3e6ea; background: #fafbfc; }
.drawer .notice { margin: 0; }
.history { display: flex; flex-direction: column; gap: 6px; padding: 7px 9px; border-radius: 4px; background: var(--blue-bg); font-size: 12.5px; color: #1e3a8a; }
.history .chip { height: 24px; font-weight: 500; border-color: #bfdbfe; }
.route-info { display: flex; gap: 12px; align-items: center; font-size: 12.5px; color: var(--ink-2); background: var(--gray-bg); border-radius: 4px; padding: 6px 9px; }
#bf-driver { margin-top: 6px; }

/* Dritaret */
.modal { border: 0; padding: 0; border-radius: 6px; box-shadow: var(--shadow-lg); width: min(420px, calc(100% - 24px)); }
.modal::backdrop { background: rgba(15, 23, 42, .4); }
.modal-panel { padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.modal-panel h3 { font-size: 15px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 6px; margin-top: 4px; }
.modal-wide { width: min(600px, calc(100% - 24px)); }
.toasts { position: fixed; right: 14px; bottom: 14px; z-index: 80; display: flex; flex-direction: column; gap: 6px; max-width: min(360px, calc(100% - 28px)); }
.toast { padding: 9px 12px; border-radius: 4px; background: var(--ink); color: #fff; font-size: 13px; box-shadow: var(--shadow-lg); animation: toast-in .15s ease-out; }
.toast-error { background: #991b1b; }
.toast-warn { background: #92400e; }
.toast-success { background: #166534; }
@keyframes toast-in { from { transform: translateY(6px); opacity: 0; } to { transform: none; opacity: 1; } }

/* Hyrja */
.auth-page { min-height: 100vh; display: grid; place-items: center; padding: 16px; background: var(--ink); }
.auth-card { width: min(360px, 100%); background: #fff; border-radius: 6px; padding: 22px; display: flex; flex-direction: column; gap: 12px; }
.auth-card h1 { font-size: 18px; }
.auth-brand { display: flex; align-items: center; gap: 8px; font-weight: 800; }
.auth-card .notice { margin: 0; }

/* =====================================================================
   4. PANELI NË CELULAR (<= 700px): menyja në rresht të dytë, tabelat si karta
   ===================================================================== */
@media (max-width: 700px) {
  .adm-top { flex-wrap: wrap; height: auto; padding: 0 8px; row-gap: 0; }
  .adm-brand { height: 46px; border-right: 0; }
  .adm-right { margin-left: auto; height: 46px; }
  .adm-new span { display: inline !important; }
  .adm-nav { order: 3; flex: 0 0 calc(100% + 16px); margin: 0 -8px; height: 40px; padding: 0 4px; border-top: 1px solid rgba(255, 255, 255, .1); }
  .adm-nav a { padding: 0 10px; font-size: 13px; }
  .adm-main { padding: 10px 8px 30px; }
  .page-head h1 { font-size: 15px; }

  .adm .tbl-wrap { overflow: visible; }
  .adm .tbl, .adm .tbl tbody, .adm .tbl tr, .adm .tbl td { display: block; width: 100%; }
  .adm .tbl thead { display: none; }
  .adm .tbl tr { padding: 8px 10px; border-bottom: 1px solid #e3e6ea; }
  .adm .tbl tr:last-child { border-bottom: 0; }
  .adm .tbl tbody tr:hover { background: transparent; }
  .adm .tbl tr.late { background: #fff1f2; }
  .adm .tbl tr.late td { background: transparent; }
  .adm .tbl td { position: relative; padding: 3px 0 3px 38%; border: 0; min-height: 22px; text-align: left; white-space: normal; }
  .adm .tbl td::before { content: attr(data-label); position: absolute; left: 0; top: 4px; width: 35%; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .adm .tbl td[data-label=""] { padding-left: 0; }
  .adm .tbl td[data-label=""]::before { display: none; }
  .adm .tbl td:empty { display: none; }
  .adm .tbl .num, .adm .tbl .nw { text-align: left; white-space: normal; }
  .adm .tbl .route { max-width: none; }
  .adm .tbl .route div { white-space: normal; }
  .adm .tbl .acts { justify-content: flex-start; flex-wrap: wrap; padding-top: 4px; }
  .adm .tbl .acts .btn { height: 32px; }
  .adm .tbl td[colspan] { text-align: center; }
  .select-xs { max-width: 100%; }

  .adm .input, .adm .select { height: 38px; font-size: 16px; }   /* 16px: iPhone nuk e zmadhon faqen */
  .adm .textarea { font-size: 16px; }
  .adm .btn { height: 34px; }
  .filters .field, .filters .grow { flex: 1 1 100%; min-width: 0; }
  .dl { grid-template-columns: 95px 1fr; }
  .kpi { flex: 1 1 45%; border-bottom: 1px solid #eceef1; }
  .drawer-panel { width: 100%; }
  .modal, .modal-wide { width: calc(100% - 16px); max-height: calc(100% - 16px); }
  .tel-menu { width: 100%; }
}

/* =====================================================================
   iOS (iPhone/iPad): Safari e zmadhon faqen vetë kur preket një fushë me
   shkrim nën 16px. Me 16px zmadhimi nuk ndodh. Vlen vetëm për iOS.
   ===================================================================== */
@supports (-webkit-touch-callout: none) {
  .input, .select, .textarea, .tel-search, .select-xs,
  .adm .input, .adm .select, .adm .textarea, .tpl .textarea { font-size: 16px !important; }
}
