/* ── Sales Funnel design tokens ─────────────────────────────────────────── */

.sf-page {
    padding: 24px 32px 64px;
    background: var(--ds-surface-page, var(--gray-50));
    min-height: 100%;
}

.sf-page__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 28px;
}

.sf-page__title {
    font-family: var(--ds-font-display, "DM Serif Display", serif);
    font-size: 28px;
    margin: 0 0 4px 0;
}

.sf-page__title .ti {
    color: var(--ds-color-primary, var(--blue-600));
    margin-right: 8px;
}

.sf-page__subtitle {
    color: var(--ds-color-text-muted, var(--gray-500));
    margin: 0;
    font-size: 14px;
}

.sf-loading,
.sf-empty {
    background: var(--white);
    border: 1px solid var(--ds-color-border, var(--gray-200));
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    color: var(--ds-color-text-muted, var(--gray-500));
}

/* ── Stage summary row ──────────────────────────────────────────────────── */
.sf-stage-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 12px;
    margin-bottom: 24px;
}

.sf-stage-summary__item {
    background: var(--white);
    border: 1px solid var(--ds-color-border, var(--gray-200));
    border-radius: 10px;
    padding: 14px 16px;
    text-align: center;
}

.sf-stage-summary__count {
    font-family: var(--ds-font-display, "DM Serif Display", serif);
    font-size: 22px;
    color: var(--ds-color-text, var(--gray-900));
}

.sf-stage-summary__label {
    font-size: 12px;
    color: var(--ds-color-text-muted, var(--gray-500));
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ── Kanban board ───────────────────────────────────────────────────────── */
.sf-board {
    display: grid;
    grid-template-columns: repeat(11, minmax(220px, 1fr));
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 12px;
}

.sf-col {
    background: var(--white);
    border: 1px solid var(--ds-color-border, var(--gray-200));
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    min-height: 320px;
}

.sf-col__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px;
    border-bottom: 1px solid var(--ds-color-border, var(--gray-200));
}

.sf-col__name {
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: var(--ds-color-text, var(--gray-900));
}

.sf-col__count {
    background: var(--ds-color-surface-2, var(--gray-100));
    color: var(--ds-color-text-muted, var(--gray-500));
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
}

.sf-col__body {
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow-y: auto;
    max-height: 70vh;
}

.sf-col__empty {
    color: var(--ds-color-text-muted, var(--gray-400));
    text-align: center;
    padding: 20px 0;
    font-size: 13px;
}

/* ── Lead card ──────────────────────────────────────────────────────────── */
.sf-card {
    background: var(--ds-color-surface-1, var(--gray-50));
    border: 1px solid var(--ds-color-border, var(--gray-200));
    border-radius: 8px;
    padding: 10px 12px;
    cursor: pointer;
    transition: border-color 120ms ease, box-shadow 120ms ease;
}

.sf-card:hover {
    border-color: var(--ds-color-primary, var(--blue-600));
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.sf-card--demo {
    background: linear-gradient(to right, var(--gold-100) 0%, var(--gray-50) 12%);
}

.sf-card__name {
    font-weight: 600;
    font-size: 14px;
    color: var(--ds-color-text, var(--gray-900));
    display: flex;
    align-items: center;
    gap: 6px;
}

.sf-card__demo {
    background: var(--gold-400);
    color: #fff;
    font-size: 10px;
    padding: 1px 5px;
    border-radius: 4px;
    letter-spacing: 0.5px;
}

.sf-card__company {
    font-size: 12px;
    color: var(--ds-color-text-muted, var(--gray-500));
    margin-top: 2px;
}

/* ── Signal chips ───────────────────────────────────────────────────────── */
.sf-chip {
    display: inline-block;
    margin-top: 6px;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
}

.sf-chip--signal-high   { background: var(--green-100); color: var(--green-600); }
.sf-chip--signal-medium { background: var(--gold-100); color: var(--gold-700); }
.sf-chip--signal-low    { background: var(--gray-100); color: var(--gray-600); }

/* ── Closed row ─────────────────────────────────────────────────────────── */
.sf-closed-row {
    margin-top: 28px;
}

.sf-closed-row h3 {
    font-family: var(--ds-font-display, "DM Serif Display", serif);
    font-size: 16px;
    margin: 0 0 12px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sf-closed-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 10px;
}

.sf-closed-cell {
    background: var(--white);
    border: 1px solid var(--ds-color-border, var(--gray-200));
    border-radius: 8px;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.sf-closed-cell strong {
    font-family: var(--ds-font-display, "DM Serif Display", serif);
    font-size: 18px;
}

.sf-stage--won          { border-left: 3px solid var(--green-500); }
.sf-stage--lost         { border-left: 3px solid var(--red-500); }
.sf-stage--nurture      { border-left: 3px solid var(--gold-400); }
.sf-stage--disqualified { border-left: 3px solid var(--gray-500); }

/* ── Buttons ───────────────────────────────────────────────────────────── */
.sf-btn {
    background: var(--white);
    border: 1px solid var(--ds-color-border, var(--gray-200));
    color: var(--ds-color-text, var(--gray-900));
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: background 120ms ease, border-color 120ms ease;
}
.sf-btn:hover:not(:disabled) { background: var(--gray-50); border-color: var(--gray-300); }
.sf-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.sf-btn--primary { background: var(--ds-color-primary, var(--blue-600)); color: #fff; border-color: transparent; }
.sf-btn--primary:hover:not(:disabled) { background: var(--blue-700); }
.sf-btn--ghost { background: transparent; }
.sf-btn--danger { color: var(--red-500); }
.sf-btn--danger:hover:not(:disabled) { background: var(--red-100); }

/* ── Inputs ─────────────────────────────────────────────────────────────── */
.sf-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--ds-color-border, var(--gray-200));
    border-radius: 8px;
    font-size: 14px;
    background: var(--white);
    box-sizing: border-box;
    margin-bottom: 8px;
}
.sf-input:focus { border-color: var(--ds-color-primary, var(--blue-600)); outline: none; box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12); }
.sf-input--code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }

label {
    display: block;
    margin-top: 12px;
    margin-bottom: 4px;
    font-size: 12px;
    font-weight: 600;
    color: var(--ds-color-text-muted, var(--gray-500));
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.sf-hint { color: var(--ds-color-text-muted, var(--gray-500)); font-size: 12px; margin-top: 6px; }
/* The label of a field or a group (a <label for> or a <legend>) above its box. */
.sf-label { display: block; font-size: 12px; font-weight: 600; color: var(--ds-color-text-muted, var(--gray-500)); margin-bottom: var(--space-1); padding: 0; }

/* ── Filter row ────────────────────────────────────────────────────────── */
.sf-filter-row {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}
.sf-filter-row > .sf-input { flex: 1; min-width: 180px; margin-bottom: 0; }

/* ── Tables ─────────────────────────────────────────────────────────────── */
.sf-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--ds-color-border, var(--gray-200));
}
.sf-table thead th {
    background: var(--ds-color-surface-2, var(--gray-50));
    text-align: left;
    padding: 10px 14px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--ds-color-text-muted, var(--gray-500));
    border-bottom: 1px solid var(--ds-color-border, var(--gray-200));
}
.sf-table tbody td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--ds-color-border, var(--gray-100));
    font-size: 14px;
    color: var(--ds-color-text, var(--gray-900));
}
.sf-table tbody tr:last-child td { border-bottom: none; }
.sf-table tbody tr:hover { background: var(--gray-50); }

.sf-truncate {
    max-width: 320px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ── Stage pills ───────────────────────────────────────────────────────── */
.sf-stage-pill {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    background: var(--blue-100);
    color: var(--blue-800);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* ── Banners ───────────────────────────────────────────────────────────── */
.sf-banner {
    background: var(--blue-100);
    color: var(--blue-800);
    padding: 12px 16px;
    border-radius: 8px;
    margin: 12px 0;
    border-left: 4px solid var(--blue-500);
}
.sf-banner--error { background: var(--red-100); color: var(--red-600); border-color: var(--red-500); }
.sf-banner--ok    { background: var(--green-100); color: var(--green-600); border-color: var(--green-500); }
/* A question before something irreversible (not an error): gold, with its buttons on one wrapping row. */
.sf-banner--warn  { background: var(--gold-100); color: var(--gold-700); border-color: var(--gold-500);
                    display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.sf-banner--warn .sf-banner__text { flex: 1 1 200px; min-width: 0; }

/* ── Modal ─────────────────────────────────────────────────────────────── */
.sf-modal {
    position: fixed;
    inset: 0;
    background: rgba(17, 24, 39, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}
.sf-modal__content {
    background: var(--white);
    border-radius: 12px;
    padding: 24px;
    width: 480px;
    max-width: calc(100vw - 32px);
    max-height: 90vh;
    overflow-y: auto;
}
.sf-modal__content h3 {
    margin: 0 0 16px 0;
    font-family: var(--ds-font-display, "DM Serif Display", serif);
}
.sf-modal__actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 20px;
}

/* ── Editor grid (Campaign editor, Settings) ───────────────────────────── */
.sf-editor-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
    gap: 16px;
}
.sf-card-section {
    background: var(--white);
    border: 1px solid var(--ds-color-border, var(--gray-200));
    border-radius: 12px;
    padding: 20px;
}
.sf-card-section h3 {
    margin: 0 0 12px 0;
    font-family: var(--ds-font-display, "DM Serif Display", serif);
    font-size: 16px;
}
.sf-card-section--full { grid-column: 1 / -1; }

/* ── Key/value tables (Lead overview) ──────────────────────────────────── */
.sf-kv { width: 100%; border-collapse: collapse; }
.sf-kv th {
    text-align: left;
    padding: 6px 8px;
    font-size: 12px;
    font-weight: 600;
    color: var(--ds-color-text-muted, var(--gray-500));
    width: 40%;
    vertical-align: top;
}
.sf-kv td { padding: 6px 8px; font-size: 13px; vertical-align: top; }

/* ── Integrations page ─────────────────────────────────────────────────── */
.sf-providers {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
    gap: 16px;
}
.sf-provider {
    background: var(--white);
    border: 1px solid var(--ds-color-border, var(--gray-200));
    border-radius: 12px;
    padding: 16px;
}
.sf-provider__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}
.sf-provider__actions {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

/* ── Lead detail page ──────────────────────────────────────────────────── */
.sf-lead-hero {
    background: var(--white);
    border: 1px solid var(--ds-color-border, var(--gray-200));
    border-radius: 12px;
    padding: 20px 24px;
    display: flex;
    gap: 20px;
    align-items: flex-start;
    margin-bottom: 16px;
}
.sf-lead-hero__avatar {
    width: 60px;
    height: 60px;
    background: var(--ds-color-primary, var(--blue-600));
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--ds-font-display, "DM Serif Display", serif);
    font-size: 22px;
    flex-shrink: 0;
}
.sf-lead-hero__main { flex: 1; }
.sf-lead-hero__main h1 {
    margin: 0;
    font-family: var(--ds-font-display, "DM Serif Display", serif);
    font-size: 24px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.sf-lead-hero__meta {
    color: var(--ds-color-text-muted, var(--gray-500));
    font-size: 14px;
    margin: 4px 0 8px 0;
}
.sf-lead-hero__chips { display: flex; gap: 8px; }
.sf-lead-hero__actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.sf-lead-tabs {
    display: flex;
    gap: 4px;
    border-bottom: 1px solid var(--ds-color-border, var(--gray-200));
    margin-bottom: 16px;
}
.sf-lead-tab {
    background: transparent;
    border: none;
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 600;
    color: var(--ds-color-text-muted, var(--gray-500));
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
}
.sf-lead-tab:hover { color: var(--ds-color-text, var(--gray-900)); }
.sf-lead-tab--active {
    color: var(--ds-color-primary, var(--blue-600));
    border-bottom-color: var(--ds-color-primary, var(--blue-600));
}

.sf-lead-tab-body { background: transparent; }

.sf-overview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
}

/* ── DM thread ─────────────────────────────────────────────────────────── */
.sf-dm-thread {
    background: var(--white);
    border: 1px solid var(--ds-color-border, var(--gray-200));
    border-radius: 12px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.sf-dm-bubble {
    max-width: 70%;
    padding: 10px 14px;
    border-radius: 14px;
    font-size: 14px;
}
.sf-dm-bubble--outbound {
    align-self: flex-end;
    background: var(--blue-100);
    color: var(--blue-900);
}
.sf-dm-bubble--inbound {
    align-self: flex-start;
    background: var(--gray-100);
    color: var(--gray-900);
}
.sf-dm-bubble__meta {
    font-size: 11px;
    color: var(--ds-color-text-muted, var(--gray-500));
    margin-top: 4px;
}

.sf-transcript {
    background: var(--ds-color-surface-2, var(--gray-50));
    padding: 12px;
    border-radius: 8px;
    font-size: 13px;
    white-space: pre-wrap;
    max-height: 320px;
    overflow-y: auto;
}

.sf-brief {
    background: var(--ds-color-surface-2, var(--gray-50));
    padding: 20px;
    border-radius: 8px;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 13px;
    white-space: pre-wrap;
    line-height: 1.5;
}
.sf-brief--rendered {
    font-family: var(--ds-font-body, "DM Sans", sans-serif);
    font-size: 14px;
    white-space: normal;
}
.sf-brief--rendered h1, .sf-brief--rendered h2, .sf-brief--rendered h3 {
    font-family: var(--ds-font-display, "DM Serif Display", serif);
    margin: 16px 0 8px 0;
}
.sf-brief--rendered h2 { font-size: 18px; }
.sf-brief--rendered h3 { font-size: 15px; }
.sf-brief--rendered ul, .sf-brief--rendered ol { padding-left: 22px; margin: 8px 0; }
.sf-brief--rendered li { margin: 4px 0; }
.sf-brief--rendered code {
    background: var(--gray-200);
    padding: 1px 5px;
    border-radius: 4px;
    font-size: 12px;
}
.sf-brief--rendered em { color: var(--ds-color-primary, var(--blue-600)); font-style: italic; }
.sf-brief--rendered strong { color: var(--ds-color-text, var(--gray-900)); }
.sf-brief--rendered hr {
    border: none;
    border-top: 1px solid var(--ds-color-border, var(--gray-200));
    margin: 12px 0;
}

/* ── SP4: Notification list + sidebar badge ──────────────────────────── */
.sf-nav-badge {
    background: var(--red-500);
    color: #fff;
    font-size: 10px;
    padding: 1px 6px;
    border-radius: 999px;
    margin-left: auto;
    font-weight: 700;
}
.sb-link-with-badge {
    position: relative;
}
.sb-link-with-badge .sf-nav-badge {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
}

.sf-notif-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.sf-notif {
    display: flex;
    gap: 12px;
    background: var(--white);
    border: 1px solid var(--ds-color-border, var(--gray-200));
    border-radius: 10px;
    padding: 12px 16px;
    cursor: pointer;
    transition: border-color 120ms ease;
    position: relative;
}
.sf-notif:hover { border-color: var(--ds-color-primary, var(--blue-600)); }
.sf-notif--unread { background: var(--blue-100); border-color: var(--blue-300); }
.sf-notif__icon {
    width: 36px;
    height: 36px;
    background: var(--ds-color-surface-2, var(--gray-100));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--ds-color-primary, var(--blue-600));
    flex-shrink: 0;
}
.sf-notif__body { flex: 1; min-width: 0; }
.sf-notif__title { font-weight: 600; font-size: 14px; }
.sf-notif__text { color: var(--ds-color-text-muted, var(--gray-500)); font-size: 13px; margin-top: 2px; }
.sf-notif__meta {
    font-size: 11px;
    color: var(--ds-color-text-muted, var(--gray-400));
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}
.sf-notif__dot {
    width: 8px;
    height: 8px;
    background: var(--blue-600);
    border-radius: 50%;
    align-self: center;
    flex-shrink: 0;
}

/* SP5: onboarding wizard */
.sf-wizard {
    list-style: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.sf-wizard__step {
    background: var(--white);
    border: 1px solid var(--ds-color-border, var(--gray-200));
    border-left: 4px solid var(--ds-color-primary, var(--blue-600));
    border-radius: 10px;
    padding: 16px 20px;
}
.sf-wizard__step h3 {
    margin: 0 0 8px 0;
    font-family: var(--ds-font-display, "DM Serif Display", serif);
    font-size: 16px;
}
.sf-wizard__step--done {
    border-left-color: var(--green-500);
    background: var(--green-100);
}

/* ── LinkedIn asistido: "Por contactar" (theme tokens only: light + dark) ─────────────────────── */
.sf-chip--warn { background: var(--gold-100); color: var(--gold-700); }
.sf-banner--info {
    background: var(--ds-color-surface-2, var(--gray-50));
    color: var(--ds-color-text, var(--gray-900));
    border-color: var(--ds-color-primary, var(--blue-600));
}
.sf-outreach-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}
.sf-outreach-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid var(--ds-color-border, var(--gray-200));
    background: var(--white);
    color: var(--ds-color-text-muted, var(--gray-500));
    font-size: 14px;
    cursor: pointer;
}
.sf-outreach-tab:hover { color: var(--ds-color-text, var(--gray-900)); }
.sf-outreach-tab--active {
    border-color: var(--ds-color-primary, var(--blue-600));
    color: var(--ds-color-text, var(--gray-900));
    font-weight: 600;
}
.sf-outreach-count {
    min-width: 22px;
    padding: 1px 7px;
    border-radius: 999px;
    background: var(--gray-100);
    color: var(--gray-700);
    font-size: 12px;
    text-align: center;
}
.sf-outreach-tab--active .sf-outreach-count { background: var(--ds-color-primary, var(--blue-600)); color: #fff; }
.sf-outreach-list { display: flex; flex-direction: column; gap: 8px; }
.sf-outreach-row {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1.6fr) auto;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--white);
    border: 1px solid var(--ds-color-border, var(--gray-200));
    border-radius: 12px;
}
.sf-outreach-row--open { border-color: var(--ds-color-primary, var(--blue-600)); }
.sf-outreach-row__main { display: flex; flex-direction: column; min-width: 0; }
.sf-outreach-row__name { font-weight: 600; color: var(--ds-color-text, var(--gray-900)); text-decoration: none; }
.sf-outreach-row__name:hover { text-decoration: underline; }
.sf-outreach-row__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-width: 0; }
.sf-outreach-row__card { grid-column: 1 / -1; }
.sf-outreach-card { display: flex; flex-direction: column; gap: 8px; }
.sf-outreach-card__head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.sf-outreach-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.sf-outreach-paste summary { cursor: pointer; color: var(--ds-color-text-muted, var(--gray-500)); font-size: 14px; margin: 4px 0; }
.sf-outreach-close { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 8px; align-items: center; }
.sf-counter { font-size: 12px; color: var(--ds-color-text-muted, var(--gray-500)); text-align: right; }
.sf-counter--over { color: var(--red-500); font-weight: 600; }
@media (max-width: 720px) {
    .sf-outreach-row { grid-template-columns: 1fr; }
}
/* ═══════════════════════════════════════════════════════════════
   Sales Funnel → Anuncios (plan 2026-11-14). Solo tokens del tema: claro y oscuro (--gold-500, nunca --gold-300).
   ═══════════════════════════════════════════════════════════════ */
.sf-page .sf-card-section + .sf-card-section, .ads-form .sf-card-section + .sf-card-section { margin-top: 16px; }
.sf-card-section h3 { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; color: var(--gray-900); }
.sf-card-section h3 > i { color: var(--gold-500); }
.ads-form { display: grid; gap: 0; max-width: 980px; }
.ads-form label, .ads-adform label, .ads-sim label, .ads-draft label { display: block; margin: 8px 0 4px; font-size: 12px; font-weight: 600; color: var(--gray-600); text-transform: none; letter-spacing: normal; }
.ads-form select.sf-input, .ads-adform select.sf-input, .ads-sim select.sf-input { color: var(--gray-900); }
.sf-page .sf-input { color: var(--gray-900); }
.ads-optional { font-weight: 400; color: var(--gray-500); }
.ads-step-n {
    display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 50%;
    background: var(--gold-100); color: var(--gold-700); border: 1px solid var(--gold-400); font-family: inherit; font-size: 12px; font-weight: 700;
}
.ads-form__actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 10px; margin-top: 14px; }
.ads-grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.ads-grid-5 { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 12px; }
.ads-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.ads-inline { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ads-inline > .sf-input { flex: 1 1 220px; margin-bottom: 0; }
.ads-inline.ads-provider-choice { margin-top: 8px; }
.ads-inline.ads-provider-choice > .sf-input { flex: 0 1 240px; }
.ads-inline--tight { display: inline-flex; gap: 4px; margin-left: 8px; font-family: inherit; font-size: 13px; font-weight: 400; }
.ads-checks { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 4px 0 8px; }
.ads-form .ads-check, .ads-sim .ads-check, .ads-check { display: inline-flex; align-items: center; gap: 6px; margin: 0; font-size: 13px; font-weight: 500; color: var(--gray-800); }
.ads-check input { accent-color: var(--gold-500); }
.ads-nowrap { white-space: nowrap; }
.ads-num { text-align: right; font-variant-numeric: tabular-nums; }
.sf-table th.ads-num { text-align: right; }
.ads-table-wrap { overflow-x: auto; }
.ads-table td, .ads-result td, .ads-result th { white-space: nowrap; }
.ads-cell-name { max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; color: var(--gray-900); }
.ads-cell-clip { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ads-actions { text-align: right; }
.ads-iconbtn { padding: 6px 8px; }
.ads-iconbtn i { font-size: 16px; }
.ads-platform { font-size: 18px; color: var(--gray-600); margin-right: 4px; }
.ads-kind {
    display: inline-flex; align-items: center; margin-left: 6px; padding: 1px 8px; border-radius: 999px; font-size: 11px; font-weight: 600;
    background: var(--blue-100); color: var(--blue-700); white-space: nowrap; max-width: 260px; overflow: hidden; text-overflow: ellipsis; vertical-align: middle;
}
.ads-kind--principal { background: var(--gold-100); color: var(--gold-700); border: 1px solid var(--gold-400); }

/* Formulario: buyer persona */
.ads-persona-list { display: grid; gap: 8px; }
.ads-form .ads-persona, .ads-persona {
    display: flex; align-items: flex-start; gap: 10px; margin: 0; padding: 10px 12px; border: 1.5px solid var(--gray-200); border-radius: 10px;
    background: var(--white); cursor: pointer; text-transform: none; letter-spacing: normal;
}
.ads-persona.is-selected { border-color: var(--gold-400); background: var(--gold-100); }
.ads-persona--new { border-style: dashed; }
.ads-persona input { margin-top: 3px; accent-color: var(--gold-500); }
.ads-persona__body { display: grid; gap: 2px; min-width: 0; }
.ads-persona__name { font-size: 14px; font-weight: 700; color: var(--gray-900); }
.ads-persona__summary { font-size: 12.5px; font-weight: 400; color: var(--gray-600); }
.ads-niche-new { margin-top: 10px; padding: 12px 14px; border: 1px solid var(--gold-400); border-radius: 10px; background: var(--gold-100); }

/* Cabecera y pasos */
.ads-head { min-width: 0; }
.ads-head__meta { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 6px; }
.ads-meta { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--gray-700); }
.ads-meta > i { color: var(--gold-500); }
.ads-steps { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 16px; padding-bottom: 0; border-bottom: 1px solid var(--gray-200); }
.ads-steps__tab {
    display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; border: 0; border-bottom: 3px solid transparent; background: transparent;
    color: var(--gray-600); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer;
}
.ads-steps__tab:hover { color: var(--gray-900); }
.ads-steps__tab.is-active { color: var(--gray-900); border-bottom-color: var(--gold-500); }
.ads-steps__count { padding: 0 7px; border-radius: 999px; background: var(--gray-100); color: var(--gray-700); font-size: 11px; font-weight: 700; }
.ads-section-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.ads-section-head h3 { margin: 0; }
.ads-count { font-family: inherit; font-size: 12px; font-weight: 600; color: var(--gray-500); }
.ads-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 14px 0; }
.ads-label { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 10px 0 4px; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--gold-700); }
.ads-ai {
    display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; border-radius: 999px; background: var(--purple-100); color: var(--purple-500);
    font-size: 11px; font-weight: 600; letter-spacing: normal; text-transform: none; white-space: nowrap;
}
.ads-hyp { padding: 1px 8px; border-radius: 999px; background: var(--orange-100); color: var(--orange-500); font-size: 11px; font-weight: 600; letter-spacing: normal; text-transform: none; }
.ads-list { margin: 4px 0 0; padding-left: 18px; display: grid; gap: 4px; font-size: 13px; line-height: 1.5; color: var(--gray-800); }
.ads-list--warn { color: var(--orange-500); }
.ads-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ads-chip {
    display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px; border-radius: 999px; background: var(--gray-100); color: var(--gray-700);
    font-size: 12px; font-weight: 600; white-space: nowrap;
}
.ads-chip--pin { background: var(--gold-100); color: var(--gold-700); }
.ads-spin { animation: ads-spin 1s linear infinite; }
@keyframes ads-spin { to { transform: rotate(360deg); } }

/* Paso 1 */
.ads-libraries { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 12px; }
.ads-library {
    display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border: 1px solid var(--gray-200); border-radius: 10px; background: var(--white);
    color: var(--blue-700); font-size: 13px; font-weight: 600; text-decoration: none;
}
.ads-library:hover { border-color: var(--gold-400); background: var(--gold-100); }
.ads-hints { display: grid; gap: 4px; margin-bottom: 12px; padding: 12px 14px; border-radius: 10px; background: var(--gray-50); border: 1px solid var(--gray-100); }
.ads-adform { margin: 8px 0 16px; padding: 14px 16px; border: 1px solid var(--gold-400); border-radius: 12px; background: var(--gray-50); }
.ads-formula { display: flex; gap: 6px; margin: 4px 0 12px; font-size: 12.5px; line-height: 1.5; color: var(--gray-600); }
.ads-formula > i { margin-top: 2px; color: var(--gold-500); }
.ads-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 14px; }
.ads-card { display: grid; align-content: start; gap: 8px; padding: 14px 16px; border: 1px solid var(--gray-200); border-radius: 12px; background: var(--white); }
.ads-card--top { border-color: var(--gold-400); border-width: 1.5px; }
.ads-card.is-out { opacity: .7; }
.ads-card__head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.ads-card__name { flex: 1 1 140px; min-width: 0; margin: 0; font-size: 15px; font-weight: 700; color: var(--gray-900); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ads-card__actions { display: inline-flex; flex-wrap: nowrap; align-items: center; gap: 2px; margin-left: auto; }
.ads-card__signals { margin: 0; font-size: 12.5px; color: var(--gray-600); }
.ads-card__text { margin: 0; font-size: 13px; line-height: 1.45; color: var(--gray-800); display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; white-space: pre-line; }
.ads-rank { padding: 2px 10px; border-radius: 999px; background: var(--gold-500); color: var(--gray-50); font-family: inherit; font-size: 11px; font-weight: 800; white-space: nowrap; }
.ads-score { padding: 8px 10px; border-radius: 8px; background: var(--gray-50); border: 1px solid var(--gray-100); }
.ads-score__total { font-size: 14px; font-weight: 800; color: var(--gray-900); }
.ads-score__note { margin-left: 6px; font-size: 12px; color: var(--gray-500); }
.ads-score__parts { margin: 4px 0 0; padding-left: 16px; display: grid; gap: 2px; font-size: 12px; color: var(--gray-700); }
.ads-shots { display: flex; flex-wrap: wrap; gap: 8px; }
.ads-shot { position: relative; width: 84px; height: 84px; margin: 0; border: 1px solid var(--gray-200); border-radius: 8px; overflow: hidden; background: var(--gray-50); }
.ads-shot img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ads-shot__ph { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; color: var(--gray-400); font-size: 22px; }
.ads-shot__x { position: absolute; top: 2px; right: 2px; width: 20px; height: 20px; padding: 0; border: 0; border-radius: 50%; background: var(--gray-900); color: var(--gray-50); font-size: 11px; cursor: pointer; opacity: .85; }
.ads-card .ads-shot--add, .ads-shot--add {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; margin: 0; border-style: dashed; color: var(--gray-600);
    font-size: 11px; font-weight: 600; cursor: pointer; text-transform: none; letter-spacing: normal;
}
.ads-shot--add:hover { border-color: var(--gold-400); color: var(--gold-700); }
.ads-file { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }

/* Paso 2 */
.ads-breakdown.ads-card--top { border-color: var(--gold-400); }
.ads-bd { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 12px; margin-top: 8px; }
.ads-bd__item { padding: 10px 12px; border: 1px solid var(--gray-100); border-radius: 10px; background: var(--gray-50); }
.ads-bd__item--warn { border-color: var(--orange-border); background: var(--orange-100); }
.ads-bd__item .ads-label { margin-top: 0; }
.ads-bd__item p { margin: 2px 0 0; font-size: 13px; line-height: 1.5; color: var(--gray-800); }
.ads-bd__item .ads-bd__sub { font-size: 12px; color: var(--gray-600); }
.ads-dl { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; margin: 2px 0 0; font-size: 13px; color: var(--gray-800); }
.ads-dl dt { font-weight: 600; color: var(--gray-600); }
.ads-dl dd { margin: 0; }
.ads-meter { display: flex; align-items: center; gap: 10px; margin: 4px 0; font-size: 13px; color: var(--gray-900); }
.ads-meter__bar { flex: 1; height: 8px; border-radius: 999px; background: var(--gray-200); overflow: hidden; }
.ads-meter__bar > span { display: block; height: 100%; border-radius: 999px; background: var(--gold-500); }
.ads-angle { margin: 2px 0 0; padding: 10px 12px; border-left: 3px solid var(--gold-500); background: var(--gold-100); border-radius: 0 8px 8px 0; font-size: 14px; line-height: 1.5; color: var(--gray-900); }

/* Paso 3 */
.ads-draft__name { flex: 1 1 260px; margin-bottom: 0; font-weight: 700; }
.ads-sub { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 18px 0 6px; font-size: 13px; font-weight: 700; color: var(--gray-900); }
.ads-sub > i { color: var(--gold-500); }
.ads-tabs { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 8px; }
.ads-tabs__tab { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border: 1px solid var(--gray-200); border-radius: 999px; background: var(--white); color: var(--gray-700); font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; }
.ads-tabs__tab.is-active { border-color: var(--gold-400); background: var(--gold-100); color: var(--gold-700); }
.ads-over-dot { padding: 0 6px; border-radius: 999px; background: var(--red-500); color: var(--white); font-size: 10px; font-weight: 800; }
.ads-copy { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 14px; }
.ads-copy__field label { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ads-counter { font-size: 11px; font-weight: 700; color: var(--gray-500); font-variant-numeric: tabular-nums; }
.ads-counter.is-over { color: var(--red-500); }
.sf-input.is-over { border-color: var(--red-500); }
.ads-over { display: block; font-size: 12px; font-weight: 600; color: var(--red-500); }
.ads-form__actions .ads-over { flex: 1 1 320px; }
.ads-prompts { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; }
.ads-prompt { display: grid; align-content: start; gap: 6px; padding: 10px 12px; border: 1px solid var(--gray-100); border-radius: 10px; background: var(--gray-50); }
.ads-prompt__head { display: flex; align-items: center; gap: 8px; color: var(--gray-900); }
.ads-format { display: inline-block; border: 2px solid var(--gold-500); border-radius: 3px; }
.ads-format--sq { width: 16px; height: 16px; }
.ads-format--v { width: 11px; height: 19px; }
.ads-format--h { width: 23px; height: 12px; }
.ads-generated { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0; }
.ads-generated img { max-width: 100%; border-radius: 8px; border: 1px solid var(--gray-200); }
.ads-generated figcaption { font-size: 11px; color: var(--gray-500); }
.ads-secs { width: 80px; margin-bottom: 0; }
/* Video del concepto (AdVideoPanel) */
.ads-video { display: grid; gap: 8px; padding: 10px 12px; border: 1px solid var(--gray-100); border-radius: 10px; background: var(--gray-50); }
.ads-video > .sf-hint, .ads-video__estimate > p { margin: 0; }
.ads-video__estimate { display: grid; gap: 6px; padding: 10px 12px; border: 1px solid var(--gold-400); border-radius: 10px; background: var(--gold-100); color: var(--gray-900); }
.ads-video__list { display: grid; gap: 8px; margin: 10px 0 0; padding: 0; list-style: none; }
.ads-video__item { display: grid; gap: 6px; padding: 10px 12px; border: 1px solid var(--gray-200); border-radius: 10px; background: var(--white); }
.ads-video__head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 12.5px; color: var(--gray-700); }
.ads-video__clip { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13px; color: var(--gray-800); }
.ads-video__clip .ads-over { display: inline; }
.ads-video__player { flex: 1 1 100%; max-width: 360px; max-height: 480px; border-radius: 8px; border: 1px solid var(--gray-200); }
/* Unir y editar (montaje): la lista ordenada de clips y lo que se elige de cada uno. Solo tokens del tema. */
.ads-montage { display: grid; gap: 8px; margin-top: 12px; padding: 10px 12px; border: 1px solid var(--gray-100); border-radius: 10px; background: var(--gray-50); }
.ads-montage > .sf-hint, .ads-montage > .ads-sub { margin: 0; }
.ads-montage__clips { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; counter-reset: montage; }
.ads-montage__clip { display: grid; gap: 6px; padding: 8px 10px; border: 1px solid var(--gray-200); border-radius: 10px; background: var(--white); }
.ads-montage__clip.is-out { border-style: dashed; background: transparent; }
.ads-montage__clip.is-out .ads-check b { color: var(--gray-500); font-weight: 500; }
.ads-montage__head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ads-montage__head .ads-check { flex: 1 1 200px; }
.ads-montage__order { display: inline-flex; gap: 4px; }
.ads-montage__order .sf-btn { padding: 4px 8px; }
.ads-montage__player { max-width: 200px; max-height: 240px; }
.ads-montage__edit { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 13px; color: var(--gray-800); }
.ads-montage__edit label { margin: 0; font-size: 12.5px; font-weight: 600; color: var(--gray-700); }
.ads-montage__edit .sf-input { margin-bottom: 0; }
.ads-montage__num { flex: 0 0 84px; width: 84px; font-variant-numeric: tabular-nums; }
.ads-montage__edit label.ads-montage__text { display: flex; flex: 1 1 100%; align-items: center; justify-content: space-between; gap: 8px; }
.ads-montage__edit input.ads-montage__text { flex: 1 1 100%; }
.ads-montage__edit .ads-over { flex: 1 1 100%; }
.ads-montage__total { margin: 0; padding: 8px 10px; border: 1px solid var(--gray-200); border-radius: 8px; background: var(--white); font-size: 13px; color: var(--gray-800); font-variant-numeric: tabular-nums; }
.ads-montage__total.is-over { border-color: var(--red-500); color: var(--red-500); }
.ads-scenes td { vertical-align: top; }
.ads-scenes .sf-input { margin-bottom: 0; font-size: 13px; }
.ads-scenes__s { width: 86px; }

/* Paso 4 */
.ads-sim { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.ads-sim .sf-card-section + .sf-card-section { margin-top: 0; }
.ads-scn th[scope="row"], .ads-result th[scope="row"] { text-align: left; font-size: 13px; font-weight: 600; color: var(--gray-700); white-space: nowrap; }
.ads-scn .sf-input, .ads-rates .sf-input { margin-bottom: 0; min-width: 84px; }
.ads-rate { max-width: 110px; margin-left: auto; text-align: right; }
.ads-sim .ads-slider, .ads-slider { display: grid; gap: 2px; margin: 8px 0; font-size: 13px; font-weight: 500; color: var(--gray-800); }
.ads-slider input[type="range"] { width: 100%; accent-color: var(--gold-500); }
.ads-result__strong td, .ads-result__strong th { font-weight: 800; color: var(--gray-900); }
.ads-result__worst { color: var(--orange-500); }
.ads-result__best { color: var(--green-500); }
.ads-good { color: var(--green-500); font-weight: 800; }
.ads-bad { color: var(--red-500); font-weight: 800; }
.ads-bars { display: grid; gap: 6px; margin: 14px 0 6px; }
.ads-bars__row { display: grid; grid-template-columns: 90px 1fr 150px; align-items: center; gap: 10px; font-size: 13px; color: var(--gray-800); }
.ads-bars__track { height: 12px; border-radius: 999px; background: var(--gray-100); overflow: hidden; }
.ads-bars__fill { display: block; height: 100%; border-radius: 999px; min-width: 2px; }
.ads-bars__fill--worst { background: var(--orange-500); }
.ads-bars__fill--expected { background: var(--gold-500); }
.ads-bars__fill--best { background: var(--green-500); }
.ads-sim__name { flex: 1 1 240px; max-width: 360px; margin-bottom: 0; }
.ads-comment { margin-top: 8px; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--purple-100); background: var(--gray-50); }
.ads-comment p { margin: 6px 0 0; font-size: 13.5px; line-height: 1.55; color: var(--gray-800); }
@media (max-width: 980px) {
    .ads-sim, .ads-two, .ads-copy, .ads-grid-3 { grid-template-columns: 1fr; }
    .ads-cards { grid-template-columns: 1fr; }
}

/* Anuncios: los textos largos se leen con la tipografía de la app (no monoespaciada) y la etiqueta de cada etapa cabe entera. */
.sf-page textarea.sf-input { font-family: inherit; line-height: 1.45; }
/* «Mi versión»: el guion creativo y los prompts de imagen se leen ENTEROS. El cuadro crece con su texto (field-sizing) y no baja de la
   altura de antes; donde el navegador aún no lo admite queda un cuadro más alto, con su propio desplazamiento y el tirador para estirarlo. */
.sf-page textarea.sf-input.ads-grow { field-sizing: content; min-height: calc(1.45em * 2 + 18px); resize: vertical; overflow-y: auto; }
.sf-page textarea.sf-input.ads-grow[rows="3"] { min-height: calc(1.45em * 3 + 18px); }
.sf-page .ads-prompt textarea.sf-input.ads-grow { min-height: calc(1.45em * 4 + 18px); }
@supports not (field-sizing: content) {
    .sf-page textarea.sf-input.ads-grow { min-height: calc(1.45em * 5 + 18px); }
    .sf-page .ads-prompt textarea.sf-input.ads-grow { min-height: calc(1.45em * 12 + 18px); }
}
.ads-rates td:first-child .sf-input { min-width: 150px; }
a.sf-btn { text-decoration: none; white-space: nowrap; }
.ads-kind--cell { margin-left: 0; }
.ads-table .ads-cell-name { max-width: 230px; }
.ads-table .ads-cell-clip { max-width: 190px; }
.ads-table th, .ads-table td { padding-left: 10px; padding-right: 10px; }
.ads-rates__source { font-size: 12px; color: var(--gray-600); min-width: 110px; }
.ads-rates th, .ads-rates td { padding-left: 8px; padding-right: 8px; }
/* Simulador: los números son campos de texto (sin flechas) y caben enteros: «65.22», «12500.5». */
.ads-rates .ads-rate { max-width: 124px; min-width: 104px; }
.ads-scn .ads-numinput { min-width: 104px; }
.ads-numinput { text-align: right; font-variant-numeric: tabular-nums; }
.ads-limits-note { margin: 6px 0 2px; font-size: 12px; color: var(--gray-500); }
.ads-numinput--bad, .ads-numinput--bad:focus { border-color: var(--red-500); }
