/* ===========================================
   AUTH PAGES - LAYOUT & CONTAINER STYLES
   Dourfor Dark/Light Mode Support
   
   NOTA: Os estilos de INPUT estão em forms.css
   Este arquivo contém apenas layout e containers
   das páginas de autenticação.
   =========================================== */

/* ============ CSS TOKENS ============ */
:root {
    /* Dark Mode (default) */
    --auth-bg-start: #1a1a2e;
    --auth-bg-mid: #16213e;
    --auth-bg-end: #0f3460;
    --auth-card-bg: rgba(30, 30, 46, 0.95);
    --auth-card-border: rgba(255, 255, 255, 0.1);
    --auth-card-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    --auth-text-primary: #ffffff;
    --auth-text-secondary: #a0a0b0;
    --auth-link: #a78bfa;
    --auth-btn-gradient: linear-gradient(135deg, #7c3aed 0%, #a855f7 100%);
    --auth-btn-shadow: 0 4px 15px rgba(124, 58, 237, 0.4);
    --auth-divider: rgba(255, 255, 255, 0.1);
}

/* Light Mode */
body.light {
    --auth-bg-start: #f0f0f5;
    --auth-bg-mid: #e8e8f0;
    --auth-bg-end: #dde0eb;
    --auth-card-bg: rgba(255, 255, 255, 0.98);
    --auth-card-border: rgba(0, 0, 0, 0.08);
    --auth-card-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
    --auth-text-primary: #1a1a2e;
    --auth-text-secondary: #5a5a70;
    --auth-link: #7c3aed;
    --auth-btn-gradient: linear-gradient(135deg, #7c3aed 0%, #a855f7 100%);
    --auth-btn-shadow: 0 4px 15px rgba(124, 58, 237, 0.25);
    --auth-divider: rgba(0, 0, 0, 0.1);
}

/* ============ BASE CONTAINER ============ */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 16px;
}

.auth-background {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--auth-bg-start) 0%, var(--auth-bg-mid) 50%, var(--auth-bg-end) 100%);
    z-index: -1;
}

.auth-gradient {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(124, 58, 237, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(236, 72, 153, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(59, 130, 246, 0.1) 0%, transparent 40%);
}

body.light .auth-gradient {
    background: 
        radial-gradient(circle at 20% 80%, rgba(124, 58, 237, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(236, 72, 153, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(59, 130, 246, 0.05) 0%, transparent 40%);
}

.auth-content {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 420px;
}

/* ============ CARD ============ */
.auth-card {
    background: var(--auth-card-bg) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--auth-card-border) !important;
    border-radius: 24px !important;
    box-shadow: var(--auth-card-shadow) !important;
    animation: authSlideUp 0.5s ease-out;
}

@keyframes authSlideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============ LOGO ============ */
.logo-container {
    display: flex;
    justify-content: center;
}

.auth-logo {
    width: 120px;
    height: auto;
    filter: drop-shadow(0 4px 12px rgba(124, 58, 237, 0.3));
    transition: transform 0.3s ease;
}

.auth-logo:hover {
    transform: scale(1.05);
}

body.light .auth-logo {
    filter: drop-shadow(0 4px 12px rgba(124, 58, 237, 0.2));
}

/* ============ TYPOGRAPHY ============ */
.auth-title {
    font-weight: 700 !important;
    background: linear-gradient(135deg, var(--auth-text-primary) 0%, #a78bfa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

body.light .auth-title {
    background: linear-gradient(135deg, #1a1a2e 0%, #7c3aed 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.auth-subtitle,
.auth-text {
    color: var(--auth-text-secondary) !important;
}

/* ============ BUTTONS (específicos de auth com gradiente roxo) ============ */
.auth-btn {
    border-radius: 12px !important;
    text-transform: none !important;
    font-weight: 600 !important;
    font-size: 1rem !important;
    padding: 12px 24px !important;
    background: var(--auth-btn-gradient) !important;
    box-shadow: var(--auth-btn-shadow) !important;
    transition: all 0.3s ease !important;
    color: #ffffff !important;
    border-color: transparent !important;
}

.auth-btn span,
.auth-btn .mud-button-label,
.auth-btn .mud-icon-root,
.auth-btn svg {
    color: #ffffff !important;
    fill: #ffffff !important;
}

.auth-btn:focus-visible {
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.4), var(--auth-btn-shadow) !important;
}

.auth-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(124, 58, 237, 0.5) !important;
}

.auth-btn:disabled {
    opacity: 0.6;
}

.secondary-btn {
    border-radius: 12px !important;
    text-transform: none !important;
    font-weight: 500 !important;
    border-color: rgba(124, 58, 237, 0.4) !important;
    color: var(--auth-text-primary) !important;
    transition: all 0.3s ease !important;
}

.secondary-btn span,
.secondary-btn .mud-button-label,
.secondary-btn .mud-icon-root,
.secondary-btn svg {
    color: var(--auth-text-primary) !important;
    fill: var(--auth-text-primary) !important;
}

.secondary-btn:focus-visible {
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.3) !important;
}

.secondary-btn:hover {
    background-color: rgba(124, 58, 237, 0.1) !important;
    border-color: var(--auth-link) !important;
}

/* ============ DIVIDER ============ */
.divider-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.divider-container .mud-divider {
    flex: 1;
    border-color: var(--auth-divider) !important;
}

.divider-text {
    padding: 0 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.75rem;
    color: var(--auth-text-secondary) !important;
}

/* ============ LINKS ============ */
.auth-link,
.auth-container a,
.auth-container .mud-link {
    color: var(--auth-link) !important;
}

/* ============ ALERTS ============ */
.alert-custom {
    border-radius: 12px !important;
}

/* ============ CHIPS ============ */
.auth-container .mud-chip {
    font-weight: 500;
}

/* ============ THEME TOGGLE FOOTER ============ */
.theme-toggle-footer {
    margin-top: 16px;
    padding: 8px;
}

.theme-icon-active {
    color: var(--auth-link) !important;
    opacity: 1;
}

.theme-icon-inactive {
    color: var(--auth-text-secondary) !important;
    opacity: 0.5;
}

.footer-text {
    color: var(--auth-text-secondary) !important;
    opacity: 0.6;
}

/* ============ SUCCESS ICON ANIMATION ============ */
.success-icon {
    animation: scaleIn 0.5s ease-out;
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.5);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ============ RESPONSIVE ============ */
@media (max-width: 599.95px) {
    .auth-card {
        border-radius: 20px !important;
    }

    .auth-logo {
        width: 100px;
    }

    .auth-title {
        font-size: 1.5rem !important;
    }
}
