/**
 * Modern Auth Styles - TUTOR LMS Inspired
 * Clean, simple, and effective login/registration UI
 *
 * @package MMLMS
 * @since 6.0.65
 */

/* ========================================
   CSS VARIABLES - TUTOR LMS Style
   ======================================== */
:root {
    --mmlms-primary: #3b82f6;
    --mmlms-primary-dark: #2563eb;
    --mmlms-primary-light: #eff6ff;
    --mmlms-success: #10b981;
    --mmlms-success-light: #d1fae5;
    --mmlms-danger: #ef4444;
    --mmlms-danger-light: #fee2e2;
    --mmlms-warning: #f59e0b;
    
    --mmlms-text-primary: #1e293b;
    --mmlms-text-secondary: #64748b;
    --mmlms-text-muted: #94a3b8;
    
    --mmlms-bg-white: #ffffff;
    --mmlms-bg-gray: #f8fafc;
    --mmlms-border: #e2e8f0;
    --mmlms-border-focus: #3b82f6;
    
    --mmlms-radius: 12px;
    --mmlms-radius-sm: 8px;
    --mmlms-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --mmlms-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
}

/* ========================================
   AUTH CONTAINER
   ======================================== */
.mmlms-auth-container {
    max-width: 420px;
    margin: 60px auto;
    padding: 0 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Inter', sans-serif;
}

.mmlms-auth-section {
    background: var(--mmlms-bg-white);
    border-radius: var(--mmlms-radius);
    box-shadow: var(--mmlms-shadow-lg);
    border: 1px solid var(--mmlms-border);
    overflow: hidden;
}

/* ========================================
   AUTH HEADER - Clean & Simple
   ======================================== */
.mmlms-auth-header {
    padding: 32px 32px 24px;
    text-align: center;
    background: var(--mmlms-bg-white);
    border-bottom: 1px solid var(--mmlms-border);
}

.mmlms-auth-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 20px;
    background: var(--mmlms-primary-light);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
}

.mmlms-auth-title {
    margin: 0 0 8px;
    font-size: 22px;
    font-weight: 700;
    color: var(--mmlms-text-primary);
    letter-spacing: -0.5px;
}

.mmlms-auth-subtitle {
    margin: 0;
    font-size: 14px;
    color: var(--mmlms-text-secondary);
    line-height: 1.5;
}

/* ========================================
   AUTH FORM
   ======================================== */
.mmlms-form {
    padding: 32px;
}

.mmlms-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

@media (max-width: 480px) {
    .mmlms-form-grid {
        grid-template-columns: 1fr;
    }
    
    .mmlms-auth-container {
        margin: 20px auto;
    }
    
    .mmlms-form {
        padding: 24px;
    }
    
    .mmlms-auth-header {
        padding: 24px 24px 20px;
    }
}

.mmlms-form-group {
    margin-bottom: 20px;
}

.mmlms-form-group:last-of-type {
    margin-bottom: 0;
}

.mmlms-form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--mmlms-text-primary);
}

.mmlms-required {
    color: var(--mmlms-danger);
    margin-left: 2px;
}

.mmlms-optional {
    color: var(--mmlms-text-muted);
    font-weight: 400;
    font-size: 12px;
    margin-left: 4px;
}

/* Input Wrapper */
.mmlms-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.mmlms-input-wrapper input,
.mmlms-input-wrapper select {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid var(--mmlms-border);
    border-radius: var(--mmlms-radius-sm);
    font-size: 14px;
    font-weight: 400;
    color: var(--mmlms-text-primary);
    background: var(--mmlms-bg-white);
    transition: all 0.2s ease;
}

.mmlms-input-wrapper input::placeholder {
    color: var(--mmlms-text-muted);
}

.mmlms-input-wrapper input:focus,
.mmlms-input-wrapper select:focus {
    outline: none;
    border-color: var(--mmlms-border-focus);
    background: var(--mmlms-bg-white);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.mmlms-input-wrapper select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' 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 12px center;
    padding-right: 40px;
}

.mmlms-form textarea {
    display: block;
    width: 100%;
    min-height: 100px;
    padding: 12px 14px;
    border: 1.5px solid var(--mmlms-border);
    border-radius: var(--mmlms-radius-sm);
    font-size: 14px;
    color: var(--mmlms-text-primary);
    background: var(--mmlms-bg-white);
    resize: vertical;
    transition: all 0.2s ease;
    box-sizing: border-box;
    margin: 0;
}

.mmlms-form textarea:focus {
    outline: none;
    border-color: var(--mmlms-border-focus);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Ensure textarea container is full width */
.mmlms-form-group textarea {
    display: block;
    clear: both;
}

/* Password Toggle */
.mmlms-password-toggle {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    color: var(--mmlms-text-muted);
    padding: 4px;
    transition: color 0.2s;
}

.mmlms-password-toggle:hover {
    color: var(--mmlms-text-secondary);
}

.mmlms-form-hint {
    margin: 6px 0 0;
    font-size: 12px;
    color: var(--mmlms-text-muted);
}

/* ========================================
   FORM OPTIONS
   ======================================== */
.mmlms-form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 24px 0;
    font-size: 13px;
}

.mmlms-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    color: var(--mmlms-text-secondary);
    font-weight: 400;
}

.mmlms-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    border: 1.5px solid var(--mmlms-border);
    border-radius: 4px;
    cursor: pointer;
    accent-color: var(--mmlms-primary);
}

.mmlms-link {
    color: var(--mmlms-primary);
    text-decoration: none;
    font-weight: 500;
    font-size: 13px;
    transition: color 0.2s;
}

.mmlms-link:hover {
    color: var(--mmlms-primary-dark);
    text-decoration: underline;
}

.mmlms-link-primary {
    font-weight: 600;
    margin-left: 4px;
}

/* ========================================
   AUTH SWITCH - Login/Register Toggle
   ======================================== */
.mmlms-auth-switch {
    color: var(--mmlms-text-secondary);
    font-size: 14px;
}

.mmlms-auth-switch a {
    color: var(--mmlms-primary);
    font-weight: 600;
    text-decoration: none;
    margin-left: 4px;
    transition: color 0.2s;
}

.mmlms-auth-switch a:hover {
    color: var(--mmlms-primary-dark);
    text-decoration: underline;
}

/* ========================================
   BUTTONS - Clean & Modern
   ======================================== */
.mmlms-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--mmlms-radius-sm);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.mmlms-btn-block {
    width: 100%;
}

.mmlms-btn-lg {
    padding: 14px 28px;
    font-size: 15px;
}

.mmlms-btn-primary {
    background: var(--mmlms-primary);
    color: white;
}

.mmlms-btn-primary:hover {
    background: var(--mmlms-primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.25);
}

.mmlms-btn-secondary {
    background: var(--mmlms-bg-gray);
    color: var(--mmlms-text-primary);
    border: 1px solid var(--mmlms-border);
}

.mmlms-btn-secondary:hover {
    background: var(--mmlms-border);
}

.mmlms-btn-outline {
    background: transparent;
    border: 1.5px solid var(--mmlms-border);
    color: var(--mmlms-text-secondary);
}

.mmlms-btn-outline:hover {
    border-color: var(--mmlms-primary);
    color: var(--mmlms-primary);
    background: var(--mmlms-primary-light);
}

/* ========================================
   LOADING SPINNER
   ======================================== */
.mmlms-loading {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: mmlms-spin 0.8s linear infinite;
}

@keyframes mmlms-spin {
    to { transform: rotate(360deg); }
}

.mmlms-btn-secondary .mmlms-loading {
    border-color: rgba(0, 0, 0, 0.1);
    border-top-color: var(--mmlms-primary);
}

/* ========================================
   FORM MESSAGE - Clean Alerts
   ======================================== */
.mmlms-form-message {
    margin-bottom: 20px;
    padding: 14px 16px;
    border-radius: var(--mmlms-radius-sm);
    font-size: 13px;
    font-weight: 500;
    display: none;
    border-left: 3px solid transparent;
}

.mmlms-form-message.show {
    display: block;
}

.mmlms-form-message.success {
    display: block;
    background: var(--mmlms-success-light);
    color: #065f46;
    border-left-color: var(--mmlms-success);
}

.mmlms-form-message.error {
    display: block;
    background: var(--mmlms-danger-light);
    color: #991b1b;
    border-left-color: var(--mmlms-danger);
}

.mmlms-form-message.loading {
    display: block;
    background: var(--mmlms-primary-light);
    color: var(--mmlms-primary-dark);
    border-left-color: var(--mmlms-primary);
}

/* ========================================
   AUTH DIVIDER
   ======================================== */
.mmlms-auth-divider {
    display: flex;
    align-items: center;
    margin: 0 32px;
    color: var(--mmlms-text-muted);
    font-size: 13px;
    font-weight: 500;
}

.mmlms-auth-divider::before,
.mmlms-auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--mmlms-border);
}

.mmlms-auth-divider span {
    padding: 0 16px;
}

/* ========================================
   AUTH TOGGLE - Switch between login/register
   ======================================== */
.mmlms-auth-toggle {
    padding: 24px 32px 32px;
    text-align: center;
    background: var(--mmlms-bg-gray);
    border-top: 1px solid var(--mmlms-border);
}

.mmlms-auth-toggle-text {
    color: var(--mmlms-text-secondary);
    font-size: 14px;
    margin: 0;
}

.mmlms-auth-toggle-btn {
    color: var(--mmlms-primary);
    font-weight: 600;
    text-decoration: none;
    margin-left: 4px;
    cursor: pointer;
    background: none;
    border: none;
    font-size: 14px;
    padding: 0;
}

.mmlms-auth-toggle-btn:hover {
    text-decoration: underline;
}

/* ========================================
   VERIFICATION SECTION
   ======================================== */
.mmlms-verification-content {
    padding: 32px;
    text-align: center;
}

.mmlms-verification-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    background: var(--mmlms-success-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
}

.mmlms-verification-content h3 {
    margin: 0 0 12px;
    font-size: 18px;
    font-weight: 600;
    color: var(--mmlms-text-primary);
}

.mmlms-verification-content p {
    margin: 0 0 24px;
    color: var(--mmlms-text-secondary);
    font-size: 14px;
    line-height: 1.6;
}

.mmlms-verification-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ========================================
   LOGGED IN VIEW
   ======================================== */
.mmlms-logged-in {
    max-width: 480px;
    margin: 60px auto;
    padding: 32px;
    background: var(--mmlms-bg-white);
    border-radius: var(--mmlms-radius);
    box-shadow: var(--mmlms-shadow-lg);
    border: 1px solid var(--mmlms-border);
    text-align: center;
}

.mmlms-logged-in-header {
    margin-bottom: 28px;
}

.mmlms-logged-in-avatar img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin-bottom: 16px;
    border: 3px solid var(--mmlms-primary-light);
}

.mmlms-logged-in-info h3 {
    margin: 0 0 4px;
    font-size: 20px;
    font-weight: 600;
    color: var(--mmlms-text-primary);
}

.mmlms-logged-in-info p {
    margin: 0 0 12px;
    color: var(--mmlms-text-secondary);
    font-size: 14px;
}

.mmlms-logged-in-tier {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mmlms-logged-in-tier.tier-0 {
    background: var(--mmlms-bg-gray);
    color: var(--mmlms-text-secondary);
}

.mmlms-logged-in-tier.tier-1 {
    background: var(--mmlms-primary-light);
    color: var(--mmlms-primary-dark);
}

.mmlms-logged-in-tier.tier-2 {
    background: #f3e8ff;
    color: #7c3aed;
}

.mmlms-logged-in-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.mmlms-logged-in-actions .mmlms-btn {
    padding: 12px 16px;
}

@media (max-width: 480px) {
    .mmlms-logged-in-actions {
        grid-template-columns: 1fr;
    }
    
    .mmlms-logged-in {
        margin: 20px auto;
        padding: 24px;
    }
}

/* ========================================
   TIER BADGES
   ======================================== */
.mmlms-tier-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mmlms-tier-badge.tier-0 {
    background: var(--mmlms-bg-gray);
    color: var(--mmlms-text-secondary);
}

.mmlms-tier-badge.tier-1 {
    background: var(--mmlms-primary-light);
    color: var(--mmlms-primary-dark);
}

.mmlms-tier-badge.tier-2 {
    background: #f3e8ff;
    color: #7c3aed;
}

/* ========================================
   PASSWORD STRENGTH INDICATOR
   ======================================== */
.mmlms-password-strength {
    margin-top: 8px;
    height: 4px;
    background: var(--mmlms-border);
    border-radius: 2px;
    overflow: hidden;
}

.mmlms-password-strength::before {
    content: '';
    display: block;
    height: 100%;
    width: 0;
    transition: width 0.3s ease, background-color 0.3s ease;
}

.mmlms-password-strength.weak::before {
    width: 33%;
    background: var(--mmlms-danger);
}

.mmlms-password-strength.medium::before {
    width: 66%;
    background: var(--mmlms-warning);
}

.mmlms-password-strength.strong::before {
    width: 100%;
    background: var(--mmlms-success);
}
