/* ============================================================
   Solution4Hotel — Design System
   Cores: #7132a1 (primária), #9e68c5 (secundária)
   Fonte: Nunito (Google Fonts)
   ============================================================ */

:root {
  --purple:       #7132a1;
  --purple-light: #9e68c5;
  --purple-pale:  #f5f0fb;
  --purple-dark:  #4e2173;
  --navy:         #1a0d33;
  --white:        #ffffff;
  --gray-50:      #f9f9fb;
  --gray-100:     #f0edf6;
  --gray-200:     #e2d9f0;
  --gray-400:     #b0a0c8;
  --gray-600:     #6b5e80;
  --gray-800:     #333344;
  --text:         #2d2d3a;
  --text-muted:   #6b6b80;
  --radius:       10px;
  --radius-sm:    6px;
  --shadow:       0 2px 12px rgba(113,50,161,0.10);
  --shadow-lg:    0 6px 28px rgba(113,50,161,0.15);
  --transition:   0.2s ease;
}

/* ── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body { font-family: 'Nunito', sans-serif; color: var(--text); background: var(--gray-50); min-height: 100vh; display: flex; flex-direction: column; }
img { max-width: 100%; display: block; }
a { text-decoration: none; }

/* ── Header ─────────────────────────────────────────────────── */
.header {
  background: linear-gradient(135deg, var(--navy) 0%, var(--purple) 100%);
  box-shadow: 0 2px 16px rgba(0,0,0,0.25);
  position: sticky; top: 0; z-index: 100;
}
.header-inner {
  max-width: 1200px; margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex; align-items: center; justify-content: space-between;
}
.logo-link { display: flex; align-items: center; }
.logo-img { height: 44px; width: auto; filter: brightness(0) invert(1); }

.header-nav { display: flex; align-items: center; gap: 8px; }

/* ── Botão pesquisa em destaque no nav ───────────────────────── */
.nav-link--survey {
  background: rgba(255,255,255,.18) !important;
  border: 1.5px solid rgba(255,255,255,.5) !important;
  color: #fff !important;
  font-weight: 800 !important;
  animation: pulse-survey 2.5s ease-in-out infinite;
}
.nav-link--survey:hover, .nav-link--survey.active {
  background: #fff !important;
  color: var(--purple) !important;
  animation: none;
}
@keyframes pulse-survey {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255,255,255,.4); }
  50%       { box-shadow: 0 0 0 6px rgba(255,255,255,.0); }
}

/* ── Hamburger (mobile only) ──────────────────────────────────── */
.nav-toggle {
  display: none;
  flex-direction: column; justify-content: center; align-items: center;
  gap: 5px; width: 44px; height: 44px;
  background: rgba(255,255,255,0.1); border: none; border-radius: var(--radius-sm);
  cursor: pointer; padding: 0; flex-shrink: 0;
}
.nav-toggle span {
  display: block; width: 22px; height: 2px;
  background: #fff; border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.nav-link {
  color: rgba(255,255,255,0.8);
  font-size: 14px; font-weight: 600;
  padding: 8px 16px; border-radius: var(--radius-sm);
  transition: background var(--transition), color var(--transition);
  position: relative;
}
.nav-link:hover, .nav-link.active {
  background: rgba(255,255,255,0.15);
  color: #fff;
}
.cart-btn { display: flex; align-items: center; gap: 6px; }
.cart-icon { font-size: 16px; }
.cart-badge {
  background: #fff; color: var(--purple);
  font-size: 11px; font-weight: 800;
  min-width: 18px; height: 18px;
  border-radius: 9px; padding: 0 5px;
  display: inline-flex; align-items: center; justify-content: center;
  line-height: 1;
}
.cart-badge.hidden { display: none; }

/* ── Barra de condições comerciais ──────────────────────────── */
.comercial-bar {
  background: var(--purple-pale);
  border-top: 2px solid var(--gray-200);
  border-bottom: 2px solid var(--gray-200);
  padding: 14px 24px;
}
.comercial-inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; align-items: flex-start;
  gap: 24px; flex-wrap: wrap;
}
.comercial-item {
  display: flex; align-items: flex-start; gap: 12px;
  flex: 1; min-width: 260px;
}
.comercial-icon { font-size: 22px; line-height: 1.3; flex-shrink: 0; }
.comercial-item > div { display: flex; flex-direction: column; gap: 3px; }
.comercial-item strong { font-size: 13px; font-weight: 800; color: var(--purple); }
.comercial-item span { font-size: 12px; color: var(--text-muted); line-height: 1.5; }
.comercial-divider {
  width: 1px; background: var(--gray-200); align-self: stretch;
  flex-shrink: 0;
}
@media (max-width: 640px) {
  .comercial-divider { display: none; }
}

/* ── Flash messages ─────────────────────────────────────────── */
.flash-container { max-width: 1200px; margin: 16px auto 0; padding: 0 24px; }
.flash {
  padding: 12px 18px; border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 600;
  margin-bottom: 8px;
}
.flash-error   { background: #fce8e8; color: #c0392b; border: 1px solid #f5c6c6; }
.flash-warning { background: #fff8e1; color: #8a6d00; border: 1px solid #ffe082; }
.flash-success { background: #e8f5e9; color: #2e7d32; border: 1px solid #c8e6c9; }

/* ── Main content ───────────────────────────────────────────── */
.main-content { flex: 1; max-width: 1200px; margin: 0 auto; width: 100%; padding: 32px 24px; }

/* ── Footer ─────────────────────────────────────────────────── */
.footer { background: var(--navy); padding: 20px 24px; margin-top: auto; }
.footer-inner { max-width: 1200px; margin: 0 auto; text-align: center; color: rgba(255,255,255,0.45); font-size: 13px; }

/* ── Buttons ─────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 22px; border-radius: var(--radius-sm);
  font-family: 'Nunito', sans-serif; font-size: 14px; font-weight: 700;
  cursor: pointer; border: none; transition: all var(--transition);
  white-space: nowrap;
}
.btn-primary { background: var(--purple); color: #fff; }
.btn-primary:hover { background: var(--purple-dark); transform: translateY(-1px); box-shadow: var(--shadow); }
.btn-secondary { background: var(--purple-pale); color: var(--purple); }
.btn-secondary:hover { background: var(--gray-200); }
.btn-outline { background: transparent; color: var(--purple); border: 2px solid var(--purple); }
.btn-outline:hover { background: var(--purple-pale); }
.btn-lg { padding: 13px 28px; font-size: 15px; }
.btn-full { width: 100%; }

/* ── Cards ───────────────────────────────────────────────────── */
.card {
  background: #fff; border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 28px;
}
.card-title { font-size: 17px; font-weight: 800; color: var(--purple); margin-bottom: 6px; }
.card-subtitle { font-size: 13px; color: var(--text-muted); margin-bottom: 24px; }
.required-mark { color: var(--purple); }
.optional-label { color: var(--gray-400); font-size: 12px; font-weight: 400; }
.text-muted { color: var(--text-muted); }

/* ============================================================
   PAGE: REGISTER
   ============================================================ */
.page-register { }

.register-hero {
  position: relative; overflow: hidden;
  background: linear-gradient(135deg, var(--navy) 0%, var(--purple) 100%);
  border-radius: var(--radius); padding: 56px 48px;
  margin-bottom: 32px;
}
.hero-pattern {
  position: absolute; inset: 0; opacity: 0.07;
  background-image: repeating-linear-gradient(
    45deg, #fff 0, #fff 2px, transparent 0, transparent 50%
  );
  background-size: 20px 20px;
}
.hero-text { position: relative; max-width: 560px; }
.hero-text h1 { font-size: 32px; font-weight: 800; color: #fff; margin-bottom: 12px; line-height: 1.2; }
.hero-text p  { font-size: 16px; color: rgba(255,255,255,0.8); line-height: 1.6; }

.register-form-wrap { max-width: 720px; }

.form-card { }
.form-row { margin-bottom: 20px; }
.form-row.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label { font-size: 13px; font-weight: 700; color: var(--gray-800); }
.form-group--highlight { background: var(--purple-pale); border: 2px solid var(--purple-light); border-radius: 10px; padding: 14px 16px; }
.form-group--highlight label { color: var(--purple); font-size: 14px; }

input[type=text], input[type=email], input[type=tel],
select, textarea {
  width: 100%; padding: 11px 14px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-family: 'Nunito', sans-serif; font-size: 14px; color: var(--text);
  background: #fff;
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--purple-light);
  box-shadow: 0 0 0 3px rgba(113,50,161,0.1);
}
input::placeholder, textarea::placeholder { color: var(--gray-400); }
textarea { resize: vertical; }

.form-actions { margin-top: 28px; }

/* ============================================================
   PAGE: CATALOG
   ============================================================ */
.page-catalog { }

.catalog-header { margin-bottom: 24px; }
.catalog-header-inner {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 16px;
}
.catalog-header h1 { font-size: 24px; font-weight: 800; color: var(--purple); }
.catalog-header p { font-size: 14px; color: var(--text-muted); margin-top: 4px; }

.cart-summary-btn { position: relative; }
.cart-badge-lg {
  background: var(--purple); color: #fff;
  font-size: 11px; font-weight: 800;
  min-width: 20px; height: 20px;
  border-radius: 10px; padding: 0 5px;
  display: inline-flex; align-items: center; justify-content: center;
}
.cart-badge-lg.hidden { display: none; }

/* Filter bar */
.filter-bar {
  background: #fff; border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 20px 24px;
  margin-bottom: 28px;
}
.filter-group { margin-bottom: 16px; }
.filter-group:last-child { margin-bottom: 0; }
.filter-group > label {
  display: block; font-size: 12px; font-weight: 700;
  color: var(--purple); text-transform: uppercase; letter-spacing: 0.8px;
  margin-bottom: 10px;
}
.filter-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  padding: 6px 14px; border-radius: 20px;
  font-size: 13px; font-weight: 600;
  background: var(--gray-100); color: var(--gray-600);
  border: 1.5px solid transparent;
  transition: all var(--transition);
}
.chip:hover { background: var(--purple-pale); color: var(--purple); border-color: var(--purple-light); }
.chip-active { background: var(--purple); color: #fff; border-color: var(--purple); }
.chip-active:hover { background: var(--purple-dark); color: #fff; }

/* Product grid */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}
.product-card {
  background: #fff; border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: flex; flex-direction: column;
  overflow: hidden;
  transition: box-shadow var(--transition), transform var(--transition);
}
.product-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }

.product-img-wrap { position: relative; background: var(--purple-pale); padding: 24px; aspect-ratio: 16/9; display: flex; align-items: center; justify-content: center; }
.product-img-wrap img { max-height: 120px; object-fit: contain; }
.product-img-placeholder svg { width: 100px; height: auto; }

.product-type-badge {
  position: absolute; top: 10px; right: 10px;
  font-size: 11px; font-weight: 800;
  padding: 4px 10px; border-radius: 20px;
  text-transform: uppercase; letter-spacing: 0.5px;
}
.badge-frio              { background: #e3f0ff; color: #1565c0; }
.badge-quente-e-frio     { background: #fff3e0; color: #e65100; }

.product-info { padding: 16px 18px; flex: 1; }
.product-brand { font-size: 11px; font-weight: 700; color: var(--purple-light); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 4px; }
.product-model { font-size: 16px; font-weight: 800; color: var(--text); margin-bottom: 4px; }
.product-btus { font-size: 13px; color: var(--text-muted); margin-bottom: 8px; }
.product-desc { font-size: 12px; color: var(--text-muted); line-height: 1.5; margin-bottom: 8px; }
.product-price { font-size: 20px; font-weight: 800; color: var(--purple); }

.product-actions {
  padding: 14px 18px; border-top: 1px solid var(--gray-100);
  display: flex; align-items: center; gap: 12px;
}
.qty-control { display: flex; align-items: center; gap: 0; }
.qty-btn {
  width: 30px; height: 30px;
  background: var(--gray-100); border: none; cursor: pointer;
  font-size: 16px; font-weight: 700; color: var(--purple);
  transition: background var(--transition);
  border-radius: var(--radius-sm);
}
.qty-btn:hover { background: var(--purple-pale); }
.qty-input {
  width: 44px; height: 30px; text-align: center;
  border: 1.5px solid var(--gray-200); border-radius: 0;
  font-size: 14px; font-weight: 700;
  padding: 0;
}
.add-to-cart-btn { flex: 1; font-size: 13px; padding: 8px 12px; }

/* Empty state */
.empty-state { grid-column: 1 / -1; text-align: center; padding: 60px 24px; }
.empty-icon { font-size: 48px; margin-bottom: 16px; }
.empty-state h3 { font-size: 20px; font-weight: 700; color: var(--text); margin-bottom: 8px; }
.empty-state p { color: var(--text-muted); margin-bottom: 20px; }

/* Toast */
.toast {
  position: fixed; bottom: 24px; right: 24px;
  background: var(--purple); color: #fff;
  padding: 12px 20px; border-radius: var(--radius);
  font-size: 14px; font-weight: 600;
  box-shadow: var(--shadow-lg);
  opacity: 0; transform: translateY(10px);
  transition: opacity 0.25s, transform 0.25s;
  z-index: 200; pointer-events: none;
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast.hidden { display: none; }

/* ============================================================
   PAGE: CART
   ============================================================ */
.page-cart { }
.cart-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 24px; flex-wrap: wrap; gap: 12px;
}
.cart-header h1 { font-size: 24px; font-weight: 800; color: var(--purple); }

.cart-layout { display: grid; grid-template-columns: 1fr 340px; gap: 24px; align-items: start; }

.cart-table-wrap { overflow-x: auto; }
.cart-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.cart-table th {
  background: var(--purple-pale); color: var(--purple);
  padding: 10px 14px; text-align: left;
  font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px;
  border-bottom: 2px solid var(--gray-200);
}
.cart-table td { padding: 14px; border-bottom: 1px solid var(--gray-100); vertical-align: middle; }
.cart-table tr:last-child td { border-bottom: none; }

.badge-tipo {
  display: inline-block; padding: 3px 10px; border-radius: 20px;
  font-size: 11px; font-weight: 700;
  background: var(--purple-pale); color: var(--purple);
}
.subtotal-cell { font-weight: 700; color: var(--purple); }
.remove-btn {
  background: none; border: none; cursor: pointer;
  color: var(--gray-400); font-size: 14px; font-weight: 700;
  width: 28px; height: 28px; border-radius: 50%;
  transition: all var(--transition); display: flex; align-items: center; justify-content: center;
}
.remove-btn:hover { background: #fce8e8; color: #c0392b; }

.qty-control-sm { display: flex; align-items: center; gap: 6px; }
.qty-btn-sm {
  width: 24px; height: 24px; border: 1.5px solid var(--gray-200);
  background: #fff; cursor: pointer; border-radius: 4px;
  font-size: 14px; font-weight: 700; color: var(--purple);
  display: flex; align-items: center; justify-content: center;
  transition: all var(--transition);
}
.qty-btn-sm:hover { background: var(--purple-pale); border-color: var(--purple-light); }
.qty-display { font-weight: 700; min-width: 24px; text-align: center; font-size: 14px; }

/* Sidebar cards */
.cart-sidebar { display: flex; flex-direction: column; gap: 16px; }
.client-summary-card { }
.summary-list { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; font-size: 13px; }
.summary-list dt { color: var(--text-muted); font-weight: 600; }
.summary-list dd { color: var(--text); font-weight: 700; }

/* ── Pagamento ─────────────────────────────────────────── */
.payment-card .card-subtitle { font-size: 13px; color: var(--gray-600); margin-bottom: 16px; }
.payment-options { display: flex; flex-direction: column; gap: 10px; margin-bottom: 4px; }

.payment-option {
  display: flex; align-items: center; gap: 14px;
  border: 2px solid var(--gray-200); border-radius: 10px;
  padding: 14px 16px; cursor: pointer;
  transition: border-color .2s, background .2s;
}
.payment-option:hover { border-color: var(--purple-light); background: var(--purple-pale); }
.payment-option.selected { border-color: var(--purple); background: var(--purple-pale); }
.payment-option input[type=radio] { accent-color: var(--purple); width: 18px; height: 18px; flex-shrink: 0; }
.payment-icon { font-size: 22px; }
.payment-info { display: flex; flex-direction: column; }
.payment-info strong { font-size: 15px; color: var(--text); }
.payment-info span { font-size: 12px; color: var(--gray-600); margin-top: 2px; }

.installment-wrap { margin-top: 16px; }
.installment-label { font-size: 12px; font-weight: 700; color: var(--gray-800); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 10px; }
.installment-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: flex; align-items: center; gap: 6px;
  border: 1.5px solid var(--gray-200); border-radius: 20px;
  padding: 6px 14px; font-size: 13px; font-weight: 600; cursor: pointer;
  transition: border-color .15s, background .15s, color .15s;
}
.chip:hover { border-color: var(--purple-light); }
.chip:has(input:checked) { border-color: var(--purple); background: var(--purple); color: #fff; }
.chip input[type=radio] { display: none; }
.installment-info { font-size: 13px; font-weight: 700; color: var(--purple); margin-top: 10px; min-height: 20px; }

.payment-required-msg { font-size: 12px; color: var(--gray-600); text-align: center; margin-top: 8px; }
#btn-submit:disabled { opacity: .45; cursor: not-allowed; }

.total-card { }
.total-row {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 8px;
}
.total-row > span { font-size: 14px; color: var(--text-muted); font-weight: 600; }
.total-value { font-size: 26px; font-weight: 800; color: var(--purple); }
.total-note { font-size: 11px; color: var(--gray-400); margin-bottom: 20px; line-height: 1.5; }

/* ============================================================
   PAGE: CONFIRMATION
   ============================================================ */
.page-confirmation {
  display: flex; align-items: center; justify-content: center;
  min-height: 60vh;
}
.confirmation-card {
  background: #fff; border-radius: var(--radius);
  box-shadow: var(--shadow-lg); padding: 48px;
  max-width: 560px; width: 100%; text-align: center;
}
.confirmation-icon svg { width: 72px; height: 72px; margin: 0 auto 24px; }
.confirmation-card h1 { font-size: 28px; font-weight: 800; color: var(--purple); margin-bottom: 12px; }
.confirmation-subtitle { font-size: 16px; color: var(--text-muted); margin-bottom: 32px; line-height: 1.6; }

.confirmation-details { background: var(--purple-pale); border-radius: var(--radius-sm); padding: 20px 24px; margin-bottom: 24px; text-align: left; }
.detail-item { display: flex; justify-content: space-between; align-items: baseline; padding: 8px 0; border-bottom: 1px solid var(--gray-200); }
.detail-item:last-child { border-bottom: none; }
.detail-label { font-size: 12px; color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }
.detail-value { font-size: 14px; font-weight: 700; color: var(--text); }
.detail-highlight { font-size: 16px; font-weight: 800; color: var(--purple); }

.confirmation-message { font-size: 14px; color: var(--text-muted); line-height: 1.7; margin-bottom: 32px; }
.confirmation-actions { }

/* ============================================================
   PAGE: ADMIN
   ============================================================ */
.page-admin { }

.admin-login-card {
  max-width: 400px; width: 100%; margin: 0 auto; padding: 40px;
}

.admin-topbar {
  display: flex; align-items: flex-start; justify-content: space-between;
  margin-bottom: 24px; flex-wrap: wrap; gap: 12px;
}
.admin-page-title { font-size: 22px; font-weight: 800; color: var(--purple); margin-bottom: 4px; }
.admin-page-sub { font-size: 13px; color: var(--text-muted); display: flex; align-items: center; gap: 8px; }

/* Admin table */
.admin-table-wrap { overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.admin-table th {
  background: var(--purple-pale); color: var(--purple);
  padding: 10px 14px; text-align: left;
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px;
  border-bottom: 2px solid var(--gray-200); white-space: nowrap;
}
.admin-table td { padding: 12px 14px; border-bottom: 1px solid var(--gray-100); vertical-align: middle; }
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: var(--gray-50); }

.order-number-link {
  font-family: monospace; font-size: 13px; font-weight: 700;
  color: var(--purple); text-decoration: underline;
}
.order-number-link:hover { color: var(--purple-dark); }

.text-muted-sm { font-size: 12px; color: var(--text-muted); }
.produtos-cell { font-size: 12px; color: var(--text-muted); max-width: 280px; white-space: normal; line-height: 1.4; }

/* Status badges */
.status-badge {
  display: inline-block; padding: 3px 10px; border-radius: 20px;
  font-size: 11px; font-weight: 700; white-space: nowrap;
}
.status-novo                { background: #e3f0ff; color: #1a6fc4; }
.status-orçamento           { background: #e3f0ff; color: #1a6fc4; }
.status-orçamento-aprovado  { background: #fff3cd; color: #856404; }
.status-em-faturamento      { background: #e8f5e9; color: #2e7d32; }
.status-fechado             { background: #d4edda; color: #155724; }
.status-em-análise          { background: #fff3cd; color: #856404; }
.status-pedido-confirmado   { background: #d4edda; color: #155724; }
.status-cancelado           { background: #fce8e8; color: #c0392b; }

/* Dropdown de status inline na tabela */
.status-select {
  border: none; background: transparent; font-size: 12px; font-weight: 700;
  cursor: pointer; padding: 3px 6px; border-radius: 20px;
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23666'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 6px center;
  padding-right: 20px;
}

/* Admin edit layout */
.admin-edit-layout {
  display: grid; grid-template-columns: 1fr 320px; gap: 20px; align-items: start;
}
.admin-edit-main { display: flex; flex-direction: column; }
.admin-edit-sidebar { display: flex; flex-direction: column; gap: 16px; }
.admin-actions-card { }
.field-label { display:block; font-size:12px; font-weight:700; color:var(--text-muted); margin-bottom:4px; }

/* Seletor de pagamento no admin edit */
.edit-pay-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 6px;
}
.edit-pay-card {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 8px 4px; gap: 4px;
  border: 1.5px solid var(--gray-200); border-radius: var(--radius-sm);
  cursor: pointer; transition: var(--transition);
}
.edit-pay-card input[type="radio"] { display: none; }
.edit-pay-card:hover { border-color: var(--purple); }
.edit-pay-card.selected { border-color: var(--purple); background: var(--purple-pale); }
.epc-icon  { font-size: 18px; line-height: 1; }
.epc-label { font-size: 11px; font-weight: 700; color: var(--navy); line-height: 1.3; }
.epc-label small { font-weight: 400; color: var(--text-muted); }

/* Preço editável pelo admin */
.price-edit-input {
  width: 90px; text-align: right; border: 1px solid transparent;
  background: transparent; font-size: 13px; font-weight: 600;
  color: var(--navy); padding: 3px 4px; border-radius: 3px;
  transition: var(--transition);
}
.price-edit-input:hover { border-color: var(--purple-light); background: var(--purple-pale); }
.price-edit-input:focus { border-color: var(--purple); background: var(--purple-pale); outline: none; }

/* ── Configuração de Comissões ─────────────────────────────────────────────── */
.comm-info-banner {
  background: #fff8e1; border: 1px solid #ffe082; border-radius: var(--radius-sm);
  padding: 12px 16px; font-size: 13px; line-height: 1.6; margin-bottom: 20px;
  color: #5f4339;
}
.comm-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px;
}
.comm-card { padding: 20px; }
.comm-card--wide { padding: 20px; }
.comm-card-title {
  display: flex; align-items: center; gap: 10px; margin-bottom: 16px;
}
.comm-card-title h3 { font-size: 15px; font-weight: 700; color: var(--navy); margin: 0; }
.comm-icon { font-size: 20px; }
.comm-row { display: flex; gap: 12px; flex-wrap: wrap; }
.comm-row .form-group { flex: 1; min-width: 120px; }
.pct-input-wrap { display: flex; align-items: center; gap: 4px; }
.pct-input-wrap .form-input { flex: 1; }
.pct-suffix { font-size: 14px; font-weight: 600; color: var(--text-muted); white-space: nowrap; }
.comm-preview {
  margin-top: 10px; background: #fff3e0; border: 1px solid #ffcc80;
  border-radius: var(--radius-sm); padding: 8px 12px; font-size: 12px; color: #e65100;
}
.comm-preview-text strong { font-weight: 700; }
.comm-sub-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.comm-sub-table th {
  text-align: left; padding: 8px 10px; background: var(--gray-100);
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
  color: var(--text-muted); border-bottom: 1px solid var(--gray-200);
}
.comm-sub-table td { padding: 10px; border-bottom: 1px solid var(--gray-100); vertical-align: middle; }
.comm-sub-table tr:last-child td { border-bottom: none; }
.comm-markup-badge {
  background: #ff9800; color: #fff; font-size: 10px; font-weight: 700;
  padding: 2px 8px; border-radius: 20px; white-space: nowrap;
}

/* Qty input */
.qty-input {
  width: 52px; text-align: center; font-weight: 700; font-size: 14px;
  border: 1.5px solid var(--gray-200); border-radius: var(--radius-sm);
  padding: 4px 6px;
}
.qty-input:focus { outline: none; border-color: var(--purple); }

/* Admin total bar */
.admin-total-bar {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--purple-pale); border-radius: var(--radius-sm);
  padding: 14px 20px; margin-top: 16px;
}
.admin-total-bar span { font-size: 14px; color: var(--text-muted); font-weight: 600; }
.admin-total-bar strong { font-size: 22px; font-weight: 800; color: var(--purple); }

/* Add product row */
.add-product-row {
  display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
}
.add-product-row .form-input { font-size: 13px; padding: 8px 10px; }

/* Button sizes */
.btn-sm { font-size: 12px; padding: 6px 14px; }
.btn-full { width: 100%; }

/* ── KPI cards (admin/relatorio) ─────────────────────────── */
.kpi-section-label {
  font-size: 11px; font-weight: 700; color: var(--purple);
  text-transform: uppercase; letter-spacing: .8px;
  margin: 0 0 12px;
}
.kpi-grid { display: grid; gap: 14px; }
.kpi-grid-3 { grid-template-columns: repeat(3, 1fr); }
.kpi-grid-4 { grid-template-columns: repeat(4, 1fr); }

.kpi-card {
  background: var(--purple-pale);
  border-radius: var(--radius); padding: 20px 16px;
  text-align: center; display: flex; flex-direction: column; gap: 6px;
}
.kpi-card--purple { background: var(--purple); }
.kpi-card--green  { background: #e8f5e9; }

.kpi-icon { font-size: 22px; }
.kpi-val  {
  font-size: 32px; font-weight: 800; color: var(--purple); line-height: 1;
}
.kpi-val--sm { font-size: 20px; }
.kpi-card--purple .kpi-val,
.kpi-card--purple .kpi-lbl,
.kpi-card--purple .kpi-icon { color: #fff; }
.kpi-card--green .kpi-val { color: #2e7d32; }
.kpi-lbl { font-size: 12px; font-weight: 600; color: var(--text-muted); }
.kpi-card--purple .kpi-lbl { color: rgba(255,255,255,.75); }

/* Conversão + status grid */
.kpi-bottom-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 20px;
}
.kpi-conv-card { }
.conv-display { display: flex; align-items: baseline; gap: 16px; margin: 12px 0; }
.conv-pct  { font-size: 52px; font-weight: 800; color: var(--purple); line-height: 1; }
.conv-desc { font-size: 13px; color: var(--text-muted); line-height: 1.5; }
.conv-bar-wrap { margin-top: 12px; }
.conv-bar-bg   { background: var(--gray-200); border-radius: 20px; height: 10px; overflow: hidden; }
.conv-bar-fill { background: linear-gradient(90deg, var(--purple), var(--purple-light)); height: 100%; border-radius: 20px; transition: width .5s ease; }

/* ============================================================
   PORTAL DO CLIENTE — Nav user menu
   ============================================================ */
.nav-user-menu {
  position: relative;
  cursor: pointer;
}
.nav-user-name {
  color: rgba(255,255,255,.85);
  font-size: 14px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255,255,255,.3);
  transition: var(--transition);
  white-space: nowrap;
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}
.nav-user-menu:hover .nav-user-name { background: rgba(255,255,255,.15); }
.nav-user-dropdown {
  display: none;
  position: absolute;
  right: 0; top: 100%;
  padding-top: 8px; /* espaço visual sem gap que quebra o hover */
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  min-width: 160px;
  overflow: hidden;
  z-index: 200;
}
.nav-user-menu:hover .nav-user-dropdown { display: block; }
.nav-user-dropdown a {
  display: block;
  padding: 10px 16px;
  font-size: 14px;
  color: var(--text);
  transition: var(--transition);
}
.nav-user-dropdown a:hover { background: var(--purple-pale); color: var(--purple); }

/* ── Formulários — extras ────────────────────────────────────── */
.form-card--narrow { max-width: 420px; }
.btn-full { width: 100%; }
.form-alt-link {
  text-align: center;
  margin-top: 20px;
  font-size: 14px;
  color: var(--text-muted);
}
.form-alt-link a { color: var(--purple); font-weight: 700; }
.form-section-label {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--purple-light);
  margin-bottom: 8px;
}
.input-disabled { background: var(--gray-100); color: var(--text-muted); cursor: not-allowed; }
.field-hint { font-size: 12px; color: var(--text-muted); margin-top: 4px; display: block; }

/* ── Frete info no carrinho ──────────────────────────────────── */
.payment-frete-info {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 16px;
  padding: 10px 14px;
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--text-muted);
}
.payment-frete-icon { font-size: 16px; flex-shrink: 0; }
.payment-frete-info strong { color: var(--text); }
.payment-frete-obs { font-size: 12px; }

/* ── Página de entrada (login / sem cadastro / value prop) ───── */
.page-entry {
  min-height: calc(100vh - 120px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
}
.entry-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  max-width: 860px;
  width: 100%;
}
@media (max-width: 680px) {
  .entry-layout { grid-template-columns: 1fr; }
}
.entry-auth { display: flex; flex-direction: column; gap: 0; }
.entry-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 16px 0;
  color: var(--text-muted);
  font-size: 13px;
}
.entry-divider::before,
.entry-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--gray-200);
}
.entry-guest-card { background: var(--gray-50); }
.entry-value-prop {
  background: linear-gradient(135deg, var(--purple) 0%, #7c3aed 100%);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 32px;
  color: #fff;
}
.entry-vp-inner { max-width: 320px; }
.entry-vp-icon { font-size: 36px; margin-bottom: 12px; }
.entry-vp-title { font-size: 22px; font-weight: 800; margin-bottom: 10px; color: #fff; }
.entry-vp-sub { font-size: 14px; opacity: 0.85; margin-bottom: 20px; line-height: 1.5; }
.entry-vp-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; }
.entry-vp-list li { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; line-height: 1.5; }
.vp-check { color: #a5f3a0; font-size: 15px; flex-shrink: 0; margin-top: 1px; }
.entry-vp-list strong { color: #fff; }

/* Nav link destacado (visitante) */
.nav-link--highlight {
  color: var(--purple) !important;
  font-weight: 700;
}

/* Guest cart banner */
.guest-cart-banner {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  background: #fff8e1;
  border: 1px solid #ffe082;
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 16px;
}
.guest-cart-banner-icon { font-size: 22px; flex-shrink: 0; margin-top: 2px; }
.guest-cart-banner strong { display: block; margin-bottom: 4px; color: #7c5600; }
.guest-cart-banner p { margin: 0; font-size: 13px; color: #8a6500; line-height: 1.5; }

/* Guest notice */
.guest-notice {
  display: flex;
  gap: 12px;
  background: var(--purple-pale);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 13px;
  line-height: 1.5;
}
.guest-notice-icon { font-size: 18px; flex-shrink: 0; }
.guest-notice strong { display: block; margin-bottom: 2px; color: var(--purple); }
.guest-notice a { color: var(--purple); font-weight: 600; }

/* ── Admin novo orçamento — grid de campos do cliente ─────────── */
.nq-fields-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 20px;
}
.nq-fields-grid .nq-full {
  grid-column: 1 / -1;
}
.req { color: var(--purple); }

/* ── Category bar ─────────────────────────────────────────────── */
.category-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 0 0 16px;
  border-bottom: 1px solid var(--gray-200);
  margin-bottom: 4px;
}
.category-tab {
  padding: 8px 16px;
  border-radius: 24px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--white);
  border: 1.5px solid var(--gray-200);
  transition: var(--transition);
}
.category-tab:hover { border-color: var(--purple-light); color: var(--purple); }
.category-tab--active {
  background: var(--purple);
  border-color: var(--purple);
  color: #fff;
}

/* ── Documentos ───────────────────────────────────────────────── */
.doc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}
.doc-type-card { display: flex; flex-direction: column; gap: 12px; }
.doc-type-title { font-size: 15px; font-weight: 700; color: var(--text); }
.doc-list { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.doc-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
}
.doc-icon { font-size: 18px; flex-shrink: 0; }
.doc-info { flex: 1; min-width: 0; }
.doc-name { display: block; font-size: 13px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.doc-meta { display: block; font-size: 11px; color: var(--text-muted); }
.btn-icon-del {
  background: none; border: none; cursor: pointer;
  color: #e53935; font-size: 14px; padding: 4px 6px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  flex-shrink: 0;
}
.btn-icon-del:hover { background: #fdecea; }
.doc-empty { font-size: 13px; color: var(--text-muted); }
.doc-upload-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.doc-upload-label { cursor: pointer; flex: 1; min-width: 0; }
.doc-upload-input { display: none; }
.doc-upload-btn { display: inline-block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 180px; }
.doc-upload-submit { flex-shrink: 0; }
.doc-note { font-size: 12px; color: var(--text-muted); margin-top: 4px; }

/* ── Admin clientes expandíveis ───────────────────────────────── */
.docs-row td { padding: 0 !important; }
.docs-expand-wrap { padding: 12px 16px; background: var(--gray-50); }
.docs-inner-table { font-size: 13px; }
.docs-row.hidden { display: none; }

/* ── Barra de filtros (admin relatorio) ────────────────────────── */
.report-filters {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  flex-wrap: wrap;
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 20px;
}
.report-filter-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.report-filter-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--text-muted);
}
.report-filter-select {
  padding: 7px 10px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  background: #fff;
  cursor: pointer;
  min-width: 170px;
}
.report-filter-select:focus { border-color: var(--purple); outline: none; }
.period-tabs--inline {
  background: none;
  padding: 0;
  border-radius: 0;
  gap: 4px;
  width: auto;
}
.period-tabs--inline .period-tab {
  background: #fff;
  border: 1.5px solid var(--gray-200);
  cursor: pointer;
  font-family: 'Nunito', sans-serif;
}
.period-tabs--inline .period-tab:hover { border-color: var(--purple); color: var(--purple); }
.period-tabs--inline .period-tab--active { background: var(--purple); color: #fff; border-color: var(--purple); }

/* ── Seletor de período (admin relatorio) ──────────────────────── */
.period-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 20px;
  background: var(--gray-100);
  padding: 4px;
  border-radius: var(--radius);
  width: fit-content;
}
.period-tab {
  padding: 6px 18px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
  transition: background var(--transition), color var(--transition);
}
.period-tab:hover { background: #fff; color: var(--purple); }
.period-tab--active { background: var(--purple); color: #fff; }

/* ── Cards de categoria (admin relatorio) ──────────────────────── */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.cat-card {
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
}
.cat-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.cat-icon { font-size: 20px; }
.cat-label { font-weight: 700; font-size: 15px; color: var(--navy); flex: 1; }
.cat-pct {
  font-size: 13px;
  font-weight: 700;
  color: var(--purple);
  background: var(--purple-pale);
  border-radius: 20px;
  padding: 2px 10px;
}
.cat-bar-wrap {
  height: 6px;
  background: var(--gray-200);
  border-radius: 99px;
  overflow: hidden;
  margin-bottom: 8px;
}
.cat-bar-fill {
  height: 100%;
  background: var(--purple);
  border-radius: 99px;
}
.cat-stats {
  display: flex;
  gap: 12px;
  font-size: 13px;
  color: var(--text-muted);
  flex-wrap: wrap;
}
.cat-stats span:nth-child(2) { font-weight: 700; color: var(--text); }
.cat-vendas { color: #2e7d32; font-weight: 600; }

/* Subcategorias */
.subcat-list { margin-top: 12px; border-top: 1px solid var(--gray-100); padding-top: 10px; display: flex; flex-direction: column; gap: 6px; }
.subcat-row { display: grid; grid-template-columns: 110px 1fr 90px; align-items: center; gap: 8px; }
.subcat-label { font-size: 12px; color: var(--text-muted); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.subcat-bar-wrap { height: 4px; background: var(--gray-100); border-radius: 99px; overflow: hidden; }
.subcat-bar-fill { height: 100%; background: var(--purple-light); border-radius: 99px; }
.subcat-val { font-size: 12px; font-weight: 700; color: var(--text); text-align: right; }

/* ── kpi-section-label (admin relatorio) ──────────────────────── */
.kpi-section-label {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-muted);
  margin-bottom: 12px;
}

/* ── Pesquisa de demanda GPO ─────────────────────────────────── */
.pesquisa-list { display: flex; flex-direction: column; gap: 4px; }
.pesquisa-grupo { margin-top: 16px; }
.pesquisa-grupo-label {
  font-size: 11px; font-weight: 800; text-transform: uppercase;
  letter-spacing: .06em; color: var(--purple); margin-bottom: 6px;
  padding: 4px 0; border-bottom: 2px solid var(--purple-pale);
}
.pesquisa-grupo-items { display: flex; flex-direction: column; gap: 4px; padding-left: 12px; }
.pesquisa-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px; border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm); cursor: pointer;
  transition: border-color .15s, background .15s;
}
.pesquisa-item:hover { border-color: var(--purple-light); background: var(--purple-pale); }
.pesquisa-item--checked { border-color: var(--purple); background: var(--purple-pale); }
.pesquisa-item input[type=checkbox] { accent-color: var(--purple); width: 18px; height: 18px; flex-shrink: 0; }
.pesquisa-item-label { flex: 1; font-size: 14px; font-weight: 600; color: var(--text); }
.pesquisa-item-qty { display: flex; align-items: center; gap: 6px; }
.pesquisa-qty-input {
  width: 80px; padding: 4px 8px; border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm); font-size: 13px; text-align: center;
}

/* Sugestões (admin result) */
.sugestao-item { padding: 14px 0; border-bottom: 1px solid var(--gray-100); }
.sugestao-item:last-child { border-bottom: none; }
.sugestao-hotel { display: flex; gap: 12px; align-items: baseline; margin-bottom: 4px; }
.sugestao-texto { font-size: 14px; color: var(--text); line-height: 1.6; }

/* ── Banner GPO no catálogo ──────────────────────────────────── */
.gpo-catalog-banner {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: linear-gradient(135deg, var(--navy) 0%, var(--purple) 100%);
  border-radius: var(--radius); padding: 12px 18px;
  margin-bottom: 16px; flex-wrap: wrap;
}
.gpo-catalog-banner-text {
  display: flex; flex-direction: column; gap: 2px;
  color: #fff;
}
.gpo-catalog-banner-text strong { font-size: 14px; }
.gpo-catalog-banner-text span { font-size: 12px; opacity: .8; }

/* ── Fiscal badge bar (catalog — enxovais) ───────────────────── */
.fiscal-badge-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  background: var(--purple-pale);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
  font-size: 13px;
}
.fiscal-badge {
  font-weight: 600;
  color: var(--purple-dark);
}
.fiscal-badge-link {
  color: var(--purple);
  font-size: 12px;
  text-decoration: underline;
}
.fiscal-badge-link:hover { color: var(--purple-dark); }

/* ── Enxovais product card ───────────────────────────────────── */
.product-grid--enxoval {
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}
.enxoval-card {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.enxoval-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px 8px;
  border-bottom: 1px solid var(--gray-100);
}
.enxoval-badge-sub {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  background: var(--purple);
  color: #fff;
  border-radius: 20px;
  padding: 2px 10px;
}
.enxoval-badge-col {
  font-size: 12px;
  font-weight: 600;
  color: var(--purple-dark);
  background: var(--purple-pale);
  border-radius: 20px;
  padding: 2px 10px;
}
.enxoval-specs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 4px 0 8px;
}
.enxoval-spec {
  font-size: 12px;
  color: var(--text-muted);
  background: var(--gray-100);
  border-radius: var(--radius-sm);
  padding: 2px 8px;
}
.enxoval-frete-badge {
  font-size: 12px;
  color: #2e7d32;
  font-weight: 600;
  margin-top: 4px;
}

/* ── Radio options (fiscal profile form) ─────────────────────── */
.radio-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.radio-option {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
}
.radio-option:hover { border-color: var(--purple-light); background: var(--purple-pale); }
.radio-option input[type="radio"] { margin-top: 3px; accent-color: var(--purple); }
.radio-option span { display: flex; flex-direction: column; gap: 2px; }
.radio-option strong { font-size: 14px; color: var(--text); }
.radio-option small { font-size: 12px; color: var(--text-muted); }

/* ── Fabrica minimum progress (cart) ─────────────────────────── */
.fabrica-minimo-card { margin-bottom: 16px; }
.fabrica-progress-item { }
.fabrica-progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}
.fabrica-progress-bar {
  height: 8px;
  background: var(--gray-200);
  border-radius: 99px;
  overflow: hidden;
}
.fabrica-progress-fill {
  height: 100%;
  background: var(--purple);
  border-radius: 99px;
  transition: width 0.3s ease;
}
.fabrica-abaixo .fabrica-progress-fill { background: #e07b00; }
.fabrica-aviso {
  font-size: 12px;
  color: #b45309;
  margin-top: 5px;
  font-weight: 600;
}

/* ── QMM labels (cart & catalog) ─────────────────────────────── */
.product-price-unit {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 400;
  margin-left: 2px;
}
.qmm-label {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
  display: inline-block;
}
.qmm-warn {
  font-size: 11px;
  color: #b45309;
  font-weight: 700;
  margin-top: 4px;
}

/* ── Botão specs no card ─────────────────────────────────────── */
.btn-specs {
  width: 100%;
  font-size: 13px;
  padding: 6px 0;
  margin-bottom: 8px;
  color: var(--purple);
  border-color: var(--gray-200);
}
.btn-specs:hover { border-color: var(--purple); background: var(--purple-pale); }

/* ── Modal especificações ────────────────────────────────────── */
.specs-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 500;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.specs-modal-overlay.open { display: flex; }

.specs-modal-box {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 560px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.specs-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px 12px;
  border-bottom: 1px solid var(--gray-100);
}
.specs-modal-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--navy);
  margin: 0;
  line-height: 1.3;
}
.specs-modal-close {
  background: none;
  border: none;
  font-size: 16px;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}
.specs-modal-close:hover { background: var(--gray-100); color: var(--text); }
.specs-modal-body {
  overflow-y: auto;
  padding: 4px 0 8px;
}
.specs-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}
.specs-table tr:nth-child(even) { background: var(--gray-50); }
.specs-key {
  padding: 8px 20px;
  color: var(--text-muted);
  font-weight: 600;
  width: 42%;
  white-space: nowrap;
}
.specs-val {
  padding: 8px 20px 8px 0;
  color: var(--text);
}

/* ============================================================
   GPO — Compras Colaborativas
   ============================================================ */

/* Hero */
.gpo-hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--purple) 100%);
  padding: 64px 24px;
  text-align: center;
  color: #fff;
  margin: -32px -24px 40px;
}
.gpo-hero-inner { max-width: 640px; margin: 0 auto; }
.gpo-hero-badge {
  display: inline-block;
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.3);
  border-radius: 20px; padding: 4px 16px;
  font-size: 13px; font-weight: 700; margin-bottom: 16px;
}
.gpo-hero-title { font-size: 36px; font-weight: 800; line-height: 1.2; margin-bottom: 16px; }
.gpo-hero-sub { font-size: 16px; opacity: .85; margin-bottom: 28px; line-height: 1.6; }
.gpo-hero .btn { margin: 6px; }

/* Sections */
.gpo-section { margin-bottom: 48px; }
.gpo-section-title { font-size: 22px; font-weight: 800; color: var(--navy); margin-bottom: 16px; }
.gpo-section-text { font-size: 15px; line-height: 1.7; color: var(--text); max-width: 720px; }

/* Fases */
.gpo-phases { display: flex; flex-direction: column; gap: 0; }
.gpo-phase {
  display: flex; gap: 20px; padding: 20px 0;
  border-left: 3px solid var(--gray-200);
  padding-left: 24px; margin-left: 20px;
  position: relative;
}
.gpo-phase + .gpo-phase { border-left-color: var(--gray-200); }
.gpo-phase--active { border-left-color: var(--purple) !important; }
.gpo-phase--future { opacity: .6; }
.gpo-phase-num {
  position: absolute; left: -22px; top: 20px;
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--gray-200); color: var(--text-muted);
  font-weight: 800; font-size: 16px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.gpo-phase--active .gpo-phase-num { background: var(--purple); color: #fff; }
.gpo-phase-body h3 { font-size: 16px; font-weight: 800; color: var(--navy); margin-bottom: 6px; }
.gpo-phase-body p { font-size: 14px; color: var(--text-muted); line-height: 1.6; }
.gpo-phase-badge {
  display: inline-block; font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .5px;
  background: var(--purple); color: #fff;
  border-radius: 20px; padding: 2px 10px; margin-bottom: 6px;
}

/* Cards de campanha */
.gpo-camp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}
.gpo-camp-grid--full { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.gpo-camp-card {
  background: #fff; border: 1px solid var(--gray-200);
  border-radius: var(--radius); padding: 20px;
  box-shadow: var(--shadow);
}
.gpo-camp-card--done { border-color: var(--purple-light); background: var(--purple-pale); }
.gpo-camp-cat {
  display: inline-block; font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .5px;
  background: var(--purple-pale); color: var(--purple);
  border-radius: 20px; padding: 2px 10px; margin-bottom: 10px;
}
.gpo-camp-badge-done {
  font-size: 12px; font-weight: 700; color: #2e7d32;
}
.gpo-camp-titulo { font-size: 16px; font-weight: 800; color: var(--navy); margin-bottom: 8px; }
.gpo-camp-desc { font-size: 13px; color: var(--text-muted); line-height: 1.5; margin-bottom: 8px; }
.gpo-camp-prazo { font-size: 13px; color: var(--text-muted); }

/* ABIH bar */
.gpo-abih-bar {
  background: var(--purple-pale); border: 1px solid var(--gray-200);
  border-radius: var(--radius); padding: 16px 24px;
  text-align: center; font-size: 14px; color: var(--purple-dark);
  margin-top: 40px;
}

/* Label de seção */
.gpo-section-label {
  font-size: 11px; font-weight: 800; letter-spacing: 1.5px;
  text-transform: uppercase; color: var(--purple); margin-bottom: 8px;
}

/* Variantes de fundo */
.gpo-section--purple-bg {
  background: linear-gradient(135deg, var(--navy) 0%, var(--purple) 100%);
  border-radius: var(--radius); padding: 48px 40px; margin-bottom: 48px;
}
.gpo-section--light-bg {
  background: var(--purple-pale); border-radius: var(--radius);
  padding: 48px 40px; margin-bottom: 48px;
}

/* Desafios — grid 2x2 */
.gpo-challenge-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
}
.gpo-challenge-card {
  background: #fff; border: 1.5px solid var(--gray-200);
  border-radius: var(--radius); padding: 24px;
  border-left: 4px solid var(--purple);
}
.gpo-challenge-icon { font-size: 28px; margin-bottom: 12px; }
.gpo-challenge-card h3 { font-size: 15px; font-weight: 800; color: var(--navy); margin-bottom: 8px; }
.gpo-challenge-card p  { font-size: 13px; color: var(--text-muted); line-height: 1.6; }

/* Solução — grid 2 colunas */
.gpo-solution-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.gpo-solution-card {
  background: rgba(255,255,255,.12); border: 1.5px solid rgba(255,255,255,.25);
  border-radius: var(--radius); padding: 28px; color: #fff;
}
.gpo-solution-card--filled {
  background: rgba(255,255,255,.2); border-color: rgba(255,255,255,.4);
}
.gpo-solution-num {
  font-size: 10px; font-weight: 800; letter-spacing: 1.5px;
  color: rgba(255,255,255,.6); text-transform: uppercase; margin-bottom: 12px;
}
.gpo-solution-card h3 { font-size: 20px; font-weight: 800; margin-bottom: 12px; line-height: 1.3; }
.gpo-solution-card p  { font-size: 14px; line-height: 1.7; color: rgba(255,255,255,.85); }

/* Esteira — grid 4 colunas */
.gpo-esteira-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.gpo-esteira-step {
  background: #fff; border: 1.5px solid var(--gray-200);
  border-radius: var(--radius); padding: 24px; text-align: center;
  border-top: 4px solid var(--purple); position: relative;
}
.gpo-esteira-num {
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--purple); color: #fff;
  font-size: 22px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 16px;
}
.gpo-esteira-step h3 { font-size: 14px; font-weight: 800; color: var(--navy); margin-bottom: 10px; }
.gpo-esteira-step p  { font-size: 13px; color: var(--text-muted); line-height: 1.6; }

/* Benefícios — lista */
.gpo-benefits-list { display: flex; flex-direction: column; gap: 16px; max-width: 640px; margin: 0 auto; }
.gpo-benefit-item {
  display: flex; gap: 16px; align-items: flex-start;
  background: #fff; border-radius: var(--radius); padding: 20px 24px;
  border: 1.5px solid var(--gray-200);
}
.gpo-benefit-icon { font-size: 26px; flex-shrink: 0; margin-top: 2px; }
.gpo-benefit-item strong { font-size: 15px; font-weight: 800; color: var(--navy); display: block; margin-bottom: 4px; }
.gpo-benefit-item p { font-size: 13px; color: var(--text-muted); line-height: 1.6; margin: 0; }

/* Tabela comparativa */
.gpo-table-wrap { overflow-x: auto; }
.gpo-compare-table {
  width: 100%; border-collapse: collapse; font-size: 14px;
  border-radius: var(--radius); overflow: hidden;
  border: 1.5px solid var(--gray-200);
}
.gpo-compare-table thead tr { background: var(--purple); }
.gpo-compare-table th {
  padding: 14px 18px; color: #fff; font-size: 12px;
  text-transform: uppercase; letter-spacing: .5px; text-align: left;
}
.gpo-compare-table th.col-s4h { color: #fff; font-weight: 800; }
.gpo-compare-table th.col-sozinho { color: rgba(255,255,255,.75); }
.gpo-compare-table td { padding: 14px 18px; border-bottom: 1px solid var(--gray-200); color: var(--text-muted); }
.gpo-compare-table tr:last-child td { border-bottom: none; }
.gpo-compare-table tr:nth-child(even) td { background: var(--purple-pale); }
.gpo-compare-table td:first-child { color: var(--navy); font-weight: 600; }
.gpo-compare-table td.td-highlight { color: var(--purple); font-weight: 700; }

/* Como começar — 3 passos */
.gpo-steps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 8px; }
.gpo-step {
  background: rgba(255,255,255,.12); border: 1.5px solid rgba(255,255,255,.25);
  border-radius: var(--radius); padding: 28px; text-align: center; color: #fff;
}
.gpo-step-num {
  font-size: 36px; font-weight: 900; color: rgba(255,255,255,.3);
  line-height: 1; margin-bottom: 12px;
}
.gpo-step h3 { font-size: 16px; font-weight: 800; margin-bottom: 8px; }
.gpo-step p  { font-size: 13px; color: rgba(255,255,255,.75); line-height: 1.6; margin: 0; }

/* Responsivo GPO */
@media (max-width: 768px) {
  .gpo-challenge-grid { grid-template-columns: 1fr; }
  .gpo-solution-grid  { grid-template-columns: 1fr; }
  .gpo-esteira-grid   { grid-template-columns: 1fr 1fr; }
  .gpo-steps-grid     { grid-template-columns: 1fr; }
  .gpo-section--purple-bg,
  .gpo-section--light-bg { padding: 32px 20px; }
}
@media (max-width: 480px) {
  .gpo-esteira-grid { grid-template-columns: 1fr; }
}

/* Page header (campanhas internas) */
.page-gpo { }
.gpo-page-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 16px; margin-bottom: 24px; flex-wrap: wrap;
}
.gpo-page-header h1 { font-size: 24px; font-weight: 800; color: var(--purple); }
.gpo-page-header p { font-size: 14px; color: var(--text-muted); margin-top: 4px; }

/* Status badges GPO */
.status-aberta       { background: #e8f5e9; color: #2e7d32; }
.status-consolidando { background: #fff8e1; color: #8a6d00; }
.status-encerrada    { background: #f5f5f5; color: #555; }

/* ============================================================
   PRINT
   ============================================================ */
@media print {
  @page { size: A4 landscape; margin: 10mm; }

  /* Oculta elementos de navegação e UI */
  .header, .footer, .comercial-bar, .flash-container,
  .no-print { display: none !important; }

  /* Reset de layout para impressão */
  body { background: #fff; color: #000; font-size: 11pt; }
  .main-content { padding: 0; max-width: 100%; }
  .page-admin { padding: 0; }

  /* Título do relatório */
  .admin-topbar {
    border-bottom: 2pt solid #000;
    padding-bottom: 8pt;
    margin-bottom: 16pt;
  }
  .admin-page-title { font-size: 18pt; color: #000; }
  .admin-page-sub { font-size: 10pt; color: #444; }

  /* KPI cards — 4 por linha */
  .kpi-grid-4 {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 8pt !important;
  }
  .kpi-grid-3 {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
  }
  .kpi-card {
    border: 1pt solid #ccc;
    box-shadow: none;
    padding: 10pt 8pt;
    break-inside: avoid;
  }
  .kpi-card--purple { background: #f0e8fa !important; }
  .kpi-card--green  { background: #e8f5e9 !important; }
  .kpi-val  { font-size: 18pt; color: #000; }
  .kpi-val--sm { font-size: 13pt; }
  .kpi-lbl  { font-size: 8pt; color: #555; }
  .kpi-icon { font-size: 14pt; }
  .kpi-section-label { font-size: 8pt; color: #555; margin-top: 14pt; }

  /* Cards de categoria */
  .cat-grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 8pt !important;
  }
  .cat-card {
    border: 1pt solid #ccc;
    box-shadow: none;
    break-inside: avoid;
    padding: 10pt;
  }
  .cat-bar-fill, .subcat-bar-fill { background: #666 !important; }
  .cat-pct { background: #eee !important; color: #000 !important; }

  /* Conversão + status */
  .kpi-bottom-grid {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 12pt !important;
    margin-top: 16pt;
  }
  .card {
    border: 1pt solid #ccc;
    box-shadow: none;
    break-inside: avoid;
    padding: 12pt;
  }
  .card-title { color: #000; font-size: 12pt; }
  .conv-pct { color: #000; }
  .conv-bar-bg { border: 1pt solid #ccc; }
  .conv-bar-fill { background: #555 !important; }

  /* Tabelas */
  .admin-table { font-size: 10pt; }
  .admin-table th { background: #eee !important; color: #000 !important; }
  .status-badge { border: 1pt solid #aaa; background: #f5f5f5 !important; color: #000 !important; }

  /* Quebras de página */
  .kpi-bottom-grid { page-break-before: auto; }
  section { page-break-inside: avoid; }

  /* Tabelas — caber na largura da página */
  [style*="overflow-x:auto"],
  [style*="overflow-x: auto"] { overflow: visible !important; }
  .card { overflow: visible !important; }
  .admin-table {
    width: 100% !important;
    table-layout: fixed !important;
    font-size: 8pt !important;
  }
  .admin-table th,
  .admin-table td {
    padding: 4pt 5pt !important;
    word-break: break-word !important;
    white-space: normal !important;
    overflow-wrap: break-word !important;
  }
  /* Larguras proporcionais para o relatório de pedidos fechados */
  #tbl-fechados th:nth-child(1), #tbl-fechados td:nth-child(1) { width: 11%; }  /* Nº Pedido */
  #tbl-fechados th:nth-child(2), #tbl-fechados td:nth-child(2) { width: 7%;  }  /* Data */
  #tbl-fechados th:nth-child(3), #tbl-fechados td:nth-child(3) { width: 13%; }  /* Cliente */
  #tbl-fechados th:nth-child(4), #tbl-fechados td:nth-child(4) { width: 9%;  }  /* CNPJ */
  #tbl-fechados th:nth-child(5), #tbl-fechados td:nth-child(5) { width: 9%;  }  /* Contato */
  #tbl-fechados th:nth-child(6), #tbl-fechados td:nth-child(6) { width: 12%; }  /* E-mail */
  #tbl-fechados th:nth-child(7), #tbl-fechados td:nth-child(7) { width: 23%; }  /* Produtos */
  #tbl-fechados th:nth-child(8), #tbl-fechados td:nth-child(8) { width: 8%;  }  /* Pagamento */
  #tbl-fechados th:nth-child(9), #tbl-fechados td:nth-child(9) { width: 8%;  }  /* Valor */

  /* Tabela de pedidos fechados no relatório KPI */
  #tabela-pedidos-fechados { table-layout: fixed !important; }
  #tabela-pedidos-fechados th:nth-child(5),
  #tabela-pedidos-fechados td:nth-child(5) { width: 25%; }  /* Produtos */
}

/* ============================================================
   RESPONSIVE — TABLET
   ============================================================ */
@media (max-width: 900px) {
  .cart-layout { grid-template-columns: 1fr; }
  .admin-edit-layout { grid-template-columns: 1fr; }
}

/* ============================================================
   RESPONSIVE — MOBILE (≤ 640px)
   ============================================================ */
@media (max-width: 640px) {

  /* ── Navegação: hambúrguer ─────────────────────────────── */
  .nav-toggle { display: flex; }

  .header-nav {
    display: none;
    position: absolute; top: 64px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--navy);
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
    z-index: 99; padding: 8px 0;
  }
  .header-nav.open { display: flex; }
  .header-nav .nav-link {
    padding: 14px 24px; border-radius: 0;
    font-size: 15px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
  }
  .nav-user-menu { padding: 8px 16px; }
  .nav-user-name { display: none; }
  .nav-user-dropdown {
    position: static; display: flex; flex-direction: column;
    opacity: 1; visibility: visible; transform: none;
    box-shadow: none; background: transparent;
    padding: 0; min-width: 0;
  }
  .nav-user-dropdown a {
    color: rgba(255,255,255,0.75); padding: 10px 8px;
    font-size: 14px; border-radius: var(--radius-sm);
  }
  .header-inner { position: relative; }

  /* ── Layout geral ──────────────────────────────────────── */
  .main-content { padding: 20px 16px; }
  .form-row.two-col { grid-template-columns: 1fr; }
  .register-hero { padding: 32px 24px; }
  .hero-text h1 { font-size: 24px; }
  .confirmation-card { padding: 32px 20px; }
  .cart-header { flex-direction: column; align-items: flex-start; }
  .add-product-row { flex-direction: column; }
  .add-product-row .form-input, .add-product-row .btn { width: 100%; }

  /* ── Inputs: 16px previne zoom no iOS ─────────────────── */
  input, select, textarea { font-size: 16px; }

  /* ── Catálogo ──────────────────────────────────────────── */
  .product-grid { grid-template-columns: 1fr; }
  .catalog-header-inner { flex-direction: column; align-items: flex-start; }
  .product-actions { flex-wrap: wrap; }
  .add-to-cart-btn { flex: 1 1 100%; }

  /* Touch targets maiores ──────────────────────────────── */
  .qty-btn { width: 44px; height: 44px; }
  .qty-btn-sm { width: 40px; height: 40px; }
  .remove-btn { width: 44px; height: 44px; }

  /* ── Carrinho: tabela → cards ──────────────────────────── */
  .cart-table thead { display: none; }
  .cart-table,
  .cart-table tbody { display: block; }
  .cart-table tr {
    display: block;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 14px;
    margin-bottom: 12px;
    position: relative;
  }
  .cart-table td {
    display: flex; align-items: center; justify-content: space-between;
    padding: 6px 0; border: none; font-size: 14px;
  }
  .cart-table td::before {
    content: attr(data-label);
    font-size: 11px; font-weight: 700;
    color: var(--text-muted); text-transform: uppercase;
    letter-spacing: .4px; flex-shrink: 0; margin-right: 8px;
  }
  /* Produto ocupa linha inteira */
  .cart-table td[data-label="Produto"] {
    flex-direction: column; align-items: flex-start;
    padding-bottom: 10px; margin-bottom: 6px;
    border-bottom: 1px solid var(--gray-100);
  }
  .cart-table td[data-label="Produto"]::before { display: none; }
  /* Oculta colunas irrelevantes no mobile */
  .col-funcao, .col-btus { display: none !important; }
  /* Botão remover: canto superior direito */
  .col-remove {
    position: absolute; top: 10px; right: 10px;
    padding: 0; justify-content: flex-end;
  }
  .col-remove::before { display: none; }

  /* Toast full-width ─────────────────────────────────────── */
  .toast { left: 16px; right: 16px; bottom: 16px; text-align: center; }

  /* Seletor de período (admin) ───────────────────────────── */
  .period-tabs { flex-wrap: wrap; width: 100%; }
  .period-tab { flex: 1 1 auto; text-align: center; }

  /* Cards de categoria (admin) ──────────────────────────── */
  .cat-grid { grid-template-columns: 1fr; }
}
