/* בקרה · Volar Lejos. אותו מותג וסגנון כמו אפליקציית הלקוחות (app/styles.css) */
:root {
  --purple: #7B4FA6; --purple-dark: #5a3478; --purple-light: #a87fd4;
  --teal: #4BBFC9; --teal-dark: #2e9aa5; --teal-light: #85d8e0; --lilac: #d4b8f0;
  --cream: #fdfcff; --sand: #f5f1fa; --text: #231e2e; --text-mid: #544c63; --line: #e7def2;
  --pink: #c2185b; --pink-bg: #fde8f0; --amber-bg: #fff4dc; --amber: #8a5a00; --ok: #1e7a4c; --ok-bg: #e4f5ec;
  --wa: #25D366; --card: #fff;
  --shadow: 0 1px 2px rgba(35, 30, 46, .06), 0 6px 20px rgba(90, 52, 120, .08);
  --radius: 18px; --serif: 'Frank Ruhl Libre', serif; --sans: 'Heebo', system-ui, sans-serif;
  --nav-h: 68px; --safe-b: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { margin: 0; background: var(--sand); color: var(--text); font-family: var(--sans); font-size: 16px; line-height: 1.5; }
body { -webkit-tap-highlight-color: transparent; overflow-x: hidden; }
a { color: var(--purple-dark); }
button { font: inherit; color: inherit; }
h1, h2, h3 { font-family: var(--serif); line-height: 1.2; margin: 0; }
.hidden { display: none !important; }
#app { max-width: 560px; margin: 0 auto; min-height: 100vh; padding-bottom: calc(var(--nav-h) + var(--safe-b) + 24px); }

/* כותרת */
header.top { position: sticky; top: 0; z-index: 20; color: #fff; padding: calc(10px + env(safe-area-inset-top)) 16px 10px;
  background: linear-gradient(135deg, var(--purple) 0%, var(--purple-dark) 100%); }
header.top .row { display: flex; align-items: center; gap: 8px; }
header.top .logo { height: 30px; background: rgba(255,255,255,.9); border-radius: 10px; padding: 3px 8px; }
header.top h1 { font-size: 23px; flex: 1; }
header.top .who { border: 1px solid rgba(255,255,255,.35); background: rgba(255,255,255,.16); color: #fff; border-radius: 99px; padding: 4px 12px; font-size: 14px; font-weight: 500; cursor: pointer; display: inline-flex; align-items: center; gap: 5px; }
header.top .who svg { width: 17px; height: 17px; }
header.top .status { font-size: 12.5px; opacity: .9; margin-top: 3px; }
header.top .status.off { color: #ffe1a8; opacity: 1; }
.testdate { background: var(--amber-bg); color: var(--amber); font-size: 13px; text-align: center; padding: 4px 8px; font-weight: 700; }

main { padding: 6px 16px 24px; }
h2 { font-size: 22px; margin: 22px 0 8px; color: var(--purple-dark); display: flex; align-items: center; gap: 8px; }
main > h2:first-child { margin-top: 12px; font-size: 26px; }
h3 { font-size: 18px; margin: 16px 0 6px; color: var(--purple-dark); display: flex; align-items: center; gap: 8px; }
h3.hbad { color: var(--pink); }
.sub { color: var(--text-mid); font-size: 14px; }

/* סרגל תחתון – כמו אצל הלקוחות */
nav.tabs { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 560px; z-index: 30;
  height: calc(var(--nav-h) + var(--safe-b)); padding-bottom: var(--safe-b); background: rgba(255,255,255,.96); backdrop-filter: blur(12px);
  border-top: 1px solid var(--line); display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; }
nav.tabs a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 12px; color: var(--text-mid); text-decoration: none; position: relative; }
nav.tabs a svg { width: 24px; height: 24px; }
nav.tabs a.on { color: var(--purple); font-weight: 700; }
nav.tabs a.on svg { stroke-width: 2.4; }
nav.tabs a .dot { position: absolute; top: 7px; inset-inline-start: calc(50% + 5px); min-width: 18px; height: 18px; border-radius: 9px; background: var(--pink); color: #fff; font-size: 11px; line-height: 18px; padding: 0 5px; font-weight: 700; text-align: center; }

/* כרטיסים */
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 16px; margin: 12px 0; }
.card.bad { box-shadow: 0 0 0 1.5px var(--pink), var(--shadow); background: #fffafc; }
.card.done { opacity: .6; }
.card .hd { display: flex; align-items: flex-start; gap: 8px; }
.card .hd .t { flex: 1; min-width: 0; }
.card .name { font-weight: 700; font-size: 16.5px; }
.card .what { font-size: 14.5px; color: var(--text-mid); margin-top: 2px; }
.card .meta { font-size: 13.5px; color: var(--text-mid); margin-top: 5px; }
.time { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--teal-dark); white-space: nowrap; }
.tag { display: inline-block; font-size: 12px; font-weight: 700; color: #fff; border-radius: 7px; padding: 1px 8px; vertical-align: 1px; white-space: nowrap; }
.pill { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 500; padding: 2px 10px; border-radius: 99px; background: var(--sand); color: var(--purple-dark); white-space: nowrap; }
.pill.bad { background: var(--pink-bg); color: var(--pink); font-weight: 700; white-space: normal; }
.pill.warn { background: var(--amber-bg); color: var(--amber); font-weight: 700; white-space: normal; }
.pill.ok { background: var(--ok-bg); color: var(--ok); font-weight: 700; }

.btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 42px; padding: 9px 14px; border-radius: 12px; border: 1px solid var(--line); background: #fff; text-decoration: none; color: var(--purple-dark); font-weight: 500; font-size: 15px; cursor: pointer; }
.btn.wa { background: var(--wa); border-color: var(--wa); color: #fff; font-weight: 700; }
.btn.pri { background: var(--purple); border-color: var(--purple); color: #fff; font-weight: 700; }
.btn.sm { min-height: 34px; padding: 5px 11px; font-size: 13.5px; }
.btn[disabled] { opacity: .5; }

/* סימון ✓ */
.tick { display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 7px 14px; border-radius: 12px; border: 1.5px solid var(--line); background: #fff; cursor: pointer; font-weight: 700; font-size: 15px; color: var(--purple-dark); }
.tick .box, .li .box { width: 22px; height: 22px; border-radius: 7px; border: 2px solid var(--purple-light); display: grid; place-items: center; font-size: 15px; color: #fff; flex: none; }
.tick.on { border-color: var(--teal-dark); color: var(--teal-dark); background: #effafb; }
.tick.on .box, .li.on .box { background: var(--teal-dark); border-color: var(--teal-dark); }
.tick.pending .box { border-style: dashed; }
.byline { font-size: 12.5px; color: var(--teal-dark); margin-top: 5px; }
.byline.pend { color: var(--amber); }

/* רשימות */
.list { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; margin: 10px 0; }
.li { display: flex; gap: 10px; padding: 11px 14px; border-top: 1px solid var(--line); align-items: flex-start; cursor: pointer; }
.li:first-child { border-top: 0; }
.li .box { margin-top: 1px; }
.li.on .tx { color: var(--text-mid); text-decoration: line-through; text-decoration-color: rgba(84,76,99,.5); }
.li .tx { flex: 1; min-width: 0; font-size: 15px; }
.li .tx .meta { font-size: 12.5px; color: var(--text-mid); margin-top: 3px; text-decoration: none; display: block; }
.li .tx .byline { text-decoration: none; display: block; }
.li .x { border: 0; background: none; color: var(--text-mid); font-size: 18px; padding: 0 4px; cursor: pointer; }
.li.urgent .box { border-color: var(--pink); }

/* צ'יפים */
.chips { display: flex; gap: 6px; overflow-x: auto; padding: 4px 0 8px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; border: 0; background: #fff; box-shadow: var(--shadow); border-radius: 99px; padding: 7px 14px; font-size: 14px; cursor: pointer; white-space: nowrap; color: var(--purple-dark); }
.chip.on { background: var(--purple); color: #fff; font-weight: 700; }
.chip .n { opacity: .8; font-size: 12px; margin-inline-start: 4px; }
.daychips .chip { min-width: 58px; text-align: center; border-radius: 14px; padding: 7px 10px; }
.daychips .chip small { display: block; font-size: 11px; opacity: .8; }

/* הודעות */
.alert { border-radius: 14px; padding: 11px 14px; margin: 10px 0; font-size: 14.5px; background: #fff; box-shadow: var(--shadow); color: var(--purple-dark); }
.alert.bad { background: var(--pink-bg); color: var(--pink); box-shadow: none; }
.alert.warn { background: var(--amber-bg); color: var(--amber); box-shadow: none; }
.alert.ok { background: var(--ok-bg); color: var(--ok); box-shadow: none; }
.alert.big { font-size: 16.5px; padding: 15px 16px; }
a.alert { display: block; text-decoration: none; }
.alert b { font-weight: 800; }

.daynav { display: flex; align-items: center; gap: 8px; margin: 6px 0 8px; }
.daynav .d { flex: 1; text-align: center; font-family: var(--serif); font-size: 19px; color: var(--purple-dark); }
.daynav button { width: 44px; height: 42px; border-radius: 12px; border: 0; background: #fff; box-shadow: var(--shadow); font-size: 20px; color: var(--purple); cursor: pointer; }

.sched { margin: 6px 0; }
.sched .r { display: flex; gap: 10px; padding: 8px 0; border-top: 1px dashed var(--line); }
.sched .r:first-child { border-top: 0; }
.sched .r .time { width: 46px; flex: none; }
.sched .r ul { margin: 3px 0 0; padding-inline-start: 18px; color: var(--text-mid); font-size: 13.5px; }

.money { font-family: var(--serif); font-variant-numeric: tabular-nums; font-weight: 700; font-size: 20px; color: var(--purple-dark); white-space: nowrap; direction: ltr; unicode-bidi: isolate; }
.money.miss { font-family: var(--sans); color: var(--amber); font-size: 14px; }

details > summary { cursor: pointer; color: var(--text-mid); font-size: 13.5px; margin-top: 8px; }
.msg { white-space: pre-wrap; font-size: 14px; background: var(--sand); border-radius: 12px; padding: 9px 11px; margin-top: 6px; }
.langs { display: inline-flex; gap: 4px; }
.langs button { border: 1px solid var(--line); background: #fff; border-radius: 8px; font-size: 12px; padding: 2px 8px; cursor: pointer; }
.langs button.on { background: var(--purple); color: #fff; border-color: var(--purple); }

/* חלונות */
.sheet-bg { position: fixed; inset: 0; background: rgba(35,20,55,.45); z-index: 40; display: flex; align-items: flex-end; justify-content: center; }
.sheet { background: #fff; width: 100%; max-width: 560px; border-radius: 22px 22px 0 0; padding: 20px 16px calc(18px + var(--safe-b)); max-height: 88vh; overflow: auto; animation: up .2s ease; }
@keyframes up { from { transform: translateY(20px); opacity: .6; } to { transform: none; opacity: 1; } }
.sheet h3 { margin-top: 0; font-size: 21px; }
.field { margin: 12px 0; }
.field label { display: block; font-size: 13.5px; color: var(--text-mid); margin-bottom: 5px; }
.field input, .field textarea, .field select { width: 100%; font: inherit; padding: 11px 12px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--cream); color: var(--text); }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--purple-light); }
.field textarea { min-height: 76px; }
.seg { display: flex; gap: 6px; }
.seg button { flex: 1; min-height: 44px; border-radius: 12px; border: 1.5px solid var(--line); background: #fff; cursor: pointer; font-weight: 500; color: var(--purple-dark); }
.seg button.on { border-color: var(--purple); background: var(--sand); font-weight: 700; }
.big-who { display: grid; gap: 10px; margin-top: 16px; }
.big-who button { min-height: 58px; font-family: var(--serif); font-size: 22px; border-radius: 16px; border: 0; background: linear-gradient(135deg, var(--purple), var(--purple-dark)); color: #fff; cursor: pointer; }

#toast { position: fixed; bottom: calc(var(--nav-h) + var(--safe-b) + 14px); left: 50%; transform: translate(-50%, 8px); max-width: 420px; width: calc(100% - 32px); background: var(--purple-dark); color: #fff; padding: 11px 14px; border-radius: 14px; font-size: 14.5px; z-index: 50; text-align: center; opacity: 0; transition: .2s; pointer-events: none; }
#toast.show { opacity: 1; transform: translate(-50%, 0); }

.empty { text-align: center; color: var(--text-mid); padding: 24px 10px; font-size: 15px; }
.trip-card .stay { font-size: 14px; color: var(--text-mid); margin-top: 3px; }
.trip-card .items { margin: 10px 0 0; padding: 0; list-style: none; font-size: 14.5px; }
.trip-card .items li { display: flex; gap: 10px; padding: 6px 0; border-bottom: 1px dashed var(--line); }
.trip-card .items li:last-child { border: 0; }
.trip-card .items .time { min-width: 44px; flex: none; }
.progress { height: 6px; background: var(--sand); border-radius: 3px; overflow: hidden; margin-top: 6px; }
.progress i { display: block; height: 100%; background: linear-gradient(90deg, var(--teal), var(--teal-dark)); }
.addbtn { position: fixed; bottom: calc(var(--nav-h) + var(--safe-b) + 14px); inset-inline-end: max(16px, calc(50% - 264px)); width: 56px; height: 56px; border-radius: 50%; border: 0; background: linear-gradient(135deg, var(--purple), var(--purple-dark)); color: #fff; font-size: 30px; box-shadow: 0 6px 18px rgba(90,52,120,.35); z-index: 25; cursor: pointer; }

/* כניסה */
.login { min-height: 100vh; display: grid; place-items: center; padding: 16px; background: linear-gradient(160deg, var(--sand) 0%, #ece3f7 100%); }
.login .box { width: 100%; max-width: 360px; background: #fff; border-radius: 22px; box-shadow: var(--shadow); padding: 26px 20px; text-align: center; display: grid; gap: 10px; }
.login .lg { width: 170px; margin: 0 auto 4px; }
.login h1 { font-size: 30px; color: var(--purple-dark); }
.login p { margin: 0; color: var(--text-mid); }
.login input { font: inherit; font-size: 17px; padding: 12px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--cream); color: var(--text); }
.login .btn { min-height: 50px; font-size: 17px; }
.login .err { color: var(--pink); min-height: 20px; font-size: 14.5px; }
