.f15-frt {
    --f15-frt-bg: #0f172a;
    --f15-frt-panel: #ffffff;
    --f15-frt-text: #0f172a;
    --f15-frt-muted: #64748b;
    --f15-frt-border: #dbe3ee;
    --f15-frt-accent: #1d4ed8;
    --f15-frt-accent-hover: #163fb3;
    --f15-frt-accent-dark: #1e3a8a;
    --f15-frt-soft: #f8fafc;
    --f15-frt-danger: #b91c1c;
    color: var(--f15-frt-text);
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 20px 32px;
}

.f15-frt *,
.f15-frt *::before,
.f15-frt *::after {
    box-sizing: border-box;
}

.f15-frt button,
.f15-frt input,
.f15-frt textarea,
.f15-frt select {
    font: inherit;
    letter-spacing: normal;
    text-transform: none;
}

.f15-frt__grid {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 24px;
    margin-bottom: 24px;
}

.f15-frt__panel {
    background: var(--f15-frt-panel);
    border: 1px solid var(--f15-frt-border);
    border-radius: 24px;
    padding: 22px;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.06);
}

.f15-frt__panel--output {
    margin-top: 0;
}

.f15-frt__panel-head {
    margin-bottom: 16px;
}

.f15-frt__panel-head--split {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.f15-frt__panel h3 {
    margin: 0;
    font-size: 20px;
    line-height: 1.2;
    color: var(--f15-frt-text);
}

.f15-frt__textarea,
.f15-frt__table input[type="text"] {
    width: 100%;
    border: 1px solid var(--f15-frt-border);
    border-radius: 16px;
    background: #ffffff;
    color: var(--f15-frt-text);
    font-size: 15px;
    line-height: 1.5;
    box-shadow: none;
}

.f15-frt__textarea {
    min-height: 340px;
    resize: vertical;
    padding: 16px 18px;
}

.f15-frt__textarea--output {
    min-height: 280px;
    background: var(--f15-frt-soft);
}

.f15-frt__textarea:focus,
.f15-frt__table input[type="text"]:focus {
    outline: none;
    border-color: var(--f15-frt-accent);
    box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.12);
}

.f15-frt__mapping-wrap {
    width: 100%;
    overflow: hidden;
}

/* Reset fuerte para tabla del mapping */
.f15-frt .f15-frt__table,
.f15-frt .f15-frt__table thead,
.f15-frt .f15-frt__table tbody,
.f15-frt .f15-frt__table tr,
.f15-frt .f15-frt__table th,
.f15-frt .f15-frt__table td {
    background: transparent !important;
    border: 0 !important;
    border-top: 0 !important;
    border-right: 0 !important;
    border-bottom: 0 !important;
    border-left: 0 !important;
    box-shadow: none !important;
}

.f15-frt .f15-frt__table {
    width: 100%;
    margin: 0;
    table-layout: fixed;
    border-collapse: separate !important;
    border-spacing: 0 12px !important;
    background: transparent !important;
}

.f15-frt .f15-frt__table th {
    text-align: left;
    font-size: 13px !important;
    font-weight: 700 !important;
    line-height: 1.2;
    color: var(--f15-frt-muted) !important;
    padding: 0 10px 2px 0 !important;
    vertical-align: bottom !important;
}

.f15-frt .f15-frt__table th:last-child {
    padding-right: 0 !important;
    text-align: center !important;
}

.f15-frt .f15-frt__table td {
    padding: 0 10px 0 0 !important;
    vertical-align: middle !important;
}

.f15-frt .f15-frt__table td:last-child {
    padding-right: 0 !important;
}

.f15-frt .f15-frt__table input[type="text"] {
    display: block;
    width: 100%;
    height: 48px;
    min-height: 48px;
    margin: 0 !important;
    padding: 12px 14px !important;
    14px !important;
    border: 1px solid var(--f15-frt-border) !important;
    border-radius: 12px !important;
    background: #ffffff !important;
    color: var(--f15-frt-text) !important;
}

.f15-frt .f15-frt__remove-col {
    width: 64px !important;
    min-width: 64px !important;
    text-align: center !important;
}

/* Reset general de botones del tool */
.f15-frt button.f15-frt__button,
.f15-frt button.f15-frt__ghost,
.f15-frt button.f15-frt__remove,
.f15-frt .f15-frt__actions button,
.f15-frt .f15-frt__panel-head button,
.f15-frt button[data-action="add-row"] {
    -webkit-appearance: none !important;
    appearance: none !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    text-decoration: none !important;
    background-image: none !important;
    box-shadow: none !important;
    text-shadow: none !important;
    border: 0 !important;
    outline: 0 !important;
    cursor: pointer !important;
    font-size: 15px !important;
    font-weight: 400 !important;
    line-height: 1.2 !important;
    letter-spacing: normal !important;
    text-transform: none !important;
    transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease, transform 0.18s ease, opacity 0.18s ease !important;
}

/* Botones principales */
.f15-frt button.f15-frt__button,
.f15-frt .f15-frt__actions button {
    padding: 14px 22px !important;
    border-radius: 12px !important;
    background-color: var(--f15-frt-accent) !important;
    color: #ffffff !important;
    border-color: var(--f15-frt-accent) !important;
}

/* Add Row */
.f15-frt button.f15-frt__ghost,
.f15-frt .f15-frt__panel-head button,
.f15-frt button[data-action="add-row"] {
    padding: 14px 22px !important;
    border-radius: 12px !important;
    background-color: var(--f15-frt-accent) !important;
    color: #ffffff !important;
    border-color: var(--f15-frt-accent) !important;
    font-size: 15px !important;
    font-weight: 400 !important;
}

/* Botón remove */
.f15-frt button.f15-frt__remove {
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    margin: 0 auto !important;
    padding: 0 !important;
    border-radius: 12px !important;
    background-color: #1e66f5 !important;
    color: #ffffff !important;
    border-color: #1e66f5 !important;
    font-size: 24px !important;
    font-weight: 400 !important;
    line-height: 1 !important;
}

/* Hover/focus/active */
.f15-frt button.f15-frt__button:hover,
.f15-frt button.f15-frt__button:focus,
.f15-frt button.f15-frt__button:active,
.f15-frt .f15-frt__actions button:hover,
.f15-frt .f15-frt__actions button:focus,
.f15-frt .f15-frt__actions button:active,
.f15-frt button.f15-frt__ghost:hover,
.f15-frt button.f15-frt__ghost:focus,
.f15-frt button.f15-frt__ghost:active,
.f15-frt .f15-frt__panel-head button:hover,
.f15-frt .f15-frt__panel-head button:focus,
.f15-frt .f15-frt__panel-head button:active,
.f15-frt button[data-action="add-row"]:hover,
.f15-frt button[data-action="add-row"]:focus,
.f15-frt button[data-action="add-row"]:active {
    background-color: var(--f15-frt-accent-hover) !important;
    color: #ffffff !important;
    border-color: var(--f15-frt-accent-hover) !important;
    background-image: none !important;
    transform: translateY(-1px) !important;
}

.f15-frt button.f15-frt__remove:hover,
.f15-frt button.f15-frt__remove:focus,
.f15-frt button.f15-frt__remove:active {
    background-color: var(--f15-frt-accent-hover) !important;
    color: #ffffff !important;
    border-color: var(--f15-frt-accent-hover) !important;
    background-image: none !important;
    transform: translateY(-1px) !important;
}

.f15-frt button.f15-frt__button:visited,
.f15-frt button.f15-frt__ghost:visited,
.f15-frt button.f15-frt__remove:visited {
    color: inherit !important;
}

.f15-frt__note,
.f15-frt__meta,
.f15-frt__status {
    font-size: 14px;
    line-height: 1.5;
    color: var(--f15-frt-muted);
}

.f15-frt__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 24px;
}

.f15-frt__status {
    margin-top: 14px;
    min-height: 22px;
}

.f15-frt__status.is-error {
    color: var(--f15-frt-danger);
}

@media (max-width: 900px) {
    .f15-frt {
        padding: 0 16px 24px;
    }

    .f15-frt__grid {
        grid-template-columns: 1fr;
    }

    .f15-frt__textarea {
        min-height: 260px;
    }

    .f15-frt .f15-frt__table {
        border-spacing: 0 10px !important;
    }

    .f15-frt .f15-frt__table th {
        font-size: 12px !important;
        padding: 0 8px 2px 0 !important;
    }

    .f15-frt .f15-frt__table td {
        padding: 0 8px 0 0 !important;
    }

    .f15-frt .f15-frt__remove-col {
        width: 56px !important;
        min-width: 56px !important;
    }

    .f15-frt button.f15-frt__remove {
        width: 36px !important;
        height: 36px !important;
        min-width: 36px !important;
        font-size: 22px !important;
    }
}

@media (max-width: 640px) {
    .f15-frt__panel {
        border-radius: 20px;
        padding: 18px;
    }

    .f15-frt button.f15-frt__button,
    .f15-frt .f15-frt__actions button {
        width: 100% !important;
    }
}

/* ===== Placeholder reset ===== */
.f15-frt textarea::placeholder,
.f15-frt input[type="text"]::placeholder {
    font-size: 15px !important;
    line-height: 1.5 !important;
    font-weight: 400 !important;
    color: #94a3b8 !important;
    opacity: 1 !important;
}

.f15-frt textarea::-webkit-input-placeholder,
.f15-frt input[type="text"]::-webkit-input-placeholder {
    font-size: 15px !important;
    line-height: 1.5 !important;
    font-weight: 400 !important;
    color: #94a3b8 !important;
    opacity: 1 !important;
}

.f15-frt textarea::-moz-placeholder,
.f15-frt input[type="text"]::-moz-placeholder {
    font-size: 15px !important;
    line-height: 1.5 !important;
    font-weight: 400 !important;
    color: #94a3b8 !important;
    opacity: 1 !important;
}

.f15-frt textarea:-ms-input-placeholder,
.f15-frt input[type="text"]:-ms-input-placeholder {
    font-size: 15px !important;
    line-height: 1.5 !important;
    font-weight: 400 !important;
    color: #94a3b8 !important;
}