* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: #0d0d0d;
  color: #e1e1e1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2rem 1rem;
}

/* Autenticação via API Gateway. */
.api-auth-warning { align-items:center; background:#3b1d17; border-bottom:1px solid #f5a623; color:#fff; display:flex; gap:1rem; justify-content:center; padding:.75rem 1rem; position:sticky; top:0; z-index:10000; }
.login-container { max-width:32rem; padding-top:8vh; }
.login-card form { display:grid; gap:1rem; }
.login-card input:not([type='checkbox']) { box-sizing:border-box; width:100%; }
.login-remember { align-items:center; display:flex; gap:.5rem; }
.server-config { background:#111; border:1px solid #333; border-radius:10px; padding:.85rem 1rem; }
.server-config summary { color:#f5a623; cursor:pointer; font-weight:600; }
.server-config[open] summary { margin-bottom:1rem; }
.server-config small, .server-endpoint { color:#888; font-size:.75rem; line-height:1.5; }
.server-endpoint { margin:.75rem 0; overflow-wrap:anywhere; }
.server-config code { color:#bbb; }
.container { max-width: 960px; width: 100%; }
header { text-align: center; margin-bottom: 2.5rem; }
header h1 { font-size: 2rem; font-weight: 700; color: #f5a623; letter-spacing: -.5px; }
header h1 span { color: #fff; }
header p { color: #888; margin-top: .4rem; font-size: 1rem; }
.correction-banner {
  background: #0d1a0d;
  border: 2px solid #4caf50;
  border-radius: 12px;
  padding: 1rem 1.5rem;
  margin-bottom: 1.5rem;
  color: #4caf50;
  font-size: 0.9rem;
  line-height: 1.6;
}
.correction-banner strong { color: #81c784; }
.validation-panel {
  background: #0d0d0d;
  border: 2px solid #333;
  border-radius: 12px;
  padding: 1rem 1.5rem;
  margin-bottom: 1.5rem;
  font-size: .82rem;
  line-height: 1.7;
}
.validation-panel h3 { color: #f5a623; font-size: 1rem; margin-bottom: .6rem; }
.validation-panel .vline { display: flex; justify-content: space-between; gap: .5rem; padding: .25rem 0; border-bottom: 1px dashed #222; }
.validation-panel .vline:last-child { border-bottom: none; }
.validation-panel .vpass { color: #4caf50; font-weight: 700; }
.validation-panel .vfail { color: #ef5350; font-weight: 700; }
.validation-panel .vsummary { margin-top: .8rem; padding-top: .6rem; border-top: 1px solid #2a2a2a; font-weight: 600; }
.bsfc-card {
  background: linear-gradient(135deg, #1a2a1a 0%, #0d1a0d 100%);
  border: 2px solid #4caf50;
  border-radius: 16px;
  padding: 1.8rem;
  margin-bottom: 2rem;
}
.bsfc-card h2 {
  font-size: 1.1rem;
  font-weight: 700;
  color: #4caf50;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: .5rem;
}
.bsfc-card .definition {
  background: #0d0d0d;
  border-left: 4px solid #4caf50;
  padding: 1rem 1.2rem;
  border-radius: 8px;
  margin-bottom: 1.2rem;
  font-size: .9rem;
  line-height: 1.7;
}
.bsfc-card .definition strong { color: #81c784; }
.bsfc-card .formula {
  background: #0d0d0d;
  border: 1px solid #2a2a2a;
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 1.2rem;
  font-family: 'Courier New', monospace;
  font-size: .85rem;
  color: #f5a623;
  text-align: center;
  line-height: 1.8;
}
.bsfc-card .grid-bsfc {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  gap: .8rem;
  margin-bottom: 1rem;
}
.bsfc-card .bsfc-item {
  background: #0d0d0d;
  border: 1px solid #2a2a2a;
  border-radius: 10px;
  padding: .8rem;
  text-align: center;
}
.bsfc-card .bsfc-item .label {
  font-size: .7rem;
  color: #888;
  text-transform: uppercase;
  letter-spacing: .3px;
  margin-bottom: .3rem;
}
.bsfc-card .bsfc-item .value {
  font-size: 1.1rem;
  font-weight: 700;
  color: #f5a623;
  margin-bottom: .2rem;
}
.bsfc-card .bsfc-item .desc {
  font-size: .7rem;
  color: #666;
  line-height: 1.3;
}
.bsfc-card .bsfc-item.best { border-color: #4caf50; }
.bsfc-card .bsfc-item.best .value { color: #4caf50; }
.bsfc-card .note {
  font-size: .85rem;
  color: #aaa;
  line-height: 1.6;
  padding: .8rem;
  background: #0d0d0d;
  border-radius: 8px;
  border-left: 3px solid #f5a623;
}
.tabs { display: flex; gap: .5rem; margin-bottom: 1.2rem; flex-wrap: wrap; }
.tab {
  background: #252525; border: 1px solid #333; border-radius: 8px;
  padding: .5rem 1.2rem; font-size: .85rem; font-weight: 500;
  color: #888; cursor: pointer; transition: all .2s;
}
.tab:hover { border-color: #f5a623; color: #fff; }
.tab.active { background: #f5a623; border-color: #f5a623; color: #0d0d0d; }
.tab.sabor { border-color: #4caf5066; color: #81c784; }
.tab.sabor:hover { border-color: #81c784; color: #fff; }
.tab.sabor.active { background: #4caf50; border-color: #4caf50; color: #fff; }
.tab.nitro { border-color: #ff6b6b66; color: #ff8787; }
.tab.nitro:hover { border-color: #ff8787; color: #fff; }
.tab.nitro.active { background: #ff6b6b; border-color: #ff6b6b; color: #fff; }
.tab.consumo { border-color: #42a5f566; color: #64b5f6; }
.tab.consumo:hover { border-color: #64b5f6; color: #fff; }
.tab.consumo.active { background: #42a5f5; border-color: #42a5f5; color: #fff; }
.tab-content { display: none; }
.tab-content.active { display: block; }
.card {
  background: #1a1a1a; border: 1px solid #2a2a2a; border-radius: 16px;
  padding: 1.8rem; margin-bottom: 1.5rem; transition: border-color .2s;
}
.card:hover { border-color: #3a3a3a; }
.card h2 {
  font-size: 1.2rem; font-weight: 600; color: #f5a623;
  margin-bottom: 1.2rem; display: flex; align-items: center; gap: .5rem; flex-wrap: wrap;
}
.card h2 .badge {
  background: #f5a623; color: #0d0d0d; font-size: .7rem;
  font-weight: 700; padding: .15rem .55rem; border-radius: 6px;
}
.card.sabor { border-color: #4caf5066; }
.card.sabor h2 { color: #4caf50; }
.card.sabor h2 .badge { background: #4caf50; color: #fff; }
.card.nitro { border-color: #ff6b6b66; }
.card.nitro h2 { color: #ff6b6b; }
.card.nitro h2 .badge { background: #ff6b6b; color: #fff; }
.card.consumo { border-color: #42a5f566; }
.card.consumo h2 { color: #42a5f5; }
.card.consumo h2 .badge { background: #42a5f5; color: #fff; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 1rem; }
.grid-4 { display: grid; grid-template-columns: 1fr 1fr 1fr 1fr; gap: 1rem; }
.field { display: flex; flex-direction: column; gap: .3rem; }
.field label {
  font-size: .8rem; font-weight: 500; color: #aaa;
  text-transform: uppercase; letter-spacing: .3px;
}
.field input, .field select {
  background: #252525; border: 1px solid #333; border-radius: 8px;
  padding: .7rem .8rem; color: #fff; font-size: 1rem;
  font-weight: 500; outline: none; transition: border-color .2s;
}
.field input:focus, .field select:focus { border-color: #f5a623; }
.field input::placeholder { color: #555; font-weight: 400; }
.field select option { background: #1a1a1a; }
.field .unit { font-size: .75rem; color: #666; margin-top: .1rem; }
.result-box {
  background: #0d0d0d; border: 1px solid #2a2a2a; border-radius: 12px;
  padding: 1.2rem 1.5rem; display: flex; align-items: center;
  justify-content: space-between; flex-wrap: wrap; gap: .5rem;
}
.result-box .label { font-size: .85rem; color: #888; }
.result-box .value { font-size: 1.6rem; font-weight: 700; color: #f5a623; }
.result-box .value .sub { font-size: .9rem; font-weight: 400; color: #aaa; }
.result-box .value .green { color: #4caf50; }
.result-box .value .red { color: #ef5350; }
.result-box .value .blue { color: #42a5f5; }
.result-box-sm {
  background: #0d0d0d; border: 1px solid #2a2a2a; border-radius: 10px;
  padding: .8rem 1.2rem; display: flex; flex-direction: column; gap: .2rem;
}
.result-box-sm .label { font-size: .7rem; color: #666; text-transform: uppercase; letter-spacing: .3px; }
.result-box-sm .value { font-size: 1.2rem; font-weight: 700; color: #f5a623; }
.result-box-sm .value .sub { font-size: .8rem; font-weight: 400; color: #888; }
.info-box {
  border-radius: 12px; padding: 1.2rem 1.5rem; margin-bottom: 1.2rem;
  font-size: .88rem; line-height: 1.6;
}
.info-box.warn { background: #1a140d; border: 1px solid #f5a62355; }
.info-box.warn strong { color: #f5a623; }
.info-box.info { background: #0d1a1a; border: 1px solid #42a5f555; }
.info-box.info strong { color: #42a5f5; }
.info-box.green { background: #0d1a0d; border: 1px solid #4caf5055; }
.info-box.green strong { color: #4caf50; }
.info-box.nitro { background: #1a0d0d; border: 1px solid #ff6b6b55; }
.info-box.nitro strong { color: #ff8787; }
.compare-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: .8rem; margin: 1rem 0; }
.compare-card { border-radius: 10px; padding: 1rem 1.2rem; text-align: center; }
.compare-card.fix { background: #1a0d0d; border: 1px solid #4a2a2a; }
.compare-card.ref { background: #0d1a0d; border: 1px solid #2a4a2a; }
.compare-card.rise { background: #0d0d1a; border: 1px solid #2a2a4a; }
.compare-card h4 { font-size: .85rem; font-weight: 600; margin-bottom: .4rem; }
.compare-card.fix h4 { color: #ef5350; }
.compare-card.ref h4 { color: #4caf50; }
.compare-card.rise h4 { color: #42a5f5; }
.compare-card p { font-size: .8rem; color: #aaa; line-height: 1.4; }
.compare-card .big-num { font-size: 1.6rem; font-weight: 700; margin: .3rem 0; }
.compare-card.fix .big-num { color: #ef5350; }
.compare-card.ref .big-num { color: #4caf50; }
.compare-card.rise .big-num { color: #42a5f5; }
.comp-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin: 1rem 0; }
.comp-card { border-radius: 12px; padding: 1.2rem 1.5rem; text-align: center; }
.comp-card.pressao { background: #0d1a0d; border: 1px solid #4caf50; }
.comp-card.injetor { background: #0d0d1a; border: 1px solid #42a5f5; }
.comp-card h4 { font-size: .85rem; font-weight: 600; margin-bottom: .4rem; }
.comp-card.pressao h4 { color: #4caf50; }
.comp-card.injetor h4 { color: #42a5f5; }
.comp-card .big { font-size: 1.8rem; font-weight: 700; margin: .3rem 0; }
.comp-card.pressao .big { color: #4caf50; }
.comp-card.injetor .big { color: #42a5f5; }
.comp-card p { font-size: .8rem; color: #aaa; line-height: 1.4; }
.chart-wrap {
  background: #111; border: 1px solid #2a2a2a; border-radius: 12px;
  padding: 1rem; margin: 1rem 0; height: 300px; position: relative;
}
.slider-wrap { margin: .8rem 0; }
.slider-wrap label { font-size: .8rem; color: #888; display: flex; justify-content: space-between; }
.slider-wrap input[type="range"] {
  -webkit-appearance: none; width: 100%; height: 6px;
  border-radius: 3px; background: #333; outline: none;
}
.slider-wrap input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 20px; height: 20px;
  border-radius: 50%; cursor: pointer;
}
.slider-wrap .orange-thumb::-webkit-slider-thumb { background: #f5a623; }
.slider-wrap .blue-thumb::-webkit-slider-thumb { background: #42a5f5; }
.slider-wrap .slider-labels { display: flex; justify-content: space-between; font-size: .7rem; color: #555; margin-top: .2rem; }
.tag-wrap { display: flex; gap: .6rem; flex-wrap: wrap; margin-top: .8rem; }
.tag {
  display: inline-block; font-size: .7rem; font-weight: 700;
  padding: .25rem .7rem; border-radius: 20px;
}
.tag.tag-fix { background: #4a1a1a; color: #ef5350; }
.tag.tag-ref { background: #1a4a1a; color: #4caf50; }
.tag.tag-rise { background: #1a1a4a; color: #42a5f5; }
.tag.tag-nitro { background: #4a1a1a; color: #ff8787; }
.section-title {
  font-size: .85rem; font-weight: 600; color: #ccc;
  margin: 1.2rem 0 .8rem; padding-bottom: .3rem; border-bottom: 1px solid #2a2a2a;
}
.ref-table { width: 100%; border-collapse: collapse; font-size: .85rem; margin-top: .8rem; }
.ref-table th {
  text-align: left; color: #888; font-weight: 500; text-transform: uppercase;
  font-size: .7rem; letter-spacing: .3px; padding: .5rem .3rem; border-bottom: 1px solid #2a2a2a;
}
.ref-table td { padding: .5rem .3rem; border-bottom: 1px solid #222; color: #ccc; }
.ref-table tr:hover td { color: #fff; }
.ref-table .hl { color: #f5a623; font-weight: 600; }
.ref-table .hl-nitro { color: #ff8787; font-weight: 600; }
.conv-box { display: flex; align-items: center; gap: 1.2rem; flex-wrap: wrap; justify-content: center; }
.conv-box .field { flex: 1; min-width: 160px; }
.conv-arrow-wrap { display: flex; flex-direction: column; align-items: center; gap: .3rem; cursor: pointer; }
.conv-arrow-wrap .arrow { font-size: 1.8rem; color: #f5a623; font-weight: 300; user-select: none; }
.conv-arrow-wrap:hover .arrow { color: #ffc107; }
.conv-arrow-wrap small { font-size: .65rem; color: #666; text-transform: uppercase; letter-spacing: .3px; }
.conv-arrow-wrap:hover small { color: #aaa; }
.sub-tabs { display: flex; gap: .4rem; margin-bottom: 1rem; flex-wrap: wrap; }
.sub-tab {
  background: #252525; border: 1px solid #333; border-radius: 6px;
  padding: .4rem 1rem; font-size: .8rem; font-weight: 500;
  color: #888; cursor: pointer; transition: all .2s;
}
.sub-tab:hover { border-color: #42a5f5; color: #fff; }
.sub-tab.active { background: #42a5f5; border-color: #42a5f5; color: #fff; }
footer { text-align: center; padding: 2rem 0 .5rem; color: #555; font-size: .8rem; }
footer a { color: #f5a623; text-decoration: none; }
@media (max-width: 700px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .compare-grid, .comp-grid { grid-template-columns: 1fr; }
  .bsfc-card .grid-bsfc { grid-template-columns: 1fr 1fr; }
  header h1 { font-size: 1.5rem; }
  .card { padding: 1.2rem; }
  .chart-wrap { height: 220px; }
  .conv-box { flex-direction: column; }
  .conv-arrow-wrap .arrow { transform: rotate(90deg); }
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: #0d0d0d;
  color: #e1e1e1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2rem 1rem;
}
.container { max-width: 960px; width: 100%; }
header { text-align: center; margin-bottom: 2.5rem; }
header h1 { font-size: 2rem; font-weight: 700; color: #f5a623; letter-spacing: -.5px; }
header h1 span { color: #fff; }
header p { color: #888; margin-top: .4rem; font-size: 1rem; }

/* ABAS GERAIS */
.tabs { display: flex; gap: .5rem; margin-bottom: 1.2rem; flex-wrap: wrap; }
.tab {
  background: #252525; border: 1px solid #333; border-radius: 8px;
  padding: .5rem 1.2rem; font-size: .85rem; font-weight: 500;
  color: #888; cursor: pointer; transition: all .2s;
}
.tab:hover { border-color: #f5a623; color: #fff; }
.tab.active { background: #f5a623; border-color: #f5a623; color: #0d0d0d; }
.tab-content { display: none; }
.tab-content.active { display: block; }

.card {
  background: #1a1a1a; border: 1px solid #2a2a2a; border-radius: 16px;
  padding: 1.8rem; margin-bottom: 1.5rem; transition: border-color .2s;
}
.card h2 { font-size: 1.2rem; font-weight: 600; color: #f5a623; margin-bottom: 1.2rem; }

/* GRIDS E INPUTS */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 1rem; }
.grid-4 { display: grid; grid-template-columns: 1fr 1fr 1fr 1fr; gap: 1rem; }
.input-group { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 15px; margin-bottom: 15px; }
.input-field, .field { display: flex; flex-direction: column; gap: .3rem; }
.input-field label, .field label { font-size: .8rem; font-weight: 500; color: #aaa; text-transform: uppercase; letter-spacing: .3px; }
.input-field input, .input-field select, .field input, .field select {
  background: #252525; border: 1px solid #333; border-radius: 8px;
  padding: .7rem .8rem; color: #fff; font-size: 1rem; font-weight: 500; outline: none; width: 100%;
}
.input-field input:focus, .input-field select:focus, .field input:focus { border-color: #f5a623; }
.input-field input:disabled { background: #1a1a1a; color: #666; cursor: not-allowed; }

/* BOTÕES */
.btn { padding: 0.8rem 1.5rem; border-radius: 8px; font-weight: 600; font-size: 0.95rem; cursor: pointer; border: none; transition: all 0.2s; }
.btn-primary { background: #f5a623; color: #0d0d0d; }
.btn-primary:hover { background: #ffb74d; }
.btn-secondary { background: #333; color: #fff; border: 1px solid #444; }
.btn-secondary:hover { background: #444; }

/* ESTILOS ESPECÍFICOS DA ABA POTÊNCIA */
.radio-group { display: flex; gap: 20px; margin-top: 5px; flex-wrap: wrap; }
.radio-group label { display: flex; align-items: center; gap: 8px; cursor: pointer; color: #ccc; text-transform: none; font-size: .95rem; }
.radio-group input[type="radio"] { cursor: pointer; width: 18px; height: 18px; accent-color: #f5a623; }
.hidden { display: none !important; }
.slider-container { display: flex; align-items: center; gap: 15px; margin-top: 5px; }
.slider-container input[type="range"] { flex: 1; accent-color: #f5a623; }
.slider-value { min-width: 50px; text-align: center; font-weight: 700; color: #f5a623; }

/* BLOCOS DE INFORMAÇÃO (ADAPTADOS PARA O DARK THEME) */
.calc-info { background: #0d1a1a; border-left: 4px solid #42a5f5; padding: 12px; border-radius: 6px; margin-top: 10px; font-size: 0.9em; color: #e1e1e1; }
.margin-info { background: #1a0d1a; border-left: 4px solid #ba68c8; padding: 12px; border-radius: 6px; margin-top: 15px; font-size: 0.9em; color: #e1e1e1; }
.ev-info { background: #0d1a0d; border-left: 4px solid #4caf50; padding: 12px; border-radius: 6px; margin-top: 15px; font-size: 0.9em; color: #e1e1e1; }
.tcd-info { background: #2a0d16; border-left: 4px solid #e91e63; padding: 12px; border-radius: 6px; margin-top: 15px; font-size: 0.9em; color: #e1e1e1; }
.duty-cycle-info { background: #0d1a2a; border-left: 4px solid #2196f3; padding: 15px; border-radius: 6px; margin-top: 15px; color: #e1e1e1; font-size: 0.95em; }
.bomba-info { background: #1f1105; border-left: 4px solid #ff9800; padding: 15px; border-radius: 6px; margin-top: 15px; color: #e1e1e1; font-size: 0.95em; }

.bico-extra-section { background: #0d1a2a; border: 2px dashed #42a5f5; padding: 15px; border-radius: 6px; margin-top: 15px; }
.bico-extra-section h4 { color: #64b5f6; margin-bottom: 12px; font-size: 0.95em; }
.bomba-section { background: #1f1105; border: 2px dashed #ff9800; padding: 15px; border-radius: 6px; margin-top: 15px; }
.bomba-section h4 { color: #ffb74d; margin-bottom: 12px; font-size: 0.95em; }

/* ALERTAS DA FUNÇÃO MOSTRAR RESULTADO */
.alert-critico { background: #2a0d0d; border-left: 4px solid #ef5350; padding: 15px; border-radius: 6px; margin-top: 15px; color: #ef5350; font-size: 0.95em; font-weight: 500; }
.alert-alerta, .warning-box { background: #1f1105; border-left: 4px solid #ffb74d; padding: 15px; border-radius: 6px; margin-top: 15px; color: #ffb74d; font-size: 0.95em; }
.alert-sucesso { background: #0d1a0d; border-left: 4px solid #81c784; padding: 15px; border-radius: 6px; margin-top: 15px; color: #81c784; font-size: 0.95em; }

/* TABELA COMPARATIVA DO CÁLCULO DE POTÊNCIA */
.comparison-table { width: 100%; border-collapse: collapse; margin-top: 15px; background: #111; border-radius: 8px; overflow: hidden; border: 1px solid #333; }
.comparison-table th { background: #1a1a1a; color: #f5a623; padding: 12px; text-align: left; font-weight: 600; border-bottom: 1px solid #333; }
.comparison-table td { padding: 12px; border-bottom: 1px solid #222; color: #ccc; }
.comparison-table tr:hover td { background: #151515; color: #fff; }
.comparison-table tr:last-child td { border-bottom: none; }
.highlight { background: #332b00; color: #f5a623; padding: 3px 8px; border-radius: 4px; font-weight: 700; border: 1px solid #f5a62355; }

/* GRÁFICOS */
.chart-container { position: relative; height: 350px; margin-top: 30px; background: #111; padding: 15px; border-radius: 12px; border: 1px solid #2a2a2a; }

@media (max-width: 700px) {
  .grid-2, .grid-3, .grid-4, .input-group { grid-template-columns: 1fr; }
}
.result-main { font-size: 1.5rem; }
.result-main .value { font-size: 1.8rem; font-weight: 700; }
.result-main .sub { font-size: 0.85rem; }
.result-detail { font-size: 0.85rem; color: #999; }
.result-consumo { font-size: 0.9rem; }
.result-info { font-size: 0.75rem; color: #666; }

/* Acessibilidade, toque e análises locais */
.skip-link { position: fixed; left: .5rem; top: -4rem; z-index: 9999; background: #fff; color: #000; padding: .75rem 1rem; border-radius: 6px; }
.skip-link:focus { top: .5rem; }
:focus-visible { outline: 3px solid #42a5f5; outline-offset: 3px; }
button, select, input, .tab, .btn { min-height: 44px; }
.danger { background: #b3261e; color: #fff; }
.dyno-chart { overflow-x: auto; background: #111; border: 1px solid #333; border-radius: 12px; }
.dyno-chart canvas { display: block; width: 100%; min-width: 620px; height: auto; }
@media (max-width: 700px) { body { padding: 1rem .6rem; } .tabs { flex-wrap: nowrap; overflow-x: auto; padding-bottom: .4rem; } .tab { white-space: nowrap; } .card { padding: 1rem; border-radius: 10px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; } }

/* Container de rolagem para tabelas em telas pequenas */
.table-responsive {
  width: 100%;
  overflow-x: auto; /* Cria a barra de rolagem apenas na tabela */
  -webkit-overflow-scrolling: touch; /* Suaviza o scroll no iPhone/Android */
  margin-bottom: 15px;
  display: block;
}

/* Garante que a tabela não tente ser menor que o texto mínimo legível */
.comparison-table {
  width: 100%;
  min-width: 600px; /* Ajuste este valor conforme necessário para seu conteúdo */
  border-collapse: collapse;
}

/* Otimização de fonte para celular */
@media (max-width: 600px) {
  .comparison-table th, .comparison-table td {
    font-size: 0.8rem;
    padding: 6px 4px;
  }
}

/* Fase 3 — gestão de projetos LasanHômetro */
.phase3-shell { max-width: 1180px; }
.phase3-shell a { text-decoration: none; }
.muted { color: #888; font-size: .88rem; line-height: 1.5; }
.project-toolbar, .section-heading, .modal-heading, .version-bar, .version-actions { display:flex; align-items:center; justify-content:space-between; gap:1rem; flex-wrap:wrap; }
.project-toolbar { margin-bottom:1.2rem; }
.project-toolbar h2, .section-heading h2 { color:#f5a623; margin-bottom:.25rem; }
.project-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(310px,1fr)); gap:1rem; }
.project-card { background:#1a1a1a; border:1px solid #2a2a2a; border-radius:16px; padding:1.4rem; display:flex; flex-direction:column; gap:1rem; }
.project-card:hover { border-color:#4a4a4a; }
.project-card h3 { color:#fff; font-size:1.2rem; }
.project-card>p { color:#999; line-height:1.5; min-height:2.8rem; }
.phase3-guide { border-left:4px solid #f5a623; }
.guide-heading { display:flex; justify-content:space-between; align-items:end; gap:1rem; flex-wrap:wrap; }
.guide-heading h2 { margin:.2rem 0 0; }.guide-heading p { color:#888; }
.journey-steps { display:grid; grid-template-columns:repeat(4,1fr); gap:.7rem; list-style:none; margin-top:1rem; }
.journey-steps li { background:#111; border:1px solid #303030; border-radius:10px; padding:.85rem; }
.journey-steps strong,.journey-steps span { display:block; }.journey-steps strong { color:#f5a623; font-size:.85rem; }.journey-steps span { color:#888; font-size:.76rem; line-height:1.4; margin-top:.25rem; }
.project-capabilities { display:flex; gap:.35rem; flex-wrap:wrap; }
.project-capabilities span { background:#242424; border:1px solid #333; border-radius:999px; color:#aaa; font-size:.69rem; padding:.25rem .55rem; }
.workspace-tabs button span { align-items:center; background:#444; border-radius:50%; display:inline-flex; height:1.25rem; justify-content:center; margin-right:.25rem; width:1.25rem; }
.workspace-tabs button.active span { background:#0d0d0d; color:#f5a623; }
.onboarding-panel { background:#17130b; border:1px solid #f5a62366; border-radius:12px; display:grid; gap:.55rem; grid-template-columns:1.4fr repeat(4,1fr); margin-bottom:1rem; padding:1rem; }
.onboarding-panel[hidden] { display:none; }.onboarding-panel strong { align-self:center; color:#f5a623; }
.onboarding-step { background:#252525; border:1px solid #3b3b3b; border-radius:7px; color:#ddd; cursor:pointer; min-height:44px; padding:.55rem; text-align:left; }
.onboarding-step:hover { border-color:#f5a623; }
.project-card-head, .project-actions { display:flex; align-items:center; justify-content:space-between; gap:.5rem; flex-wrap:wrap; }
.status-pill, .lock-state { border-radius:999px; padding:.3rem .65rem; font-size:.75rem; font-weight:700; background:#332b00; color:#f5a623; }
.visibility { color:#777; font-size:.78rem; text-transform:uppercase; letter-spacing:.04em; }
.project-facts, .details { display:grid; grid-template-columns:1fr 1fr; gap:.75rem; }
.project-facts div, .details div { min-width:0; }
.project-facts dt, .details dt, .eyebrow { color:#777; font-size:.68rem; text-transform:uppercase; letter-spacing:.06em; }
.project-facts dd, .details dd { color:#ddd; font-weight:600; margin-top:.18rem; overflow-wrap:anywhere; }
.project-actions .btn { padding:.65rem .8rem; font-size:.82rem; }
.btn-danger, .mini-danger { background:#401b19; color:#ff8a80; border:1px solid #6b2824; }
.mini-danger { border-radius:6px; cursor:pointer; font-size:.72rem; padding:.35rem .55rem; }
.inline-message { border-radius:8px; margin:0 0 1rem; padding:.85rem 1rem; }
.inline-message.success { background:#0d1a0d; border:1px solid #4caf50; color:#81c784; }
.inline-message.error { background:#2a0d0d; border:1px solid #ef5350; color:#ff8a80; }
.empty-state { border:1px dashed #3a3a3a; border-radius:12px; color:#888; grid-column:1/-1; padding:2rem; text-align:center; }
.empty-state h3 { color:#ddd; margin-bottom:.45rem; }
.modal { align-items:center; background:rgba(0,0,0,.82); inset:0; justify-content:center; padding:1rem; position:fixed; z-index:1000; }
.modal[hidden] { display:none; }
.modal:not([hidden]) { display:flex; }
.modal-content { max-height:90vh; overflow:auto; }
.modal-wide { max-width:780px; }
.modal-heading { align-items:flex-start; margin-bottom:1.4rem; }
.modal-heading p { color:#888; font-size:.85rem; margin-top:.25rem; }
.icon-button { background:transparent; border:0; color:#aaa; cursor:pointer; font-size:2rem; line-height:1; min-height:44px; min-width:44px; }
.field textarea { background:#252525; border:1px solid #333; border-radius:8px; color:#fff; font:inherit; padding:.7rem .8rem; resize:vertical; width:100%; }
.field textarea:focus { border-color:#f5a623; outline:none; }
.field-full { grid-column:1/-1; margin-top:1rem; }
.form-actions { display:flex; gap:.75rem; justify-content:flex-end; margin-top:1.5rem; }
.workspace-view { display:none; }
.workspace-view.active { display:block; }
.version-bar { padding:1rem 1.2rem; position:sticky; top:.5rem; z-index:20; }
.version-bar>div:first-child { display:flex; flex-direction:column; gap:.3rem; }
.version-bar select { background:#252525; border:1px solid #444; border-radius:7px; color:#fff; min-height:44px; padding:.5rem .7rem; }
.lock-state.editable { background:#102817; color:#81c784; }
.lock-state.locked { background:#351e11; color:#ffb74d; }
.metric-grid, .score-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(150px,1fr)); gap:.8rem; margin-bottom:1rem; }
.metric, .score-grid>div { background:#111; border:1px solid #2a2a2a; border-radius:12px; padding:1rem; }
.metric span, .score-grid span { color:#777; display:block; font-size:.72rem; text-transform:uppercase; }
.metric strong, .score-grid strong { color:#f5a623; display:block; font-size:1.35rem; margin-top:.3rem; }
.metric small { color:#777; display:block; font-size:.7rem; margin-top:.25rem; }
.metric.budget-positive strong { color:#81c784; }.metric.budget-negative { border-color:#ef5350; }.metric.budget-negative strong { color:#ff8a80; }
.budget-progress { background:#252525; border-radius:999px; height:8px; margin:-.25rem 0 1.25rem; overflow:hidden; }
.budget-progress span { background:#4caf50; display:block; height:100%; transition:width .25s; }.budget-progress span.over { background:#ef5350; }
.long-copy { border-top:1px solid #292929; color:#aaa; line-height:1.6; margin-top:1rem; padding-top:1rem; }
.list-item, .sub-item { border-bottom:1px solid #292929; display:grid; gap:.5rem; padding:.8rem 0; }
.list-item { grid-template-columns:minmax(0,1fr) auto auto; align-items:center; }
.list-item.stacked { grid-template-columns:1fr auto; align-items:start; }
.list-item div:first-child, .sub-item { display:flex; flex-direction:column; }
.list-item span, .sub-item span { color:#888; font-size:.76rem; margin-top:.2rem; }
.list-item p { color:#bbb; font-size:.86rem; line-height:1.45; }
.list-value { color:#f5a623; font-weight:700; }
.strategy-card h3 { color:#aaa; font-size:.85rem; margin:1rem 0 .25rem; text-transform:uppercase; }
.sub-item { position:relative; padding-right:5rem; }
.sub-item .mini-danger { position:absolute; right:0; top:.7rem; }
.assessment-card { margin-top:1rem; }
.assessment-summary { display:flex; justify-content:space-between; gap:1rem; background:#111; border-radius:8px; padding:1rem; margin-bottom:1rem; }
.finding { border-left:4px solid #777; background:#111; border-radius:6px; margin-top:.65rem; padding:.85rem 1rem; }
.finding p, .finding small { color:#aaa; display:block; line-height:1.5; margin-top:.35rem; }
.severity-critical, .severity-high { border-left-color:#ef5350; }.severity-medium { border-left-color:#f5a623; }.severity-low, .severity-info { border-left-color:#42a5f5; }
.result-incompatible { border-left:3px solid #ef5350; }.result-compatible { border-left:3px solid #4caf50; }.result-compatible_with_adaptation { border-left:3px solid #f5a623; }
button:disabled { cursor:not-allowed; opacity:.48; }
@media(max-width:700px){.project-grid,.project-facts,.details,.journey-steps,.onboarding-panel{grid-template-columns:1fr}.version-bar{position:static}.list-item,.list-item.stacked{grid-template-columns:1fr}.section-heading>div:last-child{display:flex;flex-wrap:wrap}.field-full{grid-column:auto}.assessment-summary{flex-direction:column}}

/* Fase 4: catálogo, finanças e estoque pessoal */
.phase4-shell{max-width:1500px}.phase4-tabs{margin:1.25rem 0 2rem;position:sticky;top:0;z-index:5;background:#0b0b0b;padding:.65rem 0}.inventory-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(310px,1fr));gap:1rem}.inventory-card{display:flex;flex-direction:column;gap:.8rem}.inventory-card h2{margin:.2rem 0}.inventory-card.needs-reorder{border-color:#ef9a3d}.inventory-title{display:flex;justify-content:space-between;align-items:flex-start;gap:1rem}.inventory-title>strong{color:#f5a623;white-space:nowrap}.stock-numbers{display:grid;grid-template-columns:repeat(4,1fr);gap:.5rem;margin:0}.stock-numbers div{padding:.65rem;background:#111;border-radius:8px}.stock-numbers dt{color:#929292;font-size:.72rem;text-transform:uppercase}.stock-numbers dd{margin:.3rem 0 0;font-weight:700}.card-actions{display:flex;gap:.6rem;margin-top:auto;flex-wrap:wrap}.compact-list{padding:.5rem 1.2rem}.ledger-row,.allocation-row{display:flex;justify-content:space-between;align-items:center;gap:1rem;padding:.9rem 0;border-bottom:1px solid #2c2c2c}.ledger-row:last-child,.allocation-row:last-child{border-bottom:0}.ledger-row div,.allocation-row div{display:flex;flex-direction:column;gap:.25rem}.ledger-row div:last-child{text-align:right}.ledger-row span,.allocation-row span{color:#9c9c9c;font-size:.86rem}.mini-action{border:1px solid #f5a623;color:#f5a623;background:transparent;border-radius:7px;padding:.45rem .7rem;cursor:pointer}.section-heading.minor{margin-top:2rem}.search-field{display:flex;align-items:center;gap:.65rem;color:#aaa}.search-field input{min-width:280px}.catalog-heading-actions{display:flex;align-items:flex-end;gap:.75rem;flex-wrap:wrap}.catalog-heading-actions .search-field{margin:0}
@media(max-width:760px){.stock-numbers{grid-template-columns:repeat(2,1fr)}.inventory-title,.ledger-row,.allocation-row{align-items:flex-start;flex-direction:column}.ledger-row div:last-child{text-align:left}.search-field{align-items:flex-start;flex-direction:column}.search-field input{min-width:0;width:100%}.phase4-tabs{position:static}}
