:root {
  --ink: #071018;
  --panel: rgba(14, 28, 38, 0.82);
  --panel-solid: #0e1c26;
  --line: rgba(160, 210, 220, 0.14);
  --text: #e8f2f4;
  --muted: #8aa3ad;
  --accent: #1ec8a5;
  --accent-2: #f0a202;
  --danger: #ef5d5d;
  --ok: #3dd68c;
  --warn: #f0a202;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  --radius: 16px;
  --font: "Manrope", system-ui, sans-serif;
  --display: "Sora", "Manrope", system-ui, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  margin: 0;
  height: 100%;
  min-height: 100%;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  height: 100%;
  min-height: 100%;
  overflow: hidden;
  font-family: var(--font);
  font-weight: 500;
  font-size: 15px;
  line-height: 1.5;
  letter-spacing: 0;
  font-stretch: normal;
  font-synthesis: none;
  color: var(--text);
  background: var(--ink);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

button,
input,
select,
textarea {
  font-family: inherit;
  font-size: inherit;
  font-weight: inherit;
  letter-spacing: inherit;
  font-stretch: normal;
  color: inherit;
}

button {
  cursor: pointer;
}

.app-bg {
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(1200px 700px at 10% -10%, rgba(30, 200, 165, 0.18), transparent 55%),
    radial-gradient(900px 600px at 90% 0%, rgba(240, 162, 2, 0.12), transparent 50%),
    linear-gradient(160deg, #050b11 0%, #0a1620 45%, #08141c 100%);
}

.app-grid {
  position: fixed;
  inset: 0;
  z-index: -1;
  opacity: 0.22;
  background-image:
    linear-gradient(rgba(140, 190, 200, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(140, 190, 200, 0.08) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at center, black 20%, transparent 75%);
}

.app-shell {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  height: 100dvh;
  min-height: 0;
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  overflow: hidden;
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding: 1.25rem 1rem 1rem;
  border-right: 1px solid var(--line);
  background: rgba(5, 12, 18, 0.72);
  backdrop-filter: blur(16px);
  height: 100dvh;
  min-height: 0;
  overflow: hidden;
  position: sticky;
  top: 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.35rem 0.4rem;
}

.brand-mark {
  flex: 0 0 auto;
  width: 2rem;
  height: 2rem;
  aspect-ratio: 1;
  border-radius: 0.55rem;
  background:
    conic-gradient(from 210deg, var(--accent), #0b3b36 40%, var(--accent-2) 70%, var(--accent));
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.12);
}

.brand-name {
  display: block;
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: -0.01em;
  font-size: 1rem;
  line-height: 1.25;
}

.brand-tag {
  display: block;
  color: var(--muted);
  font-size: 0.75rem;
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  width: 100%;
  border: 0;
  border-radius: 12px;
  padding: 0.75rem 0.9rem;
  background: transparent;
  color: var(--muted);
  text-align: left;
  transition: background 0.2s, color 0.2s, transform 0.2s;
}

.nav-item:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}

.nav-item.active {
  color: var(--ink);
  background: linear-gradient(120deg, var(--accent), #7be7cf);
  font-weight: 600;
}

.nav-ico {
  width: 1.2rem;
  text-align: center;
  opacity: 0.9;
}

.agent-chip {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.35rem 0.7rem;
  align-items: center;
  padding: 0.9rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
}

.agent-chip strong {
  display: block;
  font-size: 0.92rem;
}

.agent-chip span {
  color: var(--muted);
  font-size: 0.75rem;
}

.agent-chip select {
  grid-column: 1 / -1;
  width: 100%;
  margin-top: 0.25rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--panel-solid);
  padding: 0.45rem 0.6rem;
}

.status-dot {
  flex: 0 0 auto;
  width: 0.6rem;
  height: 0.6rem;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--muted);
}

.status-dot.online { background: var(--ok); box-shadow: 0 0 0 4px rgba(61, 214, 140, 0.15); }
.status-dot.busy { background: var(--accent-2); }
.status-dot.offline { background: #56656d; }

.main {
  min-width: 0;
  height: 100dvh;
  padding: 1.5rem 1.75rem 2.25rem;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 1.5rem;
}

.page-title {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(1.35rem, 1.8vw, 1.75rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.page-sub {
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
  max-width: 42rem;
}

.topbar-actions {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  flex-wrap: wrap;
}

.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(30, 200, 165, 0.08);
  color: var(--accent);
  font-size: 0.82rem;
}

.pulse {
  flex: 0 0 auto;
  width: 0.5rem;
  height: 0.5rem;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 1.6s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}

.view {
  display: none;
  animation: rise 0.35s ease;
}

.view.active {
  display: block;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

.stat-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.8rem;
  margin-bottom: 1rem;
}

.stat {
  padding: 1rem 1.05rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--panel);
  backdrop-filter: blur(10px);
}

.stat-label {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  margin-bottom: 0.35rem;
}

.stat-value {
  font-family: var(--display);
  font-size: 1.45rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.floor-grid,
.split,
.phone-layout {
  display: grid;
  gap: 1.15rem;
}

.floor-grid {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
}

.panel-wide {
  grid-column: 1 / -1;
}

.split,
.phone-layout {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
}

.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
  padding: 1.15rem 1.2rem;
  min-width: 0;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.panel-head h2 {
  margin: 0;
  font-family: var(--display);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.muted {
  color: var(--muted);
  font-size: 0.85rem;
}

.btn,
.chip-row button,
.dialpad button {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  padding: 0.65rem 1rem;
  transition: transform 0.15s, background 0.15s, border-color 0.15s;
}

.btn:hover:not(:disabled),
.chip-row button:hover,
.dialpad button:hover {
  transform: translateY(-1px);
  border-color: rgba(30, 200, 165, 0.45);
}

.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.btn-primary {
  background: linear-gradient(120deg, var(--accent), #7be7cf);
  color: var(--ink);
  border-color: transparent;
  font-weight: 700;
}

.btn-accent {
  background: linear-gradient(120deg, var(--accent-2), #ffd166);
  color: #1a1200;
  border-color: transparent;
  font-weight: 700;
}

.btn-danger {
  background: rgba(239, 93, 93, 0.15);
  border-color: rgba(239, 93, 93, 0.35);
  color: #ffb4b4;
}

.btn-ghost {
  background: transparent;
}

.btn-tiny {
  padding: 0.4rem 0.7rem;
  font-size: 0.82rem;
  border-radius: 10px;
}

.btn-call {
  min-width: 5.5rem;
  border-radius: 999px;
  background: linear-gradient(120deg, #1ec8a5, #3dd68c);
  color: #042015;
  border: 0;
  font-weight: 800;
  font-family: var(--display);
}

.btn-call.hangup {
  background: linear-gradient(120deg, #ef5d5d, #ff8f70);
  color: #2a0505;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.agent-list,
.campaign-list,
.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.agent-list li,
.campaign-list li {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.7rem;
  align-items: center;
  padding: 0.75rem 0.8rem;
  border-radius: 14px;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.03);
}

.campaign-list li {
  cursor: pointer;
  grid-template-columns: 1fr auto;
}

.campaign-list li.active,
.campaign-list li:hover {
  border-color: rgba(30, 200, 165, 0.35);
  background: rgba(30, 200, 165, 0.08);
}

.agent-list strong,
.campaign-list strong {
  display: block;
  font-size: 0.92rem;
}

.agent-list span,
.campaign-list span {
  color: var(--muted);
  font-size: 0.75rem;
}

.badge {
  font-size: 0.72rem;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
}

.badge.running {
  color: var(--ok);
  border-color: rgba(61, 214, 140, 0.35);
}

.badge.paused {
  color: var(--warn);
  border-color: rgba(240, 162, 2, 0.35);
}

.btn-play {
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 999px;
  border: 1px solid rgba(61, 214, 140, 0.45);
  background: rgba(61, 214, 140, 0.15);
  color: var(--ok);
  font-size: 0.75rem;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: 0.4rem;
  vertical-align: middle;
  transition: background 0.15s ease, transform 0.15s ease;
}

.btn-play:hover {
  background: rgba(61, 214, 140, 0.28);
  transform: scale(1.06);
}

.btn-play.is-playing {
  border-color: rgba(240, 162, 2, 0.5);
  background: rgba(240, 162, 2, 0.18);
  color: var(--warn);
}

.recording-player {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0 0 0.9rem;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
}

.recording-player span {
  color: var(--text);
  font-size: 0.9rem;
}

.timeline li {
  display: grid;
  grid-template-columns: 4.5rem 1fr;
  gap: 0.7rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  font-size: 0.9rem;
}

.timeline time {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.table-wrap {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.data-table th,
.data-table td {
  text-align: left;
  padding: 0.7rem 0.55rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.data-table th {
  color: var(--muted);
  font-weight: 500;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.phone-unit {
  padding: 1.2rem;
  border-radius: calc(var(--radius) + 4px);
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(30, 200, 165, 0.08), transparent 35%),
    rgba(8, 18, 24, 0.9);
  box-shadow: var(--shadow);
}

.phone-screen {
  text-align: center;
  padding: 1.2rem 0.5rem 1rem;
}

.call-state {
  color: var(--accent);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 600;
}

.call-number {
  margin-top: 0.35rem;
  font-family: var(--display);
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  min-height: 2rem;
  line-height: 1.2;
}

.call-timer {
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  margin-top: 0.2rem;
}

.call-timer.timer-warn {
  color: var(--accent-2);
  font-weight: 700;
}

.call-meta {
  margin-top: 0.45rem;
  color: var(--muted);
  font-size: 0.8rem;
}

.phone-input {
  width: 100%;
  margin-bottom: 0.8rem;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.28);
  padding: 0.85rem 1rem;
  text-align: center;
  font-size: 1.15rem;
  letter-spacing: 0.04em;
}

.dialpad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.55rem;
}

.dialpad button {
  aspect-ratio: 1.4;
  border-radius: 14px;
  font-family: var(--display);
  font-size: 1.2rem;
  font-weight: 600;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.1rem;
}

.dialpad button span {
  font-family: var(--font);
  font-size: 0.58rem;
  letter-spacing: 0.12em;
  color: var(--muted);
  font-weight: 500;
}

.phone-actions {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 0.6rem;
  align-items: center;
  margin-top: 0.9rem;
}

.phone-actions.secondary {
  grid-template-columns: repeat(3, 1fr);
}

.phone-side {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.transcript {
  min-height: 220px;
  max-height: 320px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: 0.2rem;
}

.bubble {
  max-width: 92%;
  padding: 0.65rem 0.8rem;
  border-radius: 14px;
  line-height: 1.4;
  font-size: 0.92rem;
  animation: rise 0.25s ease;
}

.bubble .who {
  display: block;
  margin-bottom: 0.2rem;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.bubble.bot,
.bubble.system {
  align-self: flex-start;
  background: rgba(30, 200, 165, 0.12);
  border: 1px solid rgba(30, 200, 165, 0.2);
}

.bubble.user,
.bubble.agent {
  align-self: flex-end;
  background: rgba(240, 162, 2, 0.12);
  border: 1px solid rgba(240, 162, 2, 0.22);
}

.bubble.interim {
  opacity: 0.7;
  font-style: italic;
}

.banner-warn {
  margin-bottom: 0.75rem;
  padding: 0.75rem 0.9rem;
  border-radius: 12px;
  border: 1px solid rgba(240, 162, 2, 0.4);
  background: rgba(240, 162, 2, 0.12);
  color: #ffd27a;
  font-size: 0.88rem;
  line-height: 1.45;
}

.mic-meter {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.55rem;
  align-items: center;
  margin-bottom: 0.35rem;
  font-size: 0.78rem;
  color: var(--muted);
}

.mic-track {
  height: 0.45rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.mic-fill {
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), #7be7cf);
  transition: width 0.08s linear;
}

.btn-accent.listening {
  box-shadow: 0 0 0 3px rgba(240, 162, 2, 0.35);
}

.compose-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.8rem;
}

.compose-row input {
  flex: 1 1 12rem;
  min-width: 10rem;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.chip-row button {
  border-radius: 999px;
  padding: 0.45rem 0.75rem;
  font-size: 0.82rem;
}

.chip-row button.active {
  background: rgba(30, 200, 165, 0.18);
  border-color: rgba(30, 200, 165, 0.45);
  color: var(--accent);
}

.dropzone {
  border: 1.5px dashed rgba(30, 200, 165, 0.45);
  border-radius: 16px;
  padding: 1.75rem 1.25rem;
  text-align: center;
  background: rgba(30, 200, 165, 0.06);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.dropzone.dragover {
  border-color: var(--accent);
  background: rgba(30, 200, 165, 0.14);
}

#upload-filter-panel .chip-row {
  flex-wrap: wrap;
}

#upload-filter-panel code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.85em;
}

.env-snippet,
pre.env-snippet {
  margin: 0.5rem 0 0;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.28);
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.45;
  white-space: pre-wrap;
  overflow-x: auto;
}

.phone-did-label {
  display: block;
  margin: 0 0 0.75rem;
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 600;
}

.rec-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}


.voip-checklist li {
  display: flex;
  gap: 0.55rem;
  align-items: flex-start;
  font-size: 0.9rem;
}

.voip-checklist li.ok {
  color: var(--accent);
}

.voip-checklist li.todo {
  color: var(--muted);
}

.pipeline {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
}

.pipe-col {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  padding: 0.75rem;
  min-height: 180px;
}

.pipe-col h3 {
  margin: 0 0 0.65rem;
  font-family: var(--display);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
}

.pipe-card {
  padding: 0.65rem 0.7rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid transparent;
  margin-bottom: 0.45rem;
  font-size: 0.88rem;
}

.pipe-card strong {
  display: block;
}

.pipe-card span {
  color: var(--muted);
  font-size: 0.75rem;
}

.report-bars {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.report-row {
  display: grid;
  grid-template-columns: 7.5rem 1fr 3rem;
  gap: 0.7rem;
  align-items: center;
  font-size: 0.9rem;
}

.report-track {
  height: 0.55rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.report-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), #7be7cf);
}

.sidebar .nav {
  overflow-y: auto;
  max-height: none;
  padding-right: 0.15rem;
}

.nav-item {
  font-size: 0.88rem;
  padding: 0.6rem 0.75rem;
}

@media (max-width: 1100px) {
  .pipeline {
    grid-template-columns: 1fr 1fr;
  }
}

.form-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1rem 0.9rem;
}

.form-grid label,
.field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--accent);
}

.form-grid label > span,
.field > span {
  color: var(--accent);
}

.form-grid .full,
.field.full {
  grid-column: 1 / -1;
}

.form-grid .check {
  flex-direction: row;
  align-items: center;
  gap: 0.65rem;
  color: var(--text);
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.9rem;
  font-weight: 500;
}

.field-control,
.form-grid input:not([type="checkbox"]),
.form-grid select,
.form-grid textarea,
.compose-row input,
.phone-input,
.agent-chip select,
#crm-search,
#crm-stage-filter,
#upload-mode,
#upload-campaign-name {
  width: 100%;
  border-radius: 12px;
  border: 1px solid rgba(30, 200, 165, 0.22);
  background:
    linear-gradient(180deg, rgba(14, 36, 44, 0.95), rgba(8, 20, 28, 0.98));
  padding: 0.72rem 0.85rem;
  color: var(--text);
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
  transition: border-color 0.15s, box-shadow 0.15s;
  appearance: none;
  -webkit-appearance: none;
  resize: vertical;
  font-family: var(--font);
  font-size: 0.92rem;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}

.form-grid select,
.agent-chip select,
#crm-stage-filter,
#upload-mode {
  background-image:
    linear-gradient(45deg, transparent 50%, var(--accent) 50%),
    linear-gradient(135deg, var(--accent) 50%, transparent 50%),
    linear-gradient(180deg, rgba(14, 36, 44, 0.95), rgba(8, 20, 28, 0.98));
  background-position:
    calc(100% - 16px) calc(50% - 2px),
    calc(100% - 11px) calc(50% - 2px),
    0 0;
  background-size: 5px 5px, 5px 5px, 100% 100%;
  background-repeat: no-repeat;
  padding-right: 2rem;
}

.form-grid input:not([type="checkbox"]):focus,
.form-grid select:focus,
.form-grid textarea:focus,
.compose-row input:focus,
.phone-input:focus,
.field-control:focus,
#crm-search:focus,
#crm-stage-filter:focus,
#upload-mode:focus,
#upload-campaign-name:focus {
  border-color: rgba(30, 200, 165, 0.65);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 0 0 3px rgba(30, 200, 165, 0.12);
}

.form-grid input::placeholder,
.form-grid textarea::placeholder,
.compose-row input::placeholder,
.phone-input::placeholder,
#crm-search::placeholder,
#upload-campaign-name::placeholder {
  color: rgba(138, 163, 173, 0.55);
  font-weight: 400;
}

.form-grid input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 1.1rem;
  height: 1.1rem;
  margin: 0;
  border-radius: 5px;
  border: 1.5px solid rgba(30, 200, 165, 0.45);
  background: rgba(8, 20, 28, 0.9);
  flex: 0 0 auto;
  cursor: pointer;
  position: relative;
}

.form-grid input[type="checkbox"]:checked {
  background: linear-gradient(135deg, var(--accent), #7be7cf);
  border-color: transparent;
}

.form-grid input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  left: 0.32rem;
  top: 0.1rem;
  width: 0.28rem;
  height: 0.55rem;
  border: solid #042015;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.guide-steps {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: guide;
}

.guide-steps li {
  counter-increment: guide;
  display: grid;
  grid-template-columns: 2.2rem 1fr;
  gap: 0.85rem;
  padding: 0.95rem 1rem;
  border-radius: 14px;
  border: 1px solid rgba(30, 200, 165, 0.16);
  background: rgba(8, 22, 30, 0.65);
}

.guide-steps li::before {
  content: counter(guide);
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-family: var(--display);
  font-weight: 700;
  font-size: 0.95rem;
  color: #042015;
  background: linear-gradient(135deg, var(--accent), #7be7cf);
}

.guide-steps strong {
  display: block;
  margin-bottom: 0.25rem;
  color: var(--text);
  font-size: 0.95rem;
}

.guide-steps p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.5;
}

.guide-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 1rem;
}

.tag {
  display: inline-block;
  margin: 0.15rem 0.25rem 0.15rem 0;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  border: 1px solid rgba(240, 162, 2, 0.3);
  background: rgba(240, 162, 2, 0.1);
  color: #ffd27a;
  font-size: 0.75rem;
}

@media (max-width: 1100px) {
  .guide-grid {
    grid-template-columns: 1fr;
  }
}

.mt {
  margin-top: 1rem;
}

.steps {
  margin: 0;
  padding-left: 1.2rem;
  color: var(--muted);
  line-height: 1.7;
}

.callout {
  margin-top: 1.2rem;
  padding: 1rem;
  border-radius: 14px;
  border: 1px solid rgba(240, 162, 2, 0.28);
  background: rgba(240, 162, 2, 0.08);
}

.callout p {
  margin: 0.4rem 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.rehearse-box {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.toast-host {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  z-index: 50;
}

.toast {
  min-width: 220px;
  max-width: 340px;
  padding: 0.8rem 1rem;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(10, 20, 28, 0.95);
  box-shadow: var(--shadow);
  animation: rise 0.25s ease;
}

@media (max-width: 1100px) {
  .stat-row {
    grid-template-columns: repeat(3, 1fr);
  }

  .floor-grid,
  .split,
  .phone-layout,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .panel-wide {
    grid-column: auto;
  }
}

@media (max-width: 820px) {
  body {
    height: auto;
    overflow: auto;
  }

  .app-shell {
    grid-template-columns: 1fr;
    max-width: none;
    height: auto;
    min-height: 100vh;
    overflow: visible;
  }

  .sidebar {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    position: static;
    height: auto;
    overflow: visible;
  }

  .nav {
    flex-direction: row;
    overflow-x: auto;
    overflow-y: hidden;
    flex: initial;
  }

  .nav-item {
    white-space: nowrap;
  }

  .agent-chip {
    display: none;
  }

  .main {
    height: auto;
    overflow: visible;
  }

  .stat-row {
    grid-template-columns: repeat(2, 1fr);
  }
}
