/* =========================================================
   КАЛЕНДАРЬ — стили
   ========================================================= */

.calendar-container {
    background: #fff;
    border-radius: 18px;
    border: 1px solid #c9a8c4;
    overflow: hidden;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    background: linear-gradient(135deg, #7a4468, #5a3350);
    color: #fff;
}

.calendar-header .month-year {
    font-family: 'Baloo 2', 'Nunito', sans-serif;
    font-size: 24px;
    font-weight: 700;
}

.calendar-nav {
    display: flex;
    gap: 8px;
}

.calendar-nav button {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,0.2);
    color: #fff;
    font-size: 16px;
    cursor: pointer;
    transition: 0.2s;
}
.calendar-nav button:hover {
    background: rgba(255,255,255,0.35);
}
.calendar-nav .today-btn {
    width: auto;
    padding: 0 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
}

/* Сетка календаря */
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background: #f0e8ec;
    padding: 1px;
}

.calendar-weekday {
    background: #f7f2f5;
    padding: 12px 8px;
    text-align: center;
    font-weight: 800;
    font-size: 12px;
    color: #6C7A67;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.calendar-day {
    background: #fff;
    min-height: 100px;
    padding: 8px;
    cursor: pointer;
    transition: 0.2s;
    position: relative;
}
.calendar-day:hover {
    background: #fcf5f9;
}
.calendar-day.other-month {
    background: #faf8f9;
}
.calendar-day.other-month .day-number {
    color: #c9a8c4;
}
.calendar-day.today {
    background: #fff1cf;
}
.calendar-day.today .day-number {
    background: #b0538a;
    color: #fff;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.day-number {
    font-weight: 700;
    font-size: 14px;
    color: #4a2a44;
    margin-bottom: 4px;
}

.day-events {
    display: flex;
    flex-direction: column;
    gap: 3px;
    max-height: 60px;
    overflow-y: auto;
}
.day-events::-webkit-scrollbar {
    width: 2px;
}
.day-events::-webkit-scrollbar-thumb {
    background: #c9a8c4;
    border-radius: 4px;
}

.day-event {
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: pointer;
    transition: 0.2s;
}
.day-event:hover {
    opacity: 0.8;
    transform: scale(1.02);
}

.event-shoot { background: #fefcbf; color: #975a16; }
.event-task { background: #bee3f8; color: #2a69ac; }
.event-deadline { background: #fed7d7; color: #9b2c2c; }
.event-payment { background: #c6f6d5; color: #276749; }
.event-other { background: #e9d8fd; color: #553c9a; }

/* Боковая панель событий */
.calendar-sidebar {
    background: #fff;
    border-radius: 18px;
    border: 1px solid #c9a8c4;
    padding: 20px;
}

.calendar-sidebar .sidebar-title {
    font-weight: 900;
    font-size: 18px;
    color: #4a2a44;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f0e8ec;
}

.event-item {
    display: flex;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid #f0e8ec;
    align-items: center;
}
.event-item:last-child { border-bottom: none; }

.event-dot {
    width: 10px;
    height: 10px;
    min-width: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}
.event-dot.shoot { background: #f1c40f; }
.event-dot.task { background: #3498db; }
.event-dot.deadline { background: #e74c3c; }
.event-dot.payment { background: #2ecc71; }

.event-info {
    flex: 1;
}
.event-info .event-title {
    font-weight: 700;
    font-size: 14px;
    color: #4a2a44;
}
.event-info .event-meta {
    font-size: 12px;
    color: #6C7A67;
}
.event-info .event-meta i {
    margin-right: 4px;
}

/* Форма создания события */
.event-form {
    padding: 16px 20px 20px;
    background: #f7f2f5;
    border-radius: 0 0 18px 18px;
}
.event-form .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 12px;
}
.event-form .form-row.full { grid-template-columns: 1fr; }
.event-form input,
.event-form select,
.event-form textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #c9a8c4;
    border-radius: 10px;
    font-size: 14px;
    font-family: inherit;
    outline: none;
    transition: 0.2s;
    background: #fff;
}
.event-form input:focus,
.event-form select:focus,
.event-form textarea:focus {
    border-color: #b0538a;
    box-shadow: 0 0 0 3px rgba(176,83,138,0.1);
}
.event-form textarea { min-height: 60px; resize: vertical; }

/* Легенда */
.legend {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    padding: 12px 0;
}
.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    color: #4a2a44;
}
.legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 4px;
}
.legend-dot.shoot { background: #f1c40f; }
.legend-dot.task { background: #3498db; }
.legend-dot.deadline { background: #e74c3c; }
.legend-dot.payment { background: #2ecc71; }

/* Адаптив */
@media (max-width: 992px) {
    .calendar-grid-outer {
        grid-template-columns: 1fr !important;
    }
    .calendar-sidebar {
        margin-top: 20px;
    }
}
@media (max-width: 560px) {
    .calendar-header {
        flex-wrap: wrap;
        gap: 10px;
        padding: 16px;
    }
    .calendar-header .month-year {
        font-size: 20px;
    }
    .calendar-day {
        min-height: 60px;
        padding: 4px;
    }
    .day-number {
        font-size: 12px;
        width: 24px;
        height: 24px;
    }
    .day-event {
        font-size: 8px;
        padding: 1px 4px;
    }
    .event-form .form-row {
        grid-template-columns: 1fr;
    }
}
/* =========================================================
   МИНИ-КАЛЕНДАРЬ НА ГЛАВНОЙ
   ========================================================= */

.mini-calendar-day {
    text-align: center;
    padding: 6px 2px;
    border-radius: 8px;
    cursor: pointer;
    transition: 0.2s;
    border: 1px solid transparent;
}
.mini-calendar-day:hover {
    background: #f4f0f2 !important;
}
.mini-calendar-day.has-event {
    background: #fcf5f9;
}
.mini-calendar-day.today {
    background: #fff1cf;
    border-color: #b0538a;
}
.mini-calendar-day .day-number {
    font-size: 14px;
    font-weight: 600;
    color: #4a2a44;
}
.mini-calendar-day.today .day-number {
    font-weight: 800;
    color: #b0538a;
}
.mini-calendar-day .event-icons {
    font-size: 10px;
    line-height: 1.2;
}
.mini-calendar-day .event-count {
    font-size: 8px;
    color: #6C7A67;
}

/* Легенда мини-календаря */
.mini-legend {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    padding: 12px 16px 0;
    border-top: 1px solid #f0e8ec;
    margin-top: 10px;
}
.mini-legend-item {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 600;
    color: #4a2a44;
}
.mini-legend-dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 3px;
}
.mini-legend-dot.shoot { background: #fefcbf; }
.mini-legend-dot.task { background: #bee3f8; }
.mini-legend-dot.deadline { background: #fed7d7; }
.mini-legend-dot.payment { background: #c6f6d5; }
/* =========================================================
   КАЛЕНДАРЬ — стили
   ========================================================= */

.calendar-day:hover {
    background: #fcf5f9 !important;
}

.calendar-day .day-events::-webkit-scrollbar {
    width: 2px;
}
.calendar-day .day-events::-webkit-scrollbar-thumb {
    background: #c9a8c4;
    border-radius: 4px;
}

/* Адаптив для календаря */
@media (max-width: 992px) {
    .calendar-grid-outer {
        grid-template-columns: 1fr !important;
    }
    .calendar-sidebar {
        position: static !important;
        margin-top: 20px;
    }
}
@media (max-width: 560px) {
    .calendar-header {
        flex-wrap: wrap;
        gap: 10px;
        padding: 12px 16px;
    }
    .calendar-header .month-year {
        font-size: 18px;
    }
    .calendar-day {
        min-height: 50px !important;
        padding: 4px !important;
    }
    .day-number {
        font-size: 12px !important;
    }
    .day-event {
        font-size: 8px !important;
        padding: 1px 4px !important;
    }
}