/* Цветовая схема */
:root {
    --bg-primary: #000000;
    --text-primary: #FFFFFF;
    --border-color: #FFFFFF;
    --status-paid: #00FF00;
    --status-unpaid: #FF0000;
    --accent-color: #FFFFFF;
    --hover-opacity: 0.7;
    
    /* Glassmorphism переменные */
    --glass-bg: rgba(20, 20, 20, 0.6);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    --blur-amount: 12px;
}

/* Основные стили */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* Шапка приложения Glassmorphism */
.glass-panel-header {
    background: rgba(20, 20, 20, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 16px 20px;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 600px;
    margin: 0 auto;
}

.header-content h1 {
    font-size: 24px;
    font-weight: 700;
    background: linear-gradient(45deg, #fff, #aaa);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 0;
}

.header-controls {
    display: flex;
    gap: 12px;
}

.glass-btn, .icon-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    border-radius: 12px;
    padding: 8px 12px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 600;
}

.glass-btn:hover, .icon-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: scale(1.05);
}

/* Нижнее меню */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 8px 20px 24px;
    z-index: 1000;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.5);
}

.nav-item {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.3s;
    padding: 8px 12px;
    border-radius: 12px;
}

.nav-item.active {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.nav-item svg {
    width: 24px;
    height: 24px;
}


.container {
    max-width: 100%;
    margin: 0 auto;
    padding: 12px;
    padding-bottom: 100px;
}

/* Заголовок и статистика */
.app-header {
    margin-bottom: 24px;
    text-align: center;
}

.app-header h1 {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 16px;
    letter-spacing: -0.5px;
}

.stats-container {
    display: flex;
    justify-content: space-around;
    gap: 12px;
    padding: 16px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-value {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 4px;
}

.stat-paid {
    color: var(--status-paid);
}

.stat-unpaid {
    color: var(--status-unpaid);
}

.stat-label {
    font-size: 12px;
    opacity: 0.7;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Поиск */
.search-container {
    margin-bottom: 20px;
}

#searchInput {
    width: 100%;
    padding: 12px 16px;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 16px;
    outline: none;
    transition: border-color var(--transition-speed);
}

#searchInput:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.1);
}

#searchInput::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

/* Календарь */
.calendar-container {
    margin-bottom: 24px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 12px;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.calendar-title {
    font-size: 18px;
    font-weight: 600;
    letter-spacing: -0.3px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.back-to-month-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    font-size: 16px;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    cursor: pointer;
    transition: all var(--transition-speed);
    display: flex;
    align-items: center;
    justify-content: center;
}

.back-to-month-btn:active {
    background-color: var(--text-primary);
    color: var(--bg-primary);
}

.calendar-nav {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    font-size: 18px;
    width: 36px;
    height: 36px;
    border-radius: 6px;
    cursor: pointer;
    transition: all var(--transition-speed);
    display: flex;
    align-items: center;
    justify-content: center;
}

.calendar-nav:active {
    background-color: var(--text-primary);
    color: var(--bg-primary);
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
    padding: 4px 0;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    text-align: center;
    font-weight: 500;
}

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

/* День календаря */
.calendar-day {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
}

.calendar-day:hover:not(.empty):not(.other-month) {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.05);
}

.calendar-day.today {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    font-weight: 600;
}

.calendar-day.selected {
    background: rgba(255, 255, 255, 0.9);
    color: black;
    font-weight: 700;
    box-shadow: 0 0 16px rgba(255, 255, 255, 0.4);
}

.calendar-day.other-month {
    opacity: 0.3;
    cursor: default;
}

/* Контент дня с точками */
.calendar-day-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.day-number {
    font-size: 14px;
}

.day-dots {
    display: flex;
    gap: 3px;
    height: 6px;
}

.dot {
    width: 4px;
    height: 4px;
    background-color: var(--status-paid);
    border-radius: 50%;
    opacity: 0.9;
}

.dot.unpaid {
    background-color: var(--status-unpaid);
}

.dot.waiting {
    background-color: rgba(255, 255, 255, 0.5);
}

.calendar-day.today {
    border: 1px solid var(--border-color);
    font-weight: 700;
}

.calendar-day.selected {
    background-color: var(--text-primary);
    color: var(--bg-primary);
}

.calendar-day.has-events::after {
    content: '';
    position: absolute;
    bottom: 4px;
    width: 4px;
    height: 4px;
    border-radius: 50%;
}

.calendar-day.has-paid::after {
    background-color: var(--status-paid);
}

.calendar-day.has-unpaid::after {
    background-color: var(--status-unpaid);
}

.calendar-day.has-completed::after {
    background-color: var(--status-completed);
}

.calendar-day.has-mixed::after {
    background: linear-gradient(90deg, var(--status-paid) 50%, var(--status-unpaid) 50%);
}

/* Фильтры */
.filters-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
}

.filter-btn {
    flex: 1;
    min-width: calc(50% - 4px);
    padding: 10px 12px;
    background-color: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-speed);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.filter-btn:active,
.filter-btn.active {
    background-color: var(--text-primary);
    color: var(--bg-primary);
}

.filter-count {
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 12px;
    background-color: rgba(255, 255, 255, 0.2);
    font-weight: 700;
}

.filter-btn.active .filter-count {
    background-color: rgba(0, 0, 0, 0.2);
}

/* Список событий */
.events-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: rgba(20, 20, 20, 0.4);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 24px -1px rgba(0, 0, 0, 0.2);
    border-radius: 16px;
    padding: 12px;
}

.loading {
    text-align: center;
    padding: 40px;
    opacity: 0.6;
}

.no-events {
    text-align: center;
    padding: 40px;
    opacity: 0.6;
    font-size: 16px;
}

.event-card {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 16px;
    transition: all var(--transition-speed);
    opacity: 1;
    animation: fadeIn var(--transition-speed);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Глобальный стиль Glassmorphism */
.calendar-container, 
.filter-container,
.search-container,
.glass-panel-card {
    background: rgba(20, 20, 20, 0.4);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 24px -1px rgba(0, 0, 0, 0.2);
    border-radius: 16px;
}

.filter-container {
    padding: 12px;
}

.filter-buttons {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.search-container {
    margin-bottom: 12px;
}

/* Обновление карточек */
.event-card {
    background: rgba(30, 30, 30, 0.4) !important; /* Перекрываем старый стиль */
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 14px;
    margin-bottom: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.event-card:hover {
    background: rgba(40, 40, 40, 0.6) !important;
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-4px) scale(1.01);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
}

/* Фильтры в стиле Glass */
.filter-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(4px);
    border-radius: 12px;
    padding: 10px 20px;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
    transition: all 0.3s ease;
}

.filter-btn:hover, .filter-btn.active {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 0 12px rgba(255, 255, 255, 0.1);
}

/* Поиск */
#searchInput {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 12px 16px;
    color: white;
}

#searchInput:focus {
    background: rgba(0, 0, 0, 0.4);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.05);
}

/* Календарь */
.calendar-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 16px;
    margin-bottom: 16px;
}

.calendar-day {
    border-radius: 10px;
    transition: all 0.2s ease;
}

.calendar-day:hover:not(.empty) {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.05);
}

.calendar-day.selected {
    background: rgba(255, 255, 255, 0.9);
    color: black;
    box-shadow: 0 0 16px rgba(255, 255, 255, 0.3);
}

/* Типографика карточки */
.event-title {
    font-size: 16px;
    font-weight: 600;
    margin: 8px 0;
    letter-spacing: 0.2px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.event-date {
    font-size: 13px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
}

.event-time {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 2px;
}

/* Просроченная карточка - обновление */
.event-card-overdue {
    background: linear-gradient(135deg, rgba(255, 50, 50, 0.1) 0%, rgba(255, 0, 0, 0.05) 100%) !important;
    border: 1px solid rgba(255, 100, 100, 0.3) !important;
    box-shadow: 0 4px 12px rgba(255, 0, 0, 0.1);
}

.event-card-overdue:hover {
    border-color: rgba(255, 100, 100, 0.5) !important;
    box-shadow: 0 8px 24px rgba(255, 0, 0, 0.2);
}

.event-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.event-datetime {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.event-date {
    font-size: 16px;
    font-weight: 600;
}

.event-time {
    font-size: 14px;
    opacity: 0.7;
}

.event-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.event-status.paid {
    color: var(--status-paid);
}

.event-status.unpaid {
    color: var(--status-unpaid);
}

.event-status.waiting {
    color: rgba(255, 255, 255, 0.7);
}

.urgent-badge {
    background-color: rgba(255, 0, 0, 0.2);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
}

.event-status::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: currentColor;
}

.event-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
    letter-spacing: -0.3px;
}

.event-card.cancelled .event-title {
    text-decoration: line-through;
}

.event-description {
    font-size: 14px;
    opacity: 0.8;
    margin-bottom: 12px;
    line-height: 1.5;
}

.event-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.event-amount {
    font-size: 16px;
    font-weight: 700;
}

.event-badge {
    font-size: 11px;
    padding: 4px 8px;
    border-radius: 4px;
    border: 1px solid currentColor;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.7;
}

/* Кнопка "Сегодня" */
.today-btn {
    position: fixed;
    bottom: 24px;
    right: 24px;
    padding: 12px 24px;
    background-color: var(--text-primary);
    color: var(--bg-primary);
    border: none;
    border-radius: 24px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.3);
    transition: all var(--transition-speed);
    z-index: 100;
}

.today-btn:active {
    transform: scale(0.95);
}

.today-btn.hidden {
    opacity: 0;
    pointer-events: none;
}

/* Адаптивность */
@media (max-width: 360px) {
    #app {
        padding: 12px;
    }

    .app-header h1 {
        font-size: 24px;
    }

    .stat-value {
        font-size: 20px;
    }

    .filter-btn {
        font-size: 12px;
        padding: 10px 12px;
    }

    .event-title {
        font-size: 16px;
    }
}

@media (min-width: 481px) {
    #app {
        padding: 24px;
    }
}

/* Анимации для свайпов */
.swipe-left {
    animation: swipeLeft 0.3s ease-out;
}

.swipe-right {
    animation: swipeRight 0.3s ease-out;
}

@keyframes swipeLeft {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes swipeRight {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Скроллбар */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.7);
}

/* Pull to refresh индикатор */
.pull-indicator {
    text-align: center;
    padding: 20px;
    opacity: 0;
    transform: translateY(-100%);
    transition: all 0.3s;
}

.pull-indicator.active {
    opacity: 1;
    transform: translateY(0);
}

/* Кнопка добавления события */
.add-event-btn {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    width: 56px;
    height: 56px;
    background-color: var(--text-primary);
    color: var(--bg-primary);
    border: none;
    border-radius: 50%;
    font-size: 32px;
    font-weight: 300;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.3);
    transition: all var(--transition-speed);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.add-event-btn:active {
    transform: translateX(-50%) scale(0.9);
}

/* Кнопки действий в карточках */
.event-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.event-action-btn {
    flex: 1;
    padding: 8px 12px;
    background-color: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    cursor: pointer;
    transition: all var(--transition-speed);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.event-action-btn:active {
    background-color: var(--text-primary);
    color: var(--bg-primary);
}

.event-action-btn.delete {
    border-color: var(--status-unpaid);
    color: var(--status-unpaid);
}

.event-action-btn.delete:active {
    background-color: var(--status-unpaid);
    color: var(--bg-primary);
}

/* Основные переменные для Glassmorphism */
:root {
    --glass-bg: rgba(20, 20, 20, 0.6);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-highlight: rgba(255, 255, 255, 0.05);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    --blur-amount: 12px;
    --neon-accent: rgba(255, 255, 255, 0.8);
}

/* Модальное окно с эффектом стекла */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
    justify-content: center;
    align-items: center;
}

.modal.visible {
    display: flex;
    opacity: 1;
}

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.glass-panel {
    position: relative;
    background: var(--glass-bg);
    backdrop-filter: blur(var(--blur-amount));
    -webkit-backdrop-filter: blur(var(--blur-amount));
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    border-radius: 20px;
    padding: 24px;
    width: 90%;
    max-width: 450px;
    transform: scale(0.95);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal.visible .glass-panel {
    transform: scale(1);
}

/* Заголовки в модальном окне */
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--glass-border);
}

.modal-header h2 {
    font-size: 20px;
    font-weight: 600;
    color: var(--neon-accent);
    margin: 0;
    letter-spacing: 0.5px;
}

/* Стеклянные инпуты */
.glass-input {
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 12px 16px;
    color: white;
    font-size: 15px;
    transition: all 0.3s ease;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.glass-input:focus {
    background: rgba(0, 0, 0, 0.5);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.1);
    outline: none;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* Кастомный чекбокс */
.checkbox-wrapper {
    display: flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
    padding: 8px 0;
}

.checkbox-wrapper input {
    display: none;
}

.checkbox-custom {
    width: 20px;
    height: 20px;
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid var(--glass-border);
    border-radius: 6px;
    margin-right: 10px;
    position: relative;
    transition: all 0.2s ease;
}

.checkbox-wrapper input:checked + .checkbox-custom {
    background: var(--status-paid);
    border-color: var(--status-paid);
    box-shadow: 0 0 10px rgba(0, 255, 0, 0.3);
}

.checkbox-wrapper input:checked + .checkbox-custom::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: black;
    font-size: 12px;
    font-weight: 900;
}

.checkbox-text {
    color: white;
    font-size: 14px;
}

/* Кнопки Glass */
.modal-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 32px;
    padding-top: 20px;
    border-top: 1px solid var(--glass-border);
}

.modal-actions-right {
    display: flex;
    gap: 12px;
    margin-left: auto;
}

.btn-primary-glass {
    background: white;
    color: black;
    border: none;
    padding: 10px 24px;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.2);
}

.btn-primary-glass:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(255, 255, 255, 0.3);
}

.btn-secondary-glass {
    background: transparent;
    color: rgba(255, 255, 255, 0.7);
    border: 1px solid var(--glass-border);
    padding: 10px 20px;
    border-radius: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary-glass:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.btn-danger-glass {
    background: rgba(255, 0, 0, 0.1);
    color: #ff4d4d;
    border: 1px solid rgba(255, 0, 0, 0.2);
    padding: 10px 20px;
    border-radius: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-danger-glass:hover {
    background: rgba(255, 0, 0, 0.2);
    border-color: rgba(255, 0, 0, 0.4);
    transform: translateY(-1px);
}

/* Улучшенные карточки событий с Glass эффектом */
.event-card {
    background: rgba(30, 30, 30, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.event-card:hover {
    background: rgba(40, 40, 40, 0.7);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-4px) scale(1.01);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2);
}

/* Красивый скроллбар для модалки если нужно */
.modal-content {
    max-height: 90vh;
    overflow-y: auto;
}

.modal-content::-webkit-scrollbar {
    width: 4px;
}

.modal-content::-webkit-scrollbar-track {
    background: transparent;
}

.modal-content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
}

/* Дубликаты модального окна удалены, используются новые стили Glassmorphism выше */

.modal-header h2 {
    font-size: 20px;
    font-weight: 600;
    margin: 0;
}

.modal-close {
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 32px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-form {
    padding: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 16px;
    font-family: inherit;
    outline: none;
    transition: border-color var(--transition-speed);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.form-row {
    display: flex;
    gap: 12px;
}

.form-row .form-group {
    flex: 1;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    margin-top: 28px;
}

.checkbox-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.btn-primary,
.btn-secondary {
    flex: 1;
    padding: 14px 20px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-speed);
}

.btn-primary {
    background-color: var(--text-primary);
    color: var(--bg-primary);
}

.btn-primary:active {
    transform: scale(0.98);
}

.btn-secondary {
    background-color: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.btn-danger {
    background-color: transparent;
    border: 1px solid var(--status-unpaid);
    color: var(--status-unpaid);
    padding: 12px 24px;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-speed);
}

.btn-danger:hover {
    background-color: var(--status-unpaid);
    color: white;
}

/* Временная шкала */
.timeline-container {
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 24px;
    opacity: 0;
    transform: translateY(-20px);
    transition: all var(--transition-speed);
}

.timeline-container.visible {
    opacity: 1;
    transform: translateY(0);
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.timeline-header h3 {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
}

.timeline-close {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.timeline-close:active {
    background-color: var(--text-primary);
    color: var(--bg-primary);
}

.timeline-scale {
    margin-top: 16px;
}

.timeline-hours {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.timeline-hour {
    display: flex;
    align-items: center;
    min-height: 32px;
    border-radius: 4px;
    overflow: hidden;
    transition: all var(--transition-speed);
}

.timeline-hour.free {
    background-color: rgba(255, 255, 255, 0.05);
}

.timeline-hour.booked-paid {
    background-color: rgba(0, 255, 0, 0.1);
    border-left: 3px solid var(--status-paid);
}

.timeline-hour.booked-unpaid {
    background-color: rgba(255, 0, 0, 0.1);
    border-left: 3px solid var(--status-unpaid);
}

.timeline-hour.booked-mixed {
    background: linear-gradient(90deg, rgba(0, 255, 0, 0.1) 50%, rgba(255, 0, 0, 0.1) 50%);
    border-left: 3px solid var(--status-paid);
}

.timeline-hour-label {
    min-width: 60px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    opacity: 0.7;
}

.timeline-hour-bar {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 4px;
}

.timeline-event {
    padding: 6px 8px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    font-size: 11px;
    border-left: 2px solid;
    cursor: pointer;
    transition: all var(--transition-speed);
}

.timeline-event.paid {
    border-left-color: var(--status-paid);
}

.timeline-event.unpaid {
    border-left-color: var(--status-unpaid);
}

.timeline-event:hover {
    background-color: rgba(255, 255, 255, 0.3);
    transform: translateX(2px);
}

/* Компактный вид события в продолжении */
.timeline-event-compact {
    padding: 4px 8px;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    font-size: 10px;
    border-left: 2px solid;
    cursor: pointer;
    transition: all var(--transition-speed);
    opacity: 0.8;
}

.timeline-event-compact.paid {
    border-left-color: var(--status-paid);
}

.timeline-event-compact.unpaid {
    border-left-color: var(--status-unpaid);
}

.timeline-event-compact:hover {
    background-color: rgba(255, 255, 255, 0.2);
    opacity: 1;
    transform: translateX(2px);
}

.timeline-event-compact .timeline-event-title {
    opacity: 1;
    font-style: italic;
}

/* Интерактивность для пустых часов */
.timeline-hour-bar {
    min-height: 32px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.timeline-hour.free .timeline-hour-bar:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.timeline-hour.free .timeline-hour-bar:hover::after {
    content: '+ Добавить событие';
    display: block;
    font-size: 10px;
    opacity: 0.6;
    padding: 4px;
    text-align: center;
}

.timeline-event-time {
    font-weight: 700;
    margin-right: 6px;
}

.timeline-event-title {
    opacity: 0.9;
}

.timeline-legend {
    display: flex;
    gap: 16px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
}

.legend-color {
    width: 16px;
    height: 16px;
    border-radius: 3px;
}

.legend-color.free {
    background-color: rgba(255, 255, 255, 0.05);
}

.legend-color.booked-paid {
    background-color: rgba(0, 255, 0, 0.3);
    border: 2px solid var(--status-paid);
}

.legend-color.booked-unpaid {
    background-color: rgba(255, 0, 0, 0.3);
    border: 2px solid var(--status-unpaid);
}

/* Дневной вид календаря */
.calendar-day-view {
    display: none;
    animation: fadeInUp 0.4s ease-out;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.calendar-day-view .timeline-scale {
    margin-top: 0;
}

.calendar-day-view .timeline-hours {
    max-height: 500px;
    overflow-y: auto;
    padding-right: 8px;
}

/* Плавные переходы для всех интерактивных элементов */
.calendar-day,
.filter-btn,
.event-card,
.event-action-btn,
.calendar-nav,
.modal,
.timeline-hour {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Hover эффекты */
.timeline-hour:not(.free):hover {
    transform: translateX(4px);
    box-shadow: -4px 0 8px rgba(255, 255, 255, 0.1);
}

/* Улучшенные переходы для модального окна */
.modal-content {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal:not(.visible) .modal-content {
    transform: translateY(50px) scale(0.95);
}

.modal.visible .modal-content {
    transform: translateY(0) scale(1);
}

/* Плавное появление карточек событий */
.event-card {
    animation: slideInLeft 0.3s ease-out;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Улучшение скроллбара для дневного вида */
.calendar-day-view .timeline-hours::-webkit-scrollbar {
    width: 6px;
}

.calendar-day-view .timeline-hours::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

.calendar-day-view .timeline-hours::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

.calendar-day-view .timeline-hours::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.8);
}

/* Кнопка показа прошедших событий */
.show-past-btn {
    width: 100%;
    padding: 14px 20px;
    margin-top: 16px;
    background-color: transparent;
    color: var(--text-primary);
    border: 1px dashed var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-speed);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    opacity: 0.7;
}

.show-past-btn:hover {
    opacity: 1;
    border-style: solid;
    background-color: rgba(255, 255, 255, 0.05);
}

.show-past-btn .btn-icon {
    font-size: 12px;
    transition: transform var(--transition-speed);
}

.past-events-container {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px dashed rgba(255, 255, 255, 0.2);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.past-events-container .event-card {
    opacity: 0.6;
}

.past-events-container .event-card:hover {
    opacity: 1;
}
