/* Map Section */
.map-section {
    padding: 0;
    height: calc(100vh - 64px);
    position: relative;
}

.map-container {
    display: flex;
    height: 100%;
}

.map {
    flex: 1;
    height: 100%;
    z-index: 1;
}

.map-controls {
    width: 340px;
    max-width: 100%;
    background: white;
    box-shadow: -2px 0 16px rgba(0, 0, 0, 0.08);
    padding: 1.25rem;
    overflow-y: auto;
    z-index: 2;
    border-left: 1px solid var(--border-color);
}

.map-filters h3,
.map-stations-list h3 {
    margin-bottom: 0.75rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--secondary-color);
}

.filter-group {
    margin-bottom: 0.75rem;
}

.filter-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.9375rem;
    color: var(--text-color);
}

.filter-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

.stations-list {
    margin-top: 1rem;
}

.station-item {
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    margin-bottom: 0.5rem;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.station-item:hover {
    border-color: var(--primary-color);
    background: var(--bg-light);
}

.station-item h4 {
    color: var(--secondary-color);
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.station-item p {
    font-size: 0.875rem;
    color: var(--text-light);
    margin-bottom: 0.25rem;
}

.station-status {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-top: 0.5rem;
}

.station-status.available {
    background: #dcfce7;
    color: #166534;
}

.station-status.occupied {
    background: #fef9c3;
    color: #854d0e;
}

.station-status.maintenance {
    background: #fee2e2;
    color: #991b1b;
}

.station-status.offline {
    background: #f1f5f9;
    color: var(--text-light);
}

/* Map click cursor */
.map.crosshair-cursor {
    cursor: crosshair !important;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(4px);
    animation: fadeIn 0.2s ease;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal-content {
    background: white;
    padding: 1.75rem;
    border-radius: 14px;
    max-width: 560px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    animation: slideUp 0.25s ease;
}

/* Широкое модальное окно для статистики станции */
#stationStatsModal .modal-content {
    max-width: 1200px;
    width: 95%;
    padding: 2rem;
}

.modal-close {
    position: absolute;
    right: 1rem;
    top: 1rem;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    color: var(--text-light);
    border: none;
    background: none;
    border-radius: var(--radius-sm);
    transition: color 0.2s ease, background 0.2s ease;
}

.modal-close:hover {
    color: var(--text-color);
    background: var(--bg-light);
}

.modal-close:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.modal-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Form Elements */
.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.375rem;
    color: var(--secondary-color);
    font-weight: 500;
    font-size: 0.9375rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.625rem 0.75rem;
    min-height: 44px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 1rem;
    color: var(--text-color);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-focus);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-muted);
}

.form-group textarea {
    min-height: 100px;
    resize: vertical;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.9375rem;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

.form-hint {
    display: block;
    margin-top: 0.375rem;
    font-size: 0.875rem;
    color: var(--text-light);
    line-height: 1.4;
}

/* Login Section */
.login-section {
    min-height: calc(100vh - 64px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}

.login-card {
    background: white;
    padding: 2.5rem;
    border-radius: 14px;
    box-shadow: var(--shadow-lg);
    max-width: 400px;
    width: 100%;
    border: 1px solid var(--border-color);
}

.login-card h2 {
    text-align: center;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--secondary-color);
}

.login-hint {
    margin-top: 1.25rem;
    padding: 1rem;
    background: var(--bg-light);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    color: var(--text-light);
    text-align: center;
    line-height: 1.5;
}

/* Responsive Map */
@media (max-width: 768px) {
    .map-container {
        flex-direction: column;
    }

    .map {
        height: 60vh;
    }

    .map-controls {
        width: 100%;
        height: 40vh;
    }
}
