/* ============================================================
   SEMANAOS — Stylesheet
   v1.4.0
   Fuente: Poppins (Google Fonts)
   Modo oscuro. Sin frameworks externos.
   ============================================================ */

/* ────────────────────────────────────────────────────────────
   0. VARIABLES CSS
──────────────────────────────────────────────────────────── */
:root {
    /* Colores principales */
    --bg-dark: #2c2a29;
    /* Fondo general */
    --bg-sidebar: #232120;
    /* Sidebar ligeramente más oscuro */
    --bg-card: #353230;
    /* Fondo de tarjetas */
    --bg-input: #3d3a38;
    /* Fondo de inputs */

    --text-white: #ffffff;
    --text-muted: rgba(255, 255, 255, 0.45);
    --text-secondary: rgba(255, 255, 255, 0.70);

    --accent-pink: #db7bb0;
    /* Rosa para acentos y botones */
    --accent-pink-hover: #c9699e;
    /* Hover del rosa */

    --border-subtle: rgba(255, 255, 255, 0.10);
    --border-card: rgba(255, 255, 255, 0.13);

    /* Tipografía */
    --font-main: 'Poppins', sans-serif;

    /* Dimensiones de layout */
    --sidebar-width: 250px;
    --topbar-height: 72px;

    /* Radios */
    --radius-card: 12px;
    --radius-btn: 8px;
    --radius-pill: 100px;
}

/* ────────────────────────────────────────────────────────────
   1. RESET BÁSICO
──────────────────────────────────────────────────────────── */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ────────────────────────────────────────────────────────────
   2. BASE
──────────────────────────────────────────────────────────── */
html,
body {
    height: 100%;
    font-family: var(--font-main);
    font-size: 14px;
    font-weight: 400;
    color: var(--text-white);
    background: var(--bg-dark);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ────────────────────────────────────────────────────────────
   3. APP SHELL — Grid principal
──────────────────────────────────────────────────────────── */
.app-shell {
    display: grid;
    grid-template-columns: var(--sidebar-width) 1fr;
    height: 100vh;
    /* Fijo al alto de pantalla */
    overflow: hidden;
    /* Evita scroll global */
}

/* ────────────────────────────────────────────────────────────
   4. SIDEBAR
──────────────────────────────────────────────────────────── */
.sidebar {
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border-subtle);
    display: flex;
    flex-direction: column;
    padding: 28px 0 24px;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}

/* ── Header del sidebar ── */
.sidebar__header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 24px 28px;
}

@font-face {
    font-family: 'ChellaType';
    src: url('private/ChellaType-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

/* Logotipo texto */
.sidebar__logo {
    font-family: 'ChellaType', sans-serif;
    font-size: 24px;
    font-weight: 400;
    letter-spacing: 1px;
    color: var(--text-white);
    white-space: nowrap;
    text-transform: none;
    padding-bottom: 8px;
    border-bottom: 1px solid #353230;
    /* Mantener caso original si la fuente lo requiere */
}

/* Línea separadora vertical */
.sidebar__divider {
    width: 1px;
    height: 32px;
    background: var(--border-subtle);
    flex-shrink: 0;
}

/* Bloque reloj/fecha */
.sidebar__clock {
    display: flex;
    flex-direction: column;
    gap: 2px;
    line-height: 1.2;
}

.sidebar__time {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-white);
    letter-spacing: 0.5px;
}

.sidebar__date {
    font-size: 10px;
    font-weight: 400;
    color: var(--text-muted);
    white-space: nowrap;
}

/* ── Navegación ── */
.sidebar__nav {
    flex: 1;
    padding: 0 16px;
}

.nav-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* Ítem de navegación base */
.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: var(--radius-btn);
    cursor: pointer;
    transition: background 0.2s ease;
    user-select: none;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

/* Ícono del ítem */
.nav-item__icon {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.nav-item__icon svg {
    width: 20px;
    height: 20px;
    color: var(--text-muted);
    transition: color 0.2s ease;
}

/* Etiqueta del ítem */
.nav-item__label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    transition: color 0.2s ease;
    padding-bottom: 2px;
    /* espacio para el subrayado */
}

/* ── Estado ACTIVO del ítem ── */
.nav-item--active {
    background: rgba(219, 123, 176, 0.08);
}

.nav-item--active .nav-item__icon svg {
    color: var(--text-white);
}

.nav-item--active .nav-item__label {
    color: var(--text-white);
    font-weight: 600;
    border-bottom: 2px solid var(--accent-pink);
}

/* ────────────────────────────────────────────────────────────
   5. ÁREA DE CONTENIDO PRINCIPAL
──────────────────────────────────────────────────────────── */
.main-content {
    display: flex;
    flex-direction: column;
    padding: 36px 40px;
    height: 100vh;
    overflow-y: auto;
    /* Por defecto scrollea si el contenido crece */
    background: var(--bg-dark);
}

/* ── Top Bar ── */
.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 36px;
}

.topbar__title {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-white);
    letter-spacing: -0.3px;
}

/* ────────────────────────────────────────────────────────────
   6. BOTONES
──────────────────────────────────────────────────────────── */

/* Botón base */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 18px;
    border-radius: var(--radius-btn);
    font-family: var(--font-main);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease,
        box-shadow 0.2s ease;
    white-space: nowrap;
}

/* Botón delineado (outline) rosa */
.btn--outline {
    background: transparent;
    color: var(--accent-pink);
    border: 1.5px solid var(--accent-pink);
}

.btn--outline:hover {
    border-color: var(--accent-pink-hover);
    color: var(--accent-pink-hover);
}

/* Botón sólido (utilitario para otras vistas) */
.btn--solid {
    background: var(--accent-pink);
    color: #1a1a1a;
    border: 1.5px solid transparent;
}

.btn--solid:hover {
    background: var(--accent-pink-hover);
}

/* Ícono dentro del botón */
.btn__icon {
    display: flex;
    align-items: center;
}

.btn__icon svg {
    width: 16px;
    height: 16px;
}

/* ────────────────────────────────────────────────────────────
   7. GRID DE TARJETAS DE EQUIPOS
──────────────────────────────────────────────────────────── */
.teams-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    align-content: start;
}

/* ── Tarjeta de equipo ── */
.team-card {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-card);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.team-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
}

/* Cabecera de la tarjeta */
.team-card__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 14px 14px 10px;
    gap: 6px;
}

.team-card__name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-white);
    line-height: 1.2;
    word-break: break-word;
    display: block;
}

.team-card__public-id {
    font-size: 10px;
    font-weight: 400;
    color: var(--text-muted);
    opacity: 0.7;
    margin-top: 2px;
    display: block;
    text-transform: uppercase;
}

/* Botón lápiz (cabecera) */
.team-card__edit-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 2px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    color: var(--text-muted);
    transition: color 0.2s ease;
    border-radius: 4px;
}

.team-card__edit-btn:hover {
    color: var(--accent-pink);
}

.team-card__edit-btn svg {
    width: 14px;
    height: 14px;
}

/* Imagen del equipo */
.team-card__image-wrap {
    flex: 1;
    overflow: hidden;
    line-height: 0;
    /* elimina espacio bajo inline img */
}

.team-card__image {
    width: 100%;
    aspect-ratio: 1/1;
    object-fit: cover;
    display: block;
    transition: transform 0.35s ease;
}

.team-card:hover .team-card__image {
    transform: scale(1.04);
}

/* Pie de la tarjeta */
.team-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 14px 12px;
    gap: 6px;
}

.team-card__url {
    font-size: 10px;
    font-weight: 400;
    color: var(--text-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    min-width: 0;
}

/* Botón lápiz tiny (url) */
.team-card__url-edit {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 2px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    color: var(--text-muted);
    transition: color 0.2s ease;
    border-radius: 4px;
}

.team-card__url-edit:hover {
    color: var(--accent-pink);
}

.team-card__url-edit svg {
    width: 11px;
    height: 11px;
}

/* Inline Editing Styles */
.team-card__input-inline {
    display: block;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    color: var(--text-white);
    font-family: var(--font-main);
    font-size: 14px;
    font-weight: 600;
    padding: 2px 6px;
    width: 100%;
    outline: none;
    transition: all 0.2s ease;
}

.team-card__input-inline:focus {
    border-color: var(--accent-pink);
    background: rgba(255, 255, 255, 0.1);
}

.team-card__url-input-inline {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    color: var(--text-muted);
    font-family: var(--font-main);
    font-size: 10px;
    padding: 1px 4px;
    width: 100%;
    outline: none;
}

.team-card__save-btn {
    background: var(--accent-pink);
    color: white;
    border: none;
    border-radius: 4px;
    padding: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
}

.team-card__save-btn:hover {
    transform: scale(1.1);
}

.team-card__save-btn svg {
    width: 14px;
    height: 14px;
}

.hidden {
    display: none !important;
}

.saving-loader {
    opacity: 0.5;
    pointer-events: none;
}

/* Botón Eliminar */
.team-card__delete-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 2px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    color: var(--text-muted);
    transition: all 0.2s ease;
    border-radius: 4px;
}

.team-card__delete-btn:hover {
    color: #ff4d4d;
    background: rgba(255, 77, 77, 0.1);
}

.team-card__delete-btn svg {
    width: 11px;
    height: 11px;
}

/* ────────────────────────────────────────────────────────────
   8. UTILIDADES — Inputs y Formularios oscuros (para otras vistas)
──────────────────────────────────────────────────────────── */

/* Input oscuro estándar */
.input-dark {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg-input);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-btn);
    color: var(--text-white);
    font-family: var(--font-main);
    font-size: 13px;
    font-weight: 400;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.input-dark::placeholder {
    color: var(--text-muted);
}

.input-dark:focus {
    border-color: var(--accent-pink);
    box-shadow: 0 0 0 3px rgba(219, 123, 176, 0.18);
}

/* Textarea oscuro */
.textarea-dark {
    resize: vertical;
    min-height: 90px;
}

/* ────────────────────────────────────────────────────────────
   9. UTILIDADES — Píldoras / Tags
──────────────────────────────────────────────────────────── */

/* Píldora base */
.pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: var(--radius-pill);
    font-family: var(--font-main);
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
}

/* Píldora rosa (principal) */
.pill--pink {
    background: var(--accent-pink);
    color: #1a1a1a;
}

/* Píldora oscura / sutil */
.pill--dark {
    background: rgba(255, 255, 255, 0.10);
    color: var(--text-white);
    border: 1px solid var(--border-subtle);
}

/* Botón de cierre dentro de la píldora */
.pill__close {
    display: flex;
    align-items: center;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    color: inherit;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.pill__close:hover {
    opacity: 1;
}

.pill__close::after {
    content: '×';
    font-size: 14px;
    line-height: 1;
}

/* ────────────────────────────────────────────────────────────
   10. SCROLLBAR personalizado (Webkit)
──────────────────────────────────────────────────────────── */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.18);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(219, 123, 176, 0.50);
}

/* ============================================================
   11. ENCUENTROS — Cronograma + Panel de Asignación
   ============================================================ */

/* ────────────────────────────────────────────────────────────
   11a. Layout principal de la vista Encuentros
———————————————————————————————————————————————————————————— */

/* El main de Encuentros sobrescribe el padding base para
   tener más control sobre el scroll interno */
.enc-main {
    padding: 0;
    overflow: hidden;
    /* el scroll lo maneja cada sub-sección */
    display: flex;
    flex-direction: column;
}

/* Top bar dentro de enc-main */
.enc-main .topbar {
    padding: 24px 32px 20px;
    flex-shrink: 0;
    border-bottom: 1px solid var(--border-subtle);
    margin-bottom: 0;
}

/* Contenedor de dos columnas: 75% calendario | 25% panel */
.enc-body {
    display: flex;
    flex: 1;
    overflow: hidden;
    /* los hijos manejan su propio scroll */
    min-height: 0;
}

/* ────────────────────────────────────────────────────────────
   11b. Sección del cronograma (izquierda)
———————————————————————————————————————————————————————————— */

.schedule-section {
    flex: 3;
    /* ~75% del espacio horizontal */
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-right: 1px solid var(--border-subtle);
}

/* Wrapper: gutter de horas + área deslizable */
.schedule-wrapper {
    display: flex;
    flex: 1;
    overflow: hidden;
    min-height: 0;
}

/* ── Gutter de tiempo (columna de horas, fija a la izquierda) ── */
.time-gutter {
    width: 58px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    background: var(--bg-dark);
    border-right: 1px solid var(--border-subtle);
    z-index: 10;
}

/* Espaciador alineado con los dos headers (día + zona) del calendario */
.time-gutter__spacer {
    height: 88px;
    /* 48px day-hdr + 40px zone-hdr */
    flex-shrink: 0;
}

/* Cada etiqueta de hora */
.time-gutter__label {
    height: 80px;
    /* debe coincidir con .cal-row min-height */
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
    padding: 6px 8px 0 0;
    font-size: 10px;
    font-weight: 500;
    color: var(--text-muted);
    letter-spacing: 0.3px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    flex-shrink: 0;
}

/* ── Área deslizable del calendario ── */
.cal-scroll {
    flex: 1;
    overflow-x: auto;
    overflow-y: auto;
    min-width: 0;
    outline: none;
}

/* ── Grid interno: todo el contenido del calendario ── */
/* Usamos display: grid para poder poner los headers sticky */

/* ── Headers sticky (días + zonas) ── */
.cal-header {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    flex-direction: column;
}

/* Fila de headers de días */
.cal-days-row {
    display: flex;
    height: 48px;
}

/* Header de cada día (abarca 3 zonas) */
.cal-day-hdr {
    flex: 3;
    /* cada día ocupa 3 unidades = 3 zonas */
    min-width: calc(var(--zone-col-width, 120px) * 3);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    border-right: 1px solid rgba(0, 0, 0, 0.15);
}

.cal-day-hdr span:first-child {
    color: rgba(0, 0, 0, 0.80);
}

.cal-day-date {
    font-size: 9px;
    font-weight: 400;
    opacity: 0.65;
    color: rgba(0, 0, 0, 0.70);
}

/* Alternancia de color de los headers de día */
.cal-day-hdr--pink {
    background: var(--accent-pink-hover);
}

.cal-day-hdr--white {
    background: rgb(229, 229, 229);
}

/* Fila de headers de zonas */
.cal-zones-row {
    display: flex;
    height: 40px;
}

/* Header de cada zona */
.cal-zone-hdr {
    flex: 1;
    min-width: 120px;
    /* ancho mínimo de columna de zona */
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #1a1a1a;
    border-right: 1px solid rgba(0, 0, 0, 0.10);
}

/* Zonas alternadas: rosa sólido | blanco sólido */
.cal-zone-hdr--pink {
    background: var(--accent-pink);
}

.cal-zone-hdr--white {
    background: rgb(255, 255, 255);
}

/* ── Grid de eventos ── */
.cal-grid {
    display: flex;
    flex-direction: column;
}

/* Cada fila de hora */
.cal-row {
    display: flex;
    min-height: 80px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* Celda de cada zona dentro de una fila */
.cal-cell {
    flex: 1;
    min-width: 120px;
    padding: 6px 6px;
    border-right: 1px solid rgba(255, 255, 255, 0.04);
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: stretch;
}

/* Fondo ligeramente diferente por día (alternado) */
.cal-cell--d-odd {
    background: rgba(219, 123, 176, 0.04);
}

.cal-cell--d-even {
    background: rgba(255, 255, 255, 0.02);
}

/* ── Bloque de evento ── */
.evt {
    background: #1c3350;
    /* azul oscuro */
    border-left: 3px solid #4a9eff;
    /* borde azul brillante */
    border-radius: 4px;
    padding: 4px 6px;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.15s ease;
}

.evt:hover {
    background: #254267;
    transform: translateY(-1px);
}

.evt__title {
    font-size: 9px;
    font-weight: 600;
    color: #a8c8ff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 2px;
}

.evt__teams {
    font-size: 8.5px;
    font-weight: 400;
    color: rgba(200, 220, 255, 0.65);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ────────────────────────────────────────────────────────────
   11c. Panel lateral de asignación (derecha)
———————————————————————————————————————————————————————————— */

.assign-panel {
    flex: 1;
    /* ~25% del espacio horizontal */
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    padding: 20px 18px;
    gap: 14px;
    background: var(--bg-sidebar);
    min-width: 240px;
    max-width: 320px;
}

/* ── Tabs ── */
.assign-tabs {
    display: flex;
    gap: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border-subtle);
    flex-shrink: 0;
}

.assign-tab {
    background: transparent;
    border: none;
    font-family: var(--font-main);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.8px;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0 0 8px;
    position: relative;
    transition: color 0.2s ease;
}

/* Tab activo con subrayado rosa grueso */
.assign-tab--active {
    color: var(--text-white);
}

.assign-tab--active::after {
    content: '';
    position: absolute;
    bottom: -12px;
    /* justo en el borde del assign-tabs */
    left: 0;
    right: 0;
    height: 3px;
    background: var(--accent-pink);
    border-radius: 2px;
}

/* ── Info del panel ── */
.assign-info {
    flex-shrink: 0;
}

.assign-info__title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-white);
    margin-bottom: 6px;
    line-height: 1.2;
}

.assign-info__desc {
    font-size: 11px;
    font-weight: 400;
    color: var(--text-muted);
    line-height: 1.5;
}

/* ── Botón NUEVO ENCUENTRO ── */
.assign-new-btn {
    width: 100%;
    padding: 11px 0;
    background: var(--text-white);
    color: #1a1a1a;
    border: none;
    border-radius: var(--radius-btn);
    font-family: var(--font-main);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.8px;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.2s ease, transform 0.15s ease;
}

.assign-new-btn:hover {
    background: #f0eceb;
    transform: translateY(-1px);
}

/* ── Controles de búsqueda ── */
.assign-controls {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

/* Input de búsqueda */
.assign-search {
    flex: 1;
    padding: 8px 12px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.20);
    border-radius: var(--radius-btn);
    color: var(--text-white);
    font-family: var(--font-main);
    font-size: 12px;
    outline: none;
    transition: border-color 0.2s ease;
}

.assign-search::placeholder {
    color: var(--text-muted);
}

.assign-search:focus {
    border-color: var(--accent-pink);
    box-shadow: 0 0 0 2px rgba(219, 123, 176, 0.15);
}

/* Select de ordenamiento */
.assign-sort {
    flex: 1;
    padding: 8px 10px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.20);
    border-radius: var(--radius-btn);
    color: var(--text-white);
    font-family: var(--font-main);
    font-size: 11px;
    outline: none;
    cursor: pointer;
    appearance: none;
    /* quita la flecha nativa en Firefox/Chrome */
    -webkit-appearance: none;
    /* Flecha custom con SVG inline */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6' fill='none'%3E%3Cpath d='M1 1l4 4 4-4' stroke='rgba(255,255,255,0.5)' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 10px;
    padding-right: 28px;
    transition: border-color 0.2s ease;
}

.assign-sort option {
    background: var(--bg-dark);
    color: var(--text-white);
}

.assign-sort:focus {
    border-color: var(--accent-pink);
}

/* ── Lista de tarjetas de encuentros ── */
.match-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
    overflow-y: auto;
}

/* Tarjeta individual de encuentro */
.match-card {
    background: var(--bg-card);
    border: 1px solid rgba(100, 150, 255, 0.20);
    /* borde azul sutil */
    border-radius: 10px;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    cursor: grab;
    transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.match-card:hover {
    border-color: rgba(100, 150, 255, 0.45);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.30);
}

/* Parte superior de la tarjeta: meta + stats */
.match-card__top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
}

.match-card__meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.match-card__discipline {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-white);
}

.match-card__round {
    font-size: 10px;
    font-weight: 400;
    color: var(--text-muted);
}

.match-card__stats {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    flex-shrink: 0;
}

.match-card__pts {
    font-size: 11px;
    font-weight: 600;
    color: var(--accent-pink);
}

.match-card__dur {
    font-size: 10px;
    font-weight: 400;
    color: var(--text-muted);
}

/* Nombres de equipos */
.match-card__teams {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-white);
    line-height: 1.2;
}

/* Pie de la tarjeta: botón editar */
.match-card__foot {
    display: flex;
    justify-content: flex-end;
}

.match-card__edit {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 2px;
    display: flex;
    align-items: center;
    color: var(--text-muted);
    border-radius: 4px;
    transition: color 0.2s ease;
}

.match-card__edit:hover {
    color: var(--text-white);
}

.match-card__edit svg {
    width: 13px;
    height: 13px;
}

/* ── Cursor interactivo para el sidebar activo ── */
.nav-item {
    cursor: pointer;
}

/* ============================================================
   12. DISCIPLINAS — Lista + Panel de Configuración
   v1.3.0
   ============================================================ */

/* ────────────────────────────────────────────────────────────
   12a. Layout principal de la vista Disciplinas
──────────────────────────────────────────────────────────── */

/* El main de Disciplinas controla su propio scroll interno */
.disc-main {
    padding: 0;
    height: 100vh;
    overflow: hidden;
    /* Muy importante para evitar scroll doble */
    display: flex;
    flex-direction: column;
}

.disc-main .topbar {
    padding: 24px 32px 20px;
    flex-shrink: 0;
    border-bottom: 1px solid var(--border-subtle);
    margin-bottom: 0;
}

/* Dos columnas: lista (30%) | config (70%) */
.disc-body {
    display: flex;
    flex: 1;
    overflow: hidden;
    min-height: 0;
}

/* ────────────────────────────────────────────────────────────
   12b. Columna de lista (izquierda, 30%)
──────────────────────────────────────────────────────────── */

.disc-list-col {
    width: 30%;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    padding: 20px 16px;
    border-right: 1px solid var(--border-subtle);
    background: var(--bg-sidebar);
    gap: 14px;
    overflow: hidden;
    /* el scroll lo hace .disc-list */
}

/* ── Input nueva disciplina ── */
.disc-new-wrap {
    display: flex;
    align-items: center;
    border: 1.5px solid var(--accent-pink);
    border-radius: var(--radius-btn);
    overflow: hidden;
    flex-shrink: 0;
}

.disc-new-input {
    flex: 1;
    padding: 10px 14px;
    background: transparent;
    border: none;
    color: var(--text-white);
    font-family: var(--font-main);
    font-size: 13px;
    outline: none;
}

.disc-new-input::placeholder {
    color: var(--text-muted);
}

.disc-new-add {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    background: var(--accent-pink);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1a1a1a;
    transition: background 0.2s ease;
}

.disc-new-add:hover {
    background: var(--accent-pink-hover);
}

.disc-new-add svg {
    width: 16px;
    height: 16px;
}

/* ── Lista de disciplinas (solo esta tiene scroll) ── */
.disc-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow-y: auto;
    /* <-- SOLO ESTA columna tiene overflow */
    flex: 1;
    padding-right: 4px;
}

/* Ítem de disciplina */
.disc-list__item {
    width: 100%;
    padding: 11px 16px;
    border-radius: var(--radius-btn);
    font-family: var(--font-main);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
    user-select: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;

    /* Estado inactivo */
    background: transparent;
    color: var(--text-white);
    border: 1px solid rgba(255, 255, 255, 0.20);
}

.disc-list__item:hover {
    background: rgba(255, 255, 255, 0.06);
}

.disc-list__delete {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: var(--text-muted);
    opacity: 0;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
}

.disc-list__item:hover .disc-list__delete {
    opacity: 0.6;
}

.disc-list__delete:hover {
    opacity: 1 !important;
    color: #ff4d4d;
    background: rgba(255, 77, 77, 0.1);
}

.disc-list__delete svg {
    width: 14px;
    height: 14px;
}

/* Estado ACTIVO */
.disc-list__item--active {
    background: var(--text-white);
    color: var(--bg-dark);
    border-color: var(--text-white);
    font-weight: 600;
}

.disc-list__item--active:hover {
    background: #f2eeec;
}

/* Ajuste del botón eliminar cuando el ítem está activo (fondo blanco) */
.disc-list__item--active .disc-list__delete {
    color: rgba(0, 0, 0, 0.4);
}

.disc-list__item--active:hover .disc-list__delete {
    opacity: 0.7;
}

.disc-list__item--active .disc-list__delete:hover {
    color: #cc0000;
    background: rgba(204, 0, 0, 0.1);
    opacity: 1 !important;
}

/* ────────────────────────────────────────────────────────────
   12c. Panel de configuración (derecha, 70%)
──────────────────────────────────────────────────────────── */

.disc-config {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
    /* Ocupa todo el alto de .disc-body */
    overflow-y: auto;
    /* Scroll independiente */
    padding: 28px 32px;
    gap: 0;
}

/* Encabezado de la disciplina seleccionada */
.disc-config__head {
    margin-bottom: 24px;
}

.disc-config__title {
    font-size: 30px;
    font-weight: 700;
    color: var(--text-white);
    line-height: 1.1;
    letter-spacing: -0.5px;
}

/* Inner: detalles (izq) + sidebar (der) */
.disc-config__inner {
    display: flex;
    gap: 32px;
    align-items: flex-start;
}

.disc-config__details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 28px;
}

/* ── Sidebar lateral del config ── */
.disc-config__sidebar {
    width: 230px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 22px;
}

/* ────────────────────────────────────────────────────────────
   12d. Secciones internas del panel de detalles
──────────────────────────────────────────────────────────── */

/* Sección genérica */
.disc-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Título de sección — mayor peso visual */
.disc-section__title {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    color: var(--text-white);
    padding-bottom: 6px;
    border-bottom: 1px solid var(--border-subtle);
}

/* ── Tags / Píldoras de equipos ── */
.disc-tags-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

/* Píldora de equipo (rosa) */
.disc-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    background: var(--accent-pink);
    color: #1a1a1a;
    border-radius: var(--radius-pill);
    font-size: 12px;
    font-weight: 600;
}

/* Botón × dentro de la píldora */
.disc-tag__remove {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    font-size: 15px;
    line-height: 1;
    color: rgba(0, 0, 0, 0.55);
    transition: color 0.15s ease;
    display: flex;
    align-items: center;
}

.disc-tag__remove:hover {
    color: rgba(0, 0, 0, 0.90);
}

/* Botón "+" para agregar equipo */
.disc-tags-add {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    border: 1.5px solid rgba(255, 255, 255, 0.30);
    color: var(--text-white);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.disc-tags-add svg {
    width: 14px;
    height: 14px;
}

/* ────────────────────────────────────────────────────────────
   12e. Listas de puntajes (gráficas / certamen)
──────────────────────────────────────────────────────────── */

.disc-score-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    list-style: none;
}

/* Fila de puntaje: label izq | valor der */
.disc-score-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.disc-score-row__label {
    font-size: 13px;
    font-weight: 400;
    color: var(--text-secondary);
    flex: 1;
}

/* Cuadro rosa con el valor numérico */
.disc-score-row__val {
    border: 1px solid var(--accent-pink);
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 52px;
    padding: 5px 10px;
    color: var(--accent-pink);
    font-size: 13px;
    font-weight: 700;
    border-radius: 6px;
    text-align: center;
}

/* Variant más pequeño para las fases del sidebar */
.disc-score-row__val--sm {
    min-width: 36px;
    font-size: 12px;
    padding: 4px 8px;
}

/* ────────────────────────────────────────────────────────────
   12f. Sidebar lateral: bloques de control
──────────────────────────────────────────────────────────── */

/* Bloque genérico del sidebar de config */
.disc-side-block {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.disc-side-block__label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    color: var(--text-muted);
}

.disc-side-block__sublabel {
    font-size: 10px;
    font-weight: 400;
    color: var(--text-muted);
}

/* ── Color picker ── */
.disc-color-pick {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: var(--radius-btn);
    padding: 8px 12px;
}

/* Muestra del color */
.disc-color-swatch {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    flex-shrink: 0;
    border: 1px solid rgba(255, 255, 255, 0.20);
}

/* Código hexadecimal resaltado en azul */
.disc-color-hex {
    flex: 1;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    font-weight: 600;
    color: #5190ff;
    letter-spacing: 0.5px;
}

/* Botón cuentagotas */
.disc-color-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 2px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    transition: color 0.2s ease;
    border-radius: 4px;
}

.disc-color-btn:hover {
    color: var(--text-white);
}

.disc-color-btn svg {
    width: 16px;
    height: 16px;
}

/* ── Stepper de duración (Rediseño Estilo Badge) ── */
.disc-stepper {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.03);
    padding: 10px 18px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    transition: all 0.2s ease;
    width: fit-content;
}

.disc-stepper:hover {
    border-color: var(--accent-pink);
    background: rgba(224, 136, 191, 0.05);
    transform: translateY(-1px);
}

.disc-stepper__value {
    color: var(--accent-pink);
    font-size: 22px;
    font-weight: 700;
    font-family: inherit;
    line-height: 1;
    display: flex;
    align-items: center;
    gap: 6px;
}

.disc-stepper__value::after {
    content: 'min';
    font-size: 12px;
    font-weight: 500;
    opacity: 0.6;
    text-transform: lowercase;
}

/* ── Radio buttons de tipo de eliminación ── */
.disc-radio-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.disc-radio {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 400;
    color: var(--text-secondary);
}

.disc-radio input[type="radio"] {
    accent-color: var(--accent-pink);
    width: 15px;
    height: 15px;
    flex-shrink: 0;
    cursor: pointer;
}

.disc-radio:has(input:checked) {
    color: var(--text-white);
    font-weight: 500;
}

/* ── Botón Guardar ── */
.disc-save-btn {
    margin-top: auto;
    width: 100%;
    padding: 14px 0;
    background: var(--accent-pink);
    color: #1a1a1a;
    border: none;
    border-radius: var(--radius-btn);
    font-family: var(--font-main);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 1.2px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}

.disc-save-btn:hover {
    background: var(--accent-pink-hover);
    transform: translateY(-2px);
}

.disc-save-btn svg {
    width: 18px;
    height: 18px;
}

/* Versión compacta de la lista de puntajes (para sidebar config) */
.disc-score-list--compact {
    gap: 6px;
}

.disc-score-list--compact .disc-score-row__label {
    font-size: 11px;
}

/* ────────────────────────────────────────────────────────────
   13. MODAL EQUIPOS + MATCH CARD DYNAMIC
──────────────────────────────────────────────────────────── */

/* Overlay */
.eq-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.eq-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(4px);
}

.eq-modal__box {
    position: relative;
    background: #2c2a29;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 28px 32px;
    width: 420px;
    max-width: 95vw;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.eq-modal__title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 20px;
}

/* Form */
.eq-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.eq-form__label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-bottom: 2px;
}

.eq-form__input {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 9px 12px;
    font-family: var(--font-main);
    font-size: 13px;
    color: var(--text-primary);
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.15s;
}

.eq-form__input:focus {
    border-color: var(--accent-pink);
}

.eq-form__actions {
    display: flex;
    gap: 10px;
    margin-top: 8px;
    justify-content: flex-end;
}

.eq-form__cancel {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    padding: 8px 18px;
    font-family: var(--font-main);
    font-size: 13px;
    color: var(--text-muted);
    cursor: pointer;
    transition: border-color 0.15s, color 0.15s;
}

.eq-form__cancel:hover {
    border-color: rgba(255, 255, 255, 0.3);
    color: var(--text-primary);
}

.eq-form__save {
    background: var(--accent-pink);
    border: none;
    border-radius: 8px;
    padding: 8px 22px;
    font-family: var(--font-main);
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    cursor: pointer;
    transition: opacity 0.15s, transform 0.15s;
}

.eq-form__save:hover {
    opacity: 0.88;
    transform: translateY(-1px);
}

.eq-form__save:disabled {
    opacity: 0.5;
    cursor: wait;
}

/* Match-card dynamic edit button */
.match-card__edit {
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    padding: 4px;
    display: flex;
    align-items: center;
    transition: color 0.15s;
}

.match-card__edit:hover {
    color: var(--accent-pink);
}

.match-card__edit svg {
    width: 15px;
    height: 15px;
}