/* ==========================================================================
   Ovdim — application UI design system (Hebrew RTL SaaS)
   Part of the Ovdim proprietary layer (ovdim_theme). See LICENSE-OVDIM.
   Companion to ovdim/templates/ovdim/*.html. Loaded by ovdim/base.html.

   Palette: an "indigo + teal" accent system on a warm-neutral canvas, tuned
   for light mode only (the pilot surface). Uses CSS logical properties so it
   is direction-agnostic and reads correctly in RTL (text-align: start etc.).
   ========================================================================== */

:root {
  /* --- brand / accents --- */
  --ovd-brand: #4f46e5;          /* indigo-600 */
  --ovd-brand-2: #0ea5b7;        /* teal-600 */
  --ovd-brand-grad: linear-gradient(135deg, #4f46e5 0%, #7c3aed 55%, #0ea5b7 100%);
  --ovd-brand-soft: #eef2ff;     /* indigo-50 */
  --ovd-accent: #0b5fff;
  --ovd-accent-2: #0ea5b7;

  /* --- surfaces --- */
  --ovd-bg: #f6f7fb;
  --ovd-surface: #ffffff;
  --ovd-surface-2: #fafbfe;
  --ovd-border: #e6e8ef;
  --ovd-border-strong: #d5d9e4;

  /* --- text --- */
  --ovd-text: #16181d;
  --ovd-text-2: #4b5565;
  --ovd-text-3: #6b7280;   /* darkened from #8a93a3 → 4.5:1 on white (WCAG AA body text) */
  --ovd-on-brand: #ffffff;

  /* --- semantic --- */
  --ovd-ok: #16a34a;
  --ovd-ok-soft: #ecfdf3;
  --ovd-warn: #d97706;
  --ovd-warn-soft: #fffbeb;
  --ovd-danger: #dc2626;
  --ovd-danger-soft: #fef2f2;

  /* --- radii / shadow --- */
  --ovd-r-sm: 10px;
  --ovd-r-md: 16px;
  --ovd-r-lg: 22px;
  --ovd-shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.05);
  --ovd-shadow-md: 0 8px 24px rgba(16, 24, 40, 0.08);
  --ovd-shadow-lg: 0 24px 60px -20px rgba(79, 70, 229, 0.35);

  /* --- type --- */
  --ovd-font: "Heebo", "Assistant", system-ui, -apple-system, "Segoe UI", sans-serif;
  --ovd-lh: 1.6;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--ovd-font);
  line-height: var(--ovd-lh);
  color: var(--ovd-text);
  background:
    radial-gradient(1200px 600px at 85% -10%, rgba(124, 58, 237, 0.08), transparent 60%),
    radial-gradient(900px 500px at 0% 0%, rgba(14, 165, 183, 0.07), transparent 55%),
    var(--ovd-bg);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--ovd-accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* --- top navigation ------------------------------------------------------ */
.ovd-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 28px;
  height: 64px;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--ovd-border);
}
/* OVDIM-MODIFICATION: allow the chip row to wrap on narrow screens so the nav
   never forces a horizontal scrollbar on a phone. Desktop stays a single 64px
   bar (enough links fit one row); the wrap only engages when space runs out. */
.ovd-nav { flex-wrap: wrap; height: auto; min-height: 64px; padding-block: 6px; }
.ovd-nav .spacer { flex: 1; }
.ovd-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 19px;
  letter-spacing: -0.2px;
  color: var(--ovd-text);
  margin-inline-end: 22px;
}
.ovd-brand .mark {
  width: 34px; height: 34px;
  border-radius: 9px;
  display: block;
  object-fit: contain;
  flex: none;
}
.ovd-nav a.navlink {
  color: var(--ovd-text-2);
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 10px;
  transition: background .15s ease, color .15s ease;
}
.ovd-nav a.navlink:hover { background: var(--ovd-brand-soft); color: var(--ovd-brand); text-decoration: none; }
.ovd-nav a.navlink.active { background: var(--ovd-brand-soft); color: var(--ovd-brand); }

/* --- layout shell -------------------------------------------------------- */
.ovd-shell { max-width: 1120px; margin: 0 auto; padding: 34px 28px 80px; }
.ovd-page-title { margin: 0 0 6px; font-size: 28px; font-weight: 800; letter-spacing: -0.4px; }
.ovd-page-sub { margin: 0 0 26px; color: var(--ovd-text-3); font-size: 15px; }

/* --- card ----------------------------------------------------------------- */
.ovd-card {
  background: var(--ovd-surface);
  border: 1px solid var(--ovd-border);
  border-radius: var(--ovd-r-md);
  padding: 26px;
  margin-bottom: 22px;
  box-shadow: var(--ovd-shadow-sm);
}
.ovd-card h2 { margin: 0 0 18px; font-size: 19px; font-weight: 700; }
.ovd-card h3 { margin: 26px 0 4px; font-size: 15px; font-weight: 700; color: var(--ovd-text-2); }
.ovd-card h3:first-child { margin-top: 0; }

/* --- stat cards ----------------------------------------------------------- */
.ovd-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin: 0 0 26px;
}
.ovd-stat {
  position: relative;
  overflow: hidden;
  background: var(--ovd-surface);
  border: 1px solid var(--ovd-border);
  border-radius: var(--ovd-r-md);
  padding: 22px 22px 20px;
  box-shadow: var(--ovd-shadow-sm);
  transition: transform .18s ease, box-shadow .18s ease;
}
.ovd-stat:hover { transform: translateY(-3px); box-shadow: var(--ovd-shadow-md); }
.ovd-stat .glow {
  position: absolute; inset-inline-start: -30px; top: -30px;
  width: 110px; height: 110px; border-radius: 50%;
  background: radial-gradient(circle, rgba(79, 70, 229, 0.14), transparent 70%);
  pointer-events: none;
}
.ovd-stat .n { font-size: 30px; font-weight: 800; letter-spacing: -0.5px; color: var(--ovd-text); }
.ovd-stat .n small { font-size: 14px; font-weight: 600; color: var(--ovd-text-3); }
.ovd-stat .l { color: var(--ovd-text-3); font-size: 13px; font-weight: 500; margin-top: 4px; }
.ovd-stat .ico { font-size: 20px; }

/* --- table ----------------------------------------------------------------- */
.ovd-table-wrap { overflow-x: auto; border-radius: var(--ovd-r-md); border: 1px solid var(--ovd-border); }
table.ovd-table { width: 100%; border-collapse: collapse; min-width: 520px; }
.ovd-table thead th {
  text-align: start;
  background: var(--ovd-surface-2);
  color: var(--ovd-text-3);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--ovd-border);
}
.ovd-table tbody td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--ovd-border);
  font-size: 14px;
  vertical-align: middle;
}
.ovd-table tbody tr:last-child td { border-bottom: 0; }
.ovd-table tbody tr:hover { background: #fafbff; }
/* OVDIM-MODIFICATION: weekend tint for the month grid (was an inline style). */
.ovd-month-table tbody tr.ovd-day-weekend { background: #fafbff; }
.ovd-emp { display: flex; align-items: center; gap: 10px; }
.ovd-avatar {
  width: 34px; height: 34px; flex: 0 0 34px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-weight: 700; font-size: 14px; color: #fff;
  background: var(--ovd-brand-grad);
}
.ovd-emp .nm { font-weight: 600; }

/* --- "העובדים שלי" — employee card grid + detail ---------------------------- */
.ovd-emp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 16px;
  margin-top: 4px;
}
.ovd-emp-card {
  display: flex; align-items: center; gap: 13px;
  padding: 16px;
  background: var(--ovd-surface);
  border: 1px solid var(--ovd-border);
  border-radius: var(--ovd-r-md);
  box-shadow: var(--ovd-shadow-sm);
  text-decoration: none; color: inherit;
  transition: box-shadow .15s ease, border-color .15s ease, transform .12s ease;
}
.ovd-emp-card:hover {
  border-color: var(--ovd-brand);
  box-shadow: var(--ovd-shadow-md);
  transform: translateY(-1px);
}
.ovd-emp-ava {
  width: 46px; height: 46px; flex: none;
  border-radius: 50%;
  display: grid; place-items: center;
  font-weight: 700; font-size: 19px; color: #fff;
  background: var(--ovd-brand-grad);
}
.ovd-emp-ava.lg { width: 62px; height: 62px; font-size: 26px; }
.ovd-emp-body { display: grid; gap: 2px; min-width: 0; flex: 1; }
.ovd-emp-name { font-weight: 700; font-size: 16px; color: var(--ovd-text); }
.ovd-emp-role { font-size: 13.5px; color: var(--ovd-text-2); }
.ovd-emp-meta { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 5px; }
.ovd-emp-chip {
  font-size: 11.5px; font-weight: 600;
  padding: 2px 9px; border-radius: 999px;
  background: var(--ovd-brand-soft); color: var(--ovd-brand);
}
.ovd-emp-chip.mut { background: #f1f3f7; color: var(--ovd-text-3); }
.ovd-emp-go { color: var(--ovd-text-3); font-size: 18px; flex: none; }
.ovd-emp-card:hover .ovd-emp-go { color: var(--ovd-brand); }

/* detail page head + facts */
.ovd-emp-detail-head { display: flex; align-items: center; gap: 15px; margin-bottom: 18px; }
.ovd-emp-detail-title h1 { margin: 0; font-size: 26px; font-weight: 800; letter-spacing: -0.4px; }
.ovd-facts {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 14px 22px; margin: 0;
}
.ovd-fact { display: grid; gap: 3px; }
.ovd-fact dt { font-size: 12px; font-weight: 700; color: var(--ovd-text-3); text-transform: uppercase; letter-spacing: .4px; }
.ovd-fact dd { margin: 0; font-size: 15.5px; font-weight: 600; color: var(--ovd-text); }

.ovd-pill {
  display: inline-block; padding: 3px 11px; border-radius: 999px;
  font-size: 12px; font-weight: 700;
}
.ovd-pill.ok { background: var(--ovd-ok-soft); color: var(--ovd-ok); }
.ovd-pill.warn { background: var(--ovd-warn-soft); color: var(--ovd-warn); }
.ovd-pill.mut { background: #f1f3f7; color: var(--ovd-text-3); }

/* --- forms ----------------------------------------------------------------- */
label.ovd-label { display: block; margin: 14px 0 5px; font-weight: 600; font-size: 13.5px; color: var(--ovd-text-2); }
input.ovd-input, select.ovd-input, textarea.ovd-input {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--ovd-border-strong);
  border-radius: var(--ovd-r-sm);
  font-family: inherit;
  font-size: 15px;
  background: #fff;
  transition: border-color .15s ease, box-shadow .15s ease;
}
input.ovd-input:focus, select.ovd-input:focus, textarea.ovd-input:focus {
  outline: none;
  border-color: var(--ovd-brand);
  box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.12);
}
input[type="checkbox"].ovd-check { width: auto; accent-color: var(--ovd-brand); }
.ovd-form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 0 22px; }

/* --- employee-document upload form (documents.html) ------------------------ */
/* Vertical, organized stack — each field on its own row. */
.ovd-doc-form { display: grid; gap: 15px; max-width: 540px; }
.ovd-doc-form .ovd-field { display: grid; gap: 6px; margin: 0; }
.ovd-doc-form .ovd-field > span { font-weight: 600; font-size: 13.5px; color: var(--ovd-text-2); }
.ovd-doc-form .ovd-field input[type="text"],
.ovd-doc-form .ovd-field input[type="date"],
.ovd-doc-form .ovd-field select {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--ovd-border-strong);
  border-radius: var(--ovd-r-sm);
  font-family: inherit;
  font-size: 15px;
  background: #fff;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.ovd-doc-form .ovd-field input[type="file"] {
  width: 100%;
  padding: 10px 12px;
  border: 1.5px dashed var(--ovd-border-strong);
  border-radius: var(--ovd-r-sm);
  background: var(--ovd-surface-2);
  font-family: inherit;
  font-size: 14px;
  color: var(--ovd-text-2);
}
.ovd-doc-form .ovd-field input:focus,
.ovd-doc-form .ovd-field select:focus {
  outline: none;
  border-color: var(--ovd-brand);
  box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.12);
}
.ovd-consent {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 13px 15px;
  background: var(--ovd-brand-soft);
  border: 1px solid #d3dbff;
  border-radius: var(--ovd-r-sm);
  font-size: 13.5px; line-height: 1.55; color: var(--ovd-text-2);
}
.ovd-consent input[type="checkbox"] { margin-top: 3px; accent-color: var(--ovd-brand); flex: none; }
.ovd-doc-form .ovd-btn-export { justify-self: start; margin-top: 2px; }

/* --- expiring-documents list ----------------------------------------------- */
.ovd-expiring-list { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 4px; }
.ovd-expiring-list li {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 12px 14px;
  border: 1px solid var(--ovd-border);
  border-radius: var(--ovd-r-sm);
  background: var(--ovd-surface);
  font-size: 14.5px; line-height: 1.5;
}
.ovd-expiring-list li strong { font-weight: 700; color: var(--ovd-text); }
.ovd-expiring-list .ovd-pill { flex: none; }
.ovd-pill.bad { background: var(--ovd-danger-soft); color: var(--ovd-danger); }
.ovd-doc-open {
  font-size: 13px; font-weight: 600; color: var(--ovd-brand);
  text-decoration: none; white-space: nowrap;
  padding: 4px 10px; border-radius: var(--ovd-r-sm);
  border: 1px solid transparent;
  transition: background .15s ease, border-color .15s ease;
}
.ovd-doc-open:hover { background: var(--ovd-brand-soft); border-color: #d3dbff; }

/* --- buttons ---------------------------------------------------------------- */
.ovd-btn {
  display: inline-flex; align-items: center; gap: 8px;
  border: 0; cursor: pointer;
  font-family: inherit; font-weight: 700; font-size: 15px;
  padding: 12px 22px;
  border-radius: var(--ovd-r-sm);
  color: var(--ovd-on-brand);
  background: var(--ovd-brand-grad);
  background-size: 160% 100%;
  box-shadow: 0 8px 20px -8px rgba(79, 70, 229, 0.6);
  transition: background-position .25s ease, transform .12s ease, box-shadow .2s ease;
}
.ovd-btn:hover { background-position: 100% 0; transform: translateY(-1px); box-shadow: 0 12px 26px -8px rgba(79, 70, 229, 0.7); }
.ovd-btn:active { transform: translateY(0); }
.ovd-btn.ghost { background: #fff; color: var(--ovd-brand); border: 1px solid var(--ovd-border-strong); box-shadow: none; }
.ovd-btn.ghost:hover { background: var(--ovd-brand-soft); box-shadow: none; }
.ovd-btn.block { width: 100%; justify-content: center; margin-top: 22px; }

/* --- messages --------------------------------------------------------------- */
.ovd-msg { padding: 13px 16px; border-radius: var(--ovd-r-sm); margin: 0 0 18px; font-size: 14px; font-weight: 500; }
.ovd-msg.success { background: var(--ovd-ok-soft); color: var(--ovd-ok); }
.ovd-msg.error { background: var(--ovd-danger-soft); color: var(--ovd-danger); }
.ovd-msg.warning { background: var(--ovd-warn-soft); color: var(--ovd-warn); }

/* --- hero / empty state ------------------------------------------------------ */
.ovd-hero {
  background: var(--ovd-brand-grad);
  color: #fff;
  border-radius: var(--ovd-r-lg);
  padding: 40px 36px;
  margin-bottom: 26px;
  box-shadow: var(--ovd-shadow-lg);
  position: relative;
  overflow: hidden;
}
.ovd-hero::after {
  content: "";
  position: absolute; inset-inline-end: -60px; top: -60px;
  width: 260px; height: 260px; border-radius: 50%;
  background: rgba(255,255,255,0.10);
}
.ovd-hero h1 { margin: 0 0 8px; font-size: 30px; font-weight: 800; letter-spacing: -0.4px; }
.ovd-hero p { margin: 0; opacity: 0.92; font-size: 16px; max-width: 60ch; }
.ovd-empty { text-align: center; padding: 40px 20px; color: var(--ovd-text-3); }
.ovd-empty .big { font-size: 40px; }

/* Quick-action cards inside the "everything is fine" empty state — turn the
   calm moment into a nudge to keep data fresh (attention widget, plan 15). */
.ovd-empty-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 18px;
  text-align: start;
}
.ovd-empty-action {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px 16px;
  border: 1px solid var(--ovd-border);
  border-radius: var(--ovd-r-sm);
  background: var(--ovd-surface, #fff);
  color: inherit;
  text-decoration: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.ovd-empty-action:hover {
  border-color: var(--ovd-brand);
  box-shadow: var(--ovd-shadow-sm);
  text-decoration: none;
}
.ovd-empty-action-ic { font-size: 20px; line-height: 1.2; flex-shrink: 0; }
.ovd-empty-action b { display: block; font-size: 14px; font-weight: 700; color: var(--ovd-text); }
.ovd-empty-action small { display: block; font-size: 12.5px; color: var(--ovd-text-3); margin-top: 2px; }
@media (max-width: 640px) {
  .ovd-empty-actions { grid-template-columns: 1fr; }
}

/* --- misc -------------------------------------------------------------------- */
.ovd-muted { color: var(--ovd-text-3); }
.ovd-foot-note { margin-top: 30px; color: var(--ovd-text-3); font-size: 12.5px; }

/* --- payroll export card ---------------------------------------------------- */
.ovd-export-card { margin-bottom: 22px; }
.ovd-export-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 18px; flex-wrap: wrap;
}
.ovd-export-row h2 { margin: 0 0 4px; font-size: 19px; }
.ovd-export-row p { margin: 0; font-size: 14px; }
.ovd-export-form { display: flex; align-items: center; gap: 10px; }
.ovd-export-form input[type="month"] {
  height: 44px; padding: 0 12px; font: inherit; font-size: 14.5px;
  color: var(--ovd-text); background: var(--ovd-surface-2);
  border: 1.5px solid var(--ovd-border-strong); border-radius: var(--ovd-r-sm);
}
.ovd-export-form input[type="month"]:focus {
  outline: none; border-color: var(--ovd-brand);
  box-shadow: 0 0 0 4px var(--ovd-brand-soft); background: var(--ovd-surface);
}
.ovd-btn-export {
  height: 44px; padding: 0 20px; border: 0; border-radius: var(--ovd-r-sm);
  background: var(--ovd-brand-grad); color: var(--ovd-on-brand);
  font: inherit; font-size: 15px; font-weight: 700; cursor: pointer;
  box-shadow: var(--ovd-shadow-md); white-space: nowrap;
  transition: transform .08s ease, filter .15s ease, box-shadow .15s ease;
}
.ovd-btn-export:hover { filter: brightness(1.06); box-shadow: var(--ovd-shadow-lg); }
.ovd-btn-export:active { transform: translateY(1px); }

/* Visually-hidden but screen-reader-accessible label. */
.ovd-sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* --- accessibility: keyboard focus rings ------------------------------------ */
.ovd-btn:focus-visible, .ovd-btn-export:focus-visible,
.ovd-nav a.navlink:focus-visible, a:focus-visible {
  outline: 2px solid var(--ovd-brand);
  outline-offset: 2px;
  border-radius: var(--ovd-r-sm);
}
input.ovd-input:focus-visible, select.ovd-input:focus-visible, textarea.ovd-input:focus-visible {
  outline: 2px solid var(--ovd-brand);
  outline-offset: 2px;
}

/* --- reduced motion: honor the user's OS setting ---------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* --- HTMX top progress bar (brand indigo, RTL-correct: grows from the right) - */
#ovd-progress {
  position: fixed; top: 0; inset-inline-start: 0; z-index: 9999;
  height: 3px; width: 0%;
  background: var(--ovd-brand-grad);
  border-radius: 0 0 3px 3px;
  opacity: 0; pointer-events: none;
  transition: width .3s ease, opacity .3s ease;
}
#ovd-progress.ovd-progress-active { opacity: 1; }

/* --- submit-in-flight: lock buttons during a POST (kills double-export) ----- */
button[disabled], .ovd-btn[disabled], .ovd-btn-export[disabled] {
  opacity: 0.55; cursor: not-allowed; transform: none !important;
}

@media (max-width: 640px) {
  .ovd-shell { padding: 22px 16px 60px; }
  .ovd-hero { padding: 28px 22px; }
  .ovd-nav { padding: 6px 14px; }
  .ovd-brand .txt { display: none; }
  /* OVDIM-MODIFICATION: compact chip row on a phone — tighter gaps/padding and a
     44px-min touch target per link so the wrapped nav stays tappable. */
  .ovd-nav { gap: 4px; }
  .ovd-nav a.navlink {
    padding: 10px 12px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    font-size: 14.5px;
  }
  .ovd-brand { margin-inline-end: 8px; }
  .ovd-brand .mark { width: 30px; height: 30px; }
}

/* ==========================================================================
   OVDIM-MODIFICATION: ESS "החודש שלי" month grid — stacked day-cards on a phone.
   Scoped to table.ovd-month-table ONLY so the manager timesheet
   (ess_team_timesheets.html, plain table.ovd-table) keeps its desktop table.
   The single <tr> per day stays the one source of truth; below 640px each row
   becomes a card and each <td> a labelled row via its data-label pseudo-header.
   ========================================================================== */
@media (max-width: 640px) {
  /* Kill the 520px min-width + horizontal scroller for the month grid only. */
  .ovd-month-table-wrap { overflow-x: visible; border: 0; }
  table.ovd-month-table { min-width: 0; }

  /* table → block stack */
  table.ovd-month-table,
  table.ovd-month-table thead,
  table.ovd-month-table tbody,
  table.ovd-month-table tr,
  table.ovd-month-table td { display: block; width: 100%; }

  /* header row is visually hidden; cells carry data-label instead */
  table.ovd-month-table thead {
    position: absolute; width: 1px; height: 1px;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
  }

  /* each day = a card */
  table.ovd-month-table tbody tr {
    background: var(--ovd-surface);
    border: 1px solid var(--ovd-border);
    border-radius: var(--ovd-r-md);
    box-shadow: var(--ovd-shadow-sm);
    padding: 6px 4px;
    margin-bottom: 12px;
  }
  /* weekend tint moves from the inline row background to the card */
  table.ovd-month-table tbody tr.ovd-day-weekend { background: var(--ovd-surface-2); }
  table.ovd-month-table tbody tr:hover { background: var(--ovd-surface); }
  table.ovd-month-table tbody tr.ovd-day-weekend:hover { background: var(--ovd-surface-2); }

  /* each cell = a label:value row inside the card */
  table.ovd-month-table tbody td {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    padding: 10px 14px;
    border-bottom: 1px solid var(--ovd-border);
    min-height: 44px; /* touch target */
    text-align: start;
  }
  table.ovd-month-table tbody tr td:last-child { border-bottom: 0; }

  /* the pseudo-header from data-label (Hebrew, RTL start) */
  table.ovd-month-table tbody td[data-label]::before {
    content: attr(data-label);
    flex: none;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: var(--ovd-text-3);
  }

  /* the day-type cell holds many pills — let them wrap left-aligned to start */
  table.ovd-month-table tbody td.ovd-cell-type {
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
  }
  table.ovd-month-table tbody td.ovd-cell-type .ovd-pill { align-self: flex-start; }

  /* time-entry inputs fill the value side of their row */
  table.ovd-month-table .ovd-input { max-width: 160px; }

  /* the + day-menu popover must not overflow the card edge on a phone */
  table.ovd-month-table .ovd-daymenu-list {
    inset-inline-start: auto;
    inset-inline-end: 0;
    min-width: 0;
    width: min(240px, calc(100vw - 64px));
  }

  /* structural <td></td> placeholders (leave / read-only branches) carry no
     content and no data-label — drop them so they don't render as blank rows. */
  table.ovd-month-table tbody td:empty { display: none; }

  /* touch targets: the + menu trigger and the per-day save button */
  table.ovd-month-table .ovd-daymenu > summary,
  table.ovd-month-table .ovd-btn {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }
}
