.tool-card-mark.fx,
.workspace-mark.fx {
    color: #0f5f57;
    background: #ccfbf1;
}

.fxs-shell {
    --fxs-green: #155b4b;
    --fxs-green-soft: #e8f3ee;
    --fxs-ink: #17211b;
    --fxs-muted: #66736c;
    --fxs-line: #d9e2dd;
    display: grid;
    gap: 18px;
    color: var(--fxs-ink);
}

.fxs-hero,
.fxs-settings,
.fxs-upload-card,
.fxs-result {
    border: 1px solid var(--fxs-line);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 12px 28px rgba(15, 48, 38, .06);
}

.fxs-hero {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    padding: 20px 22px;
    background: linear-gradient(135deg, #f8fcfa 0%, #edf7f2 100%);
}

.fxs-eyebrow {
    display: inline-flex;
    margin-bottom: 8px;
    color: var(--fxs-green);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .08em;
}

.fxs-hero h2,
.fxs-result h3 { margin: 0; }
.fxs-hero h2 { font-size: 25px; }
.fxs-hero p { max-width: 720px; margin: 9px 0 0; color: var(--fxs-muted); line-height: 1.75; }

.fxs-retention {
    flex: 0 0 auto;
    padding: 10px 14px;
    border-radius: 999px;
    color: var(--fxs-green);
    background: #fff;
    font-size: 12px;
    font-weight: 700;
}

.fxs-rule {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.fxs-rule > div {
    min-height: 0;
    padding: 13px 15px;
    border: 1px solid var(--fxs-line);
    border-radius: 14px;
    background: #fbfdfc;
}

.fxs-rule b { display: block; margin-bottom: 7px; color: var(--fxs-green); font-size: 13px; }
.fxs-rule span { color: var(--fxs-muted); font-size: 13px; line-height: 1.65; }

.fxs-service {
    padding: 11px 14px;
    border: 1px solid #cfe0d8;
    border-radius: 12px;
    color: #315d51;
    background: #f3faf6;
    font-size: 13px;
}
.fxs-service.error { color: #991b1b; border-color: #fecaca; background: #fff1f2; }

.fxs-settings { padding: 20px; }
.fxs-section-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 16px; }
.fxs-section-head strong { font-size: 17px; }
.fxs-section-head span { color: var(--fxs-muted); font-size: 12px; }

.fxs-setting-grid {
    display: grid;
    grid-template-columns: 1.15fr 1fr 1fr;
    gap: 14px;
}

.fxs-field { display: grid; gap: 7px; }
.fxs-field > span { font-size: 13px; font-weight: 700; }
.fxs-field small { color: var(--fxs-muted); font-size: 11px; }
.fxs-field select,
.fxs-field input {
    width: 100%;
    height: 42px;
    padding: 0 12px;
    border: 1px solid #cbd7d1;
    border-radius: 10px;
    color: var(--fxs-ink);
    background: #fff;
    font: inherit;
}
.fxs-field input:disabled { color: #7d8983; background: #f1f5f3; }

.fxs-upload-card { padding: 20px; }
.fxs-upload-zone {
    display: flex;
    align-items: center;
    gap: 16px;
    min-height: 118px;
    padding: 20px;
    border: 1.5px dashed #9ebeb1;
    border-radius: 15px;
    background: #f8fcfa;
    cursor: pointer;
}
.fxs-upload-zone:hover,
.fxs-upload-zone:focus-visible { border-color: var(--fxs-green); outline: none; }
.fxs-upload-zone.ready {
    border-style: solid;
    border-color: #72aa96;
    background: #f0faf5;
    box-shadow: inset 0 0 0 1px rgba(21, 91, 75, .05);
}
.fxs-upload-zone.ready .fxs-upload-mark { background: #0f766e; }
.fxs-upload-mark {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 13px;
    color: #fff;
    background: var(--fxs-green);
    font-weight: 800;
}
.fxs-upload-copy { display: grid; flex: 1; gap: 5px; }
.fxs-upload-copy strong { font-size: 16px; }
.fxs-upload-copy small { color: var(--fxs-muted); line-height: 1.55; }
.fxs-upload-feedback { margin: 11px 0 0; color: var(--fxs-muted); font-size: 12px; }

.fxs-actions,
.fxs-result-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.fxs-actions { margin-top: 15px; }
.fxs-actions .btn-primary { margin-left: auto; }

.fxs-status {
    padding: 14px 16px;
    border-radius: 12px;
    color: #315d51;
    background: var(--fxs-green-soft);
    line-height: 1.65;
}
.fxs-status.error { color: #991b1b; background: #fff1f2; }
.fxs-status ul { margin: 7px 0 0; padding-left: 20px; }

.fxs-result { overflow: hidden; scroll-margin-top: 88px; }
.fxs-result-head { display: flex; justify-content: space-between; gap: 18px; padding: 22px; border-bottom: 1px solid var(--fxs-line); }
.fxs-result-head p { margin: 6px 0 0; color: var(--fxs-muted); font-size: 13px; }
.fxs-rate-badge { text-align: right; }
.fxs-rate-badge strong { display: block; color: var(--fxs-green); font-size: 22px; }
.fxs-rate-badge span { color: var(--fxs-muted); font-size: 12px; }

.fxs-kpis {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 1px;
    background: var(--fxs-line);
}
.fxs-kpis > div { padding: 16px 18px; background: #fbfdfc; }
.fxs-kpis span { display: block; margin-bottom: 5px; color: var(--fxs-muted); font-size: 12px; }
.fxs-kpis strong { font-size: 18px; }
.fxs-kpis strong.has-warning { color: #a15c00; }

.fxs-warning-panel {
    margin: 18px 20px 0;
    overflow: hidden;
    border: 1px solid #f0c36a;
    border-radius: 14px;
    background: #fffaf0;
}
.fxs-warning-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    padding: 15px 17px;
    border-bottom: 1px solid #f2d99e;
    background: #fff4d9;
}
.fxs-warning-head > div { display: grid; gap: 4px; }
.fxs-warning-head span {
    color: #925300;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .08em;
}
.fxs-warning-head strong { color: #6f4000; font-size: 16px; }
.fxs-warning-head p {
    max-width: 620px;
    margin: 0;
    color: #7a5a25;
    font-size: 12px;
    line-height: 1.7;
}
.fxs-warning-list { display: grid; gap: 10px; padding: 14px; }
.fxs-warning-item {
    padding: 14px 15px;
    border: 1px solid #ead8af;
    border-radius: 11px;
    background: #fff;
}
.fxs-warning-item header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 9px;
}
.fxs-warning-item header strong { color: #5f3a06; font-size: 14px; }
.fxs-warning-item header span {
    flex: 0 0 auto;
    padding: 4px 8px;
    border-radius: 999px;
    color: #8a4b00;
    background: #ffedc2;
    font-size: 11px;
    font-weight: 700;
}
.fxs-warning-item p { margin: 5px 0 0; color: #6d5a3d; font-size: 12px; line-height: 1.65; }
.fxs-warning-item b { color: #4b3820; }

.fxs-table-wrap { overflow-x: auto; }
.fxs-table { width: 100%; min-width: 1120px; border-collapse: collapse; }
.fxs-table th { padding: 12px; color: #fff; background: var(--fxs-green); font-size: 12px; text-align: left; white-space: nowrap; }
.fxs-table td { padding: 12px; border-bottom: 1px solid #e5ebe8; font-size: 12px; vertical-align: top; }
.fxs-table td.money { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.fxs-table tbody tr:hover td { background: #f8fcfa; }
.fxs-tier { display: inline-flex; padding: 4px 8px; border-radius: 999px; color: #155b4b; background: #dff4ea; white-space: nowrap; }
.fxs-tier.fixed { color: #854d0e; background: #fef3c7; }

.fxs-script-list { display: grid; gap: 12px; padding: 20px; border-top: 1px solid var(--fxs-line); background: #fafcfb; }
.fxs-script-card { padding: 16px; border: 1px solid var(--fxs-line); border-radius: 13px; background: #fff; }
.fxs-script-card header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.fxs-script-card header strong { font-size: 14px; }
.fxs-script-card pre { margin: 12px 0 0; color: #34433c; font: 13px/1.75 inherit; white-space: pre-wrap; }
.fxs-script-card small { display: block; margin-top: 10px; color: var(--fxs-muted); }
.fxs-result-actions {
    justify-content: flex-end;
    padding: 14px 20px;
    border-top: 1px solid var(--fxs-line);
    border-bottom: 1px solid var(--fxs-line);
    background: #fff;
}
.fxs-result-actions > span {
    margin-right: auto;
    color: var(--fxs-muted);
    font-size: 12px;
}

@media (max-width: 900px) {
    .fxs-rule,
    .fxs-setting-grid,
    .fxs-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .fxs-hero { flex-direction: column; }
}

@media (max-width: 620px) {
    .fxs-rule,
    .fxs-setting-grid,
    .fxs-kpis { grid-template-columns: 1fr; }
    .fxs-upload-zone,
    .fxs-result-head,
    .fxs-warning-head { align-items: flex-start; flex-direction: column; }
    .fxs-warning-panel { margin: 14px 12px 0; }
    .fxs-rate-badge { text-align: left; }
    .fxs-actions .btn-primary { width: 100%; margin-left: 0; }
    .fxs-result-actions { align-items: stretch; flex-direction: column; }
    .fxs-result-actions > span { margin-right: 0; }
    .fxs-result-actions .btn-primary,
    .fxs-result-actions .btn-secondary,
    .fxs-result-actions .btn-text { width: 100%; }
}
