/* ===== SISTEMA EDUTECH - STYLES MODERNOS ===== */

:root {
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --accent-color: #f093fb;
    --success-color: #4facfe;
    --warning-color: #fdbb2d;
    --danger-color: #fa709a;
    --dark-color: #2d3748;
    --light-color: #f7fafc;
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 50px rgba(0, 0, 0, 0.15);
}

/* ===== RESET E BASE ===== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.6;
    color: var(--dark-color);
    background: var(--gradient-primary);
    min-height: 100vh; overflow-y: auto;
}

/* ===== LOGIN PAGE ===== */
.login-page {
    background: var(--gradient-primary);
    min-height: 100vh; overflow-y: auto;
    position: relative;
    overflow-x: hidden; overflow-y: auto;
}

.login-page::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width=60 height=60 viewBox=0 0 60 60 xmlns=http://www.w3.org/2000/svg%3E%3Cg fill=none fill-rule=evenodd%3E%3Cg fill=%23ffffff opacity=0.1%3E%3Ccircle cx=7 cy=7 r=2/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    animation: float 20s ease-in-out infinite;
    pointer-events: none;
    z-index: -1;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.login-container {
    position: relative;
    z-index: 10;
    padding: 2rem 0;
}

/* ===== GLASS CARD ===== */
.glass-container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    box-shadow: var(--shadow-xl);
    position: relative;
    z-index: 100;
}

.login-card {
    padding: 3rem 2.5rem;
    max-width: 450px;
    margin: 0 auto;
    position: relative;
    z-index: 110;
}

.login-card::before {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: var(--gradient-secondary);
    opacity: 0.05;
    border-radius: 50%;
    animation: rotate 30s linear infinite;
    z-index: -1;
    pointer-events: none;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ===== HEADER DO LOGIN ===== */
.login-header {
    position: relative;
    z-index: 10;
    text-align: center;
    margin-bottom: 2rem;
}

.brand-container {
    margin-bottom: 2rem;
}

.login-logo {
    width: 80px;
    height: 80px;
    border-radius: 20px;
    margin-bottom: 1rem;
    box-shadow: var(--shadow-lg);
}

.brand-title-login {
    font-size: 2rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
}

.brand-subtitle-login {
    color: #6b7280;
    font-size: 0.95rem;
    font-weight: 500;
}

.login-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

.login-subtitle {
    color: #6b7280;
    font-size: 1rem;
}

/* ===== FORMULÁRIO ===== */
.login-form {
    position: relative;
    z-index: 200;
}

.login-input {
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 0.875rem 1rem;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.9);
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 210;
    pointer-events: auto;
}

.login-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    background: white;
}

.form-floating label {
    color: #6b7280;
    font-weight: 500;
    padding-left: 0.5rem;
}

/* ===== BOTÃO PRINCIPAL ===== */
.btn-EDUTech-primary {
    background: var(--gradient-primary);
    border: none;
    border-radius: 12px;
    padding: 0.875rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    color: white;
    position: relative;
    z-index: 220;
    pointer-events: auto;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-lg);
}

.btn-EDUTech-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
    color: white;
}

.btn-EDUTech-primary:active {
    transform: translateY(0);
}

.login-button-bg {
    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.5s;
}

.btn-EDUTech-primary:hover .login-button-bg {
    left: 100%;
}

/* ===== TOGGLE PASSWORD ===== */
.toggle-password {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #6b7280;
    padding: 0;
    z-index: 10;
}

.toggle-password:hover {
    color: var(--primary-color);
}

/* ===== LINKS ===== */
.login-links {
    text-align: center;
    margin-top: 2rem;
}

.login-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    margin: 0 1rem;
    transition: all 0.3s ease;
}

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

.login-link.secondary {
    color: #6b7280;
}

/* ===== FOOTER ===== */
.login-footer {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e2e8f0;
}

.footer-text {
    color: #6b7280;
    font-size: 0.875rem;
    margin: 0;
}

/* ===== ADMIN INDICATOR ===== */
.admin-indicator {
    background: var(--gradient-secondary);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    margin-top: 0.5rem;
    text-align: center;
}

/* ===== ALERTAS ===== */
.alert {
    border: none;
    border-radius: 12px;
    padding: 1rem 1.5rem;
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.alert-success {
    background: rgba(79, 172, 254, 0.1);
    color: var(--success-color);
    border-left: 4px solid var(--success-color);
}

.alert-danger {
    background: rgba(250, 112, 154, 0.1);
    color: var(--danger-color);
    border-left: 4px solid var(--danger-color);
}

/* ===== RESPONSIVO ===== */
@media (max-width: 576px) {
    .login-card {
        padding: 2rem 1.5rem;
        margin: 1rem;
    }
    
    .brand-title-login {
        font-size: 1.5rem;
    }
    
    .login-title {
        font-size: 1.5rem;
    }
    
    .login-link {
        display: block;
        margin: 0.5rem 0;
    }
}

/* ===== ANIMAÇÕES DE ENTRADA ===== */
.fade-in {
    animation: fadeIn 0.6s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== PARTÍCULAS DE FUNDO ===== */
.login-particles {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow-x: hidden; overflow-y: auto;
    top: 0;
    left: 0;
    z-index: 1;
    pointer-events: none;
}

.login-particles::before,
.login-particles::after {
    content: "";
    position: absolute;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    animation: float 6s ease-in-out infinite;
    pointer-events: none;
    z-index: -1;
}

.login-particles::before {
    top: 10%;
    left: 10%;
    animation-delay: -2s;
}

.login-particles::after {
    bottom: 10%;
    right: 10%;
    animation-delay: -4s;
}

/* ===== MELHORIAS DE SCROLL E RESPONSIVIDADE ===== */

/* Permitir scroll em telas pequenas */
@media (max-height: 700px) {
    .login-page {
        min-height: auto;
        padding: 1rem 0;
    }
    
    .login-container {
        padding: 1rem 0;
    }
    
    .login-card {
        padding: 2rem 1.5rem;
    }
}

/* Melhorar visibilidade em telas pequenas */
@media (max-height: 600px) {
    .brand-container {
        margin-bottom: 1rem;
    }
    
    .login-header {
        margin-bottom: 1rem;
    }
    
    .login-input {
        margin-bottom: 1rem;
    }
    
    .brand-title-login {
        font-size: 1.5rem;
    }
    
    .login-title {
        font-size: 1.25rem;
    }
}

/* Garantir que o body tenha scroll quando necessário */
html, body {
    overflow-y: auto !important;
    height: auto !important;
}

/* Estilo para placeholder do logo */
.login-logo-placeholder {
    width: 80px;
    height: 80px;
    border-radius: 20px;
    margin: 0 auto 1rem;
    box-shadow: var(--shadow-lg);
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
}

/* Dashboard styles */
.bg-primary {
    background: var(--gradient-primary) !important;
}

.btn-primary {
    background: var(--gradient-primary);
    border: none;
}

.btn-primary:hover {
    background: var(--gradient-secondary);
    transform: translateY(-1px);
}



/* ===== EFEITOS INTERATIVOS ADICIONAIS ===== */

/* Efeito Ripple para botões */
.ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
    transform: scale(0);
    animation: ripple 0.6s linear;
    pointer-events: none;
}

@keyframes ripple {
    to {
        transform: scale(2.5);
        opacity: 0;
    }
}

/* Estados de botões */
.btn:not(:disabled), button:not(:disabled) {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn.clicked, button.clicked {
    transform: scale(0.98);
}

.btn.hovering, button.hovering {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Links clicáveis */
a.link-clicked {
    color: var(--accent-color) !important;
    transition: color 0.3s ease;
}

/* Cards interativos */
.card, .dashboard-card, .stat-card {
    transition: all 0.3s ease;
    cursor: pointer;
}

.card-hover, .dashboard-card:hover, .stat-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

/* Cores adicionais para cards */
.text-purple {
    color: #8B5CF6 !important;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* ===== CORREÇÕES ESPECÍFICAS PARA LOGIN ===== */
/* Garantir que elementos críticos sejam sempre clicáveis */
.login-form input,
.login-form select,
.login-form button,
.login-form .btn,
.toggle-password {
    pointer-events: auto !important;
    position: relative !important;
    z-index: 1000 !important;
    cursor: pointer !important;
}

.login-form input[type="email"],
.login-form input[type="password"],
.login-form input[type="text"] {
    cursor: text !important;
}

/* Garantir que o formulário tenha precedência sobre elementos de fundo */
.login-form {
    isolation: isolate;
    position: relative;
    z-index: 1000;
}

/* Elementos de fundo devem ser não-clicáveis */
.login-card::before,
.login-particles,
.login-particles::before,
.login-particles::after,
.login-page::before {
    pointer-events: none !important;
    z-index: -1 !important;
}

/* Card principal deve permitir cliques */
.login-card {
    pointer-events: auto;
    isolation: isolate;
}

/* Select dropdown específico */
select#unidade {
    -webkit-appearance: menulist !important;
    -moz-appearance: menulist !important;
    appearance: menulist !important;
    background-color: white !important;
    cursor: pointer !important;
}

/* Botão toggle de senha */
.toggle-password {
    background: transparent !important;
    border: none !important;
    cursor: pointer !important;
    z-index: 1001 !important;
}
