/* ═══════════════════════════════════════════════
   Luxotic Dashboard — Global Styles
   Black background, white text, #D4AF37 gold accent
   ═══════════════════════════════════════════════ */

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

:root {
  --bg:        #000000;
  --bg-card:   #0d0d0d;
  --bg-hover:  #1a1a1a;
  --bg-input:  #111111;
  --border:    #222222;
  --border-focus: #D4AF37;
  --text:      #ffffff;
  --text-dim:  #999999;
  --text-muted:#666666;
  --gold:      #D4AF37;
  --gold-dim:  #b8962e;
  --gold-glow: rgba(212, 175, 55, 0.15);
  --danger:    #e74c3c;
  --success:   #27ae60;
  --info:      #3498db;
  --radius:    8px;
  --radius-lg: 12px;
  --shadow:    0 2px 12px rgba(0,0,0,0.5);
  --transition: 0.2s ease;
  --sidebar-w: 260px;
  --topbar-h:  64px;
  --font:      'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

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

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
}

a {
  color: var(--gold);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

img {
  max-width: 100%;
  display: block;
}

/* ── Typography ────────────────────────────── */
h1, h2, h3, h4 {
  font-weight: 600;
  letter-spacing: -0.01em;
}

/* ── Inputs ────────────────────────────────── */
.input,
.select {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 0.9375rem;
  font-family: var(--font);
  transition: border-color var(--transition);
}
.input:focus,
.select:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-glow);
}
.input::placeholder {
  color: var(--text-muted);
}
.select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%23999' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

/* ── Buttons ───────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border: none;
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}
.btn-primary {
  background: var(--gold);
  color: #000;
}
.btn-primary:hover {
  background: var(--gold-dim);
}
.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-outline:hover {
  border-color: var(--gold);
  color: var(--gold);
}
.btn-danger {
  background: var(--danger);
  color: #fff;
}
.btn-danger:hover {
  opacity: 0.85;
}
.btn-sm {
  padding: 6px 14px;
  font-size: 0.8125rem;
}
.btn-full {
  width: 100%;
}
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ── Cards ─────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
}
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.card-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}

/* ── Tables ────────────────────────────────── */
.table-wrap {
  overflow-x: auto;
}
.data-table {
  width: 100%;
  border-collapse: collapse;
}
.data-table th,
.data-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  font-size: 0.875rem;
}
.data-table th {
  color: var(--text-dim);
  font-weight: 500;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
}
.data-table tbody tr:hover {
  background: var(--bg-hover);
}

/* ── Modal ─────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 16px;
}
.modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  width: 100%;
  max-width: 480px;
}
.modal-title {
  font-size: 1.125rem;
  margin-bottom: 12px;
}
.modal-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 20px;
}

/* ── Utility ───────────────────────────────── */
.hidden { display: none !important; }
.error-msg {
  color: var(--danger);
  font-size: 0.875rem;
  margin-top: 8px;
}
.placeholder-text {
  color: var(--text-muted);
  text-align: center;
  padding: 24px 0;
}
.form-hint {
  display: block;
  color: var(--text-muted);
  font-size: 0.75rem;
  margin-top: 4px;
}

/* Logo */
.logo-img {
  max-height: 60px;
  width: auto;
  margin: 0 auto 8px;
}
.sidebar-logo {
  max-height: 40px;
  width: auto;
}

/* Spinner */
.spinner {
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Status dot */
.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-muted);
  margin-right: 6px;
  vertical-align: middle;
}
.status-dot.connected { background: var(--success); }
.status-dot.error     { background: var(--danger); }

/* Badge */
.badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 500;
}
.badge-new        { background: rgba(52,152,219,0.15); color: var(--info); }
.badge-contacted  { background: rgba(212,175,55,0.15); color: var(--gold); }
.badge-follow-up  { background: rgba(230,126,34,0.15); color: #e67e22; }
.badge-closed     { background: rgba(39,174,96,0.15);  color: var(--success); }
.badge-active     { background: rgba(39,174,96,0.15);  color: var(--success); }
.badge-archived   { background: rgba(153,153,153,0.15);color: var(--text-dim); }

/* Pill filters */
.status-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.pill {
  padding: 6px 16px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-dim);
  font-family: var(--font);
  font-size: 0.8125rem;
  cursor: pointer;
  transition: all var(--transition);
}
.pill:hover {
  border-color: var(--gold);
  color: var(--text);
}
.pill.active {
  background: var(--gold);
  color: #000;
  border-color: var(--gold);
}

/* Thumbnail in table */
.thumb {
  width: 56px;
  height: 40px;
  object-fit: cover;
  border-radius: 4px;
  background: var(--bg-hover);
}

/* Action buttons in table */
.actions-cell {
  display: flex;
  gap: 6px;
}
.icon-btn {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-dim);
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition);
}
.icon-btn:hover {
  border-color: var(--gold);
  color: var(--gold);
}
.icon-btn.danger:hover {
  border-color: var(--danger);
  color: var(--danger);
}

/* Form group */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.form-group label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-dim);
}

/* ── Progress Bar ─────────────────────────── */
.progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  z-index: 9999;
  pointer-events: none;
  display: none;
}
.progress-bar.active {
  display: block;
}
.progress-bar-fill {
  height: 100%;
  background: var(--gold);
  width: 0%;
  transition: opacity 0.3s;
  box-shadow: 0 0 8px rgba(212, 175, 55, 0.5);
}

/* ── Featured badge ──────────────────────── */
.badge-gold {
  background: rgba(212, 175, 55, 0.15);
  color: var(--gold);
}

/* Responsive breakpoints */
@media (max-width: 768px) {
  .data-table th,
  .data-table td {
    padding: 10px 10px;
    font-size: 0.8125rem;
  }
}
