/* Reset e configurações básicas */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #e2e8f0;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%);
    overflow-x: hidden;
}

/* Cores da Fundação Mirim - Paleta Azul Corporativa */
:root {
    --primary-blue: #3b82f6;
    --primary-blue-dark: #1d4ed8;
    --primary-blue-light: #60a5fa;
    --secondary-blue: #1e40af;
    --accent-blue: #06b6d4;
    --dark-bg: #0f172a;
    --dark-bg-secondary: #1e293b;
    --dark-bg-tertiary: #334155;
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --border-color: #475569;
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    --shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2), 0 10px 10px -5px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 25px 50px -12px rgba(0, 0, 0, 0.4);
    --border-radius: 12px;
    --border-radius-lg: 16px;
}

/* Animações globais */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Toggle Password Eye Icon */
.toggle-password {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1.2rem;
    transition: color 0.3s ease;
    z-index: 10;
    padding: 5px;
}

.toggle-password:hover {
    color: var(--primary-blue);
}

.input-wrapper {
    position: relative;
}

.input-wrapper input[type="password"],
.input-wrapper input[type="text"] {
    padding-right: 50px !important;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

@keyframes shimmer {
    0% {
        background-position: -468px 0;
    }
    100% {
        background-position: 468px 0;
    }
}

/* Página de Login */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    position: relative;
    overflow: hidden;
}

.login-container {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 100vh;
    position: relative;
    z-index: 2;
}

.login-card {
    background: rgba(30, 41, 59, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(71, 85, 105, 0.3);
    padding: 3rem;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 450px;
    animation: fadeInUp 0.8s ease-out;
    position: relative;
    overflow: hidden;
}

.login-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.1), transparent);
    animation: shimmer 2s infinite;
}

.logo-container {
    text-align: center;
    margin-bottom: 2.5rem;
    animation: fadeInDown 0.8s ease-out 0.2s both;
}

.logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-blue-light));
    border-radius: 50%;
    margin-bottom: 1rem;
    animation: pulse 2s infinite;
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.3);
}

.logo i {
    font-size: 2.5rem;
    color: white;
}

.logo-container h1 {
    color: var(--text-primary);
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--primary-blue-light), var(--accent-blue));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo-container p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    font-weight: 400;
}

/* Formulário de Login */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.input-group {
    animation: slideInRight 0.8s ease-out;
}

.input-group:nth-child(1) { animation-delay: 0.3s; }
.input-group:nth-child(2) { animation-delay: 0.4s; }

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper i {
    position: absolute;
    left: 1rem;
    color: var(--text-muted);
    font-size: 1.1rem;
    z-index: 2;
}

.input-wrapper input {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    background: rgba(15, 23, 42, 0.8);
    border: 2px solid rgba(71, 85, 105, 0.3);
    border-radius: var(--border-radius);
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.input-wrapper input:focus {
    outline: none;
    border-color: var(--primary-blue);
    background: rgba(15, 23, 42, 0.95);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    transform: translateY(-2px);
}

.input-wrapper input::placeholder {
    color: var(--text-muted);
}

.toggle-password {
    position: absolute;
    right: 1rem;
    cursor: pointer;
    color: var(--text-muted);
    transition: color 0.3s ease;
    z-index: 2;
}

.toggle-password:hover {
    color: var(--primary-blue-light);
}

.login-btn {
    width: 100%;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-blue-dark));
    border: none;
    border-radius: var(--border-radius);
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    animation: slideInRight 0.8s ease-out 0.5s both;
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.3);
}

.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.5s;
}

.login-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(59, 130, 246, 0.4);
}

.login-btn:hover::before {
    left: 100%;
}

.login-btn:active {
    transform: translateY(-1px);
}

.login-btn i {
    margin-right: 0.5rem;
}

.login-footer {
    text-align: center;
    margin-top: 2rem;
    animation: fadeInUp 0.8s ease-out 0.6s both;
}

.login-footer p {
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.login-footer a {
    color: var(--primary-blue-light);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.login-footer a:hover {
    color: var(--accent-blue);
    text-decoration: underline;
}

/* Animação de fundo */
.background-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.circle {
    position: absolute;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(6, 182, 212, 0.1));
    animation: float 6s ease-in-out infinite;
}

.circle-1 {
    width: 300px;
    height: 300px;
    top: 10%;
    left: 10%;
    animation-delay: 0s;
    animation-duration: 8s;
}

.circle-2 {
    width: 200px;
    height: 200px;
    top: 60%;
    right: 10%;
    animation-delay: 2s;
    animation-duration: 6s;
}

.circle-3 {
    width: 150px;
    height: 150px;
    bottom: 10%;
    left: 50%;
    animation-delay: 4s;
    animation-duration: 7s;
}

/* Responsividade */
@media (max-width: 768px) {
    .login-card {
        margin: 1rem;
        padding: 2rem;
    }
    
    .logo-container h1 {
        font-size: 1.75rem;
    }
    
    .logo {
        width: 70px;
        height: 70px;
    }
    
    .logo i {
        font-size: 2rem;
    }
    
    .circle-1, .circle-2, .circle-3 {
        opacity: 0.3;
    }
}

@media (max-width: 480px) {
    .login-card {
        padding: 1.5rem;
    }
    
    .logo-container h1 {
        font-size: 1.5rem;
    }
    
    .input-wrapper input {
        padding: 0.875rem 0.875rem 0.875rem 2.5rem;
    }
    
    .login-btn {
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
    }
}

/* Estados de loading */
.loading {
    opacity: 0.7;
    pointer-events: none;
}

.loading .login-btn {
    background: linear-gradient(135deg, var(--text-muted), var(--border-color));
}

.loading .login-btn::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    margin: auto;
    border: 2px solid transparent;
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Alerts e notificações */
.alert {
    padding: 1rem 1.25rem;
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    animation: slideInRight 0.5s ease-out;
}

.alert i {
    margin-right: 0.75rem;
    font-size: 1.1rem;
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #10b981;
}

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
}

.alert-warning {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.3);
    color: #f59e0b;
}

.alert-info {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: var(--primary-blue-light);
}
