/* ============================================================
   Panel VoltUY — demo
   ============================================================ */

:root {
  /* color — paleta cohesiva con la propuesta */
  --ink:        #0B0F1A;
  --ink-2:      #1A2030;
  --muted:      #5A6275;
  --muted-2:    #8A92A6;
  --line:       #E5E7EE;
  --line-2:     #EEF0F5;
  --bg:         #F6F7FB;
  --surface:    #FFFFFF;
  --dark:       #0B0F1A;
  --dark-2:     #141926;

  --accent:     #C6FF3D;
  --accent-2:   #B6FE3E;
  --accent-ink: #0B0F1A;

  --ok:         #19A974;
  --warn:       #E0A92A;
  --bad:        #D9445A;
  --info:       #2D7BF4;

  /* type */
  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-body:    "Inter", system-ui, sans-serif;

  /* spacing */
  --s-1: 0.25rem;
  --s-2: 0.5rem;
  --s-3: 0.75rem;
  --s-4: 1rem;
  --s-5: 1.25rem;
  --s-6: 1.5rem;
  --s-7: 2rem;
  --s-8: 3rem;
  --s-9: 4rem;

  --radius:    12px;
  --radius-sm: 8px;
  --radius-lg: 18px;

  --shadow-sm: 0 1px 2px rgba(11, 15, 26, 0.04);
  --shadow:    0 4px 18px -8px rgba(11, 15, 26, 0.12);
  --shadow-lg: 0 24px 60px -28px rgba(11, 15, 26, 0.25);

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

* , *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-body);
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
button { font: inherit; cursor: pointer; }
input, textarea, select { font: inherit; }
ul { list-style: none; padding: 0; margin: 0; }
h1, h2, h3, p { margin: 0; }
svg { display: block; }

::selection { background: var(--accent); color: var(--accent-ink); }

/* ============================================================
   LOGIN
   ============================================================ */
.login-body {
  min-height: 100vh;
  background:
    radial-gradient(1200px 600px at 10% 10%, rgba(198, 255, 61, 0.10), transparent 55%),
    radial-gradient(900px 500px at 90% 90%, rgba(198, 255, 61, 0.06), transparent 60%),
    var(--dark);
  color: #F4F5F8;
  display: grid;
  place-items: center;
  padding: var(--s-7);
}
.login {
  width: 100%;
  max-width: 460px;
  padding: var(--s-8) var(--s-7);
  background: rgba(20, 25, 38, 0.6);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-lg);
  text-align: center;
}
.login__brand { display: inline-flex; align-items: center; gap: var(--s-3); margin-bottom: var(--s-7); }
.login__logo {
  width: 36px; height: 36px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--accent); color: var(--accent-ink);
  border-radius: 10px;
}
.login__logo svg { width: 18px; height: 18px; }
.login__tag {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.login__title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 500;
  letter-spacing: -0.015em;
  line-height: 1.2;
  margin-bottom: var(--s-2);
}
.login__sub { color: #8A92A6; font-size: 0.9rem; margin-bottom: var(--s-7); }
.login__photo {
  width: 72px;
  height: 72px;
  min-width: 72px;
  min-height: 72px;
  max-width: 72px;
  max-height: 72px;
  margin: 0 auto var(--s-5);
  border-radius: 50%;
  overflow: hidden;
  background: #1A2030;
  box-shadow:
    0 0 0 3px rgba(198, 255, 61, 0.16),
    0 10px 24px -10px rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.login__photo img {
  width: 72px;
  height: 72px;
  max-width: 72px;
  max-height: 72px;
  object-fit: cover;
  display: block;
}
.user-tile {
  width: 100%;
  display: grid;
  grid-template-columns: 48px 1fr 24px;
  gap: var(--s-4);
  align-items: center;
  padding: var(--s-4) var(--s-5);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  color: #F4F5F8;
  text-align: left;
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease), transform 0.2s var(--ease);
}
.user-tile:hover {
  background: rgba(198, 255, 61, 0.08);
  border-color: rgba(198, 255, 61, 0.4);
  transform: translateY(-1px);
}
.user-tile__avatar {
  width: 48px; height: 48px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--accent); color: var(--accent-ink);
  border-radius: 50%;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.25rem;
}
.user-tile__name { font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; }
.user-tile__role { color: #8A92A6; font-size: 0.85rem; }
.user-tile__arrow { color: #8A92A6; display: inline-flex; }
.user-tile__arrow svg { width: 20px; height: 20px; }
.user-tile:hover .user-tile__arrow { color: var(--accent); }
.login__foot { margin-top: var(--s-7); color: #5A6275; font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase; }

/* ============================================================
   APP LAYOUT
   ============================================================ */
.app-body { min-height: 100vh; background: var(--bg); }
.app {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
}

/* sidebar */
.sidebar {
  background: var(--dark);
  color: #F4F5F8;
  display: flex;
  flex-direction: column;
  padding: var(--s-6) 0;
  border-right: 1px solid rgba(255, 255, 255, 0.04);
}
.sidebar__brand {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  padding: 0 var(--s-6) var(--s-7);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  margin-bottom: var(--s-5);
}
.sidebar__logo {
  width: 36px; height: 36px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--accent); color: var(--accent-ink);
  border-radius: 10px;
  flex-shrink: 0;
}
.sidebar__logo svg { width: 18px; height: 18px; }
.sidebar__brand-name { font-family: var(--font-display); font-weight: 600; font-size: 1.02rem; line-height: 1.1; }
.sidebar__brand-sub { font-size: 0.75rem; color: #8A92A6; letter-spacing: 0.05em; margin-top: 2px; }

.nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--s-1);
  padding: 0 var(--s-4);
}
.nav__item {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  padding: var(--s-3) var(--s-4);
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  color: #B6BEC9;
  font-size: 0.92rem;
  text-align: left;
  transition: background 0.18s var(--ease), color 0.18s var(--ease);
}
.nav__item svg { width: 18px; height: 18px; flex-shrink: 0; opacity: 0.9; }
.nav__item:hover { background: rgba(255, 255, 255, 0.04); color: #F4F5F8; }
.nav__item.is-active { background: rgba(198, 255, 61, 0.12); color: var(--accent); }
.nav__item.is-active svg { color: var(--accent); }
.nav__badge {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  background: var(--accent);
  color: var(--accent-ink);
  border-radius: 11px;
  font-size: 0.72rem;
  font-weight: 700;
}

.sidebar__foot { padding: var(--s-5) var(--s-4) 0; }
.userpill {
  display: grid;
  grid-template-columns: 36px 1fr auto;
  gap: var(--s-3);
  align-items: center;
  padding: var(--s-3);
  background: rgba(255, 255, 255, 0.04);
  border-radius: var(--radius-sm);
}
.userpill__avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 600;
}
.userpill__name { font-weight: 600; font-size: 0.88rem; line-height: 1.1; }
.userpill__role { color: #8A92A6; font-size: 0.74rem; margin-top: 2px; }
.userpill__out {
  background: transparent;
  border: none;
  color: #8A92A6;
  padding: var(--s-2);
  border-radius: 6px;
  display: inline-flex;
}
.userpill__out svg { width: 16px; height: 16px; }
.userpill__out:hover { color: var(--accent); background: rgba(255, 255, 255, 0.04); }

/* main */
.main {
  padding: var(--s-7) var(--s-8);
  overflow-x: auto;
}

/* ============================================================
   VIEW
   ============================================================ */
.view { display: none; animation: fadeIn 0.25s var(--ease); }
.view.is-active { display: block; }
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: none; }
}

.view__head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: var(--s-5);
  margin-bottom: var(--s-7);
  flex-wrap: wrap;
}
.view__crumb {
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: var(--s-2);
  font-weight: 600;
}
.view__title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 2.4vw, 2.1rem);
  font-weight: 500;
  letter-spacing: -0.015em;
  line-height: 1.1;
}
.view__lede {
  color: var(--muted);
  font-size: 1rem;
  margin-bottom: var(--s-7);
  max-width: 60ch;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  padding: 6px 10px;
  background: rgba(25, 169, 116, 0.08);
  color: #0B7F55;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
}
.status__dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--ok);
  display: inline-block;
  box-shadow: 0 0 0 4px rgba(25, 169, 116, 0.18);
  animation: pulse 2s infinite;
}
.status--ok { color: #0B7F55; }
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(25, 169, 116, 0.18); }
  50%      { box-shadow: 0 0 0 6px rgba(25, 169, 116, 0.08); }
}

/* ============================================================
   KPIs
   ============================================================ */
.kpis {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--s-5);
  margin-bottom: var(--s-7);
}
.kpi {
  padding: var(--s-6);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.kpi__label { color: var(--muted); font-size: 0.82rem; font-weight: 500; letter-spacing: 0.02em; }
.kpi__value {
  font-family: var(--font-display);
  font-size: 1.85rem;
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.1;
  margin: var(--s-3) 0 var(--s-2);
}
.kpi__small { font-size: 0.6em; color: var(--muted-2); margin-left: 2px; }
.kpi__delta { font-size: 0.78rem; color: var(--muted); }
.kpi__delta--up { color: var(--ok); font-weight: 600; }

/* ============================================================
   Panels & rows
   ============================================================ */
.row {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: var(--s-5);
  align-items: start;
}
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.panel + .panel { margin-top: var(--s-5); }
.panel__head { padding: var(--s-6); border-bottom: 1px solid var(--line); }
.panel__head--row { display: flex; align-items: center; justify-content: space-between; gap: var(--s-5); }
.panel__title { font-family: var(--font-display); font-size: 1.08rem; font-weight: 600; letter-spacing: -0.005em; }
.panel__sub { color: var(--muted); font-size: 0.85rem; margin-top: 2px; }

/* activity feed */
.activity { padding: var(--s-4) 0; }
.activity__item {
  display: grid;
  grid-template-columns: 14px 1fr;
  gap: var(--s-4);
  padding: var(--s-4) var(--s-6);
  border-bottom: 1px solid var(--line-2);
}
.activity__item:last-child { border-bottom: none; }
.activity__dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--ok);
  margin-top: 6px;
}
.activity__dot--sale { background: var(--accent-2); box-shadow: 0 0 0 4px rgba(198, 255, 61, 0.25); }
.activity__dot--audio { background: var(--info); }
.activity__text { font-size: 0.92rem; line-height: 1.4; color: var(--ink-2); }
.activity__time { color: var(--muted-2); font-size: 0.78rem; margin-top: 2px; }

/* bars */
.bars { padding: var(--s-5) var(--s-6); display: flex; flex-direction: column; gap: var(--s-5); }
.bars__row { display: flex; justify-content: space-between; font-size: 0.88rem; margin-bottom: 6px; color: var(--ink-2); }
.bars__n { font-weight: 600; color: var(--muted); }
.bars__track { height: 6px; background: var(--line-2); border-radius: 3px; overflow: hidden; }
.bars__fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  border-radius: 3px;
}

/* ============================================================
   CONVERSACIONES
   ============================================================ */
.chats {
  display: grid;
  grid-template-columns: 320px 1fr;
  height: calc(100vh - 200px);
  min-height: 540px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.chats__list {
  border-right: 1px solid var(--line);
  overflow-y: auto;
  background: #FAFBFD;
}
.chats__search {
  position: sticky; top: 0;
  background: #FAFBFD;
  padding: var(--s-4);
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: var(--s-3);
  z-index: 1;
}
.chats__search svg { width: 16px; height: 16px; color: var(--muted-2); flex-shrink: 0; }
.chats__search input {
  flex: 1;
  border: none;
  background: transparent;
  outline: none;
  font-size: 0.9rem;
}
.chat {
  width: 100%;
  display: grid;
  grid-template-columns: 44px 1fr auto;
  gap: var(--s-3);
  align-items: center;
  padding: var(--s-4);
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--line-2);
  text-align: left;
  transition: background 0.15s var(--ease);
}
.chat:hover { background: rgba(0, 0, 0, 0.02); }
.chat.is-active { background: rgba(198, 255, 61, 0.10); }
.chat__avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
}
.chat__avatar--lg { width: 48px; height: 48px; font-size: 1.05rem; }
.chat__top { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s-2); }
.chat__name { font-weight: 600; font-size: 0.92rem; color: var(--ink); }
.chat__time { font-size: 0.72rem; color: var(--muted-2); }
.chat__preview {
  font-size: 0.82rem;
  color: var(--muted);
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.chat__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px; height: 20px;
  padding: 0 6px;
  background: var(--accent);
  color: var(--accent-ink);
  border-radius: 10px;
  font-size: 0.7rem;
  font-weight: 700;
}

.chats__view { display: flex; flex-direction: column; min-width: 0; }
.chats__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--s-4) var(--s-6);
  border-bottom: 1px solid var(--line);
  gap: var(--s-4);
}
.chats__head-info { display: flex; align-items: center; gap: var(--s-3); }
.chats__name { font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; }
.chats__phone { font-size: 0.8rem; color: var(--muted); }
.chats__banner {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  padding: var(--s-3) var(--s-6);
  background: rgba(198, 255, 61, 0.12);
  color: var(--ink);
  font-size: 0.85rem;
  border-bottom: 1px solid var(--line);
}
.chats__banner.is-paused {
  background: rgba(217, 68, 90, 0.10);
  color: #8A1E2E;
}
.chats__banner svg { width: 16px; height: 16px; flex-shrink: 0; }
.chats__stream {
  flex: 1;
  overflow-y: auto;
  padding: var(--s-5) var(--s-6);
  background:
    linear-gradient(180deg, rgba(198, 255, 61, 0.025), transparent 200px),
    #FAFBFD;
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
}
.bubble {
  max-width: 70%;
  padding: var(--s-3) var(--s-4) var(--s-4);
  border-radius: 14px;
  position: relative;
  background: #fff;
  border: 1px solid var(--line);
  font-size: 0.92rem;
  line-height: 1.4;
}
.bubble--in { align-self: flex-start; }
.bubble--out {
  align-self: flex-end;
  background: var(--dark);
  color: #F4F5F8;
  border-color: var(--dark);
}
.bubble--ai { background: var(--dark); border-color: var(--dark); }
.bubble__tag {
  display: inline-block;
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 4px;
}
.bubble__time {
  display: block;
  font-size: 0.68rem;
  color: var(--muted-2);
  margin-top: 4px;
}
.bubble--out .bubble__time { color: #8A92A6; }

.bubble--audio { padding: var(--s-3) var(--s-4); }
.audio {
  display: grid;
  grid-template-columns: 32px 1fr auto;
  gap: var(--s-3);
  align-items: center;
  margin: 6px 0;
}
.audio__play {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-ink);
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.audio__play svg { width: 14px; height: 14px; }
.audio__wave { display: flex; align-items: center; gap: 2px; }
.audio__wave span {
  width: 3px;
  background: rgba(198, 255, 61, 0.6);
  border-radius: 2px;
  display: inline-block;
}
.audio__wave span:nth-child(1)  { height: 8px; }
.audio__wave span:nth-child(2)  { height: 14px; }
.audio__wave span:nth-child(3)  { height: 10px; }
.audio__wave span:nth-child(4)  { height: 18px; }
.audio__wave span:nth-child(5)  { height: 22px; }
.audio__wave span:nth-child(6)  { height: 14px; }
.audio__wave span:nth-child(7)  { height: 8px; }
.audio__wave span:nth-child(8)  { height: 16px; }
.audio__wave span:nth-child(9)  { height: 20px; }
.audio__wave span:nth-child(10) { height: 12px; }
.audio__wave span:nth-child(11) { height: 8px; }
.audio__wave span:nth-child(12) { height: 14px; }
.audio__wave span:nth-child(13) { height: 18px; }
.audio__wave span:nth-child(14) { height: 10px; }
.audio__wave span:nth-child(15) { height: 16px; }
.audio__wave span:nth-child(16) { height: 22px; }
.audio__wave span:nth-child(17) { height: 14px; }
.audio__wave span:nth-child(18) { height: 8px; }
.audio__time { color: #8A92A6; font-size: 0.78rem; }

.chats__compose {
  padding: var(--s-4) var(--s-6);
  border-top: 1px solid var(--line);
  display: flex;
  gap: var(--s-3);
  background: #fff;
}
.chats__compose input {
  flex: 1;
  padding: var(--s-3) var(--s-4);
  border: 1px solid var(--line);
  border-radius: 10px;
  outline: none;
  transition: border-color 0.15s;
}
.chats__compose input:focus { border-color: var(--ink); }

/* ============================================================
   LEADS
   ============================================================ */
.leads__stats { display: flex; gap: var(--s-3); margin-bottom: var(--s-5); flex-wrap: wrap; }
.chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.82rem;
  color: var(--muted);
  font-weight: 500;
}
.chip--ok { background: rgba(25, 169, 116, 0.08); color: #0B7F55; border-color: rgba(25, 169, 116, 0.18); }

.table-wrap {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.table { width: 100%; border-collapse: collapse; }
.table th {
  text-align: left;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  padding: var(--s-4) var(--s-5);
  background: #FAFBFD;
  border-bottom: 1px solid var(--line);
}
.table th.ta-right { text-align: right; }
.table td {
  padding: var(--s-4) var(--s-5);
  border-bottom: 1px solid var(--line-2);
  font-size: 0.9rem;
  vertical-align: middle;
  color: var(--ink-2);
}
.table tr:last-child td { border-bottom: none; }
.table tr:hover { background: rgba(0, 0, 0, 0.015); }
.lead-name { font-weight: 600; color: var(--ink); }
.lead-sub { color: var(--muted); font-size: 0.78rem; margin-top: 2px; }
.ta-right { text-align: right; }

.tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}
.tag--ok    { background: rgba(25, 169, 116, 0.10); color: #0B7F55; }
.tag--warm  { background: rgba(224, 169, 42, 0.12); color: #8A6814; }
.tag--cold  { background: rgba(11, 15, 26, 0.06);  color: var(--muted); }
.tag--sold  { background: rgba(198, 255, 61, 0.22); color: #3F5C00; }

/* ============================================================
   NUEVA VENTA (form)
   ============================================================ */
.form {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: var(--s-7);
}
.form__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-5);
  margin-bottom: var(--s-6);
}
.field { display: flex; flex-direction: column; gap: var(--s-2); margin-bottom: var(--s-5); }
.field label { font-size: 0.85rem; font-weight: 600; color: var(--ink); }
.field__hint { font-size: 0.8rem; color: var(--muted); margin-top: -4px; margin-bottom: var(--s-3); }
.field input[type="text"],
.field input[type="tel"] {
  padding: var(--s-3) var(--s-4);
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.field input:focus {
  border-color: var(--ink);
  box-shadow: 0 0 0 4px rgba(11, 15, 26, 0.05);
}

.input {
  padding: var(--s-3) var(--s-4);
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  outline: none;
  font-size: 0.9rem;
}
.input--search { min-width: 280px; }

.products {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: var(--s-3);
}
.product {
  display: flex;
  align-items: flex-start;
  gap: var(--s-3);
  padding: var(--s-4);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.product:hover { border-color: #BFC6D2; }
.product input[type="checkbox"] { margin-top: 3px; flex-shrink: 0; accent-color: var(--ink); }
.product__body { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.product__name { font-weight: 600; font-size: 0.92rem; color: var(--ink); }
.product__cat { font-size: 0.75rem; color: var(--muted-2); }
.product__price { font-family: var(--font-display); font-weight: 600; font-size: 0.95rem; color: var(--ink); margin-top: 4px; }
.product.is-selected {
  background: rgba(198, 255, 61, 0.12);
  border-color: var(--accent);
}

.form__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-5);
  margin-top: var(--s-7);
  padding-top: var(--s-6);
  border-top: 1px solid var(--line);
  flex-wrap: wrap;
}
.total { display: flex; flex-direction: column; }
.total__label { font-size: 0.8rem; color: var(--muted); }
.total__amount {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1;
}

/* ============================================================
   AGENT
   ============================================================ */
.toggle { display: inline-flex; align-items: center; gap: var(--s-3); cursor: pointer; }
.toggle input { position: absolute; opacity: 0; pointer-events: none; }
.toggle__slider {
  position: relative;
  width: 46px;
  height: 26px;
  background: var(--line);
  border-radius: 99px;
  transition: background 0.2s var(--ease);
}
.toggle__slider::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s var(--ease);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}
.toggle input:checked + .toggle__slider { background: var(--accent); }
.toggle input:checked + .toggle__slider::after { transform: translateX(20px); }
.toggle__label { font-weight: 600; font-size: 0.9rem; }

.agent-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s-5);
  padding: var(--s-6);
}
.agent-stats > div { padding: var(--s-4); background: #FAFBFD; border-radius: 10px; }
.agent-stats__num {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.1;
}
.agent-stats__label { font-size: 0.82rem; color: var(--muted); margin-top: var(--s-2); }

.audios {
  display: flex;
  flex-direction: column;
}
.audios li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--s-4) var(--s-6);
  border-bottom: 1px solid var(--line-2);
  gap: var(--s-4);
}
.audios li:last-child { border-bottom: none; }
.audios__info { font-size: 0.92rem; color: var(--ink-2); }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  padding: 10px 16px;
  border: none;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 600;
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line);
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
}
.btn:hover { background: #FAFBFD; }
.btn:active { transform: translateY(1px); }
.btn svg { width: 16px; height: 16px; }
.btn--primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}
.btn--primary:hover { background: var(--accent-2); border-color: var(--accent-2); }
.btn--ghost { background: transparent; }
.btn--sm { padding: 6px 12px; font-size: 0.82rem; }
.btn--lg { padding: 14px 22px; font-size: 1rem; }
.btn--link {
  background: transparent;
  border: none;
  color: var(--ink);
  padding: 6px 10px;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
}
.btn--link:hover { background: transparent; color: var(--ink); }

/* ============================================================
   TOAST
   ============================================================ */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  padding: var(--s-4) var(--s-5);
  background: var(--dark);
  color: #F4F5F8;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  transform: translateY(20px);
  opacity: 0;
  transition: transform 0.25s var(--ease), opacity 0.25s var(--ease);
  pointer-events: none;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: var(--s-3);
}
.toast.is-visible {
  transform: translateY(0);
  opacity: 1;
}
.toast::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  display: inline-block;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1100px) {
  .row { grid-template-columns: 1fr; }
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .chats { grid-template-columns: 280px 1fr; }
  .agent-stats { grid-template-columns: 1fr; }
}

@media (max-width: 820px) {
  .app { grid-template-columns: 1fr; }
  .sidebar {
    position: sticky;
    top: 0;
    flex-direction: row;
    padding: var(--s-3) var(--s-4);
    align-items: center;
    overflow-x: auto;
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  }
  .sidebar__brand { padding: 0; border: none; margin: 0; flex-shrink: 0; margin-right: var(--s-4); }
  .nav { flex-direction: row; flex: 1; padding: 0; gap: 4px; }
  .nav__item { white-space: nowrap; padding: 8px 12px; }
  .nav__item span:not(.nav__badge) { display: none; }
  .nav__badge { margin: 0; }
  .sidebar__foot { padding: 0; margin-left: auto; flex-shrink: 0; }
  .userpill { padding: 4px 8px; grid-template-columns: 28px auto auto; gap: 8px; }
  .userpill__avatar { width: 28px; height: 28px; font-size: 0.85rem; }
  .userpill__info { display: none; }

  .main { padding: var(--s-5) var(--s-4); }
  .kpis { grid-template-columns: 1fr 1fr; }
  .form__grid { grid-template-columns: 1fr; }
  .chats { grid-template-columns: 1fr; height: auto; }
  .chats__list { max-height: 220px; }
}
