/* ==========================================================
   LOGIN — IDENTIDADE VISUAL RVC
   ========================================================== */

:root {
    font-family: 'Inter', sans-serif;
    color-scheme: dark;
}

* {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
    margin: 0;
}

body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    background:
        radial-gradient(circle at 15% 15%, rgba(59, 130, 246, 0.16), transparent 32%),
        linear-gradient(135deg, #0d1117, #172338 55%, #0d1524);
    color: #e6edf7;
    transition: background 0.25s ease, color 0.25s ease;
}

main {
    width: 100%;
    max-width: 460px;
}

.auth-container {
    width: 100%;
    padding: 38px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 22px;
    background: linear-gradient(145deg, #1e293b, #172235);
    box-shadow: 0 24px 65px rgba(0, 0, 0, 0.35);
}

.auth-header {
    text-align: center;
    margin-bottom: 30px;
}

.logo {
    width: 82px;
    height: 82px;
    display: grid;
    place-items: center;
    margin: 0 auto 20px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(148, 163, 184, 0.2);
}

.logo img {
    width: 62px;
    height: 62px;
    object-fit: contain;
}

.auth-header h1 {
    margin: 0;
    color: #f8fafc;
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1.4;
}

.subtitle {
    margin: 9px 0 0;
    color: #94a3b8;
    font-size: 0.9rem;
}

.theme-toggle {
    position: fixed;
    top: 22px;
    right: 22px;
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(148, 163, 184, 0.25);
    border-radius: 13px;
    background: #1e293b;
    color: #fbbf24;
    cursor: pointer;
    transition: 0.2s ease;
}

.theme-toggle:hover {
    transform: translateY(-2px);
    border-color: #60a5fa;
}

.theme-toggle .icon-light {
    display: none;
}

.theme-toggle .icon-dark {
    display: inline;
}

.campo {
    margin-bottom: 20px;
}

.campo label {
    display: block;
    margin-bottom: 8px;
    color: #cbd5e1;
    font-size: 0.88rem;
    font-weight: 600;
}

.input-wrapper {
    min-height: 50px;
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 0 14px;
    border: 1px solid #475569;
    border-radius: 11px;
    background: #111c2e;
    color: #94a3b8;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.input-wrapper:focus-within {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.16);
}

.input-wrapper .material-symbols-outlined {
    font-size: 21px;
    color: #60a5fa;
}

.input-wrapper input {
    width: 100%;
    min-width: 0;
    height: 48px;
    border: 0;
    outline: 0;
    background: transparent;
    color: #f8fafc;
    font: inherit;
    font-size: 0.92rem;
}

.input-wrapper input::placeholder {
    color: #64748b;
}

.campo-checkbox {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 2px 0 23px;
}

.campo-checkbox input {
    width: 16px;
    height: 16px;
    accent-color: #3b82f6;
    cursor: pointer;
}

.campo-checkbox label {
    color: #cbd5e1;
    font-size: 0.86rem;
    cursor: pointer;
}

form > button {
    width: 100%;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    border: 0;
    border-radius: 11px;
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    color: #ffffff;
    font-family: inherit;
    font-size: 0.96rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.25);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

form > button:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 25px rgba(37, 99, 235, 0.35);
}

.auth-container footer {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 25px;
}

.auth-container a {
    color: #60a5fa;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s ease;
}

.auth-container a:hover {
    color: #93c5fd;
    text-decoration: underline;
}

.google-login {
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
    border: 1px solid #475569;
    border-radius: 11px;
    color: #e2e8f0 !important;
}

.google-mark {
    font-size: 1.1rem;
    font-weight: 800;
    color: #60a5fa;
}

.login-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 22px;
    color: #94a3b8;
    font-size: 0.78rem;
}

.login-divider::before,
.login-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: #475569;
}

.flash-messages {
    margin-bottom: 20px;
}

.alert {
    padding: 12px 14px;
    margin-bottom: 10px;
    border: 1px solid transparent;
    border-radius: 10px;
    font-size: 0.86rem;
}

.alert-success {
    background: rgba(22, 163, 74, 0.14);
    border-color: rgba(34, 197, 94, 0.3);
    color: #86efac;
}

.alert-danger,
.alert-error {
    background: rgba(220, 38, 38, 0.14);
    border-color: rgba(248, 113, 113, 0.3);
    color: #fca5a5;
}

.alert-warning {
    background: rgba(217, 119, 6, 0.14);
    border-color: rgba(251, 191, 36, 0.3);
    color: #fcd34d;
}

.alert-info {
    background: rgba(37, 99, 235, 0.14);
    border-color: rgba(96, 165, 250, 0.3);
    color: #93c5fd;
}

/* ==========================================================
   TEMA CLARO
   ========================================================== */

html[data-theme="light"] {
    color-scheme: light;
}

html[data-theme="light"] body {
    background:
        radial-gradient(circle at 15% 15%, rgba(59, 130, 246, 0.10), transparent 32%),
        linear-gradient(135deg, #e2e8f0, #f1f5f9);
    color: #263445;
}

html[data-theme="light"] .auth-container {
    background: #ffffff;
    border-color: #dbe3ed;
    box-shadow: 0 22px 55px rgba(15, 23, 42, 0.12);
}

html[data-theme="light"] .auth-header h1 {
    color: #172b4d;
}

html[data-theme="light"] .subtitle {
    color: #64748b;
}

html[data-theme="light"] .logo {
    background: #f1f5f9;
    border-color: #dbe3ed;
}

html[data-theme="light"] .theme-toggle {
    background: #ffffff;
    color: #2563eb;
    border-color: #dbe3ed;
}

html[data-theme="light"] .theme-toggle .icon-light {
    display: inline;
}

html[data-theme="light"] .theme-toggle .icon-dark {
    display: none;
}

html[data-theme="light"] .campo label {
    color: #334155;
}

html[data-theme="light"] .input-wrapper {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #64748b;
}

html[data-theme="light"] .input-wrapper input {
    color: #1e293b;
}

html[data-theme="light"] .input-wrapper input::placeholder {
    color: #94a3b8;
}

html[data-theme="light"] .campo-checkbox label {
    color: #475569;
}

html[data-theme="light"] .google-login {
    color: #334155 !important;
    border-color: #cbd5e1;
}

html[data-theme="light"] .login-divider {
    color: #64748b;
}

html[data-theme="light"] .login-divider::before,
html[data-theme="light"] .login-divider::after {
    background: #cbd5e1;
}

/* ==========================================================
   RESPONSIVIDADE
   ========================================================== */

@media (max-width: 520px) {
    body {
        padding: 65px 16px 25px;
    }

    .auth-container {
        padding: 28px 22px;
        border-radius: 18px;
    }

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

    .theme-toggle {
        top: 12px;
        right: 12px;
    }

    .auth-container footer {
        flex-direction: column;
        align-items: center;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }
}
