/* VoiceSaaS design system: "Aurora Wave"
   Deep indigo surfaces, a violet -> cyan voice gradient, soft glass cards, and an animated waveform motif. */

:root {
  --vs-bg: #f4f5fb;
  --vs-surface: #ffffff;
  --vs-ink: #14163a;
  --vs-muted: #6b6f93;
  --vs-line: #e6e8f4;
  --vs-night: #0d0f2b;
  --vs-night-2: #171a45;
  --vs-violet: #6d5dfc;
  --vs-cyan: #19d3f3;
  --vs-pink: #ff5fa2;
  --vs-green: #12b886;
  --vs-grad: linear-gradient(135deg, #6d5dfc 0%, #19d3f3 100%);
  --vs-grad-warm: linear-gradient(135deg, #ff5fa2 0%, #6d5dfc 100%);
  --vs-radius: 18px;
  --vs-shadow: 0 10px 30px -12px rgba(30, 30, 90, .25);
}

html { font-size: 15px; }
@media (min-width: 768px) { html { font-size: 16px; } }

body {
  background: var(--vs-bg);
  color: var(--vs-ink);
  font-family: Inter, "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  margin: 0;
}

a { color: var(--vs-violet); text-decoration: none; }
a:hover { color: #4d3de0; }

h1, h2, h3, h4, h5 { letter-spacing: -.02em; font-weight: 700; }
h2 { font-size: 1.65rem; }

/* ---------- App shell ---------- */
.shell { display: flex; min-height: 100vh; }

.sidebar {
  width: 264px;
  flex: 0 0 264px;
  background:
    radial-gradient(420px 260px at -10% -10%, rgba(109, 93, 252, .55), transparent 70%),
    radial-gradient(360px 260px at 110% 110%, rgba(25, 211, 243, .35), transparent 70%),
    var(--vs-night);
  color: #cfd2f5;
  display: flex;
  flex-direction: column;
  padding: 22px 16px;
  position: sticky;
  top: 0;
  height: 100vh;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: -.02em;
  padding: 4px 10px 22px;
}
.brand:hover { color: #fff; }
.brand-mark {
  width: 38px; height: 38px;
  border-radius: 12px;
  background: var(--vs-grad);
  display: grid; place-items: center;
  box-shadow: 0 8px 20px -6px rgba(109, 93, 252, .8);
}
.brand-mark svg { width: 22px; height: 22px; }

.side-label {
  font-size: .68rem;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: #7f84b8;
  padding: 14px 12px 6px;
}

.side-nav { display: flex; flex-direction: column; gap: 2px; overflow-y: auto; }
.side-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  color: #c3c7f0;
  font-weight: 500;
  transition: background .15s, color .15s, transform .15s;
}
.side-link svg { width: 20px; height: 20px; flex: 0 0 20px; opacity: .85; }
.side-link:hover { background: rgba(255, 255, 255, .07); color: #fff; transform: translateX(2px); }
.side-link.active {
  background: linear-gradient(90deg, rgba(109, 93, 252, .55), rgba(25, 211, 243, .18));
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08);
}
.side-link.active svg { opacity: 1; }

.side-user {
  margin-top: auto;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 14px;
  padding: 12px;
}
.avatar {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--vs-grad-warm);
  color: #fff;
  font-weight: 700;
  display: grid; place-items: center;
  flex: 0 0 38px;
}
.side-user .who { min-width: 0; }
.side-user .who strong { display: block; color: #fff; font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-user .who span { font-size: .75rem; color: #9da2d6; }
.side-user .actions { display: flex; gap: 8px; margin-top: 10px; }
.side-user .actions .btn { flex: 1; font-size: .8rem; padding: .35rem .5rem; }

.content { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  display: none;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--vs-night);
  color: #fff;
  position: sticky; top: 0; z-index: 20;
}
.topbar .brand { padding: 0; font-size: 1.05rem; }
.menu-btn { background: rgba(255, 255, 255, .1); border: 0; color: #fff; border-radius: 10px; width: 40px; height: 40px; }

.page { padding: 32px clamp(16px, 3vw, 44px) 56px; max-width: 1240px; width: 100%; }

@media (max-width: 991.98px) {
  .topbar { display: flex; }
  .sidebar {
    position: fixed; left: 0; top: 0; z-index: 30;
    transform: translateX(-100%);
    transition: transform .25s ease;
    box-shadow: 0 0 60px rgba(0, 0, 0, .4);
  }
  body.nav-open .sidebar { transform: none; }
  body.nav-open::after {
    content: ""; position: fixed; inset: 0; background: rgba(8, 9, 30, .5); z-index: 25;
  }
}

/* ---------- Surfaces ---------- */
.card {
  border: 1px solid var(--vs-line);
  border-radius: var(--vs-radius);
  background: var(--vs-surface);
  box-shadow: var(--vs-shadow);
}

.table {
  --bs-table-bg: transparent;
  background: var(--vs-surface);
  border-radius: var(--vs-radius);
  overflow: hidden;
  box-shadow: var(--vs-shadow);
  border: 1px solid var(--vs-line);
  margin-bottom: 1.5rem;
}
.table > :not(caption) > * > * { padding: .85rem 1rem; border-color: var(--vs-line); }
.table thead th {
  background: #f0f1fb;
  color: var(--vs-muted);
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-weight: 700;
  border-bottom: 1px solid var(--vs-line);
}
.table tbody tr { transition: background .12s; }
.table tbody tr:hover { background: #f8f8ff; }
.table-sm > :not(caption) > * > * { padding: .6rem .9rem; }

.btn { border-radius: 12px; font-weight: 600; padding: .55rem 1.1rem; transition: transform .12s, box-shadow .15s, background .15s; }
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--vs-grad);
  border: 0;
  color: #fff;
  box-shadow: 0 10px 22px -10px rgba(109, 93, 252, .9);
}
.btn-primary:hover, .btn-primary:focus { background: var(--vs-grad); color: #fff; filter: brightness(1.06); box-shadow: 0 14px 26px -10px rgba(109, 93, 252, 1); }
.btn-outline-primary { color: var(--vs-violet); border-color: #cfc9ff; background: #fff; }
.btn-outline-primary:hover { background: var(--vs-violet); border-color: var(--vs-violet); }
.btn-outline-secondary { color: var(--vs-ink); border-color: var(--vs-line); background: #fff; }
.btn-outline-secondary:hover { background: #eef0fb; color: var(--vs-ink); border-color: #d6d9ef; }
.btn-outline-danger { background: #fff; }
.btn-sm { border-radius: 10px; padding: .3rem .7rem; }
.btn-link { color: var(--vs-muted); font-weight: 500; }

.form-label { font-weight: 600; font-size: .85rem; color: var(--vs-ink); margin-bottom: .35rem; }
.form-control, .form-select {
  border-radius: 12px;
  border: 1px solid #d9dcf0;
  padding: .65rem .9rem;
  background-color: #fff;
}
.form-control:focus, .form-select:focus, .btn:focus, .btn:active:focus, .form-check-input:focus {
  border-color: var(--vs-violet);
  box-shadow: 0 0 0 .22rem rgba(109, 93, 252, .2);
}
.form-check-input:checked { background-color: var(--vs-violet); border-color: var(--vs-violet); }
.form-text { color: var(--vs-muted); }

.alert { border: 0; border-radius: 14px; box-shadow: var(--vs-shadow); }
.alert-success { background: #e3f9f1; color: #0b6b4f; }
.alert-danger { background: #ffe8ef; color: #a1163f; }

/* ---------- Page header ---------- */
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 1.4rem; }
.page-head h2 { margin: 0; }
.eyebrow { text-transform: uppercase; font-size: .72rem; letter-spacing: .14em; color: var(--vs-violet); font-weight: 700; }

/* ---------- Dashboard ---------- */
.hero-card {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  padding: 28px 30px;
  color: #fff;
  background:
    radial-gradient(500px 260px at 90% -20%, rgba(25, 211, 243, .55), transparent 70%),
    radial-gradient(420px 260px at 0% 120%, rgba(255, 95, 162, .45), transparent 70%),
    linear-gradient(135deg, #1b1d57, #0d0f2b);
  box-shadow: 0 24px 50px -24px rgba(30, 20, 120, .7);
}
.hero-card h2 { color: #fff; margin: 4px 0 6px; font-size: 1.9rem; }
.hero-card p { color: #c9ccf3; margin: 0; }
.hero-card .wave { position: absolute; right: 24px; bottom: 18px; opacity: .9; }

.stat {
  display: flex; align-items: center; gap: 16px;
  padding: 20px;
  height: 100%;
}
.stat .chip {
  width: 52px; height: 52px; border-radius: 16px;
  display: grid; place-items: center; color: #fff; flex: 0 0 52px;
}
.stat .chip svg { width: 26px; height: 26px; }
.chip-violet { background: var(--vs-grad); }
.chip-pink { background: var(--vs-grad-warm); }
.chip-green { background: linear-gradient(135deg, #12b886, #19d3f3); }
.stat .label { color: var(--vs-muted); font-size: .8rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.stat .value { font-size: 1.7rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.15; }

.pill { display: inline-block; padding: .15rem .6rem; border-radius: 999px; font-size: .72rem; font-weight: 700; background: #eceaff; color: #4d3de0; }
.pill-in { background: #e3f9f1; color: #0b6b4f; }
.pill-out { background: #ffe8ef; color: #a1163f; }

/* ---------- Waveform motif ---------- */
.wave { display: inline-flex; align-items: center; gap: 4px; height: 56px; }
.wave span {
  display: block;
  width: 5px;
  border-radius: 6px;
  background: var(--vs-grad);
  height: 18%;
  animation: vs-wave 1.15s ease-in-out infinite;
  animation-delay: calc(var(--i) * -0.08s);
}
@keyframes vs-wave {
  0%, 100% { height: 14%; opacity: .55; }
  50% { height: 100%; opacity: 1; }
}
@media (prefers-reduced-motion: reduce) { .wave span { animation: none; height: 55%; } }

/* ---------- Public pages: landing + auth ---------- */
.public-nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px clamp(16px, 5vw, 64px);
}
.public-nav .brand { color: var(--vs-ink); padding: 0; }
.public-nav .brand:hover { color: var(--vs-ink); }

.landing {
  min-height: 100vh;
  background:
    radial-gradient(900px 500px at 85% -10%, rgba(109, 93, 252, .28), transparent 70%),
    radial-gradient(700px 500px at -10% 110%, rgba(25, 211, 243, .25), transparent 70%),
    var(--vs-bg);
}
.hero { text-align: center; padding: 72px 16px 40px; max-width: 880px; margin: 0 auto; }
.hero h1 { font-size: clamp(2.2rem, 6vw, 4rem); font-weight: 800; line-height: 1.05; margin: 14px 0 18px; }
.grad-text { background: var(--vs-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p.lead { color: var(--vs-muted); max-width: 620px; margin: 0 auto 28px; }
.hero .wave { height: 90px; margin-top: 36px; }
.hero .wave span { width: 7px; }

.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 18px; max-width: 1040px; margin: 24px auto 72px; padding: 0 16px; }
.feature { padding: 22px; }
.feature .chip { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; color: #fff; margin-bottom: 14px; }
.feature .chip svg { width: 24px; height: 24px; }
.feature h5 { margin-bottom: 6px; }
.feature p { color: var(--vs-muted); margin: 0; font-size: .93rem; }

.auth-split { display: grid; grid-template-columns: 1.05fr 1fr; min-height: 100vh; }
.auth-art {
  position: relative; overflow: hidden;
  background:
    radial-gradient(600px 400px at 100% 0%, rgba(25, 211, 243, .5), transparent 70%),
    radial-gradient(600px 460px at 0% 100%, rgba(255, 95, 162, .5), transparent 70%),
    linear-gradient(145deg, #1d1f5e, #0d0f2b);
  color: #fff;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 44px clamp(24px, 4vw, 64px);
}
.auth-art .brand { padding: 0; }
.auth-art h1 { font-size: clamp(2rem, 3.6vw, 3.1rem); font-weight: 800; line-height: 1.08; }
.auth-art p { color: #cfd2f7; max-width: 440px; }
.auth-art .wave { height: 120px; }
.auth-art .wave span { width: 8px; background: linear-gradient(180deg, #fff, #19d3f3); }
.auth-form { display: grid; place-items: center; padding: 32px clamp(16px, 4vw, 56px); background: var(--vs-surface); }
.auth-box { width: 100%; max-width: 400px; }
.auth-box h2 { font-size: 2rem; margin-bottom: 6px; }
.auth-box .sub { color: var(--vs-muted); margin-bottom: 26px; }

@media (max-width: 860px) {
  .auth-split { grid-template-columns: 1fr; }
  .auth-art { min-height: 240px; padding-bottom: 28px; }
  .auth-art h1 { font-size: 1.7rem; }
  .auth-art p, .auth-art .wave { display: none; }
}

.public-page { max-width: 760px; margin: 0 auto; padding: 24px 16px 64px; }
footer.site-foot { text-align: center; color: var(--vs-muted); font-size: .85rem; padding: 20px; }

/* ---------- Setup checklist ---------- */
.setup-checks li {
  position: relative;
  padding: 10px 0 10px 38px;
  border-bottom: 1px solid var(--vs-line);
}
.setup-checks li:last-child { border-bottom: 0; }
.setup-checks li::before {
  content: "";
  position: absolute; left: 0; top: 12px;
  width: 24px; height: 24px; border-radius: 50%;
  background: #ffe8ef;
  box-shadow: inset 0 0 0 2px #ff5fa2;
}
.setup-checks li.ok::before { background: #e3f9f1; box-shadow: inset 0 0 0 2px #12b886; }
.setup-checks li.ok::after {
  content: ""; position: absolute; left: 8px; top: 17px; width: 8px; height: 4px;
  border-left: 2px solid #12b886; border-bottom: 2px solid #12b886; transform: rotate(-45deg);
}
.setup-checks strong { display: block; }
.setup-checks span { color: var(--vs-muted); font-size: .88rem; }
