/* ==========================================================================
   TÂNIA BATISTA SHOP - MODERN DARK THEME (ESTILO x-3.me)
   Paleta: Base Azul-Petróleo/Navy Escuro (#0E131F) com Acentos Rosa (#FA26A0) e Lima (#99E600)
   SEM PRETO PURO • ALTO CONTRASTE • DESIGN POLIDO & RESPONSIVO
   ========================================================================== */

:root {
  /* Fundo Navy/Grafite Profundo do x-3.me (NUNCA preto puro) */
  --bg-base: #0E131F;
  --bg-surface: #141B2D;
  --bg-card: #182238;
  --bg-card-hover: #1E2B47;
  --bg-elevated: #1F2C46;
  --bg-input: #111726;

  /* Cores de Destaque */
  --accent-pink: #FA26A0;
  --accent-pink-hover: #E0198D;
  --accent-pink-glow: rgba(250, 38, 160, 0.28);
  --accent-pink-subtle: rgba(250, 38, 160, 0.12);

  --accent-lime: #99E600;
  --accent-lime-dim: #82C400;
  --accent-lime-glow: rgba(153, 230, 0, 0.25);
  --accent-lime-subtle: rgba(153, 230, 0, 0.12);

  --accent-cyan: #38BDF8;
  --accent-purple: #A855F7;

  --danger: #FF4757;
  --danger-glow: rgba(255, 71, 87, 0.3);
  --warning: #FFA502;
  --info: #2ED573;

  /* Bordas de Alto Contraste */
  --border-subtle: #24324D;
  --border-medium: #2F4164;
  --border-card: #283754;
  --border-pink: rgba(250, 38, 160, 0.45);
  --border-lime: rgba(153, 230, 0, 0.45);
  --border-cyan: rgba(56, 189, 248, 0.45);
  --border-purple: rgba(168, 85, 247, 0.45);

  /* Tipografia de Alto Contraste */
  --text-primary: #FFFFFF;
  --text-secondary: #94A3B8;
  --text-muted: #64748B;
  --text-inverse: #0E131F;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 18px;
  --radius-pill: 9999px;

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --shadow-card: 0 8px 24px rgba(0, 0, 0, 0.4);
  --transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Reset Básico */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
  box-sizing: border-box;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-base);
  color: var(--text-primary);
  min-height: 100vh;
  width: 100%;
  max-width: 100vw;
  line-height: 1.5;
  background-image: 
    radial-gradient(circle at 15% 10%, rgba(250, 38, 160, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 85% 25%, rgba(153, 230, 0, 0.07) 0%, transparent 45%),
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 48px 48px, 48px 48px;
  background-attachment: fixed;
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
  box-sizing: border-box;
}

.container {
  width: 100%;
  max-width: 1140px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
  box-sizing: border-box;
}

@media (max-width: 640px) {
  .container {
    padding-left: 1.15rem;
    padding-right: 1.15rem;
  }
}

/* ==========================================================================
   HEADER / NAVBAR ESTILO x-3.me
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(19, 24, 38, 0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-subtle);
  padding: 0.6rem 0;
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-wrap {
  display: flex;
  align-items: center;
  text-decoration: none;
}

/* Logotipo Grande e Bem Legível no Celular */
.brand-logo {
  height: 52px;
  max-height: 54px;
  width: auto;
  max-width: 220px;
  object-fit: contain;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.4));
  transition: transform 0.2s ease;
}

.brand-wrap:hover .brand-logo {
  transform: scale(1.02);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

/* Botão de Avisos */
.btn-icon {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  transition: var(--transition);
}

.btn-icon:hover {
  color: var(--text-primary);
  border-color: var(--border-medium);
  background: var(--bg-elevated);
}

.badge-alert {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 8px;
  height: 8px;
  background-color: var(--accent-pink);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--accent-pink);
}

/* Botão Menu Estilo x-3.me (Pill com ponto verde) */
.btn-menu-pill {
  height: 42px;
  padding: 0 1rem;
  border-radius: var(--radius-pill);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-size: 0.92rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  cursor: pointer;
  transition: var(--transition);
}

.btn-menu-pill:hover {
  background: var(--bg-elevated);
  border-color: var(--border-medium);
  color: #FFFFFF;
}

.status-dot-lime {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-lime);
  box-shadow: 0 0 8px var(--accent-lime);
}

/* ==========================================================================
   MENU LATERAL / DRAWER DIREITO
   ========================================================================== */
.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.drawer-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.drawer-menu {
  position: fixed;
  top: 0;
  right: -320px;
  width: 300px;
  max-width: 85vw;
  height: 100vh;
  background: var(--bg-surface);
  border-left: 1px solid var(--border-subtle);
  z-index: 210;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  transition: right 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.6);
}

.drawer-backdrop.open .drawer-menu {
  right: 0;
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 1.15rem;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 1.15rem;
}

.drawer-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.drawer-nav {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1;
}

.drawer-item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  background: transparent;
  text-align: left;
  transition: var(--transition);
}

.drawer-item:hover {
  color: #FFFFFF;
  background: var(--bg-elevated);
  border-color: var(--border-subtle);
}

.drawer-item.highlight {
  color: var(--accent-pink);
  background: var(--accent-pink-subtle);
  border-color: var(--border-pink);
}

.drawer-item.lime-item {
  color: var(--accent-lime);
  background: var(--accent-lime-subtle);
  border-color: var(--border-lime);
}

.drawer-footer {
  padding-top: 1rem;
  border-top: 1px solid var(--border-subtle);
}

/* ==========================================================================
   DROPDOWN DE NOTIFICAÇÕES
   ========================================================================== */
.notifications-dropdown {
  position: absolute;
  top: 56px;
  right: 1.15rem;
  width: 320px;
  max-width: 90vw;
  background: var(--bg-surface);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.7);
  padding: 1rem;
  display: none;
  z-index: 150;
}

.notifications-dropdown.show {
  display: block;
}

.notification-header {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.notification-item {
  padding: 0.65rem 0.75rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  margin-bottom: 0.5rem;
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.notification-item strong {
  color: var(--accent-lime);
}

/* ==========================================================================
   TELA DE LOGIN
   ========================================================================== */
#login-screen {
  min-height: 85vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
}

.login-card {
  width: 100%;
  max-width: 410px;
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 2.25rem;
  box-shadow: var(--shadow-card);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.login-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-pink), var(--accent-lime));
}

.login-logo {
  max-width: 220px;
  height: auto;
  margin-bottom: 1.5rem;
}

.login-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.35rem;
}

.login-subtitle {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-bottom: 1.75rem;
}

.form-group {
  text-align: left;
  margin-bottom: 1.15rem;
}

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.45rem;
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: #FFFFFF;
  font-size: 0.95rem;
  font-family: inherit;
  transition: var(--transition);
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--accent-pink);
  box-shadow: 0 0 0 3px var(--accent-pink-subtle);
}

.btn-biometrics {
  width: 100%;
  padding: 0.85rem;
  background: rgba(153, 230, 0, 0.1);
  border: 1px solid var(--border-lime);
  border-radius: var(--radius-sm);
  color: var(--accent-lime);
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  margin-top: 1rem;
  transition: var(--transition);
}

.btn-biometrics:hover {
  background: rgba(153, 230, 0, 0.2);
  box-shadow: 0 0 16px var(--accent-lime-glow);
}

/* ==========================================================================
   DASHBOARD & CARDS GERENCIAIS COMPACTOS (ESTILO x-3.me)
   2 CARDS POR LINHA NO MOBILE • ESPAÇO APROXIMADO DO HEADER
   ========================================================================== */
.dashboard-wrap {
  padding-top: 0.85rem;
  padding-bottom: 3.5rem;
  width: 100%;
  box-sizing: border-box;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important; /* minmax(0, 1fr) impede estouro horizontal */
  gap: 0.65rem;
  margin-bottom: 0.85rem;
  width: 100%;
  box-sizing: border-box;
}

@media (min-width: 860px) {
  .metrics-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 0.85rem;
    margin-bottom: 1.15rem;
  }
}

.metric-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 0.65rem 0.85rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 72px;
  min-width: 0; /* Impede estouro de container */
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
  transition: var(--transition);
}

.metric-card:hover {
  transform: translateY(-2px);
  background: var(--bg-card-hover);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
}

/* Bordas temáticas do x-3.me */
.metric-card.pink-card { border-color: var(--border-pink); }
.metric-card.lime-card { border-color: var(--border-lime); }
.metric-card.cyan-card { border-color: var(--border-cyan); }
.metric-card.purple-card { border-color: var(--border-purple); }

.metric-compact-header {
  display: flex;
  align-items: center;
  margin-bottom: 0.25rem;
}

.metric-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.pink-pill { color: var(--accent-pink); }
.lime-pill { color: var(--accent-lime); }
.cyan-pill { color: var(--accent-cyan); }
.purple-pill { color: #C084FC; }

.metric-value {
  font-size: 1.35rem;
  font-weight: 800;
  color: #FFFFFF;
  letter-spacing: -0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ==========================================================================
   BOTÃO DE CADASTRO & BARRA DE BUSCA / FILTRO
   ========================================================================== */
.action-banner {
  margin-bottom: 0.85rem;
  width: 100%;
  box-sizing: border-box;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  height: 48px;
  background: linear-gradient(135deg, var(--accent-pink), #D81B80);
  border: none;
  border-radius: var(--radius-md);
  color: #FFFFFF;
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 0 18px var(--accent-pink-glow);
  transition: var(--transition);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 25px rgba(250, 38, 160, 0.45);
}

.filters-bar {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 0.85rem;
  margin-bottom: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.search-input-wrap {
  position: relative;
  width: 100%;
}

.search-icon {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.search-input {
  padding-left: 2.6rem;
  font-size: 0.92rem;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  height: 42px;
}

.category-select-wrap {
  width: 100%;
}

.form-select {
  height: 42px;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: #FFFFFF;
}

/* ==========================================================================
   LISTAGEM DE PRODUTOS ESTILO x-3.me (RESPONSIVA & SEM ESTOURO LATERAL)
   ========================================================================== */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

@media (max-width: 640px) {
  .products-grid {
    grid-template-columns: 100%;
    width: 100%;
  }
}

.product-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 1.15rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 100%;
  max-width: 100%;
  min-width: 0; /* CRUCIAL: impede o card de estourar a tela */
  overflow: hidden;
  box-sizing: border-box;
  transition: var(--transition);
  box-shadow: var(--shadow-card);
}

.product-card:hover {
  border-color: var(--border-medium);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
}

.product-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.65rem;
  width: 100%;
  min-width: 0;
}

.category-badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-pill);
  background: rgba(153, 230, 0, 0.12);
  color: var(--accent-lime);
  border: 1px solid rgba(153, 230, 0, 0.35);
  text-transform: uppercase;
  max-width: 70%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.btn-card-menu-trigger {
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  padding: 0.25rem 0.65rem;
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  cursor: pointer;
  flex-shrink: 0;
  transition: var(--transition);
}

.btn-card-menu-trigger:hover {
  color: #FFFFFF;
  border-color: var(--border-medium);
}

.product-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: #FFFFFF;
  line-height: 1.35;
  margin-bottom: 0.75rem;
  word-break: break-word;
  overflow-wrap: break-word;
  min-width: 0;
  width: 100%;
}

/* PILL DO LINK DE COMPRA (QUEBRA DE LINHA FORÇADA PARA NÃO ATRAVESSAR LIMITES) */
.product-link-pill {
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.65rem;
  display: flex;
  align-items: flex-start; /* Alinha no topo caso o link quebre em 2 ou mais linhas */
  gap: 0.55rem;
  margin-bottom: 0.85rem;
  width: 100%;
  max-width: 100%;
  min-width: 0; /* IMPEDE ESTOURO FLEXBOX */
  overflow: hidden;
  box-sizing: border-box;
}

.btn-pill-copy {
  background: rgba(153, 230, 0, 0.1);
  border: 1px solid rgba(153, 230, 0, 0.25);
  border-radius: 6px;
  width: 28px;
  height: 28px;
  min-width: 28px;
  flex-shrink: 0;
  color: var(--accent-lime);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
  transition: var(--transition);
}

.btn-pill-copy:hover {
  background: rgba(153, 230, 0, 0.25);
  color: #FFFFFF;
}

.pill-url-text {
  flex: 1 1 0;
  min-width: 0; /* ESSENCIAL EM FLEXBOX */
  font-size: 0.82rem;
  line-height: 1.35;
  color: var(--accent-lime);
  font-family: inherit;
  word-break: break-all; /* FORÇA QUEBRA DE LINHA DO LINK */
  overflow-wrap: anywhere;
  white-space: normal; /* PERMITE A QUEBRA SEM LIMITES RÍGIDOS */
}

.pill-ext-link {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  width: 28px;
  height: 28px;
  min-width: 28px;
  flex-shrink: 0;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
  transition: var(--transition);
}

.pill-ext-link:hover {
  color: #FFFFFF;
  border-color: rgba(255, 255, 255, 0.3);
}

.pill-ext-link:hover {
  color: #FFFFFF;
}

/* MÉTRICAS DO PRODUTO */
.product-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.45rem;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.55rem 0.65rem;
  margin-bottom: 0.85rem;
  text-align: center;
}

.stat-item {
  display: flex;
  flex-direction: column;
}

.stat-title {
  font-size: 0.68rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 600;
}

.stat-val {
  font-size: 0.92rem;
  font-weight: 800;
  color: #FFFFFF;
}

.stat-val.lime { color: var(--accent-lime); }
.stat-val.pink { color: var(--accent-pink); }

.product-card-actions {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.btn-card-action {
  flex: 1;
  height: 40px;
  padding: 0 0.85rem;
  font-size: 0.88rem;
  font-weight: 700;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  border: 1px solid var(--border-subtle);
  transition: var(--transition);
  background: var(--bg-surface);
  color: var(--text-secondary);
}

.btn-card-action:hover {
  color: #FFFFFF;
  border-color: var(--border-medium);
  background: var(--bg-elevated);
}

.btn-card-action.btn-copy-link {
  color: var(--accent-lime);
  border-color: rgba(153, 230, 0, 0.35);
  background: rgba(153, 230, 0, 0.08);
}

.btn-card-action.btn-copy-link:hover {
  background: rgba(153, 230, 0, 0.2);
  border-color: var(--accent-lime);
}

.btn-card-action.btn-edit-trigger {
  color: var(--accent-pink);
  border-color: rgba(250, 38, 160, 0.35);
  background: rgba(250, 38, 160, 0.08);
}

.btn-card-action.btn-edit-trigger:hover {
  background: rgba(250, 38, 160, 0.2);
  border-color: var(--accent-pink);
}

/* Indicador de Carregamento / Infinite Scroll */
.infinite-scroll-loader {
  grid-column: 1 / -1;
  text-align: center;
  padding: 1.5rem 0;
  color: var(--text-muted);
  font-size: 0.88rem;
}

.spinner {
  display: inline-block;
  width: 26px;
  height: 26px;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  border-top-color: var(--accent-pink);
  animation: spin 0.8s linear infinite;
  margin-bottom: 0.45rem;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ==========================================================================
   MODAL DE PRODUTO (LAYOUT ELEGANTE, COLORIDO & FIXO)
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.modal-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-container {
  width: 100%;
  max-width: 680px;
  height: 90vh;
  max-height: 820px;
  background: #141B2D;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.85);
  transform: scale(0.96);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.modal-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-pink), var(--accent-lime));
  z-index: 20;
}

.modal-backdrop.open .modal-container {
  transform: scale(1);
}

#form-product {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.modal-header {
  flex-shrink: 0;
  padding: 1.15rem 1.5rem;
  background: #182238;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-header-left {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.modal-header-badge {
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--accent-pink);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.modal-title {
  font-size: 1.3rem;
  font-weight: 800;
  color: #FFFFFF;
  letter-spacing: -0.01em;
}

.modal-close-btn {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-size: 1.4rem;
  cursor: pointer;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.modal-close-btn:hover {
  color: #FFFFFF;
  border-color: var(--accent-pink);
  background: var(--accent-pink-subtle);
}

.modal-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
  background: #0E131F;
}

/* CARDS DE SEÇÃO COM CORES VIBRANTES */
.modal-section-card {
  background: #182238;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  transition: var(--transition);
}

.modal-section-card.pink-section {
  border-color: rgba(250, 38, 160, 0.45);
}

.modal-section-card.cyan-section {
  border-color: rgba(56, 189, 248, 0.45);
}

.modal-section-card.lime-section {
  border-color: rgba(153, 230, 0, 0.45);
}

.modal-section-card.purple-section {
  border-color: rgba(168, 85, 247, 0.45);
}

.section-card-title {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.88rem;
  font-weight: 700;
  color: #FFFFFF;
}

.section-icon {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.section-icon.pink-icon { background: rgba(250, 38, 160, 0.15); color: var(--accent-pink); }
.section-icon.cyan-icon { background: rgba(56, 189, 248, 0.15); color: #38BDF8; }
.section-icon.lime-icon { background: rgba(153, 230, 0, 0.15); color: var(--accent-lime); }
.section-icon.purple-icon { background: rgba(168, 85, 247, 0.15); color: #C084FC; }

.req {
  color: var(--accent-pink);
  font-weight: 800;
}

.input-highlight-pink:focus {
  border-color: var(--accent-pink) !important;
  box-shadow: 0 0 0 3px var(--accent-pink-subtle) !important;
}

.input-highlight-cyan:focus {
  border-color: #38BDF8 !important;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.2) !important;
}

.input-highlight-lime:focus {
  border-color: var(--accent-lime) !important;
  box-shadow: 0 0 0 3px var(--accent-lime-subtle) !important;
}

.input-highlight-purple:focus {
  border-color: #C084FC !important;
  box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.2) !important;
}

.input-with-action {
  display: flex;
  gap: 0.5rem;
}

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

@media (max-width: 600px) {
  .form-grid-3 {
    grid-template-columns: 1fr;
  }
}

/* BOTÕES DE CÓPIA GENEROSOS (ALTURA 44px) */
.btn-copy-action {
  height: 44px;
  min-height: 44px;
  padding: 0 1.25rem;
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  white-space: nowrap;
  transition: var(--transition);
}

.btn-copy-link-modal {
  background: rgba(153, 230, 0, 0.12);
  border: 1px solid var(--border-lime);
  color: var(--accent-lime);
}

.btn-copy-link-modal:hover {
  background: rgba(153, 230, 0, 0.24);
  box-shadow: 0 0 12px var(--accent-lime-glow);
}

.btn-copy-desc-modal {
  width: 100%;
  background: rgba(168, 85, 247, 0.12);
  border: 1px solid rgba(168, 85, 247, 0.4);
  color: #D8B4FE;
}

.btn-copy-desc-modal:hover {
  background: rgba(168, 85, 247, 0.24);
  color: #FFFFFF;
}

.btn-copy-action.copied {
  background: var(--accent-lime) !important;
  color: #0B0E14 !important;
  border-color: var(--accent-lime) !important;
  font-weight: 700;
}

/* CALCULADORA DE COMISSÃO */
.profit-preview-banner {
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.profit-preview-item {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.profit-preview-item strong {
  font-size: 0.95rem;
}

.text-lime { color: var(--accent-lime); }
.text-pink { color: var(--accent-pink); }

/* RODAPÉ DO MODAL (FIXO, VISÍVEL & DE ALTO CONTRASTE) */
.modal-footer {
  flex-shrink: 0;
  position: sticky;
  bottom: 0;
  background: #182238;
  border-top: 1px solid var(--border-medium);
  z-index: 10;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.85rem;
  box-shadow: 0 -10px 25px rgba(0, 0, 0, 0.5);
}

.btn-secondary {
  height: 46px;
  min-height: 46px;
  padding: 0 1.5rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-medium);
  color: #FFFFFF;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: var(--transition);
}

.btn-secondary:hover {
  background: var(--bg-elevated);
  border-color: rgba(255, 255, 255, 0.3);
}

.btn-danger {
  height: 46px;
  min-height: 46px;
  padding: 0 1.5rem;
  background: rgba(255, 71, 87, 0.15);
  border: 1px solid rgba(255, 71, 87, 0.45);
  color: #FF6B81;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: var(--transition);
}

.btn-danger:hover {
  background: var(--danger);
  color: #FFFFFF;
  box-shadow: 0 0 16px var(--danger-glow);
}

.btn-save {
  height: 46px;
  min-height: 46px;
  padding: 0 1.85rem;
  background: linear-gradient(135deg, var(--accent-pink), #D81B80);
  border: none;
  color: #FFFFFF;
  border-radius: var(--radius-sm);
  font-size: 0.98rem;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  box-shadow: 0 0 18px var(--accent-pink-glow);
  transition: var(--transition);
}

.btn-save:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 26px rgba(250, 38, 160, 0.5);
}

/* ==========================================================================
   MODAL SENSÍVEL COM BARRA DE CONTAGEM REGRESSIVA (3 SEGUNDOS)
   ========================================================================== */
.sensitive-modal-container {
  width: 100%;
  max-width: 460px;
  background: var(--bg-surface);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  padding: 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: 0 25px 65px rgba(0, 0, 0, 0.8);
}

.drain-bar-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.05);
}

.drain-bar {
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, var(--accent-pink), var(--accent-lime));
  transform-origin: left;
  transition: width 3s linear;
}

.drain-bar.draining {
  width: 0% !important;
}

.sensitive-icon-wrap {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  margin: 0 auto 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
}

.sensitive-icon-wrap.edit-theme {
  background: rgba(250, 38, 160, 0.12);
  color: var(--accent-pink);
  border: 1px solid var(--border-pink);
}

.sensitive-icon-wrap.delete-theme {
  background: rgba(255, 71, 87, 0.12);
  color: var(--danger);
  border: 1px solid rgba(255, 71, 87, 0.45);
}

.sensitive-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #FFFFFF;
  margin-bottom: 0.5rem;
}

.sensitive-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 1.5rem;
}

.countdown-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-pill);
  font-size: 0.8rem;
  font-weight: 700;
  background: var(--bg-input);
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
  margin-bottom: 1.5rem;
}

.countdown-badge.ready {
  background: rgba(153, 230, 0, 0.12);
  color: var(--accent-lime);
  border-color: rgba(153, 230, 0, 0.35);
}

.sensitive-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
}

.sensitive-actions button {
  flex: 1;
}

.btn-confirm-action:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  filter: grayscale(1);
}

/* ==========================================================================
   TOAST NOTIFICATIONS
   ========================================================================== */
.toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 500;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}

.toast {
  background: var(--bg-surface);
  border: 1px solid var(--border-medium);
  border-left: 4px solid var(--accent-lime);
  padding: 0.85rem 1.25rem;
  border-radius: var(--radius-sm);
  color: #FFFFFF;
  font-size: 0.88rem;
  font-weight: 600;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  transform: translateX(120%);
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

.toast.show {
  transform: translateX(0);
}

.toast.pink {
  border-left-color: var(--accent-pink);
}

.toast.danger {
  border-left-color: var(--danger);
}

/* ==========================================================================
   RESPONSIVIDADE (MOBILE & TABLET)
   ========================================================================== */
@media (max-width: 768px) {
  .brand-logo {
    height: 48px !important;
    max-height: 50px !important;
    max-width: 190px !important;
  }
  .sensitive-actions {
    flex-direction: column;
  }
  .header-actions {
    gap: 0.5rem;
  }
  .btn-menu-pill {
    padding: 0 0.75rem;
    font-size: 0.85rem;
  }
}
