/* Modern Login Form Styles for East Akiba Sacco */
/* Place this file in: web/app-assets/css/modern-login.css */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #193560 0%, #1d4581 50%, #EE3A35 100%) !important;
    background-attachment: fixed;
}

/* Let Bootstrap handle the layout naturally */
section.row.flexbox-container {
    min-height: 100vh;
    margin: 0;
}

.col-12.d-flex.align-items-center.justify-content-center {
    min-height: 100vh;
}

.login-header {
    background: linear-gradient(135deg, #193560, #1d4581);
    padding: 40px 30px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.login-header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
    0%, 100% { transform: translateX(-100%) translateY(-100%); }
    50% { transform: translateX(-50%) translateY(-50%); }
}

.logo-container {
    position: relative;
    z-index: 2;
    margin-bottom: 15px;
    margin-top: 15px;
}

.logo {
    width: 120px;
    height: 120px;
    background: white; /* Solid white background */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    border: none;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1); /* Optional shadow */
}
.logo i {
    font-size: 48px;
    color: white;
}

.logo img {
    width: 120px;
    height: 120px;
    object-fit: contain;
    border-radius: 0;
}

.login-title {
    color: white;
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 8px;
    position: relative;
    z-index: 2;
    line-height: 1.2;
}

.login-subtitle {
    color: rgba(255, 255, 255, 0.9);
    font-size: 13px;
    position: relative;
    z-index: 2;
    line-height: 1.4;
    max-width: 280px;
    margin: 0 auto;
}

.login-body {
    padding: 40px 30px;
}

.alert {
    padding: 16px;
    border-radius: 12px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.alert-success {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    border: 1px solid #059669;
}

.alert-danger,
.alert-error {
    background: linear-gradient(135deg, #EE3A35, #EE3A35);
    color: white;
    border: 1px solid #EE3A35;
}

.alert-info {
    background: linear-gradient(135deg, #193560, #1d4581);
    color: white;
    border: 1px solid #1d4581;
}

.alert .close {
    background: none;
    border: none;
    color: inherit;
    font-size: 18px;
    cursor: pointer;
    margin-left: auto;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.alert .close:hover {
    opacity: 1;
}

.form-group {
    margin-bottom: 24px;
    position: relative;
}

.form-input-container {
    position: relative;
}

/* Fix for Yii2 form field wrapper */
.field-loginform-id_number {
    position: relative;
    margin-bottom: 24px;
}

.field-loginform-id_number .form-control {
    padding: 16px 20px 16px 50px;
}

.field-loginform-id_number .form-control-position {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: #6b7280;
    font-size: 18px;
    transition: color 0.3s ease;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    height: 20px;
    width: 20px;
}

.field-loginform-id_number .form-control:focus ~ .form-control-position i {
    color: #193560;
}

/* Alternative targeting for different Yii2 structures */
fieldset.form-group.position-relative.has-icon-left {
    position: relative;
    margin-bottom: 24px;
}

fieldset.form-group.position-relative.has-icon-left .form-control-position {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: #6b7280;
    font-size: 18px;
    transition: color 0.3s ease;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    height: 20px;
    width: 20px;
}

.form-control,
.form-input {
    width: 100%;
    padding: 16px 20px 16px 50px;
    border: 2px solid #e5e7eb;
    border-radius: 16px;
    font-size: 16px;
    background: #f8fafc;
    transition: all 0.3s ease;
    outline: none;
    position: relative;
    z-index: 1;
}

.form-control:focus,
.form-input:focus {
    border-color: #1d4581;
    background: white;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
    transform: translateY(-1px);
}

.form-control::placeholder,
.form-input::placeholder {
    color: #9ca3af;
}

.form-control-position,
.form-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: #6b7280;
    font-size: 18px;
    transition: color 0.3s ease;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.form-control:focus ~ .form-control-position i,
.form-input:focus + .form-icon {
    color: #193560;
}

.submit-container {
    text-align: center;
    margin-top: 32px;
}

.btn-primary,
.submit-button {
    background: linear-gradient(135deg, #193560, #1e40af);
    color: white;
    border: none;
    padding: 16px 40px;
    border-radius: 16px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.3);
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 auto;
    min-width: 140px;
    justify-content: center;
    text-decoration: none;
}

.btn-primary:hover,
.submit-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(59, 130, 246, 0.4);
    color: white;
    text-decoration: none;
}

.btn-primary:active,
.submit-button:active {
    transform: translateY(0);
}

.loader,
.ButtonPreloader {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading .loader {
    display: block;
}

.loading .submit-text {
    display: none;
}

.login-footer {
    background: #f8fafc;
    padding: 24px 30px;
    text-align: center;
    border-top: 1px solid #e5e7eb;
}

.register-link {
    color: #6b7280;
    font-size: 14px;
    text-decoration: none;
}

.register-link a,
.card-link {
    color: #193560;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.register-link a:hover,
.card-link:hover {
    color: #1e40af;
}

.error-message,
.errorAlert {
    background: linear-gradient(135deg, #fef2f2, #fee2e2);
    border: 1px solid #fecaca;
    color: #dc2626;
    padding: 16px;
    border-radius: 12px;
    margin-bottom: 20px;
    font-size: 14px;
    animation: slideIn 0.3s ease-out;
    display: flex;
    align-items: center;
    gap: 12px;
}

.error-message.show,
.errorAlert:not([style*="display: none"]) {
    display: flex;
}

.floating-shapes {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

.shape {
    position: absolute;
    border-radius: 50%;
    opacity: 0.1;
    animation: float 6s ease-in-out infinite;
}

.shape1 {
    width: 80px;
    height: 80px;
    background: #193560;
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.shape2 {
    width: 120px;
    height: 120px;
    background: #ef4444;
    top: 70%;
    right: 10%;
    animation-delay: 2s;
}

.shape3 {
    width: 60px;
    height: 60px;
    background: #10b981;
    bottom: 20%;
    left: 20%;
    animation-delay: 4s;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    33% { transform: translateY(-20px) rotate(120deg); }
    66% { transform: translateY(10px) rotate(240deg); }
}

/* Flexbox utilities for compatibility - minimal interference */
.flexbox-container {
    /* Let Bootstrap handle the flexbox naturally */
}

.d-flex {
    /* Bootstrap handles this */
}

.align-items-center {
    /* Bootstrap handles this */
}

.justify-content-center {
    /* Bootstrap handles this */
}

.text-center {
    text-align: center;
}

.mb-0 {
    margin-bottom: 0;
}

.mb-2 {
    margin-bottom: 0.5rem;
}

.pt-1 {
    padding-top: 0.25rem;
}

.px-5 {
    padding-left: 3rem;
    padding-right: 3rem;
}

.round {
    border-radius: 16px;
}

/* Card styles for compatibility */
.card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    overflow: hidden;
}

.card-header {
    background: linear-gradient(135deg, #1e40af, #193560);
    padding: 40px 30px;
    text-align: center;
    position: relative;
    overflow: hidden;
    border: none;
}

.card-title {
    position: relative;
    z-index: 2;
    margin-bottom: 20px;
}

.card-subtitle {
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    position: relative;
    z-index: 2;
}

.card-content .card-body {
    padding: 40px 30px;
}

.card-footer {
    background: #f8fafc;
    padding: 24px 30px;
    text-align: center;
    border-top: 1px solid #e5e7eb;
}

/* Bootstrap grid compatibility - minimal interference */
.row {
    margin: 0;
}

.col-12 {
    /* Let Bootstrap handle this naturally */
}

.col-lg-4 {
    /* Let Bootstrap handle this naturally */
}

.col-md-6 {
    /* Let Bootstrap handle this naturally */
}

.col-md-12 {
    width: 100%;
}

/* Hide/Show utilities */
.d-none {
    display: none !important;
}

.d-block {
    display: block !important;
}

/* Additional styles for registration form */
.card-subtitle.line-on-side {
    color: rgba(255, 255, 255, 0.9);
    font-size: 18px;
    position: relative;
    z-index: 2;
    line-height: 1.4;
    max-width: 280px;
    margin: 0 auto;
    font-weight: 500;
}

.card-subtitle.line-on-side span {
    background: transparent;
    padding: 0 15px;
}

/* Form field labels */
.control-label,
.required-label {
    color: #374151;
    font-weight: 500;
    margin-bottom: 8px;
    font-size: 14px;
}

/* Show asterisk only in the label itself, not below */
label.required:after,
label.control-label.required:after {
    content: " *";
    color: #ef4444;
}

/* Hide asterisks from appearing below fields */
.form-group.required:after,
.field-registerform-id_number.required:after,
.field-registerform-email.required:after,
.field-registerform-phone_no.required:after,
.field-registerform-membership_type.required:after {
    content: "" !important;
    display: none !important;
}
/* Multiple form fields styling */
.form-group.field-registerform-id_number,
.form-group.field-registerform-email,
.form-group.field-registerform-phone_no,
.form-group.field-registerform-membership_type {
    margin-bottom: 20px;
    position: relative;
}

/* Phone input specific styling */
.phone-input-width {
    width: 100% !important;
}

.intl-tel-input {
    width: 100%;
}

.intl-tel-input .form-control {
    width: 100%;
    padding: 16px 20px 16px 50px;
    border: 2px solid #e5e7eb;
    border-radius: 16px;
    font-size: 16px;
    background: #f8fafc;
}

.intl-tel-input .flag-container {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
}

/* Dropdown/Select styling */
select.form-control {
    padding: 16px 20px 16px 50px;
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 16px center;
    background-repeat: no-repeat;
    background-size: 16px;
}

select.form-control:focus {
    border-color: #193560;
    background: white;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

/* Icon positioning for different fields */
.field-registerform-email .form-control-position,
.field-registerform-membership_type .form-control-position,
.field-registerform-id_number .form-control-position {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: #6b7280;
    font-size: 18px;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 20px;
    width: 20px;
    pointer-events: none;
}

/* Specific styling for select/dropdown fields */
.field-registerform-membership_type {
    position: relative;
}

.field-registerform-membership_type .form-control-position {
    top: calc(50% + 12px); /* Adjust for label height */
    transform: translateY(-50%);
}

/* Alternative targeting for fieldset structure */
fieldset.form-group.position-relative.has-icon-left .form-control-position {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: #6b7280;
    font-size: 18px;
    transition: color 0.3s ease;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    height: 20px;
    width: 20px;
}

/* Button variations */
.btn-info {
    background: linear-gradient(135deg, #23477e, #193560);
    color: white;
    border: none;
    padding: 16px 40px;
    border-radius: 16px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(6, 182, 212, 0.3);
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 auto;
    min-width: 140px;
    justify-content: center;
    text-decoration: none;
}

.btn-info:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(6, 182, 212, 0.4);
    color: white;
    text-decoration: none;
}

/* Form validation styling */
.help-block {
    color: #ef4444;
    font-size: 12px;
    margin-top: 4px;
}

.has-error .form-control {
    border-color: #ef4444;
    background: #fef2f2;
}

.has-error .form-control:focus {
    border-color: #ef4444;
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.1);
}

/* Checkbox styling */
.right-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 16px 0;
}

.right-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #193560;
}

/* Password strength meter styling */
.password-strength-container {
    margin: 16px 0;
    display: none;
}

.password-strength-meter {
    width: 100%;
    height: 6px;
    background: #e5e7eb;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 8px;
}

.password-strength-bar {
    height: 100%;
    width: 0%;
    background: #ef4444;
    border-radius: 3px;
    transition: all 0.3s ease;
}

.password-strength-text {
    font-size: 12px;
    color: #6b7280;
    font-weight: 500;
}

/* Enhanced security footer styling */
.card-footer i.fas {
    margin-right: 5px;
}

.card-footer .float-xl-left {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    color: #6b7280;
}

/* Password field specific enhancements */
.field-createpasswordform-password,
.field-createpasswordform-confirm_password {
    margin-bottom: 20px;
    position: relative;
}

/* Password visibility toggle (optional enhancement) */
.password-toggle {
    position: absolute;
    right: 16px;
    top: calc(50% + 12px);
    transform: translateY(-50%);
    cursor: pointer;
    color: #6b7280;
    font-size: 16px;
    z-index: 10;
    transition: color 0.3s ease;
}

/* Forgot password link styling */
.forgot-password-container {
    text-align: right;
    margin: 16px 0 24px 0;
}

.forgot-password-link {
    color: #193560;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.forgot-password-link:hover {
    color: #1e40af;
    text-decoration: underline;
    transform: translateX(2px);
}

.forgot-password-link::after {
    content: "→";
    font-size: 12px;
    transition: transform 0.3s ease;
}

.forgot-password-link:hover::after {
    transform: translateX(2px);
}

/* Password field focus enhancement */
.password-focused .form-control {
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15);
    border-color: #193560;
}

.password-focused .form-control-position i {
    color: #193560;
    transform: scale(1.1);
}

/* Enhanced security indicators */
.password-security-info {
    background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
    border: 1px solid #193560;
    border-radius: 12px;
    padding: 12px 16px;
    margin: 16px 0;
    font-size: 13px;
    color: #193560;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Verification message styling */
.verification-message {
    background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
    border: 1px solid #193560;
    border-radius: 12px;
    padding: 16px;
    margin: 16px 0 24px 0;
    animation: slideIn 0.3s ease-out;
}

.verification-info {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.verification-info i {
    color: #193560;
    font-size: 18px;
    margin-top: 2px;
    flex-shrink: 0;
}

.verification-info p {
    color: #193560;
    font-size: 14px;
    line-height: 1.5;
    margin: 0;
}

/* OTP and verification input styling */
.otp-input,
.verification-input {
    font-family: 'Courier New', monospace;
    font-size: 18px;
}

.otp-input:focus,
.verification-input:focus {
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.2);
    border-color: #193560;
    background: white;
}

/* Resend timer styling */
.resend-timer {
    color: #6b7280;
    font-size: 13px;
    font-weight: normal;
}

.resend-link[style*="pointer-events: none"] {
    cursor: not-allowed;
}

/* Progress indicator for phone verification */
.verification-progress {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 24px 0;
    padding: 16px;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    flex: 1;
    text-align: center;
    transition: all 0.3s ease;
}

.progress-step i {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    background: #e5e7eb;
    color: #6b7280;
    transition: all 0.3s ease;
}

.progress-step span {
    font-size: 12px;
    color: #6b7280;
    font-weight: 500;
    transition: color 0.3s ease;
}

.progress-step.active i {
    background: linear-gradient(135deg, #193560, #193560);
    color: white;
    transform: scale(1.1);
}

.progress-step.active span {
    color: #3b82f6;
    font-weight: 600;
}

.progress-line {
    flex: 1;
    height: 2px;
    background: #e5e7eb;
    margin: 0 16px;
    position: relative;
}

.progress-line::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    background: linear-gradient(135deg, #193560, #193560);
    transition: width 0.5s ease;
}

.progress-step.active ~ .progress-line::after {
    width: 100%;
}

/* Enhanced button styling for verification forms */
.btn-primary:disabled {
    background: linear-gradient(135deg, #9ca3af, #6b7280);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Auto-complete prevention for verification fields */
.verification-input,
.otp-input {
    -webkit-text-security: none;
    text-security: none;
}

/* Mobile responsive adjustments for verification */
@media (max-width: 480px) {
    .verification-progress {
        padding: 12px 8px;
    }
    
    .progress-step i {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }
    
    .progress-step span {
        font-size: 10px;
    }
    
    .progress-line {
        margin: 0 8px;
    }
    
    .verification-info {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }
}
.section {
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Fix any potential Bootstrap conflicts */
.container-fluid {
    padding: 0;
}

/* Ensure form elements have proper spacing */
.form-group.field-loginform-id_number {
    margin-bottom: 24px;
}
@media (max-width: 480px) {
    section.row.flexbox-container {
        padding: 10px;
    }
    
    .card {
        margin: 10px 0;
        border-radius: 20px;
    }
    
    .card-header {
        padding: 25px 20px;
    }
    
    .card-content .card-body {
        padding: 25px 20px;
    }
    
    .card-footer {
        padding: 15px 20px;
    }
    
    .form-control {
        padding: 14px 16px 14px 45px;
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    .btn-primary {
        padding: 14px 30px;
        font-size: 16px;
    }
}
/* ========================================= */
/* FIX: Email/Phone Icon Overlapping Country Dropdown */
/* ========================================= */

/* 1. Lower z-index of ALL your custom left icons */
.form-control-position,
.field-registerform-email .form-control-position,
.field-registerform-id_number .form-control-position,
.field-registerform-membership_type .form-control-position {
    z-index: 2 !important;     /* Was 10 → now below dropdown */
    pointer-events: none;
}

/* 2. Force intl-tel-input dropdown to appear on top */
.iti__country-list {
    z-index: 9999 !important;   /* Super high to beat everything */
    box-shadow: 0 10px 30px rgba(0,0,0,0.15) !important;
    border: 1px solid #e5e7eb !important;
}

/* 3. Ensure flag container is above input content */
.intl-tel-input .flag-container {
    z-index: 11 !important;
}

/* 4. Proper padding so text doesn't hide under flag */
.intl-tel-input.allow-dropdown .form-control {
    padding-left: 68px !important;
    height: 58px !important; /* Match your input height */
}

/* 5. Optional: Slightly round the dropdown */
.iti__country-list {
    border-radius: 12px !important;
    overflow: hidden;
}