/* ==========================================================================
   Planificador [wabi_planificador]
   ========================================================================== */
.wbp-plan {
    --wbp-cols: 6;
    --wbp-verde: #173d32;
    --wbp-acento: #5b5bd6;
    --wbp-borde: #e1e4e8;
    --wbp-serif: Georgia, "Times New Roman", serif;
    width: 100%;
    box-sizing: border-box;
    color: var(--wbp-verde);
    font-family: inherit;
}
.wbp-plan *, .wbp-plan *::before, .wbp-plan *::after { box-sizing: border-box; }

/* --- Cabecera ----------------------------------------------------------- */
.wbp-plan-cab {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 28px;
    flex-wrap: wrap;
    background: #eef4ff;
    border-radius: 28px;
    padding: 34px 40px;
    margin-bottom: 14px;
}
.wbp-plan .wbp-eyebrow {
    display: block;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .16em;
    color: var(--wbp-acento);
    margin-bottom: 14px;
}
.wbp-plan h2 {
    margin: 0 0 14px;
    font-family: var(--wbp-serif);
    font-weight: 400;
    font-size: clamp(34px, 5vw, 54px);
    line-height: 1.05;
    letter-spacing: -.01em;
    color: var(--wbp-verde);
}
.wbp-plan h2 em { font-style: italic; color: var(--wbp-acento); }
.wbp-plan-cab-texto p { margin: 0; max-width: 460px; font-size: 14px; line-height: 1.5; color: #4a544c; }
.wbp-plan-controles { display: flex; gap: 12px; flex-wrap: wrap; }
.wbp-plan-controles label { display: block; margin-bottom: 6px; font-size: 12px; font-weight: 800; color: var(--wbp-verde); }
.wbp-plan-controles input,
.wbp-plan-controles select {
    height: 44px;
    min-width: 150px;
    padding: 0 14px;
    background: #fff;
    border: 1px solid #c9d3dc;
    border-radius: 14px;
    font-size: 13px;
    font-weight: 800;
    color: var(--wbp-verde);
    font-family: inherit;
    box-shadow: none;
    margin: 0;
}
.wbp-plan-controles select { min-width: 190px; }
.wbp-plan-controles input:focus,
.wbp-plan-controles select:focus { outline: 2px solid var(--wbp-acento); outline-offset: 1px; border-color: var(--wbp-acento); }

/* --- Tarjetas de resumen ------------------------------------------------ */
.wbp-resumen { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 14px; }
.wbp-tarjeta {
    background: #fff;
    border: 1px solid var(--wbp-borde);
    border-radius: 16px;
    padding: 14px 20px;
}
.wbp-tarjeta span { display: block; font-size: 11px; font-weight: 800; letter-spacing: .1em; color: #5b6b63; margin-bottom: 4px; }
.wbp-tarjeta strong { display: block; font-family: var(--wbp-serif); font-size: 22px; line-height: 1.2; color: var(--wbp-verde); }

/* --- Tabla -------------------------------------------------------------- */
.wbp-tabla-wrap {
    overflow-x: auto;
    border: 1px solid var(--wbp-borde);
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(23, 61, 50, .06);
}
.wbp-tabla { min-width: 760px; }
.wbp-fila {
    display: grid;
    grid-template-columns: minmax(250px, 36%) 1fr;
    border-top: 1px solid var(--wbp-borde);
    background: #fff;
    transition: background-color .2s;
}
.wbp-fila:first-child { border-top: 0; }
.wbp-fila:not(.wbp-fila-cab):hover { background: #fbfaf7; }
.wbp-fila.wbp-hecha,
.wbp-fila.wbp-hecha:not(.wbp-fila-cab):hover { background: #eff9f5; }
.wbp-fila-cab { background: #f6f3ff; }
.wbp-fila-cab .wbp-col-fase {
    padding: 22px 24px;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .16em;
    color: var(--wbp-verde);
}
.wbp-col-fase {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px 14px 24px;
    border-right: 2px solid #e4e1f2;
    min-width: 0;
}
.wbp-meses { display: grid; grid-template-columns: repeat(var(--wbp-cols), 1fr); }
.wbp-meses span {
    padding: 22px 0;
    text-align: center;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .1em;
    color: var(--wbp-acento);
    border-left: 1px solid #e8e5f6;
}
.wbp-meses span:first-child { border-left: 0; }

/* check */
.wbp-check { position: relative; flex: 0 0 auto; display: inline-flex; margin: 0; cursor: pointer; }
.wbp-check input { position: absolute; opacity: 0; width: 20px; height: 20px; margin: 0; cursor: pointer; }
.wbp-check span {
    width: 20px; height: 20px;
    border: 1.5px solid #8a9690;
    border-radius: 5px;
    background: #fff;
    display: inline-flex; align-items: center; justify-content: center;
    transition: background-color .15s, border-color .15s;
}
.wbp-check input:checked + span { background: #1f9d78; border-color: #1f9d78; }
.wbp-check input:checked + span::after {
    content: "";
    width: 5px; height: 10px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg) translate(-1px, -1px);
}
.wbp-check input:focus-visible + span { outline: 2px solid var(--wbp-acento); outline-offset: 2px; }

.wbp-color { flex: 0 0 auto; width: 10px; height: 44px; border-radius: 99px; }
.wbp-fase-texto { min-width: 0; }
.wbp-fase-texto strong { display: block; margin-bottom: 6px; font-size: 13.5px; font-weight: 800; line-height: 1.25; color: var(--wbp-verde); }
.wbp-hecha .wbp-fase-texto strong { text-decoration: line-through; color: #668078; }
.wbp-dias { display: flex; align-items: center; gap: 8px; }
.wbp-dias input {
    width: 58px; height: 30px;
    padding: 0 6px;
    text-align: center;
    background: #fff;
    border: 1px solid #b7cbc3;
    border-radius: 10px;
    font-size: 12.5px;
    font-weight: 800;
    color: var(--wbp-verde);
    font-family: inherit;
    box-shadow: none;
    margin: 0;
    -moz-appearance: textfield;
}
.wbp-dias input::-webkit-outer-spin-button,
.wbp-dias input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.wbp-dias input:focus { outline: 2px solid var(--wbp-acento); outline-offset: 1px; }
.wbp-dias span { font-size: 11.5px; color: #6b7770; }

/* --- Diagrama de Gantt -------------------------------------------------- */
.wbp-gantt {
    position: relative;
    min-height: 78px;
    background-image: linear-gradient(to right, #ecebf5 1px, transparent 1px);
    background-size: calc(100% / var(--wbp-cols)) 100%;
}
.wbp-barra-g {
    position: absolute;
    top: 25px;
    height: 16px;
    border-radius: 99px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, .18);
    transition: left .25s ease, width .25s ease;
}
.wbp-fechas {
    position: absolute;
    left: 12px;
    bottom: 10px;
    font-size: 10.5px;
    color: #5f6b64;
    white-space: nowrap;
}

.wbp-nota { margin: 10px 2px 0; font-size: 11.5px; color: #6b7770; }

@media (max-width: 767px) {
    .wbp-plan-cab { padding: 24px 20px; border-radius: 22px; align-items: stretch; }
    .wbp-plan-controles { width: 100%; }
    .wbp-plan-controles > div { flex: 1 1 140px; }
    .wbp-plan-controles input, .wbp-plan-controles select { width: 100%; min-width: 0; }
    .wbp-resumen { grid-template-columns: 1fr; gap: 10px; }
    .wbp-tabla-wrap { border-radius: 16px; }
}

@media (prefers-reduced-motion: reduce) {
    .wbp-barra-g, .wbp-fila { transition: none; }
}
