/* =====================================================
   POS RESTAURANT – Matichs
   Diseño v2.0 — basado en estilo PEDRITO
   ===================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

:root {
    --primary:        #e85d04;
    --primary-dark:   #c44d00;
    --primary-light:  #fff3ed;
    --accent:         #f59e0b;
    --danger:         #ef4444;
    --warning:        #f97316;
    --success:        #22c55e;
    --info:           #3b82f6;
    --dark:           #0f172a;
    --text:           #1e293b;
    --text-muted:     #64748b;
    --border:         #e2e8f0;
    --bg:             #f1f5f9;
    --card:           #ffffff;
    --sidebar-w:      260px;
    --sidebar-mini:   68px;
    --radius:         14px;
    --radius-sm:      8px;
    --shadow-sm:      0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
    --shadow:         0 4px 16px rgba(0,0,0,.07), 0 1px 4px rgba(0,0,0,.04);
    --shadow-lg:      0 10px 40px rgba(0,0,0,.10), 0 2px 8px rgba(0,0,0,.05);
}

/* ── Base ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

body {
    font-family: 'Inter', 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--text);
    overflow-x: hidden;
    margin: 0;
    padding: 0;
    font-size: .9rem;
    line-height: 1.6;
}

.wrapper {
    min-height: 100vh;
    width: 100%;
    display: flex;
}

/* ── Sidebar ─────────────────────────────────────── */
#sidebar {
    position: fixed;
    top: 0; left: 0;
    height: 100vh;
    width: var(--sidebar-w);
    background: #fff;
    z-index: 1050;
    transition: width .3s cubic-bezier(.4,0,.2,1), left .3s cubic-bezier(.4,0,.2,1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: var(--shadow);
    border-right: 1px solid var(--border);
}

.sidebar-header {
    padding: 20px 18px;
    background: #fff;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

.sidebar-logo {
    width: 44px;
    height: 44px;
    object-fit: contain;
    border-radius: 12px;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(232,93,4,.25);
}

.sidebar-brand {
    color: var(--primary-dark);
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: 1px;
    line-height: 1.2;
}

.sidebar-subtitle {
    color: var(--text-muted);
    font-size: .66rem;
    margin-top: 2px;
    white-space: nowrap;
    font-weight: 500;
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 10px 0;
}

.sidebar-nav::-webkit-scrollbar { width: 3px; }
.sidebar-nav::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

.sidebar-nav ul { list-style: none; margin: 0; padding: 0 10px; }
.sidebar-nav li { margin-bottom: 2px; }

.sidebar-nav li a {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 10px 14px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: .85rem;
    font-weight: 500;
    transition: all .2s ease;
    border-radius: var(--radius-sm);
    position: relative;
}

.sidebar-nav li a i {
    font-size: .95rem;
    width: 18px;
    text-align: center;
    flex-shrink: 0;
}

.sidebar-nav li a:hover {
    color: var(--primary);
    background: var(--primary-light);
}

.sidebar-nav li a.active {
    color: var(--primary-dark);
    background: var(--primary-light);
    font-weight: 700;
}

.sidebar-nav li a.active::before {
    content: '';
    position: absolute;
    left: 0; top: 20%; bottom: 20%;
    width: 3px;
    background: var(--primary);
    border-radius: 0 3px 3px 0;
}

.sidebar-nav .nav-section {
    font-size: .65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #94a3b8;
    padding: 14px 14px 4px;
}

.sidebar-footer {
    padding: 14px 18px;
    border-top: 1px solid var(--border);
    background: #fafafa;
    flex-shrink: 0;
}

.sidebar-avatar {
    color: var(--text-muted);
    font-size: 1.7rem;
    line-height: 1;
    flex-shrink: 0;
}

.sidebar-username {
    color: var(--text);
    font-size: .82rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-logout-btn {
    background: #f1f5f9;
    border: 1px solid var(--border);
    color: var(--text-muted);
    border-radius: var(--radius-sm);
    padding: 7px 10px;
    cursor: pointer;
    transition: all .2s;
    flex-shrink: 0;
    font-size: .85rem;
}

.sidebar-logout-btn:hover {
    background: #fee2e2;
    color: var(--danger);
    border-color: #fca5a5;
}

/* ── Contenido principal ─────────────────────────── */
#content {
    margin-left: var(--sidebar-w);
    width: calc(100% - var(--sidebar-w));
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: margin-left .3s cubic-bezier(.4,0,.2,1), width .3s cubic-bezier(.4,0,.2,1);
}

/* ── Top Navbar ──────────────────────────────────── */
.top-navbar {
    height: 60px;
    background: #fff;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    padding: 0 24px;
    gap: 14px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.toggle-btn {
    background: none;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    width: 36px; height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-muted);
    transition: all .2s;
    flex-shrink: 0;
}

.toggle-btn:hover {
    background: var(--primary-light);
    color: var(--primary);
    border-color: var(--primary);
}

.top-logo {
    height: 30px;
    object-fit: contain;
}

.top-brand-name {
    font-weight: 800;
    font-size: .95rem;
    color: var(--primary-dark);
    letter-spacing: 1px;
}

.navbar-brand-center {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.turno-badge {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 8px;
    padding: 5px 12px;
    font-size: .78rem;
    font-weight: 600;
    color: #15803d;
    display: flex;
    align-items: center;
    gap: 6px;
}

.turno-badge.sin-turno {
    background: #fff3ed;
    border-color: #fed7aa;
    color: var(--primary-dark);
}

/* ── Page content ────────────────────────────────── */
.page-content {
    padding: 28px 28px 40px;
    flex: 1;
}

.page-title {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--dark);
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.page-title i {
    color: var(--primary);
}

/* ── Cards ───────────────────────────────────────── */
.card {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    background: var(--card);
}

.card-header {
    background: #fff;
    border-bottom: 1px solid var(--border);
    padding: 14px 20px;
    font-weight: 700;
    font-size: .9rem;
    border-radius: var(--radius) var(--radius) 0 0 !important;
}

.card-body { padding: 20px; }

/* ── Stat cards ──────────────────────────────────── */
.stat-card {
    background: var(--card);
    border-radius: var(--radius);
    padding: 22px 20px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    position: relative;
    overflow: hidden;
    transition: transform .2s, box-shadow .2s;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.stat-card .stat-icon {
    font-size: 1.6rem;
    margin-bottom: 10px;
    display: block;
    opacity: .85;
}

.stat-card .stat-value {
    font-size: 1.8rem;
    font-weight: 900;
    line-height: 1;
    margin-bottom: 4px;
    font-family: 'Inter', sans-serif;
}

.stat-card .stat-label {
    font-size: .78rem;
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: .4px;
}

.stat-card.orange .stat-icon,
.stat-card.orange .stat-value { color: var(--primary); }
.stat-card.orange { border-top: 3px solid var(--primary); }

.stat-card.green .stat-icon,
.stat-card.green .stat-value  { color: #16a34a; }
.stat-card.green  { border-top: 3px solid #16a34a; }

.stat-card.blue .stat-icon,
.stat-card.blue .stat-value   { color: var(--info); }
.stat-card.blue   { border-top: 3px solid var(--info); }

.stat-card.red .stat-icon,
.stat-card.red .stat-value    { color: var(--danger); }
.stat-card.red    { border-top: 3px solid var(--danger); }

.stat-card.yellow .stat-icon,
.stat-card.yellow .stat-value { color: var(--accent); }
.stat-card.yellow { border-top: 3px solid var(--accent); }

/* ── Buttons ─────────────────────────────────────── */
.btn-primary {
    background: var(--primary) !important;
    border-color: var(--primary) !important;
    color: #fff !important;
    font-weight: 600;
}
.btn-primary:hover {
    background: var(--primary-dark) !important;
    border-color: var(--primary-dark) !important;
}

.btn-outline-primary {
    color: var(--primary) !important;
    border-color: var(--primary) !important;
}
.btn-outline-primary:hover {
    background: var(--primary) !important;
    color: #fff !important;
}

/* ── Tables ──────────────────────────────────────── */
.table th {
    font-size: .78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .4px;
    color: var(--text-muted);
    border-bottom: 2px solid var(--border);
    background: #f8fafc;
}

.table td { vertical-align: middle; font-size: .875rem; }
.table-hover tbody tr:hover { background: #fef9f5; }

/* ── Badges ──────────────────────────────────────── */
.badge { font-family: 'Inter', sans-serif; font-weight: 600; letter-spacing: .2px; }

/* ── Forms ───────────────────────────────────────── */
.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(232,93,4,.12);
}

.form-label { font-weight: 600; font-size: .85rem; color: var(--text); }

/* ── Alerts ──────────────────────────────────────── */
.alert { border-radius: var(--radius-sm); font-size: .875rem; }

/* ── Modales ─────────────────────────────────────── */
.modal-content {
    border: none;
    overflow: hidden;
    box-shadow: 0 25px 60px rgba(0,0,0,.15);
    border-radius: var(--radius);
}

.modal-header {
    background: linear-gradient(135deg, var(--dark) 0%, #1e293b 100%);
    color: #fff;
    border-bottom: none;
    padding: 18px 24px;
}

.modal-header .modal-title { font-size: .95rem; font-weight: 700; }
.modal-header .btn-close { filter: invert(1) brightness(2); opacity: .7; }
.modal-header .btn-close:hover { opacity: 1; }
.modal-body { padding: 24px; }
.modal-footer { padding: 16px 24px; border-top: 1px solid var(--border); }

/* ── Mesas ───────────────────────────────────────── */
.mesa-card {
    background: var(--card);
    border-radius: var(--radius);
    padding: 18px 14px;
    text-align: center;
    cursor: pointer;
    border: 2px solid var(--border);
    transition: all .2s;
    text-decoration: none;
    display: block;
    color: var(--text);
    box-shadow: var(--shadow-sm);
}

.mesa-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
    color: var(--text);
}

.mesa-card.libre   { border-color: #bbf7d0; }
.mesa-card.libre:hover { border-color: #16a34a; }
.mesa-card.ocupada { border-color: #fca5a5; background: #fff5f5; }
.mesa-card.reservada { border-color: #fed7aa; background: #fffbf5; }
.mesa-card.inactiva { opacity: .4; cursor: not-allowed; pointer-events: none; }

.mesa-num { font-size: 1.8rem; font-weight: 800; margin-bottom: 4px; color: var(--dark); }
.mesa-cap { font-size: .75rem; color: var(--text-muted); margin-bottom: 10px; }

.mesa-estado {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
}

.estado-libre     { background: #dcfce7; color: #15803d; }
.estado-ocupada   { background: #fee2e2; color: #dc2626; }
.estado-reservada { background: #ffedd5; color: #c2410c; }

.mesa-total { color: var(--primary); font-weight: 700; font-size: .95rem; }
.mesa-info  { margin-top: 10px; font-size: .78rem; color: var(--text-muted); line-height: 1.4; }

.zona-title {
    font-size: .8rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 24px 0 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.zona-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

.mesas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
    gap: 14px;
    margin-bottom: 8px;
}

/* ── Pedido / POS ────────────────────────────────── */
.pedido-layout {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 20px;
}

.cat-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 16px;
    position: sticky;
    top: 60px;
    background: var(--bg);
    padding: 8px 0;
    z-index: 10;
}

.cat-tab {
    padding: 6px 14px;
    border-radius: 20px;
    border: 1px solid var(--border);
    background: #fff;
    color: var(--text-muted);
    cursor: pointer;
    font-size: .82rem;
    font-weight: 500;
    transition: all .2s;
}

.cat-tab.active, .cat-tab:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.cat-nombre {
    font-size: .78rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
}

.productos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 10px;
    margin-bottom: 24px;
}

.prod-btn {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 14px 10px;
    text-align: center;
    cursor: pointer;
    transition: all .2s;
    color: var(--text);
    box-shadow: var(--shadow-sm);
}

.prod-btn:hover {
    border-color: var(--primary);
    background: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.prod-nombre { font-size: .85rem; font-weight: 600; margin-bottom: 4px; color: var(--dark); }
.prod-precio { font-size: .9rem; color: var(--primary); font-weight: 700; }

/* Panel orden derecho */
.orden-panel {
    background: var(--card);
    border-radius: var(--radius);
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 70px;
    max-height: calc(100vh - 90px);
}

.orden-header {
    padding: 16px 18px;
    border-bottom: 1px solid var(--border);
    background: var(--primary-light);
    border-radius: var(--radius) var(--radius) 0 0;
}

.orden-header h3 { font-size: 1rem; font-weight: 700; color: var(--primary-dark); margin: 0; }
.orden-header p  { font-size: .8rem; color: var(--text-muted); margin: 2px 0 0; }

.orden-items { flex: 1; overflow-y: auto; padding: 12px; }

.orden-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
}

.orden-item-nombre { flex: 1; font-size: .85rem; font-weight: 500; color: var(--text); }

.orden-item-cant { display: flex; align-items: center; gap: 4px; }

.cant-btn {
    width: 26px; height: 26px;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: #f8fafc;
    color: var(--text);
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
    transition: all .2s;
}

.cant-btn:hover { background: var(--primary); border-color: var(--primary); color: #fff; }
.cant-num { min-width: 22px; text-align: center; font-weight: 700; font-size: .9rem; }
.item-subtotal { font-size: .85rem; color: var(--primary); font-weight: 600; min-width: 70px; text-align: right; }

.btn-eliminar {
    background: transparent;
    border: none;
    color: #fca5a5;
    cursor: pointer;
    font-size: 1rem;
    padding: 2px 4px;
    transition: color .2s;
}
.btn-eliminar:hover { color: var(--danger); }

.orden-empty {
    text-align: center;
    color: var(--text-muted);
    padding: 40px 20px;
    font-size: .9rem;
}

.orden-footer {
    padding: 16px 18px;
    border-top: 1px solid var(--border);
    background: #fafafa;
    border-radius: 0 0 var(--radius) var(--radius);
}

.total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

.total-label { font-size: .9rem; color: var(--text-muted); font-weight: 500; }
.total-value { font-size: 1.5rem; font-weight: 900; color: var(--primary); font-family: 'Inter', sans-serif; }

.notas-input {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 8px 10px;
    font-size: .82rem;
    resize: none;
    color: var(--text);
    background: #fff;
    margin-bottom: 12px;
    font-family: 'Inter', sans-serif;
}
.notas-input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(232,93,4,.1); }

/* ── Login ───────────────────────────────────────── */
.login-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #fff3ed 0%, #f1f5f9 60%, #fff 100%);
}

.login-box {
    width: 400px;
    background: var(--card);
    border-radius: var(--radius);
    padding: 40px 36px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
}

.login-logo { text-align: center; margin-bottom: 28px; }
.login-logo img { width: 64px; border-radius: 16px; box-shadow: 0 4px 16px rgba(232,93,4,.3); margin-bottom: 12px; }
.login-logo h1 { font-size: 1.4rem; font-weight: 800; color: var(--primary-dark); margin: 0; }
.login-logo p  { color: var(--text-muted); font-size: .85rem; margin-top: 4px; }

/* ── Spinner overlay ─────────────────────────────── */
#loadingOverlay {
    position: fixed;
    inset: 0;
    background: rgba(255,255,255,.8);
    backdrop-filter: blur(3px);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 12px;
}

/* ── Tiqueteras ──────────────────────────────────── */
.ticket-visual {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 60%, #fb923c 100%);
    color: #fff;
    border-radius: var(--radius);
    padding: 22px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.ticket-visual::after {
    content: '';
    position: absolute;
    width: 160px; height: 160px;
    border-radius: 50%;
    background: rgba(255,255,255,.07);
    right: -40px; top: -40px;
    pointer-events: none;
}

.ticket-count { font-size: 3.8rem; font-weight: 900; line-height: 1; }
.ticket-label { font-size: .78rem; opacity: .85; margin-top: 4px; font-weight: 500; text-transform: uppercase; letter-spacing: .5px; }

.ticket-bar { height: 8px; border-radius: 99px; background: #e2e8f0; }
.ticket-bar .progress-bar { border-radius: 99px; background: var(--primary); }

.tiq-card { transition: transform .2s ease, box-shadow .2s ease; }
.tiq-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg) !important; }

/* ── Quick action button ─────────────────────────── */
.quick-action-btn {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary)) !important;
    border: none !important;
    color: #fff !important;
    font-size: .875rem;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    box-shadow: 0 4px 14px rgba(232,93,4,.3);
    transition: all .25s ease;
    font-weight: 600 !important;
}

.quick-action-btn:hover {
    background: linear-gradient(135deg, #9a3a00, var(--primary-dark)) !important;
    box-shadow: 0 6px 20px rgba(232,93,4,.45);
    transform: translateY(-2px);
    color: #fff !important;
}

/* ══ MINI SIDEBAR ════════════════════════════════════ */
body.sidebar-collapsed #sidebar { width: var(--sidebar-mini); }

body.sidebar-collapsed #content {
    margin-left: var(--sidebar-mini);
    width: calc(100% - var(--sidebar-mini));
}

body.sidebar-collapsed .sidebar-header { padding: 16px 0; justify-content: center; }
body.sidebar-collapsed .sidebar-header .d-flex { justify-content: center; }
body.sidebar-collapsed .sidebar-brand,
body.sidebar-collapsed .sidebar-subtitle { display: none; }
body.sidebar-collapsed .sidebar-logo { width: 36px; height: 36px; }

body.sidebar-collapsed .sidebar-nav { padding: 8px 6px; overflow: hidden; }
body.sidebar-collapsed .sidebar-nav::-webkit-scrollbar { display: none; }
body.sidebar-collapsed .sidebar-nav ul { padding: 0; }

body.sidebar-collapsed .sidebar-nav li a {
    justify-content: center;
    padding: 12px 0;
    border-radius: 10px;
}

body.sidebar-collapsed .sidebar-nav li a.active::before { display: none; }
body.sidebar-collapsed .sidebar-nav li a span { display: none; }
body.sidebar-collapsed .sidebar-nav li a i { font-size: 1.1rem; width: auto; }

body.sidebar-collapsed .sidebar-nav li a::after {
    content: attr(data-label);
    position: absolute;
    left: calc(100% + 10px);
    top: 50%;
    transform: translateY(-50%);
    background: var(--dark);
    color: #fff;
    font-size: .78rem;
    font-weight: 600;
    padding: 5px 12px;
    border-radius: var(--radius-sm);
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity .15s ease;
    z-index: 2000;
    box-shadow: var(--shadow);
}

body.sidebar-collapsed .sidebar-nav li a:hover::after { opacity: 1; }

body.sidebar-collapsed .sidebar-footer { padding: 12px 6px; justify-content: center; }
body.sidebar-collapsed #sidebarFooter > .d-flex { flex-direction: column; gap: 6px; align-items: center; }

body.sidebar-collapsed .sidebar-user-btn {
    justify-content: center;
    padding: 6px !important;
    flex: 0 0 auto !important;
    width: 38px;
}

body.sidebar-collapsed .sidebar-username,
body.sidebar-collapsed #sidebarRol { display: none; }
body.sidebar-collapsed .sidebar-logout-btn { margin-left: 0 !important; }

/* ── Responsive tablet ───────────────────────────── */
@media (min-width: 769px) and (max-width: 1024px) {
    #sidebar { width: var(--sidebar-mini); }
    #content { margin-left: var(--sidebar-mini); width: calc(100% - var(--sidebar-mini)); }
    .sidebar-header { padding: 16px 0; justify-content: center; }
    .sidebar-header .d-flex { justify-content: center; }
    .sidebar-brand, .sidebar-subtitle { display: none; }
    .sidebar-logo { width: 36px; height: 36px; }
    .sidebar-nav { padding: 8px 6px; overflow: hidden; }
    .sidebar-nav::-webkit-scrollbar { display: none; }
    .sidebar-nav ul { padding: 0; }
    .sidebar-nav li a { justify-content: center; padding: 12px 0; border-radius: 10px; }
    .sidebar-nav li a.active::before { display: none; }
    .sidebar-nav li a span { display: none; }
    .sidebar-nav li a i { font-size: 1.1rem; width: auto; }
    .sidebar-nav li a::after {
        content: attr(data-label);
        position: absolute;
        left: calc(100% + 10px); top: 50%;
        transform: translateY(-50%);
        background: var(--dark); color: #fff;
        font-size: .78rem; font-weight: 600;
        padding: 5px 12px; border-radius: var(--radius-sm);
        white-space: nowrap; opacity: 0; pointer-events: none;
        transition: opacity .15s ease; z-index: 2000; box-shadow: var(--shadow);
    }
    .sidebar-nav li a:hover::after { opacity: 1; }
    .sidebar-footer { padding: 12px 6px; }
    .page-content { padding: 20px; }
}

/* ── Responsive móvil ────────────────────────────── */
@media (max-width: 768px) {
    #sidebar { left: calc(-1 * var(--sidebar-w)); }
    #sidebar.open { left: 0; }
    #content { margin-left: 0; width: 100%; }
    .page-content { padding: 16px; }
    .pedido-layout { grid-template-columns: 1fr; }
    .orden-panel { position: fixed; bottom: 0; left: 0; right: 0; border-radius: 16px 16px 0 0; max-height: 50vh; z-index: 50; }
}
