:root {
    --w5obm-primary: var(--bs-primary, #031a54);
    --w5obm-secondary: var(--bs-secondary, #145eff);
    --w5obm-accent-gold: var(--bs-warning, #f0b343);
    --theme-accent-primary: var(--w5obm-primary);
    --theme-accent-secondary: var(--w5obm-secondary);
    --primary-blue: var(--w5obm-primary);
    --secondary-blue: var(--w5obm-secondary);
    --accent-gold: var(--w5obm-accent-gold);
    --login-purple: #6f42c1;
    --dark-gray: #2c3e50;
    --light-gray: #f8f9fa;
    --success-green: #28a745;
    --warning-orange: #ffc107;
    --danger-red: #dc3545;
}

/* Login page specific background */
body {
    background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
    min-height: 100vh;
}

/* Mobile-first container per guidelines */
.page-container {
    max-width: 100%;
    margin: 10px;
    padding: 15px;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Tablet styles per guidelines */
@media (min-width: 768px) {
    .page-container {
        max-width: 90%;
        margin: 20px auto;
        padding: 20px;
    }
}

/* Desktop styles per guidelines */
@media (min-width: 992px) {
    .page-container {
        max-width: 80%;
        margin: 30px auto;
        padding: 30px;
    }
}

/* Large desktop per guidelines */
@media (min-width: 1200px) {
    .page-container {
        max-width: 70%;
    }
}

/* Standards-compliant login card following card design standards */
.login-card {
    background: white;
    border: none;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    max-width: 500px;
    width: 100%;
    margin-bottom: 20px;
}

.login-header {
    background: linear-gradient(135deg, var(--theme-accent-primary) 0%, var(--theme-accent-secondary) 100%);
    color: white;
    padding: 2.5rem 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    border-radius: 12px 12px 0 0 !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.125);
}

.login-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 200%;
    background: rgba(255, 255, 255, 0.1);
    transform: rotate(45deg);
}

.login-header-content {
    position: relative;
    z-index: 2;
}

.login-logo {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--accent-gold), #FFC700);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    box-shadow: 0 10px 20px rgba(255, 215, 0, 0.3);
}

.login-body {
    padding: 2.5rem;
}

/* Form controls per standards - using form-control-lg sizing */
.form-control {
    border-radius: 0.5rem;
    border: 2px solid #e9ecef;
    padding: 0.875rem 1rem;
    font-size: 1.125rem;
    height: calc(2.875rem + 2px);
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: var(--login-purple);
    box-shadow: 0 0 0 0.2rem rgba(111, 66, 193, 0.25);
    outline: none;
}

.form-label {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--dark-gray);
}

/* Button standards - btn-primary btn-lg */
.btn-login {
    background: linear-gradient(135deg, var(--theme-accent-primary) 0%, var(--theme-accent-secondary) 100%);
    color: white;
    border: none;
    border-radius: 0.5rem;
    padding: 0.875rem 1rem;
    font-size: 1.125rem;
    font-weight: 600;
    border-width: 2px !important;
    transition: all 0.3s ease;
    width: 100%;
    cursor: pointer;
}

.btn-login:hover {
    background: linear-gradient(135deg, var(--theme-accent-secondary) 0%, var(--theme-accent-primary) 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    color: white;
}

.btn-login:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Action button styles per standards */
.action-button {
    font-weight: 600;
    border-width: 2px !important;
    transition: all 0.3s ease;
}

.action-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.input-group-text {
    background: var(--light-gray);
    border: 2px solid #e9ecef;
    border-left: none;
    border-radius: 0 0.5rem 0.5rem 0;
    cursor: pointer;
    height: calc(2.875rem + 2px);
    padding: 0.875rem 1rem;
    font-size: 1.125rem;
}

.input-group .form-control {
    border-right: none;
    border-radius: 0.5rem 0 0 0.5rem;
}

/* Alert styling per guidelines */
.alert {
    border: none;
    border-radius: 15px;
    border-left: 5px solid;
    margin-bottom: 1rem;
}

.alert-danger {
    border-left-color: var(--danger-red);
    background-color: rgba(220, 53, 69, 0.1);
    color: var(--danger-red);
}

.alert-warning {
    border-left-color: var(--warning-orange);
    background-color: rgba(255, 193, 7, 0.1);
    color: #856404;
}

.alert-success {
    border-left-color: var(--success-green);
    background-color: rgba(40, 167, 69, 0.1);
    color: var(--success-green);
}

/* Accessibility improvements */
.login-links {
    text-align: center;
    margin-top: 1.5rem;
}

.login-links a {
    color: var(--login-purple);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.login-links a:hover,
.login-links a:focus {
    color: var(--secondary-blue);
    text-decoration: underline;
}

.security-badge {
    background: var(--light-gray);
    border-radius: 15px;
    padding: 1rem;
    text-align: center;
    color: var(--dark-gray);
    font-size: 0.9rem;
}

/* Mobile responsive adjustments per guidelines */
@media (max-width: 768px) {
    .page-container {
        padding: 1rem;
    }

    .login-body {
        padding: 2rem 1.5rem;
    }

    .login-header {
        padding: 2rem 1.5rem;
    }

    .login-logo {
        width: 60px;
        height: 60px;
    }
}

/* Focus indicators for accessibility per standards */
.form-check-input:focus {
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

.btn:focus,
.action-button:focus {
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

.form-control:focus {
    border-color: var(--theme-accent-primary);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
    outline: none;
}