:root {
  --primary: #2196f3;
  --primary-dark: #1976d2;
  --primary-light: #64b5f6;
  --primary-gradient: linear-gradient(135deg, #2196f3 0%, #1976d2 100%);
  --secondary: #ff5722;
  --secondary-dark: #e64a19;
  --secondary-gradient: linear-gradient(135deg, #ff5722 0%, #e64a19 100%);
  --success: #4caf50;
  --danger: #f44336;
  --warning: #ff9800;
  --text-primary: #1a1a1a;
  --text-secondary: #6b7280;
  --text-light: #9ca3af;
  --divider: #e5e7eb;
  --background: #f9fafb;
  --surface: #ffffff;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md:
    0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg:
    0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl:
    0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --sidebar-bg: #1e293b;
  --sidebar-text: #cbd5e1;
  --content-bg: #f8fafc;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family:
    -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue',
    Oxygen, Ubuntu, Cantarell, sans-serif;
  background: var(--background);
  color: var(--text-primary);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.6;
}

.hidden {
  display: none !important;
}

/* Loading Screen - Modernizado */
.loading {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #ffffff 0%, #f0f7ff 100%);
  z-index: 9999;
}

.loading-content {
  text-align: center;
  animation: fadeIn 0.3s ease-in;
}

.logo-spinner {
  position: relative;
  width: 120px;
  height: 120px;
  margin: 0 auto 24px;
}

.loading-logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  animation: pulse 2s ease-in-out infinite;
}

.spinner-ring {
  position: absolute;
  top: -10px;
  left: -10px;
  width: calc(100% + 20px);
  height: calc(100% + 20px);
  border: 4px solid transparent;
  border-top-color: var(--primary);
  border-right-color: var(--primary-light);
  border-radius: 50%;
  animation: spin 1.2s linear infinite;
}

.loading-text {
  color: var(--text-secondary);
  font-size: 16px;
  font-weight: 500;
  margin-top: 16px;
}

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

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.05);
    opacity: 0.9;
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Login Screen - Modernizado */
.screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: linear-gradient(135deg, #ffffff 0%, #f0f7ff 50%, #e3f2fd 100%);
}

.login-container {
  width: 100%;
  max-width: 420px;
  text-align: center;
  animation: slideUp 0.5s ease-out;
}

.login-header {
  margin-bottom: 40px;
}

.logo {
  width: 140px;
  height: 140px;
  margin: 0 auto 24px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  animation: float 3s ease-in-out infinite;
  transition: transform 0.3s ease;
}

.logo:hover {
  transform: scale(1.05);
}

.brand-title {
  font-size: 36px;
  font-weight: 700;
  margin-bottom: 8px;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.5px;
}

.brand-subtitle {
  font-size: 18px;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 4px;
}

.login-content {
  background: transparent;
  padding: 0;
  border-radius: 0;
  box-shadow: none;
  width: 100%;
  display: flex;
  justify-content: center;
}

.login-description {
  color: var(--text-secondary);
  font-size: 16px;
  margin-bottom: 32px;
  line-height: 1.6;
}

.btn-primary {
  background: linear-gradient(135deg, #4285f4 0%, #2b6ed9 100%);
  color: white;
  border: none;
  padding: 16px 32px;
  border-radius: var(--radius-md);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(66, 133, 244, 0.3);
  width: 100%;
  min-height: 52px;
  position: relative;
  overflow: hidden;
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: left 0.5s ease;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(66, 133, 244, 0.4);
  filter: brightness(1.1);
}

.btn-primary:hover::before {
  left: 100%;
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: var(--shadow-md);
}

.btn-primary.btn-large {
  padding: 18px 36px;
  font-size: 18px;
  min-height: 56px;
}

.btn-icon-right {
  font-size: 20px;
}

.google-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
}

/* Panel Layout */
#panel {
  display: flex;
  height: 100vh;
}

/* Sidebar */
.sidebar {
  width: 260px;
  background: var(--sidebar-bg);
  color: var(--sidebar-text);
  display: flex;
  flex-direction: column;
  position: fixed;
  height: 100vh;
  left: 0;
  top: 0;
}

.sidebar-header {
  padding: 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-header h2 {
  color: white;
  margin-bottom: 8px;
}

.role-badge {
  background: var(--primary);
  color: white;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
  display: inline-block;
}

.sidebar-nav {
  flex: 1;
  padding: 16px 0;
}

.nav-btn {
  width: 100%;
  padding: 14px 24px;
  border: none;
  background: transparent;
  color: var(--sidebar-text);
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 15px;
  transition: all 0.2s;
}

.nav-btn:hover {
  background: rgba(255, 255, 255, 0.05);
}

.nav-btn.active {
  background: rgba(33, 150, 243, 0.2);
  color: white;
  border-left: 3px solid var(--primary);
}

.nav-btn span:first-child {
  font-size: 20px;
}

.sidebar-footer {
  padding: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.user-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
}

.btn-text {
  background: none;
  border: none;
  color: var(--sidebar-text);
  font-size: 13px;
  cursor: pointer;
  padding: 4px 0;
}

.btn-text:hover {
  color: white;
}

/* Main Content */
.main-content {
  margin-left: 260px;
  flex: 1;
  padding: 32px;
  overflow-y: auto;
  height: 100vh;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.view-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
}

.view-header h1 {
  font-size: 28px;
  color: var(--text-primary);
  font-weight: 700;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.3px;
}

.btn-back {
  background: var(--surface);
  border: 2px solid var(--divider);
  padding: 10px 18px;
  border-radius: var(--radius-md);
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-right: 16px;
}

.btn-back:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(33, 150, 243, 0.05);
  transform: translateY(-1px);
}

.btn-back:active {
  transform: translateY(0);
}

/* Form */
.form-container {
  background: var(--surface);
  padding: 32px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  max-width: 800px;
  border: 1px solid var(--divider);
}

.form-group {
  margin-bottom: 24px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: var(--text-primary);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--divider);
  border-radius: var(--radius-md);
  font-size: 15px;
  font-family: inherit;
  transition: all 0.2s ease;
  background: var(--surface);
  color: var(--text-primary);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.1);
}

.form-group small {
  color: var(--text-secondary);
  font-size: 13px;
  margin-top: 6px;
  display: block;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.form-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 32px;
}

.btn-secondary {
  background: var(--surface);
  color: var(--text-primary);
  border: 2px solid var(--divider);
  padding: 12px 24px;
  border-radius: var(--radius-md);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-secondary:hover {
  border-color: var(--text-secondary);
  background: var(--background);
  transform: translateY(-1px);
}

.btn-secondary:active {
  transform: translateY(0);
}

/* Deals List */
.deals-list {
  display: grid;
  gap: 16px;
}

.deal-item {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--divider);
  display: flex;
  gap: 20px;
  align-items: start;
  transition: all 0.3s ease;
}

.deal-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-light);
}

.deal-item img {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.deal-item-content {
  flex: 1;
}

.deal-item h3 {
  margin-bottom: 8px;
  color: var(--text-primary);
  font-weight: 700;
}

.deal-item-meta {
  display: flex;
  gap: 16px;
  margin-top: 12px;
  font-size: 14px;
  color: var(--text-secondary);
}

.deal-item-actions {
  display: flex;
  gap: 8px;
}

.btn-icon {
  background: var(--surface);
  border: 2px solid var(--divider);
  padding: 8px 12px;
  border-radius: var(--radius-md);
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  transition: all 0.2s ease;
}

.btn-icon:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(33, 150, 243, 0.05);
  transform: translateY(-1px);
}

.btn-icon:active {
  transform: translateY(0);
}

/* Validate Cupom */
.validate-container {
  max-width: 500px;
  margin: 0 auto;
}

.validate-box {
  background: var(--surface);
  padding: 40px;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--divider);
  text-align: center;
}

.coupon-input {
  width: 100%;
  padding: 20px;
  font-size: 32px;
  text-align: center;
  letter-spacing: 8px;
  font-family: 'Courier New', monospace;
  border: 3px solid var(--divider);
  border-radius: var(--radius-lg);
  margin: 24px 0;
  transition: all 0.2s ease;
  background: var(--surface);
  color: var(--text-primary);
}

.coupon-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(33, 150, 243, 0.1);
}

.btn-large {
  width: 100%;
  padding: 18px;
  font-size: 18px;
}

.validation-result {
  margin-top: 24px;
  padding: 24px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--divider);
}

.validation-result.success {
  border-left: 4px solid var(--success);
}

.validation-result.error {
  border-left: 4px solid var(--danger);
}

/* Stats */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 24px;
}

.stat-card {
  background: var(--surface);
  padding: 28px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--divider);
  text-align: center;
  transition: all 0.3s ease;
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.stat-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.stat-value {
  font-size: 32px;
  font-weight: 800;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 8px;
  letter-spacing: -0.5px;
}

.stat-label {
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
}

/* Responsive */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }

  .main-content {
    margin-left: 0;
    padding: 20px;
  }

  .login-container {
    padding: 20px;
  }

  .brand-title {
    font-size: 32px;
  }

  .brand-subtitle {
    font-size: 16px;
  }

  .logo {
    width: 120px;
    height: 120px;
  }

  .view-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .view-header h1 {
    font-size: 24px;
  }

  .form-container {
    padding: 24px 20px;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .deal-item {
    flex-direction: column;
  }

  .deal-item img {
    width: 100%;
    height: 200px;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .validate-box {
    padding: 32px 24px;
  }

  .coupon-input {
    font-size: 24px;
    letter-spacing: 4px;
    padding: 16px;
  }
}

@media (max-width: 480px) {
  .main-content {
    padding: 16px;
  }

  .view-header h1 {
    font-size: 20px;
  }

  .form-container {
    padding: 20px 16px;
  }

  .stat-icon {
    font-size: 40px;
  }

  .stat-value {
    font-size: 28px;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Estilos para upload de imagem */
.upload-container {
  background: #f8fafc;
  border-radius: 12px;
  padding: 20px;
}

.upload-label:hover {
  border-color: #3b82f6;
  background: #f0f9ff;
}

.image-preview {
  text-align: center;
  padding: 20px;
  background: #f8fafc;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
}

/* Campos do formulário */
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 1rem;
  transition: all 0.2s;
  background: white;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: #1e293b;
}

.form-group small {
  display: block;
  margin-top: 4px;
  color: #64748b;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 20px;
}

/* Botões */
.btn-primary {
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.btn-secondary {
  background: white;
  color: #475569;
  border: 1px solid #cbd5e1;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-secondary:hover {
  background: #f8fafc;
  border-color: #94a3b8;
}

/* Responsividade */
@media (max-width: 768px) {
  .form-row {
    grid-template-columns: 1fr;
  }

  .upload-container {
    padding: 16px;
  }
}

#google-login-btn {
  margin-top: 24px;
}

/* Estilos para a view de edição */
.cep-help {
  display: block;
  margin-top: 4px;
  font-style: italic;
}

/* Destaque para campos alterados */
.form-group input.changed,
.form-group select.changed {
  border-color: #3b82f6;
  background-color: #eff6ff;
}

/* Indicador visual de campos alterados */
.field-changed-indicator {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 8px;
  height: 8px;
  background: #3b82f6;
  border-radius: 50%;
  display: none;
}

.form-group.changed .field-changed-indicator {
  display: block;
}

/* Container principal usando Grid para melhor controle */
.stock-container {
  display: flex;
  gap: 16px;
  align-items: flex-end; /* Alinha o checkbox com o campo de input */
  margin-bottom: 15px;
}

.flex-input {
  flex: 1;
}

/* Wrapper do checkbox para garantir que ele ocupe a altura do input */
.unlimited-wrapper {
  height: 42px; /* Altura padrão aproximada de um input */
  display: flex;
  align-items: center;
}

/* Transformando o label em um pequeno "card" clicável */
.checkbox-card {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 8px 12px;
  background-color: #f8fafc; /* Fundo sutil para parecer um botão */
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.checkbox-card:hover {
  background-color: #f1f5f9;
  border-color: #cbd5e1;
}

.unlimited-text {
  font-size: 0.9rem;
  font-weight: 500;
  color: #475569;
}

/* Estilização do Checkbox */
#unlimited-stock {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: #3b82f6;
}

/* Responsividade: em celulares, um fica embaixo do outro */
@media (max-width: 480px) {
  .stock-container {
    flex-direction: column;
    align-items: flex-start;
  }
  .unlimited-wrapper {
    height: auto;
    width: 100%;
  }
  .checkbox-card {
    width: 100%;
    justify-content: center;
  }
}

.stock-row {
  display: flex;
  gap: 15px;
  align-items: flex-end; /* Alinha a base dos itens */
  margin-bottom: 15px;
}

.flex-1 {
  flex: 1;
}

.unlimited-group {
  /* Esta altura deve bater com a altura do seu input (geralmente 40-45px) */
  height: 42px;
  display: flex;
  align-items: center;
}

.checkbox-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  white-space: nowrap;
  padding: 8px 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 0.9rem;
}

.checkbox-wrapper input {
  margin: 0;
  width: 18px;
  height: 18px;
}

.estoque-flex-container {
  display: grid;
  grid-template-columns: 1fr auto; /* Input ocupa o que der, checkbox o mínimo */
  gap: 15px;
  align-items: end; /* Alinha a base do checkbox com a base do input */
  margin-bottom: 15px;
}

/* Remove margens que podem estar vindo de .form-group global */
.field-estoque,
.field-unlimited {
  margin-bottom: 0 !important;
}

.unlimited-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  height: 42px; /* Força a altura exata do seu input para o texto ficar centralizado */
  padding: 0 10px;
  background: #f8fafb;
  border-radius: 8px;
  border: 1px solid var(--divider);
  white-space: nowrap;
}

.unlimited-label input[type='checkbox'] {
  width: 18px;
  height: 18px;
  margin: 0;
}

/* Ajuste mobile */
@media (max-width: 480px) {
  .estoque-flex-container {
    grid-template-columns: 1fr;
    align-items: stretch;
  }
  .unlimited-label {
    justify-content: center;
  }
}

.readonly-field {
  background-color: #f5f5f5;
  cursor: not-allowed;
  border-color: #ddd;
}

/* Estilos Exclusivos para o Preview da Oferta */
#preview-card-container .preview-deal-card {
  background: #ffffff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  color: #1e293b;
  text-align: left;
}

#preview-card-container .preview-deal-image {
  width: 100%;
  height: 180px;
  object-fit: cover;
  background: #f1f5f9;
}

#preview-card-container .preview-deal-content {
  padding: 15px;
}

#preview-card-container .preview-merchant-tag {
  font-size: 0.75rem;
  color: #2196f3;
  font-weight: bold;
  text-transform: uppercase;
}

#preview-card-container .preview-price-old {
  text-decoration: line-through;
  color: #94a3b8;
  font-size: 0.9rem;
}

#preview-card-container .preview-price-new {
  color: #2196f3;
  font-weight: bold;
  font-size: 1.4rem;
  margin-left: 8px;
}

.estoque-alerta {
  color: #ef4444;
  font-weight: bold;
  animation: pulse 2s infinite;
}

/* Estilo Mobile-First para Oferta Relâmpago */
.flash-deal-container {
  padding: 20px;
  max-width: 500px;
  margin: 0 auto;
  animation: fadeIn 0.3s ease-in-out;
}

.flash-header {
  text-align: center;
  margin-bottom: 25px;
}

.flash-header h2 {
  color: var(--primary-dark);
  margin-bottom: 5px;
  font-size: 1.5rem;
}

.flash-header p {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.btn-camera {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #f0f9ff;
  border: 2px dashed var(--primary);
  border-radius: 20px;
  padding: 50px 20px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}

.btn-camera:active {
  transform: scale(0.98);
  background: #e0f2fe;
}

.btn-camera .icon {
  font-size: 3.5rem;
  margin-bottom: 15px;
  display: block;
}

.btn-camera .text {
  font-weight: bold;
  color: var(--primary-dark);
  font-size: 1.1rem;
}

.image-preview img {
  width: 100%;
  max-height: 250px;
  object-fit: cover;
  border-radius: 15px;
  box-shadow: var(--shadow-md);
  margin-top: 10px;
}

.flash-inputs {
  background: var(--surface);
  padding: 20px;
  border-radius: 20px;
  box-shadow: var(--shadow-sm);
  margin-top: 20px;
}

.btn-primary-big {
  width: 100%;
  padding: 18px;
  background: var(--primary-gradient);
  color: white;
  border: none;
  border-radius: 15px;
  font-size: 1.2rem;
  font-weight: bold;
  box-shadow: var(--shadow-lg);
  cursor: pointer;
  margin-top: 10px;
  transition: transform 0.2s;
}

.btn-primary-big:active {
  transform: scale(0.95);
}

@media (max-width: 768px) {
  #flash-deal-view {
    padding-bottom: 100px;
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

#flash-preview img {
  width: 100%;
  border-radius: 12px;
  margin-bottom: 15px;
}

/* Esconder a barra inferior no Desktop */
.bottom-nav {
  display: none;
}

/* Ajustes para Mobile (Telas até 768px) */
@media (max-width: 768px) {
  /* Esconde a sidebar lateral para ganhar espaço */
  .sidebar {
    display: none;
  }

  /* Faz o conteúdo ocupar a tela toda */
  .main-layout {
    display: block;
    padding-bottom: 80px; /* Espaço para não cobrir o conteúdo com a barra */
  }

  /* Estiliza a Barra Inferior */
  .bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 70px;
    background: white;
    border-top: 1px solid #eee;
    justify-content: space-around;
    align-items: center;
    z-index: 1000;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
  }

  .bottom-nav .nav-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.2rem;
  }

  .bottom-nav .nav-btn.active {
    color: var(--primary);
  }

  .bottom-nav .nav-btn small {
    font-size: 0.7rem;
    margin-top: 4px;
  }

  .flash-special {
    transform: none;
  }

  .flash-icon-circle {
    background: var(--primary-gradient);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 4px;
    font-size: 1rem;
    color: white;
    font-size: 1.5rem;
    border: 4px solid white;
    box-shadow: var(--shadow-md);
  }
}

/* Garante que os 4 botões caibam bem no mobile */
.bottom-nav {
  display: grid;
  grid-template-columns: repeat(4, 1fr); /* Divide em 4 colunas iguais */
  background: var(--surface);
  border-top: 1px solid var(--divider);
}

.logout-btn-nav span {
  filter: grayscale(1); /* Deixa o emoji de porta discreto */
}

.logout-btn-nav:active span {
  filter: none;
  color: var(--danger); /* Cor de alerta ao clicar */
}

.bottom-nav {
  display: none; /* Nasce escondida */
}

.view-section {
  padding-bottom: 120px !important;
  box-sizing: border-box;
}

#deals-list,
.deals-container {
  padding-bottom: 100px !important;
}

.deal-item-actions {
  display: flex !important;
  justify-content: center !important; /* Centraliza horizontalmente */
  gap: 12px !important; /* Espaço entre botões */
  margin-top: 15px !important;
  padding: 10px !important;
  border-top: 1px solid #f1f5f9 !important;
  width: 100% !important;
}

.deal-item-actions .btn-icon {
  flex: 1 !important; /* Faz os botões dividirem o espaço */
  max-width: 140px !important; /* Não deixa ficarem gigantescos em telas largas */
  height: 44px !important; /* Altura ideal para o dedo (Apple/Google standard) */
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 8px !important;
  font-weight: 600 !important;
  font-size: 14px !important;
  background-color: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
  cursor: pointer !important;
}

/* Espaço de segurança no painel para o scroll não bater na nav */
#panel {
  padding-bottom: 120px !important;
}
