/* Espuma Premium Dashboard Styles */

:root {
    --primary: #4CAC36;
    --primary-light: rgba(76, 172, 54, 0.1);
    /* Pistachio Green */
    --success: #4CAC36;
    --success-light: rgba(76, 172, 54, 0.05);
    --info: #858796;
    /* Neutral Gray instead of blue */
    --info-light: rgba(133, 135, 150, 0.1);
    --warning: #f6c23e;
    --warning-light: rgba(246, 194, 62, 0.1);
    --danger: #e74a3b;
    --dark: #212529;
    --light: #f8f9fc;
    --gray-800: #333333;
    /* Darker text for light backgrounds */
    --glass-bg: rgba(255, 255, 255, 0.8);
    --glass-border: rgba(255, 255, 255, 0.4);
    --glass-shadow: 0 8px 32px 0 rgba(33, 33, 33, 0.05);
    /* Gray shadow */
    --body-bg: #f4f7f6;
}

/* Bootstrap Overrides */
.text-primary {
    color: var(--primary) !important;
}

.text-success {
    color: var(--success) !important;
}

.bg-primary {
    background-color: var(--primary) !important;
}

.bg-success {
    background-color: var(--success) !important;
}

.btn-primary {
    background-color: var(--primary) !important;
    border-color: var(--primary) !important;
    color: #fff !important;
    /* White text on pistachio green for light mode */
    font-weight: 600;
}

.btn-primary:hover {
    background-color: #3d8a2b !important;
    border-color: #3d8a2b !important;
}

.btn-outline-primary {
    color: var(--primary) !important;
    border-color: var(--primary) !important;
}

.btn-outline-primary:hover {
    background-color: var(--primary) !important;
    color: #fff !important;
}

.border-primary {
    border-color: var(--primary) !important;
}

/* Alerts */
.alert-info {
    background-color: #f8f9fc !important;
    border: 1px solid #e3e6f0 !important;
    color: #6e707e !important;
}

.alert-success {
    background-color: #e8f5e9 !important;
    border: 1px solid var(--primary) !important;
    color: var(--primary) !important;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--body-bg);
    background: linear-gradient(135deg, #fdfbfb 0%, #ebedee 100%);
    color: var(--gray-800);
    overflow-x: hidden;
    min-height: 100vh;
}

/* Glassmorphism Utilities */
.bg-glass {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border) !important;
    box-shadow: var(--glass-shadow);
}

.btn-glass {
    background: rgba(255, 255, 255, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.6);
    color: var(--dark);
    backdrop-filter: blur(4px);
    transition: all 0.3s ease;
}

.btn-glass:hover {
    background: rgba(255, 255, 255, 0.8);
    color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

/* Layout Wrapper */
.wrapper {
    display: flex;
    width: 100%;
    align-items: stretch;
}

/* Sidebar */
.sidebar {
    min-width: 260px;
    max-width: 260px;
    min-height: 100vh;
    transition: all 0.3s;
    z-index: 1000;
    border-right: 1px solid rgba(76, 172, 54, 0.1);
    background: #f0f9eb !important;
    /* Soft light green background */
}

.sidebar.active {
    margin-left: -260px;
}

.sidebar-header {
    padding: 24px;
    border-bottom: 1px solid rgba(76, 172, 54, 0.1);
}

.sidebar ul p {
    color: #7a9a72;
    /* Muted green for headers */
    padding: 10px;
    font-weight: 600;
    letter-spacing: 0.5px;
    margin-top: 10px;
    font-size: 0.8em;
    text-transform: uppercase;
}

.sidebar ul li a {
    padding: 14px 24px;
    font-size: 1.05em;
    display: block;
    color: #4a5d45;
    /* Darker green for text */
    text-decoration: none;
    transition: all 0.2s ease-in-out;
    border-left: 3px solid transparent;
}

.sidebar ul li a:hover,
.sidebar ul li.active>a {
    color: var(--primary);
    background: rgba(76, 172, 54, 0.08);
    /* Subtle green highlight */
    border-left: 3px solid var(--primary);
}

.sidebar ul li a i {
    width: 24px;
    text-align: center;
}

.sidebar ul ul a {
    font-size: 0.9em !important;
    padding-left: 55px !important;
    background: rgba(255, 255, 255, 0.3);
    /* Slightly lighter sub-menu */
}

.sidebar ul ul li.active-sub>a {
    color: var(--primary);
    font-weight: 600;
    background: rgba(255, 255, 255, 0.5);
}

.sidebar .dropdown-toggle::after {
    display: inline-block;
    margin-left: auto;
    vertical-align: 0.255em;
    content: "";
    border-top: 0.3em solid;
    border-right: 0.3em solid transparent;
    border-bottom: 0;
    border-left: 0.3em solid transparent;
    transition: transform .2s ease-in-out;
}

.sidebar .dropdown-toggle:not(.collapsed)::after {
    transform: rotate(-180deg);
}

/* Top Navbar */
.top-navbar {
    padding: 10px 20px;
    margin: 15px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
}

/* Content */
.content-wrapper {
    width: 100%;
    padding: 0;
    transition: all 0.3s;
}

/* Stat Cards */
.stat-card {
    border-radius: 16px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

.icon-circle {
    width: 55px;
    height: 55px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Charts */
.chart-container {
    border-radius: 16px;
    overflow: hidden;
}

/* Custom Utilities */
.text-xs {
    font-size: .75rem;
}

.border-none {
    border: none !important;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        margin-left: -260px;
    }

    .sidebar.active {
        margin-left: 0;
    }
}