
    :root {
      --bg: #fbf7fc;
      --card: #ffffff;
      --text: #281a2d;
      --muted: #786b7c;
      --border: #eaddea;
      --accent: #cb11ab;
      --accent-dark: #9d0b8b;
      --accent-purple: #7428d7;
      --accent-pink: #e3138c;
      --accent-soft: #faeafb;
      --green: #dcfce7;
      --red: #fee2e2;
      --green-text: #166534;
      --red-text: #991b1b;
      --warning: #fff7ed;
      --warning-text: #9a3412;
      --shadow: 0 10px 28px rgba(93, 30, 101, 0.08);
    }

    * { box-sizing: border-box; }

    body {
      margin: 0;
      font-family: Arial, Helvetica, sans-serif;
      background:
        radial-gradient(circle at 100% 0%, rgba(227, 19, 140, .06), transparent 30%),
        var(--bg);
      color: var(--text);
    }

    .hidden { display: none !important; }

    .gate {
      min-height: 100vh;
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 24px;
    }

    .gate-card {
      width: min(460px, 100%);
      background: var(--card);
      border: 1px solid var(--border);
      border-radius: 18px;
      box-shadow: var(--shadow);
      padding: 28px;
      text-align: center;
    }

    .gate-card h1 {
      margin: 0 0 10px;
      font-size: 24px;
    }

    .gate-card p {
      margin: 0 0 18px;
      color: var(--muted);
      line-height: 1.5;
    }

    .gate-icon {
      width: 54px;
      height: 54px;
      margin: 0 auto 18px;
      border-radius: 50%;
      background: var(--accent-soft);
      display: grid;
      place-items: center;
      font-size: 26px;
    }

    .admin-password-note {
      margin-top: 8px;
      color: var(--muted);
      font-size: 11px;
      line-height: 1.4;
      text-align: center;
    }


    .gate-error {
      background: var(--warning);
      color: var(--warning-text);
      border: 1px solid #fed7aa;
      border-radius: 10px;
      padding: 12px;
      margin: 0 0 16px;
      text-align: left;
      font-size: 14px;
      line-height: 1.45;
    }

    .login-form {
      display: flex;
      flex-direction: column;
      gap: 10px;
      text-align: left;
    }

    .login-form label {
      color: var(--muted);
      font-size: 12px;
      font-weight: 700;
    }

    .profile-form {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 14px;
      text-align: left;
    }

    .profile-form .profile-field {
      min-width: 0;
    }

    .profile-form .profile-field.full {
      grid-column: 1 / -1;
    }

    .profile-form label {
      display: block;
      margin-bottom: 6px;
      color: var(--muted);
      font-size: 12px;
      font-weight: 700;
    }

    .profile-input {
      width: 100%;
      padding: 11px 12px;
      border: 1px solid var(--border);
      border-radius: 10px;
      font: inherit;
      color: var(--text);
      background: #fff;
    }

    .profile-input[readonly] {
      background: #f3f4f6;
      color: #6b7280;
      cursor: not-allowed;
    }

    .profile-actions {
      grid-column: 1 / -1;
      display: flex;
      gap: 10px;
      align-items: center;
      flex-wrap: wrap;
      margin-top: 4px;
    }

    .profile-help {
      grid-column: 1 / -1;
      color: var(--muted);
      font-size: 13px;
      line-height: 1.45;
    }

    .profile-card-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
    }

    .profile-logout-button {
      width: 40px;
      height: 40px;
      flex: 0 0 40px;
      padding: 0;
      display: grid;
      place-items: center;
      border: 1px solid #fecaca;
      border-radius: 11px;
      background: #fff1f2;
      color: #b91c1c;
      font-size: 21px;
      font-weight: 800;
      line-height: 1;
    }

    .profile-logout-button:hover:not(:disabled) {
      background: #fee2e2;
    }

    .data-upload-body {
      padding: 20px;
    }

    .data-upload-form {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 14px;
      max-width: 900px;
    }

    .data-upload-form .full,
    .data-upload-form .profile-actions {
      grid-column: 1 / -1;
    }

    .data-upload-help { margin-top: 6px; }

    .upload-auto-time-note {
      min-height: 42px;
      padding: 11px 12px;
      display: flex;
      align-items: center;
      border: 1px solid var(--border);
      border-radius: 10px;
      background: #fff8fc;
      color: #7f1b76;
      font-size: 12px;
      font-weight: 700;
    }

    .data-upload-history-head {
      margin-top: 28px;
      padding-top: 18px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      border-top: 1px solid var(--border);
    }

    .data-upload-history-head h3 { margin: 0; font-size: 16px; }
    .data-upload-history { margin-top: 12px; overflow-x: auto; }
    .upload-history-table { width: 100%; border-collapse: collapse; min-width: 1030px; }
    .upload-history-table th,
    .upload-history-table td {
      padding: 9px 10px;
      border-bottom: 1px solid var(--border);
      text-align: left;
      font-size: 12px;
      vertical-align: top;
    }
    .upload-history-table th {
      background: #fff8fc;
      color: #6f1e66;
      font-weight: 800;
      white-space: nowrap;
    }
    .upload-active-badge,
    .upload-old-badge {
      display: inline-flex;
      padding: 3px 7px;
      border-radius: 999px;
      font-size: 10px;
      font-weight: 800;
    }
    .upload-active-badge { background: #ecfdf5; color: #166534; }
    .upload-old-badge { background: #f3f4f6; color: #6b7280; }

    .upload-delete-button {
      padding: 7px 10px;
      border: 1px solid #fecaca;
      border-radius: 9px;
      background: #fff1f2;
      color: #b91c1c;
      font-size: 11px;
      font-weight: 800;
      white-space: nowrap;
    }

    .upload-delete-button:hover:not(:disabled) {
      background: #fee2e2;
    }

    .timesheet-bs-modal {
      position: fixed;
      inset: 0;
      z-index: 1200;
      display: grid;
      place-items: center;
      padding: 18px;
      background: rgba(39, 20, 43, .42);
      backdrop-filter: blur(4px);
    }

    .timesheet-bs-dialog {
      width: min(430px, 100%);
      padding: 24px;
      border-radius: 18px;
      background: #fff;
      box-shadow: 0 24px 70px rgba(35, 15, 39, .22);
      text-align: center;
    }

    .timesheet-bs-icon {
      width: 44px;
      height: 44px;
      margin: 0 auto 10px;
      display: grid;
      place-items: center;
      border-radius: 50%;
      background: #fff0fa;
      color: #a31391;
      font-size: 22px;
      font-weight: 900;
    }

    .timesheet-bs-dialog h3 {
      margin: 0;
      font-size: 17px;
    }

    .timesheet-bs-actions {
      margin-top: 18px;
      display: flex;
      justify-content: center;
      gap: 10px;
    }

    .timesheet-legend {
      display: flex;
      align-items: center;
      gap: 8px 14px;
      flex-wrap: wrap;
      padding: 12px 18px;
      border-bottom: 1px solid var(--border);
      background: #fffafd;
      font-size: 11px;
    }

    .timesheet-legend span {
      white-space: nowrap;
    }

    .timesheet-legend-chip {
      padding: 5px 8px;
      border-radius: 8px;
      border: 1px solid rgba(0, 0, 0, .05);
    }

    .timesheet-shift-cell.shift-11,
    .timesheet-legend-chip.shift-11 {
      background: #dcfce7;
      color: #166534;
    }


    .fraud-table { min-width: 1150px; }
    .fraud-table th { white-space: normal; min-width: 74px; max-width: 200px; }
    .fraud-table td.num, .fraud-table th.num { width: 96px; min-width: 80px; text-align: center; white-space: nowrap; }
    .fraud-table .comment-cell { min-width: 210px; }
    .fraud-click-row { cursor: pointer; }
    .fraud-click-row:hover td { background: #faf0fa; }
    #fraudDetailWrap { padding: 18px; border-top: 1px solid var(--border); }
    .fraud-detail-head { display: flex; gap: 16px; align-items: center; justify-content: space-between; }
    .fraud-absence-editor td { background: #fff8fc !important; }
    .fraud-absence-fields { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; padding: 9px 4px; }
    .fraud-absence-fields label { display:flex; flex-direction:column; gap:4px; min-width:135px; font-size:12px; }
    .fraud-absence-fields input, .fraud-absence-fields textarea { max-width:280px; padding:7px; border:1px solid #d8bfd5; border-radius:6px; font:inherit; }
    .fraud-absence-fields textarea { min-width:215px; min-height:45px; }
    .fraud-admin-edit { display:inline-block; margin-left:5px; font-size:12px; }
    .fraud-override-mark { display:block; color:#87548a; font-size:11px; }
    .fraud-week-table { width:100%; min-width:1050px; border-collapse:collapse; }
    .fraud-week-table th, .fraud-week-table td { text-align:center; min-width:90px; padding:9px 7px; border:1px solid #e4d5e3; }
    .fraud-week-table th:first-child, .fraud-week-table td:first-child { text-align:left; min-width:195px; position:sticky; left:0; z-index:1; background:#fff; }
    .fraud-week-table thead th { white-space:normal; background:#f9eef8; }
    .fraud-week-table .fraud-week-group td { border-top:2px solid #d7b5d5; }
    .fraud-week-table .fraud-week-grand td { font-weight:700; background:#f8ebf6; }
    .fraud-week-table .fraud-week-grand td:first-child { background:#f8ebf6; }
    .fraud-week-missing { background:#fff3dc; color:#7d520f; padding:10px; border-radius:7px; margin:10px 0; }
    .fraud-week-pct { color:#68446b; }


    .timesheet-shift-cell.shift-v,
    .timesheet-legend-chip.shift-v {
      background: #fef9c3;
      color: #854d0e;
    }

    .timesheet-shift-cell.shift-o,
    .timesheet-legend-chip.shift-o {
      background: #dbeafe;
      color: #1d4ed8;
    }

    .timesheet-shift-cell.shift-b,
    .timesheet-legend-chip.shift-b {
      background: #ede9fe;
      color: #6d28d9;
    }

    .timesheet-shift-cell.shift-bs,
    .timesheet-legend-chip.shift-bs {
      background: #ddd6fe;
      color: #5b21b6;
    }

    .timesheet-shift-cell.shift-d,
    .timesheet-legend-chip.shift-d {
      background: #fce7f3;
      color: #9d174d;
    }

    .timesheet-shift-cell.shift-u,
    .timesheet-legend-chip.shift-u {
      background: #4c1d95;
      color: #fff;
    }

    .timesheet-shift-cell.shift-n,
    .timesheet-legend-chip.shift-n {
      background: #fee2e2;
      color: #b91c1c;
    }

    .timesheet-shift-cell.shift-u .timesheet-pencil {
      color: #fff;
    }

    .timesheet-shift-cell.shift-u .timesheet-pencil:hover {
      background: rgba(255,255,255,.16);
    }

    .timesheet-add-panel {
      margin: 14px 18px;
      padding: 16px;
      border: 1px solid var(--border);
      border-radius: 14px;
      background: #fffafd;
    }

    .timesheet-add-grid {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 12px 16px;
    }

    .timesheet-table-wrap {
      max-height: 72vh;
    }

    .timesheet-table {
      border-collapse: separate;
      border-spacing: 0;
      min-width: 1320px;
      width: max-content;
    }

    .timesheet-table th,
    .timesheet-table td {
      min-width: 38px;
      height: 28px;
      padding: 3px 4px;
      white-space: nowrap;
      text-align: center;
      border-right: 1px solid var(--border);
      border-bottom: 1px solid var(--border);
      font-size: 10px;
      line-height: 1.15;
    }

    .timesheet-table th {
      position: sticky;
      top: 0;
      z-index: 12;
      height: 30px;
      background: #fff8fc;
      font-size: 10px;
    }

    .timesheet-meta-cell {
      text-align: left !important;
      min-width: max-content !important;
      width: max-content !important;
      max-width: none !important;
      padding-left: 8px !important;
      padding-right: 8px !important;
      background: #fff;
      overflow: visible !important;
      text-overflow: clip !important;
      white-space: nowrap;
    }

    .timesheet-cell-content {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      white-space: nowrap;
      overflow: visible;
    }

    .timesheet-cell-text {
      display: inline-block;
      white-space: nowrap;
      overflow: visible;
      text-overflow: clip;
      max-width: none;
    }

    .timesheet-id-cell {
      min-width: 68px !important;
      max-width: 68px !important;
    }

    .timesheet-shift-cell {
      min-width: 42px !important;
      width: 42px;
      max-width: 42px;
      padding: 2px 2px !important;
    }

    .timesheet-shift-content {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 2px;
      min-width: 34px;
    }

    .timesheet-pencil {
      width: 16px;
      height: 16px;
      padding: 0;
      display: inline-grid;
      place-items: center;
      border: 0;
      border-radius: 5px;
      background: transparent;
      color: #8b3d82;
      font-size: 9px;
      line-height: 1;
      opacity: .42;
    }

    /* Закрепляем слева ID, ФИО, Эксперт и РГ.
       При горизонтальной прокрутке эти четыре колонки всегда остаются видимыми. */
    .timesheet-table th:nth-child(1),
    .timesheet-table td:nth-child(1) {
      position: sticky;
      left: 0;
      z-index: 8;
      min-width: 68px !important;
      width: 68px;
      max-width: 68px !important;
    }

    .timesheet-table th:nth-child(2),
    .timesheet-table td:nth-child(2) {
      position: sticky;
      left: 68px;
      z-index: 8;
      min-width: max-content !important;
      width: max-content !important;
      max-width: none !important;
    }

    .timesheet-table th:nth-child(3),
    .timesheet-table td:nth-child(3) {
      position: sticky;
      left: 218px;
      z-index: 8;
      min-width: max-content !important;
      width: max-content !important;
      max-width: none !important;
    }

    .timesheet-table th:nth-child(4),
    .timesheet-table td:nth-child(4) {
      position: sticky;
      left: 326px;
      z-index: 8;
      min-width: max-content !important;
      width: max-content !important;
      max-width: none !important;
      box-shadow: 4px 0 7px rgba(60, 20, 65, .07);
    }

    /* У заголовков закреплённых колонок z-index выше и вертикального, и горизонтального sticky. */
    .timesheet-table thead th:nth-child(-n+4) {
      z-index: 16;
      background: #fff8fc;
    }

    /* У закреплённых ячеек тела всегда непрозрачный фон. */
    .timesheet-table tbody td:nth-child(-n+4) {
      background: #fff;
    }


    .timesheet-table th:nth-child(5),
    .timesheet-table td:nth-child(5) {
      min-width: 62px !important;
      max-width: 62px !important;
    }

    .timesheet-table th:nth-child(6),
    .timesheet-table td:nth-child(6) {
      min-width: 90px !important;
      max-width: 110px !important;
    }

    .timesheet-table th:nth-child(7),
    .timesheet-table td:nth-child(7) {
      min-width: 82px !important;
      max-width: 105px !important;
    }

    .timesheet-table th:nth-child(8),
    .timesheet-table td:nth-child(8) {
      min-width: 92px !important;
      max-width: 92px !important;
    }

    .timesheet-delete-employee {
      padding: 4px 7px;
      border: 1px solid #fecaca;
      border-radius: 7px;
      background: #fff1f2;
      color: #b91c1c;
      font-size: 10px;
      font-weight: 800;
      white-space: nowrap;
    }

    .timesheet-delete-employee:hover:not(:disabled) {
      background: #fee2e2;
    }


    .timesheet-pencil:hover {
      background: #f8e8f5;
      opacity: 1;
    }

    .timesheet-inline-editor {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 3px;
      min-width: max-content;
    }

    .timesheet-inline-select {
      min-width: 42px !important;
      width: 42px !important;
      max-width: 42px !important;
      height: 23px;
      padding: 1px 2px !important;
      border: 1px solid rgba(127, 27, 118, .32);
      border-radius: 6px;
      background: rgba(255,255,255,.96);
      color: #3f3142;
      font-size: 10px;
      font-weight: 800;
      line-height: 1;
      text-align: center;
      box-shadow: 0 0 0 2px rgba(203,17,171,.08);
      cursor: pointer;
    }

    .timesheet-inline-select:focus {
      outline: none;
      border-color: var(--accent);
      box-shadow: 0 0 0 2px rgba(203,17,171,.14);
    }

    .timesheet-inline-ok {
      height: 23px;
      padding: 0 6px;
      border: 0;
      border-radius: 6px;
      background: linear-gradient(135deg, var(--accent-purple), var(--accent));
      color: #fff;
      font-size: 9px;
      font-weight: 900;
      line-height: 1;
      cursor: pointer;
    }

    .timesheet-inline-ok:hover {
      filter: brightness(.96);
    }

    .timesheet-inline-cancel {
      width: 21px;
      height: 23px;
      padding: 0;
      border: 0;
      border-radius: 6px;
      background: #f5eef5;
      color: #6f5e70;
      font-size: 12px;
      font-weight: 800;
      line-height: 1;
      cursor: pointer;
    }

    .timesheet-inline-cancel:hover {
      background: #eee3ed;
    }

    .timesheet-shift-cell.editing {
      min-width: 104px !important;
      width: 104px;
      max-width: 104px;
      overflow: visible;
    }


    .timesheet-readonly-cell .timesheet-shift-content {
      opacity: .92;
    }

    .timesheet-readonly-cell {
      cursor: default;
    }

    .profile-card-body {
      padding: 20px;
      max-width: 900px;
    }

    .operator-roles-table {
      min-width: 850px;
    }

    .operator-roles-table th:nth-child(1),
    .operator-roles-table td:nth-child(1) {
      width: 120px;
      min-width: 120px;
    }

    .operator-roles-table th:nth-child(4),
    .operator-roles-table td:nth-child(4),
    .operator-roles-table th:nth-child(5),
    .operator-roles-table td:nth-child(5) {
      width: 120px;
      min-width: 120px;
      text-align: center;
    }

    .operator-role-checkbox {
      width: 20px;
      height: 20px;
      margin: 0;
      cursor: pointer;
      vertical-align: middle;
    }

    .operator-role-checkbox:disabled {
      cursor: wait;
      opacity: .55;
    }

    .operator-role-changes-panel {
      padding: 18px;
      border-top: 1px solid var(--border);
      background: #fffafd;
    }

    .operator-role-changes-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
      flex-wrap: wrap;
      margin-bottom: 9px;
    }

    .operator-role-changes-head h3 {
      margin: 0;
      font-size: 15px;
    }

    .operator-role-changes-text {
      width: 100%;
      min-height: 118px;
      resize: vertical;
      padding: 11px 12px;
      border: 1px solid var(--border);
      border-radius: 10px;
      background: #fff;
      color: var(--text);
      font-family: Consolas, "Courier New", monospace;
      font-size: 12px;
      line-height: 1.5;
    }

    .operator-role-changes-actions {
      display: flex;
      align-items: center;
      justify-content: flex-end;
      gap: 8px;
      margin-top: 10px;
    }

    .operator-role-relogin-note {
      margin-top: 9px;
      padding: 9px 11px;
      border: 1px solid #ead8e8;
      border-radius: 9px;
      background: #fff;
      color: #6f5e70;
      font-size: 11px;
      line-height: 1.4;
    }

    .operator-role-history-section {
      margin-top: 18px;
      padding-top: 16px;
      border-top: 1px solid var(--border);
    }

    .operator-role-history-section h3 {
      margin: 0 0 10px;
      font-size: 15px;
    }

    .operator-role-history-table {
      width: 100%;
      min-width: 920px;
      border-collapse: collapse;
    }

    .operator-role-history-table th,
    .operator-role-history-table td {
      padding: 8px 9px;
      border-bottom: 1px solid var(--border);
      text-align: left;
      font-size: 11px;
      vertical-align: top;
    }

    .operator-role-history-table th {
      background: #fff7fc;
      color: #6f315f;
      font-weight: 800;
      white-space: nowrap;
    }

    .operator-role-history-table .role-history-roles {
      white-space: nowrap;
      font-weight: 700;
    }

    .operator-role-row-saving {
      opacity: .72;
    }

    .admin-layout {
      display: grid;
      grid-template-columns: minmax(250px, 340px) minmax(0, 1fr);
      min-height: 420px;
    }

    .admin-user-list-wrap {
      border-right: 1px solid var(--border);
      background: #fffafd;
      min-width: 0;
    }

    .admin-user-list {
      display: flex;
      flex-direction: column;
      max-height: 68vh;
      overflow: auto;
    }

    .admin-user-item {
      width: 100%;
      padding: 12px 14px;
      border-radius: 0;
      border-bottom: 1px solid var(--border);
      background: transparent;
      color: var(--text);
      text-align: left;
      font-weight: 400;
    }

    .admin-user-item:hover {
      background: var(--accent-soft);
    }

    .admin-user-item.active {
      background: #f7dcf3;
      color: #7f126f;
    }

    .admin-user-item strong {
      display: flex;
      align-items: center;
      gap: 7px;
      margin-bottom: 3px;
    }

    .presence-dot {
      display: inline-block;
      width: 9px;
      height: 9px;
      flex: 0 0 9px;
      border-radius: 50%;
      vertical-align: middle;
    }

    .presence-dot.online {
      background: #22c55e;
      box-shadow: 0 0 0 3px rgba(34, 197, 94, .13);
    }

    .presence-dot.offline {
      background: #ef4444;
      box-shadow: 0 0 0 3px rgba(239, 68, 68, .10);
    }

    .presence-value {
      display: inline-flex;
      align-items: center;
      gap: 7px;
    }

    .admin-user-meta {
      color: var(--muted);
      font-size: 12px;
    }

    .admin-profile-detail {
      padding: 20px;
      min-width: 0;
    }

    .admin-profile-grid {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 12px 18px;
    }

    .admin-profile-field {
      padding: 12px;
      background: #fffafd;
      border: 1px solid var(--border);
      border-radius: 10px;
      min-width: 0;
    }

    .admin-profile-field .label {
      margin-bottom: 5px;
      color: var(--muted);
      font-size: 11px;
      font-weight: 700;
      text-transform: uppercase;
    }

    .admin-profile-field .value {
      overflow-wrap: anywhere;
    }

    .admin-access-editor {
      margin-bottom: 16px;
      padding: 14px;
      border: 1px solid #e8cce2;
      background: #fff8fc;
      border-radius: 12px;
    }

    .admin-access-editor-grid {
      display: grid;
      grid-template-columns: minmax(180px, 1fr) auto auto auto;
      gap: 10px;
      align-items: end;
    }

    .admin-active-check {
      display: flex;
      gap: 8px;
      align-items: center;
      min-height: 42px;
      font-size: 13px;
      font-weight: 700;
    }

    .admin-access-status {
      min-height: 18px;
      margin-top: 8px;
      color: var(--muted);
      font-size: 12px;
    }

    .admin-add-user-grid {
      display: grid;
      grid-template-columns: minmax(240px, 1.5fr) minmax(170px, .8fr) auto auto;
      gap: 10px;
      align-items: end;
    }

    .admin-add-user-help {
      margin-top: 10px;
      color: var(--muted);
      font-size: 12px;
      line-height: 1.45;
    }

    .section-heading-row,
    .admin-section-toolbar {
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 10px;
      flex-wrap: wrap;
    }

    .section-heading-row {
      margin-bottom: 12px;
    }

    .section-heading-row h3 {
      margin: 0;
      font-size: 16px;
    }

    .request-form-body {
      padding: 20px;
      max-width: 900px;
    }

    .request-form {
      display: grid;
      grid-template-columns: 1fr;
      gap: 14px;
    }


    .absence-request-grid {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 14px;
    }

    .absence-request-grid.full {
      grid-column: 1 / -1;
    }

    .absence-request-grid > .full {
      grid-column: 1 / -1;
    }

    .absence-id-input {
      width: 100%;
      min-height: 92px;
      resize: vertical;
    }

    .field-note {
      margin-top: 6px;
      color: var(--muted);
      font-size: 11px;
      line-height: 1.4;
    }

    .operator-lookup-wrap {
      border: 1px solid var(--border);
      border-radius: 12px;
      overflow: hidden;
      background: #fffafd;
    }

    .operator-lookup-table {
      width: 100%;
      border-collapse: collapse;
    }

    .operator-lookup-table th,
    .operator-lookup-table td {
      padding: 8px 10px;
      border-bottom: 1px solid var(--border);
      font-size: 12px;
      text-align: left;
    }

    .operator-lookup-table tr:last-child td {
      border-bottom: 0;
    }

    .lookup-error {
      padding: 9px 10px;
      color: #b91c1c;
      background: #fff1f2;
      font-size: 12px;
    }

    .workback-mode-options {
      display: flex;
      gap: 10px;
      flex-wrap: wrap;
    }

    .workback-mode-option {
      display: inline-flex;
      align-items: center;
      gap: 7px;
      padding: 9px 11px;
      border: 1px solid var(--border);
      border-radius: 10px;
      background: #fff;
      cursor: pointer;
      font-size: 12px;
      font-weight: 600;
    }

    .workback-mode-option:has(input:checked) {
      border-color: #d99bd3;
      background: var(--accent-soft);
      color: #7b176f;
    }

    .request-description.compact {
      min-height: 96px;
    }

    .absence-request-card,
    .workback-card {
      padding: 16px;
      border: 1px solid var(--border);
      border-radius: 14px;
      background: #fff;
      box-shadow: 0 5px 16px rgba(70, 24, 70, .05);
    }

    .absence-request-card + .absence-request-card,
    .workback-card + .workback-card {
      margin-top: 12px;
    }

    .workback-card.deep-link-highlight {
      border-color: #cb11ab;
      box-shadow: 0 0 0 3px rgba(203, 17, 171, .12),
                  0 8px 24px rgba(70, 24, 70, .08);
      transition: box-shadow .2s ease, border-color .2s ease;
    }

    .request-card-head {
      display: flex;
      justify-content: space-between;
      align-items: flex-start;
      gap: 12px;
      flex-wrap: wrap;
      margin-bottom: 10px;
    }

    .request-number-filter {
      min-width: 230px;
      width: 230px;
    }

    .request-number-chip {
      display: inline-flex;
      align-items: center;
      width: fit-content;
      margin-bottom: 6px;
      padding: 4px 9px;
      border: 1px solid #e8d3e6;
      border-radius: 999px;
      background: #fff2fb;
      color: #851477;
      font-size: 10px;
      font-weight: 900;
      letter-spacing: .03em;
      white-space: nowrap;
    }

    .request-card-meta {
      color: var(--muted);
      font-size: 12px;
      line-height: 1.5;
    }

    .request-detail-grid {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 10px;
      margin: 12px 0;
    }

    .request-detail {
      padding: 10px;
      border: 1px solid var(--border);
      border-radius: 10px;
      background: #fffafd;
    }

    .request-detail .label {
      margin-bottom: 4px;
      color: var(--muted);
      font-size: 10px;
      font-weight: 700;
      text-transform: uppercase;
    }

    .request-detail .value {
      font-size: 13px;
      overflow-wrap: anywhere;
    }

    .operator-chip-list {
      display: flex;
      gap: 6px;
      flex-wrap: wrap;
      margin: 8px 0 12px;
    }

    .operator-chip {
      padding: 5px 8px;
      border-radius: 999px;
      background: #f5e9f5;
      color: #713267;
      font-size: 11px;
    }

    .workback-edit-grid {
      display: grid;
      grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
      gap: 9px;
      align-items: end;
      margin-top: 12px;
      padding-top: 12px;
      border-top: 1px solid var(--border);
    }

    .dialog-box {
      margin-top: 12px;
      padding-top: 12px;
      border-top: 1px solid var(--border);
    }

    .dialog-messages {
      max-height: 240px;
      overflow: auto;
      display: flex;
      flex-direction: column;
      gap: 7px;
      margin-bottom: 9px;
    }

    .dialog-message {
      max-width: 85%;
      padding: 8px 10px;
      border-radius: 11px;
      background: #f7f2f7;
      font-size: 12px;
      line-height: 1.4;
    }

    .dialog-message.admin {
      margin-left: auto;
      background: #f5ddf2;
    }

    .dialog-message.user {
      margin-right: auto;
      background: #f3f4f6;
    }

    .dialog-message-meta {
      margin-bottom: 3px;
      color: var(--muted);
      font-size: 10px;
    }

    .dialog-compose {
      display: grid;
      grid-template-columns: 1fr auto;
      gap: 8px;
      align-items: end;
    }

    .dialog-compose textarea {
      min-height: 68px;
    }

    .status-approved {
      background: #dcfce7;
      color: #166534;
    }

    .status-wait {
      background: #fef3c7;
      color: #92400e;
    }

    .status-cancelled {
      background: #fee2e2;
      color: #991b1b;
    }

    .status-review {
      background: #e0e7ff;
      color: #3730a3;
    }


    .section-filter-row {
      display: flex;
      align-items: center;
      justify-content: flex-end;
      gap: 8px;
      flex-wrap: wrap;
    }

    .compact-filter {
      width: auto;
      min-width: 150px;
    }

    .inline-filter-label {
      display: flex;
      align-items: center;
      gap: 6px;
      color: var(--muted);
      font-size: 11px;
      font-weight: 700;
    }

    .inline-filter-label .compact-filter {
      min-width: 145px;
    }

    .absence-notification-stack {
      position: fixed;
      top: 18px;
      right: 18px;
      z-index: 500;
      width: min(390px, calc(100vw - 36px));
      pointer-events: none;
    }

    .absence-notification {
      pointer-events: auto;
      padding: 14px;
      border: 1px solid #e7b9dc;
      border-radius: 14px;
      background: #fff;
      box-shadow: 0 18px 50px rgba(69, 24, 70, .20);
      animation: absenceNotificationIn .18s ease-out;
    }

    .absence-notification + .absence-notification {
      margin-top: 10px;
    }

    .absence-notification-head {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: 10px;
    }

    .absence-notification-title {
      color: #751069;
      font-weight: 800;
    }

    .absence-notification-text {
      margin-top: 6px;
      color: #554353;
      font-size: 12px;
      line-height: 1.45;
    }

    .absence-notification-actions {
      display: flex;
      justify-content: flex-end;
      gap: 7px;
      margin-top: 10px;
    }

    .danger-button {
      color: #b91c1c;
      border-color: #fecaca;
      background: #fff1f2;
    }

    .danger-button:hover {
      background: #fee2e2;
    }

    .absence-notification-close {
      width: 26px;
      height: 26px;
      padding: 0;
      background: #f6edf5;
      color: #7b3a72;
    }

    @keyframes absenceNotificationIn {
      from {
        opacity: 0;
        transform: translateY(-8px);
      }
      to {
        opacity: 1;
        transform: translateY(0);
      }
    }

    .request-form label {
      display: block;
      margin-bottom: 6px;
      color: var(--muted);
      font-size: 12px;
      font-weight: 700;
    }

    .request-description {
      width: 100%;
      min-height: 180px;
      resize: vertical;
    }

    .requests-table {
      min-width: 1050px;
    }

    .request-description-cell {
      min-width: 320px;
      white-space: pre-wrap;
      line-height: 1.4;
    }

    .request-comment-cell {
      min-width: 240px;
      white-space: pre-wrap;
      line-height: 1.4;
    }

    .status-badge {
      display: inline-block;
      padding: 4px 8px;
      border-radius: 999px;
      font-size: 11px;
      font-weight: 700;
      white-space: nowrap;
    }

    .status-new {
      background: #f3e8ff;
      color: #7e22ce;
    }

    .status-work {
      background: #fef3c7;
      color: #92400e;
    }

    .status-done {
      background: #dcfce7;
      color: #166534;
    }

    .status-cancel {
      background: #fee2e2;
      color: #991b1b;
    }

    .request-subtabs,
    .admin-header-actions {
      display: flex;
      align-items: center;
      justify-content: flex-end;
      gap: 8px;
      flex-wrap: wrap;
      margin-left: auto;
    }

    .admin-subtabs {
      display: flex;
      gap: 8px;
      padding: 12px 18px;
      border-bottom: 1px solid var(--border);
      background: #fffafd;
      flex-wrap: wrap;
    }

    .request-subtab,
    .admin-subtab {
      background: #f5e9f5;
      color: #6f315f;
    }

    .request-subtab.active,
    .admin-subtab.active {
      background: linear-gradient(135deg, var(--accent-purple), var(--accent));
      color: #fff;
    }

    .admin-section-toolbar {
      padding: 12px 18px;
      border-bottom: 1px solid var(--border);
    }

    .admin-requests-wrap {
      padding: 14px;
    }

    .admin-request-card {
      padding: 16px;
      border: 1px solid var(--border);
      border-radius: 14px;
      background: #fff;
      box-shadow: 0 5px 16px rgba(70, 24, 70, .05);
    }

    .admin-request-card + .admin-request-card {
      margin-top: 12px;
    }

    .admin-request-card.processed {
      background: #fbfafb;
      border-color: #e7e0e6;
    }

    .admin-request-group + .admin-request-group {
      margin-top: 22px;
    }

    .admin-request-group-title {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
      margin-bottom: 10px;
      padding: 0 2px;
    }

    .admin-request-group-title h3 {
      margin: 0;
      font-size: 16px;
    }

    .admin-request-head {
      display: flex;
      justify-content: space-between;
      gap: 12px;
      align-items: flex-start;
      flex-wrap: wrap;
      margin-bottom: 10px;
    }

    .admin-request-meta {
      color: var(--muted);
      font-size: 12px;
      line-height: 1.5;
    }

    .admin-request-description {
      padding: 12px;
      margin: 10px 0 12px;
      border-radius: 10px;
      background: #fff8fc;
      white-space: pre-wrap;
      line-height: 1.45;
    }

    .admin-request-controls {
      display: grid;
      grid-template-columns: minmax(180px, 240px) minmax(260px, 1fr) auto;
      gap: 10px;
      align-items: end;
    }

    .admin-request-controls textarea {
      min-height: 82px;
    }

    input[type="email"] {
      width: 100%;
      padding: 11px 12px;
      border: 1px solid var(--border);
      border-radius: 10px;
      font: inherit;
      color: var(--text);
      background: #fff;
    }

    .app {
      width: 100%;
      margin: 0;
      padding: 0;
    }

    .app-layout {
      display: grid;
      grid-template-columns: 210px minmax(0, 1fr);
      min-height: 100vh;
    }

    .sidebar {
      position: sticky;
      top: 0;
      height: 100vh;
      height: 100dvh;
      min-height: 100vh;
      align-self: start;
      display: flex;
      flex-direction: column;
      padding: 20px 12px;
      background: linear-gradient(180deg, #6d2bd5 0%, #aa1bb4 48%, #df118f 100%);
      color: #fff;
      box-shadow: 8px 0 24px rgba(93, 30, 101, .10);
      z-index: 10;
      overflow-y: auto;
      overflow-x: hidden;
      overscroll-behavior: contain;
      scrollbar-gutter: stable;
    }

    .sidebar-brand {
      padding: 4px 8px 18px;
      margin-bottom: 8px;
      border-bottom: 1px solid rgba(255,255,255,.20);
    }

    .sidebar-brand-row {
      display: flex;
      align-items: flex-start;
      gap: 8px;
      min-width: 0;
      max-width: 100%;
    }

    .sidebar-brand strong {
      display: block;
      flex: 1 1 auto;
      min-width: 0;
      max-width: 100%;
      font-size: 22px;
      line-height: 1.12;
      letter-spacing: .5px;
      white-space: normal;
      word-break: normal;
      overflow-wrap: normal;
    }

    .sidebar-brand-image {
      width: 33px;
      height: 33px;
      flex: 0 0 33px;
      object-fit: contain;
      border-radius: 5px;
    }

    .sidebar-brand span {
      display: block;
      margin-top: 4px;
      font-size: 12px;
      color: rgba(255,255,255,.78);
    }

    .sidebar-footer {
      margin-top: auto;
      padding: 14px 8px 4px;
      border-top: 1px solid rgba(255,255,255,.20);
      color: rgba(255,255,255,.76);
      font-size: 10px;
      line-height: 1.45;
    }

    .sidebar-footer-line + .sidebar-footer-line {
      margin-top: 7px;
    }

    .sidebar-created-with {
      color: rgba(255,255,255,.88);
    }

    .sidebar-heart {
      display: inline-block;
      margin-left: 2px;
      color: #ffd6ef;
      font-size: 12px;
      line-height: 1;
      vertical-align: -1px;
    }

    .workspace {
      min-width: 0;
      min-height: 100vh;
      min-height: 100dvh;
      padding: 8px 24px 30px;
    }

    .topbar {
      position: sticky;
      top: 8px;
      z-index: 320;
      display: flex;
      gap: 12px;
      align-items: center;
      justify-content: space-between;
      flex-wrap: nowrap;
      margin-bottom: 14px;
      padding: 10px 12px 10px 16px;
      background: rgba(255,255,255,.96);
      border: 1px solid var(--border);
      border-radius: 16px;
      box-shadow: 0 10px 28px rgba(59, 25, 63, .10);
      backdrop-filter: blur(14px);
      -webkit-backdrop-filter: blur(14px);
    }

    .title-wrap {
      min-width: 0;
      display: flex;
      align-items: center;
      gap: 7px;
    }

    .title-wrap h1 {
      margin: 0;
      font-size: 27px;
      background: linear-gradient(90deg, var(--accent-purple), var(--accent-pink));
      -webkit-background-clip: text;
      background-clip: text;
      color: transparent;
    }

    .subtitle {
      color: var(--muted);
      font-size: 14px;
    }

    .user-panel {
      display: flex;
      align-items: center;
      justify-content: flex-end;
      gap: 8px;
      flex-wrap: nowrap;
      margin-left: auto;
    }

    .user-chip {
      padding: 8px 10px;
      border: 1px solid var(--border);
      background: #fff;
      border-radius: 10px;
      font-size: 13px;
      line-height: 1.25;
    }

    .user-chip strong { display: block; }

    .top-icon-button {
      width: 42px;
      height: 42px;
      padding: 0;
      display: grid;
      place-items: center;
      border: 1px solid #ead7e7;
      border-radius: 12px;
      background: #fff;
      color: #7f1b76;
      font-size: 19px;
      box-shadow: 0 3px 10px rgba(74, 22, 78, .05);
    }

    .top-icon-button:hover {
      background: #fff6fc;
    }

    .top-icon-button.notification-enabled {
      background: #ecfdf5;
      border-color: #bbf7d0;
    }

    .top-icon-button.notification-blocked {
      opacity: .62;
    }

    .notification-bell-wrap {
      position: relative;
    }

    .notification-bell-button {
      position: relative;
    }

    .notification-badge {
      position: absolute;
      top: -6px;
      right: -6px;
      min-width: 19px;
      height: 19px;
      padding: 0 5px;
      display: grid;
      place-items: center;
      border: 2px solid #fff;
      border-radius: 999px;
      background: #dc2626;
      color: #fff;
      font-size: 10px;
      font-weight: 800;
      line-height: 1;
    }

    .notification-panel {
      position: absolute;
      top: calc(100% + 10px);
      right: 0;
      z-index: 450;
      width: min(410px, calc(100vw - 34px));
      max-height: 520px;
      overflow: hidden;
      border: 1px solid var(--border);
      border-radius: 16px;
      background: #fff;
      box-shadow: 0 22px 60px rgba(60, 20, 65, .22);
    }

    .notification-panel-head {
      display: flex;
      justify-content: space-between;
      align-items: flex-start;
      gap: 10px;
      padding: 14px;
      border-bottom: 1px solid var(--border);
      background: #fffafd;
    }

    .notification-panel-head-actions {
      display: flex;
      align-items: center;
      justify-content: flex-end;
      gap: 7px;
      flex-wrap: wrap;
    }

    .notification-mark-all {
      padding: 7px 9px;
      border-radius: 9px;
      background: #f4e6f3;
      color: #7b176f;
      font-size: 10px;
      font-weight: 800;
      white-space: nowrap;
    }

    .notification-mark-all:hover:not(:disabled) {
      background: #ecd7ea;
    }

    .notification-panel-close {
      width: 28px;
      height: 28px;
      padding: 0;
      display: grid;
      place-items: center;
      background: #f7eef6;
      color: #7a396f;
    }

    .notification-list {
      max-height: 440px;
      overflow-y: auto;
    }

    .notification-item {
      width: 100%;
      padding: 12px 14px;
      display: block;
      border: 0;
      border-bottom: 1px solid #f0e8ef;
      border-radius: 0;
      background: #fff;
      color: var(--text);
      text-align: left;
      cursor: pointer;
    }

    .notification-item:hover {
      background: #fff8fc;
    }

    .notification-item.unread {
      background: #fff1fb;
    }

    .notification-item-topline {
      display: flex;
      align-items: center;
      gap: 7px;
      flex-wrap: wrap;
      margin-bottom: 5px;
    }

    .notification-category {
      display: inline-flex;
      align-items: center;
      min-height: 20px;
      padding: 3px 7px;
      border-radius: 999px;
      font-size: 9px;
      font-weight: 800;
      letter-spacing: .02em;
      white-space: nowrap;
    }

    .notification-category.absence {
      background: #ffedd5;
      color: #9a3412;
    }

    .notification-category.workback {
      background: #ede9fe;
      color: #6d28d9;
    }

    .notification-category.improvement {
      background: #fce7f3;
      color: #9d174d;
    }

    .notification-category.other {
      background: #f3f4f6;
      color: #4b5563;
    }

    .notification-item-title {
      font-size: 12px;
      font-weight: 800;
      color: #6f1e66;
    }

    .notification-item-text {
      font-size: 12px;
      line-height: 1.42;
      color: #514650;
    }

    .notification-item-meta {
      margin-top: 5px;
      font-size: 10px;
      color: var(--muted);
    }

    .profile-icon-button {
      flex: 0 0 42px;
      font-size: 21px;
    }

    .top-timesheet-button {
      min-height: 40px;
      padding: 9px 14px;
      align-self: center;
      border: 1px solid #ead7e7;
      border-radius: 11px;
      background: #fff;
      color: #7f1b76;
      box-shadow: 0 3px 10px rgba(74, 22, 78, .05);
      font-size: 12px;
      font-weight: 800;
      white-space: nowrap;
    }

    .top-timesheet-button:hover {
      background: #fff6fc;
    }

    .top-timesheet-button.active {
      background: linear-gradient(135deg, var(--accent-purple), var(--accent));
      color: #fff;
      border-color: transparent;
    }

    .top-admin-button {
      min-height: 40px;
      padding: 9px 13px;
      align-self: center;
      background: linear-gradient(135deg, #f6e7f7, #fce7f3);
      color: #86127a;
      border: 1px solid #e7c7e2;
      box-shadow: 0 3px 10px rgba(74, 22, 78, .04);
    }

    .owner-refresh-controls {
      flex: 0 0 auto;
      align-items: center;
      gap: 0;
    }

    .top-refresh-yesterday {
      width: auto;
      min-width: 52px;
      height: 30px;
      min-height: 30px;
      padding: 3px 7px 3px 6px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 4px;
      border-radius: 9px;
      font-size: 10px;
      line-height: 1;
      box-shadow: 0 2px 7px rgba(93, 30, 101, .10);
    }

    .top-refresh-yesterday svg {
      width: 14px;
      height: 14px;
      flex: 0 0 14px;
      fill: none;
      stroke: currentColor;
      stroke-width: 2;
      stroke-linecap: round;
      stroke-linejoin: round;
    }

    .yesterday-button-date {
      font-size: 10px;
      font-weight: 900;
      letter-spacing: -.15px;
      white-space: nowrap;
    }

    .top-refresh-yesterday .loader-light {
      width: 12px;
      height: 12px;
      margin: 0;
    }

    .topbar .controls {
      align-items: center;
      gap: 8px;
      flex-wrap: nowrap;
    }

    .top-admin-button.active,
    .top-icon-button.active {
      background: linear-gradient(135deg, var(--accent-purple), var(--accent));
      color: #fff;
      border-color: transparent;
    }

    .controls {
      display: flex;
      align-items: flex-end;
      gap: 10px;
      flex-wrap: wrap;
    }

    .field label {
      display: block;
      margin-bottom: 6px;
      color: var(--muted);
      font-size: 12px;
      font-weight: 700;
    }

    select,
    button,
    textarea,
    input {
      font: inherit;
    }

    select {
      min-width: 160px;
      padding: 10px 12px;
      border: 1px solid var(--border);
      border-radius: 10px;
      background: #fff;
      color: var(--text);
    }

    input[type="date"] {
      min-width: 170px;
      padding: 9px 12px;
      border: 1px solid var(--border);
      border-radius: 10px;
      background: #fff;
      color: var(--text);
      cursor: pointer;
    }

    input[type="date"]:focus,
    select:focus,
    textarea:focus,
    .profile-input:focus {
      outline: none;
      border-color: var(--accent);
      box-shadow: 0 0 0 3px rgba(203, 17, 171, .12);
    }

    input[type="date"]:disabled {
      cursor: not-allowed;
      background: #f5f1f5;
      color: #a39aa5;
    }

    button {
      border: 0;
      border-radius: 10px;
      padding: 10px 14px;
      cursor: pointer;
      font-weight: 700;
    }

    button:disabled {
      cursor: not-allowed;
      opacity: .6;
    }

    .btn-primary {
      background: linear-gradient(135deg, var(--accent-purple), var(--accent));
      color: #fff;
    }

    .btn-primary:hover:not(:disabled) {
      filter: brightness(.96);
    }

    .btn-secondary {
      background: var(--accent-soft);
      color: #8f157f;
    }

    .btn-light {
      background: #f6f0f6;
      color: #5f5262;
    }

    .btn-wide { width: 100%; }

    .status {
      min-height: 22px;
      margin: 0 0 12px;
      font-size: 14px;
    }

    .status.ok { color: #166534; }
    .status.error { color: #b91c1c; }

    #suggestionStatus.error {
      color: #b91c1c;
      font-weight: 700;
    }

    .tabs {
      display: flex;
      flex-direction: column;
      gap: 10px;
      margin: 0;
    }

    .sidebar-group {
      display: flex;
      flex-direction: column;
      gap: 6px;
    }

    .sidebar-group-separated {
      margin-top: 8px;
      padding-top: 14px;
      border-top: 1px solid rgba(255,255,255,.26);
    }

    .sidebar-group-label {
      padding: 0 10px 3px;
      color: rgba(255,255,255,.62);
      font-size: 9px;
      font-weight: 800;
      letter-spacing: .10em;
      text-transform: uppercase;
    }

    .tab {
      width: 100%;
      padding: 11px 12px;
      text-align: left;
      background: transparent;
      color: rgba(255,255,255,.88);
      border: 1px solid transparent;
      font-size: 13px;
    }

    .tab:hover:not(.active) {
      background: rgba(255,255,255,.10);
      color: #fff;
    }

    .tab.active {
      background: #fff;
      color: #94128a;
      box-shadow: 0 6px 18px rgba(58, 15, 74, .16);
    }


    /* Одна плашка «Фрод»: три внутренних отчёта без двойных рамок. */
    .fraud-subtabs {
      display: flex;
      gap: 8px;
      padding: 12px 16px;
      border-bottom: 1px solid var(--border);
      background: #fffafd;
      flex-wrap: wrap;
    }
    .fraud-subtab {
      padding: 9px 14px;
      border: 1px solid #ead7e7;
      border-radius: 9px;
      background: #fff;
      color: #7f1b76;
      cursor: pointer;
      font: inherit;
      font-weight: 650;
    }
    .fraud-subtab.active {
      background: linear-gradient(135deg, var(--accent-purple), var(--accent));
      color: #fff;
      border-color: transparent;
    }
    #fraudPanel > #fraudCard,
    #fraudPanel > #fraudWeeklyCard,
    #fraudPanel > #fraudTrendCard {
      border: 0;
      border-radius: 0;
      box-shadow: none;
    }


    /* Fraud trend: scroll-safe chart and compact multi-select RG list. */
    .fraud-trend-managers {display:flex;flex-wrap:wrap;gap:8px;padding:10px 16px;align-items:center}
    .fraud-trend-managers label {display:inline-flex;align-items:center;gap:6px;padding:6px 9px;
      border:1px solid #ead7e7;border-radius:8px;background:#fff;font-size:12px;cursor:pointer}
    .fraud-trend-managers input {accent-color:#9b218b}
    .fraud-trend-scroll {overflow-x:auto;width:100%;padding:5px 12px 12px}
    .fraud-trend-scroll svg {display:block;min-width:680px;max-width:none}
    .fraud-trend-legend {display:flex;flex-wrap:wrap;gap:12px;padding:4px 18px 12px;font-size:12px}
    .fraud-trend-legend span {display:inline-flex;align-items:center;gap:6px}
    .fraud-trend-legend i {display:inline-block;width:13px;height:13px;border-radius:3px}
    .fraud-trend-bar {transition:opacity .12s ease}
    .fraud-trend-bar:hover {opacity:.78}
    .fraud-trend-value {paint-order:stroke;stroke:#fff;stroke-width:2.6px;stroke-linejoin:round}
    .backlog-subtabs {
      display: flex;
      gap: 8px;
      padding: 12px 16px 0;
      overflow-x: auto;
    }

    .backlog-subtab {
      flex: 0 0 auto;
      padding: 9px 13px;
      border: 1px solid #ead7e7;
      background: #fff;
      color: #7f1b76;
      white-space: nowrap;
    }

    .backlog-subtab.active {
      background: linear-gradient(135deg, var(--accent-purple), var(--accent));
      color: #fff;
      border-color: transparent;
    }

    .backlog-panel-head h3 {
      margin: 0 0 4px;
      font-size: 18px;
      color: #6f1e66;
    }

    .operations-flow-table-wrap {
      margin: 0 16px 18px;
      max-height: 68vh;
    }

    .operations-flow-table-wrap td:nth-child(2),
    .operations-flow-table-wrap td:nth-child(3),
    .operations-flow-table-wrap th:nth-child(2),
    .operations-flow-table-wrap th:nth-child(3) {
      text-align: right;
    }

    .backlog-panel {
      margin-bottom: 14px;
      padding: 16px 18px;
      background: rgba(255,255,255,.92);
      border: 1px solid var(--border);
      border-radius: 18px;
      box-shadow: var(--shadow);
    }

    .backlog-panel.hidden {
      display: none !important;
    }

    .backlog-panel-head {
      display: flex;
      justify-content: space-between;
      align-items: flex-start;
      gap: 14px;
      flex-wrap: wrap;
    }

    .backlog-panel-head h2 {
      margin: 0 0 3px;
      font-size: 18px;
    }

    .backlog-filters {
      display: flex;
      align-items: flex-end;
      justify-content: flex-end;
      gap: 8px;
      flex-wrap: wrap;
    }

    .backlog-admin-entry {
      margin-top: 14px;
      padding: 13px;
      border: 1px solid #ead0e5;
      border-radius: 13px;
      background: #fff8fc;
    }

    .backlog-admin-title {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
      list-style: none;
      cursor: pointer;
      color: #751369;
      font-size: 13px;
      font-weight: 800;
      user-select: none;
    }

    .backlog-admin-title::-webkit-details-marker {
      display: none;
    }

    .backlog-admin-title::after {
      content: '⌄';
      flex: 0 0 auto;
      font-size: 18px;
      line-height: 1;
      transition: transform .16s ease;
    }

    .backlog-admin-entry[open] > .backlog-admin-title::after {
      transform: rotate(180deg);
    }

    .backlog-admin-grid {
      margin-top: 12px;
      display: grid;
      grid-template-columns: repeat(3, minmax(180px, 1fr));
      gap: 12px 16px;
      align-items: end;
    }

    .backlog-admin-grid > * {
      min-width: 0;
    }

    .backlog-admin-grid .profile-field,
    .backlog-admin-grid .profile-input {
      width: 100%;
      min-width: 0;
    }

    .backlog-save-wrap {
      display: flex;
      flex-direction: column;
      justify-content: flex-end;
      gap: 4px;
      min-width: 0;
    }

    .backlog-point-editable {
      cursor: pointer;
      transition: r .12s ease, filter .12s ease;
    }

    .backlog-point-editable:hover {
      filter: brightness(.82);
    }

    .backlog-edit-grid {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 12px;
    }

    .backlog-summary-row {
      display: grid;
      grid-template-columns: minmax(150px, 210px) minmax(150px, 210px) minmax(300px, 1fr);
      gap: 10px;
      margin-top: 14px;
      align-items: stretch;
    }

    @media (max-width: 980px) {
      .backlog-summary-row { grid-template-columns: repeat(2, minmax(150px, 1fr)); }
      .backlog-details-card { grid-column: 1 / -1; }
    }

    .backlog-summary-card {
      padding: 11px 13px;
      border: 1px solid var(--border);
      border-radius: 12px;
      background: #fffafd;
    }

    .backlog-summary-card span {
      display: block;
      margin-bottom: 3px;
      color: var(--muted);
      font-size: 10px;
      font-weight: 800;
      text-transform: uppercase;
    }

    .backlog-summary-card strong {
      font-size: 21px;
      color: #6d2bd5;
    }

    .backlog-summary-card:nth-child(2) strong {
      color: #cb11ab;
    }

    .backlog-summary-note {
      align-self: center;
      color: var(--muted);
      font-size: 11px;
      line-height: 1.45;
    }

    .backlog-details-card {
      position: relative;
      padding: 10px 38px 10px 13px;
      border: 1px solid var(--border);
      border-radius: 12px;
      background: #fffafd;
      min-width: 0;
    }

    .backlog-details-title {
      color: var(--muted);
      font-size: 10px;
      font-weight: 800;
      text-transform: uppercase;
      margin-bottom: 5px;
    }

    .backlog-oldest-line {
      font-size: 12px;
      font-weight: 800;
      color: #2d2230;
      margin-bottom: 7px;
      word-break: break-word;
    }

    .backlog-date-breakdown {
      display: flex;
      flex-wrap: wrap;
      gap: 4px 10px;
      color: var(--muted);
      font-size: 11px;
      line-height: 1.35;
    }

    .backlog-copy-btn {
      position: absolute;
      top: 8px;
      right: 8px;
      width: 26px;
      height: 26px;
      border: 1px solid var(--border);
      border-radius: 8px;
      background: #fff;
      cursor: pointer;
      font-size: 14px;
      line-height: 1;
    }

    .backlog-copy-btn:hover { background: #fff1fb; }


    .backlog-chart-wrap {
      min-height: 290px;
      margin-top: 14px;
      padding: 8px 6px 2px;
      border: 1px solid var(--border);
      border-radius: 14px;
      background: #fff;
      overflow-x: auto;
    }

    .backlog-chart {
      width: 100%;
      min-width: 760px;
      height: auto;
      display: block;
    }

    .backlog-chart-legend {
      display: flex;
      gap: 16px;
      align-items: center;
      padding: 4px 10px 0;
      color: var(--muted);
      font-size: 11px;
    }

    .backlog-legend-item {
      display: inline-flex;
      align-items: center;
      gap: 6px;
    }

    .backlog-legend-line {
      width: 22px;
      height: 3px;
      border-radius: 999px;
    }

    .backlog-legend-track {
      background: #6d2bd5;
    }

    .backlog-legend-resale {
      background: #cb11ab;
    }

    .card {
      display: none;
      background: var(--card);
      border: 1px solid var(--border);
      border-radius: 18px;
      box-shadow: var(--shadow);
      overflow: hidden;
    }

    .card.active { display: block; }

    .card-header {
      padding: 16px 18px;
      border-bottom: 1px solid var(--border);
      background: linear-gradient(90deg, #ffffff 0%, #fff8fc 100%);
      display: flex;
      justify-content: space-between;
      align-items: flex-end;
      gap: 12px;
      flex-wrap: wrap;
    }

    .card-title-row {
      display: flex;
      gap: 12px;
      align-items: center;
      flex-wrap: wrap;
    }

    .card-header h2 {
      margin: 0;
      font-size: 18px;
    }

    .counter {
      font-size: 13px;
      color: var(--muted);
    }

    .table-wrap {
      width: 100%;
      overflow: auto;
      max-height: 70vh;
    }

    table {
      width: 100%;
      border-collapse: separate;
      border-spacing: 0;
      min-width: 900px;
    }

    th, td {
      padding: 11px 12px;
      border-bottom: 1px solid var(--border);
      border-right: 1px solid var(--border);
      text-align: left;
      vertical-align: middle;
      background: #fff;
    }

    th:last-child, td:last-child { border-right: 0; }

    th {
      position: sticky;
      top: 0;
      z-index: 2;
      background: #fff7fc;
      font-size: 12px;
      color: #475569;
      white-space: nowrap;
    }

    td { font-size: 14px; }

    tr.date-break td {
      border-top: 3px solid #dbe3ef;
    }

    .absence-total-row td {
      background: #f8fafc;
      border-top: 2px solid #cbd5e1;
      border-bottom: 0;
      font-weight: 700;
    }

    .absence-total-label {
      color: #475569;
    }

    .absence-total-value {
      font-variant-numeric: tabular-nums;
    }

    .num {
      text-align: center;
      font-variant-numeric: tabular-nums;
    }

    /* Компактная сетка только для «Выработки операторов».
       Все числовые столбцы, включая отсутствие, имеют общую ширину 112px.
       На остальных таблицах эти правила не отражаются. */
    #productionTableWrap .production-table {
      table-layout: fixed;
      min-width: 100%;
    }

    #productionTableWrap .production-table th,
    #productionTableWrap .production-table td {
      box-sizing: border-box;
      overflow-wrap: break-word;
    }

    #productionTableWrap .production-table th.production-number-col {
      white-space: normal;
      line-height: 1.3;
      text-align: center;
      padding: 9px 5px;
    }

    #productionTableWrap .production-table td.production-number-col {
      text-align: center;
      padding-left: 5px;
      padding-right: 5px;
    }

    #productionTableWrap .production-table td.production-number-col.history-editable {
      padding-right: 30px !important;
    }

    #productionTableWrap .production-table td.production-id-col,
    #productionTableWrap .production-table th.production-id-col {
      overflow-wrap: anywhere;
    }

    #productionTableWrap .production-table th:not(.production-number-col) {
      white-space: normal;
      line-height: 1.3;
    }

    #productionTableWrap .production-table .header-filter-wrap,
    #productionTableWrap .production-table .manager-multi-filter {
      min-width: 0;
    }

    .daily-summary-date-with-copy {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      white-space: nowrap;
    }

    .daily-summary-copy-btn {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 25px;
      height: 25px;
      padding: 0;
      border: 1px solid #ead2e9;
      border-radius: 7px;
      background: #fff6fd;
      color: #9d0b8b;
      cursor: pointer;
      flex-shrink: 0;
    }

    .daily-summary-copy-btn:hover {
      background: #f7dcf4;
      border-color: #cf9bc9;
    }

    .daily-summary-copy-btn:focus-visible {
      outline: 2px solid #9d0b8b;
      outline-offset: 2px;
    }

    .weekly-summary-compare-row td {
      background: #fff8fc;
      color: #6f315f;
      font-weight: 700;
      border-top: 1px dashed #dfc4da;
      border-bottom: 1px dashed #dfc4da;
    }

    .weekly-summary-period {
      white-space: nowrap;
      font-weight: 800;
    }

    .weekly-summary-compare-label {
      white-space: nowrap;
      font-size: 11px;
      line-height: 1.3;
    }

    /* Итоги дня / недели: первый столбец всегда остаётся видимым при горизонтальной прокрутке. */
    #dailySummaryWrap table th:first-child,
    #dailySummaryWrap table td:first-child,
    #weeklySummaryWrap table th:first-child,
    #weeklySummaryWrap table td:first-child {
      position: sticky;
      left: 0;
      min-width: 172px;
      width: 172px;
      box-sizing: border-box;
      box-shadow: 5px 0 8px rgba(60, 20, 65, .08);
    }

    #dailySummaryWrap table th:first-child,
    #weeklySummaryWrap table th:first-child {
      z-index: 6;
      background: #fff7fc;
    }

    #dailySummaryWrap table td:first-child,
    #weeklySummaryWrap table td:first-child {
      z-index: 3;
      background: #fff;
    }

    #weeklySummaryWrap .weekly-summary-compare-row td:first-child {
      background: #fff8fc;
    }

    /* Итоги Track/Resale: чередуем исходный фон и фирменный светло-фиолетовый. */
    #dailySummaryWrap table th:nth-child(even),
    #dailySummaryWrap table td:nth-child(even),
    #weeklySummaryWrap table th:nth-child(even),
    #weeklySummaryWrap table td:nth-child(even) {
      background: var(--accent-soft);
    }
    #dailySummaryWrap table td:first-child,
    #weeklySummaryWrap table td:first-child {
      background: #fff;
    }
    #weeklySummaryWrap .weekly-summary-compare-row td:nth-child(even) {
      background: var(--accent-soft);
    }


    .history-editable {
      position: relative;
      padding-right: 34px !important;
    }

    .history-edit-button {
      position: absolute;
      top: 50%;
      right: 7px;
      transform: translateY(-50%);
      width: 24px;
      height: 24px;
      padding: 0;
      display: grid;
      place-items: center;
      border-radius: 7px;
      background: var(--accent-soft);
      color: #8f157f;
      font-size: 12px;
      opacity: .48;
    }

    .history-editable:hover .history-edit-button,
    .history-edit-button:focus {
      opacity: 1;
    }

    .zero-history-nonworking td {
      background: #fee2e2 !important;
    }

    .zero-history-nonworking textarea:disabled {
      background: #fdecec !important;
      border-color: #fecaca;
    }

    .history-modal {
      position: fixed;
      inset: 0;
      z-index: 200;
      display: grid;
      place-items: center;
      padding: 18px;
      background: rgba(44, 18, 47, .38);
    }

    .history-modal-card {
      width: min(520px, 100%);
      padding: 20px;
      border: 1px solid var(--border);
      border-radius: 18px;
      background: #fff;
      box-shadow: 0 24px 60px rgba(62, 20, 67, .22);
    }

    .history-modal-card h3 {
      margin: 0 0 7px;
    }

    .history-modal-meta {
      margin-bottom: 16px;
      color: var(--muted);
      font-size: 12px;
    }

    .history-modal-input {
      width: 100%;
    }

    .history-modal-input textarea {
      min-height: 120px;
    }

    .history-modal-actions {
      display: flex;
      justify-content: flex-end;
      gap: 8px;
      margin-top: 16px;
    }

    .target-good {
      background: var(--green) !important;
      color: var(--green-text);
      font-weight: 700;
    }

    .target-bad {
      background: var(--red) !important;
      color: var(--red-text);
      font-weight: 700;
    }

    .util-low {
      background: #fee2e2 !important;
      color: #991b1b;
      font-weight: 700;
    }

    .util-mid {
      background: #fef3c7 !important;
      color: #92400e;
      font-weight: 700;
    }

    .util-high {
      background: #dcfce7 !important;
      color: #166534;
      font-weight: 700;
    }

    .util-total-row td {
      background: #fff7fc;
      border-top: 2px solid #e6c7df;
      font-weight: 700;
    }

    .schedule-working {
      color: #166534;
      font-weight: 700;
    }

    .schedule-off { color: #6b7280; }

    .schedule-empty {
      color: #b45309;
      font-weight: 700;
    }

    .comment-cell { min-width: 340px; }

    .header-filter-wrap {
      display: flex;
      flex-direction: column;
      gap: 7px;
      min-width: 150px;
    }

    .header-filter-wrap .header-title {
      font-weight: 700;
      line-height: 1.2;
    }

    .header-filter {
      width: 100%;
      min-width: 0;
      padding: 6px 8px;
      border: 1px solid #dbe1ea;
      border-radius: 7px;
      background: #fff;
      color: #475569;
      font-size: 11px;
      font-weight: 400;
    }

    .manager-multi-filter {
      position: relative;
      min-width: 170px;
    }

    .manager-multi-filter summary {
      list-style: none;
      cursor: pointer;
      padding: 6px 8px;
      border: 1px solid #dbe1ea;
      border-radius: 7px;
      background: #fff;
      color: #475569;
      font-size: 11px;
      font-weight: 400;
      user-select: none;
    }

    .manager-multi-filter summary::-webkit-details-marker {
      display: none;
    }

    .manager-multi-filter summary::after {
      content: ' ▾';
      float: right;
      color: #9b7b98;
    }

    .manager-multi-panel {
      position: absolute;
      top: calc(100% + 5px);
      left: 0;
      z-index: 40;
      width: max(240px, 100%);
      max-width: 340px;
      padding: 9px;
      background: #fff;
      border: 1px solid var(--border);
      border-radius: 10px;
      box-shadow: 0 12px 30px rgba(69, 24, 70, .16);
    }

    .manager-multi-options {
      max-height: 190px;
      overflow: auto;
      display: flex;
      flex-direction: column;
      gap: 4px;
    }

    .manager-multi-option {
      display: flex;
      gap: 7px;
      align-items: flex-start;
      padding: 5px 4px;
      font-size: 12px;
      font-weight: 400;
      white-space: normal;
      cursor: pointer;
    }

    .manager-multi-option input {
      margin-top: 2px;
      flex: 0 0 auto;
    }

    .manager-multi-actions {
      display: flex;
      justify-content: flex-end;
      margin-top: 7px;
      padding-top: 7px;
      border-top: 1px solid var(--border);
    }

    .manager-multi-reset {
      padding: 5px 8px;
      background: var(--accent-soft);
      color: #8f157f;
      font-size: 11px;
    }

    .comment-box {
      display: flex;
      flex-direction: column;
      gap: 4px;
      align-items: stretch;
    }

    .comment-save-status {
      min-height: 14px;
      padding-left: 2px;
      color: #9ca3af;
      font-size: 11px;
      line-height: 1.25;
    }

    .comment-save-status.error {
      color: #b91c1c;
    }

    textarea {
      width: 100%;
      min-height: 64px;
      resize: vertical;
      border: 1px solid var(--border);
      border-radius: 8px;
      padding: 8px 10px;
      color: var(--text);
      background: #fff;
    }

    textarea:disabled {
      resize: none;
      background: #f8fafc;
      color: #475569;
      cursor: default;
      border-color: #e2e8f0;
    }

    .comment-editor-line {
      display: flex;
      align-items: flex-start;
      gap: 7px;
    }

    .comment-editor-line textarea {
      flex: 1;
      min-width: 0;
    }

    .comment-edit-btn {
      flex: 0 0 auto;
      width: 34px;
      height: 34px;
      padding: 0;
      display: grid;
      place-items: center;
      background: var(--accent-soft);
      color: #94128a;
      border: 1px solid #f0cdec;
      border-radius: 8px;
      font-size: 15px;
      line-height: 1;
    }

    .comment-edit-btn:hover:not(:disabled) {
      background: #f6dff3;
    }

    .empty {
      padding: 28px;
      text-align: center;
      color: var(--muted);
    }

    .loader-dark,
    .loader-light {
      display: inline-block;
      width: 14px;
      height: 14px;
      margin-right: 6px;
      border: 2px solid rgba(37, 99, 235, .25);
      border-top-color: var(--accent);
      border-radius: 50%;
      animation: spin .7s linear infinite;
      vertical-align: -2px;
    }

    .loader-light {
      border-color: rgba(255,255,255,.45);
      border-top-color: #fff;
    }

    @keyframes spin { to { transform: rotate(360deg); } }

    .bi-refresh-loading {
      opacity: .82;
      cursor: wait !important;
      white-space: nowrap;
      display: inline-flex !important;
      align-items: center;
      justify-content: center;
      gap: 6px;
    }

    .bi-refresh-loading .loader-dark {
      margin-right: 0;
      flex: 0 0 auto;
      animation: spin .7s linear infinite !important;
    }

    .bi-refresh-loading:disabled {
      opacity: .82;
      cursor: wait !important;
    }

    .bi-settings-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
      gap: 16px;
      margin-top: 14px;
    }

    .bi-settings-card {
      border: 1px solid #efd5eb;
      background: #fff;
      border-radius: 14px;
      padding: 16px;
      box-shadow: 0 4px 14px rgba(104, 30, 99, .05);
    }

    .bi-settings-card h3 {
      margin: 0 0 6px;
      font-size: 16px;
    }

    .bi-settings-link {
      display: block;
      margin-bottom: 12px;
      color: var(--accent);
      word-break: break-all;
      font-size: 12px;
    }

    .bi-settings-fields {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 10px;
    }

    .bi-settings-fields .full {
      grid-column: 1 / -1;
    }

    .bi-filter-list {
      display: grid;
      gap: 8px;
      margin-top: 12px;
    }

    .bi-filter-row {
      display: grid;
      grid-template-columns: minmax(120px, .7fr) minmax(160px, 1.3fr);
      gap: 8px;
      align-items: start;
    }

    .bi-filter-key {
      padding-top: 9px;
      font-size: 12px;
      font-weight: 700;
      color: #5a2f57;
    }

    .bi-filter-note {
      margin-top: 3px;
      font-size: 10px;
      color: var(--muted);
    }

    .bi-diagnostics-panel {
      border: 1px solid #e6d9e5;
      border-radius: 14px;
      padding: 14px;
      background: #fbf8fb;
    }

    .bi-diagnostics-list {
      display: grid;
      gap: 7px;
      margin-top: 10px;
      font-size: 13px;
    }

    .bi-diag-ok { color: #18864b; font-weight: 700; }
    .bi-diag-error { color: #bb2d3b; font-weight: 700; }
    .bi-diag-wait { color: var(--muted); }


    /* Администрирование: вертикальная навигация и более компактная служебная зона. */
    #administrationCard.active {
      display: grid;
      grid-template-columns: 230px minmax(0, 1fr);
      grid-template-rows: auto minmax(520px, auto) auto;
      overflow: visible;
      background: linear-gradient(180deg, #fff 0%, #fffafe 100%);
      border-color: #ead5e6;
      box-shadow: 0 12px 32px rgba(97, 29, 90, .08);
    }

    #administrationCard > .card-header {
      grid-column: 1 / -1;
      grid-row: 1;
      padding: 18px 20px;
      background: linear-gradient(135deg, #fff7fd, #ffffff);
      border-bottom: 1px solid #ead9e8;
    }

    #administrationCard > .admin-subtabs {
      grid-column: 1;
      grid-row: 2;
      display: flex;
      flex-direction: column;
      align-items: stretch;
      gap: 7px;
      padding: 14px 12px;
      margin: 0;
      border: 0;
      border-right: 1px solid #ead9e8;
      background: linear-gradient(180deg, #fff7fc 0%, #fbf7fb 100%);
      min-width: 0;
    }

    #administrationCard > .admin-subtabs .admin-subtab {
      width: 100%;
      min-height: 42px;
      display: flex;
      align-items: center;
      justify-content: flex-start;
      text-align: left;
      padding: 10px 12px;
      border-radius: 11px;
      background: transparent;
      color: #6d4265;
      border: 1px solid transparent;
      font-size: 12px;
      font-weight: 750;
      box-shadow: none;
    }

    #administrationCard > .admin-subtabs .admin-subtab:hover {
      background: #fff;
      border-color: #edd9e8;
      color: #8d197b;
    }

    #administrationCard > .admin-subtabs .admin-subtab.active {
      background: linear-gradient(135deg, #8f28d8, #cf149f);
      color: #fff;
      border-color: transparent;
      box-shadow: 0 7px 18px rgba(166, 28, 143, .18);
    }

    #administrationCard > #adminLoadMonitorSection,
    #administrationCard > #adminProfilesSection,
    #administrationCard > #adminOperatorRolesSection,
    #administrationCard > #adminRequestsSection,
    #administrationCard > #adminAbsenceApprovalsSection,
    #administrationCard > #adminWorkbacksSection,
    #administrationCard > #adminBiExportsSection {
      grid-column: 2;
      grid-row: 2;
      min-width: 0;
      background: #fff;
    }

    .admin-channel-checks {
      grid-column: 1 / -1;
      grid-row: 3;
      padding: 9px 12px 10px;
      border-top: 1px solid #ead9e8;
      background: #fcf9fc;
      color: var(--muted);
    }

    .admin-channel-checks-head {
      display: flex;
      align-items: center;
      gap: 10px;
      margin-bottom: 6px;
      font-size: 10px;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: .04em;
    }

    .admin-channel-checks-actions {
      display: flex;
      align-items: center;
      gap: 6px;
      flex-wrap: wrap;
    }

    .admin-mini-action {
      min-height: 28px !important;
      padding: 5px 8px !important;
      border-radius: 8px !important;
      font-size: 10px !important;
      font-weight: 650 !important;
    }

    .admin-bi-section {
      padding: 16px 18px 18px;
    }

    .admin-bi-heading {
      display: flex;
      justify-content: space-between;
      gap: 12px;
      align-items: flex-start;
      margin-bottom: 12px;
    }

    .admin-bi-heading h3 {
      margin: 0 0 4px;
      font-size: 18px;
      color: #3b1836;
    }

    .bi-admin-subtabs {
      display: inline-flex;
      gap: 5px;
      padding: 4px;
      margin-bottom: 12px;
      background: #f6edf5;
      border: 1px solid #ecd9e9;
      border-radius: 11px;
    }

    .bi-admin-subtab {
      border: 0;
      border-radius: 8px;
      background: transparent;
      color: #6d4265;
      padding: 7px 12px;
      font-size: 11px;
      font-weight: 750;
    }

    .bi-admin-subtab.active {
      background: #fff;
      color: #a31588;
      box-shadow: 0 2px 8px rgba(83, 28, 77, .09);
    }

    .bi-settings-toolbar,
    .bi-history-toolbar {
      padding: 10px 0 12px;
      border: 0;
    }

    .bi-history-wrap {
      overflow: auto;
      border: 1px solid #eadce8;
      border-radius: 12px;
      background: #fff;
    }

    .bi-history-table {
      width: 100%;
      min-width: 1060px;
      border-collapse: collapse;
    }

    .bi-history-table th,
    .bi-history-table td {
      padding: 9px 10px;
      border-bottom: 1px solid #f0e5ee;
      text-align: left;
      vertical-align: top;
      font-size: 11px;
    }

    .bi-history-table th {
      position: sticky;
      top: 0;
      z-index: 1;
      background: #fff7fc;
      color: #6f315f;
      font-weight: 800;
      white-space: nowrap;
    }

    .bi-history-status {
      display: inline-flex;
      align-items: center;
      padding: 3px 7px;
      border-radius: 999px;
      font-size: 10px;
      font-weight: 800;
      white-space: nowrap;
    }

    .bi-history-status.success { background: #e4f7eb; color: #17683c; }
    .bi-history-status.failed { background: #fde8ec; color: #a52138; }
    .bi-history-status.running { background: #fff5d8; color: #8b650e; }
    .bi-history-status.cancelled { background: #f0edf1; color: #655c64; }

    .bi-history-action-btn {
      border: 1px solid #e4d3e1;
      background: #fff;
      color: #8c2676;
      border-radius: 8px;
      padding: 5px 8px;
      font-size: 10px;
      font-weight: 800;
      line-height: 1.1;
      cursor: pointer;
      white-space: nowrap;
    }
    .bi-history-action-btn:hover { background: #fff5fb; }
    .bi-history-action-btn.cancel { color: #a15f00; border-color: #ecd7a5; background: #fffaf0; }
    .bi-history-action-btn.delete { color: #a52138; border-color: #efcbd2; background: #fff7f8; }
    .bi-history-action-btn:disabled { opacity: .55; cursor: default; }

    .bi-history-queue {
      display: inline-flex;
      align-items: center;
      margin-top: 4px;
      padding: 2px 6px;
      border-radius: 999px;
      background: #f2e7ff;
      color: #7623a8;
      font-size: 9px;
      font-weight: 800;
      white-space: nowrap;
    }

    .bi-history-phase {
      display: block;
      margin-top: 3px;
      color: #765d70;
      font-size: 9px;
      line-height: 1.2;
    }

    .bi-history-detail {
      max-width: 360px;
      white-space: normal;
      overflow-wrap: anywhere;
      color: #5d4c59;
    }

    .bi-diagnostics-compact {
      margin-top: 18px;
      padding: 9px 10px;
      border-radius: 10px;
      background: #fbf9fb;
      border-color: #eee2ec;
    }

    .bi-diagnostics-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
    }

    .bi-diagnostics-compact strong {
      font-size: 11px;
    }

    .bi-diagnostics-compact .counter,
    .bi-diagnostics-compact .bi-diagnostics-list {
      font-size: 9.5px;
      line-height: 1.35;
    }

    .bi-diagnostics-compact .bi-diagnostics-list {
      gap: 3px;
      margin-top: 6px;
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .bi-diagnostics-button {
      min-height: 28px !important;
      padding: 5px 8px !important;
      font-size: 10px !important;
    }

    @media (max-width: 900px) {
      #administrationCard.active {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto auto;
      }

      #administrationCard > .admin-subtabs {
        grid-column: 1;
        grid-row: 2;
        border-right: 0;
        border-bottom: 1px solid #ead9e8;
      }

      #administrationCard > #adminLoadMonitorSection,
    #administrationCard > #adminProfilesSection,
      #administrationCard > #adminOperatorRolesSection,
      #administrationCard > #adminRequestsSection,
      #administrationCard > #adminAbsenceApprovalsSection,
      #administrationCard > #adminWorkbacksSection,
      #administrationCard > #adminBiExportsSection {
        grid-column: 1;
        grid-row: 3;
      }

      .admin-channel-checks {
        grid-column: 1;
        grid-row: 4;
      }

      .top-timesheet-button {
        min-height: 36px;
        padding: 8px 10px;
        font-size: 11px;
      }


      .app-layout {
        grid-template-columns: 1fr;
        min-height: auto;
      }

      .sidebar {
        position: static;
        height: auto;
        padding: 10px 12px;
      }

      .sidebar-brand {
        display: none;
      }

      .tabs {
        flex-direction: row;
        overflow-x: auto;
        padding-bottom: 2px;
      }

      .tab {
        width: auto;
        flex: 0 0 auto;
        white-space: nowrap;
      }

      .workspace {
        padding: 6px 12px 20px;
      }

      .topbar {
        top: 6px;
        padding: 8px 9px 8px 12px;
        gap: 8px;
      }

      .title-wrap {
        min-width: 0;
        flex: 1 1 auto;
      }

      .title-wrap h1 {
        margin: 0;
        font-size: 18px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
      }

      .topbar .controls,
      .topbar .user-panel {
        width: auto;
      }

      .topbar .user-panel {
        flex: 0 0 auto;
        gap: 6px;
      }

      .top-refresh-yesterday {
        min-width: 48px;
        height: 28px;
        min-height: 28px;
        padding: 3px 6px;
      }

      .top-admin-button {
        min-height: 38px;
        padding: 8px 10px;
        font-size: 11px;
      }

      .top-icon-button {
        width: 38px;
        height: 38px;
      }

      .backlog-admin-grid,
      .backlog-summary-row,
      .backlog-edit-grid,
      .data-upload-form,
      .timesheet-add-grid {
        grid-template-columns: 1fr;
      }

      .data-upload-form .full,
      .data-upload-form .profile-actions {
        grid-column: 1;
      }

      .backlog-filters {
        width: 100%;
        justify-content: flex-start;
      }

      .backlog-filters .inline-filter-label {
        width: 100%;
      }
      .field, .field select, .field input[type="date"] { width: 100%; }
      .controls button { flex: 1; }
      .comment-box { flex-direction: column; }
      .header-filter-wrap { min-width: 135px; }
      .profile-form { grid-template-columns: 1fr; }
      .profile-form .profile-field.full,
      .profile-actions,
      .profile-help { grid-column: 1; }

      .admin-layout {
        grid-template-columns: 1fr;
      }

      .admin-user-list-wrap {
        border-right: 0;
        border-bottom: 1px solid var(--border);
      }

      .admin-user-list {
        max-height: 260px;
      }

      .admin-profile-grid {
        grid-template-columns: 1fr;
      }

      .admin-access-editor-grid {
        grid-template-columns: 1fr;
      }

      .admin-add-user-grid {
        grid-template-columns: 1fr;
      }

      .admin-request-controls {
        grid-template-columns: 1fr;
      }

      .absence-request-grid,
      .request-detail-grid,
      .workback-edit-grid,
      .dialog-compose {
        grid-template-columns: 1fr;
      }


      .section-filter-row {
        width: 100%;
        justify-content: flex-start;
      }

      .inline-filter-label {
        width: 100%;
        align-items: stretch;
        flex-direction: column;
      }

      .compact-filter,
      .inline-filter-label .compact-filter {
        width: 100%;
        min-width: 0;
      }

      .notification-panel-head {
        align-items: stretch;
      }

      .notification-panel-head-actions {
        align-items: flex-end;
      }

      .notification-mark-all {
        white-space: normal;
      }

      .request-number-filter {
        width: 100%;
        min-width: 0;
      }

      .sidebar-footer {
        margin-top: 10px;
      }
    }

    .fraud-summary-row {
      cursor: pointer;
    }

    .fraud-summary-row:hover td {
      background: #fff5fc;
    }

    .fraud-summary-row:focus-within td {
      background: #fff0fa;
    }

    .fraud-count-cell {
      font-weight: 900;
      color: #7f126f;
      text-align: right;
    }

    .fraud-total-row td {
      position: sticky;
      bottom: 0;
      z-index: 3;
      background: #f8eef8;
      border-top: 2px solid #d8b6d5;
      font-weight: 900;
    }

    .fraud-detail-head {
      padding: 14px 18px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      flex-wrap: wrap;
      border-bottom: 1px solid var(--border);
      background: #fffafd;
    }

    .fraud-detail-title {
      min-width: 0;
    }

    .fraud-detail-title strong {
      display: block;
      color: #711365;
      font-size: 15px;
    }

    .fraud-detail-title span {
      display: block;
      margin-top: 3px;
      color: var(--muted);
      font-size: 12px;
    }

    .skip-detail-table {
      min-width: 1750px;
    }

    .skip-detail-table td {
      vertical-align: top;
    }

    .skip-message-cell {
      min-width: 300px;
      max-width: 440px;
      white-space: pre-wrap;
      line-height: 1.4;
      overflow-wrap: anywhere;
    }

    .skip-summary-table {
      min-width: 920px;
    }

    .skip-hit-days-cell {
      min-width: 210px;
      vertical-align: top;
    }

    .skip-hit-days-count {
      display: block;
      font-weight: 900;
      color: #7f126f;
      margin-bottom: 4px;
    }

    .skip-hit-dates {
      color: var(--muted);
      font-size: 11px;
      line-height: 1.45;
      white-space: normal;
    }

    .skip-comment-disabled textarea {
      background: #f4f4f5;
      color: #9ca3af;
      cursor: not-allowed;
    }

  
    /* Мониторинг нагрузки — только раздел администрирования. */
    .load-monitor-pad { padding: 18px; }
    .load-monitor-intro { font-size: 12px; color: var(--muted); line-height: 1.5; margin: 0 0 14px; }
    .load-monitor-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 11px; }
    .load-monitor-card { padding: 14px; border: 1px solid var(--border); border-radius: 13px; background: #fffafd; }
    .load-monitor-card-label { color: var(--muted); font-size: 11px; }
    .load-monitor-value { font-size: 26px; font-weight: 800; margin-top: 5px; color: #81227c; }
    .load-monitor-card-note { font-size: 10px; color: var(--muted); margin-top: 4px; }
    .load-monitor-block { margin-top: 19px; border: 1px solid var(--border); border-radius: 13px; overflow: hidden; }
    .load-monitor-block h3 { background: #fff8fc; margin: 0; padding: 11px 13px; font-size: 14px; }
    .load-monitor-content { padding: 10px 13px; overflow-x: auto; }
    .load-monitor-table { width: 100%; border-collapse: collapse; min-width: 410px; }
    .load-monitor-table th, .load-monitor-table td { font-size: 11px; text-align: left; padding: 8px 7px; border-bottom: 1px solid #f2eaf2; }
    .load-monitor-table th { color: var(--muted); white-space: nowrap; }
    .load-monitor-chart { display: flex; align-items: end; gap: 6px; height: 110px; padding-top: 8px; }
    .load-monitor-chart-slot { flex: 1; min-width: 20px; display: flex; flex-direction: column; align-items: center; gap: 3px; height: 100%; justify-content: end; }
    .load-monitor-bar { background: linear-gradient(180deg, #dd33b8, #752bd2); width: min(100%, 30px); min-height: 2px; border-radius: 4px 4px 0 0; }
    .load-monitor-chart-label { font-size: 9px; color: var(--muted); white-space: nowrap; }
    .load-monitor-status { margin-top: 9px; color: var(--muted); font-size: 11px; }
    .load-monitor-error { color: #b91c1c; }
    @media (max-width: 740px) { .load-monitor-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

    /* Tooltips are one body-level floating overlay, never children of scrollable tables. */
    .metric-help{display:inline-flex;vertical-align:middle;margin-left:5px;white-space:normal;font-weight:normal;line-height:1.25}
    .metric-help-icon{height:17px;width:17px;min-width:17px;padding:0;border:1px solid #8b5cf6;border-radius:50%;background:#fff;color:#7043cb;font-size:11px;font-weight:800;line-height:15px;cursor:help;display:inline-flex;align-items:center;justify-content:center}
    .metric-help-icon:focus-visible{outline:2px solid #7043cb;outline-offset:2px}
    .metric-help-floating{position:fixed;z-index:2147483647;box-sizing:border-box;width:max-content;max-width:min(320px,calc(100vw - 24px));max-height:calc(100vh - 20px);overflow:auto;overscroll-behavior:contain;padding:12px 14px;background:rgba(31,24,45,.96);color:#f8f5ff;border:1px solid rgba(208,184,255,.38);border-radius:10px;box-shadow:0 12px 32px rgba(21,12,38,.32);text-align:left;font-size:12px;font-weight:500;line-height:1.5;white-space:normal;overflow-wrap:anywhere;pointer-events:auto}
    .metric-help-floating[hidden],.metric-help-source[hidden]{display:none!important}
    .metric-help-floating .metric-help-source{display:block;margin-top:9px;color:#e5caff;font-weight:700;text-decoration:underline;text-underline-offset:2px}
    .metric-help-floating .metric-help-source:focus-visible{outline:2px solid #e5caff;outline-offset:2px}

      /* Выход сотрудников: первые три колонки закреплены и по горизонтали, и в шапке. */
    .attendance-table{width:max-content;min-width:100%;border-collapse:separate;border-spacing:0}
    .attendance-table th:nth-child(-n+3), .attendance-table td:nth-child(-n+3){position:sticky;box-sizing:border-box}
    .attendance-table td:nth-child(-n+3){z-index:5;background:#fff}
    .attendance-table th:nth-child(-n+3){z-index:12;background:#fff7fc}
    .attendance-table th:nth-child(1), .attendance-table td:nth-child(1){left:0;width:106px;min-width:106px;max-width:106px}
    .attendance-table th:nth-child(2), .attendance-table td:nth-child(2){left:106px;width:220px;min-width:220px;max-width:220px}
    .attendance-table th:nth-child(3), .attendance-table td:nth-child(3){left:326px;width:195px;min-width:195px;max-width:195px;box-shadow:5px 0 8px rgba(60,20,65,.08)}
    .attendance-table th{white-space:nowrap}
    .attendance-table td.attendance-late{background:#ffe2e4!important;color:#a01d29;font-weight:700}
    .attendance-table td.attendance-no-action{background:#fff2cf!important;color:#775800}
    .attendance-table td.attendance-on-time{background:#e8f6ef!important;color:#175835}
    .attendance-table td.attendance-off{color:#9296a0}
    .attendance-table td.attendance-approved-absence{background:#eef2ff!important;color:#4338ca;font-weight:700;white-space:nowrap}
    .attendance-table td.attendance-grace{background:#f3f4f6!important;color:#6b7280}
    .attendance-reason-cell{min-width:260px;max-width:380px;white-space:normal!important;vertical-align:top}
    .attendance-comment-cell{min-width:340px;max-width:460px;white-space:normal!important;vertical-align:top}
    .attendance-stack-item{padding:4px 0}
    .attendance-stack-item+.attendance-stack-item{border-top:1px dashed var(--border);margin-top:5px;padding-top:8px}
    .attendance-stack-date{margin-bottom:4px;color:var(--muted);font-size:10px;font-weight:800}
    .attendance-reason-time{font-weight:800;color:#5b21b6}
    .attendance-comment-cell .comment-box{min-width:290px}

    /* Администрирование → согласование отсутствий: компактные множественные фильтры. */
    .admin-absence-filter-details{position:relative;min-width:170px}
    .admin-absence-filter-details>summary{list-style:none;cursor:pointer;min-height:38px;padding:9px 30px 9px 10px;border:1px solid var(--border);border-radius:10px;background:#fff;color:var(--text);font-size:11px;font-weight:700;white-space:nowrap;position:relative}
    .admin-absence-filter-details>summary::-webkit-details-marker{display:none}
    .admin-absence-filter-details>summary::after{content:'⌄';position:absolute;right:10px;top:8px;color:var(--muted);font-size:14px}
    .admin-absence-filter-details[open]>summary::after{content:'⌃'}
    .admin-absence-filter-menu{position:absolute;z-index:500;top:calc(100% + 5px);left:0;min-width:260px;max-width:min(360px,80vw);padding:8px;border:1px solid var(--border);border-radius:10px;background:#fff;box-shadow:0 12px 32px rgba(63,28,67,.16)}
    .admin-absence-filter-menu label{display:flex;align-items:center;gap:8px;padding:7px 8px;border-radius:7px;font-size:11px;cursor:pointer;white-space:normal}
    .admin-absence-filter-menu label:hover{background:#fff5fc}
    .admin-absence-filter-menu input{margin:0;flex:0 0 auto}
    .admin-absence-label-select{min-width:175px}
    .admin-label-badge{display:inline-flex;align-items:center;padding:4px 8px;border-radius:999px;font-size:10px;font-weight:800}
    .admin-label-respectful{background:#dcfce7;color:#166534}
    .admin-label-unrespectful{background:#fee2e2;color:#991b1b}
    .admin-label-empty{background:#f3f4f6;color:#6b7280}


  .fast-clickable-shift{cursor:pointer;transition:filter .12s ease,transform .12s ease}
  .fast-clickable-shift:hover{filter:brightness(.97);box-shadow:inset 0 0 0 1px rgba(116,40,215,.14)}
  .fast-employee-link{border:0;background:transparent;padding:0;color:inherit;font:inherit;font-weight:700;cursor:pointer;text-align:left;text-decoration:none}
  .fast-employee-link:hover{color:var(--accent);text-decoration:underline;text-underline-offset:2px}
  .fast-dialog{width:min(920px,96vw);max-height:90vh;overflow:auto;background:#fff;border-radius:18px;box-shadow:0 24px 70px rgba(35,15,39,.24);padding:0}
  .fast-dialog-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;padding:18px 20px;border-bottom:1px solid var(--border);position:sticky;top:0;background:#fff;z-index:3}
  .fast-dialog-head h3{margin:0;font-size:18px}.fast-dialog-body{padding:18px 20px}.fast-dialog-close{width:34px;height:34px;border:0;border-radius:9px;background:#f5eef5;color:#654d67;font-size:20px;cursor:pointer}
  .fast-employee-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px 16px}.fast-employee-grid .full{grid-column:1/-1}
  .fast-request-list{width:100%;overflow:auto;border:1px solid var(--border);border-radius:12px;background:#fff}
  .fast-request-row{display:grid;grid-template-columns:minmax(95px,.8fr) minmax(120px,1fr) minmax(180px,1.35fr) minmax(180px,1.35fr) minmax(150px,1.15fr) minmax(170px,1.2fr) minmax(120px,.9fr) 76px;gap:0;align-items:stretch;border-bottom:1px solid var(--border);cursor:pointer;min-width:1120px;background:#fff}
  .fast-request-row:last-child{border-bottom:0}.fast-request-row:not(.fast-request-head):hover{background:#fff8fc}.fast-request-row.fast-request-head{position:sticky;top:0;z-index:2;background:#fff8fc;cursor:default;font-weight:800;color:#6f315f}
  .fast-request-cell{padding:9px 10px;font-size:11px;line-height:1.3;border-right:1px solid #f2e9f1;display:flex;align-items:center;min-width:0;overflow-wrap:anywhere}.fast-request-cell:last-child{border-right:0}.fast-request-main{font-weight:800;color:#4b244c}.fast-request-muted{color:var(--muted)}
  .fast-unread{display:inline-grid;place-items:center;min-width:22px;height:22px;padding:0 6px;border-radius:999px;background:#dc2626;color:#fff;font-size:10px;font-weight:900}.fast-unread.zero{background:#f3f4f6;color:#9ca3af}
  .fast-detail-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px 14px;margin-bottom:14px}.fast-detail-item{padding:10px 12px;border:1px solid var(--border);border-radius:10px;background:#fffafd}.fast-detail-item.full{grid-column:1/-1}.fast-detail-item .k{font-size:10px;color:var(--muted);font-weight:800;text-transform:uppercase;letter-spacing:.03em;margin-bottom:4px}.fast-detail-item .v{font-size:12px;line-height:1.45;white-space:pre-wrap}
  .fast-detail-actions{display:flex;gap:8px;align-items:flex-end;flex-wrap:wrap;margin:14px 0;padding:12px;border:1px solid var(--border);border-radius:12px;background:#fffafd}.fast-detail-actions .profile-field{min-width:180px;flex:1}.fast-detail-actions textarea{min-height:72px}
  .fast-chat{margin-top:14px;border-top:1px solid var(--border);padding-top:14px}.fast-chat-title{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px}.fast-chat-list{display:flex;flex-direction:column;gap:7px;max-height:260px;overflow:auto;padding:2px}.fast-chat-message{padding:9px 11px;border-radius:10px;background:#f7f1f7;border:1px solid #eaddea;font-size:11px;line-height:1.4}.fast-chat-message.admin{background:#f1ecff;border-color:#ddd6fe}.fast-chat-meta{font-size:9px;color:var(--muted);margin-bottom:4px;font-weight:700}.fast-chat-compose{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;margin-top:9px}.fast-chat-compose textarea{min-height:60px}
  .fast-saving-note{font-size:10px;color:var(--muted);margin-left:auto}.fast-bs-note{margin-top:9px;color:var(--muted);font-size:12px;line-height:1.45}
  @media(max-width:800px){.fast-employee-grid,.fast-detail-grid{grid-template-columns:1fr}.fast-detail-item.full,.fast-employee-grid .full{grid-column:auto}.fast-dialog{width:98vw}.fast-chat-compose{grid-template-columns:1fr}}


/* ===== FINAL PATCH: смена 8 как рабочая ===== */
.timesheet-shift-cell.shift-8,
.timesheet-legend-chip.shift-8 {
  background: #dcfce7;
  color: #166534;
}

/* одинаковое отображение рабочих 11 и 8 */
.timesheet-shift-cell.shift-8 .timesheet-pencil {
  color: #166534;
}


    /* v17 — компактное администрирование: больше полезной ширины, меньше шрифт, без выхода контента за экран. */
    #administrationCard.active {
      grid-template-columns: 188px minmax(0, 1fr);
    }

    #administrationCard,
    #administrationCard button,
    #administrationCard input,
    #administrationCard select,
    #administrationCard textarea {
      font-size: 11px;
    }

    #administrationCard > .card-header {
      padding: 13px 15px;
    }

    #administrationCard > .card-header h2 {
      font-size: 19px;
      line-height: 1.15;
    }

    #administrationCard > .admin-subtabs {
      padding: 10px 8px;
      gap: 5px;
    }

    #administrationCard > .admin-subtabs .admin-subtab {
      min-height: 34px;
      padding: 7px 9px;
      border-radius: 9px;
      font-size: 10.5px;
      line-height: 1.25;
    }

    #administrationCard > #adminLoadMonitorSection,
    #administrationCard > #adminProfilesSection,
    #administrationCard > #adminOperatorRolesSection,
    #administrationCard > #adminRequestsSection,
    #administrationCard > #adminAbsenceApprovalsSection,
    #administrationCard > #adminWorkbacksSection,
    #administrationCard > #adminBiExportsSection {
      width: 100%;
      max-width: 100%;
      min-width: 0;
      overflow: hidden;
    }

    #administrationCard .admin-section-toolbar {
      padding: 8px 11px;
      gap: 7px;
    }

    #administrationCard .counter,
    #administrationCard .admin-access-status,
    #administrationCard .admin-request-meta,
    #administrationCard .request-card-meta {
      font-size: 10.5px;
      line-height: 1.35;
    }

    #administrationCard .btn-primary,
    #administrationCard .btn-secondary {
      min-height: 31px;
      padding: 6px 9px;
      border-radius: 8px;
      font-size: 10.5px;
      line-height: 1.15;
    }

    #administrationCard .profile-input,
    #administrationCard input[type="email"] {
      min-height: 32px;
      padding: 6px 8px;
      border-radius: 8px;
      font-size: 10.5px;
    }

    #administrationCard textarea {
      padding: 8px 9px;
      font-size: 10.5px;
    }

    #administrationCard .section-filter-row,
    #administrationCard .workback-toolbar {
      gap: 6px;
      flex-wrap: wrap;
      min-width: 0;
    }

    #administrationCard .request-number-filter {
      min-width: 160px;
      width: 180px;
      max-width: 100%;
    }

    /* Профили пользователей */
    #administrationCard .admin-layout {
      grid-template-columns: minmax(175px, 225px) minmax(0, 1fr);
      min-height: 390px;
    }

    #administrationCard .admin-user-item {
      padding: 8px 9px;
      font-size: 10.5px;
      line-height: 1.25;
    }

    #administrationCard .admin-user-meta {
      font-size: 9.5px;
      line-height: 1.25;
    }

    #administrationCard .admin-profile-detail {
      padding: 11px;
    }

    #administrationCard .admin-profile-grid {
      gap: 7px;
    }

    #administrationCard .admin-profile-field {
      padding: 8px;
      border-radius: 8px;
    }

    #administrationCard .admin-profile-field .label {
      margin-bottom: 3px;
      font-size: 9px;
    }

    #administrationCard .admin-profile-field .value {
      font-size: 10.5px;
      line-height: 1.3;
    }

    #administrationCard .admin-access-editor {
      margin-bottom: 10px;
      padding: 9px;
      border-radius: 9px;
    }

    #administrationCard .admin-access-editor-grid {
      grid-template-columns: minmax(135px, 1fr) auto auto auto;
      gap: 6px;
    }

    #administrationCard .admin-active-check {
      min-height: 32px;
      gap: 5px;
      font-size: 10px;
      white-space: nowrap;
    }

    /* Карточки запросов, отсутствий и отработок */
    #administrationCard .admin-requests-wrap {
      padding: 9px;
    }

    #administrationCard .admin-request-card,
    #administrationCard .absence-request-card,
    #administrationCard .workback-card {
      padding: 10px;
      border-radius: 10px;
    }

    #administrationCard .admin-request-group-title h3,
    #administrationCard .section-heading-row h3,
    #administrationCard .request-card-head h3 {
      font-size: 13px;
    }

    #administrationCard .admin-request-description {
      padding: 8px;
      margin: 7px 0 9px;
      font-size: 10.5px;
      line-height: 1.35;
    }

    #administrationCard .admin-request-controls {
      grid-template-columns: minmax(130px, 190px) minmax(180px, 1fr) auto;
      gap: 7px;
    }

    #administrationCard .request-detail-grid {
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 6px;
      margin: 8px 0;
    }

    #administrationCard .request-detail {
      padding: 7px;
      border-radius: 8px;
    }

    #administrationCard .request-detail .label {
      font-size: 8.5px;
    }

    #administrationCard .request-detail .value {
      font-size: 10.5px;
      line-height: 1.3;
    }

    #administrationCard .workback-edit-grid {
      grid-template-columns: repeat(4, minmax(90px, 1fr)) auto;
      gap: 6px;
    }

    /* Настройка BI */
    #administrationCard .admin-bi-section {
      padding: 11px 12px 13px;
    }

    #administrationCard .admin-bi-heading h3 {
      font-size: 15px;
    }

    #administrationCard .bi-admin-subtab {
      padding: 5px 9px;
      font-size: 10px;
    }

    #administrationCard .bi-settings-fields {
      gap: 7px;
    }

    #administrationCard .bi-filter-list {
      gap: 6px;
      margin-top: 8px;
    }

    #administrationCard .bi-filter-row {
      grid-template-columns: minmax(95px, .62fr) minmax(130px, 1.38fr);
      gap: 6px;
    }

    #administrationCard .bi-filter-key {
      padding-top: 7px;
      font-size: 10px;
    }

    #administrationCard .bi-filter-note {
      font-size: 9px;
    }

    #administrationCard .bi-history-table {
      min-width: 760px;
    }

    #administrationCard .bi-history-table th,
    #administrationCard .bi-history-table td {
      padding: 6px 7px;
      font-size: 9.5px;
      line-height: 1.3;
    }

    /* Роли операторов — все колонки помещаются без горизонтальной прокрутки. */
    #adminOperatorRolesSection #operatorRolesTableWrap {
      overflow-x: hidden;
      max-width: 100%;
    }

    #adminOperatorRolesSection .operator-roles-table {
      width: 100%;
      min-width: 0 !important;
      table-layout: fixed;
    }

    #adminOperatorRolesSection .operator-roles-table th,
    #adminOperatorRolesSection .operator-roles-table td {
      min-width: 0 !important;
      padding: 6px 6px;
      font-size: 10px;
      line-height: 1.2;
      white-space: normal;
      overflow-wrap: anywhere;
    }

    #adminOperatorRolesSection .operator-roles-table th:nth-child(1),
    #adminOperatorRolesSection .operator-roles-table td:nth-child(1) {
      width: 12%;
    }

    #adminOperatorRolesSection .operator-roles-table th:nth-child(2),
    #adminOperatorRolesSection .operator-roles-table td:nth-child(2) {
      width: 30%;
    }

    #adminOperatorRolesSection .operator-roles-table th:nth-child(3),
    #adminOperatorRolesSection .operator-roles-table td:nth-child(3) {
      width: 30%;
    }

    #adminOperatorRolesSection .operator-roles-table th:nth-child(4),
    #adminOperatorRolesSection .operator-roles-table td:nth-child(4),
    #adminOperatorRolesSection .operator-roles-table th:nth-child(5),
    #adminOperatorRolesSection .operator-roles-table td:nth-child(5) {
      width: 14%;
      text-align: center;
    }

    #adminOperatorRolesSection .operator-role-checkbox {
      width: 16px;
      height: 16px;
    }

    #adminOperatorRolesSection .operator-role-changes-panel {
      padding: 11px;
    }

    #adminOperatorRolesSection .operator-role-changes-head h3,
    #adminOperatorRolesSection .operator-role-history-section h3 {
      font-size: 12px;
    }

    #adminOperatorRolesSection .operator-role-changes-text {
      min-height: 86px;
      padding: 7px 8px;
      font-size: 10px;
      line-height: 1.35;
    }

    #adminOperatorRolesSection .operator-role-relogin-note {
      margin-top: 6px;
      padding: 6px 8px;
      font-size: 9.5px;
    }

    #adminOperatorRolesSection #operatorRoleHistoryWrap {
      overflow-x: hidden;
      max-width: 100%;
    }

    #adminOperatorRolesSection .operator-role-history-table {
      width: 100%;
      min-width: 0 !important;
      table-layout: fixed;
    }

    #adminOperatorRolesSection .operator-role-history-table th,
    #adminOperatorRolesSection .operator-role-history-table td {
      padding: 5px 5px;
      font-size: 9px;
      line-height: 1.2;
      white-space: normal;
      overflow-wrap: anywhere;
    }

    #adminOperatorRolesSection .operator-role-history-table .role-history-roles {
      white-space: normal;
    }

    /* Таблицы остальных админ-разделов остаются внутри своей области, а не расширяют всю страницу. */
    #administrationCard .table-wrap,
    #administrationCard .bi-history-wrap {
      width: 100%;
      max-width: 100%;
      min-width: 0;
    }

    #administrationCard .table-wrap table:not(.operator-roles-table):not(.operator-role-history-table) th,
    #administrationCard .table-wrap table:not(.operator-roles-table):not(.operator-role-history-table) td {
      padding: 6px 7px;
      font-size: 10px;
      line-height: 1.25;
    }

    @media (max-width: 1180px) {
      #administrationCard.active {
        grid-template-columns: 168px minmax(0, 1fr);
      }

      #administrationCard > .admin-subtabs .admin-subtab {
        font-size: 10px;
        padding: 6px 7px;
      }

      #administrationCard .admin-layout {
        grid-template-columns: minmax(155px, 190px) minmax(0, 1fr);
      }

      #administrationCard .admin-access-editor-grid {
        grid-template-columns: minmax(120px, 1fr) auto auto;
      }

      #administrationCard .admin-access-editor-grid > button {
        grid-column: 1 / -1;
        justify-self: end;
      }

      #administrationCard .workback-edit-grid {
        grid-template-columns: repeat(2, minmax(100px, 1fr));
      }

      #administrationCard .workback-edit-grid > button {
        justify-self: start;
      }
    }

    @media (max-width: 900px) {
      #administrationCard.active {
        grid-template-columns: 1fr;
      }

      #administrationCard > .admin-subtabs {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }

      #administrationCard .admin-layout {
        grid-template-columns: 1fr;
      }

      #administrationCard .admin-user-list-wrap {
        border-right: 0;
        border-bottom: 1px solid var(--border);
      }

      #administrationCard .admin-user-list {
        max-height: 220px;
      }

      #administrationCard .admin-request-controls,
      #administrationCard .request-detail-grid,
      #administrationCard .bi-settings-fields {
        grid-template-columns: 1fr;
      }
    }

  

/* Multi-select status and date filters for personal absence requests/workbacks. */
.request-filter-row{display:flex;align-items:flex-end;gap:10px;flex-wrap:wrap;}
.request-filter-field{display:flex;flex-direction:column;gap:5px;min-width:130px;font-size:12px;font-weight:700;color:var(--muted,#6b6570);}
.request-filter-field .profile-input{min-width:140px;max-width:190px;}
.request-status-multiselect{position:relative;min-width:150px;color:var(--text,#332b36);font-size:13px;font-weight:600;}
.request-status-multiselect summary{list-style:none;cursor:pointer;border:1px solid var(--border,#e6dfe8);border-radius:9px;background:#fff;padding:9px 30px 9px 11px;min-height:38px;white-space:nowrap;position:relative;}
.request-status-multiselect summary::-webkit-details-marker{display:none;}
.request-status-multiselect summary:after{content:'▾';position:absolute;right:10px;color:#8b568d;}
.request-status-options{position:absolute;z-index:25;top:calc(100% + 4px);left:0;min-width:230px;max-width:min(320px,80vw);max-height:260px;overflow:auto;padding:8px;background:#fff;border:1px solid var(--border,#e6dfe8);border-radius:10px;box-shadow:0 8px 24px rgba(45,20,50,.14);}
.request-status-option{display:flex;align-items:flex-start;gap:8px;padding:7px 6px;border-radius:6px;font-size:12px;line-height:1.35;color:var(--text,#332b36);cursor:pointer;}
.request-status-option:hover{background:var(--accent-soft,#faeafb);}
.request-status-option input{margin:2px 0 0;accent-color:#9b4c9c;}
.request-filter-toolbar{align-items:flex-end;gap:14px;}
@media(max-width:760px){.request-filter-row{align-items:stretch;width:100%;}.request-filter-field{flex:1;min-width:140px;}.request-filter-field .profile-input{max-width:none;width:100%;}.request-filter-toolbar{align-items:stretch;}}
