/* ================== 1. Общие стили ================== */
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;

    /* Единый сплошной фон */
    background: linear-gradient(160deg, #0d0d0d 0%, #1a1a2e 40%, #3a0ca3 100%);
    background-attachment: fixed;   /* фиксируем фон при скролле */
    background-size: cover;         /* тянем на весь экран */
    background-repeat: no-repeat;   /* убираем повтор */
    background-position: center;    /* по центру */

    color: #eee; 
}

/* структура */
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh; /* всегда тянем на всю высоту */
}

main {
    flex: 1;
    padding: 20px;
    text-align: center;
}


/* ================== 2. Шапка ================== */
header {
    background: #4a148c;
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.header-left h1 { margin: 0; font-size: 28px; }
.header-left h1 a { text-decoration: none; color: #ffffff; font-weight: bold; }
.header-right { display: flex; align-items: center; gap: 15px; }
.user-info-link {
    display: flex; align-items: center; gap: 8px;
    text-decoration: none; color: #ffffff; font-weight: bold;
    transition: 0.3s;
}
.user-info-link:hover { color: #ffd700; }
.username { font-weight: bold; color: #ffffff; }
.btn-nav {
    color: #ffd700; text-decoration: none; font-weight: bold;
    padding: 6px 12px; border-radius: 6px; transition: 0.3s;
}
.btn-nav:hover { background: rgba(255, 215, 0, 0.2); }
.avatar-small {
    width: 28px; height: 28px; border-radius: 50%;
    object-fit: cover; border: 2px solid #fff;
}

/* ================== 3. Кнопки ================== */
.btn {
    display: inline-block;
    padding: 12px 25px;
    background: #4a148c; color: white; font-weight: bold;
    text-decoration: none; border-radius: 8px; transition: 0.3s;
    cursor: pointer; border: none;
}
.btn:hover { background: #6a1b9a; }
.btn-alt { background: #ffd700; color: #4a148c; }
.btn-alt:hover { background: #ffea61; }

/* ================== 4. Формы ================== */
.form-container {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    max-width: 400px;
    margin: 40px auto;
    text-align: center;
}

.form-container h2 {
    margin-bottom: 20px;
    color: #4a148c;
}

/* Поля ввода */
.form-container input,
.form-container textarea {
    width: 100%;                 /* одинаковая ширина */
    padding: 12px;
    margin: 10px 0;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 14px;
    box-sizing: border-box;       /* чтобы паддинги не ломали ширину */
}

.form-container input:focus,
.form-container textarea:focus {
    border-color: #4a148c;
    outline: none;
}

/* Ошибки форм */
.errorlist {
    list-style: none;
    padding: 8px 12px;
    margin: 5px 0;
    border-radius: 6px;
    background-color: #f8d7da;
    color: #721c24;
    font-size: 14px;
}
.errorlist li {
    margin: 3px 0;
}

/* Обертка для пароля */
.password-wrapper {
    position: relative;
    width: 100%;
}

/* Инпут пароля */
.password-wrapper input {
    width: 100%;
    padding-right: 40px; /* место для кнопки-глаза */
}

/* Кнопка-глаз */
.password-wrapper .toggle-password {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: #fff;
    border: 1px solid #000;
    border-radius: 4px;
    padding: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
}
.password-wrapper .toggle-password svg {
    width: 16px;
    height: 16px;
    stroke: black; /* иконка чёрная */
}

/* ================== 5. Сообщения ================== */
.messages { margin: 20px auto; max-width: 600px; }
.alert {
    position: relative; padding: 12px 40px 12px 15px;
    margin-bottom: 10px; border-radius: 8px; font-weight: bold;
}
.alert-success { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.alert-error   { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }
.alert-info    { background: #d1ecf1; color: #0c5460; border: 1px solid #bee5eb; }
.alert-warning { background: #fff3cd; color: #856404; border: 1px solid #ffeeba; }
.close-btn {
    position: absolute; top: 8px; right: 12px;
    cursor: pointer; font-size: 18px; font-weight: bold;
}

/* ================== 6. Профиль ================== */
.profile-container {
    max-width: 600px; margin: 40px auto; padding: 20px;
    background: white; border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1); text-align: center;
    animation: fadeSlideIn 0.6s ease forwards;
    opacity: 0; transform: translateY(20px);
}
@keyframes fadeSlideIn { to { opacity: 1; transform: translateY(0); } }
.profile-avatar img {
    width: 150px; height: 150px; object-fit: cover; border-radius: 50%;
    border: 4px solid #4a148c; box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* ================== 7. Редактор профиля ================== */
.profile-edit-grid {
    max-width: 1200px; margin: 50px auto; padding: 40px;
    background: #fff; border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
    opacity: 0; transform: translateY(20px);
    animation: fadeSlideIn 0.6s ease forwards;
}
.page-title { text-align: center; color: #4a148c; margin-bottom: 30px; }
.peg-layout { display: grid; grid-template-columns: 300px 1fr 300px; gap: 30px; }
.card {
    background: #fafafa; border-radius: 12px; padding: 20px;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.05);
}
.card-title { margin: 0 0 12px; color: #4a148c; font-size: 18px; font-weight: bold; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 18px; text-align: left; }
.field label { font-weight: bold; color: #4a148c; font-size: 14px; }
.card input[type="text"], .card textarea, .card select {
    width: 100%; padding: 10px 12px; border: 1px solid #dcdcdc;
    border-radius: 6px; font-size: 14px;
}
.card input:focus, .card textarea:focus, .card select:focus {
    outline: none; border-color: #6a1b9a;
    box-shadow: 0 0 0 3px rgba(106,27,154,0.12);
}
#id_bio { height: 140px; resize: none; overflow-y: auto; }
.avatar-block { text-align: center; }
.avatar-preview { display: none; justify-content: center; margin: 12px 0 16px; }
.avatar-preview img {
    width: 150px; height: 150px; border-radius: 50%;
    object-fit: cover; border: 3px solid #4a148c;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.avatar-actions { display: flex; flex-direction: column; gap: 10px; align-items: stretch; }
.avatar-actions .btn, .avatar-actions .btn-alt { width: 100%; padding: 10px 0; }
.dob-selects { display: flex; flex-direction: column; gap: 10px; }
.dob-selects select:nth-child(1){order:3;} .dob-selects select:nth-child(2){order:2;} .dob-selects select:nth-child(3){order:1;}
.form-actions {
    margin-top: 35px; display: flex; justify-content: center; gap: 20px;
}
.form-actions .btn, .form-actions .btn-alt {
    padding: 12px 24px; min-width: 150px; text-align: center;
    font-size: 15px; border-radius: 8px;
}
@media (max-width: 1000px) {
    .peg-layout { grid-template-columns: 1fr; }
    .card { padding: 16px; }
    #id_bio { height: 220px; }
}

/* ================== 8. Модалки ================== */
.modal {
    display: none; position: fixed; z-index: 3000; inset: 0;
    background: rgba(0,0,0,0.7); justify-content: center; align-items: center;
}
.modal-open { overflow: hidden; }
.modal-content {
    background: #fff; padding: 20px; border-radius: 12px;
    width: 360px; max-width: 90%; text-align: center;
    box-shadow: 0 8px 24px rgba(0,0,0,0.25); overflow: hidden;
}
.modal-content h3 { margin: 6px 0 12px; color: #4a148c; }
.modal-content img {
    width: 90%; max-height: 260px; display: block; margin: 0 auto;
    border-radius: 6px; padding: 10px; background: #fff;
}
.modal-image-wrapper { padding: 10px; background: #fafafa; border-radius: 8px; display: inline-block; }
.modal-image-wrapper img { max-width: 100%; max-height: 240px; }

/* Фиолетовый стиль селекта "Статус" */
#goalStatus,
#edit-status,
form select[name="status"] {
  width: 100%;
  padding: 10px 12px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  background: #4a148c;          /* фирменный фиолетовый фон */
  color: #fff;                  /* белый текст */
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
  cursor: pointer;
  transition: background 0.2s ease, box-shadow 0.2s ease;
}

#goalStatus:focus,
#edit-status:focus,
form select[name="status"]:focus {
  background: #6a1b9a;           /* светлее при фокусе */
  outline: none;
  box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.4); /* желтоватое свечение */
}

/* Опции выпадающего списка */
form select[name="status"] option {
  background: #fff;             /* фон у опций белый */
  color: #333;
}

form select[name="status"] option[value="default"] {
  color: #4a148c;               /* фиолетовая надпись */
}
form select[name="status"] option[value="important"] {
  color: #e63946;               /* красная важная */
  font-weight: bold;
}
form select[name="status"] option[value="completed"] {
  color: #666;                  /* серая выполненная */
  text-decoration: line-through;
}


/* ================== 9. Цели ================== */
.goals-block {
    margin-top: 20px; display: flex; flex-direction: column; gap: 10px;
}
.goals-block a {
    display: block; width: 100%; text-align: center;
    padding: 12px 0; background: #4a148c; color: #fff;
    font-weight: bold; text-decoration: none; border-radius: 8px;
    transition: 0.3s;
}
.goals-block a:hover { background: #6a1b9a; }

/* ================== 10. Основной календарь ================== */
.main-calendar {
    margin: 0;
    padding: 20px; /* немного воздуха по краям */
    width: 100%;
    height: calc(100vh - 120px); /* окно минус шапка и запас снизу */
    display: flex;
    justify-content: center;
    align-items: stretch;
    box-sizing: border-box;
}

/* Применяем к календарю */
#main-calendar {
    width: 96%;
    height: 100%;
    max-width: 1500px;
    margin: 0 auto;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    padding: 15px;
    box-sizing: border-box;

    /* анимация проявления */
    opacity: 0;
    animation: calendarFadeIn 0.575s ease forwards;
}

/* Анимация появления */
@keyframes calendarFadeIn {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}
/* Подсветка сегодняшнего дня */
.fc .fc-daygrid-day.fc-day-today {
  background-color: rgba(255, 223, 0, 0.2);
  outline: 2px solid #ffbf00;   /* рамка по всем краям */
  outline-offset: -2px;         /* чтобы рамка не вылезала наружу */
  border-radius: 0;             /* убираем скругление для ровного квадрата */
}


/* ================== 11. Боковушка + Overlay + Мини-календарь  ================== */
/* ================== Боковушка + Overlay ================== */
.sidebar {
    width: 280px;
    position: fixed;
    top: var(--header-height, 60px);
    left: 0;
    height: calc(100% - var(--header-height, 60px));
    background: #fff;
    box-shadow: 6px 0 20px rgba(0,0,0,0.5);
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    z-index: 2000;
    overflow-y: auto;
    padding: 20px;
}

/* Когда меню открыто */
.dashboard.menu-open .sidebar {
    transform: translateX(0);
}

/* Overlay */
.overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 1500;
    display: none;
}
.dashboard.menu-open .overlay {
    display: block;
}

/* ================== Мини-календарь ================== */
.sidebar .mini-calendar {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    padding: 15px;
    margin-bottom: 20px;
    max-width: 100%;
}

/* Заголовок месяца */
.sidebar .mini-calendar .calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    font-size: 20px;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
    border-bottom: 1px solid #eee;
    padding-bottom: 8px;
}

.sidebar .mini-calendar #mini-month {
    font-size: 18px;
    font-weight: 600;
}

/* Стрелки переключения */
.sidebar .mini-calendar .calendar-header button {
    background: #444;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.sidebar .mini-calendar .calendar-header button:hover {
    background: #222;
    transform: scale(1.1);
}

.sidebar .mini-calendar .calendar-header i {
    width: 16px;
    height: 16px;
    stroke-width: 2.5px;
}

/* Дни недели */
.sidebar .mini-calendar .weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    font-weight: 600;
    font-size: 12px;
    color: #555;
    margin-bottom: 4px;
}

/* Ячейки календаря */
#mini-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.day {
    text-align: center;
    padding: 6px 0;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s;
    font-size: 13px;
}
.day:hover { background: #f1ebfa; }
.day.today {
    background: #4a148c;
    color: #fff;
    font-weight: bold;
    border-radius: 50%;
}
.day.weekend { color: #d32f2f; }
.day.holiday {
    border: 2px solid #43a047;
    color: #2e7d32;
    border-radius: 6px;
    font-weight: bold;
    background: transparent;
}
/* Праздничные дни в мини-календаре */
.day.holiday {
  background-color: rgba(0, 128, 0, 0.15); /* мягкий зелёный фон */
  border: none;                            /* убрали красную рамку */
  border-radius: 4px;
  cursor: pointer;
}

/* Кастомный tooltip */
.mini-tooltip {
  position: absolute;
  display: none;
  padding: 6px 10px;
  background: #4a148c;
  color: #fff;
  font-size: 13px;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
  pointer-events: none;
  z-index: 2000;
  white-space: nowrap;
}


/* ================== 12. Кнопки целей ================== */
.goals-block {
    margin-top: 15px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.goals-block a {
    display: block;
    width: 100%;
    text-align: center;
    padding: 10px 0;
    background: #4a148c;
    color: #fff;
    font-weight: bold;
    text-decoration: none;
    border-radius: 6px;
    transition: background 0.3s;
    font-size: 14px;
}

.goals-block a:hover {
    background: #6a1b9a;
}

/* ================== 13. Бургер ================== */
.burger {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: #6a1b9a;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    z-index: 2100;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}
/* Полоски */
.burger span {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 24px;
    height: 3px;
    background: #fff;
    border-radius: 2px;
    transform: translate(-50%, -50%);
    transition: all 0.3s ease;
}
/* Верхняя */
.burger span:nth-child(1) {
    transform: translate(-50%, calc(-50% - 8px));
}
/* Средняя */
.burger span:nth-child(2) {
    transform: translate(-50%, -50%);
}
/* Нижняя */
.burger span:nth-child(3) {
    transform: translate(-50%, calc(-50% + 8px));
}

/* Меню открыто → крест */
.dashboard.menu-open .burger span:nth-child(1) {
    transform: translate(-50%, -50%) rotate(45deg);
    width: 35px;
}
.dashboard.menu-open .burger span:nth-child(2) {
    opacity: 0;
}
.dashboard.menu-open .burger span:nth-child(3) {
    transform: translate(-50%, -50%) rotate(-45deg);
    width: 35px;
}

/* ================== 14. Футер ================== */
footer {
    margin-top: auto;
    padding: 15px 20px;
    text-align: center;
    font-size: 14px;
    color: #fff;

    background: transparent; /* фон прозрачный, чтобы не сбивать градиент */
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    font-weight: 400;
    letter-spacing: 0.3px;
}

/* ================== 15. Кнопка-глаз для показа/скрытия пароля ================== */
.password-wrapper .toggle-password {
    background: #fff;              /* фон белый */
    border: 2px solid #000;        /* чёрная обводка */
    cursor: pointer;
    padding: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;            /* лёгкое скругление углов, хочешь могу убрать */
    width: 32px;
    height: 32px;
}
/* Иконка внутри */
.password-wrapper .toggle-password svg {
    width: 18px;
    height: 18px;
    stroke: #000;   /* чёрный контур */
    fill: none;     /* внутри прозрачный */
}
.password-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}
/* Поле ввода пароля */
.password-wrapper input {
    width: 100%;
    padding-right: 40px; /* отступ, чтобы глаз не налезал на текст */
    box-sizing: border-box;
}
/* Кнопка-глаз */
.password-wrapper .toggle-password {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: #fff;
    border: 2px solid #000;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
}
/* Иконка */
.password-wrapper .toggle-password svg {
    width: 18px;
    height: 18px;
    stroke: #000;
    fill: none;
}
/* ================== 16. Кнопка выбора аватара ================== */
.avatar-field label.btn {
    cursor: pointer;
    display: inline-block;
    padding: 10px 18px;
    background: #ffd700;
    color: #4a148c;
    font-weight: bold;
    text-align: center;
    border-radius: 8px;
    transition: 0.3s;
    border: none;
    width: auto;          /* убираем растяжение */
    min-width: 160px;     /* минимальная ширина */
    margin: 10px auto;    /* центрирование */
}
.avatar-field label.btn:hover {
    background: #ffea61;
}

/* ================== 17. Общий фон ================== */
body {
    margin: 0;
    font-family: Arial, sans-serif;
    color: #333;

      background: linear-gradient(160deg, #0d0d0d 0%, #1a1a2e 40%, #3a0ca3 100%);
      color: #eee;
}

/* ================== 18. Общая анимация появления плашек ================== */
@keyframes fadeSlideIn {
    0% { opacity: 0; transform: translateY(20px); }
    100% { opacity: 1; transform: translateY(0); }
}
/* Общие стили для всех плашек */
.form-container,
.profile-container,
.profile-edit-grid,
.password-change-container {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeSlideIn 0.6s ease forwards;
}
/* Анимация появления */
.animate-fade {
    opacity: 0;
    transform: scale(0.95);
    animation: fadeInCard 0.5s ease forwards;
}
@keyframes fadeInCard {
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ================== 19. Welcome экран (гостевой) ================== */
.welcome {
  background: #fff;
  padding: 50px 40px;
  border-radius: 15px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  max-width: 520px;
  margin: 100px auto;
  text-align: center;
  animation: fadeSlideIn 0.6s ease forwards;
}

.welcome h2 {
  color: #4a148c;       /* фирменный фиолетовый */
  margin-bottom: 18px;
  font-size: 28px;
  font-weight: 700;
}

.welcome p {
  font-size: 17px;
  line-height: 1.6;
  margin-bottom: 30px;
  color: #444;
  font-weight: 400;
}

.welcome-actions {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-top: 20px;
}

.welcome-actions .btn {
  min-width: 150px;
  padding: 12px 0;
  font-size: 16px;
  border-radius: 8px;
  font-weight: bold;
  text-align: center;
  transition: all 0.2s ease;
}

.welcome-actions .btn-primary {
  background: #4a148c;
  color: #fff;
}

.welcome-actions .btn-primary:hover {
  background: #6a1b9a;
  transform: translateY(-2px);
}

.welcome-actions .btn-warning {
  background: #ffca28;
  color: #000;
}

.welcome-actions .btn-warning:hover {
  background: #e6b800;
  transform: translateY(-2px);
}

/* мобильная версия */
@media (max-width: 520px) {
  .welcome-actions {
    flex-direction: column;
  }
  .welcome-actions .btn {
    width: 100%;
  }
}

/* ================== 20. Модальное окно для целей ================== */
.modal {
  position: fixed;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  background: rgba(0,0,0,0.6);
  z-index: 2000;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.modal-content {
  background: #fff;
  margin: 10% auto;
  padding: 20px;
  border-radius: 12px;
  width: 400px;
  max-width: 90%;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
  animation: fadeIn 0.3s ease-in-out;
}

.modal-content h2 {
  margin-top: 0;
  font-size: 20px;
}

.modal .form-group {
  margin-bottom: 12px;
}

.modal .form-group label {
  display: block;
  margin-bottom: 4px;
  font-weight: bold;
}

.modal .form-group input,
.modal .form-group textarea {
  width: 100%;
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 14px;
}

.close {
  float: right;
  font-size: 22px;
  cursor: pointer;
  color: #666;
}

.close:hover {
  color: #000;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}
/* крестик закрытия добавления целей */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.6); /* полупрозрачный фон */
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000; /* выше всего остального */
}

.modal.hidden {
  opacity: 0;
  visibility: hidden;
}

.modal-content {
  background: #2b004d;
  color: #fff;
  padding: 20px 25px;
  border-radius: 12px;
  width: 320px;
  text-align: center;
  box-shadow: 0 0 25px rgba(0,0,0,0.6);
  transform: scale(1);
  transition: transform 0.25s ease;
}

.modal.hidden .modal-content {
  transform: scale(0.95);
}

.modal-content {
  position: relative;   /* чтобы крестик позиционировался внутри */
  background: #4a148c;  /* фиолетовый фон модалки */
  padding: 20px;
  border-radius: 10px;
  width: 400px;
  color: #fff;          /* белый текст */
  z-index: 1001;        /* выше overlay */
}

#closeGoalModal {
  position: absolute;
  top: 10px;
  right: 14px;
  font-size: 26px;
  font-weight: bold;
  color: #fff;          /* крестик белый */
  cursor: pointer;
  z-index: 1100;        /* ещё выше, чем modal-content */
  transition: color 0.2s ease;
}

#closeGoalModal:hover {
  color: #ffcc00;       /* жёлтый при наведении */
}

/* ================== 21. Toast уведомления ================== */
#toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  min-width: 220px;
  max-width: 320px;
  padding: 12px 16px;
  border-radius: 8px;
  color: #fff;
  font-size: 14px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  opacity: 0;
  transform: translateX(100%);
  animation: slideIn 0.3s forwards, fadeOut 0.3s forwards 3s;
}

.toast.success { background: #28a745; }  /* зелёный */
.toast.error { background: #dc3545; }    /* красный */
.toast.info { background: #007bff; }     /* синий */
.toast.warning { background: #ffc107; color: #333; } /* жёлтый */

@keyframes slideIn {
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeOut {
  to {
    opacity: 0;
    transform: translateX(100%);
  }
}


/* ================== 22. Добавление/изменение целей (модалки) ================== */
.modal {
  position: fixed;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  background: rgba(0,0,0,0.6);
  z-index: 2000;
}

.modal.hidden {
  display: none;
}

.modal-content {
  background: #2b004d; /* общий фиолетовый фон */
  color: #fff;
  padding: 20px 25px;
  border-radius: 12px;
  width: 320px;
  text-align: center;
  box-shadow: 0 0 25px rgba(0,0,0,0.6);
  animation: fadeIn 0.25s ease;
}

.modal-content h2 {
  margin-top: 0;
  font-size: 18px;
  margin-bottom: 15px;
  font-weight: bold;
}

.modal-content p {
  font-size: 14px;
  margin-bottom: 15px;
  color: #ddd;
}

/* ==== Поля ввода ==== */
#goalModal label {
  font-size: 14px;
  margin-bottom: 5px;
  display: block;
  text-align: left;
}

#goalModal input,
#goalModal textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #ccc;
  border-radius: 8px;
  margin-bottom: 15px;
  font-size: 15px;
  background: #fff;
  color: #333;
  box-sizing: border-box;
  transition: border-color 0.2s ease;
}

#goalModal input:focus,
#goalModal textarea:focus {
  border-color: #6a0dad;
  outline: none;
}

#goalModal textarea {
  resize: vertical;
  min-height: 60px;
}

/* ==== Кнопки ==== */
.btn {
  flex: 1;
  padding: 12px 20px;
  font-size: 16px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  font-weight: bold;
  transition: background 0.2s ease, transform 0.1s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: #6a0dad; /* фиолетовая */
  color: #fff;
}

.btn-primary:hover {
  background: #520a8a;
}

.btn-danger {
  background: #e63946; /* красная */
  color: #fff;
}

.btn-danger:hover {
  background: #b71c1c;
}

.btn-secondary {
  background: #6c757d; /* серая */
  color: #fff;
}

.btn-secondary:hover {
  background: #495057;
}

.btn-warning {
  background: #ffcc00; /* жёлтая */
  color: #000;
}

.btn-warning:hover {
  background: #e6b800;
}

/* ==== Контейнер кнопок ==== */
#goalModal .modal-actions,
#deleteModal .modal-actions {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-top: 15px;
}

/* ==== Анимация ==== */
@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.95); }
  to   { opacity: 1; transform: scale(1); }
}

/* ================== 23. Кнопки приветственного окна ================== */
.welcome-actions {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-top: 20px;
}

.welcome-actions .btn {
  min-width: 150px;
  padding: 12px 0;
  font-size: 15px;
  border-radius: 8px;
  font-weight: bold;
  text-align: center;
  transition: all 0.2s ease;
}

/* Фиолетовая кнопка */
.welcome-actions .btn-primary {
  background: #6a0dad;
  color: #fff;
}

.welcome-actions .btn-primary:hover {
  background: #520a8a;
}

/* Жёлтая кнопка */
.welcome-actions .btn-warning {
  background: #ffcc00;
  color: #000;
}

.welcome-actions .btn-warning:hover {
  background: #e6b800;
}

/* ================== 24. Модалка обрезки аватара ================== */
#cropperModal.modal {
  position: fixed;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  background: rgba(0,0,0,0.6);
  z-index: 2100;
}

#cropperModal.modal.hidden {
  display: none;
}

#cropperModal .modal-content {
  background: #2b004d; /* фирменный фиолетовый */
  color: #fff;
  padding: 20px 25px;
  border-radius: 12px;
  width: 400px;
  max-width: 90%;
  text-align: center;
  box-shadow: 0 0 25px rgba(0,0,0,0.6);
  animation: fadeIn 0.25s ease;
}

#cropperModal h3 {
  margin-top: 0;
  font-size: 18px;
  margin-bottom: 15px;
  font-weight: bold;
}

#cropperModal .modal-image-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  background: #fff;
  border-radius: 8px;
  padding: 10px;
  max-height: 300px;
  overflow: hidden;
}

#cropperModal .modal-image-wrapper img {
  max-width: 100%;
  max-height: 280px;
  object-fit: contain;
  border-radius: 6px;
}

/* кнопки внизу */
#cropperModal .btn {
  flex: 1;
  padding: 12px 20px;
  font-size: 15px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  font-weight: bold;
  transition: background 0.2s ease, transform 0.1s ease;
}

#cropperModal .btn:hover {
  transform: translateY(-1px);
}

/* ==== Edit Profile: фикс вылазящих полей ==== */

/* единые внутренние отступы карточек именно на этой странице */
.profile-edit-grid .card {
  padding: 20px;
}

/* поля внутри карточек: не вылезают за контейнер, учитывают padding */
.profile-edit-grid .card .field input,
.profile-edit-grid .card .field textarea,
.profile-edit-grid .card .field select {
  width: 100%;
  max-width: 100%;
  display: block;
  box-sizing: border-box;   /* ключевой фикс */
  padding: 12px 14px;
  border: 1px solid #ccc;
  border-radius: 10px;
  background: #fff;
  color: #333;
  font-size: 15px;
}

/* отступы между полями */
.profile-edit-grid .card .field {
  margin-bottom: 14px;
}

/* подписи к полям */
.profile-edit-grid .card .field > label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
}

/* биография — повыше и растягиваемся по ширине карточки */
.profile-edit-grid .card.center .field textarea {
  min-height: 160px;
  resize: vertical;
}

/* =============================================== */
/* overlay поверх всего контента */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
  z-index: 900; /* ниже, чем sidebar */
}
.overlay.show {
  opacity: 1;
  pointer-events: auto;
}

/* пример позиционирования */
.sidebar {
  position: fixed;
  top: var(--header-height, 60px);
  left: 0;
  width: 280px;
  height: calc(100% - var(--header-height, 60px));
  background: #fff;
  box-shadow: 6px 0 20px rgba(0,0,0,.2);
  transform: translateX(-100%);
  transition: transform .25s ease;
  z-index: 1000; /* выше overlay */
}
.dashboard.menu-open .sidebar {
  transform: translateX(0);
}
/* =============================================== */

/* ================== 25. Аккордеон "Мои цели" ================== */
.accordion {
  margin-top: 10px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  background: #fff;
}

/* Заголовок */
.accordion-header {
  width: 100%;
  padding: 14px 16px;
  text-align: left;
  font-size: 17px;
  font-weight: bold;
  background: #4a148c;
  color: #fff;
  border: none;
  outline: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background 0.3s;
}
.accordion-header:hover {
  background: #6a1b9a;
}

.accordion-arrow {
  width: 18px;
  height: 18px;
}

/* Контент с анимацией раскрытия */
.accordion-content {
  max-height: 0;
  overflow: hidden;
  background: #fff;
  padding: 0 12px;
  opacity: 0;
  transition: max-height 0.35s ease, padding 0.35s ease, opacity 0.35s ease;
}
.accordion-content.show {
  max-height: 300px;
  padding: 10px 12px;
  opacity: 1;
}

/* Список целей */
.accordion-content ul {
  list-style: none;
  padding: 0;
  margin: 0 0 10px;
  max-height: 160px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #4a148c #f1f1f1;
}
.accordion-content ul::-webkit-scrollbar { width: 6px; }
.accordion-content ul::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 3px;
}
.accordion-content ul::-webkit-scrollbar-thumb {
  background: #4a148c;
  border-radius: 3px;
}
.accordion-content ul::-webkit-scrollbar-thumb:hover {
  background: #6a1b9a;
}

/* Цель в списке */
.accordion-content li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 10px;
  border-bottom: 1px solid #eee;
  font-size: 14px;
  border-radius: 4px;
  transition: background 0.2s;
  margin-bottom: 6px;
}
.accordion-content li:last-child { border-bottom: none; }
.accordion-content li:hover { background: #f9f6ff; }

.accordion-content .goal-title {
  flex: 1;
  color: #333;
  font-weight: 500;
  margin-right: 8px;
}

/* Кнопки действий */
.goal-actions {
  display: flex;
  gap: 6px;
}
.goal-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;     /* сделаем удобнее для клика */
  height: 26px;
  border: none;    /* убираем стандартную рамку button */
  background: none;/* убираем фон button */
  padding: 0;
  margin: 0;
  cursor: pointer;
  border-radius: 6px;
  transition: background 0.2s;
}
.goal-action i,
.goal-action svg {
  width: 21px;   /* размер иконки */
  height: 21px;
  pointer-events: none;
}
/* Редактировать */
.goal-action.edit { color: #ffcc00; }
.goal-action.edit:hover { background: #fff7cc; }

/* Удалить */
.goal-action.danger { color: #d32f2f; }
.goal-action.danger:hover { background: #ffe0e0; }

/* Если целей нет */
.accordion-content .no-goals {
  font-style: italic;
  color: #777;
  text-align: center;
  padding: 10px 0;
}

/* Кнопка "Все цели" */
.accordion-content .btn-small {
  display: block;
  text-align: center;
  width: 100%;
  padding: 8px 0;
  background: #4a148c;
  color: #fff;
  font-weight: bold;
  border-radius: 6px;
  text-decoration: none;
  transition: background 0.3s;
}
.accordion-content .btn-small:hover {
  background: #6a1b9a;
}



/* ================== 26. Аккордеон стрелка (Lucide) ================== */
.accordion-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.accordion-arrow {
  width: 18px;
  height: 18px;
}

/* ================== 27. Аккордеон: стрелка и анимация ================== */
.accordion-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.accordion-arrow {
  display: inline-flex;
  width: 18px;
  height: 18px;
  transition: opacity 0.2s ease;
}
.accordion-arrow svg { /* SVG из lucide берёт currentColor */
  width: 18px;
  height: 18px;
}

/* ================== 28. Таблица целей (кнопки редакта/удаления) ================== */
.goals-table th {
  background: #f4f2fa;
  color: #4a148c;
  font-weight: bold;
}
.goals-table td, .goals-table th {
  padding: 10px;
  border: 1px solid #eee;
}

/* Кнопки действий в таблице */
.goal-actions {
  display: flex;
  gap: 8px;
}

.goal-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  transition: background 0.2s;
}

.goal-action.edit {
  background: #4a148c;
  color: #fff;
}
.goal-action.edit:hover {
  background: #6a1b9a;
}

.goal-action.danger {
  background: #d32f2f;
  color: #fff;
}
.goal-action.danger:hover {
  background: #b71c1c;
}

.goal-action i,
.goal-action svg {
  width: 16px;
  height: 16px;
}

/* только на странице "Мои цели" */
.goals-page .goal-actions {
  display: flex;
  justify-content: center; /* по центру по горизонтали */
  gap: 8px;                /* расстояние между кнопками */
  align-items: center;     /* выравнивание по вертикали (на всякий случай) */
}

/* ================== 29. Основной календарь (FullCalendar) — переработанный ================== */

/* ===== Toolbar (верхняя панель) ===== */
.fc .fc-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  border-bottom: 1px solid #e0e0e0;
  padding-bottom: 6px;
}

.fc .fc-toolbar-title {
  font-size: 18px;
  font-weight: 700;
  color: #2b004d;
}

/* ===== Кнопки управления ===== */
.fc .fc-button {
  background: #4a148c;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 5px 10px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease;
}

.fc .fc-button:hover {
  background: #6a1b9a;
  transform: translateY(-1px);
}

.fc .fc-today-button {
  background: #ffcc00;
  color: #000;
}
.fc .fc-today-button:hover {
  background: #e6b800;
}

/* ===== Заголовки дней недели ===== */
.fc .fc-col-header-cell {
  background: #f8f6ff;
  color: #4a148c;
  font-weight: 600;
  font-size: 13px;
  padding: 6px 0;
  border: 1px solid #e5e5e5;
}

/* ===== Сетка ===== */
.fc .fc-daygrid-day {
  border: 1px solid #ddd;
  transition: background 0.2s ease;
  height: 90px; /* ниже стандартной */
  padding: 0;
  position: relative;
}

.fc .fc-daygrid-day:hover {
  background: #f3ecff;
}

.fc .fc-day-today {
  background: rgba(255, 223, 0, 0.15) !important;
  outline: 2px solid #ffbf00;
  outline-offset: -2px;
}

/* ===== События ===== */
.fc .fc-event {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;

  border: none;
  border-radius: 6px;
  padding: 2px 6px;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;

  height: 22px;
  line-height: 22px;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

/* Наведение */
.fc .fc-event:hover {
  transform: scale(1.03);
  box-shadow: 0 2px 6px rgba(0,0,0,0.25);
}

/* Убираем синий кружок перед временем */
.fc .fc-event-dot {
  display: none !important;
}

/* ===== Цвета по типам целей ===== */
.fc-event.default {
  background: #4a148c;
  color: #fff;
}

.fc-event.important {
  background: #e63946;
  color: #fff;
}

.fc-event.completed {
  background: #9e9e9e;
  color: #fff;
  text-decoration: line-through;
  opacity: 0.85;
}

/* Выравниваем текст, чтобы время и заголовок шли одной строкой */
.fc-event-time,
.fc-event-title {
  display: inline;
  padding: 0;
  margin: 0 2px;
  font-size: 13px;
}


/* ===== Цвета по статусу (твой старый стиль) ===== */

/* Обычная цель */
.fc-event.default {
  background: linear-gradient(135deg, #4a148c, #6a1b9a);
  color: #fff;
}

/* Важная цель */
.fc-event.important {
  background: linear-gradient(135deg, #e63946, #b71c1c);
  color: #fff;
  font-weight: 600;
}

/* Выполненная цель */
.fc-event.completed {
  background: linear-gradient(135deg, #9e9e9e, #757575);
  color: #fff;
  text-decoration: line-through;
  opacity: 0.85;
}

/* Цель с предупреждением */
.fc-event.warning {
  background: linear-gradient(135deg, #ffcc00, #ffb300);
  color: #000;
  font-weight: 600;
}

/* ===== Адаптив под телефон ===== */
@media (max-width: 768px) {
  .fc .fc-toolbar {
    flex-direction: column;
    gap: 8px;
  }

  .fc .fc-toolbar-title {
    font-size: 16px;
  }

  .fc .fc-button {
    font-size: 12px;
    padding: 4px 8px;
  }

  .fc .fc-daygrid-day {
    height: 70px;
  }

  .fc .fc-event {
    font-size: 11px;
    padding: 1px 3px;
    border-radius: 4px;
  }
}


/* ================== 30. Статусы целей ================== */

/* --- Общий стиль --- */
.goal-item .goal-title,
.goal-row td:first-child {
  transition: color 0.2s ease, text-decoration 0.2s ease;
}

/* --- Обычная цель --- */
.goal-item.default .goal-title,
.goal-row.default td:first-child {
  color: #4a148c; /* фирменный фиолетовый */
  font-weight: 500;
}

/* --- Важная цель --- */
.goal-item.important .goal-title,
.goal-row.important td:first-child {
  color: #e63946; /* красный */
  font-weight: bold;
}

/* --- Выполненная цель --- */
.goal-item.completed .goal-title,
.goal-row.completed td:first-child {
  color: #9e9e9e; /* серый */
  text-decoration: line-through;
  font-weight: normal;
}

/* ================== 31. Кнопка "Выполнить" ================== */
.goal-action.complete {
  background: #28a745;        /* зелёный фон */
  color: #fff;                /* белая иконка */
  border-radius: 6px;         /* скруглённые углы */
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, transform 0.1s ease;
}

.goal-action.complete:hover {
  background: #218838;        /* чуть темнее при наведении */
  transform: translateY(-1px);
}

/* ================== 31. Подсказки пароля ================== */
.password-hints {
  margin: 10px 0 18px;
  padding: 14px 16px;
  background: #fafafa;             /* светлый фон, вписывается в карточку */
  border: 1px solid #e0e0e0;       /* тонкая рамка */
  border-radius: 8px;
  font-size: 14px;
  line-height: 1.5;
  color: #444;                     /* читаемый серый */
}

.password-hints ul {
  margin: 0;
  padding-left: 18px;
  list-style: disc;
}

.password-hints li {
  margin: 6px 0;
  font-size: 13.5px;
}

/* Подсказки внутри модалок или на фиолетовом фоне */
.modal .password-hints {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #f1f1f1;
}

@media (max-width: 520px) {
  .password-hints {
    font-size: 13px;
    padding: 10px 12px;
  }
}
/* ================== 32. GLOBAL BG (единый фон без швов) ================== */
:root {
  --app-bg: linear-gradient(160deg, #0d0d0d 0%, #1a1a2e 40%, #3a0ca3 100%);
}

/* отключаем любые фоновые цвета у html/body из ранних секций */
html { background: transparent !important; }
body { 
  background: transparent !important;
  position: relative;
  min-height: 100vh;
}

/* единый слой-фон, прибит к окну, под всем контентом */
body::before {
  content: "";
  position: fixed;        /* лучше, чем background-attachment: fixed */
  inset: 0;
  z-index: -1;            /* уводим за контент */
  background: var(--app-bg);
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
  will-change: transform; /* сглаживает возможные артефакты */
  transform: translateZ(0);
}

/* футер не должен перекрывать фон */
footer {
  background: transparent !important;
  color: #fff;
  border-top: 1px solid rgba(255,255,255,.15);
}

/* ================== 33. FIX: читаемость текста ================== */

/* Глобально — светлый текст на градиенте */
body {
  color: #f5f5f5;
}

/* Все карточки и белые блоки — тёмный текст */
.form-container,
.profile-container,
.profile-edit-grid,
.password-change-container,
.welcome,
.modal-content,
.card,
.goals-page,
.goals-table,
.fc, /* календарь */
.accordion-content {
  color: #222 !important;
}

/* Заголовки внутри блоков */
.form-container h2,
.profile-container h2,
.profile-edit-grid h2,
.welcome h1,
.welcome h2,
.goals-page h2,
.goals-table th,
.modal-content h2 {
  color: #4a148c !important; /* фирменный фиолетовый */
  font-weight: bold;
}

/* Подписи, описания, абзацы */
.form-container p,
.profile-container p,
.goals-page p,
.goals-table td,
.accordion-content .goal-title {
  color: #444 !important; /* читаемый серый */
}

/* ===== Стили статусов целей ===== */

/* Выполненные */
.goal-row.completed td,
.accordion-content li.completed .goal-title {
  color: #999 !important;
  text-decoration: line-through;
}

/* Важные */
.goal-row.important td,
.accordion-content li.important .goal-title {
  color: #e63946 !important;
  font-weight: bold;
}

/* Обычные */
.goal-row.default td,
.accordion-content li.default .goal-title {
  color: #222 !important;
}

/* ================== 34. Модальные окна (фикс текста) ================== */

/* Заголовок модалки */
.modal-content h2 {
  color: #fff !important;          /* белый текст */
  font-size: 20px;
  margin-bottom: 15px;
  text-align: center;
}

/* Подписи к полям */
.modal-content label {
  color: #ffea61 !important;       /* жёлтоватый для контраста */
  font-weight: 600;
  display: block;
  margin-bottom: 5px;
}

/* Текстовые поля и textarea */
.modal-content input,
.modal-content textarea,
.modal-content select {
  background: #fff;                /* белый фон */
  color: #333;                     /* тёмный текст */
  border: 1px solid #ccc;
  border-radius: 6px;
  padding: 10px;
  font-size: 14px;
  width: 100%;
  box-sizing: border-box;
}

/* Для select (Статус) */
.modal-content select {
  background: #fff !important;
  color: #333 !important;
}

/* Кнопки */
.modal-content .btn {
  font-weight: bold;
}

/* ================== 35. Мини-календарь (финальный стиль) ================== */
.sidebar .mini-calendar {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
  padding: 16px;
  margin-bottom: 20px;
  max-width: 100%;
  color: #333; /* основной текст внутри */
}

/* Заголовок (месяц + стрелки) */
.sidebar .mini-calendar .calendar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: bold;
  font-size: 18px;
  color: #000000;
  margin-bottom: 12px;
  border-bottom: 1px solid #eee;
  padding-bottom: 6px;
}

/* Стрелки переключения */
.sidebar .mini-calendar .calendar-header button {
  background: #4a148c;
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.2s ease;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}
.sidebar .mini-calendar .calendar-header button:hover {
  background: #6a1b9a;
  transform: scale(1.1);
}
.sidebar .mini-calendar .calendar-header i {
  width: 16px;
  height: 16px;
}

/* Дни недели */
.sidebar .mini-calendar .weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-weight: 600;
  font-size: 12px;
  color: #555;
  margin-bottom: 6px;
}

/* Сетка дней */
#mini-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

/* Обычный день */
.day {
  text-align: center;
  padding: 6px 0;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  transition: background 0.2s ease;
  color: #333;
}
.day:hover { background: #f1ebfa; }

/* Сегодня */
.day.today {
  background: #4a148c;
  color: #fff !important;
  font-weight: bold;
  border-radius: 50%;
}

/* Выходные */
.day.weekend {
  color: #d32f2f;
  font-weight: bold;
}

/* Праздники */
.day.holiday {
  background-color: rgba(67, 160, 71, 0.15);
  color: #2e7d32;
  border-radius: 4px;
  font-weight: bold;
}

/* ===============================  36. Прелоадер   =============================== */
#loader-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.35);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #fff;
  border-top-color: #4a148c;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ===============================  37. Блок фильтров целей =============================== */
.goals-filter {
  background: #f7f5fb;
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  overflow: hidden;
  transition: all 0.3s ease;
  max-height: 400px;
}

.goals-filter.collapsed {
  max-height: 0;
  padding: 0;
  margin-bottom: 0;
  box-shadow: none;
  opacity: 0;
  pointer-events: none;
}

.goals-filter .filter-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.goals-filter input,
.goals-filter select {
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 14px;
  flex: 1;
}

.filter-dates {
  display: flex;
  gap: 10px;
  flex: 1;
}

.filter-buttons {
  display: flex;
  gap: 10px;
  width: 100%;
  margin-top: 8px;
}

.filter-toggle-wrapper {
  text-align: right;
  margin-bottom: 8px;
}

.filter-toggle-wrapper .btn {
  background: #4a148c;
  color: #fff;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 8px;
  box-shadow: 0 3px 6px rgba(0,0,0,0.2);
  transition: all 0.2s ease;
}

.filter-toggle-wrapper .btn:hover {
  background: #6a1b9a;
  transform: scale(1.03);
}

/* =============================== 38. Улучшенный стиль фильтров =============================== */

/* Кнопка "Все" (статус) */
.status-select {
  min-width: 120px;
  max-width: 160px;
  background: #eee;
  color: #333;
  border: 1px solid #ccc;
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s ease;
}

/* Активные варианты — по цвету статуса */
.status-select option[value="default"] {
  color: #4a148c;
}
.status-select option[value="important"] {
  color: #e63946;
}
.status-select option[value="completed"] {
  color: #777;
}

/* Когда пользователь выбрал что-то — меняем фон */
.status-select:focus,
.status-select:not([value=""]) {
  background: #4a148c;
  color: #fff;
  border-color: #4a148c;
}

/* Подписи "от" и "до" */
.filter-dates label {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #4a148c;
  font-size: 13px;
  font-weight: 600;
}

.filter-dates input[type="date"] {
  padding: 6px 8px;
  border: 1px solid #ddd;
  border-radius: 8px;
  background: #fff;
  font-size: 13.5px;
  color: #333;
}

.filter-dates input[type="date"]:focus {
  border-color: #4a148c;
  outline: none;
}

/* 🎛 Фильтр статуса */
.status-select {
  height: 35px; /* 👈 уменьшили высоту */
  border-radius: 8px;
  border: 1px solid #ccc;
  color: #333;
  font-weight: 600;
  padding: 0 10px;
  transition: all 0.2s ease;
}


/* сами пункты в выпадающем списке */
.status-select option {
  background: #fff;
  color: #333;
}

/* активный пункт — фиолетовый */
.status-select option:checked {
  background: #4a148c;
  color: #fff;
}

/* выравниваем кнопку статуса с остальными элементами */
.status-select {
  vertical-align: middle;
  margin-top: 2px; /* 👈 опускаем чуть ниже */
}

/* а также убедимся, что все элементы в одном ряду */
.filter-inner {
  display: flex;
  align-items: center; /* 👈 ровняет по центру по высоте */
  flex-wrap: wrap;
  gap: 10px;
}
/* 📅 Исправляем сжатие колонки "Дата / Время" при динамической подгрузке */
.goals-table {
  table-layout: fixed; /* фиксированная ширина колонок */
  width: 100%;
}

.goals-table th:nth-child(3),
.goals-table td:nth-child(3) {
  width: 120px;         /* фиксируем колонку даты */
  min-width: 120px;
  white-space: nowrap;  /* запрет переноса */
  text-align: center;
}
/* ===============================  39. Красивое отображение названия цели в "Неделя" / "День"  =============================== */
.fc-timeGridWeek-view .fc-event-title-custom,
.fc-timeGridDay-view .fc-event-title-custom {
  color: #fff;
  font-weight: 600;
  font-size: 13px;
  line-height: 1.2;
  padding: 2px 6px;
  white-space: normal;
  word-wrap: break-word;
  text-align: center;
}

/* ===============================  40. ФУТЕР GOALUP (обновлённый)  =============================== */
.site-footer {
  background: radial-gradient(circle at top, #0f172a 0%, #0a0a0a 100%);
  color: #e5e7eb;
  padding: 50px 20px 25px;
  font-family: 'Inter', sans-serif;
  border-top: 2px solid #6d28d9;
  box-shadow: 0 -3px 15px rgba(109, 40, 217, 0.2);
}

.footer-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  max-width: 1100px;
  margin: 0 auto;
  gap: 30px;
}

.footer-col {
  flex: 1 1 300px;
  min-width: 250px;
}

.footer-col h2,
.footer-col h3 {
  color: #c084fc;
  margin-bottom: 15px;
  letter-spacing: 1px;
  text-shadow: 0 0 5px rgba(192, 132, 252, 0.7);
}

.footer-col p {
  color: #d1d5db;
  line-height: 1.6;
}

.footer-col a {
  color: #c7d2fe;
  text-decoration: none;
  transition: all 0.3s ease;
  position: relative;
}

.footer-col a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -3px;
  width: 0%;
  height: 2px;
  background: linear-gradient(90deg, #7c3aed, #a855f7);
  transition: width 0.3s ease;
  border-radius: 5px;
}

.footer-col a:hover {
  color: #f5f3ff;
  text-shadow: 0 0 8px #a855f7, 0 0 15px #7c3aed;
}

.footer-col a:hover::after {
  width: 100%;
}

.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-col li {
  margin: 6px 0;
}

.footer-col .time {
  color: #9ca3af;
  font-size: 0.9em;
}

.footer-bottom {
  text-align: center;
  border-top: 1px solid #1f2937;
  margin-top: 35px;
  padding-top: 15px;
  font-size: 0.9em;
  color: #9ca3af;
  text-shadow: 0 0 4px rgba(167, 139, 250, 0.4);
}

/* 💫 Hover-подсветка для нижней подписи */
.footer-bottom:hover {
  color: #c084fc;
  text-shadow: 0 0 10px #a855f7, 0 0 20px #7c3aed;
  transition: all 0.4s ease;
}

/* 💻 Адаптив */
@media (max-width: 768px) {
  .footer-container {
    flex-direction: column;
    text-align: center;
  }

  .footer-col {
    flex: 1 1 100%;
  }
}

/* ===============================  💜 41. Кнопки управления в хедере (финальная версия) =============================== */


/* Контейнер с кнопками */
.header-actions.capsule {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.capsule-btn {
  background: linear-gradient(145deg, #8b5cf6, #7c3aed);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  border: none;
  border-radius: 40px;
  padding: 10px 24px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.3),
    0 3px 8px rgba(0, 0, 0, 0.25);
  transition: all 0.25s ease;
  cursor: pointer;
}

.capsule-btn:hover {
  background: linear-gradient(145deg, #a78bfa, #8b5cf6);
  transform: translateY(-2px);
  box-shadow:
    0 4px 10px rgba(155, 80, 255, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.capsule-btn:active {
  transform: translateY(0);
  box-shadow:
    inset 0 2px 6px rgba(0, 0, 0, 0.3),
    0 1px 3px rgba(0, 0, 0, 0.3);
}
/* Для единообразия ширины */
.capsule-btn {
  min-width: 160px;
  text-align: center;
}

/* Focus — подсветка клавиатурой */
.capsule-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 8px 2px rgba(157, 78, 221, 0.8);
}

/* Активная страница (например "Мои цели") */
.capsule-btn.active {
  background: linear-gradient(135deg, #4a148c, #7b1fa2);
  box-shadow: 0 3px 6px rgba(74, 20, 140, 0.4);
}

/* 💫 Небольшое свечение всей капсулы при наведении */
.header-actions.capsule:hover .capsule-btn {
  filter: brightness(1.1);
}

/* 📱 Адаптив — вертикальное расположение */
@media (max-width: 768px) {
  .header-actions.capsule {
    flex-direction: column;
    width: 100%;
    margin-bottom: 10px;
    gap: 6px;
  }

  .capsule-btn {
    width: 100%;
    border-radius: 14px;
    padding: 12px 0;
  }
}


/* ===============================  💎 43. Улучшение боковой панели и шапки =============================== */

/* 🔹 (1) Светлый фон боковой панели */
.sidebar {
  background: #e8e8ee  !important; /* мягкий оттенок, не чисто белый */
  box-shadow: 6px 0 20px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(6px); /* лёгкое стеклянное размытие */
  border-right: 1px solid rgba(124, 58, 237, 0.15); /* лёгкий фиолетовый контур */
  .sidebar {
    backdrop-filter: blur(8px);
    box-shadow: 6px 0 15px rgba(0,0,0,0.25);
}

}

/* 🔹 Hover-эффект для целей (бонус к пункту 1) */
.accordion-content li:hover {
  background: rgba(124, 58, 237, 0.08);
  transition: background 0.2s ease;
}

/* 🔹 (5) Лёгкое свечение под шапкой — “парящая панель” */
header {
  position: relative;
  z-index: 100;
  box-shadow:
    0 2px 10px rgba(124, 58, 237, 0.3),
    0 0 10px rgba(168, 85, 247, 0.3);
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(4px); /* лёгкий эффект стекла */
}

/* Чтобы свечение красиво отделялось от основного фона */
body {
  background: linear-gradient(180deg, #1a1a2e 0%, #0d0d0d 100%) !important;
}

/* Десктоп: показываем капсулу, скрываем мобильные элементы */
@media (min-width: 1025px) {
  .header-actions.capsule { display: flex !important; }
  .mobile-menu-btn,
  .mobile-actions { display: none !important; }
}

/* =============================== 💜 Welcome кнопки — одинаковый стиль =============================== */
.welcome-actions {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

.welcome-actions .btn {
  min-width: 180px;
  padding: 14px 32px;
  border-radius: 12px;
  font-size: 17px;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.25s ease;
  text-align: center;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.25);
  background: linear-gradient(135deg, #7c3aed, #a855f7);
  color: #fff;
}

.welcome-actions .btn:hover {
  background: linear-gradient(135deg, #8b5cf6, #c084fc);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.4);
}

/* 💫 Акцент при фокусе */
.welcome-actions .btn:focus-visible {
  outline: none;
  box-shadow: 0 0 8px 3px rgba(168, 85, 247, 0.5);
}

/* Адаптив */
@media (max-width: 600px) {
  .welcome-actions {
    flex-direction: column;
    gap: 14px;
  }
  .welcome-actions .btn {
    width: 100%;
  }
}

/* =============================== 💜 Welcome — как кнопки профиля =============================== */

.welcome-actions .btn {
  display: inline-block;
  border: none;
  border-radius: 8px;           /* как у профиля */
  padding: 10px 22px;           /* одинаковый внутренний отступ */
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  color: #fff;
  transition: all 0.25s ease;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
  min-width: 140px;
  text-align: center;
}


/* 💛 Профиль — жёлтая с фиолетовым текстом */
.profile-btn {
  background: linear-gradient(145deg, #ffd700, #ffcc00);
  color: #4a148c; /* фиолетовый текст */
  font-weight: 700;
  border: none;
  transition: all 0.25s ease;
}

.profile-btn:hover {
  background: linear-gradient(145deg, #ffea61, #ffd700);
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(255, 215, 0, 0.4);
}


.profile-btn:hover {
  background: linear-gradient(145deg, #ffe55c, #ffca28);
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(255, 215, 0, 0.4);
}

/* выравнивание */
.welcome-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* 📱 адаптив */
@media (max-width: 600px) {
  .welcome-actions {
    flex-direction: column;
    gap: 10px;
  }
  .welcome-actions .btn {
    width: 100%;
  }
}
