﻿:root {
    --primary-color: #1e3a8a;
    --secondary-color: #3b82f6;
    --accent-color: #f59e0b;
    --success-color: #10b981;
    --light-bg: #f8fafc;
    --dark-text: #1e293b;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow-x: hidden;
}

    body::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><defs><radialGradient id="a"><stop offset="0" stop-color="%23ffffff" stop-opacity="0.1"/><stop offset="1" stop-color="%23ffffff" stop-opacity="0"/></radialGradient></defs><circle cx="200" cy="200" r="180" fill="url(%23a)"/><circle cx="800" cy="300" r="220" fill="url(%23a)"/><circle cx="400" cy="700" r="160" fill="url(%23a)"/></svg>') no-repeat center center;
        background-size: cover;
        opacity: 0.1;
    }

.login-container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 450px;
    margin: 0 auto;
}

.login-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    padding: 3rem 2.5rem;
    transition: all 0.3s ease;
    animation: slideUp 0.6s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
}

.logo-section {
    text-align: center;
    margin-bottom: 2rem;
}

.logo-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    box-shadow: 0 10px 30px rgba(30, 58, 138, 0.3);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
    }
}

.logo-icon i {
    font-size: 2.5rem;
    color: white;
}

.municipality-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.subtitle {
    color: #64748b;
    font-size: 0.95rem;
    margin-bottom: 2rem;
}

.form-floating {
    margin-bottom: 1.2rem;
}

.form-floating > .form-control {
        border: 2px solid #e2e8f0;
        border-radius: 12px;
        padding: 1rem 1rem;
        font-size: 1rem;
        transition: all 0.3s ease;
        background: rgba(255, 255, 255, 0.9);
    }

.form-floating > .form-control:focus {
            border-color: var(--secondary-color);
            box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
            background: white;
        }

.form-floating > label {
        color: #64748b;
        font-weight: 500;
    }

.input-group {
    margin-bottom: 1.5rem;
}

.input-group-text {
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid #e2e8f0;
    border-right: none;
    border-radius: 12px 0 0 12px;
    color: #64748b;
}

.password-toggle {
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid #e2e8f0;
    border-left: none;
    border-radius: 0 12px 12px 0;
    cursor: pointer;
    transition: all 0.3s ease;
}

.password-toggle:hover {
        background: #f1f5f9;
        color: var(--secondary-color);
}

.remember-forgot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.form-check-input:checked {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
}

.form-check-label {
    font-size: 0.9rem;
    color: #64748b;
}

.forgot-link {
    color: var(--secondary-color);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.3s ease;
}

.forgot-link:hover {
        color: var(--primary-color);
    }

.btn-login {
    width: 100%;
    padding: 1rem;
    font-size: 1.1rem;
    font-weight: 600;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border: none;
    border-radius: 12px;
    color: white;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-login::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 ease;
    }

.btn-login:hover {
        transform: translateY(-2px);
        box-shadow: 0 10px 30px rgba(30, 58, 138, 0.3);
    }

.btn-login:hover::before {
            left: 100%;
        }

.btn-login:active {
        transform: translateY(0);
    }

.loading {
    display: none;
}

.loading .spinner-border {
        width: 1.2rem;
        height: 1.2rem;
        margin-right: 0.5rem;
    }

.divider {
    position: relative;
    margin: 2rem 0;
    text-align: center;
}

.divider::before {
        content: '';
        position: absolute;
        top: 50%;
        left: 0;
        right: 0;
        height: 1px;
        background: #e2e8f0;
    }

.divider span {
        background: rgba(255, 255, 255, 0.95);
        padding: 0 1rem;
        color: #64748b;
        font-size: 0.9rem;
    }

.register-link {
    text-align: center;
    margin-top: 2rem;
}

.register-link a {
        color: var(--secondary-color);
        text-decoration: none;
        font-weight: 600;
        transition: color 0.3s ease;
    }

.register-link a:hover {
            color: var(--primary-color);
        }

.footer-text {
    text-align: center;
    margin-top: 2rem;
    color: #64748b;
    font-size: 0.85rem;
}

.alert {
    border: none;
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    display: none;
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
}

.alert-danger {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

@media (max-width: 768px) {
    .login-card {
        margin: 1rem;
        padding: 2rem 1.5rem;
    }

    .municipality-name {
        font-size: 1.3rem;
    }
}


.btn-register {
    width: 100%;
    padding: 1rem;
    font-size: 1.1rem;
    font-weight: 600;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border: none;
    border-radius: 12px;
    color: white;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-register::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 ease;
    }

.btn-register:hover {
        transform: translateY(-2px);
        box-shadow: 0 10px 30px rgba(30, 58, 138, 0.3);
    }

.btn-register:hover::before {
            left: 100%;
        }

.btn-register:active {
        transform: translateY(0);
    }

.custom-file-upload .upload-area {
    border: 2px dashed #0d6efd;
    border-radius: 10px;
    padding: 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: background-color 0.3s ease;
    background-color: #f8f9fa;
}

.custom-file-upload .upload-area:hover {
        background-color: #e9ecef;
        border-color: #6c757d;
    }

.upload-icon {
    font-size: 2rem;
    color: #0d6efd;
    margin-bottom: 0.5rem;
    display: block;
}

#uploadText {
    font-weight: 500;
    color: #495057;
}
.upload-area.dragover {
    border: 2px dashed #007bff;
    background-color: #f0f8ff;
    color: #007bff;
}

/* Enhanced Form Validation Styles */
.form-control.is-valid {
    border-color: var(--success-color);
    background-image: none;
}

.form-control.is-invalid {
    border-color: #ef4444;
    background-image: none;
}

.invalid-feedback {
    color: #ef4444;
    font-size: 0.8rem;
    margin-top: 0.5rem;
}

.valid-feedback {
    color: var(--success-color);
    font-size: 0.8rem;
    margin-top: 0.5rem;
}

/* Enhanced Checkbox Styles */
.form-check {
    margin-bottom: 1rem;
}

.form-check-input {
    width: 1.2em;
    height: 1.2em;
    margin-top: 0.1em;
}

.form-check-label {
    font-size: 0.9rem;
    color: #64748b;
    line-height: 1.4;
    padding-left: 0.5rem;
}

.form-check-label a {
        color: var(--secondary-color);
        text-decoration: none;
        font-weight: 500;
    }

.form-check-label a:hover {
            color: var(--primary-color);
            text-decoration: underline;
        }

