/* =============================================================================
   EFEITTO MIDIA — app.css
   Reaproveita o sistema visual do esboço, com paleta alinhada à logo.
   ============================================================================= */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

:root {
  /* Tipografia */
  --font-display: "Bricolage Grotesque", ui-sans-serif, system-ui, sans-serif;
  --font-body:    "Manrope", ui-sans-serif, system-ui, sans-serif;
  --font-mono:    "JetBrains Mono", ui-monospace, monospace;

  /* Cores base */
  --bg:       #F5F2EC;
  --bg-elev:  #FFFFFF;
  --bg-soft:  #EFEBE3;
  --ink:      #14161B;
  --ink-2:    #3A3F4A;
  --ink-3:    #6B7280;
  --ink-4:    #9CA3AF;
  --line:     #E2DDD2;
  --line-2:   #EAE5DA;

  /* Marca Efeitto (alinhado à logo) */
  --brand:      #0F1216;   /* preto da logo */
  --brand-ink:  #050608;
  --accent:     #F18A1A;   /* laranja-âmbar da logo */
  --accent-2:   #E07710;
  --accent-soft:#FCE5C8;

  /* Status */
  --status-analise-bg: #FFF4E0; --status-analise-fg: #8A5A00;
  --status-pagto-bg:   #E0EEFF; --status-pagto-fg:   #0A4FA8;
  --status-prod-bg:    #E8E0FF; --status-prod-fg:    #4A2BA0;
  --status-ok-bg:      #DDF5E1; --status-ok-fg:      #1F6B33;
  --status-cancel-bg:  #FFE0E0; --status-cancel-fg:  #9A1B1B;
  --status-pend-bg:    #FDF1C7; --status-pend-fg:    #7A5C00;

  /* Forma */
  --r-sm: 6px; --r: 10px; --r-lg: 16px; --r-xl: 24px;
  --shadow-sm: 0 1px 2px rgba(20,22,27,.06);
  --shadow:    0 4px 14px -4px rgba(20,22,27,.10), 0 2px 4px -2px rgba(20,22,27,.05);
  --shadow-lg: 0 24px 48px -12px rgba(20,22,27,.18);
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.5;
  letter-spacing: -.005em;
  min-height: 100vh;
  background-image:
    radial-gradient(circle at 0% 0%, rgba(241,138,26,.05), transparent 40%),
    radial-gradient(circle at 100% 100%, rgba(15,18,22,.05), transparent 50%);
}

/* =============================================================================
   AUTH SHELL (login / cadastro / pendente)
   ============================================================================= */

body.auth-only { display: block; }

.auth-stage {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.auth-art {
  background: var(--brand);
  color: #fff;
  padding: 48px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}
.auth-art::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 80% 20%, rgba(241,138,26,.35), transparent 50%),
    radial-gradient(circle at 20% 80%, rgba(241,138,26,.15), transparent 40%);
}
.auth-art > * { position: relative; }
.auth-art .art-text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 48px;
  line-height: 1;
  letter-spacing: -.03em;
}
.auth-art .art-text em { font-style: italic; color: var(--accent); font-weight: 500; }
.auth-art .art-foot {
  font-size: 13px;
  color: rgba(255,255,255,.6);
  max-width: 340px;
  line-height: 1.55;
}

.auth-form-wrap {
  padding: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-elev);
}
.auth-form { width: 100%; max-width: 380px; }
.auth-form h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 30px;
  letter-spacing: -.025em;
  margin-bottom: 6px;
}
.auth-form .auth-sub { color: var(--ink-3); margin-bottom: 28px; font-size: 14px; }
.auth-form .auth-foot { margin-top: 24px; font-size: 13px; color: var(--ink-3); text-align: center; }

/* Brand mark (substitui SVG inline) */
.brand { display: flex; align-items: center; gap: 12px; margin-bottom: 28px; }
.brand-mark {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  background: var(--brand);
  border-radius: 8px;
  box-shadow: 0 0 0 3px rgba(241,138,26,.15);
}
.brand-mark img { display: block; width: 100%; height: 100%; }
.brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -.02em;
  color: #fff;
}
.brand-sub {
  font-size: 11px;
  color: rgba(255,255,255,.55);
  font-family: var(--font-mono);
  letter-spacing: .04em;
  text-transform: uppercase;
}

/* =============================================================================
   COMPONENTES
   ============================================================================= */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--r);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 13px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all .15s ease;
  text-decoration: none;
  white-space: nowrap;
}
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: var(--brand-ink); }
.btn-accent  { background: var(--accent); color: #fff; box-shadow: 0 4px 14px -4px rgba(241,138,26,.5); }
.btn-accent:hover { background: var(--accent-2); transform: translateY(-1px); }
.btn-ghost   { background: transparent; color: var(--ink-2); border-color: var(--line); }
.btn-ghost:hover { background: var(--bg-soft); border-color: var(--ink-4); }
.btn-soft    { background: var(--bg-soft); color: var(--ink-2); }
.btn-soft:hover { background: var(--line); }
.btn-danger  { background: #fff; color: #9A1B1B; border-color: #F5C2C2; }
.btn-danger:hover { background: #FFF0F0; }
.btn-link    { padding: 0; background: none; color: var(--accent); font-weight: 600; text-decoration: none; cursor: pointer; }
.btn-link:hover { text-decoration: underline; }
.btn-sm      { padding: 6px 12px; font-size: 12px; }
.btn-lg      { padding: 13px 22px; font-size: 14px; }
.btn-block   { width: 100%; }

.input, .select, .textarea {
  width: 100%;
  padding: 11px 14px;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--r);
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--ink);
  transition: all .15s ease;
}
.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(20,22,27,.08);
}
.input.is-invalid, .select.is-invalid, .textarea.is-invalid {
  border-color: #9A1B1B;
  box-shadow: 0 0 0 3px rgba(154,27,27,.08);
}
.textarea { resize: vertical; min-height: 80px; }

.label   { display: block; font-size: 12px; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; }
.field   { margin-bottom: 16px; }
.field-hint { font-size: 11px; color: var(--ink-3); margin-top: 4px; }
.field-error { font-size: 11px; color: #9A1B1B; margin-top: 4px; }
.field-row   { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }

.checkbox, .radio {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  cursor: pointer;
  padding: 8px 0;
}
.checkbox input, .radio input { width: 16px; height: 16px; accent-color: var(--accent); margin-top: 2px; }

.card {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}
.card-title { font-family: var(--font-display); font-weight: 600; font-size: 18px; letter-spacing: -.015em; }
.card-sub   { font-size: 12px; color: var(--ink-3); margin-top: 2px; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 99px;
}
.badge-dot { width: 6px; height: 6px; border-radius: 50%; display: inline-block; }
.badge-analise { background: var(--status-analise-bg); color: var(--status-analise-fg); }
.badge-analise .badge-dot { background: var(--status-analise-fg); }
.badge-pagto   { background: var(--status-pagto-bg);   color: var(--status-pagto-fg); }
.badge-pagto .badge-dot   { background: var(--status-pagto-fg); }
.badge-prod    { background: var(--status-prod-bg);    color: var(--status-prod-fg); }
.badge-prod .badge-dot    { background: var(--status-prod-fg); }
.badge-ok      { background: var(--status-ok-bg);      color: var(--status-ok-fg); }
.badge-ok .badge-dot      { background: var(--status-ok-fg); }
.badge-cancel  { background: var(--status-cancel-bg);  color: var(--status-cancel-fg); }
.badge-cancel .badge-dot  { background: var(--status-cancel-fg); }
.badge-pend    { background: var(--status-pend-bg);    color: var(--status-pend-fg); }
.badge-pend .badge-dot    { background: var(--status-pend-fg); }
.badge-soft    { background: var(--bg-soft); color: var(--ink-2); }

.alert {
  padding: 14px 18px;
  border-radius: var(--r);
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 13px;
  margin-bottom: 16px;
}
.alert-info    { background: var(--status-pagto-bg); color: var(--status-pagto-fg); }
.alert-warn    { background: #FFE0E0; color: #9A1B1B; }
.alert-success { background: var(--status-ok-bg); color: var(--status-ok-fg); }
.alert-icon    { font-weight: 700; font-size: 16px; line-height: 1; min-width: 16px; text-align: center; }

.divider { height: 1px; background: var(--line); margin: 24px 0; border: 0; }

.timeline { position: relative; padding-left: 24px; }
.timeline::before { content: ""; position: absolute; left: 7px; top: 6px; bottom: 6px; width: 2px; background: var(--line); }
.timeline-item { position: relative; padding-bottom: 18px; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before {
  content: "";
  position: absolute;
  left: -22px;
  top: 4px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--bg-elev);
  border: 2px solid var(--line);
}
.timeline-item.done::before    { background: var(--accent); border-color: var(--accent); }
.timeline-item.current::before { background: #fff; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.timeline-item .t-status { font-family: var(--font-display); font-weight: 600; font-size: 14px; }
.timeline-item .t-meta   { font-size: 12px; color: var(--ink-3); margin-top: 2px; }

.kbd {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 2px 6px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--ink-3);
}

.btn-wpp { background: #25D366; color: #fff; }
.btn-wpp:hover { background: #1FAE54; }

/* =============================================================================
   RESPONSIVO
   ============================================================================= */

@media (max-width: 900px) {
  .auth-stage { grid-template-columns: 1fr; }
  .auth-art   { padding: 32px; min-height: 200px; }
  .auth-art .art-text { font-size: 32px; }
  .auth-form-wrap { padding: 32px 24px; }
  .field-row, .field-row-3 { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .auth-art { padding: 24px; }
  .auth-form-wrap { padding: 24px 18px; }
  .auth-form h2 { font-size: 24px; }
}

/* =============================================================================
   PAINEL ADMIN
   ============================================================================= */

body.admin {
  display: block;
  background: var(--bg);
}

.admin-shell {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100vh;
}

/* --- Sidebar --- */
.admin-sidebar {
  background: var(--brand);
  color: rgba(255,255,255,.7);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}
.admin-sidebar .as-head {
  padding: 20px 18px 16px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.admin-sidebar .as-nav {
  flex: 1;
  padding: 12px 8px;
  overflow-y: auto;
}
.admin-sidebar .as-group {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: rgba(255,255,255,.35);
  padding: 14px 10px 6px;
  font-family: var(--font-mono);
}
.admin-sidebar .as-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  margin: 1px 0;
  border-radius: 8px;
  color: rgba(255,255,255,.75);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  transition: all .12s ease;
}
.admin-sidebar .as-item:hover { background: rgba(255,255,255,.06); color: #fff; }
.admin-sidebar .as-item.active {
  background: var(--accent);
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.08);
}
.admin-sidebar .as-item-ico {
  width: 18px; height: 18px;
  display: grid; place-items: center;
  font-size: 14px;
  flex-shrink: 0;
}
.admin-sidebar .as-foot {
  padding: 14px 16px;
  border-top: 1px solid rgba(255,255,255,.08);
  font-size: 12px;
}
.admin-sidebar .as-user-name { color: #fff; font-weight: 600; margin-bottom: 2px; }
.admin-sidebar .as-user-role { color: rgba(255,255,255,.5); font-size: 11px; margin-bottom: 8px; }
.admin-sidebar .as-logout {
  color: rgba(255,255,255,.7);
  font-size: 12px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.admin-sidebar .as-logout:hover { color: var(--accent); }

/* --- Main --- */
.admin-main { min-width: 0; }
.admin-topbar {
  background: var(--bg-elev);
  border-bottom: 1px solid var(--line);
  padding: 14px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  position: sticky; top: 0; z-index: 10;
}
.admin-topbar h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: -.02em;
  margin: 0;
}
.admin-topbar .topbar-sub { font-size: 12px; color: var(--ink-3); margin-top: 2px; }
.admin-topbar .topbar-actions { display: flex; gap: 10px; align-items: center; }

.admin-content { padding: 28px; max-width: 1240px; }

/* Botão hamburger (mobile) */
.admin-menu-btn { display: none; background: transparent; border: 0; cursor: pointer; padding: 6px; }
.admin-menu-btn span { display: block; width: 22px; height: 2px; background: var(--ink); margin: 4px 0; border-radius: 2px; }

/* --- Tabela de listagem --- */
.table-wrap { background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.table thead th {
  background: var(--bg-soft);
  color: var(--ink-3);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}
.table tbody td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line-2);
  vertical-align: middle;
}
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: var(--bg-soft); }
.table .t-title { font-weight: 600; color: var(--ink); }
.table .t-meta  { font-size: 11px; color: var(--ink-3); margin-top: 2px; }
.table .t-actions { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }
.table .t-actions form { display: inline; margin: 0; }
.table .t-thumb {
  width: 40px; height: 40px;
  background: var(--bg-soft);
  border-radius: 8px;
  display: grid; place-items: center;
  overflow: hidden;
}
.table .t-thumb img { width: 100%; height: 100%; object-fit: cover; }
.table .t-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--ink-3);
}

/* --- Cards de stats (dashboard) --- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}
.stat-card {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
}
.stat-card .stat-label { font-size: 11px; color: var(--ink-3); text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
.stat-card .stat-value {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -.03em;
  margin-top: 6px;
  color: var(--ink);
  line-height: 1;
}
.stat-card .stat-hint { font-size: 11px; color: var(--ink-3); margin-top: 8px; }
.stat-card.accent { border-left: 3px solid var(--accent); }
.stat-card.warn   { border-left: 3px solid #C77700; }

/* --- Formulários grandes (cards de seção) --- */
.form-section {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 24px;
  margin-bottom: 18px;
  box-shadow: var(--shadow-sm);
}
.form-section h3 {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -.015em;
  margin-bottom: 4px;
}
.form-section .form-sub { font-size: 12px; color: var(--ink-3); margin-bottom: 18px; }

/* Linhas de form auto-fit */
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

/* Painel de barra inferior fixa para salvar/cancelar */
.form-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  padding: 16px 0;
  margin-top: 8px;
  border-top: 1px solid var(--line-2);
}

/* Switch (toggle on/off) */
.switch { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch .switch-track {
  width: 36px; height: 20px;
  background: var(--line); border-radius: 99px;
  position: relative; transition: background .15s ease;
}
.switch .switch-track::after {
  content: "";
  position: absolute;
  top: 2px; left: 2px;
  width: 16px; height: 16px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 2px rgba(0,0,0,.2);
  transition: transform .15s ease;
}
.switch input:checked + .switch-track { background: var(--accent); }
.switch input:checked + .switch-track::after { transform: translateX(16px); }

/* Pills (filtros / tags) */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: var(--bg-soft);
  border-radius: 99px;
  font-size: 11px;
  color: var(--ink-2);
  font-weight: 500;
}

/* Input color */
input[type="color"].input { padding: 4px; height: 40px; cursor: pointer; }

/* Linha auxiliar (filtro topo) */
.toolbar {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
  align-items: center;
  flex-wrap: wrap;
}
.toolbar .input, .toolbar .select { width: auto; flex: 0 1 240px; }
.toolbar .spacer { flex: 1; }

/* Bloco repetidor de itens (grupos de opcionais) */
.opc-cat-block {
  border: 1px solid var(--line);
  background: var(--bg);
  border-radius: var(--r);
  padding: 14px 16px;
  margin-bottom: 12px;
}
.opc-cat-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.opc-cat-name { font-family: var(--font-display); font-size: 15px; font-weight: 700; }
.opc-cat-multi-wrap { opacity: .9; }
.opc-cat-body { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line-2); }
.opc-cat-toolbar { margin-bottom: 8px; }
.opc-item-label { align-items: center; }
.opc-item-info { display: flex; flex-direction: row; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; }
.opc-item-name { font-weight: 600; }
.opc-item-rule { font-size: 11px; font-family: var(--font-mono); color: var(--accent); }
.opc-item-desc { font-size: 11px; color: var(--ink-3); flex-basis: 100%; }

/* Opcionais dentro do produto: uma linha por opcional */
.opc-cat-body .checkbox-grid {
  display: block;
  max-height: none;
}
.opc-cat-body .checkbox-grid .checkbox {
  border-bottom: 1px solid var(--line-2);
}
.opc-cat-body .checkbox-grid .checkbox:last-child { border-bottom: none; }

.repeater-item {
  border: 1px solid var(--line);
  background: var(--bg);
  border-radius: var(--r);
  padding: 14px;
  margin-bottom: 12px;
}
.repeater-item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.repeater-item-title { font-weight: 600; font-size: 13px; }
.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 4px 14px;
  max-height: 220px;
  overflow-y: auto;
  padding: 10px;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--r);
}

/* --- Responsivo do admin --- */
@media (max-width: 900px) {
  .admin-shell { grid-template-columns: 1fr; }
  .admin-sidebar {
    position: fixed;
    top: 0; left: 0;
    width: 260px;
    height: 100vh;
    transform: translateX(-100%);
    transition: transform .2s ease;
    z-index: 50;
    box-shadow: 0 0 30px rgba(0,0,0,.3);
  }
  .admin-sidebar.open { transform: translateX(0); }
  .admin-menu-btn { display: block; }
  .admin-content { padding: 20px; }
  .admin-topbar { padding: 12px 18px; }

  /* Backdrop quando o menu está aberto */
  .admin-backdrop {
    display: none;
    position: fixed; inset: 0;
    background: rgba(15,18,22,.5);
    z-index: 40;
  }
  .admin-backdrop.show { display: block; }

  /* Tabela vira cards empilhados */
  .table thead { display: none; }
  .table, .table tbody, .table tr, .table td { display: block; width: 100%; }
  .table tr {
    border: 1px solid var(--line-2);
    border-radius: var(--r);
    margin-bottom: 10px;
    padding: 6px 0;
    background: var(--bg-elev);
  }
  .table tbody tr:hover td { background: transparent; }
  .table td { padding: 8px 14px; border: 0; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
  .table td::before {
    content: attr(data-label);
    font-size: 11px;
    color: var(--ink-3);
    text-transform: uppercase;
    letter-spacing: .04em;
    font-weight: 600;
  }
  .table td.t-cell-actions { justify-content: flex-end; }
  .table td.t-cell-actions::before { display: none; }
}
/* =============================================================================
   ÁREA DO CLIENTE — painel, catálogo, compra, carrinho e pedidos
   ============================================================================= */
body.client-page {
  background: var(--bg);
  color: var(--ink);
}

.client-app-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.client-topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  padding: 12px 28px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 22px;
}

.client-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
}

.client-brand-mark {
  display: grid;
  place-items: center;
  overflow: hidden;
  flex-shrink: 0;
}

.client-brand-mark img { max-height: 100%; width: auto; max-width: 200px; object-fit: contain; display: block; }
.client-brand strong { display: block; font-family: var(--font-display); font-size: 17px; line-height: 1; letter-spacing: -.02em; }
.client-brand small { display: block; color: var(--ink-3); font-size: 11px; margin-top: 3px; font-family: var(--font-mono); text-transform: uppercase; letter-spacing: .04em; }

.client-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.client-nav a {
  color: var(--ink-2);
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  padding: 8px 11px;
  border-radius: 999px;
}

.client-nav a:hover { background: var(--bg-soft); color: var(--ink); }
.client-cart-link { background: var(--accent-soft); color: var(--accent-2) !important; }
.client-cart-link span { font-family: var(--font-mono); }

.client-userbox {
  display: flex;
  align-items: flex-end;
  flex-direction: column;
  gap: 1px;
  font-size: 12px;
  color: var(--ink-3);
}

.client-userbox span { color: var(--ink); font-weight: 800; }
.client-userbox small { color: var(--ink-3); max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.client-userbox a { color: var(--accent); text-decoration: none; font-weight: 700; }
.client-userbox a:hover { text-decoration: underline; }

.client-main {
  width: min(1240px, calc(100% - 40px));
  margin: 0 auto;
  padding: 28px 0 34px;
  flex: 1;
}

.client-hero-card {
  background: var(--brand);
  color: #fff;
  border-radius: var(--r-xl);
  padding: 28px;
  margin-bottom: 20px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.client-hero-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 80% 20%, rgba(241,138,26,.36), transparent 45%),
    radial-gradient(circle at 10% 90%, rgba(241,138,26,.12), transparent 40%);
  pointer-events: none;
}

.client-hero-card > * { position: relative; }
.client-hero-card .btn-link { color: rgba(255,255,255,.74); display: inline-block; margin-bottom: 10px; }
.client-hero-card .eyebrow { color: var(--accent); }
.client-hero-card h1 {
  font-family: var(--font-display);
  font-size: clamp(30px, 4vw, 48px);
  line-height: .96;
  letter-spacing: -.045em;
  margin: 7px 0 10px;
  max-width: 760px;
}
.client-hero-card p { color: rgba(255,255,255,.72); max-width: 720px; }
.client-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.client-hero-card .btn-soft { background: rgba(255,255,255,.10); color: #fff; border-color: rgba(255,255,255,.10); }
.client-hero-card .btn-soft:hover { background: rgba(255,255,255,.16); }

.client-footer {
  margin-top: 36px;
  padding: 20px 0 0;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: var(--ink-3);
  font-size: 12px;
}
.client-footer strong { color: var(--ink); margin-right: 8px; }
.client-footer a { color: var(--ink-2); text-decoration: none; font-weight: 700; margin-left: 12px; }
.client-footer a:hover { color: var(--accent); }

.eyebrow { font-size: 11px; color: var(--accent); font-family: var(--font-mono); text-transform: uppercase; letter-spacing: .08em; font-weight: 800; }

.client-sales-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}
.client-sales-strip > div {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 15px 16px;
  box-shadow: var(--shadow-sm);
}
.client-sales-strip strong { display: block; font-family: var(--font-display); font-size: 15px; color: var(--ink); }
.client-sales-strip span { display: block; color: var(--ink-3); font-size: 12px; margin-top: 3px; }

.catalog-filter {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 240px auto;
  gap: 12px;
  align-items: end;
  margin-bottom: 18px;
  padding: 18px;
}
.catalog-filter .field { margin-bottom: 0; }
.catalog-filter-actions { display: flex; gap: 8px; align-items: center; }

.catalog-layout { display: grid; grid-template-columns: 250px minmax(0,1fr); gap: 20px; align-items: start; }
.catalog-products {}
.catalog-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }

.catalog-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0;
  transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease;
}
.catalog-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: rgba(241,138,26,.35); }

.catalog-card-img {
  display: block;
  height: 170px;
  background: linear-gradient(135deg, var(--bg-soft), #fff1e0);
  display: grid;
  place-items: center;
  overflow: hidden;
  text-decoration: none;
  color: var(--accent);
  font-family: var(--font-display);
  font-size: 56px;
  font-weight: 800;
}
.catalog-card-img img { width: 100%; height: 100%; object-fit: cover; }

.catalog-card-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}
.catalog-card-body h3 { font-family: var(--font-display); font-size: 16px; line-height: 1.2; letter-spacing: -.015em; margin: 0; }
.catalog-card-body h3 a { text-decoration: none; color: var(--ink); }
.catalog-card-body h3 a:hover { color: var(--accent); }
.catalog-card-body p { color: var(--ink-3); font-size: 12px; flex: 1; margin: 0; line-height: 1.4; }

.catalog-price { display: flex; align-items: baseline; gap: 6px; margin-top: auto; padding-top: 8px; border-top: 1px solid var(--line-2); }
.catalog-price span { font-size: 11px; color: var(--ink-3); text-transform: uppercase; letter-spacing: .04em; font-family: var(--font-mono); }
.catalog-price strong { font-size: 18px; font-family: var(--font-display); color: var(--ink); font-weight: 800; }

.catalog-card .btn-block { margin-top: 10px; }
.catalog-sidebar {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 8px;
  position: sticky;
  top: 82px;
  box-shadow: var(--shadow-sm);
}
.catalog-sidebar-title { font-size: 11px; font-family: var(--font-mono); color: var(--ink-3); text-transform: uppercase; letter-spacing: .08em; padding: 10px 12px 8px; }
.catalog-cat {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  text-decoration: none;
  color: var(--ink-2);
  padding: 10px 12px;
  border-radius: var(--r);
  font-size: 13px;
  font-weight: 700;
}
.catalog-cat small { color: var(--ink-4); }
.catalog-cat:hover, .catalog-cat.active { background: var(--accent); color: #fff; }
.catalog-cat:hover small, .catalog-cat.active small { color: rgba(255,255,255,.75); }

.section-title-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; margin-bottom: 14px; }
.section-title-row h2 { font-family: var(--font-display); font-size: 24px; letter-spacing: -.025em; }
.section-title-row p { color: var(--ink-3); font-size: 13px; }

.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(238px, 1fr)); gap: 16px; }
.product-card {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease;
}
.product-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: rgba(241,138,26,.35); }
.product-image {
  height: 176px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--bg-soft), #fff);
  text-decoration: none;
  color: var(--accent);
  font-family: var(--font-display);
  font-size: 54px;
  font-weight: 800;
}
.product-image img { width: 100%; height: 100%; object-fit: cover; }
.product-body { padding: 16px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.product-meta-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.product-meta-row small { color: var(--ink-3); font-family: var(--font-mono); text-transform: uppercase; font-size: 10px; }
.product-body h2 { font-family: var(--font-display); font-size: 20px; line-height: 1.1; letter-spacing: -.02em; }
.product-body p { color: var(--ink-3); font-size: 13px; flex: 1; }
.product-price { font-size: 13px; color: var(--ink-3); }
.product-price strong { color: var(--ink); font-size: 19px; font-family: var(--font-display); }

.product-detail { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 18px; align-items: start; }
.product-hero { display: grid; grid-template-columns: 180px minmax(0,1fr); gap: 18px; align-items: center; margin-bottom: 22px; }
.product-hero h2 { font-family: var(--font-display); font-size: 28px; letter-spacing: -.025em; margin: 8px 0; }
.product-hero p { color: var(--ink-3); }
.product-hero-img { height: 160px; background: var(--bg-soft); border-radius: var(--r-lg); display: grid; place-items: center; overflow: hidden; color: var(--accent); font-size: 56px; font-family: var(--font-display); font-weight: 800; }
.product-hero-img img { width: 100%; height: 100%; object-fit: cover; }
.form-section.compact { padding: 18px; margin-bottom: 0; background: var(--bg); }

.checkout-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}
.checkout-steps.mini { margin: 0 0 18px; }
.checkout-steps > div {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink-3);
}
.checkout-steps strong { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; background: var(--bg-soft); color: var(--ink-3); font-family: var(--font-mono); font-size: 12px; }
.checkout-steps span { font-weight: 700; font-size: 12px; }
.checkout-steps .active { border-color: rgba(241,138,26,.35); background: #fffaf3; color: var(--ink); }
.checkout-steps .active strong { background: var(--accent); color: #fff; }

.option-group { border-top: 1px solid var(--line-2); padding-top: 18px; margin-top: 18px; }
.option-group h3 { font-family: var(--font-display); font-size: 16px; margin-bottom: 10px; }
.option-list { display: grid; gap: 8px; }
.option-card { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: var(--r); cursor: pointer; background: var(--bg-elev); transition: border-color .14s ease, background .14s ease; }
.option-card:hover { border-color: var(--accent); background: #fffaf3; }
.option-card input { accent-color: var(--accent); }
.option-card span { flex: 1; }
.option-card small { display: block; font-size: 11px; color: var(--ink-3); margin-top: 2px; }
.option-card em { font-style: normal; font-weight: 800; font-size: 12px; color: var(--ink-2); }

.price-box { position: sticky; top: 82px; }
.price-box h3 { font-family: var(--font-display); margin-bottom: 12px; }
.buy-box { border-color: rgba(241,138,26,.28); box-shadow: var(--shadow); }
.buy-box-label { font-family: var(--font-mono); font-size: 10px; color: var(--accent); letter-spacing: .08em; text-transform: uppercase; font-weight: 800; margin-bottom: 5px; }
.price-row, .price-total { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line-2); }
.price-total { border-bottom: 0; font-size: 18px; align-items: center; }
.price-total strong { font-family: var(--font-display); font-size: 26px; }

.cart-layout, .order-layout { display: grid; grid-template-columns: minmax(0,1fr) 340px; gap: 18px; align-items: start; }
.cart-items { display: grid; gap: 14px; }
.cart-item { display: grid; grid-template-columns: minmax(0,1fr) 150px; gap: 16px; align-items: start; }
.cart-item-number { display: inline-flex; align-items: center; justify-content: center; padding: 3px 8px; border-radius: 99px; background: var(--accent-soft); color: var(--accent-2); font-size: 11px; font-weight: 800; margin-bottom: 8px; }
.cart-item h3 { font-family: var(--font-display); font-size: 20px; letter-spacing: -.02em; }
.cart-pills { display:flex; gap:6px; flex-wrap:wrap; margin-top:8px; }
.cart-note { margin-top: 10px; font-size: 12px; color: var(--ink-3); background: var(--bg-soft); border-radius: var(--r); padding: 10px; }
.cart-item-side { text-align: right; display: grid; gap: 6px; justify-items: end; }
.cart-item-side span { color: var(--ink-3); font-size: 11px; text-transform: uppercase; letter-spacing: .05em; font-weight: 800; }
.cart-item-side strong { font-family: var(--font-display); font-size: 22px; }
.item-upload-box { margin-top: 14px; padding: 14px; border: 1px dashed rgba(241,138,26,.45); background: #fffaf3; border-radius: var(--r); }
.item-upload-box .input { background: #fff; }

.order-item-card { margin-bottom: 14px; }
.order-item-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 10px; }
.order-item-head > strong { font-family: var(--font-display); font-size: 22px; white-space: nowrap; }
.item-files { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line-2); }
.item-files h4 { font-family: var(--font-display); font-size: 14px; margin-bottom: 8px; }
.client-table-card { box-shadow: var(--shadow-sm); }
.empty-state { text-align: center; padding: 42px 22px; }
.empty-state p:last-child { margin-top: 16px; }

/* Correção do grid admin desktop: backdrop não pode virar coluna do grid */
.admin-backdrop { display: none; }
.admin-sidebar { grid-column: 1; grid-row: 1; }
.admin-main { grid-column: 2; grid-row: 1; min-width: 0; width: 100%; }
.admin-content { width: 100%; }

@media (max-width: 900px) {
  .client-topbar { grid-template-columns: 1fr; padding: 14px 18px; gap: 12px; position: relative; }
  .client-brand { min-width: 0; }
  .client-nav { justify-content: flex-start; overflow-x: auto; padding-bottom: 2px; }
  .client-userbox { align-items: flex-start; }
  .client-main { width: min(100% - 28px, 1240px); padding-top: 18px; }
  .client-hero-card { display: block; padding: 22px; }
  .client-actions { justify-content: flex-start; margin-top: 16px; }
  .client-sales-strip, .catalog-filter, .catalog-layout, .product-detail, .cart-layout, .order-layout, .product-hero, .checkout-steps { grid-template-columns: 1fr; }
  .catalog-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
  .catalog-sidebar, .price-box { position: static; }
  .cart-item { grid-template-columns: 1fr; }
  .cart-item-side { text-align: left; justify-items: start; border-top: 1px solid var(--line-2); padding-top: 12px; }
  .order-item-head { display: block; }
  .client-footer { display: block; }
  .client-footer div + div { margin-top: 10px; }
  .client-footer a { margin-left: 0; margin-right: 12px; }
  .admin-main { grid-column: auto; grid-row: auto; }
  .admin-backdrop { display: none; position: fixed; inset: 0; background: rgba(15,18,22,.5); z-index: 40; }
  .admin-backdrop.show { display: block; }
}

@media (max-width: 520px) {
  .client-hero-card h1 { font-size: 30px; }
  .client-nav a { padding: 7px 9px; }
  .catalog-filter-actions { display: grid; grid-template-columns: 1fr; }
  .product-grid { grid-template-columns: 1fr; }
  .price-total strong { font-size: 22px; }
}


/* =============================================================================
   AJUSTES FINOS — compra, formulários e admin
   ============================================================================= */
.password-wrap { position: relative; }
.password-wrap .input { padding-right: 82px; }
.password-toggle {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: var(--bg-soft);
  color: var(--ink-2);
  border-radius: 7px;
  padding: 5px 9px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}
.password-toggle:hover { background: var(--line); }

.admin-backdrop { display: none; }
.admin-sidebar { grid-column: 1; grid-row: 1; }
.admin-main { grid-column: 2; grid-row: 1; min-width: 0; width: 100%; }

.form-grid.product-fields,
.form-grid.four-fields,
.product-admin-grid {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  align-items: start;
}

.table-controls {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 14px;
  align-items: center;
}
.table-controls .input,
.table-controls .select { width: auto; min-width: 220px; }
.product-matrix-row[hidden] { display: none !important; }

.option-card em small { display:block; color:var(--ink-3); font-style:normal; font-size:11px; }
.order-options-list { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line-2); }
.order-options-list h4 { font-family: var(--font-display); font-size: 14px; margin-bottom: 8px; }
.order-options-list ul { padding-left: 18px; color: var(--ink-2); }
.order-options-list li { margin: 4px 0; }
.order-option-group { margin-bottom: 10px; }
.order-option-group-title { display: inline-block; font-size: 11px; font-family: var(--font-mono); text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); margin-bottom: 2px; }
.order-option-group ul { margin: 0; padding-left: 18px; }
.order-config-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(160px,1fr)); gap:10px; margin:12px 0; }
.order-config-grid div { background:var(--bg-soft); border-radius:var(--r); padding:10px; font-size:12px; }
.order-config-grid strong { display:block; font-size:13px; color:var(--ink); margin-top:2px; }

@media (max-width: 900px) {
  .admin-main { grid-column: auto; grid-row: auto; }
  .admin-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15,18,22,.5);
    z-index: 40;
  }
  .admin-backdrop.show { display: block; }
}

/* =============================================================================
   AJUSTES v10 — opcionais obrigatórios, logo, responsividade, uploads
   ============================================================================= */

/* Logo empilhada na sidebar admin (logo acima do texto) */
.brand-stacked { display: flex; align-items: center; gap: 12px; }
.brand-logo-box { display: grid; place-items: center; }
.brand-logo-box img { max-height: 100%; width: auto; max-width: 200px; object-fit: contain; display: block; }
.admin-sidebar .brand-name { font-family: var(--font-display); font-weight: 700; font-size: 16px; line-height: 1.1; }
.admin-sidebar .brand-sub  { font-size: 11px; color: rgba(255,255,255,.55); text-transform: uppercase; letter-spacing: .06em; }
.client-brand-mark img { object-fit: contain; display: block; }

/* Configuração da logo (admin) */
.logo-config { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.logo-config-preview {
  width: 120px; height: 72px; display: grid; place-items: center;
  background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--r);
  padding: 8px; overflow: hidden;
}
.logo-config-preview img { max-width: 100%; max-height: 100%; object-fit: contain; }
.logo-config-actions { flex: 1; min-width: 200px; }

/* Catálogo: 3 colunas no desktop, "a partir de" empilhado sobre o preço */
.catalog-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.catalog-price { display: block; border-top: 1px solid var(--line-2); padding-top: 8px; margin-top: auto; }
.catalog-price span { display: block; font-size: 11px; color: var(--ink-3); text-transform: uppercase; letter-spacing: .04em; font-family: var(--font-mono); }
.catalog-price strong { display: block; font-size: 20px; font-family: var(--font-display); color: var(--ink); font-weight: 800; line-height: 1.1; margin-top: 2px; }

@media (max-width: 1100px) and (min-width: 901px) {
  .catalog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .catalog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 12px; }
}
@media (max-width: 560px) {
  .catalog-grid { grid-template-columns: 1fr !important; }
}

/* Tag de obrigatório e dicas */
.req-tag {
  display: inline-block; font-size: 10px; font-weight: 800; letter-spacing: .04em;
  text-transform: uppercase; background: var(--accent-soft); color: var(--accent-2);
  padding: 2px 8px; border-radius: 99px; margin-left: 6px; vertical-align: middle;
}
.req-hint { color: var(--accent-2); }
.option-group.group-invalid { border-top-color: var(--accent); }
.option-group.group-invalid .option-list { outline: 1px dashed rgba(241,138,26,.5); outline-offset: 6px; border-radius: var(--r); }

/* Valores recolhíveis (carrinho/pedido) */
.cart-values { margin: 10px 0; border: 0; border-radius: 0; overflow: visible; background: transparent; }
.cart-values > summary {
  cursor: pointer; list-style: none; padding: 4px 0; font-size: 12px; font-weight: 600;
  color: var(--ink-3); background: transparent; user-select: none; display: inline-block;
}
.cart-values > summary:hover { color: var(--ink-2); }
.cart-values > summary::-webkit-details-marker { display: none; }
.cart-values > summary::after { content: " ▾"; color: var(--ink-4); }
.cart-values[open] > summary::after { content: " ▴"; }
.cart-values[open] {
  background: var(--bg-soft); border: 1px solid var(--line-2);
  border-radius: var(--r); overflow: hidden; padding: 0 12px 6px;
}
.cart-values[open] > summary { padding: 10px 0 6px; }
.cart-values .price-row { padding: 7px 0; }
.cart-values .price-row:last-child { border-bottom: 0; }
.cart-values .price-row-sub { padding: 5px 0 5px 14px; border-bottom: 1px dashed var(--line-2); }
.cart-values .price-row-sub span { color: var(--ink-3); font-size: 12px; }
.cart-values .price-row-sub strong { color: var(--ink-2); font-weight: 600; font-size: 12px; }
.value-option-group { margin-top: 6px; }
.value-option-group-title {
  display: block; font-size: 10px; font-family: var(--font-mono); text-transform: uppercase;
  letter-spacing: .06em; color: var(--ink-4); margin: 6px 0 2px;
}
.price-total-hero {
  background: linear-gradient(135deg, #fffaf3, #fff); border: 1px solid rgba(241,138,26,.28);
  border-radius: var(--r); padding: 14px 16px !important; margin-top: 10px;
}
.price-total-hero span { font-weight: 700; color: var(--ink-2); }
.price-total-hero strong { color: var(--ink); }

/* Upload obrigatório em destaque + erros */
.item-upload-box.is-required { border-color: rgba(241,138,26,.55); }
.item-upload-box.upload-invalid { border-color: var(--accent); background: #fff6ec; }
.arte-error { margin-top: 6px; }

/* Bloco de opcionais por categoria no admin do produto */
.opc-cat-block { border: 1px solid var(--line-2); border-radius: var(--r); padding: 12px 14px; margin-bottom: 12px; background: var(--bg-elev); }
.opc-cat-head { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.opc-cat-head .opc-cat-name { font-weight: 700; }
.opc-cat-body { margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--line); }

/* "Meus pedidos": tabela no desktop, cards no mobile */
.orders-mobile { display: none; }
.order-card-m { display: block; text-decoration: none; color: inherit; padding: 16px; margin-bottom: 12px; }
.order-card-m-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.order-card-m-head strong { font-family: var(--font-display); font-size: 16px; }
.order-card-m-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.order-card-m-grid small { display: block; font-size: 10px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); margin-bottom: 2px; }
.order-card-m-grid span { font-size: 13px; font-weight: 600; }
.order-card-m-total { color: var(--accent-2); }
.order-card-m-cta { display: inline-block; margin-top: 12px; color: var(--accent); font-weight: 700; font-size: 13px; }

@media (max-width: 760px) {
  .orders-desktop { display: none; }
  .orders-mobile { display: block; }
}

/* Página de política de privacidade */
.legal-page { max-width: 860px; margin: 0 auto; padding: 32px 18px 64px; }
.legal-card { padding: 32px; }
.legal-card h1 { font-family: var(--font-display); font-size: 30px; letter-spacing: -.02em; margin: 12px 0 6px; }
.legal-card h2 { font-family: var(--font-display); font-size: 18px; margin: 24px 0 8px; }
.legal-card p, .legal-card li { color: var(--ink-2); font-size: 14px; line-height: 1.6; margin-bottom: 10px; }
.legal-card ul { padding-left: 20px; }
.legal-meta { color: var(--ink-3); font-size: 12px; font-family: var(--font-mono); }

/* =============================================================================
   MOBILE: evitar zoom automático em campos (iOS/Android exigem >= 16px)
   ============================================================================= */
@media (max-width: 760px) {
  .input, .select, .textarea,
  input[type="text"], input[type="email"], input[type="password"],
  input[type="search"], input[type="tel"], input[type="number"], input[type="file"] {
    font-size: 16px;
  }
  .legal-card { padding: 22px; }
  .legal-card h1 { font-size: 24px; }
}

/* =============================================================================
   Botão "Remover" no carrinho: sem outline/borda feia do navegador
   ============================================================================= */
.cart-item-side .btn-link {
  -webkit-appearance: none; appearance: none; border: 0; background: none;
  box-shadow: none; outline: none;
}
.cart-item-side .btn-link:focus { outline: none; }
.cart-item-side .btn-link:focus-visible {
  outline: 2px solid rgba(241,138,26,.5); outline-offset: 2px; border-radius: 4px;
}
button.btn-link { -webkit-appearance: none; appearance: none; border: 0; }
button.btn-link:focus { outline: none; }
button.btn-link:focus-visible { outline: 2px solid rgba(241,138,26,.5); outline-offset: 2px; border-radius: 4px; }

/* =============================================================================
   AJUSTES v10.1 — espaçamentos de botões/menus e logos por painel
   ============================================================================= */

/* Espaço entre os itens da lista de categorias (sidebar do catálogo) */
.catalog-sidebar .catalog-cat + .catalog-cat { margin-top: 4px; }
.catalog-sidebar .catalog-cat { margin-bottom: 0; }

/* Botões empilhados (largura total) ganham respiro vertical */
.btn-block + .btn-block { margin-top: 10px; }
.price-box .btn-block,
.buy-box .btn-block { margin-top: 12px; }
.price-box .btn-block + .btn-block,
.buy-box .btn-block + .btn-block { margin-top: 10px; }

/* Botão de avançar/enviar logo após o total não fica colado */
.price-total + .btn,
.price-total-hero + .btn { margin-top: 14px; }

/* Ações de filtro do catálogo com espaçamento consistente */
.catalog-filter-actions { gap: 10px; }
.catalog-filter-actions .btn { margin: 0; }

/* Grupos de ações genéricos (toolbar, form-actions) com respiro */
.toolbar { gap: 10px; }
.form-actions { gap: 12px; margin-top: 20px; }

/* Botões soltos lado a lado nunca encostam */
.btn + .btn { margin-left: 0; }
.t-actions { gap: 8px; }

/* Logo do cliente: respeita o tamanho configurado, fundo claro do menu */
.client-topbar .client-brand-mark img { max-height: 64px; }

/* Preview de logo no admin: fundo escuro (admin) e claro (cliente) */
.logo-preview-dark { background: var(--brand); }
.logo-preview-light { background: var(--bg-elev); border: 1px solid var(--line); }
.logo-config-preview img { max-width: 100%; max-height: 100%; object-fit: contain; }

/* =============================================================================
   v10.2 — toast (popup de mensagens), logo única em fundo escuro, download
   ============================================================================= */

/* Toast no topo-centro, fixo (visível em qualquer rolagem da página) */
.toast-wrap {
  position: fixed; top: 18px; left: 50%; transform: translateX(-50%);
  z-index: 9999; width: auto; max-width: min(92vw, 460px); pointer-events: none;
}
.toast {
  display: flex; align-items: flex-start; gap: 10px;
  background: #fff; border: 1px solid var(--line);
  border-left: 4px solid var(--ink-3);
  border-radius: 12px; padding: 14px 16px;
  box-shadow: 0 12px 40px rgba(0,0,0,.18);
  pointer-events: auto;
  animation: toastIn .28s cubic-bezier(.2,.8,.2,1);
  font-size: 14px; line-height: 1.4;
}
.toast-hide { animation: toastOut .35s ease forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-12px); } to { opacity: 1; transform: translateY(0); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(-12px); } }
.toast-icon {
  flex-shrink: 0; width: 22px; height: 22px; border-radius: 50%;
  display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 13px; margin-top: 1px;
}
.toast-msg { flex: 1; color: var(--ink); }
.toast-close {
  flex-shrink: 0; background: none; border: 0; cursor: pointer;
  font-size: 20px; line-height: 1; color: var(--ink-4); padding: 0 2px;
}
.toast-close:hover { color: var(--ink); }
.toast-success { border-left-color: #1f9d55; }
.toast-success .toast-icon { background: #1f9d55; }
.toast-error { border-left-color: #d64545; }
.toast-error .toast-icon { background: #d64545; }
.toast-info { border-left-color: var(--accent); }
.toast-info .toast-icon { background: var(--accent); }

/* Logo única (fundo escuro) — badge escuro no menu do cliente (topbar clara) */
.client-brand-mark-dark {
  background: var(--brand);
  border-radius: 10px;
  padding: 6px 10px;
  display: grid; place-items: center;
  box-shadow: 0 0 0 3px rgba(241,138,26,.14);
}
.client-brand-mark-dark img { max-height: 64px; width: auto; object-fit: contain; display: block; }

/* Logo no painel de login (auth-art é escuro): caixa que acomoda a logo grande */
.auth-art .brand-mark {
  width: auto; height: auto; min-width: 0;
  background: transparent; box-shadow: none; border-radius: 0;
  padding: 0;
}
.auth-art .brand-mark img { height: 64px; width: auto; object-fit: contain; display: block; }
.auth-art .brand { margin-bottom: 28px; }

/* Linha de arquivo com botão de download */
.file-row {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 8px 0; border-bottom: 1px dashed var(--line-2);
}
.file-row:last-child { border-bottom: 0; }
.file-row .file-name { word-break: break-all; }
.file-row .file-size { color: var(--ink-4); }
.file-row .file-dl { margin-left: auto; flex-shrink: 0; }
