/* Админка расписания DramShok: календарь даты + редактор дня. */

body {
  background: #f2f6fa;
}

.admin-shell {
  width: min(1180px, 100%);
  padding-bottom: 40px;
}

.admin-shell .panel {
  background: #fff;
  box-shadow: 0 10px 30px rgba(17, 40, 60, .05);
}

.admin-shell .topbar {
  box-shadow: none;
  background: rgba(242, 246, 250, .92);
  backdrop-filter: blur(18px) saturate(150%);
}

.admin-shell .topbar .row {
  flex-wrap: nowrap;
}

.login-panel {
  width: min(520px, 100%);
  margin: 32px auto 0;
}

.login-grid {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  margin-top: 14px;
}

.admin-layout {
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 14px;
}

/* --- календарь месяца --- */

.adm-side {
  position: sticky;
  top: 14px;
  display: grid;
  gap: 12px;
  align-content: start;
}

.adm-month-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.adm-month-title {
  color: var(--ink);
  font-size: 15px;
  font-weight: 800;
  line-height: 1;
  text-transform: capitalize;
}

.adm-arrow {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: var(--ink);
  background: #f1f5f9;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.adm-arrow:hover {
  background: #e6eef6;
}

.adm-weekdays {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 2px;
  margin: 12px 0 4px;
  color: #98a1b0;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .04em;
  text-align: center;
  text-transform: uppercase;
}

.adm-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 3px;
}

.adm-day {
  position: relative;
  display: grid;
  place-items: center;
  gap: 2px;
  min-height: 38px;
  padding: 3px 0 4px;
  border-radius: 12px;
  background: transparent;
  color: var(--ink);
  font-size: 13px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
}

.adm-day:hover {
  background: #f2f6fa;
}

.adm-day.is-empty {
  pointer-events: none;
}

.adm-day.is-today {
  box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--accent) 70%, #fff);
}

.adm-day.is-selected {
  background: var(--accent);
  color: #061014;
  font-weight: 800;
}

.adm-day.is-selected.is-today {
  box-shadow: none;
}

.adm-dots {
  display: flex;
  gap: 2px;
  min-height: 4px;
}

.adm-dot {
  display: block;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #8aa4b8;
}

.adm-dot.is-lesson {
  background: #7f9db5;
}

.adm-dot.is-change {
  background: #ef7a44;
}

.adm-day.is-selected .adm-dot {
  background: rgba(3, 40, 50, .55);
}

.input,
.select,
.textarea {
  box-shadow: inset 0 0 0 1px #e2e9f0;
}

.input[type="color"] {
  width: 68px;
  min-width: 68px;
  padding: 3px;
  cursor: pointer;
}

.adm-side .ghost,
.adm-head .ghost {
  background: #f1f5f9;
}

.adm-legend {
  display: flex;
  gap: 12px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 11px;
}

.adm-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.adm-nav {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  padding: 4px;
  border-radius: 16px;
  background: #f1f5f9;
}

.adm-nav button {
  min-height: 38px;
  border-radius: 12px;
  background: transparent;
  color: #4b5563;
  font-weight: 700;
  cursor: pointer;
}

.adm-nav button.active {
  color: var(--ink);
  background: #fff;
  box-shadow: 0 3px 10px rgba(17, 19, 24, .08);
}

/* --- шапка раздела --- */

.adm-head {
  align-items: flex-start;
}

.adm-eyebrow {
  margin: 0 0 4px;
  font-size: 11px;
  font-weight: 760;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.adm-title {
  margin: 0;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.05;
  font-weight: 840;
}

.adm-head .quiet {
  margin: 6px 0 0;
}

.adm-hint {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 14px;
  border-radius: 16px;
  color: #7a3f00;
  background: #fff4e2;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
}

.adm-daylist {
  gap: 8px;
}

/* --- строка занятия дня --- */

.adm-lesson {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border-radius: 20px;
  background: #fff;
  box-shadow: inset 4px 0 0 var(--item-accent, var(--accent));
}

.adm-lesson.is-cancelled {
  background: #f7f8fa;
  box-shadow: inset 4px 0 0 #d5dae1;
}

.adm-time {
  display: grid;
  gap: 2px;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}

.adm-time strong {
  font-size: 15px;
  font-weight: 800;
}

.adm-time span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.adm-lesson-main {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.adm-lesson-title {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 15px;
  font-weight: 750;
  line-height: 1.25;
}

.adm-lesson.is-cancelled .adm-lesson-title > span:first-child {
  color: #8b93a1;
  text-decoration: line-through;
}

.adm-lesson-meta {
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.3;
}

.adm-lesson-note {
  color: #5c6573;
  font-size: 12px;
  line-height: 1.35;
}

.adm-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.adm-actions .ghost,
.adm-actions .button,
.adm-actions .danger {
  min-height: 36px;
  padding: 0 12px;
  font-size: 13px;
  font-weight: 700;
}

.adm-actions .ghost {
  background: #f1f5f9;
}

.adm-actions .ghost:hover {
  background: #e6eef6;
}

.adm-actions .ghost.is-danger {
  color: #b42318;
  background: #fdeaea;
}

.adm-chip {
  display: inline-flex;
  align-items: center;
  min-height: 21px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 760;
  line-height: 1;
  white-space: nowrap;
}

.adm-chip.is-moved {
  color: #8a4a00;
  background: #ffeccc;
}

.adm-chip.is-cancelled {
  color: #a11414;
  background: #ffe0e0;
}

.adm-chip.is-extra {
  color: #0f6b3a;
  background: #dcf6e7;
}

.adm-chip.is-changed {
  color: #3341a6;
  background: #e6eaff;
}

.adm-empty {
  display: grid;
  gap: 6px;
  padding: 22px 16px;
  border: 1px dashed #d7e0e8;
  border-radius: 18px;
  color: var(--muted);
  text-align: center;
}

.adm-empty strong {
  color: var(--ink);
  font-size: 15px;
  font-weight: 750;
}

/* --- недельная сетка --- */

.admin-weekday-card {
  padding: 14px;
  border-radius: 22px;
  background: #f7f9fb;
}

.admin-weekday-head h3 {
  font-size: 22px;
}

.adm-week-lessons {
  display: grid;
  gap: 6px;
  margin-top: 10px;
}

.adm-week-row {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr) auto;
  column-gap: 16px;
  row-gap: 6px;
  align-items: center;
  padding: 9px 12px;
  border-radius: 16px;
  background: #fff;
  box-shadow: inset 3px 0 0 var(--item-accent, var(--accent));
}

.adm-week-row .time-range {
  font-size: 13px;
  white-space: nowrap;
  font-weight: 760;
  font-variant-numeric: tabular-nums;
}

.adm-week-row strong {
  font-size: 14px;
}

.adm-week-row small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

/* --- события --- */

.adm-events-list {
  display: grid;
  gap: 10px;
}

.adm-event {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border-radius: 18px;
  background: #f7f9fb;
}

.adm-event h3 {
  margin: 4px 0;
  font-size: 16px;
}

.adm-event .quiet {
  margin: 0;
  font-size: 13px;
  line-height: 1.35;
}

/* --- адаптив --- */

@media (max-width: 860px) {
  .admin-layout {
    grid-template-columns: 1fr;
  }

  .adm-side {
    position: static;
  }

  .adm-grid {
    gap: 2px;
  }

  .adm-day {
    min-height: 40px;
  }
}

@media (max-width: 640px) {
  .admin-shell {
    padding: 10px 10px 32px;
  }

  .admin-shell .topbar {
    margin: 0 0 10px;
    gap: 8px;
    background: rgba(242, 246, 250, .94);
  }

  .admin-shell .topbar .ghost {
    min-height: 34px;
    padding: 0 10px;
    font-size: 12.5px;
  }

  .adm-lesson {
    grid-template-columns: 54px minmax(0, 1fr);
    gap: 10px;
    padding: 12px;
  }

  .adm-actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }

  .adm-actions .ghost,
  .adm-actions .button,
  .adm-actions .danger {
    min-height: 34px;
    padding: 0 10px;
    font-size: 12.5px;
  }

  .adm-week-row {
    grid-template-columns: max-content minmax(0, 1fr);
    column-gap: 12px;
  }

  .adm-week-row .adm-actions {
    grid-column: 1 / -1;
  }

  .adm-event {
    grid-template-columns: 1fr;
  }

  .login-grid {
    grid-template-columns: 1fr;
  }
}
