/* ============================================================
   ezebay — styles.css
   Single source of truth for all theming and components.
   Use CSS variables everywhere. Never hardcode colours or fonts.
   ============================================================ */

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

/* --- Theme Variables --- */
:root {
  --bg-primary: #f5f6f8;
  --bg-secondary: #ffffff;
  --bg-card: #ffffff;
  --bg-nav: #ffffff;
  --text-primary: #111827;
  --text-secondary: #6b7280;
  --text-muted: #9ca3af;
  --accent: #0064d2;
  --accent-hover: #004fa8;
  --accent-light: #e8f1fd;
  --border: #e5e7eb;
  --border-strong: #d1d5db;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08), 0 2px 4px rgba(0, 0, 0, 0.04);
  --success: #10b981;
  --warning: #f59e0b;
  --error: #ef4444;
  --radius: 10px;
  --radius-sm: 6px;
  --radius-lg: 16px;
}

[data-theme="dark"] {
  --bg-primary: #0d0d14;
  --bg-secondary: #13131e;
  --bg-card: #1a1a28;
  --bg-nav: #13131e;
  --text-primary: #f0f0f8;
  --text-secondary: #9090b0;
  --text-muted: #5a5a78;
  --accent: #4d9de0;
  --accent-hover: #6db4f8;
  --accent-light: #1a2a40;
  --border: #252535;
  --border-strong: #303048;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3), 0 1px 2px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4), 0 2px 4px rgba(0, 0, 0, 0.2);
  --success: #34d399;
  --warning: #fbbf24;
  --error: #f87171;
}

/* --- Reset & Base --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  transition: background-color 0.2s ease, color 0.2s ease;
}

/* --- Navigation --- */
.nav {
  background-color: var(--bg-nav);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--accent);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.nav-brand span {
  color: var(--text-primary);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* --- Theme Toggle --- */
.theme-toggle {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: 50px;
  width: 44px;
  height: 26px;
  cursor: pointer;
  position: relative;
  transition: background-color 0.2s ease;
  display: flex;
  align-items: center;
  padding: 0 3px;
}

.theme-toggle-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background-color: var(--accent);
  transition: transform 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
}

[data-theme="dark"] .theme-toggle-thumb {
  transform: translateX(18px);
}

/* --- Main Container --- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

/* --- Cards --- */
.card {
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 1.5rem;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.card:hover {
  box-shadow: var(--shadow-md);
}

.card-clickable {
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  display: block;
}

.card-clickable:hover {
  border-color: var(--accent);
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: all 0.15s ease;
  text-decoration: none;
  line-height: 1;
}

.btn-primary {
  background-color: var(--accent);
  color: #ffffff;
}

.btn-primary:hover {
  background-color: var(--accent-hover);
}

.btn-secondary {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid transparent;
}

.btn-ghost:hover {
  background-color: var(--bg-primary);
  color: var(--text-primary);
}

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

/* --- Badges --- */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.65rem;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 500;
}

.badge-blue {
  background-color: var(--accent-light);
  color: var(--accent);
}

.badge-muted {
  background-color: var(--bg-primary);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

/* --- Typography --- */
h1 { font-size: 2rem; font-weight: 700; letter-spacing: -0.03em; line-height: 1.2; }
h2 { font-size: 1.5rem; font-weight: 600; letter-spacing: -0.02em; }
h3 { font-size: 1.15rem; font-weight: 600; }
h4 { font-size: 1rem; font-weight: 600; }

.text-muted { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.text-accent { color: var(--accent); }

/* --- Flash Messages --- */
.flash {
  padding: 0.875rem 1.25rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
  font-size: 0.9rem;
  border: 1px solid transparent;
}

.flash-error {
  background-color: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.3);
  color: var(--error);
}

.flash-success {
  background-color: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.3);
  color: var(--success);
}

/* --- Divider --- */
.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 1.5rem 0;
}

/* --- Form Elements --- */
.form-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-primary);
}

.form-input {
  width: 100%;
  padding: 0.6rem 0.875rem;
  background-color: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.9rem;
  font-family: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  outline: none;
}

.form-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0, 100, 210, 0.1);
}

.form-input::placeholder {
  color: var(--text-muted);
}

select.form-input {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.875rem center;
  padding-right: 2.25rem;
}

textarea.form-input {
  min-height: 120px;
}

/* --- Upload Zone --- */
.upload-zone {
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 2rem 1rem;
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease;
  background-color: var(--bg-primary);
}

.upload-zone:hover,
.upload-zone-active {
  border-color: var(--accent);
  background-color: var(--accent-light);
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .container { padding: 1rem; }
  h1 { font-size: 1.5rem; }
}
