:root {
    --bg-dark: #0a0e17;       /* Fundo quase preto */
    --bg-card: #111625;       /* Fundo dos cards */
    --text-main: #e0e6ed;     /* Texto principal claro */
    --text-muted: #94a3b8;    /* Texto secundário */
    
    /* Neon Palette */
    --neon-cyan: #00f3ff;
    --neon-green: #00ff9d;
    --neon-red: #ff0055;
    --neon-purple: #bc13fe;
    
    --border-color: rgba(255, 255, 255, 0.08);
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: 'Orbitron', 'Segoe UI', system-ui, sans-serif;
    margin: 0;
    padding: 0;
    overflow-x: hidden; /* Impede scroll horizontal em mobile */
}

html {
    overflow-x: hidden;
}

/* Typography Overrides */
h1, h2, h3, .brand {
    font-family: 'Orbitron', sans-serif;
    letter-spacing: 1px;
    text-transform: uppercase;
}

a { text-decoration: none; color: inherit; }

/* Layout */
.layout {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.topbar {
    background: rgba(17, 22, 37, 0.95);
    border-bottom: 1px solid var(--border-color);
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 100;
}

@media (max-width: 900px) {
    .topbar { padding: 12px 20px; }
    .desktop-nav, .desktop-user-area { display: none !important; }
    .mobile-menu-btn { display: flex; }
}

.brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--neon-cyan);
    text-shadow: 0 0 10px rgba(0, 243, 255, 0.5);
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Mobile Hamburger Button */
.mobile-menu-btn {
    display: none;
}

@media (max-width: 900px) {
    .mobile-menu-btn { display: block !important; }
}

/* Mobile Dropdown */
.mobile-dropdown {
    display: none;
    flex-direction: column;
    background: rgba(17, 22, 37, 0.98);
    border-bottom: 1px solid var(--border-color);
    position: absolute;
    top: 60px;
    left: 0;
    width: 100%;
    z-index: 99;
    padding-bottom: 20px;
    backdrop-filter: blur(20px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.mobile-dropdown.open {
    display: flex;
    animation: slideDown 0.3s ease forwards;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.mobile-dropdown .nav-link {
    margin: 0;
    padding: 15px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.03);
    font-size: 1rem;
}

.mobile-dropdown .nav-link.active::after { display: none; }
.mobile-dropdown .nav-link.active { color: var(--neon-cyan); background: rgba(0,243,255,0.05); }

.mobile-user-profile {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: rgba(255,255,255,0.02);
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 10px;
}

.main-container {
    flex: 1;
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
}

@media (max-width: 768px) {
    .main-container { padding: 1rem; }
}

/* Cards */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem; /* Increased padding */
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.card h3 {
    font-size: 1.5rem; /* Larger titles */
    font-weight: 700;
    letter-spacing: 0.5px;
    margin-bottom: 1rem;
    text-shadow: 0 0 10px rgba(0,0,0,0.5);
}

.card p {
    font-size: 1.1rem; /* Larger text */
    color: #e0e6ed; /* Brighter text (was muted) */
    line-height: 1.6;
}

.card:hover {
    transform: translateY(-5px);
    border-color: rgba(0, 243, 255, 0.3);
    box-shadow: 0 8px 30px rgba(0, 243, 255, 0.15);
}

/* Specific Card Glows */
.card.glow-cyan { border-top: 3px solid var(--neon-cyan); }
.card.glow-green { border-top: 3px solid var(--neon-green); }
.card.glow-red { border-top: 3px solid var(--neon-red); }

.card-value {
    font-size: 2.5rem;
    font-weight: 700;
    margin-top: 0.5rem;
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.1);
}

/* Tables */
.table-container {
    background: var(--bg-card);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    overflow: hidden;
    margin-top: 2rem;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-muted);
    font-weight: 600;
    padding: 1rem;
    text-align: left;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
}

tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(255, 255, 255, 0.02); }

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, #00f3ff 0%, #0066ff 100%);
    color: #000;
    box-shadow: 0 0 15px rgba(0, 243, 255, 0.3);
}

.btn-primary:hover {
    box-shadow: 0 0 25px rgba(0, 243, 255, 0.5);
    transform: scale(1.02);
}

.btn-success {
    background: linear-gradient(135deg, #00ff9d 0%, #00b341 100%);
    color: #000;
    box-shadow: 0 0 15px rgba(0, 255, 157, 0.3);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-main);
}

.btn-outline:hover {
    border-color: var(--neon-cyan);
    color: var(--neon-cyan);
}

/* Utilities */
.text-cyan { color: var(--neon-cyan); }
.text-green { color: var(--neon-green); }
.text-red { color: var(--neon-red); }

.badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: bold;
    text-transform: uppercase;
}
.badge-success { background: rgba(0, 255, 157, 0.15); color: var(--neon-green); border: 1px solid rgba(0, 255, 157, 0.3); }

/* Nav Links */
.nav-link {
    margin-right: 1.5rem;
    color: var(--text-muted);
    font-weight: 500;
    position: relative;
    transition: color 0.2s;
}

.nav-link:hover {
    color: var(--text-main);
}

.nav-link.active {
    color: var(--neon-cyan);
    text-shadow: 0 0 8px rgba(0, 243, 255, 0.4);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -24px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--neon-cyan);
    box-shadow: 0 0 10px var(--neon-cyan);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translate3d(0, 40px, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

.animate-enter {
    animation-duration: 0.8s;
    animation-fill-mode: both;
    animation-name: fadeInUp;
}

.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }
.delay-400 { animation-delay: 0.4s; }

/* Landing Hero */
.hero-section {
    text-align: center;
    padding: 80px 20px;
    background: radial-gradient(circle at center, rgba(0, 243, 255, 0.05) 0%, transparent 70%);
}

.hero-title {
    font-size: 4.2rem; /* Increased size */
    color: #ffffff;
    background: none;
    -webkit-background-clip: border-box;
    background-clip: border-box;
    -webkit-text-fill-color: initial;
    margin-bottom: 2rem;
    text-shadow: 0 0 25px rgba(0, 243, 255, 0.6); /* Stronger glow */
    font-weight: 800;
    letter-spacing: 2px;
}

.hero-subtitle {
    font-size: 1.6rem; /* Increased size */
    color: #ffffff; /* Pure white */
    max-width: 800px; /* Wider to accommodate text */
    margin: 0 auto 3rem;
    line-height: 1.6;
    text-shadow: 0 2px 4px rgba(0,0,0,0.8); /* Stronger shadow for contrast */
    font-weight: 500;
}

/* Adições Premium do Design System corrigidas */
.btn-danger { background: linear-gradient(135deg, #ff0055 0%, #aa0033 100%); color: #fff; box-shadow: 0 0 15px rgba(255, 0, 85, 0.3); }
.btn-danger:hover { box-shadow: 0 0 25px rgba(255, 0, 85, 0.5); transform: scale(1.02); }

.header-container, .section-header { 
    background: rgba(255,255,255,0.03); 
    border: 1px solid var(--border-color); 
    padding: 20px; 
    border-radius: 12px; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    margin-bottom: 20px; 
}

.header-title, .section-title { 
    font-size: 1.5rem; 
    font-weight: bold; 
    color: white; 
    display: flex; 
    align-items: center; 
    gap: 10px; 
    margin: 0; 
}

@media (max-width: 900px) {
    .header-container, .section-header { flex-direction: column; align-items: flex-start; gap: 15px; }
    .header-actions { display: flex; flex-wrap: wrap; gap: 10px; width: 100%; }
    .header-actions .btn { flex: 1; text-align: center; justify-content: center; }
}

.plate-badge { 
    background: rgba(0, 243, 255, 0.1); 
    color: var(--neon-cyan); 
    font-family: monospace; 
    font-weight: bold; 
    padding: 0.4rem 0.8rem; 
    border-radius: 4px; 
    font-size: 1.1rem; 
    letter-spacing: 2px; 
    border: 1px solid rgba(0, 243, 255, 0.5); 
    text-transform: uppercase; 
    box-shadow: 0 0 5px rgba(0, 243, 255, 0.2); 
}

.category-badge { 
    display: inline-block; 
    padding: 2px 8px; 
    border-radius: 4px; 
    font-size: 0.75rem; 
    background: #222; 
    color: #aaa; 
    border: 1px solid #444; 
}

/* ──────────────────────────────────────
   DASHBOARD — KPI CARDS
────────────────────────────────────── */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 28px;
}

.kpi-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 24px 24px 20px;
    position: relative;
    overflow: hidden;
    transition: transform 0.25s, box-shadow 0.25s;
}

.kpi-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.4);
}

/* Faixa colorida no topo */
.kpi-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
}

.kpi-cyan::before  { background: var(--neon-cyan); box-shadow: 0 0 8px rgba(0,243,255,0.6); }
.kpi-green::before { background: var(--neon-green); box-shadow: 0 0 8px rgba(0,255,157,0.6); }
.kpi-red::before   { background: var(--neon-red);  box-shadow: 0 0 8px rgba(255,0,85,0.6); }
.kpi-gold::before  { background: #ffd700; box-shadow: 0 0 8px rgba(255,215,0,0.6); }

.kpi-title {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.kpi-value {
    font-family: 'Orbitron', sans-serif;
    font-size: 2.4rem;
    font-weight: 700;
    color: #fff;
    line-height: 1;
}

.kpi-cyan .kpi-value  { color: var(--neon-cyan); text-shadow: 0 0 12px rgba(0,243,255,0.4); }
.kpi-green .kpi-value { color: var(--neon-green); text-shadow: 0 0 12px rgba(0,255,157,0.4); }
.kpi-red .kpi-value   { color: var(--neon-red);  text-shadow: 0 0 12px rgba(255,0,85,0.4); }
.kpi-gold .kpi-value  { color: #ffd700; text-shadow: 0 0 12px rgba(255,215,0,0.4); }

.kpi-sub {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 6px;
}

/* ──────────────────────────────────────
   DASHBOARD — SECTION CARD
────────────────────────────────────── */
.section-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 24px;
}

.section-card .section-header {
    background: rgba(255,255,255,0.02);
    border-bottom: 1px solid var(--border-color);
    padding: 18px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 0;
    border-radius: 0;
}

.section-card .section-title {
    font-size: 1rem;
    font-weight: 700;
    color: white;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
}

.section-card > div:not(.section-header) {
    padding: 0 24px 24px;
}

/* Tabela responsiva dentro do section-card */
.section-card table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 16px;
}

.section-card th {
    background: rgba(255,255,255,0.03);
    color: var(--text-muted);
    font-weight: 600;
    padding: 10px 14px;
    text-align: left;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border-color);
}

.section-card td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.9rem;
    vertical-align: middle;
}

.section-card tr:last-child td { border-bottom: none; }
.section-card tr:hover td { background: rgba(255,255,255,0.02); }

/* Admin zone */
.admin-zone {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

@media (max-width: 640px) {
    .kpi-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
    .kpi-value { font-size: 1.8rem; }
    .section-card .section-header { flex-direction: column; align-items: flex-start; }
    .section-card .section-header .header-actions { display: flex; flex-wrap: wrap; gap: 8px; }
    .admin-zone { flex-direction: column; }
    .admin-zone .btn { width: 100%; text-align: center; justify-content: center; }
}

