﻿/* ==========================================================================
   КТО КУДА — drag&drop доска и печатная форма месяца
   ========================================================================== */

.staff-toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.staff-toolbar__hint { margin-left: auto; color: var(--c-muted); font-size: .72rem; }
.staff-toolbar__hint i { color: var(--c-brand); margin-right: 4px; }
.staff-collection { max-width: 310px; }
.staff-month-nav { display: inline-flex; align-items: center; height: 38px; background: var(--c-surface); border: 1px solid var(--c-border); border-radius: 11px; overflow: hidden; box-shadow: var(--c-shadow-sm); }
.staff-month-nav button { width: 38px; height: 36px; border: none; border-right: 1px solid var(--c-border); background: transparent; color: var(--c-text-2); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; font-size: .72rem; transition: background .15s, color .15s; }
.staff-month-nav button:last-child { border-right: none; border-left: 1px solid var(--c-border); }
.staff-month-nav button:hover { background: var(--c-brand-soft); color: var(--c-brand); }
.staff-month-nav button:active { transform: scale(.96); }
.staff-month-nav__label { min-width: 138px; text-align: center; font-size: .82rem; font-weight: 750; color: var(--c-text); padding: 0 8px; letter-spacing: -.01em; }
.staff-workspace { display: grid; grid-template-columns: 248px minmax(0, 1fr); gap: 12px; align-items: start; }
.staff-pool { background: var(--c-surface); border: 1px solid var(--c-border); border-radius: 13px; padding: 8px; display: flex; flex-direction: column; gap: 7px; min-height: 260px; }
.staff-pool__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 6px; padding: 3px 4px 6px; border-bottom: 1px solid var(--c-border); }
.staff-pool__head b { display: block; font-size: .82rem; }
.staff-pool__head small { display: block; color: var(--c-muted); font-size: .64rem; margin-top: 1px; }
.staff-pool__head > span { background: var(--c-brand-soft); color: var(--c-brand); border-radius: 999px; padding: 2px 7px; font-size: .68rem; font-weight: 750; }
.staff-pool__search { position: relative; height: 32px; }
.staff-pool__search i { position: absolute; left: 9px; top: 9px; color: var(--c-muted); font-size: .7rem; }
.staff-pool__search input { width: 100%; height: 32px; padding: 0 8px 0 26px; border: 1px solid var(--c-border); border-radius: 8px; background: var(--c-surface); color: var(--c-text); font: inherit; font-size: .76rem; }
.staff-pool__list { display: flex; flex-direction: column; gap: 5px; max-height: 520px; overflow: auto; }
.staff-pool-card { display: flex; align-items: center; gap: 7px; padding: 6px 7px; border: 1px solid var(--c-border); border-radius: 9px; background: var(--c-surface); cursor: grab; transition: border-color .12s, box-shadow .12s, opacity .12s; }
.staff-pool-card:hover { border-color: color-mix(in srgb, var(--c-brand) 35%, var(--c-border)); box-shadow: var(--c-shadow-sm); }
.staff-pool-card:active { cursor: grabbing; }
.staff-pool-card.is-dragging { opacity: .45; }
.staff-pool-card__avatar { width: 28px; height: 28px; flex: 0 0 28px; border-radius: 8px; background: var(--c-brand-soft); color: var(--c-brand); display: flex; align-items: center; justify-content: center; font-size: .62rem; font-weight: 750; }
.staff-pool-card__body { flex: 1; min-width: 0; }
.staff-pool-card__body b { display: block; font-size: .74rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.staff-pool-card__body small { display: block; color: var(--c-muted); font-size: .62rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.staff-pool-card > i { color: var(--c-muted); font-size: .68rem; }
.staff-pool__empty { text-align: center; padding: 20px 8px; color: var(--c-muted); font-size: .72rem; }
.staff-pool__empty i { display: block; color: var(--c-success); font-size: 1.1rem; margin-bottom: 5px; }
.staff-trash { margin-top: auto; border: 1px dashed var(--c-border-strong); border-radius: 9px; padding: 8px; display: flex; align-items: center; gap: 6px; color: var(--c-muted); font-size: .66rem; line-height: 1.3; transition: background .12s, border-color .12s, color .12s; }
.staff-trash i { font-size: .8rem; }
.staff-trash.is-drag-over { border-color: var(--c-danger); color: var(--c-danger); background: rgba(220, 38, 38, .06); }

.staff-board-area { min-width: 0; }
.staff-board-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.staff-board-head b { font-size: .92rem; }
.staff-board-head span { color: var(--c-muted); font-size: .7rem; }
.staff-board-wrap { background: var(--c-surface); border: 1px solid var(--c-border); border-radius: 12px; overflow: auto; box-shadow: var(--c-shadow-sm); }
.staff-board { width: 100%; border-collapse: separate; border-spacing: 0; min-width: 900px; font-size: .74rem; }
.staff-board th { background: var(--c-surface-2); border-bottom: 1px solid var(--c-border); padding: 7px 5px; text-align: center; color: var(--c-muted); font-size: .62rem; text-transform: uppercase; letter-spacing: .04em; }
.staff-board th b { display: block; color: var(--c-text); font-size: .72rem; }
.staff-board th span { display: block; font-size: .6rem; text-transform: none; margin-top: 1px; }
.staff-board td { border-bottom: 1px solid var(--c-border); border-right: 1px solid var(--c-border); padding: 4px; vertical-align: top; }
.staff-board__name { position: sticky; left: 0; z-index: 2; background: var(--c-surface); text-align: left !important; min-width: 175px; border-right: 1px solid var(--c-border); }
.staff-board th.staff-board__name { background: var(--c-surface-2); z-index: 3; }
.staff-board-person { display: flex; align-items: center; gap: 6px; }
.staff-board-person > span { width: 27px; height: 27px; flex: 0 0 27px; border-radius: 7px; background: var(--c-brand-soft); color: var(--c-brand); display: flex; align-items: center; justify-content: center; font-size: .6rem; font-weight: 750; }
.staff-board-person b { display: block; font-size: .74rem; }
.staff-board-person small { display: block; color: var(--c-muted); font-size: .62rem; }
.staff-board__num, .staff-board__money { text-align: center; white-space: nowrap; font-weight: 700; }
.staff-board__money { text-align: right; padding-right: 8px !important; }
.staff-board tfoot td { background: var(--c-surface-2); font-weight: 800; border-top: 1px solid var(--c-border); }
.staff-board-cell { min-width: 94px; position: relative; transition: background .12s; }
.staff-board-cell.is-outside { background: var(--c-surface-2); opacity: .45; }
.staff-board-cell.is-outside:hover { opacity: .65; }
.staff-board-cell.is-drag-over { background: color-mix(in srgb, var(--c-brand) 13%, var(--c-surface)); outline: 2px dashed var(--c-brand); outline-offset: -3px; }
.staff-chip { display: block; width: 100%; text-align: left; border: 1px solid color-mix(in srgb, var(--part) 24%, var(--c-border)); border-left: 3px solid var(--part); background: color-mix(in srgb, var(--part) 7%, var(--c-surface)); border-radius: 6px; padding: 4px 5px; margin-bottom: 3px; cursor: grab; font: inherit; }
.staff-chip:hover { background: color-mix(in srgb, var(--part) 13%, var(--c-surface)); }
.staff-chip.is-dragging { opacity: .4; }
.staff-chip__part { display: block; font-size: .68rem; font-weight: 750; color: var(--part); }
.staff-chip__unit { display: block; font-size: .59rem; color: var(--c-muted); }
.staff-chip small { display: block; font-size: .58rem; color: var(--c-text-2); margin-top: 1px; }
.staff-cell-add { width: 100%; height: 20px; border: 1px dashed var(--c-border); border-radius: 5px; background: transparent; color: var(--c-muted); cursor: pointer; font-size: .6rem; opacity: 0; transition: opacity .12s; }
.staff-board-cell:hover .staff-cell-add { opacity: 1; }
.staff-cell-add:hover { color: var(--c-brand); border-color: var(--c-brand); }
.staff-board-empty { text-align: center; padding: 24px; color: var(--c-muted); font-size: .78rem; }
.staff-board-empty i { font-size: 1.4rem; opacity: .45; display: block; margin-bottom: 5px; }
.staff-board-hint { margin-top: 6px; color: var(--c-muted); font-size: .7rem; line-height: 1.4; }
.staff-board-hint i { color: var(--c-brand); margin-right: 3px; }

/* --------------------------------------------------- печатная форма (экран) */
.staff-report-preview { background: #e8edf4; border-radius: 12px; padding: 18px; overflow: auto; }
.staff-report-preview .sp-wrap { width: 100%; max-width: 1040px; margin: 0 auto; }
.staff-report-preview .sp-sheet { background: #fff; padding: 26px 30px; box-shadow: 0 12px 40px -24px rgba(15,23,42,.5); border-radius: 3px; }
.staff-report-preview .sp-head { display: flex; justify-content: space-between; gap: 14px; border-bottom: 2px solid #0f172a; padding-bottom: 10px; margin-bottom: 12px; }
.staff-report-preview .sp-kicker { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; color: #2563eb; margin-bottom: 4px; }
.staff-report-preview .sp-head h1 { margin: 0; font-size: 26px; line-height: 1.05; letter-spacing: -.03em; color: #0f172a; }
.staff-report-preview .sp-head h1 span { display: block; font-size: 11px; color: #64748b; font-weight: 600; letter-spacing: 0; margin-top: 3px; }
.staff-report-preview .sp-head__stats { display: flex; gap: 18px; text-align: right; }
.staff-report-preview .sp-head__stats b { display: block; font-size: 22px; color: #2563eb; line-height: 1; }
.staff-report-preview .sp-head__stats span { display: block; font-size: 8px; text-transform: uppercase; letter-spacing: .06em; color: #64748b; margin-top: 3px; }
.staff-report-preview .sp-table { width: 100%; border-collapse: collapse; font-size: 9px; margin-bottom: 10px; }
.staff-report-preview .sp-table th, .staff-report-preview .sp-table td { border: 1px solid #dbe1ec; padding: 4px 5px; text-align: center; }
.staff-report-preview .sp-table th { background: #0f172a; color: #fff; font-size: 8px; text-transform: uppercase; letter-spacing: .04em; padding: 5px 4px; }
.staff-report-preview .sp-table th.sp-corner { text-align: left; }
.staff-report-preview .sp-table td.sp-name { text-align: left; font-weight: 700; background: #fafbff; white-space: nowrap; }
.staff-report-preview .sp-table td.sp-name small { display: block; font-weight: 400; color: #64748b; font-size: 7px; }
.staff-report-preview .sp-table td.sp-total { font-weight: 800; }
.staff-report-preview .sp-table td.sp-zero { color: #cbd5e1; }
.staff-report-preview .sp-table tfoot td { background: #eef2f8; font-weight: 800; border-top: 2px solid #0f172a; }
.staff-report-preview .sp-table tbody tr:nth-child(even) td.sp-name { background: #f4f7fc; }
.staff-report-preview .sp-blocks { display: grid; grid-template-columns: 1fr 1fr 1.3fr; gap: 8px; margin-top: 8px; }
.staff-report-preview .sp-block { border: 1px solid #dbe1ec; border-radius: 8px; padding: 9px 10px; background: #fcfdff; min-width: 0; }
.staff-report-preview .sp-block h3 { display: flex; align-items: center; gap: 5px; margin: 0 0 6px; padding-bottom: 5px; border-bottom: 1.5px solid #0f172a; font-size: 9px; text-transform: uppercase; letter-spacing: .05em; }
.staff-report-preview .sp-block h3 i { color: #2563eb; font-size: 8px; }
.staff-report-preview .sp-line { padding: 2px 0; }
.staff-report-preview .sp-line-head { display: flex; justify-content: space-between; gap: 5px; align-items: baseline; }
.staff-report-preview .sp-line-head span { font-weight: 700; color: #334155; font-size: 8.5px; }
.staff-report-preview .sp-line-head b { font-size: 9px; color: #0f172a; }
.staff-report-preview .sp-line-body { font-size: 7.5px; color: #475569; line-height: 1.4; margin-top: 1px; }
.staff-report-preview .sp-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; margin-right: 4px; vertical-align: middle; }
.staff-report-preview .sp-sep { border-top: 1px solid #cbd5e1; margin: 3px 0; }
.staff-report-preview .sp-tag { display: inline-block; padding: 1px 5px; border-radius: 999px; color: #fff; font-size: 6.8px; font-weight: 700; margin: 1px 2px 1px 0; white-space: nowrap; }
.staff-report-preview .sp-role { padding: 3px 5px; margin: 3px 0; border-left: 4px solid var(--role); background: var(--role-bg); border-radius: 5px; }
.staff-report-preview .sp-role-head { display: flex; justify-content: space-between; align-items: baseline; padding-bottom: 2px; border-bottom: 1px solid rgba(15,23,42,.1); margin-bottom: 2px; }
.staff-report-preview .sp-role-head span { font-weight: 800; font-size: 8px; display: flex; align-items: center; }
.staff-report-preview .sp-role-head b { font-size: 8px; }
.staff-report-preview .sp-role-head b small { font-weight: 500; color: #64748b; font-size: 6.5px; margin-left: 2px; }
.staff-report-preview .sp-role-part .sp-line-head span { font-size: 7.5px; }
.staff-report-preview .sp-role-part .sp-line-head b { font-size: 7.5px; }
.staff-report-preview .sp-role-part .sp-line-body { font-size: 6.8px; }
.staff-report-preview .sp-muted { font-size: 7px; color: #94a3b8; }
.staff-report-preview .sp-empty { text-align: center !important; color: #64748b; font-style: italic; }
.staff-report-preview .sp-foot { display: flex; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 6px; border-top: 1px solid #e5e9f2; font-size: 6.5px; color: #94a3b8; }

@media (max-width: 1120px) {
  .staff-workspace { grid-template-columns: 1fr; }
  .staff-pool { flex-direction: row; flex-wrap: wrap; min-height: 0; align-items: flex-start; }
  .staff-pool__head { flex-basis: 100%; }
  .staff-pool__search { flex: 1 1 180px; }
  .staff-pool__list { flex: 1 1 300px; flex-direction: row; flex-wrap: wrap; max-height: 150px; }
  .staff-pool-card { flex: 1 1 190px; }
  .staff-trash { flex: 1 1 150px; margin-top: 0; }
  .staff-toolbar__hint { flex-basis: 100%; margin-left: 0; }
}
@media (max-width: 700px) {
  .staff-pool { flex-direction: column; }
  .staff-pool__list { flex-direction: column; }
  .staff-collection { max-width: 100%; width: 100%; }
  .staff-report-preview { padding: 8px; }
  .staff-report-preview .sp-sheet { padding: 12px; }
  .staff-report-preview .sp-blocks { grid-template-columns: 1fr; }
}




/* --- читаемость и воздух между блоками --- */
.staff-toolbar { margin-bottom: 2px; }
.staff-stats { margin: 8px 0 32px; }
.staff-workspace { margin-top: 14px; }
.staff-board-head { padding: 4px 2px 8px; }
.staff-board-head b { font-size: 1rem; }
.staff-board-head span { font-size: .76rem; }
.staff-toolbar .emp-btn { font-size: .84rem; }
.staff-toolbar__hint { font-size: .78rem; }
.staff-month-nav__label { font-size: .86rem; }
.staff-pool__head b { font-size: .88rem; }
.staff-pool__head small { font-size: .7rem; }
.staff-pool-card__body b { font-size: .8rem; }
.staff-pool-card__body small { font-size: .68rem; }
.staff-pool__search input { font-size: .82rem; }
.staff-trash { font-size: .72rem; }
.staff-board { font-size: .86rem; }
.staff-board th { font-size: .72rem; }
.staff-board th b { font-size: .78rem; }
.staff-board th span { font-size: .66rem; }
.staff-board-person b { font-size: .8rem; }
.staff-board-person small { font-size: .68rem; }
.staff-chip__part { font-size: .78rem; }
.staff-chip__unit { font-size: .69rem; }
.staff-chip small { font-size: .64rem; }
.staff-board-hint { font-size: .76rem; line-height: 1.5; }
.staff-week-head { cursor: pointer; transition: background .15s, color .15s; }
.staff-week-head:hover { background: var(--c-brand-soft); color: var(--c-brand); }
.staff-week-head.is-selected { background: var(--c-brand); color: #fff; }
.staff-week-head.is-selected b, .staff-week-head.is-selected span { color: #fff; }
.staff-week-head.is-selected::after { content: 'выбрана'; display: block; font-size: .55rem; text-transform: uppercase; letter-spacing: .05em; opacity: .8; margin-top: 2px; }

/* --- модалка копирования --- */
.copy-week-dialog { width: min(620px, 96vw) !important; max-width: 620px !important; }
.copy-week-preview { display: flex; align-items: flex-start; gap: 8px; padding: 10px 12px; border-radius: 9px; background: var(--c-brand-soft); color: var(--c-text-2); font-size: .82rem; line-height: 1.45; }
.copy-week-preview i { color: var(--c-brand); margin-top: 2px; }
.copy-week-preview b { color: var(--c-text); }
.copy-week-preview.is-warning { background: rgba(217, 119, 6, .1); color: #b45309; }
.copy-week-preview.is-warning i { color: var(--c-warning); }

/* --- отчёт-страница --- */
.staff-report-page { display: flex; flex-direction: column; gap: 13px; }
.staff-report-hero { display: flex; justify-content: space-between; gap: 16px; padding: 18px 20px; border-radius: 16px; background: linear-gradient(135deg, var(--c-brand), var(--c-brand-2)); color: #fff; box-shadow: 0 14px 34px -22px rgba(37, 99, 235, .8); }
.staff-report-kicker { font-size: .68rem; font-weight: 750; text-transform: uppercase; letter-spacing: .1em; opacity: .75; }
.staff-report-hero h3 { margin: 4px 0 2px; font-size: 1.55rem; letter-spacing: -.03em; }
.staff-report-hero h3 small { font-size: .9rem; font-weight: 500; opacity: .8; margin-left: 6px; }
.staff-report-hero p { margin: 0; font-size: .84rem; opacity: .8; }
.staff-report-hero__stats { display: flex; gap: 20px; text-align: right; align-items: center; }
.staff-report-hero__stats b { display: block; font-size: 1.35rem; line-height: 1; }
.staff-report-hero__stats span { display: block; font-size: .66rem; text-transform: uppercase; letter-spacing: .05em; opacity: .75; margin-top: 4px; }
.staff-report-card { background: var(--c-surface); border: 1px solid var(--c-border); border-radius: 14px; box-shadow: var(--c-shadow-sm); overflow: hidden; }
.staff-report-card__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--c-border); }
.staff-report-card__head b { display: block; font-size: .92rem; }
.staff-report-card__head small { display: block; color: var(--c-muted); font-size: .72rem; margin-top: 2px; }
.staff-report-card__head > span { color: var(--c-muted); font-size: .72rem; }
.staff-report-matrix-wrap { overflow: auto; }
.staff-report-matrix { width: 100%; border-collapse: collapse; min-width: 620px; font-size: .8rem; }
.staff-report-matrix th { background: var(--c-surface-2); border-bottom: 1px solid var(--c-border); border-right: 1px solid var(--c-border); padding: 8px; text-align: center; font-size: .66rem; text-transform: uppercase; letter-spacing: .04em; color: var(--c-muted); }
.staff-report-matrix th:first-child { text-align: left; min-width: 190px; }
.staff-report-matrix th:not(:first-child) { color: var(--part, var(--c-text-2)); background: color-mix(in srgb, var(--part, #2563eb) 8%, var(--c-surface-2)); }
.staff-report-matrix td { border-bottom: 1px solid var(--c-border); border-right: 1px solid var(--c-border); padding: 7px 8px; text-align: center; }
.staff-report-matrix td:first-child { text-align: left; }
.staff-report-matrix td:first-child b { display: block; font-size: .8rem; }
.staff-report-matrix td:first-child small { display: block; color: var(--c-muted); font-size: .68rem; }
.staff-report-matrix td.is-filled { font-weight: 750; color: var(--part); background: color-mix(in srgb, var(--part) 8%, transparent); }
.staff-report-matrix td.is-total { font-weight: 800; }
.staff-report-matrix tfoot td { background: var(--c-surface-2); font-weight: 800; border-top: 1px solid var(--c-border); }
.staff-report-columns { display: grid; grid-template-columns: 1fr 1fr 1.2fr; gap: 10px; align-items: start; }
.staff-report-list { padding: 10px 14px 13px; display: flex; flex-direction: column; gap: 8px; max-height: 440px; overflow: auto; }
.staff-report-line { padding-bottom: 7px; border-bottom: 1px solid var(--c-border); }
.staff-report-line:last-child { border-bottom: none; padding-bottom: 0; }
.staff-report-line__head { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.staff-report-line__head span { font-size: .8rem; font-weight: 700; }
.staff-report-line__head b { font-size: .84rem; }
.staff-report-line__body { margin-top: 3px; color: var(--c-muted); font-size: .72rem; line-height: 1.5; }
.staff-report-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 5px; vertical-align: middle; }
.staff-report-tag { display: inline-block; color: #fff; border-radius: 999px; padding: 1px 6px; font-size: .65rem; font-weight: 700; margin: 1px 3px 1px 0; }
.staff-report-role { padding: 8px 9px; border-left: 4px solid var(--role); border-radius: 8px; background: color-mix(in srgb, var(--role) 7%, var(--c-surface)); margin-bottom: 6px; }
.staff-report-role:last-child { margin-bottom: 0; }
.staff-report-role__head { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; padding-bottom: 4px; border-bottom: 1px solid color-mix(in srgb, var(--role) 20%, transparent); margin-bottom: 4px; }
.staff-report-role__head span { font-size: .76rem; font-weight: 750; }
.staff-report-role__head b { font-size: .78rem; }
.staff-report-role__head small { font-size: .62rem; color: var(--c-muted); font-weight: 500; }
.staff-report-role__part { display: flex; gap: 6px; font-size: .7rem; line-height: 1.45; padding: 2px 0; }
.staff-report-role__part > span { min-width: 72px; font-weight: 650; color: var(--c-text-2); }
.staff-report-role__part > div { color: var(--c-muted); }
.staff-report-muted { color: var(--c-muted); font-size: .78rem; }

@media (max-width: 1100px) {
  .staff-report-columns { grid-template-columns: 1fr; }
  .staff-report-hero { flex-direction: column; }
  .staff-report-hero__stats { text-align: left; }
}
@media (max-width: 700px) {
  .staff-report-hero { padding: 14px; }
  .staff-report-hero h3 { font-size: 1.25rem; }
  .staff-report-hero__stats { gap: 14px; }
}


