@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&family=Poppins:wght@700;800;900&display=swap');

:root {
  --blue: #1155cc;
  --blue-dark: #061b3a;
  --blue-soft: #eaf2ff;
  --yellow: #ffd21e;
  --red: #ef4444;
  --green: #16a34a;
  --orange: #f59e0b;
  --bg: #f4f7fb;
  --card: #ffffff;
  --text: #09142b;
  --muted: #6b7a99;
  --border: #dbe5f3;
  --shadow: 0 18px 50px rgba(12, 30, 68, .10);
  --radius: 24px;
  --font-body: 'Inter', sans-serif;
  --font-display: 'Poppins', sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--font-body); background: var(--bg); color: var(--text); min-height: 100vh; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font-family: inherit; }
button { cursor: pointer; border: 0; }
img { max-width: 100%; display: block; }

.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px;
  background:
    linear-gradient(120deg, rgba(6,27,58,.85), rgba(17,85,204,.80)),
    url('../images/bingo-dove.jpg') center/cover;
}

.login-card {
  width: min(460px, 100%);
  background: rgba(255,255,255,.96);
  border: 1px solid rgba(255,255,255,.6);
  border-radius: 34px;
  padding: 44px;
  box-shadow: 0 30px 90px rgba(0,0,0,.25);
  text-align: center;
}

.login-logo { width: 96px; height: 96px; object-fit: contain; margin: 0 auto 18px; border-radius: 20px; }
.login-card h1 { font-family: var(--font-display); font-size: 2rem; color: var(--blue-dark); margin-bottom: 6px; }
.login-card p { color: var(--muted); margin-bottom: 28px; }
.form-group { margin-bottom: 18px; text-align: left; }
.form-group label { display: block; font-weight: 800; color: #29344d; margin-bottom: 8px; }
.form-group input, .form-group select, .form-group textarea {
  width: 100%; border: 2px solid var(--border); border-radius: 16px; padding: 14px 16px; font-size: 1rem; background: #fff; outline: none; transition: .2s;
}
.form-group textarea { min-height: 112px; resize: vertical; }
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(17,85,204,.10); }
.login-error, .form-error { color: var(--red); font-weight: 800; margin: 12px 0; min-height: 20px; }
.login-submit, .primary-btn {
  width: 100%; background: var(--blue); color: white; border-radius: 18px; padding: 15px 20px; font-weight: 900; font-size: 1rem; box-shadow: 0 5px 0 #062c70; transition: .2s;
}
.login-submit:hover, .primary-btn:hover { transform: translateY(-2px); }
.secondary-btn { background: #eef4ff; color: var(--blue); border: 1px solid var(--border); border-radius: 16px; padding: 12px 18px; font-weight: 900; }

.app-shell { min-height: 100vh; }
.topbar { position: sticky; top: 0; z-index: 50; background: linear-gradient(90deg, var(--blue-dark), var(--blue)); color: white; box-shadow: 0 12px 30px rgba(0,0,0,.14); }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; max-width: 1420px; margin: 0 auto; padding: 16px 22px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand img { width: 46px; height: 46px; object-fit: contain; border-radius: 12px; background: rgba(255,255,255,.10); }
.brand h2 { font-family: var(--font-display); font-size: 1.05rem; color: var(--yellow); line-height: 1.1; }
.brand span { font-size: .85rem; color: rgba(255,255,255,.78); font-weight: 600; }
.nav-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.nav-link-btn { padding: 10px 16px; border-radius: 999px; color: rgba(255,255,255,.85); font-weight: 900; background: rgba(255,255,255,.10); }
.nav-link-btn.active { background: white; color: var(--blue); }
.logout-btn { padding: 10px 16px; border-radius: 999px; background: rgba(239,68,68,.16); color: #fecaca; border: 1px solid rgba(239,68,68,.35); font-weight: 900; }

.main { max-width: 1420px; margin: 0 auto; padding: 30px 22px 60px; }
.hero-line { display: grid; grid-template-columns: minmax(0, 1fr) 420px; gap: 24px; align-items: stretch; margin-bottom: 24px; }
.page-title h1 { font-family: var(--font-display); color: var(--blue); font-size: clamp(2rem, 4vw, 3.2rem); line-height: 1.05; }
.page-title p { color: var(--muted); margin-top: 8px; font-weight: 600; }
.image-soft-card { position: relative; border-radius: 28px; overflow: hidden; min-height: 180px; background: var(--blue-dark); box-shadow: var(--shadow); }
.image-soft-card img { width: 100%; height: 100%; object-fit: cover; filter: brightness(.78); }
.image-soft-card::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(6,27,58,.58), transparent); }
.image-soft-card .image-caption { position: absolute; z-index: 2; left: 20px; bottom: 18px; color: #fff; font-weight: 900; max-width: 260px; }

.stats-grid { display: grid; grid-template-columns: repeat(6, minmax(140px, 1fr)); gap: 14px; margin: 22px 0 24px; }
.stat-card { background: var(--card); border: 1px solid var(--border); border-radius: 22px; padding: 18px; box-shadow: var(--shadow); border-top: 4px solid var(--blue); }
.stat-card.alert { border-top-color: var(--red); background: #fff4f4; }
.stat-card span { display: block; color: var(--muted); font-weight: 900; text-transform: uppercase; font-size: .82rem; margin-bottom: 12px; }
.stat-card strong { font-size: 2rem; font-family: var(--font-display); color: var(--blue-dark); }

.two-col { display: grid; grid-template-columns: 410px minmax(0, 1fr); gap: 22px; align-items: start; }
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.card h2, .card h3 { color: var(--blue); font-family: var(--font-display); margin-bottom: 8px; }
.card-sub { color: var(--muted); font-weight: 600; margin-bottom: 18px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-group.full { grid-column: 1 / -1; }
.form-actions { display: flex; gap: 12px; margin-top: 12px; }
.form-actions .primary-btn { width: auto; flex: 1; }

.reminders-card { margin-bottom: 18px; }
.reminders-list { display: grid; gap: 12px; }
.reminder-card { display: grid; grid-template-columns: 1fr auto auto; gap: 14px; align-items: center; padding: 16px; border: 1px solid var(--border); border-radius: 20px; background: #fff; }
.reminder-title { font-weight: 900; color: var(--blue-dark); }
.reminder-meta, .reminder-phone { color: var(--muted); font-size: .92rem; margin-top: 3px; }
.reminder-countdown { font-weight: 900; padding: 10px 14px; border-radius: 999px; }
.reminder-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.btn-mini { display: inline-flex; align-items: center; justify-content: center; padding: 9px 12px; border-radius: 12px; font-weight: 900; font-size: .85rem; }
.btn-wa { background: #22c55e; color: #fff; }
.btn-sms { background: #e0f2fe; color: #0369a1; }
.btn-done { background: #ecfdf5; color: #15803d; }

.toolbar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.search { flex: 1; min-width: 260px; }
.search input { width: 100%; border: 2px solid var(--border); border-radius: 18px; padding: 14px 16px; outline: none; }
.status-select { border: 2px solid var(--border); border-radius: 18px; padding: 13px 16px; background: #fff; }
.range-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.range-tabs button { background: #fff; color: #26344d; border: 1px solid var(--border); padding: 10px 14px; border-radius: 999px; font-weight: 900; }
.range-tabs button.active { background: var(--blue); color: #fff; border-color: var(--blue); }

.table-card { padding: 0; overflow: hidden; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 1120px; }
thead { background: var(--blue-dark); color: white; }
th, td { text-align: left; padding: 15px 14px; border-bottom: 1px solid #edf2fa; vertical-align: middle; }
th { font-size: .82rem; text-transform: uppercase; letter-spacing: .03em; }
tbody tr { background: white; }
tbody tr.row-critical { background: #fff7ed; }
tbody tr.row-overdue { opacity: .72; }
.table-sub { display: block; color: var(--muted); font-size: .85rem; margin-top: 4px; }
.phone-link { color: var(--blue); font-weight: 900; }
.countdown-pill, .status-badge, .reminder-badge { display: inline-flex; padding: 8px 12px; border-radius: 999px; font-weight: 900; font-size: .83rem; white-space: nowrap; }
.urgency-normal { background: #eef6ff; color: var(--blue); }
.urgency-soon { background: #fff7ed; color: #c2410c; }
.urgency-critical { background: #fee2e2; color: #b91c1c; }
.urgency-overdue { background: #e5e7eb; color: #374151; }
.status-pending { background: #fff7ed; color: #c2410c; }
.status-confirmed { background: #dcfce7; color: #15803d; }
.status-cancelled { background: #fee2e2; color: #b91c1c; }
.status-done { background: #e5e7eb; color: #374151; }
.reminder-alert { background: #fee2e2; color: #b91c1c; }
.reminder-ok { background: #dcfce7; color: #15803d; }
.actions-cell { display: flex; gap: 7px; align-items: center; flex-wrap: wrap; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; min-width: 34px; height: 34px; padding: 0 9px; border-radius: 10px; background: #f1f5f9; color: var(--blue-dark); font-weight: 900; font-size: .82rem; }
.icon-btn.wa { background: #dcfce7; color: #15803d; }
.icon-btn.sms { background: #e0f2fe; color: #0369a1; }
.icon-btn.ok { background: #dcfce7; color: #15803d; }
.icon-btn.cancel, .icon-btn.danger { background: #fee2e2; color: #b91c1c; }
.empty-state, .table-empty { text-align: center; color: var(--muted); padding: 26px; }
#table-loading { padding: 16px; color: var(--muted); }

.side-gallery { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 18px; }
.side-gallery img { width: 100%; height: 120px; object-fit: cover; border-radius: 18px; }
.side-gallery img:first-child { grid-column: 1 / -1; height: 180px; }

.modal-backdrop { position: fixed; inset: 0; background: rgba(4, 12, 28, .55); opacity: 0; pointer-events: none; transition: .2s; z-index: 90; }
.modal { position: fixed; left: 50%; top: 50%; transform: translate(-50%, -46%); width: min(440px, calc(100% - 32px)); background: #fff; border-radius: 24px; padding: 24px; box-shadow: 0 30px 90px rgba(0,0,0,.30); opacity: 0; pointer-events: none; transition: .2s; z-index: 100; }
.modal h3 { color: var(--blue); font-family: var(--font-display); margin-bottom: 8px; }
.modal p { color: var(--muted); line-height: 1.6; margin-bottom: 18px; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; }
.modal.show, .modal-backdrop.show { opacity: 1; pointer-events: auto; transform: translate(-50%, -50%); }
.toast { position: fixed; right: 22px; bottom: 22px; background: var(--blue-dark); color: white; padding: 14px 18px; border-radius: 16px; box-shadow: var(--shadow); font-weight: 900; opacity: 0; transform: translateY(12px); pointer-events: none; transition: .2s; z-index: 200; }
.toast.show { opacity: 1; transform: translateY(0); }
.toast.error { background: #b91c1c; }

@media (max-width: 1100px) {
  .hero-line, .two-col { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 700px) {
  .topbar-inner { align-items: flex-start; flex-direction: column; }
  .nav-actions { width: 100%; justify-content: flex-start; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .form-grid { grid-template-columns: 1fr; }
  .reminder-card { grid-template-columns: 1fr; }
  .main { padding: 22px 14px 46px; }
  .card { padding: 18px; }
}

/* ============================================================
   Color polish update — warmer Bingo palette
   ============================================================ */
:root {
  --blue: #174fba;
  --blue-dark: #071a3f;
  --blue-soft: #eef5ff;
  --yellow: #ffd43b;
  --yellow-soft: #fff7d6;
  --red: #ef3b45;
  --green: #18a957;
  --orange: #ff9f1c;
  --bg: #f6f8fc;
  --card: #ffffff;
  --text: #07142d;
  --muted: #667797;
  --border: #d8e4f5;
  --shadow: 0 18px 45px rgba(7, 26, 63, .09);
}

body {
  background:
    radial-gradient(circle at top left, rgba(255, 212, 59, .18), transparent 32%),
    linear-gradient(180deg, #f8fbff 0%, #f1f5fb 100%);
}

.topbar {
  background: linear-gradient(90deg, #061936 0%, #123f95 55%, #1b5fd3 100%);
  border-bottom: 4px solid var(--yellow);
  box-shadow: 0 12px 28px rgba(7, 26, 63, .18);
}

.brand img {
  background: rgba(255, 212, 59, .16);
  border: 1px solid rgba(255, 212, 59, .35);
}

.brand h2 {
  color: var(--yellow);
  text-shadow: 0 2px 12px rgba(0,0,0,.18);
}

.nav-link-btn {
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.12);
}

.nav-link-btn:hover {
  background: rgba(255, 212, 59, .18);
  color: #fff;
}

.nav-link-btn.active {
  background: var(--yellow);
  color: var(--blue-dark);
  box-shadow: 0 4px 0 rgba(0,0,0,.18);
}

.logout-btn {
  background: rgba(239, 59, 69, .16);
  color: #fff;
  border-color: rgba(255,255,255,.24);
}

.page-title h1,
.card h2,
.card h3,
.modal h3 {
  color: var(--blue-dark);
}

.page-title h1::after {
  content: '';
  display: block;
  width: 92px;
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--yellow), var(--orange));
  margin-top: 12px;
}

.card,
.stat-card,
.table-card {
  border-color: rgba(23, 79, 186, .12);
  box-shadow: 0 18px 44px rgba(7, 26, 63, .08);
}

.card {
  background: linear-gradient(180deg, #fff 0%, #fbfdff 100%);
}

.stat-card {
  border-top-color: var(--yellow);
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 74px;
  height: 74px;
  background: radial-gradient(circle, rgba(255, 212, 59, .34), transparent 70%);
}

.stat-card.alert {
  border-top-color: var(--red);
  background: linear-gradient(180deg, #fff6f6 0%, #fff 100%);
}

.stat-card strong {
  color: var(--blue-dark);
}

.form-group input,
.form-group select,
.form-group textarea,
.search input,
.status-select {
  background: #ffffff;
  border-color: #d7e3f4;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus,
.search input:focus,
.status-select:focus {
  border-color: var(--yellow);
  box-shadow: 0 0 0 4px rgba(255, 212, 59, .22);
}

.primary-btn,
.login-submit {
  background: linear-gradient(180deg, #1f64d6 0%, #174fba 100%);
  box-shadow: 0 5px 0 #06245b;
}

.primary-btn:hover,
.login-submit:hover {
  filter: brightness(1.04);
}

.secondary-btn {
  background: var(--yellow-soft);
  color: var(--blue-dark);
  border-color: rgba(255, 212, 59, .55);
}

.range-tabs button {
  background: #fff;
  color: var(--blue-dark);
}

.range-tabs button:hover {
  border-color: var(--yellow);
  background: var(--yellow-soft);
}

.range-tabs button.active {
  background: var(--yellow);
  border-color: var(--yellow);
  color: var(--blue-dark);
  box-shadow: 0 4px 0 rgba(7, 26, 63, .16);
}

thead {
  background: linear-gradient(90deg, #071a3f 0%, #123f95 100%);
}

tbody tr:hover {
  background: #fffdf3;
}

.phone-link {
  color: #174fba;
}

.urgency-normal {
  background: #eef5ff;
  color: #174fba;
}

.urgency-soon {
  background: #fff3d1;
  color: #b45309;
}

.urgency-critical,
.reminder-alert {
  background: #ffe4e6;
  color: #be123c;
}

.status-confirmed,
.reminder-ok,
.btn-done,
.icon-btn.wa,
.btn-wa {
  background: #dcfce7;
  color: #15803d;
}

.btn-wa {
  color: #0f7a36;
}

.btn-sms,
.icon-btn.sms {
  background: #e6f4ff;
  color: #075985;
}

.icon-btn.ok {
  background: var(--yellow-soft);
  color: var(--blue-dark);
}

.icon-btn.cancel,
.icon-btn.danger {
  background: #ffe4e6;
  color: #be123c;
}

.image-soft-card {
  border: 1px solid rgba(255, 212, 59, .28);
  box-shadow: 0 22px 50px rgba(7, 26, 63, .16);
}

.image-soft-card::after {
  background: linear-gradient(90deg, rgba(7,26,63,.72), rgba(7,26,63,.10));
}

.side-gallery img,
.image-soft-card img {
  filter: saturate(1.05) contrast(1.02);
}

.toast {
  background: linear-gradient(90deg, #071a3f, #174fba);
  border-bottom: 4px solid var(--yellow);
}

.login-card {
  border-top: 6px solid var(--yellow);
}


/* ============================================================
   Lively layout update — bigger logo, calmer images, soft mascot watermark
   ============================================================ */
body {
  position: relative;
  background:
    radial-gradient(circle at 8% 6%, rgba(255, 212, 59, .18), transparent 28%),
    radial-gradient(circle at 92% 18%, rgba(239, 59, 69, .10), transparent 24%),
    linear-gradient(180deg, #fffaf0 0%, #f3f7ff 45%, #eef4ff 100%);
}

body::before {
  content: '';
  position: fixed;
  right: -140px;
  bottom: -180px;
  width: min(620px, 68vw);
  height: min(620px, 68vw);
  background: url('../images/bingo-logo-transparent.png') center/contain no-repeat;
  opacity: .055;
  pointer-events: none;
  z-index: 0;
}

.app-shell,
.login-page {
  position: relative;
  z-index: 1;
}

.topbar-inner {
  padding: 18px 24px;
}

.brand {
  gap: 16px;
}

.brand img {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  padding: 5px;
  background: rgba(255,255,255,.14);
  border: 2px solid rgba(255,212,59,.46);
  box-shadow: 0 8px 22px rgba(0,0,0,.16);
}

.brand h2 {
  font-size: 1.28rem;
  letter-spacing: -.02em;
}

.brand span {
  font-size: .92rem;
}

.main {
  position: relative;
  overflow: hidden;
}

.main::before {
  content: '';
  position: absolute;
  left: -120px;
  top: 92px;
  width: 380px;
  height: 380px;
  background: url('../images/bingo-logo-transparent.png') center/contain no-repeat;
  opacity: .045;
  pointer-events: none;
}

.hero-line {
  grid-template-columns: minmax(0, 1fr) 340px;
  align-items: center;
}

.image-soft-card {
  min-height: 150px;
  max-height: 190px;
  border-radius: 26px;
  isolation: isolate;
}

.image-soft-card img {
  object-position: center 36%;
  opacity: .88;
  filter: saturate(1.04) contrast(1.02) brightness(.78);
}

.image-soft-card .image-caption {
  left: 18px;
  bottom: 16px;
  max-width: 230px;
  line-height: 1.25;
  font-size: 1rem;
  text-shadow: 0 2px 14px rgba(0,0,0,.35);
}

.card {
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  right: -70px;
  top: -70px;
  width: 160px;
  height: 160px;
  background: radial-gradient(circle, rgba(255,212,59,.22), transparent 68%);
  pointer-events: none;
}

.two-col {
  grid-template-columns: 430px minmax(0, 1fr);
}

.brand-visual-card {
  min-height: 460px;
  display: grid;
  align-content: end;
  padding: 0;
  overflow: hidden;
  background: linear-gradient(145deg, rgba(7,26,63,.92), rgba(23,79,186,.74));
}

.brand-visual-card .visual-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 28%;
  opacity: .62;
  filter: saturate(1.08) contrast(1.02);
}

.brand-visual-card .visual-content {
  position: relative;
  z-index: 2;
  padding: 28px;
  color: #fff;
  background: linear-gradient(180deg, transparent, rgba(7,26,63,.82));
}

.brand-visual-card h3 {
  color: var(--yellow);
  font-size: 1.35rem;
  margin-bottom: 8px;
}

.brand-visual-card p {
  color: rgba(255,255,255,.86);
  line-height: 1.7;
  font-weight: 650;
}

.visual-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.visual-pills span {
  background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.18);
  color: #fff;
  padding: 7px 10px;
  border-radius: 999px;
  font-size: .82rem;
  font-weight: 900;
}

.side-gallery {
  display: block;
  margin-top: 18px;
}

.side-gallery img {
  width: 100%;
  height: 360px;
  object-fit: cover;
  object-position: center 30%;
  border-radius: 24px;
}

.side-gallery img:not(:first-child) {
  display: none;
}

.stats-grid {
  position: relative;
  z-index: 1;
}

.table-card {
  position: relative;
  z-index: 1;
}

@media (max-width: 1100px) {
  .hero-line,
  .two-col {
    grid-template-columns: 1fr;
  }

  .brand-visual-card {
    min-height: 320px;
  }
}

@media (max-width: 700px) {
  body::before {
    width: 420px;
    height: 420px;
    right: -170px;
    bottom: -120px;
  }

  .brand img {
    width: 58px;
    height: 58px;
  }

  .image-soft-card {
    min-height: 130px;
  }

  .brand-visual-card {
    min-height: 260px;
  }

  .brand-visual-card .visual-content {
    padding: 22px;
  }
}


/* Dashboard refinements */
.guests-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: #fff7d6;
  color: #8a5600;
  font-weight: 900;
  font-size: .83rem;
  white-space: nowrap;
}

tr.new-row-highlight {
  position: relative;
  animation: newRowPulse 1.2s ease-in-out 3;
  box-shadow: inset 5px 0 0 var(--yellow);
}

tr.new-row-highlight td {
  background: #fff7d6 !important;
}

@keyframes newRowPulse {
  0%, 100% { transform: translateX(0); filter: brightness(1); }
  50% { transform: translateX(4px); filter: brightness(1.03); }
}

.icon-btn[title="Modifier"] {
  background: #fff7d6;
  color: #8a5600;
}

table { min-width: 1220px; }

/* ============================================================
   Edit popup polish
   ============================================================ */
body.modal-open {
  overflow: hidden;
}

.modal-backdrop.show {
  opacity: 1;
  pointer-events: auto;
  transform: none;
}

.modal.show {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%);
}

.edit-modal {
  width: min(760px, calc(100% - 28px));
  max-height: calc(100vh - 34px);
  overflow: auto;
  padding: 0;
  border: 1px solid rgba(216, 228, 245, .95);
  border-top: 5px solid var(--yellow);
}

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 24px 24px 10px;
  background:
    radial-gradient(circle at top right, rgba(255, 212, 59, .22), transparent 34%),
    linear-gradient(180deg, #ffffff, #f8fbff);
}

.modal-head h3 {
  margin: 0 0 5px;
  color: var(--blue);
  font-size: 1.35rem;
}

.modal-head p {
  margin: 0;
  color: var(--muted);
  font-weight: 700;
}

.modal-x {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: #eef4ff;
  color: var(--blue-dark);
  font-size: 1.5rem;
  line-height: 1;
  font-weight: 900;
}

.edit-form {
  padding: 14px 24px 24px;
}

.edit-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.edit-grid .form-group {
  margin-bottom: 0;
}

.edit-grid .form-group.full {
  grid-column: 1 / -1;
}

.edit-actions {
  padding-top: 16px;
  border-top: 1px solid var(--border);
  margin-top: 10px;
}

@media (max-width: 720px) {
  .edit-grid {
    grid-template-columns: 1fr;
  }

  .edit-modal {
    width: min(96vw, 760px);
  }
}

/* Password visibility + remembered device */
.password-field {
  position: relative;
  display: flex;
  align-items: center;
}

.password-field input {
  padding-right: 54px;
}

.password-toggle {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 38px;
  height: 38px;
  border-radius: 14px;
  border: 1px solid rgba(255, 214, 48, 0.45);
  background: rgba(255, 214, 48, 0.16);
  color: var(--blue-dark);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.password-toggle:hover {
  transform: translateY(-50%) scale(1.04);
  background: rgba(255, 214, 48, 0.28);
  box-shadow: 0 8px 18px rgba(13, 55, 120, 0.16);
}

.password-toggle.is-visible {
  background: var(--yellow);
  color: #071b3a;
}

.remember-device {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 4px 0 6px;
  color: var(--blue-dark);
  font-weight: 800;
  font-size: 0.94rem;
  cursor: pointer;
  user-select: none;
}

.remember-device input {
  width: 18px;
  height: 18px;
  accent-color: var(--yellow);
}

.login-hint {
  margin: 0 0 12px !important;
  color: var(--muted) !important;
  font-size: 0.86rem;
  line-height: 1.5;
  text-align: left;
}

/* ============================================================
   Strong mobile version — phone-first dashboard and form
   ============================================================ */
@media (max-width: 820px) {
  html {
    font-size: 15px;
  }

  body {
    background:
      radial-gradient(circle at 12% 0%, rgba(255, 212, 59, .22), transparent 30%),
      linear-gradient(180deg, #fffaf0 0%, #eef4ff 100%);
    overflow-x: hidden;
  }

  body::before {
    width: 360px;
    height: 360px;
    right: -170px;
    bottom: 40px;
    opacity: .06;
  }

  .topbar {
    position: sticky;
    top: 0;
    z-index: 80;
    border-bottom-width: 3px;
  }

  .topbar-inner {
    padding: 12px 14px 10px;
    gap: 12px;
    flex-direction: column;
    align-items: stretch;
  }

  .brand {
    width: 100%;
    gap: 12px;
  }

  .brand img {
    width: 56px;
    height: 56px;
    border-radius: 18px;
    padding: 5px;
    flex: 0 0 auto;
  }

  .brand h2 {
    font-size: 1.1rem;
  }

  .brand span {
    font-size: .82rem;
  }

  .nav-actions {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .nav-link-btn,
  .logout-btn {
    width: 100%;
    min-height: 42px;
    padding: 10px 10px;
    text-align: center;
    justify-content: center;
    border-radius: 15px;
    font-size: .88rem;
    white-space: nowrap;
  }

  #refresh-btn {
    grid-column: 1 / 2;
  }

  .logout-btn {
    grid-column: 2 / 3;
  }

  .main {
    padding: 18px 12px 34px;
  }

  .hero-line {
    grid-template-columns: 1fr;
    gap: 14px;
    margin-bottom: 16px;
  }

  .page-title h1 {
    font-size: clamp(1.95rem, 8vw, 2.6rem);
    line-height: 1.04;
  }

  .page-title p {
    font-size: .94rem;
    line-height: 1.55;
  }

  .page-title h1::after {
    width: 72px;
    height: 5px;
    margin-top: 10px;
  }

  .image-soft-card {
    min-height: 118px;
    max-height: 132px;
    border-radius: 22px;
  }

  .image-soft-card img {
    object-position: center 30%;
  }

  .image-soft-card .image-caption {
    font-size: .9rem;
    max-width: 210px;
    left: 14px;
    bottom: 12px;
  }

  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: 14px 0 16px;
  }

  .stat-card {
    border-radius: 18px;
    padding: 14px 13px;
    min-height: 104px;
  }

  .stat-card span {
    font-size: .72rem;
    margin-bottom: 8px;
  }

  .stat-card strong {
    font-size: 1.7rem;
  }

  .card {
    padding: 18px 15px;
    border-radius: 22px;
  }

  .card h2,
  .card h3 {
    font-size: 1.22rem;
  }

  .card-sub {
    font-size: .92rem;
    line-height: 1.55;
  }

  .two-col {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .form-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .form-group {
    margin-bottom: 12px;
  }

  .form-group label {
    font-size: .92rem;
  }

  .form-group input,
  .form-group select,
  .form-group textarea {
    min-height: 48px;
    border-radius: 15px;
    padding: 13px 14px;
    font-size: 16px;
  }

  .form-group textarea {
    min-height: 96px;
  }

  .form-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .form-actions .primary-btn,
  .form-actions .secondary-btn {
    width: 100%;
    min-height: 50px;
  }

  .brand-visual-card {
    min-height: 220px;
    border-radius: 22px;
  }

  .brand-visual-card .visual-image {
    object-position: center 25%;
    opacity: .55;
  }

  .brand-visual-card .visual-content {
    padding: 18px;
  }

  .visual-pills span {
    font-size: .76rem;
    padding: 6px 9px;
  }

  .reminders-card {
    padding: 18px 15px;
  }

  .reminders-list {
    gap: 10px;
  }

  .reminder-card {
    grid-template-columns: 1fr;
    align-items: stretch;
    gap: 10px;
    padding: 14px;
    border-radius: 18px;
  }

  .reminder-countdown {
    width: fit-content;
    padding: 8px 12px;
  }

  .reminder-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    justify-content: stretch;
  }

  .reminder-actions .btn-mini {
    width: 100%;
    min-height: 42px;
  }

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

  .search {
    min-width: 0;
    width: 100%;
  }

  .search input,
  .status-select {
    min-height: 48px;
    width: 100%;
    border-radius: 16px;
    font-size: 16px;
  }

  .range-tabs {
    display: flex;
    overflow-x: auto;
    gap: 8px;
    padding-bottom: 4px;
    margin: 0 -4px 12px;
    scrollbar-width: none;
  }

  .range-tabs::-webkit-scrollbar {
    display: none;
  }

  .range-tabs button {
    flex: 0 0 auto;
    min-height: 42px;
    padding: 10px 13px;
    font-size: .86rem;
  }

  .table-card {
    overflow: visible;
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
  }

  .table-card > div[style] {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 22px;
    padding: 14px !important;
    box-shadow: var(--shadow);
    margin-bottom: 12px;
  }

  .table-scroll {
    overflow: visible;
  }

  table {
    min-width: 0;
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 12px;
  }

  thead {
    display: none;
  }

  tbody {
    display: block;
  }

  tbody tr {
    display: block;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 22px;
    box-shadow: 0 14px 32px rgba(7, 26, 63, .08);
    overflow: hidden;
    margin-bottom: 12px;
  }

  tbody tr.row-critical {
    background: #fff8ee;
    border-color: rgba(255, 159, 28, .42);
  }

  tbody tr.row-overdue {
    opacity: .78;
  }

  tbody td {
    display: grid;
    grid-template-columns: 118px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    padding: 11px 14px;
    border-bottom: 1px solid #eef3fb;
    font-size: .94rem;
  }

  tbody td:last-child {
    border-bottom: 0;
  }

  tbody td::before {
    color: var(--muted);
    font-size: .72rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .02em;
  }

  tbody td:nth-child(1)::before { content: 'Client'; }
  tbody td:nth-child(2)::before { content: 'Téléphone'; }
  tbody td:nth-child(3)::before { content: 'Date'; }
  tbody td:nth-child(4)::before { content: 'Heure'; }
  tbody td:nth-child(5)::before { content: 'Wilaya'; }
  tbody td:nth-child(6)::before { content: 'Adresse'; }
  tbody td:nth-child(7)::before { content: 'Invités'; }
  tbody td:nth-child(8)::before { content: 'Compte'; }
  tbody td:nth-child(9)::before { content: 'Statut'; }
  tbody td:nth-child(10)::before { content: 'Rappel'; }
  tbody td:nth-child(11)::before { content: 'Actions'; }

  tbody td:first-child {
    grid-template-columns: 1fr;
    background: linear-gradient(90deg, #071a3f, #123f95);
    color: #fff;
    padding: 15px 14px;
  }

  tbody td:first-child::before {
    display: none;
  }

  tbody td:first-child .table-sub {
    color: rgba(255,255,255,.78);
  }

  .phone-link {
    font-size: 1rem;
  }

  .countdown-pill,
  .status-badge,
  .reminder-badge,
  .guests-pill {
    width: fit-content;
    padding: 7px 11px;
    font-size: .8rem;
  }

  .actions-cell {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    align-items: stretch;
  }

  .actions-cell::before {
    grid-column: 1 / -1;
  }

  .icon-btn {
    min-width: 0;
    width: 100%;
    height: 42px;
    border-radius: 14px;
    font-size: .82rem;
  }

  .empty-state,
  .table-empty,
  #table-loading {
    display: block;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 22px 16px;
    box-shadow: var(--shadow);
  }

  .edit-modal {
    width: 94vw;
    max-height: 90vh;
    border-radius: 22px;
  }

  .modal-head {
    padding: 18px 18px 8px;
  }

  .modal-head h3 {
    font-size: 1.16rem;
  }

  .modal-head p {
    font-size: .86rem;
  }

  .modal-x {
    width: 38px;
    height: 38px;
  }

  .edit-form {
    padding: 12px 18px 18px;
  }

  .edit-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .modal-actions,
  .edit-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .modal-actions .primary-btn,
  .modal-actions .secondary-btn,
  .edit-actions .primary-btn,
  .edit-actions .secondary-btn {
    width: 100% !important;
    min-height: 48px;
  }

  .toast {
    left: 12px;
    right: 12px;
    bottom: 14px;
    text-align: center;
    border-radius: 16px;
  }
}

@media (max-width: 420px) {
  .nav-actions {
    grid-template-columns: 1fr;
  }

  #refresh-btn,
  .logout-btn {
    grid-column: auto;
  }

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

  .stat-card {
    min-height: 96px;
  }

  tbody td {
    grid-template-columns: 96px minmax(0, 1fr);
    padding: 10px 12px;
  }

  .actions-cell {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}


/* ============================================================
   Mobile header scroll fix
   On phones the top navigation scrolls with the page instead of staying fixed.
   This gives more space for appointment cards while scrolling.
   ============================================================ */
@media (max-width: 820px) {
  .topbar {
    position: relative !important;
    top: auto !important;
    z-index: 20;
  }

  .topbar-inner {
    padding: 10px 14px 9px;
  }

  .brand img {
    width: 52px;
    height: 52px;
  }

  .nav-link-btn,
  .logout-btn {
    min-height: 40px;
  }
}


/* ============================================================
   Login mobile compact fix
   Makes the login card smaller on phones so the background stays visible.
   ============================================================ */
@media (max-width: 820px) {
  .login-page {
    min-height: 100dvh;
    place-items: center;
    padding: 18px 14px;
    background:
      linear-gradient(120deg, rgba(6,27,58,.74), rgba(17,85,204,.68)),
      url('../images/bingo-dove.jpg') center/cover;
  }

  .login-card {
    width: min(342px, 92vw);
    padding: 22px 22px 20px;
    border-radius: 26px;
    border-top-width: 4px;
    background: rgba(255, 255, 255, .93);
    box-shadow: 0 20px 55px rgba(0,0,0,.23);
  }

  .login-logo {
    width: 70px;
    height: 70px;
    margin-bottom: 10px;
    border-radius: 16px;
  }

  .login-card h1 {
    font-size: 1.7rem;
    line-height: 1.12;
    margin-bottom: 6px;
  }

  .login-card p {
    margin-bottom: 16px;
    font-size: .9rem;
    line-height: 1.45;
  }

  .login-form .form-group {
    margin-bottom: 12px;
  }

  .login-form .form-group label {
    font-size: .9rem;
    margin-bottom: 6px;
  }

  .login-form .form-group input {
    min-height: 46px;
    padding: 11px 14px;
    border-radius: 15px;
    font-size: 16px;
  }

  .password-field input {
    padding-right: 52px !important;
  }

  .password-toggle {
    width: 36px;
    height: 36px;
    right: 8px;
    border-radius: 13px;
  }

  .remember-device {
    margin-top: 2px;
    font-size: .88rem;
    align-items: flex-start;
  }

  .remember-device input {
    width: 17px;
    height: 17px;
    margin-top: 2px;
  }

  .login-hint {
    font-size: .78rem;
    line-height: 1.42;
    margin-bottom: 8px !important;
  }

  .login-error {
    min-height: 16px;
    margin: 8px 0;
    font-size: .86rem;
  }

  .login-submit {
    min-height: 49px;
    padding: 13px 16px;
    border-radius: 16px;
    font-size: .96rem;
  }
}

@media (max-width: 390px) {
  .login-page {
    padding: 12px 10px;
  }

  .login-card {
    width: min(318px, 92vw);
    padding: 18px 18px 16px;
    border-radius: 22px;
  }

  .login-logo {
    width: 58px;
    height: 58px;
  }

  .login-card h1 {
    font-size: 1.45rem;
  }

  .login-card p {
    font-size: .82rem;
    margin-bottom: 12px;
  }

  .login-form .form-group input {
    min-height: 43px;
  }

  .login-submit {
    min-height: 46px;
  }
}

@media (max-height: 620px) and (max-width: 820px) {
  .login-page {
    align-items: start;
    padding-top: 12px;
    overflow-y: auto;
  }

  .login-card {
    padding-top: 16px;
    padding-bottom: 14px;
  }

  .login-logo {
    width: 52px;
    height: 52px;
    margin-bottom: 6px;
  }

  .login-card h1 {
    font-size: 1.35rem;
  }

  .login-card p,
  .login-hint {
    display: none;
  }
}


/* Custom wilaya field */
.custom-wilaya-wrap {
  margin-top: 10px;
}

.custom-wilaya-wrap[hidden] {
  display: none !important;
}

.custom-wilaya-wrap input {
  background: #fffdf3 !important;
  border-color: rgba(255, 212, 59, .9) !important;
}

/* ============================================================
   Dashboard table/card repair — stable desktop + mobile layout
   ============================================================ */
body {
  overflow-x: hidden;
}

.table-card {
  overflow: visible !important;
}

.table-scroll {
  width: 100% !important;
  overflow-x: visible !important;
  overflow-y: visible !important;
}

.table-scroll table,
table {
  width: 100% !important;
  min-width: 0 !important;
  table-layout: fixed !important;
}

.table-scroll th,
.table-scroll td,
th,
td {
  min-width: 0 !important;
  max-width: none !important;
  white-space: normal !important;
  overflow: visible;
}

.table-scroll th:nth-child(1), .table-scroll td:nth-child(1) { width: 14%; }
.table-scroll th:nth-child(2), .table-scroll td:nth-child(2) { width: 10%; }
.table-scroll th:nth-child(3), .table-scroll td:nth-child(3) { width: 8%; }
.table-scroll th:nth-child(4), .table-scroll td:nth-child(4) { width: 6%; }
.table-scroll th:nth-child(5), .table-scroll td:nth-child(5) { width: 8%; }
.table-scroll th:nth-child(6), .table-scroll td:nth-child(6) { width: 12%; }
.table-scroll th:nth-child(7), .table-scroll td:nth-child(7) { width: 8%; }
.table-scroll th:nth-child(8), .table-scroll td:nth-child(8) { width: 8%; }
.table-scroll th:nth-child(9), .table-scroll td:nth-child(9) { width: 10%; }
.table-scroll th:nth-child(10), .table-scroll td:nth-child(10) { width: 8%; }
.table-scroll th:nth-child(11), .table-scroll td:nth-child(11) { width: 8%; }
.table-scroll th:nth-child(12), .table-scroll td:nth-child(12) { width: 11%; }

tbody tr.row-critical,
tbody tr.row-overdue {
  background: #fff !important;
  opacity: 1 !important;
}

.client-cell strong,
.table-sub,
.cell-value,
.phone-link {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.clamp-value,
.client-cell strong,
.table-sub {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.note-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  max-width: 100%;
  padding: 7px 10px;
  border-radius: 10px;
  background: #eef5ff;
  color: var(--blue);
  border: 1px solid rgba(23, 79, 186, .18);
  font-weight: 900;
  font-size: .8rem;
  white-space: nowrap;
}

.note-btn:hover {
  background: var(--blue);
  color: #fff;
}

.note-modal {
  max-width: 420px;
}

.note-modal-text {
  max-height: 42vh;
  overflow-y: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: var(--text) !important;
  background: #f8fbff;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 12px;
}

.actions-cell {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 6px !important;
  flex-wrap: nowrap !important;
  overflow: visible !important;
}

.icon-btn {
  flex: 0 0 auto;
  width: auto !important;
  min-width: 34px !important;
  height: 34px !important;
  padding: 0 9px !important;
  border-radius: 10px !important;
  font-size: .78rem !important;
  line-height: 1;
}

.icon-btn.more {
  min-width: 34px !important;
  padding: 0 !important;
  font-size: 1.15rem !important;
}

.more-wrap {
  position: relative;
  display: inline-flex;
  flex: 0 0 auto;
}

.action-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 148px;
  display: none;
  padding: 6px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 18px 44px rgba(7, 26, 63, .18);
  z-index: 9999;
}

.action-menu.open-up {
  top: auto;
  bottom: calc(100% + 8px);
}

.action-menu.show {
  display: grid;
  gap: 4px;
}

.action-menu button {
  width: 100%;
  text-align: left;
  padding: 9px 10px;
  border-radius: 10px;
  color: var(--blue-dark);
  background: #fff;
  font-weight: 900;
  font-size: .84rem;
}

.action-menu button:hover {
  background: var(--blue-soft);
}

.action-menu button.danger {
  color: #b91c1c;
}

.action-menu button.danger:hover {
  background: #fee2e2;
}

@media (max-width: 1180px) and (min-width: 721px) {
  th, td {
    padding: 12px 8px !important;
    font-size: .84rem;
  }

  .countdown-pill,
  .status-badge,
  .reminder-badge,
  .guests-pill {
    padding: 7px 9px;
    font-size: .76rem;
  }
}

@media (max-width: 720px) {
  html,
  body,
  .app-shell,
  .main,
  .table-card,
  .table-scroll {
    max-width: 100% !important;
    overflow-x: hidden !important;
  }

  .floating-table-scroll,
  .floating-scroll-spacer {
    display: none !important;
  }

  .table-card {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
  }

  .table-scroll table,
  table {
    width: 100% !important;
    min-width: 0 !important;
    border-collapse: separate !important;
    border-spacing: 0 12px !important;
  }

  thead {
    display: none !important;
  }

  tbody,
  tbody tr,
  tbody td {
    width: 100% !important;
    max-width: 100% !important;
  }

  tbody {
    display: block !important;
  }

  tbody tr {
    display: block !important;
    margin: 0 0 12px !important;
    background: #fff !important;
    border: 1px solid var(--border) !important;
    border-radius: 20px !important;
    box-shadow: 0 12px 28px rgba(7, 26, 63, .08) !important;
    overflow: visible !important;
  }

  tbody td {
    display: grid !important;
    grid-template-columns: 104px minmax(0, 1fr) !important;
    gap: 10px !important;
    align-items: center !important;
    min-height: 44px !important;
    padding: 10px 12px !important;
    border-bottom: 1px solid #eef3fb !important;
    font-size: .9rem !important;
    overflow: visible !important;
  }

  tbody td:last-child {
    border-bottom: 0 !important;
  }

  tbody td::before {
    color: var(--muted) !important;
    font-size: .7rem !important;
    font-weight: 900 !important;
    text-transform: uppercase !important;
    letter-spacing: .02em !important;
    align-self: center !important;
  }

  tbody td:nth-child(1)::before { content: 'Client' !important; }
  tbody td:nth-child(2)::before { content: 'Téléphone' !important; }
  tbody td:nth-child(3)::before { content: 'Date' !important; }
  tbody td:nth-child(4)::before { content: 'Heure' !important; }
  tbody td:nth-child(5)::before { content: 'Wilaya' !important; }
  tbody td:nth-child(6)::before { content: 'Adresse' !important; }
  tbody td:nth-child(7)::before { content: 'Remarque' !important; }
  tbody td:nth-child(8)::before { content: 'Invités' !important; }
  tbody td:nth-child(9)::before { content: 'Compte' !important; }
  tbody td:nth-child(10)::before { content: 'Statut' !important; }
  tbody td:nth-child(11)::before { content: 'Rappel' !important; }
  tbody td:nth-child(12)::before { content: 'Actions' !important; }

  tbody td:first-child {
    display: block !important;
    min-height: 0 !important;
    padding: 13px 14px !important;
    background: linear-gradient(90deg, #071a3f, #123f95) !important;
    color: #fff !important;
    border-radius: 19px 19px 0 0 !important;
  }

  tbody td:first-child::before {
    display: none !important;
  }

  tbody td:first-child strong {
    display: block !important;
    font-size: 1rem !important;
    line-height: 1.25 !important;
    margin: 0 0 2px !important;
    color: #fff !important;
  }

  tbody td:first-child .table-sub {
    display: block !important;
    margin: 0 !important;
    color: rgba(255,255,255,.78) !important;
    font-size: .82rem !important;
    line-height: 1.25 !important;
  }

  tbody td > * {
    min-width: 0 !important;
  }

  .cell-value,
  .phone-link,
  .clamp-value {
    max-width: 100% !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    overflow-wrap: anywhere !important;
  }

  .clamp-value {
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
  }

  .countdown-pill,
  .status-badge,
  .reminder-badge,
  .guests-pill,
  .note-btn {
    width: fit-content !important;
    max-width: 100% !important;
    padding: 7px 10px !important;
    font-size: .78rem !important;
    line-height: 1.15 !important;
  }

  .actions-cell {
    display: grid !important;
    grid-template-columns: 104px repeat(3, auto) !important;
    justify-content: start !important;
    align-items: center !important;
    gap: 7px !important;
  }

  .actions-cell::before {
    grid-column: auto !important;
    color: var(--muted) !important;
    font-size: .7rem !important;
    font-weight: 900 !important;
    text-transform: uppercase !important;
    content: 'Actions' !important;
  }

  .actions-cell .icon-btn {
    width: auto !important;
    min-width: 34px !important;
    height: 34px !important;
    padding: 0 9px !important;
    border-radius: 10px !important;
  }

  .action-menu {
    right: 0;
    top: calc(100% + 8px);
  }

  .action-menu.open-up {
    top: auto;
    bottom: calc(100% + 8px);
  }

  .modal.note-modal {
    width: calc(100% - 28px) !important;
    max-width: calc(100% - 28px) !important;
  }
}

@media (max-width: 390px) {
  tbody td,
  .actions-cell {
    grid-template-columns: 92px minmax(0, 1fr) !important;
  }

  .actions-cell {
    grid-template-columns: 92px repeat(3, auto) !important;
  }

  .icon-btn {
    min-width: 32px !important;
    height: 32px !important;
    padding: 0 8px !important;
    font-size: .72rem !important;
  }
}

/* ============================================================
   Date filter + phone landscape-only table space fix
   Desktop table is left unchanged.
   ============================================================ */
.date-filter-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.date-filter-btn {
  position: relative;
  z-index: 3;
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--blue-dark);
  font-size: 1.18rem;
  box-shadow: 0 8px 18px rgba(7, 26, 63, .06);
}

.date-filter-btn.active {
  background: var(--yellow);
  border-color: rgba(255, 212, 59, .95);
  box-shadow: 0 10px 22px rgba(255, 212, 59, .32);
}

.date-filter-input {
  position: absolute;
  left: 0;
  top: 0;
  width: 48px;
  height: 48px;
  opacity: 0;
  cursor: pointer;
  z-index: 2;
}

.date-filter-input:focus + .clear-date-filter,
.date-filter-btn:focus-visible {
  outline: 3px solid rgba(22, 78, 163, .28);
  outline-offset: 3px;
}

.clear-date-filter {
  height: 42px;
  padding: 0 13px;
  border-radius: 14px;
  background: #fff7d6;
  color: #8a5d00;
  border: 1px solid rgba(255, 212, 59, .72);
  font-weight: 900;
  white-space: nowrap;
}

@media (max-width: 720px) {
  .date-filter-wrap {
    width: 100%;
  }

  .clear-date-filter {
    flex: 1;
  }
}

@media (orientation: landscape) and (max-width: 1180px) and (max-height: 620px) {
  body {
    overflow-x: hidden !important;
  }

  .table-card {
    overflow: visible !important;
  }

  .table-scroll {
    width: 100% !important;
    overflow-x: auto !important;
    overflow-y: visible !important;
    -webkit-overflow-scrolling: touch !important;
  }

  .table-scroll table,
  .table-scroll > table,
  table {
    width: max-content !important;
    min-width: 1520px !important;
    table-layout: fixed !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
  }

  thead {
    display: table-header-group !important;
  }

  tbody {
    display: table-row-group !important;
  }

  tbody tr {
    display: table-row !important;
    background: #fff !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    overflow: visible !important;
    margin: 0 !important;
    opacity: 1 !important;
  }

  tbody td,
  .table-scroll th,
  .table-scroll td {
    display: table-cell !important;
    width: auto !important;
    max-width: none !important;
    min-height: 0 !important;
    padding: 14px 12px !important;
    border-bottom: 1px solid #eef3fb !important;
    vertical-align: middle !important;
    white-space: nowrap !important;
    overflow: visible !important;
    font-size: .9rem !important;
  }

  tbody td::before,
  .actions-cell::before {
    content: none !important;
    display: none !important;
  }

  tbody td:first-child {
    background: #fff !important;
    color: var(--blue-dark) !important;
    border-radius: 0 !important;
  }

  tbody td:first-child strong {
    color: var(--blue-dark) !important;
  }

  tbody td:first-child .table-sub {
    color: var(--muted) !important;
  }

  .table-scroll th:nth-child(1), .table-scroll td:nth-child(1) { min-width: 170px !important; width: 170px !important; }
  .table-scroll th:nth-child(2), .table-scroll td:nth-child(2) { min-width: 150px !important; width: 150px !important; }
  .table-scroll th:nth-child(3), .table-scroll td:nth-child(3) { min-width: 125px !important; width: 125px !important; }
  .table-scroll th:nth-child(4), .table-scroll td:nth-child(4) { min-width: 90px !important; width: 90px !important; }
  .table-scroll th:nth-child(5), .table-scroll td:nth-child(5) { min-width: 120px !important; width: 120px !important; }
  .table-scroll th:nth-child(6), .table-scroll td:nth-child(6) { min-width: 150px !important; width: 150px !important; }
  .table-scroll th:nth-child(7), .table-scroll td:nth-child(7) { min-width: 105px !important; width: 105px !important; }
  .table-scroll th:nth-child(8), .table-scroll td:nth-child(8) { min-width: 115px !important; width: 115px !important; }
  .table-scroll th:nth-child(9), .table-scroll td:nth-child(9) { min-width: 130px !important; width: 130px !important; }
  .table-scroll th:nth-child(10), .table-scroll td:nth-child(10) { min-width: 120px !important; width: 120px !important; }
  .table-scroll th:nth-child(11), .table-scroll td:nth-child(11) { min-width: 115px !important; width: 115px !important; }
  .table-scroll th:nth-child(12), .table-scroll td:nth-child(12) { min-width: 170px !important; width: 170px !important; }

  .client-cell strong,
  .table-sub,
  .cell-value,
  .phone-link,
  .clamp-value {
    display: block !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    max-width: 100% !important;
    -webkit-line-clamp: unset !important;
    -webkit-box-orient: unset !important;
  }

  .actions-cell {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 8px !important;
    flex-wrap: nowrap !important;
  }

  .actions-cell .icon-btn,
  .icon-btn {
    flex: 0 0 auto !important;
    width: auto !important;
    min-width: 42px !important;
    height: 38px !important;
    padding: 0 10px !important;
  }
}

/* Mobile edit popup fix: keep the edit modal visible and usable without changing desktop/table layouts */
@media (max-width: 640px) {
  .modal.edit-modal {
    position: fixed !important;
    top: max(10px, env(safe-area-inset-top)) !important;
    left: 10px !important;
    right: 10px !important;
    bottom: auto !important;
    width: calc(100vw - 20px) !important;
    max-width: calc(100vw - 20px) !important;
    max-height: calc(100dvh - 20px - env(safe-area-inset-top)) !important;
    transform: none !important;
    border-radius: 22px !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch !important;
  }

  .modal.edit-modal.show {
    transform: none !important;
  }

  .edit-modal .modal-head {
    position: sticky;
    top: 0;
    z-index: 2;
    padding: 16px 14px 10px !important;
    background:
      radial-gradient(circle at top right, rgba(255, 212, 59, .22), transparent 34%),
      linear-gradient(180deg, #ffffff, #f8fbff) !important;
  }

  .edit-modal .modal-head h3 {
    font-size: 1.08rem !important;
    line-height: 1.15 !important;
  }

  .edit-modal .modal-head p {
    font-size: .82rem !important;
    line-height: 1.35 !important;
  }

  .edit-modal .modal-x {
    flex: 0 0 38px !important;
    width: 38px !important;
    height: 38px !important;
  }

  .edit-modal .edit-form {
    padding: 12px 14px 16px !important;
  }

  .edit-modal .edit-grid {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }

  .edit-modal .form-group,
  .edit-modal .form-group.full {
    grid-column: 1 / -1 !important;
    min-width: 0 !important;
  }

  .edit-modal input,
  .edit-modal select,
  .edit-modal textarea {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    font-size: 16px !important;
  }

  .edit-modal .edit-actions {
    position: sticky;
    bottom: 0;
    z-index: 2;
    background: #fff;
    padding: 12px 0 4px !important;
  }
}

/* ============================================================
   Public booking page — mobile-first
   ============================================================ */
.public-booking-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at 8% 8%, rgba(255, 213, 79, 0.42), transparent 30%),
    radial-gradient(circle at 92% 4%, rgba(17, 85, 204, 0.16), transparent 26%),
    radial-gradient(circle at 50% 100%, rgba(255, 99, 71, 0.12), transparent 34%),
    linear-gradient(180deg, #fff7dc 0%, #eef6ff 48%, #ffffff 100%);
  color: #172033;
  overflow-x: hidden;
  position: relative;
}

.public-booking-page::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(45deg, rgba(17, 85, 204, 0.045) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(255, 197, 61, 0.08) 25%, transparent 25%);
  background-size: 34px 34px;
  opacity: 0.45;
}

.public-bg-bubble {
  position: fixed;
  z-index: 0;
  border-radius: 999px;
  pointer-events: none;
  filter: blur(1px);
  opacity: 0.45;
}

.bubble-one {
  width: 120px;
  height: 120px;
  left: -42px;
  top: 180px;
  background: rgba(255, 213, 79, 0.55);
}

.bubble-two {
  width: 86px;
  height: 86px;
  right: -28px;
  top: 72px;
  background: rgba(17, 85, 204, 0.22);
}

.bubble-three {
  width: 72px;
  height: 72px;
  right: 20px;
  bottom: 180px;
  background: rgba(255, 99, 71, 0.18);
}

.public-booking-shell {
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: 18px 14px 34px;
  position: relative;
  z-index: 1;
}

.public-hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  align-items: stretch;
  margin-bottom: 16px;
}

.public-hero-content,
.public-form-card,
.public-info-card {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(17, 85, 204, 0.12);
  border-radius: 28px;
  box-shadow: 0 18px 48px rgba(17, 85, 204, 0.12);
}

.public-hero-content {
  padding: 22px;
  overflow: hidden;
  position: relative;
}

.public-logo-wrap {
  width: 86px;
  height: 86px;
  border-radius: 26px;
  display: grid;
  place-items: center;
  background: #ffffff;
  box-shadow: 0 14px 30px rgba(17, 85, 204, 0.14);
  margin-bottom: 14px;
}

.public-logo {
  width: 72px;
  height: 72px;
  object-fit: contain;
}

.public-kicker {
  margin: 0 0 8px;
  color: #1155cc;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  font-size: 0.78rem;
}

.public-hero h1 {
  margin: 0;
  font-size: clamp(2rem, 9vw, 4.6rem);
  line-height: 0.96;
  color: #0e2557;
  letter-spacing: -0.04em;
}

.public-lead {
  margin: 14px 0 0;
  color: #516070;
  font-size: 1rem;
  line-height: 1.6;
  max-width: 620px;
}

.public-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.public-tags span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 8px 10px;
  background: rgba(17, 85, 204, 0.08);
  color: #0e3f9b;
  font-weight: 700;
  font-size: 0.82rem;
}

.public-hero-image {
  min-height: 210px;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 18px 48px rgba(17, 85, 204, 0.13);
}

.public-hero-image img,
.public-info-card img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.public-form-section {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.public-form-card {
  padding: 18px;
}

.public-form-head h2 {
  margin: 0;
  color: #0e2557;
  font-size: 1.45rem;
  letter-spacing: -0.02em;
}

.public-form-head p {
  margin: 8px 0 14px;
  color: #64748b;
  line-height: 1.55;
}

.public-form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 13px;
}

.public-form-grid .form-group {
  min-width: 0;
}

.public-form-grid input,
.public-form-grid select,
.public-form-grid textarea {
  width: 100%;
  min-height: 48px;
  border-radius: 16px;
  border: 1px solid rgba(15, 23, 42, 0.13);
  background: #fbfdff;
  box-sizing: border-box;
  font-size: 16px;
}

.public-form-grid input:focus,
.public-form-grid select:focus,
.public-form-grid textarea:focus {
  outline: none;
  border-color: rgba(17, 85, 204, 0.62);
  box-shadow: 0 0 0 4px rgba(17, 85, 204, 0.12);
  background: #ffffff;
}

.public-form-grid input:invalid:not(:placeholder-shown),
.public-form-grid textarea:invalid:not(:placeholder-shown) {
  border-color: rgba(220, 38, 38, 0.6);
}


.public-form-grid input.input-error,
.public-form-grid select.input-error,
.public-form-grid textarea.input-error {
  border-color: #dc2626 !important;
  background: #fff7f7;
  box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.10);
}

.field-error {
  display: block;
  min-height: 18px;
  margin-top: 6px;
  color: #dc2626;
  font-size: 0.82rem;
  font-weight: 750;
  line-height: 1.35;
}

.public-form-grid .has-error label {
  color: #b91c1c;
}

.public-honeypot {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.public-confirm-note {
  margin: 14px 0 0;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255, 213, 79, 0.22);
  color: #7a4b00;
  font-weight: 800;
  font-size: 0.9rem;
  line-height: 1.45;
}


.public-form-grid textarea {
  min-height: 105px;
  resize: vertical;
}

.public-submit-btn {
  width: 100%;
  min-height: 54px;
  margin-top: 16px;
  border: 0;
  border-radius: 18px;
  background: linear-gradient(135deg, #1155cc, #0b3f9b);
  color: #ffffff;
  font-weight: 900;
  font-size: 1rem;
  cursor: pointer;
  box-shadow: 0 16px 28px rgba(17, 85, 204, 0.25);
  transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}

.public-submit-btn:not(:disabled):active {
  transform: scale(0.985);
}

.public-submit-btn:disabled {
  opacity: 0.68;
  cursor: not-allowed;
}

.public-form-message {
  display: none;
  margin: 0 0 14px;
  padding: 12px 14px;
  border-radius: 16px;
  font-weight: 750;
  line-height: 1.45;
}

.public-form-message.success,
.public-form-message.error {
  display: block;
}

.public-form-message.success {
  color: #166534;
  background: #dcfce7;
  border: 1px solid #86efac;
}

.public-form-message.error {
  color: #991b1b;
  background: #fee2e2;
  border: 1px solid #fecaca;
}

.public-info-card {
  overflow: hidden;
}

.public-info-card img {
  height: 210px;
}

.public-info-card > div {
  padding: 18px;
}

.public-info-card h3 {
  margin: 0 0 10px;
  color: #0e2557;
}

.public-info-card ul {
  margin: 0;
  padding-left: 18px;
  color: #475569;
  line-height: 1.75;
}

.public-contact-link {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  min-height: 48px;
  margin-top: 16px;
  border-radius: 16px;
  text-decoration: none;
  background: #18a957;
  color: #ffffff;
  font-weight: 900;
}

@media (min-width: 720px) {
  .public-booking-shell {
    padding: 24px;
  }

  .public-hero {
    grid-template-columns: 1.1fr 0.9fr;
  }

  .public-hero-content,
  .public-form-card {
    padding: 28px;
  }

  .public-form-section {
    grid-template-columns: minmax(0, 1fr) 360px;
    align-items: start;
  }

  .public-form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }

  .public-form-grid .full {
    grid-column: 1 / -1;
  }

  .public-hero-image {
    min-height: 100%;
  }
}

@media (max-width: 420px) {
  .public-booking-shell {
    padding-left: 10px;
    padding-right: 10px;
  }

  .public-hero-content,
  .public-form-card,
  .public-info-card {
    border-radius: 22px;
  }

  .public-hero-content,
  .public-form-card {
    padding: 16px;
  }

  .public-tags span {
    font-size: 0.78rem;
    padding: 7px 9px;
  }
}

/* ============================================================
   Booking form — 2-step: step indicator
   ============================================================ */
.booking-steps {
  display: flex;
  align-items: center;
  gap: 0;
  margin: 0 0 20px;
}

.booking-step {
  display: flex;
  align-items: center;
  gap: 8px;
  opacity: 0.38;
  transition: opacity 0.25s;
}

.booking-step.active,
.booking-step.done {
  opacity: 1;
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(17, 85, 204, 0.10);
  color: #1155cc;
  font-weight: 900;
  font-size: 0.9rem;
  border: 2px solid rgba(17, 85, 204, 0.18);
  transition: background 0.25s, color 0.25s;
  flex-shrink: 0;
}

.booking-step.active .step-num {
  background: #1155cc;
  color: #fff;
  border-color: #1155cc;
}

.booking-step.done .step-num {
  background: #18a957;
  color: #fff;
  border-color: #18a957;
}

.step-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: #0e2557;
}

.booking-step-divider {
  flex: 1;
  height: 2px;
  background: rgba(17, 85, 204, 0.14);
  margin: 0 10px;
  border-radius: 2px;
  min-width: 20px;
}

/* ============================================================
   Pack grid — mobile-first, 2 columns
   ============================================================ */
.pack-section {
  margin-bottom: 22px;
}

.pack-section-title {
  margin: 0 0 12px;
  font-size: 1.1rem;
  font-weight: 900;
  color: #0e2557;
  letter-spacing: -0.01em;
}

.pack-error {
  display: block;
  min-height: 18px;
  margin-bottom: 8px;
  color: #dc2626;
  font-size: 0.85rem;
  font-weight: 750;
}

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

/* Pack 5 spans full width only when it would be alone on its row
   (5 items → rows of 2: row1=1,2 row2=3,4 row3=5 alone) */
.pack-card-5 {
  grid-column: 1 / -1;
}

.pack-radio {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

.pack-card {
  cursor: pointer;
  border-radius: 20px;
  border: 2.5px solid rgba(17, 85, 204, 0.14);
  background: #fff;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s;
  overflow: hidden;
  position: relative;
  display: block;
  box-shadow: 0 2px 10px rgba(17, 85, 204, 0.06);
}

.pack-card:active {
  transform: scale(0.975);
}

.pack-card.pack-selected {
  border-color: #1155cc;
  box-shadow: 0 0 0 4px rgba(17, 85, 204, 0.15), 0 6px 24px rgba(17, 85, 204, 0.18);
}

.pack-card-inner {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.pack-img-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #f0f4ff;
}

.pack-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.pack-card:hover .pack-img-wrap img {
  transform: scale(1.04);
}

.pack-check-icon {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #1155cc;
  color: #fff;
  font-size: 0.8rem;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 0.2s, transform 0.2s;
  pointer-events: none;
}

.pack-selected .pack-check-icon {
  opacity: 1;
  transform: scale(1);
}

.pack-card-body {
  padding: 10px 10px 12px;
  flex: 1;
}

.pack-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(17, 85, 204, 0.10);
  color: #0e3f9b;
  font-weight: 900;
  font-size: 0.76rem;
  margin-bottom: 6px;
}

.pack-badge-premium {
  background: linear-gradient(135deg, #ffd54f, #ff9800);
  color: #3e2000;
}

.pack-desc {
  margin: 0;
  font-size: 0.78rem;
  color: #475569;
  line-height: 1.45;
}

/* Pack 5 override — wider card, horizontal layout on larger screens */
.pack-card-5 .pack-card-inner {
  flex-direction: row;
}

.pack-card-5 .pack-img-wrap {
  width: 44%;
  flex-shrink: 0;
  aspect-ratio: unset;
  min-height: 120px;
}

.pack-card-5 .pack-card-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 14px;
}

.pack-card-5 .pack-desc {
  font-size: 0.82rem;
}

/* ============================================================
   Supplements section
   ============================================================ */
.supplements-section {
  margin-bottom: 22px;
}

.supplements-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.supplement-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1.5px solid rgba(17, 85, 204, 0.12);
  background: #fff;
  cursor: pointer;
  transition: border-color 0.18s, background 0.18s;
}

.supplement-item:has(input:checked) {
  border-color: #1155cc;
  background: rgba(17, 85, 204, 0.05);
}

.supplement-item input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: #1155cc;
  flex-shrink: 0;
  cursor: pointer;
}

.supp-icon {
  font-size: 1.3rem;
  line-height: 1;
}

.supp-label {
  font-size: 0.95rem;
  font-weight: 700;
  color: #172033;
}

/* ============================================================
   Step 2 action buttons
   ============================================================ */
.step2-actions {
  display: flex;
  gap: 12px;
  margin-top: 18px;
  flex-direction: column;
}

.public-back-btn {
  width: 100%;
  min-height: 48px;
  border: 2px solid rgba(17, 85, 204, 0.30);
  border-radius: 18px;
  background: transparent;
  color: #1155cc;
  font-weight: 900;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.18s, border-color 0.18s;
}

.public-back-btn:hover {
  background: rgba(17, 85, 204, 0.06);
  border-color: #1155cc;
}

.step2-submit {
  margin-top: 0;
}

/* Responsive: on wider screens, pack 5 already spans full row naturally */
@media (min-width: 480px) {
  .supplements-grid {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .supplement-item {
    flex: 1 1 calc(50% - 5px);
  }
}

@media (min-width: 600px) {
  .step2-actions {
    flex-direction: row;
  }

  .public-back-btn {
    max-width: 160px;
    flex-shrink: 0;
  }

  .step2-submit {
    flex: 1;
  }
}

/* ============================================================
   Booking page fixes — packs, Step 2 scroll, other wilaya, success
   ============================================================ */
#packStep {
  scroll-margin-top: 24px;
}

.other-wilaya-field[hidden] {
  display: none !important;
}

.public-form-grid select {
  line-height: 1.35;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.public-success-card {
  display: grid;
  justify-items: center;
  gap: 12px;
  padding: 28px 18px;
  text-align: center;
  background:
    radial-gradient(circle at top, rgba(22, 163, 74, 0.10), transparent 42%),
    #ffffff;
  border: 1.5px solid rgba(22, 163, 74, 0.28);
  border-radius: 24px;
  box-shadow: 0 18px 46px rgba(22, 101, 52, 0.12);
}

.public-success-card[hidden] {
  display: none !important;
}

.success-logo-wrap {
  width: 84px;
  height: 84px;
  display: grid;
  place-items: center;
  border-radius: 24px;
  background: #ffffff;
  border: 1px solid rgba(17, 85, 204, 0.10);
  box-shadow: 0 12px 28px rgba(17, 85, 204, 0.12);
}

.success-logo-wrap img {
  width: 70px;
  height: 70px;
  object-fit: contain;
}

.success-check {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #16a34a;
  color: #ffffff;
  font-size: 1.65rem;
  font-weight: 900;
  box-shadow: 0 12px 24px rgba(22, 163, 74, 0.24);
}

.public-success-card h3 {
  margin: 2px 0 0;
  max-width: 440px;
  color: #0f3f2a;
  font-size: 1.28rem;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.public-success-card p {
  max-width: 440px;
  margin: 0;
  color: #475569;
  font-weight: 700;
  line-height: 1.55;
}

.success-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 14px;
  border-radius: 999px;
  background: #ecfdf5;
  color: #15803d;
  border: 1px solid #bbf7d0;
  font-size: 0.92rem;
  font-weight: 900;
}

.public-success-card small {
  color: #64748b;
  font-weight: 750;
}

.pack-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
  gap: 10px;
}

.pack-card-5 {
  grid-column: auto;
}

.pack-card-inner,
.pack-card-5 .pack-card-inner {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.pack-card-image-wrap,
.pack-card-5 .pack-card-image-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 5;
  min-height: 0;
  overflow: hidden;
  background: #f8fbff;
  border-radius: 18px 18px 0 0;
}

.pack-card-image {
  width: 100%;
  height: 100%;
  object-fit: contain !important;
  display: block;
  padding: 4px;
  background: #f8fbff;
  transition: transform 0.25s ease;
}

.pack-card:hover .pack-card-image {
  transform: scale(1.015);
}

.pack-card-body,
.pack-card-5 .pack-card-body {
  flex: 1;
  padding: 9px 9px 11px;
  display: block;
}

.pack-card-5 .pack-desc,
.pack-desc {
  font-size: 0.74rem;
  line-height: 1.35;
}

.pack-badge {
  font-size: 0.72rem;
  margin-bottom: 5px;
}

.pack-check-icon {
  width: 30px;
  height: 30px;
  top: 7px;
  right: 7px;
  border: 2px solid #ffffff;
  box-shadow: 0 8px 18px rgba(17, 85, 204, 0.25);
}

.pack-card.pack-selected {
  border-color: #1155cc;
  box-shadow: 0 0 0 4px rgba(17, 85, 204, 0.18), 0 12px 30px rgba(17, 85, 204, 0.22);
}

@media (min-width: 900px) {
  .pack-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
  }

  .pack-card-body,
  .pack-card-5 .pack-card-body {
    padding: 11px 11px 13px;
  }

  .pack-desc,
  .pack-card-5 .pack-desc {
    font-size: 0.78rem;
  }
}

@media (max-width: 420px) {
  .pack-grid {
    gap: 8px;
  }

  .pack-card {
    border-radius: 18px;
  }

  .pack-card-image-wrap,
  .pack-card-5 .pack-card-image-wrap {
    border-radius: 16px 16px 0 0;
  }

  .pack-card-body,
  .pack-card-5 .pack-card-body {
    padding: 8px 7px 10px;
  }

  .pack-desc,
  .pack-card-5 .pack-desc {
    font-size: 0.68rem;
    line-height: 1.3;
  }

  .pack-badge {
    font-size: 0.68rem;
    padding: 3px 8px;
  }
}
