:root {
    --bg: #0b1220;
    --panel: #0f1a2e;
    --panel2: #0c1629;
    --text: #e6ecf5;
    --muted: #a9b4c4;
    --line: #21314f;
    --accent: #fcd34d;
    --ok: #41d19d;
    --warn: #f59e0b;
    --bad: #ef4444;
    --shadow: 0 10px 30px rgba(0,0,0,.35);
    --radius: 16px;
    --radius2: 12px;
    --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    --sans: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji";
}

* {
    box-sizing: border-box
}

body {
    margin: 0;
    font-family: var(--sans);
    background: linear-gradient(180deg, #070c16 0%, var(--bg) 100%);
    color: var(--text);
}

.tf-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 22px;
    border-bottom: 1px solid var(--line);
    background: rgba(11,18,32,.75);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 10;
}

.tf-brand {
    font-weight: 800;
    letter-spacing: .12em;
    color: var(--accent);
}

.tf-title {
    font-size: 18px;
    font-weight: 700;
    margin-top: 4px;
}

.tf-subtitle {
    font-size: 12px;
    color: var(--muted);
    margin-top: 2px;
}

.tf-header__left {
    display: flex;
    flex-direction: column;
    gap: 2px
}

.tf-header__right {
    display: flex;
    align-items: center;
    gap: 10px
}

.tf-pill {
    font-family: var(--mono);
    font-size: 12px;
    padding: 6px 10px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(15,26,46,.8);
    color: var(--muted);
}

    .tf-pill.is-ok {
        border-color: rgba(65,209,157,.35);
        color: var(--ok)
    }

    .tf-pill.is-warn {
        border-color: rgba(245,158,11,.35);
        color: var(--warn)
    }

    .tf-pill.is-bad {
        border-color: rgba(239,68,68,.35);
        color: var(--bad)
    }

.tf-statusbar {
    padding: 10px 22px;
    border-bottom: 1px solid var(--line);
    background: rgba(15,26,46,.35);
}

.tf-statusbar__row {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
    align-items: center;
    font-size: 12px;
    color: var(--muted);
}

.tf-label {
    color: #d5deea
}

.tf-logs {
    margin: 10px 0 0;
    padding: 12px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: rgba(12,22,41,.75);
    color: #cfe0ff;
    font-family: var(--mono);
    font-size: 12px;
    max-height: 220px;
    overflow: auto;
    white-space: pre-wrap;
}

.tf-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 18px 22px 28px;
}

@media (min-width: 1100px) {
    .tf-grid {
        grid-template-columns: 1.3fr .7fr;
    }

        .tf-grid > section:nth-child(3),
        .tf-grid > section:nth-child(4) {
            grid-column: 1 / -1;
        }
}

.tf-card {
    background: linear-gradient(180deg, rgba(15,26,46,.92), rgba(12,22,41,.92));
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 14px;
}

.tf-card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 4px 4px 12px;
    border-bottom: 1px solid rgba(33,49,79,.65);
}

    .tf-card__header h2 {
        margin: 0;
        font-size: 14px;
        letter-spacing: .02em;
    }

.tf-card__actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.tf-btn {
    background: rgba(252,211,77,.95);
    border: none;
    border-radius: 12px;
    padding: 10px 12px;
    font-weight: 700;
    cursor: pointer;
    color: #111827;
}

    .tf-btn:hover {
        filter: brightness(1.03);
    }

.tf-btn--ghost {
    background: transparent;
    border: 1px solid var(--line);
    color: var(--text);
}

.tf-btn--disabled,
.tf-btn:disabled {
    opacity: .45;
    cursor: not-allowed;
    filter: none;
}

.tf-input, .tf-select, .tf-textarea {
    width: 100%;
    background: rgba(7,12,22,.55);
    border: 1px solid var(--line);
    color: var(--text);
    border-radius: 12px;
    padding: 10px 12px;
    outline: none;
}

.tf-textarea {
    min-height: 120px;
    resize: vertical;
    font-family: var(--sans);
}

.tf-file {
    color: var(--muted);
}

.tf-form {
    margin-top: 12px;
    display: grid;
    gap: 10px;
}

.tf-form--2col {
    grid-template-columns: 1fr;
}

@media (min-width: 780px) {
    .tf-form--2col {
        grid-template-columns: 1fr 1fr;
    }
}

.tf-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

    .tf-field span {
        font-size: 12px;
        color: var(--muted);
    }

.tf-field--full {
    grid-column: 1 / -1;
}

.tf-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    padding: 12px 4px 6px;
}

.tf-tab {
    background: transparent;
    border: 1px solid var(--line);
    color: var(--muted);
    border-radius: 999px;
    padding: 8px 10px;
    cursor: pointer;
    font-weight: 700;
    font-size: 12px;
}

    .tf-tab.is-active {
        color: var(--text);
        border-color: rgba(252,211,77,.45);
        background: rgba(252,211,77,.10);
    }

.tf-pane {
    display: none;
    padding: 8px 4px 2px;
}

    .tf-pane.is-active {
        display: block;
    }

.tf-split {
    display: grid;
    gap: 12px;
    margin-top: 12px;
    grid-template-columns: 1fr;
}

@media (min-width: 980px) {
    .tf-split {
        grid-template-columns: 1fr 1fr;
    }
}

.tf-diff {
    border: 1px dashed rgba(252,211,77,.45);
    border-radius: 12px;
    padding: 10px;
    min-height: 120px;
    background: rgba(7,12,22,.25);
}

.tf-tablebar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 0 8px;
}

.tf-tablewrap {
    overflow: auto;
    border-radius: 12px;
    border: 1px solid var(--line);
}

.tf-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 760px;
}

    .tf-table thead th {
        text-align: left;
        font-size: 12px;
        color: var(--muted);
        padding: 10px 10px;
        border-bottom: 1px solid var(--line);
        background: rgba(12,22,41,.85);
        position: sticky;
        top: 0;
    }

    .tf-table tbody td {
        padding: 10px 10px;
        border-bottom: 1px solid rgba(33,49,79,.45);
        font-size: 13px;
    }

.tf-mini {
    font-size: 12px;
    color: var(--muted);
}

.tf-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.tf-hint {
    font-size: 12px;
    color: var(--muted);
}

.tf-muted {
    color: var(--muted);
}

.tf-footnote {
    margin-top: 10px;
    font-size: 12px;
    color: var(--muted);
}

.tf-progress {
    height: 10px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: rgba(7,12,22,.35);
    overflow: hidden;
}

.tf-progress__bar {
    height: 100%;
    background: rgba(252,211,77,.9);
}

.tf-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 12px;
}

.tf-listitem {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid rgba(33,49,79,.55);
    border-radius: 12px;
    background: rgba(7,12,22,.25);
}

.tf-badge {
    font-family: var(--mono);
    font-size: 11px;
    padding: 4px 8px;
    border-radius: 999px;
    border: 1px solid var(--line);
    color: var(--muted);
}

    .tf-badge.ok {
        border-color: rgba(65,209,157,.35);
        color: var(--ok);
    }

    .tf-badge.warn {
        border-color: rgba(245,158,11,.35);
        color: var(--warn);
    }

    .tf-badge.bad {
        border-color: rgba(239,68,68,.35);
        color: var(--bad);
    }

.tf-dashboard, .tf-ranking, .tf-cards {
    margin-top: 12px;
}

.tf-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: 12px;
}

.tf-footer {
    padding: 18px 22px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 12px;
}

/* Contenedor de barras */
.tf-bars {
    display: grid;
    gap: 10px;
    margin-top: 6px;
}

/* Fila */
.tf-barrow {
    display: grid;
    grid-template-columns: 180px 1fr 40px;
    align-items: center;
    gap: 14px;
}

/* Etiqueta */
.tf-barlabel {
    font-size: 14px;
    opacity: .9;
    letter-spacing: .2px;
}

/* Track */
.tf-bartrack {
    position: relative;
    height: 12px;
    border-radius: 999px;
    background: rgba(255,255,255,.10);
    overflow: hidden;
}

/* Fill */
.tf-barfill {
    height: 100%;
    width: 0%;
    border-radius: 999px;
    background: rgba(255,255,255,.70);
    transition: width 420ms ease;
}

    /* Valor dentro del fill */
    .tf-barfill .tf-barvalue-in {
        position: absolute;
        right: 10px;
        top: 50%;
        transform: translateY(-50%);
        font-size: 12px;
        opacity: .95;
        white-space: nowrap;
    }

/* Valor a la derecha */
.tf-barval {
    font-variant-numeric: tabular-nums;
    text-align: right;
    opacity: .9;
}

/* Pequeño detalle “glow” */
.tf-bartrack::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(255,255,255,.12), rgba(255,255,255,0));
    pointer-events: none;
}

/* ===== Fase 3: Barras PRO (umbrales + status + pill) ===== */

/* Ajuste fino del layout de la fila (mantiene tu grid actual) */
.tf-barrow {
    grid-template-columns: 200px 1fr 110px;
}

/* Track más alto + guías sutiles */
.tf-bartrack {
    height: 14px;
    background: linear-gradient(90deg, rgba(255,255,255,.10) 0%, rgba(255,255,255,.08) 50%, rgba(255,255,255,.10) 100%);
    border: 1px solid rgba(33,49,79,.55);
}

    /* “Gridlines” sutiles cada 25% (visual pro sin ruido) */
    .tf-bartrack::before {
        content: "";
        position: absolute;
        inset: 0;
        background: linear-gradient(90deg, transparent 0%, transparent 24.5%, rgba(255,255,255,.08) 25%, transparent 25.5%, transparent 49.5%, rgba(255,255,255,.08) 50%, transparent 50.5%, transparent 74.5%, rgba(255,255,255,.08) 75%, transparent 75.5%, transparent 100%);
        pointer-events: none;
    }

/* Fill base: usa el status desde data-status */
.tf-barrow[data-status="ok"] .tf-barfill {
    background: rgba(65,209,157,.75);
}

.tf-barrow[data-status="warn"] .tf-barfill {
    background: rgba(245,158,11,.75);
}

.tf-barrow[data-status="bad"] .tf-barfill {
    background: rgba(239,68,68,.70);
}

/* Pill del valor: siempre legible, alineada al final del fill */
.tf-barfill {
    position: relative;
    transition: width 520ms cubic-bezier(.2,.9,.2,1);
}

.tf-barvalue-pill {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 11px;
    font-family: var(--mono);
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(12,22,41,.75);
    border: 1px solid rgba(255,255,255,.18);
    color: rgba(255,255,255,.95);
    white-space: nowrap;
}

/* Marcadores de umbral */
.tf-thr {
    position: absolute;
    top: -6px;
    width: 2px;
    height: 26px;
    border-radius: 2px;
    opacity: .95;
    pointer-events: none;
}

.tf-thr--short {
    background: rgba(245,158,11,.85);
}
/* SHORTLIST */
.tf-thr--hire {
    background: rgba(65,209,157,.85);
}
/* HIRE */

/* Badge de status (re-usa tu .tf-badge existente) */
.tf-barval .tf-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 62px;
}

/* =======================
   Instrucciones de uso (Talent Fit)
   ======================= */
.tf-help {
    margin: 12px 0 18px;
}

.tf-help__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.tf-help__body {
    margin-top: 8px;
}

.tf-help__steps {
    margin: 10px 0 10px 20px;
}

    .tf-help__steps li {
        margin: 8px 0;
        line-height: 1.35;
    }

.tf-help__notes {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(255,255,255,0.08);
}

.tf-help__bullets {
    margin: 8px 0 0 18px;
}

.tf-muted {
    opacity: 0.85;
}
/* ===== Logo header ===== */
.tf-logo {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}

.tf-logo__img {
    height: 68px;
    width: auto;
    object-fit: contain;
    display: block;
}




/* ===== Footer legal ===== */
.tf-footer-legal {
    max-width: 1180px;
    margin: 18px auto 10px;
    padding: 14px 16px;
    opacity: 0.95;
}

    .tf-footer-legal h2 {
        margin: 0 0 8px;
        font-size: 14px;
    }

    .tf-footer-legal p {
        margin: 8px 0;
        line-height: 1.4;
    }

/* =======================
   Aviso legal (banner flotante estilo DOF)
   ======================= */
.tf-legal-banner {
    position: fixed;
    right: 18px;
    bottom: 84px; /* arriba del footer fijo */
    z-index: 70;
    width: min(560px, calc(100vw - 36px));
}

.tf-legal-banner__inner {
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,0.14);
    background: rgba(10,18,36,0.92);
    box-shadow: 0 12px 40px rgba(0,0,0,0.45);
    padding: 14px 16px 12px;
}

.tf-legal-banner__title {
    font-size: 16px;
    font-weight: 800;
    margin: 0 0 10px;
}

.tf-legal-banner__actions {
    display: flex;
    gap: 14px;
    align-items: center;
    margin-top: 10px;
}
