/* Employee portal. The identity is public/manager-assets/manager.css (loaded first): the same
   tokens, logo, header, cards, buttons, bottom bar, status and empty states. This file adds
   only what the portal has and the Manager app does not. Logical properties: RTL/LTR mirror. */
body.ep { font-family: 'Tajawal', system-ui, -apple-system, "Segoe UI", Tahoma, Arial, sans-serif; }
.ep .content { overflow-wrap: break-word; }
.ep .narrow { max-width: 560px; margin-inline: auto; }
.ep .badge { white-space: normal; }
.topbar .langswitch button, .langswitch a { text-decoration: none; }
.langswitch a { display: inline-flex; align-items: center; justify-content: center; min-height: 34px; min-width: 34px; padding: 0 8px; border-radius: 999px; font-size: 12px; font-weight: 700; color: var(--muted); }
.langswitch a.active { background: var(--surface); color: var(--navy); box-shadow: 0 1px 3px rgba(3,17,38,.15); }
.langswitch .sep { display: none; }
.topbar button.iconbtn { border: 0; background: transparent; cursor: pointer; padding: 0; }
.topbar form { margin: 0; }
.topbar__actions { gap: 2px; }
.auth .langswitch { background: rgba(255,255,255,.12); align-self: flex-end; }
.auth .langswitch a { color: rgba(255,255,255,.75); min-height: 38px; padding: 0 14px; }
.auth .langswitch a.active { background: #fff; color: var(--navy); }
.auth__card .pin { text-align: center; letter-spacing: .35em; direction: ltr; }
.auth__card .linkback { font-size: 14px; }
.auth__clinic { display: flex; align-items: center; gap: 12px; width: 100%; max-width: 400px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.auth__clinic img { width: 40px; height: 40px; border-radius: 8px; object-fit: contain; flex: none; }
.auth__clinic strong { display: block; color: var(--navy); } .auth__clinic span { font-size: 12px; color: var(--muted); }
.steps { display: flex; justify-content: center; gap: 8px; margin-bottom: 14px; }
.steps b { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; background: var(--line-2); color: var(--muted); }
.steps b.is-active { background: var(--navy); color: var(--gold); }
.static-value { background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 11px 14px; font-weight: 700; color: var(--navy); }

/* digital employee card */
.idcard { position: relative; overflow: hidden; display: flex; align-items: center; gap: 14px; padding: 18px; border-radius: var(--r); color: #fff; background: linear-gradient(160deg, var(--navy-950) 0%, var(--navy) 55%, #0C2550 100%); border-bottom: 3px solid var(--gold); margin-bottom: 14px; }
.idcard__photo { width: 68px; height: 68px; flex: none; border-radius: 50%; overflow: hidden; display: grid; place-items: center; font-size: 26px; font-weight: 800; color: var(--gold); background: rgba(245,184,46,.12); border: 2px solid var(--gold); }
.idcard__photo img { width: 100%; height: 100%; object-fit: cover; }
.idcard__main { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.idcard__name { font-size: 17px; font-weight: 800; line-height: 1.35; overflow-wrap: anywhere; }
.idcard__meta { font-size: 13px; color: rgba(255,255,255,.72); }
.idcard__code { font-size: 12.5px; color: var(--gold); font-weight: 700; direction: ltr; unicode-bidi: isolate; align-self: flex-start; }

.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.tile { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 104px; padding: 14px 10px; text-align: center; font-size: 13.5px; font-weight: 700; color: var(--navy); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); }
.tile:hover { border-color: #c7c2ff; } .tile:active { transform: scale(.98); }
.tile .queue__icon { width: 44px; height: 44px; }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); padding: 12px; min-width: 0; text-align: center; }
.stat em { display: block; font-style: normal; font-size: 11.5px; font-weight: 700; color: var(--muted); line-height: 1.35; }
.stat b { display: block; font-size: 22px; font-weight: 800; color: var(--navy); margin: 2px 0; }
.stat b.is-alert { color: var(--red-solid); } .stat span, .stat a { font-size: 11.5px; color: var(--faint); }
.card--flush { padding: 0; overflow: hidden; }
.card__bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line-2); }
.card__bar .card__h { margin: 0; } .card__bar a { font-size: 13px; font-weight: 700; color: var(--brand-ink); min-height: 32px; display: inline-flex; align-items: center; }
.line { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 16px; border-top: 1px solid var(--line-2); }
.line:first-child { border-top: 0; } .line.is-unread { background: #F0F7FF; }
.line__main { display: flex; flex-direction: column; min-width: 0; } .line__main strong { color: var(--navy); font-size: 14px; overflow-wrap: anywhere; } .line__main span { color: var(--muted); font-size: 12.5px; overflow-wrap: anywhere; }
.line__side { display: flex; align-items: center; gap: 8px; flex: none; max-width: 52%; }
.line__side form { margin: 0; }
.blank { padding: 28px 16px; text-align: center; color: var(--muted); font-size: 14px; } .blank .ic { display: block; margin: 0 auto 8px; color: #cbd5e1; }

/* forms */
.field input[type="radio"], .field input[type="checkbox"] { width: 20px; min-height: 0; height: 20px; padding: 0; flex: none; box-shadow: none; }
.field textarea { resize: vertical; }
.choice { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--r-sm); margin-bottom: 8px; cursor: pointer; }
.choice input, .agree input { width: 20px; height: 20px; flex: none; accent-color: var(--navy); }
.agree { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; background: #fffbeb; border: 1px solid #fde68a; border-radius: var(--r-sm); color: #78350f; font-size: 13.5px; margin-bottom: 14px; cursor: pointer; }
.legend { display: block; font-size: 13.5px; font-weight: 700; margin-bottom: 6px; }
.alertbox { padding: 12px 14px; border-radius: var(--r-sm); margin-bottom: 14px; font-size: 14px; border: 1px solid #fde68a; background: #fffbeb; color: #92400e; }
.alertbox--err { border-color: #fecaca; background: #fef2f2; color: #b91c1c; }
.alertbox--ok { border-color: #bbf7d0; background: #f0fdf4; color: #166534; }
.segment { display: inline-flex; background: var(--line-2); border-radius: var(--r-sm); padding: 4px; gap: 4px; }
.segment a { padding: 8px 14px; min-height: 40px; display: inline-flex; align-items: center; border-radius: 9px; font-size: 13px; font-weight: 700; color: var(--muted); }
.segment a.is-active { background: var(--surface); color: var(--navy); box-shadow: 0 1px 3px rgba(3,17,38,.12); }

/* date range: two fields, one calendar */
.daterange { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.daterange--single { grid-template-columns: 1fr; }
.datebtn { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; width: 100%; min-height: 66px; padding: 10px 12px; text-align: start; background: #fff; border: 1.5px solid var(--line); border-radius: var(--r-sm); cursor: pointer; min-width: 0; }
.datebtn em { font-style: normal; font-size: 12px; font-weight: 700; color: var(--muted); display: flex; align-items: center; gap: 6px; } .datebtn em .ic { width: 13px; height: 13px; }
.datebtn b { font-size: 15px; font-weight: 800; color: var(--navy); line-height: 1.35; }
.datebtn b.is-empty { color: var(--faint); font-weight: 500; }
.datebtn.is-set { border-color: var(--navy); }
.datebtn[aria-invalid="true"] { border-color: var(--red-solid); }
.dateerr { margin-top: 8px; color: #b91c1c; font-size: 13.5px; }

.cal { border: 0; padding: 0; width: 100%; max-width: 420px; max-height: 94vh; max-height: 94dvh; margin: auto auto 0; border-radius: 20px 20px 0 0; background: var(--surface); color: var(--text); box-shadow: 0 -8px 30px rgba(3,17,38,.28); overflow-y: auto; overscroll-behavior: contain; }
.cal::backdrop { background: rgba(3,17,38,.55); }
@media (min-width: 640px) { .cal { margin: auto; border-radius: var(--r); } }
.cal__body { padding: 14px 12px calc(14px + var(--sab)); }
.cal__head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 10px; }
.cal__title { font-size: 16px; font-weight: 800; color: var(--navy); }
.cal__x { width: 44px; height: 44px; display: grid; place-items: center; border: 0; background: transparent; border-radius: var(--r-sm); cursor: pointer; color: var(--muted); }
.cal__picks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 10px; }
.cal__picks.is-single { grid-template-columns: 1fr; }
.cal__pick { padding: 7px 10px; min-height: 52px; text-align: start; border: 1.5px solid var(--line); background: var(--bg); border-radius: var(--r-sm); cursor: pointer; }
.cal__pick em { display: block; font-style: normal; font-size: 11.5px; font-weight: 700; color: var(--muted); }
.cal__pick b { font-size: 13.5px; color: var(--navy); }
.cal__pick[aria-pressed="true"] { border-color: var(--gold); background: #fff; box-shadow: 0 0 0 2px rgba(245,184,46,.35); }
.cal__nav { display: grid; grid-template-columns: 44px minmax(0, 1.4fr) minmax(0, 1fr) 44px; gap: 6px; align-items: center; margin-bottom: 8px; }
.cal__nav button { width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid var(--line); background: #fff; border-radius: var(--r-sm); cursor: pointer; color: var(--navy); }
.cal__nav button:disabled { opacity: .35; cursor: default; }
.cal__nav select { height: 44px; width: 100%; min-width: 0; padding: 0 8px; border: 1px solid var(--line); border-radius: var(--r-sm); background: #fff; font-size: 16px; font-weight: 700; color: var(--navy); }
[dir="rtl"] .cal__nav .ic { transform: none; }
[dir="ltr"] .cal__nav .cal__prev .ic, [dir="rtl"] .cal__nav .cal__next .ic { transform: scaleX(-1); }
.cal__grid { width: 100%; border-collapse: collapse; table-layout: fixed; }
.cal__grid th { padding: 4px 0; font-size: 11px; font-weight: 700; color: var(--muted); }
.cal__grid td { padding: 2px 0; text-align: center; }
.cal__grid td.is-in { background: #fdf0cf; }
.cal__grid td.is-from.has-range { background: linear-gradient(to var(--cal-end), transparent 50%, #fdf0cf 50%); }
.cal__grid td.is-to.has-range { background: linear-gradient(to var(--cal-end), #fdf0cf 50%, transparent 50%); }
.cal { --cal-end: right; } [dir="rtl"] .cal { --cal-end: left; }
.cal__day { width: 100%; max-width: 46px; height: 44px; margin: 0 auto; display: grid; place-items: center; border: 2px solid transparent; background: transparent; border-radius: 50%; font-size: 15px; font-weight: 700; cursor: pointer; font-variant-numeric: tabular-nums; }
.cal__day:hover:not([aria-disabled="true"]) { border-color: var(--faint); }
.cal__day[aria-disabled="true"] { color: #cbd5e1; cursor: default; font-weight: 500; }
.cal__day.is-today { border-color: var(--gold); }
.cal__day.is-selected { background: var(--navy); color: #fff; border-color: var(--navy); }
.cal__day:focus-visible { outline: 3px solid var(--brand); outline-offset: 0; border-radius: 50%; }
.cal__summary { margin: 10px 2px; font-size: 14px; font-weight: 700; color: var(--navy); min-height: 22px; text-align: center; }
.cal__foot { display: grid; grid-template-columns: 1fr 1.4fr; gap: 10px; }

/* server preview */
.preview { margin-top: 14px; padding: 14px; background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-sm); }
.preview__range { font-weight: 800; color: var(--navy); margin-bottom: 8px; }
.preview .dl > div { padding: 7px 0; border-top-color: var(--line); }
.preview .dl { grid-template-columns: 1fr; } .preview .dl > div:nth-child(2) { border-top: 1px solid var(--line); }
.preview__state { color: var(--muted); font-size: 14px; }

/* notification bell dropdown (resources/js/notifications.js renders these) */
.ep-notif-wrap { position: relative; }
.ep-notif-wrap .notif-panel { position: absolute; top: calc(100% + 8px); inset-inline-end: -48px; z-index: 60; }
@media (max-width: 520px) { .ep-notif-wrap .notif-panel { position: fixed; top: calc(58px + var(--sat)); left: 12px; right: 12px; width: auto; max-width: none; } }
.notif-panel { width: 320px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: 0 12px 32px rgba(15,23,42,.25); display: flex; flex-direction: column; max-height: 420px; overflow: hidden; text-align: start; }
.notif-panel-header { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; padding: 10px 14px; border-bottom: 1px solid var(--line-2); font-size: 14px; font-weight: 800; color: var(--navy); }
.notif-panel-header-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.notif-panel-sound-btn, .notif-panel-mark-all { border: 0; background: none; font-size: 11.5px; color: var(--muted); cursor: pointer; padding: 6px 0; }
.notif-panel-list { overflow-y: auto; flex: 1; }
.notif-panel-empty { padding: 24px; text-align: center; font-size: 13px; color: var(--faint); }
.notif-panel-item { display: flex; align-items: flex-start; gap: 10px; padding: 11px 14px; border-bottom: 1px solid var(--line-2); position: relative; }
.notif-panel-item.is-unread { background: #F0F7FF; }
.notif-panel-icon { color: var(--brand); margin-top: 2px; flex: none; }
.notif-panel-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.notif-panel-title { font-size: 13px; font-weight: 700; color: var(--text); }
.notif-panel-body { font-size: 12px; color: var(--muted); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.notif-panel-time { font-size: 11px; color: var(--faint); }
.notif-panel-dot { position: absolute; top: 13px; inset-inline-start: 7px; width: 7px; height: 7px; border-radius: 50%; background: #3B82F6; }
.notif-panel-footer { display: block; text-align: center; padding: 10px; font-size: 13px; font-weight: 700; color: var(--brand-ink); border-top: 1px solid var(--line-2); }

/* auto-dismissing success toast */
.mdtoast-stack { position: fixed; top: calc(1rem + var(--sat)); inset-inline-end: 1rem; z-index: 110; display: flex; flex-direction: column; gap: .5rem; max-width: min(360px, calc(100vw - 2rem)); pointer-events: none; }
.mdtoast { display: flex; align-items: flex-start; gap: .6rem; background: #fff; border-radius: var(--r-sm); padding: .8rem 1rem; box-shadow: 0 10px 30px rgba(3,17,38,.18); border: 1px solid #bbf7d0; opacity: 0; transform: translateY(-8px); transition: opacity .18s ease, transform .18s ease; cursor: pointer; pointer-events: auto; }
.mdtoast.mdtoast-open { opacity: 1; transform: translateY(0); }
.mdtoast-icon { color: #15803d; } .mdtoast-text { font-size: .9rem; font-weight: 700; color: var(--navy); }

@media (max-width: 360px) {
  .stats { grid-template-columns: 1fr; } .daterange { grid-template-columns: 1fr; }
  .cal__body { padding-inline: 6px; } .cal__day { height: 40px; }
  .topbar .brand__tag { display: none; }
}

/* Return to Work approval stages */
.track { display: flex; gap: 6px; list-style: none; margin: 10px 0 4px; padding: 0; }
.track__step { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; font-size: 12px; color: var(--muted); position: relative; }
.track__step::before { content: ""; position: absolute; top: 9px; inset-inline-start: -50%; width: 100%; height: 2px; background: var(--line); z-index: 0; }
.track__step:first-child::before { display: none; }
.track__dot { width: 20px; height: 20px; border-radius: 50%; background: var(--line); border: 2px solid var(--surface); z-index: 1; }
.track__step--done .track__dot { background: var(--navy); }
.track__step--done::before, .track__step--current::before { background: var(--navy); }
.track__step--current .track__dot { background: var(--gold); box-shadow: 0 0 0 3px rgba(245,184,46,.3); }
.track__step--rejected .track__dot { background: #B42318; }
.track__step--done, .track__step--current { color: var(--navy); font-weight: 700; }
.track__at { font-size: 11px; font-weight: 400; color: var(--muted); }

/* offline / reconnect banner and install guidance */
.netbar { position: fixed; inset-inline: 12px; bottom: calc(76px + env(safe-area-inset-bottom)); z-index: 60; padding: 10px 14px; border-radius: 12px; font-size: 14px; font-weight: 700; text-align: center; color: #fff; box-shadow: 0 6px 20px rgba(3,17,38,.25); }
.netbar--off { background: #7A271A; } .netbar--ok { background: #05603A; }
.track__step--skipped .track__dot { background: repeating-linear-gradient(45deg,#cbd5e1,#cbd5e1 3px,#e2e8f0 3px,#e2e8f0 6px); } .track__step--skipped { opacity: .8; }
