/* ===================================
   Estilos de Autenticação - Portal MG
   =================================== */

/* Reset e Variáveis */
:root {
    /* Cores principais - Dourado/Amarelo */
    --primary-color: #fbbf24;
    --primary-dark: #f59e0b;
    --primary-light: #fcd34d;

    /* Cores de status */
    --success-color: #0f9d58;
    --error-color: #d93025;
    --warning-color: #f9ab00;
    --info-color: #1a73e8;

    /* Cores neutras - Preto */
    --bg-color: #000000;
    --bg-secondary: #0a0a0a;
    --bg-card: #1a1a1a;
    --card-border: #2a2a2a;

    /* Texto */
    --text-primary: #ffffff;
    --text-secondary: #b0b0b0;
    --text-muted: #808080;

    /* Sombras */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 20px rgba(251, 191, 36, 0.3);

    /* Espaçamentos */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;

    /* Bordas */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;

    /* Transições */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* Reset Global */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-color);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    padding: var(--spacing-md);
    position: relative;
    overflow-x: hidden;
}

/* Efeito de fundo sutil */
body::before {
    content: '';
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(251, 191, 36, 0.03) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
    pointer-events: none;
    z-index: 0;
}

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

    to {
        transform: rotate(360deg);
    }
}

/* Container Principal */
.auth-container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 450px;
    animation: fadeInUp 0.6s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Card de Autenticação */
.auth-card {
    background-color: var(--bg-card);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl);
    box-shadow: var(--shadow-lg);
    transition: all var(--transition-normal);
    max-width: 450px;
    width: 100%;
}

.auth-card:hover {
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6);
    border-color: var(--primary-color);
}

/* Header */
.auth-header {
    text-align: center;
    margin-bottom: var(--spacing-lg);
}

.auth-logo {
    max-width: 200px;
    height: auto;
    margin: 0 auto var(--spacing-md);
    display: block;
}

.auth-header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--spacing-xs);
}

.auth-header p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 400;
}

/* Formulário */
.auth-form h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: var(--spacing-lg);
    color: var(--text-primary);
}

.form-group {
    margin-bottom: var(--spacing-md);
}

.form-group label {
    display: block;
    margin-bottom: var(--spacing-xs);
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 0.875rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 1rem;
    font-family: inherit;
    transition: all var(--transition-fast);
}

.form-group input::placeholder {
    color: var(--text-muted);
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.15);
}

.form-group input:hover:not(:focus) {
    border-color: rgba(255, 255, 255, 0.2);
}

/* Estados de erro */
.form-group input.error {
    border-color: var(--error-color);
    background: rgba(217, 48, 37, 0.05);
}

.form-group input.error:focus {
    box-shadow: 0 0 0 3px rgba(217, 48, 37, 0.1);
}

.error-message {
    display: block;
    color: var(--error-color);
    font-size: 0.85rem;
    margin-top: var(--spacing-xs);
    min-height: 1.2rem;
}

.help-text {
    display: block;
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-top: var(--spacing-xs);
}

/* Botões */
.btn-primary {
    width: 100%;
    padding: 0.875rem;
    background-color: var(--primary-color);
    color: #000000;
    border: none;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-normal);
    margin-top: var(--spacing-md);
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(251, 191, 36, 0.3);
}

.btn-primary::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;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 6px 20px rgba(251, 191, 36, 0.5);
}

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

/* Footer do formulário */
.auth-footer {
    margin-top: var(--spacing-lg);
    text-align: center;
    padding-top: var(--spacing-md);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.auth-footer p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.auth-footer a {
    color: var(--primary-light);
    text-decoration: none;
    font-weight: 600;
    transition: color var(--transition-fast);
}

.auth-footer a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

/* Mensagens Flash */
.flash-messages {
    margin-bottom: var(--spacing-md);
}

.flash-message {
    padding: 1rem;
    border-radius: var(--radius-sm);
    margin-bottom: var(--spacing-sm);
    font-size: 0.9rem;
    animation: slideIn 0.3s ease;
    border-left: 4px solid;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.flash-success {
    background: rgba(15, 157, 88, 0.1);
    border-color: var(--success-color);
    color: #4ade80;
}

.flash-error {
    background: rgba(217, 48, 37, 0.1);
    border-color: var(--error-color);
    color: #f87171;
}

.flash-warning {
    background: rgba(249, 171, 0, 0.1);
    border-color: var(--warning-color);
    color: #fbbf24;
}

.flash-info {
    background: rgba(26, 115, 232, 0.1);
    border-color: var(--info-color);
    color: #60a5fa;
}

/* Responsividade */
@media (max-width: 768px) {
    .auth-container {
        max-width: 100%;
    }

    .auth-card {
        padding: var(--spacing-lg);
    }

    .auth-header h1 {
        font-size: 1.75rem;
    }

    .auth-form h2 {
        font-size: 1.25rem;
    }
}

@media (max-width: 480px) {
    body {
        padding: var(--spacing-sm);
    }

    .auth-card {
        padding: var(--spacing-md);
    }

    .auth-header h1 {
        font-size: 1.5rem;
    }

    .form-group input {
        padding: 0.75rem;
    }

    .btn-primary {
        padding: 0.875rem;
    }
}

/* Acessibilidade */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Estados de foco para acessibilidade */
*:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}