:root {
    --primary: #27aae1;
    --secondary: #FE7501;
    --accent: #006d77;
    --success: #28a745;
    --danger: #dc3545;
    --text: #333;
    --background: #eef1f4;
    --surface: #fbfcfd;
    --nav-bg: #fbfcfd;
    --border-radius: 8px;
    --card-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    
    --dvs-gradient: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: var(--primary);
    min-height: 100vh;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    position: relative;
    overflow-x: hidden;
}

/* Animated background elements */
body::before {
    content: '';
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: float 20s ease-in-out infinite;
    z-index: 1;
    pointer-events: none;;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(180deg); }
}

.text-primary {
    color: var(--primary) !important;
}

.container {
    position: relative;
    z-index: 2;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-wrapper {
    display: flex;
    height: 120vh;
    position: relative;
}

/* Left Side - Login Form */
.login-section {
    flex: 1;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    position: relative;
}

.login-section::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 100 100"><circle cx="20" cy="20" r="1" fill="%23ddd" opacity="0.5"/><circle cx="80" cy="40" r="1" fill="%23ddd" opacity="0.3"/><circle cx="40" cy="80" r="1" fill="%23ddd" opacity="0.4"/></svg>');
    animation: float 20s ease-in-out infinite;
    pointer-events: none;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.login-container {
    max-width: fit-content;
    width: 100%;
    margin: 20px auto;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    border: none;
    padding: 40px;
    border-radius: 24px;
    box-shadow: 
        0 20px 40px rgba(39, 170, 225, 0.2),
        0 10px 20px rgba(39, 170, 225, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    position: relative;
    overflow: hidden;
    animation: slideUp 0.8s ease-out;
}

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

.login-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--secondary);
    border-radius: 24px 24px 0 0;
}

.logo {
    width: min(240px, 80%);
    height: auto;
    margin-bottom: 30px;
    border-radius: 10px;
    box-shadow: 0 8px 16px rgba(39, 170, 225, 0.3);
    transition: transform 0.3s ease;
    object-fit: contain;
}

.logo:hover {
    transform: scale(1.05) rotate(5deg);
}

.login-title {
    color: var(--primary);
    font-weight: 700;
    font-size: 2rem;
    margin-bottom: 10px;
    text-shadow: 0 2px 4px rgba(39, 170, 225, 0.1);
}

.login-subtitle {
    color: #6c757d;
    font-size: 1rem;
    margin-bottom: 30px;
}

.form-floating {
    margin-bottom: 20px;
    position: relative;
}

.form-floating > .form-control {
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 20px 50px 8px 16px;
    height: auto;
    background: rgba(255, 255, 255, 0.9);
    transition: all 0.3s ease;
    font-size: 16px;
}

.form-floating > .form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.2rem rgba(39, 170, 225, 0.25);
    background: rgba(255, 255, 255, 1);
}

.form-floating > label {
    color: #6c757d;
    font-weight: 500;
    padding: 16px;
}

/* Input icon styling */
.input-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary);
    font-size: 1.1rem;
    z-index: 5;
    pointer-events: none;
}

/* Toggle password icon */
.toggle-password {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary);
    font-size: 1.1rem;
    cursor: pointer;
    z-index: 5;
    transition: color 0.3s ease;
}

.toggle-password:hover {
    color: var(--accent);
}

.btn-login {
    background: var(--primary);
    border: none;
    border-radius: 12px;
    padding: 16px;
    font-weight: 600;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    color: white;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(39, 170, 225, 0.4);
    background: var(--primary);
}

.btn-login:active {
    transform: translateY(0);
}

.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;
}

.btn-login:hover::before {
    left: 100%;
}

.alert {
    border-radius: 12px;
    border: none;
    backdrop-filter: blur(10px);
    animation: shake 0.5s ease-in-out;
    margin-bottom: 20px;
}

.alert-danger {
    background: rgba(220, 53, 69, 0.1);
    color: #721c24;
    border-left: 4px solid var(--danger);
}

.alert-success {
    background: rgba(40, 167, 69, 0.1);
    color: #155724;
    border-left: 4px solid var(--success);
}

.alert-info {
    background: rgba(39, 170, 225, 0.1);
    color: #004085;
    border-left: 4px solid var(--primary);
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.form-check-input:checked {
    background-color: var(--primary);
    border-color: var(--primary);
}

.password-strength {
    font-weight: bold;
    margin-top: 5px;
    margin-bottom: 10px;
    min-height: 20px;
}

.form-text {
    font-size: 0.875rem;
    color: #6c757d;
    display: block;
    margin-top: 5px;
}

.data-visualization {
    position: fixed;
    top: 20px;
    right: 20px;
    color: rgba(255, 255, 255, 0.2);
    font-size: 5rem;
    animation: pulse 3s ease-in-out infinite;
    z-index: 1;
}

@keyframes pulse {
    0%, 100% { opacity: 0.2; transform: scale(1); }
    50% { opacity: 0.1; transform: scale(1.1); }
}

/* Responsive design */
@media (max-width: 576px) {
    .login-container {
        margin: 10px;
        padding: 30px 25px;
    }
    
    .login-title {
        font-size: 1.75rem;
    }
    
    .login-subtitle {
        font-size: 0.9rem;
    }
    
    .logo {
        width: min(180px, 70%);
        height: auto;
    }

    .input-icon, .toggle-password {
        font-size: 1rem;
        right: 12px;
    }
    
    .data-visualization {
        font-size: 3rem;
        top: 10px;
        right: 10px;
    }
}

/* Loading animation */
.btn-login.loading {
    pointer-events: none;
    opacity: 0.8;
}

.spinner-border-sm {
    width: 1rem;
    height: 1rem;
    border-width: 0.15em;
}

/* Form validation styles */
.form-control.is-invalid {
    border-color: var(--danger);
}

.form-control.is-valid {
    border-color: var(--success);
}

/* Link styles */
a {
    transition: color 0.3s ease;
}

a:hover {
    color: var(--accent) !important;
}

.small {
    font-size: 0.875rem;
}


/* Right Side - Promotional Content */
.promo-section {
    flex: 1;
    background: var(--cema-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    position: relative;
    overflow: hidden;
}

.promo-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
 
}

@keyframes rotateFloat {
    0% { transform: rotate(0deg) translateY(0px); }
    50% { transform: rotate(180deg) translateY(-20px); }
    100% { transform: rotate(360deg) translateY(0px); }
}

.promo-content {
    max-width: 400px;
    color: white;
    z-index: 2;
    position: relative;
    animation: slideInRight 0.8s ease-out 0.3s both;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.promo-title {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
    color: var(--text);
}

.promo-subtitle {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    line-height: 1.5;
}

.feature-list {
    list-style: none;
    padding: 0;
    margin-bottom: 2rem;
}

.feature-list li {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    font-size: 1rem;
    animation: fadeInUp 0.6s ease-out both;
}

.feature-list li:nth-child(1) { animation-delay: 0.5s; }
.feature-list li:nth-child(2) { animation-delay: 0.7s; }
.feature-list li:nth-child(3) { animation-delay: 0.9s; }
.feature-list li:nth-child(4) { animation-delay: 1.1s; }

/* County select  */
.county-select-wrapper {
    position: relative;
    margin-bottom: 1rem;
}
.county-select-wrapper label {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    color: #6c757d;
    padding: 16px;
    margin-bottom: 0.3rem;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}
.county-select-wrapper select {
    width: 100%;
    padding: 16px;
    border: 1.5px solid #dee2e6;
    border-radius: 8px;
    font-weight: 500;
    color: #6c757d;
    background-color: var(--surface);
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.county-select-wrapper select:focus {
    border-color: #27aae1;
    box-shadow: 0 0 0 3px rgba(39,170,225,0.15);
    outline: none;
    color: #6c757d;
    font-weight: 500;
}
.county-select-wrapper select.is-invalid {
    border-color: #dc3545;
}
.county-select-wrapper .select-icon {
    position: absolute;
    left: 0.85rem;
    bottom: 0.85rem;
    color: #6c757d;
    pointer-events: none;
    font-size: 0.9rem;
}
.county-select-wrapper .select-arrow {
    position: absolute;
    right: 0.85rem;
    bottom: 0.9rem;
    color: var(--primary);
    pointer-events: none;
    font-size: 0.75rem;
}

/* Pending workflow notice below the form */
.approval-notice {
    background: linear-gradient(135deg, #fff3cd, #fef9e7);
    border: 1px solid #ffc107;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-size: 0.82rem;
    color: #856404;
    margin-bottom: 1rem;
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
}
.approval-notice i { margin-top: 1px; flex-shrink: 0; }

/* Flash alert for 'warning' category */
.alert-warning {
    background: #fff3cd;
    border-color: #ffc107;
    color: #856404;
}
/* Pending approval staging page */
.pending-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background:var(--primary);
    padding: 2rem;
}

.pending-card {
    background: var(--surface);
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.25);
    padding: 3rem 2.5rem;
    max-width: 520px;
    width: 100%;
    text-align: center;
}

.pending-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #fff3cd, #ffeaa7);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2.2rem;
    color: #e67e22;
    box-shadow: 0 4px 15px rgba(230,126,34,0.25);
}

.pending-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.5rem;
}

.pending-subtitle {
    font-size: 0.95rem;
    color: var(--text);
    margin-bottom: 1.8rem;
    line-height: 1.6;
}

.step-list {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 1.2rem 1.5rem;
    text-align: left;
    margin-bottom: 1.8rem;
}

.step-item {
    display: flex;
    align-items: flex-start;
    gap: 0.8rem;
    margin-bottom: 0.9rem;
    font-size: 0.9rem;
    color: #495057;
}

.step-item:last-child {
    margin-bottom: 0;
}

.step-num {
    background: #27aae1;
    color: #fff;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    min-width: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    margin-top: 1px;
}

.contact-note {
    font-size: 0.90rem;
    color: var(--accent);
    margin-bottom: 1.5rem;
}

.contact-note a {
    color: #27aae1;
    text-decoration: none;
}

.btn-back {
    background: var(--secondary);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 0.65rem 2rem;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    transition: opacity 0.2s;
}

.btn-back:hover {
    opacity: 0.9;
    color: var(--background);
}

.dvs-logo {
    width: 100px;
    margin-bottom: 1rem;
}

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

.feature-list li i {
    color: var(--cema-success);
    margin-right: 0.75rem;
    font-size: 1.1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .login-wrapper {
        flex-direction: column;
    }
    
    .promo-section {
        display: none;
    }
    
    .login-section {
        padding: 1rem;
    }
    
}

@media (max-width: 992px) {
    .promo-title {
        font-size: 1.8rem;
    }
    
    .promo-subtitle {
        font-size: 1rem;
    }
}