:root {
  --black: #0a0a0a;
  --black-2: #141414;
  --black-3: #1c1c1c;
  --border: #1e2e24;
  --gold: #39ff88;
  --gold-soft: #b6ffce;
  --text: #ededed;
  --text-dim: #a3a3a3;
  --danger: #e05a5a;
  --success: #4caf6f;
  --radius: 10px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--black);
  color: var(--text);
  min-height: 100vh;
}

#matrix-rain {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}
.dashboard-rain { opacity: 0.14; }

.app {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100vh;
}

@media (max-width: 800px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: sticky; top: 0; z-index: 10; }
}

.sidebar {
  background: var(--black-2);
  border-right: 1px solid var(--border);
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.sidebar-footer { margin-top: auto; }
.sidebar-footer .btn { width: 100%; }

.business-name-display {
  font-size: 15px;
  font-weight: 620;
  color: var(--text-dim);
}

.brand {
  display: inline-block;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--gold);
  text-decoration: none;
  cursor: pointer;
}
.brand span { color: var(--text); font-weight: 400; }
.brand:focus { outline: none; }
.brand:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

.nav { display: flex; flex-direction: column; gap: 4px; }

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius);
  color: var(--text-dim);
  cursor: pointer;
  font-size: 14px;
  border: 1px solid transparent;
  background: none;
  text-align: left;
  transition: background 0.15s, color 0.15s;
}
.nav-item:hover { background: var(--black-3); color: var(--text); }
.nav-item.active {
  background: rgba(57, 255, 136, 0.1);
  border-color: rgba(57, 255, 136, 0.35);
  color: var(--gold-soft);
}

.main { padding: 28px 32px; max-width: 1100px; }

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.business-select {
  display: flex;
  align-items: center;
  gap: 10px;
}

select, input, textarea {
  background: var(--black-3);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: var(--radius);
  padding: 9px 12px;
  font-size: 14px;
  font-family: inherit;
}
select:focus, input:focus, textarea:focus {
  outline: none;
  border-color: var(--gold);
}

.btn {
  background: var(--gold);
  color: #04140a;
  border: none;
  border-radius: var(--radius);
  padding: 9px 16px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: filter 0.15s, transform 0.1s;
}
.btn:hover { filter: brightness(1.08); }
.btn:active { transform: scale(0.98); }
.btn.secondary {
  background: transparent;
  color: var(--gold-soft);
  border: 1px solid var(--border);
}
.btn.danger { background: var(--danger); color: #fff; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

h1 { font-size: 22px; font-weight: 600; margin: 0 0 4px; }
h2 { font-size: 16px; font-weight: 600; margin: 0 0 14px; color: var(--gold-soft); }
.subtitle { color: var(--text-dim); font-size: 14px; margin: 0 0 20px; }

.card {
  background: var(--black-2);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
  margin-bottom: 20px;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}
.stat {
  background: var(--black-2);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px;
}
.stat .value { font-size: 26px; font-weight: 700; color: var(--gold); }
.stat .label { color: var(--text-dim); font-size: 13px; margin-top: 4px; }

table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--border); }
th { color: var(--text-dim); font-weight: 500; font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; }

.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 600;
}
.badge.pending { background: rgba(57,255,136,0.15); color: var(--gold-soft); }
.badge.confirmed { background: rgba(76,175,111,0.15); color: var(--success); }
.badge.cancelled { background: rgba(224,90,90,0.15); color: var(--danger); }
.badge.completed { background: rgba(163,163,163,0.15); color: var(--text-dim); }
.badge.no_show { background: rgba(224,90,90,0.1); color: var(--danger); }
.badge.active { background: rgba(76,175,111,0.15); color: var(--success); }
.badge.deactivated { background: rgba(163,163,163,0.15); color: var(--text-dim); }
.badge.suspended { background: rgba(224,90,90,0.15); color: var(--danger); }

.empty-state {
  text-align: center;
  color: var(--text-dim);
  padding: 40px 20px;
  font-size: 14px;
}

.form-row { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.form-row label { font-size: 13px; color: var(--text-dim); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }

.tabs { display: flex; gap: 4px; margin-bottom: 20px; border-bottom: 1px solid var(--border); }
.tab {
  background: none; border: none; color: var(--text-dim);
  padding: 10px 14px; cursor: pointer; font-size: 14px;
  border-bottom: 2px solid transparent;
}
.tab.active { color: var(--gold-soft); border-bottom-color: var(--gold); }

.toast {
  position: fixed; bottom: 20px; right: 20px;
  background: var(--black-3); border: 1px solid var(--gold);
  color: var(--text); padding: 12px 18px; border-radius: var(--radius);
  font-size: 14px; opacity: 0; transform: translateY(10px);
  transition: opacity 0.2s, transform 0.2s; pointer-events: none;
  max-width: 320px;
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast.error { border-color: var(--danger); }

.row-actions { display: flex; gap: 8px; }
.hidden { display: none !important; }
.text-dim { color: var(--text-dim); }

/* ---------- Quick Guide (Overview onboarding) ---------- */

.guide { margin-top: 8px; }
.guide-head { margin-bottom: 26px; }
.guide-eyebrow {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold-soft);
  background: rgba(57, 255, 136, 0.1);
  border: 1px solid rgba(57, 255, 136, 0.25);
  padding: 5px 12px;
  border-radius: 100px;
  margin-bottom: 10px;
}
.guide-head h2 { font-size: 20px; margin: 0 0 6px; }
.guide-head p { margin: 0; font-size: 13.5px; }

.guide-stage { position: relative; }

.guide-rail {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 4px;
  margin: 0 6px 30px;
}
.guide-rail::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 50%;
  height: 2px;
  transform: translateY(-50%);
  background: var(--border);
  border-radius: 2px;
}
.guide-rail-fill {
  position: absolute;
  left: 0; top: 50%;
  height: 2px;
  width: 0%;
  transform: translateY(-50%);
  background: linear-gradient(90deg, var(--gold), var(--gold-soft));
  border-radius: 2px;
  box-shadow: 0 0 12px 1px rgba(57, 255, 136, 0.6);
  transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.guide-node {
  position: relative;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--black-3);
  border: 2px solid var(--border);
  transition: background 0.4s, border-color 0.4s, box-shadow 0.4s;
}
.guide-node.lit {
  background: var(--gold);
  border-color: var(--gold);
  box-shadow: 0 0 10px 2px rgba(57, 255, 136, 0.55);
}

.guide-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 14px;
}

.guide-card {
  position: relative;
  text-align: left;
  background: var(--black-2);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px 18px 16px;
  font-family: inherit;
  color: var(--text);
  cursor: pointer;
  opacity: 0.45;
  transform: translateY(14px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1),
    border-color 0.3s, box-shadow 0.3s;
}
.guide-card.lit { opacity: 1; transform: translateY(0); }
.guide-card:hover {
  border-color: rgba(57, 255, 136, 0.4);
  box-shadow: 0 20px 40px -20px rgba(0, 0, 0, 0.6), 0 0 30px -14px rgba(57, 255, 136, 0.35);
  transform: translateY(-3px);
}
.guide-card:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

.guide-num {
  position: absolute;
  top: 14px; right: 14px;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: rgba(57, 255, 136, 0.1);
  border: 1px solid rgba(57, 255, 136, 0.3);
  color: var(--gold-soft);
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.guide-icon { font-size: 22px; display: block; margin-bottom: 10px; }
.guide-card h3 { font-size: 14.5px; margin: 0 0 6px; font-weight: 620; }
.guide-card p { font-size: 12.5px; color: var(--text-dim); margin: 0; line-height: 1.5; }

@media (max-width: 640px) {
  .guide-grid { grid-template-columns: 1fr; }
  .guide-rail { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .guide-card { opacity: 1 !important; transform: none !important; transition: none !important; }
  .guide-rail-fill { transition: none !important; }
  .guide-node { transition: none !important; }
}
