:root {
  --font-display: "Outfit", "Plus Jakarta Sans", system-ui, sans-serif;
  --font-body: "Plus Jakarta Sans", system-ui, -apple-system, sans-serif;

  --bg: #f4f6fb;
  --bg-elevated: #ffffff;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --surface-hover: #f1f5f9;
  --surface-glass: rgba(255, 255, 255, 0.82);
  --border: rgba(15, 23, 42, 0.08);
  --border-strong: rgba(15, 23, 42, 0.12);
  --border-focus: #a5b4fc;
  --text: #0c1222;
  --text-secondary: #334155;
  --muted: #64748b;

  --primary: #6366f1;
  --primary-hover: #4f46e5;
  --primary-soft: rgba(99, 102, 241, 0.1);
  --primary-ring: rgba(99, 102, 241, 0.22);
  --accent: #8b5cf6;
  --accent-soft: rgba(139, 92, 246, 0.12);
  --ai-gold: #d4a853;
  --ai-gold-soft: rgba(212, 168, 83, 0.14);

  --success: #059669;
  --success-soft: #ecfdf5;
  --warning: #d97706;
  --warning-soft: #fffbeb;
  --danger: #dc2626;
  --danger-soft: #fef2f2;

  --gradient-brand: linear-gradient(135deg, #6366f1 0%, #8b5cf6 52%, #a78bfa 100%);
  --gradient-ai: linear-gradient(135deg, #6366f1 0%, #8b5cf6 45%, #d4a853 100%);
  --gradient-mesh:
    radial-gradient(ellipse 80% 50% at 10% -10%, rgba(99, 102, 241, 0.14), transparent 55%),
    radial-gradient(ellipse 60% 40% at 95% 0%, rgba(139, 92, 246, 0.1), transparent 50%),
    radial-gradient(ellipse 50% 30% at 50% 100%, rgba(212, 168, 83, 0.06), transparent 55%);

  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 22px;
  --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 8px 24px rgba(15, 23, 42, 0.08), 0 2px 6px rgba(15, 23, 42, 0.04);
  --shadow-glow: 0 0 0 1px rgba(99, 102, 241, 0.08), 0 12px 32px rgba(99, 102, 241, 0.12);
  --shadow: var(--shadow-sm);
  --sidebar-w: 272px;
  --header-h: 56px;
  --bottom-nav-h: 64px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --transition: 0.18s cubic-bezier(0.4, 0, 0.2, 1);
  font-family: var(--font-body);
  -webkit-tap-highlight-color: transparent;
}

*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  background-image: var(--gradient-mesh);
  background-attachment: fixed;
  color: var(--text);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
.hidden { display: none !important; }
.desktop-only { display: none; }

/* Icons — slot fixo + SVG sem gap de baseline */
.icon, [data-lucide] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  line-height: 0;
  vertical-align: middle;
}
.icon {
  width: 18px;
  height: 18px;
}
.icon svg, [data-lucide] svg {
  display: block;
  width: 100%;
  height: 100%;
}

/* Auth */
.auth-wrap {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  position: relative;
  overflow: hidden;
}
.auth-wrap::before {
  content: "";
  position: absolute;
  inset: -20%;
  background:
    radial-gradient(circle at 20% 30%, rgba(99, 102, 241, 0.22), transparent 42%),
    radial-gradient(circle at 80% 20%, rgba(139, 92, 246, 0.18), transparent 38%),
    radial-gradient(circle at 50% 90%, rgba(212, 168, 83, 0.12), transparent 40%);
  animation: authMesh 18s ease-in-out infinite alternate;
  pointer-events: none;
}
@keyframes authMesh {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(-2%, 2%) scale(1.04); }
}
.auth-brand { text-align: center; margin-bottom: 1.75rem; position: relative; z-index: 1; }
.auth-logo {
  display: inline-flex;
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: var(--gradient-brand);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.45rem;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-glow);
}
.auth-brand h1 {
  margin: 0.85rem 0 0;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}
.auth-brand p { margin: 0.3rem 0 0; color: var(--muted); font-size: 0.9rem; }
.auth-card {
  width: 100%;
  max-width: 400px;
  position: relative;
  z-index: 1;
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.65);
  box-shadow: var(--shadow-md);
}
.auth-tabs {
  display: flex; gap: 4px; margin-bottom: 1.25rem;
  background: var(--surface-2); padding: 4px; border-radius: var(--radius); border: 1px solid var(--border);
}
.auth-tab {
  flex: 1; border: none; background: transparent; padding: 0.55rem;
  border-radius: 8px; font-weight: 600; font-size: 0.875rem; color: var(--muted);
  cursor: pointer; font-family: inherit; transition: background var(--transition);
}
.auth-tab.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-xs); }
.form-error { color: var(--danger); font-size: 0.85rem; margin-top: 0.75rem; }
.form-hint { color: var(--muted); font-size: 0.85rem; margin-top: 0.75rem; line-height: 1.45; }

/* Shell & sidebar */
.shell { min-height: 100dvh; }
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: min(var(--sidebar-w), 88vw);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(16px);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  z-index: 50;
  transform: translateX(-105%);
  transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-md);
}
.sidebar.open { transform: translateX(0); }
.sidebar-backdrop { position: fixed; inset: 0; background: rgba(12, 18, 34, 0.45); backdrop-filter: blur(2px); z-index: 45; }
.sidebar-brand {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  padding: 1.1rem 1rem 1rem;
  border-bottom: 1px solid var(--border);
}
.store-avatar {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--gradient-brand);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.28);
}
.sidebar-brand-text { min-width: 0; }
.sidebar-brand h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sidebar-brand p { margin: 0.12rem 0 0; font-size: 0.72rem; color: var(--muted); }

.nav { flex: 1; overflow-y: auto; padding: 0.65rem 0.6rem; }
.nav-section {
  margin: 0.65rem 0.5rem 0.35rem; font-size: 0.65rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted);
}
.nav-section:first-child { margin-top: 0.15rem; }
.nav-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  padding: 0.58rem 0.7rem;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 500;
  text-align: left;
  min-height: 40px;
  font-family: inherit;
  transition: background var(--transition), color var(--transition), transform 0.12s ease;
}
.nav-btn:hover { background: var(--surface-hover); color: var(--text); transform: translateX(2px); }
.nav-btn.active {
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 600;
  box-shadow: inset 0 0 0 1px rgba(99, 102, 241, 0.12);
}
.nav-btn-featured {
  color: var(--text);
  font-weight: 600;
  position: relative;
  overflow: hidden;
}
.nav-btn-featured:not(.active) {
  background: linear-gradient(90deg, var(--primary-soft), var(--ai-gold-soft));
  box-shadow: inset 0 0 0 1px rgba(99, 102, 241, 0.1);
}
.nav-btn-featured:not(.active)::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent);
  transform: translateX(-100%);
  animation: navShine 4s ease-in-out infinite;
}
.nav-btn-more {
  margin-top: 0.35rem;
  border-top: 1px solid var(--border);
  border-radius: 0;
  padding-top: 0.75rem;
  color: var(--muted);
  font-size: 0.8125rem;
}
.nav-btn-more:hover { color: var(--text); }
.nav-btn-more.active {
  background: var(--surface-hover);
  color: var(--text);
  box-shadow: none;
}
@keyframes navShine {
  0%, 70%, 100% { transform: translateX(-100%); }
  85% { transform: translateX(100%); }
}
.nav-btn > [data-lucide],
.nav-btn > .icon {
  width: 20px;
  height: 20px;
}
.sidebar-foot .btn {
  align-items: center;
}
.sidebar-foot .btn > [data-lucide],
.sidebar-foot .btn > .icon {
  width: 18px;
  height: 18px;
}
.nav-btn [data-lucide] { color: var(--muted); transition: color var(--transition); }
.nav-btn:hover [data-lucide] { color: var(--text-secondary); }
.nav-btn.active [data-lucide] { color: var(--primary); }
.nav-btn:focus-visible { outline: none; box-shadow: inset 0 0 0 2px var(--primary-ring); }
.bottom-nav-btn:focus-visible { outline: none; box-shadow: inset 0 0 0 2px var(--primary-ring); border-radius: 8px; }
.list-card--multiline { flex-wrap: wrap; align-items: flex-start; }
.page-actions { margin-bottom: 0.75rem; }
.color-field { display: flex; gap: 0.5rem; }
.color-field .input[type="color"] { width: 3rem; padding: 0.2rem; flex-shrink: 0; }
.sidebar-foot {
  padding: 0.75rem; border-top: 1px solid var(--border);
  padding-bottom: calc(0.75rem + var(--safe-bottom));
  display: flex; flex-direction: column; gap: 0.45rem;
}

.main {
  min-height: 100dvh;
  padding-bottom: calc(var(--bottom-nav-h) + var(--safe-bottom) + 0.5rem);
}
.content { padding: 0.75rem 1rem 1rem; max-width: 1180px; margin: 0 auto; width: 100%; }
.content.assistant-fullpage {
  padding: 0;
  max-width: none;
  flex: 1 1 0;
  min-height: 0;
  height: auto;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.content.assistant-fullpage > .assistant-page {
  flex: 1 1 0;
  min-height: 0;
}

.mobile-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  min-height: calc(var(--header-h) + env(safe-area-inset-top, 0px));
  padding: env(safe-area-inset-top, 0px) 0.65rem 0;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.mobile-header-title {
  flex: 1;
  font-weight: 600;
  font-size: 0.9375rem;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: center;
  padding: 0.65rem 0;
}
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  min-height: 48px;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
}
.topbar.is-hidden { display: none !important; }
#topbar-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}
#topbar-actions .btn {
  align-items: center;
}
.page-head-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.03em;
}

.icon-btn {
  width: 40px; height: 40px; border: none; background: transparent;
  border-radius: var(--radius); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--text-secondary); text-decoration: none; flex-shrink: 0;
  transition: background var(--transition);
}
.icon-btn:hover { background: var(--surface-hover); color: var(--text); }
.icon-btn:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--primary-ring); }
.icon-btn [data-lucide] { width: 20px; height: 20px; }

.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 40;
  display: flex;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
  border-top: 1px solid var(--border);
  padding-bottom: var(--safe-bottom);
  box-shadow: 0 -8px 32px rgba(15, 23, 42, 0.06);
}
.bottom-nav-btn {
  flex: 1;
  border: none;
  background: transparent;
  padding: 0.5rem 0.2rem calc(0.35rem + env(safe-area-inset-bottom, 0px) * 0);
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 600;
  cursor: pointer;
  min-height: var(--bottom-nav-h);
  font-family: inherit;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: color var(--transition), transform 0.12s ease;
  position: relative;
}
.bottom-nav-btn > [data-lucide],
.bottom-nav-btn > .icon {
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.bottom-nav-btn.active { color: var(--primary); }
.bottom-nav-btn.active::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 28px;
  height: 3px;
  border-radius: 0 0 4px 4px;
  background: var(--gradient-brand);
}

.bottom-nav-btn [data-lucide] { width: 22px; height: 22px; opacity: 0.75; }
.bottom-nav-btn.active [data-lucide] { opacity: 1; }

.fab {
  position: fixed;
  right: 1rem;
  bottom: calc(var(--bottom-nav-h) + var(--safe-bottom) + 0.5rem);
  z-index: 35;
  border: none;
  border-radius: 999px;
  background: var(--gradient-brand);
  color: #fff;
  font-weight: 600;
  padding: 0.72rem 1.2rem;
  font-size: 0.875rem;
  cursor: pointer;
  font-family: inherit;
  box-shadow: var(--shadow-glow);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: transform 0.12s ease, box-shadow var(--transition);
}
.fab:hover { box-shadow: 0 0 0 1px rgba(99, 102, 241, 0.15), 0 16px 40px rgba(99, 102, 241, 0.22); }
.fab:active { transform: scale(0.97); }

/* Components */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.2rem 1.3rem;
  box-shadow: var(--shadow-xs);
  transition: box-shadow var(--transition), border-color var(--transition);
}
.card:hover { box-shadow: var(--shadow-sm); border-color: var(--border-strong); }
.card-head h3 {
  font-family: var(--font-display);
  letter-spacing: -0.02em;
}
.card + .card { margin-top: 0.85rem; }
.card-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 0.75rem; margin-bottom: 0.85rem;
}
.card-head h3 { margin: 0; font-size: 0.95rem; font-weight: 700; color: var(--text); }

.btn {
  border: none; border-radius: var(--radius); padding: 0.55rem 0.95rem;
  font-size: 0.875rem; font-weight: 600; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
  min-height: 40px; font-family: inherit;
  transition: background var(--transition), border-color var(--transition), box-shadow var(--transition), transform 0.1s ease;
}
.btn:active { transform: scale(0.98); }
.btn-block { width: 100%; }
.btn-primary {
  background: var(--gradient-brand);
  color: #fff;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.28);
}
.btn-primary:hover {
  filter: brightness(1.05);
  box-shadow: 0 6px 18px rgba(99, 102, 241, 0.34);
}
.btn-outline {
  background: var(--surface);
  color: var(--primary);
  border: 1px solid rgba(99, 102, 241, 0.35);
}
.btn-outline:hover { background: var(--primary-soft); }
.btn:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--primary-ring); }
.btn-primary:focus-visible { box-shadow: 0 0 0 3px var(--primary-ring), 0 4px 14px rgba(99, 102, 241, 0.28); }
.btn-ghost {
  background: var(--surface); color: var(--text-secondary);
  border: 1px solid var(--border);
}
.btn-ghost:hover { background: var(--surface-hover); color: var(--text); }
.btn-success { background: var(--success); color: #fff; }
.btn-danger { background: var(--danger-soft); color: var(--danger); border: 1px solid #fecaca; }
.btn-sm { min-height: 34px; padding: 0.35rem 0.7rem; font-size: 0.8125rem; }

.input, .select, .textarea {
  width: 100%; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); color: var(--text); padding: 0.625rem 0.8rem;
  font-size: 16px; font-family: inherit;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.input:hover, .select:hover, .textarea:hover { border-color: #cbd5e1; }
.select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.65rem center;
  padding-right: 2.25rem;
}
.input:focus, .select:focus, .textarea:focus {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-ring);
}
.label { display: block; font-size: 0.8125rem; font-weight: 600; color: var(--text-secondary); margin-bottom: 0.35rem; }
.hint { font-size: 0.78rem; color: var(--muted); margin: 0.3rem 0 0; line-height: 1.45; }
.hint-flush { margin: 0; }
.hint-tight { margin: 0.35rem 0 0; }
.hint-block { margin: 0 0 1rem; }
.hint-block-top { margin: 1rem 0 0; }
.btn-stack-spaced { margin-top: 0.5rem; }
.mono-sm { font-size: 0.75rem; font-family: ui-monospace, monospace; }
.drawer-kpis { margin: 1rem 0; }
.kpi-value--sm { font-size: 1.2rem; }
.drawer-meta { margin-top: 1rem; font-size: 0.75rem; }
.drawer-section { display: flex; align-items: center; gap: 0.35rem; }
.drawer-section [data-lucide] { width: 16px; height: 16px; color: var(--muted); }
.section-icon-head--inline { margin: 0; }
.card-head .section-icon-head { margin-bottom: 0; }
.field { margin-bottom: 1rem; }
.field-row { display: grid; grid-template-columns: 1fr; gap: 0.75rem; }

/* KPI */
.kpi-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.75rem; margin-bottom: 1.1rem; }
.kpi {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.05rem 1.1rem;
  position: relative;
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.kpi:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-strong);
}
.kpi-glow {
  position: absolute;
  top: -40px;
  right: -30px;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  opacity: 0.35;
  filter: blur(24px);
  pointer-events: none;
}
.kpi--revenue .kpi-glow { background: #34d399; }
.kpi--orders .kpi-glow { background: #fbbf24; }
.kpi--balance .kpi-glow { background: #818cf8; }
.kpi--products .kpi-glow { background: #a78bfa; }
.btn [data-lucide],
.btn > .icon {
  width: 16px;
  height: 16px;
}
.kpi-icon {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.7rem;
  background: var(--primary-soft);
  color: var(--primary);
  position: relative;
  z-index: 1;
  flex-shrink: 0;
}
.kpi-icon > [data-lucide],
.kpi-icon > .icon {
  width: 18px;
  height: 18px;
}
.quick-action-icon {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-2);
  color: var(--primary);
}
.quick-action-icon > [data-lucide],
.quick-action-icon > .icon {
  width: 18px;
  height: 18px;
}
.kpi--revenue .kpi-icon { background: var(--success-soft); color: var(--success); }
.kpi--orders .kpi-icon { background: var(--warning-soft); color: var(--warning); }
.kpi--balance .kpi-icon { background: var(--primary-soft); color: var(--primary); }
.kpi--products .kpi-icon { background: var(--accent-soft); color: var(--accent); }
.kpi-icon--green { background: var(--success-soft); color: var(--success); }
.kpi-icon--amber { background: var(--warning-soft); color: var(--warning); }
.kpi-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  font-weight: 700;
  position: relative;
  z-index: 1;
}
.kpi-value {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 700;
  margin-top: 0.12rem;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  position: relative;
  z-index: 1;
}
.kpi-sub { font-size: 0.72rem; color: var(--muted); margin-top: 0.15rem; position: relative; z-index: 1; }

/* Quick actions */
.quick-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; margin-bottom: 1.1rem; }
.quick-actions--compact { grid-template-columns: 1fr; }
@media (min-width: 600px) {
  .quick-actions--compact { grid-template-columns: 1fr 1fr; }
  .quick-actions--compact .quick-action--featured { grid-column: 1 / -1; }
}
.quick-action {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.95rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface);
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  position: relative;
  overflow: hidden;
  transition: border-color var(--transition), box-shadow var(--transition), transform 0.12s ease;
}
.quick-action:hover {
  border-color: rgba(99, 102, 241, 0.25);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}
.quick-action--featured {
  grid-column: 1 / -1;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.06) 0%, rgba(139, 92, 246, 0.05) 50%, rgba(212, 168, 83, 0.06) 100%);
  border-color: rgba(99, 102, 241, 0.2);
  align-items: center;
}
.quick-action--featured .quick-action-icon {
  background: var(--gradient-brand);
  color: #fff;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.25);
}
.quick-action-arrow {
  margin-left: auto;
  color: var(--primary);
  opacity: 0.6;
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.quick-action-arrow [data-lucide] { width: 18px; height: 18px; }
.quick-action-body { min-width: 0; }
.quick-action strong { display: block; font-size: 0.875rem; font-weight: 600; color: var(--text); margin-bottom: 0.1rem; }
.quick-action span { display: block; font-size: 0.75rem; color: var(--muted); line-height: 1.35; }

.badge {
  display: inline-flex; align-items: center; padding: 0.2rem 0.55rem; border-radius: 999px;
  font-size: 0.65rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em;
}
.badge-paid { background: var(--success-soft); color: var(--success); }
.badge-pending { background: var(--warning-soft); color: var(--warning); }
.badge-live { background: var(--primary-soft); color: var(--primary); }
.badge-draft { background: var(--surface-2); color: var(--muted); border: 1px solid var(--border); }

.list-card {
  display: flex; gap: 0.75rem; align-items: center; padding: 0.85rem;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  margin-bottom: 0.5rem; cursor: pointer;
  transition: border-color var(--transition), box-shadow var(--transition), transform 0.12s ease;
}
.list-card:hover { border-color: var(--border-strong); box-shadow: var(--shadow-xs); transform: translateX(2px); }
.list-card--static { cursor: default; }
.list-card--static:hover { border-color: var(--border); box-shadow: none; }
.list-card--clickable { cursor: pointer; }
.list-card-chevron { color: var(--muted); flex-shrink: 0; display: flex; align-items: center; }
.list-card-chevron [data-lucide] { width: 18px; height: 18px; }
.list-card img { width: 56px; height: 56px; object-fit: cover; border-radius: 8px; background: var(--surface-2); flex-shrink: 0; }
.thumb-sm { width: 40px; height: 40px; object-fit: cover; border-radius: 8px; background: var(--surface-2); flex-shrink: 0; }
.thumb-lg { width: 72px; height: 72px; border-radius: 8px; background: var(--surface-2); display: flex; align-items: center; justify-content: center; color: var(--muted); flex-shrink: 0; }
.thumb-lg [data-lucide] { width: 22px; height: 22px; }
.product-cell { display: flex; gap: 0.75rem; align-items: center; }
.list-card-body { flex: 1; min-width: 0; }
.list-card-body strong { display: block; font-size: 0.875rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-card-meta { font-size: 0.75rem; color: var(--muted); margin-top: 0.15rem; }
.list-card-side { text-align: right; flex-shrink: 0; }
.list-card-actions { display: flex; gap: 0.35rem; margin-top: 0.45rem; flex-wrap: wrap; }

/* Design editor */
.design-page { display: flex; flex-direction: column; gap: 0.85rem; }
.design-toolbar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.65rem;
  padding: 0.75rem 1rem; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-xs);
}
.design-toolbar-status { font-size: 0.8125rem; color: var(--muted); display: flex; align-items: center; gap: 0.35rem; }
.design-toolbar.is-dirty .design-toolbar-status { color: var(--warning); font-weight: 600; }
.design-toolbar.is-dirty .design-toolbar-status::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--warning);
}
.toolbar-actions { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.drawer-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.drawer-head h3 { margin: 0; font-size: 1.05rem; font-weight: 700; }
.drawer-section { margin: 1rem 0 0.5rem; font-size: 0.8125rem; font-weight: 700; color: var(--text-secondary); }
.drawer-text { margin: 0; font-size: 0.875rem; line-height: 1.55; }
.order-drawer-form { margin-bottom: 0.5rem; }
.order-drawer-form .btn { margin-top: 0.75rem; }
.order-item-link { color: var(--primary); text-decoration: none; font-weight: 600; }
.order-item-link:hover { text-decoration: underline; }
.order-item-link--ali { display: inline-flex; align-items: center; gap: 0.25rem; font-size: 0.8125rem; margin-top: 0.25rem; }
.order-item-link--ali [data-lucide] { width: 14px; height: 14px; }
.detail-row--stack { align-items: flex-start; }
.order-item-actions { margin-top: 0.15rem; }
.detail-row { display: flex; justify-content: space-between; gap: 0.75rem; padding: 0.5rem 0; border-bottom: 1px solid var(--border); font-size: 0.875rem; }
.detail-row:last-child { border-bottom: none; }
.amount-pos { color: var(--success); font-weight: 600; }
.amount-neg { color: var(--danger); font-weight: 600; }
.divider { border: none; border-top: 1px solid var(--border); margin: 1rem 0; }
.card-stack { display: flex; flex-direction: column; gap: 0.75rem; }
.card-stack .card { margin-top: 0; }
.card-stack .card + .card { margin-top: 0; }
.card-narrow { max-width: 560px; }
.card-stack-item { margin-top: 0.75rem; }
#catalog-panel .card-stack-item { margin-top: 0.75rem; }
.section-icon-head { display: flex; align-items: center; gap: 0.45rem; margin: 0 0 0.85rem; font-size: 0.95rem; font-weight: 700; }
.section-icon-head [data-lucide] { width: 18px; height: 18px; color: var(--primary); }
.finance-hero-icon { width: 48px; height: 48px; border-radius: 12px; background: var(--primary-soft); color: var(--primary); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.finance-hero-icon [data-lucide] { width: 22px; height: 22px; }
.payment-mode-icon { width: 36px; height: 36px; border-radius: 10px; background: var(--surface-2); color: var(--primary); display: inline-flex; align-items: center; justify-content: center; margin-bottom: 0.35rem; }
.payment-mode-icon [data-lucide] { width: 18px; height: 18px; }
.payment-mode-icon--prod { background: var(--success-soft); color: var(--success); }
.payment-mode-icon--test { background: var(--warning-soft); color: var(--warning); }
.catalog-niche-img--empty, .catalog-product-img--empty { display: flex; align-items: center; justify-content: center; color: var(--muted); }
.catalog-niche-img--empty [data-lucide], .catalog-product-img--empty [data-lucide] { width: 22px; height: 22px; }
.table-row-clickable { cursor: pointer; }
.customize-layout { display: flex; flex-direction: column; gap: 0.85rem; }
.design-section-nav { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.design-section-btn {
  border: 1px solid var(--border); background: var(--surface); color: var(--text-secondary);
  padding: 0.45rem 0.8rem; border-radius: 999px; font-size: 0.78rem; font-weight: 600;
  cursor: pointer; font-family: inherit; transition: all var(--transition);
}
.design-section-btn:hover { border-color: #93c5fd; color: var(--primary); }
.design-section-btn.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.design-editor-panel {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 1.15rem; box-shadow: var(--shadow-xs);
}
.design-editor-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 1rem; padding-bottom: 0.75rem; border-bottom: 1px solid var(--border);
}
.design-editor-head h3 { margin: 0; font-size: 0.9375rem; font-weight: 700; }
.hero-slide-tabs { display: flex; gap: 0.4rem; margin-bottom: 1rem; background: var(--surface-2); padding: 4px; border-radius: var(--radius); border: 1px solid var(--border); }
.hero-slide-tab {
  flex: 1; border: none; background: transparent; padding: 0.5rem;
  border-radius: 7px; font-size: 0.78rem; font-weight: 600;
  cursor: pointer; font-family: inherit; color: var(--muted); transition: all var(--transition);
}
.hero-slide-tab.active { background: var(--surface); color: var(--primary); box-shadow: var(--shadow-xs); }
.preview-panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-xs); }
.preview-panel-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.55rem 0.85rem; background: var(--surface-2); border-bottom: 1px solid var(--border);
  font-size: 0.75rem; color: var(--muted); font-weight: 500;
}
.preview-frame {
  height: min(50vh, 400px);
  min-height: 220px;
  background: #fff;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.preview-frame iframe { width: 100%; min-height: 100%; height: auto; border: none; display: block; }
.logo-preview, .banner-thumb {
  width: 100%; max-width: 220px; max-height: 110px; object-fit: contain;
  border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface-2);
  margin-bottom: 0.75rem;
}
.font-preview-box { margin-top: 0.5rem; padding: 1rem; border-radius: var(--radius); border: 1px dashed var(--border); background: var(--surface-2); }

.mode-banner { padding: 0.55rem 1rem; font-size: 0.78rem; font-weight: 600; text-align: center; display: flex; align-items: center; justify-content: center; gap: 0.4rem; flex-wrap: wrap; margin: 0; }
.mode-banner.test { background: var(--warning-soft); color: #92400e; border-bottom: 1px solid #fde68a; }
.mode-banner [data-lucide] { width: 16px; height: 16px; flex-shrink: 0; }

.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--border); }
table { width: 100%; border-collapse: collapse; font-size: 0.875rem; min-width: 520px; background: var(--surface); }
th { text-align: left; color: var(--muted); font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.04em; padding: 0.65rem 0.75rem; background: var(--surface-2); border-bottom: 1px solid var(--border); font-weight: 600; }
td { padding: 0.7rem 0.75rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
tr:last-child td { border-bottom: none; }
tbody tr:hover { background: #fafbff; }

.modal-backdrop { position: fixed; inset: 0; background: rgba(15, 23, 42, 0.45); backdrop-filter: blur(3px); z-index: 100; display: flex; align-items: flex-end; justify-content: center; }
.modal { background: var(--surface); width: 100%; max-height: 90vh; overflow-y: auto; border-radius: var(--radius-lg) var(--radius-lg) 0 0; padding: 1.25rem; padding-bottom: calc(1.25rem + var(--safe-bottom)); }
.modal h3 { margin: 0 0 1rem; font-size: 1.05rem; font-weight: 700; }
.modal-footer { display: flex; gap: 0.5rem; margin-top: 1rem; }
.modal-footer .btn { flex: 1; }

.drawer-backdrop { position: fixed; inset: 0; background: rgba(15, 23, 42, 0.4); z-index: 90; }
.drawer { position: fixed; inset: auto 0 0 0; max-height: 88vh; overflow-y: auto; background: var(--surface); border-radius: var(--radius-lg) var(--radius-lg) 0 0; z-index: 95; padding: 1.25rem; padding-bottom: calc(1.25rem + var(--safe-bottom)); box-shadow: var(--shadow-md); }

.toast {
  position: fixed; bottom: calc(var(--bottom-nav-h) + var(--safe-bottom) + 0.65rem); left: 50%;
  transform: translateX(-50%); z-index: 200; max-width: calc(100% - 2rem);
  background: var(--text); color: #fff; padding: 0.7rem 1.1rem; border-radius: var(--radius);
  font-size: 0.875rem; font-weight: 500; box-shadow: var(--shadow-md);
}

.menu-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.65rem; }
.menu-tile {
  display: flex; align-items: center; gap: 0.65rem; padding: 0.9rem 1rem;
  border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface);
  cursor: pointer; text-align: left; font-family: inherit; min-height: 56px;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.menu-tile:hover { border-color: #93c5fd; box-shadow: var(--shadow-xs); }
.menu-tile-icon { width: 32px; height: 32px; border-radius: 8px; background: var(--surface-2); color: var(--primary); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.menu-tile-icon [data-lucide] { width: 16px; height: 16px; }
.menu-tile strong { font-size: 0.875rem; font-weight: 600; }

.empty-state {
  text-align: center;
  padding: 2.75rem 1.25rem;
  color: var(--muted);
}
.empty-state-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--primary-soft), var(--accent-soft));
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.95rem;
  box-shadow: inset 0 0 0 1px rgba(99, 102, 241, 0.12);
}
.empty-state-icon [data-lucide] { width: 22px; height: 22px; }
.empty-state p { margin: 0 0 1rem; font-size: 0.9rem; }

/* Catalog, templates, finance — keep compact */
.catalog-niche-grid { display: grid; grid-template-columns: 1fr; gap: 0.65rem; }
.catalog-niche-card { display: flex; gap: 0.75rem; align-items: center; width: 100%; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); padding: 0.75rem; cursor: pointer; text-align: left; font-family: inherit; transition: border-color var(--transition); }
.catalog-niche-card:hover { border-color: #93c5fd; }
.catalog-niche-img { width: 64px; height: 64px; object-fit: cover; border-radius: var(--radius); flex-shrink: 0; background: var(--surface-2); }
.catalog-niche-img--empty { display: flex; align-items: center; justify-content: center; color: var(--muted); }
.catalog-product-grid { display: grid; grid-template-columns: 1fr; gap: 0.65rem; }
.catalog-product-card { display: grid; grid-template-columns: auto 80px 1fr; gap: 0.65rem; align-items: start; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 0.75rem; background: var(--surface); }
.catalog-product-card.is-imported { opacity: 0.72; }
.catalog-product-check input { width: 16px; height: 16px; accent-color: var(--primary); }
.catalog-product-img { width: 80px; height: 80px; object-fit: cover; border-radius: var(--radius); background: var(--surface-2); }
.catalog-product-img--empty { display: flex; align-items: center; justify-content: center; color: var(--muted); }
.catalog-product-body strong { display: block; font-size: 0.875rem; margin-bottom: 0.25rem; }
.catalog-product-desc { margin: 0 0 0.4rem; font-size: 0.78rem; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.catalog-product-meta { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-bottom: 0.4rem; }
.catalog-product-price { font-weight: 700; color: var(--success); }
.catalog-gallery { display: flex; gap: 0.5rem; overflow-x: auto; }
.catalog-gallery img { width: 100px; height: 100px; object-fit: cover; border-radius: var(--radius); flex-shrink: 0; }

.mobile-only { display: block; }
.table-only { display: none; }

.template-grid { display: grid; grid-template-columns: 1fr; gap: 0.85rem; }
.tpl-card { border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1rem; background: var(--surface); transition: border-color var(--transition); }
.tpl-card.is-active { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary); }
.tpl-card h4 { margin: 0.55rem 0 0.25rem; font-size: 0.9rem; }
.tpl-mock { background: var(--tpl-bg); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); padding-bottom: 0.5rem; }
.tpl-mock-top { display: flex; gap: 0.3rem; align-items: center; padding: 0.4rem 0.45rem; }
.tpl-mock-logo { width: 24px; height: 8px; border-radius: 2px; background: var(--tpl-primary); }
.tpl-mock-search { flex: 1; height: 6px; border-radius: 999px; background: rgba(0,0,0,.08); }
.tpl-mock-nav { height: 8px; margin: 0 0.45rem 0.3rem; border-radius: 3px; background: var(--tpl-primary); }
.tpl-nav-minimal { background: rgba(0,0,0,.08); height: 5px; }
.tpl-mock-hero { height: 44px; margin: 0 0.45rem 0.3rem; border-radius: var(--tpl-radius); background: linear-gradient(135deg, var(--tpl-primary), var(--tpl-secondary)); }
.tpl-hero-fullbleed { height: 52px; border-radius: 0; margin: 0 0 0.3rem; }
.tpl-mock-row { display: flex; gap: 0.3rem; padding: 0 0.45rem; }
.tpl-mock-card { flex: 1; height: 24px; border-radius: 4px; background: #fff; border: 1px solid rgba(0,0,0,.06); }
.tpl-swatches { display: flex; gap: 0.3rem; margin-top: 0.5rem; }
.tpl-swatch { width: 18px; height: 18px; border-radius: 4px; border: 1px solid rgba(0,0,0,.08); }
.tpl-traits { display: flex; flex-wrap: wrap; gap: 0.2rem; margin: 0.4rem 0 0.5rem; }
.tpl-trait { font-size: 0.62rem; font-weight: 600; padding: 0.12rem 0.45rem; border-radius: 999px; background: var(--surface-2); color: var(--muted); }

.finance-hero { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 0; }
.finance-balance { font-size: 1.6rem; font-weight: 700; color: var(--primary); margin-top: 0.2rem; letter-spacing: -0.02em; }

.kpi-grid--4 { margin-bottom: 1rem; }

.ai-usage-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.ai-usage-headline {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-top: 0.2rem;
  color: var(--text);
}

.ai-usage-headline span {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--muted);
}

.ai-usage-hero-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--gradient-ai);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.25);
}

.ai-usage-hero-icon [data-lucide] { width: 22px; height: 22px; }

.ai-daily-chart { display: flex; flex-direction: column; gap: 0.45rem; }

.ai-daily-row {
  display: grid;
  grid-template-columns: 2.5rem 1fr 3rem;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
}

.ai-daily-label { color: var(--muted); font-variant-numeric: tabular-nums; }
.ai-daily-val { text-align: right; color: var(--text-secondary); font-weight: 600; font-variant-numeric: tabular-nums; }

.ai-daily-bar {
  height: 8px;
  border-radius: 999px;
  background: var(--surface-2);
  overflow: hidden;
}

.ai-daily-bar span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--gradient-brand);
  min-width: 2px;
}

.ai-tier-badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.ai-tier-badge--fast { background: #f3f4f6; color: #4b5563; }
.ai-tier-badge--plus { background: #eff6ff; color: #1d4ed8; }
.ai-tier-badge--max { background: rgba(212, 168, 83, 0.14); color: #92680a; }

.mono-sm { font-family: ui-monospace, monospace; font-size: 0.78rem; }

.payment-mode-banner { padding: 0.65rem; font-weight: 600; font-size: 0.8125rem; text-align: center; margin-bottom: 0.75rem; border-radius: var(--radius-lg); display: flex; align-items: center; justify-content: center; gap: 0.4rem; flex-wrap: wrap; }
.payment-mode-test { background: var(--warning-soft); color: #92400e; border: 1px solid #fde68a; }
.payment-mode-prod { background: var(--success-soft); color: var(--success); border: 1px solid #a7f3d0; }
.payment-mode-grid { display: grid; grid-template-columns: 1fr; gap: 0.65rem; }
.payment-mode-card { display: flex; flex-direction: column; gap: 0.25rem; padding: 1rem; border: 2px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); cursor: pointer; text-align: left; font-family: inherit; transition: border-color var(--transition); }
.payment-mode-card.is-active { border-color: var(--primary); background: var(--primary-soft); }
.payment-key { font-size: 0.65rem; color: var(--muted); word-break: break-all; font-family: ui-monospace, monospace; }
.payment-status-list { display: flex; flex-direction: column; gap: 0.55rem; }
.payment-status-row { display: flex; justify-content: space-between; font-size: 0.875rem; padding-bottom: 0.5rem; border-bottom: 1px solid var(--border); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }

@media (min-width: 900px) {
  .desktop-only { display: flex; }
  .mobile-only { display: none; }
  .table-only { display: block; }
  .mobile-header, .bottom-nav { display: none; }
  .main { margin-left: var(--sidebar-w); padding-bottom: 0; }
  .sidebar { transform: none; box-shadow: none; }
  .sidebar-backdrop { display: none !important; }
  .topbar {
    padding: 1rem 1.5rem 0.85rem;
    background: var(--surface-glass);
    backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    z-index: 20;
  }
  .content { padding: 0.75rem 1.5rem 1.75rem; }
  .content.assistant-fullpage { padding: 0; max-width: none; margin: 0; }
  .field-row { grid-template-columns: 1fr 1fr; }
  .kpi-grid { grid-template-columns: repeat(4, 1fr); }
  .customize-layout { display: grid; grid-template-columns: 1fr 400px; gap: 1.15rem; align-items: start; }
  .preview-panel { position: sticky; top: 1rem; }
  .preview-frame { height: min(72vh, 620px); }
  .catalog-niche-grid { grid-template-columns: repeat(2, 1fr); }
  .catalog-product-grid { grid-template-columns: repeat(2, 1fr); max-height: 68vh; overflow-y: auto; }
  .modal-backdrop { align-items: center; padding: 1rem; }
  .modal { width: min(500px, 100%); border-radius: var(--radius-lg); }
  .drawer { inset: 0 0 0 auto; width: min(460px, 100%); border-radius: 0; max-height: none; }
  .fab { bottom: 1.5rem; right: 1.5rem; }
  .toast { bottom: 1.5rem; left: auto; right: 1.5rem; transform: none; }
  .template-grid { grid-template-columns: repeat(2, 1fr); }
  .payment-mode-grid { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 1100px) {
  .template-grid { grid-template-columns: repeat(3, 1fr); }
  .customize-layout { grid-template-columns: 1fr 420px; }
}

/* Global loading overlay */
.panel-loading {
  position: fixed;
  inset: 0;
  z-index: 9998;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.18);
  backdrop-filter: blur(2px);
  pointer-events: all;
}
.panel-loading-inner {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.75rem 1.1rem;
  border-radius: 999px;
  background: var(--surface);
  box-shadow: var(--shadow-md);
  color: var(--text-secondary);
  font-size: 0.88rem;
  font-weight: 600;
}
.panel-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: panelSpin 0.75s linear infinite;
}
@keyframes panelSpin { to { transform: rotate(360deg); } }

/* Dashboard hero */
.dash-hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 0 0 1.25rem;
  padding: 1.35rem 1.4rem;
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, #0f0f18 0%, #1a1630 45%, #1e1b3a 100%);
  border: 1px solid rgba(255, 255, 255, 0.06);
  overflow: hidden;
  box-shadow: 0 16px 48px rgba(15, 15, 24, 0.22);
}
.dash-hero-copy { position: relative; z-index: 1; min-width: 0; }
.dash-hero-eyebrow {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.55);
  margin-bottom: 0.35rem;
}
.dash-hero-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 4vw, 1.75rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #fff;
  line-height: 1.15;
}
.dash-hero-sub {
  margin: 0.45rem 0 0;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.62);
  max-width: 28rem;
  line-height: 1.45;
}
.dash-hero-orb {
  position: absolute;
  right: -20px;
  top: 50%;
  transform: translateY(-50%);
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, #6366f1, #8b5cf6, #d4a853, #6366f1);
  opacity: 0.55;
  filter: blur(2px);
  animation: dashOrbSpin 12s linear infinite;
  pointer-events: none;
}
.dash-hero-orb::after {
  content: "";
  position: absolute;
  inset: 12px;
  border-radius: 50%;
  background: #0f0f18;
}
@keyframes dashOrbSpin { to { transform: translateY(-50%) rotate(360deg); } }

.toast {
  background: #0f0f18;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow-md);
}

.panel-loading-inner {
  border: 1px solid var(--border);
  backdrop-filter: blur(8px);
}
.panel-spinner {
  border-top-color: var(--primary);
  border-right-color: var(--accent);
}

/* ─── Upgrade banners (plano grátis) ─── */
.upgrade-plan-banner {
  margin: 0;
  padding: 0.65rem 1rem;
  border-bottom: 1px solid rgba(245, 158, 11, 0.25);
  background: linear-gradient(90deg, rgba(245, 158, 11, 0.12), rgba(99, 102, 241, 0.08));
}
.upgrade-plan-banner.hidden { display: none; }

.upgrade-banner {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.85rem 1rem;
  margin: 0 0 1rem;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(245, 158, 11, 0.35);
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), rgba(99, 102, 241, 0.08));
}
.upgrade-banner--top {
  margin: 0;
  border-radius: 0;
  border-left: none;
  border-right: none;
  border-top: none;
}
.upgrade-banner--blocked {
  border-color: rgba(239, 68, 68, 0.4);
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.1), rgba(245, 158, 11, 0.08));
}
.upgrade-banner-icon {
  flex-shrink: 0;
  width: 2.25rem;
  height: 2.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.18);
  color: #f59e0b;
}
.upgrade-banner--blocked .upgrade-banner-icon {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}
.upgrade-banner-body { flex: 1; min-width: 0; }
.upgrade-banner-body strong {
  display: block;
  font-size: 0.9rem;
  margin-bottom: 0.15rem;
}
.upgrade-banner-body p {
  margin: 0;
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.4;
}
.upgrade-banner-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  flex-shrink: 0;
}
@media (max-width: 720px) {
  .upgrade-banner { flex-wrap: wrap; }
  .upgrade-banner-actions { width: 100%; }
}

.nav-btn-upgrade {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.15), rgba(99, 102, 241, 0.12)) !important;
  border: 1px solid rgba(245, 158, 11, 0.35) !important;
  color: #fbbf24 !important;
  font-weight: 700;
}
.sidebar-upgrade {
  padding: 0.75rem;
  margin-top: auto;
}
.sidebar-upgrade-card {
  padding: 0.85rem;
  border-radius: var(--radius-lg);
  background: linear-gradient(160deg, rgba(99, 102, 241, 0.18), rgba(245, 158, 11, 0.12));
  border: 1px solid rgba(99, 102, 241, 0.35);
}
.sidebar-upgrade-badge {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #fbbf24;
  margin-bottom: 0.35rem;
}
.sidebar-upgrade-card strong {
  display: block;
  font-size: 0.85rem;
  margin-bottom: 0.2rem;
}
.sidebar-upgrade-card p {
  margin: 0 0 0.65rem;
  font-size: 0.75rem;
  color: var(--text-secondary);
}

/* ─── Billing page ─── */
.billing-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
  padding: 1.35rem 1.4rem;
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, #0f0f18 0%, #1a1630 45%, #1e1b3a 100%);
  border: 1px solid rgba(255, 255, 255, 0.06);
}
.billing-hero-eyebrow {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.55);
  margin-bottom: 0.35rem;
}
.billing-hero-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 3.5vw, 1.65rem);
  font-weight: 800;
  color: #fff;
}
.billing-hero-sub {
  margin: 0.4rem 0 0;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.65);
  max-width: 32rem;
}
.billing-hero-cta { flex-shrink: 0; }

.billing-usage-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.85rem;
  margin-bottom: 1.5rem;
}
.billing-usage-card { padding: 1rem 1.1rem; }
.billing-card-title {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0 0 0.75rem;
  font-size: 0.85rem;
  font-weight: 700;
}
.billing-usage-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 0.5rem;
  font-size: 0.82rem;
}
.billing-usage-row--bar { flex-direction: column; align-items: stretch; }
.billing-usage-head {
  display: flex;
  justify-content: space-between;
  width: 100%;
  font-size: 0.82rem;
}
.billing-quota-bar {
  height: 6px;
  border-radius: 999px;
  background: var(--border);
  overflow: hidden;
  margin: 0.35rem 0;
}
.billing-quota-bar span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transition: width 0.3s ease;
}
.billing-quota-bar.is-warn span { background: linear-gradient(90deg, #f59e0b, #f97316); }
.billing-quota-bar.is-blocked span { background: linear-gradient(90deg, #ef4444, #dc2626); }
.billing-quota-blocked {
  margin: 0;
  font-size: 0.78rem;
  color: #ef4444;
}
.billing-tier-hint { margin: 0.5rem 0 0; }

.domain-setup-card { margin-top: 0.75rem; }
.domain-dns-box {
  margin: 0.75rem 0 1rem;
  padding: 0.85rem 1rem;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.45);
  border: 1px solid rgba(148, 163, 184, 0.18);
}
.domain-dns-title { margin: 0 0 0.5rem; font-size: 0.9rem; }
.domain-dns-steps {
  margin: 0 0 0.5rem 1.1rem;
  padding: 0;
  font-size: 0.85rem;
  color: #94a3b8;
  line-height: 1.55;
}
.domain-dns-steps li { margin-bottom: 0.45rem; }
.domain-dns-code {
  display: inline-block;
  margin-top: 0.25rem;
  padding: 0.2rem 0.45rem;
  border-radius: 6px;
  background: rgba(30, 41, 59, 0.9);
  font-size: 0.82rem;
  color: #e2e8f0;
}

.billing-plans-head {
  margin-bottom: 1rem;
}
.billing-plans-head h3 {
  margin: 0 0 0.25rem;
  font-size: 1.05rem;
}
.billing-plans-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 0.85rem;
}
.billing-plan-card {
  position: relative;
  padding: 1.25rem 1.15rem;
  border-radius: var(--radius-xl);
  border: 2px solid var(--border);
  background: var(--surface);
  display: flex;
  flex-direction: column;
}
.billing-plan-card--featured {
  border-color: rgba(165, 180, 252, 0.9);
  background: linear-gradient(145deg, #3730a3 0%, #4f46e5 42%, #6d28d9 100%);
  box-shadow: 0 18px 52px rgba(79, 70, 229, 0.42);
  color: #fff;
  z-index: 1;
}
.billing-plan-card--featured.billing-plan-card--current {
  border-color: rgba(134, 239, 172, 0.75);
  box-shadow: 0 18px 52px rgba(79, 70, 229, 0.42), 0 0 0 1px rgba(134, 239, 172, 0.35);
}
.billing-plan-card--featured .billing-plan-name {
  color: rgba(255, 255, 255, 0.78);
}
.billing-plan-card--featured .billing-plan-price {
  color: #fff;
}
.billing-plan-card--featured .billing-plan-price span {
  color: rgba(255, 255, 255, 0.72);
}
.billing-plan-card--featured .billing-plan-tagline {
  color: rgba(255, 255, 255, 0.88);
}
.billing-plan-card--featured .billing-plan-features li {
  color: rgba(255, 255, 255, 0.95);
}
.billing-plan-card--featured .billing-plan-features li svg {
  color: #e0e7ff;
}
.billing-plan-card--featured .billing-plan-feature--muted {
  color: rgba(255, 255, 255, 0.62);
}
.billing-plan-card--featured .billing-plan-feature--muted svg {
  color: rgba(255, 255, 255, 0.45);
}
.billing-plan-card--featured .billing-plan-badge {
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
  backdrop-filter: blur(4px);
}
.billing-plan-card--featured .billing-plan-badge--current {
  background: rgba(134, 239, 172, 0.25);
  color: #ecfdf5;
}
.billing-plan-card--featured .billing-plan-cta {
  background: #fff !important;
  color: #4338ca !important;
  border: none !important;
  font-weight: 700;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.18);
}
.billing-plan-card--featured .billing-plan-cta:hover {
  background: #eef2ff !important;
}
.billing-plan-feature--muted {
  opacity: 0.72;
}
.billing-plan-feature--muted svg {
  color: var(--muted) !important;
}
.billing-plan-card--current {
  border-color: rgba(34, 197, 94, 0.45);
}
.billing-plan-badge {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  background: rgba(99, 102, 241, 0.2);
  color: #a5b4fc;
}
.billing-plan-badge--current {
  background: rgba(34, 197, 94, 0.18);
  color: #86efac;
}
.billing-plan-name {
  margin: 0 0 0.35rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
}
.billing-plan-price {
  margin: 0 0 0.25rem;
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}
.billing-plan-price span {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
}
.billing-plan-tagline {
  margin: 0 0 0.85rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
  min-height: 2.4em;
}
.billing-plan-features {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
  flex: 1;
}
.billing-plan-features li {
  display: flex;
  align-items: flex-start;
  gap: 0.4rem;
  margin-bottom: 0.4rem;
  font-size: 0.8rem;
  line-height: 1.35;
}
.billing-plan-features li svg {
  flex-shrink: 0;
  width: 14px;
  height: 14px;
  margin-top: 2px;
  color: var(--primary);
}
.billing-plan-current {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.65rem;
  border-radius: var(--radius-lg);
  background: rgba(34, 197, 94, 0.12);
  color: #86efac;
  font-size: 0.82rem;
  font-weight: 600;
}
.billing-plan-muted {
  display: block;
  text-align: center;
  padding: 0.65rem;
  font-size: 0.82rem;
  color: var(--text-secondary);
}
.billing-plan-cta { margin-top: auto; }
@media (min-width: 900px) {
  .billing-plan-card--featured { transform: scale(1.02); }
}
