﻿/* =========================================================================
   5. PORTAL LAYOUT (Migrado de NLook)
   ========================================================================= */
/* 
   Modern Corporate Design System & CSS for NLook Portal
   Navy Blue & White theme, spacious, clean, and breathable.
*/

:root {
    /* Colors - Navy & Corporate White Theme */
    --primary: #00338D;
    /* Corporate Navy Blue */
    --primary-hover: #002264;
    --secondary: #0F172A;
    /* Dark navy/slate for headings */
    --bg-color: #F8FAFC;
    /* Very light cool gray for background */
    --card-bg: #FFFFFF;
    --text-main: #334155;
    --text-muted: #64748B;
    --border-light: #E2E8F0;
    --divider: #F1F5F9;
    /* Icon Accent Colors (softened, more professional) */
    --accent-blue: #2563EB;
    --accent-blue-bg: #EFF6FF;
    --accent-green: #059669;
    --accent-green-bg: #ECFDF5;
    --accent-orange: #D97706;
    --accent-orange-bg: #FFFBEB;
    --accent-teal: #0D9488;
    --accent-teal-bg: #F0FDFA;
    --accent-purple: #7C3AED;
    --accent-purple-bg: #F5F3FF;
    --accent-red: #DC2626;
    --accent-red-bg: #FEF2F2;
    --accent-indigo: #4F46E5;
    --accent-indigo-bg: #EEF2FF;
    --accent-emerald: #10B981;
    --accent-emerald-bg: #ECFDF5;
    --accent-pink: #DB2777;
    --accent-pink-bg: #FDF2F8;
    /* Shadows - Extemely subtle, clean */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    --shadow-hover: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.05);
    --shadow-card: 0 10px 25px -5px rgba(0, 34, 100, 0.08);
    /* slight navy shadow */
    /* Dimensions & Transitions */
    --sidebar-width: 260px;
    --topbar-height: 72px;
    --transition: all 0.25s ease;
    --border-radius: 12px;
    /* More corporate, less rounded */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    /* We handle scrolling inside components */
    font-size: 14px;
    /* =========================================================================
   5. PORTAL LAYOUT (Migrado de NLook)
   ========================================================================= */

    body {
        background-color: var(--bg-color);
        color: var(--text-main);
        font-size: 14px;
    }

    .app-container {
        display: flex;
        min-height: 100vh;
    }

    .sidebar {
        width: var(--sidebar-width);
        background: var(--bg-dark-soft);
        /* cambio-fondo-barra: Aplicando la textura del footer a la barra lateral */
        background-image: linear-gradient(to bottom, rgba(15, 23, 42, 0.45) 0%, rgba(5, 10, 25, 0.95) 100%), url('../../_img/Texturas-Don Bosco-01.png');
        background-size: cover;
        background-position: left center;
        background-repeat: no-repeat;
        /* border-right removed for seamless texture */
        display: flex;
        flex-direction: column;
        transition: var(--transition);
        z-index: 50;
        position: sticky;
        top: 0;
        height: 100vh;
        --card-bg: transparent;
        --secondary: #ffffff;
        --text-main: #f8fafc;
        --text-muted: #94a3b8;
        --border-light: rgba(255, 255, 255, 0.08);
        --divider: rgba(255, 255, 255, 0.05);
        --accent-blue-bg: rgba(255, 255, 255, 0.1);
        color: var(--secondary);
    }

        .sidebar.collapsed {
            transform: translateX(-100%);
            position: absolute;
        }

    .sidebar-header {
        height: var(--topbar-height);
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0 24px;
        /* border-bottom removed */
    }

    .logo {
        display: flex;
        align-items: center;
        gap: 12px;
    }

    .logo-icon {
        width: 32px;
        height: 32px;
        background: linear-gradient(135deg, var(--primary) 0%, #1e40af 100%);
        border-radius: 8px;
        display: flex;
        align-items: center;
        justify-content: center;
        color: white;
        font-size: 18px;
    }

    .logo-text {
        font-size: 18px;
        font-weight: 700;
        color: var(--secondary);
        letter-spacing: -0.3px;
    }

    .close-sidebar-btn {
        display: none;
    }

    .sidebar-menu {
        padding: 2px 20px;
        flex: 1;
        overflow-y: auto;
        scrollbar-width: thin;
        /* Firefox */
    }

        .sidebar-menu::-webkit-scrollbar {
            display: none;
            /* Chrome/Safari */
        }


    .menu-label {
        display: block;
        font-size: 11px;
        font-weight: 700;
        color: var(--text-muted);
        letter-spacing: 1px;
        text-transform: uppercase;
        padding: 0 12px;
        margin-bottom: 16px;
    }

    .menu-item {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 10px 14px;
        border-radius: 8px;
        color: var(--text-muted);
        text-decoration: none;
        font-weight: 500;
        font-size: 13px;
        transition: var(--transition);
        margin-bottom: 6px;
    }

        .menu-item i {
            font-size: 22px;
        }

        .menu-item:hover {
            background-color: var(--divider);
            color: var(--secondary);
        }

        .menu-item.active {
            background-color: var(--accent-blue-bg);
            color: var(--primary);
            font-weight: 600;
        }

    .sidebar-footer {
        padding: 24px 20px;
        /* border-top removed */
    }

    .system-status {
        display: flex;
        align-items: center;
        gap: 8px;
        font-size: 12px;
        font-weight: 500;
        color: var(--text-muted);
    }

    .status-dot {
        width: 6px;
        height: 6px;
        background-color: var(--accent-green);
        border-radius: 50%;
        box-shadow: 0 0 0 3px var(--accent-green-bg);
    }
    /* ==================================
   MAIN CONTENT & TOPBAR 
================================== */
    .main-content {
        flex: 1;
        display: flex;
        flex-direction: column;
        min-width: 0;
    }

    .topbar {
        height: var(--topbar-height);
        background: var(--bg-dark-soft);
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0 40px;
        z-index: 40;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
        position: sticky;
        top: 0;
        --primary: #ffffff;
        --secondary: #ffffff;
        --text-main: #f8fafc;
        --text-muted: #ffffff;
        --divider: rgba(255, 255, 255, 0.1);
        --border-light: rgba(255, 255, 255, 0.08);
        --bg-color: rgba(255, 255, 255, 0.05);
        color: var(--secondary);
    }

        .topbar .icon-btn {
            border-radius: 50%;
            width: 38px;
            height: 38px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 22px;
            color: var(--secondary);
        }

            .topbar .icon-btn:hover {
                background-color: var(--divider);
                color: var(--secondary);
            }


    .topbar-left {
        display: flex;
        align-items: center;
        gap: 16px;
    }

    .menu-toggle {
        font-size: 22px;
        color: var(--secondary);
        padding: 8px;
        border-radius: 50%;
        cursor: pointer;
        transition: var(--transition);
        display: flex;
        align-items: center;
        justify-content: center;
        width: 38px;
        height: 38px;
    }

        .menu-toggle:hover {
            background-color: rgba(255, 255, 255, 0.1);
            color: var(--secondary);
        }

    .breadcrumb h1 {
        font-size: 18px;
        color: var(--secondary);
        font-weight: 600;
        line-height: 1.2;
    }

    .badge-role {
        font-size: 11px;
        background-color: var(--accent-blue-bg);
        padding: 4px 10px;
        border-radius: 20px;
        color: var(--primary);
        font-weight: 600;
        margin-top: 4px;
        display: inline-block;
    }

    .topbar-right {
        display: flex;
        align-items: center;
        gap: 24px;
    }

    .search-box {
        background-color: var(--bg-color);
        border-radius: 8px;
        padding: 8px 16px;
        display: flex;
        align-items: center;
        gap: 10px;
        width: 280px;
        border: 1px solid var(--border-light);
        transition: var(--transition);
    }

        .search-box:focus-within {
            border-color: var(--primary);
            background-color: white;
            box-shadow: 0 0 0 3px rgba(0, 51, 141, 0.1);
        }

        .search-box i {
            color: var(--text-muted);
            font-size: 22px;
        }

        .search-box input {
            border: none;
            outline: none;
            width: 100%;
            font-size: 13px;
            color: var(--text-main);
            background: transparent;
        }

    .search-shortcut {
        font-size: 10px;
        background-color: white;
        border: 1px solid var(--border-light);
        padding: 2px 6px;
        border-radius: 4px;
        color: var(--text-muted);
        font-weight: 600;
    }

    .notification-btn {
        font-size: 22px;
        color: var(--secondary);
        padding: 8px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 38px;
        height: 38px;
        padding: 0;
        background: transparent;
        border: none;
        cursor: pointer;
        transition: var(--transition);
    }

        .notification-btn:hover {
            color: var(--secondary);
            background-color: rgba(255, 255, 255, 0.1);
        }

    .notification-dot {
        position: absolute;
        top: 6px;
        right: 8px;
        width: 8px;
        height: 8px;
        background-color: var(--accent-red);
        border-radius: 50%;
        border: 2px solid white;
    }

    .user-profile {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 4px 8px;
        border-radius: 8px;
        cursor: pointer;
        transition: var(--transition);
        position: relative;
        /* Added for dropdown positioning */
    }

        .user-profile:hover,
        .user-profile.show-dropdown {
            background-color: var(--divider);
        }

    .avatar {
        width: 32px;
        height: 32px;
        border-radius: 50%;
        object-fit: cover;
    }

    .user-info {
        display: flex;
        flex-direction: column;
    }

    .user-name {
        font-size: 13px;
        font-weight: 600;
        color: var(--secondary);
    }

    .user-id {
        font-size: 11px;
        color: var(--text-muted);
    }
    /* User Profile Dropdown */
    .profile-dropdown {
        /* Reset text variables for light dropdown container */
        --primary: #00338D;
        --secondary: #0F172A;
        --bg-color: #F8FAFC;
        --text-main: #334155;
        --text-muted: #64748B;
        --divider: #F1F5F9;
        --border-light: #E2E8F0;
        position: absolute;
        top: calc(100% + 8px);
        right: 0;
        width: 200px;
        background: white;
        border-radius: 8px;
        box-shadow: var(--shadow-md);
        border: 1px solid var(--border-light);
        display: flex;
        flex-direction: column;
        padding: 8px 0;
        z-index: 100;
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
        transition: var(--transition);
    }

    .hidden-dropdown {
        opacity: 0;
        visibility: hidden;
        transform: translateY(10px) !important;
        pointer-events: none;
    }

    .profile-item {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 10px 16px;
        color: var(--text-main);
        text-decoration: none;
        font-size: 13px;
        font-weight: 500;
        transition: var(--transition);
    }

        .profile-item i {
            font-size: 16px;
        }

        .profile-item:hover {
            background-color: var(--bg-color);
            color: var(--primary);
        }

    .text-danger {
        color: var(--accent-red) !important;
    }

        .text-danger:hover {
            background-color: var(--accent-red-bg) !important;
            color: #b91c1c !important;
        }

    .dropdown-divider {
        height: 1px;
        background-color: var(--divider);
        margin: 4px 0;
    }
    /* Online Users */
    .online-users {
        display: flex;
        align-items: center;
        gap: 8px;
        color: var(--secondary);
        font-weight: 700;
        font-size: 22px;
        padding: 6px 10px;
        border-radius: 8px;
        cursor: default;
        transition: var(--transition);
    }

        .online-users i {
            color: var(--secondary);
        }

        .online-users:hover {
            background-color: var(--bg-color);
        }
    /* ==================================
   SUB-NAVIGATION TABS
================================== */
    .subnav {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0 40px;
        background-color: white;
        border-bottom: 1px solid var(--border-light);
        height: 52px;
        position: sticky;
        top: var(--topbar-height);
        z-index: 39;
    }

    .nav-tabs {
        display: flex;
        list-style: none;
        gap: 32px;
        height: 100%;
    }

    .tab {
        display: flex;
        height: 100%;
    }

        .tab a {
            text-decoration: none;
            color: var(--text-muted);
            font-weight: 500;
            font-size: 13px;
            display: flex;
            align-items: center;
            position: relative;
            transition: var(--transition);
        }

        .tab:hover a {
            color: var(--secondary);
        }

        .tab.active a {
            color: var(--primary);
            font-weight: 600;
        }

            .tab.active a::after {
                content: '';
                position: absolute;
                bottom: -1px;
                /* Cover the border bottom */
                left: 0;
                right: 0;
                height: 2px;
                background-color: var(--primary);
            }

    .btn-text {
        background: transparent;
        border: none;
        color: var(--text-muted);
        font-weight: 500;
        font-size: 13px;
        display: flex;
        align-items: center;
        gap: 8px;
        cursor: pointer;
        transition: var(--transition);
    }

        .btn-text i {
            font-size: 16px;
        }

        .btn-text:hover {
            color: var(--secondary);
        }
    /* ==================================
   SECONDARY MENU BAR (DROPDOWNS)
================================== */
    .menubar {
        background-color: white;
        padding: 0 40px;
        height: 44px;
        display: flex;
        align-items: center;
        border-bottom: 1px solid var(--border-light);
        z-index: 38;
        transition: all 0.3s ease;
        position: sticky;
        top: calc(var(--topbar-height) + 52px);
        margin-bottom: -45px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    }

    .hidden-menubar {
        display: none;
    }

    .menu-list {
        display: flex;
        list-style: none;
        gap: 32px;
    }

    .menu-item-dropdown {
        position: relative;
    }

        .menu-item-dropdown > a {
            text-decoration: none;
            color: var(--text-main);
            font-size: 13px;
            font-weight: 500;
            display: flex;
            align-items: center;
            gap: 6px;
            padding: 10px 0;
            transition: var(--transition);
        }

        .menu-item-dropdown:hover > a {
            color: var(--primary);
        }
    /* Base Dropdown List */
    .dropdown,
    .submenu {
        position: absolute;
        top: 100%;
        left: 0;
        background-color: white;
        min-width: 180px;
        border-radius: 8px;
        box-shadow: var(--shadow-md);
        border: 1px solid var(--border-light);
        list-style: none;
        opacity: 0;
        visibility: hidden;
        transform: translateY(10px);
        transition: var(--transition);
        padding: 8px 0;
        z-index: 100;
    }
    /* Show Dropdown on Click via JS Class */
    .menu-item-dropdown.show-dropdown > .dropdown {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .dropdown li,
    .submenu li {
        position: relative;
    }

    .dropdown a,
    .submenu a {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 8px 16px;
        color: var(--text-main);
        text-decoration: none;
        font-size: 13px;
        font-weight: 500;
        transition: var(--transition);
    }

        .dropdown a:hover,
        .submenu a:hover {
            background-color: var(--bg-color);
            color: var(--primary);
        }
    /* Submenu specifics */
    .has-submenu {
        position: relative;
    }

    .submenu {
        top: 0;
        left: 100%;
        /* Push it to the right */
        transform: translateX(10px);
    }

    .has-submenu.show-submenu > .submenu {
        opacity: 1;
        visibility: visible;
        transform: translateX(0);
    }
    /* ==================================
   DASHBOARD LAYOUT
================================== */
    .dashboard-scroll {
        flex: 1;
        padding: 32px 40px;
        background-color: var(--bg-color);
        background-image: url('../../_img/FondoBlanco.png');
        /* Apply soft white background image */
        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;
        scrollbar-width: thin;
    }

        .dashboard-scroll::-webkit-scrollbar {
            width: 6px;
        }

        .dashboard-scroll::-webkit-scrollbar-thumb {
            background: #cbd5e1;
            border-radius: 10px;
        }

    .dashboard-layout {
        display: flex;
        /* Changed from grid to flex since we have no right column */
        flex-direction: column;
        max-width: 1200px;
        margin: 0 auto;
        padding-bottom: 100px;
        /* Respiracion antes del footer */
    }
    /* PROJECTS SECTION */
    .section-header {
        display: flex;
        justify-content: space-between;
        align-items: flex-end;
        margin-bottom: 32px;
        /* More spacing */
    }
    /* BRAND & BREADCRUMB */
    .brand {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .brand-home-link {
        color: var(--secondary);
    }

        .brand-home-link i {
            color: var(--secondary);
        }

        .brand-home-link:hover i {
            color: var(--secondary);
        }

    .role-badge {
        background: #eef2ff;
        color: var(--primary);
        padding: 4px 12px;
        border-radius: 20px;
        font-size: 11px;
        font-weight: 600;
        display: inline-block;
    }

    .section-title {
        font-size: 20px;
        color: var(--secondary);
        font-weight: 600;
    }

    .section-subtitle {
        font-size: 13px;
        color: var(--text-muted);
        margin-top: 6px;
    }

    .btn-outline {
        background: transparent;
        border: 1px solid var(--border-light);
        color: var(--text-main);
        padding: 8px 16px;
        border-radius: 8px;
        font-size: 13px;
        font-weight: 500;
        display: flex;
        align-items: center;
        gap: 8px;
        cursor: pointer;
        background: white;
        transition: var(--transition);
    }

        .btn-outline:hover {
            border-color: var(--text-muted);
            background-color: var(--bg-color);
        }
    /* ==================================
   DASHBOARD HUB (MAIN VIEW)
================================== */
    .dashboard-hub {
        display: flex;
        flex-direction: column;
        gap: 32px;
    }
    /* Hero Banner Widget */
    .hero-widget {
        background-color: var(--bg-dark-soft);
        color: white;
        padding: 32px 40px;
        border-radius: 12px;
        display: flex;
        justify-content: space-between;
        align-items: center;
        position: relative;
        overflow: hidden;
        box-shadow: var(--shadow-md);
    }

    .hero-widget-stacked {
        padding: 24px;
        flex-direction: column;
        align-items: flex-start;
        justify-content: center;
    }

    .hero-bg-shapes {
        position: absolute;
        top: -40px;
        right: 20%;
        width: 200px;
        height: 200px;
        background: rgba(255, 255, 255, 0.05);
        border-radius: 50%;
    }

    .hero-content {
        max-width: 500px;
        position: relative;
        z-index: 2;
    }

    .hero-tag {
        background: rgba(255, 255, 255, 0.15);
        padding: 6px 10px;
        border-radius: 6px;
        font-size: 10px;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 1px;
        display: inline-block;
        margin-bottom: 12px;
    }

    .hero-content h3 {
        font-size: 24px;
        font-weight: 700;
        margin-bottom: 8px;
        line-height: 1.2;
    }

    .hero-content p {
        font-size: 14px;
        opacity: 0.9;
        margin-bottom: 24px;
        line-height: 1.5;
    }

    .btn-primary {
        background: white;
        color: var(--primary);
        border: none;
        padding: 10px 20px;
        border-radius: 8px;
        font-weight: 600;
        font-size: 13px;
        cursor: pointer;
        transition: var(--transition);
        align-self: flex-start;
    }

        .btn-primary:hover {
            background-color: #f8fafc;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
        }

    .hero-illustration {
        width: 200px;
        position: relative;
        z-index: 2;
    }

    .hero-widget-stacked .hero-illustration {
        display: none;
        /* Hide illustration in stacked view to save vertical space */
    }
    /* Hub Grid 2 Columns */
    .hub-grid {
        display: grid;
        grid-template-columns: 2fr 1fr;
        gap: 32px;
    }
    /* Quick Actions List */
    .quick-actions-widget {
        background: white;
        padding: 32px;
        border-radius: 12px;
        border: 1px solid var(--border-light);
        box-shadow: var(--shadow-sm);
    }

    .widget-heading {
        font-size: 16px;
        color: var(--secondary);
        font-weight: 600;
        margin-bottom: 24px;
    }

    .action-list {
        display: flex;
        flex-direction: column;
        gap: 4px;
        /* Reduced gap */
    }

    .action-item {
        background: transparent;
        border: 1px solid transparent;
        padding: 8px 16px;
        /* Reduced padding */
        border-radius: 10px;
        display: flex;
        align-items: center;
        gap: 16px;
        cursor: pointer;
        transition: var(--transition);
        width: 100%;
        text-align: left;
    }

    .action-icon {
        width: 40px;
        height: 40px;
        border-radius: 10px;
        background: var(--bg-color);
        display: flex;
        align-items: center;
        justify-content: center;
        color: var(--text-muted);
        font-size: 20px;
        transition: var(--transition);
    }

    .action-item span {
        flex: 1;
        font-size: 16px;
        /* Increased from 14px */
        font-weight: 500;
        color: var(--text-main);
        transition: var(--transition);
    }

    .chevron {
        color: var(--text-muted);
        font-size: 16px;
        transition: var(--transition);
        opacity: 0;
        transform: translateX(-5px);
    }

    .action-item:hover {
        background-color: var(--bg-color);
        border-color: var(--border-light);
    }

        .action-item:hover .action-icon {
            background: white;
            color: var(--primary);
            box-shadow: var(--shadow-sm);
        }

        .action-item:hover span {
            color: var(--secondary);
            font-weight: 600;
        }

        .action-item:hover .chevron {
            opacity: 1;
            transform: translateX(0);
            color: var(--primary);
        }
    /* Tools Stack & Row */
    .widgets-stack {
        display: flex;
        flex-direction: column;
        gap: 20px;
    }

    .tools-row {
        display: flex;
        gap: 16px;
    }

        .tools-row .tool-card {
            flex: 1;
            padding: 16px 20px;
        }

    .tool-card {
        background: white;
        border-radius: 12px;
        padding: 24px;
        display: flex;
        align-items: center;
        gap: 16px;
        border: 1px solid var(--border-light);
        box-shadow: var(--shadow-sm);
        cursor: pointer;
        transition: var(--transition);
        position: relative;
        overflow: hidden;
    }

        .tool-card:hover {
            transform: translateY(-3px);
            box-shadow: var(--shadow-card);
            border-color: var(--border-light);
        }

    .tool-icon-wrapper {
        width: 48px;
        height: 48px;
        border-radius: 12px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 24px;
    }

    .blue-bg {
        background: var(--accent-blue-bg);
    }

    .purple-bg {
        background: var(--accent-purple-bg);
    }

    .text-blue {
        color: var(--accent-blue);
    }

    .text-purple {
        color: var(--accent-purple);
    }

    .tool-info h4 {
        font-size: 15px;
        color: var(--secondary);
        font-weight: 600;
        margin-bottom: 4px;
    }

    .tool-info span {
        font-size: 13px;
        color: var(--text-muted);
    }

    .tool-arrow {
        margin-left: auto;
        color: var(--text-muted);
        font-size: 18px;
        transition: var(--transition);
        opacity: 0;
        transform: translateX(-10px);
    }

    .tool-card:hover .tool-arrow {
        opacity: 1;
        transform: translateX(0);
        color: var(--primary);
    }
    /* GRID OF CARDS (COMPACT / LIST VIEW) */
    .projects-compact-list {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 16px;
    }

    .compact-card {
        background-color: var(--card-bg);
        border-radius: 8px;
        /* Bordes menos redondeados */
        padding: 12px 16px;
        /* Padding lineal (horizontal form) */
        display: flex;
        align-items: center;
        position: relative;
        border: 1px solid var(--border-light);
        box-shadow: var(--shadow-sm);
        transition: var(--transition);
        cursor: pointer;
        text-decoration: none;
    }

        .compact-card:hover {
            transform: translateY(-2px);
            box-shadow: var(--shadow-md);
            border-color: var(--border-light);
            background-color: var(--bg-color);
            /* Ligero cambio de fondo */
        }

    .compact-icon {
        width: 32px;
        /* Ícono muy pequeñito */
        height: 32px;
        border-radius: 6px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 16px;
        margin-right: 12px;
        flex-shrink: 0;
    }

    .brand-home-link {
        display: flex;
        align-items: center;
        gap: 12px;
        text-decoration: none;
        color: var(--secondary);
        font-size: 20px;
        font-weight: 700;
        transition: var(--transition);
    }

        .brand-home-link i {
            font-size: 22px;
            color: var(--secondary);
        }

        .brand-home-link:hover {
            opacity: 0.8;
        }

    .compact-title {
        font-size: 14px;
        font-weight: 600;
        color: var(--secondary);
        flex-grow: 1;
    }

    .compact-arrow {
        color: var(--text-muted);
        font-size: 14px;
        transition: var(--transition);
    }

    .compact-card:hover .compact-arrow {
        color: var(--primary);
        transform: translateX(4px);
    }
    /* GRID OF CARDS */
    .projects-grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        /* Reducido de 200px a 160px para que quepan más y sean más pequeñas */
        gap: 16px;
        /* Reducido de 24px a 16px para hacer la grilla más compacta */
    }

    .project-card {
        background-color: var(--card-bg);
        border-radius: var(--border-radius);
        padding: 20px 16px;
        /* Padding interno mucho más compacto (antes 28px 24px) */
        display: flex;
        flex-direction: column;
        position: relative;
        border: 1px solid var(--border-light);
        box-shadow: var(--shadow-sm);
        transition: var(--transition);
        cursor: pointer;
    }

        .project-card:hover {
            transform: translateY(-3px);
            /* Movimiento más sutil en tarjetas pequeñas */
            box-shadow: var(--shadow-card);
            border-color: var(--border-light);
        }

    .card-icon-wrapper {
        width: 40px;
        /* Ícono y contenedor más pequeños (antes 48px) */
        height: 40px;
        border-radius: 10px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 20px;
        /* Ícono interior más pequeño (antes 24px) */
        margin-bottom: 16px;
        /* Menos espacio debajo del ícono (antes 24px) */
        transition: var(--transition);
    }
    /* Specific Colors for Icons - Softened */
    .blue {
        background: var(--accent-blue-bg);
        color: var(--accent-blue);
    }

    .green {
        background: var(--accent-green-bg);
        color: var(--accent-green);
    }

    .orange {
        background: var(--accent-orange-bg);
        color: var(--accent-orange);
    }

    .teal {
        background: var(--accent-teal-bg);
        color: var(--accent-teal);
    }

    .purple {
        background: var(--accent-purple-bg);
        color: var(--accent-purple);
    }

    .red {
        background: var(--accent-red-bg);
        color: var(--accent-red);
    }

    .indigo {
        background: var(--accent-indigo-bg);
        color: var(--accent-indigo);
    }

    .emerald {
        background: var(--accent-emerald-bg);
        color: var(--accent-emerald);
    }

    .pink {
        background: var(--accent-pink-bg);
        color: var(--accent-pink);
    }

    .amber {
        background: var(--accent-orange-bg);
        color: var(--accent-orange);
    }

    .card-content h3 {
        font-size: 14px;
        /* Título un poco más pequeño (antes 15px) */
        color: var(--secondary);
        font-weight: 600;
        margin-bottom: 0;
        /* Sin margen porque ya no hay subtítulo */
    }


    .btn-access {
        margin-top: 16px;
        /* Menos espacio arriba del botón (antes 24px) */
        background: transparent;
        border: none;
        color: var(--primary);
        font-weight: 600;
        font-size: 12px;
        /* Botón más pequeño (antes 13px) */
        display: flex;
        align-items: center;
        gap: 6px;
        /* Espacio entre texto y flecha (antes 8px) */
        cursor: pointer;
        transition: var(--transition);
        opacity: 0;
        transform: translateX(-10px);
    }

    .project-card:hover .btn-access {
        opacity: 1;
        transform: translateX(0);
    }
    /* Buttons bare / reset */
    button {
        outline: none;
    }

    .icon-btn {
        background: transparent;
        border: none;
        cursor: pointer;
    }
    /* Responsive Overrides */
    @media (max-width: 992px) {
        .sidebar {
            position: fixed;
            height: 100vh;
            transform: translateX(-100%);
        }

            .sidebar.open {
                transform: translateX(0);
                box-shadow: var(--shadow-card);
            }

        .close-sidebar-btn {
            display: block;
            font-size: 24px;
            color: var(--text-muted);
        }
    }

    @media (max-width: 600px) {
        .topbar {
            padding: 0 20px;
        }

        .search-box {
            display: none;
        }

        .dashboard-scroll {
            padding: 20px;
        }

        .projects-grid {
            grid-template-columns: 1fr;
        }

        .projects-compact-list {
            grid-template-columns: 1fr;
        }

        .nav-tabs {
            overflow-x: auto;
            gap: 20px;
            padding-bottom: 4px;
        }

        .subnav {
            padding: 0 20px;
        }

        .menubar {
            padding: 0 20px;
            overflow-x: auto;
        }
    }
}
