/* ═══════════════════════════════════════════════════════════════════════════
   Opsis Contábil — estilos do simulador tributário (complementa site.css)
   ═══════════════════════════════════════════════════════════════════════════ */

.noscript-note { margin: 0; padding: 14px 20px; text-align: center; background: #fff4e5; color: #7a4b00; font-weight: 600; }

.sim-section { padding: clamp(28px, 4vw, 48px) 0 clamp(56px, 8vw, 96px); }
.sim-grid { display: grid; grid-template-columns: minmax(300px, 380px) minmax(0, 1fr); gap: clamp(20px, 3vw, 32px); align-items: start; }

/* ───────── Entradas ───────── */
.sim-inputs { position: sticky; top: calc(var(--header-h) + 20px); display: grid; gap: 18px; padding: 26px; border-radius: 26px; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-2); }
.sim-title { display: flex; align-items: center; gap: 10px; font-size: 1.1rem; letter-spacing: -.01em; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.sim-title .icon { color: var(--teal-700); }
.sim-inputs .field { gap: 6px; }
.sim-inputs .field label { font-size: .84rem; }
.money { position: relative; }
.money span { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); font-weight: 800; font-size: .9rem; color: var(--muted); pointer-events: none; }
.money input { padding-left: 46px !important; font-weight: 700 !important; font-variant-numeric: tabular-nums; }
.field select { appearance: none; -webkit-appearance: none; cursor: pointer; padding-right: 42px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2352657a' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 14px center; }
.field-hint { font-size: .78rem; color: #6c7e91; line-height: 1.4; }
.info-box { display: flex; gap: 10px; padding: 12px 14px; border-radius: 14px; background: rgba(56, 167, 162, .1); border: 1px solid rgba(56, 167, 162, .3); font-size: .86rem; font-weight: 600; color: #185a57; }
.info-box .icon { margin-top: 2px; width: 18px; height: 18px; }

/* ───────── Resultados ───────── */
.sim-results { display: grid; gap: 18px; min-width: 0; }
.best-card { padding: clamp(22px, 3vw, 32px) clamp(22px, 3vw, 34px); border-radius: 26px; color: #fff; position: relative; overflow: hidden;
  background: radial-gradient(55% 120% at 100% 0%, rgba(92, 214, 190, .36), transparent 62%), linear-gradient(135deg, var(--navy-900), var(--navy-700)); box-shadow: var(--shadow-3); }
.best-card .eyebrow { color: var(--teal-300); }
.best-name { margin-top: 6px; font-size: clamp(1.9rem, 3vw + .6rem, 2.9rem); font-weight: 800; letter-spacing: -.035em; line-height: 1.1; }
.best-sub { margin-top: 8px; min-height: 1.5em; color: #cfe3f1; font-weight: 500; }
.best-sub:empty::before { content: "Preencha os dados ao lado para comparar os regimes."; }

.cost-panel { padding: 22px 24px; border-radius: 22px; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-1); display: grid; gap: 14px; }
.panel-title { font-size: 1rem; letter-spacing: -.01em; }
.cost-row { display: grid; grid-template-columns: 132px minmax(0, 1fr) 128px; gap: 14px; align-items: center; font-size: .9rem; }
.cost-label { font-weight: 700; }
.cost-track { display: block; height: 14px; border-radius: 999px; background: #e9eff5; overflow: hidden; }
.cost-fill { display: block; height: 100%; width: var(--w, 0%); border-radius: 999px; background: #a9bccd; transition: width .5s cubic-bezier(.2, .7, .2, 1); }
.cost-value { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.cost-row.is-best .cost-fill { background: linear-gradient(90deg, var(--teal-500), var(--teal-300)); }
.cost-row.is-best .cost-label, .cost-row.is-best .cost-value { color: var(--teal-700); }
.cost-row.is-off { opacity: .55; }

.regimes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.regime { position: relative; display: flex; flex-direction: column; gap: 14px; padding: 22px 20px 18px; border-radius: 22px; background: #fff; border: 2px solid var(--line); box-shadow: var(--shadow-1); transition: border-color .25s ease, box-shadow .25s ease; }
.regime.is-best { border-color: var(--teal-500); box-shadow: 0 18px 40px -18px rgba(56, 167, 162, .55); }
.regime-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.regime-head h3 { font-size: 1.12rem; }
.regime-flag { display: none; padding: 3px 10px; border-radius: 999px; background: rgba(56, 167, 162, .16); color: var(--teal-700); font-size: .68rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.regime.is-best .regime-flag { display: inline-block; }
.regime-tag { align-self: flex-start; padding: 3px 10px; border-radius: 8px; background: #edf2f7; color: #4a5d72; font-size: .7rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.kv { display: grid; gap: 9px; }
.kv > div { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding-bottom: 9px; border-bottom: 1px dashed #e1e8ef; font-size: .86rem; }
.kv > div:last-child { border-bottom: 0; padding-bottom: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.kv dd.soft { color: var(--ok); font-weight: 700; font-size: .8rem; }
.regime-note { padding: 9px 11px; border-radius: 11px; background: #fff7e6; border: 1px solid #f3d99b; color: #7a5200; font-size: .8rem; font-weight: 600; line-height: 1.45; }
.regime-note.unavailable { background: #f3f6f9; border-color: var(--line); color: var(--muted); }
.regime-total { margin-top: auto; display: grid; gap: 2px; padding: 14px 14px 12px; border-radius: 16px; background: var(--bg); }
.total-label { font-size: .7rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #7a8ca0; }
.total-value { font-size: 1.55rem; font-weight: 800; letter-spacing: -.03em; color: var(--navy-700); font-variant-numeric: tabular-nums; }
.total-carga { font-size: .82rem; color: var(--muted); }
.total-carga b { color: var(--ink); }
.memory { border-top: 1px solid var(--line); padding-top: 10px; }
.memory summary { cursor: pointer; font-weight: 700; font-size: .82rem; color: var(--navy-700); list-style: none; }
.memory summary::-webkit-details-marker { display: none; }
.memory summary::before { content: "+"; display: inline-block; width: 16px; font-weight: 800; }
.memory[open] summary::before { content: "−"; }
.memory p { margin-top: 8px; font-size: .8rem; line-height: 1.6; color: var(--muted); }

.sim-note { display: flex; gap: 12px; padding: 16px 18px; border-radius: 18px; background: #fff; border: 1px solid var(--line); font-size: .88rem; color: var(--muted); }
.sim-note .icon { margin-top: 2px; width: 20px; height: 20px; color: #b7791f; }
.sim-note strong { color: var(--ink); }

/* ───────── Envio ───────── */
.label-like { font-weight: 700; font-size: .88rem; }
.preview-box { margin: 0; max-height: 260px; overflow: auto; padding: 14px 16px; border-radius: 13px; background: #f4f7fa; border: 1px solid var(--line);
  font: 500 .78rem/1.7 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: #33475c; white-space: pre-wrap; word-break: break-word; }

/* ───────── Responsivo ───────── */
@media (max-width: 1180px) {
  .regimes { grid-template-columns: 1fr; }
  .regime { flex-direction: column; }
}
@media (max-width: 960px) {
  .sim-grid { grid-template-columns: minmax(0, 1fr); }
  .sim-inputs { position: static; }
  .regimes { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .regimes { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  .cost-row { grid-template-columns: 1fr auto; row-gap: 6px; }
  .cost-track { grid-column: 1 / -1; grid-row: 2; }
  .sim-inputs { padding: 20px; }
}
