/* Enhanced Authentication Styles - Modern & Professional */

/* Reset and base styles */
* {
    box-sizing: border-box;
}

/* Enhanced body and container styles */
.account-body {
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
}

.account-body.accountbg {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    background-size: 100% 100%;
    position: relative;
}

.account-body.accountbg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("../images/auth-bg.png") center/cover;
    opacity: 0.1;
    z-index: 1;
}



/* Container enhancements */
.container {
    position: relative;
    z-index: 2;
}

/* Enhanced card design */
.auth-card-enhanced {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid #e9ecef;
    overflow: hidden;
    transition: all 0.3s ease;
    animation: slideInUp 0.6s ease-out;
    max-width: 520px;
    margin: 0 auto;
}

.auth-card-enhanced:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

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

/* Enhanced header section */
.auth-header-enhanced {
    background: #ffffff;
    padding: 2rem 2rem 1.5rem 2rem;
    text-align: center;
    position: relative;
    border-bottom: 1px solid #f1f3f4;
}



.auth-logo-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-bottom: 1rem;
    min-height: 80px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    padding: 15px;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

.auth-logo {
    height: 60px;
    width: auto;
    max-width: 120px;
    object-fit: contain;
    transition: all 0.3s ease;
    display: block;
    opacity: 1;
    visibility: visible;
}



/* Ensure logo images are always visible */
.auth-header-enhanced img {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    height: 60px;
    width: auto;
    max-width: 120px;
    object-fit: contain;
}

.auth-title {
    color: #2c3e50;
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
    letter-spacing: 0.5px;
}

/* Tab navigation enhancements */
.nav-tabs-enhanced {
    border: none;
    background: transparent;
    justify-content: center;
    margin-bottom: 0;
    padding: 0 2rem;
}

.nav-tabs-enhanced .nav-link {
    border: none;
    background: transparent;
    color: #6c757d;
    padding: 1rem 1.5rem;
    font-weight: 600;
    position: relative;
    transition: all 0.3s ease;
    border-radius: 0;
}

.nav-tabs-enhanced .nav-link:hover {
    color: #495057;
    background: transparent;
    border: none;
}

.nav-tabs-enhanced .nav-link.active {
    color: #495057;
    background: transparent;
    border: none;
    font-weight: 600;
}

.nav-tabs-enhanced .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: #495057;
    transition: width 0.3s ease;
    border-radius: 1px;
}

.nav-tabs-enhanced .nav-link.active::after {
    width: 60%;
}

/* Form container */
.auth-form-container {
    padding: 1.5rem 2rem 2rem 2rem;
}

/* Enhanced form groups */
.form-group-enhanced {
    margin-bottom: 1.25rem;
    position: relative;
}

.form-row-enhanced {
    display: flex;
    flex-wrap: wrap;
    margin-left: -0.75rem;
    margin-right: -0.75rem;
}

.form-row-enhanced > .col-md-6,
.form-row-enhanced > .col-md-5,
.form-row-enhanced > .col-md-7 {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
}

.form-label-enhanced {
    display: block;
    margin-bottom: 0.5rem;
    color: #374151;
    font-weight: 500;
    font-size: 0.875rem;
    transition: color 0.3s ease;
}

/* Enhanced input styles */
.form-control-enhanced {
    width: 100%;
    padding: 0.875rem 1rem;
    font-size: 0.95rem;
    line-height: 1.5;
    color: #495057;
    background-color: #ffffff;
    background-clip: padding-box;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}

.form-control-enhanced:focus {
    color: #495057;
    background-color: #ffffff;
    border-color: #6b7280;
    outline: 0;
    box-shadow: 0 0 0 3px rgba(107, 114, 128, 0.1);
}

.form-control-enhanced:hover {
    border-color: #ced4da;
}

/* Input group enhancements */
.input-group-enhanced {
    position: relative;
    display: flex;
    align-items: stretch;
}

.input-group-enhanced .form-control-enhanced {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    z-index: 2;
}

.input-group-append-enhanced {
    display: flex;
}

.input-group-text-enhanced {
    display: flex;
    align-items: center;
    padding: 0.875rem 1rem;
    font-size: 0.95rem;
    font-weight: 400;
    line-height: 1.5;
    color: #6c757d;
    text-align: center;
    white-space: nowrap;
    background-color: #f8f9fa;
    border: 2px solid #e9ecef;
    border-left: 0;
    border-radius: 0 12px 12px 0;
    transition: all 0.3s ease;
    cursor: pointer;
}

.input-group-enhanced:focus-within .input-group-text-enhanced {
    border-color: #667eea;
    background-color: #ffffff;
}

.input-group-text-enhanced:hover {
    background-color: #e9ecef;
}

/* Select enhancements */
.select-enhanced {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 16px 12px;
    padding-right: 3rem;
}

/* Button enhancements */
.btn-enhanced {
    padding: 0.875rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 12px;
    border: none;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
}

.btn-primary-enhanced {
    background: #374151;
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(55, 65, 81, 0.2);
}

.btn-primary-enhanced:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(55, 65, 81, 0.25);
    background: #4b5563;
}

.btn-primary-enhanced:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.3);
}

.btn-enhanced::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-enhanced:hover::before {
    left: 100%;
}

/* White text color on hover for sign in button */
.btn-primary-enhanced:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(55, 65, 81, 0.25);
    background: #4b5563;
    color: #ffffff !important;
}

/* Link enhancements */
.auth-link {
    color: #6b7280;
    text-decoration: none;
    font-weight: 500;
    position: relative;
    transition: color 0.3s ease;
}

.auth-link:hover {
    color: #374151;
    text-decoration: none;
}

.auth-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: #374151;
    transition: width 0.3s ease;
}

.auth-link:hover::after {
    width: 100%;
}

/* Footer enhancements */
.auth-footer {
    background: #f8f9fa;
    padding: 1rem 2rem;
    text-align: center;
    color: #6c757d;
    font-size: 0.875rem;
    border-top: 1px solid #e9ecef;
}

/* Loading state */
.btn-loading {
    position: relative;
    color: transparent;
}

.btn-loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Alert enhancements */
.alert-enhanced {
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
    border: none;
    border-radius: 12px;
    font-weight: 500;
    animation: slideInDown 0.3s ease;
}

.alert-success-enhanced {
    color: #0f5132;
    background-color: #d1e7dd;
    border-left: 4px solid #198754;
}

.alert-error-enhanced {
    color: #842029;
    background-color: #f8d7da;
    border-left: 4px solid #dc3545;
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Form section styling */
.form-section-title h6 {
    border-bottom: 1px solid #f1f3f4;
    padding-bottom: 0.5rem;
}

/* Enhanced responsive grid for forms */
.form-row-enhanced {
    margin-bottom: 0;
}

.form-row-enhanced [class*="col-"] {
    flex: 0 0 auto;
    width: 100%;
}

.form-row-enhanced .col-md-6 {
    width: 50%;
}

.form-row-enhanced .col-md-5 {
    width: 41.666667%;
}

.form-row-enhanced .col-md-7 {
    width: 58.333333%;
}

/* Input group enhanced positioning */
.input-group-enhanced .input-group-text-enhanced:focus-within {
    border-color: #6b7280;
    background-color: #ffffff;
}

/* Improved footer styling */
.auth-footer {
    background: #f8f9fa;
    padding: 1rem 2rem;
    text-align: center;
    color: #6c757d;
    font-size: 0.875rem;
    border-top: 1px solid #f1f3f4;
}

/* Password strength improvements */
.password-strength-bar {
    height: 100%;
    width: 0;
    border-radius: 1px;
    transition: all 0.3s ease;
}

.strength-weak { 
    background: #ef4444; 
    width: 25%; 
}

.strength-fair { 
    background: #f97316; 
    width: 50%; 
}

.strength-good { 
    background: #eab308; 
    width: 75%; 
}

.strength-strong { 
    background: #22c55e; 
    width: 100%; 
}

/* Responsive design */
@media (max-width: 768px) {
    .auth-card-enhanced {
        margin: 1rem;
        border-radius: 8px;
        max-width: none;
    }
    
    .auth-header-enhanced {
        padding: 1.5rem 1.5rem 1rem 1.5rem;
    }
    
    .auth-title {
        font-size: 1.25rem;
    }
    
    .auth-form-container {
        padding: 1rem 1.5rem 1.5rem 1.5rem;
    }
    
    .auth-logo,
    .auth-header-enhanced img {
        height: 50px !important;
        max-width: 100px !important;
        padding: 6px !important;
    }
    
    .auth-logo-container {
        min-height: 60px;
        gap: 10px;
        padding: 10px;
    }
    
    .form-control-enhanced {
        padding: 0.75rem;
        font-size: 0.9rem;
    }
    
    .btn-enhanced {
        padding: 0.75rem 1.5rem;
        font-size: 0.95rem;
    }
    
    .form-row-enhanced {
        margin-left: 0;
        margin-right: 0;
    }
    
    .form-row-enhanced > [class*="col-"] {
        padding-left: 0;
        padding-right: 0;
        width: 100%;
        margin-bottom: 1rem;
    }
    
    .form-row-enhanced > [class*="col-"]:last-child {
        margin-bottom: 0;
    }
}

@media (max-width: 576px) {
    .account-body {
        padding: 10px;
    }
    
    .auth-card-enhanced {
        margin: 0.5rem;
        border-radius: 12px;
    }
    
    .auth-header-enhanced {
        padding: 1rem;
    }
    
    .auth-form-container {
        padding: 1rem;
    }
    
    .form-group-enhanced {
        margin-bottom: 1rem;
    }
    
    .nav-tabs-enhanced {
        padding: 0 1rem;
    }
    
    .nav-tabs-enhanced .nav-link {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }
}

/* Form row enhancements for better mobile layout */
@media (max-width: 576px) {
    .row.mobile-stack > [class*="col-"] {
        width: 100%;
        margin-bottom: 1rem;
    }
    
    .row.mobile-stack > [class*="col-"]:last-child {
        margin-bottom: 0;
    }
}

/* Password strength indicator */
.password-strength {
    height: 3px;
    background: #e9ecef;
    border-radius: 2px;
    margin-top: 0.5rem;
    overflow: hidden;
}

.password-strength-bar {
    height: 100%;
    width: 0;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.strength-weak { 
    background: #dc3545; 
    width: 25%; 
}

.strength-fair { 
    background: #fd7e14; 
    width: 50%; 
}

.strength-good { 
    background: #ffc107; 
    width: 75%; 
}

.strength-strong { 
    background: #198754; 
    width: 100%; 
}

/* Floating labels effect */
.floating-label {
    position: relative;
}

.floating-label .form-control-enhanced:focus ~ .form-label-enhanced,
.floating-label .form-control-enhanced:not(:placeholder-shown) ~ .form-label-enhanced {
    transform: translateY(-1.5rem) scale(0.8);
    color: #667eea;
}

.floating-label .form-label-enhanced {
    position: absolute;
    top: 0.875rem;
    left: 1rem;
    transform-origin: left;
    transition: all 0.3s ease;
    pointer-events: none;
    z-index: 2;
    background: #ffffff;
    padding: 0 0.25rem;
}

/* Custom scrollbar for better UX */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: #9ca3af;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #6b7280;
}

/* Logo debugging and override styles */
.auth-header-enhanced .logo,
.auth-header-enhanced .logo-admin,
.auth-header-enhanced a {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 15px !important;
}

/* Force logo visibility - override any conflicting styles */
img[src*="LogoNational"],
img[src*="LogoDistrict"],
img[alt*="logo"],
img[alt*="Logo"] {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    height: auto !important;
    width: auto !important;
    max-width: 120px !important;
    object-fit: contain !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    background: transparent !important;
}

/* Additional logo container styling */
.logo-admin {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 15px !important;
    text-decoration: none !important;
}