:root {
    --radius: 18px;

    --olive-900: #0b1a12;
    --olive-800: #0f2419;

    --lime: #a6c96a;
    --green: #2e7d32;

    --text-dark: #142016;
    --muted-dark: rgba(20, 32, 22, .62);

    --card: rgba(255, 255, 255, .90);
    --border: rgba(0, 0, 0, .10);
    --shadow: 0 18px 40px rgba(0, 0, 0, .10);
}

* {
    box-sizing: border-box
}

html,
body {
    margin: 0;
    height: 100%;
    overflow: hidden;
    /* evita scroll del body */
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial;
}

.app {
    display: flex;
    height: 100vh;
    overflow: hidden;
    /* clave */
}

/* ===== SIDEBAR ===== */
.sidebar {
    overflow: hidden;
    /* evita que el sidebar tenga scroll horizontal */
}

/* BLOQUE BRAND */
.brand {
    padding: 18px 16px 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    text-align: center;
}

/* LOGO */
.brand-logo {
    width: 96px;
    /* sweet spot */
    height: auto;
    margin-bottom: 6px;
}

/* TEXTO */
.brand-sub {
    font-size: 12px;
    opacity: 0.7;
    letter-spacing: 0.3px;
}

.nav {
    display: flex;
    flex-direction: column;
    gap: 10px
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 12px;
    border-radius: 14px;
    text-decoration: none;
    color: rgba(255, 255, 255, .92);
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 255, 255, .10);
    transition: .15s ease;
}

.nav-item:hover {
    background: rgba(255, 255, 255, .10)
}

.nav-item .ico {
    width: 26px;
    height: 26px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: rgba(255, 255, 255, .08);
    opacity: .55;
    font-weight: 900;
}

.nav-item.active {
    background: rgba(100, 180, 220, .85);
    color: #0a1f2e;
    font-weight: 900;
}

.nav-item.active .ico {
    background: rgba(0, 0, 0, .14);
    opacity: .9;
}

.sidebar-footer {
    margin-top: 16px;
    padding: 12px;
    border-radius: 14px;
    background: rgba(0, 0, 0, .18);
    border: 1px solid rgba(255, 255, 255, .10);
}

.tiny {
    font-size: 12px
}

.muted {
    opacity: .7
}

/* ===== MAIN ===== */
.main {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    /* clave */
    min-width: 0;
    /* CLAVE en flex para que no empuje */
}

/* textura suave + sensación natural */
.main::before {
    content: "";
    position: fixed;
    left: 240px;
    right: 0;
    top: 0;
    bottom: 0;
    pointer-events: none;
    z-index: -1;
    background:
        radial-gradient(1200px 700px at 15% 15%, rgba(46, 125, 50, .08), transparent 55%),
        radial-gradient(900px 600px at 85% 30%, rgba(166, 201, 106, .10), transparent 60%),
        radial-gradient(900px 600px at 50% 85%, rgba(0, 0, 0, .04), transparent 60%);
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 12px;
}

.page-title {
    font-size: 26px;
    font-weight: 950;
}

.page-sub {
    opacity: .7;
}

.content {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    box-shadow: var(--shadow);
}

/* ===== TABLES PRO ===== */
.table-wrap {
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid var(--border);
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th {
    text-align: left;
    padding: 12px;
    background: rgba(0, 0, 0, .04);
    border-bottom: 1px solid var(--border);
    font-size: 13px;
}

.table td {
    padding: 12px;
    border-bottom: 1px solid rgba(0, 0, 0, .06);
}

.pill {
    display: inline-block;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    background: rgba(46, 125, 50, .10);
    border: 1px solid rgba(46, 125, 50, .20);
    color: #1f3b26;
}

.btn {
    padding: 8px 12px;
    border-radius: 10px;
    border: 1px solid rgba(0, 0, 0, .12);
    background: #fff;
    font-weight: 800;
    cursor: pointer;
}

.btn:hover {
    background: #f2f2f2
}

/* =========================
   HOTFIX PRO UI (SAFE)
   Pegar al FINAL de admin.css
========================= */

/* Sidebar más angosto */
.sidebar {
    width: 240px !important;
    padding: 14px !important;
}

/* Brand sin “cuadrado” */
.brand {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    padding: 6px 4px 10px !important;
}

/* Logo más chico y monocromático (blanco) */
.brand-logo {
    width: 120px !important;
    height: auto !important;
    display: block;
    margin: 2px 0 8px;
    filter: grayscale(1) brightness(2);
    opacity: .95;
}

/* Texto “Panel admin” */
.brand-sub {
    font-weight: 700;
    letter-spacing: .2px;
    opacity: .9;
}

/* Main blanco con textura + hojas abajo */
.main {
    background:
        radial-gradient(1200px 700px at 20% 10%, rgba(120, 180, 120, .10), transparent 55%),
        radial-gradient(900px 600px at 80% 30%, rgba(0, 0, 0, .04), transparent 65%),
        linear-gradient(180deg, #fbfbfb, #f3f5f4) !important;
    color: #111 !important;
    position: relative;
}

/* “Pastito/hojas” abajo (overlay suave) */
.main::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 220px;
    pointer-events: none;
    opacity: .18;
    background:
        radial-gradient(40px 18px at 8% 85%, rgba(46, 125, 50, .55), transparent 65%),
        radial-gradient(55px 22px at 18% 90%, rgba(76, 175, 80, .45), transparent 70%),
        radial-gradient(42px 18px at 30% 88%, rgba(139, 195, 74, .45), transparent 70%),
        radial-gradient(60px 22px at 46% 92%, rgba(46, 125, 50, .40), transparent 72%),
        radial-gradient(50px 20px at 62% 88%, rgba(76, 175, 80, .40), transparent 72%),
        radial-gradient(48px 18px at 78% 92%, rgba(139, 195, 74, .40), transparent 72%),
        radial-gradient(58px 22px at 92% 88%, rgba(46, 125, 50, .35), transparent 72%);
    filter: blur(1px);
}

/* Card más clara y moderna */
.card {
    background: rgba(255, 255, 255, .78) !important;
    border: 1px solid rgba(0, 0, 0, .06) !important;
    box-shadow: 0 18px 40px rgba(0, 0, 0, .08) !important;
    backdrop-filter: blur(6px);
}

/* Títulos legibles */
.page-title,
h1 {
    color: #0f1a12 !important;
}

.page-sub,
.muted {
    color: rgba(15, 26, 18, .65) !important;
}

/* Tabla pro */
.table {
    width: 100%;
    border-collapse: separate !important;
    border-spacing: 0 10px !important;
}

.table thead th {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: rgba(15, 26, 18, .55);
    border: 0 !important;
    padding: 10px 12px !important;
}

.table tbody tr {
    background: rgba(255, 255, 255, .92);
    border: 1px solid rgba(0, 0, 0, .06);
    box-shadow: 0 10px 22px rgba(0, 0, 0, .06);
}

.table tbody td {
    padding: 14px 12px !important;
    border: 0 !important;
}

.table tbody tr td:first-child {
    border-top-left-radius: 14px;
    border-bottom-left-radius: 14px;
}

.table tbody tr td:last-child {
    border-top-right-radius: 14px;
    border-bottom-right-radius: 14px;
}

/* =========================
   BSALE-LIKE (SAFE OVERRIDE)
   Pegar AL FINAL de admin.css
========================= */

:root {
    --sideW: 240px;
    --sideBg1: #0f1a2a;
    --sideBg2: #0b1220;
    --sideLine: rgba(255, 255, 255, .08);
    --sideText: rgba(255, 255, 255, .90);
    --sideMuted: rgba(255, 255, 255, .60);

    --mainBg1: #fbfbfb;
    --mainBg2: #f3f5f4;
    --ink: #101514;
    --muted: rgba(16, 21, 20, .62);

    --card: rgba(255, 255, 255, .92);
    --cardLine: rgba(0, 0, 0, .06);
    --shadow: 0 18px 44px rgba(0, 0, 0, .08);

    --accent: #a6c96a;
    /* tu lima */
}

/* Sidebar más fino + textura casi invisible */
.sidebar {
    width: var(--sideW) !important;
    padding: 14px !important;
    color: var(--sideText) !important;
    background:
        linear-gradient(180deg, var(--sideBg1), var(--sideBg2)) !important;
    position: sticky;
    top: 0;
    min-height: 100vh;
    height: auto;
}

/* textura premium (muy suave) */
.sidebar::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: .10;
    /* baja si la notas mucho */
    background:
        repeating-linear-gradient(135deg,
            rgba(255, 255, 255, .10) 0px,
            rgba(255, 255, 255, .10) 1px,
            transparent 1px,
            transparent 10px),
        radial-gradient(900px 600px at 30% 20%, rgba(166, 201, 106, .25), transparent 55%);
    mix-blend-mode: overlay;
}

.sidebar {
    position: relative;
}

.sidebar>* {
    position: relative;
    z-index: 1;
}

.brand {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    padding: 6px 4px 10px !important;
    margin-bottom: 12px !important;
}

.brand-logo {
    width: 112px !important;
    height: auto !important;
    display: block;
    margin: 2px 0 8px;
    /* fuerza monocromático (blanco) */
    filter: grayscale(1) brightness(2);
    opacity: .95;
}

.brand-sub {
    color: var(--sideMuted) !important;
    font-weight: 700;
    letter-spacing: .2px;
}

/* NAV */
.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    border-radius: 14px;
    padding: 12px 12px;
    color: var(--sideText) !important;
    border: 1px solid transparent;
    text-decoration: none;
}

.nav-item:hover {
    background: rgba(255, 255, 255, .06) !important;
    border-color: rgba(255, 255, 255, .08);
}

.nav-item.active {
    background: rgba(166, 201, 106, .92) !important;
    color: #0f1a12 !important;
    font-weight: 800;
    border-color: rgba(255, 255, 255, .22);
}

.nav-item.disabled {
    opacity: .55;
    pointer-events: none;
}

.nav-sep {
    height: 14px;
}

/* Iconos monocromáticos (SVG) */
.ico {
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    opacity: .88;
}

.ico svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Tag “pronto” */
.tag {
    margin-left: auto;
    font-size: 11px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .10);
    border: 1px solid rgba(255, 255, 255, .12);
    color: rgba(255, 255, 255, .75);
}

/* Main claro estilo Bsale */
.main {
    background:
        radial-gradient(1200px 700px at 20% 10%, rgba(166, 201, 106, .10), transparent 55%),
        radial-gradient(900px 600px at 85% 25%, rgba(0, 0, 0, .04), transparent 60%),
        linear-gradient(180deg, var(--mainBg1), var(--mainBg2)) !important;
    color: var(--ink) !important;
}

/* Textos */
.page-title,
h1 {
    color: var(--ink) !important;
}

.page-sub,
.muted {
    color: var(--muted) !important;
}

/* Cards pro */
.card {
    background: var(--card) !important;
    border: 1px solid var(--cardLine) !important;
    box-shadow: var(--shadow) !important;
    backdrop-filter: blur(6px);
}

/* Inputs modernos */
.input,
.select {
    background: rgba(255, 255, 255, .92);
    border: 1px solid rgba(0, 0, 0, .10);
    border-radius: 12px;
    padding: 10px 12px;
    outline: none;
}

.input:focus,
.select:focus {
    border-color: rgba(166, 201, 106, .65);
    box-shadow: 0 0 0 4px rgba(166, 201, 106, .18);
}

/* Tablas “vanguardia” */
.table {
    width: 100%;
    border-collapse: separate !important;
    border-spacing: 0 10px !important;
}

.table thead th {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: rgba(16, 21, 20, .55);
    border: 0 !important;
    padding: 10px 12px !important;
}

.table tbody tr {
    background: rgba(255, 255, 255, .96);
    border: 1px solid rgba(0, 0, 0, .06);
    box-shadow: 0 10px 22px rgba(0, 0, 0, .06);
}

.table tbody td {
    padding: 14px 12px !important;
    border: 0 !important;
}

.table tbody tr td:first-child {
    border-top-left-radius: 14px;
    border-bottom-left-radius: 14px;
}

.table tbody tr td:last-child {
    border-top-right-radius: 14px;
    border-bottom-right-radius: 14px;
}

/* =========================
   FIX: mantener color original sidebar
========================= */

/* Usa el color que YA tenías */
.sidebar {
    background: linear-gradient(180deg, #0f3451 0%, #0a1f2e 100%) !important;
}

/* Textura ultra sutil encima (no cambia color) */
.sidebar::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: .06;
    /* casi invisible */
    background:
        repeating-linear-gradient(135deg,
            rgba(255, 255, 255, .12) 0px,
            rgba(255, 255, 255, .12) 1px,
            transparent 1px,
            transparent 14px);
    mix-blend-mode: overlay;
}

/* Sidebar más angosto (más pro) */
.sidebar {
    width: 220px !important;
}

/* Logo más chico, sin caja */
.brand {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
}

.brand-logo {
    width: 96px !important;
    filter: grayscale(1) brightness(2);
    opacity: .95;
}

/* ===== BSALE-LIKE FINO (PEGAR AL FINAL) ===== */

/* Sidebar: textura MUY sutil sin cambiar color base */
.sidebar {
    position: relative;
}

.sidebar::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: .055;
    background:
        repeating-linear-gradient(135deg,
            rgba(255, 255, 255, .12) 0px,
            rgba(255, 255, 255, .12) 1px,
            transparent 1px,
            transparent 16px);
    mix-blend-mode: overlay;
}

.sidebar>* {
    position: relative;
    z-index: 1;
}

/* Sidebar más compacto */
.sidebar {
    width: 220px !important;
    padding: 14px !important;
}

.brand-logo {
    width: 100px !important;
}

/* Nav muted / separador / tag */
.nav-muted {
    font-size: 12px;
    opacity: .6;
    margin: 8px 10px 2px;
    letter-spacing: .02em;
    font-weight: 700;
}

.nav-sep {
    height: 14px;
}

.tag {
    margin-left: auto;
    font-size: 11px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .10);
    border: 1px solid rgba(255, 255, 255, .12);
    color: rgba(255, 255, 255, .70);
}

/* Icono monocromático premium */
.ico {
    width: 26px;
    height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .12);
    opacity: .85;
    font-weight: 900;
}

/* Main claro (legible) */
.main {
    color: #111 !important;
}

.muted {
    color: rgba(0, 0, 0, .58) !important;
}

/* Cards y tabla tipo SaaS */
.card {
    border-radius: 18px !important;
    border: 1px solid rgba(0, 0, 0, .06) !important;
    box-shadow: 0 18px 46px rgba(0, 0, 0, .10) !important;
}

.card-h {
    padding: 16px 18px !important;
    border-bottom: 1px solid rgba(0, 0, 0, .06) !important;
}

.card-b {
    padding: 16px 18px !important;
}

/* Tabla moderna: encabezado fijo + filas limpias */
.table-wrap {
    overflow: auto;
}

.table {
    width: 100%;
    border-collapse: separate !important;
    border-spacing: 0 !important;
}

.table thead th {
    position: sticky;
    top: 0;
    background: rgba(255, 255, 255, .86);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid rgba(0, 0, 0, .08);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: rgba(0, 0, 0, .55);
    padding: 12px 12px;
}

.table tbody td {
    padding: 14px 12px;
    border-bottom: 1px solid rgba(0, 0, 0, .06);
}

.table tbody tr:hover {
    background: rgba(166, 201, 106, .10);
}

/* Badges pro */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
    border: 1px solid rgba(0, 0, 0, .10);
    background: rgba(255, 255, 255, .70);
}

.badge.ok {
    color: #1f5a2a;
    border-color: rgba(31, 90, 42, .18);
    background: rgba(46, 125, 50, .10);
}

.badge.danger {
    color: #7a1d2b;
    border-color: rgba(122, 29, 43, .18);
    background: rgba(220, 53, 69, .12);
}

/* Botones tipo SaaS */
.btn {
    border-radius: 14px;
    padding: 10px 14px;
    font-weight: 900;
}

.btn-ghost {
    background: rgba(255, 255, 255, .82);
    border: 1px solid rgba(0, 0, 0, .10);
    color: #111;
}

.btn-ghost:hover {
    background: rgba(255, 255, 255, .98);
}

/* Brand centrado */
.brand {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 10px 10px 12px;
}

.brand-logo {
    display: block;
    margin: 0 auto;
    width: 92px;
    /* ajusta tamaño */
    height: auto;
}

.brand-sub {
    font-weight: 800;
    letter-spacing: .02em;
    opacity: .8;
}

.nav-item {
    position: relative;
    transition: transform .12s ease, background .15s ease, border-color .15s ease;
}

.nav-item.active {
    background: rgba(166, 201, 106, .85);
    color: #0b1220;
    border-color: rgba(0, 0, 0, .08);
}

.nav-item.active .ico {
    background: rgba(0, 0, 0, .10);
    border-color: rgba(0, 0, 0, .12);
    opacity: 1;
}

.nav-item:active {
    transform: scale(.99);
}

/* NAV con indicador tipo "Bsale" */
.nav {
    position: relative;
}

.nav-indicator {
    position: absolute;
    left: 0;
    right: 0;
    margin: 0 6px;
    border-radius: 14px;
    background: rgba(166, 201, 166, .85);
    box-shadow: 0 12px 30px rgba(0, 0, 0, .18);
    transition: transform .22s ease, height .22s ease, opacity .22s ease;
    z-index: 0;
    opacity: 0;
}

/* Items por encima del indicador */
.nav-item {
    position: relative;
    z-index: 1;
    display: flex;
    gap: 10px;
    align-items: center;
}

/* Iconos monocromáticos */
.nav-item .ico {
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: currentColor;
    opacity: .9;
    font-size: 16px;
}

.nav-item.disabled .ico {
    opacity: .45;
}

/* ===== HOVER tipo easycancha ===== */
.nav {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.nav-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 16px;
    color: rgba(255, 255, 255, .88);
    text-decoration: none;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, .06);
    transition: background .18s ease, transform .18s ease, border-color .18s ease;
}

/* al pasar el mouse: transparencia suave + “lift” */
.nav-item:hover {
    background: rgba(255, 255, 255, .10);
    border-color: rgba(255, 255, 255, .14);
    transform: translateX(3px);
}

/* el activo se nota, pero no fijo “feo” */
.nav-item.active {
    background: rgba(166, 201, 166, .85);
    border-color: rgba(166, 201, 166, .35);
    color: #0b1220;
    font-weight: 800;
}

/* el hover del activo igual se siente vivo */
.nav-item.active:hover {
    transform: translateX(3px);
    filter: brightness(1.02);
}

/* disabled */
.nav-item.disabled {
    opacity: .55;
    cursor: not-allowed;
}

.nav-item.disabled:hover {
    transform: none;
    background: rgba(255, 255, 255, .05);
}

/* iconos monocromáticos */
.nav-item .ico {
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    opacity: .9;
}

/* ===== Indicador flotante sidebar ===== */
.nav {
    position: relative;
}

.nav-indicator {
    position: absolute;
    left: 6px;
    width: calc(100% - 12px);
    height: 48px;
    border-radius: 16px;
    background: rgba(255, 255, 255, .14);
    border: 1px solid rgba(255, 255, 255, .18);
    pointer-events: none;
    transition: top .22s ease, opacity .15s ease;
    opacity: 0;
}

.nav-item {
    position: relative;
    z-index: 1;
}

.nav-item:hover~.nav-indicator {
    opacity: 1;
}

.nav-item.active {
    background: rgba(166, 201, 166, .85);
    color: #0b1220;
    font-weight: 800;
}

/* ===== Textura premium sidebar (VISIBLE) ===== */
.sidebar {
    position: relative;
    overflow: hidden;
}

/* Asegura que el contenido quede arriba */
.sidebar>* {
    position: relative;
    z-index: 2;
}

/* Textura arriba de todo */
.sidebar::before {
    content: "";
    position: absolute;
    inset: -2px;
    z-index: 1;
    /* arriba del fondo, abajo del contenido */
    pointer-events: none;
    opacity: .70;
    /* <-- SUBIDO (antes era muy poco) */

    /* textura más marcada */
    background:
        radial-gradient(900px 500px at 25% 15%, rgba(255, 255, 255, .20), transparent 20%),
        repeating-linear-gradient(135deg,
            rgba(255, 255, 255, .10) 0px,
            rgba(255, 255, 255, .10) 1px,
            transparent 1px,
            transparent 8px),
        repeating-linear-gradient(0deg,
            rgba(0, 0, 0, .18) 0px,
            rgba(0, 0, 0, .18) 1px,
            transparent 1px,
            transparent 4px);
}

/* “pastizal/hojas” abajo más notorio */
.sidebar::after {
    content: "";
    position: absolute;
    left: -25%;
    right: -25%;
    bottom: -45%;
    height: 85%;
    z-index: 1;
    pointer-events: none;
    opacity: .75;

    background:
        radial-gradient(closest-side at 20% 65%, rgba(166, 201, 166, .35), transparent 72%),
        radial-gradient(closest-side at 45% 80%, rgba(166, 201, 166, .28), transparent 72%),
        radial-gradient(closest-side at 70% 70%, rgba(166, 201, 166, .22), transparent 74%),
        radial-gradient(closest-side at 85% 60%, rgba(166, 201, 166, .18), transparent 76%);
    filter: blur(2px);
}

/* =========================
   PRO UX: Fondo + “surface”
   ========================= */

:root {
    --bg0: #0b0f12;
    --bg1: #0f1518;
    --card: rgba(255, 255, 255, .08);
    --card2: rgba(255, 255, 255, .12);
    --stroke: rgba(255, 255, 255, .14);
    --text: rgba(255, 255, 255, .92);
    --muted: rgba(255, 255, 255, .70);
}

/* Fondo general tipo app */
body {
    color: var(--text);
    background:
        radial-gradient(900px 500px at 22% 10%, rgba(170, 255, 120, .12), transparent 60%),
        radial-gradient(900px 500px at 80% 30%, rgba(120, 210, 255, .10), transparent 62%),
        linear-gradient(180deg, var(--bg0), var(--bg1));
}

/* Contenedor del contenido (zona “blanca” actual) */
.main {
    padding: 18px 18px 28px;
    position: relative;
}

/* “Textura” suave en el área principal */
.main::before {
    content: "";
    position: absolute;
    inset: 10px 10px 10px 10px;
    border-radius: 18px;
    pointer-events: none;

    /* textura: grano + cuadriculado MUY suave */
    background:
        radial-gradient(circle at 1px 1px, rgba(255, 255, 255, .05) 1px, transparent 1px) 0 0/18px 18px,
        repeating-linear-gradient(0deg, rgba(255, 255, 255, .04), rgba(255, 255, 255, .04) 1px, transparent 1px, transparent 28px),
        repeating-linear-gradient(90deg, rgba(255, 255, 255, .03), rgba(255, 255, 255, .03) 1px, transparent 1px, transparent 28px);
    opacity: .35;
}

/* =========================
   PRO UX: Fondo + “surface”
   ========================= */

:root {
    --bg0: #0b0f12;
    --bg1: #0f1518;
    --card: rgba(255, 255, 255, .08);
    --card2: rgba(255, 255, 255, .12);
    --stroke: rgba(255, 255, 255, .14);
    --text: rgba(255, 255, 255, .92);
    --muted: rgba(255, 255, 255, .70);
}

/* Fondo general tipo app */
body {
    color: var(--text);
    background:
        radial-gradient(900px 500px at 22% 10%, rgba(170, 255, 120, .12), transparent 60%),
        radial-gradient(900px 500px at 80% 30%, rgba(120, 210, 255, .10), transparent 62%),
        linear-gradient(180deg, var(--bg0), var(--bg1));
}

/* Contenedor del contenido (zona “blanca” actual) */
.main {
    padding: 18px 18px 28px;
    position: relative;
}

/* “Textura” suave en el área principal */
.main::before {
    content: "";
    position: absolute;
    inset: 10px 10px 10px 10px;
    border-radius: 18px;
    pointer-events: none;

    /* textura: grano + cuadriculado MUY suave */
    background:
        radial-gradient(circle at 1px 1px, rgba(255, 255, 255, .05) 1px, transparent 1px) 0 0/18px 18px,
        repeating-linear-gradient(0deg, rgba(255, 255, 255, .04), rgba(255, 255, 255, .04) 1px, transparent 1px, transparent 28px),
        repeating-linear-gradient(90deg, rgba(255, 255, 255, .03), rgba(255, 255, 255, .03) 1px, transparent 1px, transparent 28px);
    opacity: .35;
}

/* =========================
   PRO UX: Fondo + “surface”
   ========================= */

:root {
    --bg0: #0b0f12;
    --bg1: #0f1518;
    --card: rgba(255, 255, 255, .08);
    --card2: rgba(255, 255, 255, .12);
    --stroke: rgba(255, 255, 255, .14);
    --text: rgba(255, 255, 255, .92);
    --muted: rgba(255, 255, 255, .70);
}

/* Fondo general tipo app */
body {
    color: var(--text);
    background:
        radial-gradient(900px 500px at 22% 10%, rgba(170, 255, 120, .12), transparent 60%),
        radial-gradient(900px 500px at 80% 30%, rgba(120, 210, 255, .10), transparent 62%),
        linear-gradient(180deg, var(--bg0), var(--bg1));
}

/* Contenedor del contenido (zona “blanca” actual) */
.main {
    padding: 18px 18px 28px;
    position: relative;
}

/* “Textura” suave en el área principal */
.main::before {
    content: "";
    position: absolute;
    inset: 10px 10px 10px 10px;
    border-radius: 18px;
    pointer-events: none;

    /* textura: grano + cuadriculado MUY suave */
    background:
        radial-gradient(circle at 1px 1px, rgba(255, 255, 255, .05) 1px, transparent 1px) 0 0/18px 18px,
        repeating-linear-gradient(0deg, rgba(255, 255, 255, .04), rgba(255, 255, 255, .04) 1px, transparent 1px, transparent 28px),
        repeating-linear-gradient(90deg, rgba(255, 255, 255, .03), rgba(255, 255, 255, .03) 1px, transparent 1px, transparent 28px);
    opacity: .35;
}

/* El contenido por encima de la textura */
.main>* {
    position: relative;
    z-index: 1;
}

/* “Surface” contenedor para páginas (si usas .page) */
.page {
    background: rgba(255, 255, 255, .04);
    border: 1px solid rgba(255, 255, 255, .10);
    border-radius: 18px;
    padding: 16px;
    box-shadow: 0 18px 55px rgba(0, 0, 0, .35);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* Títulos con mejor jerarquía */
h1,
h2 {
    margin: 0;
    letter-spacing: -0.3px;
}

.muted {
    color: var(--muted) !important;
}

/* Cards pro (glass controlado) */
.card {
    background: linear-gradient(180deg, var(--card2), var(--card));
    border: 1px solid var(--stroke);
    border-radius: 16px;
    box-shadow: 0 14px 45px rgba(0, 0, 0, .30);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

/* KPI más “premium” */
.card.kpi {
    padding: 14px 16px;
}

.kpi-num {
    font-size: 40px;
    font-weight: 900;
    line-height: 1.05;
}

.kpi-label {
    font-size: 12.5px;
    opacity: .78;
}

/* Grid consistente */
.grid {
    gap: 14px;
    align-items: start;
}

.grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media(max-width: 980px) {
    .grid-3 {
        grid-template-columns: 1fr;
    }
}

/* Botones más pro */
.btn {
    border-radius: 12px;
    padding: 10px 12px;
    border: 1px solid rgba(255, 255, 255, .16);
    background: rgba(255, 255, 255, .10);
    color: rgba(255, 255, 255, .92);
}

.btn:hover {
    filter: brightness(1.06);
}

.btn.good {
    background: rgba(255, 255, 255, .16);
    font-weight: 800;
}

.btn.ghost {
    background: transparent;
    opacity: .65;
}

/* Pill */
.pill {
    border: 1px solid rgba(255, 255, 255, .16);
    background: rgba(255, 255, 255, .10);
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 12px;
}

.dash-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.dash-title {
    margin: 0;
    font-size: 22px;
}

.dash-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.grid-2 {
    grid-template-columns: 1.15fr 0.85fr;
}

@media (max-width: 980px) {
    .grid-2 {
        grid-template-columns: 1fr;
    }
}

.alert-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 0;
    border-top: 1px solid rgba(255, 255, 255, .08);
}

.alert-row:first-child {
    border-top: 0;
    padding-top: 0;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    flex: 0 0 auto;
    box-shadow: 0 0 0 4px rgba(255, 255, 255, .06);
}

.dot.red {
    background: rgba(255, 90, 90, .95);
}

.dot.yellow {
    background: rgba(255, 210, 90, .95);
}

.dot.green {
    background: rgba(110, 255, 160, .95);
}

.alert-txt {
    flex: 1;
    min-width: 0;
}

.alert-title {
    font-weight: 900;
}

.link {
    color: rgba(255, 255, 255, .86);
    text-decoration: none;
    opacity: .8;
}

.link:hover {
    opacity: 1;
    text-decoration: underline;
}

.top-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 0;
    border-top: 1px solid rgba(255, 255, 255, .08);
}

.top-row:first-child {
    border-top: 0;
    padding-top: 0;
}

.top-title {
    font-weight: 900;
    margin-top: 4px;
}

.badge {
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 12px;
    border: 1px solid rgba(255, 255, 255, .14);
    background: rgba(255, 255, 255, .10);
    opacity: .9;
}

.badge.good {
    background: rgba(120, 255, 160, .16);
}

.badge.ghost {
    opacity: .65;
}

.dash-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start;
    margin-bottom: 12px;
}

.dash-title {
    margin: 0;
    font-size: 22px;
}

.dash-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.grid-2 {
    grid-template-columns: 1.15fr 0.85fr;
}

@media (max-width: 980px) {
    .grid-2 {
        grid-template-columns: 1fr;
    }
}

.alert-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 0;
    border-top: 1px solid rgba(0, 0, 0, .06);
}

.alert-row:first-child {
    border-top: 0;
    padding-top: 0;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    flex: 0 0 auto;
}

.dot.red {
    background: #ff5a5a;
}

.dot.yellow {
    background: #ffd25a;
}

.dot.green {
    background: #6effa0;
}

.alert-txt {
    flex: 1;
    min-width: 0;
}

.alert-title {
    font-weight: 900;
}

.link {
    text-decoration: none;
    opacity: .75;
}

.link:hover {
    opacity: 1;
    text-decoration: underline;
}

.top-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 0;
    border-top: 1px solid rgba(0, 0, 0, .06);
}

.top-row:first-child {
    border-top: 0;
    padding-top: 0;
}

.top-title {
    font-weight: 900;
    margin-top: 4px;
}

.badge {
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 12px;
    border: 1px solid rgba(0, 0, 0, .08);
    background: rgba(0, 0, 0, .04);
}

.badge.good {
    background: rgba(110, 255, 160, .25);
}

.badge.ghost {
    opacity: .65;
}

/* =========================
   DASHBOARD LIMPIO (PRO)
   ========================= */

/* Fondo general claro (mantiene sidebar oscuro intacto) */
body {
    background: #f6f7f6;
    color: #111;
}

/* Área principal */
.main {
    padding: 18px 18px 28px;
}

/* “Page” contenedor (si existe en tu layout) */
.page {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, .06);
    border-radius: 18px;
    padding: 16px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, .06);
}

/* Textura MUY suave (sin blur) */
.page {
    background-image:
        radial-gradient(circle at 1px 1px, rgba(0, 0, 0, .03) 1px, transparent 1px);
    background-size: 18px 18px;
}

/* Cards */
.card {
    background: #fff;
    border: 1px solid rgba(0, 0, 0, .08);
    border-radius: 16px;
    box-shadow: 0 12px 28px rgba(0, 0, 0, .06);
}

/* KPI */
.card.kpi {
    padding: 14px 16px;
}

.kpi-num {
    font-size: 36px;
    font-weight: 900;
    line-height: 1.05;
    color: #0b0f12;
}

.kpi-label {
    opacity: .72;
    font-size: 13px;
}

/* Header resumen */
.dash-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start;
    padding-bottom: 10px;
    margin-bottom: 12px;
    border-bottom: 1px solid rgba(0, 0, 0, .06);
}

.dash-title {
    margin: 0;
    font-size: 22px;
    letter-spacing: -.2px;
}

.small {
    font-size: 12px;
}

.muted {
    opacity: .7;
}

/* Grids */
.grid {
    display: grid;
    gap: 14px;
    align-items: start;
}

.grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid-2 {
    grid-template-columns: 1.15fr .85fr;
}

@media (max-width: 980px) {
    .grid-3 {
        grid-template-columns: 1fr;
    }

    .grid-2 {
        grid-template-columns: 1fr;
    }
}

/* Alertas */
.alert-row,
.top-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 0;
    border-top: 1px solid rgba(0, 0, 0, .06);
}

.alert-row:first-child,
.top-row:first-child {
    border-top: 0;
    padding-top: 0;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
}

.dot.red {
    background: #ff5a5a;
}

.dot.yellow {
    background: #ffd25a;
}

.dot.green {
    background: #6effa0;
}

.link {
    color: #111;
    text-decoration: none;
    opacity: .65;
}

.link:hover {
    opacity: 1;
    text-decoration: underline;
}

/* Botones */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, .10);
    background: #fff;
    color: #111;
    text-decoration: none;
}

.btn.good {
    font-weight: 800;
}

.btn.ghost {
    background: transparent;
    opacity: .7;
}

/* Pill / badge */
.pill,
.badge {
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 12px;
    border: 1px solid rgba(0, 0, 0, .10);
    background: rgba(0, 0, 0, .04);
}

.badge.good {
    background: rgba(110, 255, 160, .35);
}

.badge.ghost {
    opacity: .6;
}

/* ===== Fondo pro para el area principal ===== */
.main {
    background:
        radial-gradient(1200px 600px at 20% -10%, rgba(140, 180, 120, .16), transparent 60%),
        radial-gradient(900px 500px at 90% 0%, rgba(120, 160, 255, .12), transparent 55%),
        linear-gradient(180deg, rgba(255, 255, 255, .55), rgba(255, 255, 255, .25));
}

.main::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    opacity: .12;
    background-image:
        radial-gradient(rgba(0, 0, 0, .9) 1px, transparent 1px);
    background-size: 22px 22px;
    mix-blend-mode: overlay;
}

/* ===== Tabla pro ===== */
.table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 10px;
    /* filas separadas tipo cards */
}

.table thead th {
    font-size: 12px;
    letter-spacing: .08em;
    text-transform: uppercase;
    opacity: .55;
    padding: 10px 14px;
}

.table tbody tr {
    background: rgba(255, 255, 255, .72);
    border: 1px solid rgba(0, 0, 0, .06);
    box-shadow: 0 10px 25px rgba(0, 0, 0, .05);
}

.table tbody td {
    padding: 14px;
}

.table tbody tr td:first-child {
    border-top-left-radius: 14px;
    border-bottom-left-radius: 14px;
}

.table tbody tr td:last-child {
    border-top-right-radius: 14px;
    border-bottom-right-radius: 14px;
    text-align: right;
}

/* ===== Ajuste contenedor tabla ===== */
.table-wrap {
    padding: 0;
}

.card-b {
    padding: 14px;
}

.table tbody tr {
    margin-bottom: 12px;
}

.muted,
.subtitle,
.help,
.small {
    color: #6b7280;
    /* gris legible */
    opacity: 1;
}

/* ===== LEGIBILIDAD GLOBAL (panel blanco) ===== */
:root {
    --text: #111827;
    --text-2: #374151;
    --muted: #4b5563;
    /* <-- más oscuro y legible */
}

/* texto general */
body,
.content,
.main,
.page {
    color: var(--text);
}

/* TODO lo que sea "muted" o subtítulos: que se lea */
.muted,
.subtitle,
.help,
.small,
.hint {
    color: var(--muted) !important;
    opacity: 1 !important;
    /* clave: nada de opacidad */
}

/* labels (como "Sucursal") */
label,
.field label {
    color: var(--text-2) !important;
    opacity: 1 !important;
}

/* el título chico dentro del card ("Stock" dentro del panel) */
.card-h .h1,
.card-h .title,
.card-h h2,
.card-h h3 {
    color: var(--text) !important;
}

/* ===== JERARQUÍA VISUAL ===== */
.page-title,
h1 {
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -0.3px;
}

.card-h .muted {
    font-size: 13px;
    font-weight: 500;
}

/* ===== CARDS MÁS FINAS ===== */
.card {
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow:
        0 1px 2px rgba(0, 0, 0, 0.04),
        0 8px 24px rgba(0, 0, 0, 0.06);
}

/* ===== ESTADOS ===== */
.badge-low {
    background: #fde2e2;
    color: #991b1b;
    font-weight: 600;
}

.badge-ok {
    background: #dcfce7;
    color: #166534;
    font-weight: 600;
}

.badge-zero {
    background: #fee2e2;
    color: #7f1d1d;
    font-weight: 700;
}

.badge-low {
    background: #fde2e2;
    color: #9b1c1c;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
}

.btn .ico {
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 8px;
}

.btn .ico svg {
    width: 18px;
    height: 18px;
    display: block;
}

/* ===== Tipografía base + legibilidad ===== */
:root {
    --bg: #f6f7f9;
    --card: rgba(255, 255, 255, .75);
    --stroke: rgba(20, 20, 20, .10);
    --text: #111827;
    --muted: rgba(17, 24, 39, .62);
    --radius: 18px;
    --shadow: 0 10px 30px rgba(0, 0, 0, .06);
    --gap-1: 6px;
    --gap-2: 10px;
    --gap-3: 14px;
    --gap-4: 18px;
    --gap-5: 24px;
}

body {
    color: var(--text);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3,
.h1,
.dash-title {
    letter-spacing: -0.02em;
    line-height: 1.15;
}

/* ===== Cards (más “premium”) ===== */
.card {
    border: 1px solid var(--stroke);
    border-radius: var(--radius);
    background: var(--card);
    box-shadow: var(--shadow);
}

/* Header de card: título + subtítulo + pill */
.card-h {
    padding: var(--gap-5);
    padding-bottom: var(--gap-4);
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--gap-4);
}

.card-h .h1,
.card-h h1,
.card-h h2,
.card-h h3 {
    margin: 0;
}

.card-h .muted {
    margin-top: var(--gap-1);
    line-height: 1.35;
    color: var(--muted);
    font-size: 14px;
}

.card-b {
    padding: var(--gap-5);
    padding-top: var(--gap-4);
}

/* ===== Pills ===== */
.pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    border-radius: 999px;
    border: 1px solid var(--stroke);
    background: rgba(255, 255, 255, .7);
    font-size: 13px;
    color: rgba(17, 24, 39, .75);
}

/* ===== Formularios (que respiren) ===== */
.row {
    gap: var(--gap-3) !important;
}

.field {
    display: grid;
    gap: 6px;
    margin-top: 0;
}

label {
    font-size: 13px;
    color: rgba(17, 24, 39, .75);
}

input,
select,
textarea {
    height: 40px;
    border-radius: 12px;
    border: 1px solid var(--stroke);
    background: rgba(255, 255, 255, .85);
    padding: 0 12px;
    outline: none;
    color: var(--text);
}

textarea {
    height: auto;
    padding: 10px 12px;
    line-height: 1.4;
}

input::placeholder,
textarea::placeholder {
    color: rgba(17, 24, 39, .40);
}

/* Botones más “plataforma” */
.btn {
    border-radius: 12px;
    padding: 10px 14px;
    line-height: 1;
}

/* ===== Espaciado general dentro de páginas ===== */
.dash-head {
    margin-bottom: var(--gap-4);
}

.grid {
    gap: var(--gap-4);
}

.kpi-num {
    line-height: 1;
    letter-spacing: -0.02em;
}

/* ===== Textos que hoy se ven demasiado “claros” ===== */
.small,
.muted.small {
    color: var(--muted) !important;
}

/* Evita que títulos/subtítulos queden pegados por márgenes raros */
h1,
h2,
h3,
p {
    margin: 0;
}

/* Íconos del sidebar en monocromo */
.sidebar .ico {
    color: rgba(255, 255, 255, 0.85);
    filter: grayscale(1) brightness(1.1);
    font-size: 16px;
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 12px;
}

.badge.ok {
    background: rgba(46, 204, 113, .18);
    color: #2ecc71;
}

.badge.low {
    background: rgba(241, 196, 15, .18);
    color: #f1c40f;
}

.badge.crit {
    background: rgba(231, 76, 60, .18);
    color: #e74c3c;
}

.grid-2 {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 16px;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.dot-a {
    background: #7a7f9a;
}

.dot-b {
    background: #2f8f83;
}

.h1 {
    font-size: 16px;
    font-weight: 900;
}

.kpi-sub {
    margin-top: 6px;
}

/* --- FIX: layout full height + scroll correcto --- */
html,
body {
    height: 100%;
}

body.app {
    min-height: 100vh;
    overflow: hidden;
    /* el scroll lo maneja el main */
}

.app {
    display: flex;
    min-height: 100vh;
}

/* Sidebar fijo, sin cortar */
.sidebar {
    height: 100vh;
    position: sticky;
    top: 0;
    overflow-y: auto;
    flex: 0 0 280px;
    /* ancho fijo */
}

/* Contenido ocupa el resto y scrollea */
.main,
.content,
main {
    flex: 1;
    height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
}

/* En pantallas chicas, que no reviente */
@media (max-width: 900px) {
    .sidebar {
        flex-basis: 220px;
    }
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.grid-2 {
    display: grid;
    grid-template-columns: 1.25fr .75fr;
    gap: 12px;
}

@media (max-width: 980px) {
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }

    .grid-2 {
        grid-template-columns: 1fr;
    }
}

/* ===== KUADRA SIDEBAR ===== */
.sidebar {
    background: #0b1220;
    border-right: 1px solid rgba(255, 255, 255, .06);
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px 16px;
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, .06);
}

.brand:hover {
    background: rgba(255, 255, 255, .03);
}

.brand-logo {
    width: 38px;
    height: 38px;
    object-fit: contain;
    filter: brightness(0) invert(1);
    /* monocromático */
}

.brand-name {
    color: #ffffff;
    font-weight: 800;
    font-size: 14px;
    letter-spacing: .3px;
    line-height: 1.1;
}

.brand-sub {
    color: rgba(255, 255, 255, .55);
    font-size: 12px;
    margin-top: 3px;
}

/* Quitar scrollbar visible del layout */
.app {
    overflow: hidden;
}

/* El contenido principal scrollea, pero sin barra */
.main {
    overflow-y: auto;
    scrollbar-width: none;
    /* Firefox */
}

.main::-webkit-scrollbar {
    width: 0px;
    /* Chrome, Edge, Safari */
    background: transparent;
}

html,
body {
    height: 100%;
    margin: 0;
    overflow: hidden;
    /* evita el scroll del body */
}

.app {
    display: flex;
    height: 100vh;
}

.sidebar {
    flex: 0 0 240px;
    overflow: auto;
    /* si el menú crece, scrollea aquí */
}

.main {
    flex: 1;
    overflow: auto;
    /* el scroll ocurre solo en el contenido */
    background: #f6f7f8;
    /* o tu color */
}

/* ===== FIX DEFINITIVO: NO SCROLL HORIZONTAL / BARRA BLANCA ===== */
html,
body {
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    height: 100% !important;
    overflow: hidden !important;
    /* mata el scroll del body */
}

.app {
    display: flex !important;
    width: 100% !important;
    height: 100vh !important;
    overflow: hidden !important;
}

.sidebar {
    flex: 0 0 240px !important;
    /* ancho fijo */
    overflow: hidden !important;
    /* sin scroll lateral */
}

.main {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    /* CLAVE para que no empuje */
    overflow-y: auto !important;
    overflow-x: hidden !important;
}

/* por si Chart / tablas empujan */
canvas,
svg,
img,
table,
pre {
    max-width: 100% !important;
}

/* esto es el que te crea la barra horizontal casi siempre */
* {
    box-sizing: border-box;
}

/* ===== FIX: sidebar pegado al borde, sin franja blanca ===== */
html,
body {
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: #0b1220 !important;
    /* mismo tono oscuro para que jamás se vea blanco */
    overflow: hidden !important;
}

/* En vez de flex, lo fijamos */
.sidebar {
    position: fixed !important;
    left: 0 !important;
    top: 0 !important;
    bottom: 0 !important;
    width: 240px !important;
    margin: 0 !important;
    border-radius: 0 !important;
    /* por si te está dejando ver el fondo */
}

/* El contenido se corre al lado del sidebar */
.main {
    margin-left: 240px !important;
    height: 100vh !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    min-width: 0 !important;
}

/* =========================
   MOBILE DRAWER (FINAL OVERRIDE)
   Pegar al FINAL de admin.css
========================= */

.mobile-menu-btn {
    display: none;
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 3001;
    border: 0;
    border-radius: 12px;
    padding: 10px 12px;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.75);
    color: #fff;
    font-size: 18px;
}

.overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 3000;
}

/* MÓVIL */
@media (max-width: 900px) {

    .mobile-menu-btn {
        display: block;
    }

    /* sidebar como drawer */
    .sidebar {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        bottom: 0 !important;
        width: 280px !important;
        transform: translateX(-110%);
        transition: transform .25s ease;
        z-index: 3002;
    }

    /* main ocupa toda la pantalla */
    .main {
        margin-left: 0 !important;
        height: 100vh !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        min-width: 0 !important;
    }

    /* si tienes fondos que dependen del sidebar */
    .main::before {
        left: 0 !important;
    }

    /* espacio para el botón */
    .topbar {
        padding-left: 56px !important;
    }

    body.sidebar-open .sidebar {
        transform: translateX(0);
    }

    body.sidebar-open .overlay {
        display: block;
    }
}