/* Calculadoras e cotações (dias úteis, reajuste, juros, preço de venda, PTAX) — complementa studio.css/office.css */
.cc-page .tool-head { padding-bottom: 24px; }
.cc-layout { display: grid; gap: 18px; grid-template-columns: minmax(0, 420px) minmax(0, 1fr); align-items: start; }
.cc-col { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.cc-sticky { position: sticky; top: 80px; }
.cc-page .seg { margin-bottom: 14px; }
.cc-page .label { justify-content: flex-start; flex-wrap: wrap; gap: 4px 6px; }
.cc-page .seg button { white-space: nowrap; }
.cc-tabs { margin: 0 auto 18px; max-width: 760px; }
.cc-tabs button { padding: 9px 12px; font-size: 14px; }

/* Campos com sufixo (%, meses) e linha campo + seletor */
.cc-suffix { position: relative; display: block; }
.cc-suffix > span { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); font-weight: 600; font-size: 13.5px; pointer-events: none; }
.cc-suffix .input { padding-right: 40px; font-variant-numeric: tabular-nums; }
.cc-pair { display: flex; gap: 8px; }
.cc-pair > :first-child { flex: 1; min-width: 0; }
.cc-pair select.input { width: auto; flex: none; min-width: 108px; }
.cc-help { font-size: 12.5px; color: var(--muted); line-height: 1.4; }
.cc-checks { display: flex; flex-direction: column; gap: 10px; }

/* Resultado principal */
.cc-hero { background: var(--accent-soft); border-color: transparent; display: flex; flex-direction: column; gap: 4px; }
.cc-hero .cc-k { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.cc-hero .cc-big { font-family: var(--display); font-size: clamp(30px, 5vw, 44px); font-weight: 800; letter-spacing: -.03em; line-height: 1.05; color: var(--accent); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.cc-hero .cc-sub { color: var(--ink-2); font-size: 14px; line-height: 1.45; }
.cc-hero .cc-sub b { color: var(--ink); }
.cc-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.cc-stat { padding: 12px 14px; border-radius: 14px; background: var(--bg); border: 1px solid var(--line); min-width: 0; }
.cc-stat span { display: block; font-size: 12.5px; color: var(--muted); font-weight: 500; }
.cc-stat b { display: block; font-size: 19px; font-variant-numeric: tabular-nums; letter-spacing: -.01em; overflow-wrap: anywhere; }
.cc-stat small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.cc-stat.hl { border-color: var(--accent); background: var(--surface); box-shadow: 0 0 0 1px var(--accent) inset; }
.cc-stat.hl b { color: var(--accent); }
.cc-stat.neg b { color: var(--pdf); }
.cc-stat.pos b { color: var(--img); }
.cc-kv { display: grid; gap: 0; font-variant-numeric: tabular-nums; }
.cc-kv div { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.cc-kv div:last-child { border-bottom: 0; }
.cc-kv span:first-child { color: var(--ink-2); }
.cc-kv span:last-child { font-weight: 600; text-align: right; }
.cc-kv .tot span { font-weight: 800; color: var(--ink); }
.cc-kv .tot span:last-child { color: var(--accent); }
.cc-empty { color: var(--muted); text-align: center; padding: 28px 12px; font-size: 14px; margin: 0; }
.cc-error { margin: 0; padding: 12px 14px; border-radius: 12px; background: var(--pdf-soft); color: var(--ink); font-size: 14px; line-height: 1.45; }
.cc-error b { color: var(--pdf); }
.cc-info { margin: 0; padding: 10px 12px; border-radius: 12px; background: var(--doc-soft); color: var(--ink); font-size: 13.5px; line-height: 1.45; }
.cc-loading { color: var(--muted); font-size: 14px; display: flex; align-items: center; gap: 8px; justify-content: center; padding: 24px 0; margin: 0; }
.cc-loading::before { content: ""; width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--line-2); border-top-color: var(--accent); animation: cc-spin .8s linear infinite; }
@keyframes cc-spin { to { transform: rotate(360deg); } }

/* Ações */
.cc-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.cc-actions .btn { flex: 1 1 auto; }
.cc-actions .btn .ic { width: 16px; height: 16px; }

/* Tabelas */
.cc-table-wrap { overflow: auto; max-height: 440px; border: 1px solid var(--line); border-radius: 14px; overscroll-behavior: contain; background: var(--surface); }
.cc-table { width: 100%; border-collapse: collapse; font-size: 13.5px; font-variant-numeric: tabular-nums; }
.cc-table th, .cc-table td { padding: 8px 10px; text-align: right; white-space: nowrap; border-bottom: 1px solid var(--line); }
.cc-table th { position: sticky; top: 0; background: var(--bg-2); font-size: 12px; font-weight: 700; color: var(--ink-2); text-transform: uppercase; letter-spacing: .03em; z-index: 1; }
.cc-table th:first-child, .cc-table td:first-child { text-align: left; }
.cc-table td.l, .cc-table th.l { text-align: left; white-space: normal; min-width: 150px; }
.cc-table tbody tr:nth-child(even) td { background: color-mix(in srgb, var(--bg) 60%, transparent); }
.cc-table tfoot td { font-weight: 700; background: var(--bg-2); border-bottom: 0; }
.cc-table .neg { color: var(--pdf); }
.cc-table .pos { color: var(--img); }
.cc-table tr.best td { background: var(--accent-soft) !important; font-weight: 600; }
.cc-table-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.cc-table-head .of-h { margin: 0; }

/* Gráfico */
.cc-chart { width: 100%; height: auto; display: block; overflow: visible; }
.cc-grid { stroke: var(--line); stroke-width: 1; }
.cc-axis { fill: var(--muted); font: 500 11.5px var(--font); }
.cc-line { fill: none; stroke-width: 2.4; stroke-linejoin: round; stroke-linecap: round; }
.cc-line.a, .cc-dot.a { stroke: var(--accent); fill: var(--accent); }
.cc-line.a { fill: none; }
.cc-line.b { stroke: var(--biz); }
.cc-line.c { stroke: var(--img); }
.cc-area { stroke: none; opacity: .14; }
.cc-area.a { fill: var(--accent); }
.cc-area.b { fill: var(--biz); }
.cc-area.c { fill: var(--img); }
.cc-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 8px; font-size: 13px; color: var(--ink-2); }
.cc-legend span { display: inline-flex; align-items: center; gap: 6px; }
.cc-legend i { width: 14px; height: 4px; border-radius: 2px; display: inline-block; background: var(--accent); }
.cc-legend i.b { background: var(--biz); }
.cc-legend i.c { background: var(--img); }

/* Composição do preço (barra empilhada) */
.cc-stack { display: flex; height: 16px; border-radius: 99px; overflow: hidden; background: var(--bg-2); }
.cc-stack i { display: block; height: 100%; min-width: 2px; }
.cc-stack-legend { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 6px 14px; margin-top: 10px; font-size: 13px; font-variant-numeric: tabular-nums; }
.cc-stack-legend span { display: flex; align-items: center; gap: 7px; min-width: 0; }
.cc-stack-legend span em { font-style: normal; color: var(--muted); margin-left: auto; white-space: nowrap; }
.cc-stack-legend i { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.k-custo { background: var(--ink-2); } .k-frete { background: var(--ship); } .k-imp { background: var(--biz); } .k-taxa { background: var(--pdf); }
.k-com { background: var(--ai); } .k-fixo { background: var(--doc); } .k-lucro { background: var(--img); } .k-outros { background: var(--muted); }

/* Calendário */
.cc-legend-cal { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12.5px; color: var(--ink-2); margin-bottom: 12px; }
.cc-legend-cal span { display: inline-flex; align-items: center; gap: 6px; }
.cc-legend-cal i { width: 14px; height: 14px; border-radius: 4px; display: inline-block; border: 1px solid var(--line); }
.cc-months { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px 18px; }
.cc-month h3 { font-size: 14px; font-weight: 700; margin: 0 0 6px; text-transform: capitalize; font-family: var(--font); letter-spacing: 0; }
.cc-month h3 small { color: var(--muted); font-weight: 500; text-transform: none; margin-left: 4px; }
.cc-cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 2px; }
.cc-cal b { font-size: 10.5px; color: var(--muted); text-align: center; font-weight: 600; padding: 2px 0; }
.cc-cal span { display: grid; place-items: center; aspect-ratio: 1; font-size: 12.5px; border-radius: 7px; font-variant-numeric: tabular-nums; color: var(--ink-2); position: relative; }
.cc-cal span.x { visibility: hidden; }
.cc-cal span.off { opacity: .38; }
.cc-cal span.we, .cc-legend-cal i.we { background: var(--bg-2); color: var(--muted); }
.cc-cal span.hol, .cc-legend-cal i.hol { background: var(--pdf-soft); color: var(--pdf); font-weight: 700; }
.cc-cal span.cus, .cc-legend-cal i.cus { background: var(--biz-soft); color: var(--biz); font-weight: 700; }
.cc-cal span.sus, .cc-legend-cal i.sus { background: repeating-linear-gradient(135deg, var(--bg-2) 0 4px, transparent 4px 8px); color: var(--muted); }
.cc-cal span.bd, .cc-legend-cal i.bd { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.cc-cal span.edge, .cc-legend-cal i.edge { box-shadow: 0 0 0 2px var(--accent) inset; }
.cc-cal span.end { background: var(--accent); color: var(--accent-ink); font-weight: 800; }
.cc-hols { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.cc-hols li { display: flex; gap: 10px; align-items: baseline; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.cc-hols li:last-child { border-bottom: 0; }
.cc-hols time { font-variant-numeric: tabular-nums; font-weight: 600; min-width: 84px; }
.cc-hols small { color: var(--muted); margin-left: auto; text-align: right; }
.cc-tag { display: inline-block; font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 99px; background: var(--bg-2); color: var(--ink-2); margin-left: 6px; vertical-align: 1px; }
.cc-tag.warn { background: var(--biz-soft); color: var(--biz); }

/* Lista de feriados próprios */
.cc-custom { display: flex; flex-direction: column; gap: 8px; }
.cc-custom-row { display: grid; grid-template-columns: 150px minmax(0, 1fr) 34px; gap: 6px; align-items: center; }
.cc-custom-row .input { height: 38px; font-size: 14px; }
.cc-custom-list { display: flex; flex-wrap: wrap; gap: 6px; }
.cc-custom-list .chip { font-size: 13px; padding: 5px 6px 5px 11px; cursor: default; }
.cc-custom-list .chip button { border: 0; background: transparent; color: var(--muted); cursor: pointer; padding: 0 4px; font-size: 16px; line-height: 1; }
.cc-custom-list .chip button:hover { color: var(--pdf); }

/* Explicações e avisos */
.cc-how { border-top: 1px solid var(--line); padding-top: 10px; }
.cc-how > summary { cursor: pointer; font-weight: 600; font-size: 14px; color: var(--ink-2); padding: 4px 0; }
.cc-how[open] > summary { margin-bottom: 6px; }
.cc-how p, .cc-how li { font-size: 14px; line-height: 1.55; color: var(--ink-2); }
.cc-how p { margin: 8px 0; }
.cc-how ul { margin: 6px 0; padding-left: 20px; }
.cc-formula { display: block; font-family: ui-monospace, Menlo, monospace; font-size: 13px; background: var(--bg); border: 1px solid var(--line); padding: 8px 10px; border-radius: 10px; margin: 6px 0; overflow-x: auto; white-space: pre; color: var(--ink); }
.cc-disclaimer { margin: 0; font-size: 13px; color: var(--muted); line-height: 1.5; }
.cc-disclaimer b { color: var(--ink-2); }

/* Comparativo de opções lado a lado */
.cc-vs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.cc-vs .of-card { box-shadow: none; }
.cc-vs h3 { font-size: 16px; margin: 0 0 10px; display: flex; align-items: center; gap: 8px; }
.cc-vs .cc-tag { margin-left: 0; }
.cc-verdict { padding: 12px 14px; border-radius: 14px; font-size: 14.5px; line-height: 1.5; border: 1px solid var(--line); background: var(--bg); }
.cc-verdict b { color: var(--accent); }
.cc-verdict.good { background: var(--img-soft); border-color: transparent; }
.cc-verdict.good b { color: var(--img); }
.cc-verdict.bad { background: var(--biz-soft); border-color: transparent; }
.cc-verdict.bad b { color: var(--biz); }

/* Cotação */
.cc-fx-row { display: grid; grid-template-columns: minmax(0, 1fr) 44px minmax(0, 1fr); gap: 8px; align-items: end; }
.cc-swap { width: 44px; height: 42px; border-radius: 11px; border: 1px solid var(--line-2); background: var(--bg); color: var(--ink-2); cursor: pointer; display: grid; place-items: center; }
.cc-swap:hover { background: var(--bg-2); color: var(--ink); }
.cc-swap .ic { width: 18px; height: 18px; }
.cc-rates { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.cc-rate { padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--bg); }
.cc-rate h3 { font-size: 14px; margin: 0 0 6px; font-family: var(--font); letter-spacing: 0; }
.cc-rate .cc-kv div { padding: 5px 0; font-size: 13.5px; }

@media (max-width: 920px) {
  .cc-layout { grid-template-columns: minmax(0, 1fr); }
  .cc-sticky { position: static; }
}
@media (max-width: 520px) {
  .cc-vs { grid-template-columns: minmax(0, 1fr); }
  .cc-page .seg button { padding: 7px 8px; font-size: 13px; }
  .cc-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cc-actions .btn { width: 100%; }
  .cc-custom-row { grid-template-columns: minmax(0, 1fr) 34px; }
  .cc-custom-row .input:nth-child(2) { grid-column: 1; }
  .cc-months { grid-template-columns: minmax(0, 1fr); }
  .cc-table { font-size: 12.5px; }
  .cc-table td.l, .cc-table th.l { min-width: 112px; }
  .cc-table th, .cc-table td { padding: 7px 8px; }
}
