:root {
  --mint: #d4eceb;
  --pale: #e7f4f4;
  --brand: #7ecad4;
  --brand-d: #4aa8b4;
  --ink: #1c2426;
  --muted: #8a9698;
  --line: #e8eeee;
  --rail: #1a1f22;
  --white: #fff;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: Inter, system-ui, sans-serif;
  color: var(--ink);
  background: var(--mint);
}
.hidden { display: none !important; }

.logo-circle {
  border-radius: 50%;
  background: transparent;
  display: grid; place-items: center;
  overflow: hidden; flex: none;
}
.logo-circle img { width: 58%; height: 58%; object-fit: cover; }
.logo-circle.sm { width: 36px; height: 36px; }
.logo-circle.md { width: 44px; height: 44px; }
.logo-circle.lg { width: 72px; height: 72px; }
.logo-circle.me { background: #2a3236; color: #fff; font-size: 13px; font-weight: 600; }

.auth { min-height: 100%; display: grid; place-items: center; padding: 24px; }
.auth-card {
  width: min(400px, 100%);
  background: var(--white);
  border-radius: 28px;
  padding: 36px 32px;
}
.auth-card .logo-circle { margin-bottom: 18px; }
.eyebrow { font-size: 12px; color: var(--brand-d); font-weight: 600; letter-spacing: .04em; }
.auth h1 { font-size: 28px; letter-spacing: -.03em; margin: 8px 0 8px; font-weight: 700; }
.lead { color: var(--muted); margin-bottom: 22px; font-size: 14px; }
.field { display: block; margin-bottom: 12px; }
.field span { display: block; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.field input, .search input, .composer input {
  width: 100%; border: 1px solid var(--line); background: #f7fbfb;
  border-radius: 999px; padding: 12px 16px; font: inherit; outline: none;
}
.field input:focus, .search input:focus, .composer input:focus {
  border-color: var(--brand); background: #fff;
}
.btn-primary, .send, .hangup, .ghost {
  border: 0; cursor: pointer; font: inherit; font-weight: 600;
}
.btn-primary, .send {
  background: var(--brand); color: #07343a;
  padding: 12px 18px; border-radius: 999px;
}
.btn-primary { width: 100%; margin-top: 4px; }
.auth-alt { display: flex; gap: 8px; margin-top: 10px; }
.ghost { flex: 1; background: #f3f7f7; border-radius: 999px; padding: 10px; }

.shell {
  height: 100%; display: grid;
  grid-template-columns: 64px 1fr;
  padding: 18px 18px 18px 0;
  gap: 0;
}
.rail {
  background: var(--rail);
  margin: 18px 0 18px 18px;
  border-radius: 22px;
  display: flex; flex-direction: column; align-items: center;
  gap: 14px; padding: 16px 0;
}
.rail-logo { background: var(--brand); }
.rail-btn {
  width: 36px; height: 36px; border: 0; border-radius: 50%;
  background: transparent; color: #8b9598; cursor: pointer;
  display: grid; place-items: center;
}
.rail-btn svg { width: 18px; height: 18px; fill: currentColor; }
.rail-btn.on, .rail-btn:hover { color: #fff; background: #2a3236; }
.rail-grow { flex: 1; }

.board {
  background: var(--white);
  border-radius: 28px;
  margin-left: 14px;
  display: grid;
  grid-template-columns: 300px 1fr 260px;
  min-width: 0; overflow: hidden;
}
.sidebar { border-right: 1px solid var(--line); padding: 22px 18px 12px; display: flex; flex-direction: column; }
.kicker { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.side-title { display: flex; align-items: baseline; gap: 8px; margin: 6px 0 16px; }
.side-title h1 { font-size: 26px; font-weight: 700; letter-spacing: -.03em; }
.count { color: var(--muted); font-size: 22px; font-weight: 600; }
.search { margin-bottom: 16px; }
.sec { font-size: 11px; color: var(--muted); letter-spacing: .08em; text-transform: uppercase; padding: 8px 8px 6px; }
.chat-list { overflow: auto; }
.row {
  display: flex; gap: 12px; align-items: center;
  padding: 8px; border-radius: 16px; cursor: pointer;
}
.row:hover, .row.active { background: var(--pale); }
.ava {
  width: 44px; height: 44px; border-radius: 50%; flex: none;
  display: grid; place-items: center; overflow: hidden;
  background: var(--pale); color: var(--brand-d); font-weight: 600;
}
.ava.bot { background: transparent; }
.ava img { width: 58%; height: 58%; object-fit: cover; }
.meta { min-width: 0; flex: 1; }
.meta b { display: block; font-size: 14px; font-weight: 600; }
.meta span { display: block; color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.when { font-size: 11px; color: var(--muted); }

.stage {
  display: flex; flex-direction: column; min-width: 0;
  background:
    radial-gradient(circle at 20% 10%, rgba(126,202,212,.18), transparent 28%),
    radial-gradient(circle at 80% 90%, rgba(126,202,212,.12), transparent 30%),
    #f7fbfb;
}
.stage-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; background: rgba(255,255,255,.82); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.who { display: flex; align-items: center; gap: 10px; }
.who h2 { font-size: 15px; font-weight: 600; }
.who small { color: var(--muted); font-size: 12px; }
.msgs { flex: 1; overflow: auto; padding: 22px 28px; display: flex; flex-direction: column; gap: 10px; }
.line { display: flex; gap: 10px; align-items: flex-end; }
.line.out { flex-direction: row-reverse; }
.bubble {
  max-width: min(420px, 78%);
  padding: 10px 14px; border-radius: 18px; font-size: 14px; line-height: 1.45;
  background: #fff; box-shadow: 0 1px 0 rgba(0,0,0,.04);
}
.line.out .bubble { background: var(--brand); color: #07343a; }
.card-8800 {
  width: min(340px, 86%);
  background: #fff; border-radius: 18px; padding: 14px;
  box-shadow: 0 1px 0 rgba(0,0,0,.04);
}
.card-8800 b { display: block; }
.card-8800 em { font-style: normal; color: var(--muted); font-size: 12px; }
.card-8800 .num { margin: 6px 0; font-weight: 700; color: var(--brand-d); }
.card-8800 button {
  border: 0; background: var(--pale); color: var(--brand-d);
  border-radius: 999px; padding: 8px 12px; font-weight: 600; cursor: pointer;
}
.composer {
  display: flex; gap: 8px; padding: 12px 16px 16px;
}
.composer input { background: #fff; }
.send { padding-inline: 16px; }

.panel {
  border-left: 1px solid var(--line);
  padding: 28px 20px; text-align: center; background: #fff;
}
.panel .logo-circle { margin: 0 auto 12px; }
.panel h3 { font-size: 16px; }
.panel p { color: var(--muted); font-size: 13px; margin: 4px 0 16px; }
.panel .act { display: flex; gap: 8px; justify-content: center; }
.panel .act button {
  border: 1px solid var(--line); background: #fff; border-radius: 999px;
  padding: 8px 12px; font: inherit; font-size: 13px; cursor: pointer;
}

.dialer {
  position: fixed; inset: 0; background: rgba(26,31,34,.45);
  display: grid; place-items: center; z-index: 20;
}
.dialer-card {
  width: min(340px, 90vw); background: #fff; border-radius: 28px;
  text-align: center; padding: 32px 24px;
}
.dialer-card .logo-circle { margin: 0 auto 12px; }
.dialer-num, .dialer-status { color: var(--muted); margin-top: 4px; }
.hangup { margin-top: 18px; background: #f3d6d4; color: #8a2e2a; border-radius: 999px; padding: 10px 22px; }

@media (max-width: 980px) {
  .board { grid-template-columns: 280px 1fr; }
  .panel { display: none; }
}
@media (max-width: 760px) {
  .shell { grid-template-columns: 56px 1fr; padding: 8px 8px 8px 0; }
  .board { grid-template-columns: 1fr; margin-left: 8px; }
  .shell.show-list .stage { display: none; }
  .shell:not(.show-list) .sidebar { display: none; }
}
