/* =========================================================
   RestBAR - tema moderno sobre AdminLTE 3 / Bootstrap 4
   Paleta: verde profesional (cambia las variables :root). Se carga DESPUÉS de adminlte.min.css (ver includes/header.php)
   ========================================================= */
:root {
    --c-bg: #f3f5f9;
    --c-surface: #ffffff;
    --c-text: #1e293b;
    --c-muted: #64748b;
    --c-line: #e8ecf3;
    --c-side: #0b2a20;
    --c-side-2: #153a2d;
    --c-accent: #15803d;
    --c-accent-d: #166534;
    --c-accent-soft: #e7f5ec;
    --c-ok: #16a34a;
    --c-ok-soft: #e7f7ee;
    --c-bad: #e11d48;
    --c-bad-soft: #fde8ed;
    --c-info: #0ea5e9;
    --c-info-soft: #e5f5fd;
    --c-warn: #f59e0b;
    --c-warn-soft: #fef4dc;
    --radius: 14px;
    --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 6px 18px rgba(15, 23, 42, .06);
    --shadow-hover: 0 2px 4px rgba(15, 23, 42, .06), 0 14px 30px rgba(15, 23, 42, .12);
}

html, body, h1, h2, h3, h4, h5, h6, .btn, .form-control, .nav-link, .table {
    font-family: 'Inter', 'Source Sans Pro', system-ui, -apple-system, 'Segoe UI', sans-serif;
}
body { color: var(--c-text); letter-spacing: -.005em; }
.content-wrapper, .content-wrapper > .content { background: var(--c-bg); }
.content-wrapper { min-height: calc(100vh - 57px); }
.content > .container-fluid { padding: 1.25rem 1.25rem 0; }
a { color: var(--c-accent-d); }
a:hover { color: var(--c-accent); }

/* ---------- Barra superior ---------- */
.main-header.navbar {
    background: rgba(255, 255, 255, .85) !important;
    backdrop-filter: saturate(180%) blur(10px);
    border-bottom: 1px solid var(--c-line);
    box-shadow: none;
}
.main-header .nav-link { color: var(--c-muted); border-radius: 10px; }
.main-header .nav-link:hover { background: var(--c-bg); color: var(--c-text); }
.user-chip {
    display: inline-flex; align-items: center; gap: .6rem;
    padding: .25rem .75rem .25rem .3rem; border-radius: 999px;
    background: var(--c-bg); font-weight: 600; font-size: .875rem;
}
.user-chip .avatar {
    width: 30px; height: 30px; border-radius: 50%;
    background: linear-gradient(135deg, var(--c-accent), #22a05a);
    color: #fff; display: grid; place-items: center; font-size: .8rem; font-weight: 700;
}
.user-chip small { display: block; color: var(--c-muted); font-weight: 500; font-size: .7rem; line-height: 1; }

/* ---------- Barra lateral ---------- */
.main-sidebar, .main-sidebar.sidebar-dark-primary { background: var(--c-side); }
.main-sidebar .brand-link {
    border-bottom: 1px solid rgba(255, 255, 255, .07);
    padding: 1rem 1.1rem; display: flex; align-items: center;
}
.main-sidebar .brand-link .brand-image {
    box-shadow: none !important; background: var(--c-accent-soft); padding: 3px;
    max-height: 34px; width: 34px; margin-right: .65rem; opacity: 1 !important;
}
.main-sidebar .brand-text { color: #fff; font-weight: 800 !important; letter-spacing: .02em; font-size: 1.15rem; }
.main-sidebar .user-panel { border-bottom: 1px solid rgba(255, 255, 255, .07) !important; align-items: center; }
.main-sidebar .user-panel .info a { color: #e2e8f0; font-weight: 600; }
.nav-sidebar { padding: .25rem .5rem; }
.nav-sidebar .nav-item { margin-bottom: 2px; }
.nav-sidebar > .nav-item > .nav-link,
.nav-sidebar .nav-treeview > .nav-item > .nav-link {
    color: #a7c4b5; border-radius: 10px; padding: .6rem .8rem; transition: background .15s, color .15s;
}
.nav-sidebar .nav-link .nav-icon { margin-right: .55rem; width: 1.4rem; text-align: center; }
.nav-sidebar .nav-link:hover { background: var(--c-side-2); color: #fff; }
.nav-sidebar .nav-link.active,
.nav-sidebar > .nav-item.menu-open > .nav-link.active {
    background: var(--c-accent) !important; color: #fff !important;
    box-shadow: 0 6px 16px rgba(21, 128, 61, .35);
}
.nav-sidebar .menu-open > .nav-link:not(.active) { background: var(--c-side-2); color: #fff; }
.nav-treeview { padding-left: .5rem; }
.nav-sidebar .nav-treeview .nav-link .far.fa-circle { font-size: .5rem; }

/* ---------- Tarjetas ---------- */
.card {
    border: 0; border-radius: var(--radius); background: var(--c-surface);
    box-shadow: var(--shadow); margin-bottom: 1.25rem;
}
.card.shadow-lg { box-shadow: var(--shadow) !important; }
.card-header {
    background: transparent; border-bottom: 1px solid var(--c-line);
    padding: 1rem 1.25rem; font-weight: 700; font-size: 1.05rem;
}
.card-header.text-center { text-align: left !important; }
.card-title { font-weight: 700; font-size: 1.05rem; margin: 0; }
.card-outline.card-primary { border-top: 0; }
.card-primary.card-outline > .card-header { border-top: 3px solid var(--c-accent); border-radius: var(--radius) var(--radius) 0 0; }
.card-body { padding: 1.25rem; }

/* ---------- Botones ---------- */
.btn { border-radius: 10px; font-weight: 600; padding: .5rem 1rem; border-width: 1px; transition: transform .12s, box-shadow .12s, background .12s; }
.btn:active { transform: translateY(1px); }
.btn-flat { border-radius: 10px; }
.btn-primary { background: var(--c-accent); border-color: var(--c-accent); }
.btn-primary:hover, .btn-primary:focus, .btn-primary:not(:disabled):not(.disabled):active {
    background: var(--c-accent-d); border-color: var(--c-accent-d);
}
.btn-primary:focus, .btn-success:focus, .btn-danger:focus { box-shadow: 0 0 0 .2rem rgba(21, 128, 61, .25); }
.btn-success { background: var(--c-ok); border-color: var(--c-ok); }
.btn-danger { background: var(--c-bad); border-color: var(--c-bad); }
.btn-info { background: var(--c-info); border-color: var(--c-info); color: #fff; }
.btn-outline-info { color: var(--c-info); border-color: var(--c-info); }
.btn-outline-info:hover { background: var(--c-info); border-color: var(--c-info); }
.btn-outline-success { color: var(--c-ok); border-color: var(--c-ok); }
.btn-outline-success:hover { background: var(--c-ok); border-color: var(--c-ok); }
.btn-outline-secondary { color: var(--c-muted); border-color: #cbd5e1; }
.btn-outline-secondary:hover { background: var(--c-bg); color: var(--c-text); border-color: #cbd5e1; }
.btn-sm { padding: .3rem .6rem; border-radius: 8px; }
td .btn { padding: .35rem .6rem; border-radius: 8px; }

/* ---------- Formularios ---------- */
.form-control, .custom-select {
    border: 1px solid #d8dfeb; border-radius: 10px; height: calc(2.5rem + 2px);
    padding: .5rem .85rem; color: var(--c-text); background: #fbfcfe;
}
textarea.form-control { height: auto; }
.form-control:focus { border-color: var(--c-accent); box-shadow: 0 0 0 .2rem rgba(21, 128, 61, .15); background: #fff; }
label { font-weight: 600; font-size: .85rem; color: #334155; margin-bottom: .35rem; }
.text-dark.font-weight-bold { color: #334155 !important; }
input[type=file].form-control { padding: .4rem .6rem; height: auto; }

/* ---------- Tablas ---------- */
.table { color: var(--c-text); }
.table thead th, .thead-dark th {
    background: #f8fafc !important; color: var(--c-muted) !important;
    border: 0 !important; border-bottom: 1px solid var(--c-line) !important;
    font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; padding: .85rem .9rem;
}
.table td { border-top: 1px solid var(--c-line); vertical-align: middle; padding: .8rem .9rem; }
.table-bordered, .table-bordered td, .table-bordered th { border: 0; }
.table-bordered td { border-top: 1px solid var(--c-line); }
.table-striped tbody tr:nth-of-type(odd) { background: transparent; }
.table-hover tbody tr:hover, .table tbody tr:hover { background: #fafbfe; }
.table-responsive { border-radius: var(--radius); background: var(--c-surface); box-shadow: var(--shadow); }
.card .table-responsive { box-shadow: none; }
.img-thumbnail { border: 0; border-radius: 10px; padding: 0; object-fit: cover; height: 56px; width: 56px !important; }
.dataTables_wrapper .form-control, .dataTables_wrapper .custom-select { height: calc(2rem + 2px); padding: .2rem .6rem; }
.dataTables_wrapper .dataTables_filter input { margin-left: .5rem; }
.page-item.active .page-link { background: var(--c-accent); border-color: var(--c-accent); }
.page-link { color: var(--c-text); border-radius: 8px; margin: 0 2px; border: 0; }
.page-link:hover { background: var(--c-accent-soft); color: var(--c-accent-d); }

/* ---------- Insignias ---------- */
.badge { border-radius: 999px; padding: .38em .8em; font-weight: 700; font-size: .72rem; letter-spacing: .02em; }
.badge-success { background: var(--c-ok-soft); color: var(--c-ok); }
.badge-danger { background: var(--c-bad-soft); color: var(--c-bad); }
.badge-warning { background: var(--c-warn-soft); color: #b45309; }
.badge-info { background: var(--c-info-soft); color: #0369a1; }

/* ---------- Alertas ---------- */
.alert { border: 0; border-radius: 12px; font-weight: 500; border-left: 4px solid transparent; }
.alert-success { background: var(--c-ok-soft); color: #166534; border-left-color: var(--c-ok); }
.alert-warning { background: var(--c-warn-soft); color: #92400e; border-left-color: var(--c-warn); }
.alert-danger { background: var(--c-bad-soft); color: #9f1239; border-left-color: var(--c-bad); }

/* ---------- Dashboard: tarjetas de resumen ---------- */
.small-box {
    background: var(--c-surface) !important; color: var(--c-text) !important;
    border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden;
    transition: transform .15s, box-shadow .15s; position: relative; --tono: var(--c-info); --tono-soft: var(--c-info-soft);
}
.small-box:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.small-box.bg-info { --tono: var(--c-info); --tono-soft: var(--c-info-soft); }
.small-box.bg-success { --tono: var(--c-ok); --tono-soft: var(--c-ok-soft); }
.small-box.bg-warning { --tono: var(--c-warn); --tono-soft: var(--c-warn-soft); }
.small-box.bg-danger { --tono: var(--c-bad); --tono-soft: var(--c-bad-soft); }
.small-box .inner { padding: 1.25rem 1.25rem .75rem; }
.small-box .inner h3 { font-size: 2.1rem; font-weight: 800; color: var(--c-text); margin-bottom: .1rem; }
.small-box .inner p { color: var(--c-muted); font-weight: 600; margin: 0; }
.small-box .icon {
    top: 1.1rem; right: 1.1rem; width: 52px; height: 52px; border-radius: 14px;
    background: var(--tono-soft); display: grid; place-items: center; position: absolute;
}
.small-box .icon > i, .small-box .icon > i.fas, .small-box:hover .icon > i, .small-box:hover .icon > i.fas {
    position: static !important; font-size: 1.4rem !important; color: var(--tono) !important; transition: none; margin: 0;
}
.small-box > .small-box-footer {
    background: transparent !important; color: var(--tono) !important; font-weight: 700; font-size: .82rem;
    text-align: left; padding: .7rem 1.25rem; border-top: 1px solid var(--c-line);
}
.small-box > .small-box-footer:hover { background: var(--tono-soft) !important; }

/* ---------- Mesas y salas ---------- */
.widget-user { border-radius: var(--radius); overflow: hidden; transition: transform .15s, box-shadow .15s; }
.widget-user:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.widget-user .widget-user-header { height: auto; padding: 1.1rem 1.25rem 2.6rem; border-radius: 0; text-align: left; }
.widget-user .widget-user-header.bg-success { background: linear-gradient(135deg, #16a34a, #22c55e) !important; }
.widget-user .widget-user-header.bg-danger { background: linear-gradient(135deg, #e11d48, #fb7185) !important; }
.widget-user .widget-user-header.bg-warning { background: linear-gradient(135deg, #f59e0b, #fbbf24) !important; color: #fff !important; }
.widget-user .widget-user-username { font-size: .78rem; font-weight: 700; letter-spacing: .15em; opacity: .9; margin: 0; }
.widget-user .widget-user-desc { font-size: 2rem; font-weight: 800; margin: 0; }
.widget-user .widget-user-image { top: 1rem; left: auto; right: 1.1rem; margin-left: 0; }
.widget-user .widget-user-image > img { width: 54px; height: 54px; border: 3px solid rgba(255, 255, 255, .85); object-fit: cover; }
.widget-user .card-footer { background: var(--c-surface); border-top: 0; padding: 1rem 1.25rem; }
.widget-user .description-block { text-align: center; }
.widget-user .btn { width: 100%; }
.col-md-3.shadow-lg, .col-6.shadow-lg { box-shadow: none !important; }

/* Tarjeta de sala (index.php) */
.sala-card { border-radius: var(--radius); overflow: hidden; background: var(--c-surface); box-shadow: var(--shadow); transition: transform .15s, box-shadow .15s; height: 100%; }
.sala-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.sala-card img { width: 100%; height: 150px; object-fit: cover; display: block; }
.sala-card .cuerpo { padding: 1rem 1.1rem 1.1rem; }
.sala-card h6 { font-size: 1.05rem; font-weight: 700; margin: 0 0 .75rem; }

/* ---------- Catálogo de platos (pedido.php) ---------- */
.plato-card {
    background: var(--c-surface); border-radius: var(--radius); overflow: hidden; height: 100%;
    box-shadow: var(--shadow); display: flex; flex-direction: column; transition: transform .15s, box-shadow .15s;
}
.plato-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.plato-card .foto { aspect-ratio: 4 / 3; background: var(--c-bg); overflow: hidden; }
.plato-card .foto img { width: 100%; height: 100%; object-fit: cover; display: block; }
.plato-card .info { padding: .9rem 1rem 1rem; display: flex; flex-direction: column; flex: 1; }
.plato-card .nombre { font-weight: 700; font-size: .98rem; line-height: 1.25; margin: 0 0 .5rem; }
.plato-card .precio {
    display: inline-block; align-self: flex-start; background: var(--c-accent-soft); color: var(--c-accent-d);
    font-weight: 800; font-size: 1.05rem; padding: .2rem .7rem; border-radius: 999px; margin-bottom: .8rem;
}
.plato-card .btn { margin-top: auto; }
.product-image { width: 100%; border-radius: 10px; }
#detalle_pedido .card { box-shadow: none; border: 1px solid var(--c-line); }
#detalle_pedido .card h2 { font-size: 1.1rem; color: var(--c-accent-d); font-weight: 800; }

/* Pestañas Platos / Pedido */
.nav-pills.tabs-pedido { background: var(--c-surface); padding: .4rem; border-radius: 12px; box-shadow: var(--shadow); display: inline-flex; }
.nav-pills.tabs-pedido .nav-link { border-radius: 9px; color: var(--c-muted); font-weight: 700; padding: .5rem 1.4rem; }
.nav-pills.tabs-pedido .nav-link.active { background: var(--c-accent); color: #fff; box-shadow: 0 4px 12px rgba(21, 128, 61, .35); }

/* Resumen de total */
.bg-gray { background: var(--c-accent-soft) !important; color: var(--c-accent-d) !important; border-radius: 12px; }
.bg-gray h2 { font-weight: 800; }

/* ---------- Modal ---------- */
.modal-content { border: 0; border-radius: 16px; box-shadow: 0 20px 50px rgba(15, 23, 42, .25); }
.modal-header, .modal-footer { border-color: var(--c-line); }
.modal-title { font-weight: 700; }

/* ---------- Pie de página ---------- */
.main-footer { background: transparent; border-top: 1px solid var(--c-line); color: var(--c-muted); font-size: .8rem; }

/* ---------- Página 403 ---------- */
.error-page { margin-top: 12vh; }

/* ---------- Móvil ---------- */
@media (max-width: 767.98px) {
    .content > .container-fluid { padding: .9rem .75rem 0; }
    .card-body { padding: 1rem; }
    .small-box .inner h3 { font-size: 1.7rem; }
    .widget-user .widget-user-desc { font-size: 1.6rem; }
    .btn { padding: .6rem 1rem; }
}

/* Foco visible para teclado */
a:focus-visible, button:focus-visible { outline: 2px solid var(--c-accent); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* ---------- Ajustes finos ---------- */
.card-header::before, .card-header::after { display: none !important; } /* el clearfix de AdminLTE rompe los flex */
.card .table-responsive { border-radius: 0 0 var(--radius) var(--radius); }
.table.table-striped > tbody > tr:nth-of-type(odd),
table.dataTable.table-striped > tbody > tr.odd { background-color: #fafbfd; }
.table.table-striped > tbody > tr:nth-of-type(even) { background-color: transparent; }
input[type=file]::file-selector-button {
    border: 0; background: var(--c-accent-soft); color: var(--c-accent-d); font-weight: 600;
    padding: .35rem .8rem; margin-right: .75rem; border-radius: 8px; cursor: pointer;
}
input[type=file]::file-selector-button:hover { background: #d3ecdc; }
.dataTables_wrapper .dataTables_length, .dataTables_wrapper .dataTables_filter, .dataTables_wrapper .dataTables_info { color: var(--c-muted); font-size: .85rem; }
table.dataTable.table-striped > tbody > tr.odd > *,
table.dataTable.table-striped > tbody > tr.even > * { box-shadow: none !important; }

/* ---------- WhatsApp ---------- */
.btn-wa { background: #25d366; border-color: #25d366; color: #fff; }
.btn-wa:hover, .btn-wa:focus { background: #1ebe5a; border-color: #1ebe5a; color: #fff; }
.btn-wa:focus { box-shadow: 0 0 0 .2rem rgba(37, 211, 102, .3); }
.swal2-styled.swal2-confirm { background-color: var(--c-accent) !important; border-radius: 10px !important; font-weight: 600; }
.swal2-styled.swal2-confirm:focus { box-shadow: 0 0 0 3px rgba(21, 128, 61, .3) !important; }
.swal2-popup { border-radius: 16px !important; font-family: 'Inter', system-ui, sans-serif; }

/* ---------- Botón Vender (barra superior) ---------- */
.btn-vender { border-radius: 999px; padding: .4rem 1rem; box-shadow: 0 4px 12px rgba(21, 128, 61, .3); white-space: nowrap; }
.btn-vender:hover { color: #fff; }

/* ---------- Login ---------- */
body.login-page { display: block; height: auto; min-height: 100vh; background: var(--c-bg); }
.login-shell { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.login-hero {
    position: relative; overflow: hidden; color: #fff; padding: 3rem 3.5rem;
    display: flex; flex-direction: column; justify-content: space-between;
    background: linear-gradient(155deg, #0b2a20 0%, #14532d 55%, #15803d 100%);
}
.login-hero::before, .login-hero::after { content: ""; position: absolute; border-radius: 50%; background: rgba(255, 255, 255, .06); }
.login-hero::before { width: 420px; height: 420px; right: -140px; top: -120px; }
.login-hero::after { width: 300px; height: 300px; left: -100px; bottom: -110px; }
.login-hero > * { position: relative; z-index: 1; }
.login-brand { display: flex; align-items: center; gap: .7rem; font-size: 1.4rem; font-weight: 800; letter-spacing: .02em; }
.login-brand .logo { width: 42px; height: 42px; border-radius: 12px; background: rgba(255, 255, 255, .15); display: grid; place-items: center; }
.login-hero h1 { font-size: 2.3rem; font-weight: 800; line-height: 1.15; margin-bottom: 1rem; max-width: 460px; }
.login-hero p.lead-text { color: rgba(255, 255, 255, .78); max-width: 440px; }
.login-points { list-style: none; padding: 0; margin: 1.75rem 0 0; display: grid; gap: .9rem; }
.login-points li { display: flex; align-items: center; gap: .8rem; font-weight: 600; }
.login-points i { width: 36px; height: 36px; border-radius: 10px; background: rgba(255, 255, 255, .14); display: grid; place-items: center; }
.login-foot { color: rgba(255, 255, 255, .55); font-size: .8rem; }
.login-panel { display: grid; place-items: center; padding: 2rem 1.25rem; }
.login-card-new { width: 100%; max-width: 400px; }
.login-card-new h2 { font-weight: 800; font-size: 1.7rem; margin-bottom: .35rem; }
.login-card-new .sub { color: var(--c-muted); margin-bottom: 1.75rem; }
.login-card-new .form-control { height: 3rem; }
.login-card-new .input-group-text { background: #fbfcfe; border: 1px solid #d8dfeb; border-radius: 10px 0 0 10px; color: var(--c-muted); width: 2.9rem; justify-content: center; }
.login-card-new .input-group .form-control { border-radius: 0 10px 10px 0; border-left: 0; }
.login-card-new .input-group .form-control:focus { border-left: 0; }
.login-card-new .input-group:focus-within .input-group-text { border-color: var(--c-accent); color: var(--c-accent); }
.login-card-new .toggle-pass { position: absolute; right: .5rem; top: 50%; transform: translateY(-50%); background: none; border: 0; color: var(--c-muted); z-index: 5; padding: .4rem .6rem; }
.login-card-new .btn-login { height: 3rem; font-size: 1rem; box-shadow: 0 8px 20px rgba(21, 128, 61, .28); }
@media (max-width: 991.98px) {
    .login-shell { grid-template-columns: 1fr; }
    .login-hero { display: none; }
    .login-panel { background: linear-gradient(180deg, #e7f5ec 0, var(--c-bg) 260px); align-items: start; padding-top: 12vh; }
    .login-mobile-brand { display: flex !important; }
}
.login-mobile-brand { display: none; align-items: center; gap: .6rem; font-weight: 800; font-size: 1.3rem; color: var(--c-accent-d); margin-bottom: 2rem; }
.login-mobile-brand .logo { width: 40px; height: 40px; border-radius: 12px; background: var(--c-accent); color: #fff; display: grid; place-items: center; }

/* ---------- Buscador de platos ---------- */
.buscador { position: relative; display: flex; align-items: center; gap: .75rem; }
.buscador > .fa-search { position: absolute; left: 1rem; color: var(--c-muted); pointer-events: none; }
.buscador .form-control { padding-left: 2.7rem; padding-right: 2.6rem; height: 3rem; border-radius: 12px; background: var(--c-surface); box-shadow: var(--shadow); border-color: transparent; font-size: 1rem; }
.buscador .limpiar { position: absolute; right: 1rem; background: var(--c-bg); border: 0; color: var(--c-muted); width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: .75rem; padding: 0; }
.buscador .limpiar:hover { background: var(--c-accent-soft); color: var(--c-accent-d); }
.buscador .contador { white-space: nowrap; position: absolute; right: 3.4rem; }
@media (max-width: 575.98px) { .buscador .contador { display: none; } }
[hidden] { display: none !important; }
.buscador input[type=search]::-webkit-search-cancel-button, .buscador input[type=search]::-webkit-search-decoration { -webkit-appearance: none; display: none; }
.buscador .contador { right: 3.6rem; }

/* ---------- Correcciones móvil (v7) ---------- */
.user-chip { max-width: 240px; min-width: 0; }
.user-chip .user-text { min-width: 0; line-height: 1.15; }
.user-chip .user-name { display: block; max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-chip small { white-space: nowrap; }
.small-box { text-align: left; }
.small-box .inner h3 { padding-right: 4rem; white-space: nowrap; }
.small-box .inner p { padding-right: .25rem; }
@media (max-width: 575.98px) {
    .user-chip { padding: .2rem; gap: 0; }
    .user-chip .user-text { display: none; }          /* en celular solo el avatar */
    .main-header .navbar-nav { flex-wrap: nowrap; }
    .small-box .icon { width: 40px; height: 40px; top: .9rem; right: .8rem; border-radius: 12px; }
    .small-box .icon > i, .small-box .icon > i.fas, .small-box:hover .icon > i, .small-box:hover .icon > i.fas { font-size: 1.1rem !important; }
    .small-box .inner { padding: 1rem 1rem .6rem; }
    .small-box .inner h3 { font-size: 1.7rem; padding-right: 3rem; }
    .small-box .inner p { font-size: .85rem; }
    .small-box > .small-box-footer { padding: .6rem 1rem; font-size: .78rem; }
}
.main-sidebar .user-panel { overflow: hidden; }
.main-sidebar .user-panel .info { min-width: 0; flex: 1; padding-left: .6rem; }
.main-sidebar .user-panel .info a { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

@media (max-width: 575.98px) {
    .nav-pills.tabs-pedido .nav-link { padding: .5rem .8rem; font-size: .9rem; }
    .small-box .inner p { line-height: 1.2; }
}
/* Tarjetas del dashboard con la misma altura aunque el título ocupe dos líneas */
.small-box { display: flex; flex-direction: column; height: calc(100% - 20px); }
.small-box .inner { flex: 1; }
