:root {
    --primary-color: #1e3a8a;
    --primary-hover: #1e40af;
    --secondary-color: #64748b;
    --bg-light: #f8fafc;
    --surface-white: #ffffff;
    --text-main: #1f2937;
    --text-muted: #6b7280;
    --border-soft: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
}

body {
    background: linear-gradient(135deg, #f1f5f9 0%, #f8fafc 100%);
    color: var(--text-main);
    min-height: 100vh;
}

.navbar {
    background: #0f172a !important; /* Un poco más oscuro que el sidebar */
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255,255,255,0.05);
    padding: 0.75rem 0;
    position: sticky;
    top: 0;
    z-index: 1030;
    box-shadow: var(--shadow-sm);
}

.navbar-brand span {
    color: #f8fafc !important;
}

.navbar-brand b {
    color: #38bdf8 !important; /* Azul más brillante para que resalte en oscuro */
    font-weight: 800;
    letter-spacing: -0.025em;
}

.nav-link {
    color: #cbd5e1 !important;
    font-weight: 500;
}

.nav-link:hover {
    color: #fff !important;
}

.nav-link strong {
    color: #94a3b8;
}

.navbar-toggler {
    border-color: rgba(255,255,255,0.1) !important;
}

.navbar-toggler-icon {
    filter: invert(1); /* Hace que el icono de hamburguesa sea blanco */
}

.card {
    border: none !important;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    background: var(--surface-white);
}

.card-header {
    background: transparent !important;
    border-bottom: 1px solid var(--border-soft) !important;
    padding: 1.25rem;
    font-weight: 700;
}

.card-body {
    padding: 1.5rem;
}

/* Dashboard Cards */
.home-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.card-icon-container {
    width: 48px;
    height: 48px;
    background: rgba(30, 58, 138, 0.08);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

/* Buttons */
.btn-primary {
    background: var(--primary-color) !important;
    border: none !important;
    padding: 0.6rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    transition: all 0.2s;
}

.btn-primary:hover {
    background: var(--primary-hover) !important;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

/* Layout Structure */
#wrapper {
    display: flex;
    width: 100%;
    align-items: stretch;
}

#sidebar {
    min-width: 280px;
    max-width: 280px;
    background: #1e293b;
    color: #f8fafc;
    transition: all 0.3s;
    border-right: none;
    min-height: calc(100vh - 65px);
    z-index: 1000;
    box-shadow: 4px 0 10px rgba(0,0,0,0.1);
}

#sidebar.active {
    margin-left: -280px;
}

#content {
    width: 100%;
    padding: 2rem;
    min-height: calc(100vh - 65px);
    transition: all 0.3s;
}

/* Sidebar Navigation */
#sidebar .sidebar-header {
    padding: 20px;
}

#sidebar ul.components {
    padding: 20px 0;
}

#sidebar ul p {
    color: #94a3b8;
    padding: 10px 25px;
    font-size: 0.7rem;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.1em;
    margin-bottom: 5px;
    opacity: 0.8;
}

#sidebar ul li a {
    padding: 12px 25px;
    font-size: 0.9rem;
    display: block;
    color: #cbd5e1;
    text-decoration: none;
    transition: all 0.2s;
    font-weight: 500;
    display: flex;
    align-items: center;
}

#sidebar ul li a i {
    margin-right: 15px;
    width: 20px;
    text-align: center;
    font-size: 1.1rem;
    color: #94a3b8;
}

#sidebar ul li a:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
}

#sidebar ul li a:hover i {
    color: #fff;
}

#sidebar ul li.active > a {
    color: #fff;
    background: var(--primary-color);
    font-weight: 600;
}

#sidebar ul li.active > a i {
    color: #fff;
}

#sidebarCollapse {
    background: rgba(255, 255, 255, 0.05);
    color: #cbd5e1;
    border: none;
    transition: all 0.2s;
}

#sidebarCollapse:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}
.stat-card {
    border-radius: var(--radius-lg);
    border: none;
    box-shadow: var(--shadow-md);
    overflow: hidden;
    position: relative;
    transition: transform 0.3s;
    background: #fff;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-icon {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 3rem;
    opacity: 0.1;
}

.stat-value {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 0;
    color: var(--text-main);
}

.stat-label {
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

/* Utility for text colors on stats */
.text-primary-stat { color: #2563eb !important; }
.text-success-stat { color: #16a34a !important; }
.text-danger-stat { color: #dc2626 !important; }
.text-warning-stat { color: #ca8a04 !important; }

/* Responsive adjustments */
@media (max-width: 768px) {
    #sidebar {
        margin-left: -280px;
    }
    #sidebar.active {
        margin-left: 0;
    }
}
