/* Combined Auth Container - ALWAYS SHOWS FULL CARD */
.ky-combined-auth-container {
    min-height: 100vh;
    display: flex;
    align-items: flex-start; /* ✅ Start from top, not center */
    justify-content: center;
    padding: 40px 20px; /* ✅ Top padding ensures tabs visible */
    background: #ffffff;
    box-sizing: border-box;
}

/* Auth Card */
.auth-card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    max-width: 650px;
    width: 100%;
    overflow: visible;
    margin-top: 100px;
}

/* Tab Navigation */
.auth-tabs {
    display: flex;
    border-bottom: 2px solid #e0e0e0;
}

.auth-tab {
    flex: 1;
    padding: 18px 20px;
    background: transparent;
    border: none;
    font-size: 16px;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.auth-tab:hover {
    color: #333;
    background: #f9f9f9;
}

.auth-tab.active {
    color: #000;
    background: #fff;
}

.auth-tab.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: #000;
}

/* Auth Content */
.auth-content {
    display: none;
    padding: 30px 30px 40px 40px;
    animation: fadeIn 0.3s ease;
}

.auth-content.active {
    display: block;
}

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

/* Titles */
.auth-title {
    font-size: 28px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 30px 0;
    text-align: center;
}

/* Form Groups */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group input[type="password"] {
    width: 100%;
    padding: 12px 16px;
    font-size: 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.form-group input:focus {
    outline: none;
    border-color: #000;
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.05);
}

/* Phone Input Wrapper */
.phone-input-wrapper {
    position: relative;
}

.phone-input-wrapper input {
    padding-left: 60px;
}

.ky-dial-code-display {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 15px;
    color: #333;
    font-weight: 500;
    pointer-events: none;
}

/* Password Input Wrapper */
.password-input-wrapper {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #666;
    font-size: 14px;
    user-select: none;
    transition: color 0.2s ease;
}

.password-toggle:hover {
    color: #000;
}

.password-toggle i {
    margin-right: 4px;
}

/* Password Requirements */
.password-requirements {
    margin-top: 12px;
    padding: 12px 15px;
    background: #f8f9fa;
    border-radius: 8px;
    font-size: 13px;
}

.requirements-title {
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.requirements-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.requirements-list li {
    padding: 4px 0;
    color: #666;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: color 0.2s ease;
}

.requirements-list li.valid {
    color: #28a745;
}

.requirements-list li.valid .check-icon {
    color: #28a745;
}

.requirements-list li.invalid {
    color: #dc3545;
}

.requirements-list li.invalid .check-icon {
    color: #dc3545;
}

.check-icon {
    font-weight: bold;
    width: 16px;
    text-align: center;
}

/* Checkbox Group */
.checkbox-group {
    margin: 20px 0;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    font-size: 14px;
    color: #333;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-right: 10px;
    margin-top: 2px;
    cursor: pointer;
    flex-shrink: 0;
}

.checkbox-label span {
    line-height: 1.5;
}

/* Terms Text */
.terms-text {
    font-size: 13px;
    color: #666;
    margin-bottom: 20px;
    line-height: 1.6;
}

.terms-text a {
    color: #000;
    text-decoration: underline;
}

.terms-text a:hover {
    color: #333;
}

/* Forgot Password Link */
.forgot-password-link {
    text-align: right;
    margin-bottom: 24px;
}

.forgot-password-link a {
    color: #000;
    font-size: 14px;
    text-decoration: underline;
    transition: color 0.2s ease;
}

.forgot-password-link a:hover {
    color: #333;
}

/* Buttons */
.btn {
    width: 100%;
    padding: 14px 20px;
    font-size: 16px;
    font-weight: 700;
    border: 2px solid #2a2afe !important;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-sizing: border-box;
}

.btn-primary {
    background: var(--accent-color) !important;
    color: #fff !important;
}

.btn-primary:hover {
    background: var(--accent-color) !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    border-color: var(--accent-color) !important;
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-primary:focus {
    outline: none !important;
    border-color: #000 !important;
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.1) !important;
}

.btn-secondary {
    background: transparent !important;
    color: #000 !important;
    border: 2px solid #000 !important;
}

.btn-secondary:hover {
    background: var(--accent-color) !important;
    color: #fff !important;
    border-color: var(--accent-color) !important;
}

.btn-secondary:focus {
    outline: none !important;
    border-color: #000 !important;
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.1) !important;
}

/* Divider */
.divider {
    position: relative;
    text-align: center;
    margin: 12px 0;
}

.divider::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 1px;
    background: #ddd;
}

.divider span {
    position: relative;
    display: inline-block;
    padding: 0 15px;
    background: #fff;
    color: #666;
    font-size: 14px;
}

/* OTP Section */
.otp-subtitle {
    text-align: center;
    font-size: 15px;
    color: #666;
    margin-bottom: 30px;
}

.otp-inputs {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 30px;
}

.otp-digit {
    width: 50px;
    height: 50px;
    text-align: center;
    font-size: 24px;
    font-weight: 600;
    border: 2px solid #ddd;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.otp-digit:focus {
    outline: none;
    border-color: #000;
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.05);
}

.otp-digit.filled {
    border-color: #28a745;
    background: #f0f8f4;
}

/* Resend Section */
.resend-section {
    text-align: center;
    margin-bottom: 30px;
    font-size: 14px;
    color: #666;
}

.resend-link {
    color: #000;
    font-weight: 600;
    text-decoration: underline;
    margin-left: 5px;
    cursor: pointer;
    transition: color 0.2s ease;
}

.resend-link:hover {
    color: #333;
}

.resend-link[aria-disabled="true"] {
    opacity: 0.6;
    pointer-events: none;
    cursor: not-allowed;
}

/* Success Content */
#successContent {
    text-align: center;
    padding: 60px 40px;
}

.success-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    background: #28a745;
    color: #fff;
    font-size: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.success-title {
    font-size: 24px;
    font-weight: 700;
    color: #28a745;
    margin: 0 0 16px 0;
}

.success-message {
    font-size: 15px;
    color: #666;
    line-height: 1.6;
}

/* Input Validation States */
input.valid-input {
    border-color: #28a745 !important;
}

input.invalid-input {
    border-color: #dc3545 !important;
}

/* Loading State */
.btn.loading {
    position: relative;
    pointer-events: none;
    opacity: 0.8;
}

.btn.loading::before {
    content: 'Logging..';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
}

.btn.loading {
    color: transparent !important;
}

/* intl-tel-input Styling */
.iti {
    width: 100%;
}

.iti__selected-flag {
    padding: 0 0 0 12px;
}

.iti__flag-container {
    position: absolute;
    top: 0;
    bottom: 0;
    right: auto;
    left: 0;
}

.iti__selected-flag:hover,
.iti__selected-flag:focus {
    background-color: rgba(0, 0, 0, 0.05);
}

.iti__country-list {
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    margin-top: 4px;
}

.iti__country.iti__highlight {
    background-color: rgba(0, 0, 0, 0.05);
}

.iti__country:hover {
    background-color: rgba(0, 0, 0, 0.03);
}

/* SweetAlert2 Custom Styles */
.swal2-mobile-popup {
    width: 90%;
    max-width: 400px;
    padding: 24px;
}

.swal2-confirm-btn,
.swal2-confirm {
    background: #000 !important;
    color: #fff !important;
    padding: 12px 32px !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
    font-size: 15px !important;
    border: none !important;
}

.swal2-confirm-btn:hover,
.swal2-confirm:hover {
    background: #333 !important;
}

.swal2-cancel-btn,
.swal2-cancel {
    background: transparent !important;
    color: #000 !important;
    border: 2px solid #000 !important;
    padding: 12px 32px !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
    font-size: 15px !important;
}

.swal2-cancel-btn:hover,
.swal2-cancel:hover {
    background: #000 !important;
    color: #fff !important;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .ky-combined-auth-container {
        padding: 40px 10px; /* ✅ Keep top padding on mobile too */
        min-height: 100vh;
    }

    .auth-card {
        border-radius: 12px;
        box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
        max-width: 100%;
    }

    .auth-content {
        padding: 30px 24px;
    }

    .auth-title {
        font-size: 24px;
        margin-bottom: 24px;
    }

    .auth-tab {
        font-size: 15px;
        padding: 16px 12px;
    }

    .form-group {
        margin-bottom: 18px;
    }

    .form-group label {
        font-size: 13px;
    }

    .form-group input[type="text"],
    .form-group input[type="email"],
    .form-group input[type="tel"],
    .form-group input[type="password"] {
        font-size: 14px;
        padding: 11px 14px;
    }

    .password-requirements {
        font-size: 12px;
        padding: 10px 12px;
    }

    .requirements-list li {
        font-size: 12px;
    }

    .btn {
        padding: 13px 18px;
        font-size: 15px;
    }

    .otp-digit {
        width: 44px;
        height: 44px;
        font-size: 20px;
    }

    .otp-inputs {
        gap: 8px;
    }

    #successContent {
        padding: 50px 24px;
    }

    .success-icon {
        width: 70px;
        height: 70px;
        font-size: 42px;
    }

    .success-title {
        font-size: 22px;
    }

    .checkbox-label {
        font-size: 13px;
    }

    .terms-text {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .ky-combined-auth-container {
        padding: 30px 10px; /* ✅ Generous top padding on small screens */
        background: #fff;
    }

    .auth-card {
        border-radius: 12px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
        max-width: 100%;
    }

    .auth-content {
        padding: 24px 20px;
    }

    .auth-title {
        font-size: 22px;
        margin-bottom: 20px;
    }

    .auth-tab {
        font-size: 14px;
        padding: 14px 10px;
    }

    .form-group {
        margin-bottom: 16px;
    }

    .form-group label {
        font-size: 13px;
        margin-bottom: 6px;
    }

    .form-group input[type="text"],
    .form-group input[type="email"],
    .form-group input[type="tel"],
    .form-group input[type="password"] {
        font-size: 14px;
        padding: 10px 12px;
    }

    .phone-input-wrapper input {
        padding-left: 55px;
    }

    .ky-dial-code-display {
        font-size: 14px;
        left: 12px;
    }

    .password-toggle {
        right: 12px;
        font-size: 13px;
    }

    .password-requirements {
        font-size: 11px;
        padding: 10px;
        margin-top: 10px;
    }

    .requirements-title {
        font-size: 12px;
        margin-bottom: 6px;
    }

    .requirements-list li {
        font-size: 11px;
        padding: 3px 0;
    }

    .checkbox-group {
        margin: 16px 0;
    }

    .checkbox-label {
        font-size: 12px;
    }

    .checkbox-label input[type="checkbox"] {
        width: 16px;
        height: 16px;
        margin-right: 8px;
    }

    .terms-text {
        font-size: 11px;
        margin-bottom: 16px;
    }

    .forgot-password-link {
        margin-bottom: 20px;
    }

    .forgot-password-link a {
        font-size: 13px;
    }

    .btn {
        padding: 12px 16px;
        font-size: 14px;
        letter-spacing: 0.3px;
    }

    .divider {
        margin: 20px 0;
    }

    .divider span {
        font-size: 13px;
        padding: 0 12px;
    }

    .otp-subtitle {
        font-size: 14px;
        margin-bottom: 24px;
    }

    .otp-digit {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }

    .otp-inputs {
        gap: 6px;
        margin-bottom: 24px;
    }

    .resend-section {
        font-size: 13px;
        margin-bottom: 24px;
    }

    #successContent {
        padding: 40px 20px;
    }

    .success-icon {
        width: 60px;
        height: 60px;
        font-size: 36px;
        margin-bottom: 20px;
    }

    .success-title {
        font-size: 20px;
        margin-bottom: 12px;
    }

    .success-message {
        font-size: 14px;
    }
}

@media (max-width: 360px) {
    .auth-content {
        padding: 20px 16px;
    }

    .auth-title {
        font-size: 20px;
    }

    .auth-tab {
        font-size: 13px;
        padding: 12px 8px;
    }

    .otp-digit {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }

    .otp-inputs {
        gap: 5px;
    }

    .btn {
        font-size: 13px;
        padding: 11px 14px;
    }
}

/* Landscape Mobile Fix */
@media (max-width: 768px) and (orientation: landscape) {
    .ky-combined-auth-container {
        min-height: 100vh;
        padding: 10px;
    }

    .auth-card {
        margin: 10px auto;
    }

    .auth-content {
        padding: 20px;
    }

    .auth-title {
        font-size: 18px;
        margin-bottom: 14px;
    }

    .form-group {
        margin-bottom: 12px;
    }

    .password-requirements {
        margin-top: 8px;
        padding: 8px 10px;
    }

    .checkbox-group {
        margin: 12px 0;
    }

    .terms-text {
        margin-bottom: 12px;
    }

    .divider {
        margin: 14px 0;
    }
}

.iti__selected-country{
    border: none !important;
}


.auth-back-button {
    position: fixed;
    top: 120px;
    left: 20px;
    width: 48px;
    height: 48px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    z-index: 1001; /* Higher than card */
}

.auth-back-button:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.auth-back-button svg {
    color: #000;
}

/* Mobile Positioning - Above Card */
@media (max-width: 768px) {
    .auth-back-button {
        position: absolute; /* Change from fixed to absolute on mobile */
        top: 75px;
        left: 10px;
        width: 44px;
        height: 44px;
        z-index: 1001;
    }
    
    .auth-back-button svg {
        width: 20px;
        height: 20px;
    }
    
    /* Add top margin to auth-card to prevent overlap */
    .auth-card {
        margin-top: 70px; /* Space for back button */
    }
}

@media (max-width: 480px) {
    .auth-back-button {
        top: 75px;
        left: 15px;
        width: 40px;
        height: 40px;
    }
    
    .auth-card {
        margin-top: 100px;
    }
}

@media (max-width: 360px) {
    .auth-back-button {
        top: 75px;
        left: 10px;
    }
}

.phone-input-wrapper {
    position: relative;
}

.phone-verification-loader {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #a8e51c;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    display: none;
}

.phone-verification-loader.active {
    display: block;
}

@keyframes spin {
    0% { transform: translateY(-50%) rotate(0deg); }
    100% { transform: translateY(-50%) rotate(360deg); }
}

.phone-input-wrapper input.checking {
    padding-right: 45px;
}


.phone-input-wrapper {
    position: relative;
}

.phone-verification-loader {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #a8e51c;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    display: none;
}

.phone-verification-loader.active {
    display: block;
}

@keyframes spin {
    0% { transform: translateY(-50%) rotate(0deg); }
    100% { transform: translateY(-50%) rotate(360deg); }
}

.phone-input-wrapper input.checking {
    padding-right: 45px;
}

/* ✅ NEW: Dial code display styles */
.iti__selected-dial-code {
    position: absolute;
    left: 70px; /* Adjust based on your flag width */
    top: 50%;
    transform: translateY(-50%);
    color: #333;
    font-weight: 500;
    pointer-events: none;
    z-index: 1;
    font-size: 14px;
}

.phone-input-wrapper input[type="tel"] {
    padding-left: 110px !important; /* Make room for flag + dial code */
}

/* Fix: Make auth buttons full-width, bigger, and centered */
.auth-content .btn {
    width: 100% !important;
    display: block !important;
    text-align: center !important;
    padding: 16px 24px !important;
    font-size: 17px !important;
    font-weight: 700 !important;
    letter-spacing: 1px !important;
}

@media (max-width: 768px) {
    .auth-content .btn {
        padding: 15px 20px !important;
        font-size: 16px !important;
    }
}
