/* Malkishuart admin — the six approved mockups as one stylesheet. */
:root {
  --ink: #22201C; --ink-2: #4A453C; --muted: #6E665A; --faint: #8A837A;
  --page: #F7F4EE; --card: #FFFFFF; --card-2: #FCFBF8; --line: #E3DDD1; --track: #EFEBE3;
  --bar: #22201C; --bar-chip: #3A3630; --bar-text: #C9C2B6;
  --green: #2E5145; --green-bg: #E4EDE9; --green-bar: #3F6B5E;
  --amber: #6B4C12; --amber-bg: #F6EDDA; --amber-line: #B5822A;
  --red: #7A3931; --red-bg: #F6E9E5; --red-2: #8A3329; --red-bg-2: #F7E7E4; --accent: #9C4A3C;
  --dot: #C0B9AC;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: Assistant, system-ui, sans-serif; background: var(--page); color: var(--ink); direction: rtl; font-size: 15px; }
a { color: var(--accent); }
a:hover { color: var(--red); }
h1 { font-family: 'Frank Ruhl Libre', Georgia, serif; font-size: 26px; font-weight: 700; margin: 0; }
.display { font-family: 'Frank Ruhl Libre', Georgia, serif; font-weight: 700; }

/* The dark top bar */
.topbar { height: 68px; padding: 0 32px; background: var(--bar); display: flex; align-items: center; gap: 28px; }
.topbar .brand { font-family: 'Frank Ruhl Libre', Georgia, serif; font-size: 20px; font-weight: 700; color: var(--page); }
.nav { display: flex; gap: 4px; flex-grow: 1; }
.nav a { padding: 8px 14px; border-radius: 8px; color: var(--bar-text); font-size: 15px; text-decoration: none; }
.nav a.active { background: var(--bar-chip); color: var(--page); font-weight: 600; }
.period { color: var(--bar-text); font-size: 15px; display: flex; gap: 10px; align-items: center; }
.subnav { display: flex; gap: 4px; padding: 10px 32px; background: var(--card-2); border-bottom: 1px solid var(--line); }
.subnav a { padding: 6px 12px; border-radius: 8px; color: var(--muted); font-size: 14px; text-decoration: none; }
.subnav a.active { background: var(--card); color: var(--ink); font-weight: 600; box-shadow: inset 0 0 0 1px var(--line); }
.period a { color: var(--bar-text); text-decoration: none; font-size: 20px; }
.logout .btn-link { background: none; border: 0; color: var(--bar-text); cursor: pointer; font: inherit; }

/* The page */
.screen { padding: 28px 32px; display: flex; flex-direction: column; gap: 20px; max-width: 1280px; margin: 0 auto; }
.lead { color: var(--muted); font-size: 15px; }
.card { padding: 22px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; display: flex; flex-direction: column; gap: 14px; }
.card.warn { border-color: var(--amber-line); }
.card.narrow { max-width: 520px; margin: 40px auto; }
.card h2 { font-size: 18px; font-weight: 700; margin: 0; }
.columns { display: flex; gap: 16px; align-items: flex-start; }
.columns > .card { flex: 1 1 0; }
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.tiles.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tile { padding: 18px 20px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; display: flex; flex-direction: column; gap: 4px; }
.tile .label { font-size: 14px; color: var(--muted); }
.tile .value { font-family: 'Frank Ruhl Libre', Georgia, serif; font-size: 34px; font-weight: 700; }
.tile.green .value { color: var(--green); }
.tile.amber { border-color: var(--amber-line); } .tile.amber .value { color: var(--amber); }

/* Tables: one grid per screen, the column count set on the screen */
.table { display: flex; flex-direction: column; gap: 10px; }
.thead, .row { display: grid; gap: 12px; align-items: center; }
.thead { padding-bottom: 10px; border-bottom: 1px solid var(--line); font-size: 13px; font-weight: 700; color: var(--muted); }
.row { padding: 6px 0; border-bottom: 1px solid var(--track); }
.row .sub { font-size: 13px; color: var(--faint); }
.row.void { color: var(--faint); text-decoration: line-through; }
.cols-2 .thead, .cols-2 .row { grid-template-columns: 140px 1fr; }
.cols-4 .thead, .cols-4 .row { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.cols-5 .thead, .cols-5 .row { grid-template-columns: 60px 130px 1fr 2fr 120px; }
.cols-6 .thead, .cols-6 .row { grid-template-columns: 1.2fr 0.8fr 1.2fr 0.7fr 0.9fr 1.2fr; }
.cols-7 .thead, .cols-7 .row { grid-template-columns: 1.4fr 1fr 1.6fr 1fr 1fr 0.7fr 1fr; }
.cols-8 .thead, .cols-8 .row { grid-template-columns: 1.2fr 1fr 1.4fr 0.7fr 0.6fr 1fr 0.9fr 0.8fr; }
.foot { font-size: 13px; color: var(--muted); display: flex; justify-content: space-between; }

/* The month calendar. Friday and Saturday narrow — the business never
   schedules on them, and Sunday through Wednesday are what Nirit reads. */
.cal { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)) 0.45fr 0.45fr; gap: 6px; }
.cal .dow { text-align: center; font-size: 12px; color: var(--muted); padding-bottom: 2px; }
.cal-day { min-height: 60px; padding: 6px; border-radius: 8px; border: 1px solid var(--line); background: var(--card); font-size: 12px; text-align: right; font-family: inherit; }
.cal-day.empty { border-style: dashed; background: var(--card-2); cursor: pointer; width: 100%; }
.cal-day .num { color: var(--muted); margin-bottom: 4px; }
.cal-day .slot { border-radius: 4px; padding: 2px 4px; margin-bottom: 2px; border: 1px solid var(--line); }
.cal-day .slot.open { background: var(--green-bg); border-color: var(--green); color: var(--green); font-weight: 700; }
.cal-day .slot.locked { background: var(--accent); border-color: var(--accent); color: var(--page); font-weight: 700; }
.cal-day .slot .taken { font-size: 11px; }

/* Chips */
.chip { display: inline-block; padding: 3px 10px; border-radius: 4px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.chip-ok { background: var(--green-bg); color: var(--green); }
.chip-warn { background: var(--amber-bg); color: var(--amber); }
.chip-bad { background: var(--red-bg-2); color: var(--red-2); }
.chip-muted { background: var(--track); color: var(--muted); }
.chip-dark { background: var(--bar-chip); color: var(--page); }
/* A meeting with real bookings — solid, not the pale tint the other chips
   use, so it reads at a glance beside the calendar's own cells. */
.chip-locked { background: var(--accent); color: var(--page); }
.filters { display: flex; gap: 8px; }
.filters a { text-decoration: none; }
.filters a.active .chip { background: var(--bar-chip); color: var(--page); }

/* Bars and feed */
.bar { display: flex; align-items: center; gap: 8px; }
.bar .track { flex-grow: 1; height: 7px; border-radius: 4px; background: var(--track); }
.bar .fill { height: 7px; border-radius: 4px; background: var(--green-bar); }
.bar .fill.warn { background: var(--amber-line); } .bar .fill.full { background: var(--accent); }
.bar span { font-size: 13px; color: var(--ink-2); }
.feed { display: flex; flex-direction: column; gap: 12px; }
.feed .line { display: flex; gap: 10px; }
.feed .dot { width: 8px; height: 8px; border-radius: 4px; background: var(--dot); margin-top: 7px; flex: none; }
.feed .dot.green { background: var(--green-bar); } .feed .dot.red { background: var(--accent); } .feed .dot.amber { background: var(--amber-line); }
.feed .when { font-size: 12px; color: var(--muted); }
.attention .item { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--track); }
.attention .item > div { flex-grow: 1; }

/* Forms and buttons */
input[type=text], input[type=search], input[type=email], input[type=tel], input[type=datetime-local], select, textarea {
  font: inherit; padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--card-2); color: var(--ink); }
input.short { width: 120px; } input.tiny { width: 64px; }
label { font-size: 13px; color: var(--muted); }
.field { display: flex; flex-direction: column; gap: 4px; }
.inline { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.btn { font: inherit; font-weight: 600; padding: 8px 16px; border-radius: 8px; border: 1px solid var(--line); background: var(--card); color: var(--ink); cursor: pointer; }
.btn-primary { background: var(--ink); color: var(--page); border-color: var(--ink); }
.btn-danger { color: var(--red); border-color: var(--red-bg); background: var(--red-bg); }
.btn-small { padding: 4px 10px; font-size: 13px; }
.copy textarea { width: 100%; min-height: 220px; font-family: inherit; white-space: pre-wrap; }
.copy { display: flex; flex-direction: column; gap: 8px; }
.error { background: var(--red-bg-2); color: var(--red-2); border: 1px solid var(--red-bg); border-radius: 8px; padding: 8px 12px; display: inline-flex; gap: 12px; align-items: center; }
.error a { color: var(--red-2); }
.needs-email { color: var(--red-2); font-weight: 600; }
.hand { font-size: 12px; color: var(--muted); }

/* A run of numbers keeps its order inside Hebrew (CLAUDE.md's bidi rule, in HTML). Never put Hebrew inside it. */
.ltr { direction: ltr; unicode-bidi: isolate; display: inline-block; }

@media print {
  .topbar, .btn, .filters, .no-print { display: none !important; }
  body { background: #fff; } .card { border: 0; padding: 0; }
}

/* The participant's pages: one column, 390px in mind (docs/mockups/participant). */
body.mobile { font-size: 15px; }
.mhead { padding: 18px 20px; background: var(--bar); }
.mhead .brand { font-family: 'Frank Ruhl Libre', Georgia, serif; font-size: 22px; font-weight: 700; color: var(--page); }
.mhead .sub { font-size: 13px; color: var(--bar-text); }
.mbody { max-width: 480px; margin: 0 auto; padding: 24px 20px 40px; display: flex; flex-direction: column; gap: 18px; }
.mbody h1 { font-size: 28px; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.stack label { font-size: 14px; font-weight: 600; }
.big { width: 100%; padding: 14px 16px; font: inherit; font-size: 17px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; }
.big.muted { color: var(--muted); background: #F1EDE5; }
.btn-big { display: block; width: 100%; text-align: center; padding: 15px; font-size: 17px; border-radius: 10px; text-decoration: none; }
.hint, .foot { font-size: 13px; color: var(--muted); }
.hr { height: 1px; background: var(--track); }
.note-ok { padding: 16px; background: var(--green-bg); color: var(--green); border-radius: 12px; line-height: 1.5; }
.note-warn { padding: 14px 16px; background: var(--amber-bg); color: var(--amber); border-radius: 12px; line-height: 1.5; }
.legend { display: flex; gap: 14px; font-size: 12px; color: var(--ink-2); }
.legend .dot { display: inline-block; width: 10px; height: 10px; border-radius: 5px; margin-left: 6px; }
.dot.ok { background: var(--green-bar); } .dot.warn { background: var(--amber-line); } .dot.full { background: var(--dot); }
.meeting { display: flex; align-items: center; gap: 12px; padding: 14px 16px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; cursor: pointer; }
.meeting:has(input:checked) { border: 2px solid var(--accent); }
.meeting.full { background: #F1EDE5; color: var(--faint); cursor: default; }
.meeting .grow { flex-grow: 1; display: flex; flex-direction: column; gap: 2px; }
.meeting .when { font-size: 16px; font-weight: 600; }
.meeting .sub { font-size: 13px; color: var(--muted); }
.meeting input[type=checkbox] { width: 26px; height: 26px; accent-color: var(--accent); }
.sticky { position: sticky; bottom: 0; padding: 12px 0; background: var(--page); }
.total { display: flex; align-items: center; justify-content: space-between; font-weight: 600; }
.amount { font-size: 26px; }
