/* CasaNova Wishlist — dark theme, clean & modern */

:root {
  --bg: #0f0f13;
  --surface: #1a1a24;
  --surface-2: #232330;
  --border: #2e2e3d;
  --text: #e8e8ed;
  --text-muted: #8b8b9e;
  --accent: #6c5ce7;
  --accent-hover: #7c6ff7;
  --green: #00b894;
  --green-bg: rgba(0, 184, 148, 0.12);
  --orange: #fdcb6e;
  --orange-bg: rgba(253, 203, 110, 0.12);
  --red: #e17055;
  --red-bg: rgba(225, 112, 85, 0.12);
  --blue: #74b9ff;
  --radius: 12px;
  --radius-sm: 8px;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

.container { max-width: 960px; margin: 0 auto; padding: 24px 16px; }

/* Header */
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
  flex-wrap: wrap;
  gap: 12px;
}

header h1 {
  font-size: 28px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent), var(--blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

header h1 span { font-weight: 400; font-size: 22px; }

header .subtitle {
  color: var(--text-muted);
  font-size: 14px;
}

/* Stats bar */
.stats-bar {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 18px;
  flex: 1;
  min-width: 100px;
}

.stat-card .stat-value {
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
}

.stat-card .stat-label {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-card.accent { border-color: var(--accent); }
.stat-card.green { border-color: var(--green); }
.stat-card.orange { border-color: var(--orange); }

/* Filters */
.filters {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.filters select, .filters input {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: 8px 14px;
  font-size: 14px;
  font-family: inherit;
}

.filters select:focus, .filters input:focus {
  outline: none;
  border-color: var(--accent);
}

.filters input { flex: 1; min-width: 160px; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: var(--radius-sm);
  border: none;
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.15s;
  text-decoration: none;
}

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

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

.btn-small { padding: 4px 10px; font-size: 12px; }

.btn-green { background: var(--green); color: white; }
.btn-green:hover { opacity: 0.85; }

.btn-red { background: var(--red); color: white; }
.btn-red:hover { opacity: 0.85; }

/* Item cards */
.items-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.item-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  transition: border-color 0.15s;
}

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

.item-card.bought {
  opacity: 0.75;
  border-color: var(--green);
}

.item-card.archived {
  opacity: 0.5;
  border-color: var(--text-muted);
}

.item-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.item-name {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 4px;
  word-break: break-word;
}

.item-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.item-meta .tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--surface-2);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
}

.tag.accent { background: rgba(108, 92, 231, 0.15); color: var(--accent); }
.tag.green { background: var(--green-bg); color: var(--green); }
.tag.orange { background: var(--orange-bg); color: #e1a700; }
.tag.red { background: var(--red-bg); color: var(--red); }
.tag.blue { background: rgba(116, 185, 255, 0.15); color: var(--blue); }

.item-notes {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 4px;
  line-height: 1.5;
}

.item-actions {
  display: flex;
  gap: 6px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.item-link {
  color: var(--accent);
  text-decoration: none;
  font-size: 13px;
}
.item-link:hover { text-decoration: underline; }

/* Priority dots */
.priority-dots {
  display: flex;
  gap: 2px;
  align-items: center;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--surface-2);
}

.dot.filled { background: var(--accent); }
.dot.filled.high { background: var(--red); }
.dot.filled.medium { background: var(--orange); }
.dot.filled.low { background: var(--green); }

/* Prices */
.price-info {
  display: flex;
  gap: 12px;
  font-size: 13px;
}

.price-estimated { color: var(--text-muted); }
.price-actual { color: var(--green); font-weight: 600; }

/* Modal */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
  z-index: 1000;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.modal-overlay.active { display: flex; }

.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
}

.modal h2 {
  font-size: 20px;
  margin-bottom: 20px;
}

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

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: 10px 14px;
  font-size: 14px;
  font-family: inherit;
}

.form-group textarea {
  resize: vertical;
  min-height: 70px;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.form-row {
  display: flex;
  gap: 12px;
}

.form-row .form-group { flex: 1; }

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

/* Empty state */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

.empty-state .icon {
  font-size: 48px;
  margin-bottom: 12px;
}

.empty-state h3 {
  font-size: 18px;
  color: var(--text);
  margin-bottom: 6px;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 20px;
  font-size: 14px;
  color: var(--text);
  z-index: 2000;
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}

.toast.show { opacity: 1; }

/* Responsive */
@media (max-width: 640px) {
  header { flex-direction: column; align-items: flex-start; }
  .stats-bar { gap: 8px; }
  .stat-card { min-width: calc(50% - 8px); }
  .modal { padding: 20px; }
  .form-row { flex-direction: column; gap: 0; }
}

/* Checkbox animation */
.status-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  user-select: none;
}

.status-checkbox {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
  font-size: 12px;
}

.status-checkbox.checked {
  background: var(--green);
  border-color: var(--green);
  color: white;
}
