/* Estructura de los paneles (negocio y superadmin): barra lateral + contenido. */
.app { display: grid; grid-template-columns: 264px 1fr; min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; gap: 1.5rem; padding: 1.25rem; background: var(--surface); border-right: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; color: var(--text); }
.brand__mark { width: 40px; height: 40px; border-radius: 12px; background: var(--brand); display: grid; place-items: center; font-weight: 800; color: var(--on-brand); flex: none; overflow: hidden; }
.brand__mark .media { background: transparent; }
.brand__name { font-weight: 800; letter-spacing: -.02em; line-height: 1.1; }
.brand__sub { display: block; font-size: .75rem; color: var(--text-3); font-weight: 500; }

.nav { display: grid; gap: .25rem; }
.nav a, .nav button { display: flex; align-items: center; gap: .7rem; min-height: 44px; padding: .55rem .8rem; border-radius: var(--radius-sm); color: var(--text-2); text-decoration: none; font: inherit; font-weight: 600; background: none; border: 0; cursor: pointer; text-align: left; width: 100%; transition: background .2s, color .2s; }
.nav a:hover, .nav button:hover { background: var(--surface-2); color: var(--text); }
.nav [aria-current="page"] { background: color-mix(in srgb, var(--brand) 9%, #fff); color: var(--brand); }
.nav [aria-current="page"] .icon { color: var(--brand); }
.nav .ico { width: 1.4rem; display: inline-grid; place-items: center; flex: none; }
.nav .icon { width: 1.2rem; height: 1.2rem; vertical-align: 0; }
.nav a:focus-visible, .nav button:focus-visible { outline-offset: -3px; }
.sidebar__foot { margin-top: auto; display: grid; gap: .5rem; }

.main { min-width: 0; padding: 1.5rem clamp(1rem, 3vw, 2.5rem) 4rem; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.page-head h1 { font-size: clamp(1.6rem, 2.8vw, 2.25rem); margin: 0; letter-spacing: -.03em; }
.page-head p { margin: .35rem 0 0; color: var(--text-2); max-width: 62ch; }
.actions { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }

.grid { display: grid; gap: 1rem; }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }

.stat { padding: 1.15rem 1.3rem; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.stat__label { font-size: .75rem; color: var(--text-3); font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.stat__value { font-size: 2.1rem; font-weight: 800; letter-spacing: -.035em; line-height: 1.15; font-variant-numeric: tabular-nums; font-family: var(--font-display); }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
table.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th, .table td { padding: .75rem 1rem; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table-wrap { background: var(--surface); }
.table th { font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--text-3); background: var(--surface-2); }
.table tbody tr:hover td { background: color-mix(in srgb, var(--brand) 3%, #fff); }
.table tr:last-child td { border-bottom: 0; }

.empty { padding: 2.75rem 1.25rem; text-align: center; color: var(--text-2); border: 1px dashed var(--line-strong); border-radius: var(--radius-lg); display: grid; justify-items: center; gap: .35rem; }
.empty p { margin: 0; }
.empty strong { color: var(--text); font-size: 1.05rem; }
.empty__ico { display: grid; place-items: center; width: 56px; height: 56px; margin-bottom: .6rem; border-radius: 18px; background: color-mix(in srgb, var(--accent) 14%, #fff); color: var(--accent); border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent); }
.empty__ico .icon { width: 28px; height: 28px; vertical-align: 0; }
.empty .btn { margin-top: .75rem; }

/* Botón de menú en móvil */
.menu-toggle { display: none; }
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: fixed; z-index: 100; inset: 0 auto 0 0; width: 280px; transform: translateX(-100%); transition: transform .3s var(--ease); }
  .sidebar.is-open { transform: none; box-shadow: var(--shadow); }
  .menu-toggle { display: inline-flex; }
}

/* Icono BMC (marca por defecto): sustituye a la inicial. Pastilla blanca con el icono a lo ancho; la marca propia (logo o inicial) no cambia. */
.brand__mark:has(> .bmc-mark) { width: auto; height: 36px; padding: 0 .55rem; background: #fff; box-shadow: inset 0 0 0 1px var(--line); border-radius: 10px; }
.brand__mark--xl:has(> .bmc-mark), .brand__mark--lg:has(> .bmc-mark) { height: 48px; padding: 0 .7rem; }
.bp .brand__mark:has(> .bmc-mark), .brand__mark.idle__mark:has(> .bmc-mark) { background: #fff; }
.bmc-mark { display: block; height: 22px; width: auto; max-width: none; }
.brand__mark--xl .bmc-mark, .brand__mark--lg .bmc-mark { height: 30px; }
