/* style-pages/login.css - Estilos específicos para página de login */
/* Integrado com style-index.css - MR Advocacia */

/* ===== VARIÁVEIS CSS CONSOLIDADAS ===== */
:root {
    --gold-primary: #c8a951;
    --gold-secondary: #e6d089;
    --gold-light: rgba(200, 169, 81, 0.15);
    --gold-lighter: rgba(200, 169, 81, 0.08);
    --dark-bg: #1a1a1a;
    --light-bg: #f8f9fa;
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-bg-light: rgba(255, 255, 255, 0.05);
    --border-light: rgba(255, 255, 255, 0.15);
    --border-lighter: rgba(255, 255, 255, 0.08);
    --text-primary: rgba(255, 255, 255, 0.95);
    --text-secondary: rgba(255, 255, 255, 0.75);
    --text-muted: rgba(255, 255, 255, 0.6);
    --text-dark: #2a2a2a;
    --text-dark-secondary: #6c757d;
    --shadow-xl: 0 8px 32px rgba(0, 0, 0, 0.3);
    --shadow-xxl: 0 20px 60px rgba(0, 0, 0, 0.4);
    --font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

/* ===== LAYOUT PRINCIPAL COM BACKGROUND FULL-PAGE ===== */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(
        180deg,
        var(--dark-bg) 0%,
        var(--dark-bg) 50%,
        var(--light-bg) 50%,
        var(--light-bg) 100%
    );
    position: relative;
    overflow: hidden;
    font-family: var(--font-family);
}

.auth-container {
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    padding: 2rem;
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

/* ===== CARTÃO PRINCIPAL TRANSPARENTE ===== */
.login-card {
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.95) 0%, 
        rgba(255, 255, 255, 0.98) 100%);
    backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 24px;
    box-shadow: 
        var(--shadow-xxl),
        inset 0 1px 0 rgba(255, 255, 255, 0.3),
        inset 0 -1px 0 rgba(0, 0, 0, 0.1);
    overflow: hidden;
    width: 100%;
    position: relative;
    z-index: 3;
    animation: cardEntrance 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

@keyframes cardEntrance {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(30px) rotateX(10deg);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0) rotateX(0);
    }
}

/* ===== HEADER DO CARTÃO ===== */
.logo-container {
    padding: 3rem 2.5rem 2rem;
    text-align: center;
    background: linear-gradient(135deg, 
        rgba(26, 26, 26, 0.9) 0%, 
        rgba(44, 44, 44, 0.8) 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.logo-wrapper {
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 2;
}

.login-logo {
    max-width: 100%;
    height: auto;
    max-height: 100px;
    object-fit: contain;
    filter: 
        drop-shadow(0 8px 20px rgba(0, 0, 0, 0.4)) 
        brightness(1.1)
        contrast(1.2);
    transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    z-index: 1;
}

.login-logo:hover {
    transform: scale(1.08) rotate(2deg);
    filter: 
        drop-shadow(0 12px 30px rgba(0, 0, 0, 0.6)) 
        brightness(1.2)
        contrast(1.3);
}

.welcome-content {
    position: relative;
    z-index: 2;
}

.welcome-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 0.5rem;
    line-height: 1.2;
}

.welcome-subtitle {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--gold-secondary);
    margin: 0 0 1.5rem;
    line-height: 1.3;
}

.welcome-description {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-secondary);
    margin: 0;
    max-width: 380px;
    margin-left: auto;
    margin-right: auto;
}

.brand-highlight {
    color: var(--gold-primary);
    font-weight: 600;
}

.brand-title {
    font-size: 1.4rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--gold-primary), var(--gold-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0 0 0.5rem;
    position: relative;
    z-index: 2;
    letter-spacing: -0.5px;
}

.brand-subtitle {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 0 0 2rem;
    position: relative;
    z-index: 2;
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* ===== ÁREA DE LOGIN ESTILIZADA ===== */
.login-area {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    padding: 20px 0;
}

.login-form-clean {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.form-group-clean {
    width: 100%;
}

.input-with-icon-clean {
    position: relative;
    width: 100%;
}

.input-with-icon-clean i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gold-primary);
    font-size: 1.1rem;
    z-index: 1;
}

.input-with-icon-clean input {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    background: rgba(255, 255, 255, 0.08);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: var(--text-dark);
    font-size: 1rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    border-color: var(--border-lighter);
    background: #fff;
}

.input-with-icon-clean input:focus {
    outline: none;
    border-color: var(--gold-primary);
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 0 0 0 3px var(--gold-light);
}

.toggle-password-clean {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-dark-secondary);
    cursor: pointer;
    font-size: 1rem;
    padding: 0.25rem;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.toggle-password-clean:hover {
    color: var(--gold-primary);
    background: var(--gold-lighter);
}

/* ===== BOTÃO DE LOGIN ESTILIZADO COMO DASHBOARD CARD ===== */
.dashboard-card-login-btn {
    width: 100%;
    background: linear-gradient(135deg, 
        var(--gold-primary) 0%, 
        var(--gold-secondary) 100%);
    border: none;
    border-radius: 16px;
    padding: 1.5rem;
    color: var(--text-dark);
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    display: flex;
    align-items: center;
    gap: 1.25rem;
    text-align: left;
    margin-top: 0.5rem;
    box-shadow: 0 4px 15px rgba(200, 169, 81, 0.25);
    position: relative;
    overflow: hidden;
    font-family: inherit;
}

.dashboard-card-login-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 255, 255, 0.2), 
        transparent);
    transition: left 0.7s ease;
}

.dashboard-card-login-btn:hover::before {
    left: 100%;
}

.dashboard-card-login-btn:hover {
    transform: translateY(-6px);
    background: linear-gradient(135deg, 
        var(--gold-secondary) 0%, 
        var(--gold-primary) 100%);
    box-shadow: 
        0 15px 40px rgba(200, 169, 81, 0.3),
        0 0 0 1px var(--gold-light);
}

.dashboard-card-login-btn:active {
    transform: translateY(-2px);
}

.dashboard-card-login-btn .dashboard-card-icon {
    font-size: 1.75rem;
    min-width: 3rem;
    height: 3rem;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.dashboard-card-login-btn:hover .dashboard-card-icon {
    transform: scale(1.2) rotate(5deg);
}

.dashboard-card-login-btn .dashboard-card-content {
    flex: 1;
}

.dashboard-card-login-btn .dashboard-card-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0 0 0.25rem;
    line-height: 1.3;
}

.dashboard-card-login-btn .dashboard-card-description {
    font-size: 0.85rem;
    color: rgba(42, 42, 42, 0.8);
    line-height: 1.4;
    margin: 0;
}

.dashboard-card-login-btn .dashboard-card-arrow {
    font-size: 1.25rem;
    color: var(--text-dark);
    transition: all 0.3s ease;
    opacity: 0.7;
}

.dashboard-card-login-btn:hover .dashboard-card-arrow {
    transform: translateX(5px);
    opacity: 1;
}

/* ===== DASHBOARD - PARTE INFERIOR (FUNDO CLARO) ===== */
.welcome-dashboard {
    padding: 2.5rem 2rem;
    background: transparent;
}

.dashboard-header {
    text-align: center;
    margin-bottom: 2rem;
}

.dashboard-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0 0 0.5rem;
}

.dashboard-subtitle {
    font-size: 0.9rem;
    color: var(--text-dark-secondary);
    margin: 0;
}

.dashboard-grid-special {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin: 0 0 2rem;
}

/* ===== FOOTER DO LOGIN ===== */
.login-footer-transition {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    text-align: center;
}

.login-footer-transition p {
    color: var(--text-dark-secondary);
    font-size: 0.85rem;
    margin: 0;
}

.login-footer-transition a {
    color: var(--gold-primary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.login-footer-transition a:hover {
    color: var(--gold-secondary);
    text-decoration: underline;
}

/* ===== ALERTAS ===== */
.alert-transition {
    padding: 1rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9rem;
    animation: slideIn 0.3s ease;
    background: rgba(220, 53, 69, 0.15);
    border: 1px solid rgba(220, 53, 69, 0.3);
    color: #f8d7da;
}

.alert-danger-transition {
    background: rgba(220, 53, 69, 0.15);
    border: 1px solid rgba(220, 53, 69, 0.3);
    color: #f8d7da;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* ===== SISTEMA DE INFORMAÇÕES ===== */
.system-info {
    display: flex;
    justify-content: center;
    gap: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.info-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-dark-secondary);
}

.info-icon {
    font-size: 0.9rem;
    opacity: 0.8;
}

.info-text {
    font-weight: 500;
}

/* ===== FOOTER ===== */
.login-footer {
    padding: 1.5rem 2rem;
    background: rgba(248, 249, 250, 0.8);
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    text-align: center;
}

.footer-text {
    font-size: 0.8rem;
    color: var(--text-dark-secondary);
    margin: 0;
}

.footer-version {
    color: var(--gold-primary);
    font-weight: 600;
}

/* ===== LOADING SCREEN ===== */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, var(--dark-bg) 0%, var(--light-bg) 100%);
    backdrop-filter: blur(20px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: all 0.5s ease;
}

.loading-content {
    text-align: center;
    animation: fadeInUp 0.6s ease;
}

.loading-logo {
    margin-bottom: 2rem;
}

.loading-logo img {
    max-width: 120px;
    opacity: 0.9;
    filter: brightness(1.2);
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top: 3px solid var(--gold-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1.5rem;
}

.loading-text {
    color: var(--text-dark);
    font-size: 0.9rem;
    margin: 0;
    font-weight: 500;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== RESPONSIVIDADE ===== */
@media (max-width: 768px) {
    .auth-container {
        padding: 1rem;
        max-width: 400px;
    }
    
    .login-card {
        border-radius: 20px;
    }
    
    .logo-container {
        padding: 2.5rem 2rem 1.5rem;
    }
    
    .welcome-dashboard {
        padding: 2rem 1.5rem;
    }
    
    .dashboard-card-login-btn {
        padding: 1.25rem;
        gap: 1rem;
    }
    
    .dashboard-card-login-btn .dashboard-card-icon {
        min-width: 2.5rem;
        height: 2.5rem;
        font-size: 1.5rem;
    }
    
    .dashboard-card-login-btn .dashboard-card-title {
        font-size: 1rem;
    }
    
    .dashboard-card-login-btn .dashboard-card-description {
        font-size: 0.8rem;
    }
    
    .system-info {
        gap: 1.5rem;
        flex-wrap: wrap;
    }
    
    .login-area {
        max-width: 100%;
        padding: 15px 0;
    }
}

@media (max-width: 480px) {
    .auth-container {
        padding: 0.5rem;
    }
    
    .logo-container {
        padding: 2rem 1.5rem 1rem;
    }
    
    .welcome-title {
        font-size: 1.4rem;
    }
    
    .welcome-subtitle {
        font-size: 1rem;
    }
    
    .welcome-description {
        font-size: 0.9rem;
    }
    
    .welcome-dashboard {
        padding: 1.5rem 1rem;
    }
    
    .dashboard-card-login-btn {
        padding: 1rem;
        flex-direction: column;
        text-align: center;
        gap: 0.75rem;
    }
    
    .dashboard-card-login-btn .dashboard-card-content {
        text-align: center;
    }
    
    .system-info {
        flex-direction: column;
        gap: 1rem;
    }
    
    .login-footer {
        padding: 1rem 1.5rem;
    }
    
    .login-footer-transition {
        margin-top: 1rem;
    }
}

/* ===== MELHORIAS DE ACESSIBILIDADE ===== */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ===== ESTILOS DE FOCO PARA ACESSIBILIDADE ===== */
.dashboard-card-login-btn:focus-visible,
.input-with-icon-clean input:focus-visible {
    outline: 2px solid var(--gold-primary);
    outline-offset: 4px;
}

/* ===== UTILITÁRIOS ===== */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}