/* 
   Auth Modern Design System - Version 2.5
   Floating Popup Mode - Transparent Background, No Blur
   Site Isolation & Recovery Features
*/

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
    --auth-primary: #4F46E5;
    --auth-secondary: #7C3AED;
    --auth-accent: #06B6D4;
    --auth-gradient: linear-gradient(135deg, #4F46E5 0%, #7C3AED 100%);
    --auth-glass: #ffffff;
    --auth-bg-blur: 0px;
    --auth-text: #1E293B;
    --auth-text-muted: #64748B;
    --auth-border: rgba(0, 0, 0, 0.1);
    --auth-radius: 16px;
    --auth-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

/* Modal Backdrop */
.auth-modern-root {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: rgba(15, 23, 42, 0.45) !important;
    z-index: 2147483647 !important;
    opacity: 0 !important;
    visibility: hidden !important;
    transition: opacity 0.3s ease !important;
    display: none !important;
    align-items: center !important;
    justify-content: center !important;
    pointer-events: none !important;
}

.auth-modern-root.active {
    display: flex !important;
    align-items: flex-start !important;
    justify-content: center !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
    padding-top: var(--auth-modal-top, 96px) !important;
    box-sizing: border-box !important;
}

/* Modal Container */
.auth-modern-container {
    background: white !important;
    border: 1px solid var(--auth-border);
    border-radius: var(--auth-radius);
    width: 95%;
    max-width: 380px;
    max-height: calc(100vh - var(--auth-modal-top, 96px) - 16px);
    padding: 32px;
    box-shadow: var(--auth-shadow) !important;
    transform: translateY(20px);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    font-family: 'Outfit', sans-serif;
    position: relative;
    z-index: 2147483647 !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
    box-sizing: border-box !important;
    margin-bottom: 12px !important;
}

.auth-modern-root.active .auth-modern-container {
    transform: translateX(-50%);
}

.auth-modern-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--auth-text-muted);
    font-size: 16px;
}

.auth-modern-close:hover {
    background: #e2e8f0;
    color: #000;
}

.auth-modern-header {
    text-align: center;
    margin-bottom: 24px;
}

.auth-modern-header .logo-icon {
    width: 48px;
    height: 48px;
    background: var(--auth-gradient);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
    color: white;
    font-size: 20px;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.2);
}

.auth-modern-header h2 {
    font-size: 21px;
    font-weight: 700;
    color: var(--auth-text);
    margin: 0 0 4px;
    letter-spacing: -0.5px;
}

.auth-modern-header p {
    color: var(--auth-text-muted);
    font-size: 13px;
    margin: 0;
}

.auth-modern-group {
    margin-bottom: 16px;
}

.auth-modern-label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    color: #475569;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.auth-modern-input-wrapper {
    position: relative;
}

.auth-modern-input-wrapper i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 14px;
}

.auth-modern-input {
    width: 100%;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 12px 14px 12px 40px;
    font-size: 14px;
    color: var(--auth-text);
    transition: all 0.2s;
    box-sizing: border-box;
    font-family: inherit;
}

.auth-modern-input:focus {
    outline: none;
    border-color: var(--auth-primary);
    background: white;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.auth-modern-btn {
    width: 100%;
    background: var(--auth-gradient);
    color: white;
    border: none;
    border-radius: 10px;
    padding: 14px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.auth-modern-btn.auth-loading .auth-btn-text {
    opacity: 0;
}

.auth-modern-btn.auth-loading .auth-spinner {
    display: block;
}

.auth-spinner {
    display: none;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: auth-spin 1s ease-in-out infinite;
    position: absolute;
}

@keyframes auth-spin {
    to { transform: rotate(360deg); }
}

.auth-modern-btn:hover {
    filter: brightness(1.05);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.2);
}

.auth-alert {
    padding: 12px;
    border-radius: 10px;
    font-size: 13px;
    margin-bottom: 20px;
    display: none;
    line-height: 1.4;
}

.auth-alert-error {
    background: #fee2e2;
    color: #b91c1c;
    border-left: 4px solid #ef4444;
}

.auth-alert-success {
    background: #dcfce7;
    color: #15803d;
    border-left: 4px solid #22c55e;
}

.auth-modern-footer {
    text-align: center;
    margin-top: 24px;
    font-size: 13px;
    color: var(--auth-text-muted);
}

.auth-modern-link {
    color: var(--auth-primary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.auth-modern-link:hover {
    color: var(--auth-secondary);
    text-decoration: underline;
}

.auth-fade-out {
    opacity: 0;
    transform: scale(0.95) translateY(-10px) !important;
}
