/**
 * Authentication Pages Custom Styles
 * Brand Colors:
 * - Primary Blue: #48a4f0
 * - White Text: #ffffff
 * - Gradient Direction: 90deg
 */

:root {
    /* Brand Colors */
    --brand-primary: #48a4f0;
    --brand-primary-dark: #3a8dd8;
    --brand-primary-light: #5fb0f5;
    --brand-primary-lighter: #7bbef8;
    --brand-white: #ffffff;
    --brand-gradient: linear-gradient(90deg, #48a4f0 0%, #5fb0f5 100%);
    --brand-gradient-hover: linear-gradient(90deg, #3a8dd8 0%, #48a4f0 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: #48a4f0;
    --input-text: #ffffff;
    --input-placeholder: rgba(255, 255, 255, 0.5);
    
    /* Link Colors - Using primary blue */
    --link-color: #48a4f0;
    --link-hover: #5fb0f5;
    
    /* 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 - Blue Gradient */
body.app-blank {
    background: linear-gradient(90deg, #1e3a5f 0%, #2d4a6b 50%, #1e3a5f 100%);
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(72, 164, 240, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(95, 176, 245, 0.08) 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 - Blue Tinted Glass */
.w-lg-500px {
    background: rgba(30, 58, 95, 0.85);
    backdrop-filter: blur(8px);
    border-radius: 0.75rem;
    border: 1px solid rgba(72, 164, 240, 0.2);
    box-shadow: 0 4px 20px rgba(72, 164, 240, 0.15);
    padding: 2.5rem !important;
}

/* Logo - Subtle effect */
.text-center.mb-11 img {
    filter: drop-shadow(0 2px 4px rgba(72, 164, 240, 0.3));
}

/* 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(72, 164, 240, 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-primary);
    font-weight: bold;
}

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

.btn-primary:hover {
    background: var(--brand-gradient-hover) !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(72, 164, 240, 0.35);
    color: var(--brand-white) !important;
}

.btn-primary:focus {
    background: var(--brand-gradient-hover) !important;
    box-shadow: 0 0 0 0.2rem rgba(72, 164, 240, 0.4) !important;
    color: var(--brand-white) !important;
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 1px 6px rgba(72, 164, 240, 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-primary-light) !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-primary);
    border-color: var(--brand-primary);
}

.form-check-input:focus {
    border-color: var(--input-border-focus);
    box-shadow: 0 0 0 0.2rem rgba(72, 164, 240, 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;
}

