/* Modern OTP Auth Styles - Mobile First */
.modern-otp-container {
    width: 100%;
    min-height: 100px;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #fff;
    font-family: 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.status-message {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    padding: 15px 40px 15px 20px;
    border-radius: 8px;
    font-size: 14px;
    display: none;
    z-index: 9999;
    max-width: 90%;
    width: auto;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    text-align: center;
    animation: slideDown 0.3s ease-out;
}

.status-message.success {
    background-color: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.status-message.error {
    background-color: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.close-message {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
}

@keyframes slideDown {
    from { 
        opacity: 0;
        transform: translateX(-50%) translateY(-20px);
    }
    to { 
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.auth-card {
    width: 100%;
    max-width: 420px;
    background: white;
    padding-top: 0px;
    margin-top: 0px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    border: 1px solid #e2e8f0;
    overflow: hidden;
}

@media (min-width: 768px) {
    .auth-card {
        width: 420px;
        max-width: 420px;
        border-radius: 12px;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
        padding: 30px;
        margin: 20px;
    }
}

.auth-header {
    text-align: center;
    margin-bottom: 15px;
}

.auth-logo {
    margin-bottom: 15px;
}

.auth-logo img {
    max-height: 60px;
    width: auto;
    max-width: 100%;
}

.auth-header h2 {
    margin: 0;
    color: #111827;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.auth-header h2 i {
    color: #25D366;
    font-size: 1.2em;
}

.auth-tabs {
    display: flex;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 15px;
}

.tab {
    flex: 1;
    text-align: center;
    padding: 10px 0;
    cursor: pointer;
    color: #6b7280;
    font-weight: 500;
    transition: all 0.3s;
    border-bottom: 2px solid transparent;
}

.tab.active {
    color: #4f46e5;
    border-bottom-color: #4f46e5;
}

.tab i {
    margin-right: 8px;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.4s ease-out;
}

.input-group {
    margin-bottom: 15px;
}

.input-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    color: #374151;
    font-weight: 500;
}

.phone-input {
    display: flex;
    width: 100%;
}

.country-code-wrapper {
    position: relative;
    width: 75px;
    border: 1px solid #d1d5db;
    border-radius: 8px 0 0 8px;
    background-color: #f9fafb;
}

.country-code {
    width: 100%;
    padding: 10px 30px 10px 40px;
    border: 1px solid #d1d5db;
    border-radius: 8px 0 0 8px;
    background-color: #f9fafb;
    font-size: 14px;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 16px;
    cursor: pointer;
    opacity: 0;
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    z-index: 2;
}

.selected-flag {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    z-index: 1;
    font-size: 18px;
}

.selected-code {
    position: absolute;
    left: 40px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    z-index: 1;
    font-size: 14px;
    color: #374151;
}

.mobile-input {
    flex: 1;
    padding: 10px;
    border: 1px solid #d1d5db;
    border-left: none;
    border-radius: 0 8px 8px 0;
    font-size: 14px;
    transition: all 0.3s;
}

.otp-input, .name-input, .email-input {
    width: 100%;
    padding: 10px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s;
}

.password-wrapper {
    position: relative;
}

.password-input, .new-password-input,
.confirm-password-input {
    width: 100%;
    padding: 10px 40px 10px 10px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s;
}

.toggle-password {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #6b7280;
}

.mobile-input:focus, .otp-input:focus, 
.name-input:focus, .email-input:focus, 
.password-input:focus, .new-password-input:focus,
.confirm-password-input:focus {
    border-color: #4f46e5;
    outline: none;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.auth-button {
    width: 100%;
    padding: 12px;
    background-color: #4f46e5;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 5px;
}

.auth-button:hover {
    background-color: #4338ca;
}

.auth-button:disabled {
    background-color: #9ca3af;
    cursor: not-allowed;
}

.btn-loader {
    margin-left: 8px;
}

.resend-otp {
    text-align: center;
    margin-top: 12px;
    font-size: 13px;
    color: #6b7280;
}

.resend-link {
    color: #4f46e5;
    text-decoration: none;
    font-weight: 500;
    margin-left: 5px;
}

.countdown {
    margin-left: 5px;
    color: #4f46e5;
    font-weight: 500;
}

.auth-footer {
    margin-top: 15px;
    text-align: center;
    font-size: 12px;
    color: #9ca3af;
    padding-top: 15px;
    border-top: 1px solid #e5e7eb;
}

.auth-footer a {
    color: #4f46e5;
    text-decoration: none;
}

.otp-modal, .password-reset-modal, .add-mobile-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.otp-modal-content {
    background: white;
    padding: 20px;
    border-radius: 12px;
    width: calc(100% - 40px);
    max-width: 400px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
    animation: fadeIn 0.3s ease-out;
    margin: 0 20px;
}

.otp-modal-header {
    text-align: center;
    margin-bottom: 15px;
}

.otp-modal-header h3 {
    margin: 0 0 5px;
    color: #111827;
}

.otp-modal-header p {
    margin: 0;
    color: #6b7280;
    font-size: 14px;
}

.forgot-password-link, .back-to-login {
    text-align: center;
    margin-top: 12px;
}

.forgot-password-link a, .back-to-login a {
    color: #4f46e5;
    text-decoration: none;
    font-size: 14px;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 480px) {
    .auth-card {
        padding: 15px;
    }
    
    .tab {
        font-size: 14px;
        padding: 8px 0;
    }
    
    .otp-modal-content {
        padding: 15px;
        margin: 0 15px;
    }
    
    .country-code-wrapper {
        width: 100px;
    }
    
    .country-code {
        padding-right: 25px;
        background-position: right 8px center;
    }
    
    .selected-code {
        left: 35px;
        font-size: 13px;
    }
}