/* ── Net Force Calculator ───────────────────────────────────────── */

.nfc-wrap {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    max-width: 900px;
    margin: 2rem auto;
    background: #eef2ff;
    border: 1.5px solid #c7d2fe;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 6px 32px rgba(67,56,202,0.13);
    color: #1e1b4b;
    box-sizing: border-box;
}
.nfc-wrap *, .nfc-wrap *::before, .nfc-wrap *::after { box-sizing: border-box; }

/* ── Header ── */
.nfc__header {
    background: linear-gradient(135deg, #1e1b4b 0%, #312e81 40%, #4338ca 75%, #4f46e5 100%);
    padding: clamp(1.4rem, 4vw, 2rem) clamp(1.2rem, 4vw, 2rem);
}
.nfc__header h2 {
    font-size: clamp(1.25rem, 4vw, 1.75rem) !important;
    font-weight: 900 !important; color: #fff !important;
    margin: 0 0 0.35rem 0 !important; letter-spacing: -0.01em; line-height: 1.25;
}
.nfc__header p { font-size: 0.9rem; color: #c7d2fe; margin: 0; line-height: 1.55; }

/* ── Body ── */
.nfc__body { background: #eef2ff; }

/* ── Tabs ── */
.nfc__tabs { display: flex; border-bottom: 1.5px solid #c7d2fe; background: #eef2ff; }
.nfc__tab {
    flex: 1; padding: 12px 8px; font-size: 12px; font-weight: 700; cursor: pointer;
    border: none; border-bottom: 3px solid transparent;
    background: transparent; color: #3730a3; transition: all 0.15s; font-family: inherit;
}
.nfc__tab--active { background: #fff; color: #4338ca; border-bottom-color: #4f46e5; }
.nfc__tab:hover:not(.nfc__tab--active) { background: #e0e7ff; color: #3730a3; }

/* ── Inner white card ── */
.nfc__inner { background: #fff; padding: 0 0 4px; }

/* ── Mode formula ── */
.nfc__mode-desc { padding: 16px 22px 0; }
.nfc__formula-badge {
    display: inline-block; background: #eef2ff; border: 1.5px solid #c7d2fe;
    color: #3730a3; font-family: 'Courier New', Courier, monospace;
    font-size: 14px; font-weight: 800; padding: 6px 16px; border-radius: 8px;
}

/* ── Presets ── */
.nfc__presets-section { padding: 14px 22px 0; }
.nfc__presets-label {
    display: block; font-size: 11px; font-weight: 800; text-transform: uppercase;
    letter-spacing: 1.5px; color: #94a3b8; margin-bottom: 8px;
}
.nfc__presets { display: flex; flex-wrap: wrap; gap: 6px; }
.nfc__preset {
    padding: 5px 12px; border-radius: 6px; border: 1.5px solid #c7d2fe;
    background: #eef2ff; color: #3730a3; font-size: 11.5px; font-weight: 600;
    cursor: pointer; font-family: inherit; transition: all 0.15s;
}
.nfc__preset:hover { border-color: #818cf8; background: #e0e7ff; color: #4338ca; }
.nfc__preset.nfc--active { border-color: #4f46e5; background: #e0e7ff; color: #4f46e5; }

/* ── Inputs ── */
.nfc__inputs {
    display: grid; grid-template-columns: 1fr auto 1fr;
    align-items: end; gap: 14px; padding: 18px 22px 0;
}
.nfc__col-label {
    display: flex; align-items: center; gap: 7px;
    font-size: 0.82rem; font-weight: 600; color: #1e1b4b; margin-bottom: 8px;
}
.nfc__col-badge {
    width: 26px; height: 26px; border-radius: 50%; background: #e0e7ff; color: #4338ca;
    font-size: 13px; font-weight: 900; font-family: 'Courier New', monospace;
    display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.nfc__inputs-sym {
    font-size: 22px; font-weight: 700; color: #c7d2fe;
    text-align: center; padding-bottom: 10px; align-self: end;
}
.nfc__input-row {
    display: flex; border: 2px solid #c7d2fe; border-radius: 10px;
    overflow: hidden; transition: border-color 0.2s;
}
.nfc__input-row:focus-within {
    border-color: #4f46e5; box-shadow: 0 0 0 3px rgba(79,70,229,0.12);
}
.nfc__input {
    flex: 1; border: none; outline: none; padding: 0.7rem 0.85rem;
    font-size: 1.05rem; color: #1e1b4b; background: transparent; font-weight: 600; width: 100%;
    -moz-appearance: textfield;
}
.nfc__input::-webkit-outer-spin-button,
.nfc__input::-webkit-inner-spin-button { -webkit-appearance: none; }
.nfc__input::placeholder { color: #94a3b8; font-weight: 400; }
.nfc__unit {
    background: #e0e7ff; color: #4338ca; padding: 0.7rem 0.85rem;
    font-size: 0.82rem; font-weight: 700; white-space: nowrap;
}

/* ── Action ── */
.nfc__action { padding: 14px 22px 18px; display: flex; flex-direction: column; gap: 6px; }
.nfc__btn {
    align-self: flex-start; padding: 11px 36px;
    background: linear-gradient(135deg, #4338ca, #4f46e5);
    color: #fff; border: none; border-radius: 10px;
    font-size: 14px; font-weight: 700; cursor: pointer; font-family: inherit;
    box-shadow: 0 2px 10px rgba(67,56,202,0.3); transition: opacity 0.15s;
}
.nfc__btn:hover { opacity: 0.9; }
.nfc__error { margin: 0; font-size: 13px; color: #ef4444; }

/* ── Result bar ── */
.nfc__result-bar {
    display: flex; align-items: center; flex-wrap: wrap; gap: 10px;
    background: #eef2ff; border-top: 1.5px solid #c7d2fe; border-bottom: 1.5px solid #c7d2fe;
    padding: 12px 22px;
}
.nfc__result-label {
    font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 1.5px; color: #4338ca;
}
.nfc__result-value { font-family: 'Courier New', monospace; font-size: 16px; font-weight: 900; color: #3730a3; }
.nfc__verify-badge {
    margin-left: auto; background: #dcfce7; color: #15803d;
    font-size: 11px; font-weight: 800; border-radius: 20px; padding: 3px 10px; letter-spacing: 0.5px;
}

/* ── Steps panels ── */
.nfc__steps-wrap { padding: 18px 22px 0; }
.nfc__steps-wrap--rev { padding-bottom: 20px; }
.nfc__steps-panel { border: 1.5px solid; border-radius: 12px; overflow: hidden; }
.nfc__steps-panel--fwd { border-color: #c7d2fe; }
.nfc__steps-panel--rev { border-color: #ddd6fe; }

.nfc__steps-header { padding: 10px 18px; font-weight: 800; font-size: 12px; letter-spacing: 1.5px; text-transform: uppercase; }
.nfc__steps-header--fwd { background: #eef2ff; color: #4338ca; border-bottom: 1.5px solid #c7d2fe; }
.nfc__steps-header--rev { background: #f5f3ff; color: #6d28d9; border-bottom: 1.5px solid #ddd6fe; }

/* ── Step item ── */
.nfc__step { padding: 14px 18px; border-bottom: 1px solid #f1f5f9; background: #fff; }
.nfc__step:last-child { border-bottom: none; }

.nfc__stp-label-row { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.nfc__stp-num {
    width: 22px; height: 22px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 11px; font-weight: 800; flex-shrink: 0;
}
.nfc__steps-panel--fwd .nfc__stp-num { background: #e0e7ff; color: #4338ca; }
.nfc__steps-panel--rev .nfc__stp-num { background: #ede9fe; color: #6d28d9; }
.nfc__stp-label { font-size: 13px; font-weight: 600; color: #334155; }

.nfc__stp-formula {
    font-size: 12px; color: #64748b; background: #f8fafc;
    border-radius: 0 6px 6px 0; padding: 4px 10px; margin-bottom: 8px;
    display: inline-block; font-family: 'Courier New', Courier, monospace; font-style: italic;
    border-left: 3px solid;
}
.nfc__steps-panel--fwd .nfc__stp-formula { border-left-color: #c7d2fe; }
.nfc__steps-panel--rev .nfc__stp-formula { border-left-color: #ddd6fe; }

.nfc__stp-calc { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; font-size: 13px; }
.nfc__stp-val  { font-weight: 600; color: #334155; }
.nfc__stp-eq   { font-weight: 400; color: #94a3b8; }
.nfc__stp-arrow { color: #94a3b8; }

.nfc__stp-result { font-size: 13px; font-weight: 900; padding: 4px 12px; border-radius: 20px; display: inline-block; }
.nfc__steps-panel--fwd .nfc__stp-result { background: #e0e7ff; color: #4338ca; }
.nfc__steps-panel--rev .nfc__stp-result { background: #ede9fe; color: #6d28d9; }

.nfc__stp-result--final { font-size: 15px; padding: 6px 18px; box-shadow: 0 2px 8px rgba(0,0,0,0.12); }
.nfc__steps-panel--fwd .nfc__stp-result--final { background: linear-gradient(90deg, #312e81, #4f46e5); color: #fff; }
.nfc__steps-panel--rev .nfc__stp-result--final { background: linear-gradient(90deg, #5b21b6, #7c3aed); color: #fff; }

/* ── Step divider ── */
.nfc__steps-divider {
    display: flex; align-items: center; gap: 12px;
    background: #f5f3ff; padding: 10px 20px;
    border-top: 1.5px solid #ddd6fe; border-bottom: 1.5px solid #ddd6fe; margin-top: 18px;
}
.nfc__steps-divider::before, .nfc__steps-divider::after { content: ''; flex: 1; height: 1px; background: #ddd6fe; }
.nfc__steps-divider span {
    font-size: 11px; font-weight: 800; letter-spacing: 2px; text-transform: uppercase;
    color: #6d28d9; white-space: nowrap;
}

/* ── Reference table ── */
.nfc__table-section {
    padding: clamp(1rem, 3vw, 1.5rem);
    background: #fff; border-top: 1.5px solid #c7d2fe;
}
.nfc__table-title {
    font-size: clamp(0.9rem, 2.5vw, 1rem) !important;
    font-weight: 800 !important; color: #1e1b4b !important; margin: 0 0 0.85rem !important;
}
.nfc__table-wrap { overflow-x: auto; }
.nfc__table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.nfc__table thead tr { background: linear-gradient(90deg, #1e1b4b, #4338ca); }
.nfc__table thead th {
    color: #fff; padding: 0.6rem 1rem; text-align: left;
    font-weight: 700; font-size: 0.82rem; white-space: nowrap;
}
.nfc__table tbody tr:nth-child(even) { background: #eef2ff; }
.nfc__table tbody tr:hover { background: #e0e7ff; }
.nfc__table tbody td {
    padding: 0.5rem 1rem; color: #1e1b4b;
    font-weight: 500; border-bottom: 1px solid #c7d2fe;
}

/* ── Note ── */
.nfc__note {
    background: #eef2ff; border-top: 1.5px solid #c7d2fe;
    padding: 0.85rem clamp(1rem, 3vw, 1.5rem);
    font-size: 0.82rem; color: #1e1b4b; line-height: 1.65;
}

/* ── Responsive ── */
@media (max-width: 600px) {
    .nfc__inputs { grid-template-columns: 1fr; }
    .nfc__inputs-sym { display: none; }
    .nfc__tabs { font-size: 10.5px; }
}
