@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700&display=swap');

:root {
    --font-main: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    
    /* Paleta de Colores Moderna (Estilo Hireism) */
    --bg-app: #f4f7fe;
    --bg-card: #ffffff;
    --bg-sidebar: #ffffff;
    --bg-sidebar-hover: #f8fafc;
    --border-color: #f1f5f9;
    --border-hover: #e2e8f0;
    
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --text-on-sidebar: #475569;
    
    --accent: #435bfa;
    --accent-hover: #374cf1;
    --accent-light: #eaedff;
    
    --success: #10b981;
    --success-light: #ecfdf5;
    --warning: #f59e0b;
    --warning-light: #fef3c7;
    --danger: #ef4444;
    --danger-light: #fef2f2;
    --info: #0ea5e9;
    --info-light: #e0f2fe;
    
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.03);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.05);
    
    --sidebar-width: 260px;
    --navbar-height: 70px;
    --transition-speed: 0.25s;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-app);
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* Layout General */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar izquierda */
.sidebar {
    width: var(--sidebar-width);
    background-color: var(--bg-sidebar);
    color: var(--text-on-sidebar);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 100;
    transition: transform var(--transition-speed) ease;
}

.sidebar-brand {
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-brand img {
    height: 32px;
    width: auto;
}

.brand-name {
    font-weight: 700;
    font-size: 1.15rem;
    letter-spacing: -0.025em;
    color: #ffffff;
}

.sidebar-close {
    display: none;
}

.sidebar-menu {
    list-style: none;
    padding: 20px 12px;
    flex-grow: 1;
    overflow-y: auto;
}

.sidebar-item {
    margin-bottom: 2px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 18px;
    color: var(--text-on-sidebar);
    text-decoration: none;
    border-radius: 12px;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all var(--transition-speed) ease;
}

.sidebar-link:hover {
    background-color: var(--bg-sidebar-hover);
    color: var(--text-primary);
}

.sidebar-link.active {
    background-color: var(--accent);
    color: #ffffff;
    box-shadow: var(--shadow-sm);
}

.sidebar-link svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.sidebar-link.active svg {
    color: #ffffff;
}

.sidebar-footer {
    padding: 16px;
    background-color: #ffffff;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background-color: var(--accent);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1rem;
}

.user-details {
    flex-grow: 1;
    min-width: 0;
}

.user-name {
    font-size: 0.875rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text-primary);
}

.user-role {
    font-size: 0.75rem;
    color: var(--text-secondary);
    display: block;
}

.logout-btn {
    color: var(--text-secondary);
    text-decoration: none;
    display: flex;
    align-items: center;
    padding: 8px;
    border-radius: 6px;
    transition: background-color var(--transition-speed);
}

.logout-btn:hover {
    background-color: rgba(239, 68, 68, 0.1);
}

/* Área de contenido */
.main-content {
    margin-left: var(--sidebar-width);
    flex-grow: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: margin-left var(--transition-speed) ease;
    max-width: calc(100vw - var(--sidebar-width));
    overflow-x: hidden;
}

/* Navbar Superior */
.navbar {
    height: var(--navbar-height);
    background-color: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    position: sticky;
    top: 0;
    z-index: 99;
}

.navbar-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-primary);
}

.page-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.navbar-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-date {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Contenido Principal */
.content-body {
    padding: 32px;
    flex-grow: 1;
    min-width: 0;
}

/* Tarjetas e Indicadores */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 24px;
    margin-bottom: 32px;
}

.metric-card {
    background-color: var(--bg-card);
    border: none;
    border-radius: 20px;
    padding: 24px;
    box-shadow: var(--shadow-md);
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.metric-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.metric-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.metric-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.metric-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.metric-icon.blue { background-color: #eff6ff; color: #2563eb; }
.metric-icon.green { background-color: #ecfdf5; color: #10b981; }
.metric-icon.orange { background-color: #fffbeb; color: #f59e0b; }
.metric-icon.red { background-color: #fef2f2; color: #ef4444; }
.metric-icon.cyan { background-color: #ecfeff; color: #06b6d4; }

.metric-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.03em;
}

/* Cards Generales */
.card {
    background-color: var(--bg-card);
    border-radius: 20px;
    box-shadow: var(--shadow-md);
    margin-bottom: 24px;
    border: none;
    overflow: hidden;
    max-width: 100%;
}

.card-header {
    padding: 24px 32px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.card-body {
    padding: 24px;
}

.table-responsive {
    overflow-x: auto;
    width: 100%;
}

.table-custom {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.875rem;
}

.table-custom th {
    background-color: var(--bg-card);
    color: var(--text-muted);
    font-weight: 600;
    padding: 12px 10px;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.85rem;
}

.table-custom td {
    padding: 12px 10px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
    font-weight: 500;
}

.table-custom tr:last-child td {
    border-bottom: none;
}

.table-custom tr:hover td {
    background-color: var(--bg-app);
}

/* Formularios y Controles */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.form-control {
    width: 100%;
    padding: 10px 14px;
    font-size: 0.875rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background-color: #ffffff;
    color: var(--text-primary);
    outline: none;
    font-family: var(--font-main);
    transition: border-color var(--transition-speed);
}

.form-control:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

/* Botones */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: 10px;
    border: 1px solid transparent;
    cursor: pointer;
    font-family: var(--font-main);
    transition: all 0.2s;
    text-decoration: none;
}

.btn-primary {
    background-color: var(--accent);
    color: #ffffff;
}

.btn-primary:hover {
    background-color: var(--accent-hover);
}

.btn-secondary {
    background-color: #ffffff;
    border-color: var(--border-color);
    color: var(--text-secondary);
}

.btn-secondary:hover {
    background-color: #f8fafc;
    border-color: var(--border-hover);
}

.btn-danger {
    background-color: var(--danger);
    color: #ffffff;
}

.btn-danger:hover {
    background-color: #dc2626;
}

.btn-success {
    background-color: var(--success);
    color: #ffffff;
}

.btn-success:hover {
    background-color: #059669;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.775rem;
    border-radius: 6px;
}

/* Insignias de Estado (Badges) */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1;
}

.badge-success { background-color: var(--success-light); color: var(--success); }
.badge-warning { background-color: var(--warning-light); color: var(--warning); }
.badge-danger { background-color: var(--danger-light); color: var(--danger); }
.badge-info { background-color: var(--info-light); color: var(--info); }

/* Búsqueda y Filtros */
.table-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.search-input-wrapper {
    position: relative;
}

.search-input-wrapper svg {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    width: 16px;
    height: 16px;
}

.search-input {
    padding-left: 36px;
    width: 240px;
}

/* Modales */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal.active {
    display: flex;
}

.modal-content {
    background-color: var(--bg-card);
    border-radius: 12px;
    width: 100%;
    max-width: 600px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    overflow: hidden;
    animation: modalSlideUp 0.3s ease;
}

.modal-content.large {
    max-width: 900px;
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
}

.modal-close {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-secondary);
}

.modal-body {
    padding: 24px;
    max-height: 70vh;
    overflow-y: auto;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    background-color: #f8fafc;
}

@keyframes modalSlideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Login Page */
.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    padding: 20px;
}

.login-card {
    background-color: #ffffff;
    width: 100%;
    max-width: 440px;
    border-radius: 16px;
    box-shadow: 0 20px 25px -5px rgba(0,0,0,0.3);
    padding: 40px;
}

.login-logo {
    text-align: center;
    margin-bottom: 32px;
}

.login-logo h1 {
    font-size: 1.75rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--bg-sidebar);
}

.login-logo p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-top: 8px;
}

/* Toast Notification */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 1100;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--accent);
    padding: 16px 20px;
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 300px;
    animation: toastSlideIn 0.3s ease forwards;
}

.toast.toast-success { border-left-color: var(--success); }
.toast.toast-warning { border-left-color: var(--warning); }
.toast.toast-danger { border-left-color: var(--danger); }

.toast-message {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
}

@keyframes toastSlideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Dashboard layouts */
.dashboard-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 32px;
}

.dashboard-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    background-color: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

.list-item-title {
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--text-primary);
}

.list-item-subtitle {
    font-size: 0.775rem;
    color: var(--text-secondary);
    margin-top: 2px;
}

.quote-table-wrapper {
    margin: 0 0 12px 0;
    overflow-x: auto;
    max-width: 100%;
    width: 100%;
}

/* Columnas: 60, flexible*2, 85, 75, 75, 75, 75, 65, 75, 95, 95, 36 */
.quote-row {
    display: grid;
    grid-template-columns: 55px 2fr 75px 70px 75px 70px 45px 70px 100px 36px;
    gap: 6px;
    align-items: start;
    margin-bottom: 8px;
    min-width: 900px;
}

.quote-row-header {
    display: grid;
    grid-template-columns: 55px 2fr 75px 70px 75px 70px 45px 70px 100px 36px;
    gap: 6px;
    font-weight: 600;
    font-size: 0.7rem;
    text-transform: uppercase;
    color: var(--text-secondary);
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 6px;
    margin-bottom: 6px;
    min-width: 900px;
}

/* Inputs dentro de la tabla de cotización: padding reducido */
.quote-row .form-control {
    padding: 6px 7px;
    font-size: 0.78rem;
}

.quote-row textarea.form-control {
    min-height: 52px;
    resize: vertical;
}

/* Colores profesionales para campos de cotización (estilo Excel simplificado) */
.input-excel-cost {
    background-color: #ecfeff !important;
    border-color: #cbd5e1 !important;
    color: #083344 !important;
    font-weight: 500;
}
.input-excel-cost:focus {
    border-color: #06b6d4 !important;
    box-shadow: 0 0 0 2px rgba(6, 182, 212, 0.15) !important;
}

.input-excel-price {
    background-color: #fefce8 !important;
    border-color: #cbd5e1 !important;
    color: #713f12 !important;
    font-weight: 600;
}
.input-excel-price:focus {
    border-color: #eab308 !important;
    box-shadow: 0 0 0 2px rgba(234, 179, 8, 0.15) !important;
}

.input-excel-margin {
    background-color: #f0fdf4 !important;
    border-color: #cbd5e1 !important;
    color: #14532d !important;
    font-weight: 600;
}
.input-excel-margin:focus {
    border-color: #22c55e !important;
    box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.15) !important;
}


/* Quitar flechas de spinner en inputs numéricos específicos */
.item-margen::-webkit-outer-spin-button,
.item-margen::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.item-margen[type=number] {
    -moz-appearance: textfield;
}

/* Gráficos nativos (CSS/SVG) */
.chart-container {
    height: 300px;
    position: relative;
    margin-top: 20px;
}

.bar-chart {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    height: 100%;
    padding-top: 20px;
    overflow-x: auto;
    gap: 4px;
}

.bar-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    flex-grow: 1;
    min-width: 25px;
    height: 100%;
}

.bar-fill {
    width: 60%;
    background: linear-gradient(180deg, var(--accent) 0%, rgba(37,99,235,0.4) 100%);
    border-top-left-radius: 4px;
    border-top-right-radius: 4px;
    min-height: 4px;
    transition: height 0.6s ease;
}

.bar-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 8px;
    font-weight: 500;
}

/* Botón Flotante de Ayuda */
.btn-help-floating {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--accent);
    color: white;
    font-size: 1.5rem;
    font-weight: bold;
    border: none;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.4);
    cursor: pointer;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-help-floating:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.6);
}

/* ================================================
   OVERLAY para sidebar mobile
================================================ */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    z-index: 99;
    backdrop-filter: blur(2px);
}
.sidebar-overlay.active {
    display: block;
}

/* ================================================
   BREAKPOINT: Tablets (max 1024px)
================================================ */
@media (max-width: 1024px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    .metrics-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .navbar .search-input-wrapper {
        display: none;
    }
}

/* ================================================
   BREAKPOINT: Mobile (max 768px)
================================================ */
@media (max-width: 768px) {
    :root {
        --sidebar-width: 0px;
        --navbar-height: 60px;
    }

    /* --- Sidebar deslizante --- */
    .sidebar {
        transform: translateX(-100%);
        width: 270px;
        z-index: 200;
        box-shadow: none;
    }
    .sidebar.active {
        transform: translateX(0);
        box-shadow: 0 0 40px rgba(0,0,0,0.25);
    }

    /* --- Main content ocupa todo --- */
    .main-content {
        margin-left: 0;
        max-width: 100vw;
    }

    /* --- Navbar mobile --- */
    .navbar {
        padding: 0 16px;
        height: var(--navbar-height);
    }
    .menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 8px;
    }
    .navbar .search-input-wrapper {
        display: none;
    }
    .navbar-right a.btn {
        display: none; /* Ocultar botón "Nuevo" en móvil (ya está en la vista) */
    }
    .user-details {
        display: none; /* Solo mostrar avatar en móvil */
    }

    /* --- Cuerpo del contenido --- */
    .content-body {
        padding: 12px;
    }

    /* --- Métricas en 2 columnas --- */
    .metrics-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    .metric-card {
        padding: 16px;
    }
    .metric-value {
        font-size: 1.4rem;
    }

    /* --- Cards --- */
    .card {
        border-radius: 12px;
    }
    .card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        padding: 14px 16px;
    }
    .table-actions {
        width: 100%;
        flex-wrap: wrap;
    }
    .search-input-wrapper {
        flex: 1;
        min-width: 0;
    }
    .search-input {
        width: 100% !important;
    }

    /* --- Tablas con scroll horizontal --- */
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        border-radius: 0 0 12px 12px;
    }
    .table-custom th,
    .table-custom td {
        white-space: nowrap;
        font-size: 0.8rem;
        padding: 10px 12px;
    }
    .table-custom th:last-child,
    .table-custom td:last-child {
        position: sticky;
        right: 0;
        background: var(--bg-card);
        box-shadow: -2px 0 6px rgba(0,0,0,0.05);
    }

    /* --- Formularios en columna --- */
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    .form-row .form-group {
        width: 100%;
    }

    /* --- Modales a pantalla completa --- */
    .modal-content {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0;
        border-radius: 20px 20px 0 0;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        max-height: 92vh;
        overflow-y: auto;
        animation: slideUp 0.3s ease;
    }
    .modal {
        align-items: flex-end;
    }
    @keyframes slideUp {
        from { transform: translateY(100%); opacity: 0; }
        to   { transform: translateY(0);   opacity: 1; }
    }
    .modal-body {
        padding: 16px;
    }

    /* --- Botón ayuda flotante --- */
    .btn-help-floating {
        width: 48px;
        height: 48px;
        font-size: 18px;
        bottom: 20px;
        right: 16px;
    }

    /* --- Dashboard grid --- */
    .dashboard-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    /* --- Badges & botones en tablas --- */
    .btn-sm {
        padding: 5px 8px;
        font-size: 0.75rem;
    }
    .badge {
        font-size: 0.7rem;
        padding: 3px 8px;
    }

    /* --- Form actions stacked --- */
    .modal-footer {
        flex-direction: column-reverse;
        gap: 8px;
    }
    .modal-footer .btn {
        width: 100%;
        justify-content: center;
    }

    /* --- Chart Mobile Fixes --- */
    .card-body {
        padding: 16px;
    }
    .chart-container {
        height: 220px;
        margin-top: 10px;
    }
    .bar-chart {
        gap: 8px;
        padding-bottom: 8px;
    }
    .bar-item {
        min-width: 36px;
    }
    .bar-fill {
        width: 80%;
    }
    .bar-label {
        font-size: 0.7rem;
    }

    /* --- Sidebar Close Button --- */
    .sidebar-close {
        display: flex;
        align-items: center;
        justify-content: center;
        position: absolute;
        right: 16px;
        top: 50%;
        transform: translateY(-50%);
        background: rgba(239, 68, 68, 0.1);
        border: none;
        color: var(--danger);
        width: 36px;
        height: 36px;
        border-radius: 8px;
        cursor: pointer;
    }
    .sidebar-close svg {
        width: 20px;
        height: 20px;
    }
}

/* ================================================
   BREAKPOINT: Teléfonos pequeños (max 480px)
================================================ */
@media (max-width: 480px) {
    .metrics-grid {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }
    .metric-card {
        padding: 12px;
    }
    .metric-value {
        font-size: 1.2rem;
    }
    .metric-title {
        font-size: 0.7rem;
    }
    .content-body {
        padding: 8px;
    }
    .card-header h3 {
        font-size: 0.95rem;
    }
}
