* { box-sizing: border-box; margin: 0; padding: 0; }

/* Scrollbar minimalista */
* {
  scrollbar-width: thin;
  scrollbar-color: transparent transparent;
}
*:hover {
  scrollbar-color: #444 transparent;
}
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: transparent;
  border-radius: 3px;
}
*:hover::-webkit-scrollbar-thumb {
  background: #444;
}
::-webkit-scrollbar-thumb:hover {
  background: #666;
}

body { font-family: 'Inter', system-ui, sans-serif; background: #1a1a1a; color: #fff; min-height: 100vh; padding: 16px; padding-bottom: 32px; }
.container { max-width: 480px; margin: 0 auto; }

@media (min-width: 900px) {
  body { padding: 40px; }
  .container { max-width: 900px; display: grid; grid-template-columns: 380px 1fr; gap: 24px; }
  .header, .banner, .guide { grid-column: 1 / -1; }
  .card { margin-bottom: 0; }
  .results-card { align-self: start; }
  .prices { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; overflow: visible; }
  .price-card { flex: none; }
}

.header { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; padding: 8px 0; }
.header svg { width: 28px; height: 28px; color: #e53935; }
.header h1 { font-size: 20px; font-weight: 600; }

.card { background: #252525; border-radius: 16px; padding: 20px; margin-bottom: 16px; }

.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field.full { grid-column: 1 / -1; }

label { font-size: 12px; color: #999; font-weight: 500; text-transform: uppercase; letter-spacing: 0.5px; }

input, select { 
  width: 100%; padding: 14px 16px; background: #1a1a1a; border: 1px solid #333; 
  border-radius: 10px; font-size: 16px; color: #fff; font-family: inherit;
  -webkit-appearance: none; appearance: none; -moz-appearance: textfield;
}
input::-webkit-outer-spin-button, input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
input:focus, select:focus { outline: none; border-color: #e53935; }
select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23999' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 40px; }
select option:disabled { color: #666; }

.toggle { display: flex; align-items: center; justify-content: space-between; margin-top: 16px; padding-top: 16px; border-top: 1px solid #333; }
.toggle-label { font-size: 14px; color: #ccc; }
.switch { position: relative; width: 52px; height: 28px; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; inset: 0; background: #333; border-radius: 28px; cursor: pointer; transition: 0.2s; }
.slider:before { content: ''; position: absolute; width: 22px; height: 22px; left: 3px; bottom: 3px; background: #666; border-radius: 50%; transition: 0.2s; }
input:checked + .slider { background: #e53935; }
input:checked + .slider:before { transform: translateX(24px); background: #fff; }

.section-title { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 600; color: #999; margin-bottom: 16px; text-transform: uppercase; letter-spacing: 0.5px; }
.section-title svg { width: 18px; height: 18px; color: #e53935; }

.paper-section { margin-bottom: 20px; }
.paper-section:last-child { margin-bottom: 0; }

.paper-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.paper-name { font-size: 16px; font-weight: 600; text-transform: capitalize; }
.paper-min { font-size: 12px; color: #666; background: #1a1a1a; padding: 4px 10px; border-radius: 20px; }

.prices { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 4px; -webkit-overflow-scrolling: touch; }
.prices::-webkit-scrollbar { display: none; }

.price-card { 
  flex: 0 0 140px; background: #1a1a1a; border: 1px solid #333; border-radius: 12px; 
  padding: 14px; text-align: center; transition: 0.2s;
}
.price-card:first-child { border-color: #e53935; }
.price-card:active { transform: scale(0.98); }

.copy-btn { width: 100%; margin-top: 16px; padding: 12px; background: #333; border: none; border-radius: 10px; color: #fff; font-size: 14px; font-family: inherit; cursor: pointer; transition: 0.2s; }
.copy-btn:active { background: #e53935; }

.price-rolls { font-size: 11px; color: #666; margin-bottom: 6px; text-transform: uppercase; }
.price-value { font-size: 22px; font-weight: 700; color: #e53935; }
.price-unit { font-size: 12px; color: #666; }
.price-total { font-size: 12px; color: #999; margin-top: 8px; padding-top: 8px; border-top: 1px solid #333; }

.empty { text-align: center; color: #666; padding: 40px 20px; }
.empty svg { width: 48px; height: 48px; margin-bottom: 12px; opacity: 0.3; }
.empty p { font-size: 14px; }

.hint { margin-top: 12px; padding: 10px 12px; background: #2d2200; border-radius: 8px; font-size: 12px; color: #d97706; line-height: 1.4; }

.field-hint { font-size: 11px; color: #666; margin-top: 4px; }
.field-hint.warn { color: #d97706; }

.label-row { display: flex; align-items: center; gap: 6px; }
.info-btn { width: 14px; height: 14px; border-radius: 50%; background: #333; border: none; color: #666; font-size: 10px; cursor: pointer; display: flex; align-items: center; justify-content: center; position: relative; }
.info-btn:hover { background: #444; color: #999; }
.info-tooltip { display: none; position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%); background: #333; color: #ccc; font-size: 11px; padding: 8px 10px; border-radius: 6px; width: 180px; margin-bottom: 6px; line-height: 1.4; text-transform: none; letter-spacing: 0; font-weight: 400; z-index: 10; }
.info-tooltip::after { content: ''; position: absolute; top: 100%; left: 50%; transform: translateX(-50%); border: 5px solid transparent; border-top-color: #333; }
.info-btn.active .info-tooltip, .info-btn:hover .info-tooltip { display: block; }

.link-btn { background: none; border: none; color: #666; font-size: 11px; cursor: pointer; padding: 0; }
.link-btn:hover { color: #e53935; }

.action-btns { display: flex; gap: 10px; margin-top: 16px; }
.copy-btn { flex: 1; margin-top: 0; display: flex; align-items: center; justify-content: center; gap: 8px; }
.copy-btn svg { width: 16px; height: 16px; }
.copy-btn.copied { background: #166534; }
.whatsapp-btn { padding: 12px 16px; background: #166534; border: none; border-radius: 10px; color: #fff; font-size: 14px; font-family: inherit; cursor: pointer; transition: 0.2s; display: flex; align-items: center; gap: 8px; }
.whatsapp-btn:hover { background: #15803d; }
.whatsapp-btn svg { width: 18px; height: 18px; }
.preview-btn { width: 100%; margin-top: 16px; padding: 12px; background: transparent; border: 1px solid #444; border-radius: 10px; color: #999; font-size: 13px; font-family: inherit; cursor: pointer; transition: 0.2s; display: flex; align-items: center; justify-content: center; gap: 8px; }
.preview-btn:hover { border-color: #666; color: #ccc; }
.preview-btn svg { width: 16px; height: 16px; }

.modal { display: none; position: fixed; inset: 0; z-index: 1000; align-items: center; justify-content: center; padding: 20px; }
.modal.open { display: flex; }
.modal-overlay { position: absolute; inset: 0; background: rgba(0,0,0,0.8); }
.modal-content { position: relative; background: #252525; border-radius: 16px; padding: 24px; max-width: 400px; width: 100%; max-height: 90vh; overflow: auto; }
.modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.modal-title { font-size: 16px; font-weight: 600; }
.modal-close { background: none; border: none; color: #666; cursor: pointer; padding: 4px; }
.modal-close:hover { color: #fff; }
.modal-close svg { width: 20px; height: 20px; }

.label-preview { background: #1a1a1a; border-radius: 10px; padding: 20px; }
.label-strip { display: flex; align-items: center; justify-content: center; gap: var(--gap); background: #2a2a2a; border-radius: 6px; padding: 16px; margin-bottom: 16px; }
.label-cell { background: #fff; border-radius: 3px; display: flex; align-items: center; justify-content: center; font-size: 10px; color: #333; font-weight: 500; }
.label-cell.colored { background: linear-gradient(135deg, #e53935 0%, #ff7043 100%); color: #fff; }
.label-info { font-size: 12px; color: #666; }
.label-info span { display: block; margin-bottom: 6px; }
.label-info strong { color: #999; }

.compare-btn { width: 100%; margin-top: 10px; padding: 10px; background: transparent; border: 1px solid #333; border-radius: 8px; color: #666; font-size: 12px; font-family: inherit; cursor: pointer; transition: 0.2s; }
.compare-btn:hover { border-color: #666; color: #999; }
.compare-btn.has-a { border-color: #e53935; color: #e53935; background: #2d1a1a; }
.compare-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 500px) { .compare-grid { grid-template-columns: 1fr; } }
.compare-col { background: #1a1a1a; border-radius: 10px; padding: 16px; }
.compare-col h4 { font-size: 13px; color: #e53935; margin-bottom: 8px; text-transform: uppercase; }
.compare-col .specs { font-size: 12px; color: #999; margin-bottom: 12px; line-height: 1.5; }
.compare-col .paper-row { padding: 8px 0; border-top: 1px solid #333; }
.compare-col .paper-name { font-size: 12px; font-weight: 600; color: #ccc; margin-bottom: 4px; text-transform: capitalize; }
.compare-col .paper-prices { font-size: 11px; color: #666; }

.help-fab { position: fixed; bottom: 20px; right: 20px; width: 48px; height: 48px; background: #333; border: 1px solid #444; border-radius: 50%; color: #999; font-size: 20px; cursor: pointer; display: flex; align-items: center; justify-content: center; z-index: 100; transition: 0.2s; }
.help-fab:hover { background: #444; color: #fff; border-color: #666; }
@media (min-width: 900px) { .help-fab { bottom: 30px; right: 30px; } }

.help-body { font-size: 14px; color: #ccc; line-height: 1.6; }
.help-section { margin-bottom: 20px; }
.help-section:last-child { margin-bottom: 0; }
.help-section h4 { font-size: 13px; color: #e53935; text-transform: uppercase; margin-bottom: 10px; letter-spacing: 0.5px; }
.help-section p { color: #999; margin-bottom: 8px; }
.help-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 500px) { .help-grid { grid-template-columns: 1fr; } }
.help-item { background: #1a1a1a; border-radius: 8px; padding: 12px; }
.help-item strong { color: #ccc; display: block; margin-bottom: 4px; font-size: 13px; }
.help-item span { color: #666; font-size: 12px; }

.disclaimer-body { font-size: 14px; color: #ccc; line-height: 1.6; }
.disclaimer-body p { margin-bottom: 12px; }
.disclaimer-body ul { margin: 16px 0; padding-left: 20px; color: #999; }
.disclaimer-body li { margin-bottom: 8px; }
.disclaimer-contact { margin-top: 20px; padding-top: 16px; border-top: 1px solid #333; font-size: 13px; color: #666; }
.disclaimer-contact strong { color: #e53935; }
.disclaimer-btn { width: 100%; margin-top: 20px; padding: 14px; background: #e53935; border: none; border-radius: 10px; color: #fff; font-size: 14px; font-weight: 600; font-family: inherit; cursor: pointer; }
.disclaimer-btn:hover { background: #c62828; }

.dev-credit { text-align: center; padding: 16px 12px 24px; font-size: 11px; color: #666; }
.dev-credit a { color: #888; text-decoration: none; }
.dev-credit a:hover { color: #e53935; text-decoration: underline; }

/* ========================================
   REFERÊNCIAS - Sistema de Tabs e Tabelas
   ======================================== */

/* FAB Button - Referências */
.ref-fab {
  position: fixed;
  bottom: 20px;
  left: 20px;
  width: 48px;
  height: 48px;
  background: #333;
  border: 1px solid #444;
  border-radius: 50%;
  color: #999;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  transition: 0.2s;
}
.ref-fab:hover {
  background: #444;
  color: #fff;
  border-color: #666;
}
.ref-fab svg {
  width: 22px;
  height: 22px;
}
@media (min-width: 900px) {
  .ref-fab { bottom: 30px; left: 30px; }
}

/* Modal de Referências */
.ref-modal .modal-content {
  max-width: 680px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  padding: 0;
}
.ref-modal .modal-header {
  padding: 20px 24px 16px;
  margin-bottom: 0;
  border-bottom: 1px solid #333;
  flex-shrink: 0;
}

/* Tabs Navigation */
.ref-tabs {
  display: flex;
  gap: 4px;
  padding: 0 16px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  flex-shrink: 0;
  background: #252525;
  border-bottom: 1px solid #333;
}
.ref-tabs::-webkit-scrollbar { display: none; }

.ref-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 12px 14px;
  background: none;
  border: none;
  color: #666;
  font-size: 10px;
  font-family: inherit;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  cursor: pointer;
  white-space: nowrap;
  transition: 0.2s;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.ref-tab:hover {
  color: #999;
}
.ref-tab[aria-selected="true"] {
  color: #e53935;
  border-bottom-color: #e53935;
}
.ref-tab svg {
  width: 18px;
  height: 18px;
}

/* Tab Panels Container */
.ref-panels {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}
.ref-panel {
  display: none;
}
.ref-panel.active {
  display: block;
}

/* Seção dentro do painel */
.ref-section {
  margin-bottom: 24px;
}
.ref-section:last-child {
  margin-bottom: 0;
}
.ref-section-title {
  font-size: 13px;
  font-weight: 600;
  color: #ccc;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.ref-section-title svg {
  width: 16px;
  height: 16px;
  color: #e53935;
}
.ref-section-subtitle {
  font-size: 11px;
  color: #666;
  font-weight: 400;
  margin-left: 4px;
}

/* Tabelas de Referência */
.ref-table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 8px;
  border: 1px solid #333;
}
.ref-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  min-width: 300px;
}
.ref-table thead {
  position: sticky;
  top: 0;
  z-index: 1;
}
.ref-table th {
  background: #1a1a1a;
  color: #999;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid #333;
  white-space: nowrap;
}
.ref-table th.text-right,
.ref-table td.text-right {
  text-align: right;
}
.ref-table th.text-center,
.ref-table td.text-center {
  text-align: center;
}
.ref-table td {
  padding: 10px 12px;
  color: #ccc;
  border-bottom: 1px solid #2a2a2a;
  vertical-align: middle;
}
.ref-table tbody tr:last-child td {
  border-bottom: none;
}
.ref-table tbody tr:hover {
  background: #2a2a2a;
}
.ref-table .price {
  color: #fff;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.ref-table .highlight {
  color: #e53935;
  font-weight: 600;
}
.ref-table .muted {
  color: #666;
}

/* Cards de Referência */
.ref-cards {
  display: grid;
  gap: 12px;
}
@media (min-width: 500px) {
  .ref-cards.cols-2 { grid-template-columns: 1fr 1fr; }
  .ref-cards.cols-3 { grid-template-columns: 1fr 1fr 1fr; }
}
.ref-card {
  background: #1a1a1a;
  border: 1px solid #333;
  border-radius: 10px;
  padding: 16px;
}
.ref-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid #333;
}
.ref-card-title {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
}
.ref-card-badge {
  font-size: 10px;
  color: #999;
  background: #333;
  padding: 3px 8px;
  border-radius: 10px;
}
.ref-card-body {
  font-size: 12px;
  color: #999;
  line-height: 1.5;
}
.ref-card-body strong {
  color: #ccc;
}

/* Accordion para Ribbons */
.ref-accordion {
  border: 1px solid #333;
  border-radius: 8px;
  overflow: hidden;
}
.ref-accordion-item {
  border-bottom: 1px solid #333;
}
.ref-accordion-item:last-child {
  border-bottom: none;
}
.ref-accordion-header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: #1a1a1a;
  border: none;
  color: #ccc;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: 0.2s;
}
.ref-accordion-header:hover {
  background: #222;
}
.ref-accordion-header[aria-expanded="true"] {
  background: #222;
  color: #e53935;
}
.ref-accordion-header svg {
  width: 16px;
  height: 16px;
  transition: transform 0.2s;
}
.ref-accordion-header[aria-expanded="true"] svg {
  transform: rotate(180deg);
}
.ref-accordion-content {
  display: none;
  padding: 0;
  background: #1f1f1f;
}
.ref-accordion-content.open {
  display: block;
}
.ref-accordion-content .ref-table-wrapper {
  border: none;
  border-radius: 0;
}
.ref-accordion-content .ref-table {
  font-size: 11px;
}
.ref-accordion-content .ref-table th,
.ref-accordion-content .ref-table td {
  padding: 8px 12px;
}

/* Nota de rodapé */
.ref-note {
  margin-top: 12px;
  padding: 10px 12px;
  background: #1a1a1a;
  border-radius: 6px;
  font-size: 11px;
  color: #666;
  line-height: 1.4;
}
.ref-note strong {
  color: #999;
}

/* Grid compacto para Motoboy */
.ref-motoboy-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  background: #1a1a1a;
  border: 1px solid #333;
  border-radius: 8px;
  padding: 12px;
}
@media (min-width: 500px) {
  .ref-motoboy-grid { grid-template-columns: repeat(3, 1fr); }
}
.ref-motoboy-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 10px;
  background: #252525;
  border-radius: 6px;
  font-size: 12px;
}
.ref-motoboy-item span:first-child {
  color: #999;
}
.ref-motoboy-item .price {
  color: #fff;
  font-weight: 600;
}
.ref-motoboy-item.muted {
  opacity: 0.6;
}

/* Cores de categoria */
.ref-tab[data-category="payment"] svg { color: #22c55e; }
.ref-tab[data-category="shipping"] svg { color: #3b82f6; }
.ref-tab[data-category="labels"] svg { color: #e53935; }
.ref-tab[data-category="ribbon"] svg { color: #f97316; }

.ref-tab[data-category="payment"][aria-selected="true"] { color: #22c55e; border-bottom-color: #22c55e; }
.ref-tab[data-category="shipping"][aria-selected="true"] { color: #3b82f6; border-bottom-color: #3b82f6; }
.ref-tab[data-category="labels"][aria-selected="true"] { color: #e53935; border-bottom-color: #e53935; }
.ref-tab[data-category="ribbon"][aria-selected="true"] { color: #f97316; border-bottom-color: #f97316; }
