/* ============================================================
   WooCommerce Price Monitor — Glassmorphism Design System
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  --bg-primary:     #0a0f1e;
  --bg-secondary:   #0f172a;
  --glass-bg:       rgba(255, 255, 255, 0.05);
  --glass-border:   rgba(255, 255, 255, 0.1);
  --accent:         #38bdf8;
  --accent-hover:   #0ea5e9;
  --success:        #4ade80;
  --danger:         #f87171;
  --warning:        #facc15;
  --text-primary:   #f1f5f9;
  --text-secondary: #94a3b8;
}

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

html, body {
  min-height: 100%;
  background: var(--bg-primary);
  background-image:
    radial-gradient(ellipse at 20% 50%, rgba(56, 189, 248, 0.08) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 20%, rgba(99,  102, 241, 0.08) 0%, transparent 60%);
  background-attachment: fixed;
  font-family: 'Inter', sans-serif;
  color: var(--text-primary);
  font-size: 14px;
  line-height: 1.5;
}

/* --- Navigation --- */
.nav {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 16px 40px;
  background: rgba(0,0,0,0.3);
  border-bottom: 1px solid var(--glass-border);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 100;
}
.nav-brand { font-size: 1.1rem; font-weight: 700; color: var(--accent); }
.nav a {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: 8px;
  transition: background 0.2s, color 0.2s;
}
.nav a:hover, .nav a.active {
  background: rgba(56, 189, 248, 0.1);
  color: var(--accent);
}

/* --- Main Layout --- */
main { padding: 40px; max-width: 1400px; margin: 0 auto; }

/* --- Glass Panels --- */
.glass-panel {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  backdrop-filter: blur(12px);
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
  text-decoration: none;
}
.btn-primary {
  background: linear-gradient(135deg, var(--accent), #6366f1);
  color: white;
}
.btn-primary:hover  { opacity: 0.9; transform: translateY(-1px); box-shadow: 0 4px 16px rgba(56,189,248,0.3); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.btn-outline {
  background: transparent;
  border: 1px solid var(--glass-border);
  color: var(--text-secondary);
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }
.btn-danger  { background: rgba(248, 113, 113, 0.1); border: 1px solid rgba(248,113,113,0.3); color: var(--danger); }
.btn-sm { padding: 4px 12px; font-size: 0.78rem; }

/* --- Forms --- */
.form-input {
  padding: 8px 14px;
  background: rgba(0,0,0,0.2);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 0.9rem;
  font-family: 'Inter', sans-serif;
  transition: border-color 0.2s;
}
.form-input:focus { outline: none; border-color: var(--accent); }
.form-input option { background: #1e293b; }

/* --- Progress Bar --- */
.progress-wrap { margin-bottom: 16px; }
.progress-label { display: flex; justify-content: space-between; font-size: 0.82rem; color: var(--text-secondary); margin-bottom: 6px; }
.progress-track { width: 100%; height: 8px; background: rgba(255,255,255,0.08); border-radius: 4px; overflow: hidden; }
.progress-fill  { height: 100%; background: linear-gradient(90deg, var(--accent), #6366f1); border-radius: 4px; transition: width 0.3s ease; }

/* --- Log Console --- */
.log-console {
  background: rgba(0,0,0,0.4);
  border-radius: 10px;
  padding: 12px;
  max-height: 220px;
  overflow-y: auto;
  font-family: 'Courier New', monospace;
  font-size: 0.8rem;
}
.log-line { display: flex; gap: 10px; margin-bottom: 5px; }
.log-ts   { color: rgba(255,255,255,0.3); white-space: nowrap; }
.log-info    { color: var(--text-secondary); }
.log-success { color: var(--success); }
.log-error   { color: var(--danger); }
.log-warn    { color: var(--warning); }

/* --- Table --- */
.table-wrap { overflow-x: auto; border-radius: 12px; }
table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
thead th {
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--glass-border);
  white-space: nowrap;
}
tbody td { padding: 12px 16px; border-bottom: 1px solid rgba(255,255,255,0.04); vertical-align: middle; }
tbody tr:hover { background: rgba(255,255,255,0.03); cursor: pointer; }
tbody tr:last-child td { border-bottom: none; }

/* --- Badges --- */
.badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}
.badge-blue    { background: rgba(56,189,248,0.15); color: var(--accent); }
.badge-green   { background: rgba(74,222,128,0.15); color: var(--success); }
.badge-neutral { background: rgba(255,255,255,0.08); color: var(--text-secondary); }

/* --- Bulk Action Bar --- */
.bulk-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 14px 20px;
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 10px;
  margin-bottom: 20px;
}
.bulk-bar .count { font-weight: 600; color: var(--accent); }

/* --- Modal --- */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(4px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal {
  background: #131e35;
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 32px;
  max-width: 700px;
  width: 95%;
  max-height: 85vh;
  overflow-y: auto;
}
.modal h2 { font-size: 1.2rem; margin-bottom: 4px; }
.modal-sub { color: var(--text-secondary); font-size: 0.85rem; margin-bottom: 24px; }

/* --- Misc --- */
.header-row { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 32px; flex-wrap: wrap; gap: 16px; }
.filters-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-bottom: 20px; }
.filters-row .spacer { flex: 1; }
h1 { font-size: 1.9rem; font-weight: 700; margin-bottom: 6px; }
.sub { color: var(--text-secondary); }
.text-right { text-align: right; }
.text-secondary { color: var(--text-secondary); }
.mt-2  { margin-top: 8px; }
.mt-4  { margin-top: 16px; }
.mt-8  { margin-top: 32px; }
.p-5   { padding: 20px; }
.mb-8  { margin-bottom: 32px; }
.gap-2 { gap: 8px; }
.flex  { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.font-mono { font-family: monospace; }
.text-success { color: var(--success); }
.text-danger  { color: var(--danger); }
