:root {
  --bg: #0d0d0f;
  --surface: #16161a;
  --surface-2: #1f1f24;
  --border: #2a2a32;
  --text: #f4f4f5;
  --muted: #a1a1aa;
  --primary: #ff6a00;
  --primary-hover: #ff8533;
  --danger: #ef4444;
  --success: #22c55e;
  --radius: 12px;
  --shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-hover); }

.admin-shell { display: grid; grid-template-columns: 260px 1fr; min-height: 100vh; }
.sidebar {
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: 1.25rem;
}
.sidebar .brand {
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: .5rem;
}
.sidebar nav a {
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: .7rem .85rem;
  border-radius: 10px;
  color: var(--muted);
  margin-bottom: .25rem;
}
.sidebar nav a.active,
.sidebar nav a:hover {
  background: rgba(255, 106, 0, 0.12);
  color: var(--text);
}

.main {
  padding: 1.5rem 2rem;
  min-width: 0;
  width: 100%;
}
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}
.topbar h1 { margin: 0; font-size: 1.5rem; }
.topbar-sub {
  margin: 0.25rem 0 0;
  font-size: 0.9rem;
  color: var(--muted);
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  box-shadow: var(--shadow);
}
.card .label { color: var(--muted); font-size: .85rem; }
.card .value { font-size: 1.75rem; font-weight: 700; margin-top: .25rem; }

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow);
}
.panel h2 { margin: 0 0 1rem; font-size: 1.1rem; }

table { width: 100%; border-collapse: collapse; }
th, td { padding: .75rem .5rem; text-align: left; border-bottom: 1px solid var(--border); }
th { color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; }

.badge {
  display: inline-block;
  padding: .15rem .55rem;
  border-radius: 999px;
  font-size: .75rem;
  background: rgba(255, 106, 0, 0.15);
  color: var(--primary);
}
.badge.inactive { background: rgba(239, 68, 68, 0.15); color: var(--danger); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  border: none;
  border-radius: 10px;
  padding: .6rem 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: .15s ease;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn-danger { background: rgba(239,68,68,.15); color: #fecaca; }
.btn-sm { padding: .35rem .7rem; font-size: .85rem; }
.btn-block { width: 100%; }

.form-grid { display: grid; gap: 1rem; max-width: 560px; }
label { display: block; font-size: .9rem; margin-bottom: .35rem; color: var(--muted); }
input, select, textarea {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 10px;
  padding: .65rem .75rem;
}
input:focus, select:focus, textarea:focus {
  outline: 2px solid rgba(255, 106, 0, 0.35);
  border-color: var(--primary);
}

.alert {
  padding: .75rem 1rem;
  border-radius: 10px;
  margin-bottom: 1rem;
}
.alert-error { background: rgba(239,68,68,.12); color: #fecaca; }
.alert-success { background: rgba(34,197,94,.12); color: #bbf7d0; }

.auth-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1rem;
}
.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
}
.auth-card h1 { margin-top: 0; }

.home-hero {
  min-height: 100vh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 2rem;
}
.home-links { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; margin-top: 1.5rem; }

.link-box {
  font-family: monospace;
  background: var(--surface-2);
  padding: .5rem .75rem;
  border-radius: 8px;
  word-break: break-all;
}

.stars-inline { color: #fbbf24; letter-spacing: 2px; }

.badge-muted {
  background: var(--surface-2);
  color: var(--muted);
}

/* Filtro de período */
.period-filter {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.35rem;
}

.period-filter--inline {
  margin-bottom: 0;
}

.period-filter-btn {
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.period-filter-btn:hover {
  color: var(--text);
  border-color: var(--primary);
}

.period-filter-btn.is-active {
  background: rgba(255, 106, 0, 0.12);
  border-color: var(--primary);
  color: var(--primary);
}

.period-filter-label {
  margin: 0 0 1rem;
  font-size: 0.85rem;
  color: var(--muted);
}

/* Paginação */
.pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.25rem;
  padding: 1rem;
}

.pagination-btn {
  padding: 0.5rem 1rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  font-size: 0.9rem;
}

.pagination-btn:hover:not(.is-disabled) {
  border-color: var(--primary);
  color: var(--primary);
}

.pagination-btn.is-disabled {
  opacity: 0.45;
  cursor: default;
}

.pagination-info {
  font-size: 0.9rem;
  color: var(--muted);
}

/* Lojas — largura total da área principal */
.stores-page {
  width: 100%;
  max-width: none;
}

.stores-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  width: 100%;
  max-width: none;
}

/* Duas ou mais lojas: colunas lado a lado em telas largas */
.stores-list:has(.store-panel:nth-child(2)) {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 520px), 1fr));
}

.store-panel {
  width: 100%;
  max-width: none;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 1.75rem;
  box-shadow: var(--shadow);
}

.store-panel-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}

.store-panel-brand {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.store-panel-initials,
.store-panel-logo {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  flex-shrink: 0;
  overflow: hidden;
}

.store-panel-initials {
  background: rgba(255, 106, 0, 0.15);
  color: var(--primary);
  font-weight: 700;
  font-size: 1rem;
  display: grid;
  place-items: center;
}

.store-panel-logo {
  background: #fff;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
}

.store-panel-logo img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}

.store-panel-brand h2 {
  margin: 0;
  font-size: 1.25rem;
  line-height: 1.2;
}

.store-panel-brand p {
  margin: 0.2rem 0 0;
  font-size: 0.85rem;
  color: var(--muted);
}

.store-panel-badges {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.store-panel-link {
  margin-bottom: 1.25rem;
}

.store-panel-link label {
  display: block;
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 0.5rem;
}

.store-panel-link .store-link-row {
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
  align-items: stretch;
  width: 100%;
}

.store-panel-link input[type="text"] {
  flex: 1 1 280px;
  min-width: 0;
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--muted);
  padding: 0.6rem 0.85rem;
  font-size: 0.8rem;
  font-family: ui-monospace, monospace;
}

.store-panel-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.store-panel-actions form {
  margin: 0;
}

.stores-empty-icon {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

.stores-empty h2 {
  margin: 0 0 0.5rem;
  font-size: 1.15rem;
}

.stores-empty.panel {
  width: 100%;
  max-width: none;
}

@media (min-width: 768px) {
  .store-panel-top {
    align-items: center;
  }

  .store-panel-initials,
  .store-panel-logo {
    width: 64px;
    height: 64px;
  }

  .store-panel-brand h2 {
    font-size: 1.4rem;
  }

  .store-panel-actions .btn-primary {
    min-width: 200px;
  }
}

/* Personalizar loja */
.appearance-topbar {
  margin-bottom: 0.5rem;
}

.appearance-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  margin-bottom: 1.25rem;
  padding: 1.5rem 1.75rem;
}

.appearance-hero-brand {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.appearance-hero-logo,
.appearance-hero-initials {
  width: 72px;
  height: 72px;
  border-radius: 16px;
  flex-shrink: 0;
  overflow: hidden;
}

.appearance-hero-logo {
  background: #fff;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
}

.appearance-hero-logo img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.appearance-hero-initials {
  background: rgba(255, 106, 0, 0.15);
  color: var(--primary);
  font-weight: 700;
  font-size: 1.35rem;
  display: grid;
  place-items: center;
}

.appearance-hero-brand h2 {
  margin: 0;
  font-size: 1.35rem;
}

.appearance-hero-brand p {
  margin: 0.25rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.appearance-hero-select label {
  display: block;
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

.appearance-hero-select select {
  min-width: 200px;
}

.appearance-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 380px);
  gap: 1.5rem;
  align-items: start;
  width: 100%;
}

.appearance-form-panel {
  max-width: none;
}

.appearance-section--card {
  padding: 1.25rem 1.35rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.appearance-section-head {
  margin-bottom: 1rem;
}

.appearance-section-head h3 {
  margin: 0 0 0.2rem;
}

.appearance-section-head p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
}

.appearance-logo-fields {
  flex: 1;
  min-width: 200px;
}

.color-field--card {
  padding: 0.85rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.appearance-preview-head {
  margin-bottom: 1rem;
}

.appearance-preview-head h3 {
  margin: 0 0 0.2rem;
}

.eval-preview--lg {
  max-width: 100%;
}

.appearance-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.appearance-section h3 {
  margin: 0 0 1rem;
  font-size: 1rem;
  font-weight: 600;
}

.appearance-logo-block {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
  flex-wrap: wrap;
}

.logo-preview-lg {
  width: 96px;
  height: 96px;
  border-radius: 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  overflow: hidden;
  flex-shrink: 0;
}

.logo-preview-lg img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.field-hint {
  margin: 0.35rem 0 0;
  font-size: 0.8rem;
  color: var(--muted);
}

.file-label {
  display: block;
  margin-bottom: 0.35rem;
}

.appearance-colors {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.color-field label {
  display: block;
  font-size: 0.8rem;
  margin-bottom: 0.4rem;
  color: var(--muted);
}

.color-field input[type="color"] {
  width: 100%;
  height: 44px;
  padding: 4px;
  cursor: pointer;
  border-radius: 10px;
}

.appearance-form-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border);
}

.appearance-preview-panel {
  position: sticky;
  top: 1rem;
}

.appearance-qrcode-section {
  margin-top: 1.35rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}

.appearance-qrcode-head h3 {
  margin: 0 0 0.15rem;
  font-size: 0.95rem;
}

.appearance-qrcode-head .panel-desc {
  margin: 0 0 0.75rem;
  font-size: 0.82rem;
}

.appearance-qrcode-box {
  display: flex;
  justify-content: center;
  padding: 0.65rem;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
}

.appearance-qrcode-canvas {
  line-height: 0;
}

.appearance-qrcode-canvas img,
.appearance-qrcode-canvas canvas {
  display: block;
  width: 128px !important;
  height: 128px !important;
  max-width: 128px;
  max-height: 128px;
}

.appearance-qrcode-hint {
  margin: 0.6rem 0 0.75rem;
  font-size: 0.78rem;
  color: var(--muted);
  text-align: center;
  line-height: 1.35;
}

.appearance-qrcode-download {
  width: 100%;
  justify-content: center;
}

.appearance-preview-panel h3 {
  margin: 0 0 0.25rem;
}

.panel-desc {
  color: var(--muted);
  font-size: 0.9rem;
  margin: -0.5rem 0 1rem;
}

.color-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.color-row input[type="color"] {
  width: 56px;
  height: 40px;
  padding: 2px;
  cursor: pointer;
}

.logo-upload .logo-preview {
  width: 80px;
  height: 80px;
  border-radius: 10px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.logo-upload img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.logo-placeholder {
  font-size: 0.7rem;
  color: var(--muted);
  text-align: center;
  padding: 0.25rem;
}

.checkbox-inline {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--muted);
}

/* Opção tipo card (ex.: remover logo) */
.option-toggle {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-top: 1rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-2);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
  user-select: none;
}

.option-toggle:hover {
  border-color: #3f3f46;
  background: rgba(255, 255, 255, 0.03);
}

.option-toggle input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

.option-toggle-box {
  flex-shrink: 0;
  width: 1.35rem;
  height: 1.35rem;
  margin-top: 0.1rem;
  border: 2px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  display: grid;
  place-items: center;
  transition: border-color 0.15s, background 0.15s;
}

.option-toggle-box svg {
  width: 0.85rem;
  height: 0.85rem;
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 0.15s, transform 0.15s;
  color: #fff;
}

.option-toggle-text {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

.option-toggle-text strong {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
}

.option-toggle-text small {
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.35;
}

.option-toggle:has(input:checked) {
  border-color: rgba(239, 68, 68, 0.45);
  background: rgba(239, 68, 68, 0.08);
  box-shadow: 0 0 0 1px rgba(239, 68, 68, 0.12);
}

.option-toggle:has(input:checked) .option-toggle-text strong {
  color: #fca5a5;
}

.option-toggle:has(input:checked) .option-toggle-box {
  border-color: var(--danger);
  background: var(--danger);
}

.option-toggle:has(input:checked) .option-toggle-box svg {
  opacity: 1;
  transform: scale(1);
}

.option-toggle:has(input:focus-visible) {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.option-toggle--danger:hover {
  border-color: rgba(239, 68, 68, 0.35);
}

.eval-preview {
  background: #000;
  border-radius: 12px;
  padding: 1rem;
  max-width: 320px;
  margin: 0 auto;
  color: #fff;
}

.eval-preview-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  font-size: 0.8rem;
}

.eval-preview-logo,
.eval-preview-logo-ph {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  object-fit: contain;
  background: #fff;
}

.eval-preview-logo-ph {
  display: grid;
  place-items: center;
  color: #000;
  font-size: 0.55rem;
  font-weight: 700;
}

.eval-preview-header small {
  background: #fff;
  color: #000;
  padding: 0.1rem 0.35rem;
  border-radius: 999px;
  font-size: 0.55rem;
}

.eval-preview-stepper {
  display: flex;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  position: relative;
}

.eval-preview-stepper::before {
  content: "";
  position: absolute;
  left: 5%;
  right: 5%;
  top: 50%;
  height: 1px;
  background: #333;
}

.eval-preview-stepper span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid #666;
  background: #000;
  z-index: 1;
  position: relative;
}

.eval-preview-stepper span.on {
  border-color: var(--color-stepper);
  background: var(--color-stepper);
}

.eval-preview-body {
  text-align: center;
  padding: 0.5rem 0 1rem;
}

.eval-preview-circle {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--color-step);
  margin: 0 auto 0.5rem;
}

.eval-preview-stars {
  color: #fbbf24;
  letter-spacing: 2px;
  margin-top: 0.5rem;
}

.eval-preview-btn {
  width: 100%;
  border: none;
  border-radius: 10px;
  padding: 0.75rem;
  background: var(--primary);
  color: #fff;
  font-weight: 600;
}

/* Dashboard — feed de avaliações */
.dashboard-feed-header {
  margin-bottom: 1.25rem;
}

.dashboard-feed-header h2 {
  margin: 0 0 0.25rem;
}

.dashboard-empty {
  text-align: center;
  padding: 2.5rem 1rem;
  color: var(--muted);
}

.eval-feed {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.eval-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.15rem;
  transition: border-color 0.2s;
}

.eval-card:hover {
  border-color: rgba(255, 106, 0, 0.35);
}

.eval-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.eval-card-store {
  font-weight: 600;
  font-size: 1rem;
  display: block;
}

.eval-card-date {
  font-size: 0.8rem;
  color: var(--muted);
}

.eval-card-avg {
  text-align: right;
  flex-shrink: 0;
}

.eval-card-avg-value {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
  line-height: 1;
}

.eval-card-avg-stars {
  font-size: 0.75rem;
  color: #fbbf24;
  letter-spacing: 1px;
}

.eval-steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 0.65rem;
}

.eval-step-score {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.65rem 0.5rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  min-height: 88px;
}

.eval-step-score.is-empty {
  opacity: 0.55;
}

.eval-step-icon {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  color: var(--primary);
}

.eval-step-icon svg {
  width: 22px;
  height: 22px;
}

.eval-step-name {
  font-size: 0.7rem;
  color: var(--muted);
  line-height: 1.2;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.eval-step-stars {
  font-size: 0.85rem;
  color: #fbbf24;
  letter-spacing: -1px;
  line-height: 1;
}

.eval-step-stars .dim {
  color: #3f3f46;
}

.eval-step-na {
  font-size: 0.85rem;
  color: var(--muted);
}

.eval-card-comment {
  margin: 0.85rem 0 0;
  padding: 0.75rem 1rem;
  background: rgba(0, 0, 0, 0.25);
  border-left: 3px solid var(--primary);
  border-radius: 0 8px 8px 0;
  font-size: 0.9rem;
  color: var(--muted);
  font-style: italic;
}

.eval-card-footer {
  margin-top: 0.75rem;
  padding-top: 0.65rem;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
}

.hidden { display: none !important; }

/* Avaliações — listagem e detalhe */
.eval-filter-panel {
  margin-bottom: 1rem;
  padding: 1rem 1.25rem;
}

.eval-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem 2rem;
  align-items: flex-end;
}

.eval-filter-field {
  flex: 1 1 200px;
  min-width: 0;
}

.eval-filter-form label {
  display: block;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

.eval-filter-form select {
  min-width: 180px;
  width: 100%;
  max-width: 280px;
}

.eval-filter-custom-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.eval-filter-custom-row select {
  width: auto;
  min-width: 120px;
}

.eval-filter-summary {
  margin: 1rem 0 0;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border);
  font-size: 0.9rem;
  color: var(--muted);
}

.eval-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.eval-list-item {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.eval-list-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.75rem;
  margin-bottom: 0.35rem;
}
.eval-list-store {
  font-size: 1.05rem;
}
.eval-list-date {
  font-size: 0.85rem;
  color: var(--muted);
}
.eval-list-snippet {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
}
.eval-list-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.5rem;
}
.eval-list-avg {
  text-align: right;
}
.eval-list-avg-num {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--primary);
  margin-right: 0.35rem;
}
.eval-list-avg-stars {
  font-size: 0.9rem;
  color: #fbbf24;
}
.eval-list-avg-stars .dim {
  color: #3f3f46;
}
.eval-list-na {
  font-size: 0.85rem;
  color: var(--muted);
}

.eval-detail-hero {
  text-align: center;
  padding: 2rem 1.5rem;
  margin-bottom: 1.25rem;
}
.eval-detail-score-num {
  display: block;
  font-size: 3rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
}
.eval-detail-score-label {
  display: block;
  font-size: 0.9rem;
  color: var(--muted);
  margin: 0.35rem 0 0.75rem;
}
.eval-detail-score-stars {
  font-size: 1.5rem;
  color: #fbbf24;
  letter-spacing: 2px;
}
.eval-detail-score-stars .dim {
  color: #3f3f46;
}
.eval-detail-no-avg {
  margin: 0;
  color: var(--muted);
}
.eval-detail-section h2 {
  margin: 0 0 1rem;
  font-size: 1.1rem;
}
.eval-detail-grid {
  margin-top: 0;
}
.eval-detail-comment {
  margin: 0;
  padding: 1rem 1.25rem;
  background: rgba(0, 0, 0, 0.25);
  border-left: 4px solid var(--primary);
  border-radius: 0 10px 10px 0;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  font-style: normal;
}
.eval-detail-text-block {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
}
.eval-detail-text-block:last-child {
  border-bottom: none;
  padding-bottom: 0;
}
.eval-detail-text-block h3 {
  margin: 0 0 0.5rem;
  font-size: 0.95rem;
  color: var(--muted);
}
.eval-detail-text-block p {
  margin: 0;
  line-height: 1.55;
}

.eval-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.eval-card-store {
  font-size: 0.85rem;
  color: var(--muted);
}

/* Etapas — listagem e formulário */
.steps-quick-add {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}
.steps-quick-label {
  font-size: 0.9rem;
  color: var(--muted);
  margin-right: 0.25rem;
}

.steps-flow {
  max-width: 720px;
}
.step-card {
  display: grid;
  grid-template-columns: 2.5rem 3.5rem 1fr auto;
  gap: 1rem;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
}
.step-card--inactive {
  opacity: 0.65;
}
.step-card--final {
  border-color: rgba(34, 197, 94, 0.35);
}
.step-card-order {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: rgba(255, 106, 0, 0.15);
  color: var(--primary);
  font-weight: 700;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.step-card-icon {
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background: rgba(255, 106, 0, 0.12);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
}
.step-card-icon svg {
  width: 1.5rem;
  height: 1.5rem;
}
.step-card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
}
.step-card-head h3 {
  margin: 0;
  font-size: 1.05rem;
}
.step-card-question {
  margin: 0 0 0.5rem;
  font-size: 0.9rem;
  color: var(--muted);
  font-style: italic;
}
.step-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.step-card-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
}
.step-move-form {
  display: flex;
  gap: 0.15rem;
}
.steps-connector {
  width: 2px;
  height: 1.25rem;
  background: var(--border);
  margin: 0 auto 0 2.9rem;
}

.step-type-badge {
  font-size: 0.75rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-weight: 600;
}
.step-type-rating {
  background: rgba(251, 191, 36, 0.15);
  color: #fbbf24;
}
.step-type-text {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
}
.step-type-thank_you {
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
}

.step-form-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 1.5rem;
  align-items: start;
}
.step-form-panel .appearance-section {
  margin-bottom: 1.5rem;
}

.step-obrigatoria-section {
  padding: 1.15rem 1.25rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.step-obrigatoria-section .panel-desc {
  margin: 0 0 1rem;
}

.option-toggle--step {
  max-width: 100%;
  width: 100%;
}
.step-type-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}
.step-type-option {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.85rem 1rem;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.step-type-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.step-type-option strong {
  font-size: 0.95rem;
}
.step-type-option span {
  font-size: 0.8rem;
  color: var(--muted);
}
.step-type-option.is-selected {
  border-color: var(--primary);
  background: rgba(255, 106, 0, 0.08);
}
.step-type-option.is-disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.icon-picker {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
  gap: 0.5rem;
}
.icon-picker-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  padding: 0.65rem 0.4rem;
  border: 2px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  text-align: center;
  transition: border-color 0.15s, background 0.15s;
}
.icon-picker-item input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.icon-picker-item.is-selected {
  border-color: var(--primary);
  background: rgba(255, 106, 0, 0.1);
}
.icon-picker-svg {
  width: 2rem;
  height: 2rem;
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
}
.icon-picker-svg svg {
  width: 1.5rem;
  height: 1.5rem;
}
.icon-picker-label {
  font-size: 0.7rem;
  color: var(--muted);
  line-height: 1.2;
}

.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  align-items: end;
}
.step-active-field {
  padding-bottom: 0.5rem;
}

.step-preview-panel {
  position: sticky;
  top: 1.5rem;
}
.step-preview-panel h3 {
  margin: 0 0 0.25rem;
}
.step-preview-phone {
  margin-top: 1rem;
  padding: 2rem 1.25rem;
  background: var(--surface-2);
  border-radius: var(--radius);
  text-align: center;
  border: 1px solid var(--border);
}
.step-preview-icon {
  width: 4rem;
  height: 4rem;
  margin: 0 auto 1rem;
  border-radius: 50%;
  background: rgba(255, 106, 0, 0.15);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
}
.step-preview-icon svg {
  width: 2rem;
  height: 2rem;
}
.step-preview-question {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0 0 0.5rem;
}
.step-preview-title {
  margin: 0 0 1rem;
  font-size: 1.15rem;
}
.step-preview-stars {
  font-size: 1.75rem;
  color: #fbbf24;
  letter-spacing: 2px;
}
.step-preview-text {
  font-size: 0.85rem;
  color: var(--muted);
  padding: 0.75rem;
  border: 1px dashed var(--border);
  border-radius: 8px;
  margin-top: 0.5rem;
}

@media (max-width: 900px) {
  .admin-shell { grid-template-columns: 1fr; }
  .sidebar { border-right: none; border-bottom: 1px solid var(--border); }
  .appearance-layout { grid-template-columns: 1fr; }
  .appearance-preview-panel { position: static; }
  .appearance-colors { grid-template-columns: 1fr; }
  .stores-list,
  .stores-list:has(.store-panel:nth-child(2)) {
    grid-template-columns: 1fr;
  }
  .appearance-hero { flex-direction: column; align-items: flex-start; }
  .eval-steps-grid {
    grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
  }
  .topbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }
  .step-form-layout { grid-template-columns: 1fr; }
  .step-preview-panel { position: static; }
  .step-type-grid { grid-template-columns: 1fr; }
  .step-card {
    grid-template-columns: 2rem 2.75rem 1fr;
    grid-template-rows: auto auto;
  }
  .step-card-actions {
    grid-column: 1 / -1;
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--border);
  }
  .steps-connector { margin-left: 1.9rem; }
}
