/* Estilos personalizados sobre Bootstrap */
/* Quicksand moderna (variable 300–700), archivos locales de frontend/fuentes */
@font-face {
    font-family: "Quicksand";
    font-weight: 300 700;
    font-style: normal;
    font-display: swap;
    src: url("./fuentes/6xKtdSZaM9iE8KbpRA_hJFQNcOM.woff2") format("woff2");
    unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
@font-face {
    font-family: "Quicksand";
    font-weight: 300 700;
    font-style: normal;
    font-display: swap;
    src: url("./fuentes/6xKtdSZaM9iE8KbpRA_hJVQNcOM.woff2") format("woff2");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: "Quicksand";
    font-weight: 300 700;
    font-style: normal;
    font-display: swap;
    src: url("./fuentes/6xKtdSZaM9iE8KbpRA_hK1QN.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* Alias heredado */
@font-face {
    font-family: fuenteRandom;
    font-weight: 300 700;
    src: url("./fuentes/6xKtdSZaM9iE8KbpRA_hK1QN.woff2") format("woff2");
}

/* ── Paleta Deportiva (azul noche + lima eléctrico) ───────────────────────── */
:root {
    --primary:          #0B1B3A;
    --primary-dark:     #06112B;
    --primary-rgb:      11, 27, 58;
    --accent:           #B6FF3B;
    --accent-dark:      #7DB800;
    --accent-rgb:       182, 255, 59;
    --primary-light:    #EEF3FF;

    /* Override Bootstrap 5.3 CSS vars */
    --bs-primary:           #0B1B3A;
    --bs-primary-rgb:       11, 27, 58;
    --bs-link-color:        #0B1B3A;
    --bs-link-hover-color:  #06112B;
    --bs-border-radius:     10px;
}

/* Override Bootstrap components */
.btn-primary {
    --bs-btn-bg:                 #0B1B3A;
    --bs-btn-border-color:       #0B1B3A;
    --bs-btn-hover-bg:           #06112B;
    --bs-btn-hover-border-color: #06112B;
    --bs-btn-active-bg:          #06112B;
    --bs-btn-active-border-color:#06112B;
    --bs-btn-disabled-bg:        #0B1B3A;
    --bs-btn-disabled-border-color:#0B1B3A;
}
.btn-outline-primary {
    --bs-btn-color:              #0B1B3A;
    --bs-btn-border-color:       #0B1B3A;
    --bs-btn-hover-bg:           #0B1B3A;
    --bs-btn-hover-color:        #fff;
    --bs-btn-hover-border-color: #0B1B3A;
    --bs-btn-active-bg:          #06112B;
    --bs-btn-active-border-color:#06112B;
    --bs-btn-active-color:       #fff;
}
.text-primary   { color: #0B1B3A !important; }
.border-primary { border-color: #0B1B3A !important; }
.bg-primary     { background-color: #0B1B3A !important; }
.badge.text-bg-primary { background-color: #0B1B3A !important; }
a { color: #0B1B3A; }
a:hover { color: #06112B; }

body {
    background-color: #f3f4f8;
    font-family: "Quicksand", fuenteRandom, system-ui, sans-serif;
}

#app-container.container {
    max-width: 500px;
    margin: 0 auto;
    padding-bottom: 100px;
}
@media (min-width:768px)  { #app-container.container { max-width: 740px; } }
@media (min-width:992px)  { #app-container.container { max-width: 980px; } }
@media (min-width:1400px) { #app-container.container { max-width: 1360px; } }

/* Grilla estándar de listas de tarjetas: móvil 1 · tablet 2 · laptop 3 · PC 4 */
.grid-cards { display: grid; grid-template-columns: 1fr; gap: .75rem; align-items: start; }
@media (min-width:768px)  { .grid-cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width:992px)  { .grid-cards { grid-template-columns: repeat(3, 1fr); } }
@media (min-width:1400px) { .grid-cards { grid-template-columns: repeat(4, 1fr); } }
.grid-cards > .card { margin: 0 !important; }
.grid-cards > :not(.card) { grid-column: 1 / -1; }

/* Header */
.header {
    background: linear-gradient(135deg, #0B1B3A 0%, #06112B 100%);
    color: white;
    padding: 1rem;
    text-align: center;
    position: relative;
    box-shadow: 0 2px 14px rgba(11,27,58,0.40);
}
.header h1 {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
}
.header i {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2rem;
}
.header .back-btn { left: 1rem; color: white; cursor: pointer; }
.header .menu-btn { right: 1rem; color: white; cursor: pointer; }

/* Tarjetas */
.card {
    border: none;
    border-radius: 16px;
    margin: 10px 0;
    box-shadow: 0 2px 12px rgba(0,0,0,0.07);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.card:hover {
    box-shadow: 0 6px 24px rgba(0,0,0,0.12);
    transform: translateY(-2px);
}
.card-header {
    background: transparent;
    border-bottom: 1px solid rgba(0,0,0,0.06);
    font-weight: 600;
    border-radius: 16px 16px 0 0 !important;
}

.avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--accent);
}

.titulo    { font-weight: bold; }
.cantidad  { font-size: 15px; }
.cursor    { cursor: pointer; }
.oculto    { display: none !important; }

.fs-7 { font-size: 13px; }
.fs-8 { font-size: 11px; }

/* Tab bar fija */
.tab-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: white;
    border-top: none;
    display: flex;
    flex-direction: column;
    z-index: 1000;
    box-shadow: 0 -2px 20px rgba(0,0,0,0.08);
}
.sucursal-bar {
    width: 100%;
    text-align: center;
    padding: 3px 8px;
    font-size: 11px;
    color: #6c757d;
    background: #f8f9fa;
    border-bottom: 1px solid #eee;
}
.tab-row { display: flex; width: 100%; }
.tab-item {
    flex: 1;
    text-align: center;
    padding: 10px 0 12px;
    color: #777;
    font-size: 13px;
    transition: color 0.25s;
    position: relative;
    cursor: pointer;
}
.tab-item.active {
    color: var(--primary);
    font-weight: 600;
}
.tab-item.active::before {
    content: '';
    display: block;
    width: 56px;
    height: 32px;
    background: rgba(var(--primary-rgb), 0.10);
    border-radius: 50px;
    position: absolute;
    top: 5px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 0;
}
.tab-item i {
    font-size: 20px;
    display: block;
    margin-bottom: 3px;
    position: relative;
    z-index: 1;
}

/* Modales */
.modal-content {
    border-radius: 24px;
    overflow: hidden;
    border: none;
    box-shadow: 0 8px 40px rgba(0,0,0,0.18);
}
.modal-header {
    border-bottom: none;
    padding: 24px 24px 10px;
}
.modal-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #222;
}
.close-modal { font-size: 1.5rem; color: #666; opacity: 1; }
.modal-body  { padding: 10px 24px 16px; text-align: center; }
.modal-footer {
    border-top: none;
    padding: 8px 24px 24px;
    justify-content: center;
    gap: 0.75rem;
}
.modal-footer .btn { min-width: 90px; }

/* Formularios */
.form-control {
    border-radius: 10px;
    padding: 12px;
    font-size: 16px;
}
.form-label {
    font-weight: 600;
    color: #555;
    font-size: 12px !important;
    padding: 0;
    margin: 0;
}
.btn-block { width: 100%; }

/* ── Android / Material Design inputs ────────────────────────────────── */
.android-input.form-floating { position: relative; }
.android-input.form-floating > .form-control,
.android-input.form-floating > .form-select {
    background-color: transparent !important;
    border: none;
    border-bottom: 2px solid #d0d0d0;
    border-radius: 0;
    padding-left: 0.25rem;
    padding-right: 0.25rem;
    font-size: 15px;
    box-shadow: none !important;
    transition: border-color 0.25s ease;
    color: #222;
}
.android-input.form-floating > .form-control:focus,
.android-input.form-floating > .form-select:focus {
    border-bottom-color: var(--primary);
    background-color: transparent !important;
    outline: none;
}
.android-input.form-floating > label {
    padding-left: 0.25rem;
    padding-right: 0.25rem;
    color: #999;
    font-size: 14px;
    font-weight: 400;
}
.android-input.form-floating > .form-control:focus ~ label,
.android-input.form-floating > .form-control:not(:placeholder-shown) ~ label,
.android-input.form-floating > .form-select ~ label {
    color: var(--primary);
    font-weight: 600;
    opacity: 1;
}

/* Estrella de requerido */
.req-star { color: #dc3545; font-size: 10px; }

/* Ripple: borde que se expande al enfocar */
.android-input.form-floating::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.25s ease, left 0.25s ease;
    pointer-events: none;
    z-index: 1;
}
.android-input.form-floating:focus-within::after {
    width: 100%;
    left: 0;
}

/* Estados de validación */
.android-input.form-floating > .form-control.is-valid,
.android-input.form-floating > .form-control.is-invalid {
    background-image: none !important;
}
.android-input.form-floating > .form-control.is-valid   { border-bottom-color: #198754 !important; }
.android-input.form-floating > .form-control.is-invalid { border-bottom-color: #dc3545 !important; }
.android-input.form-floating:has(.is-valid)::after    { background: #198754; }
.android-input.form-floating:has(.is-invalid)::after  { background: #dc3545; }
.android-input.form-floating:has(.is-valid) > label   { color: #198754; }
.android-input.form-floating:has(.is-invalid) > label { color: #dc3545; }
.android-input.form-floating:has(.is-valid):focus-within::after,
.android-input.form-floating:has(.is-invalid):focus-within::after { width: 0 !important; }

/* Calendario */
#app-container { position: relative; }
#app-container .datepicker {
    position: absolute !important;
    left: 50% !important;
    top: 200px !important;
    transform: translate(-50%, -50%) !important;
    z-index: 1050;
}
.datepicker-days,.datepicker-months,.datepicker-years,.datepicker-decades,.datepicker-centuries { width: 300px; }
.datepicker-days table tr td,
.datepicker-months table tr td,
.datepicker-years table tr td,
.datepicker-decades table tr td,
.datepicker-centuries table tr td { width: 300px; }

/* ── Material Design 3 / Android — overrides globales ─────────────────── */

/* Botones */
.btn {
    border-radius: 50px;
    font-weight: 600;
    letter-spacing: 0;
    padding: 0.5rem 1.4rem;
    transition: box-shadow 0.2s ease, transform 0.15s ease;
    position: relative;
    overflow: hidden;
}
.btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0);
    transition: background 0.25s;
    pointer-events: none;
    border-radius: inherit;
}
.btn:active::after { background: rgba(255,255,255,0.22); }

.btn-primary  { box-shadow: 0 2px 8px rgba(var(--primary-rgb),0.30); border: none; }
.btn-primary:hover  { box-shadow: 0 4px 16px rgba(var(--primary-rgb),0.40); transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }

.btn-danger  { box-shadow: 0 2px 8px rgba(220,53,69,0.25); border: none; }
.btn-danger:hover  { box-shadow: 0 4px 16px rgba(220,53,69,0.35); transform: translateY(-1px); }
.btn-danger:active { transform: translateY(0); }

.btn-success { box-shadow: 0 2px 8px rgba(25,135,84,0.25); border: none; }
.btn-success:hover  { box-shadow: 0 4px 16px rgba(25,135,84,0.35); transform: translateY(-1px); }
.btn-success:active { transform: translateY(0); }

.btn-secondary { border: none; }
.btn-link      { text-decoration: none !important; color: var(--primary); }
.btn-link:hover { color: var(--primary-dark); }

.btn-sm { border-radius: 50px; padding: 0.3rem 0.75rem; font-size: 0.8rem; }

.btn-outline-primary:hover { box-shadow: 0 2px 10px rgba(var(--primary-rgb),0.20); }
.btn-outline-danger:hover  { box-shadow: 0 2px 10px rgba(220,53,69,0.20); }

/* Badges */
.badge {
    border-radius: 50px;
    padding: 0.35em 0.8em;
    font-weight: 600;
    font-size: 0.72em;
    letter-spacing: 0;
}

/* Offcanvas */
.offcanvas-end { box-shadow: -4px 0 30px rgba(0,0,0,0.12); }
.offcanvas-header { border-bottom: 1px solid #f0f0f0; padding: 20px 20px 14px; }
.offcanvas-title  { font-size: 1.1rem; font-weight: 700; }

/* Form-select standalone */
.form-select {
    border-radius: 10px;
    border: 1.5px solid #dee2e6;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb),0.10);
}

/* Input groups */
.input-group > .form-control,
.input-group > .form-select { border: 1.5px solid #dee2e6; }
.input-group > .form-control:focus,
.input-group > .form-select:focus { border-color: var(--primary); box-shadow: none; z-index: 3; }

/* Scrollbar estilo Android */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #ccc; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #aaa; }

/* ── Botones de acción circulares ────────────────────────────────────── */
.btn-icon {
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: 50% !important;
    border: 1.5px solid;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    cursor: pointer;
    transition: background 0.18s, color 0.18s, transform 0.15s;
    background: transparent;
    flex-shrink: 0;
    line-height: 1;
}
.btn-icon:hover  { transform: scale(1.12); }
.btn-icon:active { transform: scale(0.93); }
.btn-icon:disabled { opacity: 0.35; cursor: not-allowed; }
.btn-icon:disabled:hover { transform: none; }
.btn-icon-primary   { border-color: var(--primary); color: var(--primary); }
.btn-icon-primary:hover   { background: var(--primary); color: #fff; }
.btn-icon-danger    { border-color: #dc3545; color: #dc3545; }
.btn-icon-danger:hover    { background: #dc3545; color: #fff; }
.btn-icon-warning   { border-color: #ffc107; color: #b07e00; }
.btn-icon-warning:hover   { background: #ffc107; color: #fff; }
.btn-icon-success   { border-color: #198754; color: #198754; }
.btn-icon-success:hover   { background: #198754; color: #fff; }
.btn-icon-info      { border-color: #0dcaf0; color: #0aa0c0; }
.btn-icon-info:hover      { background: #0dcaf0; color: #fff; }
.btn-icon-secondary { border-color: #6c757d; color: #6c757d; }
.btn-icon-secondary:hover { background: #6c757d; color: #fff; }
.btn-icon-teal      { border-color: #20c997; color: #20c997; }
.btn-icon-teal:hover      { background: #20c997; color: #fff; }

/* FAB — botón circular fijo inferior derecho */
.fab {
    position: fixed;
    bottom: 92px;
    right: 16px;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    padding: 0;
    font-size: 1.4rem;
    z-index: 99;
    box-shadow: 0 4px 16px rgba(11, 27, 58, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* FAB secundario — botón circular fijo, a la izquierda del FAB principal (ej. "producto libre" en Vender) */
.fab-secundario {
    position: fixed;
    bottom: 92px;
    right: 78px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    padding: 0;
    font-size: 1.1rem;
    z-index: 99;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Badge de conteo sobre un FAB (ej. cantidad de items en el carrito) */
.fab-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    font-size: 0.65rem;
    padding: 0.25em 0.5em;
}

/* Pill de categoría/método de pago seleccionable (Vender) */
.pill-categoria, .pill-metodo-pago { padding: 0.5em 1em; font-size: 0.8rem; }

/* ── Avatars ─────────────────────────────────────────────────────────────── */
.avatar-sm { width:52px; height:52px; border-radius:50%; object-fit:cover; border:2px solid #e2e8f0; flex-shrink:0; }
.avatar-md { width:48px; height:48px; border-radius:50%; object-fit:cover; border:2px solid #e2e8f0; flex-shrink:0; }
.avatar-lg { width:90px; height:90px; border-radius:50%; object-fit:cover; border:3px solid rgba(255,255,255,0.85); box-shadow:0 4px 16px rgba(0,0,0,0.20); }
.avatar-login { width:86px; height:86px; border-radius:50%; object-fit:cover; border:3px solid rgba(255,255,255,0.85); box-shadow:0 4px 20px rgba(0,0,0,0.20); margin-bottom:14px; }
.avatar-profile { width:100px; height:100px; border-radius:50%; object-fit:cover; border:3px solid rgba(255,255,255,0.8); box-shadow:0 4px 16px rgba(0,0,0,0.2); }
.avatar-40 { width:40px; height:40px; border-radius:50%; object-fit:cover; border:2px solid #dee2e6; flex-shrink:0; }

/* ── Login header ────────────────────────────────────────────────────────── */
.login-header { background:linear-gradient(150deg,#0B1B3A 0%,#102A5C 55%,#06112B 100%); border-radius:0 0 36px 36px; margin:-1px -12px 0; }
.cp-dep-badge, .cp-cat-badge { font-size:11px; font-weight:700; letter-spacing:.2px; padding:.38em .7em; border-radius:999px; color:#fff; }
.cp-dep-badge { box-shadow:0 2px 6px rgba(0,0,0,.18); }
.cp-cat-badge.bg-light { color:#0B1B3A !important; }

/* Listas con scroll vertical invisible: alto según la pantalla (mínimo 320px) */
.scroll-oculto { max-height:max(320px, calc(100vh - 330px)); overflow-y:auto; scrollbar-width:none; -ms-overflow-style:none; }
.scroll-oculto::-webkit-scrollbar { display:none; }

/* Login: fondo decorativo de iconos deportivos */
.login-bg { position:fixed; inset:0; overflow:hidden; pointer-events:none; z-index:0;
    background:radial-gradient(circle at 18% 22%, rgba(182,255,59,.10), transparent 42%), radial-gradient(circle at 85% 80%, rgba(16,42,92,.08), transparent 45%); }
.login-bg i { position:absolute; color:#0B1B3A; opacity:.05; transform:rotate(var(--rot,0deg)); animation:loginFlota 9s ease-in-out infinite; }
.login-bg i:nth-child(3n) { color:#5E9C00; opacity:.08; }
@keyframes loginFlota { 0%,100% { transform:translateY(0) rotate(var(--rot,0deg)); } 50% { transform:translateY(-14px) rotate(calc(var(--rot,0deg) + 8deg)); } }
@media (max-width:575px) { .login-bg i:nth-child(n+8) { display:none; } }
@media (prefers-reduced-motion:reduce) { .login-bg i { animation:none; } }
.login-box { position:relative; z-index:1; }
/* Login: caja centrada de ancho acotado en pantallas grandes */
.login-box { width:100%; max-width:420px; margin:0 auto; }
@media (min-width:576px) {
    .login-box { margin-top:7vh; border-radius:28px; box-shadow:0 18px 50px rgba(11,27,58,.18); background:#fff; overflow:hidden; }
    .login-box .login-header { margin:0; border-radius:0 0 36px 36px; }
}
.gradient-header { background:linear-gradient(135deg,#0B1B3A 0%,#06112B 100%); }
.login-empresa { font-size:1.15rem; letter-spacing:0.5px; }
.login-tagline { color:rgba(255,255,255,0.80); font-size:13px; }

/* ── Card accent borders ─────────────────────────────────────────────────── */
.card-accent        { border-left:4px solid var(--primary); }
.card-accent-danger { border-left:4px solid #ef4444; }

/* ── Badge suave ─────────────────────────────────────────────────────────── */
.badge-success-soft { background:#DCE6FF; color:#0B1B3A; }

/* ── Círculos de ícono ───────────────────────────────────────────────────── */
.icon-circle    { width:38px; height:38px; background:#EEF3FF; border-radius:50%; display:flex; align-items:center; justify-content:center; flex-shrink:0; }
.icon-circle-40 { width:40px; height:40px; border-radius:50%; display:flex; align-items:center; justify-content:center; flex-shrink:0; }
.icon-module    { width:48px; height:48px; min-width:48px; border-radius:50%; display:flex; align-items:center; justify-content:center; color:#fff; font-size:1.2rem; flex-shrink:0; }

/* ── Upload imagen ───────────────────────────────────────────────────────── */
.img-upload-thumb { width:80px; height:80px; object-fit:cover; border:3px solid #dee2e6; }
.foto-progreso-thumb { width:70px; height:70px; object-fit:cover; cursor:pointer; border:1px solid #dee2e6; }
.img-upload-badge { width:26px; height:26px; border-radius:50%; background:#fff; box-shadow:0 2px 8px rgba(0,0,0,0.2); display:flex; align-items:center; justify-content:center; }
.camera-badge     { width:30px; height:30px; border-radius:50%; background:#fff; box-shadow:0 2px 8px rgba(0,0,0,0.2); display:flex; align-items:center; justify-content:center; }

/* ── Selector de color (swatch) ──────────────────────────────────────────── */
.sw-color        { width:36px; height:36px; border-radius:50%; border:3px solid transparent; padding:0; cursor:pointer; }
.sw-color-activo { border-color:#212529; }

/* ── Offcanvas / select helpers ──────────────────────────────────────────── */
.oc-scroll  { overflow-y:auto; }
.btn-eye    { position:absolute; right:4px;  top:18px; z-index:5; }
.btn-eye-12 { position:absolute; right:12px; top:18px; z-index:5; }
.sel-xs  { max-width:80px; }
.sel-sm  { max-width:90px; }
.sel-md  { max-width:125px; }
.mt-hint { margin-top:-12px; }

/* ── Fuentes / colores utilitarios ───────────────────────────────────────── */
.fs-12        { font-size:12px; }
.fs-17        { font-size:17px; }
.fs-amount    { font-size:1.1rem; }
.fs-amount-lg { font-size:1.25rem; }
.toggle-icon  { font-size:18px; }
.text-danger-em { color:#ef4444; }
.min-vh-80    { min-height:80vh; }
.spacer-32    { width:32px; }

/* ── Steppers (seguimiento de entrenamiento) ────────────────────────────── */
.btn-stepper {
    width: 34px; height: 34px; border-radius: 50%;
    border: 1.5px solid #dee2e6; background: #fff; color: var(--primary);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.1rem; font-weight: 700; padding: 0; flex-shrink: 0;
}
.btn-stepper:active { background: var(--primary); color: #fff; }
.stepper-value { min-width: 34px; text-align: center; font-weight: 700; font-size: 0.95rem; }

/* ── Permisos ────────────────────────────────────────────────────────────── */
.fs-badge-sm  { font-size:0.65rem; }
.perm-icon    { width:22px; height:22px; border-radius:50%; display:inline-flex; align-items:center; justify-content:center; color:#fff; font-size:0.7rem; }
.perm-switch  { width:2.5em !important; height:1.3em !important; cursor:pointer; }
.sel-date     { max-width:155px; }
.spacer-fab   { height:72px; display:block; }


/* ── Identidad deportiva ─────────────────────────────────────────────────── */
:root {
    --pitch:       #0B1B3A;
    --pitch-deep:  #06112B;
    --lime:        #B6FF3B;
    --lime-dark:   #7DB800;
    --live:        #FF3B4E;
    --font-display: "Quicksand", fuenteRandom, system-ui, sans-serif;
}
h1, h2, h3, h4, h5, h6, .header h1, .display-font {
    font-family: var(--font-display);
    font-weight: 700;
    letter-spacing: 0;
}
.header { background: linear-gradient(135deg, var(--pitch) 0%, var(--pitch-deep) 100%); border-bottom: 3px solid var(--lime); }
.tab-item.active { color: var(--pitch); }
.tab-item.active::before { background: var(--lime); }
.btn-primary { --bs-btn-color: #fff; --bs-btn-hover-color: var(--lime); --bs-btn-active-color: var(--lime); font-weight: 600; }
.btn-lime { background: var(--lime); color: var(--pitch); border: 0; font-weight: 700; border-radius: 50px; }
.btn-lime:hover { background: var(--lime-dark); color: #fff; }
.badge-live { background: var(--live); color: #fff; font-weight: 700; letter-spacing: 1px; animation: livePulse 1.4s infinite; }
@keyframes livePulse { 0%,100% { box-shadow: 0 0 0 0 rgba(255,59,78,.6); } 50% { box-shadow: 0 0 0 7px rgba(255,59,78,0); } }
.score { font-family: var(--font-display); font-weight: 700; font-size: 2rem; line-height: 1; font-variant-numeric: tabular-nums; }
.team-logo { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; background: #fff; border: 2px solid #e2e8f0; }
.match-card { background: linear-gradient(135deg, var(--pitch) 0%, #102A5C 100%); color: #fff; border: 0; }

/* Texto legible dentro de tarjetas oscuras */
.match-card .text-muted { color: rgba(255,255,255,.72) !important; }
.match-card .text-primary { color: var(--lime) !important; }
.match-card .border-top { border-color: rgba(255,255,255,.25) !important; }
.match-card .text-warning { color: #FFD166 !important; }

/* Tabla de posiciones */
.tabla-pos { font-size: 12px; }
.tabla-pos th { font-weight: 700; font-size: 11px; white-space: nowrap; }
.tabla-pos td { padding-top: .45rem; padding-bottom: .45rem; }
.tabla-pos .fila-clasifica td:first-child { box-shadow: inset 4px 0 0 var(--lime); }
.grid-cards.grid-stretch { align-items: stretch; }
.grid-cards.grid-stretch > .card { height: 100%; }

/* Dashboard: tarjetas */
.db-title { display:flex; align-items:center; gap:.6rem; font-family:var(--font-display); font-weight:700; font-size:1.1rem; margin-bottom:.75rem; color:var(--pitch); }
.db-title i { width:34px; height:34px; border-radius:10px; display:inline-flex; align-items:center; justify-content:center; background:var(--pitch); color:var(--lime); font-size:.95rem; }
.db-stack { display:grid; gap:.7rem; }
.db-card { display:block; position:relative; border-radius:16px; padding:.9rem 1rem; background:#fff; border:1px solid #e6ebf5; box-shadow:0 2px 8px rgba(11,27,58,.06); text-decoration:none; color:inherit; transition:transform .15s, box-shadow .15s; overflow:hidden; }
.db-card::before { content:""; position:absolute; left:0; top:0; bottom:0; width:5px; background:var(--cl, var(--lime-dark)); }
a.db-card:hover { transform:translateY(-2px); box-shadow:0 8px 20px rgba(11,27,58,.14); color:inherit; }
.db-card .db-meta { font-size:.78rem; color:#6b7691; font-weight:600; margin-bottom:.5rem; }
.db-team { display:flex; align-items:center; gap:.6rem; padding:.3rem 0; }
.db-team .nm { flex:1; min-width:0; overflow-wrap:anywhere; font-weight:600; }
.db-team .pt { min-width:2.2rem; text-align:center; font-family:var(--font-display); font-weight:700; font-size:1.35rem; line-height:1; padding:.35rem .5rem; border-radius:10px; background:#eef3ff; color:var(--pitch); }
.db-team.win .nm { font-weight:800; }
.db-team.win .pt { background:var(--lime); color:var(--pitch); }
.db-res { background:linear-gradient(135deg, var(--pitch) 0%, #153470 100%); border:0; color:#fff; }
.db-res .db-meta { color:rgba(255,255,255,.7); }
.db-res .db-team .pt { background:rgba(255,255,255,.12); color:#fff; }
.db-res .db-team.win .pt { background:var(--lime); color:var(--pitch); }
.db-res .db-team:not(.win) .nm { opacity:.85; }
.db-fecha { display:inline-flex; align-items:center; gap:.4rem; margin-top:.5rem; padding:.3rem .7rem; border-radius:50px; background:var(--pitch); color:var(--lime); font-size:.78rem; font-weight:700; }
.db-vacio { padding:1.2rem; border-radius:16px; border:2px dashed #cdd6ea; color:#6b7691; font-size:.9rem; }
.db-camp-top { display:flex; align-items:center; justify-content:space-between; gap:.5rem; }
.db-camp-top .t { font-weight:700; font-size:1.02rem; min-width:0; overflow-wrap:anywhere; }
.db-camp .go { color:var(--lime-dark); }

/* ═══ Tema global llamativo (Deportiva) ═══════════════════════════════════ */
body { background: radial-gradient(1200px 500px at 85% -10%, rgba(182,255,59,.10), transparent 60%), radial-gradient(900px 500px at -10% 0%, rgba(16,42,92,.10), transparent 60%), #f3f4f8; background-attachment: fixed; }
@keyframes subeFade { from { opacity:0; transform:translateY(10px); } to { opacity:1; transform:none; } }
#app-container .card, .db-card, .mod-tile { animation: subeFade .4s ease both; }
.grid-cards > :nth-child(2) { animation-delay:.05s; } .grid-cards > :nth-child(3) { animation-delay:.1s; } .grid-cards > :nth-child(4) { animation-delay:.15s; } .grid-cards > :nth-child(n+5) { animation-delay:.2s; }

/* Tarjetas */
.card { border: 1px solid #e6ebf5; border-radius: 18px; box-shadow: 0 3px 14px rgba(11,27,58,.07); position: relative; }
.card:hover { box-shadow: 0 10px 28px rgba(11,27,58,.15); }
.card.cursor:hover { border-color: var(--lime-dark); }
.card-header { border-bottom: 1px solid #e6ebf5; }
.card.match-card { border: 0; overflow: hidden; box-shadow: 0 8px 24px rgba(11,27,58,.30); }
.match-card::after { content:""; position:absolute; right:-60px; top:-60px; width:200px; height:200px; border-radius:50%; background: radial-gradient(circle, rgba(182,255,59,.28), transparent 70%); pointer-events:none; }
.match-card > * { position: relative; z-index: 1; }
.cp-card::before { content:""; position:absolute; left:0; top:0; bottom:0; width:6px; background: var(--cl, var(--lime-dark)); border-radius: 18px 0 0 18px; }
.cp-card .card-body { padding-left: 1.1rem !important; }

/* Títulos de módulo */
#app-container h6.text-primary { font-family: var(--font-display); font-size: 1.25rem; display: flex; align-items: center; }
#app-container h6.text-primary > i:first-child { width: 38px; height: 38px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; background: linear-gradient(135deg, var(--pitch), #153470); color: var(--lime); font-size: 1rem; margin-right: .65rem !important; box-shadow: 0 4px 10px rgba(11,27,58,.3); flex-shrink: 0; }
#app-container h5.fw-bold { font-family: var(--font-display); }
/* Empresa a la que pertenece la lista que se está viendo (p. ej. sucursales) */
.emp-chip { display: inline-flex; align-items: center; gap: .4rem; margin-top: .35rem; padding: .25rem .75rem; border-radius: 999px; background: #EEF3FF; border: 1px solid rgba(11,27,58,.12); color: #0B1B3A; font-size: .8rem; font-weight: 600; line-height: 1.2; }
.emp-chip > i { color: #0ea5e9; font-size: .75rem; }

/* Icono de módulo */
.icon-module { border-radius: 14px; box-shadow: 0 4px 12px rgba(0,0,0,.22), inset 0 -3px 0 rgba(0,0,0,.12); }

/* Botones */
.btn-primary { background: linear-gradient(135deg, var(--pitch), #153470); }
.btn-primary:hover, .btn-primary:focus { background: linear-gradient(135deg, #102A5C, #1d4590); }
.btn-lime { box-shadow: 0 4px 14px rgba(125,184,0,.45); }
.btn-lime:hover { box-shadow: 0 6px 18px rgba(125,184,0,.55); transform: translateY(-1px); }
.btn.fab, .btn-primary.fab { background: var(--lime); color: var(--pitch); border: 0; box-shadow: 0 6px 20px rgba(125,184,0,.6); }
.btn.fab:hover { background: #c8ff6a; color: var(--pitch); }
.btn-outline-primary { border-width: 2px; }

/* Chips / pestañas (badge.cursor) */
.badge.cursor { transition: all .18s; font-size: .8rem; }
.badge.cursor.bg-primary { background: linear-gradient(135deg, var(--pitch), #153470) !important; color: var(--lime) !important; box-shadow: 0 4px 10px rgba(11,27,58,.28); }
.badge.cursor.bg-light { background: #fff !important; border: 1.5px solid #dbe3f3 !important; color: var(--pitch) !important; }
.badge.cursor.bg-light:hover { border-color: var(--lime-dark) !important; transform: translateY(-1px); }
#cp-tabs { overflow-x: auto; flex-wrap: nowrap !important; padding-bottom: 4px; }
#cp-tabs .badge { white-space: nowrap; }
.badge.bg-success { background: #16a34a !important; } .badge.bg-secondary { background: #6b7691 !important; }

/* Tablas */
.table { --bs-table-bg: transparent; }
.tabla-pos thead tr { background: linear-gradient(135deg, var(--pitch), #153470); }
.tabla-pos thead th { color: var(--lime) !important; border: 0; padding-top: .6rem; padding-bottom: .6rem; }
.tabla-pos tbody tr:hover td { background: #f3f8e6; }
.tabla-pos tbody tr:first-child td:first-child { color: var(--lime-dark); font-size: 1.05em; }
.score-pill { display: inline-block; min-width: 70px; padding: .35rem .6rem; border-radius: 12px; background: linear-gradient(135deg, var(--pitch), #153470); color: var(--lime); font-size: 1.5rem; text-align: center; box-shadow: 0 4px 10px rgba(11,27,58,.3); }

/* Progreso */
.progress { background: #e6ebf5; border-radius: 8px; }
.progress-bar { background: linear-gradient(90deg, var(--lime-dark), var(--lime)); }

/* Modales y paneles laterales */
.modal-content { border-top: 5px solid var(--lime); }
.modal-title { color: var(--pitch); font-family: var(--font-display); }
.offcanvas-header { background: linear-gradient(135deg, var(--pitch), #153470); border-bottom: 3px solid var(--lime); color: #fff; }
.offcanvas-header .offcanvas-title, .offcanvas-header h5, .offcanvas-header h6 { color: #fff; }
.offcanvas-header .btn-close { filter: invert(1) brightness(2); opacity: 1; }
.alert { border-radius: 14px; border: 0; }

/* Formularios */
.form-control:focus, .form-select:focus { border-color: var(--lime-dark); box-shadow: 0 0 0 3px rgba(182,255,59,.25); }
.android-input.form-floating > .form-control:focus, .android-input.form-floating > .form-select:focus { border-bottom-color: var(--lime-dark); }
.android-input.form-floating::after { background: var(--lime-dark); }

/* Barra inferior */
.tab-nav { border-radius: 22px 22px 0 0; box-shadow: 0 -6px 24px rgba(11,27,58,.14); }
.tab-item.active::before { background: var(--lime); box-shadow: 0 3px 10px rgba(125,184,0,.45); }
.tab-item.active { color: var(--pitch); font-weight: 700; }

/* Menús (Competencia / Configuración) */
.hero { position: relative; overflow: hidden; border-radius: 22px; padding: 1.4rem 1.3rem; margin: .8rem .25rem 1.1rem; color: #fff; background: linear-gradient(135deg, var(--pitch) 0%, #153470 100%); box-shadow: 0 10px 28px rgba(11,27,58,.32); }
.hero::after { content:""; position:absolute; right:-50px; top:-70px; width:220px; height:220px; border-radius:50%; background: radial-gradient(circle, rgba(182,255,59,.35), transparent 70%); }
.hero .hero-ico { width:54px; height:54px; border-radius:16px; display:flex; align-items:center; justify-content:center; background:var(--lime); color:var(--pitch); font-size:1.5rem; flex-shrink:0; box-shadow:0 6px 16px rgba(0,0,0,.25); }
.hero h5 { font-size:1.5rem; margin:0; letter-spacing:.5px; }
.hero p { margin:0; opacity:.8; font-size:.9rem; }
.hero > * { position: relative; z-index: 1; }
.mod-tile { display:flex; align-items:center; gap:1rem; padding:1rem; margin:0 !important; background:#fff; border:1px solid #e6ebf5; border-radius:18px; box-shadow:0 3px 14px rgba(11,27,58,.07); cursor:pointer; position:relative; overflow:hidden; transition:transform .15s, box-shadow .15s, border-color .15s; }
.mod-tile:hover { transform:translateY(-3px); box-shadow:0 12px 28px rgba(11,27,58,.16); border-color:var(--lime-dark); }
.mod-tile .mod-body { flex:1; min-width:0; }
.mod-tile .mod-go { width:32px; height:32px; border-radius:50%; background:#eef3ff; color:var(--pitch); display:flex; align-items:center; justify-content:center; flex-shrink:0; transition:background .15s, color .15s; }
.mod-tile:hover .mod-go { background:var(--lime); }
.mod-tile .mod-nm { font-family:var(--font-display); font-weight:700; letter-spacing:.3px; }
.btn-lime:disabled, .btn-lime.disabled { background: #dfe6f3; color: #8a95ad; box-shadow: none; opacity: 1; }
.ev-usar-box { padding: .6rem .7rem; border-radius: 14px; background: #f3f8e6; border: 1px dashed var(--lime-dark); }
.sets-fila { display:flex; flex-wrap:wrap; justify-content:center; gap:.4rem; margin:.4rem 0 .2rem; }
.set-chip { display:inline-flex; flex-direction:column; align-items:center; min-width:70px; padding:.25rem .6rem; border-radius:12px; background:#eef3ff; border:1px solid #dbe3f3; line-height:1.15; }
.set-chip small { font-size:.65rem; color:#6b7691; font-weight:600; text-transform:uppercase; letter-spacing:.4px; }
.set-chip b { font-family:var(--font-display); font-size:.95rem; color:var(--pitch); font-variant-numeric:tabular-nums; }
.eq-txt { min-width:0; flex:1 1 auto; }
.eq-nom { font-size:.85rem; line-height:1.15; overflow-wrap:anywhere; }
.eq-abrev { font-size:.7rem; color:#6b7691; font-weight:700; letter-spacing:.6px; }
.eq-vacio { width:46px; height:46px; min-width:46px; border-radius:50%; border:2px dashed #adb5bd; display:flex; align-items:center; justify-content:center; color:#adb5bd; }

/* Partidos de una jornada: móvil y tablet 1 columna · laptop y PC 3 */
.grid-partidos { display:grid; grid-template-columns:1fr; gap:.75rem; align-items:start; }
@media (min-width:992px) { .grid-partidos { grid-template-columns:repeat(3, 1fr); } }
.grid-partidos > .card { margin:0 !important; }
/* Sets en vertical, del ancho de logos + marcador */
.sets-col { width:min(230px, 100%); margin:.4rem auto .2rem; border-radius:12px; overflow:hidden; border:1px solid #dbe3f3; }
.set-fila { display:flex; align-items:center; justify-content:space-between; padding:.25rem .8rem; background:#eef3ff; }
.set-fila + .set-fila { border-top:1px solid #dbe3f3; }
.set-fila small { font-size:.68rem; color:#6b7691; font-weight:700; text-transform:uppercase; letter-spacing:.4px; }
.set-fila b { font-family:var(--font-display); font-size:.95rem; color:var(--pitch); font-variant-numeric:tabular-nums; }

/* Tarjeta de partido: logos arriba, nombres debajo y sets alineados bajo cada logo */
.pt-grid { display:grid; grid-template-columns:1fr 84px 1fr; column-gap:0; margin:.5rem 0 .3rem; }
.pt-eq { padding-bottom:.5rem; display:flex; flex-direction:column; align-items:center; text-align:center; min-width:0; }
.pt-logo { display:flex; justify-content:center; margin-bottom:.25rem; }
.pt-centro { display:flex; justify-content:center; align-items:flex-start; height:52px; }
.pt-centro .score-pill { align-self:center; min-width:72px; }
.pt-centro > .badge, .pt-centro > span.fw-bold { align-self:center; }
.pt-set { display:contents; }
.pt-set b, .pt-set small { padding:.3rem 0; text-align:center; background:#eef3ff; font-family:var(--font-display); }
.pt-set b { font-size:1.05rem; color:#6b7691; font-variant-numeric:tabular-nums; }
.pt-set small { font-size:.68rem; color:#6b7691; font-weight:700; text-transform:uppercase; letter-spacing:.4px; display:flex; align-items:center; justify-content:center; }
.pt-set.gana-l .sl, .pt-set.gana-v .sv { color:var(--pitch); font-weight:800; background:#e1f5b8; }
.sets-col, .set-fila { display:none; }

/* ═══ Tipografía estándar (mínimo legible) ═══════════════════════════════ */
body { font-size: 15px; }
.small, small { font-size: .9rem; }
.fs-7 { font-size: 14px; } .fs-8 { font-size: 12.5px; } .fs-12 { font-size: 13.5px; }
[style*="font-size:10px"], [style*="font-size:11px"], [style*="font-size:12px"] { font-size: 13px !important; }
.badge { font-size: .8rem; }
.text-muted.fs-8, .eq-abrev { font-size: .78rem; }
.db-card .db-meta { font-size: .85rem; }
.pt-set b { font-size: 1.15rem; } .pt-set small { font-size: .75rem; }
.eq-nom { font-size: .95rem; }

/* Tabla de posiciones */
.tabla-pos { font-size: 15px; }
.tabla-pos th { font-size: 13.5px; letter-spacing: .5px; }
.tabla-pos td { padding-top: .8rem; padding-bottom: .8rem; }
.tabla-pos td, .tabla-pos th { padding-left: .6rem; padding-right: .6rem; }
.tabla-pos .tp-equipo { min-width: 150px; }
.tabla-pos .tp-nombre { font-size: 1rem; max-width: 210px; overflow-wrap: anywhere; line-height: 1.15; }
.tp-pts { display: inline-block; min-width: 2.2rem; padding: .25rem .5rem; border-radius: 10px; background: #eef3ff; color: var(--pitch); font-family: var(--font-display); font-weight: 800; font-size: 1.1rem; }
.tabla-pos tbody tr:first-child .tp-pts { background: var(--lime); }
.tabla-pos tbody td:first-child { font-size: 1.05rem; font-weight: 800; }
.est-pos { min-width:24px; font-weight:800; font-size:1.05rem; } .est-col:hover { text-decoration:underline; } .est-cel:hover { background:var(--lime); transform:scale(1.08); }

/* Estadísticas por equipo */
.est-tabla .est-sticky { position:sticky; left:0; z-index:2; background:#fff; box-shadow:2px 0 4px rgba(11,27,58,.06); }
.est-tabla thead .est-sticky { background:#0B1B3A; box-shadow:none; }
.est-tabla tbody tr:hover .est-sticky { background:#f3f8e6; }
.est-barra-wrap { position:relative; display:flex; align-items:center; justify-content:center; min-width:140px; padding:.15rem 0; }
.est-barra { position:absolute; left:0; top:50%; height:70%; transform:translateY(-50%); border-radius:10px; background:linear-gradient(90deg, rgba(182,255,59,.15), rgba(125,184,0,.55)); }
.est-barra-wrap .tp-pts { position:relative; }
.est-cards { display:grid; gap:.7rem; }
.est-card .est-pos { min-width:26px; text-align:center; color:var(--lime-dark); }
.est-chip { display:inline-flex; align-items:center; gap:.4rem; padding:.45rem .8rem; border-radius:50px; border:1.5px solid #dbe3f3; background:#fff; color:var(--pitch); font-weight:600; font-size:.95rem; transition:all .15s; }
.est-chip b { font-family:var(--font-display); font-size:1.1rem; padding:.05rem .55rem; border-radius:50px; background:#eef3ff; }
.est-chip:not(:disabled):active, .est-chip:not(:disabled):hover { border-color:var(--lime-dark); background:#f3f8e6; }
.est-chip-cero { opacity:.5; }

/* Carnet de usuario (organizador) */
.carnet-card    { width:100%; max-width:280px; border-radius:18px; overflow:hidden; box-shadow:0 6px 24px rgba(0,0,0,0.15); background:#fff; }
.carnet-header  { background:linear-gradient(150deg,#0B1B3A 0%,#0A1730 60%,#06112B 100%); padding:14px 12px 58px; text-align:center; }
.carnet-logo    { width:68px; height:68px; border-radius:50%; object-fit:cover; border:3px solid rgba(255,255,255,0.9); background:#fff; box-shadow:0 2px 10px rgba(0,0,0,0.25); }
.carnet-empresa { color:#fff; font-weight:700; font-size:0.95rem; letter-spacing:0.5px; margin-top:8px; }
.carnet-slogan  { color:#C6F432; font-size:10px; margin-top:1px; }
.carnet-body    { padding:0 14px 10px; text-align:center; }
.carnet-foto    { width:100px; height:100px; border-radius:50%; object-fit:cover; border:3px solid #EEF3FF; box-shadow:0 2px 10px rgba(0,0,0,0.12); margin-top:-50px; background:#fff; }
.carnet-nombre  { font-weight:400; margin-top:8px; font-size:1.3rem; line-height:1.2; overflow-wrap:anywhere; }
.carnet-apellidos{ font-weight:700; font-size:1.1rem; line-height:1.2; margin-top:1px; overflow-wrap:anywhere; }
.carnet-rol     { display:table; margin:5px auto 0; padding:2px 10px; border-radius:999px; background:#0B1B3A; color:#C6F432; font-size:10px; font-weight:600; }
.carnet-qr-box  { border:1.5px solid #dee2e6; border-radius:10px; padding:8px; display:table; margin:10px auto 0; }
.carnet-qr-img  { width:116px; height:116px; display:block; }
.carnet-caption { color:#6c757d; font-size:10px; margin-top:6px; padding:0 8px; }
.carnet-footer  { background:#f3f4f8; text-align:center; padding:6px; font-size:9px; color:#9ca3af; border-top:1px solid #e9ecef; }
.print-iframe-oculto { position:fixed; right:0; bottom:0; width:0; height:0; border:0; }
