/* ============================================================
   ASCENT17 SYSTEM - estilos base (responsive)
   Ambientado a la paleta del sitio web: negro + rojo #EA1119.
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Montserrat:wght@400;500;600;700;800;900&display=swap');

/* ============================================================
   TEMAS: OSCURO (default) + CLARO (data-theme="light")
   El claro usa la paleta oficial del Manual de Identidad ASCENT17.
   La barra lateral se mantiene oscura en ambos temas (marca).
   ============================================================ */
:root, :root[data-theme="dark"] {
    /* Le dice al NAVEGADOR en que tema estamos (3-oct-2026). Sin esta linea, todo control
       nativo al que no le fijemos color — un <button> (que NO hereda el color del texto),
       barras de scroll, selectores de fecha, autocompletados — se pinta con el default del
       navegador, que siempre asume claro: letra negra sobre nuestros fondos oscuros.
       Asi lo salio el nombre del producto en la venta rapida. Esto lo arregla de raiz y
       evita que el mismo bug reaparezca cada vez que alguien ponga un boton sin color. */
    color-scheme: dark;

    /* --- Paleta ASCENT17 - OSCURO (del sitio web) --- */
    --red: #EA1119;
    --red-bright: #ff2a30;
    --red-deep: #9e0b12;
    --bg: #070708;
    --bg-2: #0d0d10;
    --panel: #14141a;
    --panel-2: #1b1b22;
    --line: #26262e;
    --text: #f6f6f7;
    --muted: #9a9aa2;

    /* superficies que cambian con el tema */
    --field-bg: rgba(255, 255, 255, .04);
    --field-border: rgba(255, 255, 255, .12);
    --field-focus-bg: rgba(255, 255, 255, .06);
    --placeholder: #71717a;
    --chip-bg: rgba(255, 255, 255, .08);
    --chip-tx: #b5b5bd;

    /* barra lateral (oscuro) */
    --side-bg: #0c0c11;
    --side-text: #c9c9d1;
    --side-strong: #ffffff;
    --side-muted: #6b6b74;
    --side-hover: #1b1b22;
    --side-line: rgba(255, 255, 255, .07);
    --side-sublink: #9a9aa6;

    /* --- Alias --- */
    --sc-blue: #EA1119;
    --sc-green: #22c55e;
    --sc-amber: #f59e0b;
    --sc-purple: #a855f7;
    --sc-bg: #070708;
    --sc-text: #f6f6f7;
    --sc-muted: #9a9aa2;
    --sc-border: #26262e;
}

/* La barra lateral es oscura en AMBOS temas (identidad de marca) */
:root {
    --sc-navy: #0c0c11;
    --sc-navy-2: #14141a;
    --sc-navy-hover: #1b1b22;
    --sc-sidebar-w: 256px;
    --rail-w: 76px;
    --sc-font: 'Montserrat', 'Segoe UI', system-ui, -apple-system, sans-serif;
}

/* Sombra sutil para distinguir el menu claro del contenido */
:root[data-theme="light"] .sc-sidebar { box-shadow: 2px 0 14px rgba(0, 0, 0, .06); }

/* ---------- TEMA CLARO (paleta del Manual) ---------- */
:root[data-theme="light"] {
    color-scheme: light;     /* el par del de arriba: controles nativos en claro */

    --red: #E30613;          /* Rojo Ascent oficial */
    --red-bright: #ff1e2b;
    --red-deep: #b00510;
    --bg: #ECECEE;           /* Concreto / fondo */
    --bg-2: #F6F6F7;         /* topbar / encabezado de tabla */
    --panel: #FFFFFF;        /* tarjetas / paneles */
    --panel-2: #F1F1F3;      /* hover */
    --line: #E1E1E4;         /* bordes (Gris Claro) */
    --text: #1B1B1D;         /* Grafito / texto */
    --muted: #6B6B72;

    --field-bg: #FFFFFF;
    --field-border: #D9D9D9; /* Concreto */
    --field-focus-bg: #FFFFFF;
    --placeholder: #9a9aa2;
    --chip-bg: #ECECEF;
    --chip-tx: #55555C;

    /* barra lateral (claro) - clara pero distinta del contenido */
    --side-bg: #FFFFFF;
    --side-text: #3d3d45;
    --side-strong: #1B1B1D;
    --side-muted: #9a9aa2;
    --side-hover: #F0F0F3;
    --side-line: #E4E4E7;
    --side-sublink: #6B6B72;

    --sc-blue: #E30613;
    --sc-bg: #ECECEE;
    --sc-text: #1B1B1D;
    --sc-muted: #6B6B72;
    --sc-border: #E1E1E4;
}

* { box-sizing: border-box; }

/* ===================== LOGIN (negro + glow rojo) ===================== */
.sc-auth-body {
    margin: 0;
    min-height: 100vh;
    font-family: var(--sc-font);
    color: var(--text);
    background:
        radial-gradient(60% 50% at 18% 108%, rgba(234,17,25,.22) 0%, rgba(234,17,25,0) 60%),
        radial-gradient(55% 45% at 88% 0%, rgba(234,17,25,.14) 0%, rgba(234,17,25,0) 60%),
        linear-gradient(180deg, #0a0a0c 0%, #070708 60%, #050506 100%);
    position: relative;
    overflow: hidden;
}
/* Halos rojos difusos de fondo */
.sc-auth-body::before,
.sc-auth-body::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(234,17,25,.18) 0%, rgba(234,17,25,0) 70%);
    filter: blur(20px);
    pointer-events: none;
}
.sc-auth-body::before { width: 520px; height: 520px; bottom: -180px; left: -120px; }
.sc-auth-body::after  { width: 620px; height: 620px; bottom: -240px; right: -160px; }

.sc-auth-wrapper {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
}

.sc-login-card {
    width: 100%;
    max-width: 380px;
    padding: 2.25rem 2rem 1.75rem;
    text-align: center;
    border-radius: 22px;
    background: rgba(20, 20, 26, .72);
    border: 1px solid rgba(255, 255, 255, .08);
    box-shadow: 0 25px 60px rgba(0, 0, 0, .55), 0 0 0 1px rgba(234,17,25,.08);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.sc-login-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 1.1rem;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--red) 0%, var(--red-deep) 100%);
    box-shadow: 0 8px 22px rgba(234, 17, 25, .45);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: #fff;
}

.sc-login-title { font-size: 1.6rem; font-weight: 800; color: #fff; margin: 0 0 .4rem; letter-spacing: .01em; }
.sc-login-subtitle { font-size: .88rem; color: var(--muted); line-height: 1.5; margin: 0 0 1.5rem; }

.sc-login-form { text-align: left; }

.sc-login-alert {
    background: rgba(234, 17, 25, .12);
    color: #ff6b6f;
    border: 1px solid rgba(234, 17, 25, .4);
    border-radius: 12px;
    padding: .6rem .8rem;
    font-size: .85rem;
    margin-bottom: .9rem;
}

.sc-field {
    position: relative;
    margin-bottom: .85rem;
}
.sc-field-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted);
    font-size: 1rem;
}
.sc-input {
    width: 100%;
    height: 50px;
    border: 1px solid rgba(255, 255, 255, .12);
    background: rgba(255, 255, 255, .04);
    border-radius: 12px;
    padding: 0 44px 0 42px;
    font-size: .92rem;
    color: var(--text);
    transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.sc-input::placeholder { color: #71717a; }
.sc-input:focus {
    outline: none;
    background: rgba(255, 255, 255, .06);
    border-color: var(--red);
    box-shadow: 0 0 0 3px rgba(234, 17, 25, .25);
}

.sc-eye {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--muted);
    font-size: 1rem;
    cursor: pointer;
    padding: 6px;
    line-height: 0;
}
.sc-eye:hover { color: var(--text); }

.sc-field-error { display: block; color: var(--red-bright); font-size: .78rem; margin: -.5rem 0 .5rem; }

.sc-forgot { text-align: right; margin: .15rem 0 1.1rem; }
.sc-forgot a { color: var(--muted); font-size: .82rem; font-weight: 600; text-decoration: none; }
.sc-forgot a:hover { color: var(--red-bright); text-decoration: underline; }

.sc-login-btn {
    width: 100%;
    height: 52px;
    border: none;
    border-radius: 12px;
    color: #fff;
    font-weight: 800;
    font-size: .95rem;
    letter-spacing: .08em;
    text-transform: uppercase;
    cursor: pointer;
    background: linear-gradient(180deg, var(--red) 0%, var(--red-deep) 100%);
    box-shadow: 0 12px 26px rgba(234, 17, 25, .4);
    transition: transform .12s ease, box-shadow .12s ease, background .2s ease;
}
.sc-login-btn:hover { transform: translateY(-2px); box-shadow: 0 16px 32px rgba(234, 17, 25, .55); background: linear-gradient(180deg, var(--red-bright) 0%, var(--red) 100%); }
.sc-login-btn:active { transform: translateY(0); }

.sc-divider {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin: 1.25rem 0 1rem;
    color: var(--muted);
    font-size: .78rem;
}
.sc-divider::before,
.sc-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, .1);
}

.sc-social { display: flex; gap: .65rem; }
.sc-social-btn {
    flex: 1;
    height: 46px;
    border: 1px solid rgba(255, 255, 255, .1);
    background: rgba(255, 255, 255, .04);
    color: var(--text);
    border-radius: 12px;
    font-size: 1.15rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .15s ease, transform .12s ease, border-color .15s ease;
}
.sc-social-btn:not(:disabled):hover { background: rgba(255, 255, 255, .08); border-color: var(--red); transform: translateY(-1px); }
.sc-social-btn:disabled { opacity: .45; cursor: not-allowed; }

/* ===================== APP / SIDEBAR ===================== */
.sc-app-body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--sc-font);
}

/* ===== Controles de formulario Bootstrap (tema oscuro) ===== */
.sc-app-body .form-control,
.sc-app-body .form-select {
    background: var(--field-bg);
    border: 1px solid var(--field-border);
    color: var(--text);
}
.sc-app-body .form-control::placeholder { color: var(--placeholder); }
.sc-app-body .form-control:focus,
.sc-app-body .form-select:focus {
    background: var(--field-focus-bg);
    border-color: var(--red);
    box-shadow: 0 0 0 3px rgba(227, 6, 19, .22);
    color: var(--text);
}
.sc-app-body .form-select option { background: var(--panel); color: var(--text); }
.sc-app-body .form-label { color: var(--text); font-weight: 600; }
.sc-app-body .form-text, .sc-app-body .text-muted { color: var(--muted) !important; }
.sc-app-body .form-check-input { background-color: var(--field-bg); border-color: var(--field-border); }
.sc-app-body .form-check-input:checked { background-color: var(--red); border-color: var(--red); }
.sc-app-body .input-group-text { background: var(--panel-2); border-color: var(--field-border); color: var(--muted); }
.sc-app-body .dropdown-menu { background: var(--panel); border: 1px solid var(--line); box-shadow: 0 10px 28px rgba(0,0,0,.28); }
.sc-app-body .dropdown-item { color: var(--text); }
.sc-app-body .dropdown-item:hover, .sc-app-body .dropdown-item:focus { background: var(--panel-2); color: var(--text); }
.sc-app-body hr { border-color: var(--line); opacity: 1; }
/* enlaces de texto dentro del contenido (no afecta menu ni tarjetas) */
.sc-content p a, .sc-content .sc-textlink { color: var(--red-bright); }

.sc-layout { display: flex; min-height: 100vh; }

.sc-sidebar {
    width: var(--sc-sidebar-w);
    background: var(--side-bg);
    color: var(--side-text);
    display: flex;
    flex-direction: column;
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 1040;
    border-right: 1px solid var(--side-line);
    transition: transform .25s ease, width .2s ease;
}

.sc-sidebar-brand {
    display: flex;
    align-items: center;
    gap: .65rem;
    padding: 1.15rem 1.25rem;
    border-bottom: 1px solid var(--side-line);
    white-space: nowrap;
    overflow: hidden;
}
.sc-sidebar-logo {
    width: 38px; height: 38px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--red), var(--red-deep));
    box-shadow: 0 6px 16px rgba(234, 17, 25, .4);
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 1.1rem;
}
.sc-sidebar-title { color: var(--side-strong); font-weight: 800; font-size: 1.1rem; letter-spacing: .02em; white-space: nowrap; }

.sc-nav { flex: 1; padding: .75rem .6rem; overflow-y: auto; overflow-x: hidden; }
.sc-nav-group {
    text-transform: uppercase;
    font-size: .68rem;
    letter-spacing: .1em;
    color: var(--side-muted);
    padding: 1rem .75rem .35rem;
    font-weight: 700;
    white-space: nowrap;
}
.sc-nav-link {
    display: flex;
    align-items: center;
    gap: .7rem;
    padding: .62rem .75rem;
    border-radius: 9px;
    color: var(--side-text);
    text-decoration: none;
    font-size: .92rem;
    margin-bottom: 2px;
    white-space: nowrap;
    transition: background .15s ease, color .15s ease;
}
.sc-nav-link i { font-size: 1.05rem; width: 20px; text-align: center; flex-shrink: 0; }
.sc-nav-link:hover { background: var(--side-hover); color: var(--side-strong); }
.sc-nav-link.active { background: var(--red); color: #fff; box-shadow: 0 6px 16px rgba(234,17,25,.35); }
.sc-nav-link.disabled { opacity: .45; pointer-events: none; }

/* ===== Grupos colapsables del menu ===== */
.sc-group-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    gap: .7rem;
    padding: .62rem .75rem;
    border: none;
    background: none;
    color: var(--side-text);
    font-size: .92rem;
    border-radius: 9px;
    cursor: pointer;
    margin-bottom: 2px;
    text-align: left;
    white-space: nowrap;
    transition: background .15s ease, color .15s ease;
}
.sc-group-toggle i:first-child { font-size: 1.05rem; width: 20px; text-align: center; flex-shrink: 0; }
.sc-group-toggle span { flex: 1; }
.sc-group-toggle:hover { background: var(--side-hover); color: var(--side-strong); }
.sc-group-toggle.open { color: var(--side-strong); }

.sc-chevron {
    font-size: .8rem !important;
    width: auto !important;
    transition: transform .2s ease;
}
.sc-group-toggle.open .sc-chevron { transform: rotate(180deg); }

.sc-submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height .25s ease;
    margin: 0 0 2px .55rem;
    border-left: 1px solid var(--side-line);
    padding-left: .35rem;
}
.sc-submenu.open { max-height: 420px; }

.sc-sublink {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .5rem .7rem;
    margin-bottom: 1px;
    border-radius: 8px;
    color: var(--side-sublink);
    text-decoration: none;
    font-size: .86rem;
    white-space: nowrap;
    transition: background .15s ease, color .15s ease;
}
.sc-sublink i { font-size: .95rem; width: 18px; text-align: center; flex-shrink: 0; }
.sc-sublink:hover { background: var(--side-hover); color: var(--side-strong); }
.sc-sublink.active { color: var(--red); background: rgba(227, 6, 19, .12); font-weight: 600; }

.sc-sidebar-note {
    font-size: .72rem;
    color: var(--side-muted);
    padding: .85rem 1.25rem;
    border-top: 1px solid var(--side-line);
    line-height: 1.4;
}

/* Pie del menu lateral: boton Vaciar sistema (fijo abajo) */
.sc-sidebar-foot {
    margin-top: auto;
    padding: .7rem .8rem;
    border-top: 1px solid var(--side-line);
}
.fz-wipe-btn {
    width: 100%;
    display: flex; align-items: center; justify-content: center; gap: .55rem;
    padding: .62rem .75rem;
    border: 1px solid rgba(234, 17, 25, .55);
    border-radius: 9px;
    background: transparent;
    color: #ff8a8d;
    font-size: .9rem; font-weight: 600;
    cursor: pointer;
    transition: background .15s ease, color .15s ease;
}
.fz-wipe-btn:hover { background: var(--red); color: #fff; border-color: var(--red); }
.fz-wipe-btn i { font-size: 1.05rem; }

/* ===== Contenido ===== */
.sc-main {
    flex: 1;
    margin-left: var(--sc-sidebar-w);
    display: flex;
    flex-direction: column;
    min-width: 0;
    transition: margin-left .2s ease;
}

/* ===================== MENU CONTRAIDO (solo iconos) ===================== */
.sc-rail .sc-sidebar { width: var(--rail-w); }
.sc-rail .sc-main { margin-left: var(--rail-w); }
.sc-rail .sc-sidebar .sc-sidebar-title,
.sc-rail .sc-sidebar .sc-nav-group,
.sc-rail .sc-sidebar .sc-nav-link > span,
.sc-rail .sc-sidebar .sc-group-toggle > span,
.sc-rail .sc-sidebar .sc-chevron,
.sc-rail .sc-sidebar .sc-submenu,
.sc-rail .sc-sidebar .sc-sidebar-note,
.sc-rail .sc-sidebar .sc-sidebar-foot { display: none; }
.sc-rail .sc-sidebar .sc-nav-link,
.sc-rail .sc-sidebar .sc-group-toggle { justify-content: center; padding-left: 0; padding-right: 0; }
.sc-rail .sc-sidebar .sc-sidebar-brand { justify-content: center; padding-left: 0; padding-right: 0; }

/* En escritorio: al pasar el cursor, el riel se expande temporalmente (overlay) */
@media (min-width: 992px) {
    .sc-rail .sc-sidebar:hover { width: var(--sc-sidebar-w); box-shadow: 8px 0 34px rgba(0, 0, 0, .38); }
    .sc-rail .sc-sidebar:hover .sc-sidebar-title,
    .sc-rail .sc-sidebar:hover .sc-nav-group,
    .sc-rail .sc-sidebar:hover .sc-nav-link > span,
    .sc-rail .sc-sidebar:hover .sc-group-toggle > span,
    .sc-rail .sc-sidebar:hover .sc-chevron,
    .sc-rail .sc-sidebar:hover .sc-sidebar-note,
    .sc-rail .sc-sidebar:hover .sc-sidebar-foot { display: block; }
    .sc-rail .sc-sidebar:hover .sc-submenu.open { display: block; }
    .sc-rail .sc-sidebar:hover .sc-nav-link,
    .sc-rail .sc-sidebar:hover .sc-group-toggle { justify-content: flex-start; padding-left: .75rem; padding-right: .75rem; }
    .sc-rail .sc-sidebar:hover .sc-sidebar-brand { justify-content: flex-start; padding-left: 1.25rem; padding-right: 1.25rem; }
}

/* Boton contraer (solo escritorio) */
.sc-collapse {
    display: inline-flex; align-items: center; justify-content: center;
    width: 38px; height: 38px; border-radius: 9px;
    background: none; border: 1px solid var(--line); color: var(--text);
    cursor: pointer; font-size: 1.05rem;
    transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.sc-collapse:hover { border-color: var(--red); color: var(--red); }
.sc-rail .sc-collapse i { transform: rotate(180deg); }

.sc-topbar {
    height: 62px;
    background: var(--bg-2);
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0 1.25rem;
    position: sticky;
    top: 0;
    z-index: 1030;
}
.sc-burger {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text);
    cursor: pointer;
}
.sc-topbar-title { font-weight: 700; font-size: 1.05rem; flex: 1; }

/* Switch de tema claro/oscuro */
.sc-theme-toggle {
    background: var(--field-bg);
    border: 1px solid var(--line);
    color: var(--text);
    width: 40px; height: 40px; border-radius: 10px;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 1.1rem; cursor: pointer; margin-right: .25rem;
    transition: background .15s ease, border-color .15s ease, color .15s ease, transform .2s ease;
}
.sc-theme-toggle:hover { border-color: var(--red); color: var(--red); }
.sc-theme-toggle:active { transform: rotate(-20deg); }

.sc-user-btn {
    display: flex;
    align-items: center;
    gap: .6rem;
    background: none;
    border: none;
    color: var(--text);
    cursor: pointer;
}
.sc-avatar {
    width: 38px; height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--red), var(--red-deep));
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: .85rem;
}
.sc-user-info { display: flex; flex-direction: column; line-height: 1.15; text-align: left; }
.sc-user-name { font-weight: 600; font-size: .85rem; }
.sc-user-role { font-size: .72rem; color: var(--muted); }

.sc-content { padding: 1.5rem; }

/* ===== Tarjetas dashboard ===== */
.sc-welcome h2 { font-weight: 800; font-size: 1.4rem; margin: 0; }
.sc-welcome p { color: var(--muted); margin: .15rem 0 1.25rem; }

/* ===== Dashboard de cards (accesos por pantalla) ===== */
.sc-dash-mod { margin-bottom: 1.5rem; }
.sc-dash-modtitle {
    font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em;
    color: var(--muted); margin-bottom: .6rem;
}

/* ===== Primeros pasos (checklist de arranque del tablero) ===== */
.sc-setup-prog { font-size: .74rem; font-weight: 800; color: #4ade80; background: rgba(34,197,94,.1); border: 1px solid rgba(34,197,94,.35); border-radius: 99px; padding: .25rem .7rem; }
.sc-setup-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: .6rem; margin-top: .4rem; }
.sc-setup-item {
    display: flex; align-items: center; gap: .65rem; text-decoration: none;
    background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px; padding: .65rem .8rem;
    transition: border-color .15s, transform .15s;
}
.sc-setup-item:hover { border-color: rgba(234,17,25,.55); transform: translateY(-2px); }
.sc-setup-check {
    flex: 0 0 34px; width: 34px; height: 34px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center; font-size: 1rem;
    background: rgba(234,17,25,.12); color: #ff6b6f; border: 1px solid rgba(234,17,25,.35);
}
.sc-setup-item.ok .sc-setup-check { background: rgba(34,197,94,.12); color: #4ade80; border-color: rgba(34,197,94,.4); }
.sc-setup-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.sc-setup-txt b { color: var(--text); font-size: .85rem; }
.sc-setup-txt small { color: var(--muted); font-size: .72rem; line-height: 1.3; }
.sc-setup-cta { color: #ff6b6f; font-size: .74rem; font-weight: 800; white-space: nowrap; }
.sc-setup-item.ok .sc-setup-cta { color: var(--muted); }
.sc-dash-card {
    display: flex; align-items: center; gap: .75rem;
    background: var(--panel); border: 1px solid var(--line); border-radius: 14px;
    padding: .9rem 1rem; height: 100%; text-decoration: none; color: var(--text);
    transition: box-shadow .15s ease, transform .1s ease, border-color .15s ease, background .15s ease;
}
.sc-dash-card:hover { box-shadow: 0 10px 24px rgba(0,0,0,.4); transform: translateY(-2px); border-color: rgba(234,17,25,.5); background: var(--panel-2); color: var(--text); }
.sc-dash-ic {
    width: 44px; height: 44px; border-radius: 12px; flex-shrink: 0;
    background: var(--red); color: #fff;
    display: flex; align-items: center; justify-content: center; font-size: 1.2rem;
}
.sc-dash-info { flex: 1; min-width: 0; }
.sc-dash-nom { font-weight: 700; font-size: .92rem; line-height: 1.2; }
.sc-dash-desc { font-size: .75rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sc-dash-arrow { color: #55555f; font-size: .9rem; }

/* contador de registros */
.sc-dash-count { font-weight: 800; font-size: 1.35rem; color: var(--text); min-width: 28px; text-align: right; }

/* globo de notificacion tipo Facebook */
.sc-dash-ic { position: relative; }
.sc-dash-notif {
    position: absolute; top: -7px; right: -7px;
    background: var(--red-bright); color: #fff;
    min-width: 20px; height: 20px; padding: 0 5px;
    border-radius: 999px; border: 2px solid var(--panel);
    font-size: .68rem; font-weight: 700; line-height: 16px; text-align: center;
    box-shadow: 0 2px 5px rgba(0,0,0,.5);
}

/* colores por modulo (fondo del icono + barra lateral del card) */
.sc-dash-card.mod-op   .sc-dash-ic { background: var(--red); }
.sc-dash-card.mod-alm  .sc-dash-ic { background: #0f766e; }
.sc-dash-card.mod-cat  .sc-dash-ic { background: #7c3aed; }
.sc-dash-card.mod-area .sc-dash-ic { background: #ea580c; }
.sc-dash-card.mod-cfg  .sc-dash-ic { background: #52525b; }
.sc-dash-card.mod-def  .sc-dash-ic { background: var(--red); }
.sc-dash-card.mod-op   { border-left: 4px solid var(--red); }
.sc-dash-card.mod-alm  { border-left: 4px solid #0f766e; }
.sc-dash-card.mod-cat  { border-left: 4px solid #7c3aed; }
.sc-dash-card.mod-area { border-left: 4px solid #ea580c; }
.sc-dash-card.mod-cfg  { border-left: 4px solid #52525b; }

.sc-card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 1.1rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    height: 100%;
}
.sc-card-icon {
    width: 50px; height: 50px;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 1.35rem;
    flex-shrink: 0;
}
.sc-bg-blue { background: var(--red); }
.sc-bg-green { background: var(--sc-green); }
.sc-bg-amber { background: var(--sc-amber); }
.sc-bg-purple { background: var(--sc-purple); }
.sc-bg-red { background: var(--red); }
.sc-card-value { font-size: 1.4rem; font-weight: 800; }
.sc-card-label { font-size: .82rem; color: var(--muted); }

.sc-panel {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 1.25rem 1.5rem;
}
.sc-panel h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: .5rem; }

/* ===== Encabezado de pagina ===== */
.sc-page-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}
.sc-page-head h2 { font-weight: 800; font-size: 1.4rem; margin: 0; }
.sc-page-head p { color: var(--muted); margin: .15rem 0 0; font-size: .9rem; }

.sc-btn-add {
    background: var(--red);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: .6rem 1.1rem;
    font-weight: 700;
    font-size: .9rem;
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    box-shadow: 0 8px 20px rgba(234,17,25,.3);
    transition: background .15s ease, transform .12s ease, box-shadow .15s ease;
}
.sc-btn-add:hover { background: var(--red-bright); color: #fff; transform: translateY(-1px); box-shadow: 0 12px 26px rgba(234,17,25,.45); }

.sc-head-actions { display: flex; align-items: center; gap: .5rem; }
.sc-btn-refresh {
    background: var(--panel);
    color: var(--text);
    border: 1px solid var(--line);
    border-radius: 10px;
    width: 42px; height: 42px;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 1.05rem; cursor: pointer;
    transition: background .15s ease, border-color .15s ease, transform .3s ease;
}
.sc-btn-refresh:hover { background: var(--panel-2); border-color: rgba(234,17,25,.5); }
.sc-btn-refresh:active i { transform: rotate(360deg); }

/* ===== Tabla ===== */
.sc-table { font-size: .88rem; color: var(--text); }
.sc-table thead th {
    background: var(--bg-2);
    color: var(--muted);
    font-weight: 700;
    text-transform: uppercase;
    font-size: .72rem;
    letter-spacing: .05em;
    border-bottom: 1px solid var(--line);
    padding: .75rem .9rem;
    white-space: nowrap;
}
.sc-table tbody td {
    padding: .7rem .9rem;
    border-bottom: 1px solid var(--line);
    color: var(--text);
    vertical-align: middle;
}
.sc-table tbody tr:hover { background: var(--panel-2); }

/* ===== Tarjetas de inventario (vista movil) ===== */
.sc-inv-card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: .7rem .8rem;
    margin-bottom: .6rem;
}
.sc-inv-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: .5rem; }
.sc-inv-card-id { min-width: 0; }
.sc-inv-card-nom { font-weight: 700; font-size: .92rem; color: var(--text); line-height: 1.2; }
.sc-inv-card-meta { font-size: .72rem; color: var(--muted); margin-top: 2px; display: flex; flex-wrap: wrap; gap: .25rem; }
.sc-inv-card-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: .4rem;
    margin-top: .65rem;
}
.sc-inv-cell {
    background: var(--bg-2);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: .3rem .25rem;
    text-align: center;
}
.sc-inv-cell .l {
    display: block; font-size: .58rem; text-transform: uppercase; letter-spacing: .02em;
    color: var(--muted); line-height: 1.1;
}
.sc-inv-cell .v { display: block; font-weight: 700; font-size: .82rem; color: var(--text); margin-top: 1px; }
.sc-inv-cell.is-total { background: rgba(234,17,25,.12); border-color: rgba(234,17,25,.35); }
.sc-inv-cell.is-total .v { color: #ff6b6f; }
.sc-inv-cell.is-bajo { background: rgba(234,17,25,.12); border-color: rgba(234,17,25,.35); }
.sc-inv-cell.is-bajo .v { color: #ff6b6f; }

/* Solo 3 columnas en telefonos muy angostos */
@media (max-width: 359.98px) {
    .sc-inv-card-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ===== Badges de status ===== */
.sc-badge {
    display: inline-block;
    padding: .25rem .65rem;
    border-radius: 999px;
    font-size: .74rem;
    font-weight: 600;
    border: 1px solid transparent;
}
.sc-badge-green { background: rgba(34,197,94,.15); color: #4ade80; border-color: rgba(34,197,94,.3); }
.sc-badge-gray { background: var(--chip-bg); color: var(--chip-tx); border-color: var(--field-border); }
.sc-badge-blue { background: rgba(234,17,25,.15); color: #ff6b6f; border-color: rgba(234,17,25,.3); }
.sc-badge-amber { background: rgba(245,158,11,.15); color: #fbbf24; border-color: rgba(245,158,11,.3); }
.sc-badge-red { background: rgba(234,17,25,.15); color: #ff6b6f; border-color: rgba(234,17,25,.3); }

/* ===================== Boton flotante: Sugerir cambio ===================== */
.fz-fab {
    position: fixed;
    bottom: 22px;
    right: 22px;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: none;
    background: var(--red);
    color: #fff;
    font-size: 1.15rem;
    box-shadow: 0 8px 22px rgba(234,17,25,.45);
    cursor: pointer;
    z-index: 1045;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform .15s ease, background .15s ease;
}
.fz-fab:hover { background: var(--red-bright); transform: scale(1.08); }
.fz-fab.fz-loading { pointer-events: none; opacity: .7; }
.fz-fab.fz-loading i { animation: fz-spin 1s linear infinite; }
@keyframes fz-spin { to { transform: rotate(360deg); } }

/* ===================== MOVIL: cards colapsables + filtros flotantes ===================== */
.fz-cards-toggle { display: none; }
@media (max-width: 768px) {
    .fz-fab { bottom: 18px; right: 16px; }

    /* Cards colapsables */
    .fz-cards-toggle {
        display: flex; justify-content: space-between; align-items: center;
        background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
        padding: 11px 15px; margin: 4px 0 12px; font-weight: 600; color: var(--text);
        cursor: pointer; box-shadow: 0 1px 4px rgba(0,0,0,.3);
    }
    .sc-cards.fz-collapsed { display: none !important; }

    /* FAB de filtros (abajo-izquierda, para no chocar con el de sugerencias) */
    .fz-filter-fab {
        position: fixed; bottom: 18px; left: 16px;
        width: 46px; height: 46px; border-radius: 50%;
        background: var(--panel); color: var(--text); border: 1px solid var(--line);
        box-shadow: 0 4px 14px rgba(0,0,0,.4); font-size: 1.1rem; z-index: 1045;
        display: flex; align-items: center; justify-content: center;
    }

    /* Hoja flotante (bottom sheet) con los filtros */
    .fz-sheet { position: fixed; inset: 0; background: rgba(0,0,0,.6); z-index: 1060; display: none; }
    .fz-sheet.open { display: block; }
    .fz-sheet-inner {
        position: absolute; left: 0; right: 0; bottom: 0;
        background: var(--bg-2); border: 1px solid var(--line); border-radius: 16px 16px 0 0;
        padding: 14px; max-height: 82vh; overflow: auto;
        box-shadow: 0 -6px 20px rgba(0,0,0,.5);
    }
    .fz-sheet-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
    .fz-sheet-head b { color: var(--text); font-size: 1.05rem; }
    .fz-in-sheet { margin: 0 0 10px 0 !important; }
}

/* ===== Botones de accion en la tabla ===== */
.sc-btn-icon {
    border: none;
    width: 34px;
    height: 34px;
    border-radius: 9px;
    font-size: .95rem;
    cursor: pointer;
    transition: filter .15s ease, transform .1s ease;
    margin-left: .25rem;
}
.sc-btn-icon:hover { filter: brightness(1.15); transform: translateY(-1px); }
.sc-edit { background: rgba(234,17,25,.15); color: #ff6b6f; }
.sc-delete { background: rgba(234,17,25,.18); color: #ff6b6f; }
.sc-ini { background: rgba(34,197,94,.15); color: #4ade80; }
.sc-link { background: rgba(168,85,247,.15); color: #c084fc; }
.sc-lock { background: rgba(255,255,255,.06); color: #6b6b74; cursor: not-allowed; }
.sc-buy { background: rgba(34,197,94,.15); color: #4ade80; }

.sc-buy-info { background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px; padding: .75rem 1rem; font-size: .9rem; }
.sc-buy-info div { margin-bottom: .15rem; }
.sc-buy-info span { color: var(--muted); }
.sc-buy-total { background: var(--red); color: #fff; border-radius: 10px; padding: .6rem 1rem; text-align: right; font-size: 1.05rem; box-shadow: 0 8px 20px rgba(234,17,25,.3); }

/* Vista previa de foto (evidencia de merma) */
.sc-foto-prev { position: relative; display: inline-block; margin-top: .5rem; }
.sc-foto-prev img { max-height: 150px; max-width: 100%; border-radius: 10px; border: 1px solid var(--line); display: block; }
.sc-foto-quitar { position: absolute; top: -8px; right: -8px; width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--panel); background: var(--red); color: #fff; cursor: pointer; font-size: .75rem; line-height: 1; box-shadow: 0 2px 5px rgba(0,0,0,.5); }

/* ===== Pedidos ===== */
.sc-pedido { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.sc-pedido-prov { font-size: 1rem; }
.sc-pedido-meta { font-size: .82rem; color: var(--muted); margin-top: .15rem; }
.sc-pedido-acciones { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.sc-pedido-form { display: flex; align-items: center; gap: .5rem; margin: 0; }
.sc-pedido-form input { width: 200px; }
@media (max-width: 575.98px) {
    .sc-pedido-acciones, .sc-pedido-form { width: 100%; }
    .sc-pedido-form input { flex: 1; width: auto; }
}
.sc-key {
    background: rgba(245,158,11,.15); color: #fbbf24;
    width: auto; padding: 0 .75rem; gap: .35rem;
    display: inline-flex; align-items: center;
    font-size: .82rem; font-weight: 600;
}

/* ===== Modal ===== */
.sc-modal { border: none; border-radius: 16px; overflow: hidden; background: var(--panel); color: var(--text); }
.sc-modal .modal-content { background: var(--panel); color: var(--text); border: 1px solid var(--line); }
.sc-modal .modal-header { background: var(--sc-navy); color: #fff; border: none; padding: 1rem 1.25rem; border-bottom: 1px solid var(--line); }
.sc-modal .modal-header .btn-close { filter: invert(1) grayscale(100%) brightness(200%); }
.sc-modal .modal-title { font-size: 1.05rem; font-weight: 700; }
.sc-modal .modal-body { padding: 1.25rem; }
.sc-modal .modal-footer { border-top: 1px solid var(--line); }
.sc-modal .form-label { font-weight: 600; font-size: .82rem; color: var(--text); margin-bottom: .25rem; }
.sc-modal .form-control, .sc-modal .form-select {
    background: var(--field-bg); border: 1px solid var(--field-border); color: var(--text);
}
.sc-modal .form-control:focus, .sc-modal .form-select:focus {
    background: var(--field-focus-bg); border-color: var(--red); box-shadow: 0 0 0 3px rgba(227,6,19,.22); color: var(--text);
}
.sc-modal .form-control::placeholder { color: var(--placeholder); }

.sc-btn-primary {
    background: var(--red);
    color: #fff;
    font-weight: 700;
    border: none;
}
.sc-btn-primary:hover { background: var(--red-bright); color: #fff; }

/* ===================== PAGINA PUBLICA DE REQUISICION ===================== */
.sc-pub-body {
    margin: 0; min-height: 100vh; background: var(--bg);
    font-family: var(--sc-font); color: var(--text);
}
.sc-pub-wrap { max-width: 760px; margin: 0 auto; padding: 1.25rem; }
.sc-pub-header {
    display: flex; align-items: center; gap: .9rem;
    background: var(--panel); border: 1px solid var(--line); color: #fff;
    border-radius: 16px; padding: 1.1rem 1.25rem; margin-bottom: 1rem;
}
.sc-pub-logo {
    width: 46px; height: 46px; border-radius: 12px; flex-shrink: 0;
    background: linear-gradient(135deg, var(--red), var(--red-deep));
    box-shadow: 0 6px 16px rgba(234,17,25,.4);
    display: flex; align-items: center; justify-content: center; font-size: 1.3rem;
}
.sc-pub-header h1 { font-size: 1.25rem; font-weight: 800; margin: 0; }
.sc-pub-header p { margin: .1rem 0 0; opacity: .75; font-size: .85rem; }

.sc-pub-error {
    max-width: 420px; margin: 12vh auto 0; text-align: center;
    background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 2.5rem 1.5rem;
}
.sc-pub-error i { font-size: 3rem; color: var(--red); }
.sc-pub-error h3 { font-weight: 800; margin: .75rem 0 .35rem; }
.sc-pub-error p { color: var(--muted); margin: 0; }

/* ===================== AUTOCOMPLETE (proveedor) ===================== */
.sc-autocomplete { position: relative; }
.sc-ac-icon {
    position: absolute; left: 12px; top: 13px;
    color: var(--muted); font-size: .95rem; pointer-events: none; z-index: 2;
}
.sc-ac-input { padding-left: 34px !important; }
.sc-ac-list {
    display: none;
    position: absolute; left: 0; right: 0; top: 100%;
    z-index: 1080;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 10px;
    margin-top: 4px;
    max-height: 240px; overflow-y: auto;
    box-shadow: 0 10px 24px rgba(0,0,0,.5);
}
.sc-ac-item {
    display: flex; align-items: center; gap: .55rem;
    padding: .55rem .8rem; cursor: pointer; font-size: .88rem;
}
.sc-ac-item:hover { background: var(--panel-2); }
.sc-ac-item i { color: var(--red); }
.sc-ac-item small { color: var(--muted); }
.sc-ac-empty { padding: .6rem .8rem; color: var(--muted); font-size: .85rem; }

.sc-ac-selected {
    display: none; align-items: center; gap: .5rem;
    background: rgba(34,197,94,.14); border: 1px solid rgba(34,197,94,.3); color: #4ade80;
    border-radius: 10px; padding: .55rem .8rem; font-weight: 600; font-size: .9rem;
}
.sc-ac-selected .sc-ac-clear {
    margin-left: auto; background: none; border: none; color: #4ade80;
    cursor: pointer; font-size: .85rem; padding: 2px 6px; border-radius: 6px;
}
.sc-ac-selected .sc-ac-clear:hover { background: rgba(34,197,94,.2); }

/* ===================== ACCESOS ===================== */
.acc-users h3 { font-size: 1rem; font-weight: 700; margin-bottom: .75rem; }
.acc-search {
    position: relative;
    margin-bottom: .75rem;
}
.acc-search i {
    position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
    color: var(--muted); font-size: .9rem;
}
.acc-search input {
    width: 100%; height: 40px;
    border: 1px solid var(--field-border);
    background: var(--field-bg);
    color: var(--text);
    border-radius: 10px;
    padding: 0 12px 0 34px;
    font-size: .88rem;
}
.acc-search input::placeholder { color: var(--placeholder); }
.acc-search input:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 3px rgba(227,6,19,.22); background: var(--field-focus-bg); }

.acc-user-list { max-height: 540px; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; }
.acc-user {
    display: flex; align-items: center; gap: .6rem;
    width: 100%; text-align: left;
    border: 1px solid transparent; background: none;
    color: var(--text);
    padding: .5rem .6rem; border-radius: 10px; cursor: pointer;
    transition: background .15s ease, border-color .15s ease;
}
.acc-user:hover { background: var(--panel-2); }
.acc-user.active { background: rgba(234,17,25,.14); border-color: rgba(234,17,25,.4); }
.acc-user-avatar {
    width: 34px; height: 34px; border-radius: 50%;
    background: linear-gradient(135deg, var(--red), var(--red-deep)); color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: .75rem; flex-shrink: 0;
}
.acc-user-info { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.acc-user-name { font-weight: 600; font-size: .85rem; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acc-user-tipo { font-size: .72rem; color: var(--muted); }

.acc-empty {
    text-align: center; color: var(--muted);
    padding: 3rem 1.5rem;
}
.acc-empty i { font-size: 2.5rem; opacity: .4; display: block; margin-bottom: .75rem; }
.acc-empty p { margin: 0; }

.acc-selected-bar {
    width: 100%;
    background: rgba(234,17,25,.12);
    border: 1px solid rgba(234,17,25,.35);
    color: #ff6b6f;
    border-radius: 10px;
    padding: .6rem 1rem;
    font-size: .9rem;
    margin: 0 .5rem 0 .5rem;
}

.acc-box { display: flex; flex-direction: column; height: 100%; }
.acc-box-head {
    display: flex; align-items: center; justify-content: space-between;
    font-weight: 700; font-size: .9rem; margin-bottom: .75rem;
    color: var(--text);
}
.acc-count {
    background: var(--chip-bg); color: var(--chip-tx);
    border-radius: 999px; padding: .1rem .6rem;
    font-size: .75rem; font-weight: 700;
}
.acc-count-green { background: rgba(34,197,94,.15); color: #4ade80; }

.acc-drop {
    min-height: 360px;
    border: 2px dashed var(--line);
    border-radius: 12px;
    padding: .6rem;
    display: flex; flex-direction: column; gap: 6px;
    background: var(--bg-2);
    transition: border-color .15s ease, background .15s ease;
}
.acc-drop-green { border-color: rgba(34,197,94,.4); background: rgba(34,197,94,.06); }
.acc-drop.drag-over { border-color: var(--red); background: rgba(234,17,25,.08); }

.acc-item {
    display: flex; align-items: center; gap: .6rem;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: .55rem .7rem;
    cursor: grab;
    transition: box-shadow .15s ease, transform .1s ease, border-color .15s ease;
}
.acc-item:hover { box-shadow: 0 4px 12px rgba(0,0,0,.4); border-color: rgba(234,17,25,.4); }
.acc-item:active { cursor: grabbing; }
.acc-item-ic { font-size: 1.05rem; color: var(--red); width: 22px; text-align: center; }
.acc-item-text { display: flex; flex-direction: column; line-height: 1.2; flex: 1; min-width: 0; }
.acc-item-name { font-weight: 600; font-size: .85rem; color: var(--text); }
.acc-item-mod { font-size: .72rem; color: var(--muted); }
.acc-act {
    border: none; width: 30px; height: 30px; border-radius: 8px;
    font-size: .85rem; cursor: pointer; flex-shrink: 0;
    transition: filter .15s ease;
}
.acc-act:hover { filter: brightness(1.15); }
.acc-add { background: rgba(34,197,94,.15); color: #4ade80; }
.acc-rem { background: rgba(234,17,25,.18); color: #ff6b6f; }

/* ===== Overlay movil ===== */
.sc-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .6);
    z-index: 1035;
}
.sc-overlay.show { display: block; }

/* ===================== RESPONSIVE ===================== */
@media (max-width: 991.98px) {
    .sc-sidebar { transform: translateX(-100%); }
    .sc-sidebar.open { transform: translateX(0); }
    .sc-main { margin-left: 0; }
    .sc-burger { display: inline-flex; }
    /* En movil el menu es off-canvas: el modo riel no aplica */
    .sc-rail .sc-sidebar { width: var(--sc-sidebar-w); }
    .sc-rail .sc-main { margin-left: 0; }
    .sc-rail .sc-sidebar .sc-nav-link > span,
    .sc-rail .sc-sidebar .sc-group-toggle > span,
    .sc-rail .sc-sidebar .sc-sidebar-title,
    .sc-rail .sc-sidebar .sc-nav-group,
    .sc-rail .sc-sidebar .sc-chevron { display: inline; }
    .sc-rail .sc-sidebar .sc-nav-link,
    .sc-rail .sc-sidebar .sc-group-toggle { justify-content: flex-start; padding-left: .75rem; padding-right: .75rem; }
    .sc-collapse { display: none; }
}

/* Tablet: tablas y paneles mas compactos */
@media (max-width: 767.98px) {
    .sc-table { font-size: .82rem; }
    .sc-table thead th { padding: .55rem .6rem; }
    .sc-table tbody td { padding: .55rem .6rem; }
    .sc-panel { padding: 1rem; }
    .sc-card { padding: .9rem 1rem; gap: .75rem; }
    .sc-card-icon { width: 42px; height: 42px; font-size: 1.15rem; }
    .sc-card-value { font-size: 1.2rem; }
}

/* Telefono */
@media (max-width: 575.98px) {
    .sc-user-info { display: none; }
    .sc-content { padding: 1rem; }
    .sc-topbar { padding: 0 .9rem; }

    /* Encabezado de pagina: apila titulo y boton */
    .sc-page-head { align-items: flex-start; }
    .sc-page-head .sc-btn-add,
    .sc-page-head .sc-head-actions { width: 100%; justify-content: center; }
    .sc-head-actions { display: flex; }

    /* Tablas aun mas compactas para aprovechar el scroll horizontal */
    .sc-table { font-size: .78rem; }
    .sc-table thead th { padding: .5rem .5rem; font-size: .66rem; }
    .sc-table tbody td { padding: .5rem .5rem; }
    .sc-btn-icon { width: 30px; height: 30px; font-size: .85rem; }

    /* Modales a pantalla completa de ancho */
    .modal-dialog { margin: .5rem; }

    /* Titulos un poco menores */
    .sc-page-head h2, .sc-welcome h2 { font-size: 1.2rem; }
}

/* ===== Tabla -> tarjetas en movil (generico, clase .sc-stack) =====
   Cada <tr> se vuelve una tarjeta y cada <td> una linea "Etiqueta: valor"
   tomando la etiqueta de su atributo data-label. No requiere JS. */
@media (max-width: 767.98px) {
    table.sc-stack thead { display: none; }
    table.sc-stack, table.sc-stack tbody { display: block; width: 100%; }
    table.sc-stack tr {
        display: block;
        background: var(--panel);
        border: 1px solid var(--line);
        border-radius: 12px;
        padding: .35rem .8rem;
        margin-bottom: .6rem;
    }
    table.sc-stack tbody tr:hover { background: var(--panel); }
    table.sc-stack td {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 1rem;
        padding: .4rem 0;
        border: none;
        border-bottom: 1px solid var(--line);
        text-align: right;
        white-space: normal;
        min-height: 0;
    }
    table.sc-stack td:last-child { border-bottom: none; }
    table.sc-stack td::before {
        content: attr(data-label);
        font-weight: 600;
        font-size: .7rem;
        text-transform: uppercase;
        letter-spacing: .02em;
        color: var(--muted);
        text-align: left;
        flex-shrink: 0;
    }
    /* Celdas sin etiqueta (acciones): pega el contenido a la derecha */
    table.sc-stack td:not([data-label]) { justify-content: flex-end; }
    table.sc-stack td:not([data-label])::before { content: none; }
    /* Botones de accion comodos en la tarjeta */
    table.sc-stack td .sc-btn-icon:first-child { margin-left: 0; }
}

/* ============================================================
   REFRESH DE MARCA ASCENT17
   Logo real + tipografia de titulos Bebas Neue (identidad del sitio).
   ============================================================ */

/* --- Tipografia de titulos (Bebas Neue, alto contraste) --- */
.sc-page-head h2,
.sc-login-title,
.sc-topbar-title,
.sc-dash-hero h1,
.sc-dash-hero h2 {
    font-family: 'Bebas Neue', var(--sc-font);
    font-weight: 400;
    letter-spacing: .03em;
}
.sc-page-head h2 { font-size: 2rem; line-height: 1.05; }
.sc-login-title  { font-size: 2rem; letter-spacing: .04em; }
.sc-topbar-title { font-size: 1.35rem; letter-spacing: .04em; }

/* --- Logo en el sidebar: expandido = logo blanco completo, riel = el 17 --- */
.sc-brand {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    text-decoration: none;
    width: 100%;
    overflow: hidden;
}
.sc-brand-white { height: 40px; width: auto; max-width: 100%; display: block; }
.sc-brand-17 { height: 40px; width: auto; display: none; }

/* En modo riel (colapsado) mostramos solo el 17 recortado */
.sc-rail .sc-brand-white { display: none; }
.sc-rail .sc-brand-17 { display: block; }
.sc-rail .sc-brand { justify-content: center; }

@media (min-width: 992px) {
    /* Al pasar el cursor sobre el riel, se expande y vuelve el logo completo */
    .sc-rail .sc-sidebar:hover .sc-brand-white { display: block; }
    .sc-rail .sc-sidebar:hover .sc-brand-17 { display: none; }
    .sc-rail .sc-sidebar:hover .sc-brand { justify-content: flex-start; }
}

/* --- Splash de carga con el 17 ascendente --- */
.sc-splash {
    position: fixed; inset: 0; z-index: 3000;
    background: radial-gradient(60% 80% at 50% 30%, #17171d 0%, #070708 70%);
    display: flex; align-items: center; justify-content: center;
    transition: opacity .5s ease, visibility .5s ease;
}
.sc-splash--hide { opacity: 0; visibility: hidden; }
.sc-splash-inner { display: flex; flex-direction: column; align-items: center; gap: 1rem; }
.sc-splash-17 {
    height: 96px; width: auto;
    filter: drop-shadow(0 12px 30px rgba(234, 17, 25, .5));
    animation: sc17-rise .9s cubic-bezier(.2, .8, .2, 1) both, sc17-float 1.8s ease-in-out .9s infinite;
}
.sc-splash-word {
    font-family: 'Bebas Neue', var(--sc-font);
    font-size: 2.2rem; letter-spacing: .12em; color: #fff; line-height: 1;
    opacity: 0; animation: sc17-fade .5s ease .35s forwards;
}
.sc-splash-word span { color: var(--red); }
.sc-splash-bar {
    width: 160px; height: 4px; border-radius: 4px; overflow: hidden;
    background: rgba(255, 255, 255, .1);
}
.sc-splash-bar span {
    display: block; height: 100%; width: 40%; border-radius: 4px;
    background: linear-gradient(90deg, var(--red), var(--red-bright));
    animation: sc17-load 1.1s ease-in-out infinite;
}
@keyframes sc17-rise {
    0%   { transform: translateY(40px) scale(.7); opacity: 0; }
    100% { transform: translateY(0) scale(1); opacity: 1; }
}
@keyframes sc17-float {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-8px); }
}
@keyframes sc17-fade { to { opacity: 1; } }
@keyframes sc17-load {
    0%   { transform: translateX(-100%); }
    100% { transform: translateX(320%); }
}
@media (prefers-reduced-motion: reduce) {
    .sc-splash-17, .sc-splash-word, .sc-splash-bar span { animation: none; opacity: 1; }
}

/* --- Graficas del tablero (una serie, hue unico de marca) --- */
.sc-card-link { text-decoration: none; color: inherit; transition: border-color .2s, transform .2s; }
.sc-card-link:hover { border-color: rgba(234, 17, 25, .55); transform: translateY(-2px); color: inherit; }

.sc-chart svg { width: 100%; height: auto; display: block; }
.sc-chart .bar path { fill: var(--red); }
.sc-chart .bar:hover path { fill: var(--red-bright); }
.sc-chart .grid { stroke: var(--line); stroke-width: 1; stroke-dasharray: 2 4; }
.sc-chart .axis { stroke: var(--line); stroke-width: 1.5; }
.sc-chart text { font-family: var(--sc-font); font-variant-numeric: tabular-nums; }
.sc-chart .val { fill: var(--text); font-size: 12px; font-weight: 700; }
.sc-chart .cat { fill: var(--muted); font-size: 11px; letter-spacing: .06em; }

/* --- Veredicto del torniquete (pantalla de mostrador) --- */
.sc-verdict {
    display: flex; align-items: center; gap: 1.1rem;
    border-radius: 16px; padding: 1.1rem 1.4rem;
    border: 2px solid; animation: sc-verdict-in .35s cubic-bezier(.2,.9,.3,1.2) both;
}
.sc-verdict.ok {
    border-color: #22c55e;
    background: linear-gradient(90deg, rgba(34,197,94,.16), rgba(34,197,94,.04));
    box-shadow: 0 10px 34px rgba(34,197,94,.18);
}
.sc-verdict.denied {
    border-color: var(--red);
    background: linear-gradient(90deg, rgba(234,17,25,.16), rgba(234,17,25,.04));
    box-shadow: 0 10px 34px rgba(234,17,25,.2);
}
.sc-verdict-icon { font-size: 2.6rem; line-height: 1; }
.sc-verdict.ok .sc-verdict-icon { color: #22c55e; }
.sc-verdict.denied .sc-verdict-icon { color: var(--red-bright); }
.sc-verdict-title {
    font-family: 'Bebas Neue', var(--sc-font); font-size: 1.9rem; letter-spacing: .06em;
    text-transform: uppercase; line-height: 1; color: var(--text);
}
.sc-verdict-who { color: var(--muted); font-weight: 600; margin-top: .2rem; }
.sc-verdict-reason { color: var(--red-bright); font-weight: 700; font-size: .9rem; margin-top: .3rem; }
@keyframes sc-verdict-in { from { transform: translateY(-8px) scale(.98); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .sc-verdict { animation: none; } }

/* --- Avatares de socios (iniciales, gradiente de marca) --- */
.sc-avatar-ini {
    width: 36px; height: 36px; border-radius: 50%; flex: none;
    background: linear-gradient(135deg, var(--red), var(--red-deep));
    color: #fff; font-weight: 800; font-size: .8rem; letter-spacing: .02em;
    display: inline-flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 12px rgba(234, 17, 25, .3);
}
.sc-avatar-xl { width: 64px; height: 64px; font-size: 1.35rem; }

/* --- Embudo visual del CRM --- */
.sc-funnel { display: flex; align-items: stretch; gap: .5rem; flex-wrap: wrap; }
.sc-funnel-step {
    flex: 1; min-width: 110px; text-decoration: none;
    border-radius: 12px; padding: .7rem 1rem; text-align: center;
    border: 1px solid transparent; transition: transform .15s, border-color .15s;
    display: flex; flex-direction: column; justify-content: center;
}
.sc-funnel-step:hover { transform: translateY(-2px); border-color: rgba(255,255,255,.25); }
.sc-funnel-step .n {
    font-family: 'Bebas Neue', var(--sc-font); font-size: 1.9rem; line-height: 1;
    color: #fff; font-variant-numeric: tabular-nums;
}
.sc-funnel-step .l {
    font-size: .66rem; letter-spacing: .14em; text-transform: uppercase;
    color: rgba(255,255,255,.85); font-weight: 700; margin-top: .15rem;
}
.sc-funnel-step.f1 { background: linear-gradient(135deg, var(--red), var(--red-deep)); }
.sc-funnel-step.f2 { background: linear-gradient(135deg, rgba(234,17,25,.75), rgba(158,11,18,.75)); }
.sc-funnel-step.f3 { background: linear-gradient(135deg, rgba(234,17,25,.5), rgba(158,11,18,.5)); }
.sc-funnel-step.win { background: linear-gradient(135deg, #22c55e, #15803d); }
.sc-funnel-arrow { display: flex; align-items: center; color: var(--muted); font-size: 1.1rem; }
.sc-funnel-lost {
    align-self: center; text-decoration: none; margin-left: auto;
    color: var(--muted); font-size: .8rem; font-weight: 700;
    border: 1px dashed var(--line-2, var(--line)); border-radius: 20px; padding: .35rem .8rem;
}
.sc-funnel-lost:hover { color: var(--text); border-color: var(--muted); }
@media (max-width: 720px) { .sc-funnel-arrow { display: none; } .sc-funnel-lost { margin-left: 0; } }

/* --- Linea de tiempo del historial de membresia --- */
.sc-timeline { list-style: none; margin: 0; padding: 0; }
.sc-timeline li {
    position: relative; padding: .45rem 0 .45rem 18px;
    border-left: 2px solid var(--line); margin-left: 6px;
    display: flex; flex-direction: column; gap: 2px;
}
.sc-timeline li::before {
    content: ""; position: absolute; left: -5px; top: .85rem;
    width: 8px; height: 8px; border-radius: 50%; background: var(--red);
}
.sc-tl-fecha { font-size: .72rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.sc-tl-motivo { font-size: .78rem; color: var(--muted); }

/* --- Agenda semanal de clases --- */
.sc-agenda { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; }
.sc-agenda-dia { background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px; padding: .8rem; }
.sc-agenda-diahead {
    font-family: 'Bebas Neue', var(--sc-font); font-size: 1.25rem; letter-spacing: .06em;
    color: var(--text); margin-bottom: .6rem; display: flex; justify-content: space-between; align-items: baseline;
}
.sc-sesion {
    display: flex; align-items: center; gap: .6rem;
    background: var(--panel); border: 1px solid var(--line); border-radius: 10px;
    padding: .55rem .7rem; margin-bottom: .5rem; transition: border-color .15s;
}
.sc-sesion:hover { border-color: rgba(234, 17, 25, .5); }
.sc-sesion.llena { opacity: .65; }
.sc-sesion-hora {
    font-family: 'Bebas Neue', var(--sc-font); font-size: 1.15rem; color: var(--red-bright);
    min-width: 48px; font-variant-numeric: tabular-nums;
}
.sc-sesion-info { flex: 1; min-width: 0; }
.sc-sesion-cupo { display: flex; align-items: center; gap: .3rem; }

/* --- Logo del login (badge blanco circular) --- */
.sc-login-logo {
    width: 84px;
    height: 84px;
    margin: 0 auto 1.1rem;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 10px 26px rgba(234, 17, 25, .35), 0 0 0 1px rgba(255, 255, 255, .1);
    display: flex;
    align-items: center;
    justify-content: center;
}
.sc-login-logo img { width: 76px; height: 76px; object-fit: contain; }
.sc-login-tag {
    display: inline-block;
    margin-top: .35rem;
    font-size: .72rem;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--red-bright);
    font-weight: 700;
}

/* ============================================================
   PORTAL DEL SOCIO (vista movil-primero, marca oscura)
   ============================================================ */
.sc-portal-body {
    min-height: 100vh;
    margin: 0;
    background: var(--sc-bg);
    color: var(--sc-text);
    font-family: var(--sc-font);
    display: flex;
    flex-direction: column;
}

.sc-portal-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .85rem 1.1rem;
    background: var(--sc-navy);
    border-bottom: 1px solid var(--sc-border);
    position: sticky;
    top: 0;
    z-index: 10;
}

.sc-portal-brand img { height: 30px; }

.sc-portal-out {
    background: transparent;
    border: 1px solid var(--sc-border);
    color: var(--sc-muted);
    border-radius: 8px;
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    transition: color .15s, border-color .15s;
}
.sc-portal-out:hover { color: #EA1119; border-color: #EA1119; }

.sc-portal-main {
    width: 100%;
    max-width: 520px;
    margin: 0 auto;
    padding: 1.1rem 1rem 2rem;
    flex: 1;
}

.sc-portal-foot {
    text-align: center;
    color: var(--sc-muted);
    font-size: .72rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    padding: 1rem 0 1.4rem;
}

.sc-portal-hola {
    display: flex;
    align-items: center;
    gap: .9rem;
    margin-bottom: 1.1rem;
}
.sc-portal-hola-nombre {
    font-family: 'Bebas Neue', var(--sc-font);
    font-size: 1.7rem;
    letter-spacing: .04em;
    line-height: 1.1;
}
.sc-portal-hola-cve { color: var(--sc-muted); font-size: .82rem; }

.sc-portal-card {
    background: var(--sc-navy-2);
    border: 1px solid var(--sc-border);
    border-radius: 14px;
    padding: 1.05rem 1.1rem;
    margin-bottom: .9rem;
}

.sc-portal-hero { border-top: 3px solid #EA1119; }

.sc-portal-lbl {
    font-size: .68rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--sc-muted);
}

.sc-portal-plan {
    font-family: 'Bebas Neue', var(--sc-font);
    font-size: 1.65rem;
    letter-spacing: .04em;
    line-height: 1.15;
}

.sc-portal-hero-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: .5rem;
    margin-top: .9rem;
    padding-top: .9rem;
    border-top: 1px dashed var(--sc-border);
}

.sc-portal-dato {
    font-size: .92rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.sc-portal-pill {
    display: inline-block;
    padding: .28rem .7rem;
    border-radius: 999px;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .04em;
    white-space: nowrap;
}
.sc-portal-pill.ok     { background: rgba(57, 217, 138, .12); color: #39d98a; }
.sc-portal-pill.frio   { background: rgba(96, 165, 250, .12); color: #60a5fa; }
.sc-portal-pill.mal    { background: rgba(234, 17, 25, .14);  color: #ff5b62; }
.sc-portal-pill.neutro { background: rgba(154, 154, 162, .12); color: var(--sc-muted); }

/* QR: siempre sobre blanco para que el lector lo tome a la primera */
.sc-portal-qr {
    display: inline-block;
    background: #fff;
    padding: 10px;
    border-radius: 12px;
    line-height: 0;
}
.sc-portal-qr img { display: block; }

.sc-portal-qr-cve {
    font-family: 'Bebas Neue', var(--sc-font);
    font-size: 1.25rem;
    letter-spacing: .18em;
    margin-top: .55rem;
}

.sc-portal-lista {
    list-style: none;
    margin: .7rem 0 .5rem;
    padding: 0;
}
.sc-portal-lista li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: .75rem;
    padding: .5rem 0;
    border-bottom: 1px dashed var(--sc-border);
    font-size: .88rem;
}
.sc-portal-lista li:last-child { border-bottom: none; }

.sc-portal-monto { font-weight: 700; font-variant-numeric: tabular-nums; color: #ff5b62; }
.sc-portal-fecha { color: var(--sc-muted); font-size: .78rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.sc-portal-vacio { color: var(--sc-muted); font-size: .82rem; margin-top: .5rem; }

/* Portal: reservas de clases */
.sc-portal-back {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    color: var(--sc-muted);
    text-decoration: none;
    font-size: .82rem;
}
.sc-portal-back:hover { color: #EA1119; }

.sc-portal-aviso {
    display: flex;
    align-items: center;
    gap: .55rem;
    border-radius: 10px;
    padding: .65rem .85rem;
    font-size: .84rem;
    margin-bottom: .9rem;
}
.sc-portal-aviso.ok  { background: rgba(57, 217, 138, .1);  color: #39d98a; border: 1px solid rgba(57, 217, 138, .25); }
.sc-portal-aviso.mal { background: rgba(234, 17, 25, .1);   color: #ff5b62; border: 1px solid rgba(234, 17, 25, .3); }

.sc-portal-btn {
    background: #EA1119;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: .42rem .85rem;
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .03em;
    text-decoration: none;
    white-space: nowrap;
    transition: filter .15s;
}
.sc-portal-btn:hover { filter: brightness(1.12); color: #fff; }

.sc-portal-btn-sec {
    background: transparent;
    color: var(--sc-muted);
    border: 1px solid var(--sc-border);
    border-radius: 8px;
    padding: .38rem .75rem;
    font-size: .76rem;
    white-space: nowrap;
    transition: color .15s, border-color .15s;
}
.sc-portal-btn-sec:hover { color: #ff5b62; border-color: #ff5b62; }

/* Pestanas oscuras (pantalla Staff) */
.sc-tabs { border-bottom: 1px solid var(--sc-border); }
.sc-tabs .nav-link {
    color: var(--sc-muted);
    border: none;
    border-bottom: 2px solid transparent;
    background: transparent;
    padding: .6rem 1rem;
    font-weight: 600;
    font-size: .88rem;
}
.sc-tabs .nav-link:hover { color: var(--sc-text); border-color: var(--sc-border); }
.sc-tabs .nav-link.active {
    color: #fff;
    background: transparent;
    border-bottom: 2px solid #EA1119;
}

.sc-panel-title { font-weight: 700; font-size: .95rem; color: var(--sc-text); }

/* Checkout de la pasarela simulada */
.sc-pay-test {
    display: inline-block;
    margin-left: .45rem;
    padding: .12rem .5rem;
    border-radius: 6px;
    background: rgba(245, 158, 11, .15);
    color: #f59e0b;
    font-size: .62rem;
    font-weight: 800;
    letter-spacing: .1em;
    vertical-align: 1px;
}

.sc-pay-monto {
    font-family: 'Bebas Neue', var(--sc-font);
    font-size: 1.9rem;
    line-height: 1;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.sc-pay-lbl {
    display: block;
    font-size: .72rem;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--sc-muted);
    margin-bottom: .3rem;
}

.sc-pay-field { position: relative; }

.sc-pay-input {
    width: 100%;
    background: var(--sc-navy);
    border: 1px solid var(--sc-border);
    border-radius: 10px;
    color: var(--sc-text);
    padding: .7rem .9rem;
    font-size: .95rem;
    font-variant-numeric: tabular-nums;
    transition: border-color .15s, box-shadow .15s;
}
.sc-pay-input:focus {
    outline: none;
    border-color: #EA1119;
    box-shadow: 0 0 0 3px rgba(234, 17, 25, .18);
}

.sc-pay-brand {
    position: absolute;
    right: .8rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--sc-muted);
    font-size: .8rem;
    font-weight: 800;
    letter-spacing: .06em;
}

.sc-pay-btn {
    width: 100%;
    margin-top: 1.1rem;
    background: #EA1119;
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: .8rem;
    font-weight: 800;
    font-size: 1rem;
    letter-spacing: .03em;
    transition: filter .15s;
}
.sc-pay-btn:hover { filter: brightness(1.12); }
.sc-pay-btn:disabled { opacity: .7; }

.sc-pay-nota {
    margin: .8rem 0 0;
    color: var(--sc-muted);
    font-size: .74rem;
    text-align: center;
}
.sc-pay-nota code { color: #f59e0b; }

/* Estado de exito */
.sc-pay-ok { border-top: 3px solid #39d98a; }
.sc-pay-check {
    width: 74px;
    height: 74px;
    margin: .4rem auto .9rem;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: rgba(57, 217, 138, .12);
    color: #39d98a;
    font-size: 2.4rem;
    animation: sc-pay-pop .45s cubic-bezier(.2, 1.6, .4, 1);
}
@keyframes sc-pay-pop {
    0% { transform: scale(.3); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}
.sc-pay-titulo {
    font-family: 'Bebas Neue', var(--sc-font);
    font-size: 1.8rem;
    letter-spacing: .05em;
    margin: 0;
}
.sc-pay-folio {
    margin-top: .8rem;
    font-size: .8rem;
    color: var(--sc-muted);
    letter-spacing: .12em;
    font-variant-numeric: tabular-nums;
}

/* Inscripcion en linea: selector de planes */
.sc-ins-planes {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: .6rem;
    margin-bottom: .9rem;
}
.sc-ins-plan {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: .2rem;
    align-items: center;
    text-align: center;
    background: var(--sc-navy-2);
    border: 1px solid var(--sc-border);
    border-radius: 12px;
    padding: .8rem .4rem;
    cursor: pointer;
    transition: border-color .15s, transform .15s;
}
.sc-ins-plan:hover { border-color: #EA1119; }
.sc-ins-plan.sel { border-color: #EA1119; box-shadow: 0 0 0 3px rgba(234, 17, 25, .15); }
.sc-ins-plan input { position: absolute; opacity: 0; pointer-events: none; }
.sc-ins-plan-nombre {
    font-family: 'Bebas Neue', var(--sc-font);
    font-size: 1.05rem;
    letter-spacing: .05em;
    line-height: 1.1;
}
.sc-ins-plan-precio { font-weight: 800; font-size: .95rem; font-variant-numeric: tabular-nums; }
.sc-ins-plan-precio small { color: var(--sc-muted); font-weight: 600; }

/* Beneficios de plan: chips en el catalogo */
.sc-benef-count {
    font-size: .68rem;
    font-weight: 800;
    margin-left: 2px;
    vertical-align: 2px;
}
.sc-benef-chip {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    background: var(--sc-navy);
    border: 1px solid var(--sc-border);
    border-radius: 999px;
    padding: .3rem .4rem .3rem .7rem;
    font-size: .82rem;
}
.sc-benef-x {
    background: transparent;
    border: none;
    color: var(--sc-muted);
    font-size: 1rem;
    line-height: 1;
    padding: 0 .3rem;
    border-radius: 50%;
}
.sc-benef-x:hover { color: #ff5b62; }

/* Inscripcion: lista "tu plan incluye" */
.sc-ins-benef {
    list-style: none;
    margin: .8rem 0 0;
    padding: .8rem 0 0;
    border-top: 1px dashed var(--sc-border);
    display: grid;
    gap: .35rem;
}
.sc-ins-benef li { font-size: .84rem; color: var(--sc-text); }
.sc-ins-benef li i { color: #39d98a; margin-right: .4rem; }

/* QR mini en la ficha (siempre sobre blanco para el lector) */
.sc-qr-mini { background: #fff; padding: 5px; border-radius: 8px; display: inline-block; line-height: 0; }
.sc-qr-mini img { display: block; }

/* ============================================================
   CRM KANBAN
   ============================================================ */
.sc-kanban {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: .9rem;
    align-items: start;
}
.sc-kanban-col {
    background: var(--sc-navy-2);
    border: 1px solid var(--sc-border);
    border-radius: 12px;
    padding: .75rem;
    min-height: 320px;
    transition: border-color .15s, background .15s;
}
.sc-kanban-col.destino { border-color: #EA1119; background: #1a1a21; }
.sc-kanban-col.fijo { opacity: .96; }

.sc-kanban-head {
    display: flex;
    align-items: center;
    gap: .45rem;
    font-weight: 800;
    font-size: .82rem;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--sc-text);
    padding: 0 .2rem .6rem;
    border-bottom: 1px dashed var(--sc-border);
    margin-bottom: .6rem;
}
.sc-kanban-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--col, #9a9aa2); }
.sc-kanban-count { color: var(--sc-muted); font-weight: 700; }
.sc-kanban-head .bi-lock-fill { color: var(--sc-muted); font-size: .78rem; }

.sc-kanban-cards { display: grid; gap: .55rem; min-height: 40px; }
.sc-kanban-card {
    background: var(--sc-navy);
    border: 1px solid var(--sc-border);
    border-left: 3px solid #EA1119;
    border-radius: 10px;
    padding: .6rem .7rem;
    font-size: .85rem;
    cursor: grab;
    transition: transform .12s, border-color .12s, opacity .12s;
}
.sc-kanban-card:hover { transform: translateY(-2px); border-color: #3a3a44; }
.sc-kanban-card.en-vuelo { opacity: .45; transform: rotate(2deg) scale(.98); }
.sc-kanban-card.bloqueada { cursor: default; border-left-color: #39d98a; }

.sc-kanban-meta {
    display: flex;
    flex-wrap: wrap;
    gap: .25rem .7rem;
    color: var(--sc-muted);
    font-size: .74rem;
    margin-top: .25rem;
}
.sc-kanban-fecha {
    display: inline-block;
    margin-top: .35rem;
    font-size: .72rem;
    color: var(--sc-muted);
    font-variant-numeric: tabular-nums;
}
.sc-kanban-fecha.vencido { color: #ff5b62; font-weight: 700; }

@media (max-width: 1200px) { .sc-kanban { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px)  { .sc-kanban { grid-template-columns: 1fr; } }

/* Foto del socio — protagonista de la ficha (junta 15/jul: "arriba y mas grande") */
.sc-foto-wrap { position: relative; display: inline-block; }
.sc-foto-socio {
    width: 128px; height: 128px; border-radius: 18px; object-fit: cover;
    border: 2px solid #EA1119; display: block;
    box-shadow: 0 10px 26px rgba(0,0,0,.45);
}
.sc-avatar-ini.sc-avatar-xl { width: 128px; height: 128px; font-size: 2.4rem; border-radius: 18px; }
.sc-foto-btn {
    position: absolute; right: -6px; bottom: -6px;
    width: 34px; height: 34px; border-radius: 50%;
    background: #EA1119; color: #fff; display: grid; place-items: center;
    font-size: .95rem; cursor: pointer; border: 2px solid var(--sc-bg);
    transition: filter .15s;
}
.sc-foto-btn:hover { filter: brightness(1.15); }

/* Widget de captura de foto (archivo / camara / pegar) con vista previa de tamano fijo */
.sc-fcap-prev {
    width: 128px; height: 128px; border-radius: 14px; overflow: hidden; flex: 0 0 128px;
    border: 1px dashed var(--line, #2c3448); background: rgba(255,255,255,.03);
    display: grid; place-items: center; position: relative;
}
.sc-fcap-prev img { width: 100%; height: 100%; object-fit: cover; display: none; }
.sc-fcap-prev.sc-foto-ok img { display: block; }
.sc-fcap-prev.sc-foto-ok .sc-fcap-vacio { display: none; }
.sc-fcap-vacio { color: var(--muted, #8a93a8); font-size: 2rem; }
.sc-fcap-cam video { width: 100%; max-width: 380px; border-radius: 12px; border: 1px solid var(--line, #2c3448); display: block; }

/* Credencial digital del socio */
.sc-cred {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 1rem;
    align-items: center;
    background: linear-gradient(120deg, #0c0c11 0%, #16161c 100%);
    border: 1px solid var(--sc-border);
    border-left: 4px solid #EA1119;
    border-radius: 14px;
    padding: 1rem 1.1rem;
}
.sc-cred-foto img {
    width: 74px; height: 74px; border-radius: 12px; object-fit: cover;
    border: 2px solid #EA1119;
}
.sc-cred-logo { height: 20px; width: auto; margin-bottom: .35rem; opacity: .95; }
.sc-cred-nombre { font-family: 'Bebas Neue', var(--sc-font); font-size: 1.35rem; letter-spacing: .05em; line-height: 1.05; }
.sc-cred-folio { color: #EA1119; font-weight: 800; letter-spacing: .18em; font-size: .85rem; }
.sc-cred-plan { color: var(--sc-muted); font-size: .78rem; margin-top: .15rem; }
.sc-cred-qr { text-align: center; }

/* Aforo por zona en vivo */
.sc-aforo { display: inline-flex; flex-direction: column; align-items: center; gap: .25rem; min-width: 74px; }
.sc-aforo-num { font-weight: 800; font-variant-numeric: tabular-nums; font-size: .88rem; }
.sc-aforo-bar { width: 74px; height: 5px; border-radius: 99px; background: var(--sc-border); overflow: hidden; }
.sc-aforo-bar i { display: block; height: 100%; border-radius: 99px; }

/* Mapa de calor de ocupacion (Reportes) */
.sc-heat { border-collapse: separate; border-spacing: 3px; width: 100%; }
.sc-heat th {
    font-size: .68rem; color: var(--sc-muted); font-weight: 700;
    text-align: center; padding: 2px 1px; white-space: nowrap;
    font-variant-numeric: tabular-nums;
}
.sc-heat tbody th { text-align: right; padding-right: 8px; max-width: 130px; overflow: hidden; text-overflow: ellipsis; }
.sc-heat td { padding: 0; }
.sc-heat-cell {
    display: grid; place-items: center;
    min-width: 26px; height: 26px; border-radius: 5px;
    background: var(--sc-navy-2);
    font-size: .66rem; font-weight: 700; color: #fff;
    font-variant-numeric: tabular-nums;
}
