@font-face {
        font-family: "Anticva";
        src: url("../../fonts/Anticva-Regular.otf") format("opentype");
        font-display: swap;
      }

      html, body {
        font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
      }

      :root {
        --glass-bg: rgba(15, 23, 42, 0.64);
        --glass-border: rgba(255, 255, 255, 0.08);
      }

      body {
        position: relative;
        overflow-x: hidden;
        background: #020617;
        background-image:
          radial-gradient(900px 500px at 15% 10%, rgba(99, 102, 241, 0.18), transparent 60%),
          radial-gradient(700px 420px at 85% 20%, rgba(56, 189, 248, 0.15), transparent 60%),
          radial-gradient(900px 520px at 50% 90%, rgba(168, 85, 247, 0.12), transparent 60%);
      }

      body::before {
        content: "";
        display: none;
      }

      @keyframes bgFloat {
        0% { transform: translate3d(-2%, -2%, 0) scale(1); }
        100% { transform: translate3d(3%, 3%, 0) scale(1.08); }
      }

      .glass-card {
        position: relative;
        overflow: hidden;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        background: rgba(15, 23, 42, 0.82);
        border: 1px solid var(--glass-border);
        box-shadow:
          0 25px 50px -20px rgba(0, 0, 0, 0.7),
          0 0 0 1px rgba(255, 255, 255, 0.04);
      }

      .admin-table-card {
        overflow: visible;
      }

      .admin-action-panel {
        position: sticky;
        top: calc(72px + env(safe-area-inset-top, 0px));
        z-index: 43;
        background: rgba(2, 6, 23, 0.92);
        border: 1px solid rgba(255, 255, 255, 0.1);
        box-shadow: 0 18px 40px -28px rgba(0, 0, 0, 0.85);
      }

      .admin-action-panel::before {
        content: "";
        position: absolute;
        inset: 0;
        pointer-events: none;
        border-radius: inherit;
        background: linear-gradient(90deg, rgba(99, 102, 241, 0.12), transparent 45%, rgba(56, 189, 248, 0.1));
      }

      .input-glass {
        background: rgba(2, 6, 23, 0.65);
        border: 1px solid rgba(255, 255, 255, 0.08);
        backdrop-filter: none;
        transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
      }

      .input-glass:hover {
        background: rgba(2, 6, 23, 0.78);
        border-color: rgba(99, 102, 241, 0.28);
      }

      .input-glass:focus {
        outline: none;
        border-color: rgba(99, 102, 241, 0.8);
        box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.18);
      }

      .select-wrap {
        position: relative;
        display: inline-flex;
        align-items: center;
      }

      .select-wrap::after {
        content: "▾";
        position: absolute;
        right: 12px;
        color: rgba(148, 163, 184, 0.9);
        pointer-events: none;
        font-size: 13px;
      }

      select.ui-select {
        appearance: none;
        -webkit-appearance: none;
        background-color: rgba(2, 6, 23, 0.72);
        border: 1px solid rgba(255, 255, 255, 0.1);
        color: rgba(226, 232, 240, 0.95);
        border-radius: 1rem;
        padding: 8px 34px 8px 14px;
        font-size: 0.92rem;
        line-height: 1.2;
        outline: none;
        backdrop-filter: none;
        transition: all 0.2s;
      }

      select.ui-select:hover {
        background-color: rgba(2, 6, 23, 0.84);
        border-color: rgba(99, 102, 241, 0.4);
      }

      select.ui-select:focus {
        border-color: rgba(99, 102, 241, 0.8);
        box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.18);
      }

  .scrollable {
  position: relative;
  overflow-x: auto;
  overflow-y: auto;
  border-radius: 1rem;
  -webkit-overflow-scrolling: touch;
}

.top-table-scroll {
  position: sticky;
  top: calc(148px + env(safe-area-inset-top, 0px));
  z-index: 35;
  height: 16px;
  margin-bottom: 10px;
  overflow-x: auto;
  overflow-y: hidden;
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.08);
  scrollbar-width: thin;
  scrollbar-color: #7a1638 #111519;
}

@media (hover: none) and (pointer: coarse) {
  .top-table-scroll {
    position: relative;
  }
}

.top-table-scroll.is-hidden {
  display: none;
}

#topTableScrollSpacer {
  height: 1px;
}

.scrollable.is-dragging {
  cursor: grabbing;
  user-select: none;
}

.scrollable.is-dragging .input-hour {
  pointer-events: none;
}

   .admin-matrix {
  border-collapse: separate;
  border-spacing: 0;
  width: max-content;
  min-width: 1320px;
  background: rgba(30, 41, 59, 0.52);
  border-radius: 1rem;
}

      .admin-matrix th,
.admin-matrix td {
  border-right: 1px solid rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  text-align: center;
  min-width: 58px;
}

      .admin-matrix th {
        background: rgba(15, 23, 42, 0.86);
        color: #94a3b8;
        font-size: 0.88rem;
        font-weight: 600;
        padding: 10px 4px 8px;
        user-select: none;
      }

      .admin-matrix td {
        padding: 8px 2px;
      }

      .th-dow {
        display: block;
        font-size: 9px;
        font-weight: 400;
        opacity: 0.55;
        margin-top: 2px;
      }

.label-cell {
  position: sticky;
  left: 0;
  z-index: 20;
  min-width: 190px;
  width: 190px;
  background: #0c142c !important;
  color: #e2e8f0;
  text-align: left !important;
  padding: 10px 12px !important;
  white-space: nowrap;
  border-right: 1px solid rgba(255, 255, 255, 0.12) !important;
  box-shadow: 10px 0 18px -14px rgba(0, 0, 0, 0.7);
  overflow: hidden;
  transition: none;
}

.label-main {
  display: block;
  font-size: 0.92rem;
  font-weight: 700;
  color: rgba(241, 245, 249, 0.98);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.member-draggable-cell {
  cursor: grab;
}

td.shift-comment-cell {
  position: relative;
}

td.shift-comment-cell.has-shift-comment::after {
  content: "";
  position: absolute;
  top: 2px;
  right: 2px;
  width: 0;
  height: 0;
  border-top: 10px solid rgb(56 189 248);
  border-left: 10px solid transparent;
  filter: drop-shadow(0 0 4px rgba(56, 189, 248, 0.55));
  pointer-events: none;
  z-index: 3;
}

.shift-comment-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(2, 6, 23, 0.42);
}

.shift-comment-dialog {
  position: fixed;
  width: min(340px, calc(100vw - 24px));
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 16px;
  background: rgba(8, 15, 35, 0.98);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.5);
  padding: 16px;
  color: #e2e8f0;
}

.shift-comment-title { margin: 0 0 12px; font-size: 15px; font-weight: 700; }
.shift-comment-input { width: 100%; resize: vertical; border: 1px solid rgba(148,163,184,.22); border-radius: 12px; background: rgba(15,23,42,.9); padding: 10px 12px; color: #f1f5f9; outline: none; }
.shift-comment-input:focus { border-color: rgba(56,189,248,.65); box-shadow: 0 0 0 3px rgba(56,189,248,.12); }
.shift-comment-counter { margin-top: 5px; text-align: right; font-size: 11px; color: #64748b; }
.shift-comment-message { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; color: #cbd5e1; line-height: 1.55; }
.shift-comment-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }
.shift-comment-button { border: 0; border-radius: 10px; padding: 8px 12px; font-size: 12px; font-weight: 700; cursor: pointer; }
.shift-comment-button-secondary { background: rgba(255,255,255,.07); color: #cbd5e1; }
.shift-comment-button-primary { background: rgba(14,165,233,.2); color: #bae6fd; }
.shift-comment-button-danger { margin-right: auto; background: rgba(244,63,94,.14); color: #fecdd3; }

@media (max-width: 700px) {
  .shift-comment-dialog { left: 12px; right: 12px; bottom: max(12px, env(safe-area-inset-bottom)); width: auto; }
}

.member-draggable-cell:active {
  cursor: grabbing;
}

.member-remove-button {
  position: absolute;
  top: 5px;
  right: 5px;
  z-index: 2;
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border: 0;
  border-radius: 7px;
  padding: 0;
  color: rgba(148, 163, 184, 0.82);
  background: transparent;
  font-size: 20px;
  font-weight: 400;
  line-height: 1;
  cursor: pointer;
  transition: color 0.18s, background 0.18s;
}

.member-remove-button:hover {
  color: rgb(254 205 211);
  background: rgba(244, 63, 94, 0.14);
}

.member-remove-button:focus-visible {
  color: rgb(254 205 211);
  background: rgba(244, 63, 94, 0.14);
  outline: 2px solid rgba(251, 113, 133, 0.65);
  outline-offset: 1px;
}

.member-remove-button:disabled {
  cursor: wait;
  opacity: 0.5;
}

.member-focus-target {
  box-shadow: inset 0 0 0 2px rgba(56, 189, 248, 0.8), 0 0 22px rgba(56, 189, 248, 0.18);
}

.timesheet-audit-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(3, 7, 18, 0.72);
  backdrop-filter: blur(10px);
}

.timesheet-audit-modal.hidden {
  display: none;
}

.timesheet-audit-dialog {
  display: flex;
  width: min(820px, 100%);
  max-height: min(780px, calc(100dvh - 40px));
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  background: rgba(11, 14, 18, 0.98);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.58);
}

.timesheet-audit-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px 17px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}

.timesheet-audit-close {
  display: grid;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  place-items: center;
  border: 0;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(226, 232, 240, 0.85);
  font-size: 25px;
  line-height: 1;
  cursor: pointer;
}

.timesheet-audit-close:hover,
.timesheet-audit-close:focus-visible {
  background: rgba(255, 255, 255, 0.11);
  color: #fff;
  outline: none;
}

.timesheet-audit-list {
  min-height: 180px;
  overflow-y: auto;
  padding: 10px 22px 22px;
}

.timesheet-audit-search-wrap {
  position: relative;
  flex: 0 0 auto;
  padding: 14px 22px 4px;
}

.timesheet-audit-search-wrap svg {
  position: absolute;
  top: 50%;
  left: 37px;
  width: 18px;
  height: 18px;
  pointer-events: none;
  color: rgba(198, 161, 91, 0.9);
  transform: translateY(-36%);
}

.timesheet-audit-search {
  width: 100%;
  min-height: 44px;
  border: 1px solid rgba(241, 238, 232, 0.16);
  border-radius: 7px;
  padding: 10px 42px;
  background: #15191d;
  color: #f1eee8;
  font: inherit;
  font-size: 14px;
  outline: none;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.timesheet-audit-search::placeholder {
  color: rgba(148, 163, 184, 0.82);
}

.timesheet-audit-search:focus {
  border-color: rgba(198, 161, 91, 0.68);
  box-shadow: 0 0 0 3px rgba(198, 161, 91, 0.1);
}

.timesheet-audit-search:disabled {
  cursor: wait;
  opacity: 0.6;
}

.timesheet-audit-search::-webkit-search-cancel-button {
  cursor: pointer;
  filter: invert(1);
  opacity: 0.72;
}

.timesheet-audit-empty {
  padding: 48px 16px;
  text-align: center;
  color: rgba(148, 163, 184, 0.9);
}

.timesheet-audit-entry {
  padding: 15px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.timesheet-audit-entry:last-child {
  border-bottom: 0;
}

.timesheet-audit-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 10px;
  margin-bottom: 10px;
}

.timesheet-audit-actor {
  color: rgba(241, 245, 249, 0.98);
  font-size: 14px;
  font-weight: 700;
}

.timesheet-audit-time {
  color: rgba(148, 163, 184, 0.84);
  font-size: 12px;
}

.timesheet-audit-group + .timesheet-audit-group {
  margin-top: 10px;
}

.timesheet-audit-group-title {
  margin-bottom: 4px;
  color: rgba(186, 230, 253, 0.95);
  font-size: 12px;
  font-weight: 700;
}

.timesheet-audit-change {
  margin: 3px 0 0;
  color: rgba(203, 213, 225, 0.94);
  font-size: 12px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

@media (max-width: 700px) {
  .timesheet-audit-modal {
    align-items: end;
    padding: 10px;
    padding-bottom: max(10px, env(safe-area-inset-bottom));
  }

  .timesheet-audit-dialog {
    max-height: calc(100dvh - 20px - env(safe-area-inset-bottom));
    border-radius: 18px;
  }

  .timesheet-audit-header {
    padding: 17px 16px 14px;
  }

  .timesheet-audit-list {
    padding: 8px 16px 18px;
  }

  .timesheet-audit-search-wrap {
    padding: 12px 16px 4px;
  }

  .timesheet-audit-search-wrap svg {
    left: 30px;
  }
}

.member-drag-handle {
  flex: 0 0 auto;
  display: inline-grid;
  width: 18px;
  height: 18px;
  place-items: center;
  border-radius: 8px;
  background: rgba(148, 163, 184, 0.08);
  color: rgba(148, 163, 184, 0.9);
  font-size: 0.78rem;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.18em;
  transition: background 0.18s, color 0.18s, transform 0.18s;
}

.member-draggable-cell:hover .member-drag-handle {
  background: rgba(56, 189, 248, 0.16);
  color: rgba(186, 230, 253, 0.98);
  transform: translateY(-1px);
}

.member-draggable-cell.is-drag-source {
  opacity: 0.52;
}

.employee-day-row.member-row-dragging > td,
.employee-night-row.member-row-dragging > td {
  opacity: 0.5;
}

.employee-day-row.member-drop-before > td {
  box-shadow: inset 0 3px 0 rgba(56, 189, 248, 0.95) !important;
}

.employee-night-row.member-drop-after > td {
  box-shadow: inset 0 -3px 0 rgba(56, 189, 248, 0.95) !important;
}

.label-title-row .label-main {
  min-width: 0;
  flex: 1 1 auto;
}

.label-overtime-badge {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 2px 7px;
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 1.35;
  letter-spacing: 0;
}

.label-overtime-badge.is-hidden {
  display: none;
}

.label-overtime-badge.is-minor {
  background: rgba(245, 158, 11, 0.18);
  color: rgba(253, 230, 138, 0.98);
  box-shadow: inset 0 0 0 1px rgba(251, 191, 36, 0.28);
}

.label-overtime-badge.is-major {
  background: rgba(244, 63, 94, 0.2);
  color: rgba(255, 228, 230, 0.98);
  box-shadow: inset 0 0 0 1px rgba(251, 113, 133, 0.32);
}

.label-sub {
  display: block;
  margin-top: 2px;
  font-size: 0.72rem;
  color: rgba(148, 163, 184, 0.92);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.label-avatar {
  display: none;
}

.scrollable.is-scrolled-x .label-cell {
  min-width: 190px;
  width: 190px;
  padding: 10px 12px !important;
  box-shadow: 12px 0 18px -14px rgba(0, 0, 0, 0.82);
}

.scrollable.is-scrolled-x .label-main {
  font-size: 0.92rem;
}

.scrollable.is-scrolled-x .label-sub {
  font-size: 0.72rem;
}

.summary-head {
  position: static;
  right: auto;
  z-index: auto;
  min-width: 220px;
  width: 220px;
  background: rgba(12, 20, 44, 0.98) !important;
  border-left: 1px solid rgba(255, 255, 255, 0.12) !important;
}

.summary-cell {
  position: static;
  right: auto;
  z-index: auto;
  min-width: 220px;
  width: 220px;
  background: rgba(8, 15, 34, 0.98);
  border-left: 1px solid rgba(255, 255, 255, 0.1) !important;
  padding: 10px !important;
}

      .summary-box {
        text-align: left;
        display: grid;
        gap: 8px;
      }

      .summary-main {
        display: flex;
        align-items: baseline;
        justify-content: space-between;
        gap: 6px;
        font-size: 0.78rem;
        color: rgba(148, 163, 184, 0.95);
      }

      .summary-main strong {
        font-size: 1rem;
        color: rgba(241, 245, 249, 0.98);
        font-weight: 800;
      }

      .summary-line {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 6px;
        font-size: 0.76rem;
        color: rgba(148, 163, 184, 0.95);
      }

      .summary-line strong {
        color: rgba(226, 232, 240, 0.98);
        font-weight: 700;
      }

      .summary-main > span,
      .summary-line > span {
        min-width: 0;
      }

      .summary-main strong,
      .summary-line strong {
        flex-shrink: 0;
        white-space: nowrap;
      }

      .summary-line.muted strong {
        color: rgba(196, 181, 253, 0.98);
      }

      .weekend-col {
        background-color: rgba(239, 68, 68, 0.15) !important;
      }

      .holiday-col {
        background-color: rgba(245, 158, 11, 0.2) !important;
      }

      .transferred-col {
        background-color: rgba(59, 130, 246, 0.16) !important;
      }

      .admin-matrix th.transferred-col {
        background-color: rgba(59, 130, 246, 0.2) !important;
      }

      .short-col {
        background-color: rgba(16, 185, 129, 0.16) !important;
      }

      .admin-matrix th.weekend-col {
        background-color: rgba(239, 68, 68, 0.2) !important;
      }

      .admin-matrix th.holiday-col {
        background-color: rgba(245, 158, 11, 0.24) !important;
      }

      .admin-matrix th.short-col {
        background-color: rgba(16, 185, 129, 0.2) !important;
      }

      .employee-day-row td {
        background-color: rgba(255, 255, 255, 0.012);
      }

      .employee-night-row td {
        background-color: rgba(255, 255, 255, 0.028);
      }

      .person-divider td {
      border-bottom: 1px solid rgba(129, 140, 248, 0.22) !important;
      box-shadow: none;
    }

    .person-divider .summary-cell,
    .person-divider .label-cell {
      border-bottom: 1px solid rgba(129, 140, 248, 0.3) !important;
      box-shadow: none;
    }

      .overtime-row .label-cell,
      .overtime-row .summary-cell,
      .overtime-row-top .label-cell,
      .overtime-row-top .summary-cell,
      .overtime-row-bottom .label-cell,
      .overtime-row-bottom .summary-cell {
        background-color: rgba(76, 5, 25, 0.96) !important;
      }

      .label-cell.is-overtime,
      .summary-cell.is-overtime {
        background-color: rgba(76, 5, 25, 0.96) !important;
      }

      .overtime-row .label-main,
      .overtime-row-top .label-main,
      .overtime-row-bottom .label-main {
        color: rgba(255, 228, 230, 0.98);
      }

      .label-cell.is-overtime .label-main {
        color: rgba(255, 228, 230, 0.98);
      }

      .overtime-row .label-sub,
      .overtime-row-top .label-sub,
      .overtime-row-bottom .label-sub {
        color: rgba(253, 164, 175, 0.92);
      }

      .label-cell.is-overtime .label-sub {
        color: rgba(253, 164, 175, 0.92);
      }

      .overtime-row .summary-main strong,
      .overtime-row-top .summary-main strong,
      .overtime-row-bottom .summary-main strong,
      .overtime-row .summary-line strong,
      .overtime-row-top .summary-line strong,
      .overtime-row-bottom .summary-line strong {
        color: rgba(255, 228, 230, 0.98);
      }

      .summary-cell.is-overtime .summary-main strong,
      .summary-cell.is-overtime .summary-line strong {
        color: rgba(255, 228, 230, 0.98);
      }

      .label-cell.is-overtime-minor,
      .summary-cell.is-overtime-minor {
        background-color: rgba(82, 52, 13, 0.96) !important;
      }

      .label-cell.is-overtime-minor .label-main {
        color: rgba(254, 243, 199, 0.98);
      }

      .label-cell.is-overtime-minor .label-sub {
        color: rgba(252, 211, 77, 0.88);
      }

      .summary-cell.is-overtime-minor .summary-main strong,
      .summary-cell.is-overtime-minor .summary-line strong {
        color: rgba(254, 243, 199, 0.98);
      }

      .employee-day-row.overtime-row td:not(.label-cell):not(.summary-cell),
      .employee-day-row.overtime-row-top td:not(.label-cell):not(.summary-cell),
      .employee-day-row.overtime-row-bottom td:not(.label-cell):not(.summary-cell) {
        background-color: rgba(255, 255, 255, 0.012) !important;
      }

      .employee-night-row.overtime-row td:not(.label-cell):not(.summary-cell),
      .employee-night-row.overtime-row-top td:not(.label-cell):not(.summary-cell),
      .employee-night-row.overtime-row-bottom td:not(.label-cell):not(.summary-cell) {
        background-color: rgba(255, 255, 255, 0.028) !important;
      }


      .employee-day-row.overtime-row td.weekend-col:not(.label-cell):not(.summary-cell),
      .employee-day-row.overtime-row-top td.weekend-col:not(.label-cell):not(.summary-cell),
      .employee-day-row.overtime-row-bottom td.weekend-col:not(.label-cell):not(.summary-cell) {
        background-color: rgba(239, 68, 68, 0.15) !important;
      }

      .employee-night-row.overtime-row td.weekend-col:not(.label-cell):not(.summary-cell),
      .employee-night-row.overtime-row-top td.weekend-col:not(.label-cell):not(.summary-cell),
      .employee-night-row.overtime-row-bottom td.weekend-col:not(.label-cell):not(.summary-cell) {
        background-color: rgba(239, 68, 68, 0.15) !important;
      }

      .employee-day-row.overtime-row td.holiday-col:not(.label-cell):not(.summary-cell),
      .employee-day-row.overtime-row-top td.holiday-col:not(.label-cell):not(.summary-cell),
      .employee-day-row.overtime-row-bottom td.holiday-col:not(.label-cell):not(.summary-cell) {
        background-color: rgba(245, 158, 11, 0.2) !important;
      }

      .employee-night-row.overtime-row td.holiday-col:not(.label-cell):not(.summary-cell),
      .employee-night-row.overtime-row-top td.holiday-col:not(.label-cell):not(.summary-cell),
      .employee-night-row.overtime-row-bottom td.holiday-col:not(.label-cell):not(.summary-cell) {
        background-color: rgba(245, 158, 11, 0.2) !important;
      }

      .employee-day-row.overtime-row td.transferred-col:not(.label-cell):not(.summary-cell),
      .employee-day-row.overtime-row-top td.transferred-col:not(.label-cell):not(.summary-cell),
      .employee-day-row.overtime-row-bottom td.transferred-col:not(.label-cell):not(.summary-cell) {
        background-color: rgba(59, 130, 246, 0.16) !important;
      }

      .employee-night-row.overtime-row td.transferred-col:not(.label-cell):not(.summary-cell),
      .employee-night-row.overtime-row-top td.transferred-col:not(.label-cell):not(.summary-cell),
      .employee-night-row.overtime-row-bottom td.transferred-col:not(.label-cell):not(.summary-cell) {
        background-color: rgba(59, 130, 246, 0.16) !important;
      }

      .employee-day-row.overtime-row td.short-col:not(.label-cell):not(.summary-cell),
      .employee-day-row.overtime-row-top td.short-col:not(.label-cell):not(.summary-cell),
      .employee-day-row.overtime-row-bottom td.short-col:not(.label-cell):not(.summary-cell) {
        background-color: rgba(16, 185, 129, 0.16) !important;
      }

      .employee-night-row.overtime-row td.short-col:not(.label-cell):not(.summary-cell),
      .employee-night-row.overtime-row-top td.short-col:not(.label-cell):not(.summary-cell),
      .employee-night-row.overtime-row-bottom td.short-col:not(.label-cell):not(.summary-cell) {
        background-color: rgba(16, 185, 129, 0.16) !important;
      }
     

      .input-hour {
  width: 54px;
  min-width: 54px;
  padding: 8px 4px;
  background: rgba(0, 0, 0, 0.32);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  color: white;
  text-align: center;
  font-size: 0.9rem;
  text-transform: uppercase;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

      .input-hour:focus {
        outline: none;
        border-color: rgba(99, 102, 241, 0.8);
        box-shadow: none;
        background: rgba(0, 0, 0, 0.48);
      }

      td.night-cell .input-hour {
        color: rgba(254, 202, 202, 0.95);
      }

      .hidden {
        display: none !important;
      }

      .shake {
        animation: shake 0.3s ease-in-out;
      }

      @keyframes shake {
        0%, 100% { transform: translateX(0); }
        20% { transform: translateX(-5px); }
        40% { transform: translateX(5px); }
        60% { transform: translateX(-3px); }
        80% { transform: translateX(3px); }
      }

      ::-webkit-scrollbar {
        width: 10px;
        height: 10px;
      }

      ::-webkit-scrollbar-track {
        background: #111519;
        border-radius: 999px;
      }

      ::-webkit-scrollbar-thumb {
        background: #7a1638;
        border-radius: 999px;
        border: 2px solid #111519;
      }

      ::-webkit-scrollbar-thumb:hover {
        background: #a62a52;
      }

      * {
        scrollbar-width: thin;
        scrollbar-color: #7a1638 #111519;
      }

      #tableScrollable {
        scrollbar-width: none;
        -ms-overflow-style: none;
      }

      #tableScrollable::-webkit-scrollbar {
        width: 0;
        height: 0;
      }

      @media (max-width: 1024px) {
        .label-cell {
          min-width: 170px;
        }

        .summary-head,
        .summary-cell {
          min-width: 200px;
        }
      }

   @media (max-width: 767px) {
  .admin-action-panel {
    position: static;
    top: auto;
    z-index: auto;
  }

  .top-table-scroll {
    display: none;
  }

  .input-hour {
    width: 50px;
    min-width: 50px;
    min-height: 44px;
    font-size: 16px;
  }

  .label-cell {
    min-width: 112px;
    width: 112px;
    max-width: 112px;
  }

  .summary-head,
  .summary-cell {
    min-width: 180px;
    width: 180px;
  }
}

      /* ========= Мобильная панель (аналог table.html) ========= */
#mobileBar {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: rgba(2, 6, 23, 0.86);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 16px;
  padding: 8px 10px;
  margin-bottom: 12px;
}

@media (min-width: 768px) {
  #mobileBar {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
  }

  #mobileBar .mbar-row:first-child {
    flex: 0 0 auto;
    min-width: 250px;
  }

  #mobileBar .mbar-row:nth-child(2) {
    flex: 1 1 auto;
    justify-content: flex-end;
  }

  #mobileBar .mbar-employee-row {
    display: none;
  }
}

@media (max-width: 767px) {
  #mobileBar {
    position: -webkit-sticky;
    position: sticky;
    top: calc(env(safe-area-inset-top, 0px) + 72px);
    z-index: 40;
    background: rgba(2, 6, 23, 0.96);
    border: 1px solid rgba(255,255,255,0.10);
    border-radius: 16px;
    padding: 8px 10px;
    margin-bottom: 12px;
  }
}
    .mbar-row {
      display: flex;
      align-items: center;
      gap: 6px;
      flex-wrap: nowrap;
    }

    .mbar-employee-row {
      display: flex;
      min-width: 0;
      align-items: center;
      gap: 8px;
      border-radius: 12px;
      background: rgba(15, 23, 42, 0.78);
      border: 1px solid rgba(255, 255, 255, 0.08);
      padding: 7px 10px;
    }

    .mbar-employee-caption {
      flex: 0 0 auto;
      font-size: 0.68rem;
      font-weight: 700;
      color: rgba(148, 163, 184, 0.92);
      text-transform: uppercase;
      letter-spacing: 0;
    }

    .mbar-employee-name {
      flex: 1 1 auto;
      min-width: 0;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
      font-size: 0.82rem;
      color: rgba(226, 232, 240, 0.98);
    }

    .mbar-comment-button {
      flex: 0 0 auto;
      border: 1px solid rgba(56, 189, 248, 0.2);
      border-radius: 10px;
      background: rgba(14, 165, 233, 0.1);
      padding: 6px 9px;
      font-size: 0.72rem;
      font-weight: 700;
      color: #bae6fd;
    }

    .mbar-comment-button.is-active {
      background: rgba(14, 165, 233, 0.24);
      border-color: rgba(56, 189, 248, 0.48);
      box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.08);
    }

    #mHolidayBtn.is-active {
      background: rgba(245, 158, 11, 0.22) !important;
      color: rgba(253, 186, 64, 1) !important;
      border-color: rgba(245, 158, 11, 0.45) !important;
    }

    #mTransferredBtn.is-active {
      background: rgba(59, 130, 246, 0.2) !important;
      color: rgba(147, 197, 253, 1) !important;
      border-color: rgba(59, 130, 246, 0.45) !important;
    }

    #mShortBtn.is-active {
      background: rgba(16, 185, 129, 0.2) !important;
      color: rgba(52, 211, 153, 1) !important;
      border-color: rgba(16, 185, 129, 0.45) !important;
    }
    /* Подсветка выбранной колонки */
    .focus-col {
  outline: 2px solid rgba(56, 189, 248, 0.55);
  outline-offset: -2px;
  box-shadow: none !important;
}

    .admin-matrix th.focus-col,
    .admin-matrix td.focus-col {
      outline: 2px solid rgba(56, 189, 248, 0.55);
      outline-offset: -2px;
      box-shadow: none !important;
    }


    @media (max-width: 767px) {
  .label-cell {
    position: static;
    left: auto;
    z-index: auto;
    min-width: 112px;
    width: 112px;
    max-width: 112px;
    padding: 8px 6px !important;
    box-shadow: none;
  }

  .label-main {
    font-size: 0.78rem;
  }

  .label-sub {
    font-size: 0.62rem;
  }

  .label-avatar {
    display: none;
  }

  .scrollable.is-scrolled-x .label-cell {
    box-shadow: 10px 0 18px -16px rgba(0, 0, 0, 0.85);
  }

  .admin-matrix .label-cell,
  .scrollable.is-scrolled-x .admin-matrix .label-cell {
    position: sticky;
    left: 0;
    z-index: 25;
    min-width: 56px;
    width: 56px;
    max-width: 56px;
    padding: 6px !important;
    background: rgba(12, 20, 44, 0.98) !important;
    box-shadow: 10px 0 18px -16px rgba(0, 0, 0, 0.85);
  }

  .admin-matrix thead .label-cell {
    z-index: 35;
    color: transparent;
  }

  .admin-matrix thead .label-cell::after {
    content: "Сотр.";
    color: rgba(148, 163, 184, 0.92);
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0;
  }

  .admin-matrix .label-title-row,
  .admin-matrix .label-main,
  .admin-matrix .label-patronymic,
  .admin-matrix .label-overtime-badge,
  .admin-matrix .label-sub {
    display: none;
  }

  .admin-matrix .member-remove-button {
    top: 2px;
    right: 2px;
    width: 18px;
    height: 18px;
    border-radius: 6px;
    background: rgba(12, 20, 44, 0.78);
    font-size: 16px;
  }

  .label-avatar {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border-radius: 15px;
    background: rgba(99, 102, 241, 0.2);
    color: rgba(224, 231, 255, 0.98);
    border: 1px solid rgba(129, 140, 248, 0.28);
    font-size: 0.72rem;
    font-weight: 800;
    line-height: 1;
    margin: 0 auto;
  }

  .label-cell.is-mobile-active .label-avatar,
  .employee-day-row:focus-within .label-avatar {
    background: rgba(14, 165, 233, 0.22);
    border-color: rgba(56, 189, 248, 0.6);
    color: rgba(224, 242, 254, 0.98);
  }
}

      /* ALVISA admin workspace */
      :root {
        --alvisa-ink: #0b0d0f;
        --alvisa-graphite: #15191d;
        --alvisa-panel: #1a1f24;
        --alvisa-line: rgba(241, 238, 232, 0.11);
        --alvisa-muted: #9ca3ab;
        --alvisa-porcelain: #f1eee8;
        --alvisa-wine: #7a1638;
        --alvisa-steel: #6ea8e8;
        --alvisa-gold: #c6a15b;
      }

      body.admin-page {
        background: var(--alvisa-ink);
        background-image: none;
        color: var(--alvisa-porcelain);
      }

      body.admin-page::before,
      body.admin-page::after {
        display: none;
      }

      .admin-shell {
        max-width: 1680px;
      }

      .admin-page-header {
        margin-bottom: 18px;
      }

      .admin-header-surface {
        min-height: 86px;
        border: 0;
        border-bottom: 1px solid var(--alvisa-line);
        border-radius: 0 !important;
        background: transparent;
        padding: 10px 0 18px !important;
      }

      .admin-page-heading,
      .admin-section-heading {
        font-family: "Anticva", Georgia, serif;
        font-weight: 400 !important;
        letter-spacing: 0;
        color: var(--alvisa-porcelain);
      }

      .admin-page-heading {
        font-size: 34px !important;
        line-height: 1.05;
      }

      .admin-page-heading span {
        background: none !important;
        color: inherit !important;
        -webkit-text-fill-color: currentColor;
      }

      .admin-header-links a,
      .admin-header-links button {
        min-height: 40px;
        border: 1px solid var(--alvisa-line);
        border-radius: 7px !important;
        background: #111519 !important;
        color: #c5cbd1;
        box-shadow: none;
        backdrop-filter: none;
      }

      .admin-header-links a:hover,
      .admin-header-links button:hover {
        border-color: rgba(110, 168, 232, 0.34);
        background: #191f24 !important;
        color: var(--alvisa-porcelain);
      }

      .admin-action-panel {
        top: calc(70px + env(safe-area-inset-top, 0px));
        margin-bottom: 14px;
        border: 1px solid rgba(110, 168, 232, 0.18);
        border-radius: 9px !important;
        background: rgba(17, 21, 25, 0.97);
        box-shadow: 0 16px 32px rgba(0, 0, 0, 0.24);
        backdrop-filter: none;
      }

      .admin-action-panel::before {
        display: none;
      }

      .admin-period-control {
        min-height: 42px;
        border: 1px solid var(--alvisa-line);
        border-radius: 7px !important;
        background: #0d1114 !important;
      }

      select.ui-select {
        min-height: 32px;
        border: 0;
        border-radius: 6px;
        background-color: #1c2228;
        color: var(--alvisa-porcelain);
        backdrop-filter: none;
      }

      select.ui-select:hover,
      select.ui-select:focus {
        border-color: transparent;
        background-color: #252c33;
        box-shadow: none;
      }

      .admin-action-panel #saveStatus {
        border: 0;
        border-radius: 0;
        background: transparent;
        padding-left: 6px;
        padding-right: 6px;
        box-shadow: none;
      }

      .admin-icon-action {
        position: relative;
        display: inline-flex;
        width: 42px;
        height: 42px;
        flex: 0 0 42px;
        align-items: center;
        justify-content: center;
        border-radius: 7px !important;
        padding: 0 !important;
        box-shadow: none !important;
      }

      .admin-icon-action.hidden {
        display: none;
      }

      .admin-icon-action svg {
        width: 19px;
        height: 19px;
        fill: none;
        stroke: currentColor;
        stroke-width: 2;
        stroke-linecap: round;
        stroke-linejoin: round;
      }

      .admin-icon-action::after {
        content: attr(data-tooltip);
        position: absolute;
        z-index: 30;
        top: calc(100% + 9px);
        left: 50%;
        width: max-content;
        max-width: 230px;
        padding: 7px 9px;
        border: 1px solid rgba(241, 238, 232, 0.14);
        border-radius: 5px;
        background: #080a0b;
        color: var(--alvisa-porcelain);
        font-size: 11px;
        font-weight: 600;
        line-height: 1.25;
        opacity: 0;
        pointer-events: none;
        transform: translate(-50%, -4px);
        transition: opacity 150ms ease, transform 150ms ease;
      }

      .admin-icon-action:hover::after,
      .admin-icon-action:focus-visible::after {
        opacity: 1;
        transform: translate(-50%, 0);
      }

      .admin-tool-groups { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 12px; }
      .admin-schedule-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; padding-right: 12px; border-right: 1px solid var(--alvisa-line); }
      .admin-schedule-actions .admin-icon-action { border: 1px solid rgba(110, 168, 232, .32); background: rgba(110, 168, 232, .08); color: #bcd8f6; }
      .admin-schedule-actions .admin-icon-action[data-schedule-tool="fillNorm"] { border-color: rgba(198, 161, 91, .36); background: rgba(198, 161, 91, .09); color: #ead3a5; }
      .admin-schedule-actions .admin-icon-action[data-schedule-tool="reduceOvertime"] { border-color: rgba(174, 123, 139, .4); background: rgba(122, 22, 56, .18); color: #e6b8c5; }
      .admin-schedule-actions .admin-icon-action.hidden { display: none; }

      .schedule-tools-overlay { position: fixed; inset: 0; z-index: 1300; display: flex; overflow: auto; padding: 16px; background: rgba(4, 6, 7, .82); backdrop-filter: blur(7px); }
      .schedule-tools-overlay.hidden { display: none; }
      .schedule-tools-dialog { width: min(760px, 100%); height: min(680px, calc(100dvh - 32px)); min-height: 0; flex: none; margin: auto; display: flex; flex-direction: column; border: 1px solid rgba(241, 238, 232, .18); border-radius: 8px; background: #15191d; box-shadow: 0 24px 80px rgba(0, 0, 0, .5); color: #f1eee8; }
      .schedule-tools-head, .schedule-tools-foot { display: flex; flex-shrink: 0; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px; }
      .schedule-tools-head { border-bottom: 1px solid rgba(241, 238, 232, .12); }
      .schedule-tools-head h2 { margin: 0; font-size: 1.05rem; font-weight: 700; }
      .schedule-tools-body { flex: 1 1 auto; min-height: 0; overflow: auto; padding: 16px 18px; }
      .schedule-tools-foot { border-top: 1px solid rgba(241, 238, 232, .12); justify-content: flex-end; }
      .schedule-tools-people { display: grid; gap: 5px; max-height: 260px; overflow: auto; padding: 5px; border: 1px solid rgba(241, 238, 232, .12); border-radius: 6px; background: #101417; }
      .schedule-tools-person { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; align-items: center; gap: 12px; min-height: 56px; padding: 9px 12px; border: 1px solid rgba(241, 238, 232, .1); border-radius: 5px; background: #191e22; color: #f1eee8; cursor: pointer; font-size: .84rem; transition: border-color 150ms ease, background 150ms ease; }
      .schedule-tools-person:hover { border-color: rgba(198, 161, 91, .36); background: #20252a; }
      .schedule-tools-person:has(input:checked) { border-color: rgba(198, 161, 91, .42); background: #222329; }
      .schedule-tools-person:focus-within { outline: 2px solid rgba(198, 161, 91, .7); outline-offset: -2px; }
      .schedule-tools-person input[type="checkbox"] { appearance: none; width: 26px; height: 26px; margin: 0; display: grid; place-items: center; border: 2px solid #7e878f; border-radius: 5px; background: #0e1215; cursor: pointer; }
      .schedule-tools-person input[type="checkbox"]:checked { border-color: #c6a15b; background: #7a1638; }
      .schedule-tools-person input[type="checkbox"]:checked::after { content: ""; width: 7px; height: 12px; margin-top: -3px; border: solid #fff4db; border-width: 0 2px 2px 0; transform: rotate(45deg); }
      .schedule-tools-person input[type="checkbox"]:disabled { cursor: not-allowed; opacity: .55; }
      .schedule-tools-person > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
      .schedule-tools-person .schedule-tools-deficit { color: #ead3a5; font-size: .78rem; font-weight: 700; font-variant-numeric: tabular-nums; }
      @media (max-width: 600px) { .schedule-tools-person .schedule-tools-deficit { grid-column: 2 / -1; } }
      .schedule-tools-select { min-height: 34px; border: 1px solid rgba(241, 238, 232, .2); border-radius: 5px; padding: 5px 8px; background: #0b0d0f; color: #f1eee8; }
      .schedule-tools-phases { display: flex; flex-wrap: wrap; gap: 12px; margin: 14px 0; }
      .schedule-tools-phases label { display: grid; gap: 5px; color: #b9c0c7; font-size: .72rem; }
      .schedule-tools-summary { margin-top: 14px; color: #c9ced3; font-size: .78rem; line-height: 1.6; }
      .schedule-tools-summary ul { max-height: 220px; overflow: auto; margin: 9px 0 0; padding-left: 18px; }
      .schedule-tools-summary li { margin: 4px 0; }
      .schedule-tools-warehouse { margin-top: 14px; padding: 13px; border: 1px solid rgba(198, 161, 91, .28); border-radius: 6px; background: rgba(198, 161, 91, .06); }
      .schedule-tools-option { display: flex; align-items: center; gap: 10px; color: #f1eee8; font-size: .82rem; font-weight: 700; cursor: pointer; }
      .schedule-tools-option input { appearance: none; width: 26px; height: 26px; margin: 0; display: grid; flex: 0 0 auto; place-items: center; border: 2px solid #7e878f; border-radius: 5px; background: #0e1215; cursor: pointer; }
      .schedule-tools-option input:checked { border-color: #c6a15b; background: #7a1638; }
      .schedule-tools-option input:checked::after { content: ""; width: 7px; height: 12px; margin-top: -3px; border: solid #fff4db; border-width: 0 2px 2px 0; transform: rotate(45deg); }
      .schedule-tools-option input:focus-visible { outline: 2px solid rgba(198, 161, 91, .7); outline-offset: 2px; }
      .schedule-tools-dates { display: grid; grid-template-columns: repeat(auto-fill, minmax(48px, 1fr)); gap: 6px; margin-top: 12px; }
      .schedule-tools-date { display: grid; place-items: center; min-height: 38px; border: 1px solid rgba(241, 238, 232, .14); border-radius: 5px; background: #15191d; color: #c9ced3; font-size: .76rem; cursor: pointer; }
      .schedule-tools-date:has(input:checked) { border-color: #c6a15b; background: rgba(122, 22, 56, .34); color: #fff4db; }
      .schedule-tools-date input { position: absolute; opacity: 0; pointer-events: none; }
      .schedule-tools-button { min-height: 36px; border: 1px solid rgba(241, 238, 232, .2); border-radius: 6px; padding: 7px 12px; background: rgba(241, 238, 232, .05); color: #f1eee8; font-size: .76rem; font-weight: 700; }
      .schedule-tools-button-primary { border-color: rgba(198, 161, 91, .45); background: rgba(198, 161, 91, .14); color: #ead3a5; }
      .schedule-tools-button:disabled { opacity: .45; cursor: not-allowed; }

      #reloadBtn {
        border: 1px solid var(--alvisa-line) !important;
        background: transparent !important;
        color: #b9c0c7 !important;
      }

      #saveBtn {
        border: 1px solid rgba(198, 161, 91, 0.48) !important;
        background: rgba(198, 161, 91, 0.13) !important;
        color: #ead3a5 !important;
      }

      #saveSilentBtn {
        border: 1px solid rgba(198, 161, 91, 0.25) !important;
        background: rgba(198, 161, 91, 0.07) !important;
        color: #cfbc96 !important;
      }

      #auditLogBtn {
        border: 1px solid var(--alvisa-line) !important;
        background: rgba(241, 238, 232, 0.04) !important;
        color: #c9ced3 !important;
      }

      #announcementLink {
        border: 1px solid rgba(94, 187, 151, 0.28) !important;
        background: rgba(94, 187, 151, 0.09) !important;
        color: #a9ddc9 !important;
      }

      #createInviteBtn {
        border: 1px solid rgba(110, 168, 232, 0.28) !important;
        background: rgba(110, 168, 232, 0.09) !important;
        color: #bcd8f6 !important;
      }

      .admin-action-buttons button:hover,
      .admin-action-buttons a:hover {
        filter: brightness(1.16);
      }

      .admin-invite-box {
        border-color: rgba(110, 168, 232, 0.2) !important;
        border-radius: 8px !important;
        background: #111519 !important;
        backdrop-filter: none;
      }

      .admin-invite-box input,
      .admin-invite-box button {
        border-radius: 6px !important;
      }

      .admin-stats {
        gap: 0 !important;
        overflow: hidden;
        margin-bottom: 14px;
        border: 1px solid var(--alvisa-line);
        border-radius: 9px;
        background: var(--alvisa-graphite);
      }

      .admin-stats > .glass-card {
        min-height: 96px;
        border: 0;
        border-right: 1px solid var(--alvisa-line);
        border-radius: 0 !important;
        background: transparent;
        padding: 17px 20px !important;
        box-shadow: none;
        backdrop-filter: none;
      }

      .admin-stats > .glass-card:last-child {
        border-right: 0;
      }

      .admin-stats > .glass-card > div:first-child {
        color: var(--alvisa-muted);
        font-size: 12px;
      }

      .admin-stats > .glass-card > div[id] {
        margin-top: 8px;
        color: var(--alvisa-porcelain);
        font-size: 28px;
        font-weight: 600;
        font-variant-numeric: tabular-nums;
      }

      .glass-card.admin-table-card {
        overflow: visible;
        border: 1px solid rgba(110, 168, 232, 0.17);
        border-radius: 10px !important;
        background: #101418;
        box-shadow: 0 20px 48px rgba(0, 0, 0, 0.24);
        backdrop-filter: none;
      }

      .admin-matrix-intro {
        margin-bottom: 14px;
        padding-bottom: 14px;
        border-bottom: 1px solid var(--alvisa-line);
      }

      .admin-section-heading {
        font-size: 25px !important;
        line-height: 1.15;
      }

      .admin-legend > div:first-child {
        color: #929aa2;
      }

      .admin-legend span.rounded-full {
        border-radius: 6px;
      }

      .top-table-scroll {
        top: calc(142px + env(safe-area-inset-top, 0px));
        height: 14px;
        margin-bottom: 8px;
        border-color: rgba(110, 168, 232, 0.16);
        border-radius: 6px;
        background: #0b0f12;
        scrollbar-color: #7a1638 #111519;
      }

      .scrollable {
        border: 1px solid var(--alvisa-line);
        border-radius: 8px;
        background: #111519;
      }

      .admin-matrix {
        border-radius: 0;
        background: #111519;
      }

      .admin-matrix th {
        height: 48px;
        border-color: var(--alvisa-line);
        background: #191e23;
        color: #b8c0c8;
        font-variant-numeric: tabular-nums;
      }

      .admin-matrix td {
        height: 44px;
        padding-top: 4px;
        padding-bottom: 4px;
        border-color: rgba(241, 238, 232, 0.065);
      }

      @media (min-width: 768px) {
        .admin-matrix .label-cell { padding: 6px 8px !important; }
        .admin-matrix .label-main,
        .scrollable.is-scrolled-x .admin-matrix .label-main { font-size: .82rem; }
        .admin-matrix .input-hour { padding-top: 6px; padding-bottom: 6px; }
      }

      .label-cell,
      .summary-head {
        background: #191e23 !important;
        border-color: rgba(110, 168, 232, 0.2) !important;
        box-shadow: 10px 0 20px -17px rgba(0, 0, 0, 0.9);
      }

      .label-main {
        color: var(--alvisa-porcelain);
      }

      .label-patronymic {
        display: block;
        margin-top: 3px;
        padding-left: 25px;
        color: #aab3bb;
        font-size: .72rem;
        line-height: 1.2;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
      }

      .department-view-only .label-patronymic { padding-left: 0; }
      .admin-matrix .label-overtime-badge:not(.is-hidden) { display: inline-block; margin: 3px 0 0 25px; }
      .department-view-only .admin-matrix .label-overtime-badge:not(.is-hidden) { margin-left: 0; }

      .label-sub {
        color: #7f8992;
      }

      .member-drag-handle {
        border-radius: 5px;
        background: rgba(110, 168, 232, 0.08);
        color: #8192a2;
      }

      .summary-cell {
        border-color: rgba(110, 168, 232, 0.18) !important;
        background: #14191e;
      }

      .summary-main strong,
      .summary-line strong {
        font-variant-numeric: tabular-nums;
      }

      .summary-line.muted strong {
        color: #bcd8f6;
      }

      .employee-day-row td {
        background-color: #12171b;
      }

      .employee-night-row td {
        background-color: #151a1f;
      }

      .person-divider td,
      .person-divider .summary-cell,
      .person-divider .label-cell {
        border-bottom-color: rgba(110, 168, 232, 0.23) !important;
      }

      .input-hour {
        width: 52px;
        min-width: 52px;
        min-height: 38px;
        border: 1px solid rgba(241, 238, 232, 0.11);
        border-radius: 6px;
        background: #0b0f12;
        font-variant-numeric: tabular-nums;
      }

      .input-hour:hover {
        border-color: rgba(110, 168, 232, 0.28);
      }

      .input-hour:focus {
        border-color: var(--alvisa-steel);
        background: #10171d;
        box-shadow: 0 0 0 3px rgba(110, 168, 232, 0.13);
      }

      td.schedule-tool-changed .input-hour,
      td.schedule-tool-changed .input-hour:focus {
        border-color: #e4bb69;
        background: #211b17;
        animation: schedule-tool-glow 2.4s ease-in-out infinite;
      }

      @keyframes schedule-tool-glow {
        0%, 100% { box-shadow: 0 0 0 2px rgba(228, 187, 105, .42), 0 0 9px rgba(228, 187, 105, .2); }
        50% { box-shadow: 0 0 0 3px rgba(228, 187, 105, .82), 0 0 18px rgba(228, 187, 105, .48); }
      }

      @media (prefers-reduced-motion: reduce) {
        td.schedule-tool-changed .input-hour { animation: none; box-shadow: 0 0 0 3px rgba(228, 187, 105, .7); }
      }

      td.matrix-cell-selected {
        position: relative;
      }

      td.matrix-cell-selected::after {
        content: "";
        position: absolute;
        z-index: 2;
        inset: 2px;
        border: 2px solid rgba(110, 168, 232, 0.95);
        border-radius: 6px;
        background: rgba(110, 168, 232, 0.16);
        pointer-events: none;
      }

      body.is-selecting-matrix-cells,
      body.is-selecting-matrix-cells * {
        cursor: cell !important;
        user-select: none !important;
      }

      td.night-cell .input-hour {
        color: #bcd8f6;
      }

      .weekend-col { background-color: rgba(122, 22, 56, 0.18) !important; }
      .holiday-col { background-color: rgba(198, 161, 91, 0.18) !important; }
      .transferred-col { background-color: rgba(110, 168, 232, 0.15) !important; }
      .short-col { background-color: rgba(94, 187, 151, 0.13) !important; }
      .admin-matrix th.weekend-col { background-color: rgba(122, 22, 56, 0.28) !important; }
      .admin-matrix th.holiday-col { background-color: rgba(198, 161, 91, 0.24) !important; }
      .admin-matrix th.transferred-col { background-color: rgba(110, 168, 232, 0.22) !important; }
      .admin-matrix th.short-col { background-color: rgba(94, 187, 151, 0.2) !important; }

      #mobileBar {
        border: 1px solid rgba(110, 168, 232, 0.16);
        border-radius: 8px;
        background: #111519;
      }

      #mobileBar button,
      .mbar-employee-row,
      .mbar-comment-button {
        border-radius: 6px;
      }

      .mbar-employee-row {
        background: #0d1114;
      }

      .shift-comment-dialog {
        border-radius: 8px;
        background: #111519;
      }

      .shift-comment-input,
      .shift-comment-button {
        border-radius: 6px;
      }

      ::-webkit-scrollbar-track {
        background: #111519;
      }

      ::-webkit-scrollbar-thumb {
        background: #7a1638;
        border-color: #111519;
      }

      * {
        scrollbar-color: #7a1638 #111519;
      }

      @media (max-width: 1023px) {
        .admin-action-panel {
          position: static;
        }

        .admin-tool-groups {
          width: 100%;
          justify-content: center;
        }

        .admin-schedule-actions {
          justify-content: center;
          padding-right: 0;
          border-right: 0;
        }

        .admin-action-buttons {
          width: 100%;
          justify-content: center;
        }
      }

      @media (max-width: 767px) {
        .admin-matrix .label-overtime-badge:not(.is-hidden) {
          display: none;
        }

        .admin-matrix .summary-head,
        .admin-matrix .summary-cell {
          min-width: 230px;
          width: 230px;
        }

        .admin-shell {
          padding-left: 12px;
          padding-right: 12px;
        }

        .admin-page-header {
          margin-bottom: 12px;
        }

        .admin-header-surface {
          padding-bottom: 14px !important;
        }

        .admin-page-heading {
          font-size: 28px !important;
        }

        .admin-header-links {
          width: 100%;
        }

        .admin-header-links > * {
          flex: 1 1 calc(50% - 4px);
          text-align: center;
        }

        .admin-action-panel {
          padding: 10px !important;
        }

        .admin-action-primary {
          width: 100%;
        }

        .admin-period-control {
          width: 100%;
          justify-content: center;
        }

        .admin-action-panel #saveStatus {
          width: 100%;
          justify-content: center;
          min-height: 26px;
        }

        .admin-icon-action {
          width: 40px;
          height: 40px;
          flex: 0 0 40px;
        }

        .admin-icon-action::after {
          display: none;
        }

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

        .admin-stats > .glass-card {
          min-height: 88px;
          padding: 14px !important;
          border-right: 1px solid var(--alvisa-line);
          border-bottom: 1px solid var(--alvisa-line);
        }

        .admin-stats > .glass-card:nth-child(2) {
          border-right: 0;
        }

        .admin-stats > .glass-card:last-child {
          grid-column: span 2;
          border-bottom: 0;
        }

        .admin-stats > .glass-card > div[id] {
          font-size: 23px;
        }

        .glass-card.admin-table-card {
          padding: 10px !important;
        }

        .admin-matrix-intro {
          padding: 2px 2px 12px;
        }

        .admin-section-heading {
          font-size: 21px !important;
        }

        #mobileBar {
          top: calc(env(safe-area-inset-top, 0px) + 72px);
          padding: 8px;
        }

        .admin-matrix .label-cell,
        .scrollable.is-scrolled-x .admin-matrix .label-cell {
          background: #191e23 !important;
        }

        .label-avatar {
          border-radius: 7px;
          background: rgba(122, 22, 56, 0.32);
          border-color: rgba(182, 71, 107, 0.3);
          color: #f0dce3;
        }
      }

      .department-view-only .input-hour {
        cursor: default;
        caret-color: transparent;
      }

      .department-view-only .member-draggable-cell {
        cursor: default;
      }

      .admin-plant-table {
        margin-top: 24px;
      }

      .admin-plant-empty {
        margin: 0;
        padding: 18px;
        border: 1px dashed rgba(241, 238, 232, 0.16);
        border-radius: 7px;
        color: #92999f;
        text-align: center;
      }
