/* Authentication System Styles */

.mk-auth-page {
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 40px 0;
    display: flex;
    align-items: center;
}

.mk-auth-page .container {
    max-width: 500px;
    margin: 0 auto;
    padding: 0 20px;
}

.auth-wrapper {
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* Auth Tabs */
.auth-tabs {
    display: flex;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

.auth-tab {
    flex: 1;
    padding: 20px;
    border: none;
    background: transparent;
    color: #6c757d;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.auth-tab:hover {
    background: #e9ecef;
    color: #495057;
}

.auth-tab.active {
    background: #fff;
    color: #007cba;
    border-bottom: 3px solid #007cba;
    font-weight: 600;
}

.auth-tab i {
    font-size: 18px;
}

/* Auth Forms */
.auth-forms {
    padding: 40px 30px;
}

.auth-form {
    display: none;
}

.auth-form.active {
    display: block;
}

.form-header {
    text-align: center;
    margin-bottom: 30px;
}

.form-header h2 {
    color: #2d3748;
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
}

.form-header p {
    color: #718096;
    font-size: 16px;
    margin: 0;
}

/* Form Groups */
.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    color: #2d3748;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 14px;
}

.form-group input[type="tel"],
.form-group input[type="text"] {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 16px;
    font-family: inherit;
    transition: all 0.3s ease;
    text-align: center;
    letter-spacing: 2px;
    direction: ltr;
}

.form-group input[type="tel"]:focus,
.form-group input[type="text"]:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.1);
}

.form-group input[type="tel"]:invalid {
    border-color: #e53e3e;
}

.form-text {
    display: block;
    color: #718096;
    font-size: 12px;
    margin-top: 6px;
    text-align: center;
}

/* Radio Group */
.radio-group {
    display: flex;
    gap: 15px;
    margin-top: 15px;
}

.radio-label {
    flex: 1;
    position: relative;
}

.radio-label input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.radio-text {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 15px 20px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    background: #fff;
    color: #4a5568;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.radio-label input[type="radio"]:checked + .radio-text {
    border-color: #007cba;
    background: #f0f8ff;
    color: #007cba;
}

.radio-label input[type="radio"]:checked + .radio-text i {
    color: #007cba;
}

.radio-text i {
    font-size: 18px;
    color: #a0aec0;
}

/* Code Actions */
.code-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
}

.btn-link {
    background: none;
    border: none;
    color: #007cba;
    cursor: pointer;
    font-size: 14px;
    text-decoration: underline;
    padding: 0;
}

.btn-link:hover {
    color: #005a87;
}

.btn-link:disabled {
    color: #a0aec0;
    cursor: not-allowed;
    text-decoration: none;
}

.timer {
    font-size: 14px;
    color: #718096;
    font-weight: 500;
}

/* Form Actions */
.form-actions {
    margin-top: 30px;
}

.btn {
    padding: 15px 30px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
}

.btn-full {
    width: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, #007cba 0%, #005a87 100%);
    color: #fff;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 124, 186, 0.3);
}

.btn-success {
    background: linear-gradient(135deg, #38a169 0%, #2f855a 100%);
    color: #fff;
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(56, 161, 105, 0.3);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* Hidden Class */
.hidden {
    display: none !important;
}

/* Auth Footer */
.auth-footer {
    background: #f8f9fa;
    padding: 20px 30px;
    text-align: center;
    border-top: 1px solid #e9ecef;
}

.auth-footer p {
    color: #718096;
    font-size: 14px;
    margin: 0;
}

.auth-footer a {
    color: #007cba;
    text-decoration: none;
}

.auth-footer a:hover {
    text-decoration: underline;
}

/* Modal */
.auth-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.auth-modal.active {
    display: flex;
}

.modal-content {
    background: #fff;
    border-radius: 20px;
    padding: 40px;
    max-width: 400px;
    width: 90%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.modal-body p {
    color: #2d3748;
    font-size: 16px;
    margin: 20px 0 0 0;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #007cba;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* RTL Support */
.rtl .radio-text,
.rtl .form-text {
    text-align: right;
}

.rtl .code-actions {
    flex-direction: row-reverse;
}

/* Responsive */
@media (max-width: 768px) {
    .mk-auth-page {
        padding: 20px 0;
    }

    .mk-auth-page .container {
        padding: 0 15px;
    }

    .auth-wrapper {
        border-radius: 15px;
    }

    .auth-tabs {
        flex-direction: column;
    }

    .auth-tab {
        padding: 15px 20px;
    }

    .auth-forms {
        padding: 30px 20px;
    }

    .form-header h2 {
        font-size: 24px;
    }

    .radio-group {
        flex-direction: column;
        gap: 10px;
    }

    .modal-content {
        padding: 30px 20px;
        margin: 20px;
    }
}

@media (max-width: 480px) {
    .auth-forms {
        padding: 20px 15px;
    }

    .form-header h2 {
        font-size: 20px;
    }

    .btn {
        padding: 12px 20px;
        font-size: 14px;
    }

    .radio-text {
        padding: 12px 15px;
        font-size: 14px;
    }
}
