/* Car Auction Indexes - Dashboard Styles */
:root {
  --bg-primary: #0f172a;
  --bg-secondary: #1e293b;
  --bg-card: #1e293b;
  --bg-input: #334155;
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --accent: #3b82f6;
  --accent-hover: #2563eb;
  --success: #22c55e;
  --warning: #f59e0b;
  --danger: #ef4444;
  --border: #334155;
  --border-light: #475569;
}

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

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

header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1.5rem;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}

.header-brand { display: flex; align-items: center; gap: 0.5rem; }
.header-brand h1 { font-size: 1.1rem; font-weight: 600; }

nav { display: flex; gap: 0.25rem; }

.nav-btn {
  padding: 0.4rem 0.75rem;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  border-radius: 0.375rem;
  cursor: pointer;
  font-size: 0.8rem;
  transition: all 0.15s;
}
.nav-btn:hover { background: var(--bg-input); color: var(--text-primary); }
.nav-btn.active { background: var(--accent); color: white; }

.nav-sep { width: 1px; background: var(--border); margin: 0 0.25rem; }

.help-btn {
  margin-left: auto;
  padding: 0.25rem 0.5rem;
  background: var(--bg-input);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  border-radius: 0.25rem;
  cursor: pointer;
  font-size: 0.75rem;
}

.user-menu { display: flex; align-items: center; gap: 0.5rem; }
.user-menu-btn { background: none; border: none; color: var(--text-secondary); cursor: pointer; }
.user-menu-panel { position: absolute; right: 1rem; top: 3.5rem; background: var(--bg-card); border: 1px solid var(--border); border-radius: 0.5rem; padding: 0.75rem; display: flex; gap: 0.5rem; align-items: center; z-index: 100; }

#notification-bell { position: relative; cursor: pointer; font-size: 1.2rem; }
#notification-count {
  position: absolute; top: -4px; right: -4px;
  background: var(--danger); color: white;
  font-size: 0.6rem; padding: 0.1rem 0.3rem;
  border-radius: 9999px; min-width: 1rem; text-align: center;
}

.hidden { display: none !important; }

main { padding: 1.5rem; max-width: 1400px; margin: 0 auto; }

.tab { display: none; }
.tab.active { display: block; }

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  padding: 1.25rem;
  margin-bottom: 1rem;
}

.btn {
  padding: 0.5rem 1rem;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 0.375rem;
  cursor: pointer;
  font-size: 0.85rem;
  transition: background 0.15s;
}
.btn:hover { background: var(--accent-hover); }
.btn-secondary { background: var(--bg-input); }
.btn-secondary:hover { background: var(--border-light); }
.btn-sm { padding: 0.25rem 0.5rem; font-size: 0.75rem; }

.tab-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.tab-header h2 { font-size: 1.25rem; font-weight: 600; }

.filters { display: flex; gap: 0.5rem; align-items: center; }
.filters select, .filters input {
  padding: 0.4rem 0.6rem;
  background: var(--bg-input);
  border: 1px solid var(--border);
  color: var(--text-primary);
  border-radius: 0.375rem;
  font-size: 0.8rem;
}

input[type="text"], input[type="password"], input[type="number"], select {
  padding: 0.5rem 0.75rem;
  background: var(--bg-input);
  border: 1px solid var(--border);
  color: var(--text-primary);
  border-radius: 0.375rem;
  font-size: 0.85rem;
  width: 100%;
}

.search-form { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 0.75rem; margin-bottom: 1rem; }

.vehicle-card {
  display: grid;
  grid-template-columns: 120px 1fr auto;
  gap: 1rem;
  padding: 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  margin-bottom: 0.75rem;
  transition: border-color 0.15s;
}
.vehicle-card:hover { border-color: var(--border-light); }
.vehicle-card img {
  width: 120px; height: 80px; object-fit: cover; border-radius: 0.375rem;
  background: var(--bg-input);
}
.vehicle-info h3 { font-size: 0.95rem; margin-bottom: 0.25rem; }
.vehicle-meta { color: var(--text-muted); font-size: 0.8rem; }
.vehicle-price { font-size: 1.1rem; font-weight: 600; color: var(--accent); }
.vehicle-actions { display: flex; flex-direction: column; gap: 0.5rem; align-items: flex-end; justify-content: center; }

.watch-btn {
  padding: 0.35rem 0.75rem;
  background: transparent;
  border: 1px solid var(--accent);
  color: var(--accent);
  border-radius: 0.25rem;
  cursor: pointer;
  font-size: 0.75rem;
  transition: all 0.15s;
}
.watch-btn:hover { background: var(--accent); color: white; }
.watch-btn.watching { background: var(--accent); color: white; }

.watchlist-item {
  display: grid;
  grid-template-columns: 60px 1fr auto auto;
  gap: 1rem;
  padding: 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  margin-bottom: 0.5rem;
  align-items: center;
}
.watchlist-item img { width: 60px; height: 40px; object-fit: cover; border-radius: 0.25rem; }
.phase-badge {
  padding: 0.15rem 0.5rem;
  border-radius: 9999px;
  font-size: 0.7rem;
  text-transform: capitalize;
}
.phase-live_auction { background: #3b82f622; color: #3b82f6; }
.phase-listed_direct_sale { background: #22c55e22; color: #22c55e; }
.phase-post_auction_sold { background: #a855f722; color: #a855f7; }
.phase-post_auction_unsold { background: #64748b22; color: #64748b; }

.timeline { margin-top: 1rem; }
.timeline-item { padding: 0.5rem 0 0.5rem 1.5rem; border-left: 2px solid var(--border); position: relative; }
.timeline-item::before {
  content: ''; position: absolute; left: -5px; top: 0.75rem;
  width: 8px; height: 8px; border-radius: 50%; background: var(--accent);
}
.timeline-time { color: var(--text-muted); font-size: 0.75rem; }
.timeline-phase { font-size: 0.85rem; font-weight: 500; }

.status-indicator { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 0.5rem; }
.status-online { background: var(--success); }
.status-offline { background: var(--danger); }

.empty-state { text-align: center; padding: 3rem; color: var(--text-muted); }
.empty-state p { margin-bottom: 1rem; }

.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.5);
  display: flex; align-items: center; justify-content: center; z-index: 200;
}
.modal {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 0.75rem; padding: 1.5rem; max-width: 500px; width: 90%;
}
.modal h3 { margin-bottom: 1rem; }

@media (max-width: 768px) {
  header { flex-direction: column; align-items: flex-start; }
  nav { flex-wrap: wrap; }
  .vehicle-card { grid-template-columns: 1fr; }
  .search-form { grid-template-columns: 1fr; }
}
