/* Gentelella / AdminLTE Hybrid Custom Theme */
:root {
    /* Colors */
    --nav-bg: #2A3F54;
    --nav-text: #E7E7E7;
    --nav-title-color: #FFFFFF;

    --body-bg: #F7F7F7;
    --card-bg: #FFFFFF;

    --green-accent: #1ABB9C;
    --blue-accent: #3498DB;
    --red-accent: #E74C3C;
    --orange-accent: #F39C12;

    --text-primary: #73879C;
    --text-dark: #2A3F54;
    /* "Letras mas oscuras" for panels */
    --border-color: #E6E9ED;

    --sidebar-width: 230px;
    --header-height: 55px;
}

/* Reset & Base */
body {
    background: var(--body-bg);
    color: var(--text-primary);
    font-family: "Helvetica Neue", Roboto, Arial, "Droid Sans", sans-serif;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.471;
    margin: 0;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 600;
    /* Darker/Bolder */
    color: var(--text-dark);
    margin-top: 0;
}

a {
    text-decoration: none;
    transition: all 0.2s;
}

/* Layout Wrapper */
.layout-container {
    display: flex;
    width: 100%;
}

/* SIDEBAR - The Core of the Request */
.sidebar {
    width: var(--sidebar-width);
    background: var(--nav-bg);
    min-height: 100vh;
    color: var(--nav-text);
    position: fixed;
    left: 0;
    top: 0;
    z-index: 1000;
    overflow-y: auto;
    transition: all 0.3s;
}

/* Sidebar Brand */
.sidebar-brand {
    padding: 15px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--nav-bg);
    font-size: 22px;
    font-weight: 500;
    color: #ECF0F1;
    border: 0;
}

.brand-icon {
    border: 1px solid #E7E7E7;
    border-radius: 50%;
    padding: 5px;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Profile Section (Like Gentelella) */
.profile-section {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    gap: 15px;
    margin-bottom: 20px;
}

.profile-pic {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #fff;
    padding: 3px;
}

.profile-pic img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.profile-info {
    line-height: 1.2;
}

.profile-info span {
    font-size: 13px;
    color: #BAB8B8;
    font-weight: 400;
}

.profile-info h2 {
    font-size: 14px;
    color: #ECF0F1;
    margin: 0;
    font-weight: 600;
}

/* Navigation Menu */
.sidebar-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.menu-section-label {
    padding: 10px 20px;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.5px;
    color: #8C99A5;
    /* Muted text for section headers */
    font-weight: 700;
}

.menu-item {
    position: relative;
}

.menu-link {
    display: flex;
    align-items: center;
    padding: 10px 20px;
    color: var(--nav-text);
    font-size: 13.5px;
    border-right: 5px solid transparent;
}

/* Icons */
.menu-link i.menu-icon {
    width: 26px;
    font-size: 16px;
    text-align: center;
    margin-right: 4px;
    opacity: 0.8;
}

.menu-link .chevron {
    margin-left: auto;
    font-size: 12px;
    transition: transform 0.3s;
}

/* Hover & Active States */
.menu-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
}

.menu-item.active>.menu-link {
    text-shadow: rgba(0, 0, 0, 0.25) 0 -1px 0;
    background: linear-gradient(#334556, #2C4257), #2A3F54;
    box-shadow: rgba(0, 0, 0, 0.25) 0 1px 0, inset rgba(255, 255, 255, 0.16) 0 1px 0;
    border-right: 5px solid var(--green-accent);
    color: #fff;
}

/* Dropdown Submenus */
.submenu {
    list-style: none;
    padding: 0;
    margin: 0;
    display: none;
    /* Hidden by default */
    background: rgba(255, 255, 255, 0.05);
    box-shadow: inset 0 1px 0 rgba(0, 0, 0, 0.05);
}

.menu-item.open>.submenu {
    display: block;
}

.menu-item.open>.menu-link .chevron {
    transform: rotate(90deg);
}

.submenu-link {
    display: block;
    padding: 9px 20px 9px 50px;
    /* Indented */
    color: rgba(255, 255, 255, 0.7);
    font-size: 12.5px;
    position: relative;
    transition: color 0.3s;
}

.submenu-link::before {
    content: "";
    /* Gentelella vertical line connector style is complex, keeping simple for now */
    position: absolute;
    left: 20px;
    top: 50%;
    width: 6px;
    height: 1px;
    background: rgba(255, 255, 255, 0.2);
}

.submenu-link:hover {
    color: #fff;
}

/* TOP HEADER */
.main-header {
    background: #EDEDED;
    border-bottom: 1px solid #D9DEE4;
    height: var(--header-height);
    margin-left: var(--sidebar-width);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    transition: margin-left 0.3s;
    color: var(--text-primary);
}

.toggle-btn {
    font-size: 20px;
    cursor: pointer;
    color: #5A738E;
}

/* MAIN CONTENT */
.main-content {
    margin-left: var(--sidebar-width);
    padding: 20px;
    min-height: calc(100vh - var(--header-height));
    transition: margin-left 0.3s;
    padding-top: calc(var(--header-height) + 20px);
}

/* Cards & Panels */
.card {
    background: #fff;
    border: 1px solid #E6E9ED;
    border-radius: 3px;
    /* Gentelella is sharper */
    padding: 15px;
    margin-bottom: 20px;
    position: relative;
}

.card-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-dark);
    border-bottom: 2px solid #E6E9ED;
    padding-bottom: 10px;
    margin-bottom: 15px;
    display: block;
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
}

th {
    background: #405467;
    /* Dark table header usually in Gentelella tables? Or just light grey? User wants "Darker letters", let's make headers distinct */
    color: #ECF0F1;
    padding: 10px;
    text-align: left;
    font-weight: 500;
}

td {
    padding: 10px;
    border-bottom: 1px solid #E6E9ED;
    color: #5A738E;
}

tr:nth-child(even) {
    background: #f9f9f9;
}

/* Buttons */
.btn {
    border-radius: 3px;
    padding: 6px 12px;
    font-size: 14px;
    font-weight: 400;
    cursor: pointer;
    border: 1px solid transparent;
    display: inline-block;
    color: #fff;
}

.btn-primary {
    background: var(--green-accent);
    border-color: var(--green-accent);
}

.btn-primary:hover {
    background: #169F85;
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--text-primary);
    color: var(--text-primary);
}

/* Dashboard Stat Cards */
.stat-value {
    font-size: 40px;
    /* Much bigger per request */
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 5px;
    color: #73879C;
}

.stat-label {
    font-size: 16px;
    color: #BAB8B8;
    text-transform: uppercase;
    font-weight: 600;
}

.text-muted {
    color: #9E9E9E !important;
}

/* Interactive Action Cards */
.action-card {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 2px solid #E6E9ED;
    /* Subtle border */
    border-radius: 5px;
    padding: 30px 20px;
    text-decoration: none;
    transition: all 0.3s ease;
    /* Animation */
    color: #5A738E;
    text-align: center;
}

.action-card:hover {
    border-color: #1ABB9C;
    /* Green accent on hover */
    background: #F2F8F8;
    transform: translateY(-5px);
    /* Lift up effect */
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.action-card i {
    font-size: 40px;
    margin-bottom: 15px;
    color: #2A3F54;
    transition: color 0.3s;
}

.action-card:hover i {
    color: #1ABB9C;
    /* Icon turns green */
}

.action-card span {
    font-size: 16px;
}

/* Sidebar Toggle Logic */
body.nav-collapsed .sidebar {
    width: 70px;
}

body.nav-collapsed .main-header {
    margin-left: 70px;
}

body.nav-collapsed .main-content {
    margin-left: 70px;
}

body.nav-collapsed .sidebar-brand span,
body.nav-collapsed .profile-info,
body.nav-collapsed .menu-link span,
body.nav-collapsed .chevron,
body.nav-collapsed .menu-section-label {
    display: none;
}

body.nav-collapsed .profile-section {
    justify-content: center;
    padding: 15px 10px;
}

body.nav-collapsed .sidebar-brand {
    justify-content: center;
}

body.nav-collapsed .menu-link {
    padding: 15px;
    justify-content: center;
}

body.nav-collapsed .menu-link i {
    margin: 0;
    font-size: 20px;
}