/* ─── Variables ──────────────────────────────────────────────────────────────── */
:root {
  --bg: #0D1117;
  --surface: #161B22;
  --surface2: #1C2128;
  --border: #30363D;
  --border-light: #21262D;
  --text: #E6EDF3;
  --text-muted: #8B949E;
  --text-dim: #6E7681;
  --green: #00E676;
  --green-dim: #1A3A2A;
  --blue: #58A6FF;
  --blue-dim: #1A2A4A;
  --red: #FF5555;
  --red-dim: #3A1A1A;
  --yellow: #FFD700;
  --yellow-dim: #3A3000;
  --purple: #BB86FC;
  --sidebar-w: 240px;
  --radius: 8px;
  --radius-sm: 4px;
  --shadow: 0 2px 8px rgba(0,0,0,0.4);
}

/* ─── Reset ──────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
  overflow: hidden;
}
a { text-decoration: none; color: inherit; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, select, textarea { font-family: inherit; }
.hidden { display: none !important; }

/* ─── Login Screen ───────────────────────────────────────────────────────────── */
.login-screen {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  z-index: 1000;
}
.login-box {
  width: 360px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 40px 32px;
  box-shadow: var(--shadow);
}
.login-logo {
  text-align: center;
  margin-bottom: 32px;
}
.login-logo i {
  font-size: 48px;
  color: var(--green);
  display: block;
  margin-bottom: 12px;
}
.login-logo h1 { font-size: 22px; font-weight: 700; margin-bottom: 4px; }
.login-logo p { color: var(--text-muted); font-size: 13px; }
.login-form .form-group { margin-bottom: 16px; }
.login-form label { display: block; font-size: 13px; font-weight: 500; margin-bottom: 6px; color: var(--text-muted); }
.login-error {
  background: var(--red-dim);
  border: 1px solid var(--red);
  color: var(--red);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: 13px;
  margin-bottom: 12px;
  text-align: center;
}

/* ─── App Shell ──────────────────────────────────────────────────────────────── */
.app-shell {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* ─── Sidebar ────────────────────────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  min-width: var(--sidebar-w);
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  height: 100vh;
  position: fixed;
  left: 0; top: 0;
  z-index: 100;
}
.sidebar-header {
  padding: 20px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
}
.sidebar-logo-icon { font-size: 24px; color: var(--green); }
.sidebar-title { font-weight: 700; font-size: 15px; white-space: nowrap; }
.sidebar-nav {
  flex: 1;
  padding: 12px 8px;
  overflow-y: auto;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
  transition: all 0.15s;
  margin-bottom: 2px;
}
.nav-item:hover { background: var(--surface2); color: var(--text); }
.nav-item.active { background: var(--green-dim); color: var(--green); }
.nav-item i { font-size: 18px; flex-shrink: 0; }
.sidebar-footer {
  padding: 16px;
  border-top: 1px solid var(--border);
}
.wa-status {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 500;
  margin-bottom: 10px;
}
.wa-status i { font-size: 18px; }
.wa-status.connected { background: var(--green-dim); color: var(--green); }
.wa-status.disconnected { background: var(--red-dim); color: var(--red); }
.wa-status.connecting { background: var(--yellow-dim); color: var(--yellow); }
.btn-logout {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 13px;
  transition: all 0.15s;
}
.btn-logout:hover { background: var(--red-dim); color: var(--red); }
.btn-logout i { font-size: 16px; }

/* ─── Main Content ───────────────────────────────────────────────────────────── */
.main-content {
  margin-left: var(--sidebar-w);
  flex: 1;
  height: 100vh;
  overflow-y: auto;
  background: var(--bg);
}
#page-container {
  padding: 24px;
  max-width: 1400px;
}

/* ─── Page Header ────────────────────────────────────────────────────────────── */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}
.page-title {
  font-size: 22px;
  font-weight: 700;
}
.page-subtitle {
  color: var(--text-muted);
  font-size: 13px;
  margin-top: 2px;
}
.page-actions { display: flex; gap: 8px; align-items: center; }

/* ─── Cards ──────────────────────────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}
.card-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 12px;
}
.card-value {
  font-size: 32px;
  font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
}
.card-value.green { color: var(--green); }
.card-value.blue { color: var(--blue); }
.card-value.red { color: var(--red); }
.card-value.yellow { color: var(--yellow); }
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}
.stat-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.stat-label i { font-size: 14px; }
.stat-value {
  font-size: 28px;
  font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
}

/* ─── Grid Layouts ───────────────────────────────────────────────────────────── */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

/* ─── Two Column Layout ──────────────────────────────────────────────────────── */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  height: calc(100vh - 160px);
}
.col-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.col-panel-header {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}
.col-panel-header h3 { font-size: 14px; font-weight: 600; }
.col-panel-body {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
}
.col-panel-footer {
  padding: 12px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

/* ─── Buttons ────────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  transition: all 0.15s;
  white-space: nowrap;
}
.btn i { font-size: 16px; }
.btn-primary { background: var(--green); color: #000; }
.btn-primary:hover { background: #00c864; }
.btn-secondary { background: var(--surface2); color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { border-color: var(--text-muted); }
.btn-danger { background: var(--red-dim); color: var(--red); border: 1px solid var(--red); }
.btn-danger:hover { background: var(--red); color: #fff; }
.btn-blue { background: var(--blue-dim); color: var(--blue); border: 1px solid var(--blue); }
.btn-blue:hover { background: var(--blue); color: #fff; }
.btn-sm { padding: 5px 10px; font-size: 12px; }
.btn-full { width: 100%; justify-content: center; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  transition: all 0.15s;
  color: var(--text-muted);
}
.btn-icon:hover { background: var(--surface2); color: var(--text); }
.btn-icon.danger:hover { background: var(--red-dim); color: var(--red); }
.btn-icon i { font-size: 16px; }

/* ─── Forms ──────────────────────────────────────────────────────────────────── */
.form-group { margin-bottom: 14px; }
.form-group label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.form-input {
  width: 100%;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: 8px 12px;
  font-size: 13px;
  transition: border-color 0.15s;
  outline: none;
}
.form-input:focus { border-color: var(--blue); }
.form-input::placeholder { color: var(--text-dim); }
select.form-input { cursor: pointer; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
.search-input {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: 7px 10px;
  font-size: 13px;
  outline: none;
  width: 100%;
}
.search-input:focus { border-color: var(--blue); }

/* ─── Tables ─────────────────────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
th {
  background: var(--surface2);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--border-light);
  vertical-align: middle;
}
tr:hover td { background: var(--surface2); }
tr:last-child td { border-bottom: none; }
.td-mono { font-family: 'JetBrains Mono', monospace; font-size: 11px; }

/* ─── Badges ─────────────────────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
}
.badge-green { background: var(--green-dim); color: var(--green); }
.badge-red { background: var(--red-dim); color: var(--red); }
.badge-blue { background: var(--blue-dim); color: var(--blue); }
.badge-yellow { background: var(--yellow-dim); color: var(--yellow); }
.badge-gray { background: var(--surface2); color: var(--text-muted); }
.badge-purple { background: #2A1A3A; color: var(--purple); }

/* ─── Toggle ─────────────────────────────────────────────────────────────────── */
.toggle {
  display: inline-block;
  width: 36px;
  height: 20px;
  background: var(--border);
  border-radius: 10px;
  position: relative;
  cursor: pointer;
  transition: background 0.2s;
  flex-shrink: 0;
}
.toggle::after {
  content: '';
  position: absolute;
  width: 14px;
  height: 14px;
  background: #fff;
  border-radius: 50%;
  top: 3px;
  left: 3px;
  transition: transform 0.2s;
}
.toggle.on { background: var(--green); }
.toggle.on::after { transform: translateX(16px); }

/* ─── Group Item ─────────────────────────────────────────────────────────────── */
.group-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  margin-bottom: 4px;
  transition: all 0.15s;
  gap: 8px;
}
.group-item:hover { background: var(--surface2); border-color: var(--border-light); }
.group-item-info { flex: 1; min-width: 0; }
.group-item-name {
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.group-item-sub {
  font-size: 11px;
  color: var(--text-muted);
  font-family: 'JetBrains Mono', monospace;
}
.group-item-actions { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }

/* ─── Activity Feed ──────────────────────────────────────────────────────────── */
.activity-feed { display: flex; flex-direction: column; gap: 0; }
.activity-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-light);
}
.activity-item:last-child { border-bottom: none; }
.activity-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 14px;
}
.activity-icon.green { background: var(--green-dim); color: var(--green); }
.activity-icon.blue { background: var(--blue-dim); color: var(--blue); }
.activity-icon.red { background: var(--red-dim); color: var(--red); }
.activity-icon.yellow { background: var(--yellow-dim); color: var(--yellow); }
.activity-text { flex: 1; font-size: 12px; }
.activity-time { font-size: 11px; color: var(--text-dim); white-space: nowrap; }

/* ─── Chart Container ────────────────────────────────────────────────────────── */
.chart-container {
  position: relative;
  height: 220px;
}

/* ─── QR Code ────────────────────────────────────────────────────────────────── */
.qr-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 20px;
}
.qr-container img {
  width: 200px;
  height: 200px;
  border: 4px solid #fff;
  border-radius: var(--radius);
}

/* ─── Toast ──────────────────────────────────────────────────────────────────── */
#toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-end;
}
.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 500;
  min-width: 260px;
  max-width: 400px;
  box-shadow: var(--shadow);
  animation: slideIn 0.2s ease;
  border: 1px solid var(--border);
}
.toast i { font-size: 18px; flex-shrink: 0; }
.toast-success { background: var(--green-dim); color: var(--green); border-color: var(--green); }
.toast-error { background: var(--red-dim); color: var(--red); border-color: var(--red); }
.toast-info { background: var(--blue-dim); color: var(--blue); border-color: var(--blue); }
@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* ─── Modal ──────────────────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(2px);
}
.modal-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  width: 90%;
  max-width: 480px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 8px 32px rgba(0,0,0,0.6);
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.modal-header h3 { font-size: 15px; font-weight: 600; }
.modal-close {
  color: var(--text-muted);
  font-size: 18px;
  padding: 4px;
  border-radius: var(--radius-sm);
  transition: all 0.15s;
}
.modal-close:hover { background: var(--surface2); color: var(--text); }
.modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}
.modal-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-shrink: 0;
}

/* ─── Filters Bar ────────────────────────────────────────────────────────────── */
.filters-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.filter-group { display: flex; align-items: center; gap: 6px; }
.filter-label { font-size: 12px; color: var(--text-muted); white-space: nowrap; }

/* ─── Sections ───────────────────────────────────────────────────────────────── */
.section-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.section-title i { font-size: 18px; }

/* ─── Collapsible ────────────────────────────────────────────────────────────── */
.collapsible-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  user-select: none;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  transition: background 0.15s;
}
.collapsible-header:hover { background: var(--surface2); }
.collapsible-body { display: none; padding: 16px; }
.collapsible-body.open { display: block; }

/* ─── Loading Spinner ────────────────────────────────────────────────────────── */
.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid var(--border);
  border-top-color: var(--green);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

.loading-state {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 40px;
  color: var(--text-muted);
  font-size: 13px;
}

/* ─── Empty State ────────────────────────────────────────────────────────────── */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 40px 20px;
  color: var(--text-muted);
  text-align: center;
}
.empty-state i { font-size: 40px; opacity: 0.5; }
.empty-state p { font-size: 14px; }
.empty-state small { font-size: 12px; opacity: 0.7; }

/* ─── Settings Section ───────────────────────────────────────────────────────── */
.settings-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 16px;
  overflow: hidden;
}
.settings-section-header {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
}
.settings-section-header i { font-size: 18px; color: var(--blue); }
.settings-section-body { padding: 20px; }

/* ─── Counter Chips ──────────────────────────────────────────────────────────── */
.counters-bar {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.counter-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

/* ─── Pagination ─────────────────────────────────────────────────────────────── */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px;
}
.pagination .btn-sm { min-width: 32px; justify-content: center; }

/* ─── Platform Icons ─────────────────────────────────────────────────────────── */
.platform-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 600;
}
.platform-shopee { background: #ff5722; color: #fff; }
.platform-amazon { background: #FF9900; color: #000; }
.platform-mercadolivre { background: #FFE600; color: #333333; }
.platform-magalu { background: #0086FF; color: #fff; }
.platform-hotmart { background: #ff2c55; color: #fff; }
.platform-kiwify { background: #6c47ff; color: #fff; }
.platform-unknown { background: var(--surface2); color: var(--text-muted); }

/* ─── Scrollbar ──────────────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-dim); }

/* ─── Tabs ───────────────────────────────────────────────────────────────────── */
.tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
}
.tab-btn {
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: all 0.15s;
}
.tab-btn:hover { color: var(--text); }
.tab-btn.active { color: var(--green); border-bottom-color: var(--green); }

/* ─── n8n Workflow Status ────────────────────────────────────────────────────── */
.workflow-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
}
.workflow-name { font-size: 13px; font-weight: 500; }
.workflow-desc { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

/* ─── Affiliate Cards ────────────────────────────────────────────────────────── */
.affiliate-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}
.config-card {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}
.config-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  font-size: 14px;
  font-weight: 600;
}
.platform-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  flex-shrink: 0;
}
.shopee-icon { background: #ff5722; color: #fff; }
.magalu-icon { background: #0086FF; color: #fff; }
.amazon-icon { background: #FF9900; color: #000; }
.ml-icon { background: #FFE600; color: #333; font-size: 10px; }
.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-top: 1px solid var(--border-light);
}
.alert-info {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 12px;
  background: var(--blue-dim);
  border: 1px solid var(--blue);
  border-radius: var(--radius-sm);
  color: var(--blue);
  font-size: 12px;
  line-height: 1.4;
}
.alert-info i { font-size: 16px; flex-shrink: 0; margin-top: 1px; }
.badge-soon {
  margin-left: auto;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 600;
  background: var(--yellow-dim);
  color: var(--yellow);
}
.btn-shopee { background: #ff5722; color: #fff; }
.btn-shopee:hover { background: #e64a19; }
.btn-magalu { background: #0086FF; color: #fff; }
.btn-magalu:hover { background: #0066cc; }
.btn-amazon { background: #FF9900; color: #000; }
.btn-amazon:hover { background: #e68a00; }
.btn-ml { background: #FFE600; color: #111; }
.btn-ml:hover { background: #d4bf00; }

.ml-status {
  padding: .55rem .85rem;
  border-radius: 6px;
  font-size: .84rem;
  margin-top: .75rem;
}
.ml-status.loading { background: var(--surface2); color: var(--text-muted); }
.ml-status.success { background: var(--green-dim); color: #3FB950; border: 1px solid #238636; }
.ml-status.error   { background: var(--red-dim);   color: #F85149; border: 1px solid #8B1A1A; }
.ml-status.warning { background: #2A2200;          color: #E3B341; border: 1px solid #5A4800; }
.ml-status         { white-space: pre-line; }

/* ─── Responsive ─────────────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .two-col { grid-template-columns: 1fr; height: auto; }
  .grid-2 { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .affiliate-grid { grid-template-columns: 1fr; }
}
