/* Стили для системы бронирования парковочных мест */
/* Версия: 1.0 */

/* Сброс стилей и базовые настройки */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Цветовая палитра */
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --secondary-color: #64748b;
    --success-color: #10b981;
    --success-hover: #059669;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --info-color: #3b82f6;
    
    /* Нейтральные цвета */
    --white: #ffffff;
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;
    
    /* Тени */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    
    /* Радиусы */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    
    /* Переходы */
    --transition-fast: 0.15s ease-in-out;
    --transition-normal: 0.3s ease-in-out;
    --transition-slow: 0.5s ease-in-out;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--gray-800);
    background-color: var(--gray-50);
    font-size: 16px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Заголовок */
.header {
    margin-bottom: 2rem;
}

.header-image {
    position: relative;
    height: 400px;
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    margin-bottom: 2rem;
}

.header-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.header-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.8), rgba(59, 130, 246, 0.6));
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: var(--white);
}

.header-overlay h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.admin-link {
    margin-top: 1rem;
}

.header-overlay p {
    font-size: 1.125rem;
    opacity: 0.9;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Информационная панель */
.info-panel {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.info-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: var(--gray-50);
    border-radius: var(--radius-md);
    transition: var(--transition-fast);
}

.info-item:hover {
    background: var(--gray-100);
    transform: translateY(-2px);
}

.info-item i {
    font-size: 1.25rem;
    color: var(--primary-color);
}

.info-item span {
    font-weight: 500;
    color: var(--gray-700);
}

/* Стили для страницы входа */
.login-section {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
    margin: 2rem 0;
}

.login-container {
    width: 100%;
    max-width: 400px;
}

.login-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 2rem;
    border: 1px solid var(--gray-200);
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-header h2 {
    color: var(--gray-800);
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.login-header p {
    color: var(--gray-600);
    font-size: 0.875rem;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.login-form .form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.login-form label {
    font-weight: 500;
    color: var(--gray-700);
    font-size: 0.875rem;
}

.login-form input {
    padding: 0.75rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-md);
    font-size: 1rem;
    transition: var(--transition-fast);
}

.login-form input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgb(37 99 235 / 0.1);
}

.login-form small {
    color: var(--gray-500);
    font-size: 0.75rem;
}

.full-width {
    width: 100%;
}

.login-footer {
    margin-top: 2rem;
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid var(--gray-200);
}

.login-footer p {
    margin: 0.5rem 0;
    color: var(--gray-600);
    font-size: 0.875rem;
}

.login-footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.login-footer a:hover {
    text-decoration: underline;
}

/* Стили для информационной секции */
.info-section {
    background: var(--gray-50);
    border-radius: var(--radius-lg);
    padding: 2rem;
    margin: 2rem 0;
    border: 1px solid var(--gray-200);
}

.info-section h3 {
    color: var(--gray-800);
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    text-align: center;
}

.info-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.step {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.step-number {
    background: var(--primary-color);
    color: var(--white);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
    flex-shrink: 0;
}

.step-content h4 {
    color: var(--gray-800);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.step-content p {
    color: var(--gray-600);
    font-size: 0.875rem;
    line-height: 1.5;
}

/* Стили для данных входа */
.login-credentials {
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    margin: 1.5rem 0;
}

.login-credentials h4 {
    color: var(--gray-800);
    margin-bottom: 1rem;
    font-size: 1.125rem;
    font-weight: 600;
}

.credential-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--gray-200);
}

.credential-item:last-child {
    border-bottom: none;
}

.credential-item label {
    font-weight: 500;
    color: var(--gray-700);
    min-width: 80px;
}

.credential-value {
    font-family: 'Courier New', monospace;
    font-weight: 600;
    color: var(--primary-color);
    background: var(--white);
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--gray-300);
    font-size: 0.875rem;
}

.warning-message {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--warning-color);
    color: var(--white);
    padding: 0.75rem;
    border-radius: var(--radius-md);
    margin-top: 1rem;
    font-size: 0.875rem;
    font-weight: 500;
}

.warning-message i {
    font-size: 1rem;
}

/* Стили для личного кабинета */
.main-header {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    color: var(--white);
    padding: 2rem;
    border-radius: var(--radius-lg);
    margin-bottom: 2rem;
    box-shadow: var(--shadow-lg);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.main-header h1 {
    font-size: 2rem;
    font-weight: 700;
    margin: 0;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.user-profile {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 2rem;
    margin-bottom: 2rem;
    border: 1px solid var(--gray-200);
}

.user-profile h2 {
    color: var(--gray-800);
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    font-weight: 600;
}

.profile-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.profile-info .info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: var(--gray-50);
    border-radius: var(--radius-md);
    border: 1px solid var(--gray-200);
}

.profile-info label {
    font-weight: 500;
    color: var(--gray-700);
}

.profile-info span {
    font-weight: 600;
    color: var(--gray-800);
}

.bookings-section, .history-section {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 2rem;
    margin-bottom: 2rem;
    border: 1px solid var(--gray-200);
}

.bookings-section h2, .history-section h2 {
    color: var(--gray-800);
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    font-weight: 600;
}

.bookings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.booking-card {
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    transition: var(--transition-normal);
}

.booking-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.booking-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.booking-header h3 {
    color: var(--gray-800);
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
}

.status {
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status.paid {
    background: var(--success-color);
    color: var(--white);
}

.status.pending {
    background: var(--warning-color);
    color: var(--white);
}

.status.failed {
    background: var(--danger-color);
    color: var(--white);
}

.status.refunded {
    background: var(--gray-500);
    color: var(--white);
}

.booking-details {
    margin-bottom: 1.5rem;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    color: var(--gray-700);
}

.detail-item i {
    width: 16px;
    color: var(--primary-color);
}

.booking-actions {
    display: flex;
    gap: 0.5rem;
}

.no-data {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--gray-500);
}

.no-data i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--gray-400);
}

.no-data p {
    font-size: 1.125rem;
    margin-bottom: 1.5rem;
}

.history-table {
    overflow-x: auto;
}

.history-table table {
    width: 100%;
    border-collapse: collapse;
    background: var(--white);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.history-table th,
.history-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--gray-200);
}

.history-table th {
    background: var(--gray-50);
    font-weight: 600;
    color: var(--gray-800);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.history-table td {
    color: var(--gray-700);
}

.history-table tr:hover {
    background: var(--gray-50);
}

.navigation {
    text-align: center;
    margin-top: 2rem;
}

/* Стили для модального окна ворот */
.gate-info {
    text-align: center;
    padding: 2rem;
}

.gate-icon {
    font-size: 4rem;
    color: var(--success-color);
    margin-bottom: 1rem;
}

.gate-info p {
    font-size: 1.125rem;
    color: var(--gray-700);
    margin-bottom: 1rem;
}

.countdown {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    background: var(--gray-100);
    border-radius: 50%;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    border: 3px solid var(--primary-color);
}

/* Парковочные места */
.parking-grid {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 2rem;
    margin-bottom: 2rem;
}

.parking-grid h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--gray-800);
    text-align: center;
}

.spots-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.parking-spot {
    aspect-ratio: 1;
    border-radius: var(--radius-lg);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: var(--transition-normal);
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.parking-spot.available {
    background: linear-gradient(135deg, var(--success-color), #34d399);
    color: var(--white);
    box-shadow: var(--shadow-md);
}

.parking-spot.available:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: var(--shadow-xl);
    border-color: var(--success-hover);
}

.parking-spot.occupied {
    background: linear-gradient(135deg, var(--gray-400), var(--gray-500));
    color: var(--white);
    cursor: not-allowed;
    opacity: 0.7;
}

.parking-spot.occupied:hover {
    transform: none;
}

.spot-number {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.spot-status {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.875rem;
    font-weight: 500;
}

.spot-status i {
    font-size: 1rem;
}

/* Легенда */
.legend {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 1rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--gray-600);
}

.legend-color {
    width: 20px;
    height: 20px;
    border-radius: var(--radius-sm);
    border: 2px solid var(--gray-300);
}

.legend-color.available {
    background: var(--success-color);
}

.legend-color.occupied {
    background: var(--gray-400);
}

/* Модальные окна */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.show {
    display: flex;
    opacity: 1;
}

.modal-content {
    background: var(--white);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.9) translateY(-20px);
    transition: transform 0.3s ease;
}

.modal.show .modal-content {
    transform: scale(1) translateY(0);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--gray-200);
}

.modal-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--gray-800);
}

.close {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--gray-400);
    cursor: pointer;
    transition: var(--transition-fast);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
}

.close:hover {
    color: var(--gray-600);
    background: var(--gray-100);
}

.modal-body {
    padding: 1.5rem;
}

/* Информация о бронировании */
.booking-info {
    background: var(--gray-50);
    border-radius: var(--radius-md);
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.price-info, .time-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    color: var(--gray-600);
}

.price-info:last-child, .time-info:last-child {
    margin-bottom: 0;
}

.price-info i, .time-info i {
    color: var(--primary-color);
}

/* Форма бронирования */
.booking-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 500;
    color: var(--gray-700);
    font-size: 0.875rem;
}

.form-group input {
    padding: 0.75rem;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-md);
    font-size: 1rem;
    transition: var(--transition-fast);
    background: var(--white);
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-group input:invalid {
    border-color: var(--danger-color);
}

.form-group input[readonly] {
    background: var(--gray-50);
    color: var(--gray-600);
    cursor: not-allowed;
}

/* Кнопки */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-fast);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-decoration: none;
    min-height: 44px;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-primary {
    background: var(--primary-color);
    color: var(--white);
}

.btn-primary:hover:not(:disabled) {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: var(--gray-200);
    color: var(--gray-700);
}

.btn-secondary:hover:not(:disabled) {
    background: var(--gray-300);
}

.btn-success {
    background: var(--success-color);
    color: var(--white);
}

.btn-success:hover:not(:disabled) {
    background: var(--success-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.form-actions .btn {
    flex: 1;
}

/* Успешное бронирование */
.success-content {
    text-align: center;
}

.success-icon {
    margin-bottom: 1rem;
}

.success-icon i {
    font-size: 4rem;
    color: var(--success-color);
}

.success-message {
    margin-bottom: 2rem;
}

.success-message p {
    margin-bottom: 0.5rem;
    color: var(--gray-700);
}

.success-message strong {
    color: var(--primary-color);
    font-size: 1.125rem;
}

.gate-control {
    margin-top: 1.5rem;
}

/* Уведомления */
.notifications {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 1100;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.notification {
    padding: 1rem 1.5rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    color: var(--white);
    font-weight: 500;
    animation: slideInRight var(--transition-normal);
    max-width: 400px;
    word-wrap: break-word;
}

.notification.success {
    background: var(--success-color);
}

.notification.error {
    background: var(--danger-color);
}

.notification.warning {
    background: var(--warning-color);
}

.notification.info {
    background: var(--info-color);
}

/* Анимации */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Адаптивность */
@media (max-width: 768px) {
    .container {
        padding: 0 0.5rem;
    }
    
    .header-image {
        height: 250px;
    }
    
    .header-overlay h1 {
        font-size: 1.75rem;
    }
    
    .header-overlay p {
        font-size: 0.9rem;
    }
    
    .info-panel {
        grid-template-columns: 1fr;
        padding: 1rem;
    }
    
    .parking-grid {
        padding: 1rem;
    }
    
    .spots-container {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 0.75rem;
    }
    
    .parking-spot {
        min-height: 100px;
    }
    
    .spot-number {
        font-size: 1.25rem;
    }
    
    .spot-status {
        font-size: 0.75rem;
    }
    
    .legend {
        flex-direction: column;
        gap: 0.5rem;
        align-items: center;
    }
    
    .modal-content {
        width: 95%;
        margin: 1rem;
    }
    
    .modal-header, .modal-body {
        padding: 1rem;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .notifications {
        left: 1rem;
        right: 1rem;
    }
    
    .notification {
        max-width: none;
    }
}

@media (max-width: 480px) {
    .header-image {
        height: 200px;
    }
    
    .header-overlay h1 {
        font-size: 1.5rem;
    }
    
    .header-overlay p {
        font-size: 0.875rem;
    }
    
    .admin-link {
        margin-top: 0.5rem;
    }
    
    .admin-link .btn {
        font-size: 0.8rem;
        padding: 0.5rem 1rem;
    }
    
    .spots-container {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
        gap: 0.5rem;
    }
    
    .parking-spot {
        min-height: 80px;
    }
    
    .spot-number {
        font-size: 1rem;
    }
    
    .spot-status {
        font-size: 0.625rem;
    }
    
    .spot-status i {
        font-size: 0.75rem;
    }
}

/* Дополнительные утилиты */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid transparent;
    border-top: 2px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Скрытие элементов */
.hidden {
    display: none !important;
}

/* Фокус для доступности */
.btn:focus,
.parking-spot:focus,
input:focus,
.close:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Высокий контраст для доступности */
@media (prefers-contrast: high) {
    :root {
        --primary-color: #0000ff;
        --success-color: #008000;
        --danger-color: #ff0000;
    }
}

/* Уменьшение анимаций для пользователей с предпочтением */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Специальные стили для кнопки "ОТКРЫТЬ ВОРОТА" */
.gate-button {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: var(--white);
    border: none;
    border-radius: var(--radius-lg);
    padding: 1.5rem 2rem;
    font-size: 1.25rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    min-height: 80px;
    min-width: 200px;
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
}

.gate-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.gate-button:hover::before {
    left: 100%;
}

.gate-button:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(16, 185, 129, 0.4);
}

.gate-button:active {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.3);
}

.gate-button:disabled {
    background: var(--gray-400);
    color: var(--gray-600);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.gate-button:disabled::before {
    display: none;
}

.gate-button i {
    font-size: 1.5rem;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

/* Стили для карточки бронирования с кнопкой ворот */
.booking-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 1.5rem;
    border: 1px solid var(--gray-200);
    transition: var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.booking-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--success-color), var(--primary-color));
}

.booking-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.booking-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--gray-200);
}

.booking-header h3 {
    color: var(--gray-800);
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
}

.status {
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status.paid {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.booking-details {
    margin-bottom: 1.5rem;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    padding: 0.5rem;
    background: var(--gray-50);
    border-radius: var(--radius-sm);
}

.detail-item i {
    color: var(--primary-color);
    width: 20px;
    text-align: center;
}

.detail-item span {
    color: var(--gray-700);
    font-weight: 500;
}

.booking-actions {
    display: flex;
    justify-content: center;
    padding-top: 1rem;
    border-top: 1px solid var(--gray-200);
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
    .gate-button {
        padding: 1.25rem 1.5rem;
        font-size: 1.125rem;
        min-height: 70px;
        min-width: 180px;
    }
    
    .gate-button i {
        font-size: 1.25rem;
    }
    
    .booking-card {
        padding: 1rem;
    }
    
    .booking-header h3 {
        font-size: 1.125rem;
    }
}

/* Анимация для модального окна ворот */
.gate-modal {
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.gate-modal .modal-content {
    background: var(--white);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    border: none;
    max-width: 400px;
    margin: 0 auto;
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.gate-info {
    text-align: center;
    padding: 2rem;
}

.gate-icon {
    font-size: 4rem;
    color: var(--success-color);
    margin-bottom: 1rem;
    animation: bounce 1s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

.countdown {
    font-size: 3rem;
    font-weight: 700;
    color: var(--success-color);
    margin-top: 1rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Стили для нового интерфейса бронирования */

/* Шаги бронирования */
.booking-step {
    display: none;
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 2rem;
    margin-bottom: 2rem;
    border: 1px solid var(--gray-200);
    transition: var(--transition-normal);
}

.booking-step.active {
    display: block;
    animation: slideInUp 0.3s ease-out;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.step-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid var(--gray-100);
}

.step-header h2 {
    color: var(--gray-800);
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.step-header h2 i {
    color: var(--primary-color);
    font-size: 1.25rem;
}

.step-header p {
    color: var(--gray-600);
    font-size: 1rem;
    margin: 0;
}

/* Форма выбора дат */
.date-selection-form {
    max-width: 600px;
    margin: 0 auto;
}

.date-form {
    background: var(--gray-50);
    border-radius: var(--radius-lg);
    padding: 2rem;
    border: 1px solid var(--gray-200);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.form-row .form-group {
    margin-bottom: 0;
}

.form-row label {
    display: block;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-row input[type="date"] {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid var(--gray-300);
    border-radius: var(--radius-md);
    font-size: 1rem;
    background: var(--white);
    transition: var(--transition-fast);
}

.form-row input[type="date"]:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-row input[type="date"]:hover {
    border-color: var(--gray-400);
}

/* Загрузка мест */
.spots-loading {
    text-align: center;
    padding: 3rem 2rem;
    background: var(--gray-50);
    border-radius: var(--radius-lg);
    border: 2px dashed var(--gray-300);
}

.loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.loading-spinner i {
    font-size: 2rem;
    color: var(--primary-color);
}

.loading-spinner p {
    color: var(--gray-600);
    font-size: 1rem;
    margin: 0;
}

/* Сообщение об отсутствии мест */
.no-spots-message {
    text-align: center;
    padding: 3rem 2rem;
    background: var(--gray-50);
    border-radius: var(--radius-lg);
    border: 1px solid var(--gray-200);
}

.no-spots-content {
    max-width: 400px;
    margin: 0 auto;
}

.no-spots-content i {
    font-size: 3rem;
    color: var(--gray-400);
    margin-bottom: 1rem;
}

.no-spots-content h3 {
    color: var(--gray-700);
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.no-spots-content p {
    color: var(--gray-600);
    margin-bottom: 1rem;
    line-height: 1.5;
}

/* Кнопка возврата к датам */
.btn-secondary {
    background: var(--gray-200);
    color: var(--gray-700);
    border: 1px solid var(--gray-300);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-fast);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.btn-secondary:hover {
    background: var(--gray-300);
    color: var(--gray-800);
    transform: translateY(-1px);
}

.btn-secondary i {
    font-size: 0.75rem;
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .date-form {
        padding: 1.5rem;
    }
    
    .step-header h2 {
        font-size: 1.25rem;
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .booking-step {
        padding: 1.5rem;
        margin-bottom: 1rem;
    }
    
    .spots-loading,
    .no-spots-message {
        padding: 2rem 1rem;
    }
}

/* Анимации для переходов между шагами */
.booking-step.fade-out {
    opacity: 0;
    transform: translateY(-20px);
    transition: all 0.3s ease-out;
}

.booking-step.fade-in {
    opacity: 1;
    transform: translateY(0);
    transition: all 0.3s ease-out;
}

/* Стили для страницы успешного бронирования */

.success-container {
    max-width: 800px;
    margin: 0 auto;
    background: var(--white);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    border: 1px solid var(--gray-200);
}

.success-header {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: var(--white);
    text-align: center;
    padding: 3rem 2rem;
    position: relative;
    overflow: hidden;
}

.success-header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

.success-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    animation: bounce 1s ease-in-out;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

.success-header h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    position: relative;
    z-index: 1;
}

.success-header p {
    font-size: 1.125rem;
    opacity: 0.9;
    position: relative;
    z-index: 1;
}

/* Детали бронирования */
.booking-details {
    padding: 2rem;
    border-bottom: 1px solid var(--gray-200);
}

.booking-details h3 {
    color: var(--gray-800);
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.booking-details h3 i {
    color: var(--primary-color);
}

.details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: var(--gray-50);
    border-radius: var(--radius-md);
    border: 1px solid var(--gray-200);
    transition: var(--transition-fast);
}

.detail-item:hover {
    background: var(--gray-100);
    transform: translateY(-1px);
}

.detail-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--gray-600);
    font-weight: 500;
}

.detail-label i {
    color: var(--primary-color);
    width: 16px;
}

.detail-value {
    text-align: right;
}

.detail-value strong {
    color: var(--gray-800);
    font-size: 1.125rem;
}

.detail-value .time {
    display: block;
    font-size: 0.875rem;
    color: var(--gray-500);
    margin-top: 0.25rem;
}

.detail-value .price {
    color: var(--success-color);
    font-size: 1.25rem;
}

.detail-value .booking-id {
    color: var(--primary-color);
    font-family: 'Courier New', monospace;
}

/* Данные для авторизации */
.auth-data {
    padding: 2rem;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-bottom: 1px solid var(--gray-200);
}

.auth-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.auth-header h3 {
    color: var(--gray-800);
    font-size: 1.5rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0;
}

.auth-header h3 i {
    color: var(--warning-color);
}

.warning-badge {
    background: var(--warning-color);
    color: var(--white);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.auth-info p {
    color: var(--gray-700);
    margin-bottom: 1.5rem;
    font-size: 1rem;
    line-height: 1.6;
}

.auth-credentials {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 2px solid var(--warning-color);
    box-shadow: var(--shadow-md);
}

.credential-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid var(--gray-200);
}

.credential-item:last-child {
    border-bottom: none;
}

.credential-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--gray-700);
    font-weight: 500;
}

.credential-label i {
    color: var(--primary-color);
    width: 20px;
}

.credential-value {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.credential-value code {
    background: var(--gray-100);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    font-family: 'Courier New', monospace;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--gray-800);
    border: 1px solid var(--gray-300);
    min-width: 150px;
    text-align: center;
}

.copy-btn {
    background: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: var(--radius-md);
    padding: 0.5rem;
    cursor: pointer;
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
}

.copy-btn:hover {
    background: var(--primary-dark);
    transform: scale(1.05);
}

.auth-actions {
    text-align: center;
}

/* Важные уведомления */
.important-notices {
    padding: 2rem;
}

.notice-header h3 {
    color: var(--gray-800);
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.notice-header h3 i {
    color: var(--info-color);
}

.notices-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.notice-item {
    display: flex;
    gap: 1rem;
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    border: 1px solid;
    transition: var(--transition-fast);
}

.notice-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.notice-item.warning {
    background: #fef3c7;
    border-color: #f59e0b;
}

.notice-item.info {
    background: #dbeafe;
    border-color: #3b82f6;
}

.notice-item.success {
    background: #d1fae5;
    border-color: #10b981;
}

.notice-icon {
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    flex-shrink: 0;
}

.notice-item.warning .notice-icon {
    background: #f59e0b;
    color: var(--white);
}

.notice-item.info .notice-icon {
    background: #3b82f6;
    color: var(--white);
}

.notice-item.success .notice-icon {
    background: #10b981;
    color: var(--white);
}

.notice-content h4 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--gray-800);
}

.notice-content p {
    color: var(--gray-700);
    line-height: 1.6;
    margin: 0;
}

/* Кнопки действий */
.action-buttons {
    padding: 2rem;
    background: var(--gray-50);
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-outline {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition-fast);
    cursor: pointer;
}

.btn-outline:hover {
    background: var(--primary-color);
    color: var(--white);
    transform: translateY(-1px);
}

/* Адаптивность */
@media (max-width: 768px) {
    .success-header {
        padding: 2rem 1rem;
    }
    
    .success-header h2 {
        font-size: 1.5rem;
    }
    
    .booking-details,
    .auth-data,
    .important-notices,
    .action-buttons {
        padding: 1.5rem;
    }
    
    .details-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .detail-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .detail-value {
        text-align: left;
    }
    
    .auth-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    
    .credential-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .credential-value {
        width: 100%;
        justify-content: space-between;
    }
    
    .notice-item {
        flex-direction: column;
        text-align: center;
    }
    
    .action-buttons {
        flex-direction: column;
    }
}

/* Стили для печати */
@media print {
    .success-container {
        box-shadow: none;
        border: none;
    }
    
    .action-buttons {
        display: none;
    }
    
    .copy-btn {
        display: none;
    }
    
    .success-header {
        background: #10b981 !important;
        -webkit-print-color-adjust: exact;
        color-adjust: exact;
    }
}

/* Дополнительные стили для улучшения UX */
.btn-outline-light {
    background: transparent;
    color: var(--white);
    border: 2px solid var(--white);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-fast);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.btn-outline-light:hover {
    background: var(--white);
    color: var(--primary-color);
    transform: translateY(-1px);
}

.btn-outline-light i {
    font-size: 0.75rem;
}

/* Улучшенные стили для модального окна */
.modal-content {
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Стили для улучшения доступности */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Улучшенные стили для фокуса */
*:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Стили для загрузки */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    backdrop-filter: blur(4px);
}

.loading-spinner-large {
    width: 60px;
    height: 60px;
    border: 4px solid var(--gray-200);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Стили для улучшения мобильной версии */
@media (max-width: 768px) {
    .btn-outline-light {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }
    
    .modal-content {
        margin: 1rem;
        width: calc(100% - 2rem);
    }
    
    .header-overlay {
        padding: 1rem;
    }
    
    .admin-link {
        margin-top: 0.5rem;
    }
}

/* Стили для очень маленьких экранов */
@media (max-width: 480px) {
    .btn-outline-light {
        font-size: 0.75rem;
        padding: 0.3rem 0.6rem;
    }
    
    .header-overlay h1 {
        font-size: 1.25rem;
    }
    
    .header-overlay p {
        font-size: 0.8rem;
    }
}
