/* BIG American OS — Login Styles (< 300 LOC) */
:root {
    --bg-dark: #09090b;
    --card-bg: #121215;
    --card-border: #27272a;
    --primary-red: #dc2626;
    --primary-hover: #b91c1c;
    --input-bg: #18181b;
    --input-border: #27272a;
    --text-white: #ffffff;
    --text-muted: #a1a1aa;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-white);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Background & Ambient Glow Effect */
.corpoO {
    position: relative; display: flex; align-items: center; justify-content: center;
    min-height: 100vh; padding: 100px 20px 40px;
    background: radial-gradient(circle at 50% 30%, #3a0007 0%, #0d0003 60%, var(--bg-dark) 100%);
    overflow: hidden;
}
.bg-glow {
    position: absolute; width: 600px; height: 600px;
    background: radial-gradient(circle, rgba(255, 51, 51, 0.25) 0%, rgba(0, 0, 0, 0) 70%);
    top: 50%; left: 50%; transform: translate(-50%, -50%); pointer-events: none;
    animation: pulseGlow 6s ease-in-out infinite alternate;
}
@keyframes pulseGlow {
    0% { transform: translate(-50%, -50%) scale(0.8); opacity: 0.5; }
    100% { transform: translate(-50%, -50%) scale(1.2); opacity: 0.9; }
}

/* Dynamic Rotating Gears */
.iconegirado {
    position: absolute; width: 750px; bottom: -350px; right: -350px;
    animation: rotate 140s linear infinite; opacity: 0.12; pointer-events: none;
}
.iconegirado-secundario {
    position: absolute; width: 500px; top: -220px; left: -220px;
    animation: rotateReverse 100s linear infinite; opacity: 0.08; pointer-events: none;
}
@keyframes rotate { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes rotateReverse { from { transform: rotate(360deg); } to { transform: rotate(0deg); } }

/* Card Modal */
.card-login {
    position: relative; z-index: 10; width: 100%; max-width: 440px;
    background: var(--card-bg);
    border: 1px solid var(--card-border); border-radius: 24px;
    padding: 0 32px 36px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.85);
    animation: cardAppear 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes cardAppear {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Large Logo (50% Above Card Edge) */
.logo-wrapper {
    position: relative; display: flex; justify-content: center; align-items: center;
    margin-top: -90px; margin-bottom: 20px;
}
.logotipo {
    position: relative; z-index: 2; width: 180px; height: 180px; object-fit: contain;
    filter: drop-shadow(0 12px 20px rgba(0, 0, 0, 0.6));
    transition: transform 0.3s ease;
}
.card-login:hover .logotipo { transform: scale(1.04); }

/* Card Header Title */
.card-header-title { text-align: center; margin-bottom: 24px; }
.card-header-title h2 { font-family: 'Outfit', sans-serif; font-size: 24px; font-weight: 800; letter-spacing: 0.5px; color: var(--text-white); }
.card-header-title h2 span { color: var(--primary-red); }
.card-header-title p { font-size: 13px; color: var(--text-muted); margin-top: 4px; font-weight: 500; }

/* Form & Inputs */
.form-grupo { margin-bottom: 20px; }
.form-grupo label { display: block; font-size: 13px; font-weight: 600; color: #e4e4e7; margin-bottom: 8px; }
.input-container { position: relative; display: flex; align-items: center; }
.input-icon { position: absolute; left: 14px; color: var(--text-muted); display: flex; align-items: center; pointer-events: none; transition: color 0.2s; }
.form-grupo input {
    width: 100%; padding: 14px 16px 14px 44px;
    background: var(--input-bg); border: 1px solid var(--input-border); border-radius: 12px;
    font-size: 15px; color: var(--text-white); font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.form-grupo input::placeholder { color: #52525b; }
.form-grupo input:focus {
    outline: none; background: #202024; border-color: var(--primary-red);
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.25);
}
.form-grupo input:focus + .input-icon, .input-container:focus-within .input-icon { color: var(--primary-red); }

/* Submit Button (Sem Sombra Vermelha) */
.botao {
    width: 100%; padding: 15px; margin-top: 10px;
    background: var(--primary-red); border: none; border-radius: 12px;
    color: var(--text-white); font-family: 'Outfit', sans-serif; font-size: 16px; font-weight: 700;
    letter-spacing: 0.5px; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4); transition: background-color 0.2s, transform 0.2s;
}
.botao:hover { background-color: var(--primary-hover); transform: translateY(-1px); box-shadow: 0 6px 16px rgba(0, 0, 0, 0.5); }
.botao:active { transform: translateY(0); box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4); }

/* Error Alert */
.erro {
    background: rgba(220, 38, 38, 0.15); border: 1px solid rgba(220, 38, 38, 0.4);
    color: #fca5a5; padding: 12px 16px; border-radius: 12px; margin-bottom: 20px;
    font-size: 14px; display: flex; align-items: center; gap: 10px;
}

/* Responsive Mobile Layout */
@media (max-width: 480px) {
    .corpoO { padding: 90px 16px 24px; }
    .card-login { padding: 0 20px 28px; border-radius: 20px; }
    .logo-wrapper { margin-top: -75px; }
    .logotipo { width: 150px; height: 150px; }
    .card-header-title h2 { font-size: 21px; }
    .form-grupo input { padding: 13px 14px 13px 40px; font-size: 14px; }
    .botao { padding: 14px; font-size: 15px; }
}