:root {
    --bg-dark: #0A0E12;
    --bg-panel: rgba(13, 20, 38, 0.4);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --accent-cyan: #0ab9c5;
    --accent-cyan-dim: rgba(10, 185, 197, 0.2);
    --border-glass: rgba(255, 255, 255, 0.15);
    
    --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
    --font-display: 'Inter', system-ui, -apple-system, sans-serif;

    /* Paleta de gráficos — Skip Shade (decorativa; 1 cor por gráfico) */
    --chart-1: #1B5FAA;
    --chart-2: #0097D1;
    --chart-3: #00CBD7;
    --chart-4: #71FACA;

    /* Timing Unificado */
    --dur: 300ms;
    --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

/* Stagger Animation */
.stagger-item {
    opacity: 0;
    transform: translateY(10px);
}

@media (prefers-reduced-motion: no-preference) {
    .stagger-item {
        animation: fadeUpIn 0.6s var(--ease) forwards;
    }
    .stagger-1 { animation-delay: 0.1s; }
    .stagger-2 { animation-delay: 0.2s; }
    .stagger-3 { animation-delay: 0.3s; }
    .stagger-4 { animation-delay: 0.4s; }
}

@media (prefers-reduced-motion: reduce) {
    .stagger-item {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

body {
    font-family: var(--font-sans);
    background-color: var(--bg-dark);
    color: var(--text-primary);
    min-height: 100vh;
    overflow: hidden;
}

.split-container {
    display: flex; height: 100vh; width: 100vw;
}

/* Esquerda: Estrutura Estática/Câmera Fixa */
.split-left {
    flex: 2.5; /* Foto mais ampla, 71% da tela */
    position: relative;
    overflow: hidden;
    -webkit-mask-image: linear-gradient(to right, black 85%, transparent 100%);
    mask-image: linear-gradient(to right, black 85%, transparent 100%);
}

.hero-bg-layer {
    position: absolute;
    top: -2%; left: -2%; right: -2%; bottom: -2%;
    background: url('../assets/fleet_photo_bg.png') center/cover no-repeat;
    z-index: 1;
}

/* Movimento devagarzinho (Ken Burns) — só a foto; o degradê é camada separada e fica intacto */
@media (prefers-reduced-motion: no-preference) {
    .hero-bg-layer {
        transform-origin: center;
        will-change: transform;
        animation: kenburns 30s ease-in-out infinite alternate;
    }
}

@keyframes kenburns {
    0%   { transform: scale(1.08) translate(0, 0); }
    100% { transform: scale(1.20) translate(-2.5%, -1.5%); }
}

/* Suavização de faróis e contraste (Overlay ligeiramente mais denso) */
.hero-atmosphere {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(to top right, rgba(10, 14, 25, 0.98) 0%, rgba(10, 14, 25, 0.85) 35%, rgba(10, 14, 25, 0.5) 100%);
    z-index: 2;
}

.content-layer {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 3;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 4rem 4rem 8rem 4rem;
}

/* Animações removidas (apenas logo animado em JS puro agora) */
@media (prefers-reduced-motion: no-preference) {
    /* Hover Táctil Botão */
    .btn-primary:active { transform: scale(0.98); }
}

/* Identidade / Telemetria */
.logo-badge {
    margin-bottom: 0.5rem;
    filter: drop-shadow(0 4px 10px rgba(0,0,0,0.8));
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo-text h1 {
    font-family: var(--font-display);
    font-size: 3rem;
    font-weight: 700;
    letter-spacing: -1px;
    color: var(--text-primary);
}

.title-accent { color: var(--accent-cyan); }

.telemetry-visual p {
    font-family: var(--font-sans);
    font-size: 1.25rem;
    color: var(--text-primary);
    text-shadow: 0 4px 12px rgba(0,0,0,0.9);
    max-width: 400px;
    margin-left: 0.5rem;
    margin-bottom: 2rem;
}

/* KPIs Iniciais */
.kpi-dashboard {
    display: flex;
    gap: 1rem;
    margin-left: 0.5rem;
}

.kpi-card {
    background: rgba(13, 20, 38, 0.5);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    min-width: 120px;
}

.kpi-value {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-cyan);
    margin-bottom: 0.25rem;
}

.kpi-label {
    font-family: var(--font-sans);
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.kpi-unit-pre { margin-left: 0; margin-right: 3px; }


/* Direita: Formulário */
.split-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(700px 300px at -10% 110%, rgba(27, 95, 170, 0.10), transparent 60%),
        var(--bg-dark);
    padding: 2rem;
    position: relative;
    z-index: 10;
}

.split-right::before {
    content: '';
    position: absolute;
    width: 400px; height: 400px;
    background: radial-gradient(circle, var(--accent-cyan-dim) 0%, transparent 60%);
    z-index: 0; opacity: 0.5; pointer-events: none;
}

.glass-panel {
    background: var(--bg-panel);
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-glass);
    border-radius: 16px; padding: 3rem;
    width: 100%; max-width: 450px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    position: relative; z-index: 1;
    transition: all var(--dur) var(--ease);
}

.glass-panel:hover {
    box-shadow: 0 0 40px var(--accent-cyan-dim), inset 0 1px 0 rgba(255, 255, 255, 0.15);
    border-color: rgba(10, 185, 197, 0.3);
}

.glass-panel h2 {
    font-family: var(--font-display);
    font-size: 1.8rem;
    margin-bottom: 0.5rem; color: var(--text-primary); font-weight: 700;
}

.subtitle {
    color: var(--text-secondary); margin-bottom: 2rem; font-size: 0.95rem;
}

.input-group { margin-bottom: 1.5rem; }
.input-group label {
    display: block; font-size: 0.85rem; font-weight: 500;
    margin-bottom: 0.5rem; color: var(--text-secondary);
    text-transform: uppercase; letter-spacing: 0.5px;
}

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

.input-group input:focus {
    outline: none; background: rgba(0, 0, 0, 0.5);
    border-color: var(--accent-cyan);
    box-shadow: 0 0 10px var(--accent-cyan-dim), inset 0 0 5px rgba(10,185,197,0.2);
}

.forgot-link {
    display: block; text-align: right; margin-top: 0.5rem; font-size: 0.85rem;
    color: var(--text-secondary); text-decoration: none; transition: color var(--dur) var(--ease);
}
.forgot-link:hover { color: var(--text-primary); }

.action-buttons { display: flex; flex-direction: column; gap: 1rem; margin-top: 2rem; }
.btn {
    width: 100%; padding: 0.875rem; border-radius: 8px;
    font-family: inherit; font-weight: 600; font-size: 1rem;
    cursor: pointer; transition: all var(--dur) var(--ease); border: none;
}
.btn-primary {
    background: linear-gradient(135deg, var(--accent-cyan) 0%, #067c85 100%);
    color: #f8fafc; box-shadow: none; text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}
.btn-primary:hover {
    background: linear-gradient(135deg, #0dcad7 0%, #089ba6 100%);
    box-shadow: 0 0 25px rgba(10, 185, 197, 0.4);
}
.btn-secondary {
    background: transparent; color: var(--text-secondary); border: 1px solid var(--border-glass);
}
.btn-secondary:hover { background: rgba(255, 255, 255, 0.03); color: var(--text-primary); }

.status-message {
    padding: 1rem; border-radius: 8px; margin-top: 1rem;
    font-size: 0.9rem; text-align: center; background: rgba(255,255,255,0.05);
    border: 1px solid var(--border-glass);
}
.hidden { display: none !important; }

.auth-success { text-align: center; padding: 2rem 0; }
.auth-success h3 { font-family: var(--font-display); margin-bottom: 1rem; color: var(--accent-cyan); }
.auth-success p { color: var(--text-secondary); margin-bottom: 2rem; }

.footer-note {
    margin-top: 2rem; text-align: center; font-size: 0.75rem;
    color: rgba(148, 163, 184, 0.5); letter-spacing: 0.5px; z-index: 1;
}

@media (max-width: 900px) {
    .split-container { flex-direction: column; }
    .split-left { flex: 0.5; padding: 2rem; }
    .content-layer { padding: 2rem; }
    .split-right { flex: 1; }
}
