:root {
    /* AGRO GLASS NEON THEME */

    /* Neon Palette */
    --neon-green: #00C853;
    /* Base Color */
    --neon-hover: #00FF88;
    /* Hover Glow */
    --neon-glow: rgba(0, 255, 136, 0.4);
    --neon-alert: #ff1744;
    /* Red Neon */
    --neon-warning: #ffea00;
    /* Yellow Neon */
    --neon-info: #00e5ff;
    /* Cyan Neon */

    /* Glass Backgrounds */
    --glass-bg: rgba(255, 255, 255, 0.7);
    /* Light Glass */
    --glass-border: rgba(35, 83, 71, 0.15);
    --glass-card: rgba(255, 255, 255, 0.82);

    /* Backgrounds */
    --bg-body: #e7f2e7;
    /* Light Verdant Background */
    --bg-sidebar: #051f20;

    /* Typography */
    --text-primary: #051f20;
    --text-secondary: #414848;
    --text-neon: #235347;

    /* Spacing */
    --header-height: 80px;
    --sidebar-width: 260px;
}

* {
    box-sizing: border-box;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    /* Smooth tech ease */
}

body {
    background-color: var(--bg-body);
    font-family: 'Inter', 'Manrope', sans-serif;
    color: var(--text-primary);
    margin: 0;
    background-image: none;
    background-attachment: fixed;
}

/* Layout */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* --- SIDEBAR --- */
.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-sidebar);
    border-right: 1px solid rgba(255, 255, 255, 0.03);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    backdrop-filter: blur(10px);
    z-index: 1000;
}

.brand {
    height: var(--header-height);
    display: flex;
    align-items: center;
    padding: 0 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    position: relative;
    overflow: hidden;
}

.brand::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--neon-green), transparent);
    opacity: 0.5;
}

.brand img {
    max-height: 50px;
    filter: drop-shadow(0 0 8px var(--neon-glow));
}

.nav-menu {
    flex: 1;
    padding: 20px 10px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.nav-header {
    font-size: 0.7rem;
    font-weight: 700;
    color: #4b5563;
    margin-top: 15px;
    margin-bottom: 5px;
    padding-left: 15px;
    letter-spacing: 1px;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 8px;
    border: 1px solid transparent;
    font-weight: 500;
    letter-spacing: 0.5px;
}

.nav-item i {
    width: 25px;
    font-size: 1.1rem;
    margin-right: 10px;
    color: #5d6d7e;
    /* Dimmed icon initially */
    transition: all 0.3s ease;
}

/* Hover & Active States */
.nav-item:hover {
    color: var(--text-primary);
    background: rgba(0, 255, 136, 0.03);
    border-color: rgba(0, 255, 136, 0.1);
}

.nav-item:hover i {
    color: var(--neon-hover);
    transform: scale(1.1);
    text-shadow: 0 0 5px var(--neon-glow);
}

.nav-item.active {
    color: var(--neon-hover);
    background: rgba(0, 255, 136, 0.08);
    /* Low opacity filled green */
    border: 1px solid rgba(0, 255, 136, 0.3);
    box-shadow: 0 0 15px rgba(0, 255, 136, 0.1);
    position: relative;
}

.nav-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--neon-green);
    border-top-left-radius: 8px;
    border-bottom-left-radius: 8px;
    box-shadow: 0 0 10px var(--neon-green);
}

.nav-item.active i {
    color: var(--neon-hover);
    text-shadow: 0 0 8px var(--neon-green);
    transform: scale(1.05);
}

/* Logout */
.nav-item.logout {
    margin-top: auto;
    color: #ff5252;
}

.nav-item.logout:hover {
    border-color: rgba(255, 23, 68, 0.3);
    box-shadow: 0 0 10px rgba(255, 23, 68, 0.2);
    color: #ff1744;
}

/* --- CONTENT --- */
.content {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: 30px;
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 15px;
}

.top-bar h1 {
    font-size: 1.8rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-primary);
}

/* User Badge */
.user-info {
    display: flex;
    gap: 15px;
    align-items: center;
}

.user-info span {
    color: var(--text-secondary);
}

.badge-neon {
    border: 1px solid var(--neon-green);
    color: var(--neon-green);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    text-transform: uppercase;
    box-shadow: 0 0 5px var(--neon-glow);
}

/* --- DASHBOARD GRID & CARDS --- */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.btn-primary {
    background: rgba(5, 150, 105, 0.2);
    /* Low opacity green */
    color: var(--neon-green);
    border: 1px solid var(--neon-green);
    padding: 0.75rem 2rem;
    /* ~20px extra space roughly */
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(5, 150, 105, 0.1);
    display: inline-block;
    width: auto;
    /* Not full width */
    min-width: 120px;
    text-align: center;
}

/* Green Shine Effect */
.btn-primary::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 255, 136, 0.4), transparent);
    /* Greenish reflection */
    transition: 0.6s;
    z-index: -1;
    transform: skewX(-25deg);
}

.btn-primary:hover::after {
    left: 100%;
}

.auth-card form {
    text-align: center;
    /* Center the buttons */
}

.card {
    background: var(--glass-card);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(5px);
    border-radius: 12px;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

.card:hover {
    border-color: var(--neon-hover);
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.1);
    transform: translateY(-3px);
}

/* Card Header with Icon */
.card-neon-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.card-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 1.2rem;
    color: var(--neon-green);
}

.card:hover .card-icon {
    border-color: var(--neon-green);
    box-shadow: 0 0 10px var(--neon-glow);
    color: var(--neon-hover);
}

.card h3 {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.card .value {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 5px 0;
    text-shadow: 0 0 2px rgba(255, 255, 255, 0.3);
}

/* Tables */
.data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 4px;
    /* Space between rows */
    background: transparent;
}

.data-table th {
    font-family: 'Outfit', sans-serif;
    letter-spacing: 1px;
    font-size: 0.7rem;
    color: var(--text-secondary) !important;
    /* Muted headers */
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 15px;
}

.data-table td {
    padding: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.02);
    /* Slight row background */
    border: none;
}

.data-table tr td:first-child {
    border-top-left-radius: 6px;
    border-bottom-left-radius: 6px;
}

.data-table tr td:last-child {
    border-top-right-radius: 6px;
    border-bottom-right-radius: 6px;
}

.data-table tr:hover td {
    background: rgba(255, 255, 255, 0.05);
    transform: scale(1);
    /* Reset standard hover transform if any */
}

/* Forms */
.avatar-placeholder-icon {
    color: var(--text-secondary);
    font-size: 3rem;
    display: block;
    margin-bottom: 10px;
}

/* Auth Pages */
.auth-body {
    background: radial-gradient(circle at top right, #0f2d21, #000000);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    padding: 20px;
}

.auth-card {
    background: rgba(18, 18, 18, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 2.5rem;
    border-radius: 16px;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.5);
    width: 100%;
    max-width: 450px;
    position: relative;
    overflow: hidden;
}

.auth-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--neon-green), var(--neon-secondary));
    box-shadow: 0 0 10px var(--neon-green);
}

.auth-header h2 {
    color: var(--text-primary);
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
}

.auth-header p {
    color: var(--text-secondary);
}

.auth-card .form-group {
    margin-bottom: 1.5rem;
    /* Increased spacing */
}

.auth-card label {
    color: var(--text-primary);
    font-weight: 500;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    display: block;
    margin-left: 4px;
}

/* Input with Icon Wrapper */
.input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.input-group i {
    position: absolute;
    left: 15px;
    color: var(--text-secondary);
    transition: 0.3s;
    pointer-events: none;
    /* Prevent click interference */
}

.auth-card input,
.auth-card select {
    background: rgba(0, 0, 0, 0.3) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: var(--text-primary) !important;
    padding: 12px 12px 12px 45px;
    /* Added left padding for icon */
    border-radius: 8px;
    width: 100%;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
}

.auth-card input:focus,
.auth-card select:focus {
    border-color: var(--neon-green) !important;
    box-shadow: 0 0 10px rgba(5, 150, 105, 0.3);
    outline: none;
}

.auth-card input:focus+i,
.input-group:focus-within i {
    color: var(--neon-green);
}

.auth-card .footer-link {
    color: var(--text-secondary);
    margin-top: 2rem;
    /* Increased spacing */
    text-align: center;
    font-size: 0.9rem;
}

.auth-card .footer-link a {
    color: var(--neon-green);
    font-weight: 600;
}

.auth-card .footer-link a:hover {
    text-shadow: 0 0 8px var(--neon-green);
}

input,
select,
textarea {
    background: var(--surface-container-low);
    border: 1px solid var(--outline-variant);
    color: var(--text-primary);
    padding: 12px 16px;
    border-radius: 12px;
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.02);
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(35, 83, 71, 0.1);
    outline: none;
    background: #fff;
}

select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' viewBox='0 -960 960 960' width='24'%3E%3Cpath d='M480-345 240-585l56-56 184 184 184-184 56 56-240 240Z' fill='%23717978'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 20px;
    padding-right: 40px;
}

/* Buttons */
.btn-primary {
    background: transparent;
    border: 1px solid var(--neon-green);
    color: var(--neon-green);
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary:hover {
    background: var(--neon-green);
    color: #000;
    box-shadow: 0 0 15px var(--neon-green);
    text-shadow: none;
}

/* --- VIDEO BACKGROUND --- */
.video-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    overflow: hidden;
}

.video-container video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    /* Overlay sutil */
    z-index: -1;
}



/* --- LIGHT GLASSMORPHISM AUTH CARD --- */
.auth-card-light {
    background: rgba(255, 255, 255, 0.6) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    border: 1px solid rgba(255, 255, 255, 0.4) !important;
    color: #333 !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.05) !important;
}

.auth-card-light::before {
    display: none !important;
}

.auth-card-light .auth-header h2,
.auth-card-light .auth-header p,
.auth-card-light label {
    color: #374151 !important;
}

.auth-card-light input {
    background: rgba(255, 255, 255, 0.8) !important;
    border: 1px solid rgba(0, 0, 0, 0.06) !important;
    color: #111827 !important;
}

.auth-card-light input:focus {
    background: #fff !important;
    border-color: #00C853 !important;
    box-shadow: none !important;
}

.auth-card-light .input-group i {
    color: #9ca3af !important;
}

.auth-card-light .footer-link {
    color: #4b5563 !important;
}

.auth-card-light .footer-link a {
    color: #059669 !important;
    text-shadow: none !important;
}

.auth-card-light .footer-link a:hover {
    text-decoration: underline;
}

.auth-card-light .btn-primary {
    background: #00C853 !important;
    color: #fff !important;
    border: none !important;
    box-shadow: 0 4px 12px rgba(0, 200, 83, 0.2) !important;
    width: 100% !important;
    justify-content: center !important;
    padding: 14px !important;
    display: flex !important;
    margin-top: 1.5rem !important;
}

.auth-card-light .btn-primary:hover {
    background: #00b34a !important;
    box-shadow: 0 6px 18px rgba(0, 200, 83, 0.3) !important;
    transform: none !important;
    color: #fff !important;
}

/* --- UTILITIES & ANIMATIONS --- */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}
.animate-shake { animation: shake 0.3s ease-in-out; }

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
.animate-fade-in { animation: fadeIn 0.4s ease-out forwards; }

.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
.custom-scrollbar::-webkit-scrollbar-track {
    background: transparent;
}
.custom-scrollbar::-webkit-scrollbar-thumb {
    background: rgba(35, 83, 71, 0.2);
    border-radius: 10px;
}
.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: rgba(35, 83, 71, 0.4);
}

/* Discrete Scrollbar for Dark Sidebar */
.sidebar-scrollbar::-webkit-scrollbar {
    width: 4px;
}
.sidebar-scrollbar::-webkit-scrollbar-track {
    background: transparent;
}
.sidebar-scrollbar::-webkit-scrollbar-thumb {
    background: rgba(218, 241, 221, 0.1);
    border-radius: 10px;
}
.sidebar-scrollbar::-webkit-scrollbar-thumb:hover {
    background: rgba(218, 241, 221, 0.2);
}

.rounded-3xl {
    border-radius: 0.8rem !important;
}

/* Custom Message Styles */
.mensagem {
    padding: 15px 20px;
    border-radius: 12px;
    margin-bottom: 25px;
    font-weight: 600;
    font-size: 0.9rem;
}
.mensagem.sucesso { 
    background: #d4edda; 
    color: #155724; 
    border: 1px solid #c3e6cb; 
}
.mensagem.erro { 
    background: #f8d7da; 
    color: #721c24; 
    border: 1px solid #f5c6cb; 
}