:root {
  --bg: #f4f7fb;
  --card: #ffffff;
  --text: #111827;
  --muted: #64748b;
  --border: #e2e8f0;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --danger: #dc2626;
  --secondary: #64748b;
  --radius: 16px;
  --shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Arial, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.10), transparent 32%),
    linear-gradient(180deg, #f8fafc 0%, var(--bg) 100%);
  color: var(--text);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.topbar-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 14px 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}

.logo {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  object-fit: cover;
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.18);
}

.logo-block span {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #0f172a;
}

.nav-links {
  display: flex;
  gap: 8px;
  align-items: center;
}

.nav-btn {
  padding: 10px 14px;
  border-radius: 999px;
  color: #334155;
  background: transparent;
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
  transition: 0.18s ease;
}

.nav-btn:hover {
  background: #eff6ff;
  color: var(--primary);
}

.wrap {
  max-width: 980px;
  margin: 28px auto;
  padding: 0 18px 40px;
}

.wrap > h1,
.home-page h1 {
  margin-top: 0;
}

h1 {
  font-size: 30px;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 18px;
}

h2 {
  margin-top: 26px;
  font-size: 21px;
}

h3 {
  margin-top: 0;
}

.card,
form:not(.inline-form):not(.duty-sign-form) {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}

.card + .card {
  margin-top: 14px;
}

label {
  display: block;
  margin: 14px 0 7px;
  font-weight: 700;
  color: #334155;
  font-size: 14px;
}

input,
select,
textarea {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  font-size: 16px;
  background: #fff;
  color: var(--text);
  outline: none;
  transition: 0.15s ease;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

textarea {
  font-family: Arial, sans-serif;
  line-height: 1.5;
}

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

.btns {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

button,
.button {
  border: 0;
  border-radius: 12px;
  padding: 12px 18px;
  background: var(--primary);
  color: white;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 44px;
  transition: 0.18s ease;
}

button:hover,
.button:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
}

button.secondary,
.button.secondary {
  background: #e2e8f0;
  color: #334155;
}

button.secondary:hover,
.button.secondary:hover {
  background: #cbd5e1;
}

button.danger,
.button.danger {
  background: var(--danger);
}

.flash {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
  padding: 13px 15px;
  border-radius: 14px;
  margin-bottom: 14px;
  font-weight: 700;
}

.muted {
  color: var(--muted);
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 20px 0 8px;
  padding: 14px;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 14px;
}

.checkbox-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 0;
  flex: 0 0 auto;
}

.checkbox-row label {
  margin: 0;
}

/* Главная */

.home-page {
  max-width: 960px;
  margin: 0 auto;
}

.home-hero {
  background:
    linear-gradient(135deg, rgba(37, 99, 235, 0.95), rgba(14, 165, 233, 0.9));
  color: white;
  border-radius: 24px;
  padding: 34px;
  box-shadow: var(--shadow);
  margin-bottom: 20px;
}

.home-hero h1 {
  margin: 0 0 8px;
  font-size: 34px;
}

.home-hero p {
  max-width: 620px;
  margin: 0;
  color: rgba(255, 255, 255, 0.86);
  line-height: 1.5;
}

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

.home-btn {
  display: block;
  min-height: 118px;
  padding: 20px;
  border-radius: 20px;
  background: white;
  color: #0f172a;
  border: 1px solid var(--border);
  text-decoration: none;
  box-shadow: var(--shadow);
  transition: 0.18s ease;
}

.home-btn:hover {
  transform: translateY(-2px);
  border-color: rgba(37, 99, 235, 0.35);
}

.home-btn strong {
  display: block;
  font-size: 20px;
  margin-bottom: 8px;
}

.home-btn span {
  display: block;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.admin-links {
  margin-top: 24px;
  padding: 18px;
  border: 1px dashed #cbd5e1;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.55);
}

.admin-links h3 {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 10px;
}

.admin-links a {
  display: inline-block;
  margin: 6px 12px 6px 0;
  color: var(--muted);
  text-decoration: none;
  font-weight: 700;
}

.admin-links a:hover {
  color: var(--primary);
}

/* Таблицы */

.schedule-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.schedule-table th {
  background: #f8fafc;
  color: #475569;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.schedule-table th,
.schedule-table td {
  padding: 14px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

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

.compact-list {
  margin: 6px 0 0;
  padding-left: 18px;
  line-height: 1.6;
}

.inline-form {
  display: flex;
  gap: 8px;
  align-items: center;
}

.inline-form select {
  min-width: 220px;
}

/* Алгоритмы */

.algorithm-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.algorithm-card {
  border: 1px solid var(--border);
  border-radius: 16px;
  background: white;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.algorithm-card summary {
  cursor: pointer;
  padding: 17px 19px;
  font-size: 18px;
  font-weight: 800;
  color: #0f172a;
  background: #f8fafc;
}

.algorithm-card summary:hover {
  background: #eff6ff;
}

.algorithm-content {
  padding: 20px;
  border-top: 1px solid var(--border);
  line-height: 1.65;
}

/* Мобильная версия */

.menu-toggle {
  display: none;
}

@media (max-width: 760px) {
  .topbar-inner {
    padding: 12px;
  }

  .menu-toggle {
    display: inline-flex;
    width: 44px;
    height: 44px;
    padding: 0;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 72px;
    left: 12px;
    right: 12px;
    flex-direction: column;
    align-items: stretch;
    background: white;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: var(--shadow);
  }

  .nav-links.show {
    display: flex;
  }

  .nav-btn {
    width: 100%;
    text-align: center;
    background: #f8fafc;
  }

  .wrap {
    margin: 18px auto;
    padding: 0 12px 30px;
  }

  h1 {
    font-size: 25px;
  }

  .grid,
  .home-buttons {
    grid-template-columns: 1fr;
  }

  .home-hero {
    padding: 24px;
    border-radius: 20px;
  }

  .home-hero h1 {
    font-size: 28px;
  }

  .btns,
  .inline-form {
    flex-direction: column;
    align-items: stretch;
  }

  button,
  .button,
  .btns form {
    width: 100%;
  }

  .schedule-table,
  .schedule-table thead,
  .schedule-table tbody,
  .schedule-table tr,
  .schedule-table th,
  .schedule-table td {
    display: block;
    width: 100%;
  }

  .schedule-table thead {
    display: none;
  }

  .schedule-table tr {
    border-bottom: 1px solid var(--border);
    padding: 14px 0;
  }

  .schedule-table td {
    border-bottom: 0;
    padding: 8px 0;
  }
}

.upload-card {
  margin-top: 22px;
  margin-bottom: 18px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.upload-details {
  padding: 0;
}

.upload-details summary {
  list-style: none;
  cursor: pointer;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: #f8fafc;
  border-bottom: 1px solid transparent;
}

.upload-details summary::-webkit-details-marker {
  display: none;
}

.upload-details summary::before {
  content: "📎";
  font-size: 20px;
  margin-bottom: 2px;
}

.upload-details[open] summary {
  border-bottom-color: var(--border);
}

.upload-title {
  font-size: 17px;
  font-weight: 800;
  color: #0f172a;
}

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

.upload-content {
  padding: 18px 20px 20px;
}

.upload-form {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
}

.upload-form + .upload-form {
  margin-top: 18px;
}

.upload-divider {
  height: 1px;
  background: var(--border);
  margin: 20px 0;
}

.upload-form input[type="file"] {
  padding: 12px;
  background: #f8fafc;
}

.upload-form button {
  margin-top: 8px;
}

.memo-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: stretch;
  margin-top: 24px;
  padding: 14px;
  background: #ffffff;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 18px;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
  width: fit-content;
  max-width: 100%;
}

.memo-action-form {
  margin: 0;
  padding: 0;
  display: flex;
}

.memo-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 20px;
  border-radius: 12px;
  border: 0;
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  font-family: inherit;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.memo-action.primary {
  background: #2563eb;
  color: #ffffff;
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.25);
}

.memo-action.primary:hover {
  background: #1d4ed8;
  transform: translateY(-1px);
}

.memo-action.secondary {
  background: #e8eef7;
  color: #17233c;
}

.memo-action.secondary:hover {
  background: #dbe5f1;
  transform: translateY(-1px);
}

/* Админка дежурств */

.duty-calendar-form {
  box-shadow: none !important;
  border: 0 !important;
  padding: 0 !important;
  background: transparent !important;
}

.duty-calendar {
  margin-top: 16px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #ffffff;
  overflow-x: auto;
}

.calendar-weekdays,
.calendar-week {
  display: grid;
  grid-template-columns: repeat(7, minmax(84px, 1fr));
  gap: 8px;
}

.calendar-weekdays {
  margin-bottom: 8px;
}

.calendar-weekdays div {
  padding: 8px 6px;
  text-align: center;
  font-size: 13px;
  font-weight: 800;
  color: #64748b;
  background: #f8fafc;
  border-radius: 10px;
}

.calendar-week {
  margin-bottom: 8px;
}

.calendar-day {
  min-height: 72px;
  margin: 0;
  padding: 10px;
  display: flex;
  flex-direction: column-reverse;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #ffffff;
  cursor: pointer;
  transition: 0.15s ease;
}

.calendar-day:hover {
  border-color: #93c5fd;
  background: #eff6ff;
}

.calendar-day input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 0;
  align-self: flex-end;
}

.calendar-day span {
  font-weight: 800;
  color: #0f172a;
}

.calendar-day.muted-day {
  opacity: 0.35;
  background: #f8fafc;
  cursor: not-allowed;
}

.calendar-day.selected-day {
  border-color: #2563eb;
  background: #eff6ff;
  box-shadow: inset 0 0 0 1px #2563eb;
}

.calendar-day.selected-day span {
  color: #1d4ed8;
}

.danger-card {
  border-color: #fecaca;
  background: #fffafa;
}

.danger-card form {
  box-shadow: none !important;
  border: 0 !important;
  padding: 0 !important;
  background: transparent !important;
}

/* Таблица выбранных дежурств */

.schedule-table {
  table-layout: fixed;
}

.schedule-table td form {
  box-shadow: none !important;
  border: 0 !important;
  padding: 0 !important;
  background: transparent !important;
}

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

.schedule-table th:nth-child(2),
.schedule-table td:nth-child(2) {
  width: 180px;
}

.schedule-table th:nth-child(3),
.schedule-table td:nth-child(3) {
  width: 150px;
}

.schedule-table th:nth-child(4),
.schedule-table td:nth-child(4) {
  width: auto;
}

.duty-settings-form {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) 90px 60px;
  gap: 8px;
  align-items: center;
}

.duty-settings-form select {
  width: 100%;
  min-width: 0;
}

.duty-settings-form button {
  width: 60px;
  min-width: 60px;
  padding-left: 0;
  padding-right: 0;
}

.schedule-table .danger {
  width: 100%;
  max-width: 130px;
  padding: 10px 12px;
  font-size: 14px;
}

@media (max-width: 900px) {
  .calendar-weekdays,
  .calendar-week {
    grid-template-columns: repeat(7, 74px);
  }

  .duty-settings-form {
    grid-template-columns: 1fr;
  }

  .duty-settings-form button {
    width: 100%;
  }

  .schedule-table {
    min-width: 760px;
  }

  .card {
    overflow-x: auto;
  }
}

.admin-hero {
  background:
    linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(37, 99, 235, 0.9));
}

.disabled-card {
  opacity: 0.62;
  cursor: not-allowed;
  position: relative;
}

.disabled-card:hover {
  transform: none;
  border-color: var(--border);
}

.disabled-card::after {
  content: "Скоро";
  position: absolute;
  top: 16px;
  right: 16px;
  padding: 5px 9px;
  border-radius: 999px;
  background: #e2e8f0;
  color: #475569;
  font-size: 12px;
  font-weight: 800;
}

/* Отчёт по баллам */

.points-filter-form,
.points-report-form {
  box-shadow: none !important;
  border: 0 !important;
  padding: 0 !important;
  background: transparent !important;
}

.points-table-wrap {
  width: 100%;
  overflow-x: auto;
  margin-top: 18px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: white;
}

.points-table {
  width: max-content;
  min-width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.points-table th,
.points-table td {
  border-bottom: 1px solid var(--border);
  border-right: 1px solid var(--border);
  padding: 8px;
  text-align: center;
  vertical-align: middle;
  white-space: nowrap;
}

.points-table th {
  background: #f8fafc;
  color: #334155;
  font-size: 13px;
  font-weight: 800;
}

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

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

.points-table .employee-col {
  position: sticky;
  left: 0;
  z-index: 2;
  min-width: 170px;
  max-width: 210px;
  text-align: left;
  background: #ffffff;
  font-weight: 800;
}

.points-table thead .employee-col {
  z-index: 3;
  background: #f8fafc;
}

.score-select {
  width: 62px;
  min-width: 62px;
  padding: 8px;
  font-size: 14px;
  border-radius: 10px;
}

.total-cell {
  min-width: 56px;
  font-weight: 900;
  background: #eff6ff;
  color: #1d4ed8;
}

.points-table th.criterion-col {
  min-width: 96px;
  max-width: 96px;
  width: 96px;
  vertical-align: top;
  padding: 8px 4px 10px;
  white-space: normal;
}

.criterion-num {
  display: block;
  font-size: 13px;
  font-weight: 900;
  color: #1d4ed8;
  margin-bottom: 4px;
  line-height: 1;
}

.criterion-short {
  display: block;
  font-size: 11px;
  line-height: 1.15;
  font-weight: 800;
  color: #334155;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  hyphens: auto;
}

.points-table th,
.points-table td {
  white-space: normal;
}

.points-table thead th {
  height: 78px;
}


.points-table .employee-col {
  white-space: normal;
}

.score-select {
  width: 66px;
  min-width: 66px;
}

.answer-box {
  white-space: pre-line;
  line-height: 1.55;
}

/* Личный кабинет */

.cabinet-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 16px;
}

.cabinet-header h1 {
  margin-bottom: 6px;
}

.cabinet-login-card form {
  margin-top: 16px;
}

.cabinet-info-card {
  border-left: 5px solid var(--primary);
}

.cabinet-highlight {
  margin: 0;
  padding: 14px 16px;
  border-radius: 14px;
  background: #eff6ff;
  color: #1e3a8a;
  font-weight: 800;
  line-height: 1.45;
}

.duty-type-pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: #eef2ff;
  color: #3730a3;
  font-weight: 800;
  font-size: 13px;
}

@media (max-width: 700px) {
  .cabinet-header {
    flex-direction: column;
  }
}



/* Дневная сетка отпусков */

.vacation-scroll {
  overflow-x: auto;
  overflow-y: visible;
  padding: 12px;
}

.vacation-table {
  width: max-content;
  min-width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
}

.vacation-table th,
.vacation-table td {
  border-bottom: 1px solid #dbe3ef;
  border-right: 1px solid #e2e8f0;
  vertical-align: middle;
}

.vacation-table th {
  position: sticky;
  top: 0;
  z-index: 3;
  background: #f8fafc;
  color: #475569;
  text-align: center;
}

/* Левая колонка с сотрудником */

.vacation-name-col {
  position: sticky;
  left: 0;
  z-index: 4;
  width: 210px;
  min-width: 210px;
  max-width: 210px;
  background: white;
  box-shadow: 6px 0 12px rgba(15, 23, 42, 0.05);
}

.vacation-table th.vacation-name-col {
  z-index: 6;
  background: #f8fafc;
}

/* В админке первая колонка — действия */

.vacation-actions-col {
  position: sticky;
  left: 0;
  z-index: 5;
  width: 170px;
  min-width: 170px;
  max-width: 170px;
  background: white;
  box-shadow: 6px 0 12px rgba(15, 23, 42, 0.05);
}

.vacation-table th.vacation-actions-col {
  z-index: 7;
  background: #f8fafc;
}

.vacation-admin-table .vacation-name-col {
  left: 170px;
}

/* Заголовки дней */

.vacation-day-head {
  width: 13px;
  min-width: 13px;
  max-width: 13px;
  height: 72px;
  padding: 0;
  font-size: 10px;
  overflow: visible;
}

.vacation-standing-date {
  display: inline-block;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  white-space: nowrap;
  font-size: 8px;
  line-height: 1;
  font-weight: 700;
  color: #64748b;
  height: 64px;
  overflow: hidden;
}

.vacation-day-dot {
  color: #cbd5e1;
  font-size: 10px;
}

/* Вертикальная линия понедельника */

.vacation-monday-head,
.vacation-monday-cell {
  border-left: 2px solid #94a3b8 !important;
}

/* Дневные ячейки */

.vacation-cell {
  width: 13px;
  min-width: 13px;
  max-width: 13px;
  height: 34px;
  padding: 0 !important;
  background-color: #ffffff;
}

/* Выходные слегка серые */

.vacation-table td.vacation-weekend-cell {
  background-color: #f8fafc;
}

.vacation-table th.vacation-weekend-head {
  background-color: #f1f5f9;
}

/* Отпуска перекрывают фон выходных */

.vacation-table td.vacation-cell.vacation-doctor {
  background-color: #60a5fa !important;
}

.vacation-table td.vacation-cell.vacation-nurse {
  background-color: #86efac !important;
}

/* Список периодов под фамилией */

.vacation-period-list {
  margin-top: 8px;
  font-size: 12px;
  line-height: 1.45;
}

.vacation-status {
  display: inline-block;
  margin-top: 6px;
  padding: 3px 7px;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 700;
}

.small-text {
  font-size: 12px;
}

/* Блок пожеланий в личном кабинете */

.vacation-wish-block {
  display: none;
  margin-top: 16px;
}

.vacation-wish-block.show {
  display: block;
}

.vacation-period-row {
  margin-bottom: 14px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #f8fafc;
}

.vacation-action-form {
  margin-bottom: 8px;
}

.vacation-edit-details {
  margin-top: 8px;
}

.vacation-edit-details summary {
  list-style: none;
  cursor: pointer;
}

.vacation-edit-details summary::-webkit-details-marker {
  display: none;
}

.vacation-admin-edit-form {
  margin-top: 10px;
  min-width: 260px;
}

/* Широкая страница почти на весь экран */

.wide-page {
  width: min(100vw - 28px, 1700px);
  margin-left: calc(50% - min(50vw - 14px, 850px));
}

@media (max-width: 760px) {
  .wide-page {
    width: auto;
    margin-left: 0;
  }

  .vacation-scroll {
    overflow-x: auto;
  }
}

button.danger-light,
.button.danger-light {
  border-color: #fecaca;
  background: #fff7f7;
  color: #b91c1c;
}

button.danger-light:hover,
.button.danger-light:hover {
  background: #fee2e2;
  border-color: #fca5a5;
}

/* Компактный вид графика отпусков */

.vacation-scroll {
  overflow-x: auto;
  overflow-y: visible;
  padding: 10px;
}

/* Стараемся уместить весь год в ширину экрана */
.vacation-table {
  width: 100%;
  min-width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 12px;
}

/* Убираем видимую сетку между днями */
.vacation-table th,
.vacation-table td {
  border-right: none !important;
  border-bottom: 1px solid #eef2f7;
}

/* Фиксированная колонка сотрудников */
.vacation-name-col {
  position: sticky;
  left: 0;
  z-index: 5;
  width: 185px !important;
  min-width: 185px !important;
  max-width: 185px !important;
  background: white;
  box-shadow: 8px 0 14px rgba(15, 23, 42, 0.06);
}

.vacation-table th.vacation-name-col {
  z-index: 8;
  background: #f8fafc;
}

/* Админская колонка действий делается узкой */
.vacation-actions-col {
  position: sticky;
  left: 0;
  z-index: 6;
  width: 64px !important;
  min-width: 64px !important;
  max-width: 64px !important;
  background: white;
  box-shadow: 8px 0 14px rgba(15, 23, 42, 0.06);
  text-align: center;
}

.vacation-table th.vacation-actions-col {
  z-index: 9;
  background: #f8fafc;
}

.vacation-admin-table .vacation-name-col {
  left: 64px !important;
}

/* Заголовки дней: очень узкие */
.vacation-day-head {
  width: auto !important;
  min-width: 2px !important;
  max-width: none !important;
  height: 72px;
  padding: 0 !important;
  overflow: hidden;
  background: #f8fafc;
  vertical-align: bottom;
}
.vacation-day-head span {
  margin: 0 auto;
}

/* Обычные дневные ячейки */
.vacation-cell {
  width: auto !important;
  min-width: 2px !important;
  max-width: none !important;
  height: 28px;
  padding: 0 !important;
  background-color: #ffffff;
}

/* Точки у обычных дней можно почти скрыть */
.vacation-day-dot {
  color: transparent;
  font-size: 1px;
}

/* Даты понедельников — компактно и косо */
.vacation-rotated-date {
  display: inline-block;
  transform: rotate(-65deg);
  transform-origin: left bottom;
  white-space: nowrap;
  font-size: 9px;
  font-weight: 700;
  color: #64748b;
  position: relative;
  top: 18px;
  left: 2px;
}

/* Понедельники остаются ориентирами недели */
.vacation-monday-head,
.vacation-monday-cell {
  border-left: 1px solid #cbd5e1 !important;
}

/* Начало месяца можно будет добавить позже отдельной линией, пока оставляем недели */

/* Выходные очень мягко подсвечены */
.vacation-table td.vacation-weekend-cell {
  background-color: #fafafa;
}

.vacation-table th.vacation-weekend-head {
  background-color: #f3f4f6;
}

/* Отпуска перекрывают фон выходных */
.vacation-table td.vacation-cell.vacation-doctor {
  background-color: #60a5fa !important;
}

.vacation-table td.vacation-cell.vacation-nurse {
  background-color: #86efac !important;
}

/* Периоды под фамилией делаем компактнее */
.vacation-period-list {
  margin-top: 5px;
  font-size: 11px;
  line-height: 1.25;
}

.vacation-status {
  margin-top: 4px;
  padding: 2px 6px;
  font-size: 11px;
}

/* Более широкая рабочая область */
.wide-page {
  width: calc(100vw - 20px);
  max-width: none;
  margin-left: calc(50% - 50vw + 10px);
}

/* Компактная строка сотрудника */
.vacation-name-col strong {
  font-size: 12px;
}

.vacation-name-col .muted {
  font-size: 10px;
}


/* Компактные действия в админке отпусков */

.vacation-actions-details {
  position: relative;
}

.vacation-actions-summary {
  list-style: none;
  cursor: pointer;
  display: inline-block;
  font-size: 11px;
  color: #2563eb;
  text-decoration: underline;
  text-underline-offset: 2px;
  background: transparent;
  border: none;
  padding: 0;
  white-space: nowrap;
}

.vacation-actions-summary::-webkit-details-marker {
  display: none;
}

.vacation-actions-menu {
  position: static;
  width: 260px;
  margin-top: 8px;
  padding: 12px;
  border: 1px solid #dbe3ef;
  border-radius: 14px;
  background: white;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.12);
  text-align: left;
}

.vacation-action-form {
  margin: 0 0 8px 0;
}

.vacation-actions-menu button,
.vacation-actions-menu .button {
  width: 100%;
  justify-content: center;
  text-align: center;
}

.vacation-edit-details {
  margin-top: 8px;
}

.vacation-edit-summary {
  width: 100%;
  text-align: center;
}

.vacation-admin-edit-form {
  margin-top: 10px;
  min-width: 250px;
}

/* Чтобы всплывающее меню не обрезалось строкой таблицы */
.vacation-table td {
  overflow: visible;
}

.vacation-scroll {
  overflow-y: visible;
}

/* Исправление видимости вертикальных дат в графике отпусков */

.vacation-day-head {
  position: relative !important;
  height: 92px !important;
  overflow: visible !important;
  vertical-align: bottom !important;
  background: #f8fafc !important;
}

/* Разрешаем заголовкам выпускать дату за пределы узкой дневной ячейки */
.vacation-table th {
  overflow: visible !important;
}

/* Вертикальная дата понедельника */
.vacation-standing-date {
  position: absolute !important;
  bottom: 6px !important;
  left: 50% !important;

  display: block !important;
  writing-mode: vertical-rl !important;
  text-orientation: mixed !important;

  transform: translateX(-50%) !important;

  height: 70px !important;
  width: 12px !important;

  font-size: 9px !important;
  line-height: 1 !important;
  font-weight: 700 !important;
  color: #334155 !important;

  white-space: nowrap !important;
  overflow: visible !important;
  z-index: 20 !important;
}

/* Убираем старую косую дату, если где-то осталась */
.vacation-rotated-date {
  display: none !important;
}

/* Точки обычных дней скрываем */
.vacation-day-dot {
  color: transparent !important;
  font-size: 1px !important;
}

/* Жёсткое исправление заголовка дат отпусков */

.vacation-table thead {
  overflow: visible !important;
}

.vacation-table thead tr {
  height: 110px !important;
  overflow: visible !important;
}

.vacation-table th {
  overflow: visible !important;
}

.vacation-day-head {
  position: relative !important;
  height: 110px !important;
  min-height: 110px !important;
  max-height: none !important;
  padding: 0 !important;
  overflow: visible !important;
  vertical-align: bottom !important;
}

/* Сама дата — стоячая, без обрезки */
.vacation-standing-date {
  position: absolute !important;
  left: 50% !important;
  bottom: 8px !important;

  transform: translateX(-50%) rotate(180deg) !important;
  writing-mode: vertical-rl !important;
  text-orientation: mixed !important;

  display: block !important;
  width: 14px !important;
  height: auto !important;
  min-height: 70px !important;
  max-height: none !important;

  font-size: 10px !important;
  line-height: 1 !important;
  font-weight: 700 !important;
  color: #334155 !important;

  white-space: nowrap !important;
  overflow: visible !important;
  z-index: 100 !important;
}

/* Старые варианты дат гасим */
.vacation-rotated-date {
  display: none !important;
}

.vacation-day-dot {
  color: transparent !important;
  font-size: 1px !important;
}

/* Первый столбец заголовка тоже должен быть той же высоты */
.vacation-table th.vacation-actions-col,
.vacation-table th.vacation-name-col {
  height: 110px !important;
  vertical-align: middle !important;
}

/* График отпусков: месяцы вместо дат */

.vacation-table {
  width: 100%;
  min-width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  font-size: 12px;
}

/* Убираем старые подписи дат */
.vacation-standing-date,
.vacation-rotated-date,
.vacation-day-dot {
  display: none !important;
}

/* Верхняя строка месяцев */
.vacation-month-head {
  height: 28px !important;
  padding: 4px 2px !important;
  text-align: center;
  vertical-align: middle;
  background: #f8fafc;
  color: #334155;
  font-size: 11px;
  font-weight: 700;
  border-bottom: 1px solid #cbd5e1 !important;
  border-left: 1px solid #cbd5e1 !important;
  white-space: nowrap;
  overflow: hidden;
}

/* Техническая строка дней — тонкая, без текста */
.vacation-days-row {
  height: 8px !important;
}

.vacation-day-head {
  height: 8px !important;
  min-height: 8px !important;
  max-height: 8px !important;
  padding: 0 !important;
  overflow: hidden !important;
  background: #f8fafc;
  border-bottom: 1px solid #dbe3ef !important;
}

/* Дневные ячейки становятся почти без сетки */
.vacation-cell {
  height: 26px;
  padding: 0 !important;
  border-right: none !important;
  border-bottom: 1px solid #edf2f7 !important;
  background-color: #ffffff;
}

/* Между днями границ не видно */
.vacation-table td,
.vacation-table th {
  border-right: none !important;
}

/* Понедельники — тонкий ориентир недели */
.vacation-monday-head,
.vacation-monday-cell {
  border-left: 1px solid #e2e8f0 !important;
}

/* Начало месяца — более заметная граница */
.vacation-month-start-head,
.vacation-month-start-cell {
  border-left: 2px solid #94a3b8 !important;
}

/* Выходные очень мягко */
.vacation-table td.vacation-weekend-cell {
  background-color: #fafafa;
}

.vacation-table th.vacation-weekend-head {
  background-color: #f3f4f6;
}

/* Отпуска */
.vacation-table td.vacation-cell.vacation-doctor {
  background-color: #60a5fa !important;
}

.vacation-table td.vacation-cell.vacation-nurse {
  background-color: #86efac !important;
}

/* Левая колонка обычной таблицы */
.vacation-name-col {
  width: 175px !important;
  min-width: 175px !important;
  max-width: 175px !important;
  position: sticky;
  left: 0;
  z-index: 8;
  background: white;
  box-shadow: 8px 0 14px rgba(15, 23, 42, 0.06);
}

.vacation-table th.vacation-name-col {
  background: #f8fafc;
  vertical-align: middle;
}

/* Админка: узкая колонка действий */
.vacation-actions-col {
  width: 58px !important;
  min-width: 58px !important;
  max-width: 58px !important;
  position: sticky;
  left: 0;
  z-index: 9;
  background: white;
  text-align: center;
  box-shadow: 8px 0 14px rgba(15, 23, 42, 0.06);
}

.vacation-table th.vacation-actions-col {
  background: #f8fafc;
  vertical-align: middle;
}

.vacation-admin-table .vacation-name-col {
  left: 58px !important;
}

/* Рабочая область почти во всю ширину */
.wide-page {
  width: calc(100vw - 20px);
  max-width: none;
  margin-left: calc(50% - 50vw + 10px);
}

.vacation-scroll {
  overflow-x: auto;
  overflow-y: visible;
  padding: 10px;
}

/* Компактнее текст сотрудника */
.vacation-name-col strong {
  font-size: 12px;
}

.vacation-name-col .muted {
  font-size: 10px;
}

.vacation-period-list {
  margin-top: 4px;
  font-size: 11px;
  line-height: 1.2;
}

/* Лёгий фон в колонке сотрудников по группе */

.vacation-table td.vacation-name-col.vacation-name-doctor {
  background: #eff6ff !important;
}

.vacation-table td.vacation-name-col.vacation-name-nurse {
  background: #f0fdf4 !important;
}

/* Чтобы sticky-колонка не теряла фон при прокрутке */
.vacation-table td.vacation-name-col.vacation-name-doctor,
.vacation-table td.vacation-name-col.vacation-name-nurse {
  background-clip: padding-box;
}

/* Компактный блок открытия года в админке отпусков */

.vacation-year-card {
  width: 420px;
  max-width: 100%;
  margin-left: 0;
}

.vacation-year-card input,
.vacation-year-card select {
  max-width: 180px;
}

.vacation-year-card .inline-form {
  justify-content: flex-start;
  gap: 12px;
}


/* Строка дат понедельников под месяцами */

.vacation-days-row {
  height: 34px !important;
}

.vacation-day-head {
  position: relative !important;
  height: 34px !important;
  min-height: 34px !important;
  max-height: 34px !important;
  padding: 0 !important;
  overflow: visible !important;
  background: #f8fafc;
  vertical-align: bottom;
}

/* Даты показываем только у понедельников */
.vacation-monday-date {
  position: absolute;
  left: 50%;
  bottom: 2px;
  transform: translateX(-50%) rotate(-90deg);
  transform-origin: center center;

  display: block;
  white-space: nowrap;
  font-size: 8px;
  line-height: 1;
  font-weight: 700;
  color: #475569;

  z-index: 20;
  pointer-events: none;
}

/* Старые варианты дат скрываем */
.vacation-standing-date,
.vacation-rotated-date,
.vacation-day-dot {
  display: none !important;
}

/* Строка месяцев чуть ниже и аккуратнее */
.vacation-month-head {
  height: 26px !important;
  padding: 3px 2px !important;
  font-size: 11px;
}

/* Заголовочные ячейки должны позволять дате выступать */
.vacation-table thead,
.vacation-table thead tr,
.vacation-table th {
  overflow: visible !important;
}

/* Недельная строка дат под месяцами */

.vacation-week-label-row {
  height: 42px !important;
}

.vacation-week-label-head {
  position: relative !important;
  height: 42px !important;
  padding: 0 !important;
  overflow: visible !important;
  background: #f8fafc !important;
  border-bottom: 1px solid #cbd5e1 !important;
  border-left: 1px solid #e2e8f0 !important;
  vertical-align: bottom !important;
}

/* Крупнее и читаемее: дата стоит внутри недельной ячейки, а не дневной */
.vacation-week-label {
  position: absolute;
  left: 50%;
  bottom: 4px;
  transform: translateX(-50%) rotate(-45deg);
  transform-origin: center center;

  display: block;
  white-space: nowrap;
  font-size: 10px;
  line-height: 1;
  font-weight: 700;
  color: #334155;
  z-index: 30;
}

/* Старую дневную строку и старые даты гасим */
.vacation-days-row,
.vacation-day-head,
.vacation-monday-date,
.vacation-standing-date,
.vacation-rotated-date,
.vacation-day-dot {
  font-size: 0 !important;
}

/* Заголовки должны позволять наклонной дате выходить за пределы */
.vacation-table thead,
.vacation-table thead tr,
.vacation-table th {
  overflow: visible !important;
}

/* Месяцы чуть компактнее, чтобы строка не стала слишком высокой */
.vacation-month-head {
  height: 28px !important;
  padding: 4px 2px !important;
  font-size: 11px !important;
  vertical-align: middle !important;
}

.vacation-table thead tr {
  height: auto !important;
}

/* Умеренно компактная строка дат недель */

.vacation-table thead tr {
  height: auto !important;
  min-height: 0 !important;
}

/* Первая строка — месяцы */
.vacation-table thead tr:first-child {
  height: 34px !important;
}

.vacation-month-head {
  height: 34px !important;
  min-height: 34px !important;
  max-height: 34px !important;
  padding: 4px 2px !important;
  line-height: 1.1 !important;
  vertical-align: middle !important;
}

/* Вторая строка — даты понедельников */
.vacation-week-label-row {
  height: 32px !important;
  min-height: 32px !important;
  max-height: 32px !important;
}

.vacation-week-label-head {
  position: relative !important;
  height: 32px !important;
  min-height: 32px !important;
  max-height: 32px !important;
  padding: 0 !important;
  line-height: 1 !important;
  vertical-align: top !important;
  overflow: visible !important;
}

/* Даты понедельников */
.vacation-week-label {
  position: absolute !important;
  top: 12px !important;
  bottom: auto !important;
  left: 50% !important;

  transform: translateX(-50%) rotate(-35deg) !important;
  transform-origin: center center !important;

  font-size: 10px !important;
  line-height: 1 !important;
  font-weight: 700 !important;
  color: #334155 !important;
  white-space: nowrap !important;
}

/* Левые заголовки */
.vacation-table th.vacation-actions-col,
.vacation-table th.vacation-name-col {
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  vertical-align: middle !important;
}

/* Мобильный вид графика отпусков: не сжимать год, а дать прокрутку */

@media (max-width: 760px) {
  .wide-page {
    width: 100%;
    margin-left: 0;
  }

  .vacation-scroll {
    overflow-x: auto !important;
    overflow-y: visible !important;
    -webkit-overflow-scrolling: touch;
    padding: 8px;
  }

  .vacation-table {
    width: max-content !important;
    min-width: max-content !important;
    table-layout: auto !important;
  }

  /* На телефоне один день снова получает реальную ширину */
  .vacation-cell,
  .vacation-day-head {
    width: 10px !important;
    min-width: 10px !important;
    max-width: 10px !important;
  }

  /* Недельные заголовки тоже не сжимаются */
  .vacation-week-label-head {
    min-width: 70px !important;
  }

  .vacation-month-head {
    min-width: 280px !important;
  }

  /* Левая колонка остаётся читаемой */
  .vacation-name-col {
    width: 145px !important;
    min-width: 145px !important;
    max-width: 145px !important;
    left: 0;
  }

  .vacation-name-col strong {
    font-size: 11px;
  }

  .vacation-name-col .muted {
    font-size: 9px;
  }

  .vacation-period-list {
    font-size: 10px;
  }

  /* В админке колонка действий остаётся узкой */
  .vacation-actions-col {
    width: 54px !important;
    min-width: 54px !important;
    max-width: 54px !important;
  }

  .vacation-admin-table .vacation-name-col {
    left: 54px !important;
  }

  .vacation-actions-summary {
    font-size: 10px;
  }
}

/* Улучшенная верхняя навигация */

.topbar {
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid #e2e8f0;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
}

.topbar-inner {
  display: flex;
  align-items: center;
  gap: 18px;
}

.logo-block {
  flex: 0 0 auto;
}

.logo-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.logo-link span {
  font-weight: 800;
  color: #1e293b;
  line-height: 1.15;
}

.nav-links {
  display: flex;
  align-items: stretch;
  justify-content: flex-end;
  gap: 0;
  margin-left: auto;
}

.nav-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;

  min-height: 52px;
  padding: 10px 18px;

  color: #334155;
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.15;
  text-align: center;

  border-left: 1px solid #e2e8f0;
  background: transparent;

  transition:
    background-color 0.18s ease,
    color 0.18s ease,
    box-shadow 0.18s ease;
}

.nav-btn:last-child {
  border-right: 1px solid #e2e8f0;
}

.nav-btn:hover {
  background: #f8fafc;
  color: #1d4ed8;
}

/* Личный кабинет — отдельная мягкая плашка */

.nav-btn-cabinet {
  gap: 7px;
  margin-left: 10px;
  border: 1px solid #bfdbfe !important;
  border-radius: 14px;
  background: #eff6ff;
  color: #1d4ed8;
  min-height: 44px;
  align-self: center;
  padding: 9px 14px;
  box-shadow: 0 6px 14px rgba(37, 99, 235, 0.08);
}

.nav-btn-cabinet:hover {
  background: #dbeafe;
  color: #1e40af;
}

.nav-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  line-height: 1;
}

@media (max-width: 760px) {
  .topbar-inner {
    align-items: center;
    gap: 10px;
  }

  .nav-links {
    margin-left: 0;
    width: 100%;
    gap: 8px;
    padding-top: 10px;
  }

  .nav-btn {
    min-height: 42px;
    padding: 9px 12px;
    border: 1px solid #e2e8f0 !important;
    border-radius: 12px;
    background: #ffffff;
    font-size: 13px;
  }

  .nav-btn-cabinet {
    margin-left: 0;
    background: #eff6ff;
  }
}

/* Мобильное меню: по умолчанию скрыто, открывается по .show */

.menu-toggle {
  display: none;
}

@media (max-width: 760px) {
  .topbar-inner {
    flex-wrap: wrap;
  }

  .menu-toggle {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;

    margin-left: auto;
    width: 42px;
    height: 42px;

    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #ffffff;
    color: #334155;

    font-size: 22px;
    font-weight: 700;
    cursor: pointer;
  }

  .nav-links {
    display: none !important;

    width: 100%;
    margin-left: 0;
    padding-top: 10px;

    flex-direction: column;
    gap: 8px;
  }

  .nav-links.show {
    display: flex !important;
  }

  .nav-btn {
    width: 100%;
    min-height: 42px;

    justify-content: flex-start;
    text-align: left;

    padding: 10px 12px;
    border: 1px solid #e2e8f0 !important;
    border-radius: 12px;

    background: #ffffff;
    font-size: 13px;
  }

  .nav-btn-cabinet {
    margin-left: 0;
    background: #eff6ff;
  }
}

/* Чтобы кнопка мобильного меню не оставалась синей после тапа */

.menu-toggle,
.menu-toggle:focus,
.menu-toggle:active,
.menu-toggle:focus-visible {
  background: #ffffff !important;
  color: #334155 !important;
  border-color: #e2e8f0 !important;
  outline: none !important;
  box-shadow: none !important;
  -webkit-tap-highlight-color: transparent;
}

.menu-toggle:hover {
  background: #f8fafc !important;
  color: #1d4ed8 !important;
}

@media (max-width: 760px) {
  .menu-toggle,
  .menu-toggle:focus,
  .menu-toggle:active,
  .menu-toggle:focus-visible {
    background: #ffffff !important;
    color: #334155 !important;
    border-color: #e2e8f0 !important;
    outline: none !important;
    box-shadow: none !important;
  }
}

/* Десктоп: пункты меню прижаты к нижнему краю */

@media (min-width: 761px) {
  .nav-links {
    align-items: stretch;
  }

  .nav-btn {
    align-items: flex-end !important;
    padding-top: 10px;
    padding-bottom: 12px;
  }

  .nav-btn-cabinet {
  align-items: flex-end !important;
  } 
}

.announcements {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: -4px 0 22px;
}

.announcement-card {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 16px 18px;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 18px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.announcement-icon {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: #ffedd5;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.announcement-card strong {
  display: block;
  margin-bottom: 4px;
  font-size: 16px;
  color: #9a3412;
}

.announcement-card p {
  margin: 0;
  color: #7c2d12;
  line-height: 1.5;
}

.announcement-card span {
  display: block;
  margin-top: 8px;
  color: #9a3412;
  font-size: 12px;
  opacity: 0.75;
}

.announcement-admin-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.announcement-admin-card {
  position: relative;
}

.inline-delete-form {
  margin-top: 12px !important;
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

.home-hero-announcements {
  margin-top: 14px;
}

.home-hero-announcements p {
  margin: 8px 0 0;
  color: rgba(255, 255, 255, 0.92);
  font-size: 15px;
  line-height: 1.45;
}

.home-hero-announcements strong {
  color: #ffffff;
  font-weight: 700;
}

/* Желаемые даты отпуска */

.vacation-table td.vacation-cell.vacation-wish {
  background-color: #fde68a !important;
}

.vacation-period-wish {
  color: #92400e;
}

.vacation-period-approved {
  color: #0f172a;
  font-weight: 700;
}

.compact-hero {
  margin-bottom: 18px;
}

.inline-form {
  display: flex;
  align-items: end;
  gap: 12px;
  flex-wrap: wrap;
  margin: 16px 0;
}

.inline-form label {
  display: block;
  font-weight: 700;
  color: var(--text);
}

.inline-form select {
  min-width: 180px;
}

.table-scroll {
  width: 100%;
  overflow-x: auto;
}

.slot-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.slot-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.04);
  border: 1px solid rgba(15, 23, 42, 0.08);
}

.slot-time {
  font-weight: 800;
  color: var(--primary);
  white-space: nowrap;
}

.slot-name {
  color: var(--text);
}

.empty-state {
  padding: 24px;
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.04);
  border: 1px dashed rgba(15, 23, 42, 0.18);
}

.empty-state h3 {
  margin-top: 0;
}

.admin-action-form {
  margin-top: 16px;
}

.small-note {
  margin-top: 8px;
  font-size: 0.92rem;
}

.vacation-form {
  display: grid;
  grid-template-columns: minmax(220px, 1.3fr) repeat(2, minmax(150px, 0.8fr)) minmax(220px, 1fr) auto;
  gap: 12px;
  align-items: end;
  margin: 18px 0;
}

.vacation-form label {
  display: block;
  font-weight: 700;
  color: var(--text);
}

.admin-slot-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.slot-edit-form {
  display: grid;
  grid-template-columns: 110px minmax(220px, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.slot-edit-time {
  font-weight: 800;
  color: var(--primary);
  white-space: nowrap;
}

.actions-cell {
  white-space: nowrap;
  vertical-align: top;
}

.small-btn {
  padding: 8px 12px;
  font-size: 0.9rem;
}

.danger-btn {
  border: none;
  border-radius: 999px;
  background: #fee2e2;
  color: #991b1b;
  font-weight: 800;
  cursor: pointer;
  padding: 10px 14px;
  transition: 0.18s ease;
}

.danger-btn:hover {
  background: #fecaca;
  transform: translateY(-1px);
}

@media (max-width: 900px) {
  .vacation-form {
    grid-template-columns: 1fr;
  }

  .slot-edit-form {
    grid-template-columns: 1fr;
  }
}

.nurse107-day-row > td {
  border-bottom: 4px solid rgba(15, 23, 42, 0.18) !important;
  padding-top: 18px !important;
  padding-bottom: 18px !important;
}

.nurse107-day-row:last-child > td {
  border-bottom: none !important;
}

.nurse107-day-row + .nurse107-day-row > td {
  border-top: 8px solid transparent;
}

.nurse107-day-row td {
  vertical-align: middle;
}

.nurse107-table th,
.nurse107-table td {
  padding-left: 22px;
  padding-right: 22px;
}

.nurse107-table th:first-child,
.nurse107-table td:first-child {
  width: 150px;
  min-width: 150px;
}

.nurse107-table th:nth-child(2),
.nurse107-table td:nth-child(2) {
  width: 170px;
  min-width: 170px;
}

.nurse107-table th:nth-child(3),
.nurse107-table td:nth-child(3) {
  min-width: 360px;
}

.nurse107-table .slot-pill {
  max-width: 360px;
}
/* Счётчик успешно сформированных медицинских карт */
.card-counter {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 34px;
  padding: 0 11px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  font-size: 13px;
  line-height: 1;
  white-space: nowrap;
  color: inherit;
  background: rgba(255, 255, 255, 0.12);
}

.card-counter strong {
  font-size: 14px;
}

@media (max-width: 768px) {
  .card-counter {
    width: fit-content;
    margin-top: 4px;
  }
}
