/* 17.10.2026: справочник сотрудников по предприятиям (public/staff.js) */
.staff-dir { margin: 6px 0 22px; }
.staff-dir .sd-head h3 { margin: 0 0 2px; }
.sd-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.sd-tab { border: 1px solid var(--border); background: var(--surface); color: var(--text); border-radius: 999px; padding: 5px 12px; font-size: 13px; cursor: pointer; }
.sd-tab.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.sd-tab .sd-n { opacity: .75; margin-left: 2px; }
.sd-scroll { overflow-x: auto; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
.sd-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.sd-table th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--border); background: var(--bg); }
.sd-table td { padding: 8px 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
.sd-table tr:last-child td { border-bottom: 0; }
.sd-name { font-weight: 600; }
.sd-nowrap { white-space: nowrap; }
.sd-mail { word-break: break-all; }
@media (max-width: 640px) { .sd-table th:nth-child(5), .sd-table td:nth-child(5) { display: none; } }
.sd-table a { color: var(--primary-dark); text-decoration: none; }
.sd-table a:hover { text-decoration: underline; }

/* 2026-10-19k (№261019-АИ-3): таблица сотрудников → карточка в боковой панели (public/staff-card.js) */
.team-head-acts { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.team-head-acts #team-search { min-width: 200px; }
.sd-table tr.sd-open { cursor: pointer; }
.sd-table tr.sd-open:hover td, .sd-table tr.sd-open:focus-visible td { background: rgba(23, 105, 170, .07); }
.team-plan-details { margin: 14px 0; }
.team-plan-details > summary { cursor: pointer; font-weight: 600; padding: 6px 0; }
.staff-drawer { position: fixed; inset: 0; z-index: 2100; background: rgba(15, 20, 30, .35); display: flex; justify-content: flex-end; }
.staff-drawer[hidden] { display: none; }
.sdw-panel { width: min(760px, 100vw); height: 100%; overflow-y: auto; background: var(--surface); color: var(--text); box-shadow: -8px 0 30px rgba(0, 0, 0, .2); padding: 12px 16px 24px; box-sizing: border-box; }
.sdw-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; position: sticky; top: -12px; background: var(--surface); padding: 8px 0; z-index: 2; border-bottom: 1px solid var(--border); margin-bottom: 10px; }
.sdw-title { font-size: 17px; }
.sdw-body .team-card { border: none; box-shadow: none; }
.sdw-body .team-card .tc-row { display: none; }
.sdw-body .team-card .tc-body { display: block; }
@media (max-width: 600px) { .sdw-panel { padding: 8px 10px 20px; } .sdw-close { min-height: 40px; min-width: 40px; } }

/* Д1 (2026-10-19n): должности и допуск — public/staff-positions.js */
.sd-kind { display: inline-block; font-size: 11px; padding: 0 6px; border-radius: 8px; background: rgba(23, 105, 170, .1); color: var(--primary, #1769aa); white-space: nowrap; }
.sd-grey { color: var(--muted, #6b7280); }
.sp-switch { display: flex; gap: 4px; margin: 4px 0 12px; border-bottom: 1px solid var(--border, #e2e5ea); }
.sp-switch[hidden] { display: none; }
.positions-view[hidden], .sp-card[hidden] { display: none; }
.sp-card { margin-bottom: 14px; }
.sp-sec { margin: 8px 0 14px; }
.sp-sec h4 { margin: 0 0 6px; }
.sp-scroll { overflow-x: auto; max-width: 100%; }
.sp-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.sp-table th, .sp-table td { text-align: left; padding: 5px 7px; border-bottom: 1px solid var(--border, #e2e5ea); vertical-align: top; }
.sp-table tr.sp-dept td { background: var(--bg, #f4f6f9); font-weight: 600; }
.sp-table tr.sp-pending td { background: rgba(245, 158, 11, .08); }
.sp-table .sp-over { color: #b45309; font-weight: 600; }
.sp-acts { white-space: nowrap; }
.sp-acts .small { margin: 0 2px 2px 0; }
.sp-badge { display: inline-block; font-size: 11px; padding: 0 6px; border-radius: 8px; background: #fef3c7; color: #92400e; white-space: nowrap; }
.sp-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 8px 12px; align-items: end; margin: 8px 0; }
.sp-form label { display: flex; flex-direction: column; gap: 3px; font-size: 13px; min-width: 0; }
.sp-form select, .sp-form input { width: 100%; box-sizing: border-box; min-width: 0; }
.sp-form .sp-wide { grid-column: 1 / -1; }
.sp-rights { list-style: none; padding: 0; margin: 4px 0; display: flex; flex-direction: column; gap: 3px; font-size: 13px; }
.sp-rights li { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
.sp-rights li.sp-minus s { opacity: .7; }
.sp-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; margin: 8px 0; }
.sp-org { margin: 14px 0; }
.sp-org h3 { margin: 0 0 6px; font-size: 16px; }
.sp-un { columns: 2 260px; padding-left: 18px; font-size: 13px; }
.sp-modal-box { width: min(760px, calc(100vw - 24px)); max-height: calc(100vh - 40px); overflow-y: auto; }
.sp-rights-edit { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 10px; margin: 10px 0; }
.sp-rights-edit fieldset { border: 1px solid var(--border, #e2e5ea); border-radius: 8px; padding: 6px 10px; min-width: 0; }
.sp-rights-edit legend { font-weight: 600; font-size: 13px; }
.sp-rights-edit .pref-opt { font-size: 13px; }
html[data-theme="dark"] .sp-badge { background: #78350f; color: #fde68a; }
html[data-theme="dark"] .sp-table tr.sp-dept td { background: #111827; }
.sp-card .sp-acts { white-space: normal; min-width: 110px; }
.sp-card .sp-acts .small { display: block; width: 100%; margin: 0 0 4px; }
.sp-rights .link-small { background: none; border: 0; padding: 0 2px; min-height: 0; font-size: 12px; color: var(--muted, #6b7280); text-decoration: underline; cursor: pointer; }
.sp-rights .link-small:hover { color: var(--primary, #1769aa); }
.sp-card .sp-table td:nth-child(2) { min-width: 120px; }
@media (max-width: 600px) { .sp-rights .link-small { min-height: 32px; } }
