@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700&family=Playfair+Display:wght@400;500;600&display=swap');

:root {
    --auth-primary: #0d0d0d;
    --auth-primary-soft: #1a1a1a;
    --auth-accent: #00a2ff;
    --auth-accent-soft: rgba(0, 162, 255, 0.1);
    --auth-text: #111111;
    --auth-text-muted: #6b7280;
    --auth-text-light: #9ca3af;
    --auth-bg: #ffffff;
    --auth-bg-soft: #f9fafb;
    --auth-border: #e5e7eb;
    --auth-border-focus: #00a2ff;
    --auth-error: #ef4444;
    --auth-success: #22c55e;
    --auth-radius: 12px;
    --auth-radius-lg: 20px;
    --auth-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
    --auth-shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.1);
    --auth-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== CONTAINER ===== */
.auth-container {
    display: flex;
    min-height: 100vh;
    background: var(--auth-bg);
}

/* ===== VISUAL SIDE ===== */
.auth-visual {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0d0d0d 0%, #1a1a1a 50%, #0d0d0d 100%);
    overflow: hidden;
    padding: 60px;
}

.auth-visual__overlay {
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(0, 162, 255, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(0, 162, 255, 0.1) 0%, transparent 40%);
    pointer-events: none;
}

.auth-visual__content {
    position: relative;
    z-index: 10;
    max-width: 480px;
    color: #fff;
}

.auth-visual__logo {
    margin-bottom: 40px;
}

.logo-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    font-size: 28px;
    color: var(--auth-accent);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.auth-visual__title {
    font-family: 'Playfair Display', serif;
    font-size: 48px;
    font-weight: 500;
    line-height: 1.15;
    margin-bottom: 20px;
    letter-spacing: -0.5px;
}

.auth-visual__text {
    font-family: 'DM Sans', sans-serif;
    font-size: 18px;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.6;
    margin-bottom: 48px;
}

.auth-visual__features {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: 'DM Sans', sans-serif;
    font-size: 15px;
    color: rgba(255, 255, 255, 0.8);
}

.feature-item i {
    color: var(--auth-accent);
    font-size: 16px;
}

/* Stats for signup */
.auth-visual__stats {
    display: flex;
    gap: 40px;
    margin-top: 20px;
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-family: 'Playfair Display', serif;
    font-size: 32px;
    font-weight: 500;
    color: #fff;
}

.stat-label {
    font-family: 'DM Sans', sans-serif;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 4px;
}

/* Decorative shapes */
.auth-visual__shapes {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.shape {
    position: absolute;
    border-radius: 50%;
    background: var(--auth-accent);
    opacity: 0.03;
}

.shape-1 {
    width: 400px;
    height: 400px;
    top: -100px;
    right: -100px;
    animation: float 20s ease-in-out infinite;
}

.shape-2 {
    width: 300px;
    height: 300px;
    bottom: -50px;
    left: -50px;
    animation: float 15s ease-in-out infinite reverse;
}

.shape-3 {
    width: 200px;
    height: 200px;
    top: 50%;
    left: 30%;
    animation: float 18s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(20px, -20px) scale(1.02); }
    66% { transform: translate(-10px, 10px) scale(0.98); }
}

/* ===== FORM SIDE ===== */
.auth-form-side {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    background: var(--auth-bg);
}

.auth-form-wrapper {
    width: 100%;
    max-width: 420px;
}

.auth-form-wrapper--signup {
    max-width: 480px;
}

/* ===== FORM HEADER ===== */
.auth-form-header {
    margin-bottom: 40px;
}

.auth-form-header h1 {
    font-family: 'Playfair Display', serif;
    font-size: 36px;
    font-weight: 500;
    color: var(--auth-text);
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.auth-subtitle {
    font-family: 'DM Sans', sans-serif;
    font-size: 15px;
    color: var(--auth-text-muted);
    line-height: 1.5;
}

/* ===== FORM ===== */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.form-row {
    display: flex;
    flex-direction: column;
}

.form-row--two {
    flex-direction: row;
    gap: 16px;
}

.form-row--two .form-group {
    flex: 1;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-family: 'DM Sans', sans-serif;
    font-size: 13px;
    font-weight: 500;
    color: var(--auth-text);
    letter-spacing: 0.02em;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper i:first-child {
    position: absolute;
    left: 16px;
    color: var(--auth-text-light);
    font-size: 16px;
    pointer-events: none;
    transition: var(--auth-transition);
}

.input-wrapper input {
    width: 100%;
    padding: 14px 16px 14px 48px;
    font-family: 'DM Sans', sans-serif;
    font-size: 15px;
    color: var(--auth-text);
    background: var(--auth-bg);
    border: 1px solid var(--auth-border);
    border-radius: var(--auth-radius);
    outline: none;
    transition: var(--auth-transition);
}

.input-wrapper input::placeholder {
    color: var(--auth-text-light);
}

.input-wrapper input:hover {
    border-color: #d1d5db;
}

.input-wrapper input:focus {
    border-color: var(--auth-border-focus);
    box-shadow: 0 0 0 3px var(--auth-accent-soft);
}

.input-wrapper input:focus + i:first-child,
.input-wrapper input:focus ~ i:first-child {
    color: var(--auth-accent);
}

.input-wrapper:has(input:focus) i:first-child {
    color: var(--auth-accent);
}

.input-wrapper--phone input {
    padding-left: 16px;
}

/* Toggle password */
.toggle-password {
    position: absolute;
    right: 16px;
    background: none;
    border: none;
    color: var(--auth-text-light);
    cursor: pointer;
    padding: 4px;
    display: flex;
    transition: var(--auth-transition);
}

.toggle-password:hover {
    color: var(--auth-text-muted);
}

/* Error state */
.input-error {
    border-color: var(--auth-error) !important;
}

.error-label {
    font-family: 'DM Sans', sans-serif;
    font-size: 12px;
    color: var(--auth-error);
    margin-top: 6px;
}

/* Form options */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: -8px;
}

.link-subtle {
    font-family: 'DM Sans', sans-serif;
    font-size: 13px;
    color: var(--auth-text-muted);
    text-decoration: none;
    transition: var(--auth-transition);
}

.link-subtle:hover {
    color: var(--auth-accent);
}

/* ===== BUTTONS ===== */
.btn-primary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 16px 24px;
    font-family: 'DM Sans', sans-serif;
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    background: var(--auth-primary);
    border: none;
    border-radius: var(--auth-radius);
    cursor: pointer;
    transition: var(--auth-transition);
}

.btn-primary:hover {
    background: var(--auth-primary-soft);
    transform: translateY(-1px);
    box-shadow: var(--auth-shadow);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-primary i {
    font-size: 14px;
    transition: transform 0.2s ease;
}

.btn-primary:hover i {
    transform: translateX(3px);
}

/* Divider */
.divider {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 8px 0;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--auth-border);
}

.divider span {
    font-family: 'DM Sans', sans-serif;
    font-size: 13px;
    color: var(--auth-text-light);
    white-space: nowrap;
}

/* Google button */
.btn-google {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    padding: 14px 24px;
    font-family: 'DM Sans', sans-serif;
    font-size: 15px;
    font-weight: 500;
    color: var(--auth-text);
    background: var(--auth-bg);
    border: 1px solid var(--auth-border);
    border-radius: var(--auth-radius);
    cursor: pointer;
    text-decoration: none;
    transition: var(--auth-transition);
}

.btn-google:hover {
    background: var(--auth-bg-soft);
    border-color: #d1d5db;
}

/* ===== FOOTER ===== */
.auth-footer {
    margin-top: 32px;
    text-align: center;
}

.auth-footer p {
    font-family: 'DM Sans', sans-serif;
    font-size: 14px;
    color: var(--auth-text-muted);
    margin-bottom: 12px;
}

.auth-footer a {
    color: var(--auth-accent);
    text-decoration: none;
    font-weight: 500;
    transition: var(--auth-transition);
}

.auth-footer a:hover {
    text-decoration: underline;
}

.terms-text {
    font-size: 12px !important;
    color: var(--auth-text-light) !important;
}

/* ===== LOADER ===== */
.loader-inline {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ===== INTL TEL INPUT OVERRIDE ===== */
.iti {
    width: 100%;
}

.iti__flag-container {
    border-radius: var(--auth-radius) 0 0 var(--auth-radius);
}

.iti__selected-flag {
    background: transparent !important;
    border-radius: var(--auth-radius) 0 0 var(--auth-radius);
    padding-left: 16px;
}

.input-wrapper--phone .iti input {
    padding-left: 16px !important;
    font-family: 'DM Sans', sans-serif;
    font-size: 15px;
    color: var(--auth-text);
    background: var(--auth-bg);
    border: 1px solid var(--auth-border);
    border-radius: var(--auth-radius);
    outline: none;
    transition: var(--auth-transition);
    height: 48px;
}

.input-wrapper--phone .iti input:focus {
    border-color: var(--auth-border-focus);
    box-shadow: 0 0 0 3px var(--auth-accent-soft);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .auth-visual {
        display: none;
    }
    
    .auth-form-side {
        flex: 1;
        padding: 24px;
    }
    
    .auth-form-wrapper {
        max-width: 100%;
    }
    
    .form-row--two {
        flex-direction: column;
        gap: 24px;
    }
}

@media (max-width: 480px) {
    .auth-form-header h1 {
        font-size: 28px;
    }
    
    .form-options {
        flex-direction: column;
        gap: 8px;
        align-items: flex-start;
    }
}

/* ===== DARK MODE (optional) ===== */
@media (prefers-color-scheme: dark) {
    /* Descomente para habilitar dark mode automático
    :root {
        --auth-text: #f3f4f6;
        --auth-text-muted: #9ca3af;
        --auth-text-light: #6b7280;
        --auth-bg: #111111;
        --auth-bg-soft: #1a1a1a;
        --auth-border: #2d2d2d;
    }
    */
}

