/* Sidur360 — עיצוב דפי האפליקציה (כניסה, הרשמת עובד, אפליקציית עובד). Mobile-first, תומך iPhone safe-area. */
:root {
  --brand: #4f46e5; --brand-2: #7c3aed; --ink: #0f172a; --muted: #64748b; --line: #e2e8f0;
  --bg: #f4f6fb; --card: #ffffff; --ok: #16a34a; --warn: #ea580c;
  --safe-top: env(safe-area-inset-top, 0px); --safe-bottom: env(safe-area-inset-bottom, 0px);
}
* { font-family: 'Assistant', system-ui, -apple-system, 'Segoe UI', sans-serif; -webkit-tap-highlight-color: transparent; }
html, body { min-height: 100%; }
body.app-auth {
  min-height: 100vh; min-height: 100dvh; margin: 0; display: flex; align-items: center; justify-content: center;
  background: radial-gradient(1200px 600px at 100% 0%, rgba(124,58,237,.25), transparent 60%),
              radial-gradient(900px 500px at 0% 100%, rgba(79,70,229,.25), transparent 60%), #0f172a;
  padding: calc(20px + var(--safe-top)) 16px calc(20px + var(--safe-bottom));
}
.auth-card { width: 100%; max-width: 430px; background: rgba(255,255,255,.98); border-radius: 22px; box-shadow: 0 30px 80px rgba(2,6,23,.45); padding: 28px 24px 22px; }
.auth-card.wide { max-width: 560px; }
.brand-badge { width: 56px; height: 56px; border-radius: 16px; display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; font-size: 26px; box-shadow: 0 10px 24px rgba(79,70,229,.35); overflow: hidden; }
.brand-badge img { width: 100%; height: 100%; object-fit: cover; }
.brand-name { font-weight: 800; font-size: 1.55rem; color: var(--ink); letter-spacing: -.5px; }
.brand-name span { color: var(--brand); }
.form-control, .form-select { border-radius: 12px; padding: 11px 14px; font-size: 1rem; }
.form-control:focus, .form-select:focus { border-color: var(--brand); box-shadow: 0 0 0 .2rem rgba(79,70,229,.15); }
.input-group > .btn { border-radius: 12px 0 0 12px; }
.input-group > .form-control:not(:last-child) { border-radius: 0 12px 12px 0; }
.btn-brand { background: linear-gradient(135deg, var(--brand), var(--brand-2)); border: 0; color: #fff; border-radius: 12px; padding: 12px; font-weight: 700; font-size: 1.02rem; }
.btn-brand:hover, .btn-brand:focus, .btn-brand:active { color: #fff !important; filter: brightness(1.07); }
.btn-brand:disabled { opacity: .6; }
.ltr { direction: ltr; unicode-bidi: isolate; }
input.ltr, .ltr-input { direction: ltr; text-align: right; }
input.ltr::placeholder { text-align: right; }

/* לשוניות עובד / מנהל */
.role-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; background: #eef0f7; padding: 5px; border-radius: 14px; margin-bottom: 18px; }
.role-tabs button { border: 0; background: transparent; padding: 10px 6px; border-radius: 10px; font-weight: 700; color: var(--muted); font-size: .95rem; }
.role-tabs button.on { background: #fff; color: var(--brand); box-shadow: 0 2px 8px rgba(15,23,42,.08); }
.pin-input { letter-spacing: .6em; text-align: center; font-size: 1.4rem; font-weight: 800; direction: ltr; }
.step-dots { display: flex; justify-content: center; gap: 6px; margin-bottom: 14px; }
.step-dots i { width: 8px; height: 8px; border-radius: 99px; background: var(--line); }
.step-dots i.on { width: 22px; background: var(--brand); }
.req::after { content: ' *'; color: #dc2626; }
.hint { font-size: .82rem; color: var(--muted); }

/* כפתור התקנה + מדריך iPhone */
.pwa-fab { position: fixed; bottom: calc(16px + var(--safe-bottom)); left: 50%; transform: translateX(-50%); display: none; z-index: 1050;
  background: rgba(255,255,255,.14); color: #fff; border: 1px solid rgba(255,255,255,.28); border-radius: 99px; padding: 9px 20px; font-weight: 700; font-size: .95rem; white-space: nowrap; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.ios-guide { position: fixed; inset: 0; background: rgba(2,6,23,.55); z-index: 2000; display: none; align-items: flex-end; justify-content: center; }
.ios-guide.show { display: flex; }
.ios-guide .sheet { background: #fff; width: 100%; max-width: 480px; border-radius: 22px 22px 0 0; padding: 22px 20px calc(22px + var(--safe-bottom)); animation: up .25s ease; }
.ios-guide ol { padding-inline-start: 20px; margin: 12px 0; }
.ios-guide li { margin-bottom: 10px; }
.ios-guide .ico { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: #eef2ff; color: #2563eb; vertical-align: middle; margin: 0 3px; }
@keyframes up { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ===== אפליקציית עובד ===== */
body.app-page { background: var(--bg); color: var(--ink); padding-bottom: calc(84px + var(--safe-bottom)); }
.app-top { background: linear-gradient(135deg, #1e1b4b, #4f46e5 60%, #7c3aed); color: #fff; padding: calc(18px + var(--safe-top)) 18px 54px; border-radius: 0 0 26px 26px; }
.app-top .hello { font-size: 1.45rem; font-weight: 800; }
.app-top .sub { opacity: .85; font-size: .92rem; }
.app-top .avatar { width: 46px; height: 46px; border-radius: 14px; background: rgba(255,255,255,.18); display: grid; place-items: center; font-weight: 800; font-size: 1.05rem; letter-spacing: 1px; }
.app-top .top-btn { color: #fff; background: rgba(255,255,255,.14); border: 0; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-size: 1.15rem; }
.app-wrap { max-width: 720px; margin: -38px auto 0; padding: 0 14px; }
.app-card { background: var(--card); border-radius: 18px; box-shadow: 0 6px 22px rgba(15,23,42,.06); padding: 16px; margin-bottom: 14px; }
.app-card h6 { font-weight: 800; margin-bottom: 12px; }
.next-shift { display: flex; gap: 14px; align-items: center; }
.next-shift .date-box { min-width: 64px; text-align: center; border-radius: 14px; background: #eef2ff; color: var(--brand); padding: 8px 4px; font-weight: 800; line-height: 1.1; }
.next-shift .date-box .d { font-size: 1.6rem; }
.next-shift .date-box .m { font-size: .78rem; }
.shift-list { list-style: none; margin: 0; padding: 0; }
.shift-list li { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.shift-list li:last-child { border-bottom: 0; }
.shift-list .day { width: 52px; flex-shrink: 0; text-align: center; font-weight: 800; }
.shift-list .day small { display: block; font-weight: 600; color: var(--muted); font-size: .75rem; }
.shift-list .bar { width: 4px; align-self: stretch; border-radius: 4px; background: var(--brand); }
.shift-list .today { background: linear-gradient(90deg, transparent, rgba(79,70,229,.06)); border-radius: 10px; }
.shift-list .off { color: var(--muted); }
.quick { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.quick a { display: flex; flex-direction: column; gap: 6px; padding: 14px; border-radius: 16px; background: var(--card); box-shadow: 0 6px 22px rgba(15,23,42,.06); text-decoration: none; color: var(--ink); font-weight: 700; }
.quick a i { font-size: 1.5rem; color: var(--brand); }
.quick a small { color: var(--muted); font-weight: 600; }
.week-tabs { display: flex; gap: 6px; margin-bottom: 10px; }
.week-tabs button { flex: 1; border: 1px solid var(--line); background: #fff; border-radius: 10px; padding: 7px; font-weight: 700; color: var(--muted); font-size: .9rem; }
.week-tabs button.on { border-color: var(--brand); color: var(--brand); background: #eef2ff; }
.app-nav { position: fixed; bottom: 0; inset-inline: 0; background: rgba(255,255,255,.96); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid var(--line); display: flex; justify-content: space-around; padding: 8px 4px calc(8px + var(--safe-bottom)); z-index: 1000; }
.app-nav a { flex: 1; text-align: center; text-decoration: none; color: var(--muted); font-size: .75rem; font-weight: 700; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.app-nav a i { font-size: 1.35rem; }
.app-nav a.on { color: var(--brand); }
.empty { text-align: center; color: var(--muted); padding: 18px 8px; }
.empty i { font-size: 2rem; display: block; margin-bottom: 6px; opacity: .6; }
.contact { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.contact:last-child { border-bottom: 0; }
.contact a.btn { border-radius: 12px; }
