/* GURU PVZ — «График смен»: замены, ознакомление, проверка, копирование (js/team-schedule.js) и состояние сотрудников (js/team-staff.js).
   Телефон — до 640 px; касание — не меньше 44 px; состояние — словом, не только цветом. */
.tsw-tools{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 10px;}
.tsw-tools button.btn,.tsw-tools button.btn.secondary.sm{min-height:44px;}
.tsw-mgr h4{margin:10px 0 6px;font-size:14px;}
.tsw-list{list-style:none;margin:0;padding:0;}
.tsw-list > li{padding:8px 0;border-top:1px solid var(--border);display:flex;flex-wrap:wrap;gap:6px 12px;align-items:center;justify-content:space-between;}
.tsw-list > li:first-child{border-top:0;}
.tsw-list > li > div:first-child{min-width:0;flex:1 1 260px;}
.tsw-list b{font-weight:600;overflow-wrap:anywhere;}
.tsw-list small,.tsw-offer small,.tsw-shift small,.tsw-cand small{display:block;color:var(--muted);font-size:13px;line-height:1.4;margin-top:2px;}
.tsw-acts{display:flex;flex-wrap:wrap;gap:6px;}
.tsw-acts button.btn,.tsw-acts button.btn.sm,.tsw-acts button.btn.secondary.sm{min-height:44px;}
.tsw-none{margin:4px 0;}
.tsw-acks{margin:10px 0 0;font-size:14px;line-height:1.5;}
.tsw-more{margin:8px 0;}
.tsw-more summary{cursor:pointer;min-height:44px;display:flex;align-items:center;font-weight:600;}
.tsw-st{display:inline-block;font-size:12px;font-weight:600;border-radius:999px;padding:2px 8px;border:1px solid var(--border);color:var(--text);background:var(--bg);}
.tsw-st-ok{border-color:#1E8E3E;color:#146C2E;background:rgba(30,142,62,.08);}
.tsw-st-warn{border-color:#B26A00;color:#7A4A00;background:rgba(178,106,0,.08);}
.tsw-st-wait{border-color:var(--accent);color:var(--accent-ink,#0B44D6);background:var(--accent-soft,rgba(21,87,255,.08));}
:root[data-theme="dark"] .tsw-st-ok{color:#8FD9A8;border-color:#5CBF7F;background:rgba(92,191,127,.14);}
:root[data-theme="dark"] .tsw-st-warn{color:#FFCF85;border-color:#E0A040;background:rgba(224,160,64,.14);}
:root[data-theme="dark"] .tsw-st-wait{color:#B3CAFF;border-color:#8FB1FF;background:rgba(76,125,255,.18);}
.tsw-msg{margin:6px 0;font-size:14px;}
.tsw-msg[data-kind="ok"]{color:#146C2E;}
.tsw-msg[data-kind="err"]{color:var(--danger,#B3261E);}
:root[data-theme="dark"] .tsw-msg[data-kind="ok"]{color:#8FD9A8;}
#shiftTable th.tsw-issue{box-shadow:inset 0 -3px 0 #B26A00;}
.tsw-mark{display:inline-flex;align-items:center;justify-content:center;width:18px;height:18px;margin-left:4px;border-radius:50%;background:#B26A00;color:#fff;font-size:12px;font-weight:700;vertical-align:middle;}
.tsw-check{margin:0;padding-left:18px;}
.tsw-check > li{margin:0 0 10px;}
.tsw-check ul{margin:4px 0 0;padding-left:18px;}
.tsw-check li li{margin:2px 0;font-size:14px;}
.tsw-intro{margin:0 0 12px;font-size:14px;line-height:1.45;}
.tsw-cands{border:0;padding:0;margin:0 0 10px;min-width:0;}
.tsw-cands legend{font-size:13px;font-weight:600;color:var(--muted);margin-bottom:6px;padding:0;}
.tsw-cand{display:flex;gap:10px;align-items:center;min-height:44px;padding:6px 10px;border:1px solid var(--border);border-radius:12px;margin:0 0 6px;cursor:pointer;background:var(--card);}
.tsw-cand.off{opacity:.65;cursor:not-allowed;background:var(--bg);}
.tsw-cand input{width:22px;height:22px;flex:0 0 22px;margin:0;accent-color:var(--accent);}
.tsw-dst{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin:0 0 10px;}
.tsw-dst button.btn,.tsw-dst button.btn.secondary.sm{min-width:44px;min-height:44px;}
.tsw-skip li{color:var(--muted);}
.tsw-hist small{flex-basis:100%;}
/* сотрудник: «Мой график» */
.tsw-ack{display:flex;flex-wrap:wrap;align-items:center;gap:8px 12px;margin-top:8px;}
.tsw-ack .btn{min-height:44px;}
.tsw-offers h3,.tsw-week h3{margin:0 0 8px;}
.tsw-offer{display:flex;flex-wrap:wrap;gap:8px 12px;align-items:center;justify-content:space-between;padding:10px 0;border-top:1px solid var(--border);}
.tsw-offer:first-of-type{border-top:0;}
.tsw-offer > div:first-child{flex:1 1 260px;min-width:0;}
.tsw-days{list-style:none;margin:0;padding:0;}
.tsw-day{display:grid;grid-template-columns:140px minmax(0,1fr);gap:6px 12px;padding:10px 0;border-top:1px solid var(--border);}
.tsw-day:first-child{border-top:0;}
.tsw-day.tsw-today .tsw-dl b{color:var(--accent);}
.tsw-dl small{display:block;color:var(--muted);font-size:13px;}
.tsw-dc{min-width:0;display:flex;flex-direction:column;gap:6px;}
.tsw-shift{display:flex;flex-wrap:wrap;gap:6px 12px;align-items:center;justify-content:space-between;}
.tsw-shift > div{min-width:0;flex:1 1 200px;}
.tsw-shift button.btn,.tsw-shift button.btn.secondary.sm{min-height:44px;}
.tsw-sub{font-size:13px;}
.tsw-tip{margin:10px 0 0;font-size:13px;}
@media (max-width:640px){
  .tsw-day{grid-template-columns:minmax(0,1fr);}
  .tsw-tools .btn{flex:1 1 calc(50% - 8px);}
  .tsw-acts{width:100%;}
  .tsw-acts .btn{flex:1 1 auto;}
  .tsw-ack .btn{width:100%;}
}
/* «Сотрудники»: состояние и вкладки карточки (js/team-staff.js) */
.emp-stage{margin-left:6px;font-size:12px;}
.emp-stage-trainee{border-color:#7B4FD6;color:#5B2FB6;background:rgba(123,79,214,.08);}
.emp-stage-temp{border-color:#B26A00;color:#7A4A00;background:rgba(178,106,0,.08);}
:root[data-theme="dark"] .emp-stage-trainee{color:#CDB6FF;border-color:#A98BF0;background:rgba(169,139,240,.16);}
:root[data-theme="dark"] .emp-stage-temp{color:#FFCF85;border-color:#E0A040;background:rgba(224,160,64,.14);}
.emp-tabs{display:flex;flex-wrap:wrap;gap:4px;margin:0 0 14px;}
.emp-tabs button{min-height:44px;flex:1 1 auto;}
.emp-pane[hidden]{display:none!important;}
.emp-stage-box{margin:0 0 10px;}
.emp-stage-acts{display:flex;flex-wrap:wrap;gap:8px;margin:8px 0;}
.emp-stage-acts button.btn,.emp-stage-acts button.btn.secondary.sm{min-height:44px;}
.emp-stage-form fieldset{border:0;padding:0;margin:0 0 10px;min-width:0;}
.emp-stage-form legend{font-size:13px;font-weight:600;color:var(--muted);margin-bottom:6px;padding:0;}
.emp-stage-opt{display:flex;gap:10px;align-items:center;min-height:44px;padding:6px 10px;border:1px solid var(--border);border-radius:12px;margin:0 0 6px;cursor:pointer;}
.emp-stage-opt input{width:22px;height:22px;flex:0 0 22px;margin:0;accent-color:var(--accent);}
.emp-stage-opt small{display:block;color:var(--muted);font-size:13px;}
.emp-stage-form .fld-row{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:10px;}
.emp-stage-form [data-for][hidden]{display:none;}
.emp-stage-pts .chk{display:flex;align-items:center;gap:8px;min-height:44px;}
.emp-hist{list-style:none;margin:0;padding:0;}
.emp-hist li{padding:8px 0;border-top:1px solid var(--border);}
.emp-hist li:first-child{border-top:0;}
.emp-hist small{display:block;color:var(--muted);font-size:13px;margin-top:2px;}
@media (max-width:640px){ .emp-tabs button{flex:1 1 calc(33% - 4px);font-size:13px;padding-left:6px;padding-right:6px;} }
.emp-stage-box .emp-value .st{align-self:flex-start;}
.emp-row .emp-stage{display:inline-block;margin-top:2px;}
/* «Табель»: три вида и на компьютере, расхождения с графиком, кто и когда исправил (js/team-timesheet.js, js/ux-team.js) */
@media (min-width:641px){
  .ux-ts-mob{display:block;grid-column:1/-1;margin:0 0 12px;padding:12px;border:1px solid var(--border);border-radius:var(--r,12px);background:var(--card,#fff);}
  .ts-all:not([data-view="table"]) #tsTable,.ts-all:not([data-view="table"]) .ts-legend{display:none;}
  .ux-ts-mob .ux-ts-modes{max-width:560px;}
  .ux-ts-mob .ux-ts-list{display:grid;grid-template-columns:repeat(auto-fill,minmax(340px,1fr));gap:8px;}
  .ux-ts-mob .ux-ts-daynav{max-width:560px;}
}
.ux-ts-modes button{min-height:44px;}
@media(max-width:640px){.ux-ts-modes{display:grid;grid-template-columns:1fr 1fr;}}
.ts-point-group{margin:16px 0;}
.ts-point-group h3{margin:0;padding:8px 12px;background:var(--bg);border-radius:8px;font-size:1rem;overflow-wrap:anywhere;}
.ts-point-person{border-bottom:1px solid var(--border);padding:0 12px;}
.ts-point-person summary{cursor:pointer;min-height:44px;padding:10px 0;box-sizing:border-box;overflow-wrap:anywhere;}
.ts-point-person summary span{display:inline-block;margin-left:10px;color:var(--muted);font-size:.9em;}
.ts-point-person ul{margin:0 0 12px;padding-left:24px;}
.ts-diff{grid-column:1/-1;margin:8px 0 0;border:1px solid var(--border);border-radius:12px;padding:0 12px;background:var(--card,#fff);}
.ts-diff summary{cursor:pointer;min-height:44px;display:flex;align-items:center;gap:6px;flex-wrap:wrap;}
.ts-diff-list{list-style:none;margin:0 0 6px;padding:0;max-height:360px;overflow:auto;}
.ts-diff-row{display:block;width:100%;text-align:left;min-height:44px;padding:8px 6px;border:0;border-top:1px solid var(--border);background:none;color:var(--text);font:inherit;cursor:pointer;}
.ts-diff-row:hover{background:var(--bg);}
.ts-diff-nofact,.ts-diff-absent{color:var(--amber-text,#8F4A00);}
:root[data-theme="dark"] .ts-diff-nofact,:root[data-theme="dark"] .ts-diff-absent{color:#f0a030;}
.ts-why{margin-top:2px;}
.tsw-ackc{display:flex;flex-direction:column;gap:4px;flex:1 1 280px;min-width:0;font-size:13px;color:var(--muted);}
.tsw-ackc input{min-height:44px;width:100%;}
/* «График за месяц» */
.tsw-month{border-collapse:collapse;font-size:13px;}
.tsw-month th,.tsw-month td{border:1px solid var(--border);padding:2px 4px;text-align:center;min-width:30px;}
.tsw-month tbody th,.tsw-month thead th:first-child{text-align:left;white-space:nowrap;position:sticky;left:0;background:var(--card,#fff);z-index:1;}
.tsw-month .tsw-we{background:var(--bg);}
.tsw-month .tsw-td{box-shadow:inset 0 -3px 0 var(--accent);}
.tsw-md{display:flex;flex-direction:column;align-items:center;min-width:32px;min-height:44px;border:0;background:none;color:var(--text);font:inherit;font-weight:600;cursor:pointer;padding:2px;}
.tsw-md small{font-weight:400;color:var(--muted);font-size:11px;}
.tsw-md .tsw-mark{margin:2px 0 0;width:16px;height:16px;font-size:11px;}
.tsw-on{color:var(--accent);font-weight:700;}
.tsw-zero{color:var(--amber-text,#8F4A00);font-weight:600;}
