@import url('https://fonts.googleapis.com/css2?family=Heebo:wght@400;500;600;700;800&display=swap');
:root{color-scheme:light;--forest:#173e36;--deep:#10352f;--mint:#dcece3;--teal:#2e7e64;--gold:#c5a069;--bg:#f6f8f6;--white:#fff;--ink:#1c302e;--muted:#73817d;--border:#dfe7e1;--danger:#bb4b48;--warning:#ad7d28;--shadow:0 16px 38px rgba(21,49,43,.06)}
*{box-sizing:border-box}body{margin:0;font-family:Heebo,'Segoe UI',Arial,sans-serif;background:var(--bg);color:var(--ink);font-size:14px}button,input,textarea,select{font:inherit}button{cursor:pointer}button:disabled{opacity:.5;cursor:not-allowed}a{color:var(--teal);text-decoration:none}.muted{color:var(--muted);line-height:1.8}.eyebrow{margin:0 0 6px;color:#54816e;font-size:12px;font-weight:800;letter-spacing:.07em}.layout{min-height:100vh;display:flex}.sidebar{width:248px;flex-shrink:0;background:var(--forest);color:#fff;display:flex;flex-direction:column;padding:28px 18px 20px;position:sticky;top:0;height:100vh;z-index:40}.brand{display:flex;align-items:center;gap:12px;padding:0 12px 42px}.brand strong{display:block;font-size:21px;line-height:1.3}.brand span{display:block;color:#a9c6b9;font-size:12px}.brand-mark{height:52px;width:52px;border-radius:17px;display:grid;place-items:center;background:#dbe8db;color:var(--forest);font-weight:900;font-size:32px;box-shadow:0 6px 25px #0923192b}.brand-mark.small{height:43px;width:43px;border-radius:12px;font-size:27px}.side-title{color:#8ead9e;font-size:11px;letter-spacing:.07em;font-weight:700;padding:0 16px 12px}.sidebar nav{display:grid;gap:5px}.nav-item{border:0;background:transparent;color:#b7d0c4;text-align:right;padding:12px 14px;border-radius:11px;display:flex;gap:12px;align-items:center;font-weight:600}.nav-item span{font-size:19px;opacity:.85;width:24px;text-align:center}.nav-item:hover,.nav-item.active{color:#fff;background:#31594c}.sidebar-footer{margin-top:auto;border-top:1px solid #456458;padding-top:20px}.user-bubble{display:flex;align-items:center;gap:10px}.user-bubble strong,.user-bubble small{display:block}.user-bubble small{font-size:11px;color:#a9c6b9}.avatar{width:40px;height:40px;border-radius:12px;display:grid;place-items:center;background:#e8bd85;color:#23473c;font-weight:800}.logout{border:0;background:transparent;color:#bed5c9;padding:14px 0 0;font-size:12px}.workspace{flex:1;min-width:0}.topbar{height:74px;border-bottom:1px solid var(--border);background:#fff;display:flex;justify-content:space-between;align-items:center;padding:0 38px}.topbar-left,.topbar-right{display:flex;align-items:center;gap:11px}.crumb{color:#83908b}.crumb-sep{color:#bbc4bf}.topbar-right{font-size:12px;color:#607a6b}.live-dot{width:8px;height:8px;background:#4bb189;border-radius:50%;box-shadow:0 0 0 4px #d9f6e6}.mobile-menu{display:none;background:none;border:0;font-size:23px;color:var(--forest)}.content{max-width:1440px;margin:auto;padding:38px 42px 80px}.page-intro{display:flex;gap:18px;justify-content:space-between;align-items:center;margin-bottom:28px}.page-intro h1{margin:0;font-size:29px;letter-spacing:-.02em}.page-intro .muted{margin:3px 0 0}.week-picker{background:#fff;border:1px solid var(--border);border-radius:14px;padding:10px 16px;min-width:230px}.week-picker label{display:block;color:var(--muted);font-size:11px;font-weight:700}.week-picker input{border:0;color:var(--ink);width:100%;font-weight:700;outline:0;direction:ltr;text-align:right;background:transparent}.tab-panel{display:none}.tab-panel.active{display:block}.card{background:#fff;border:1px solid var(--border);border-radius:17px;box-shadow:var(--shadow);padding:22px}.card h2,.card h3{margin:0}.card-head{display:flex;justify-content:space-between;align-items:center;gap:15px;margin-bottom:18px}.card-head p{margin:4px 0 0}.stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin-bottom:20px}.stat{padding:20px 22px;border:1px solid var(--border);background:#fff;border-radius:15px;box-shadow:var(--shadow)}.stat .label{color:var(--muted);font-size:12px;font-weight:700}.stat .value{font-size:30px;font-weight:800;margin-top:2px;line-height:1.5}.stat .hint{font-size:11px;color:var(--muted)}.stat .accent{color:var(--teal)}.stack{display:grid;gap:18px}.grid2{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:18px}.btn{border:1px solid var(--border);background:#fff;color:var(--ink);border-radius:10px;padding:10px 16px;font-weight:700;display:inline-flex;gap:8px;align-items:center;justify-content:center;white-space:normal}.btn:hover{border-color:#95b5a5}.btn.primary{background:var(--forest);border-color:var(--forest);color:#fff}.btn.primary:hover{background:#285748}.btn.ghost{background:transparent}.btn.danger{border-color:#f0c7c5;color:#a33232;background:#fff7f6}.btn.small{padding:6px 11px;font-size:12px}.btn.block{width:100%}.actions{display:flex;gap:8px;flex-wrap:wrap;align-items:center}.pill{font-size:11px;font-weight:700;border-radius:999px;padding:4px 9px;display:inline-flex;align-items:center;gap:5px}.pill.good{background:#e2f5e8;color:#1b7545}.pill.bad{background:#ffeded;color:#ac4343}.pill.neutral{background:#eef1ef;color:#687b72}.pill.draft{background:#fff2dc;color:#936818}.banner{border-radius:12px;padding:13px 16px;line-height:1.7}.banner.error{background:#fff1f0;color:#a63f3d;border:1px solid #f1d1cf}.banner.warn{background:#fff9e9;color:#986818;border:1px solid #f0e3bd}.banner.ok{background:#e9f7ef;color:#226c48;border:1px solid #d4efdd}.summary-line{display:flex;gap:10px;flex-wrap:wrap;align-items:center;margin:14px 0 0}.weekdays{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:11px}.day-card{min-width:0;border:1px solid var(--border);border-radius:13px;overflow:hidden;background:#fff}.day-card .day-head{padding:13px 12px;border-bottom:1px solid var(--border);background:#f2f7f3}.day-head strong{font-size:15px;display:block}.day-head small{font-size:11px;color:var(--muted)}.day-card .shift-pick{padding:12px 10px;display:grid;gap:6px}.shift-pick label{font-size:11px;color:#697d71;font-weight:700}.choice{border:1px solid #d9e5dd;background:#fff;color:#486357;border-radius:10px;height:42px;width:100%;font-size:12px;font-weight:800}.choice[data-value='1']{background:#dfefe6;border-color:#9ccab3;color:#176748}.choice[data-value='2']{background:#f9ebd4;border-color:#e3c794;color:#895f1c}.choice[data-value='X']{background:#f3e7e7;border-color:#e4cbca;color:#ab4c4e}.choice:disabled{background:#e8e9e8;color:#8d9791}.employee-controls{display:flex;gap:14px;align-items:end;flex-wrap:wrap}.employee-controls label{display:grid;gap:5px;font-size:12px;font-weight:700;color:#66756c}.field{width:100%;border:1px solid var(--border);background:#fff;border-radius:9px;padding:10px 11px;outline-color:#8eb9a2;color:var(--ink)}.employee-controls input{max-width:140px}.employee-controls textarea{min-width:320px;resize:vertical}.helper{font-size:11px;color:var(--muted)}.table-scroll{overflow:auto;border:1px solid var(--border);border-radius:12px}.data-table{border-collapse:collapse;width:100%;text-align:right;min-width:550px}.data-table th{background:#f5f8f5;font-size:11px;font-weight:800;color:#5e7567;border-bottom:1px solid var(--border);padding:13px;white-space:nowrap}.data-table td{padding:12px 13px;border-bottom:1px solid #edf0ee;vertical-align:middle}.data-table tr:last-child td{border-bottom:0}.data-table tr:hover td{background:#fbfdfb}.td-sub{display:block;font-size:11px;color:#89958e}.row-split{display:flex;align-items:center;gap:8px}.row-split button{font-size:11px}.muted-call{font-size:10px;color:#a1643b}.shift-grid{display:grid;grid-template-columns:100px repeat(7,minmax(120px,1fr));min-width:980px;border:1px solid var(--border);border-radius:13px;overflow:hidden}.cell{min-height:104px;padding:12px;border-left:1px solid #e0e8e1;border-bottom:1px solid #e0e8e1;background:#fff;line-height:1.5}.cell.header{min-height:58px;background:var(--forest);color:#fff;font-weight:700;display:grid;align-content:center}.cell.shiftname{background:#eff4ef;display:grid;align-content:center;font-weight:800}.cell:last-child{border-left:0}.staff-chip{background:#f4f7f5;padding:5px 8px;border:1px solid #e3eae6;border-radius:6px;font-size:12px;margin:3px 0;display:flex;gap:4px;justify-content:space-between}.staff-chip .mini{color:#86998d}.staff-chip.call{background:#eaf3f8;border-color:#d7e8f1}.staff-chip.emergency{background:#fdf2e6;border-color:#f4dabd}.slot-empty{color:#c36a64;font-size:12px;font-weight:700}.section-label{padding:22px 0 13px;color:var(--forest);font-size:16px}.warn-list{margin:0;padding:0 22px;line-height:2}.modal-overlay{position:fixed;inset:0;background:#0d27239c;z-index:100;display:flex;align-items:center;justify-content:center;padding:20px}.modal-overlay[hidden]{display:none}.modal-card{background:#fff;padding:25px;border-radius:16px;max-width:600px;width:100%;max-height:92vh;overflow:auto;box-shadow:0 20px 80px #0003}.modal-card h2{margin:0 0 14px}.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:13px}.form-grid label{display:grid;gap:6px;font-size:12px;font-weight:700}.checks{display:grid;grid-template-columns:repeat(4,1fr);gap:10px}.checks label{background:#f5f7f5;padding:10px;border-radius:9px;display:flex;align-items:center;gap:8px}.divider{height:1px;background:var(--border);margin:20px 0}.toast{display:none;position:fixed;left:26px;bottom:24px;z-index:120;border-radius:11px;padding:13px 18px;background:#193f36;color:#fff;box-shadow:0 10px 35px #0002;font-weight:600;max-width:min(420px,calc(100vw - 40px))}.toast.visible{display:block}.toast.failed{background:#ac4742}.auth-shell{min-height:100vh;display:grid;place-items:center;background:linear-gradient(135deg,#0e342f,#27624d);padding:25px}.auth-glow{position:fixed;inset:0;background:radial-gradient(circle at 20% 10%,#78b98e40,transparent 40%);pointer-events:none}.auth-card{position:relative;width:min(100%,452px);padding:42px;background:white;border-radius:24px;box-shadow:0 25px 80px #07251a45}.auth-card .brand-mark{margin-bottom:22px}.auth-card h1{font-size:27px;margin:0}.auth-card .muted{margin:5px 0 27px}.auth-form{display:grid;gap:15px}.auth-form label{display:grid;gap:7px;font-weight:700;font-size:13px}.auth-form input{width:100%;background:#fafcfa;border:1px solid #dfe8e0;padding:13px;border-radius:11px;outline-color:#609a78}.auth-form .btn{padding:14px;justify-content:space-between;margin-top:6px}.auth-card footer{border-top:1px solid var(--border);margin-top:25px;padding-top:20px;color:#84918a;font-size:11px;line-height:1.8}.form-message{color:var(--danger);font-size:12px}.loading{display:grid;place-items:center;min-height:150px;color:#75887e}.inline-counts{display:flex;gap:8px;flex-wrap:wrap;margin:14px 0}.count-item{background:#f3f7f4;padding:8px 12px;border-radius:10px;font-size:12px}.count-item b{font-size:16px;color:#1d684c}.inline-counter{display:flex;align-items:center;gap:8px}.inline-counter input{width:65px}.hidden{display:none!important}
@media(max-width:1150px){.content{padding:30px 25px}.weekdays{grid-template-columns:repeat(4,minmax(0,1fr))}.stats{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:760px){.sidebar{position:fixed;right:-260px;top:0;transition:right .2s;box-shadow:0 0 30px #0002}.sidebar.open{right:0}.topbar{height:62px;padding:0 20px}.topbar-right{display:none}.mobile-menu{display:block}.content{padding:24px 15px 70px}.page-intro{align-items:flex-start;flex-direction:column}.page-intro h1{font-size:26px}.week-picker{width:100%}.weekdays{grid-template-columns:repeat(2,minmax(0,1fr))}.stats{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.stat{padding:14px}.stat .value{font-size:26px}.card{padding:16px}.employee-controls{display:grid}.employee-controls textarea{min-width:0}.card-head{align-items:flex-start;flex-direction:column}.form-grid{grid-template-columns:1fr 1fr}.checks{grid-template-columns:repeat(2,1fr)}.modal-card{padding:18px}}
@media(max-width:390px){.weekdays{grid-template-columns:1fr}.stats{grid-template-columns:1fr 1fr}.form-grid{grid-template-columns:1fr}}
@media print{.sidebar,.topbar,.page-intro,.actions,.toast,.btn{display:none!important}.content{padding:0}.card{border:0;box-shadow:none;padding:0}.shift-grid{min-width:0;grid-template-columns:80px repeat(7,minmax(0,1fr))}.cell{min-height:60px;padding:4px;font-size:9px}.staff-chip{font-size:8px;padding:2px}.tab-panel:not(.active){display:none}.workspace{width:100%}}

/* Photographed current roster — temporary, read-only and scrollable on phones. */
.photographed-roster .banner{margin:0 0 15px}
.photographed-grid{min-width:1040px;table-layout:fixed}
.photographed-grid th:first-child{width:114px;position:sticky;right:0;z-index:2;background:#eef4ef}
.photographed-grid thead th{background:#e4eee7}
.photographed-grid thead th:first-child{z-index:3}
.photographed-grid td{vertical-align:top;padding:8px 7px}
.photographed-grid .photo-staff{background:#f5f8f5;border:1px solid #e6ece7;border-radius:7px;padding:5px 7px;font-size:12px;font-weight:700;min-height:28px;margin:3px 0;line-height:1.4}
.photographed-grid .photo-staff small{display:block;font-size:10px;color:#94704c;font-weight:600}
.photographed-grid .photo-staff:has(small[title="12 שעות"]){background:#edf2fb;border-color:#dce3f2}
.temporary-roster-prompt{border-right:4px solid var(--teal)}
@media print{.photographed-grid{min-width:0;font-size:9px}.photographed-grid th:first-child{position:static}.photographed-grid td{padding:3px}.photographed-grid .photo-staff{font-size:9px;padding:3px;margin:1px}.photographed-roster .banner{font-size:9px}}

/* Mark the authenticated worker wherever they appear in the roster. */
.staff-chip.my-shift,.photographed-grid .photo-staff.my-shift{
  background:#d9eeff!important;
  border:2px solid #2476bd!important;
  color:#103f6a!important;
  box-shadow:0 0 0 2px rgba(36,118,189,.10);
}
.staff-chip.my-shift .roster-person-name,.photographed-grid .photo-staff.my-shift .roster-person-name{
  font-weight:900;
  color:#0d4678;
}
.roster-person-name{display:inline-flex;align-items:center;gap:5px;flex-wrap:wrap}
.mine-label{display:inline-block;background:#1763a0;color:white;font-size:10px;font-weight:800;border-radius:6px;padding:1px 5px;margin-inline-start:4px;white-space:nowrap}
.roster-counts{margin-top:8px}
.roster-count{display:inline-flex;align-items:center;gap:9px;flex-wrap:wrap;border:1px solid #dfe9e3;min-width:120px;justify-content:space-between}
.roster-count strong{font-size:13px}
.roster-count b{font-size:19px}
.roster-count small{width:100%;font-size:10px;color:#688075;line-height:1.3}
.roster-count.my-count{background:#d9eeff;border:2px solid #2476bd;color:#103f6a}
.roster-count.my-count strong,.roster-count.my-count b{color:#0d4678}
.roster-count.my-count .mine-label{color:white;width:auto}
.roster-counts-wrap{margin-top:18px;border-top:1px solid var(--border);padding-top:18px}
@media(max-width:760px){
  .roster-count{min-width:calc(50% - 7px)}
  .photo-staff.my-shift{padding:6px}
}
@media print{
  .my-shift,.my-count{print-color-adjust:exact;-webkit-print-color-adjust:exact}
}

/* Shared shift-roster instructions are editable only by managers. */
.roster-notes{margin-top:19px;padding:18px 20px;background:#fffdf5;border:1px solid #eee4c6;border-right:4px solid #b18a49;border-radius:12px}
.roster-notes .card-head{margin-bottom:10px}
.roster-notes-list{list-style:disc;margin:0;padding-inline-start:0;padding-inline-end:24px;line-height:1.95}
.roster-notes-list li{padding-bottom:3px;white-space:pre-wrap;overflow-wrap:anywhere}
.roster-notes-editor{display:block;width:100%;min-height:170px;margin-top:8px;line-height:1.7;resize:vertical}
@media print{.roster-notes{border:0;border-top:1px solid #bbb;padding:10px 0}.roster-notes-list{font-size:10pt}}

/* Place 12-hour shift quota and its own notes AFTER the selection grid. */
.twelve-details{margin-top:20px;padding-top:12px;border-top:1px solid var(--border)}
.twelve-details .section-label{padding-top:8px}
.twelve-details .employee-controls{margin-top:10px}
.twelve-details textarea{min-width:300px}
@media(max-width:760px){.twelve-details .employee-controls{display:grid;grid-template-columns:1fr}.twelve-details textarea{min-width:0;width:100%}}

/* Personal dashboard and approved workforce actions */
.workflow-stack{display:grid;gap:18px}
.workflow-card .card-head{margin-bottom:16px}
.workflow-requests{display:grid;gap:10px}
.workflow-request{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;border:1px solid var(--border);border-radius:12px;padding:14px;background:#fafcfb}
.workflow-request strong{font-size:13px}
.workflow-request .muted{margin:4px 0 10px;font-size:12px}
.workflow-request .actions{justify-content:flex-start}
.workflow-score{font-size:62px;font-weight:900;line-height:1.1;color:var(--forest)}
.workflow-score small{font-size:20px;font-weight:700;color:var(--muted)}
.workflow-card .checks{margin:12px 0}
.workflow-card .data-table td{font-size:12px}
.workflow-card .data-table th{white-space:nowrap}
.workflow-card .helper{line-height:1.75}
#myPanel .card,#insightsPanel .card{scroll-margin-top:20px}
@media(max-width:760px){.workflow-request{flex-direction:column}.workflow-request .actions{width:100%}.workflow-score{font-size:48px}}

.workflow-badge{min-width:19px!important;width:auto!important;height:19px;border-radius:99px;background:#e8bd85;color:#163b32;
  font-size:11px!important;font-weight:900;display:inline-flex;align-items:center;justify-content:center;padding:0 5px;margin-inline-start:auto}
.workflow-next{background:#e6f3ed;border-right:4px solid var(--teal);padding:13px 16px;border-radius:9px;line-height:1.7;margin:0 0 18px}
.workflow-next small{display:block;color:var(--muted);font-size:11px}

/* Compact shift labels; exact shift hours remain available for the calendar. */
.photographed-grid th:first-child{width:114px;min-width:108px;white-space:normal}
.photographed-grid .photo-staff small{white-space:normal;line-height:1.35}
@media(max-width:760px){.photographed-grid{min-width:1040px}}

/* Separate actual work shifts from on-call duties in the employee area. */
.workflow-shift-overview{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-bottom:10px}
.workflow-shift-overview .workflow-next{margin:0;display:flex;flex-direction:column;gap:5px;min-height:100px}
.workflow-shift-label{font-weight:800;font-size:13px;color:var(--forest)}
@media(max-width:760px){.workflow-shift-overview{grid-template-columns:1fr}.workflow-shift-overview .workflow-next{min-height:0}}

/* Mobile navigation can always be dismissed with a visible close button
   and a tappable backdrop; keep desktop sidebar unchanged. */
.sidebar-close,.sidebar-backdrop{display:none}
.sidebar-backdrop[hidden]{display:none!important}
@media(max-width:760px){
 body.menu-open{overflow:hidden}
 .sidebar{overflow-y:auto;overscroll-behavior:contain;padding-top:84px;width:min(300px,85vw);right:-320px;max-width:85vw;touch-action:pan-y}
 .sidebar.open{right:0}
 .sidebar-close:not([hidden]){position:fixed;display:grid;place-items:center;
    top:calc(12px + env(safe-area-inset-top,0px));right:16px;
    width:48px;height:48px;background:#31594c;border:2px solid #8bb7a5;
    border-radius:12px;color:white;font-size:32px;font-weight:700;line-height:1;
    z-index:65;touch-action:manipulation}
 .sidebar-close[hidden]{display:none!important}
 .sidebar-close:focus-visible{outline:3px solid #e8bd85;outline-offset:3px}
 .sidebar-backdrop:not([hidden]){display:block;position:fixed;inset:0;
    background:rgba(8,28,22,.55);border:0;border-radius:0;
    z-index:39;cursor:pointer}
 .sidebar .brand{padding-bottom:24px}
}

/* Mobile overflow and drawer positioning — prevents long admin tables from
   enlarging the visual/layout viewport and moving the close X off-screen. */
html,body{max-width:100%;overflow-x:clip}
.layout,.workspace,.content,.tab-panel,
.stack,.workflow-stack,.workflow-card,.workflow-request,.grid2,.stats{
  min-width:0;max-width:100%;
}
.workspace{width:100%;flex:1 1 0}
.content{width:100%}
.tab-panel.active{width:100%}
.stack,.workflow-stack{grid-template-columns:minmax(0,1fr)}
.grid2>*,
.stats>*,
.workflow-stack>*,
.workflow-card>*,
.workflow-request>*{min-width:0}
.table-scroll{width:100%;max-width:100%;min-width:0;overflow-x:auto;overscroll-behavior-x:contain}
.card,.workflow-card{min-width:0;max-width:100%;overflow-wrap:break-word}
@media(max-width:760px){
  .layout,.workspace,.content{width:100%;max-width:100%}
  .sidebar{
    position:fixed;top:0;right:0;bottom:0;left:auto;
    height:100vh;height:100dvh;
    width:min(300px,85vw);max-width:85vw;
    transform:translateX(105%);
    transition:transform .18s ease-out;
    z-index:1000;
    overflow-x:hidden;overflow-y:auto;
  }
  .sidebar.open{right:0;transform:translateX(0)}
  .sidebar-backdrop:not([hidden]){z-index:990}
  .sidebar-close:not([hidden]){
    z-index:1010;
    top:calc(12px + env(safe-area-inset-top,0px));
    right:calc(min(300px,85vw) - 60px);
  }
  .workflow-card,.workflow-stack,.workflow-request,
  #homePanel,#myPanel,#insightsPanel{min-width:0;width:100%;max-width:100%}
}

/* Operational improvements: mobile daily view, diagnostics, smart request, inbox. */
.ops-view-toolbar{display:flex;gap:8px;flex-wrap:wrap;margin:0 0 16px}
#opsDayShell[hidden],#opsTableShell[hidden]{display:none!important}
.ops-day-card{min-width:0;width:100%;max-width:100%;overflow:hidden}
.ops-day-nav{display:grid;grid-template-columns:44px minmax(0,1fr) 44px;gap:8px;align-items:center;margin-bottom:16px}
.ops-day-nav .btn{padding:8px;min-height:42px}
.ops-day-nav select{min-width:0}
#opsDayContent h3{font-size:19px;margin:10px 0 15px}
#opsDayContent h4{font-size:14px;margin:20px 0 8px;color:var(--forest)}
.ops-time-row{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;padding:10px 7px;border-bottom:1px solid var(--border);font-size:13px;line-height:1.65}
.ops-time-row>strong{min-width:62px;flex-shrink:0}
.ops-time-row>div{flex:1;display:flex;gap:6px;flex-wrap:wrap}
.ops-worker{display:inline-block;background:#f1f5f2;border:1px solid #e0e8e3;padding:3px 8px;border-radius:8px;font-size:12px}
.ops-worker.ops-mine{color:#0d4678;background:#d9eeff;border:2px solid #2476bd;font-weight:900}
.ops-worker b{font-size:10px;background:#1763a0;color:white;border-radius:5px;padding:2px 4px}
.ops-worker small{font-size:10px;color:#65788b}
.ops-notes{white-space:pre-wrap;line-height:1.75}
.ops-section{min-width:0}
#opsAdminExtras,#opsMyExtras{margin-top:18px}
.ops-form-row{display:flex;flex-wrap:wrap;align-items:end;gap:12px;margin:12px 0}
.ops-form-row>label{min-width:min(230px,100%);display:flex;gap:7px;flex-direction:column;font-size:13px}
.ops-form-row .field{max-width:100%;width:100%}
.ops-checkbox{flex-direction:row!important;align-items:center;gap:10px!important;min-width:0!important}
.ops-form-row select{min-width:0;max-width:100%}
.ops-issues{display:grid;gap:8px}
.ops-issue{display:flex;align-items:start;justify-content:space-between;gap:10px;padding:12px;border:1px solid #f0ddd1;border-radius:9px;overflow-wrap:anywhere}
.ops-issue.ops-blocker{background:#fff1ee;border-color:#eaa39b}
.ops-issue.ops-warning{background:#fff8e7;border-color:#ebd18f}
.ops-issue .btn{flex-shrink:0}
.ops-notice{padding:12px;border-bottom:1px solid var(--border);display:flex;flex-direction:column;gap:4px}
.ops-notice.ops-unread{border-right:4px solid #2476bd;background:#f0f7ff}
.ops-notice small,.ops-change small{color:var(--muted);font-size:11px}
.ops-change{border:1px solid var(--border);padding:10px 12px;margin:8px 0;border-radius:8px}
.ops-change ul{margin:7px 0 0;padding-inline-start:20px}
.ops-notice-count{background:#1763a0;color:#fff;padding:1px 6px;border-radius:999px;font-size:11px;font-weight:800;margin-inline-start:auto}
#opsSmartText{width:100%;min-height:95px;max-width:100%}
@media(max-width:760px){
 .ops-view-toolbar>.btn{flex:1;min-width:0}
 .ops-time-row{flex-direction:column;gap:5px}
 .ops-time-row>strong{min-width:0}
 .ops-issue{flex-direction:column}
 .ops-form-row{display:grid;grid-template-columns:1fr}
 .ops-form-row>label{min-width:0}
}

/* Manager-only interactive roster editing; never displayed on published rosters. */
.staff-chip.roster-edit-name{
 width:100%;text-align:right;color:var(--ink);font:inherit;
 cursor:pointer;border:1px solid #8db8a5;background:#e8f6ed;
 align-items:center;min-height:34px;transition:background .12s ease,border-color .12s ease;
}
.staff-chip.roster-edit-name:hover,.staff-chip.roster-edit-name:focus-visible{
 background:#d4eddf;border-color:#21745b;outline:2px solid #21745b;outline-offset:1px;
}
.staff-chip.roster-edit-name .mini{white-space:nowrap;font-size:11px}
.ops-worker.ops-edit-name{
 cursor:pointer;border:1px solid #5eae91;background:#e4f4ec;color:#174d36;
 font-weight:700;min-height:36px;
}
.ops-worker.ops-edit-name:hover,.ops-worker.ops-edit-name:focus-visible{
 background:#cdeedb;outline:2px solid #21745b;outline-offset:2px;
}
@media print{
 .staff-chip.roster-edit-name,.ops-worker.ops-edit-name{
  border:1px solid #ddd;background:#fff;pointer-events:none;
 }
}

/* A red block is displayed for each unfilled staffing slot.
   In manager edit mode it becomes an accessible + action. */
.roster-gap{
 display:flex;align-items:center;justify-content:center;
 width:100%;min-height:35px;margin:4px 0;
 border:1px solid #d88c91;border-radius:8px;
 background:#f8dfe1;color:#9d252e;
}
.roster-gap-add{
 cursor:pointer;background:#f3ced2;border:1px solid #c84f60;
 color:#9b1a32;font-size:23px;font-weight:800;
 line-height:1.1;
}
.roster-gap-add:hover,.roster-gap-add:focus-visible{
 background:#f3b7be;border-color:#992c45;
 outline:2px solid #992c45;outline-offset:2px;
}
#opsDayContent .roster-gap{width:95px;max-width:100%;min-width:74px}
@media print{
 .roster-gap{background:#fff3f3;border-color:#c89a9a;min-height:20px}
 .roster-gap-add{pointer-events:none}
}

/* Quick, manager-only exchange of KZT and guard duty roles. */
.roster-oncall-swap{display:flex;justify-content:center;margin:5px 0 3px}
.roster-oncall-swap .btn{padding:6px 9px;min-height:31px;font-size:12px;border-style:dashed}
.roster-oncall-swap .btn:hover,.roster-oncall-swap .btn:focus-visible{
 border-color:#24846b;background:#e1f4eb;outline-offset:2px;
}
@media print{.roster-oncall-swap{display:none!important}}

/* Compact install action in the shared mobile/desktop sidebar. */
.install-shortcut{display:flex;align-items:center;justify-content:center;gap:9px;width:100%;margin-top:14px;padding:11px 12px;border:1px solid #9cc5b3;border-radius:10px;background:#dcece5;color:#154538;font-weight:700;cursor:pointer;font:inherit}
.install-shortcut:hover,.install-shortcut:focus-visible{background:#f1faf5;outline-offset:3px}
.install-shortcut[hidden]{display:none!important}

/* Lottery controls and video history (no embedded media providers). */
.lottery-layout{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:22px;align-items:start}
.lottery-wheel-wrap{text-align:center;position:relative;max-width:440px;width:100%;margin-inline:auto}
.lottery-wheel-wrap canvas{display:block;width:100%;height:auto;aspect-ratio:1;margin-inline:auto;border-radius:50%;box-shadow:0 14px 35px #123d3124}
.lottery-arrow{position:absolute;top:-16px;left:50%;transform:translateX(-50%);color:#a63f3d;font-size:36px;z-index:3;line-height:1}
#drawWheelCanvas.drawing{animation:lottery-spinner 1.6s linear infinite}
@keyframes lottery-spinner{from{transform:rotate(0deg)}to{transform:rotate(360deg)}}
.lottery-meta{margin:14px 0;font-size:13px;font-weight:800;color:#2d564a}
.lottery-picker{display:block;max-width:680px;margin-bottom:25px;font-weight:700}
.lottery-controls{display:grid;gap:13px;min-width:0}
.lottery-people{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;padding:12px;background:#f7faf8;border:1px solid var(--border);border-radius:12px;max-height:265px;overflow:auto}
.lottery-people label{display:flex;gap:8px;align-items:center;font-size:12px}
.lottery-checkbox{display:flex;gap:9px;align-items:center;font-weight:700}
.lottery-result{margin-top:20px;max-width:600px}
.lottery-result video,.lottery-history video{width:100%;max-height:540px;background:#102b23;border-radius:12px;margin-top:10px}
.lottery-history{display:grid;grid-template-columns:repeat(auto-fit,minmax(250px,1fr));gap:14px}
.lottery-history-item{border:1px solid var(--border);border-radius:12px;padding:14px;min-width:0;background:#fcfdfc}
.lottery-history-item small{display:block;color:var(--muted)}
.lottery-history-item video{max-height:300px}
@media(max-width:800px){.lottery-layout{grid-template-columns:1fr}.lottery-wheel-wrap{max-width:360px}}

/* Uploaded on-call report structure: widen the monthly preview without touching other modals. */
.modal-card:has(#monthlyOncallDay){width:min(1180px,98vw);max-width:min(1180px,98vw)}
.modal-card:has(#monthlyOncallDay) .data-table{min-width:1030px}
.monthly-totals{font-weight:800;background:#f1f5f2}

.lottery-gaps{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:9px;margin:16px 0}
.lottery-gap-card{border:1px solid #d1e1d8;border-radius:11px;padding:12px;text-align:right;background:#f7faf8;color:#234b40;display:grid;gap:5px;cursor:pointer}
.lottery-gap-card strong{font-size:12px;line-height:1.5}
.lottery-gap-card small{font-size:11px;color:#687e72}
.lottery-gap-card.active{background:#e1f2e7;border:2px solid #2e7e64}
#drawSelectedWrap[hidden]{display:none}
.wf-variant-check{width:17px;height:17px;accent-color:#277e62}

/* Personal salary estimate: responsive RTL scorecard, transparent breakdown. */
.payroll-card{display:grid;gap:17px;margin-bottom:18px}
.payroll-card .pay-period{display:flex;align-items:end;flex-wrap:wrap;justify-content:space-between;gap:12px;padding:10px 0}
.payroll-card .pay-period label{display:grid;gap:5px;font-size:12px;min-width:195px}
.payroll-card .pay-period>div{display:grid;gap:4px;text-align:right}
.payroll-card .pay-period>div strong{font-size:17px}
.payroll-card .pay-period small{font-size:12px;color:var(--muted,#64736d)}
.pay-numbers{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
.pay-kpi{background:#f3f8f5;border:1px solid #d6e6dc;border-radius:14px;padding:14px;display:flex;flex-direction:column;gap:8px;min-width:0}
.pay-kpi .pay-kpi-label{color:#4b665d;font-size:12px}
.pay-kpi strong{color:#174b3b;font-size:clamp(20px,2.4vw,30px);line-height:1.15;white-space:nowrap}
.pay-kpi small{font-size:11px;color:#667b72;line-height:1.5}
.pay-kpi:nth-child(3){background:#f2f6fb;border-color:#d6e3f0}
.pay-kpi:nth-child(3) strong{color:#204b76}
.pay-role{font-size:13px;color:#51685e;margin:0}
.pay-section{padding:18px 0 7px;border-top:1px solid #e3ebe6}
.pay-section h3{font-size:17px;margin:0 0 14px}
.pay-line{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px 16px;align-items:center;margin:9px 0;font-size:13px}
.pay-line span{color:#4e6359}
.pay-line strong{font-size:14px;white-space:nowrap;font-variant-numeric:tabular-nums}
.pay-line small{grid-column:1/-1;font-size:11px;color:#708278}
.pay-total{border-top:1px solid #c6d8cd;padding-top:12px;margin-top:12px}
.pay-total .pay-line strong,.pay-total .pay-line span{font-size:18px;font-weight:750;color:#17543e}
.pay-settings{display:flex;align-items:end;flex-wrap:wrap;gap:12px;margin:17px 0 12px;padding:16px;background:#f7faf8;border:1px solid #dde8e0;border-radius:12px}
.pay-settings label{display:grid;gap:7px;min-width:155px;flex:1;font-size:12px}
.pay-settings input{width:100%;min-height:43px}
.pay-settings button{align-self:end;min-height:43px}
.pay-sources{display:flex;flex-wrap:wrap;gap:12px;margin:10px 0}
.pay-sources a{font-size:12px;text-decoration:underline}
.pay-details{border:1px solid #d9e4dd;border-radius:12px;padding:13px 16px}
.pay-details summary{cursor:pointer;font-size:14px;font-weight:700;color:#205540}
.pay-details h4{margin:20px 0 10px;font-size:13px}
.pay-details .data-table{min-width:610px;font-size:12px}
.pay-footnotes{color:#62786d;font-size:12px;line-height:1.6}
.pay-footnotes p{margin:4px 0}
@media (max-width:800px){.pay-numbers{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (max-width:430px){.pay-kpi{padding:12px 10px}.pay-kpi strong{font-size:21px}.pay-settings{padding:12px}}

/* Personal entries and three-month reservist pay wizard. */
.pay-inline-heading{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:12px;margin-bottom:10px}
.pay-inline-heading h3{margin:0}
.pay-day-counts{display:flex;gap:7px;flex-wrap:wrap;margin:12px 0}
.pay-day-counts span{font-size:12px;border-radius:20px;padding:5px 10px;background:#eef5f0;color:#275e47}
.pay-manual-day{display:flex;align-items:center;justify-content:space-between;gap:12px;border-bottom:1px solid #edf0ed;padding:12px 0;font-size:13px}
.pay-manual-day>div{display:flex;gap:5px 9px;flex-wrap:wrap;align-items:center}
.pay-manual-day small{width:100%;font-size:11px;color:#708277}
.pay-absence-info{margin-top:16px}
.pay-history-list{display:grid;gap:8px}
.pay-history-list>p{margin:0}
.pay-history-month{display:grid;grid-template-columns:minmax(0,1fr) minmax(120px,160px);align-items:center;gap:8px;padding:10px;background:#f7faf7;border:1px solid #dde9df;border-radius:10px}
.pay-history-month>div{display:grid;gap:4px}
.pay-history-month strong,.pay-history-month b{font-size:12px}
.pay-history-month small{font-size:11px;color:#708175}
.pay-history-month input{width:100%}
.pay-reserve-basis{padding:0 20px;margin:10px 0;color:#607369;font-size:12px}
.pay-reserve-basis li{padding:3px 0}
.pay-reserve-result{border:1px solid #b9dbc6;background:#f1f9f3;padding:16px;border-radius:12px;display:flex;flex-wrap:wrap;justify-content:space-between;gap:10px;margin:12px 0}
.pay-reserve-result strong{font-size:20px;color:#175b3f}
.pay-reserve-mode{border:0;padding:0;margin:15px 0;display:grid;gap:13px}
.pay-reserve-mode legend{font-size:13px;font-weight:700;margin-bottom:10px}
.pay-reserve-mode label{display:flex;align-items:center;gap:9px;font-size:13px}
.pay-reserve-mode #payCustomRateWrap{display:grid;justify-items:start;gap:7px}
.pay-reserve-mode #payCustomRateWrap[hidden]{display:none}
.pay-reserve-mode #payCustomRateWrap input{max-width:185px}
@media(max-width:460px){.pay-history-month{grid-template-columns:1fr}.pay-history-month input{max-width:none}}

/* Per-gap lottery transparency: eligible people are on the wheel by default. */
.lottery-exclusions{border:1px solid #d8e6dd;border-radius:12px;background:#f9fbfa;margin:7px 0 14px;overflow:hidden}
.lottery-exclusions summary{cursor:pointer;padding:13px 14px;font-weight:700;color:#285345;font-size:13px}
.lottery-exclusions summary small{font-weight:400;font-size:11px;color:#708277;margin-inline-start:7px}
.lottery-excluded-list{max-height:320px;overflow-y:auto;padding:2px 14px 10px}
.lottery-excluded-item{border-top:1px solid #e6eee8;padding:10px 0;display:grid;gap:4px;font-size:12px}
.lottery-excluded-item strong{font-weight:700;color:#2a473b}
.lottery-excluded-item span{color:#6c716a;line-height:1.5}

/* Advanced management: four accessible, collapsible sections in workflow order. */
#insightsPanel .advanced-categories{display:grid;gap:16px;min-width:0}
#insightsPanel .advanced-category{
  min-width:0;overflow:hidden;border:1px solid var(--border);
  border-radius:16px;background:#fff;box-shadow:var(--shadow)
}
#insightsPanel .advanced-category-heading{
  display:flex;align-items:center;gap:12px;min-height:64px;
  padding:16px 20px;cursor:pointer;list-style:none;color:var(--forest)
}
#insightsPanel .advanced-category-heading::-webkit-details-marker{display:none}
#insightsPanel .advanced-category-heading::marker{content:''}
#insightsPanel .advanced-category-heading:hover{background:#f6faf7}
#insightsPanel .advanced-category-heading:focus-visible{
  outline:3px solid #76ae90;outline-offset:-4px;border-radius:12px
}
#insightsPanel .advanced-category[open]>.advanced-category-heading{
  border-bottom:1px solid var(--border);background:#f6faf7
}
#insightsPanel .advanced-category-label{font-size:18px;font-weight:800;line-height:1.35}
#insightsPanel .advanced-category-count{
  margin-inline-start:auto;border:1px solid #d8e8de;background:#edf5ef;
  color:#48735c;border-radius:999px;font-size:12px;font-weight:700;
  white-space:nowrap;padding:4px 10px
}
#insightsPanel .advanced-category-arrow{
  font-size:24px;line-height:1;display:inline-block;
  color:#628572;transition:transform .2s ease
}
#insightsPanel .advanced-category[open] .advanced-category-arrow{transform:rotate(180deg)}
#insightsPanel .advanced-category-body{
  display:grid;gap:16px;padding:18px;min-width:0;background:#fbfdfb
}
#insightsPanel .advanced-category:not([open])>.advanced-category-body{display:none}
#insightsPanel .advanced-card-slot{min-width:0}
#insightsPanel .advanced-card-slot:empty{display:none}
#insightsPanel .advanced-card-slot>.card{min-width:0;box-shadow:none}
@media(max-width:760px){
  #insightsPanel .advanced-categories{gap:11px}
  #insightsPanel .advanced-category-heading{padding:14px;gap:9px;min-height:58px}
  #insightsPanel .advanced-category-label{font-size:15px}
  #insightsPanel .advanced-category-count{font-size:11px;padding:3px 7px}
  #insightsPanel .advanced-category-body{padding:11px;gap:12px}
}
@media(prefers-reduced-motion:reduce){
  #insightsPanel .advanced-category-arrow{transition:none}
}

/* Current-day cue across weekly rosters (Israel calendar date, not device time).
   Keep personal blue worker highlights intact by styling cells, not staff chips. */
.roster-today-badge{
  display:inline-flex;align-items:center;justify-content:center;
  width:max-content;margin-block-start:5px;padding:3px 9px;
  border-radius:999px;background:#fff;color:#176b4b;
  border:1px solid #b5deca;font-size:11px;font-weight:900;line-height:1.3
}
.shift-grid .cell.header.roster-today{
  background:#217456;color:#fff;
  box-shadow:inset 3px 0 0 #a3e3bd,inset -3px 0 0 #a3e3bd
}
.shift-grid .cell.roster-today:not(.header){
  background:#e9f7ed;
  box-shadow:inset 3px 0 0 #5ba87d,inset -3px 0 0 #5ba87d
}
.photographed-grid thead th.roster-today{
  background:#217456;color:#fff;
  box-shadow:inset 3px 0 0 #a3e3bd,inset -3px 0 0 #a3e3bd
}
.photographed-grid thead th.roster-today .td-sub{color:#dcefe3}
.photographed-grid td.roster-today,
.photographed-grid tr:hover td.roster-today{
  background:#e9f7ed;
  box-shadow:inset 3px 0 0 #5ba87d,inset -3px 0 0 #5ba87d
}
.ops-day-card.roster-today-day{
  border:2px solid #399465;
  background:#f4fbf6
}
.ops-day-card.roster-today-day h3 .roster-today-badge{
  margin-inline-start:7px;margin-block-start:0;
  color:#fff;background:#217456;border-color:#217456;vertical-align:middle
}
@media print{
  .shift-grid .cell.roster-today,.photographed-grid .roster-today{
    print-color-adjust:exact;-webkit-print-color-adjust:exact
  }
}

/* Self-registration for refresher days: shared with manager and employee views. */
.ev-signup-manager{margin-top:20px;padding-top:18px;border-top:1px solid var(--border)}
.ev-signup-manager .card-head{margin-bottom:12px}
.ev-signup-head{display:flex;align-items:end;justify-content:space-between;gap:12px;flex-wrap:wrap;margin:12px 0}
.ev-signup-head>label{display:grid;gap:5px;min-width:min(310px,100%);max-width:100%;font-size:12px;font-weight:700;color:#526b5c}
.ev-signup-actions{margin:14px 0}
.ev-signup-table{min-width:580px}
.ev-signup-table td{vertical-align:top;white-space:normal}
.ev-signup-people{display:flex;flex-wrap:wrap;gap:7px;min-width:145px}
.ev-signup-person{display:inline-flex;align-items:center;gap:5px;flex-wrap:wrap;border:1px solid #dfebe2;background:#f3f8f5;padding:4px 7px;border-radius:9px;font-size:12px}
.ev-signup-person>.btn.small{padding:4px 7px}
.ev-signup-self{border-top:1px solid var(--border);margin-top:18px;padding-top:16px}
.ev-signup-self h3{font-size:17px;color:var(--forest);margin:0 0 8px}
.ev-signup-self .table-scroll{margin-top:12px}
.ev-signup-self .actions{margin:8px 0}
@media(max-width:760px){
 .ev-signup-head>label{width:100%}
 .ev-signup-actions>.btn{font-size:12px}
 .ev-signup-self .table-scroll{max-width:100%}
}

/* Equal-sized worker shift totals: always two cards per row on phones,
   including names with 12-hour-shift notes or a personal badge. */
.roster-count-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:10px;
  align-items:stretch
}
.roster-count-grid>.roster-count{
  width:100%;
  min-width:0;
  min-height:80px;
  margin:0;
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  grid-auto-rows:min-content;
  align-content:center;
  align-items:center;
  column-gap:8px;
  row-gap:5px;
  padding:13px 12px
}
.roster-count-grid>.roster-count strong{
  min-width:0;
  overflow-wrap:anywhere;
  line-height:1.4
}
.roster-count-grid>.roster-count b{
  justify-self:end;
  font-variant-numeric:tabular-nums
}
.roster-count-grid>.roster-count small{
  grid-column:1/-1;
  width:auto;
  overflow-wrap:anywhere
}
.roster-count-grid>.roster-count .mine-label{
  justify-self:start;
  width:max-content
}
@media(max-width:900px){
  .roster-count-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:390px){
  .roster-count-grid{gap:8px}
  .roster-count-grid>.roster-count{padding:11px 9px;column-gap:5px}
}


/* Full-width historical roster viewer and manager correction workspace. */
.archive-picker{display:flex;flex-wrap:wrap;gap:12px;align-items:end}
.archive-picker>label{font-size:13px;font-weight:700;align-self:center}
.archive-picker>.field{width:min(340px,100%);flex:1 1 220px}
.archive-picker>.btn{min-height:42px}
#archiveRosterContent{min-width:0}
#archiveRosterContent .table-scroll{width:100%;max-width:100%;overflow-x:auto}
@media(max-width:760px){
 .archive-picker{align-items:stretch;flex-direction:column}
 .archive-picker>label{align-self:auto}
 .archive-picker>.field{width:100%;flex:initial}
 .archive-picker>.btn{width:100%}
}
