/* ═══════════════════════════════════════════════════════════════
   Leave Management System – Full Responsive CSS
   ═══════════════════════════════════════════════════════════════ */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

@import url("https://fonts.googleapis.com/css2?family=Noto+Sans+Sinhala:wght@400;500;600;700&display=swap");

@import url("https://fonts.googleapis.com/css2?family=Noto+Sans+Sinhala:wght@400&display=swap");

.sinhala {
  font-family: "Nirmala UI", "FM Abhaya", sans-serif;
  font-size: 12px;
  font-weight: 600;
  color: rgb(62, 62, 62);

  text-rendering: optimizeLegibility;
  font-feature-settings: "liga" 1;
}

:root {
  --blue: #185fa5;
  --blue-dark: #0c447c;
  --blue-light: #e6f1fb;
  --blue-mid: #85b7eb;
  --green: #3b6d11;
  --green-light: #eaf3de;
  --red: #a32d2d;
  --red-light: #fcebeb;
  --amber: #854f0b;
  --amber-light: #faeeda;
  --bg: #f4f7fa;
  --surface: #ffffff;
  --border: #e0e4ea;
  --text: #1a1a2e;
  --muted: #6b7280;
  --radius: 10px;
  --radius-lg: 14px;
  --shadow: 0 1px 4px rgba(0, 0, 0, 0.07), 0 4px 16px rgba(0, 0, 0, 0.06);
  --nav-h: 56px;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family:
    "Segoe UI",
    system-ui,
    -apple-system,
    Arial,
    sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
  -webkit-text-size-adjust: 100%;
}

/* ── Navbar ──────────────────────────────────────────────────── */
.navbar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0 1.5rem;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}
.navbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  flex-shrink: 0;
}
.navbar-brand .icon {
  width: 34px;
  height: 34px;
  background: var(--blue-light);
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  flex-shrink: 0;
}
.navbar-badge {
  font-size: 11px;
  background: var(--blue-light);
  color: var(--blue);
  padding: 2px 9px;
  border-radius: 20px;
  font-weight: 600;
  white-space: nowrap;
}
/* desktop nav links */
.navbar-nav {
  display: flex;
  gap: 2px;
  margin-left: auto;
  align-items: center;
}
.nav-link {
  padding: 7px 14px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.nav-link:hover {
  background: var(--bg);
  color: var(--text);
}
.nav-link.active {
  background: var(--blue-light);
  color: var(--blue);
  font-weight: 600;
}

/* hamburger – hidden on desktop */
.nav-toggle {
  display: none;
  margin-left: auto;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: var(--radius);
  color: var(--text);
  font-size: 22px;
  line-height: 1;
}
.nav-toggle:hover {
  background: var(--bg);
}

/* mobile drawer */
.nav-drawer {
  display: none;
  flex-direction: column;
  position: fixed;
  top: var(--nav-h);
  left: 0;
  right: 0;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 1rem;
  gap: 4px;
  z-index: 99;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}
.nav-drawer.open {
  display: flex;
}
.nav-drawer .nav-link {
  padding: 11px 14px;
  font-size: 14px;
  border-radius: var(--radius);
}
.nav-drawer .nav-link.active {
  background: var(--blue-light);
  color: var(--blue);
}

/* ── Page layout ─────────────────────────────────────────────── */
.page {
  max-width: 980px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}
.page-header {
  margin-bottom: 1.5rem;
}
.page-title {
  font-size: 22px;
  font-weight: 700;
}
.page-sub {
  font-size: 13px;
  color: var(--muted);
  margin-top: 3px;
}

/* ── Cards ───────────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}
.card + .card {
  margin-top: 1.25rem;
}
.card-title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 1.25rem;
}

/* ── Stats grid ──────────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 1.5rem;
}
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.1rem 1.3rem;
  box-shadow: var(--shadow);
}
.stat-label {
  font-size: 11px;
  color: var(--muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}
.stat-value {
  font-size: 30px;
  font-weight: 700;
  line-height: 1;
}
.stat-value.blue {
  color: var(--blue);
}
.stat-value.green {
  color: var(--green);
}
.stat-value.red {
  color: var(--red);
}
.stat-value.amber {
  color: var(--amber);
}

/* ── Forms ───────────────────────────────────────────────────── */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.1rem;
}
.form-full {
  grid-column: 1 / -1;
}
.form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.form-label {
  font-size: 13px;
  font-weight: 700;
  color: black;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.form-sublabel {
  font-size: 12px;
  color: #414141;
  margin-top: -2px;
}
.form-control {
  padding: 11px 13px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 15px;
  font-family: inherit;
  color: var(--text);
  background: var(--surface);
  transition:
    border-color 0.15s,
    box-shadow 0.15s;
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
  min-height: 44px; /* touch-friendly */
}
.form-control:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(24, 95, 165, 0.13);
}
select.form-control {
  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 fill='%236b7280' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}
textarea.form-control {
  resize: vertical;
  min-height: 100px;
}
.required {
  color: var(--red);
}

/* ── Buttons ─────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 20px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  transition: all 0.15s;
  min-height: 44px;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover {
  background: var(--bg);
}
.btn-primary {
  background: var(--blue);
  color: #fff;
  border-color: var(--blue);
}
.btn-primary:hover {
  background: var(--blue-dark);
  border-color: var(--blue-dark);
}
.btn-success {
  background: var(--green);
  color: #fff;
  border-color: var(--green);
}
.btn-success:hover {
  background: #27500a;
}
.btn-danger {
  background: var(--red);
  color: #fff;
  border-color: var(--red);
}
.btn-danger:hover {
  background: #791f1f;
}
.btn-sm {
  padding: 7px 13px;
  font-size: 12px;
  min-height: 36px;
}
.btn-block {
  width: 100%;
}

/* ── Table (desktop) ─────────────────────────────────────────── */
.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
thead th {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 10px 13px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  white-space: nowrap;
  background: var(--surface);
}
tbody td {
  padding: 12px 13px;
  border-bottom: 1px solid #f0f2f5;
  vertical-align: middle;
  color: var(--text);
}
tbody tr:last-child td {
  border-bottom: none;
}
tbody tr:hover td {
  background: #f8fafc;
}

/* ── Mobile cards (replaces table on small screens) ──────────── */
.mobile-cards {
  display: none;
  flex-direction: column;
  gap: 12px;
}
.m-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  background: var(--surface);
}
.m-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.m-card-name {
  font-weight: 600;
  font-size: 14px;
}
.m-card-sub {
  font-size: 12px;
  color: var(--muted);
}
.m-row {
  display: flex;
  justify-content: space-between;
  padding: 5px 0;
  border-bottom: 1px solid #f0f2f5;
  font-size: 13px;
}
.m-row:last-of-type {
  border-bottom: none;
}
.m-label {
  color: var(--muted);
  font-size: 12px;
}
.m-val {
  font-weight: 500;
}
.m-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}
.m-actions .btn {
  flex: 1;
}

/* ── Badges ──────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  text-transform: capitalize;
}
.badge-pending {
  background: var(--amber-light);
  color: var(--amber);
}
.badge-approved {
  background: var(--green-light);
  color: var(--green);
}
.badge-rejected {
  background: var(--red-light);
  color: var(--red);
}
.badge-info {
  background: var(--blue-light);
  color: var(--blue);
}

/* ── Avatar ──────────────────────────────────────────────────── */
.avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--blue-light);
  color: var(--blue);
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.user-cell {
  display: flex;
  align-items: center;
  gap: 9px;
}
.user-name {
  font-weight: 600;
  font-size: 13px;
}
.user-sub {
  font-size: 11px;
  color: var(--muted);
}

/* ── Alerts ──────────────────────────────────────────────────── */
.alert {
  padding: 13px 16px;
  border-radius: var(--radius);
  font-size: 13px;
  margin-bottom: 1rem;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.alert-success {
  background: var(--green-light);
  color: var(--green);
  border: 1px solid #c0dd97;
}
.alert-error {
  background: var(--red-light);
  color: var(--red);
  border: 1px solid #f09595;
}
.alert-info {
  background: var(--blue-light);
  color: var(--blue);
  border: 1px solid var(--blue-mid);
}

/* ── Modal ───────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  overflow-y: auto;
}
.modal {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  width: 100%;
  max-width: 480px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
  margin: auto;
}
.modal-title {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 1.25rem;
}
.modal-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 1.25rem;
  flex-wrap: wrap;
}
.detail-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid #f0f2f5;
  font-size: 13px;
}
.detail-row:last-of-type {
  border-bottom: none;
}
.detail-label {
  color: var(--muted);
  flex-shrink: 0;
  margin-right: 8px;
}
.detail-val {
  font-weight: 600;
  text-align: right;
}

/* ── Filter row ──────────────────────────────────────────────── */
.filter-row {
  display: flex;
  gap: 10px;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}
.filter-row .form-control {
  flex: 1;
  min-width: 140px;
}

/* ── Login / auth ────────────────────────────────────────────── */
.center-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: var(--bg);
}
.auth-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.25rem;
  width: 100%;
  max-width: 400px;
  box-shadow: var(--shadow);
}
.auth-logo {
  width: 54px;
  height: 54px;
  background: var(--blue-light);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  margin: 0 auto 1rem;
}
.auth-title {
  font-size: 21px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 4px;
}
.auth-sub {
  font-size: 13px;
  color: var(--muted);
  text-align: center;
  margin-bottom: 1.5rem;
}

/* ── Success ─────────────────────────────────────────────────── */
.success-icon {
  width: 64px;
  height: 64px;
  background: var(--green-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  margin: 0 auto 1.25rem;
}

/* ── Empty state ─────────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 3rem;
  color: var(--muted);
}
.empty-state .icon {
  font-size: 38px;
  display: block;
  margin-bottom: 10px;
}

/* ── Misc ────────────────────────────────────────────────────── */
.divider {
  height: 1px;
  background: var(--border);
  margin: 1.25rem 0;
}

/* ══════════════════════════════════════════════════════════════
   RESPONSIVE BREAKPOINTS
   ══════════════════════════════════════════════════════════════ */

/* ── Tablet (≤ 768px) ────────────────────────────────────────── */
@media (max-width: 768px) {
  /* Swap desktop nav → hamburger */
  .navbar {
    padding: 0 1rem;
  }
  .navbar-nav {
    display: none;
  }
  .nav-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  /* Page */
  .page {
    padding: 1.25rem 1rem;
  }
  .page-title {
    font-size: 19px;
  }

  /* Stats: 2-col grid */
  .stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .stat-value {
    font-size: 26px;
  }

  /* Form: single col */
  .form-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  .form-full {
    grid-column: 1;
  }

  /* Auth card */
  .auth-card {
    padding: 1.75rem 1.25rem;
  }

  /* Filters: wrap naturally */
  .filter-row {
    flex-direction: column;
    gap: 8px;
  }
  .filter-row .form-control {
    min-width: 0;
    width: 100%;
  }

  /* Modal full-width */
  .modal {
    padding: 1.5rem 1.25rem;
    max-width: 100%;
  }
  .modal-actions {
    justify-content: stretch;
  }
  .modal-actions .btn {
    flex: 1;
  }

  /* Navbar badge hidden on very small tablets */
  .navbar-badge {
    display: none;
  }

  /* Card padding */
  .card {
    padding: 1.25rem;
  }
}

/* ── Mobile (≤ 540px) ────────────────────────────────────────── */
@media (max-width: 540px) {
  /* Stats: 2 cols but narrower */
  .stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 1rem;
  }
  .stat-card {
    padding: 0.9rem 1rem;
  }
  .stat-value {
    font-size: 24px;
  }
  .stat-label {
    font-size: 10px;
  }

  /* Hide desktop table, show mobile cards */
  .table-wrap table {
    display: none;
  }
  .mobile-cards {
    display: flex;
  }

  /* Full-width buttons in forms */
  .btn-sm {
    width: 100%;
  }

  /* Page title */
  .page-title {
    font-size: 17px;
  }

  /* Success/auth screens */
  .center-wrap {
    padding: 1rem;
    align-items: flex-start;
    padding-top: 2rem;
  }
  .auth-card {
    padding: 1.5rem 1rem;
    border-radius: var(--radius);
  }
  .auth-title {
    font-size: 19px;
  }

  /* Navbar brand – show only icon on very small */
  .navbar-brand span.brand-text {
    display: none;
  }
}

/* ── Very small (≤ 380px) ────────────────────────────────────── */
@media (max-width: 380px) {
  .stats-grid {
    grid-template-columns: 1fr 1fr;
  }
  .stat-value {
    font-size: 22px;
  }
  .page {
    padding: 1rem 0.75rem;
  }
  .card {
    padding: 1rem;
  }
}


/* ══════════════════════════════════════════════════
   ROLE NOTICE BAR
══════════════════════════════════════════════════ */
.role-notice {
  background: #fffbea;
  border-bottom: 1px solid #f0d070;
  padding: 9px 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  color: #7a5c00;
  flex-wrap: wrap;
}
.role-notice strong { font-weight: 700; }
.role-notice-btn {
  background: var(--blue);
  color: #fff;
  padding: 5px 14px;
  border-radius: var(--radius);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
}
.role-notice-btn:hover { background: var(--blue-dark, #1450a3); }
@media (max-width: 540px) {
  .role-notice { flex-direction: column; align-items: flex-start; gap: 8px; padding: 10px 1rem; }
  .role-notice-btn { width: 100%; text-align: center; }
}

/* ══════════════════════════════════════════════════
   CENTERED NAVBAR LOGO (public page)
══════════════════════════════════════════════════ */
.navbar-public { position: relative; }
.navbar-logo-center {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  pointer-events: none;
}
.navbar-logo-img {
  height: 70px;
  width: auto;
  max-width: 300px;
  object-fit: contain;
  display: block;
}
@media (max-width: 768px) {
  .navbar-logo-center { position: absolute; left: 50%; transform: translateX(-50%); }
  .navbar-logo-img { height: 70px; max-width: 200px; }
}
@media (max-width: 380px) {
  .navbar-logo-img { height: 70px; max-width: 200px; }
}

/* ══════════════════════════════════════════════════
   CUSTOM CALENDAR PICKER
══════════════════════════════════════════════════ */
.cal-input-wrap { position: relative; }

.cal-display {
  cursor: pointer !important;
  background: #fff;
  caret-color: transparent;
}
.cal-display:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(24,95,165,.15);
}

.cal-popup {
  position: absolute;
  z-index: 9999;
  background: #fff;
  border: 1px solid var(--border, #dde3ec);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,.18);
  width: 308px;
  padding-bottom: 10px;
  overflow: hidden;
  font-size: 13px;
}

/* ── Calendar Header ── */
.cal-header {
  display: flex;
  align-items: center;
  background: var(--blue, #185FA5);
  color: #fff;
  padding: 10px 12px;
  gap: 6px;
}
.cal-month-label {
  flex: 1;
  text-align: center;
  font-weight: 700;
  font-size: 14px;
}
.cal-nav {
  background: rgba(255,255,255,.2);
  border: none;
  color: #fff;
  width: 30px;
  height: 30px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.cal-nav:hover { background: rgba(255,255,255,.35); }
.cal-close {
  background: rgba(255,255,255,.2);
  border: none;
  color: #fff;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  margin-left: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cal-close:hover { background: rgba(200,0,0,.5); }

/* ── Legend ── */
.cal-legend {
  display: flex;
  gap: 12px;
  padding: 8px 12px 6px;
  font-size: 11px;
  color: var(--muted, #6b7a99);
  border-bottom: 1px solid var(--border, #dde3ec);
}
.leg-item { display: flex; align-items: center; gap: 4px; }
.leg-dot  { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.leg-holiday  { background: #f5c518; }
.leg-sunday   { background: #ff4d4f; }
.leg-selected { background: var(--blue, #185FA5); }

/* ── Grid ── */
.cal-grid {
  display: grid !important;
  grid-template-columns: repeat(7, 1fr) !important;
  gap: 2px;
  padding: 8px 8px 4px;
}
.cal-dow {
  text-align: center;
  font-weight: 700;
  font-size: 11px;
  color: var(--muted, #6b7a99);
  padding: 4px 0;
}
.cal-dow:first-child { color: #ff4d4f; }

/* ── Day Cells ── */
.cal-cell {
  position: relative;
  min-height: 40px;
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 3px 1px 2px;
  cursor: pointer;
  transition: background .12s;
  overflow: hidden;
}
.cal-cell:hover:not(.cal-sunday):not(.cal-past):not(.cal-empty) {
  background: #e8f0fb;
}
.cal-empty { cursor: default; pointer-events: none; }

.cal-day-num {
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
  z-index: 1;
}

/* Today ring */
.cal-today > .cal-day-num {
  background: var(--blue, #185FA5);
  color: #fff;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
}

/* Sunday */
.cal-sunday { cursor: not-allowed; opacity: .4; }
.cal-sunday > .cal-day-num { color: #ff4d4f; }

/* Past */
.cal-past { opacity: .35; cursor: default; pointer-events: none; }

/* Holiday */
.cal-holiday { background: #fffbe6; }
.cal-holiday:hover { background: #fff3b0 !important; }
.cal-hol-dot {
  font-size: 7px;
  color: #f5c518;
  line-height: 1;
  margin-top: 1px;
}
.cal-hol-label {
  font-size: 8px;
  color: #b8860b;
  text-align: center;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  max-width: 38px;
  text-overflow: ellipsis;
}

/* Selected from / to */
.cal-from,
.cal-to {
  background: var(--blue, #185FA5) !important;
}
.cal-from > .cal-day-num,
.cal-to   > .cal-day-num { color: #fff !important; font-weight: 700; }
.cal-from > .cal-hol-dot,
.cal-to   > .cal-hol-dot { color: rgba(255,255,255,.8); }
.cal-from > .cal-hol-label,
.cal-to   > .cal-hol-label { color: rgba(255,255,255,.7); }

/* In-range */
.cal-range { background: #dbeafe; border-radius: 0; }
.cal-range > .cal-day-num { color: var(--blue, #185FA5); }

/* ── Holiday Summary (below grid) ── */
.cal-hol-summary {
  margin: 6px 10px 0;
  padding: 8px 10px;
  background: #fffbe6;
  border-radius: 8px;
  border: 1px solid #ffe066;
}
.cal-hol-row {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  font-size: 11.5px;
  color: #7a5c00;
  padding: 2px 0;
  line-height: 1.4;
}
.cal-hol-badge { flex-shrink: 0; }

/* ── Mobile: center popup ── */
@media (max-width: 600px) {
  .cal-popup {
    position: fixed !important;
    left: 50% !important;
    top: 50% !important;
    transform: translate(-50%, -50%) !important;
    width: 95vw !important;
    max-width: 340px;
    max-height: 90vh;
    overflow-y: auto;
  }
}


