@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

/* --- DESIGN SYSTEM & VARIÁVEIS --- */
:root {
    --primary: #0284c7;       /* Azul Ciano Tecnológico */
    --primary-hover: #0369a1;
    --primary-light: #e0f2fe;
    
    --accent: #10b981;        /* Verde Elétrico de Carga */
    --accent-hover: #059669;
    --accent-light: #d1fae5;
    
    --warning: #f59e0b;       /* Laranja para alertas */
    --danger: #ef4444;        /* Vermelho para ocupado/erro */
    
    --dark: #0f172a;          /* Slate 900 para textos escuros */
    --dark-muted: #475569;    /* Slate 600 para textos secundários */
    
    --light-bg: #f8fafc;      /* Slate 50 para fundos de seção */
    --white: #ffffff;
    
    --border-color: rgba(226, 232, 240, 0.8);
    --glass-bg: rgba(255, 255, 255, 0.75);
    --glass-border: rgba(255, 255, 255, 0.6);
    --glass-shadow: 0 8px 32px 0 rgba(15, 23, 42, 0.05);
    
    --font-family: 'Plus Jakarta Sans', sans-serif;
    
    --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    --transition-bounce: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* --- RESET & BASE --- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    overflow-x: hidden;
}

body {
    font-family: var(--font-family);
    background-color: #fcfdfe;
    color: var(--dark);
    line-height: 1.6;
    overflow-x: hidden;
    /* Mesh Gradient de Fundo Clara */
    background-image: 
        radial-gradient(at 0% 0%, rgba(16, 185, 129, 0.06) 0px, transparent 40%),
        radial-gradient(at 90% 10%, rgba(14, 165, 233, 0.08) 0px, transparent 45%),
        radial-gradient(at 50% 90%, rgba(16, 185, 129, 0.04) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(14, 165, 233, 0.05) 0px, transparent 40%);
    background-attachment: fixed;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.02em;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-smooth);
}

button, input, select {
    font-family: inherit;
    outline: none;
}

/* --- SCROLLBAR --- */
::-webkit-scrollbar {
    width: 10px;
}
::-webkit-scrollbar-track {
    background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 5px;
    border: 2px solid #f1f5f9;
}
::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* --- EFEITO PARALLAX COMPLEMENTAR (FLOATING OBJECTS) --- */
.parallax-bg-element {
    position: absolute;
    pointer-events: none;
    z-index: 1;
    filter: blur(8px);
    opacity: 0.45;
    transition: transform 0.1s ease-out;
}

.parallax-circle-1 {
    top: 15%;
    left: 8%;
    width: 250px;
    height: 250px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.2) 0%, rgba(16, 185, 129, 0) 70%);
}

.parallax-circle-2 {
    top: 45%;
    right: 5%;
    width: 350px;
    height: 350px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(14, 165, 233, 0.15) 0%, rgba(14, 165, 233, 0) 70%);
}

.parallax-circle-3 {
    top: 75%;
    left: 10%;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.12) 0%, rgba(16, 185, 129, 0) 70%);
}

/* --- HEADER / NAVIGATION --- */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1.25rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition-smooth);
}

header.scrolled {
    padding: 0.8rem 5%;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
    background: rgba(255, 255, 255, 0.85);
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--dark);
    letter-spacing: -0.03em;
}

.logo span {
    color: var(--accent);
    position: relative;
}

.logo span::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--accent);
    border-radius: 2px;
}

.logo svg {
    width: 28px;
    height: 28px;
    stroke: var(--accent);
    stroke-width: 2.5;
    fill: none;
    animation: pulseGlow 3s infinite;
}

nav {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    font-weight: 550;
    color: var(--dark-muted);
    font-size: 0.95rem;
    position: relative;
    padding: 0.5rem 0;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: var(--transition-smooth);
    border-radius: 2px;
}

.nav-links a:hover {
    color: var(--primary);
}

.nav-links a:hover::after {
    width: 100%;
}

.btn-header {
    background: linear-gradient(135deg, var(--primary) 0%, #0284c7 100%);
    color: var(--white) !important;
    padding: 0.65rem 1.4rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9rem;
    box-shadow: 0 4px 14px rgba(2, 132, 199, 0.25);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border: none;
    cursor: pointer;
}

.btn-header:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(2, 132, 199, 0.35);
}

.btn-header:active {
    transform: translateY(0);
}

/* --- HERO SECTION WITH PARALLAX --- */
.hero {
    position: relative;
    min-height: 100vh;
    padding: 8.5rem 5% 4rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    overflow: hidden;
}

.hero-content {
    max-width: 50%;
    position: relative;
    z-index: 5;
}

.badge-hero {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--accent-light);
    color: var(--accent-hover);
    padding: 0.4rem 1rem;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(16, 185, 129, 0.2);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.05);
}

.badge-hero svg {
    animation: pulseGlow 1.5s infinite;
}

.hero h1 {
    font-size: 4rem;
    line-height: 1.1;
    color: var(--dark);
    margin-bottom: 1.5rem;
    font-weight: 800;
}

.hero h1 span.gradient-text {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    font-size: 1.15rem;
    color: var(--dark-muted);
    margin-bottom: 2.5rem;
    max-width: 90%;
}

.hero-actions {
    display: flex;
    gap: 1.25rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent) 0%, #059669 100%);
    color: var(--white);
    padding: 0.9rem 2.2rem;
    border-radius: 50px;
    font-weight: 700;
    box-shadow: 0 10px 20px rgba(16, 185, 129, 0.25);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    transition: var(--transition-bounce);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 25px rgba(16, 185, 129, 0.35);
}

.btn-secondary {
    background: var(--white);
    color: var(--dark);
    padding: 0.9rem 2.2rem;
    border-radius: 50px;
    font-weight: 700;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.02);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border: 1px solid var(--border-color);
    cursor: pointer;
    font-size: 1rem;
    transition: var(--transition-bounce);
}

.btn-secondary:hover {
    background: var(--light-bg);
    transform: translateY(-3px);
    box-shadow: 0 12px 22px rgba(0, 0, 0, 0.05);
}

/* Hero Parallax Visual */
.hero-visual {
    position: relative;
    width: 45%;
    height: 550px;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 3;
}

.parallax-container {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    perspective: 1000px;
}

.parallax-layer {
    position: absolute;
    will-change: transform;
    transition: transform 0.15s cubic-bezier(0.25, 1, 0.5, 1);
}

/* Layer Estática/De Fundo */
.layer-grid {
    width: 110%;
    height: 110%;
    top: -5%;
    left: -5%;
    background-image: 
        linear-gradient(rgba(2, 132, 199, 0.05) 1.5px, transparent 1.5px),
        linear-gradient(90deg, rgba(2, 132, 199, 0.05) 1.5px, transparent 1.5px);
    background-size: 40px 40px;
    mask-image: radial-gradient(ellipse at center, black, transparent 75%);
    -webkit-mask-image: radial-gradient(ellipse at center, black, transparent 75%);
}

.layer-glow {
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.15) 0%, rgba(14, 165, 233, 0.05) 50%, rgba(255, 255, 255, 0) 70%);
}

/* Carro Elétrico Parallax */
.layer-car {
    width: 100%;
    height: auto;
    bottom: 5%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.layer-car img {
    width: 85%;
    height: auto;
    filter: drop-shadow(0 25px 35px rgba(15, 23, 42, 0.12));
}

/* Estação de Recarga flutuante */
.layer-charger {
    top: 15%;
    right: 0%;
    width: 250px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(12px);
    border-radius: 24px;
    padding: 1.5rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.06);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.charger-status {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.charger-tag {
    background: var(--accent-light);
    color: var(--accent-hover);
    padding: 0.25rem 0.6rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
}

.charger-power-circle {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.power-ring {
    position: relative;
    width: 65px;
    height: 65px;
}

.power-ring svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.power-ring circle {
    fill: none;
    stroke-width: 6;
}

.power-ring circle.bg {
    stroke: var(--light-bg);
}

.power-ring circle.fg {
    stroke: var(--accent);
    stroke-linecap: round;
    stroke-dasharray: 176;
    stroke-dashoffset: 44; /* 75% */
    animation: dashFill 2.5s ease-out forwards;
}

.power-ring .value {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-weight: 700;
    font-size: 0.95rem;
}

.charger-stats-text {
    font-size: 0.85rem;
    color: var(--dark-muted);
}

/* Card de Economia flutuante */
.layer-card-float {
    bottom: 15%;
    left: -10%;
    width: 240px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(12px);
    border-radius: 20px;
    padding: 1.25rem;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.float-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--primary-light);
    color: var(--primary);
    display: flex;
    justify-content: center;
    align-items: center;
}

.float-info h4 {
    font-size: 0.85rem;
    color: var(--dark-muted);
    font-weight: 500;
}

.float-info p {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--dark);
    margin: 0;
}

/* --- SECTIONS COM REVELAÇÃO NO SCROLL --- */
.section-reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.section-reveal.active {
    opacity: 1;
    transform: translateY(0);
}

section.features, section.calculator, section.map-section {
    padding: 7rem 5%;
    position: relative;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
    position: relative;
    z-index: 5;
}

.section-header .section-tag {
    color: var(--primary);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.08em;
    margin-bottom: 0.5rem;
    display: block;
}

.section-header h2 {
    font-size: 2.75rem;
    color: var(--dark);
    max-width: 600px;
    margin: 0 auto 1rem;
    font-weight: 800;
}

.section-header p {
    color: var(--dark-muted);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

/* --- FEATURES GRID (INTERACTIVE DEPTH CARDS) --- */
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    position: relative;
    z-index: 5;
}

.feature-card {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 3rem 2.25rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.01);
    transition: var(--transition-bounce);
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 100%);
    opacity: 0;
    transition: var(--transition-smooth);
}

.feature-icon-wrapper {
    width: 64px;
    height: 64px;
    border-radius: 18px;
    background: var(--light-bg);
    color: var(--primary);
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 2rem;
    transition: var(--transition-bounce);
}

.feature-icon-wrapper svg {
    width: 32px;
    height: 32px;
    stroke-width: 2;
    transition: var(--transition-smooth);
}

.feature-card h3 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
    color: var(--dark);
    font-weight: 700;
}

.feature-card p {
    color: var(--dark-muted);
    font-size: 0.98rem;
    line-height: 1.6;
}

/* Hover Efeitos nos Cartões */
.feature-card:hover {
    transform: translateY(-8px) scale(1.01);
    box-shadow: 0 20px 45px rgba(15, 23, 42, 0.06);
    border-color: rgba(2, 132, 199, 0.15);
}

.feature-card:hover::before {
    opacity: 1;
}

.feature-card:hover .feature-icon-wrapper {
    background: var(--primary-light);
    color: var(--primary);
    transform: scale(1.1) rotate(5deg);
}

.feature-card:nth-child(2):hover .feature-icon-wrapper {
    background: var(--accent-light);
    color: var(--accent);
}

/* --- CALCULATOR SECTION --- */
.calculator-container {
    display: flex;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(20px);
    border-radius: 32px;
    box-shadow: var(--glass-shadow);
    overflow: hidden;
    position: relative;
    z-index: 5;
}

.calc-sliders {
    flex: 1.2;
    padding: 3.5rem;
    border-right: 1px solid var(--border-color);
}

.calc-results {
    flex: 0.8;
    padding: 3.5rem;
    background: rgba(2, 132, 199, 0.02);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.slider-group {
    margin-bottom: 2.5rem;
}

.slider-group label {
    display: flex;
    justify-content: space-between;
    font-weight: 600;
    margin-bottom: 0.8rem;
    color: var(--dark);
}

.slider-group label span.value {
    color: var(--primary);
    font-weight: 700;
}

/* Custom Input Range */
.slider-group input[type="range"] {
    -webkit-appearance: none;
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: #e2e8f0;
    outline: none;
}

.slider-group input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--primary);
    border: 4px solid var(--white);
    box-shadow: 0 4px 10px rgba(2, 132, 199, 0.3);
    cursor: pointer;
    transition: var(--transition-smooth);
}

.slider-group input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.15);
}

.result-card {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.01);
}

.result-label {
    font-size: 0.85rem;
    color: var(--dark-muted);
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.result-value {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--dark);
}

.result-card.saving {
    background: linear-gradient(135deg, var(--accent-light) 0%, rgba(16, 185, 129, 0.05) 100%);
    border-color: rgba(16, 185, 129, 0.2);
}

.result-card.saving .result-value {
    color: var(--accent-hover);
    font-size: 2.2rem;
}

.calc-note {
    font-size: 0.8rem;
    color: var(--dark-muted);
    text-align: center;
}

/* --- MAPA E LOCALIZADOR DE ELETROPOSTOS --- */
.map-layout {
    display: flex;
    gap: 2rem;
    height: 550px;
    position: relative;
    z-index: 5;
}

.stations-sidebar {
    flex: 0.7;
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 1.5rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.01);
}

.map-wrapper {
    flex: 1.3;
    border-radius: 24px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    position: relative;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
}

/* Mock Map Vectorial Visual */
.vector-map-bg {
    width: 100%;
    height: 100%;
    background-color: #f1f5f9;
    background-image: 
        radial-gradient(rgba(148, 163, 184, 0.15) 1.5px, transparent 1.5px),
        radial-gradient(rgba(148, 163, 184, 0.15) 1.5px, transparent 1.5px);
    background-size: 24px 24px;
    background-position: 0 0, 12px 12px;
    position: relative;
}

/* Estradas/Linhas ilustrativas no mapa */
.map-road {
    position: absolute;
    background: rgba(226, 232, 240, 0.9);
    border-radius: 5px;
}

.map-road.r1 { top: 30%; left: 0; width: 100%; height: 16px; transform: rotate(-5deg); }
.map-road.r2 { left: 40%; top: 0; width: 20px; height: 100%; transform: rotate(10deg); }
.map-road.r3 { bottom: 20%; left: 0; width: 100%; height: 12px; transform: rotate(5deg); }

/* Marcadores de Eletroposto */
.map-marker {
    position: absolute;
    width: 38px;
    height: 38px;
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg) translate(0, 0);
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: var(--transition-bounce);
    box-shadow: -4px 4px 10px rgba(0,0,0,0.1);
}

.map-marker::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    background: var(--white);
    border-radius: 50%;
}

.map-marker svg {
    transform: rotate(45deg);
    width: 16px;
    height: 16px;
    z-index: 10;
    stroke: var(--white);
    fill: var(--white);
}

.map-marker.available { background-color: var(--accent); }
.map-marker.busy { background-color: var(--danger); }
.map-marker.selected {
    transform: rotate(-45deg) scale(1.2);
    box-shadow: -8px 8px 15px rgba(0,0,0,0.15);
}

.station-item {
    background: var(--light-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.25rem;
    cursor: pointer;
    transition: var(--transition-smooth);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.station-item.active, .station-item:hover {
    border-color: var(--primary);
    background: var(--white);
    box-shadow: 0 10px 20px rgba(2, 132, 199, 0.05);
}

.station-info h4 {
    font-size: 0.98rem;
    color: var(--dark);
    margin-bottom: 0.25rem;
}

.station-info p {
    font-size: 0.8rem;
    color: var(--dark-muted);
}

.station-status-tag {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.25rem 0.6rem;
    border-radius: 50px;
}

.station-status-tag.available {
    background: var(--accent-light);
    color: var(--accent-hover);
}

.station-status-tag.busy {
    background: #ffe4e6;
    color: var(--danger);
}

/* Tooltip do Mapa */
.map-tooltip {
    position: absolute;
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1rem;
    width: 220px;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.08);
    display: none;
    z-index: 50;
    pointer-events: none;
    transform: translate(-50%, -115%);
    transition: opacity 0.2s ease;
}

.map-tooltip h5 {
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.map-tooltip p {
    font-size: 0.75rem;
    color: var(--dark-muted);
}

/* --- SISTEMA COMPLETO: PORTAL INTERATIVO (MODAL / OVERLAY) --- */
.portal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(12px);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.portal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.portal-container {
    width: 92%;
    max-width: 1280px;
    height: 85vh;
    background: var(--white);
    border-radius: 32px;
    border: 1px solid var(--border-color);
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    display: flex;
    transform: scale(0.95);
    transition: var(--transition-bounce);
}

.portal-overlay.active .portal-container {
    transform: scale(1);
}

/* Sidebar do Portal */
.portal-sidebar {
    width: 260px;
    background: var(--light-bg);
    border-right: 1px solid var(--border-color);
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.portal-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.portal-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 800;
    font-size: 1.25rem;
    margin-bottom: 2rem;
}

.portal-logo svg {
    width: 24px;
    height: 24px;
    stroke: var(--accent);
}

.portal-nav-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1.25rem;
    border: none;
    background: transparent;
    border-radius: 14px;
    color: var(--dark-muted);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    text-align: left;
    transition: var(--transition-smooth);
}

.portal-nav-btn svg {
    width: 20px;
    height: 20px;
}

.portal-nav-btn.active, .portal-nav-btn:hover {
    background: var(--white);
    color: var(--primary);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
    border: 1px solid var(--border-color);
}

.portal-close-btn {
    border: none;
    background: var(--white);
    color: var(--dark);
    padding: 0.85rem 1.25rem;
    border-radius: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,0.02);
    border: 1px solid var(--border-color);
}

.portal-close-btn:hover {
    background: #fee2e2;
    color: var(--danger);
    border-color: rgba(239, 68, 68, 0.2);
}

/* Área de Conteúdo do Portal */
.portal-content-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.portal-header {
    padding: 1.5rem 2.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.portal-header-info h2 {
    font-size: 1.5rem;
}

.portal-header-info p {
    font-size: 0.85rem;
    color: var(--dark-muted);
}

.portal-user-badge {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--light-bg);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    border: 1px solid var(--border-color);
}

.user-avatar {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--white);
    font-weight: 700;
    font-size: 0.85rem;
}

.portal-views {
    flex: 1;
    overflow-y: auto;
    padding: 2.5rem;
}

.portal-view {
    display: none;
}

.portal-view.active {
    display: block;
}

/* VIEW: DASHBOARD CLIENTE */
.client-dashboard-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.dashboard-stat-card {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.01);
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.stat-icon {
    width: 54px;
    height: 54px;
    border-radius: 16px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.stat-icon.green { background: var(--accent-light); color: var(--accent-hover); }
.stat-icon.blue { background: var(--primary-light); color: var(--primary); }
.stat-icon.yellow { background: #fef3c7; color: var(--warning); }

.stat-details h4 {
    font-size: 0.85rem;
    color: var(--dark-muted);
    font-weight: 500;
}

.stat-details p {
    font-size: 1.6rem;
    font-weight: 850;
    color: var(--dark);
}

/* Histórico de Transações */
.history-section {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 1.75rem;
}

.history-section h3 {
    font-size: 1.15rem;
    margin-bottom: 1.25rem;
}

.history-table-wrapper {
    overflow-x: auto;
}

.history-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.history-table th {
    font-weight: 600;
    color: var(--dark-muted);
    font-size: 0.85rem;
    border-bottom: 1px solid var(--border-color);
    padding: 0.85rem 1rem;
}

.history-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.9rem;
}

.history-table tr:last-child td {
    border-bottom: none;
}

.status-badge {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.2rem 0.5rem;
    border-radius: 50px;
}

.status-badge.completed { background: var(--accent-light); color: var(--accent-hover); }

/* VIEW: SIMULADOR DE RECARGA */
.simulator-layout {
    display: flex;
    gap: 2rem;
}

.sim-control-panel {
    flex: 1;
    background: var(--light-bg);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.sim-graphic-panel {
    flex: 1;
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(0,0,0,0.01);
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.control-group label {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--dark-muted);
}

.sim-select, .sim-input {
    padding: 0.85rem 1.25rem;
    border-radius: 14px;
    border: 1px solid var(--border-color);
    background: var(--white);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
}

.connector-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.connector-option {
    border: 1px solid var(--border-color);
    background: var(--white);
    border-radius: 16px;
    padding: 1.25rem 0.75rem;
    text-align: center;
    cursor: pointer;
    transition: var(--transition-smooth);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.connector-option svg {
    width: 28px;
    height: 28px;
    stroke: var(--dark-muted);
    fill: none;
}

.connector-option span {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--dark-muted);
}

.connector-option.active, .connector-option:hover {
    border-color: var(--primary);
    background: var(--primary-light);
}

.connector-option.active svg, .connector-option.active span {
    stroke: var(--primary);
    color: var(--primary);
}

.btn-start-charging {
    background: linear-gradient(135deg, var(--accent) 0%, #059669 100%);
    color: var(--white);
    border: none;
    padding: 1rem;
    border-radius: 16px;
    font-weight: 700;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.25);
    transition: var(--transition-bounce);
}

.btn-start-charging:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 25px rgba(16, 185, 129, 0.35);
}

.btn-start-charging.active {
    background: linear-gradient(135deg, var(--danger) 0%, #dc2626 100%);
    box-shadow: 0 8px 20px rgba(239, 68, 68, 0.25);
}

/* Animação Visual da Carga */
.charge-visualizer {
    position: relative;
    width: 180px;
    height: 180px;
    margin-bottom: 2rem;
}

.battery-circle {
    width: 100%;
    height: 100%;
    position: relative;
}

.battery-circle svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.battery-circle circle {
    fill: none;
    stroke-width: 12;
}

.battery-circle circle.bg {
    stroke: var(--light-bg);
}

.battery-circle circle.fg {
    stroke: var(--accent);
    stroke-linecap: round;
    transition: stroke-dashoffset 0.3s ease;
}

.battery-percentage {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.battery-percentage span.number {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--dark);
    line-height: 1;
}

.battery-percentage span.label {
    font-size: 0.75rem;
    color: var(--dark-muted);
    font-weight: 600;
    text-transform: uppercase;
}

.charging-bubble-container {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
    overflow: hidden;
}

.bubble {
    position: absolute;
    bottom: 0;
    background: var(--accent);
    border-radius: 50%;
    opacity: 0.6;
    animation: bubbleUp 2s infinite ease-in;
}

.sim-live-stats {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.live-stat-item {
    background: var(--light-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1rem;
    text-align: center;
}

.live-stat-item h5 {
    font-size: 0.75rem;
    color: var(--dark-muted);
    margin-bottom: 0.25rem;
}

.live-stat-item p {
    font-size: 1.25rem;
    font-weight: 850;
    color: var(--dark);
}

/* VIEW: PROPRIETÁRIO / ADMIN */
.admin-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.admin-grid-layout {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 2rem;
}

.tariff-control-card {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 1.75rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.01);
}

.tariff-input-wrapper {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
}

.tariff-input-wrapper span {
    font-size: 1.25rem;
    font-weight: 800;
}

.btn-update-tariff {
    background: var(--primary);
    color: var(--white);
    border: none;
    padding: 0.85rem 1.5rem;
    border-radius: 14px;
    font-weight: 750;
    cursor: pointer;
    transition: var(--transition-bounce);
}

.btn-update-tariff:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
}

/* --- FOOTER --- */
footer {
    background: var(--light-bg);
    border-top: 1px solid var(--border-color);
    padding: 5rem 5% 3rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    margin-bottom: 4rem;
}

.footer-brand {
    max-width: 300px;
}

.footer-brand p {
    color: var(--dark-muted);
    font-size: 0.9rem;
    margin-top: 1rem;
}

.footer-links-grid {
    display: flex;
    gap: 5rem;
}

.footer-column h4 {
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.footer-column ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.footer-column a {
    color: var(--dark-muted);
    font-size: 0.9rem;
}

.footer-column a:hover {
    color: var(--primary);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border-color);
    padding-top: 2rem;
    font-size: 0.85rem;
    color: var(--dark-muted);
}

/* --- KEYFRAME ANIMATIONS --- */
@keyframes pulseGlow {
    0%, 100% {
        opacity: 1;
        filter: drop-shadow(0 0 2px rgba(16, 185, 129, 0.4));
    }
    50% {
        opacity: 0.8;
        filter: drop-shadow(0 0 10px rgba(16, 185, 129, 0.7));
    }
}

@keyframes dashFill {
    to {
        stroke-dashoffset: 44;
    }
}

@keyframes bubbleUp {
    0% {
        transform: translateY(0) scale(0.3);
        opacity: 0.8;
    }
    100% {
        transform: translateY(-160px) scale(1.1);
        opacity: 0;
    }
}

/* --- RESPONSIVIDADE --- */
@media (max-width: 1024px) {
    .hero {
        flex-direction: column;
        padding-top: 7rem;
        gap: 3rem;
        text-align: center;
    }
    
    .hero-content {
        max-width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    
    .hero h1 {
        font-size: 3rem;
    }
    
    .hero-visual {
        width: 100%;
        max-width: 500px;
        height: 400px;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .calculator-container {
        flex-direction: column;
    }
    
    .calc-sliders {
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }
    
    .map-layout {
        flex-direction: column;
        height: auto;
    }
    
    .stations-sidebar {
        height: 250px;
    }
    
    .map-wrapper {
        height: 400px;
    }
    
    .portal-container {
        flex-direction: column;
        height: 95vh;
    }
    
    .portal-sidebar {
        width: 100%;
        height: auto;
        padding: 1rem;
        flex-direction: row;
        align-items: center;
    }
    
    .portal-logo {
        margin-bottom: 0;
    }
    
    .portal-nav {
        flex-direction: row;
        overflow-x: auto;
        gap: 0.25rem;
    }
    
    .portal-nav-btn {
        padding: 0.5rem 0.8rem;
        font-size: 0.85rem;
    }
    
    .portal-close-btn {
        padding: 0.5rem 0.8rem;
        font-size: 0.85rem;
    }
    
    .client-dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .simulator-layout {
        flex-direction: column;
    }
    
    .admin-summary-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .admin-grid-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .hero h1 {
        font-size: 2.25rem;
    }
    
    .hero-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .btn-primary, .btn-secondary {
        justify-content: center;
    }
    
    .admin-summary-grid {
        grid-template-columns: 1fr;
    }
    
    .connector-grid {
        grid-template-columns: 1fr;
    }
}
