/* ----------------------------
   ТЕМА (CSS-переменные)
   ---------------------------- */
:root{
  /* Базовые */
  --bg: #ffffff;
  --bg-soft: #f6f7fb;
  --text: #101114;
  --muted: #6b7280;
  --border: #e5e7eb;
  --card: #ffffff;

  /* Брендовые (NSPK/MIR) */
  --primary: #4b47d9;      /* основной фиолетовый */
  --primary-600: #3e3ac8;
  --primary-700: #3331b1;
  --accent: #00b140;       /* MIR-зелёный для бейджей/подсветок */
  --danger: #ff4d4d;
  --warning: #f59e0b;
  --success: #22c55e;

  /* Тени/скругления */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --shadow: 0 6px 24px rgba(16,24,40,0.06), 0 2px 6px rgba(16,24,40,0.05);

  /* Безопасные зоны для TWA */
  --safe-top: env(safe-area-inset-top);
  --safe-right: env(safe-area-inset-right);
  --safe-bottom: env(safe-area-inset-bottom);
  --safe-left: env(safe-area-inset-left);
}

/* Тёмная тема по системным настройкам */
@media (prefers-color-scheme: dark){
  :root{
    --bg:#0f1115;
    --bg-soft:#141821;
    --text:#e8eaee;
    --muted:#a3aab7;
    --border:#242a36;
    --card:#121622;
    --primary:#6d6aff;
    --primary-600:#5a57ee;
    --primary-700:#4a47d9;
    --accent:#12d667;
    --danger:#f87171;
    --warning:#fbbf24;
    --success:#34d399;
    --shadow: 0 6px 24px rgba(0,0,0,0.4), 0 2px 6px rgba(0,0,0,0.35);
  }
}

/* ----------------------------
   БАЗА
   ---------------------------- */
*{ box-sizing: border-box }
html, body{ height: 100% }
html{ -webkit-text-size-adjust: 100% }

/* БАЗА */
body{
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--text);

  /* 1) Базовый цвет ниже градиента */
  background-color: #fff;

  /* 2) Сам градиент — сверху мягкий, к середине светлее, ниже — белый */
  background-image: linear-gradient(
    180deg,
    var(--bg) 0%,
    var(--bg-soft) 30%,
    #ffffff 65%
  );
  background-repeat: no-repeat;   /* важное уточнение */
  background-attachment: scroll;  /* или fixed, если хочешь лёгкий параллакс */

  padding-left:  max(0px, var(--safe-left));
  padding-right: max(0px, var(--safe-right));
  padding-bottom:max(0px, var(--safe-bottom));
}

/* Контейнер страницы не должен перекрывать фон */
.container{
  width: 100%;
  max-width: 1040px;
  margin: 0 auto;
  padding: clamp(14px, 2vw, 32px);
  background: transparent; /* на случай, если где-то был задан цвет */
}
/* ----------------------------
   БРЕНД-БАР (логотипы NSPK/MIR)
   ---------------------------- */
.brand-bar{
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--card);
  border-bottom: 1px solid var(--border);
  padding: calc(12px + var(--safe-top)) 16px 12px 16px; /* было 8px */
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.brand-left, .brand-right{ display:flex; align-items:center; gap:10px }
.brand-title{
  font-weight: 700;
  font-size: clamp(14px, 1.2vw, 18px);
  letter-spacing: .1px;
}
.brand-logo{
  height: clamp(18px, 1.6vw, 28px);
  width: auto;
  display: block;
  filter: saturate(1.05) contrast(1.05);
}

/* ----------------------------
   ШАПКА ВНУТРИ СТРАНИЦЫ
   ---------------------------- */
.header{
  display:flex; align-items:center; gap:12px;
  padding: 12px 0 18px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
}
.header h1{
  margin:0;
  font-size: clamp(18px, 2.6vw, 28px);
  line-height:1.2;
  font-weight: 700;
}
.back-btn{
  border:none; background:var(--bg-soft); color:var(--text);
  width:36px; height:36px; border-radius: var(--radius-md);
  cursor:pointer; display:grid; place-items:center;
  box-shadow: var(--shadow);
}
.back-btn:hover{ filter: brightness(.98) }

/* ----------------------------
   КНОПКИ
   ---------------------------- */
.btn{
  border:none; border-radius: var(--radius-md);
  height: 48px;
  font-size: 16px;
  background: var(--primary); color:#fff;
  padding: 12px 16px; font-weight:600; cursor:pointer;
  transition: transform .06s ease, box-shadow .2s ease, background .2s ease;
  box-shadow: var(--shadow);
  text-decoration: none;
  display: inline-flex; align-items: center; gap: 6px;
}
.btn .icon{ font-size: 18px; line-height: 1; }
.btn:hover{ background: var(--primary-600) }
.btn:active{ transform: translateY(1px) }

.btn-secondary{ background: var(--bg-soft); color: var(--text) }
.btn-warning{ background: var(--warning); color:#111 }
.btn-danger{ background: var(--danger) }
.btn-outline{
  background: transparent; color: var(--primary);
  border: 1px solid var(--primary);
}
.btn-disabled, .btn:disabled{
  background: #cfd3dc33; color: var(--muted);
  cursor:not-allowed; opacity:.7;
}

/* ----------------------------
   ФОРМЫ
   ---------------------------- */
label{ display:block; margin: 10px 0 6px; font-weight:600 }
.input,
input[type="text"], input[type="password"]{
  height: 44px;
  font-size: 16px;
}
select, textarea{
  width:100%;
  padding:12px 14px;
  border:1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--card);
  color: var(--text);
  outline:none;
  box-shadow: var(--shadow);
}
textarea{ min-height:120px; resize: vertical }
input:focus, select:focus, textarea:focus{ border-color: var(--primary) }

/* Поля/кнопки в нижнем меню */
.footer .btn{
  padding: 10px 12px;
  border-radius: var(--radius-md);
}

/* ----------------------------
   КАРТОЧКИ/АВАТАРЫ
   ---------------------------- */
.card, .account-card, .consultation-item, .record-item{
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px;
  box-shadow: var(--shadow);
}
.account-card{ display:flex; align-items:center; gap:14px }
.account-avatar, .consultation-avatar, .record-avatar{
  width:56px; height:56px; border-radius: 12px;
  object-fit: cover; background: #dbe0ea;
}
.account-name{ margin:0 0 6px 0; font-weight:700 }

/* Водяной бренд-акцент на карточках (ненавязчиво) */
.card.branded::after,
.account-card.branded::after,
.consultation-item.branded::after,
.record-item.branded::after{
  content:"";
  position:absolute; inset:auto 10px 10px auto;
  width:24px; height:24px; opacity:.15;
  background: radial-gradient(circle at 30% 30%, var(--accent), transparent 60%);
  border-radius:50%;
  pointer-events:none;
}

/* ----------------------------
   МЕНЮ/СПИСКИ
   ---------------------------- */
.menu{
  display:grid; gap:12px;
  grid-template-columns: 1fr 1fr;
}
@media (min-width:768px){ .menu{ grid-template-columns: repeat(3,1fr) } }

.consultation-list{
  display:grid; grid-template-columns: 1fr; gap:12px;
}
.consultation-item{
  display:flex; align-items:center; gap:12px; position:relative;
  transition: transform .07s ease, box-shadow .2s ease, border-color .2s ease;
  cursor:pointer;
}
.consultation-item:hover{ transform: translateY(-1px) }
.consultation-item.disabled{
  opacity:.55; cursor:not-allowed; filter: grayscale(.25);
}

/* ----------------------------
   НИЖНИЙ ТАБ-БАР (мобила)
   ---------------------------- */
.footer{
  position: sticky;
  bottom: 0;
  padding: 10px 0 max(6px, var(--safe-bottom));
  display:grid; grid-template-columns: repeat(3,1fr); gap:10px;
  backdrop-filter: blur(10px);
}
.selected{ outline:2px solid var(--primary) }
@media (min-width:1024px){ .footer{ position: static; padding-top: 24px } }

/* ----------------------------
   РАСПИСАНИЕ (календарь слотов)
   ---------------------------- */
.schedule{
  display:grid; gap:14px;
  background: var(--card);
  border:1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: var(--shadow);
}
.date-selector{
  display:flex; align-items:center; justify-content:space-between;
  background: var(--bg-soft);
  border-radius: var(--radius-md);
  padding: 8px 10px;
}
.date-nav{
  border:none; background:transparent; color:var(--text);
  font-size: 20px; cursor:pointer;
}
.month{ font-weight:700 }
.weekday-header{
  display:grid; grid-template-columns: repeat(7,1fr);
  text-align:center; font-weight:700; margin-top: 10px;
}
.date-list{
  display:grid; grid-template-columns: repeat(7,1fr);
  gap: 8px;
}
.date-btn{
  border:1px solid var(--border);
  background: var(--card);
  color: var(--text);
  border-radius: 10px;
  padding: 10px 0;
  cursor:pointer;
}
.date-btn.empty{ visibility: hidden }
.date-btn.available{ outline:2px solid var(--success) }
.date-btn.selected{
  background: var(--primary); color:#fff; border-color: transparent;
}

.time-list{ display:grid; grid-template-columns: repeat(3,1fr); gap:8px }
.time-btn{
  border:1px solid var(--border); background: var(--card);
  border-radius: 10px; padding:10px; cursor:pointer; font-weight:600;
}
.time-btn.selected{ background: var(--primary); color:#fff; border-color: transparent }

/* Узкие экраны: календарь 4×N, слоты 2×N */
@media (max-width:480px){
  .date-list{ grid-template-columns: repeat(4,1fr) }
  .time-list{ grid-template-columns: repeat(2,1fr) }
}

/* Кнопка записи «прилипает» снизу на мобиле */
#bookButton{
  position: sticky; bottom: max(6px, var(--safe-bottom));
  width: 100%;
  background: var(--accent); color:#fff; border:none;
  border-radius: var(--radius-md);
  padding: 12px 16px; font-weight:700;
  box-shadow: var(--shadow);
}
#bookButton:disabled{
  background: #a7a7a733; color: var(--muted); cursor:not-allowed;
}

/* ----------------------------
   ТАБЛИЦЫ (админ)
   ---------------------------- */
.table-container{
  background: var(--card);
  border:1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 10px;
  box-shadow: var(--shadow);
  overflow:auto;
  max-height: min(60vh, 700px);
}
.table{
  width:100%; border-collapse: collapse; min-width: 720px;
}
.table th, .table td{
  padding: 10px 12px; border-bottom:1px solid var(--border);
  text-align:left; white-space: nowrap;
}
.table thead th{
  position: sticky; top: 0; background: var(--bg-soft); z-index: 1;
}
.table tbody tr:hover{ background: rgba(0,0,0,0.03) }

/* Конкретно для старого id таблицы (чтобы всё осталось совместимо) */
#consultationsTable{
  width:100%; border-collapse: collapse; background: var(--card);
  border-radius: var(--radius-md); overflow:hidden; text-align:center;
  box-shadow: var(--shadow);
}
#consultationsTable thead{ background: var(--primary); color:#fff; font-size: 14px }
#consultationsTable th{ padding:12px; text-transform: uppercase }
#consultationsTable td{ padding:10px; border-bottom:1px solid var(--border) }
#consultationsTable tbody tr:nth-child(even){ background: #f8f8ff }
@media (max-width:768px){
  #consultationsTable{ font-size: 12px }
  #consultationsTable th, #consultationsTable td{ padding: 8px }
}

/* Скрываем тех.колонки в UI, оставляя их для экспорта */
.export-only{ display: none }

/* ----------------------------
   DataTables (если используется)
   ---------------------------- */
.dataTables_wrapper{ color: var(--text) }
.dataTables_filter, .dataTables_length{ text-align: right }
.dataTables_filter label, .dataTables_length label{ color: var(--text) }
.dataTables_filter input{
  background: var(--card); color: var(--text);
  border:1px solid var(--border); padding: 6px 10px; border-radius: 6px;
}
.dt-buttons .dt-button,
.dataTables_paginate .paginate_button{
  background: var(--card) !important; color: var(--primary) !important;
  border: 2px solid var(--primary) !important;
  border-radius: 8px; padding: 6px 12px; font-weight:700; margin: 3px;
}
.dt-buttons .dt-button:hover,
.dataTables_paginate .paginate_button:hover{
  background: var(--primary) !important; color: #fff !important;
}
.dataTables_paginate .paginate_button.current{
  background: var(--primary) !important; color:#fff !important;
  border-color: var(--primary) !important;
}
.dataTables_paginate .paginate_button.disabled{
  background: var(--card) !important; color: #9aa0aa !important;
  border-color: #d0d4db !important;
}
.dataTables_paginate{ text-align:center; margin-top:10px }

/* ----------------------------
   FullCalendar (админ)
   ---------------------------- */
.calendar-container{
  background: var(--card); border:1px solid var(--border);
  border-radius: var(--radius-lg); padding:12px; box-shadow: var(--shadow);
  margin-bottom: 14px;
}
.fc .fc-toolbar-title{ font-size: clamp(16px, 2vw, 22px) }
.fc-button{
  border:none !important; background: var(--primary) !important; color:#fff !important;
  border-radius: 8px !important; padding:6px 10px !important; height:30px !important;
}
.fc-button:hover{ background: var(--primary-600) !important }
.fc-col-header-cell{ font-size: 12px !important }

/* ----------------------------
   ЗАПИСИ ПОЛЬЗОВАТЕЛЯ (my_records)
   ---------------------------- */
.records-list{
  display:flex; flex-direction:column; gap:14px; margin-top: 14px;
  max-height: 70vh; overflow-y: auto; padding: 6px;
}
.record-header{ display:flex; align-items:center; gap:12px; margin-bottom: 8px }
.record-name{ font-weight:700 }
.record-date{ font-size: 14px; color: var(--muted) }
.record-details p{ margin: 8px 0; font-size:14px }
.record-details a{ color: var(--primary); text-decoration: none }
.cancel-btn{
  background: var(--danger); color:#fff; border:none;
  border-radius: var(--radius-md); padding:10px 12px; cursor:pointer;
}

/* ----------------------------
   ДОП. СТИЛИ
   ---------------------------- */
h1{ margin:0 }
.container > h1:first-child{ margin: 6px 0 16px } /* login/home совместимость */

.text-muted{ color: var(--muted) }
.hidden{ display:none !important }
.center{
  min-height: calc(100svh - 72px);
  display: grid;
  place-items: center;
}

/* Отступы утилиты */
.mt-1{ margin-top:6px } .mt-2{ margin-top:12px } .mt-3{ margin-top:18px }
.mb-1{ margin-bottom:6px } .mb-2{ margin-bottom:12px } .mb-3{ margin-bottom:18px }

/* ----------------------------
   БРЕЙКПОИНТЫ
   ---------------------------- */
/* ≥768 */
@media (min-width:768px){
  .consultation-list{ grid-template-columns: 1fr 1fr }
  .menu{ grid-template-columns: repeat(3,1fr) }
}
/* ≥1024 */
@media (min-width:1024px){
  .consultation-list{ grid-template-columns: repeat(3,1fr) }
  .menu{ grid-template-columns: repeat(4,1fr) }
}

/* ----------------------------
   СОВМЕСТИМОСТЬ С ТВОИМИ СТАРЫМИ КЛАССАМИ
   (оставлено намеренно, чтобы ничего не сломать)
   ---------------------------- */
h1{ text-align:center }
.consultation-name{ font-weight:700; color: var(--primary) }
.btn-primary{ background: var(--primary) }
.btn-secondary:hover{ filter: brightness(.98) }
.footer .btn.selected{
  background: var(--primary); color:#fff; border:1px solid var(--primary);
  transform: translateY(-1px);
}
.date-btn.selected{ transform: scale(1.02) }

.auth-card{
  width: 100%;
  max-width: 420px;
  padding: 20px 20px 22px;
}
@media (min-width: 640px){
  .auth-card{ padding: 24px 24px 26px; }
}

.auth-title{
  margin: 0 0 6px 0;
  text-align: center;
  font-weight: 800;
  font-size: clamp(20px, 3.6vw, 28px);
}

.form-group{ margin: 10px 0; }

.input{
  width: 100%;
  height: 44px;                     /* было чуть меньше — выглядело «игрушечно» */
  border-radius: 12px;
  border: 1px solid var(--border);
  padding: 10px 12px;
  background: #fff;
}

.form-checkbox{
  display: flex; align-items: center; gap: 8px;
  margin: 6px 0 12px;
  font-size: 14px;
}
.form-checkbox input[type="checkbox"]{
  width: 18px; height: 18px;
}

.full-width{ width: 100%; }
.btn.btn-primary{
  height: 44px;
  font-weight: 700;
}
/* ---- Объявления ---- */
.announcement-list{
  display: grid;
  gap: 16px;
  max-width: 820px;
  margin: 0 auto;
}

.announcement-card h2{
  margin-top: 0;
  margin-bottom: 8px;
  font-weight: 700;
}

.announcement-text{
  margin: 0 0 12px;
  line-height: 1.5;
}

.pdf-viewer{
  width: 100%;
  height: 360px;
  border: 1px solid var(--border);
  border-radius: 8px;
}

.pdf-actions{
  display: flex;
  gap: 10px;
  margin-top: 8px;
}

.announcement-date{
  margin-top: 12px;
  font-size: 14px;
}

.announcement-card p{
  margin: 0 0 10px 0;
  font-size: 15px;
  line-height: 1.5;
}

/* ---- Тесты ---- */
.test-card{
  border-left: 4px solid var(--primary);
  padding-left: 14px;
  margin-bottom: 12px;
}
.test-title{ margin: 0 0 8px 0; font-weight: 800; font-size: 18px }
.test-meta{ margin: -4px 0 10px 0; font-size: 14px }

.test-form{ display:block }
.test-fieldset{
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  margin: 0 0 10px 0;
}
.test-fieldset legend{
  font-weight: 700;
  padding: 0 6px;
}
.test-option{
  display:block;
  padding: 4px 0;
}
/* Карточка аккаунта — центрируем */
.account-card{
  max-width: 500px;
  margin: 0 auto;
}
.account-avatar{
  width: 70px;
  height: 70px;
  border-radius: 12px;
}

/* Роль как бейдж */
.account-role{
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
  margin-left: 6px;
}
.account-role.admin{ background: #ececff; color: var(--primary) }
.account-role.mentor{ background: #e8f9f0; color: var(--success) }
.account-role.participant{ background: #f3f4f6; color: var(--muted) }

/* Нижний таб-бар */
.footer .btn{
  height: 48px;
  font-size: 14px;
}

/* Убираем яркий оранжевый */
.btn-warning{
  background: #f5f5f5;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-warning:hover{
  background: #eaeaea;
}

/* ---- Консультации ---- */
.consultation-list{
  display:grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
.consultation-item{
  display:flex; align-items:center; gap:12px;
  background: var(--card);
  border:1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px;
  cursor:pointer;
  box-shadow: var(--shadow);
  transition: transform .08s ease;
}
.consultation-item:hover{ transform: translateY(-2px) }
.consultation-item.disabled{ opacity:.5; cursor:not-allowed }
.consultation-avatar{
  width:56px; height:56px;
  border-radius: 12px;
  background:#dbe0ea;
  object-fit: cover;
}
.consultation-name{ font-weight:600 }
/* ---- Page intro ---- */
.page-intro{ margin-bottom: 12px; }

/* ---- Плитки действий (tasks) ---- */
.action-grid{
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr;            /* mobile */
  max-width: 880px;
  margin: 0 auto;                         /* центрируем блок на десктопе */
}
@media (min-width: 640px){
  .action-grid{ grid-template-columns: 1fr 1fr; }
}
@media (min-width: 1024px){
  .action-grid{ grid-template-columns: 1fr 1fr 1fr; }
}
.action-tile{
  display: block;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px;
  text-decoration: none;
  color: var(--text);
  box-shadow: var(--shadow);
  transition: transform .08s ease, border-color .2s ease, box-shadow .2s ease;
}
.action-tile:hover{
  transform: translateY(-2px);
  border-color: var(--primary);
  box-shadow: 0 10px 30px rgba(16,24,40,0.08);
}
.action-icon{
  width: 42px; height: 42px;
  display: grid; place-items: center;
  border-radius: 10px;
  background: var(--bg-soft);
  margin-bottom: 10px;
  font-size: 20px;
}
.action-title{
  font-weight: 800;
  margin-bottom: 4px;
}
.action-desc{
  font-size: 14px;
  color: var(--muted);
}

/* чуть компактнее вертикальные отступы у страницы задач */
.container .header{ margin-bottom: 12px; }

/* ---- Тесты в стиле «плиток» ---- */
.test-form{ display:block }
.test-title{ margin: 0 0 10px 0; font-weight: 800; font-size: 18px }

.test-fieldset{
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  margin: 0 0 10px 0;
}
.test-fieldset legend{
  font-weight: 700;
  padding: 0 6px;
}

/* Кастомные радиокнопки (большие цели касания на мобиле) */
.test-option.radio{
  display:flex; align-items:center; gap:10px;
  padding: 6px 2px;
  position: relative;
}
.test-option.radio input[type="radio"]{
  position: absolute;
  opacity: 0;
}
.radio-mark{
  width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid var(--border);
  display: inline-block;
  flex: 0 0 18px;
  box-shadow: inset 0 0 0 2px transparent;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.test-option.radio input[type="radio"]:checked + .radio-mark{
  border-color: var(--primary);
  box-shadow: inset 0 0 0 6px var(--primary);
}
.test-option.radio:hover .radio-mark{ border-color: var(--primary) }

/* Плитка-наставник */
.action-tile.person{
  display:flex; align-items:center; gap:12px;
}
.action-tile.person .avatar{
  width:48px; height:48px; border-radius:12px;
  background:#dbe0ea; object-fit:cover; flex:0 0 48px;
  border:1px solid var(--border);
}
.action-tile.person .meta{ flex:1; min-width:0 }
.action-tile.person .title-row{
  display:flex; align-items:center; gap:8px; justify-content:space-between;
}
.badge{
  display:inline-block; padding:2px 8px; border-radius:999px;
  font-size:12px; font-weight:700; white-space:nowrap;
}
.badge-public{ background:#ececff; color:var(--primary) }
.badge-private{ background:#e8f9f0; color:var(--success) }

/* ---- Лекции ---- */
.lecture-card {
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  background: #fff;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.lecture-body {
  padding: 1rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.lecture-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.lecture-actions {
  margin-top: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.lecture-head{
  display:flex; align-items:center; justify-content:space-between; gap:12px;
  margin-bottom: 8px;
}

.lecture-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
}


.lecture-viewed{
  display:inline-flex; align-items:center; gap:6px;
  font-size: 12px; font-weight:700; color:#fff;
  background: var(--success);
  border-radius: 999px; padding: 4px 10px;
}

.lecture-desc {
  font-size: 0.9rem;
  color: var(--muted);
  flex-grow: 1;
  margin-bottom: 0.8rem;
}

.poster-wrap {
  border-radius: var(--radius-md);
  background: #f5f5f5;
  overflow: hidden; /* только для скругления, без обрезки */
  display: flex;
  justify-content: center;
  align-items: center;
}

.lecture-card:hover {
  transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.lecture-poster {
  max-width: 100%;
  height: auto;
  object-fit: contain; /* показываем всю картинку */
  display: block;
}

.lecture-list {
   display: grid;
   grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
   gap: 1.5rem;
   margin-top: 1.5rem;
}

/* PDF блок */
.pdf-block{ margin-top: 10px }
.pdf-viewer{
  width: 100%;
  height: clamp(320px, 48vh, 520px);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: var(--shadow);
}
.pdf-actions{
  display:flex; gap:10px; margin-top: 10px; flex-wrap: wrap;
}

/* Бренд-бар PNG логотип: допускаем чуть выше на десктопе */
.brand-logo{ height: clamp(18px, 1.8vw, 30px) }


/* Полный ресет для кнопок FullCalendar */
.fc .fc-button {
  all: unset; /* убираем все стандартные стили */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--primary);
  color: #fff;
  border-radius: 10px;
  padding: 6px 14px;
  margin: 0 2px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s ease-in-out, transform 0.1s ease-in-out;
  box-shadow: 0 2px 5px rgba(0,0,0,0.08);
}

.fc .fc-button:hover {
  background: #3a37b8;
}

.fc .fc-button:active {
  transform: scale(0.97);
}

.fc .fc-button.fc-button-active {
  background: #2f2bb8 !important;
  color: #fff !important;
}

/* Отдельно стрелки навигации */
.fc .fc-prev-button::after {
  content: "←";
}
.fc .fc-next-button::after {
  content: "→";
}
.fc .fc-prev-button,
.fc .fc-next-button {
  min-width: 34px;
  padding: 6px 10px;
  font-size: 16px;
  font-weight: bold;
}

/* Заголовок календаря */
.fc .fc-toolbar-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
}

.btn-icon {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  font-size: 18px;
  border-radius: var(--radius-md);
}
.btn-icon:hover {
  filter: brightness(.95);
}

.view-switcher {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 1rem;
}
.view-switcher .btn {
  flex: 1;              /* чтобы кнопки были равной ширины */
  justify-content: center;
}

.datatable-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  gap: 10px;
}

.datatable-header label {
  font-weight: 600;
}

.datatable-actions {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 12px;
}

.datatable-actions .btn {
  margin-left: auto;
}
.cancel-btn {
  margin-top: 1rem;
  width: 100%;
  border: none;
  padding: .7rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  font-weight: 500;
  background: #ffeded;
  color: #d93025;
  transition: all 0.2s ease;
}
.cancel-btn:hover {
  background: #d93025;
  color: #fff;
}

/* Общая база для outline-кнопок */
.btn-outline {
  background: #fff;
  border: 2px solid transparent;
  border-radius: var(--radius-md);
  padding: .6rem 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all .2s ease;
}

/* Синяя (как у primary) */
.btn-outline-primary {
  border-color: #4b47d9;
  color: #4b47d9;
}
.btn-outline-primary:hover {
  background: #4b47d9;
  color: #fff;
}

/* Красная (удалить) */
.btn-outline-danger {
  border-color: #d93025;
  color: #d93025;
}
.btn-outline-danger:hover {
  background: #d93025;
  color: #fff;
}

/* Серая (заменить) */
.btn-outline-secondary {
  border-color: #555;
  color: #555;
}
.btn-outline-secondary:hover {
  background: #555;
  color: #fff;
}

.disabled-tile {
  pointer-events: none;
  opacity: 0.5;
}
