.workflow-page { max-width: 960px; padding: clamp(16px, 3vw, 36px); margin: 0 auto; color: var(--ink); }
.sidebar-account { display: flex; align-items: center; gap: 8px; padding: 8px; border-bottom: 1px solid var(--admin-border); }
.sidebar-account > div { flex: 1; min-width: 0; display: grid; gap: 4px; }
.sidebar-account strong { font-size: 14px; line-height: 1.4; font-weight: 600; overflow-wrap: anywhere; }
.sidebar-account small { font-size: 12px; color: var(--admin-muted); }
.admin-logout-button { min-height: 44px; flex: 0 0 auto; padding: 8px 12px; border: 1px solid var(--admin-border); border-radius: 10px; background: var(--admin-surface); color: var(--ink); font: inherit; font-size: 14px; cursor: pointer; }
.admin-logout-button:hover { background: var(--admin-soft); border-color: var(--admin-muted); }
.admin-logout-button:focus-visible { outline: 2px solid var(--brand-red); outline-offset: 3px; }
.teacher-account-actions { display: flex; flex: 0 0 auto; gap: 8px; align-items: center; }
.crm-login-screen .access-panel { width: min(100%, 540px); margin-inline: auto; }
.crm-login-screen .title { font-size: clamp(26px, 4vw, 32px); line-height: 1.2; }
.crm-login-screen .lead { font-size: 16px; line-height: 1.55; }
.crm-account-switch { display: grid; gap: 12px; margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--admin-border); }
.crm-account-switch p { margin: 0; font-size: 14px; line-height: 1.5; color: var(--admin-muted); }
.crm-account-switch .btn { min-height: 44px; white-space: normal; }
@media (max-width: 720px) {
  .teacher-schedule .teacher-page-heading { flex-wrap: wrap; }
  .teacher-account-actions { width: 100%; justify-content: flex-end; }
  .crm-login-screen { padding: 24px 16px; }
  .crm-login-screen .access-panel { padding: 24px 20px; }
}
/* Teacher calendar + individual access extend the existing operational UI. */
.teacher-schedule { max-width: 1180px; padding-block: 32px; }
.teacher-page-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 28px; }
.teacher-schedule .teacher-page-heading h1 { font-size: 30px; line-height: 1.2; font-weight: 700; letter-spacing: -.025em; margin: 0; }
.teacher-page-heading p { margin: 8px 0 0; font-size: 16px; }
.teacher-page-heading p span { color: var(--admin-muted); white-space: nowrap; }
.teacher-schedule .teacher-page-heading .btn { width: auto; min-height: 44px; font-size: 14px; flex: 0 0 auto; }
.teacher-calendar-layout { display: grid; grid-template-columns: 360px minmax(0, 1fr); background: var(--admin-surface); border: 1px solid var(--admin-border); border-radius: 16px; overflow: clip; }
.teacher-calendar-panel { padding: 24px 20px; border-right: 1px solid var(--admin-border); align-self: start; }
.teacher-month-heading, .teacher-day-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.teacher-schedule .teacher-month-heading h2 { margin: 0; font-size: 19px; line-height: 1.4; font-weight: 600; text-transform: capitalize; }
.teacher-month-heading > div { display: flex; }
.teacher-month-heading .icon-btn { width: 44px; height: 44px; min-height: 44px; padding: 10px; background: transparent; border: 0; color: var(--ink); }
.teacher-month-heading .icon-btn svg { width: 20px; height: 20px; }
.teacher-quick-days { display: flex; gap: 8px; margin: 16px 0; }
.teacher-quick-days button { min-height: 44px; padding: 8px 16px; border: 1px solid var(--admin-border); border-radius: 12px; background: transparent; font-size: 14px; color: var(--ink); }
.teacher-quick-days button[aria-pressed=true] { color: var(--brand-red-dark); border-color: var(--brand-red); background: var(--admin-active); }
.teacher-calendar-weekdays, .teacher-calendar-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 2px; }
.teacher-calendar-weekdays { margin-bottom: 8px; text-align: center; font-size: 12px; line-height: 24px; color: var(--admin-muted); }
.teacher-calendar-day { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; min-width: 0; min-height: 48px; padding: 4px 0; border: 1px solid transparent; border-radius: 12px; background: transparent; color: var(--ink); font-size: 15px; font-variant-numeric: tabular-nums; cursor: pointer; }
.teacher-calendar-day > small { font-size: 10px; font-weight: 600; line-height: 12px; color: var(--brand-red-dark); }
.teacher-calendar-day > .no-lessons { visibility: hidden; }
.teacher-calendar-day.is-outside { color: var(--admin-muted); }
.teacher-calendar-day.is-today { border-color: var(--brand-red); }
.teacher-calendar-day[aria-pressed=true] { background: var(--brand-red); color: white; border-color: var(--brand-red); }
.teacher-calendar-day[aria-pressed=true] > small { color: white; }
.teacher-calendar-day:hover:not([aria-pressed=true]), .teacher-month-heading .icon-btn:hover, .teacher-quick-days button:hover { background: var(--admin-soft); }
.teacher-calendar-legend { margin: 16px 0 0; font-size: 12px; color: var(--admin-muted); }
.teacher-day-panel { padding: 28px; min-width: 0; }
.teacher-day-heading { padding-bottom: 20px; border-bottom: 1px solid var(--admin-border); }
.teacher-schedule .teacher-day-heading h2 { font-size: 28px; font-weight: 600; margin: 4px 0 0; line-height: 1.25; letter-spacing: -.025em; }
.teacher-day-heading p { font-size: 14px; color: var(--admin-muted); margin: 0; text-transform: capitalize; }
.teacher-day-heading > span { font-size: 14px; color: var(--admin-muted); white-space: nowrap; }
.teacher-lesson { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 20px; padding: 24px 0; border-bottom: 1px solid var(--admin-border); }
.teacher-lesson:last-child { border-bottom: 0; }
.teacher-lesson-time { display: flex; flex-direction: column; gap: 6px; font-variant-numeric: tabular-nums; }
.teacher-lesson-time strong { font-size: 19px; font-weight: 600; }
.teacher-lesson-time small { color: var(--admin-muted); font-size: 14px; }
.teacher-lesson-content { min-width: 0; overflow-wrap: anywhere; }
.teacher-lesson h3 { font-size: 18px; font-weight: 600; line-height: 1.4; margin: 0; }
.teacher-lesson p { margin: 6px 0 0; font-size: 14px; color: var(--admin-muted); }
.teacher-lesson .teacher-lesson-students { margin-top: 12px; color: var(--ink); font-size: 16px; }
.teacher-lesson details { margin-top: 8px; }
.teacher-lesson summary { padding: 12px 0; min-height: 44px; font-size: 14px; color: var(--brand-red-dark); cursor: pointer; }
.teacher-lesson dl { margin: 4px 0 0; }
.teacher-lesson dl div { display: grid; grid-template-columns: 70px minmax(0, 1fr); gap: 12px; font-size: 14px; line-height: 1.5; margin-bottom: 12px; }
.teacher-lesson dt { color: var(--admin-muted); }
.teacher-lesson dd { margin: 0; }
.teacher-empty-day { padding: 44px 0; max-width: 380px; }
.teacher-empty-day > span svg { width: 28px; height: 28px; color: var(--admin-muted); }
.teacher-empty-day h3 { margin: 16px 0 8px; font-size: 20px; font-weight: 600; }
.teacher-empty-day p { color: var(--admin-muted); font-size: 15px; }
.teacher-empty-day .btn { min-height: 44px; white-space: normal; font-size: 14px; margin-top: 8px; }
.teacher-schedule-footer { margin-top: 20px; color: var(--admin-muted); font-size: 13px; line-height: 1.5; }
.teacher-undated { border-top: 1px solid var(--admin-border); padding: 16px 0; font-size: 14px; }
.teacher-undated summary { cursor: pointer; min-height: 44px; }
.staff-permissions { grid-column: 1 / -1; border: 0; padding: 0; margin: 12px 0 0; min-width: 0; }
.staff-permissions legend { padding: 0; font-size: 20px; line-height: 1.4; font-weight: 600; }
.permission-intro { display: flex; justify-content: space-between; gap: 20px; align-items: start; margin-top: 8px; }
.permission-intro p { margin: 0; font-size: 14px; color: var(--admin-muted); }
.permission-intro .btn { min-height: 44px; flex-shrink: 0; white-space: normal; font-size: 13px; }
.permission-summary { margin: 16px 0 0; font-size: 13px; color: var(--admin-muted); }
.permission-group h3 { margin: 24px 0 12px; font-size: 16px; line-height: 1.5; font-weight: 600; }
.permission-table-head, .permission-row { display: grid; grid-template-columns: minmax(0, 1fr) 100px 100px; gap: 20px; align-items: center; }
.permission-table-head { font-size: 12px; color: var(--admin-muted); padding: 10px 0; border-bottom: 1px solid var(--admin-border); }
.permission-table-head span:not(:first-child) { text-align: center; }
.permission-row { padding: 12px 0; border-bottom: 1px solid var(--admin-border); }
.permission-row strong { display: block; font-size: 15px; font-weight: 600; }
.permission-row small { display: block; margin-top: 4px; font-size: 13px; color: var(--admin-muted); font-weight: 400; line-height: 1.5; }
.workflow-form .permission-option { display: flex; align-items: center; justify-content: center; min-height: 44px; gap: 8px; cursor: pointer; }
.permission-option input { accent-color: var(--brand-red); width: 20px; height: 20px; margin: 0; }
.permission-option span { display: none; }
.permission-unavailable { font-size: 12px; text-align: center; color: var(--admin-muted); }
.permission-owner-note { margin-top: 24px; font-size: 13px; color: var(--admin-muted); }
.staff-readonly-notice { padding: 12px 16px; margin: 0 0 16px; border-bottom: 1px solid var(--admin-border); font-size: 14px; color: var(--admin-muted); }
.staff-editor-actions { position: sticky; bottom: 0; padding: 16px 0 max(16px, env(safe-area-inset-bottom)); background: var(--admin-surface); z-index: 2; border-top: 1px solid var(--admin-border); }
.teacher-schedule ::selection, .staff-permissions ::selection { background: var(--admin-active); color: var(--ink); }
.teacher-schedule button:disabled { opacity: .55; cursor: wait; }
@media (max-width: 900px) {
  .teacher-calendar-layout { grid-template-columns: 320px minmax(0, 1fr); }
  .teacher-calendar-panel { padding: 20px 12px; }
  .teacher-day-panel { padding: 24px 20px; }
}
@media (max-width: 720px) {
  .teacher-schedule { padding: 24px 16px; }
  .teacher-page-heading { align-items: start; gap: 12px; margin-bottom: 20px; }
  .teacher-schedule .teacher-page-heading h1 { font-size: 24px; }
  .teacher-page-heading p { font-size: 14px; }
  .teacher-page-heading p span { display: block; margin-top: 4px; }
  .teacher-page-heading .btn { padding: 8px 12px; }
  .teacher-calendar-layout { display: block; }
  .teacher-calendar-panel { border-right: 0; border-bottom: 1px solid var(--admin-border); padding: 16px 12px; }
  .teacher-schedule .teacher-month-heading h2 { font-size: 18px; }
  .teacher-quick-days { margin: 8px 0 12px; }
  .teacher-calendar-day { min-height: 44px; }
  .teacher-calendar-legend { margin-top: 12px; }
  .teacher-day-panel { padding: 24px 16px; }
  .teacher-schedule .teacher-day-heading h2 { font-size: 24px; }
  .teacher-lesson { gap: 12px; grid-template-columns: 56px minmax(0, 1fr); }
  .teacher-lesson-time strong { font-size: 17px; }
  .teacher-lesson h3 { font-size: 17px; }
  .teacher-empty-day { padding-block: 28px; }
  .permission-intro { display: block; }
  .permission-intro .btn { margin-top: 12px; }
  .permission-table-head { display: none; }
  .permission-row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 16px; }
  .permission-row > div { grid-column: 1 / -1; margin-bottom: 4px; }
  .workflow-form .permission-option { justify-content: flex-start; }
  .permission-option span { display: inline; font-size: 13px; font-weight: 400; }
  .permission-unavailable { text-align: left; }
  .staff-access-page .staff-editor-actions { flex-wrap: nowrap; gap: 8px; }
  .staff-access-page .staff-editor-actions .btn { width: auto; flex: 1; min-width: 0; padding-inline: 8px; }
}
.communications-page .communication-inbox { grid-template-rows: auto minmax(0, 1fr) auto; }
.inbox-page-controls { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--admin-border); background: var(--bg-surface, #fff); }
.inbox-page-controls span { font-size: 14px; line-height: 1.4; color: var(--admin-muted); }
.inbox-page-controls .btn { min-height: 44px; white-space: normal; }
.workflow-page h1 { font-size: clamp(26px, 4vw, 38px); margin: 0 0 12px; letter-spacing: -.025em; }
.workflow-page h2 { margin: 28px 0 12px; font-size: 22px; }
.workflow-page p { line-height: 1.55; max-width: 72ch; }
.workflow-page > .btn { margin: 12px 8px 12px 0; }
.workflow-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; padding: 24px 0; }
.workflow-form label, .teacher-schedule > label { display: grid; gap: 8px; font-size: 15px; font-weight: 600; }
.workflow-form label:has(textarea), .workflow-form label:has(input[type=url]) { grid-column: 1 / -1; }
.workflow-form .input, .workflow-form .textarea { width: 100%; min-width: 0; font-size: 16px; }
.workflow-form textarea { min-height: 120px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg-surface); color: var(--ink); resize: vertical; }
.workflow-checkbox, .workflow-form .workflow-checkbox { display: flex; gap: 10px; align-items: center; font-weight: 400; min-height: 44px; }
.workflow-checkbox input { flex: 0 0 20px; width: 20px; height: 20px; accent-color: var(--brand-red); }
.workflow-records article { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.workflow-records p { margin: 6px 0; }
.workflow-records small { color: var(--muted); }
.workflow-empty { padding: 32px 0; }
.workflow-progress { list-style: none; padding: 0; margin: 0 0 24px; display: flex; gap: 8px; }
.workflow-progress li { flex: 1; min-width: 0; border-bottom: 2px solid var(--line); }
.workflow-progress li[aria-current] { border-color: var(--brand-red); }
.workflow-progress button { width: 100%; min-height: 48px; display: flex; align-items: center; gap: 8px; border: 0; background: transparent; color: var(--ink); padding: 8px; text-align: left; font-size: 14px; }
.workflow-progress button:disabled { color: var(--muted); cursor: default; }
.workflow-progress li[aria-current] button { font-weight: 700; }
.workflow-progress button span { font-variant-numeric: tabular-nums; }
.workflow-footer { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 20px 0 max(12px, env(safe-area-inset-bottom)); }
.workflow-review { margin: 0; }
.workflow-review div { display: flex; justify-content: space-between; gap: 20px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.workflow-review dt { color: var(--muted); }
.workflow-review dd { margin: 0; text-align: right; font-weight: 600; }
.sales-workflow { display: block; width: 100%; max-width: 920px; margin-inline: auto; padding: clamp(16px, 2vw, 24px); box-sizing: border-box; }
.sales-workflow > section > .btn { min-height: 48px; white-space: normal; }
.sales-workflow .workflow-review dd { overflow-wrap: anywhere; }
.sales-workflow .sales-catalog-panel, .sales-workflow .sale-summary-panel { width: 100%; min-width: 0; }
.sales-workflow[data-step="2"] .sale-create-button, .sales-workflow[data-step="2"] .sale-client-picker { display: none; }
.workflow-error { color: var(--brand-red-dark); min-height: 24px; line-height: 1.5; }
.lesson-workflow .lesson-editor-grid { display: block; }
.lesson-workflow .lesson-editor-column { display: contents; }
.lesson-workflow .lesson-form-section, .lesson-workflow .booking-conflicts { display: none; }
.lesson-workflow[data-step="0"] .lesson-client-section,
.lesson-workflow[data-step="1"] .lesson-when-section,
.lesson-workflow[data-step="1"] .lesson-place-section,
.lesson-workflow[data-step="1"] .lesson-discipline-section,
.lesson-workflow[data-step="2"] .lesson-service-section,
.lesson-workflow[data-step="2"] .lesson-visit-create-section,
.lesson-workflow[data-step="2"] .booking-conflicts,
.lesson-workflow[data-step="3"] .booking-conflicts { display: block; }
.lesson-workflow .planner-editor-footer { padding-bottom: max(16px, env(safe-area-inset-bottom)); }
.lesson-workflow .workflow-progress { margin-top: 12px; }
.lesson-workflow .workflow-review dd { overflow-wrap: anywhere; }
.lesson-workflow .btn { min-height: 44px; white-space: normal; }
.workflow-page :focus-visible, .sales-workflow :focus-visible, .lesson-workflow :focus-visible { outline: 2px solid var(--brand-red); outline-offset: 3px; }
/* People pickers keep names primary, with enough vertical space to scan the list. */
.sales-workflow .sale-client-picker { gap: 12px; }
.sales-workflow .sale-client-picker-head { min-height: 44px; gap: 16px; }
.sales-workflow .sale-client-picker-head h2 { margin: 0; font-size: 22px; line-height: 1.3; font-weight: 700; }
.sales-workflow .sale-client-picker-head .btn { min-height: 44px; font-size: 14px; font-weight: 600; white-space: normal; }
.sales-workflow .sale-client-search { position: relative; }
.sales-workflow .sale-client-search svg { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; color: var(--admin-muted); pointer-events: none; }
.sales-workflow .sale-client-search .input { width: 100%; height: 52px; padding: 12px 16px 12px 48px; border-radius: 12px; font-size: 16px; font-weight: 400; caret-color: var(--brand-red); }
.sales-workflow .sale-client-search .input::placeholder { color: var(--admin-muted); opacity: 1; }
.sales-workflow .sale-client-count { margin: 0; color: var(--admin-muted); font-size: 13px; line-height: 1.5; }
.sales-workflow .sale-client-results { display: block; max-height: clamp(320px, 52dvh, 560px); border-radius: 12px; scrollbar-gutter: stable; scrollbar-color: var(--admin-muted) var(--admin-soft); scroll-padding: 4px; }
.sales-workflow .sale-client-option { width: 100%; grid-template-columns: 44px minmax(0, 1fr) auto 24px; gap: 16px; min-height: 76px; padding: 12px 16px; box-shadow: none; }
.sales-workflow .sale-client-option:nth-child(even) { background: var(--admin-surface); }
.sales-workflow .sale-client-option:hover { background: var(--admin-soft); }
.sales-workflow .sale-client-option.selected { background: var(--admin-active); }
.sales-workflow .sale-client-option:focus-visible { outline: 2px solid var(--brand-red); outline-offset: -3px; }
.sales-workflow .sale-person-avatar, .staff-member-avatar { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--admin-soft); color: var(--admin-muted); font-size: 15px; font-weight: 600; }
.sales-workflow .sale-person-info { gap: 4px; }
.sales-workflow .sale-person-info strong { font-size: 16px; font-weight: 600; line-height: 1.4; white-space: normal; overflow-wrap: anywhere; }
.sales-workflow .sale-person-info small { font-size: 13px; font-weight: 400; line-height: 1.5; white-space: normal; overflow-wrap: anywhere; }
.sales-workflow .sale-person-status { color: var(--admin-muted); font-size: 13px; line-height: 1.5; font-weight: 400; max-width: 18ch; overflow-wrap: anywhere; }
.sales-workflow .sale-person-check { width: 22px; height: 22px; border: 1px solid var(--admin-border-strong); border-radius: 50%; color: var(--admin-surface); }
.sales-workflow .sale-person-check svg { width: 20px; height: 20px; visibility: hidden; }
.sales-workflow .selected .sale-person-check { border-color: var(--brand-red); background: var(--brand-red); }
.sales-workflow .selected .sale-person-check svg { visibility: visible; }
.sales-workflow .selected .sale-person-status, .sales-workflow .selected .sale-person-info small { color: var(--ink); }
.sales-workflow .sale-client-empty-state { padding: 32px 24px; gap: 8px; }
.sales-workflow .sale-client-empty-state strong { font-size: 16px; font-weight: 600; }
.sales-workflow .sale-client-empty-state span { font-size: 14px; line-height: 1.5; font-weight: 400; max-width: 60ch; }
.sales-workflow[data-step="0"] .workflow-error:empty { display: none; }
.sales-workflow[data-step="0"] .workflow-footer { position: sticky; bottom: 0; background: var(--admin-surface); padding-top: 16px; }
.sales-workflow .workflow-footer .btn { min-height: 48px; font-size: 14px; font-weight: 600; }
.sale-selection-note { min-width: 0; display: grid; gap: 4px; }
.sale-selection-note span { color: var(--admin-muted); font-size: 13px; line-height: 1.4; }
.sale-selection-note strong { font-size: 15px; line-height: 1.4; font-weight: 600; overflow-wrap: anywhere; }
.staff-access-page { max-width: 1120px; }
.staff-page-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 32px; }
.staff-page-heading h1 { font-size: clamp(24px, 3vw, 32px); line-height: 1.2; font-weight: 700; }
.staff-page-heading p { margin: 8px 0 0; font-size: 15px; color: var(--admin-muted); }
.staff-page-heading > .btn { flex-shrink: 0; min-height: 44px; }
.staff-list-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin: 0 0 12px; }
.staff-list-heading h2 { margin: 0; font-size: 18px; font-weight: 600; }
.staff-list-heading span { color: var(--admin-muted); font-size: 14px; font-weight: 400; }
.staff-list-heading h2 span { margin-left: 8px; }
.staff-list-heading > span { margin-right: 160px; }
.staff-members { border-top: 1px solid var(--admin-border); }
.staff-member { display: grid; grid-template-columns: 44px minmax(0, 1fr) minmax(160px, 200px) 140px; gap: 16px; align-items: center; padding: 20px 0; border-bottom: 1px solid var(--admin-border); }
.staff-member-avatar svg { width: 24px; height: 24px; }
.staff-member-info { min-width: 0; }
.staff-member-info h3 { margin: 0; font-size: 16px; line-height: 1.4; font-weight: 600; overflow-wrap: anywhere; }
.staff-member-info p { margin: 4px 0 0; color: var(--admin-muted); font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; }
.staff-member-info p span { font-variant-numeric: tabular-nums; }
.staff-member-permission { display: grid; gap: 4px; font-size: 14px; line-height: 1.4; }
.staff-access-state { display: flex; align-items: center; gap: 6px; color: var(--admin-muted); font-size: 13px; }
.staff-access-state::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex-shrink: 0; }
.staff-access-state.is-active { color: var(--ink); }
.staff-access-state.is-active::before { background: var(--success); }
.staff-member > .btn { min-height: 44px; padding: 8px 12px; font-size: 14px; font-weight: 600; white-space: normal; }
.staff-access-page .staff-access-help { margin: 24px 0; font-size: 14px; color: var(--admin-muted); }
.staff-editor { border-bottom: 1px solid var(--admin-border); margin-bottom: 28px; }
.staff-editor h2 { margin: 0; font-size: 20px; }
.staff-editor .workflow-form { padding-top: 16px; }
.staff-editor-fields { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:20px; grid-column:1/-1; min-width:0; }
.staff-editor-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.staff-editor-actions { display: flex; justify-content: flex-end; align-items: center; gap: 12px; }
.staff-editor-actions .btn { min-height: 44px; white-space: normal; }
.staff-editor-identity { display: grid; gap: 8px; margin: 16px 0; padding: 16px; background: var(--admin-surface); border: 1px solid var(--admin-border); border-radius: 12px; }
.staff-editor-identity span, .staff-editor-identity small, #staffIdentityHint { color: var(--admin-muted); font-size: 13px; font-weight: 400; line-height: 1.5; }
.staff-editor-identity strong { font-size: 16px; line-height: 1.5; overflow-wrap: anywhere; font-weight: 600; }
.staff-editor-identity a, .staff-telegram-identity a { color: var(--brand-red-dark); text-underline-offset: 3px; overflow-wrap: anywhere; }
.staff-editor-error { grid-column: 1 / -1; color: var(--brand-red-dark); font-size: 14px; line-height: 1.5; margin: 0; }
.staff-editor-error:empty { display: none; }
.staff-editor-actions { grid-column: 1 / -1; }
.staff-access-page input[readonly] { background: var(--admin-soft); color: var(--admin-muted); }
.staff-access-page > [data-operation-refresh] { min-height: 44px; font-size: 14px; font-weight: 600; }
@media (max-width: 900px) {
  .staff-page-heading { flex-direction: column; gap: 16px; }
  .staff-member { grid-template-columns: 44px minmax(0, 1fr) 140px; gap: 12px; }
  .staff-member-avatar { grid-column: 1; grid-row: 1 / 3; align-self: start; }
  .staff-member-info { grid-column: 2; }
  .staff-member-permission { grid-column: 2; grid-row: 2; }
  .staff-member > .btn { grid-column: 3; grid-row: 1 / 3; }
  .staff-list-heading > span { display: none; }
}
@media (max-width: 640px) {
  .workflow-form { grid-template-columns: minmax(0, 1fr); }
  .staff-editor-fields { grid-template-columns:minmax(0,1fr); }
  .workflow-progress { gap: 4px; }
  .workflow-progress button { flex-direction: column; align-items: flex-start; gap: 3px; font-size: 12px; padding: 6px 2px; }
  .workflow-footer .btn { min-height: 48px; flex: 1; white-space: normal; }
  .workflow-records article { flex-wrap: wrap; }
  .sales-workflow .sale-choice-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sales-workflow input, .lesson-workflow input { font-size: 16px; }
  .sales-workflow .sale-product-row { min-height: 64px; }
  .sales-workflow .sale-client-picker-head h2 { font-size: 20px; }
  .sales-workflow .sale-client-picker-head .btn { max-width: 116px; }
  .sales-workflow .sale-client-option { grid-template-columns: 36px minmax(0, 1fr) 22px; gap: 4px 12px; padding: 12px; }
  .sales-workflow .sale-person-avatar { grid-column: 1; grid-row: 1 / 3; width: 36px; height: 36px; font-size: 13px; }
  .sales-workflow .sale-person-info { grid-column: 2; }
  .sales-workflow .sale-person-status { grid-column: 2; grid-row: 2; max-width: none; font-size: 12px; }
  .sales-workflow .sale-person-check { grid-column: 3; grid-row: 1 / 3; }
  .sales-workflow .sale-client-results { max-height: 52dvh; }
  .sales-workflow[data-step="0"] .workflow-footer { flex-wrap: wrap; }
  .sales-workflow[data-step="0"] .workflow-footer .btn { flex: 0 0 auto; }
  .sale-selection-note { flex: 1 1 140px; }
  .staff-member { grid-template-columns: 36px minmax(0, 1fr); }
  .staff-member-avatar { width: 36px; height: 36px; }
  .staff-member > .btn { grid-column: 2; grid-row: 3; justify-self: start; }
  .staff-editor-actions { flex-wrap: wrap; justify-content: flex-start; }
}
