:root {
  --bg: #0a0a0a;
  --bg-2: #111111;
  --panel: rgba(18, 18, 18, 0.92);
  --panel-border: rgba(255, 255, 255, 0.08);
  --panel-strong: rgba(24, 24, 24, 0.98);
  --red: #dc2626;
  --red-dark: #991b1b;
  --red-soft: rgba(220, 38, 38, 0.16);
  --red-glow: rgba(220, 38, 38, 0.32);
  --red-dim: #7f1d1d;
  --gray: #2a2a2a;
  --gray-light: #404040;
  --gray-border: rgba(255, 255, 255, 0.1);
  --online: #ef4444;
  --online-soft: rgba(239, 68, 68, 0.18);
  --offline: #525252;
  --offline-soft: rgba(82, 82, 82, 0.28);
  --text: #e5e5e5;
  --muted: #a3a3a3;
  --muted-2: #737373;
  --font: "Inter", system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.72);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}

body {
  min-height: 100dvh;
  position: relative;
}

/* --- Background --- */
.bg-layer {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.55;
  animation: float-orb 14s ease-in-out infinite;
}

.orb-a {
  width: 280px;
  height: 280px;
  top: -80px;
  left: -60px;
  background: radial-gradient(circle, rgba(64, 64, 64, 0.35), transparent 70%);
}

.orb-b {
  width: 220px;
  height: 220px;
  top: 35%;
  right: -70px;
  background: radial-gradient(circle, rgba(220, 38, 38, 0.14), transparent 70%);
  animation-delay: -4s;
}

.orb-c {
  width: 180px;
  height: 180px;
  bottom: 8%;
  left: 20%;
  background: radial-gradient(circle, rgba(48, 48, 48, 0.28), transparent 70%);
  animation-delay: -8s;
}

.grid-glow {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: radial-gradient(circle at 50% 20%, black, transparent 75%);
}

#particles {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.35;
}

@keyframes float-orb {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(12px, -18px) scale(1.06); }
}

/* --- Screens --- */
.screen {
  display: none;
  position: relative;
  z-index: 2;
  min-height: 100dvh;
  padding:
    max(18px, env(safe-area-inset-top))
    max(16px, env(safe-area-inset-right))
    max(24px, env(safe-area-inset-bottom))
    max(16px, env(safe-area-inset-left));
  max-width: 520px;
  margin: 0 auto;
}

.screen.active {
  display: flex;
  flex-direction: column;
  animation: screen-in 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes screen-in {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

/* --- LOGIN --- */
#screen-login {
  justify-content: center;
}

.login-shell {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.brand-card {
  text-align: center;
  padding: 8px 10px 0;
}

.logo-orbit {
  width: auto;
  max-width: 260px;
  margin: 0 auto 16px;
  border-radius: 16px;
  padding: 14px 18px;
  background: linear-gradient(180deg, rgba(28, 28, 28, 0.98), rgba(14, 14, 14, 0.98));
  border: 1px solid var(--gray-border);
  box-shadow:
    0 12px 36px rgba(0, 0, 0, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 0 0 1px rgba(220, 38, 38, 0.12);
  animation: pulse-logo 3s ease-in-out infinite;
}

.logo-core {
  width: 100%;
  height: 100%;
  border-radius: 21px;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, #141414 0%, #080808 100%);
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--red);
}

.logo-img {
  width: 100%;
  max-width: 220px;
  height: auto;
  border-radius: 0;
  object-fit: contain;
  display: block;
  margin: 0 auto;
  background: transparent;
}

@keyframes pulse-logo {
  0%, 100% { transform: scale(1); box-shadow: 0 12px 36px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(220, 38, 38, 0.12); }
  50% { transform: scale(1.01); box-shadow: 0 16px 42px rgba(0, 0, 0, 0.6), 0 0 24px rgba(220, 38, 38, 0.18); }
}

.brand-kicker {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 8px;
}

.brand-title {
  font-size: clamp(1.65rem, 5vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 8px;
}

.brand-sub {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.5;
  max-width: 320px;
  margin: 0 auto;
}

.glass-panel {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.login-panel {
  padding: 20px 18px 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.panel-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 4px;
}

.panel-tabs .tab {
  flex: 1;
  text-align: center;
  padding: 10px 12px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  background: rgba(255,255,255,0.04);
  color: var(--muted);
  border: 1px solid transparent;
}

.panel-tabs .tab.active {
  background: linear-gradient(135deg, rgba(255, 26, 26, 0.28), rgba(139, 0, 0, 0.35));
  color: #fff;
  border-color: rgba(255, 26, 26, 0.25);
}

.panel-tabs .tab.ghost {
  opacity: 0.65;
}

.field-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 7px;
}

.field-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(0,0,0,0.28);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-sm);
  padding: 0 14px;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s;
}

.field-wrap:focus-within {
  border-color: rgba(255, 26, 26, 0.55);
  box-shadow: 0 0 0 3px rgba(255, 26, 26, 0.12);
  transform: translateY(-1px);
}

.field-icon {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--muted-2);
  flex-shrink: 0;
}

.field-wrap input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text);
  font-family: var(--font);
  font-size: 1rem;
  padding: 14px 0;
  outline: none;
}

.field-wrap input::placeholder {
  color: #5f5f78;
}

.btn-primary {
  position: relative;
  overflow: hidden;
  margin-top: 6px;
  border: none;
  border-radius: var(--radius-sm);
  padding: 15px 18px;
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: #fff;
  cursor: pointer;
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 52%, #7f1d1d 100%);
  box-shadow: 0 12px 32px var(--red-glow);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.btn-shine {
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,0.22) 50%, transparent 70%);
  transform: translateX(-120%);
  animation: shine 3.5s ease-in-out infinite;
}

@keyframes shine {
  0%, 70% { transform: translateX(-120%); }
  100% { transform: translateX(120%); }
}

.btn-primary:active:not(:disabled) {
  transform: scale(0.98);
}

.btn-primary:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn-download {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-top: 10px;
  padding: 13px 16px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: linear-gradient(180deg, rgba(48, 48, 48, 0.85), rgba(24, 24, 24, 0.92));
  color: var(--text);
  font-weight: 600;
  font-size: 0.92rem;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.btn-download:hover {
  border-color: rgba(220, 38, 38, 0.45);
  background: linear-gradient(180deg, rgba(56, 56, 56, 0.95), rgba(28, 28, 28, 0.98));
}

.btn-download:active {
  transform: scale(0.98);
}

.btn-download.compact {
  width: auto;
  margin-top: 0;
  padding: 10px 14px;
  font-size: 0.82rem;
  white-space: nowrap;
}

.btn-download.ghost {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.12);
  color: var(--muted);
}

.download-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid var(--gray-border);
  background: rgba(255, 255, 255, 0.02);
}

.download-copy {
  flex: 1 1 180px;
}

.download-title {
  margin: 2px 0 4px;
  font-size: 1rem;
}

.download-desc {
  margin: 0;
  font-size: 0.78rem;
  color: var(--muted-2);
  line-height: 1.4;
}

.panel-download-sheet {
  max-width: 420px;
}

.panel-download-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 16px 0 8px;
}

.panel-download-btn {
  width: 100%;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid rgba(255, 26, 26, 0.35);
  background: linear-gradient(135deg, rgba(255, 26, 26, 0.18), rgba(120, 0, 0, 0.22));
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.panel-download-btn:hover:not(:disabled) {
  border-color: rgba(255, 60, 60, 0.65);
  transform: translateY(-1px);
}

.panel-download-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.panel-download-empty {
  color: #ffaaaa;
  margin-top: 8px;
}

.module-picker-panel {
  max-width: 420px;
  margin: 0 auto;
}

.module-picker-title {
  margin: 8px 0 4px;
  font-size: 1.35rem;
  text-align: center;
}

.module-picker-sub {
  text-align: center;
  margin-bottom: 12px;
}

.module-picker-back {
  width: 100%;
  margin-top: 14px;
}

.panel-module-btn.is-locked {
  opacity: 0.42;
  cursor: not-allowed;
  border-style: dashed;
}

.user-module {
  margin: 2px 0 0;
  font-size: 0.72rem;
  color: var(--accent);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

#screen-dashboard.view-precision [data-module-block='interno'] {
  display: none !important;
}

#screen-dashboard.view-interno [data-module-block='precision'] {
  display: none !important;
}

.form-error {
  color: #ff8888;
  font-size: 0.85rem;
  text-align: center;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(255, 26, 26, 0.1);
  border: 1px solid rgba(255, 26, 26, 0.28);
}

.login-foot {
  text-align: center;
  font-size: 0.78rem;
  color: var(--muted-2);
  line-height: 1.45;
  padding-top: 2px;
}

/* --- DASHBOARD HEADER --- */
.dash-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.user-block {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.user-avatar {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-weight: 800;
  color: var(--red);
  background: linear-gradient(135deg, rgba(255, 26, 26, 0.22), rgba(139, 0, 0, 0.35));
  border: 1px solid rgba(255, 26, 26, 0.25);
  flex-shrink: 0;
}

.user-kicker {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.dash-header h2 {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 220px;
}

.user-license {
  margin: 2px 0 0;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  color: var(--muted2);
}

.user-license.license-lifetime {
  color: #ff5a5a;
}

.user-license.license-expired {
  color: #888;
}

.btn-pill {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  color: var(--muted);
  border-radius: 999px;
  padding: 9px 14px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  flex-shrink: 0;
}

.btn-pill:active {
  transform: scale(0.97);
  background: rgba(255,255,255,0.07);
}

/* --- STATUS CARD --- */
.status-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 16px;
  margin-bottom: 22px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(18, 18, 18, 0.98), rgba(8, 8, 8, 0.92));
  border: 1px solid rgba(255, 26, 26, 0.1);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.status-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent, rgba(255, 26, 26, 0.06), transparent);
  pointer-events: none;
}

.status-ring {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  flex-shrink: 0;
  position: relative;
}

.status-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--muted-2);
  transition: background 0.35s, box-shadow 0.35s, transform 0.35s;
}

.status-dot.online {
  background: var(--online);
  box-shadow: 0 0 0 6px var(--online-soft), 0 0 24px rgba(255, 51, 51, 0.55);
  animation: heartbeat 1.8s ease-in-out infinite;
}

.status-dot.offline {
  background: var(--offline);
  box-shadow: 0 0 0 6px var(--offline-soft), 0 0 18px rgba(80, 80, 80, 0.35);
}

.status-card:has(.status-dot.online) {
  border-color: rgba(255, 51, 51, 0.35);
}

.status-card:has(.status-dot.online) .status-ring {
  animation: ring-spin 4s linear infinite;
  background: conic-gradient(from 0deg, rgba(255, 51, 51, 0.18), transparent, rgba(255, 26, 26, 0.35), transparent);
}

.status-card:has(.status-dot.online) .status-badge {
  opacity: 1;
  color: #ff8888;
  border-color: rgba(255, 51, 51, 0.4);
  background: rgba(255, 26, 26, 0.14);
}

@keyframes heartbeat {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.12); }
}

@keyframes ring-spin {
  to { transform: rotate(360deg); }
}

.status-label {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.status-value {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  margin: 2px 0;
}

.status-hint {
  font-size: 0.76rem;
  color: var(--muted-2);
  line-height: 1.35;
}

.status-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  font-family: var(--mono);
  font-size: 0.58rem;
  letter-spacing: 0.16em;
  padding: 5px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.08);
  color: var(--muted);
  opacity: 0.45;
}

/* --- SECTIONS --- */
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.section-kicker {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 4px;
}

.section-title {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.section-note {
  margin: -4px 0 14px;
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--muted);
}

.section-chip {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  color: var(--muted);
}

.section-chip.accent {
  color: #ff8888;
  border-color: rgba(255, 26, 26, 0.35);
  background: rgba(255, 26, 26, 0.12);
}

.section-chip.danger {
  color: #ff6b6b;
  border-color: rgba(255, 80, 80, 0.4);
  background: rgba(255, 40, 40, 0.14);
}

/* --- HEAD config (selects vinculados ao painel) --- */
.head-config-card {
  margin: 0 0 18px;
  padding: 14px 14px 12px;
  border-radius: 16px;
  background: rgba(255, 26, 26, 0.06);
  border: 1px solid rgba(255, 26, 26, 0.22);
}

.head-config-title {
  margin: 0 0 12px;
  font-size: 0.72rem;
  font-family: var(--mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #ff9a9a;
}

.head-select-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 10px;
}

.head-select-row:last-of-type {
  margin-bottom: 8px;
}

.head-select-label {
  font-size: 0.78rem;
  color: var(--muted);
}

.head-select {
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  padding: 12px 40px 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.02)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23ff6b6b' d='M1 1l5 5 5-5'/%3E%3C/svg%3E") no-repeat right 14px center;
  background-color: rgba(8, 8, 12, 0.85);
  color: var(--text);
  font-size: 0.92rem;
  font-family: inherit;
  outline: none;
}

.head-select:focus {
  border-color: rgba(255, 26, 26, 0.55);
  box-shadow: 0 0 0 2px rgba(255, 26, 26, 0.18);
}

.head-select:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.head-config-hint {
  margin: 0;
  font-size: 0.68rem;
  line-height: 1.45;
  color: var(--muted);
}

.head-config-hint code {
  font-family: var(--mono);
  font-size: 0.62rem;
  color: #ff8888;
}

/* --- Remote DLL controls (sliders, combos, cores) --- */
.remote-config-card {
  margin: 0 0 18px;
  padding: 14px 14px 12px;
  border-radius: 16px;
  background: rgba(255, 26, 26, 0.04);
  border: 1px solid rgba(255, 26, 26, 0.18);
}

.command-grid.compact {
  margin-bottom: 12px;
}

.command-grid.compact .cmd-btn {
  padding: 12px 12px;
}

.remote-action-grid {
  margin-top: 4px;
}

.remote-slider-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}

.remote-slider-row:last-child {
  margin-bottom: 0;
}

.remote-label {
  font-size: 0.78rem;
  color: var(--muted);
}

.remote-slider-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.remote-step-btn {
  flex: 0 0 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
}

.remote-step-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.remote-range {
  flex: 1 1 auto;
  min-width: 0;
  accent-color: #ff1a1a;
}

.remote-val {
  flex: 0 0 52px;
  text-align: right;
  font-family: var(--mono);
  font-size: 0.72rem;
  color: #ff9a9a;
}

.remote-color-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

@media (min-width: 520px) {
  .remote-color-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.remote-color-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
  font-size: 0.78rem;
  color: var(--muted);
}

.remote-color {
  width: 42px;
  height: 32px;
  padding: 0;
  border: none;
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
}

.remote-color:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* --- COMMAND GRID (botvendas card style) --- */
.command-grid,
.grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 22px;
}

.cmd-btn {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
  padding: 14px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255,255,255,0.08);
  background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.015));
  color: var(--text);
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.12s ease, border-color 0.15s, box-shadow 0.15s, background 0.15s;
}

.cmd-btn::after {
  content: "";
  position: absolute;
  inset: auto -30% -120% auto;
  width: 120px;
  height: 120px;
  background: radial-gradient(circle, rgba(255, 26, 26, 0.12), transparent 70%);
  pointer-events: none;
}

.cmd-btn:active:not(:disabled) {
  transform: scale(0.985);
  border-color: rgba(255, 26, 26, 0.45);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
}

.cmd-btn:disabled {
  opacity: 0.42;
  cursor: not-allowed;
  filter: grayscale(0.15);
}

.cmd-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  background: rgba(255, 26, 26, 0.12);
  border: 1px solid rgba(255, 26, 26, 0.28);
  color: #ffaaaa;
  flex-shrink: 0;
}

.cmd-btn.accent .cmd-icon {
  background: rgba(255, 26, 26, 0.2);
  border-color: rgba(255, 26, 26, 0.4);
  color: #ffcccc;
}

/* Funcao ligada — borda RGB leve (sem blur / sem animar o card inteiro) */
.cmd-btn.feature-active:not(.feature-applying) {
  border-color: transparent;
}

.cmd-btn.feature-active:not(.feature-applying)::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 2px;
  background: linear-gradient(
    90deg,
    #ff004c,
    #ff8a00,
    #00f5a0,
    #00c8ff,
    #7b5cff,
    #ff004c
  );
  background-size: 320% 100%;
  animation: feature-rgb-border 5s linear infinite;
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  mask-composite: exclude;
  pointer-events: none;
  z-index: 1;
}

.cmd-btn.feature-active:not(.feature-applying) .cmd-icon,
.cmd-btn.feature-active:not(.feature-applying) .cmd-body,
.cmd-btn.feature-active:not(.feature-applying) .cmd-go {
  position: relative;
  z-index: 2;
}

@keyframes feature-rgb-border {
  to { background-position: 320% 0; }
}

.head-config-card.feature-active {
  border-color: rgba(255, 26, 26, 0.45);
  background: rgba(255, 26, 26, 0.08);
  box-shadow: 0 0 20px rgba(255, 26, 26, 0.12);
}

.head-config-card.feature-active .head-config-title {
  color: #ffb3b3;
}

/* Aplicando no PC (cinza + vermelho — aguardando resposta do painel) */
.cmd-btn.feature-applying,
.cmd-btn.accent.feature-applying,
.cmd-btn.danger.feature-applying,
.head-config-card.feature-applying {
  border-color: rgba(220, 38, 38, 0.55) !important;
  background: linear-gradient(180deg, rgba(64, 64, 64, 0.55), rgba(28, 28, 28, 0.45)) !important;
  box-shadow:
    0 0 20px rgba(220, 38, 38, 0.22),
    0 0 40px rgba(0, 0, 0, 0.35) !important;
  animation: feature-pulse 0.9s ease-in-out infinite alternate;
}

@keyframes feature-pulse {
  from { filter: brightness(1); }
  to { filter: brightness(1.12); }
}

.cmd-btn.feature-applying .cmd-icon,
.cmd-btn.accent.feature-applying .cmd-icon,
.cmd-btn.danger.feature-applying .cmd-icon {
  background: rgba(220, 38, 38, 0.28) !important;
  border-color: rgba(220, 38, 38, 0.55) !important;
  color: #fecaca !important;
}

.cmd-btn.feature-applying .cmd-title,
.cmd-btn.feature-applying .cmd-desc,
.head-config-card.feature-applying .head-config-title {
  color: #fca5a5 !important;
}

.head-config-card.feature-applying .head-select {
  border-color: rgba(220, 38, 38, 0.45);
  box-shadow: 0 0 12px rgba(220, 38, 38, 0.18);
}

.cmd-icon.warn {
  background: rgba(255, 26, 26, 0.25);
  border-color: rgba(255, 26, 26, 0.5);
  color: #fff;
  font-size: 1rem;
}

.cmd-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.cmd-title {
  font-size: 0.98rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.cmd-desc {
  font-size: 0.76rem;
  color: var(--muted);
  line-height: 1.35;
}

.cmd-go {
  font-size: 1.35rem;
  line-height: 1;
  color: var(--muted-2);
  flex-shrink: 0;
  transition: transform 0.15s, color 0.15s;
}

.cmd-btn:active:not(:disabled) .cmd-go {
  transform: translateX(3px);
  color: #fff;
}

.cmd-btn.danger {
  border-color: rgba(255, 26, 26, 0.35);
  background: linear-gradient(180deg, rgba(255, 26, 26, 0.14), rgba(255, 26, 26, 0.04));
}

.cmd-btn.danger .cmd-title {
  color: #ffaaaa;
}

.cmd-btn.wide {
  grid-column: 1 / -1;
}

.cmd-btn.rgb-stealth {
  overflow: visible;
  isolation: isolate;
  margin: 8px 0;
  border-color: rgba(255, 255, 255, 0.14);
  background: linear-gradient(180deg, rgba(22, 18, 32, 0.96), rgba(10, 10, 16, 0.94));
  animation: rgb-stealth-shadow 2.8s linear infinite;
}

/* Halo RGB em volta do card (blur, nao so borda) */
.cmd-btn.rgb-stealth::before {
  content: "";
  position: absolute;
  inset: -10px;
  border-radius: calc(var(--radius-sm) + 10px);
  background: linear-gradient(
    90deg,
    #ff004c,
    #ff8a00,
    #ffe600,
    #00f5a0,
    #00c8ff,
    #7b5cff,
    #ff004c
  );
  background-size: 300% 100%;
  animation: rgb-stealth-border 2.8s linear infinite;
  filter: blur(16px);
  opacity: 0.82;
  pointer-events: none;
  z-index: -1;
}

/* Brilho interno suave */
.cmd-btn.rgb-stealth::after {
  inset: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    125deg,
    rgba(255, 0, 76, 0.14),
    rgba(0, 200, 255, 0.1),
    rgba(123, 92, 255, 0.16),
    rgba(0, 245, 160, 0.08)
  );
  background-size: 300% 300%;
  animation: rgb-stealth-inner 2.8s linear infinite;
  opacity: 1;
}

.cmd-btn.rgb-stealth .cmd-icon,
.cmd-btn.rgb-stealth .cmd-body,
.cmd-btn.rgb-stealth .cmd-go {
  position: relative;
  z-index: 1;
}

.cmd-btn.rgb-stealth .cmd-icon {
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(123, 92, 255, 0.22);
  color: #fff;
  animation: rgb-stealth-icon 2.8s linear infinite;
}

.cmd-btn.rgb-stealth .cmd-title {
  color: #fff;
  text-shadow: 0 0 12px rgba(123, 92, 255, 0.45);
}

.cmd-btn.rgb-stealth.feature-applying::before,
.cmd-btn.rgb-stealth.feature-applying::after {
  opacity: 0;
}

.cmd-btn.rgb-stealth:active:not(:disabled) {
  transform: scale(0.985);
  filter: brightness(1.08);
}

@keyframes rgb-stealth-border {
  0% { background-position: 0% 50%; }
  100% { background-position: 300% 50%; }
}

@keyframes rgb-stealth-shadow {
  0% {
    box-shadow:
      0 0 14px rgba(255, 0, 76, 0.55),
      0 0 28px rgba(255, 138, 0, 0.35),
      0 0 42px rgba(255, 0, 76, 0.2);
  }
  25% {
    box-shadow:
      0 0 14px rgba(0, 245, 160, 0.55),
      0 0 28px rgba(0, 200, 255, 0.4),
      0 0 42px rgba(0, 245, 160, 0.22);
  }
  50% {
    box-shadow:
      0 0 16px rgba(0, 200, 255, 0.55),
      0 0 32px rgba(123, 92, 255, 0.45),
      0 0 48px rgba(0, 200, 255, 0.25);
  }
  75% {
    box-shadow:
      0 0 14px rgba(123, 92, 255, 0.55),
      0 0 28px rgba(255, 0, 76, 0.38),
      0 0 44px rgba(123, 92, 255, 0.22);
  }
  100% {
    box-shadow:
      0 0 14px rgba(255, 0, 76, 0.55),
      0 0 28px rgba(255, 138, 0, 0.35),
      0 0 42px rgba(255, 0, 76, 0.2);
  }
}

@keyframes rgb-stealth-inner {
  0% { background-position: 0% 50%; opacity: 0.75; }
  50% { background-position: 100% 50%; opacity: 1; }
  100% { background-position: 200% 50%; opacity: 0.75; }
}

@keyframes rgb-stealth-icon {
  0%, 100% {
    box-shadow: 0 0 14px rgba(255, 0, 76, 0.5), 0 0 24px rgba(255, 0, 76, 0.25);
  }
  33% {
    box-shadow: 0 0 14px rgba(0, 245, 160, 0.5), 0 0 24px rgba(0, 200, 255, 0.3);
  }
  66% {
    box-shadow: 0 0 16px rgba(123, 92, 255, 0.55), 0 0 28px rgba(123, 92, 255, 0.3);
  }
}

.grid-trio {
  margin-bottom: 10px;
}

.dash-footer {
  text-align: center;
  font-size: 0.72rem;
  color: var(--muted-2);
  padding: 8px 0 4px;
  font-family: var(--mono);
  letter-spacing: 0.06em;
}

/* --- TOAST --- */
.toast {
  position: fixed;
  left: 50%;
  bottom: max(18px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 100;
  max-width: calc(100% - 32px);
  padding: 13px 16px;
  border-radius: 14px;
  font-size: 0.82rem;
  font-weight: 600;
  text-align: center;
  color: var(--text);
  background: rgba(12, 12, 12, 0.95);
  border: 1px solid rgba(255, 26, 26, 0.15);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55);
  animation: toast-in 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.toast.ok {
  border-color: rgba(255, 51, 51, 0.45);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55), 0 0 24px rgba(255, 26, 26, 0.18);
}

.toast.fail {
  border-color: rgba(255, 26, 26, 0.55);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55), 0 0 24px rgba(255, 26, 26, 0.25);
}

@keyframes toast-in {
  from { opacity: 0; transform: translateX(-50%) translateY(14px) scale(0.96); }
  to { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
}

/* --- Responsive polish --- */
@media (min-width: 420px) {
  .command-grid,
  .grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .cmd-btn.wide,
  .grid-trio .cmd-btn.wide {
    grid-column: 1 / -1;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* --- MODAL CONFIRMACAO --- */
body.modal-open {
  overflow: hidden;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding:
    max(16px, env(safe-area-inset-top))
    max(16px, env(safe-area-inset-right))
    max(16px, env(safe-area-inset-bottom))
    max(16px, env(safe-area-inset-left));
}

.modal[hidden] {
  display: none !important;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: modal-fade-in 0.25s ease;
}

.modal-sheet {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 420px;
  padding: 24px 20px 20px;
  border-radius: 22px 22px 18px 18px;
  background: linear-gradient(180deg, rgba(20, 20, 20, 0.98), rgba(10, 10, 10, 0.98));
  border: 1px solid rgba(255, 26, 26, 0.2);
  box-shadow:
    0 -8px 40px rgba(0, 0, 0, 0.5),
    0 0 60px rgba(255, 26, 26, 0.08);
  text-align: center;
  animation: modal-slide-up 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}

.modal-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 14px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--font);
  font-size: 1.5rem;
  font-weight: 800;
  color: #fff;
  background: rgba(255, 26, 26, 0.2);
  border: 2px solid rgba(255, 26, 26, 0.45);
  box-shadow: 0 0 32px rgba(255, 26, 26, 0.25);
  animation: modal-pop 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.modal-icon.success {
  color: #fff;
  background: linear-gradient(135deg, #ff2222, #b30000);
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: 0 0 40px rgba(255, 26, 26, 0.45);
}

.modal-icon.fail {
  font-size: 1.25rem;
  background: rgba(60, 60, 60, 0.5);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: none;
}

.modal-kicker {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 6px;
}

.modal-sheet h3 {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.modal-desc {
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.5;
  margin-bottom: 12px;
}

.modal-warn {
  font-size: 0.8rem;
  color: #ff8888;
  line-height: 1.4;
  padding: 10px 12px;
  margin-bottom: 14px;
  border-radius: 10px;
  background: rgba(255, 26, 26, 0.1);
  border: 1px solid rgba(255, 26, 26, 0.25);
}

.modal-warn[hidden] {
  display: none;
}

.modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 6px;
}

.modal-actions.single {
  margin-top: 10px;
}

.modal-actions.single .btn-confirm {
  width: 100%;
}

.btn-modal {
  flex: 1;
  border: none;
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  font-family: var(--font);
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.12s ease, opacity 0.12s ease;
}

.btn-modal:active {
  transform: scale(0.97);
}

.btn-cancel {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--muted);
}

.btn-confirm {
  color: #fff;
  background: linear-gradient(135deg, #ff2222 0%, #cc0000 52%, #8b0000 100%);
  box-shadow: 0 8px 24px var(--red-glow);
}

.modal.danger .modal-icon {
  color: #fff;
  background: rgba(255, 26, 26, 0.28);
  border-color: rgba(255, 26, 26, 0.55);
  box-shadow: 0 0 32px rgba(255, 26, 26, 0.3);
}

.modal.danger .modal-sheet {
  border-color: rgba(255, 26, 26, 0.4);
}

.modal.danger .btn-confirm {
  background: linear-gradient(135deg, #ff3333 0%, #cc0000 45%, #660000 100%);
  box-shadow: 0 8px 28px rgba(255, 26, 26, 0.5);
}

.modal.fail .modal-kicker {
  color: var(--muted);
}

.modal.fail .modal-sheet {
  border-color: rgba(255, 255, 255, 0.1);
}

@keyframes modal-pop {
  0% { transform: scale(0.5); opacity: 0; }
  70% { transform: scale(1.08); }
  100% { transform: scale(1); opacity: 1; }
}

@keyframes modal-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes modal-slide-up {
  from { opacity: 0; transform: translateY(24px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (min-width: 480px) {
  .modal {
    align-items: center;
  }

  .modal-sheet {
    border-radius: var(--radius);
  }
}

/* =============================================================================
   LOJA — Catalogo, cards, checkout PIX, historico
   ============================================================================= */
.header-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
  align-items: center;
}

/* ------- BOTAO LOJA no header (proeminente) ------- */
.btn-shop-header {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: linear-gradient(135deg, #2a2a2a 0%, #171717 55%, #0f0f0f 100%);
  color: #f5f5f5;
  font-weight: 900;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45), inset 0 0 0 1px rgba(220, 38, 38, 0.15);
  overflow: hidden;
  transition: transform 0.15s, box-shadow 0.2s, border-color 0.2s;
}

.btn-shop-header::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 40%, rgba(255, 255, 255, 0.55) 50%, transparent 60%);
  transform: translateX(-110%);
  animation: shop-btn-shine 3.5s ease-in-out infinite;
  pointer-events: none;
}

@keyframes shop-btn-shine {
  0%, 70% { transform: translateX(-110%); }
  100%    { transform: translateX(110%); }
}

.btn-shop-header:active { transform: scale(0.96); }
.btn-shop-header:hover  {
  border-color: rgba(220, 38, 38, 0.45);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.55), 0 0 20px rgba(220, 38, 38, 0.12);
}

.btn-shop-header-ico {
  font-size: 1.1rem;
  line-height: 1;
  filter: drop-shadow(0 1px 0 rgba(255, 255, 255, 0.3));
}

.btn-shop-header-text {
  font-weight: 900;
  letter-spacing: 0.08em;
}

.btn-shop-header-badge {
  background: var(--red);
  color: #fff;
  font-weight: 900;
  font-size: 0.65rem;
  letter-spacing: 0;
  padding: 3px 7px;
  border-radius: 999px;
  min-width: 22px;
  text-align: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}

/* ------- BANNER LOJA (card grande no dashboard) ------- */
.shop-banner {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 18px;
  margin-bottom: 18px;
  border-radius: var(--radius);
  border: 1px solid var(--gray-border);
  background: linear-gradient(135deg, #1a1a1a 0%, #141414 35%, #101010 70%, #0a0a0a 100%);
  cursor: pointer;
  color: #fff;
  text-align: left;
  overflow: hidden;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.45), var(--shadow);
  transition: transform 0.18s, box-shadow 0.25s, border-color 0.2s;
  font-family: inherit;
}

.shop-banner::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 35%, rgba(255, 255, 255, 0.1) 50%, transparent 65%);
  transform: translateX(-110%);
  animation: shop-btn-shine 4.5s ease-in-out infinite;
  pointer-events: none;
}

.shop-banner:hover {
  transform: translateY(-2px);
  border-color: rgba(220, 38, 38, 0.35);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.55), 0 0 24px rgba(220, 38, 38, 0.08);
}

.shop-banner:active { transform: scale(0.99); }

.shop-banner-glow {
  position: absolute;
  width: 220px;
  height: 220px;
  right: -90px;
  top: -60px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(220, 38, 38, 0.18), transparent 65%);
  filter: blur(8px);
  pointer-events: none;
}

.shop-banner-content {
  flex: 1;
  min-width: 0;
  position: relative;
  z-index: 1;
}

.shop-banner-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  color: #fca5a5;
  background: rgba(220, 38, 38, 0.1);
  border: 1px solid rgba(220, 38, 38, 0.28);
  padding: 4px 9px;
  border-radius: 999px;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.shop-banner-tag-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 8px rgba(220, 38, 38, 0.65);
  animation: status-pulse 1.6s ease-in-out infinite;
}

.shop-banner-title {
  font-size: 1.08rem;
  font-weight: 900;
  letter-spacing: -0.01em;
  margin: 0 0 6px;
  color: #fff;
}

.shop-banner-desc {
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.4;
  margin-bottom: 8px;
}

.shop-banner-prices {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.7);
}

.shop-banner-price strong {
  color: #fff;
  font-weight: 800;
  margin-left: 4px;
}

.shop-banner-sep {
  color: var(--muted-2);
}

.shop-banner-cta {
  position: relative;
  z-index: 1;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background: linear-gradient(135deg, #dc2626, #991b1b);
  color: #fff;
  font-weight: 900;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  padding: 14px 18px;
  border-radius: 14px;
  box-shadow: 0 6px 18px rgba(220, 38, 38, 0.28);
}

.shop-banner-cta-arrow {
  font-size: 1.5rem;
  line-height: 0.7;
  font-weight: 800;
}

@media (max-width: 420px) {
  .shop-banner { padding: 16px 14px; gap: 10px; }
  .shop-banner-title { font-size: 1rem; }
  .shop-banner-cta { padding: 12px 14px; font-size: 0.65rem; }
}

.btn-pill.ghost {
  background: rgba(255, 255, 255, 0.02);
  border-color: rgba(255, 255, 255, 0.08);
  color: var(--muted-2);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-pill .btn-pill-ico {
  font-size: 0.85rem;
  line-height: 1;
  display: inline-block;
  transform: translateY(-1px);
}

.user-avatar.shop {
  background: linear-gradient(135deg, rgba(64, 64, 64, 0.55), rgba(28, 28, 28, 0.75));
  border-color: rgba(255, 255, 255, 0.12);
  color: #fca5a5;
}

.shop-intro {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.03), rgba(220, 38, 38, 0.04));
  border: 1px solid var(--gray-border);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin-bottom: 18px;
  box-shadow: var(--shadow);
}

.shop-intro-title {
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin: 4px 0 6px;
}

.shop-intro-text {
  font-size: 0.82rem;
  line-height: 1.5;
  color: var(--muted-2);
}

.shop-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin-bottom: 22px;
}

@media (min-width: 560px) {
  .shop-grid { grid-template-columns: 1fr 1fr; }
}

.shop-card {
  position: relative;
  background: linear-gradient(180deg, rgba(20, 20, 20, 0.96), rgba(8, 8, 8, 0.96));
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius);
  padding: 0 0 16px;
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s, transform 0.2s;
}

.shop-card:hover { border-color: rgba(255, 26, 26, 0.35); }
.shop-card.out-of-stock { opacity: 0.55; }

.shop-card-media {
  width: 100%;
  aspect-ratio: 400 / 220;
  background: #0a0d14;
  display: block;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  object-fit: cover;
}

.shop-card-body {
  padding: 14px 16px 0;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.shop-card-title {
  font-size: 1rem;
  font-weight: 800;
  margin: 0 0 4px;
  letter-spacing: -0.01em;
}

.shop-card-desc {
  font-size: 0.78rem;
  line-height: 1.45;
  color: var(--muted-2);
  margin-bottom: 12px;
  min-height: 38px;
}

.shop-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  margin-bottom: 12px;
}

.shop-card-price {
  font-family: var(--mono);
  font-size: 1.35rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
}

.shop-card-price .currency {
  font-size: 0.85rem;
  color: var(--muted);
  margin-right: 2px;
}

.shop-card-stock {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 5px 10px;
  border-radius: 999px;
}

.shop-card-stock.has-stock {
  color: #6dffb4;
  background: rgba(60, 220, 130, 0.08);
  border-color: rgba(60, 220, 130, 0.25);
}

.shop-card-stock.out {
  color: #ff6d6d;
  background: rgba(255, 60, 60, 0.08);
  border-color: rgba(255, 60, 60, 0.3);
}

.shop-card-stock-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 8px currentColor;
}

.shop-card-cta {
  margin: 0 16px;
  background: linear-gradient(135deg, #ff3333 0%, #cc0000 45%, #660000 100%);
  color: #fff;
  border: none;
  border-radius: 14px;
  font-weight: 800;
  font-size: 0.92rem;
  padding: 14px 16px;
  cursor: pointer;
  letter-spacing: -0.01em;
  box-shadow: 0 8px 22px rgba(255, 26, 26, 0.32);
  transition: transform 0.15s, box-shadow 0.2s;
}

.shop-card-cta:active { transform: scale(0.985); }
.shop-card-cta:disabled {
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
  cursor: not-allowed;
  box-shadow: none;
}

.shop-skeleton {
  grid-column: 1 / -1;
  padding: 36px 0;
  text-align: center;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
}

/* ----- modal de checkout PIX ----- */
.shop-sheet {
  max-width: 460px;
}

.modal-x {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--muted-2);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
}

.modal-x:active { transform: scale(0.92); }

.checkout-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 6px 0 18px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  font-size: 0.88rem;
}

.checkout-summary strong {
  font-family: var(--mono);
  font-size: 1.05rem;
  color: #6dffb4;
}

.checkout-qr-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 14px;
}

.checkout-qr-frame {
  position: relative;
  width: 240px;
  height: 240px;
  padding: 12px;
  background: #fff;
  border-radius: 18px;
  box-shadow:
    0 0 0 1px rgba(255, 26, 26, 0.25),
    0 12px 36px rgba(0, 0, 0, 0.5),
    0 0 24px rgba(255, 26, 26, 0.18);
}

.checkout-qr-frame img {
  width: 100%;
  height: 100%;
  display: block;
}

.checkout-qr-pulse {
  position: absolute;
  inset: -6px;
  border-radius: 22px;
  border: 1px solid rgba(255, 26, 26, 0.35);
  animation: qr-pulse 2.2s ease-out infinite;
  pointer-events: none;
}

@keyframes qr-pulse {
  0%   { opacity: 0.9; transform: scale(1); }
  100% { opacity: 0;   transform: scale(1.07); }
}

.checkout-qr-hint {
  margin-top: 10px;
  font-size: 0.75rem;
  color: var(--muted);
  font-family: var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.btn-copy-big {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 18px;
  margin-bottom: 14px;
  background: linear-gradient(135deg, #18d57a 0%, #0d8a4d 100%);
  color: #fff;
  border: none;
  border-radius: 14px;
  font-weight: 800;
  font-size: 1rem;
  letter-spacing: 0.02em;
  cursor: pointer;
  box-shadow: 0 10px 28px rgba(24, 213, 122, 0.36);
  transition: transform 0.15s, box-shadow 0.2s, background 0.3s;
  overflow: hidden;
}

.btn-copy-big::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(255, 255, 255, 0.22), transparent 70%);
  transform: translateX(-100%);
  animation: copy-shine 3.2s ease-in-out infinite;
  pointer-events: none;
}

@keyframes copy-shine {
  0%, 60% { transform: translateX(-110%); }
  100%    { transform: translateX(110%); }
}

.btn-copy-big:hover { transform: translateY(-1px); box-shadow: 0 14px 34px rgba(24, 213, 122, 0.5); }
.btn-copy-big:active { transform: scale(0.985); }

.btn-copy-big-icon {
  font-size: 1.25rem;
  line-height: 1;
  transform: translateY(-1px);
}

.btn-copy-big-check {
  font-size: 1.1rem;
  font-weight: 900;
  opacity: 0;
  width: 0;
  overflow: hidden;
  transition: opacity 0.25s, width 0.25s;
}

.btn-copy-big.copied {
  background: linear-gradient(135deg, #14b568 0%, #0a7440 100%);
  box-shadow: 0 8px 22px rgba(20, 181, 104, 0.3);
}

.btn-copy-big.copied .btn-copy-big-check {
  opacity: 1;
  width: auto;
  margin-left: 4px;
}

.btn-copy-big:disabled {
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
  cursor: not-allowed;
  box-shadow: none;
}

.checkout-copy {
  margin-bottom: 16px;
}

.checkout-copy-label {
  display: block;
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}

.checkout-copy-row {
  display: flex;
  gap: 8px;
}

.checkout-copy-row input {
  flex: 1;
  min-width: 0;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 11px 12px;
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--muted-2);
  letter-spacing: -0.01em;
}

.checkout-copy-row input:focus {
  outline: none;
  border-color: rgba(255, 26, 26, 0.4);
  background: rgba(255, 255, 255, 0.05);
}

.btn-pill.compact {
  padding: 0 14px;
  font-size: 0.74rem;
  flex-shrink: 0;
  border-color: rgba(255, 26, 26, 0.3);
  background: rgba(255, 26, 26, 0.06);
  color: #ff8a8a;
}

.btn-pill.compact.copied {
  background: rgba(60, 220, 130, 0.12);
  border-color: rgba(60, 220, 130, 0.4);
  color: #6dffb4;
}

.checkout-status {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  margin-bottom: 14px;
  font-size: 0.85rem;
}

.checkout-status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.checkout-status-dot.pending {
  background: var(--red);
  box-shadow: 0 0 10px rgba(220, 38, 38, 0.55);
  animation: status-pulse 1.4s ease-in-out infinite;
}

.checkout-status-dot.paid {
  background: #6dffb4;
  box-shadow: 0 0 10px #6dffb4;
}

.checkout-status-dot.failed {
  background: #ff6d6d;
  box-shadow: 0 0 10px #ff6d6d;
}

.checkout-status-dot.expired {
  background: #888;
}

@keyframes status-pulse {
  0%, 100% { transform: scale(1);    opacity: 1;   }
  50%      { transform: scale(1.25); opacity: 0.7; }
}

.checkout-timer {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--muted);
}

.checkout-delivered {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  padding: 14px 14px 12px;
  margin-bottom: 14px;
  background: linear-gradient(135deg, rgba(24, 213, 122, 0.12), rgba(13, 138, 77, 0.05));
  border: 1px solid rgba(24, 213, 122, 0.4);
  border-radius: 14px;
  box-shadow: 0 8px 22px rgba(24, 213, 122, 0.15);
}

.checkout-delivered-kicker {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #6dffb4;
}

#checkout-delivered-link {
  display: block;
  font-family: var(--mono);
  font-size: 0.78rem;
  color: #fff;
  background: rgba(0, 0, 0, 0.35);
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  word-break: break-all;
  text-decoration: none;
  transition: background 0.2s;
}

#checkout-delivered-link:hover {
  background: rgba(0, 0, 0, 0.55);
  border-color: rgba(24, 213, 122, 0.4);
}

#checkout-delivered-copy {
  align-self: flex-end;
}

.checkout-actions {
  display: flex;
  gap: 8px;
}

.checkout-actions .btn-modal {
  flex: 1;
  padding: 13px 14px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.88rem;
  border: none;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.checkout-actions .btn-cancel {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--muted-2);
}

.checkout-actions .btn-confirm {
  background: linear-gradient(135deg, #18d57a 0%, #0d8a4d 100%);
  color: #fff;
  box-shadow: 0 8px 22px rgba(24, 213, 122, 0.3);
}

/* ----- modal de pedidos (historico) ----- */
.shop-orders-list {
  max-height: 60vh;
  overflow-y: auto;
  margin: 10px 0 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.shop-order-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
}

.shop-order-row .order-name {
  flex: 1;
  min-width: 0;
}

.shop-order-row .order-name strong {
  display: block;
  font-size: 0.88rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.shop-order-row .order-name small {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--muted);
  letter-spacing: 0.04em;
}

.shop-order-status {
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 4px 8px;
  border-radius: 999px;
  flex-shrink: 0;
}

.shop-order-status.pending  { color: #fca5a5; background: rgba(220, 38, 38, 0.1); }
.shop-order-status.paid     { color: #6dffb4; background: rgba(60, 220, 130, 0.1); }
.shop-order-status.delivered{ color: #6dffb4; background: rgba(60, 220, 130, 0.18); }
.shop-order-status.expired  { color: #888;    background: rgba(255, 255, 255, 0.05); }
.shop-order-status.cancelled{ color: #ff6d6d; background: rgba(255, 60, 60, 0.1); }

.shop-order-actions {
  display: flex;
  gap: 6px;
}

.shop-order-actions a,
.shop-order-actions button {
  font-family: var(--mono);
  font-size: 0.7rem;
  text-decoration: none;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid rgba(255, 26, 26, 0.3);
  background: rgba(255, 26, 26, 0.06);
  color: #ff8a8a;
  cursor: pointer;
  white-space: nowrap;
}

.shop-orders-empty {
  text-align: center;
  color: var(--muted);
  padding: 24px 0;
  font-size: 0.85rem;
}
