/* Mobile work views; desktop calendar keeps its own layout. */
html[data-surface="staff"] {overscroll-behavior-y:none}
html[data-surface="staff"] #views,html[data-surface="staff"] #jump-date{display:none}
html[data-surface="staff"] #calendar{touch-action:pan-y pinch-zoom;overflow-anchor:none}
html[data-surface="staff"] .calendar{border:0;border-radius:var(--app-radius);background:#fff;box-shadow:var(--app-shadow-sm,0 1px 4px rgba(15,56,46,0.04));padding:4px 4px 2px}
html[data-surface="staff"] .week-head{background:#fff;border:0;font-size:12px;font-weight:500;color:var(--muted);padding:8px 0 4px}
html[data-surface="staff"] .month-cell{height:64px;padding:4px 0;border:0;text-align:center}
html[data-surface="staff"] .month-cell.selected{background:#fff;box-shadow:none}
html[data-surface="staff"] .month-cell.outside{background:#fff;color:#a6b4a5;opacity:.55}
html[data-surface="staff"] .day-number{display:grid;place-items:center;width:34px;height:34px;min-height:34px;margin:auto;border-radius:50%;font-size:16px;font-weight:600;color:var(--app-text);font-variant-numeric:tabular-nums;transition:background-color .15s,color .15s}
html[data-surface="staff"] .day-number.is-today{background:var(--app-soft,#eef6f1);color:var(--primary);box-shadow:inset 0 0 0 1.5px #9ec5b0}
html[data-surface="staff"] .month-cell.selected .day-number{background:var(--primary);color:#fff;box-shadow:0 2px 6px rgba(40,93,69,.26)}
html[data-surface="staff"] .lunar-day{display:block;font-size:10px;line-height:14px;margin-top:2px;color:var(--muted)}
html[data-surface="staff"] .month-cell.selected .lunar-day{color:var(--primary);font-weight:600}
html[data-surface="staff"] .month-events,html[data-surface="staff"] .day-count{display:none}
html[data-surface="staff"] .day-dots{display:flex;justify-content:center;align-items:center;gap:4px;margin-top:3px;min-height:6px}
html[data-surface="staff"] .day-dots i{width:5px;height:5px;border-radius:50%;background:var(--regular)}
html[data-surface="staff"] .day-dots i.done{opacity:.32}
html[data-surface="staff"] .day-dots i.urgent{background:#d97706}
html[data-surface="staff"] .day-dots i.check{background:#0d9488}
html[data-surface="staff"] .day-dots i.consult-dot{background:#2563eb}
html[data-surface="staff"] .day-dots i.picking-dot{background:#b45309}
#calendar-expand{display:flex;align-items:center;justify-content:center;width:100%;min-height:32px;padding:4px 0 6px;border:0;background:transparent;touch-action:none;color:var(--muted)}
.calendar-expand-pill{display:inline-flex;align-items:center;gap:4px;padding:2px 10px;border-radius:999px;background:#f2f6f3;color:#5c6f65;font-size:11px;font-weight:500}
.calendar-expand-pill .ui-icon{width:14px;height:14px;min-width:14px;flex:0 0 14px}
html[data-surface="staff"] .calendar-toolbar{gap:8px;margin-bottom:10px}
html[data-surface="staff"] #staff-filter,html[data-surface="staff"] #staff-filter-chips{display:none!important}
html[data-surface="staff"] .date-nav{display:grid;grid-template-columns:minmax(0,1fr) repeat(3,auto);align-items:center;gap:6px;flex:1;width:100%}
html[data-surface="staff"] .date-nav>button{display:inline-flex;align-items:center;justify-content:center;min-height:36px;height:36px;padding:0 12px;border:0;border-radius:10px;background:#fff;box-shadow:var(--app-shadow-sm,0 1px 4px rgba(15,56,46,0.04));color:var(--app-text);font-size:13px;font-weight:600}
html[data-surface="staff"] .date-nav>button:is(#previous,#next){width:36px;padding:0}
html[data-surface="staff"] .date-nav>#today[data-is-today="true"]{color:var(--muted);background:#eef2ef;box-shadow:none;font-weight:500}
html[data-surface="staff"] .date-nav>#today[data-is-today="false"]{color:var(--primary);background:var(--app-soft,#eef6f1);box-shadow:inset 0 0 0 1px #cce0d4}
html[data-surface="staff"] .work-date-heading{order:-1;min-width:0;padding-top:0}
html[data-surface="staff"] .work-date-heading>.date-title{display:inline-flex;align-items:center;gap:4px;width:auto;max-width:100%;min-height:0;margin:0;padding:2px 0;border:0;background:transparent;color:var(--app-text);font-size:20px;font-weight:700;line-height:1.3;text-align:left;white-space:nowrap;letter-spacing:-.4px;box-shadow:none}
html[data-surface="staff"] .work-date-heading>.date-title::after{content:"";display:inline-block;width:6px;height:6px;border-right:1.8px solid var(--muted);border-bottom:1.8px solid var(--muted);transform:rotate(45deg) translateY(-2px);margin-left:2px;flex-shrink:0}
html[data-surface="staff"][data-work-layout="agenda"] .work-date-heading>.date-title{font-size:18px}
html[data-surface="staff"] #calendar-section>.filters{display:none}
html[data-surface="staff"] #counts{display:block;margin:2px 0 0;font-size:12px;line-height:1.4;font-weight:400;color:var(--muted);overflow-wrap:anywhere;font-variant-numeric:tabular-nums}
@media(max-width:340px){
  html[data-surface="staff"] .date-nav{grid-template-columns:repeat(3,auto);justify-content:flex-end;row-gap:8px}
  html[data-surface="staff"] .work-date-heading{grid-column:1/-1;justify-self:stretch;width:100%}
}
html[data-surface="staff"] .day-panel{margin-top:14px}
html[data-surface="staff"] .panel-title{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:10px}
html[data-surface="staff"] .panel-title-main{display:flex;align-items:baseline;justify-content:space-between;flex-wrap:wrap;gap:6px 8px;min-width:0;width:100%}
html[data-surface="staff"] .panel-title h2{display:inline-flex;align-items:center;gap:6px;font-size:17px;font-weight:700;color:var(--app-text)}
html[data-surface="staff"] .panel-weekday{font-size:13px;font-weight:500;color:var(--muted)}
html[data-surface="staff"] .panel-title small.today-pill{display:inline-flex;align-items:center;padding:1px 7px;border-radius:999px;background:var(--app-soft,#eef6f1);color:var(--primary);font-size:11px;font-weight:600}
html[data-surface="staff"] .panel-day-count{font-size:12px;color:var(--muted);font-variant-numeric:tabular-nums;margin-left:auto}
html[data-surface="staff"] .panel-title button#add-on-day{display:none!important}
.work-quick-bar{display:flex;align-items:center;justify-content:space-between;gap:8px;margin:0 0 12px;overflow-x:auto;scrollbar-width:none}
.work-quick-bar::-webkit-scrollbar{display:none}
.work-quick-statuses{display:inline-flex;align-items:center;gap:4px;padding:3px;border-radius:10px;background:var(--app-segment-bg,#e8ede9);flex-shrink:0}
.work-quick-pill{min-height:28px!important;height:28px;padding:0 10px!important;border:0!important;border-radius:7px!important;background:transparent!important;color:var(--muted)!important;font-size:12px!important;font-weight:500;white-space:nowrap}
.work-quick-pill.active{background:#fff!important;color:var(--app-brand,#17382e)!important;font-weight:600;box-shadow:0 1px 3px rgba(15,56,46,.08)}
.work-quick-scope{display:inline-flex!important;align-items:center;gap:4px;min-height:32px!important;height:32px;padding:0 10px 0 12px!important;border:0!important;border-radius:999px!important;background:#fff!important;color:#3d5248!important;font-size:12px!important;font-weight:600;white-space:nowrap;box-shadow:var(--app-shadow-sm,0 1px 4px rgba(15,56,46,0.04));flex-shrink:0}
.work-quick-scope .ui-icon{width:14px;height:14px;min-width:14px;flex:0 0 14px;color:var(--muted);transition:transform .18s ease}
.work-quick-scope[aria-expanded="true"]{background:var(--app-soft,#eef6f1)!important;color:var(--primary)!important}
.work-quick-scope[aria-expanded="true"] .ui-icon{transform:rotate(180deg);color:var(--primary)}
.work-scope-menu{position:fixed;z-index:80;min-width:144px;padding:6px;border-radius:14px;background:#fff;box-shadow:0 10px 28px rgba(15,56,46,.16),0 1px 4px rgba(15,56,46,.06);border:1px solid var(--app-border-subtle,#edf2ee);display:grid;gap:2px}
.work-scope-option{display:flex!important;align-items:center;justify-content:space-between;gap:10px;width:100%;min-height:38px!important;padding:8px 12px!important;border:0!important;border-radius:10px!important;background:transparent!important;color:var(--app-text)!important;font-size:13px!important;font-weight:500;text-align:left}
.work-scope-option.active{background:var(--app-soft,#eef6f1)!important;color:var(--primary)!important;font-weight:600}
.work-scope-option .ui-icon{width:16px;height:16px;min-width:16px;flex:0 0 16px;color:var(--primary)}
html[data-surface="staff"] .task-list{gap:10px}
html[data-surface="staff"] .task-card{position:relative;gap:12px;padding:13px 14px 13px 18px;border:0;border-left:0;border-radius:var(--app-radius);background:#fff;box-shadow:var(--app-shadow-sm,0 1px 4px rgba(15,56,46,0.04))}
html[data-surface="staff"] .task-card::before{content:"";position:absolute;left:7px;top:14px;bottom:14px;width:3.5px;border-radius:999px;background:var(--regular)}
html[data-surface="staff"] .task-card.urgent::before{background:#d97706}
html[data-surface="staff"] .task-card.check::before{background:#0d9488}
html[data-surface="staff"] .task-card.picking-card::before{background:#b45309}
html[data-surface="staff"] .task-card.consult-card::before{background:#2563eb}
html[data-surface="staff"] .task-card>div:nth-child(2),html[data-surface="staff"] .task-card .task-card-body{flex:1;min-width:0}
html[data-surface="staff"] .task-card strong{display:block;font-size:15px;font-weight:600;line-height:21px;color:var(--app-text)}
html[data-surface="staff"] .task-card small{display:flex;align-items:center;flex-wrap:wrap;gap:6px;margin-top:4px;font-size:12px;line-height:18px;color:var(--muted);font-variant-numeric:tabular-nums}
.task-step-progress{display:inline-block;width:44px;height:4px;border-radius:999px;background:#e4ece7;overflow:hidden;vertical-align:middle}
.task-step-progress>i{display:block;height:100%;border-radius:999px;background:var(--primary)}
html[data-surface="staff"] .time-block{min-width:44px;font-size:14px;font-weight:700;color:var(--app-text);font-variant-numeric:tabular-nums;line-height:1.3}
html[data-surface="staff"] .time-block small{display:block;margin-top:2px;font-size:11px;font-weight:400;color:var(--muted)}
html[data-surface="staff"] .badge{padding:4px 9px;border-radius:999px;font-size:11px;font-weight:600;line-height:16px;white-space:nowrap;background:#edf3ef;color:#53755e}
html[data-surface="staff"] .badge.status-pending{background:#eef2f0;color:#5a6b62}
html[data-surface="staff"] .badge.status-running{background:#e8f2fe;color:#1d63b8}
html[data-surface="staff"] .badge.status-done{background:#e6f4ec;color:var(--primary)}
html[data-surface="staff"] .badge.overdue{background:#fef0e6;color:#b8501c}
html[data-surface="staff"] .badge.status-cancelled{background:#eff1ef;color:#777f79}
html[data-surface="staff"] .badge.status-forced-ended{background:#f9ebe8;color:#a4423d}
html[data-surface="staff"] .empty{padding:28px 16px;border-radius:var(--app-radius);background:#fff;box-shadow:var(--app-shadow-sm,0 1px 4px rgba(15,56,46,0.04));font-size:13px}
html[data-surface="staff"] .event.regular,html[data-surface="staff"] .time-event.regular{background:#e8f1e5;color:var(--primary)}
html[data-surface="staff"] .timeline-head .is-today{color:#b58147}
html[data-surface="staff"] .timeline.day .timeline-head{display:none}
html[data-surface="staff"] .time-event{min-height:0;border-radius:8px}
html[data-surface="staff"] .timeline-scroll{max-height:60vh}
.task-heading .task-status.forced_ended{background:#a4423d;color:#fff}
.ui-icon{width:22px;height:22px;min-width:22px;flex:0 0 22px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;vertical-align:middle}

html[data-surface="staff"][data-work-layout="agenda"] .calendar{background:transparent;border-radius:0;box-shadow:none;padding:0}
html[data-surface="staff"] .agenda{padding:0}
html[data-surface="staff"] .agenda section{margin:0 0 18px}
html[data-surface="staff"] .agenda h3{display:flex;align-items:center;justify-content:space-between;font-size:15px;font-weight:700;margin:4px 0 10px;color:var(--app-text)}
html[data-surface="staff"] .agenda-day-main{display:inline-flex;align-items:center;gap:6px}
html[data-surface="staff"] .agenda h3 small{font-size:12px;font-weight:500;color:var(--muted);margin:0}
html[data-surface="staff"] .agenda .day-tag{font-style:normal;font-size:11px;font-weight:600;padding:1px 7px;border-radius:999px;background:#e8ede9;color:#4a5d54}
html[data-surface="staff"] .agenda .day-tag.is-today{background:var(--app-soft,#eef6f1);color:var(--primary)}
html[data-surface="staff"] .agenda-day-count{font-size:12px;font-weight:400;color:var(--muted);font-variant-numeric:tabular-nums}
