/* ========================================
   ROOT VARIABLES
======================================== */

:root {

    /* COLORS */
    --primary: #2563eb;
    --primary-hover: #1d4ed8;

    --success: #16a34a;
    --warning: #d97706;
    --danger: #dc2626;

    --dark: #111827;

    --bg: #f4f7fb;
    --card-bg: #ffffff;

    --text: #111827;
    --muted: #6b7280;

    --border: #e5e7eb;

    /* SHADOWS */
    --shadow-sm:
        0 2px 8px rgba(0,0,0,0.04);

    --shadow-md:
        0 4px 20px rgba(0,0,0,0.06);

    /* RADIUS */
    --radius-sm: 12px;
    --radius-md: 18px;
    --radius-lg: 24px;

    /* TRANSITIONS */
    --transition:
        all 0.2s ease;

}

/* ========================================
   GLOBAL
======================================== */

html,
body {
    height: 100%;
}

body {

    background: var(--bg);

    color: var(--text);

    font-family:
        "Inter",
        "Segoe UI",
        sans-serif;

    margin: 0;
}

/* LINKS */

a {
    text-decoration: none;
}

/* ========================================
   LAYOUT
======================================== */

.app-layout {
    min-height: 100vh;
}

/* ========================================
   HEADER
======================================== */

.header {

    background: white;

    border-bottom:
        1px solid var(--border);

    position: sticky;

    top: 0;

    z-index: 1000;

    backdrop-filter: blur(12px);
}

/* LOGO */

.logo-container {
    display: flex;
    align-items: center;
    gap: 14px;
}

.logo-icon {

    width: 46px;
    height: 46px;

    border-radius: 14px;

    background:
        linear-gradient(
            135deg,
            var(--primary),
            #3b82f6
        );

    color: white;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 20px;
}

.logo-title {

    font-size: 20px;
    font-weight: 700;

    color: var(--text);

    margin: 0;
}

.logo-subtitle {

    color: var(--muted);

    font-size: 12px;
}

/* MENU BUTTON */

.btn-menu {

    width: 42px;
    height: 42px;

    border: none;

    border-radius: 12px;

    background: #eff6ff;

    color: var(--primary);

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 20px;
}

/* ========================================
   SIDEBAR
======================================== */

.sidebar {

    background: var(--dark);

    min-height: calc(100vh - 76px);

    padding: 20px 14px;
}

/* SIDEBAR CONTENT */

.sidebar-content {

    position: sticky;

    top: 95px;
}

/* SEARCH */

.sidebar-search {

    margin-bottom: 24px;
}

.sidebar-search .input-group {

    background: white;

    border-radius: 14px;

    overflow: hidden;
}

.sidebar-search .form-control {

    border: none;

    box-shadow: none;

    padding: 12px 14px;
}

.sidebar-search .input-group-text {

    border: none;

    background: white;
}

/* NAV */

.sidebar-nav {

    display: flex;

    flex-direction: column;

    gap: 8px;
}

/* LINK */

.sidebar-link {

    display: flex;
    align-items: center;
    gap: 14px;

    padding: 14px 16px;

    border-radius: 14px;

    color: #d1d5db;

    font-weight: 500;

    transition: var(--transition);
}

/* ICON */

.sidebar-link i {
    font-size: 18px;
}

/* HOVER */

.sidebar-link:hover {

    background: #1f2937;

    color: white;
}

/* ACTIVE */

.sidebar-link.active {

    background: var(--primary);

    color: white;
}

/* ========================================
   MAIN CONTENT
======================================== */

.content-area {

    padding: 24px;

    min-height: calc(100vh - 140px);
}

/* ========================================
   FOOTER
======================================== */

.footer {

    background: white;

    border-top:
        1px solid var(--border);

    padding: 16px;

    color: var(--muted);

    font-size: 14px;
}

/* ========================================
   OFFCANVAS
======================================== */

.sidebar-mobile {

    background: var(--dark);

    color: white;
}

.sidebar-mobile .offcanvas-header {

    border-bottom:
        1px solid rgba(255,255,255,0.08);
}

.sidebar-mobile .offcanvas-title {

    font-weight: 700;
}

.sidebar-mobile .sidebar-link {

    color: #d1d5db;
}

/* ========================================
   UTILITIES
======================================== */

.section-spacing {
    margin-bottom: 24px;
}

.card-spacing {
    padding: 24px;
}

/* ========================================
   SCROLLBAR
======================================== */

::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-thumb {

    background: #d1d5db;

    border-radius: 999px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

/* ========================================
   RESPONSIVE
======================================== */

@media (max-width: 992px) {

    .content-area {
        padding: 20px;
    }

}

@media (max-width: 768px) {

    .content-area {
        padding: 16px;
    }

    .logo-title {
        font-size: 18px;
    }

    .logo-icon {

        width: 42px;
        height: 42px;

        border-radius: 12px;
    }

}

@media (max-width: 480px) {

    .content-area {
        padding: 14px;
    }

}


/* ========================================
   MOBILE SIDEBAR FOOTER
======================================== */

.mobile-sidebar-footer {

    margin-top: 28px;

    padding-top: 22px;

    border-top:
        1px solid rgba(255,255,255,0.08);
}

/* ========================================
   MOBILE LOGOUT BUTTON
======================================== */

.mobile-logout-btn {

    width: 100%;

    height: 52px;

    border: none;

    border-radius: 16px;

    background:
        rgba(239,68,68,0.12);

    color: #fca5a5;

    display: flex;

    align-items: center;

    justify-content: center;

    gap: 10px;

    font-weight: 600;

    font-size: 15px;

    transition: var(--transition);
}

/* HOVER */

.mobile-logout-btn:hover {

    background:
        rgba(239,68,68,0.22);

    color: white;

    transform: translateY(-1px);
}

/* ICON */

.mobile-logout-btn i {

    font-size: 16px;
}

/* ========================================
   SIDEBAR: secciones con nombre (staff novato)
======================================== */

.logo-container { color: inherit; }

.header-user {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text);
    font-weight: 500;
}

.sidebar-section { margin-bottom: 26px; }

.sidebar-label {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #9ca3af;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    margin-bottom: 10px;
    padding-left: 4px;
}

.sidebar-search .input-group {
    background: white;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .35);
}

.sidebar-search .form-control {
    border: none;
    box-shadow: none;
    padding: 12px 14px;
}

.sidebar-search .btn {
    border: none;
    border-radius: 0;
    padding: 0 14px;
}

.sidebar-hint {
    color: #9ca3af;
    font-size: 12px;
    margin-top: 8px;
    padding-left: 4px;
    line-height: 1.35;
}

.sidebar-link { align-items: flex-start; }
.sidebar-link > i { margin-top: 2px; }

.sidebar-link-title {
    display: block;
    font-weight: 600;
    line-height: 1.2;
}

.sidebar-link-desc {
    display: block;
    font-size: 12px;
    font-weight: 400;
    color: #9ca3af;
    margin-top: 2px;
}

.sidebar-link.active .sidebar-link-desc,
.sidebar-link:hover .sidebar-link-desc { color: rgba(255, 255, 255, .8); }
