:root {
  --bg-primary: #0f172a;
  --bg-secondary: #1e293b;
  --bg-tertiary: #334155;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --shopee-orange: #ee4d2d;
  --shopee-orange-hover: #d23f20;
  --wa-green: #25d366;
  --wa-dark-green: #128c7e;
  --accent-blue: #3b82f6;
  --accent-purple: #8b5cf6;
  --success: #10b981;
  --danger: #ef4444;
  --warning: #f59e0b;
  --border: #334155;
  --border-focus: #ee4d2d;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.4);
  --font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

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

body {
  font-family: var(--font-family);
  background-color: var(--bg-primary);
  color: var(--text-main);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header */
.header {
  background-color: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo-icon {
  background: linear-gradient(135deg, var(--shopee-orange), #ff7337);
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: bold;
}

.logo-text h1 {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.logo-text span {
  font-size: 0.75rem;
  color: var(--text-muted);
}

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

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.85rem;
  border-radius: 9999px;
  font-size: 0.85rem;
  font-weight: 500;
  background-color: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
}

.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background-color: var(--danger);
  transition: all 0.3s ease;
}

.status-dot.active,
.status-dot.dot-active,
.status-dot.connected {
  background-color: #10b981;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.75);
}

.status-dot.disconnected,
.status-dot.dot-danger {
  background-color: #ef4444;
  box-shadow: 0 0 6px rgba(239, 68, 68, 0.4);
}

/* Layout */
.container {
  max-width: 1300px;
  margin: 0 auto;
  padding: 1.5rem;
  width: 100%;
  flex: 1;
}

/* KPI Cards */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 0.85rem;
  margin-bottom: 1.25rem;
  justify-content: center;
}

.stat-card {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.stat-card:hover {
  border-color: rgba(255, 255, 255, 0.15);
}

.stat-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  flex-shrink: 0;
}

.stat-icon.orange { background: rgba(238, 77, 45, 0.15); color: var(--shopee-orange); }
.stat-icon.green { background: rgba(37, 211, 102, 0.15); color: var(--wa-green); }
.stat-icon.blue { background: rgba(59, 130, 246, 0.15); color: var(--accent-blue); }
.stat-icon.purple { background: rgba(139, 92, 246, 0.15); color: var(--accent-purple); }

.stat-info h3 {
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.2;
}

.stat-info p {
  font-size: 0.76rem;
  color: var(--text-muted);
  margin-top: 0.1rem;
}

/* Tabs */
.tabs-nav {
  display: flex;
  width: 100%;
  border-bottom: 2px solid var(--border);
  margin-bottom: 1.5rem;
  overflow-x: visible;
  scrollbar-width: none;
  -ms-overflow-style: none;
  background: rgba(30, 41, 59, 0.4);
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  padding: 0.25rem 0.25rem 0 0.25rem;
  gap: 0.25rem;
}

.tabs-nav::-webkit-scrollbar {
  display: none;
}

.tab-btn {
  flex: 1 1 0;
  min-width: 0;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 600;
  padding: 0.75rem 0.5rem;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 0.4rem;
  transition: all 0.2s ease;
  white-space: nowrap;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}

.tab-btn:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.04);
}

.tab-btn.active {
  color: var(--shopee-orange);
  background: rgba(238, 77, 45, 0.08);
  border-bottom: 2px solid var(--shopee-orange);
  font-weight: 700;
}

/* Tab Panels */
.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* Grid & Cards */
.panel-card {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow);
}

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

.card-title {
  font-size: 1.15rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Forms */
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-group.full-width {
  grid-column: 1 / -1;
}

label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
}

input, select, textarea {
  background-color: var(--bg-primary);
  border: 1px solid var(--border);
  color: var(--text-main);
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s;
}

input:focus, select:focus, textarea:focus {
  border-color: var(--shopee-orange);
  box-shadow: 0 0 0 2px rgba(238, 77, 45, 0.2);
}

.input-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
  text-decoration: none;
}

.btn-primary {
  background-color: var(--shopee-orange);
  color: #fff;
}
.btn-primary:hover {
  background-color: var(--shopee-orange-hover);
}

.btn-whatsapp {
  background-color: var(--wa-green);
  color: #0b2e16;
}
.btn-whatsapp:hover {
  background-color: #20bd5a;
}

.btn-secondary {
  background-color: var(--bg-tertiary);
  color: var(--text-main);
}
.btn-secondary:hover {
  background-color: #475569;
}

.btn-danger {
  background-color: var(--danger);
  color: #fff;
}
.btn-danger:hover {
  background-color: #dc2626;
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-main);
}
.btn-outline:hover {
  background-color: rgba(255, 255, 255, 0.05);
}

.btn-sm {
  padding: 0.35rem 0.75rem;
  font-size: 0.8rem;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* WhatsApp Phone Mockup */
.phone-mockup {
  max-width: 440px;
  margin: 0 auto;
  background-color: #111b21;
  border-radius: 28px;
  border: 4px solid #2a3942;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 640px;
}

.phone-header {
  background-color: #202c33;
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border-bottom: 1px solid #2a3942;
}

.group-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #00a884;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
}

.group-info h4 {
  font-size: 0.95rem;
  font-weight: 600;
  color: #e9edef;
}
.group-info span {
  font-size: 0.75rem;
  color: #8696a0;
}

.phone-chat {
  flex: 1;
  padding: 1rem;
  overflow-y: auto;
  background: #0b141a url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="60" height="60" opacity="0.03"><path fill="%23fff" d="M30 0l30 30-30 30L0 30z"/></svg>');
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.chat-bubble {
  align-self: flex-start;
  background-color: #202c33;
  color: #e9edef;
  border-radius: 8px 8px 8px 2px;
  padding: 0.5rem;
  max-width: 90%;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  font-size: 0.85rem;
  position: relative;
}

.chat-bubble.out {
  align-self: flex-end;
  background-color: #005c4b;
  border-radius: 8px 8px 2px 8px;
}

.chat-media {
  width: 100%;
  max-height: 200px;
  object-fit: cover;
  border-radius: 6px;
  margin-bottom: 0.5rem;
}

.chat-text {
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.4;
}

.chat-time {
  font-size: 0.65rem;
  color: #8696a0;
  text-align: right;
  margin-top: 0.25rem;
}

/* History Table */
.table-responsive {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

th, td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

th {
  background-color: var(--bg-primary);
  color: var(--text-muted);
  font-weight: 600;
}

tr:hover {
  background-color: rgba(255, 255, 255, 0.02);
}

.prod-cell {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  max-width: 320px;
}

.prod-thumb {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  background-color: var(--bg-tertiary);
  flex-shrink: 0;
}

.badge {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
}

.badge-success { background: rgba(16, 185, 129, 0.2); color: var(--success); }
.badge-warning { background: rgba(245, 158, 11, 0.2); color: var(--warning); }
.badge-danger { background: rgba(239, 68, 68, 0.2); color: var(--danger); }
.badge-orange { background: rgba(238, 77, 45, 0.2); color: var(--shopee-orange); }

/* Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(5, 10, 20, 0.82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 1.25rem;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.modal {
  background-color: var(--bg-secondary);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  max-width: 620px;
  width: 100%;
  padding: 1.5rem;
  box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.7);
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  transform: scale(0.96);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-overlay.active .modal {
  transform: scale(1);
}

.modal.modal-lg {
  max-width: 820px;
}

.modal.modal-sm {
  max-width: 440px;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.modal-header h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.modal-close {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid transparent;
  color: var(--text-muted);
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  cursor: pointer;
  transition: all 0.15s ease;
  line-height: 1;
}

.modal-close:hover {
  background: rgba(239, 68, 68, 0.15);
  color: var(--danger);
  border-color: rgba(239, 68, 68, 0.3);
}

.modal-body {
  overflow-y: auto;
  flex: 1;
  padding: 0.5rem 0.25rem;
  overscroll-behavior: contain;
}

.modal-footer {
  margin-top: 1.25rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  flex-shrink: 0;
}

/* Toast */
.toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.toast {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent-blue);
  color: var(--text-main);
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  min-width: 250px;
  font-size: 0.85rem;
  animation: slideIn 0.3s forwards;
}

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

@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

@media (max-width: 768px) {
  .header { padding: 1rem; }
  .container { padding: 1rem; }
  .stats-grid {
    grid-template-columns: 1fr;
    max-width: 440px;
    margin-left: auto;
    margin-right: auto;
    gap: 0.75rem;
  }
}

/* Template Editor & WhatsApp Toolbar */
.editor-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  background-color: var(--bg-tertiary);
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  border: 1px solid var(--border);
  border-bottom: none;
}

.toolbar-group {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin-right: 0.5rem;
}

.toolbar-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-right: 0.25rem;
  font-weight: 600;
}

.toolbar-btn {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  color: var(--text-main);
  padding: 0.25rem 0.55rem;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.15s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.toolbar-btn:hover {
  background-color: var(--border);
  color: #fff;
}

.toolbar-tag {
  background: rgba(238, 77, 45, 0.12);
  border-color: rgba(238, 77, 45, 0.3);
  color: var(--shopee-orange);
  font-family: monospace;
  font-size: 0.78rem;
  font-weight: 600;
}

.toolbar-tag:hover {
  background: var(--shopee-orange);
  color: #fff;
}

.template-textarea {
  border-radius: 0 0 var(--radius-sm) var(--radius-sm) !important;
  font-family: 'Consolas', 'Monaco', monospace !important;
  font-size: 0.9rem !important;
  line-height: 1.5 !important;
  min-height: 170px !important;
  resize: vertical !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.template-preview-box {
  background: #0b141a;
  border: 1px solid #2a3942;
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin-top: 1rem;
}

.preview-badge-header {
  font-size: 0.8rem;
  font-weight: 600;
  color: #00a884;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Multi-select de Categorias */
.category-select-wrapper {
  position: relative;
  width: 100%;
}

.category-dropdown-btn {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.85rem;
  color: var(--text-main);
  font-size: 0.9rem;
  cursor: pointer;
  text-align: left;
}

.category-dropdown-menu {
  display: none;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  max-height: 250px;
  overflow-y: auto;
  padding: 0.5rem;
  margin-top: 0.35rem;
  box-shadow: var(--shadow-lg);
  z-index: 50;
}

.category-dropdown-menu.show {
  display: block;
}

.category-checkbox-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.4rem 0.5rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.85rem;
  transition: background 0.15s;
}

.category-checkbox-item:hover {
  background-color: var(--bg-tertiary);
}

.category-checkbox-item input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--shopee-orange);
  cursor: pointer;
}

/* Validações */
.form-input.is-invalid, input.is-invalid {
  border-color: var(--danger) !important;
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.25) !important;
}

.validation-error-text {
  color: var(--danger);
  font-size: 0.78rem;
  font-weight: 500;
  margin-top: 0.25rem;
  display: block;
}

/* Histórico - Thumb Compacto para Dias Anteriores */
.prod-thumb-log {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: var(--bg-tertiary);
  border: 1px dashed var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  color: var(--text-muted);
  text-align: center;
  flex-shrink: 0;
  line-height: 1.1;
  padding: 2px;
}

/* Barra de Filtro do Histórico */
.history-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  background-color: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
  margin-bottom: 1.25rem;
}

.history-filter-chips {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.chip-filter {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 0.4rem 0.85rem;
  border-radius: 9999px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  user-select: none;
}

.chip-filter:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.25);
  background: var(--bg-tertiary);
  transform: translateY(-1px);
}

.chip-filter.active {
  background: rgba(238, 77, 45, 0.15);
  border-color: var(--shopee-orange);
  color: var(--shopee-orange);
  box-shadow: 0 0 12px rgba(238, 77, 45, 0.2);
}

.history-filter-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.history-filter-group input {
  padding: 0.45rem 0.75rem;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-size: 0.85rem;
  width: 100%;
}

.history-filter-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-left: auto;
}

.history-count-badge {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.35rem 0.75rem;
  border-radius: 9999px;
  white-space: nowrap;
}

/* Grupos Checklist */
.groups-checklist-box {
  background-color: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  max-height: 220px;
  overflow-y: auto;
  padding: 0.5rem;
  margin-top: 0.5rem;
}

.group-item-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.65rem;
  border-radius: var(--radius-sm);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  cursor: pointer;
  font-size: 0.85rem;
  transition: background 0.15s;
}

.group-item-row:hover {
  background-color: var(--bg-tertiary);
}

.group-item-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--wa-green);
  cursor: pointer;
}

/* ==========================================
   TELA DE LOGIN MODERNA & SEGURA
   ========================================== */
#login-view {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 50% 20%, #1e293b 0%, #0b0f19 100%);
  padding: 1.5rem;
  position: relative;
  z-index: 10;
}

.login-card {
  background: rgba(30, 41, 59, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-top: 3px solid var(--shopee-orange);
  border-radius: var(--radius-lg);
  max-width: 420px;
  width: 100%;
  padding: 2.25rem 2rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6);
  animation: fadeIn 0.3s ease-out;
}

.login-brand {
  text-align: center;
  margin-bottom: 2rem;
}

.login-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, var(--shopee-orange), #ff7337);
  border-radius: 14px;
  font-size: 1.75rem;
  margin-bottom: 0.75rem;
  box-shadow: 0 10px 20px -5px rgba(238, 77, 45, 0.4);
}

.login-brand h2 {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.02em;
}

.login-brand p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.password-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.password-input-wrapper input {
  padding-right: 2.75rem !important;
}

.password-toggle-btn {
  position: absolute;
  right: 0.5rem;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s;
}

.password-toggle-btn:hover {
  color: var(--text-main);
}

.alert-banner {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fca5a5;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  margin-bottom: 1.25rem;
  display: none;
  line-height: 1.4;
  animation: shake 0.3s;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

/* ==========================================
   USER BADGE & LOGOUT NO HEADER
   ========================================== */
.user-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.85rem;
  border-radius: 9999px;
  font-size: 0.85rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  color: var(--text-main);
}

.user-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* ==========================================
   GRUPOS DE AUTOMAÇÃO & CAMPANHAS (GRID & CARDS)
   ========================================== */
.groups-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.groups-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.25rem;
  margin-top: 1rem;
}

.group-card {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  position: relative;
}

.group-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px -10px rgba(0, 0, 0, 0.4);
}

.group-card.active-group {
  border-left: 4px solid var(--success);
}

.group-card.paused-group {
  border-left: 4px solid var(--warning);
  opacity: 0.85;
}

.group-card.running-pulse {
  border-color: var(--accent-blue) !important;
  border-left: 4px solid var(--accent-blue) !important;
  box-shadow: 0 0 20px rgba(59, 130, 246, 0.45) !important;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), var(--bg-surface)) !important;
  animation: pulseBlue 1.4s infinite alternate !important;
}

@keyframes pulseBlue {
  from {
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.3);
    border-color: rgba(59, 130, 246, 0.6) !important;
    border-left-color: rgba(59, 130, 246, 0.6) !important;
  }
  to {
    box-shadow: 0 0 25px rgba(59, 130, 246, 0.7);
    border-color: #3b82f6 !important;
    border-left-color: #3b82f6 !important;
  }
}

.group-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.group-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.25;
}

.group-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
  line-height: 1.35;
}

.group-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.25rem 0.65rem;
  border-radius: 9999px;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.badge-active {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-paused {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-running {
  background: rgba(59, 130, 246, 0.25) !important;
  color: #60a5fa !important;
  border: 1px solid rgba(59, 130, 246, 0.6) !important;
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.4) !important;
  font-weight: 700 !important;
}

.group-tags-area {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 1rem;
}

.group-tag {
  background: rgba(238, 77, 45, 0.12);
  color: var(--shopee-orange);
  border: 1px solid rgba(238, 77, 45, 0.25);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 600;
}

.group-tag.muted {
  background: var(--bg-tertiary);
  color: var(--text-muted);
  border-color: var(--border);
}

.group-meta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.75rem;
  margin-bottom: 0.85rem;
}

.group-meta-item {
  display: flex;
  flex-direction: column;
}

.meta-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-weight: 600;
}

.meta-val {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-main);
  margin-top: 0.15rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.group-actions-bar {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
  margin-top: auto;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.btn-icon-danger {
  color: var(--danger) !important;
  border-color: rgba(239, 68, 68, 0.3) !important;
}

.btn-icon-danger:hover {
  background: rgba(239, 68, 68, 0.15) !important;
}

.pill-checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.45rem;
  max-height: 180px;
  overflow-y: auto;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.5rem;
}

.pill-checkbox-item {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  padding: 0.35rem 0.6rem;
  border-radius: 4px;
  font-size: 0.8rem;
  cursor: pointer;
  user-select: none;
  transition: all 0.15s;
}

.pill-checkbox-item:hover {
  border-color: var(--shopee-orange);
}

.pill-checkbox-item input {
  accent-color: var(--shopee-orange);
}

.empty-state-card {
  text-align: center;
  padding: 3rem 1.5rem;
  background: var(--bg-secondary);
  border: 1px dashed var(--border);
  border-radius: var(--radius-lg);
}

/* Card de opções da limpeza manual de histórico */
.clear-option-card {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.75rem 0.85rem;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.clear-option-card:hover {
  border-color: rgba(238, 77, 45, 0.4);
  background: rgba(255, 255, 255, 0.02);
}

.clear-option-card.selected {
  border-color: var(--shopee-orange);
  background: rgba(238, 77, 45, 0.07);
}

.clear-option-card.danger:hover {
  border-color: rgba(239, 68, 68, 0.5);
  background: rgba(239, 68, 68, 0.04);
}

.clear-option-card.danger.selected {
  border-color: var(--danger);
  background: rgba(239, 68, 68, 0.1);
}

.clear-option-card input[type="radio"] {
  margin-top: 0.2rem;
  accent-color: var(--shopee-orange);
  cursor: pointer;
}

.clear-option-card.danger input[type="radio"] {
  accent-color: var(--danger);
}

.modal-confirm-banner {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.25);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1rem;
  margin-bottom: 1rem;
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}

/* Anti-flicker e estabilidade de renderização GPU */
.panel-card,
.group-card,
.stat-card,
.groups-grid {
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
}

/* Modelos (Templates) - Visualização de Texto e Responsividade */
.template-content-preview {
  font-family: monospace;
  font-size: 0.82rem;
  background: var(--bg-primary);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  width: 100%;
  max-width: 480px;
  min-width: 0;
  box-sizing: border-box;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: anywhere;
  line-height: 1.4;
}

.whatsapp-preview-box {
  background: #0b141a url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="60" height="60" opacity="0.03"><path fill="%23fff" d="M30 0l30 30-30 30L0 30z"/></svg>');
  padding: 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  max-width: 100%;
  overflow-x: hidden;
  box-sizing: border-box;
}

.whatsapp-preview-box .chat-bubble {
  max-width: 100%;
  box-sizing: border-box;
}

.whatsapp-preview-box .chat-text {
  word-break: break-word;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
  font-size: 0.88rem;
  line-height: 1.45;
}

.history-header-controls {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  align-items: center;
}

.history-auto-delete-box {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.25rem 0.6rem;
}

.history-auto-delete-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  white-space: nowrap;
}

.history-auto-delete-select {
  width: auto;
  padding: 0.3rem 0.65rem;
  font-size: 0.82rem;
}

.history-header-btn-group {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

/* ==========================================
   PAINEL FINANCEIRO: CARDS DE MÉTRICAS (4 PC -> 2 2 Tablet -> 1 1 1 1 Mobile)
   ========================================== */
.financial-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.85rem;
  margin-top: 1rem;
  margin-bottom: 1.5rem;
}

.financial-stats-grid .stat-card {
  padding: 0.9rem 0.75rem;
  gap: 0.65rem;
  min-width: 0;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.financial-stats-grid .stat-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.18);
}

.financial-stats-grid .stat-icon {
  width: 40px;
  height: 40px;
  font-size: 1.2rem;
  flex-shrink: 0;
  border-radius: var(--radius-sm);
}

.financial-stats-grid .stat-info {
  min-width: 0;
  overflow: hidden;
}

.financial-stats-grid .stat-info h3 {
  font-size: 1.2rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}

.financial-stats-grid .stat-info p {
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 0.15rem;
}

/* Telas Médias / Tablets: agrupa 2x2 (2 em cima, 2 embaixo) */
@media (max-width: 1024px) {
  .financial-stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }
}

/* Telas Pequenas / Mobile: agrupa 1x1x1x1 (um abaixo do outro) */
@media (max-width: 600px) {
  .financial-stats-grid {
    grid-template-columns: 1fr;
    gap: 0.65rem;
  }
}

/* ==========================================
   RESPONSIVIDADE MOBILE & PC (ATENÇÃO AOS MODAIS)
   ========================================== */
@media (max-width: 768px) {
  .header {
    padding: 0.85rem 1rem;
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }

  .header-actions {
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .status-pill, .user-pill {
    font-size: 0.75rem;
    padding: 0.25rem 0.6rem;
  }

  .tabs-nav {
    overflow-x: auto;
    flex-wrap: nowrap;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0.25rem;
    scrollbar-width: none;
  }

  .tabs-nav::-webkit-scrollbar {
    display: none;
  }

  .tab-btn {
    flex: 0 0 auto;
    min-width: max-content;
    padding: 0.55rem 0.85rem;
    font-size: 0.82rem;
    flex-shrink: 0;
  }

  .container {
    padding: 0.75rem;
  }

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

  .stats-grid {
    grid-template-columns: 1fr;
    max-width: 440px;
    margin-left: auto;
    margin-right: auto;
    gap: 0.75rem;
  }

  /* Modais no Mobile: Transformação em Bottom-Sheet / Dialog adaptado */
  .modal-overlay {
    padding: 0;
    align-items: flex-end;
  }

  .modal {
    max-width: 100% !important;
    border-radius: 20px 20px 0 0 !important;
    max-height: 88vh !important;
    padding: 1.25rem 1rem !important;
    transform: translateY(20px);
  }

  .modal-overlay.active .modal {
    transform: translateY(0);
  }

  .modal-header h3 {
    font-size: 1.05rem;
  }

  .modal-footer {
    flex-direction: column-reverse;
    gap: 0.5rem;
  }

  .modal-footer button {
    width: 100%;
    min-height: 44px;
  }

  .form-row {
    flex-direction: column;
    gap: 0.75rem;
  }

  .form-control, input, select, textarea {
    font-size: 16px !important; /* Previne auto-zoom no Safari iOS */
    min-height: 42px;
  }

  .history-filter-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }

  .history-filter-chips {
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 0.25rem;
    -webkit-overflow-scrolling: touch;
  }

  .history-filter-group {
    min-width: 100%;
  }

  .history-filter-actions {
    justify-content: space-between;
    width: 100%;
    margin-left: 0;
  }

  .group-actions-bar button {
    flex: 1 1 auto;
    min-height: 38px;
    justify-content: center;
  }

  * {
    -webkit-tap-highlight-color: transparent;
  }

  /* Responsividade para Auto-limpeza do Histórico no Mobile */
  .history-header-controls {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0.6rem;
    margin-top: 0.5rem;
  }

  .history-auto-delete-box {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0.35rem;
    padding: 0.65rem 0.75rem;
    box-sizing: border-box;
  }

  .history-auto-delete-box .history-auto-delete-label {
    font-size: 0.82rem;
  }

  .history-auto-delete-box .history-auto-delete-select {
    width: 100% !important;
    min-height: 42px;
    font-size: 16px !important; /* Previne auto-zoom no Safari iOS */
    box-sizing: border-box;
  }

  .history-header-btn-group {
    width: 100%;
    display: flex;
    gap: 0.5rem;
  }

  .history-header-btn-group .btn {
    flex: 1 1 0;
    justify-content: center;
    min-height: 42px;
    text-align: center;
  }

  /* Responsividade para Tabela de Modelos no Mobile */
  .templates-responsive-table,
  .templates-responsive-table thead,
  .templates-responsive-table tbody,
  .templates-responsive-table tr,
  .templates-responsive-table td {
    display: block;
    width: 100%;
    box-sizing: border-box;
  }

  .templates-responsive-table thead {
    display: none;
  }

  .templates-responsive-table tr {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 0.85rem;
    margin-bottom: 0.85rem;
  }

  .templates-responsive-table td {
    padding: 0.3rem 0;
    border: none;
  }

  .templates-responsive-table td.tpl-col-id {
    display: none;
  }

  .templates-responsive-table td.tpl-col-name {
    margin-bottom: 0.4rem;
  }

  .templates-responsive-table td.tpl-col-text {
    width: 100%;
    margin: 0.35rem 0;
  }

  .templates-responsive-table .template-content-preview {
    max-width: 100%;
    font-size: 0.8rem;
    padding: 0.65rem;
    border-color: rgba(255, 255, 255, 0.08);
  }

  .templates-responsive-table td.tpl-col-status {
    margin-bottom: 0.4rem;
  }

  .templates-responsive-table td.tpl-col-actions > div {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
    margin-top: 0.35rem;
  }

  .templates-responsive-table td.tpl-col-actions .btn {
    flex: 1 1 auto;
    min-height: 38px;
    justify-content: center;
  }
}

/* ==========================================
   TAB: BUSCA & GARIMPO DE OFERTAS SHOPEE
   ========================================== */
.deals-search-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.15rem;
  margin-top: 1rem;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
}

.deal-search-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
}

.deal-card-media {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  background: var(--bg-primary);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  contain: paint;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
}

.deal-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
}

@media (hover: hover) and (pointer: fine) {
  .deal-search-card {
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  }
  .deal-search-card:hover {
    transform: translateY(-3px);
    border-color: rgba(238, 77, 45, 0.6);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
  }
  .deal-card-media img {
    transition: transform 0.3s ease;
  }
  .deal-search-card:hover .deal-card-media img {
    transform: scale(1.04);
  }
}

.deal-badge-discount {
  position: absolute;
  top: 8px;
  right: 8px;
  background: linear-gradient(135deg, #ef4444, #ee4d2d);
  color: #ffffff;
  font-weight: 800;
  font-size: 0.78rem;
  padding: 0.25rem 0.55rem;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  z-index: 2;
  letter-spacing: -0.01em;
}

.deal-badge-flash {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(15, 23, 42, 0.95);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.4);
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.2rem 0.45rem;
  border-radius: 4px;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.deal-card-body {
  padding: 0.95rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.deal-card-category {
  display: inline-block;
  font-size: 0.72rem;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  padding: 0.15rem 0.45rem;
  margin-bottom: 0.45rem;
  align-self: flex-start;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.deal-card-title {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.4em;
  margin-bottom: 0.4rem;
}

.deal-card-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.74rem;
  color: var(--text-muted);
  margin-bottom: 0.6rem;
}

.deal-card-rating {
  color: #f59e0b;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.15rem;
}

.deal-card-pricing {
  margin-top: 0.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.deal-card-orig-price {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-decoration: line-through;
}

.deal-card-promo-price {
  font-size: 1.25rem;
  font-weight: 800;
  color: #22c55e;
  line-height: 1.15;
}

.deal-card-savings {
  font-size: 0.72rem;
  color: #10b981;
  font-weight: 600;
}

.deal-card-coupon {
  margin-top: 0.5rem;
  background: rgba(59, 130, 246, 0.08);
  border: 1px dashed rgba(59, 130, 246, 0.35);
  border-radius: 4px;
  padding: 0.3rem 0.5rem;
  font-size: 0.74rem;
  color: #93c5fd;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.deal-card-commission {
  margin-top: 0.5rem;
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: 4px;
  padding: 0.35rem 0.55rem;
  font-size: 0.75rem;
  color: #fcd34d;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.deal-card-footer {
  margin-top: auto;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.deal-card-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem;
}

.deal-btn-link {
  background: linear-gradient(135deg, var(--shopee-orange), #ff6b3d);
  color: #ffffff !important;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  border: none;
  cursor: pointer;
  transition: opacity 0.15s ease;
}

.deal-btn-link:hover {
  opacity: 0.92;
}

.deal-btn-action {
  background: var(--bg-tertiary);
  color: var(--text-main);
  border: 1px solid var(--border);
  font-size: 0.74rem;
  padding: 0.4rem 0.5rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  transition: background 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
}

.deal-btn-action:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

/* Responsividade da Grid de Ofertas */
@media (max-width: 1200px) {
  .deals-search-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
  }
}

@media (max-width: 900px) {
  .deals-search-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.85rem;
  }
}

@media (max-width: 600px) {
  .deals-search-grid {
    grid-template-columns: 1fr;
    gap: 0.85rem;
  }
}



