/**
 * Authentication Pages Custom Styles
 * Brand Colors:
 * - Dark Navy Blue Background: #1e3a5f, #2d4a6b
 * - White Text: #ffffff
 * - Vibrant Yellow: #FFD700, #FFEB3B
 */

:root {
    /* Brand Colors */
    --brand-navy-dark: #1e3a5f;
    --brand-navy: #2d4a6b;
    --brand-navy-light: #3a5a7a;
    --brand-white: #ffffff;
    --brand-yellow: #FFD700;
    --brand-yellow-bright: #FFEB3B;
    --brand-yellow-dark: #FFC700;
    --brand-gradient: linear-gradient(135deg, #FFD700 0%, #FFEB3B 100%);
    --brand-gradient-hover: linear-gradient(135deg, #FFC700 0%, #FFD700 100%);
    
    /* Text Colors */
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.85);
    --text-muted: rgba(255, 255, 255, 0.65);
    
    /* Form Colors */
    --input-bg: rgba(255, 255, 255, 0.08);
    --input-border: rgba(255, 255, 255, 0.15);
    --input-border-focus: #FFD700;
    --input-text: #ffffff;
    --input-placeholder: rgba(255, 255, 255, 0.5);
    
    /* Link Colors - Using vibrant yellow */
    --link-color: #FFD700;
    --link-hover: #FFEB3B;
    
    /* Alert Colors - Improved contrast for readability */
    --alert-success-bg: rgba(40, 167, 69, 0.2);
    --alert-success-border: #28a745;
    --alert-success-text: #ffffff;
    --alert-danger-bg: rgba(220, 53, 69, 0.2);
    --alert-danger-border: #dc3545;
    --alert-danger-text: #ffffff;
    --alert-info-bg: rgba(13, 202, 240, 0.2);
    --alert-info-border: #0dcaf0;
    --alert-info-text: #ffffff;
}

/* Body Background - Dark Navy Blue */
body.app-blank {
    background: var(--brand-navy-dark);
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(255, 215, 0, 0.06) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 235, 59, 0.06) 0%, transparent 50%);
    background-attachment: fixed;
    min-height: 100vh;
    color: var(--text-primary);
}

/* Main Container */
.d-flex.flex-column.flex-lg-row.flex-column-fluid {
    background: transparent;
}

/* Form Wrapper - Dark Navy Blue */
.w-lg-500px {
    background: rgba(45, 74, 107, 0.75);
    backdrop-filter: blur(8px);
    border-radius: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
    padding: 2.5rem !important;
}

/* Logo - Subtle effect */
.text-center.mb-11 img {
    filter: drop-shadow(0 2px 4px rgba(255, 215, 0, 0.2));
}

/* Headings */
h1 {
    color: var(--text-primary) !important;
    font-weight: 700;
}

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

p.text-gray-600,
p.fw-semibold {
    color: var(--text-secondary) !important;
}

/* Form Controls */
.form-control {
    background-color: var(--input-bg) !important;
    border: 1px solid var(--input-border) !important;
    color: var(--input-text) !important;
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
}

.form-control::placeholder {
    color: var(--input-placeholder) !important;
    opacity: 1;
}

.form-control:focus {
    background-color: rgba(255, 255, 255, 0.15) !important;
    border-color: var(--input-border-focus) !important;
    box-shadow: 0 0 0 0.2rem rgba(255, 215, 0, 0.25) !important;
    color: var(--input-text) !important;
    outline: none;
}

.form-control.is-invalid {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25) !important;
}

.form-control.is-invalid:focus {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25) !important;
}

/* Form Labels */
.form-label {
    color: var(--text-primary) !important;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.form-label.required::after {
    content: " *";
    color: var(--brand-yellow);
    font-weight: bold;
}

/* Buttons - Simplified */
.btn-primary {
    background: var(--brand-gradient) !important;
    border: none !important;
    color: var(--brand-navy-dark) !important;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.25);
}

.btn-primary:hover {
    background: var(--brand-gradient-hover) !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.35);
    color: var(--brand-navy-dark) !important;
}

.btn-primary:focus {
    background: var(--brand-gradient-hover) !important;
    box-shadow: 0 0 0 0.2rem rgba(255, 215, 0, 0.4) !important;
    color: var(--brand-navy-dark) !important;
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 1px 6px rgba(255, 215, 0, 0.25);
}

.btn-lg {
    padding: 0.875rem 2rem;
    font-size: 1.1rem;
}

/* Links - Fixed blue text on blue background issue */
a.link-primary,
.link-primary {
    color: var(--link-color) !important;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
}

a.link-primary:hover,
.link-primary:hover {
    color: var(--link-hover) !important;
    text-decoration: underline;
}

/* Override any blue link colors */
a {
    color: var(--link-color) !important;
}

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

/* Ensure no blue text appears */
.text-primary,
.text-info,
.text-blue,
.text-link {
    color: var(--text-primary) !important;
}

/* Override Bootstrap default link colors */
a:not(.link-primary):not(.btn) {
    color: var(--link-color) !important;
}

a:not(.link-primary):not(.btn):hover {
    color: var(--brand-yellow-bright) !important;
}

/* Ensure all text in forms is visible - consolidated rules */
.form-check-label {
    color: var(--text-secondary) !important;
}

/* Alerts - Fixed for proper contrast */
.alert {
    border: none;
    border-radius: 0.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(8px);
    animation: slideInDown 0.3s ease-out;
    padding: 1rem 1.25rem;
}

.alert-success {
    background: var(--alert-success-bg) !important;
    border-left: 3px solid var(--alert-success-border) !important;
    color: var(--alert-success-text) !important;
}

.alert-success h5,
.alert-success span,
.alert-success ul,
.alert-success li {
    color: var(--alert-success-text) !important;
}

.alert-danger {
    background: var(--alert-danger-bg) !important;
    border-left: 3px solid var(--alert-danger-border) !important;
    color: var(--alert-danger-text) !important;
}

.alert-danger h5,
.alert-danger span,
.alert-danger ul,
.alert-danger li {
    color: var(--alert-danger-text) !important;
}

.alert-info {
    background: var(--alert-info-bg) !important;
    border-left: 3px solid var(--alert-info-border) !important;
    color: var(--alert-info-text) !important;
}

.alert-info h5,
.alert-info span,
.alert-info ul,
.alert-info li {
    color: var(--alert-info-text) !important;
}

.alert .btn-close {
    filter: brightness(0) invert(1);
    opacity: 0.9;
}

.alert .btn-close:hover {
    opacity: 1;
}

/* Invalid Feedback - Improved visibility */
.invalid-feedback {
    display: block !important;
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: #ffcccc !important;
    font-weight: 500;
}

.invalid-feedback i {
    color: #ffcccc !important;
}

/* Help Text */
.fv-help-block {
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-muted) !important;
}

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

/* Checkbox */
.form-check-input {
    background-color: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 0.25rem;
}

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

.form-check-input:focus {
    border-color: var(--input-border-focus);
    box-shadow: 0 0 0 0.2rem rgba(255, 215, 0, 0.25);
}

.form-check-label {
    color: var(--text-secondary);
    cursor: pointer;
}

/* Animations */
@keyframes slideInDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .w-lg-500px {
        width: 100% !important;
        max-width: 500px;
        margin: 1rem;
        padding: 1.5rem !important;
    }
    
    .p-10 {
        padding: 1.5rem !important;
    }
    
    h1 {
        font-size: 1.75rem;
    }
}

/* Focus States */
.form-control:focus,
.btn-primary:focus,
.link-primary:focus {
    outline: none;
}

/* Readonly Input */
.form-control[readonly] {
    background-color: rgba(255, 255, 255, 0.05) !important;
    cursor: not-allowed;
    opacity: 0.7;
}

/* Icon Colors - Ensure visibility */
.ki-outline {
    filter: brightness(0) invert(1);
    opacity: 0.9;
}

.alert-success .ki-outline {
    filter: brightness(0) invert(1);
    opacity: 1;
}

.alert-danger .ki-outline {
    filter: brightness(0) invert(1);
    opacity: 1;
}

.alert-info .ki-outline {
    filter: brightness(0) invert(1);
    opacity: 1;
}

/* Loading Indicator */
.btn-primary .indicator-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

