/* ═══════════════════════════════════════════════════════
   Simulador Reforma Tributária · simulador.css v1.0.0
   Todos os seletores usam prefixo .srt- para evitar
   conflitos com o tema WordPress ativo.
═══════════════════════════════════════════════════════ */

/* ── TOKENS ── */
.srt-wrapper {
  --srt-bg:      #0d1117;
  --srt-surface: #161b22;
  --srt-border:  #30363d;
  --srt-accent:  #1a7f64;
  --srt-alight:  #26a07a;
  --srt-aglow:   rgba(26,127,100,0.18);
  --srt-text:    #e6edf3;
  --srt-muted:   #8b949e;
  --srt-dim:     #484f58;
  --srt-green:   #3fb950;
  --srt-red:     #f85149;
  --srt-blue:    #58a6ff;
  --srt-purple:  #bc8cff;
  --srt-gold:    #e3b341;
  --srt-warn:    #d29922;

  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 14px;
  line-height: 1.6;
  color: var(--srt-text);
  background: var(--srt-bg);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 40px rgba(0,0,0,0.5);
  margin: 24px 0;

  /* reset herança do tema */
  box-sizing: border-box;
}
.srt-wrapper *, .srt-wrapper *::before, .srt-wrapper *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ── HEADER ── */
.srt-header {
  background: linear-gradient(135deg, #0d1117 0%, #161b22 50%, #0d1f1a 100%);
  border-bottom: 1px solid var(--srt-border);
  position: relative;
  overflow: hidden;
}
.srt-header::before {
  content: '';
  position: absolute;
  top: -40px; right: -40px;
  width: 260px; height: 260px;
  background: radial-gradient(circle, rgba(26,127,100,0.14) 0%, transparent 70%);
  pointer-events: none;
}
.srt-header-inner { padding: 24px 32px 20px; position: relative; z-index: 1; }

.srt-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--srt-aglow);
  border: 1px solid rgba(26,127,100,0.4);
  color: var(--srt-alight);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 20px;
  margin-bottom: 12px;
}

.srt-titulo {
  /* reset WordPress h2 */
  font-size: 24px !important;
  font-weight: 700 !important;
  letter-spacing: -0.02em !important;
  line-height: 1.2 !important;
  margin: 0 0 6px !important;
  padding: 0 !important;
  border: none !important;
  color: var(--srt-text) !important;
}
.srt-titulo span { color: var(--srt-alight) !important; }

.srt-subtitulo { color: var(--srt-muted); font-size: 13px; margin-top: 4px; }

.srt-refs { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.srt-ref-tag {
  font-size: 11px;
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  color: var(--srt-dim);
  background: var(--srt-surface);
  border: 1px solid var(--srt-border);
  padding: 2px 8px;
  border-radius: 4px;
}

/* ── BODY LAYOUT ── */
.srt-body {
  display: grid;
  grid-template-columns: 360px 1fr;
  min-height: 600px;
}

/* ── SIDEBAR ── */
.srt-sidebar {
  background: var(--srt-surface);
  border-right: 1px solid var(--srt-border);
  padding: 22px;
  overflow-y: auto;
}

.srt-section-title {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--srt-muted);
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--srt-border);
  display: flex; align-items: center; gap: 6px;
}
.srt-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--srt-alight); flex-shrink: 0; }

.srt-field-group { margin-bottom: 18px; }

.srt-label {
  display: block !important;
  font-size: 12px !important;
  font-weight: 500 !important;
  color: var(--srt-muted) !important;
  margin-bottom: 6px !important;
  letter-spacing: 0.02em !important;
}
.srt-hint { font-size: 11px; color: var(--srt-dim); margin-top: 3px; }

/* inputs reset + estilo */
.srt-wrapper input[type="number"],
.srt-wrapper input[type="text"],
.srt-wrapper select {
  width: 100%;
  background: var(--srt-bg) !important;
  border: 1px solid var(--srt-border) !important;
  border-radius: 6px !important;
  color: var(--srt-text) !important;
  font-family: 'JetBrains Mono', monospace !important;
  font-size: 13px !important;
  padding: 9px 12px !important;
  transition: border-color 0.15s, box-shadow 0.15s;
  appearance: none !important;
  -webkit-appearance: none !important;
  outline: none;
  box-shadow: none !important;
  line-height: 1.4 !important;
}
.srt-wrapper input:focus,
.srt-wrapper select:focus {
  border-color: var(--srt-alight) !important;
  box-shadow: 0 0 0 3px var(--srt-aglow) !important;
}
.srt-wrapper select {
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238b949e' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 10px center !important;
  padding-right: 30px !important;
}

.srt-input-prefix { position: relative; }
.srt-input-prefix > span {
  position: absolute;
  left: 10px; top: 50%;
  transform: translateY(-50%);
  color: var(--srt-dim);
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  pointer-events: none;
  z-index: 2;
}
.srt-input-prefix input { padding-left: 28px !important; }

/* Segmented control */
.srt-seg-control {
  display: flex;
  background: var(--srt-bg);
  border: 1px solid var(--srt-border);
  border-radius: 6px;
  padding: 3px;
  gap: 2px;
}
.srt-seg-btn {
  flex: 1;
  background: none !important;
  border: none !important;
  border-radius: 4px;
  color: var(--srt-muted);
  font-size: 12px;
  font-weight: 500;
  padding: 7px 4px;
  cursor: pointer;
  transition: all 0.15s;
  font-family: 'Inter', sans-serif !important;
  white-space: nowrap;
  line-height: 1;
  box-shadow: none !important;
  text-shadow: none !important;
}
.srt-seg-btn.active {
  background: var(--srt-accent) !important;
  color: #fff !important;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3) !important;
}
.srt-seg-btn:hover:not(.active) { color: var(--srt-text); }

/* Slider */
.srt-slider-wrap { display: flex; align-items: center; gap: 10px; }
.srt-wrapper input[type="range"] {
  flex: 1;
  -webkit-appearance: none !important;
  appearance: none !important;
  height: 4px !important;
  background: var(--srt-border) !important;
  border-radius: 2px !important;
  outline: none !important;
  padding: 0 !important;
  border: none !important;
  box-shadow: none !important;
  cursor: pointer;
  min-width: 0;
}
.srt-wrapper input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--srt-alight);
  cursor: pointer;
  box-shadow: 0 0 0 3px var(--srt-aglow);
}
.srt-wrapper input[type="range"]::-moz-range-thumb {
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--srt-alight);
  cursor: pointer;
  border: none;
}
.srt-slider-val {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--srt-alight);
  min-width: 46px;
  text-align: right;
  white-space: nowrap;
}

/* Chips */
.srt-chip-group { display: flex; flex-wrap: wrap; gap: 6px; }
.srt-chip {
  background: var(--srt-bg);
  border: 1px solid var(--srt-border);
  border-radius: 20px;
  color: var(--srt-muted);
  font-size: 12px;
  padding: 5px 12px;
  cursor: pointer;
  transition: all 0.15s;
  user-select: none;
  font-family: 'Inter', sans-serif;
}
.srt-chip:hover { border-color: var(--srt-accent); color: var(--srt-alight); }
.srt-chip.active { background: var(--srt-aglow); border-color: var(--srt-alight); color: var(--srt-alight); font-weight: 600; }

/* Botão calcular */
.srt-calc-btn {
  width: 100%;
  background: var(--srt-accent) !important;
  border: none !important;
  border-radius: 8px !important;
  color: #fff !important;
  font-family: 'Inter', sans-serif !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  padding: 13px !important;
  cursor: pointer !important;
  margin-top: 18px;
  transition: all 0.15s !important;
  letter-spacing: 0.01em;
  box-shadow: none !important;
  text-shadow: none !important;
  line-height: 1 !important;
}
.srt-calc-btn:hover {
  background: var(--srt-alight) !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(26,127,100,0.35) !important;
}

/* ── RESULTS PANE ── */
.srt-results {
  padding: 22px 24px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 18px;
  background: var(--srt-bg);
}

/* Empty state */
.srt-empty {
  flex: 1;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center;
  color: var(--srt-dim);
  gap: 12px;
  min-height: 300px;
}
.srt-empty-icon { font-size: 44px; opacity: 0.4; }
.srt-empty p { font-size: 13px; max-width: 280px; line-height: 1.7; color: var(--srt-dim); }
.srt-empty strong { color: var(--srt-muted); }

/* KPI row */
.srt-kpi-row { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; }
.srt-kpi-card {
  background: var(--srt-surface);
  border: 1px solid var(--srt-border);
  border-radius: 10px;
  padding: 14px;
  position: relative;
  overflow: hidden;
}
.srt-kpi-card::after { content:''; position:absolute; top:0;left:0;right:0; height:2px; }
.srt-kpi-card.k-green::after { background: var(--srt-green); }
.srt-kpi-card.k-red::after   { background: var(--srt-red); }
.srt-kpi-card.k-blue::after  { background: var(--srt-blue); }
.srt-kpi-label { font-size:11px; font-weight:500; color:var(--srt-muted); text-transform:uppercase; letter-spacing:0.05em; margin-bottom:5px; }
.srt-kpi-value { font-family:'JetBrains Mono',monospace; font-size:20px; font-weight:700; letter-spacing:-0.02em; }
.srt-kpi-sub   { font-size:11px; color:var(--srt-dim); margin-top:2px; }
.srt-kpi-delta { font-size:12px; font-weight:600; margin-top:4px; }
.srt-kpi-delta.up   { color: var(--srt-red); }
.srt-kpi-delta.down { color: var(--srt-green); }

/* Alertas */
.srt-alert {
  display: flex; gap: 10px;
  padding: 11px 13px;
  border-radius: 8px;
  font-size: 12px;
  line-height: 1.6;
}
.srt-alert strong { font-weight: 700; }
.srt-alert-warn   { background:rgba(210,153,34,0.1);  border:1px solid rgba(210,153,34,0.3);  color: var(--srt-gold); }
.srt-alert-info   { background:rgba(88,166,255,0.08); border:1px solid rgba(88,166,255,0.25); color: var(--srt-blue); }
.srt-alert-ok     { background:rgba(63,185,80,0.08);  border:1px solid rgba(63,185,80,0.25);  color: var(--srt-green); }
.srt-alert-icon   { font-size:14px; flex-shrink:0; margin-top:1px; }

/* Card */
.srt-card {
  background: var(--srt-surface);
  border: 1px solid var(--srt-border);
  border-radius: 10px;
  overflow: hidden;
}
.srt-card-header {
  padding: 12px 16px;
  border-bottom: 1px solid var(--srt-border);
  display: flex; align-items: center; justify-content: space-between;
}
.srt-card-title { font-size:13px; font-weight:600; color:var(--srt-text); display:flex; align-items:center; gap:7px; }

/* Tabs */
.srt-tabs { display:flex; border-bottom:1px solid var(--srt-border); padding:0 16px; }
.srt-tab-btn {
  background: none !important; border: none !important;
  border-bottom: 2px solid transparent;
  color: var(--srt-muted);
  font-family: 'Inter',sans-serif !important;
  font-size: 12px !important; font-weight: 500 !important;
  padding: 9px 12px !important;
  cursor: pointer; transition: all 0.15s;
  margin-bottom: -1px;
  white-space: nowrap;
  box-shadow: none !important;
  text-shadow: none !important;
  line-height: 1 !important;
}
.srt-tab-btn:hover { color: var(--srt-text) !important; }
.srt-tab-btn.active { color: var(--srt-alight) !important; border-bottom-color: var(--srt-alight) !important; font-weight: 600 !important; }
.srt-tab-content { display:none; }
.srt-tab-content.active { display:block; }

/* Table */
.srt-wrapper table {
  width:100%; border-collapse:collapse; font-size:13px;
  /* reset WP table styles */
  border: none !important;
  margin: 0 !important;
}
.srt-wrapper thead tr { background:rgba(255,255,255,0.02); }
.srt-wrapper th {
  padding:9px 14px;
  text-align:left !important;
  font-size:11px !important; font-weight:600 !important;
  color:var(--srt-muted) !important;
  text-transform:uppercase; letter-spacing:0.05em;
  white-space:nowrap;
  border: none !important;
  background: none !important;
}
.srt-wrapper th:not(:first-child) { text-align:right !important; }
.srt-wrapper td {
  padding:10px 14px !important;
  border-top: 1px solid var(--srt-border) !important;
  border-left: none !important; border-right: none !important; border-bottom: none !important;
  color: var(--srt-text) !important;
  background: none !important;
}
.srt-wrapper td:not(:first-child) { text-align:right !important; font-family:'JetBrains Mono',monospace !important; font-size:12px !important; }
.srt-wrapper tr.srt-total-row td { font-weight:700 !important; font-size:13px !important; border-top: 2px solid var(--srt-border) !important; }
.srt-wrapper tr.srt-total-row { background: rgba(255,255,255,0.03) !important; }

/* Tags */
.srt-tag { display:inline-block; font-size:10px; font-weight:700; padding:2px 7px; border-radius:4px; text-transform:uppercase; letter-spacing:0.05em; }
.srt-tag-green  { background:rgba(63,185,80,0.15);  color:var(--srt-green);  border:1px solid rgba(63,185,80,0.3); }
.srt-tag-red    { background:rgba(248,81,73,0.15);  color:var(--srt-red);    border:1px solid rgba(248,81,73,0.3); }
.srt-tag-blue   { background:rgba(88,166,255,0.15); color:var(--srt-blue);   border:1px solid rgba(88,166,255,0.3); }
.srt-tag-gold   { background:rgba(227,179,65,0.15); color:var(--srt-gold);   border:1px solid rgba(227,179,65,0.3); }
.srt-tag-purple { background:rgba(188,140,255,0.15);color:var(--srt-purple); border:1px solid rgba(188,140,255,0.3); }

/* Gauge */
.srt-gauge-wrap { padding:14px 16px; display:flex; flex-direction:column; gap:11px; }
.srt-gauge-row  { display:flex; align-items:center; gap:10px; }
.srt-gauge-label { font-size:12px; font-weight:600; min-width:120px; color:var(--srt-text); }
.srt-gauge-bar-wrap { flex:1; height:20px; background:var(--srt-border); border-radius:4px; overflow:hidden; }
.srt-gauge-bar  { height:100%; border-radius:4px; display:flex; align-items:center; justify-content:flex-end; padding-right:6px; transition:width 0.9s cubic-bezier(0.16,1,0.3,1); }
.srt-gauge-bar span { font-size:10px; font-weight:700; color:rgba(255,255,255,0.85); white-space:nowrap; }
.srt-gauge-val  { font-family:'JetBrains Mono',monospace; font-size:13px; font-weight:600; min-width:52px; text-align:right; }

/* Timeline */
.srt-timeline { padding:16px; }
.srt-tl-item  { display:flex; gap:12px; padding-bottom:16px; position:relative; }
.srt-tl-item:not(:last-child)::after { content:''; position:absolute; left:13px; top:27px; bottom:0; width:1px; background:var(--srt-border); }
.srt-tl-dot   { width:27px; height:27px; border-radius:50%; display:flex; align-items:center; justify-content:center; font-size:11px; font-weight:700; flex-shrink:0; position:relative; z-index:1; }
.srt-tl-body  { flex:1; }
.srt-tl-year  { font-size:11px; font-weight:700; letter-spacing:0.05em; text-transform:uppercase; margin-bottom:2px; }
.srt-tl-desc  { font-size:12px; color:var(--srt-muted); line-height:1.5; }

/* Footnote */
.srt-footnote { font-size:11px; color:var(--srt-dim); line-height:1.7; padding:12px 16px; border-top:1px solid var(--srt-border); }
.srt-footnote strong { color:var(--srt-muted); font-weight:600; }

/* ── RESPONSIVE ── */
@media (max-width: 860px) {
  .srt-body { grid-template-columns: 1fr; }
  .srt-sidebar { border-right: none; border-bottom: 1px solid var(--srt-border); }
  .srt-kpi-row { grid-template-columns: repeat(2,1fr); }
  .srt-header-inner { padding: 20px 20px 16px; }
  .srt-results { padding: 16px; }
  .srt-sidebar { padding: 16px; }
}
@media (max-width: 520px) {
  .srt-kpi-row { grid-template-columns: 1fr; }
  .srt-titulo { font-size: 20px !important; }
  .srt-wrapper th:nth-child(n+3), .srt-wrapper td:nth-child(n+3) { display: none; }
}
