:root {
    --bg-dark: #0a0a0a;
    --bg-card: #151515;
    --red-primary: #d32f2f;
    --red-glow: rgba(211, 47, 47, 0.6);
    --text-primary: #ffffff;
    --text-secondary: #aaaaaa;
    --border-color: #222222;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

/* Glassmorphism Navbar */
.navbar {
    background: rgba(10, 10, 10, 0.8) !important;
    backdrop-filter: blur(10px);
    border-bottom: 2px solid var(--red-primary);
}

.navbar-brand {
    font-weight: 800;
    letter-spacing: 2px;
    color: #fff !important;
}

.nav-link {
    color: var(--text-secondary) !important;
    transition: 0.3s;
    font-weight: 500;
    text-transform: uppercase;
    font-size: 0.9rem;
    margin: 0 10px;
}

.nav-link:hover, .nav-link.active {
    color: var(--red-primary) !important;
    text-shadow: 0 0 10px var(--red-glow);
}

/* Buttons */
.btn-military {
    background-color: transparent;
    border: 1px solid var(--red-primary);
    color: var(--text-primary);
    text-transform: uppercase;
    font-weight: 600;
    padding: 10px 20px;
    transition: 0.3s;
    position: relative;
    overflow: hidden;
}

.btn-military:hover {
    background-color: var(--red-primary);
    box-shadow: 0 0 15px var(--red-glow);
    color: #fff;
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: linear-gradient(to bottom, rgba(0,0,0,0.7), rgba(0,0,0,0.9)), url('https://i.imgur.com/bkAnGN8.png') no-repeat center center / cover;
    position: relative;
}

.hero h1 {
    font-size: 5rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: 20px;
}

.hero h1 span {
    color: var(--red-primary);
    text-shadow: 0 0 15px var(--red-glow);
}

.hero p {
    font-size: 1.2rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 30px;
}

/* Cards */
.military-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-top: 3px solid var(--red-primary);
    padding: 20px;
    transition: 0.3s;
    height: 100%;
}

.military-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
    border-color: var(--red-primary);
}

.military-card h3 {
    text-transform: uppercase;
    font-weight: 700;
    font-size: 1.2rem;
    margin-bottom: 15px;
}

/* Auth Pages */
.auth-bg {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(rgba(0,0,0,0.8), rgba(0,0,0,0.95)), url('https://i.imgur.com/bkAnGN8.png') no-repeat center center / cover;
}

.auth-box {
    background: rgba(20, 20, 20, 0.9);
    backdrop-filter: blur(15px);
    padding: 40px;
    border: 1px solid var(--border-color);
    border-top: 4px solid var(--red-primary);
    width: 100%;
    max-width: 400px;
    box-shadow: 0 0 20px rgba(0,0,0,0.8);
}

.auth-box .form-control {
    background: rgba(0,0,0,0.5);
    border: 1px solid var(--border-color);
    color: #fff;
}

.auth-box .form-control:focus {
    border-color: var(--red-primary);
    box-shadow: none;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-dark);
}
::-webkit-scrollbar-thumb {
    background: var(--red-primary);
}

/* Sidebar for panels */
.sidebar {
    height: 100vh;
    background: var(--bg-card);
    border-right: 1px solid var(--border-color);
    position: fixed;
    top: 0;
    left: 0;
    width: 250px;
    padding-top: 80px;
}

.sidebar a {
    color: var(--text-secondary);
    text-decoration: none;
    padding: 15px 20px;
    display: block;
    transition: 0.3s;
    text-transform: uppercase;
    font-size: 0.9rem;
    font-weight: 600;
    border-left: 3px solid transparent;
}

.sidebar a:hover, .sidebar a.active {
    background: rgba(255,255,255,0.05);
    color: #fff;
    border-left-color: var(--red-primary);
}

.main-content {
    margin-left: 250px;
    padding: 80px 30px 30px;
}

/* Badges */
.badge-cargo {
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 700;
}

.badge-diretoria { background: #d32f2f; color: #fff; }
.badge-oficial { background: #1976d2; color: #fff; }
.badge-integrante { background: #388e3c; color: #fff; }

/* Dashboard Cards */
.dash-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-left: 4px solid var(--red-primary);
}

.dash-card .icon {
    font-size: 2.5rem;
    color: var(--text-secondary);
}

.dash-card .info h4 {
    margin: 0;
    font-size: 2rem;
    font-weight: 800;
}

.dash-card .info p {
    margin: 0;
    color: var(--text-secondary);
    text-transform: uppercase;
    font-size: 0.8rem;
}

/* Table styles */
.table-dark {
    background-color: var(--bg-card);
    border-color: var(--border-color);
}
.table-dark th {
    border-bottom: 2px solid var(--red-primary);
}

/* Siren FX on Hover */
.siren-fx:hover {
    animation: siren 1s infinite alternate;
}

@keyframes siren {
    0% { text-shadow: 0 0 5px var(--red-primary); color: #fff; }
    100% { text-shadow: 0 0 20px var(--red-primary), 0 0 30px var(--red-primary); color: var(--red-primary); }
}

/* Modal Dark Theme Overrides */
.modal-content {
    background-color: var(--bg-card) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-primary) !important;
}
.modal-header {
    border-bottom: 2px solid var(--red-primary) !important;
}
.modal-footer {
    border-top: 1px solid var(--border-color) !important;
}
.form-select, .form-control {
    background-color: var(--bg-dark) !important;
    border-color: var(--border-color) !important;
    color: #fff !important;
}
.form-select:focus, .form-control:focus {
    border-color: var(--red-primary) !important;
    box-shadow: 0 0 10px var(--red-glow) !important;
}

/* Loading Screen */
#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-dark);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.spinner-military {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255,255,255,0.1);
    border-left-color: var(--red-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Light Theme Variables */
body.light-mode {
    --bg-dark: #f4f4f9;
    --bg-card: #ffffff;
    --text-primary: #111111;
    --text-secondary: #555555;
    --border-color: #dddddd;
}
body.light-mode .navbar {
    background: rgba(255, 255, 255, 0.9) !important;
}
body.light-mode .navbar-brand {
    color: #111 !important;
}
body.light-mode .nav-link {
    color: #333 !important;
}
body.light-mode .nav-link:hover, body.light-mode .nav-link.active {
    color: var(--red-primary) !important;
}
body.light-mode .military-card {
    background: #ffffff;
    color: #111;
}
body.light-mode .table-dark {
    background-color: #ffffff;
    color: #111;
}
body.light-mode .table-dark th {
    color: #111;
}
body.light-mode .table-dark td {
    color: #333;
}
body.light-mode .sidebar {
    background: #ffffff;
}
body.light-mode .sidebar h5 {
    color: #111 !important;
}
body.light-mode .sidebar a {
    color: #333;
}

