/* ── Reset & base ─────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --hour-h: 56;  /* unitless px — read by JS for dynamic layout */
  --col-w:  130px;
  --green:       #1a7340;
  --green-dk:    #155c33;
  --green-lt:    #e6f4ed;
  --green-mid:   #b7dfc9;
  --amber:       #d97706;
  --amber-lt:    #fef3c7;
  --red:         #dc2626;
  --red-lt:      #fee2e2;
  --blue:        #2563eb;
  --blue-lt:     #dbeafe;
  --gray-50:     #f9fafb;
  --gray-100:    #f3f4f6;
  --gray-200:    #e5e7eb;
  --gray-300:    #d1d5db;
  --gray-400:    #9ca3af;
  --gray-600:    #4b5563;
  --gray-700:    #374151;
  --gray-900:    #111827;
  --radius:      12px;
  --radius-sm:   8px;
  --shadow:      0 1px 3px rgba(0,0,0,.10), 0 4px 12px rgba(0,0,0,.06);
  --font:        -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

html, body { height: 100%; font-family: var(--font); background: #ffffff; color: var(--gray-900); -webkit-text-size-adjust: 100%; }

.hidden { display: none !important; }

/* ── Screens ──────────────────────────────────────────────────────────────── */
.screen {
  display: none;
  flex-direction: column;
  height: 100dvh;
  max-width: 100%;
  background: #ffffff;
}
.screen.active { display: flex; }

/* ── Language screen ──────────────────────────────────────────────────────── */
.lang-wrap {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 28px; height: 100%; padding: 32px 24px;
}
.brand { text-align: center; }
.brand-icon { font-size: 44px; display: block; margin-bottom: 10px; color: var(--green); }
.brand h1 { font-size: 28px; font-weight: 800; line-height: 1.2; }
.brand h1 span { color: var(--green); }
.brand-sub { font-size: 13px; color: var(--gray-400); letter-spacing: .08em; margin-top: 4px; }
.lang-prompt { font-size: 14px; color: var(--gray-600); text-align: center; }
.lang-btns { display: flex; gap: 12px; width: 100%; max-width: 360px; }
.lang-btn {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 16px; border: 2px solid var(--gray-200); border-radius: var(--radius);
  background: #fff; font-size: 16px; font-weight: 600; cursor: pointer;
  transition: border-color .15s, background .15s;
}
.lang-btn:hover { border-color: var(--green); background: var(--green-lt); }
.flag { font-size: 22px; }

/* ── Topbar ───────────────────────────────────────────────────────────────── */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px; padding-top: max(10px, env(safe-area-inset-top));
  background: #fff; border-bottom: 1px solid var(--gray-200); flex-shrink: 0;
  position: sticky; top: 0; z-index: 10;
}
.topbar-title { font-size: 17px; font-weight: 700; }
.icon-btn {
  display: flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border: none; background: none;
  border-radius: var(--radius-sm); font-size: 18px; cursor: pointer;
  color: var(--gray-600); text-decoration: none; transition: background .15s;
}
.icon-btn:hover { background: var(--gray-100); }

/* ── Date bar ─────────────────────────────────────────────────────────────── */
.date-bar {
  display: flex; align-items: center; gap: 6px;
  padding: 10px 14px; background: #fff;
  border-bottom: 1px solid var(--gray-200); flex-shrink: 0;
}
.date-center {
  flex: 1; text-align: center; cursor: pointer; position: relative;
  user-select: none; -webkit-user-select: none;
}
.date-label { font-size: 16px; font-weight: 700; color: var(--gray-900); }
.date-input-hidden { position: absolute; opacity: 0; width: 0; height: 0; pointer-events: none; }
.nav-btn {
  width: 36px; height: 36px; border: none; background: var(--gray-100);
  border-radius: var(--radius-sm); font-size: 22px; cursor: pointer;
  color: var(--gray-700); display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; transition: background .15s;
}
.nav-btn:hover { background: var(--gray-200); }

/* ── Toolbar row ──────────────────────────────────────────────────────────── */
.table-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 14px; background: var(--gray-100); flex-shrink: 0; gap: 8px;
}
.home-summary { font-size: 13px; color: var(--gray-600); font-weight: 500; }
.btn-book-new {
  padding: 9px 16px; background: var(--green); color: #fff;
  border: none; border-radius: var(--radius-sm); font-size: 14px; font-weight: 700;
  cursor: pointer; white-space: nowrap; transition: background .15s;
  flex-shrink: 0;
}
.btn-book-new:hover { background: var(--green-dk); }

/* ── Table container ──────────────────────────────────────────────────────── */
.table-loading { text-align: center; color: var(--gray-400); font-size: 14px; padding: 24px; flex-shrink: 0; }
.table-empty   { text-align: center; color: var(--gray-400); font-size: 14px; padding: 32px; }

.schedule-table-wrap { flex: 1; overflow: hidden; position: relative; }

/* ── Calendar grid ────────────────────────────────────────────────────────── */
.cal-scroll {
  width: 100%; height: 100%;
  overflow-x: auto; overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: #ffffff;
}
.cal-inner {
  display: flex; flex-direction: column;
  width: max-content; min-width: 100%;
  background: #ffffff;
}

/* Sticky header */
.cal-hdr {
  display: flex; position: sticky; top: 0; z-index: 20;
  background: #ffffff;
  border-bottom: 1px solid #d1d5db;
}
.cal-corner {
  width: 46px; flex-shrink: 0; font-size: 10px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  border-right: 2px solid #b0b8c1; padding: 6px 4px;
  text-transform: uppercase; letter-spacing: .06em; color: #6b7280;
  background: #ffffff;
}
.cal-th {
  width: var(--col-w); flex-shrink: 0; padding: 6px 7px 5px;
  line-height: 1.3;
  border-right: 1px solid rgba(0,0,0,.08);
  overflow: hidden;
  /* background + border-bottom set inline per car color */
}
.cal-th-name {
  font-size: 11px; font-weight: 700; color: #1a1a2e;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cal-th-sub {
  font-size: 10px; color: #4b5563; font-weight: 400; margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cal-th-comment {
  font-size: 9px; color: #6b7280; font-style: italic;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* Fuel text labels in header sub-line */
.fl-e { font-weight: 700; color: #15803d; }
.fl-d { font-weight: 700; color: #b45309; }
.fl-s { font-weight: 700; color: #be123c; }

/* Body: gutter + columns */
.cal-body { display: flex; }

.cal-gutter {
  width: 46px; flex-shrink: 0;
  position: sticky; left: 0; z-index: 10;
  background: #ffffff;
  border-right: 2px solid #b0b8c1;
  /* Must be a positioning container for cal-hlbl */
  position: sticky;
}
.cal-hlbl {
  position: absolute; left: 0; right: 5px;
  text-align: right;
  font-size: 10px; font-weight: 700; color: #7a8494;
  line-height: 1;
  white-space: nowrap;
}

/* Car columns container */
.cal-cols { display: flex; }

/* Individual car column — height and grid-background set inline by JS */
.cal-col {
  width: var(--col-w); flex-shrink: 0;
  position: relative;
  cursor: crosshair;
  border-right: 1px solid #d1d5db;
  background-color: #ffffff;
  transition: background-color .1s;
}
.cal-col:hover { background-color: #f0f9ff; }

@media (max-width: 600px) {
  :root { --hour-h: 42; --col-w: 100px; }
  .cal-corner { width: 40px; }
  .cal-gutter { width: 40px; }
  .cal-hlbl { font-size: 9px; right: 4px; }
  .cal-th-name { font-size: 10px; }
  .cal-th-sub { font-size: 9px; }
  .bkg-block { padding: 2px 4px; }
  .bk-name { font-size: 10px; }
  .bk-time { font-size: 9px; }
}

/* Now indicator */
.cal-now {
  position: absolute; left: 0; right: 0; height: 2px;
  background: var(--red); z-index: 3; pointer-events: none;
}
.cal-now::before {
  content: ''; position: absolute; left: -4px; top: -4px;
  width: 10px; height: 10px; background: var(--red); border-radius: 50%;
}

/* ── Booking block (calendar event) ──────────────────────────────────────── */
.bkg-block {
  position: absolute; left: 2px; right: 2px;
  border-radius: 4px;
  /* background + border-left set inline per car color */
  color: #1a1a2e;
  padding: 2px 5px;
  overflow: hidden;
  z-index: 2;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0,0,0,.15);
  transition: filter .1s, transform .1s;
  border-left: 4px solid #888; /* overridden inline */
}
.bkg-block:hover { filter: brightness(0.93); transform: scaleX(1.02); z-index: 3; }
.bk-name { font-size: 11px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.3; }
.bk-time { font-size: 10px; opacity: .75; white-space: nowrap; line-height: 1.2; }
.bk-dest { font-size: 10px; opacity: .70; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.2; }

/* Tags (kept for admin use) */
.tag { display: inline-block; font-size: 9px; font-weight: 700; padding: 1px 5px; border-radius: 20px; text-transform: uppercase; letter-spacing: .04em; }
.tag-electric { background: #d1fae5; color: #065f46; }
.tag-diesel   { background: #fef3c7; color: #92400e; }
.tag-petrol   { background: #fee2e2; color: #991b1b; }

/* ── Recurring options ────────────────────────────────────────────────────── */
.recur-toggle { display: flex; align-items: center; }
.recur-label {
  display: flex; align-items: center; gap: 8px;
  font-size: 14px; font-weight: 600; color: var(--gray-700); cursor: pointer;
  user-select: none;
}
.recur-label input[type=checkbox] { width: 18px; height: 18px; cursor: pointer; accent-color: var(--green); }
.recurring-opts { background: var(--gray-50); border-radius: var(--radius-sm); padding: 12px; border: 1px solid var(--gray-200); }
.recurring-opts.hidden { display: none; }

/* ── Bottom sheet modal ───────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.5);
  z-index: 100; display: flex; align-items: flex-end; justify-content: center;
  padding: 0;
}
.modal-overlay.hidden { display: none; }

.modal-sheet {
  background: #fff;
  border-radius: 20px 20px 0 0;
  width: 100%;
  max-width: 520px;
  max-height: 92dvh;
  overflow-y: auto;
  animation: slideUp .22s ease-out;
  padding-bottom: max(20px, env(safe-area-inset-bottom));
  -webkit-overflow-scrolling: touch;
}
@keyframes slideUp {
  from { transform: translateY(60px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}
.sheet-handle {
  width: 40px; height: 4px; background: var(--gray-300);
  border-radius: 2px; margin: 10px auto 0;
}
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px 8px;
}
.modal-header h3 { font-size: 17px; font-weight: 800; }
.modal-close-btn {
  width: 32px; height: 32px; border: none; background: var(--gray-100);
  border-radius: 50%; cursor: pointer; font-size: 14px; color: var(--gray-600);
  display: flex; align-items: center; justify-content: center;
}
.modal-close-btn:hover { background: var(--gray-200); }

.booking-detail-body { padding-top: 4px; }
.detail-row { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--gray-100); font-size: 14px; }
.detail-lbl { color: var(--gray-600); flex-shrink: 0; }
.detail-val { font-weight: 600; text-align: right; word-break: break-word; }
.detail-hint { font-size: 12px; color: var(--gray-500); margin: 12px 0 0; line-height: 1.4; }
.detail-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }

.modal-body {
  padding: 8px 20px 16px;
  display: flex; flex-direction: column; gap: 14px;
}

/* Info box inside modal */
.modal-info-box {
  background: var(--blue-lt);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 13px;
  color: #1e40af;
  line-height: 1.6;
}
.modal-info-box.hidden { display: none; }
.info-hdr { font-weight: 700; margin-bottom: 4px; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.info-row { font-size: 13px; }

/* Form elements */
.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-group { display: flex; flex-direction: column; gap: 5px; }
.form-group label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--gray-600); }
.form-group input, .form-group select {
  padding: 12px 14px;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-family: var(--font);
  background: #fff;
  color: var(--gray-900);
  outline: none;
  transition: border-color .15s;
  -webkit-appearance: none;
  appearance: none;
}
.form-group input:focus, .form-group select:focus { border-color: var(--green); }
.form-group select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%239ca3af' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}

.error-msg { padding: 10px 14px; background: var(--red-lt); color: var(--red); border-radius: var(--radius-sm); font-size: 13px; font-weight: 500; }
.error-msg.hidden { display: none; }

/* Primary button */
.btn-primary {
  display: block; width: 100%; padding: 15px;
  background: var(--green); color: #fff; border: none;
  border-radius: var(--radius); font-size: 16px; font-weight: 700;
  cursor: pointer; text-align: center; transition: background .15s, transform .1s;
}
.btn-primary:hover  { background: var(--green-dk); }
.btn-primary:active { transform: scale(.98); }
.btn-primary:disabled { background: var(--gray-200); color: var(--gray-400); cursor: not-allowed; transform: none; }

/* ── Success screen ───────────────────────────────────────────────────────── */
.success-wrap {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; height: 100%; padding: 32px 24px;
  gap: 20px; text-align: center;
}
.success-check {
  width: 76px; height: 76px; background: var(--green); color: #fff;
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 34px; font-weight: 900;
  animation: pop .3s cubic-bezier(.34,1.56,.64,1);
}
@keyframes pop { from { transform: scale(0); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.success-wrap h2 { font-size: 28px; font-weight: 800; }
.success-details {
  background: var(--green-lt); border-radius: var(--radius);
  padding: 16px 20px; width: 100%; font-size: 14px;
  color: var(--green-dk); line-height: 1.9; text-align: left; max-width: 360px;
}

/* ── Admin ────────────────────────────────────────────────────────────────── */
.admin-login-wrap {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; height: 100%; gap: 20px; padding: 32px 24px;
}
.admin-login-wrap input {
  padding: 14px 16px; border: 2px solid var(--gray-200); border-radius: var(--radius-sm);
  font-size: 16px; width: 100%; max-width: 320px; outline: none;
}
.admin-login-wrap input:focus { border-color: var(--green); }
.admin-login-wrap .btn-primary { max-width: 320px; }

/* Admin main layout */
.admin-wrap {
  display: flex; flex-direction: column; height: 100dvh;
  background: var(--gray-100);
}
.admin-topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px; padding-top: max(10px, env(safe-area-inset-top));
  background: var(--gray-900); color: #fff; flex-shrink: 0;
}
.admin-topbar-title { font-size: 16px; font-weight: 700; }
.admin-topbar-btn {
  background: none; border: none; color: #fff; font-size: 13px;
  cursor: pointer; padding: 6px 10px; border-radius: 6px; transition: background .15s;
}
.admin-topbar-btn:hover { background: rgba(255,255,255,.15); }
.back-link {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--green-lt); text-decoration: none; font-size: 14px;
  padding: 6px 10px; border-radius: 6px; transition: background .15s;
}
.back-link:hover { background: rgba(255,255,255,.1); }

.admin-date-bar {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; background: #fff; border-bottom: 1px solid var(--gray-200);
  flex-shrink: 0;
}
.admin-date-bar input[type=date] {
  padding: 8px 12px; border: 2px solid var(--gray-200); border-radius: var(--radius-sm);
  font-size: 14px; font-family: var(--font); outline: none; background: #fff;
}
.admin-date-bar input:focus { border-color: var(--green); }
.admin-tabs {
  display: flex; gap: 0; background: #fff;
  border-bottom: 1px solid var(--gray-200); flex-shrink: 0;
}
.admin-tab {
  flex: 1; padding: 11px; text-align: center; font-size: 14px; font-weight: 600;
  cursor: pointer; border: none; background: none; color: var(--gray-600);
  border-bottom: 2px solid transparent; transition: color .15s, border-color .15s;
}
.admin-tab.active { color: var(--green); border-bottom-color: var(--green); }
.admin-panel { display: none; flex: 1; overflow-y: auto; }
.admin-panel.active { display: block; }

/* Admin table (same sched-table but with delete buttons on chips) */
.admin-chip-wrap { position: relative; }
.chip-delete {
  position: absolute; top: 2px; right: 2px;
  width: 16px; height: 16px;
  background: rgba(0,0,0,.3); border: none; border-radius: 50%;
  color: #fff; font-size: 9px; cursor: pointer; display: flex;
  align-items: center; justify-content: center; line-height: 1;
  transition: background .1s;
}
.chip-delete:hover { background: var(--red); }

/* Cars management panel */
.cars-panel { padding: 16px; }
.cars-panel h3 { font-size: 15px; font-weight: 700; margin-bottom: 12px; }
.car-row {
  display: flex; align-items: center; gap: 10px;
  background: #fff; border-radius: var(--radius-sm);
  box-shadow: var(--shadow); padding: 12px 14px; margin-bottom: 8px;
}
.car-row-info { flex: 1; }
.car-row-name { font-size: 14px; font-weight: 700; }
.car-row-meta { font-size: 12px; color: var(--gray-400); margin-top: 2px; }
.toggle-btn {
  border: none; padding: 7px 12px; border-radius: var(--radius-sm);
  cursor: pointer; font-size: 12px; font-weight: 700; white-space: nowrap;
}
.toggle-on  { background: var(--green-lt); color: var(--green-dk); }
.toggle-off { background: var(--gray-100); color: var(--gray-600); }
.btn-del-car {
  border: none; background: var(--red-lt); color: var(--red);
  width: 32px; height: 32px; border-radius: var(--radius-sm); cursor: pointer; font-size: 14px;
  display: flex; align-items: center; justify-content: center;
}
.btn-del-car:hover { background: var(--red); color: #fff; }

/* Small icon buttons for car row (edit / delete) */
.btn-icon-sm {
  width: 30px; height: 30px; border: none; border-radius: var(--radius-sm);
  font-size: 14px; cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.btn-edit { background: var(--blue-lt); color: var(--blue); }
.btn-edit:hover { background: var(--blue); color: #fff; }
.btn-del  { background: var(--red-lt);  color: var(--red);  }
.btn-del:hover  { background: var(--red); color: #fff; }

/* Inline car edit form */
.car-edit-form {
  background: var(--gray-50); border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm); padding: 12px; margin-bottom: 8px;
  display: flex; flex-direction: column; gap: 8px;
}
.car-edit-form.hidden { display: none; }
.car-edit-form input, .car-edit-form select {
  padding: 10px 12px; border: 2px solid var(--gray-200); border-radius: var(--radius-sm);
  font-size: 14px; font-family: var(--font); outline: none; background: #fff;
}
.car-edit-form input:focus, .car-edit-form select:focus { border-color: var(--green); }
.btn-cancel-edit {
  flex: 1; padding: 11px; background: var(--gray-100); color: var(--gray-700);
  border: none; border-radius: var(--radius-sm); font-size: 14px; font-weight: 600; cursor: pointer;
}
.btn-cancel-edit:hover { background: var(--gray-200); }

/* Delete button inside booking block (admin) */
.bk-del-btn {
  position: absolute; top: 2px; right: 2px;
  width: 14px; height: 14px;
  background: rgba(0,0,0,.25); border: none; border-radius: 50%;
  color: #fff; font-size: 8px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  line-height: 1; padding: 0;
}
.bk-del-btn:hover { background: var(--red); }

/* Color row in car edit / add forms */
.color-row {
  display: flex; align-items: center; gap: 10px;
  padding: 4px 0;
}

.add-car-form {
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 16px; display: flex; flex-direction: column; gap: 10px; margin-top: 16px;
}
.add-car-form input, .add-car-form select {
  padding: 11px 14px; border: 2px solid var(--gray-200); border-radius: var(--radius-sm);
  font-size: 14px; font-family: var(--font); outline: none; background: #fff;
}
.add-car-form input:focus, .add-car-form select:focus { border-color: var(--green); }
.btn-add {
  padding: 12px; background: var(--green); color: #fff; border: none;
  border-radius: var(--radius-sm); font-size: 14px; font-weight: 700; cursor: pointer;
}
.btn-add:hover { background: var(--green-dk); }
.add-car-form h4 { font-size: 14px; font-weight: 700; }

/* ══════════════════════════════════════════════════════════════════════════════
   NEW COMPONENTS
   ══════════════════════════════════════════════════════════════════════════════ */

/* ── Notification Banner ────────────────────────────────────────────────────── */
.notification-banner {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  padding: 12px 16px; text-align: center; font-size: 14px; font-weight: 600;
  transform: translateY(0); transition: transform .3s, opacity .3s;
}
.notification-banner.hidden { transform: translateY(-100%); opacity: 0; pointer-events: none; }
.notification-banner.success { background: var(--green-lt); color: var(--green-dk); }
.notification-banner.error { background: var(--red-lt); color: var(--red); }
.notification-banner.info { background: var(--blue-lt); color: var(--blue); }

/* ── Topbar Right ───────────────────────────────────────────────────────────── */
.topbar-right { display: flex; gap: 4px; }

/* ── User Menu Dropdown ─────────────────────────────────────────────────────── */
.user-menu {
  position: absolute; top: 56px; right: 10px; z-index: 100;
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow);
  min-width: 180px; overflow: hidden; border: 1px solid var(--gray-200);
}
.user-menu.hidden { display: none; }
.user-menu button {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 12px 16px; border: none; background: none; text-align: left;
  font-size: 14px; cursor: pointer; transition: background .15s;
}
.user-menu button:hover { background: var(--gray-100); }
.user-menu-name {
  padding: 12px 16px; font-weight: 700; border-bottom: 1px solid var(--gray-200);
  font-size: 14px; color: var(--green);
}

/* ── Form Container (Login/Register) ────────────────────────────────────────── */
.form-container {
  padding: 24px 20px; max-width: 400px; margin: 0 auto;
}
.form-desc {
  font-size: 14px; color: var(--gray-600); margin-bottom: 20px; text-align: center;
}
.form-link {
  text-align: center; margin-top: 16px; font-size: 13px; color: var(--gray-600);
}
.form-link a { color: var(--green); font-weight: 600; text-decoration: none; }
.form-link a:hover { text-decoration: underline; }

/* ── My Bookings ────────────────────────────────────────────────────────────── */
.my-bookings-list {
  padding: 16px; display: flex; flex-direction: column; gap: 12px;
  overflow-y: auto; flex: 1;
}
.my-booking-card {
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 14px 16px; border-left: 4px solid var(--gray-400);
}
.mb-header {
  display: flex; justify-content: space-between; align-items: flex-start;
  margin-bottom: 6px;
}
.mb-header strong { font-size: 15px; }
.mb-date { font-size: 12px; color: var(--gray-600); }
.mb-time { font-size: 14px; font-weight: 600; color: var(--green); margin-bottom: 4px; }
.mb-dest { font-size: 13px; color: var(--gray-600); margin-bottom: 10px; }
.mb-actions { display: flex; gap: 8px; margin-bottom: 8px; }
.mb-code { font-size: 11px; color: var(--gray-400); }
.mb-code code { background: var(--gray-100); padding: 2px 6px; border-radius: 4px; font-weight: 600; }

.empty-state {
  text-align: center; padding: 40px 20px; color: var(--gray-400); font-size: 14px;
}

/* ── Small Buttons ──────────────────────────────────────────────────────────── */
.btn-small {
  padding: 6px 12px; font-size: 12px; font-weight: 600; border: none;
  border-radius: var(--radius-sm); cursor: pointer; transition: background .15s;
  background: var(--gray-200); color: var(--gray-700);
}
.btn-small:hover { background: var(--gray-300); }
.btn-small.btn-danger { background: var(--red-lt); color: var(--red); }
.btn-small.btn-danger:hover { background: var(--red); color: #fff; }
.btn-small.btn-success { background: var(--green-lt); color: var(--green); }
.btn-small.btn-success:hover { background: var(--green); color: #fff; }
.btn-small.btn-edit { background: var(--blue-lt); color: var(--blue); }
.btn-small.btn-edit:hover { background: var(--blue); color: #fff; }

/* ── Cancel Code Box ────────────────────────────────────────────────────────── */
.cancel-code-box {
  margin: 16px 0; padding: 16px; background: var(--amber-lt); border-radius: var(--radius);
  text-align: center;
}
.cancel-code-label { font-size: 12px; color: var(--amber); font-weight: 600; margin-bottom: 6px; }
.cancel-code-value { font-size: 28px; font-weight: 800; letter-spacing: 4px; color: var(--gray-900); }
.cancel-code-note { font-size: 11px; color: var(--gray-600); margin-top: 8px; }

/* ── Modal Small ────────────────────────────────────────────────────────────── */
.modal-sheet-sm { max-height: 50vh; }

/* ── Warning/Danger Buttons ─────────────────────────────────────────────────── */
.btn-warning { background: var(--amber); }
.btn-warning:hover { background: #b45309; }
.btn-danger { background: var(--red); }
.btn-danger:hover { background: #b91c1c; }

/* ── Textarea ───────────────────────────────────────────────────────────────── */
textarea {
  padding: 11px 14px; border: 2px solid var(--gray-200); border-radius: var(--radius-sm);
  font-size: 14px; font-family: var(--font); outline: none; background: #fff;
  resize: vertical; width: 100%;
}
textarea:focus { border-color: var(--green); }

/* ── Car Status Icons ───────────────────────────────────────────────────────── */
.status-avail { font-size: 12px; }
.status-inuse { font-size: 12px; }

/* ── Late Booking ───────────────────────────────────────────────────────────── */
.bkg-late { border-left-width: 6px; }

/* ── Toolbar Button ─────────────────────────────────────────────────────────── */
.table-toolbar .btn-small {
  padding: 8px 12px; font-size: 14px;
}

/* ── Report Button ──────────────────────────────────────────────────────────── */
.btn-report {
  padding: 8px 14px; font-size: 13px; font-weight: 600;
  background: var(--amber-lt); color: var(--amber); border: none;
  border-radius: var(--radius-sm); cursor: pointer; transition: background .15s;
}
.btn-report:hover { background: var(--amber); color: #fff; }

/* ── Past Booking Card ──────────────────────────────────────────────────────── */
.my-booking-card.past { opacity: 0.6; }

/* ── Notifications ──────────────────────────────────────────────────────────── */
.section-title { font-size: 14px; font-weight: 600; margin: 16px 16px 10px; color: var(--gray-700); }
.notifications-section { margin-bottom: 8px; }
.notifications-section.hidden { display: none; }
.notifications-container { padding: 0 16px; }
.notification-card {
  background: #fff; border-radius: var(--radius); padding: 12px 14px;
  margin-bottom: 12px; border: 2px solid var(--red);
  display: flex; justify-content: space-between; align-items: flex-start; gap: 10px;
  box-shadow: 0 2px 8px rgba(239,68,68,0.15);
}
.notification-card.type-cancelled { background: var(--red-lt); }
.notification-text { flex: 1; font-size: 13px; line-height: 1.4; }
.notification-time { font-size: 11px; color: var(--gray-500); margin-top: 4px; }
.notification-dismiss {
  background: none; border: none; font-size: 16px; cursor: pointer;
  color: var(--gray-400); padding: 0; line-height: 1;
}
.notification-dismiss:hover { color: var(--gray-700); }

/* ── Notification Badge ─────────────────────────────────────────────────────── */
.notif-badge {
  position: absolute; top: 4px; right: 4px;
  min-width: 18px; height: 18px; padding: 0 5px;
  background: var(--red); color: #fff; border-radius: 10px;
  font-size: 11px; font-weight: 700; line-height: 18px; text-align: center;
}
.notif-badge.hidden { display: none; }
.icon-btn { position: relative; }

.notif-badge-menu {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 18px; height: 18px; padding: 0 5px;
  background: var(--red); color: #fff; border-radius: 10px;
  font-size: 11px; font-weight: 700; margin-left: 6px;
}
.notif-badge-menu.hidden { display: none; }

/* ── Highlight Blink Animation ─────────────────────────────────────────────── */
@keyframes highlight-blink {
  0%, 100% { box-shadow: 0 0 0 0 transparent; }
  25%, 75% { box-shadow: 0 0 0 4px var(--red), 0 0 12px var(--red); }
  50% { box-shadow: 0 0 0 2px var(--red); }
}
.highlight-blink { animation: highlight-blink 0.75s ease-in-out 2; }

/* ── Admin: Badge ───────────────────────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 18px; height: 18px; padding: 0 5px;
  background: var(--red); color: #fff; border-radius: 10px;
  font-size: 11px; font-weight: 700; margin-left: 6px;
}
.badge.hidden { display: none; }

/* ── Admin: Users Panel ─────────────────────────────────────────────────────── */
.users-panel, .issues-panel { padding: 16px; }
.users-panel h3, .issues-panel h3 { font-size: 16px; margin-bottom: 16px; }

.user-card, .issue-card {
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 14px 16px; margin-bottom: 12px;
}
.user-info { display: flex; flex-direction: column; gap: 2px; margin-bottom: 8px; }
.user-info strong { font-size: 14px; }
.user-phone { font-size: 13px; color: var(--gray-600); }
.user-status { font-size: 12px; font-weight: 600; margin-bottom: 8px; }
.user-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ── Admin: Issues Panel ────────────────────────────────────────────────────── */
.issue-card.approved { opacity: 0.6; }
.issue-card.rejected { opacity: 0.4; }
.issue-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 8px;
}
.issue-header strong { font-size: 14px; }
.issue-status { font-size: 12px; font-weight: 600; }
.issue-desc {
  font-size: 13px; color: var(--gray-700); margin-bottom: 8px;
  padding: 8px; background: var(--gray-50); border-radius: var(--radius-sm);
}
.issue-meta { font-size: 11px; color: var(--gray-400); margin-bottom: 10px; }
.issue-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ── Admin: Car Cards ───────────────────────────────────────────────────────── */
.car-card {
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 14px 16px; margin-bottom: 12px; border-left: 4px solid var(--gray-400);
}
.car-card-view {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
}
.car-info { display: flex; flex-direction: column; gap: 4px; }
.car-info strong { font-size: 14px; }
.car-comment { font-size: 12px; color: var(--gray-500); font-style: italic; margin-left: 4px; }
.car-details { font-size: 12px; color: var(--gray-600); }
.car-actions { display: flex; gap: 8px; flex-shrink: 0; }
.car-edit-form { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.car-edit-form input, .car-edit-form select {
  padding: 8px 12px; border: 2px solid var(--gray-200); border-radius: var(--radius-sm);
  font-size: 13px; outline: none;
}
.car-edit-form input:focus, .car-edit-form select:focus { border-color: var(--green); }

/* ── Admin: User History View ───────────────────────────────────────────────── */
.user-history-card {
  background: var(--gray-50); border-radius: var(--radius-sm);
  padding: 10px 12px; margin-top: 8px; font-size: 12px;
}
.user-history-card .bkg-item {
  display: flex; justify-content: space-between; padding: 4px 0;
  border-bottom: 1px solid var(--gray-200);
}
.user-history-card .bkg-item:last-child { border-bottom: none; }
.user-booking-count { font-size: 11px; color: var(--gray-500); margin-top: 4px; }
