:root {
  --bg: #040404;
  --bg-elevated: #0b0b0b;
  --panel: #0e0e0e;
  --panel-2: #151515;
  --text: #f6f5ef;
  --muted: #9b978a;
  --yellow: #3d8cff;
  --yellow-soft: #b9d6ff;
  --neon-glow: 0 0 18px rgba(61, 140, 255, 0.45), 0 0 42px rgba(61, 140, 255, 0.18);
  --hairline: linear-gradient(135deg, rgba(61, 140, 255, 0.55), rgba(61, 140, 255, 0.05) 40%, rgba(255, 255, 255, 0.06) 60%, rgba(61, 140, 255, 0.4));
  --yellow-dim: rgba(61, 140, 255, 0.12);
  --yellow-line: rgba(61, 140, 255, 0.28);
  --danger: #ff5a5f;
  --danger-dim: rgba(255, 90, 95, 0.12);
  --ok: #3dd68c;
  --ok-dim: rgba(61, 214, 140, 0.12);
  --line: #1f1f1f;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.03);
  --radius: 16px;
  --font: "Outfit", sans-serif;
  --display: "Unbounded", "Outfit", sans-serif;
  --fs-body: 0.94rem;
  --fs-h1: 1.35rem;
  --fs-h2: 1.15rem;
  --fs-meta: 0.84rem;
  --fs-stat: 1.2rem;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  font-size: var(--fs-body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.55;
  letter-spacing: 0.01em;
  font-weight: 400;
  position: relative;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

.bg-grid {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(61, 140, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(61, 140, 255, 0.035) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 20%, transparent 75%);
  z-index: 0;
}

.bg-glow {
  position: fixed;
  width: 520px;
  height: 520px;
  top: -180px;
  right: -120px;
  background: radial-gradient(circle, rgba(61, 140, 255, 0.16), transparent 68%);
  pointer-events: none;
  z-index: 0;
}

.top, .wrap, .foot { position: relative; z-index: 1; }

a {
  color: var(--yellow);
  text-decoration: none;
  transition: color 0.15s ease, opacity 0.15s ease;
}
a:hover { color: var(--yellow-soft); }

.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.95rem 1.75rem;
  border-bottom: 1px solid var(--line);
  background: rgba(7, 7, 7, 0.82);
  backdrop-filter: blur(16px);
  position: sticky;
  top: 0;
  z-index: 20;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--text);
}
.brand:hover { color: var(--text); }

.brand-mark {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: var(--yellow);
  color: #fff;
  font-family: var(--font);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0;
  box-shadow: 0 0 0 1px rgba(61, 140, 255, 0.35), 0 6px 16px rgba(61, 140, 255, 0.15);
}

.brand-text {
  font-family: var(--font);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
}

nav {
  display: flex;
  gap: 0.35rem;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav-link {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 500;
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
}
.nav-link:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}

.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 2rem 1.5rem 3.5rem;
}

.hero {
  margin-bottom: 1.35rem;
  padding: 1.15rem 1.25rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  box-shadow: none;
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--yellow);
}

.hero-eyebrow {
  display: inline-block;
  margin: 0 0 0.45rem;
  color: var(--yellow);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0 0 0.35rem;
  font-family: var(--font);
  font-size: var(--fs-h1);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.25;
}

.hero p {
  color: var(--muted);
  margin: 0.25rem 0;
  max-width: 40rem;
  font-size: 0.9rem;
}

.meta { font-size: var(--fs-meta); color: var(--muted); }
.meta strong { color: var(--text); font-weight: 600; }
.live-note[data-on="1"] { color: var(--yellow-soft); }
.live-note[data-on="1"]::before {
  content: "";
  display: inline-block;
  width: 0.45rem;
  height: 0.45rem;
  margin-right: 0.45rem;
  border-radius: 50%;
  background: var(--yellow);
  box-shadow: 0 0 8px var(--yellow);
  vertical-align: 0.05rem;
}

.page-title {
  font-family: var(--font);
  font-size: var(--fs-h1);
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0 0 0.3rem;
}

.page-sub {
  color: var(--muted);
  margin: 0 0 1.2rem;
  font-size: 0.9rem;
}

.tip {
  background: var(--yellow-dim);
  border: 1px solid var(--yellow-line);
  padding: 0.7rem 0.9rem;
  border-radius: 10px;
  color: #e6d9a0;
  font-size: 0.86rem;
  font-weight: 400;
}

.empty {
  color: var(--muted);
  padding: 2.4rem 1.2rem;
  text-align: center;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.015);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  background: var(--yellow);
  color: #fff;
  font-family: var(--font);
  font-weight: 600;
  font-size: 0.86rem;
  border: 0;
  border-radius: 8px;
  padding: 0.55rem 0.95rem;
  cursor: pointer;
  box-shadow: none;
  transition: background 0.15s ease, color 0.15s ease;
}
.btn:hover {
  background: var(--yellow-soft);
  color: #fff;
  transform: none;
  box-shadow: none;
}
.btn:active { transform: none; }
.btn-sm { padding: 0.45rem 0.8rem; font-size: 0.82rem; box-shadow: none; }
.btn.danger {
  background: var(--danger);
  color: #fff;
  box-shadow: none;
}
.btn.danger:hover { background: #ff7276; color: #fff; }

.btn-ghost {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--line);
  box-shadow: none;
  border-radius: 8px;
  padding: 0.5rem 0.85rem;
  font-weight: 500;
  font-size: 0.86rem;
}
.btn-ghost:hover {
  color: var(--text);
  border-color: #3a3a3a;
  background: rgba(255, 255, 255, 0.03);
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.35rem 1.4rem;
  box-shadow: var(--shadow);
}

.form {
  display: grid;
  gap: 1.05rem;
  max-width: 680px;
}

label {
  display: grid;
  gap: 0.45rem;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 500;
  letter-spacing: 0.01em;
}

input, textarea {
  width: 100%;
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 12px;
  padding: 0.8rem 0.95rem;
  font: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
input:focus, textarea:focus {
  outline: none;
  border-color: var(--yellow);
  box-shadow: 0 0 0 3px rgba(61, 140, 255, 0.15);
}
input::file-selector-button {
  background: var(--panel-2);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.35rem 0.7rem;
  margin-right: 0.7rem;
  font: inherit;
  cursor: pointer;
}

.table-wrap {
  margin-top: 1.25rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: auto;
  background: var(--panel);
  box-shadow: var(--shadow);
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}

th, td {
  text-align: left;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--line);
  font-size: 0.92rem;
  vertical-align: middle;
}

th {
  color: #8f8a7c;
  font-weight: 500;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: rgba(255, 255, 255, 0.02);
  position: sticky;
  top: 0;
}

tr:last-child td { border-bottom: 0; }
tbody tr { transition: background 0.12s ease; }
tbody tr:hover { background: rgba(61, 140, 255, 0.035); }

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: lowercase;
  color: #d8d4c8;
}

.badge-live,
.badge[data-status="running"],
.badge[data-status="transferred"] {
  background: var(--yellow-dim);
  border-color: var(--yellow-line);
  color: var(--yellow);
}

.badge[data-status="done"],
.badge[data-status="finished"] {
  background: var(--ok-dim);
  border-color: rgba(61, 214, 140, 0.28);
  color: var(--ok);
}

.badge[data-status="failed"],
.badge[data-status="transfer_failed"],
.badge[data-status="no_answer"],
.badge[data-status="busy"] {
  background: var(--danger-dim);
  border-color: rgba(255, 90, 95, 0.28);
  color: #ff9a9d;
}

.badge[data-status="repondeur"] {
  background: rgba(255, 180, 40, 0.12);
  border-color: rgba(255, 180, 40, 0.35);
  color: #ffd56a;
}

.badge[data-status="dialing"],
.badge[data-status="queued"],
.badge[data-status="ringing"] {
  background: rgba(61, 140, 255, 0.1);
  border-color: rgba(61, 140, 255, 0.28);
  color: var(--yellow-soft);
}

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(128px, 1fr));
  gap: 0.75rem;
  margin: 1.25rem 0;
}

.stats div {
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.95rem 1rem;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 500;
  position: relative;
  overflow: hidden;
}

.stats div::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 2px;
  background: linear-gradient(90deg, var(--yellow), transparent);
  opacity: 0.7;
}

.stats span {
  display: block;
  color: var(--text);
  font-family: var(--font);
  font-size: var(--fs-stat);
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 0.1rem;
}

.actions {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 0.4rem;
}

.flash {
  list-style: none;
  padding: 0;
  margin: 0 0 1.2rem;
}
.flash li {
  padding: 0.8rem 1rem;
  border-radius: 12px;
  margin-bottom: 0.5rem;
  border: 1px solid transparent;
  font-size: 0.94rem;
}
.flash .ok {
  background: var(--ok-dim);
  border-color: rgba(61, 214, 140, 0.28);
  color: #b7f0d1;
}
.flash .error {
  background: var(--danger-dim);
  border-color: rgba(255, 90, 95, 0.28);
  color: #ffc1c3;
}

code {
  background: rgba(61, 140, 255, 0.1);
  color: var(--yellow-soft);
  padding: 0.12rem 0.4rem;
  border-radius: 6px;
  font-size: 0.86em;
}

audio {
  width: 170px;
  height: 34px;
  vertical-align: middle;
  filter: invert(1) hue-rotate(180deg) brightness(1.15) contrast(0.9);
}

.link-row {
  color: var(--yellow);
  font-weight: 600;
  font-size: 0.9rem;
}
.link-row:hover { text-decoration: underline; }

.foot {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  justify-content: center;
  padding: 1.2rem;
  color: #6f6b60;
  font-size: 0.8rem;
  border-top: 1px solid var(--line);
}

.foot .dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--yellow);
  opacity: 0.55;
}

@media (max-width: 720px) {
  .top {
    flex-direction: column;
    align-items: flex-start;
    padding: 0.9rem 1rem;
  }
  .wrap { padding: 1.25rem 1rem 2.5rem; }
  .hero { padding: 1.2rem; }
  table { min-width: 640px; }
}

.settings-form { display: grid; gap: 1rem; }
.settings-block { margin: 0; }
.settings-title {
  margin: 0 0 1rem;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--text);
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.95rem 1rem;
}
.form-grid .full { grid-column: 1 / -1; }
select {
  width: 100%;
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 12px;
  padding: 0.8rem 0.95rem;
  font: inherit;
}
select:focus {
  outline: none;
  border-color: var(--yellow);
  box-shadow: 0 0 0 3px rgba(61, 140, 255, 0.15);
}
@media (max-width: 720px) {
  .form-grid { grid-template-columns: 1fr; }
}

.advisor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.75rem;
}
.advisor-card {
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.9rem 1rem;
}
.advisor-top {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}
.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #6b675c;
  box-shadow: 0 0 0 3px rgba(107, 103, 92, 0.2);
}
.advisor-card.state-online .status-dot {
  background: #3dd68c;
  box-shadow: 0 0 0 3px rgba(61, 214, 140, 0.2);
}
.advisor-card.state-busy .status-dot,
.advisor-card.state-ringing .status-dot {
  background: var(--yellow);
  box-shadow: 0 0 0 3px rgba(61, 140, 255, 0.2);
}
.advisor-card.state-offline .status-dot {
  background: #6b675c;
}
.advisor-ext, .advisor-state {
  margin: 0.15rem 0;
  color: var(--muted);
  font-size: 0.84rem;
}
.advisor-meta {
  margin: 0.35rem 0 0;
  color: #7d796c;
  font-size: 0.78rem;
}
.advisor-card.state-online .advisor-state { color: #3dd68c; }
.advisor-card.state-busy .advisor-state,
.advisor-card.state-ringing .advisor-state { color: var(--yellow); }
.advisor-card table input { min-width: 0; }
.row-actions {
  display: flex;
  gap: 0.55rem;
  align-items: center;
  flex-wrap: wrap;
}

.login-wrap {
  min-height: 55vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.login-panel {
  width: min(420px, 100%);
}
.login-form {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  margin-top: 1rem;
}
.login-form label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  color: var(--muted);
  font-size: 0.88rem;
}

.lead-card { margin-top: 0.5rem; }
.lead-top { display:flex; justify-content:space-between; align-items:center; gap:0.8rem; }
.lead-fields { display:grid; gap:0.45rem; margin-top:0.9rem; }
.lead-row { display:flex; justify-content:space-between; gap:1rem; padding:0.45rem 0; border-bottom:1px solid var(--line); }
.lead-row span { color: var(--muted); }
.lead-row strong { text-align:right; }

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

/* —— Espace conseiller pro —— */
.agent-desk {
  max-width: 1100px;
  margin: 0 auto;
  min-height: 70vh;
  transition: opacity 0.2s ease;
}
.agent-desk.dimmed { opacity: 0.22; pointer-events: none; }

.agent-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 0.85rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(180deg, #161614, #10100e);
  margin-bottom: 1.25rem;
}
.agent-bar-id {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.agent-avatar {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-weight: 700;
  background: var(--yellow-dim);
  color: var(--yellow);
  border: 1px solid var(--yellow-line);
}
.agent-name {
  display: block;
  font-size: 1.02rem;
  letter-spacing: 0.01em;
}
.agent-login {
  margin: 0.15rem 0 0;
  color: var(--muted);
  font-size: 0.8rem;
}
.agent-bar-status {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}
.agent-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  border: 1px solid rgba(61, 214, 140, 0.28);
  background: var(--ok-dim);
  color: var(--ok);
  font-size: 0.8rem;
  font-weight: 500;
}
.agent-pill.muted {
  border-color: var(--line);
  background: #151513;
  color: var(--muted);
}
.agent-pill.offline {
  border-color: rgba(255, 90, 95, 0.3);
  background: var(--danger-dim);
  color: #ff8a8e;
}
.agent-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #7d796c;
}
.agent-dot.on { background: var(--ok); box-shadow: 0 0 0 3px rgba(61, 214, 140, 0.2); }

.agent-idle {
  display: grid;
  place-items: center;
  min-height: 52vh;
}
.agent-idle-card {
  text-align: center;
  max-width: 420px;
  padding: 2rem 1.2rem;
}
.agent-idle-rings {
  width: 72px;
  height: 72px;
  margin: 0 auto 1.2rem;
  border-radius: 50%;
  border: 2px solid rgba(61, 140, 255, 0.25);
  box-shadow: inset 0 0 0 18px rgba(61, 140, 255, 0.08);
  animation: agent-breathe 2.8s ease-in-out infinite;
}
@keyframes agent-breathe {
  0%, 100% { transform: scale(1); opacity: 0.7; }
  50% { transform: scale(1.06); opacity: 1; }
}
.agent-idle-card h1 {
  margin: 0;
  font-size: 1.45rem;
  font-weight: 650;
}
.agent-idle-card p {
  margin: 0.55rem 0 0;
  color: var(--muted);
}

.agent-live {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 1rem;
  align-items: start;
}
@media (max-width: 860px) {
  .agent-live { grid-template-columns: 1fr; }
}

.agent-live-main,
.agent-live-side {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(180deg, #141412, #0f0f0d);
  padding: 1.25rem 1.2rem 1.35rem;
}
.agent-call-hero {
  text-align: center;
  padding: 0.5rem 0 1.1rem;
  border-bottom: 1px solid var(--line);
}
.agent-call-label {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--ok);
}
.agent-live.on-hold .agent-call-label { color: var(--yellow); }
.agent-call-timer {
  margin: 0.55rem 0 0.15rem;
  font-size: clamp(2.4rem, 7vw, 3.4rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.agent-call-phone {
  margin: 0.55rem 0 0.25rem;
  font-size: 1.45rem;
  font-weight: 650;
}
.agent-call-meta {
  margin: 0.2rem 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.agent-call-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1.2rem;
}
.agent-ctrl {
  min-width: 7.5rem;
  padding: 0.75rem 1.1rem;
  border-radius: 12px;
  border: 1px solid transparent;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.12s ease;
}
.agent-ctrl:hover { transform: translateY(-1px); }
.agent-ctrl.hold {
  background: #1c1a14;
  border-color: var(--yellow-line);
  color: var(--yellow);
}
.agent-ctrl.mute {
  background: #141414;
  border-color: rgba(255, 255, 255, 0.18);
  color: #f2f2f2;
}
.agent-ctrl.mute.is-muted {
  background: rgba(61, 140, 255, 0.12);
  border-color: var(--yellow-line);
  color: var(--yellow);
}
.agent-ctrl.resume {
  background: var(--ok-dim);
  border-color: rgba(61, 214, 140, 0.35);
  color: var(--ok);
}
.agent-ctrl.hang {
  background: var(--danger);
  color: #fff;
}

.agent-transfer {
  margin-top: 1.2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}
.agent-transfer label {
  display: block;
  color: var(--muted);
  font-size: 0.84rem;
  margin-bottom: 0.4rem;
}
.agent-transfer-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.agent-transfer select {
  flex: 1;
  min-width: 12rem;
  padding: 0.55rem 0.7rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #0c0c0b;
  color: var(--text);
}

.agent-live-side h3 {
  margin: 0 0 0.85rem;
  font-size: 0.95rem;
  font-weight: 600;
}
.agent-lead-fields { display: grid; gap: 0; }
.agent-lead-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.9rem;
}
.agent-lead-row span { color: var(--muted); }
.agent-lead-row strong { text-align: right; font-weight: 600; }

/* Notification entrante (seule UI pendant la sonnerie) */
body.incoming-active { overflow: hidden; }
.incoming-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  background:
    radial-gradient(ellipse 70% 50% at 50% 28%, rgba(61, 140, 255, 0.16), transparent 58%),
    rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(10px);
  animation: incoming-fade 0.22s ease;
}
.incoming-overlay[hidden] { display: none !important; }
@keyframes incoming-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}
.incoming-card {
  width: min(400px, 100%);
  text-align: center;
  padding: 2rem 1.4rem 1.5rem;
  border-radius: 24px;
  background: linear-gradient(180deg, #1a1a16 0%, #10100e 100%);
  border: 1px solid rgba(61, 140, 255, 0.32);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
}
.incoming-rings {
  position: relative;
  width: 84px;
  height: 84px;
  margin: 0 auto 1rem;
}
.incoming-rings span {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid rgba(61, 140, 255, 0.5);
  animation: incoming-pulse 1.8s ease-out infinite;
}
.incoming-rings span:nth-child(2) { animation-delay: 0.4s; }
.incoming-rings span:nth-child(3) { animation-delay: 0.8s; }
.incoming-rings::after {
  content: "";
  position: absolute;
  inset: 22px;
  border-radius: 50%;
  background: var(--yellow);
  box-shadow: 0 0 24px rgba(61, 140, 255, 0.4);
}
@keyframes incoming-pulse {
  0% { transform: scale(0.55); opacity: 0.9; }
  100% { transform: scale(1.35); opacity: 0; }
}
.incoming-label {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--yellow);
}
.incoming-timer-hint {
  margin: 0.45rem 0 0;
  font-size: 1.1rem;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  letter-spacing: 0.06em;
}
.incoming-phone {
  margin: 0.35rem 0 0.3rem;
  font-size: clamp(1.55rem, 5vw, 2rem);
  font-weight: 700;
}
.incoming-meta {
  margin: 0.2rem 0;
  color: var(--muted);
  font-size: 0.9rem;
}
.incoming-actions {
  display: flex;
  justify-content: center;
  gap: 2.2rem;
  margin: 1.6rem 0 0.85rem;
}
.incoming-btn {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  border: none;
  font-size: 1.55rem;
  font-weight: 700;
  cursor: pointer;
  color: #fff;
  transition: transform 0.15s ease;
}
.incoming-btn:hover { transform: scale(1.06); }
.incoming-btn.accept {
  background: var(--ok);
  box-shadow: 0 10px 28px rgba(61, 214, 140, 0.35);
}
.incoming-btn.refuse {
  background: var(--danger);
  box-shadow: 0 10px 28px rgba(255, 90, 95, 0.28);
}
.incoming-hint {
  margin: 0;
  color: #7d796c;
  font-size: 0.78rem;
}
.incoming-link-refuse {
  margin-top: 0.85rem;
  background: none;
  border: none;
  color: var(--muted);
  text-decoration: underline;
  cursor: pointer;
  font: inherit;
  font-size: 0.82rem;
}
@media (max-width: 520px) {
  .incoming-card { padding: 1.7rem 1.1rem 1.25rem; }
  .incoming-btn { width: 64px; height: 64px; }
  .agent-bar { padding: 0.75rem 0.9rem; }
}

/* ============================================================
   Finition luxe — néon jaune & noir
   ============================================================ */

::selection { background: var(--yellow); color: #fff; }

html { scrollbar-color: #2a2a2a #050505; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: #050505; }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #2a2a2a, #1a1a1a);
  border-radius: 10px;
  border: 2px solid #050505;
}
::-webkit-scrollbar-thumb:hover { background: var(--yellow); }

body {
  background:
    radial-gradient(ellipse 120% 70% at 50% -10%, rgba(61, 140, 255, 0.07), transparent 55%),
    radial-gradient(ellipse 80% 60% at 50% 120%, rgba(61, 140, 255, 0.04), transparent 60%),
    var(--bg);
}

/* Grain fin, effet matière */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.05;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

.bg-grid {
  background-image:
    linear-gradient(rgba(61, 140, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(61, 140, 255, 0.045) 1px, transparent 1px);
  background-size: 56px 56px;
}
.bg-glow {
  width: 680px;
  height: 680px;
  top: -320px;
  right: auto;
  left: 50%;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(61, 140, 255, 0.14), transparent 65%);
  filter: blur(10px);
}

/* —— Barre du haut —— */
.top {
  background: linear-gradient(180deg, rgba(4, 4, 4, 0.92), rgba(4, 4, 4, 0.78));
  border-bottom: 1px solid transparent;
  border-image: linear-gradient(90deg, transparent, rgba(61, 140, 255, 0.45), transparent) 1;
}

.brand { gap: 0.8rem; }
.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(145deg, #d6e8ff, var(--yellow) 45%, #1a5fd6);
  color: #fff;
  font-family: var(--display);
  font-weight: 800;
  font-size: 1rem;
  box-shadow: var(--neon-glow), inset 0 1px 0 rgba(255, 255, 255, 0.6);
}
.brand-text {
  font-family: var(--display);
  font-weight: 600;
  font-size: 0.98rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.brand-text em {
  font-style: normal;
  color: var(--yellow);
  text-shadow: var(--neon-glow);
}
.brand-flag {
  display: inline-flex;
  align-items: center;
  margin-left: 0.15rem;
  line-height: 0;
}
.brand-flag img,
.flag-il {
  display: inline-block;
  width: 22px;
  height: 16px;
  object-fit: cover;
  border-radius: 2px;
  vertical-align: -2px;
  margin-left: 0.35rem;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.35);
}

.nav-link {
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  position: relative;
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 50%;
  right: 50%;
  bottom: 0.2rem;
  height: 1px;
  background: var(--yellow);
  box-shadow: var(--neon-glow);
  transition: left 0.25s ease, right 0.25s ease;
}
.nav-link:hover { background: transparent; color: var(--text); }
.nav-link:hover::after { left: 0.8rem; right: 0.8rem; }

/* —— Titres —— */
.page-title,
.hero h1,
.agent-idle-card h1 {
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: 0.01em;
}
.hero-eyebrow,
.agent-call-label,
.incoming-label {
  letter-spacing: 0.28em;
  text-shadow: 0 0 12px rgba(61, 140, 255, 0.35);
}

/* —— Panneaux : verre fumé + liseré néon —— */
.hero,
.panel,
.table-wrap,
.agent-bar,
.agent-live-main,
.agent-live-side,
.incoming-card,
.advisor-card {
  position: relative;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.025), rgba(255, 255, 255, 0) 40%),
    linear-gradient(180deg, #101010, #0a0a0a);
  border: 1px solid transparent;
  background-clip: padding-box;
  box-shadow: var(--shadow);
}
.hero::before,
.panel::before,
.table-wrap::before,
.agent-bar::before,
.agent-live-main::before,
.agent-live-side::before,
.incoming-card::before,
.advisor-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: var(--hairline);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}
.hero::after { background: linear-gradient(180deg, var(--yellow), transparent); box-shadow: var(--neon-glow); }
.table-wrap { overflow: auto; }

/* —— Boutons —— */
.btn {
  background: linear-gradient(180deg, #9ec5ff, var(--yellow) 55%, #1a5fd6);
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 0.78rem;
  border-radius: 10px;
  padding: 0.65rem 1.1rem;
  box-shadow: 0 0 0 1px rgba(61, 140, 255, 0.6), 0 8px 22px rgba(61, 140, 255, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.55);
  transition: box-shadow 0.2s ease, transform 0.2s ease, filter 0.2s ease;
}
.btn:hover {
  background: linear-gradient(180deg, #c5dcff, var(--yellow) 55%, #1a5fd6);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 0 0 1px rgba(61, 140, 255, 0.9), var(--neon-glow), inset 0 1px 0 rgba(255, 255, 255, 0.6);
}
.btn:active { transform: translateY(0); filter: brightness(0.95); }
.btn-sm { padding: 0.5rem 0.9rem; font-size: 0.72rem; }
.btn.danger {
  background: linear-gradient(180deg, #ff7a7e, var(--danger));
  box-shadow: 0 8px 22px rgba(255, 90, 95, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}
.btn-ghost {
  border-color: #2a2a2a;
  color: var(--text);
  letter-spacing: 0.04em;
  border-radius: 10px;
}
.btn-ghost:hover {
  border-color: var(--yellow);
  color: var(--yellow);
  background: rgba(61, 140, 255, 0.05);
  box-shadow: 0 0 16px rgba(61, 140, 255, 0.15);
}

/* —— Formulaires —— */
input, textarea, select {
  background: #080808;
  border-color: #222;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.6);
}
input:hover, textarea:hover, select:hover { border-color: #333; }
input:focus, textarea:focus, select:focus {
  border-color: var(--yellow);
  box-shadow: 0 0 0 3px rgba(61, 140, 255, 0.12), 0 0 18px rgba(61, 140, 255, 0.15);
}
label { letter-spacing: 0.04em; }

/* —— Tableaux —— */
th {
  color: var(--yellow);
  opacity: 0.85;
  letter-spacing: 0.16em;
  font-size: 0.66rem;
  background: rgba(8, 8, 8, 0.96);
  border-bottom: 1px solid rgba(61, 140, 255, 0.18);
}
tbody tr { position: relative; }
tbody tr:hover { background: linear-gradient(90deg, rgba(61, 140, 255, 0.07), transparent 60%); }
tbody tr:hover td:first-child { box-shadow: inset 2px 0 0 var(--yellow); }

/* —— Statistiques —— */
.stats div {
  background: linear-gradient(180deg, #121212, #0a0a0a);
  border-color: #1c1c1c;
  border-radius: 14px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 0.68rem;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.stats div:hover { border-color: rgba(61, 140, 255, 0.35); transform: translateY(-2px); }
.stats div::before { height: 1px; opacity: 1; box-shadow: var(--neon-glow); }
.stats span {
  font-family: var(--display);
  font-size: 1.45rem;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  margin-bottom: 0.3rem;
}

/* —— Badges —— */
.badge { letter-spacing: 0.08em; text-transform: uppercase; font-size: 0.64rem; padding: 0.25rem 0.6rem; }
.badge-live,
.badge[data-status="running"],
.badge[data-status="transferred"] {
  box-shadow: 0 0 12px rgba(61, 140, 255, 0.25);
}

.tip { color: #c5d9ff; border-radius: 12px; }

/* —— Pied de page —— */
.foot {
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.66rem;
  border-top: 1px solid transparent;
  border-image: linear-gradient(90deg, transparent, rgba(61, 140, 255, 0.3), transparent) 1;
}
.foot-brand { font-family: var(--display); color: var(--yellow); text-shadow: var(--neon-glow); }
.foot .dot { box-shadow: var(--neon-glow); opacity: 0.8; }

/* —— Connexion —— */
.login-panel { padding: 2rem 1.8rem; }

/* —— Espace conseiller —— */
.agent-avatar {
  font-family: var(--display);
  background: linear-gradient(145deg, #d6e8ff, var(--yellow) 50%, #1a5fd6);
  color: #fff;
  border: 0;
  box-shadow: var(--neon-glow), inset 0 1px 0 rgba(255, 255, 255, 0.6);
}
.agent-name { font-family: var(--display); font-size: 0.95rem; letter-spacing: 0.06em; }
.agent-pill { letter-spacing: 0.06em; font-size: 0.76rem; }
.agent-pill:not(.muted):not(.offline) { box-shadow: 0 0 14px rgba(61, 214, 140, 0.18); }

.agent-idle-rings {
  border-color: rgba(61, 140, 255, 0.5);
  box-shadow: inset 0 0 0 18px rgba(61, 140, 255, 0.08), var(--neon-glow);
}

.agent-call-timer {
  font-family: var(--display);
  font-weight: 600;
  color: var(--yellow);
  text-shadow: var(--neon-glow);
}
.agent-call-phone { font-family: var(--display); font-weight: 600; letter-spacing: 0.04em; }

.agent-ctrl {
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.78rem;
  border-radius: 12px;
}
.agent-ctrl.hold { background: rgba(61, 140, 255, 0.06); }
.agent-ctrl.hold:hover { box-shadow: var(--neon-glow); }
.agent-ctrl.mute.is-muted { box-shadow: var(--neon-glow); }
.agent-ctrl.hang {
  background: linear-gradient(180deg, #ff7a7e, var(--danger));
  box-shadow: 0 8px 22px rgba(255, 90, 95, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.agent-lead-row span { letter-spacing: 0.06em; text-transform: uppercase; font-size: 0.72rem; }

/* —— Appel entrant —— */
.incoming-overlay {
  background:
    radial-gradient(ellipse 70% 50% at 50% 30%, rgba(61, 140, 255, 0.18), transparent 60%),
    rgba(0, 0, 0, 0.92);
}
.incoming-card {
  border-radius: 28px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.7), 0 0 60px rgba(61, 140, 255, 0.12);
}
.incoming-rings span { border-color: rgba(61, 140, 255, 0.7); }
.incoming-rings::after {
  background: radial-gradient(circle at 35% 30%, #d6e8ff, var(--yellow) 55%, #164fae);
  box-shadow: var(--neon-glow);
}
.incoming-phone { font-family: var(--display); font-weight: 600; letter-spacing: 0.03em; }

/* —— Activation poste (mobile) —— */
.activate-overlay {
  position: fixed;
  inset: 0;
  z-index: 2100;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  background:
    radial-gradient(ellipse 70% 50% at 50% 35%, rgba(61, 140, 255, 0.16), transparent 60%),
    rgba(0, 0, 0, 0.94);
  backdrop-filter: blur(10px);
}
.activate-overlay[hidden] { display: none !important; }
.activate-card {
  display: grid;
  justify-items: center;
  gap: 0.6rem;
  width: min(340px, 100%);
  padding: 2.2rem 1.5rem;
  border-radius: 28px;
  border: 1px solid rgba(61, 140, 255, 0.45);
  background: linear-gradient(180deg, #121212, #090909);
  color: var(--text);
  font: inherit;
  cursor: pointer;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.7), 0 0 60px rgba(61, 140, 255, 0.14);
}
.activate-card strong { font-family: var(--display); font-weight: 600; font-size: 1.15rem; letter-spacing: 0.04em; }
.activate-card span:last-child { color: var(--muted); font-size: 0.9rem; }
.activate-icon {
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  margin-bottom: 0.4rem;
  border-radius: 50%;
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.9rem;
  color: #fff;
  background: radial-gradient(circle at 35% 30%, #d6e8ff, var(--yellow) 55%, #164fae);
  box-shadow: var(--neon-glow);
  animation: agent-breathe 2.4s ease-in-out infinite;
}

/* —— Smartphone —— */
@media (max-width: 720px) {
  body { padding-bottom: env(safe-area-inset-bottom); }
  .top {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    padding: calc(0.7rem + env(safe-area-inset-top)) 1rem 0.7rem;
  }
  .brand-text { font-size: 0.72rem; letter-spacing: 0.06em; }
  nav { gap: 0.1rem; }
  .nav-link { padding: 0.5rem 0.55rem; font-size: 0.72rem; }
  .wrap { padding: 1rem 0.85rem 2rem; }

  input, textarea, select { font-size: 16px; }

  .agent-bar { flex-direction: column; align-items: stretch; gap: 0.7rem; }
  .agent-bar-status { justify-content: space-between; }
  .agent-pill { flex: 1; justify-content: center; }

  .agent-idle { min-height: 48vh; }
  .agent-live-main, .agent-live-side { padding: 1rem 0.95rem 1.1rem; border-radius: 16px; }
  .agent-call-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .agent-ctrl { min-width: 0; padding: 0.95rem 0.8rem; font-size: 0.8rem; }
  .agent-ctrl.hang { grid-column: 1 / -1; padding: 1.05rem; }
  .agent-transfer-row { flex-direction: column; }
  .agent-transfer-row .btn-ghost { padding: 0.8rem; }

  .incoming-overlay { padding: 1rem; padding-bottom: calc(1rem + env(safe-area-inset-bottom)); }
  .incoming-card { padding: 1.8rem 1.1rem 1.4rem; }
  .incoming-actions { gap: 3rem; }
  .incoming-btn { width: 78px; height: 78px; font-size: 1.7rem; }

  .foot { flex-wrap: wrap; padding-bottom: calc(1.2rem + env(safe-area-inset-bottom)); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* —— Distinction Admin / Conseiller (login + header) —— */
.space-badge {
  display: inline-flex;
  align-items: center;
  margin-left: 0.35rem;
  padding: 0.22rem 0.55rem;
  border-radius: 999px;
  font-family: var(--display);
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  border: 1px solid transparent;
}
.space-badge-admin {
  color: #fff;
  background: var(--yellow);
  border-color: var(--yellow);
  box-shadow: var(--neon-glow);
}
.space-badge-advisor {
  color: #04140c;
  background: var(--ok);
  border-color: var(--ok);
  box-shadow: 0 0 16px rgba(61, 214, 140, 0.35);
}

.space-chip {
  display: inline-flex;
  align-items: center;
  margin: 0 0 0.85rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font-family: var(--display);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.space-chip-admin {
  color: #fff;
  background: var(--yellow);
  box-shadow: var(--neon-glow);
}
.space-chip-advisor {
  color: #04140c;
  background: var(--ok);
  box-shadow: 0 0 16px rgba(61, 214, 140, 0.35);
}

.space-admin.space-login .bg-glow {
  background: radial-gradient(circle, rgba(61, 140, 255, 0.2), transparent 68%);
}
.space-admin.space-login .bg-grid {
  background-image:
    linear-gradient(rgba(61, 140, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(61, 140, 255, 0.05) 1px, transparent 1px);
}
.login-panel-admin {
  border-color: rgba(61, 140, 255, 0.22) !important;
}
.login-panel-admin .settings-title {
  color: var(--yellow-soft);
}

.space-advisor {
  --accent: #3dd68c;
  --accent-soft: #8af0c0;
  --neon-glow: 0 0 18px rgba(61, 214, 140, 0.4), 0 0 42px rgba(61, 214, 140, 0.16);
  --yellow: #3dd68c;
  --yellow-soft: #8af0c0;
  --yellow-dim: rgba(61, 214, 140, 0.12);
  --yellow-line: rgba(61, 214, 140, 0.32);
  --hairline: linear-gradient(135deg, rgba(61, 214, 140, 0.55), rgba(61, 214, 140, 0.05) 40%, rgba(255, 255, 255, 0.06) 60%, rgba(61, 214, 140, 0.4));
}
.space-advisor .bg-glow {
  background: radial-gradient(circle, rgba(61, 214, 140, 0.18), transparent 68%);
  left: -140px;
  right: auto;
}
.space-advisor .bg-grid {
  background-image:
    linear-gradient(rgba(61, 214, 140, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(61, 214, 140, 0.045) 1px, transparent 1px);
}
.space-advisor .brand-mark {
  background: linear-gradient(145deg, #b8ffd8, var(--ok) 45%, #1fa86a);
  color: #04140c;
}
.space-advisor .top {
  border-bottom-color: rgba(61, 214, 140, 0.18);
}
.login-panel-advisor {
  border-color: rgba(61, 214, 140, 0.28) !important;
}
.login-panel-advisor .settings-title {
  color: var(--accent-soft, #8af0c0);
}
.btn-advisor {
  background: linear-gradient(145deg, #8af0c0, #3dd68c 50%, #1fa86a) !important;
  color: #04140c !important;
  box-shadow: 0 0 18px rgba(61, 214, 140, 0.35) !important;
}
.btn-advisor:hover {
  filter: brightness(1.06);
}

.login-switch {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.86rem;
  display: grid;
  gap: 0.35rem;
}
.login-switch-link {
  font-weight: 600;
  letter-spacing: 0.02em;
}
.login-switch-admin { color: #3d8cff; }
.login-switch-advisor { color: #3dd68c; }
.space-advisor .login-switch-admin { color: #3d8cff; }
.space-admin .login-switch-advisor { color: #3dd68c; }

.btn-icon-trash {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.1rem;
  height: 2.1rem;
  padding: 0;
  border: 1px solid rgba(255, 90, 95, 0.35);
  border-radius: 10px;
  background: rgba(255, 90, 95, 0.08);
  color: #ff8a8e;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background 0.12s ease, transform 0.12s ease, border-color 0.12s ease;
}
.btn-icon-trash:hover {
  background: rgba(255, 90, 95, 0.2);
  border-color: rgba(255, 90, 95, 0.7);
  transform: translateY(-1px);
}

/* —— Mise en page cadrée —— */
.sheet-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.8rem 1.2rem;
  flex-wrap: wrap;
  margin-bottom: 0.65rem;
}
.sheet-head .settings-title { margin: 0; }
.advisor-panel { margin-bottom: 1rem; padding: 0.9rem 1rem 1rem; }
.sheet-panel { margin-top: 0.4rem; }
.panel .table-wrap { margin-top: 0.35rem; box-shadow: none; }

.advisor-list {
  display: flex;
  flex-direction: column;
  max-height: 15.5rem;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #090909;
}
.advisor-row {
  display: grid;
  grid-template-columns: 14px minmax(7rem, 1.4fr) 4.5rem minmax(6rem, 1fr) auto;
  gap: 0.65rem;
  align-items: center;
  min-height: 2.35rem;
  padding: 0.35rem 0.75rem;
  border-bottom: 1px solid #1a1a1a;
  font-size: 0.84rem;
}
.advisor-row:last-child { border-bottom: 0; }
.advisor-row .status-dot { justify-self: center; }
.advisor-row .advisor-name { font-weight: 600; }
.advisor-row .advisor-ext,
.advisor-row .advisor-state,
.advisor-row .advisor-meta { margin: 0; font-size: 0.8rem; }
.advisor-row .advisor-ext { color: #9a9588; font-variant-numeric: tabular-nums; }
.advisor-row .advisor-meta { text-align: right; color: #8d887c; white-space: nowrap; }
.advisor-row.state-online .status-dot { background: #3dd68c; box-shadow: 0 0 0 3px rgba(61, 214, 140, 0.2); }
.advisor-row.state-online .advisor-state { color: #3dd68c; }
.advisor-row.state-busy .status-dot,
.advisor-row.state-ringing .status-dot { background: var(--yellow); box-shadow: 0 0 0 3px rgba(61, 140, 255, 0.2); }
.advisor-row.state-busy .advisor-state,
.advisor-row.state-ringing .advisor-state { color: var(--yellow-soft); }
.advisor-row.state-offline .status-dot { background: #6b675c; }

.account-panel { margin-top: 1rem; }
.account-panel > summary {
  cursor: pointer;
  font-weight: 600;
  letter-spacing: 0.03em;
}
.account-panel > summary::marker { color: var(--yellow); }
.account-panel > .tip { margin-top: 0.8rem; }

.stats.stats-bar {
  grid-template-columns: repeat(auto-fit, minmax(108px, 1fr));
  gap: 0.45rem;
  margin: 0.85rem 0 1rem;
  padding: 0.55rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #0b0b0b;
}
.stats.stats-bar div {
  padding: 0.45rem 0.55rem 0.5rem;
  border-radius: 8px;
  letter-spacing: 0;
  text-transform: none;
  font-size: 0.72rem;
  box-shadow: none;
}
.stats.stats-bar div:hover { transform: none; }
.stats.stats-bar div::before { display: none; }
.stats.stats-bar span {
  font-size: 1.05rem;
  margin-bottom: 0.05rem;
}

.table-wrap.sheet {
  border: 1px solid #e6e6e6;
  border-radius: 8px;
  background: #fff;
  color-scheme: light;
  box-shadow: none;
}
.table-wrap.sheet table {
  min-width: 980px;
  background: #fff;
  color: #1c1c1c;
}
.table-wrap.sheet th,
.table-wrap.sheet td {
  padding: 0.72rem 0.85rem;
  letter-spacing: 0;
  font-size: 0.9rem;
  vertical-align: middle;
  text-align: left;
  color: #1c1c1c;
  background: #fff;
  border-bottom: 1px solid #ececec;
}
.table-wrap.sheet th {
  background: #f4f5f7;
  color: #111;
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0;
  text-transform: none;
  white-space: nowrap;
  opacity: 1;
}
.table-wrap.sheet tbody tr:hover,
.table-wrap.sheet tbody tr:hover td { background: #fafafa; }
.table-wrap.sheet tbody tr:hover td:first-child { box-shadow: none; }
.table-wrap.sheet tr:last-child td { border-bottom: 0; }
.table-wrap.sheet .badge {
  white-space: nowrap;
  text-transform: none;
  letter-spacing: 0;
  border: 0;
  border-radius: 999px;
  padding: 0.18rem 0.6rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: #fff;
  background: #6b7280;
}
.table-wrap.sheet .badge[data-status="done"],
.table-wrap.sheet .badge[data-status="finished"],
.table-wrap.sheet .badge[data-status="transferred"],
.table-wrap.sheet .badge[data-status="running"] {
  background: #1f9d55;
  color: #fff;
}
.table-wrap.sheet .badge[data-status="failed"],
.table-wrap.sheet .badge[data-status="transfer_failed"],
.table-wrap.sheet .badge[data-status="no_answer"],
.table-wrap.sheet .badge[data-status="busy"] {
  background: #e53935;
  color: #fff;
}
.table-wrap.sheet .badge[data-status="paused"],
.table-wrap.sheet .badge[data-status="repondeur"] {
  background: #f59e0b;
  color: #111;
}
.table-wrap.sheet .badge[data-status="pending"],
.table-wrap.sheet .badge[data-status="dialing"],
.table-wrap.sheet .badge[data-status="ringing"],
.table-wrap.sheet .badge[data-status="queued"],
.table-wrap.sheet .badge[data-status="draft"] {
  background: #64748b;
  color: #fff;
}
.table-wrap.sheet audio {
  display: block;
  width: 230px;
  height: 32px;
}
.table-wrap.sheet input[type="text"] {
  padding: 0.38rem 0.5rem;
  border-radius: 8px;
  font-size: 0.84rem;
  background: #fff;
  color: #111;
  border-color: #d5d5d5;
}
.table-wrap.sheet .row-actions { justify-content: flex-end; flex-wrap: nowrap; white-space: nowrap; }
.table-wrap.sheet .call-notes {
  max-width: none;
  color: #222;
  font-size: 0.86rem;
  line-height: 1.35;
  white-space: normal;
}
.table-wrap.sheet a.link-row { color: #1565c0; }
.table-wrap.sheet code { color: #111; }

.calls-table th:nth-child(1),
.calls-table td:nth-child(1) { width: 3.2rem; white-space: nowrap; }
.calls-table th:nth-child(2),
.calls-table td:nth-child(2),
.calls-table th:nth-child(4),
.calls-table td:nth-child(4),
.calls-table th:nth-child(5),
.calls-table td:nth-child(5),
.calls-table th:nth-child(6),
.calls-table td:nth-child(6) { white-space: nowrap; }
.calls-table th:nth-child(7),
.calls-table td:nth-child(7) { width: 15rem; }

.campaigns-table th:nth-child(1),
.campaigns-table td:nth-child(1) { width: 2.4rem; text-align: center; }
.campaigns-table th:nth-child(2),
.campaigns-table td:nth-child(2),
.campaigns-table th:nth-child(5),
.campaigns-table td:nth-child(5),
.campaigns-table th:nth-child(6),
.campaigns-table td:nth-child(6),
.campaigns-table th:nth-child(7),
.campaigns-table td:nth-child(7),
.campaigns-table th:nth-child(8),
.campaigns-table td:nth-child(8) { white-space: nowrap; }

.recordings-table th:nth-child(1),
.recordings-table td:nth-child(1) { width: 2.4rem; text-align: center; }
.recordings-table td:nth-child(4),
.recordings-table td:nth-child(5),
.recordings-table td:nth-child(7) { white-space: nowrap; }

.advisors-table th:nth-child(1),
.advisors-table td:nth-child(1) { width: 3.4rem; text-align: center; }
.advisors-table th:nth-child(2),
.advisors-table td:nth-child(2) { width: 4.5rem; white-space: nowrap; }
.advisors-table th:nth-child(6),
.advisors-table td:nth-child(6) { width: 3rem; text-align: center; }

@media (max-width: 720px) {
  .advisor-row {
    grid-template-columns: 14px minmax(0, 1fr) auto;
  }
  .advisor-row .advisor-ext { display: none; }
}

/* —— Tableau de bord, deux colonnes —— */
.dash {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 292px;
  gap: 1rem;
  align-items: start;
}
.dash-main { display: grid; gap: 1rem; min-width: 0; }
.dash-panel {
  background: #0c0e14;
  border: 1px solid #2a3142;
  border-radius: 18px;
  padding: 0.9rem 0.95rem 1rem;
  box-shadow: none;
}
.dash-panel::before { display: none; }
.dash-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}
.dash-head h2,
.dash-side > h2 {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #e8ebf2;
}
.dash-note {
  margin: 0;
  color: #8b93a7;
  font-size: 0.75rem;
}
.dash-note a { color: #7eb0ff; }
.dash-delete,
.dash-save {
  border: 0;
  border-radius: 10px;
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-size: 0.72rem;
  padding: 0.55rem 0.85rem;
  cursor: pointer;
}
.dash-delete { background: #ff4d6a; }
.dash-delete:hover { background: #ff6b82; }
.dash-save { background: #2f6bff; margin-top: 0.85rem; }
.dash-save:hover { background: #4d82ff; }
.dash-table-wrap {
  overflow: auto;
  border: 1px solid #232a3a;
  border-radius: 12px;
}
.dash-table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
  background: transparent;
}
.dash-table th,
.dash-table td {
  text-align: left;
  padding: 0.62rem 0.55rem;
  border-bottom: 1px solid #1d2433;
  background: transparent;
  color: #e7ebf3;
  font-size: 0.84rem;
  letter-spacing: 0;
  text-transform: none;
  vertical-align: middle;
}
.dash-table th {
  color: #8b93a7;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 1;
}
.dash-table tbody tr:hover,
.dash-table tbody tr:hover td { background: rgba(255, 255, 255, 0.03); }
.dash-table tbody tr:hover td:first-child { box-shadow: none; }
.dash-table .badge {
  background: transparent;
  border: 1px solid #3c455c;
  color: #d5dbe8;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.66rem;
  font-weight: 700;
  border-radius: 999px;
}
.dash-table .badge[data-status="running"] { border-color: #3d8cff; color: #9cc4ff; }
.dash-table .badge[data-status="finished"] { border-color: #1f9d55; color: #7dcea0; }
.dash-table .link-row { color: #7eb0ff; font-weight: 600; }
.dash-table .btn.danger.btn-sm {
  background: #ff4d6a;
  color: #fff;
  border-radius: 8px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.66rem;
  padding: 0.38rem 0.6rem;
  box-shadow: none;
}
.acct-list { display: flex; flex-direction: column; }
.acct-row {
  display: grid;
  grid-template-columns: auto 4.2rem minmax(0, 1fr) auto auto;
  gap: 0.75rem;
  align-items: center;
  min-height: 2.7rem;
  padding: 0.35rem 0.15rem;
  border-bottom: 1px solid #1d2433;
  color: #e7ebf3;
  font-size: 0.88rem;
}
.acct-check {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: #9aa3b8;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.acct-check input { width: auto; accent-color: #2f6bff; }
.acct-ext { color: #9aa3b8; font-variant-numeric: tabular-nums; }
.acct-name { font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-edit,
.acct-add {
  background: none;
  border: 0;
  color: #7eb0ff;
  font: inherit;
  font-size: 0.84rem;
  cursor: pointer;
  padding: 0;
}
.acct-add { margin-top: 0.85rem; }
.acct-edit-fields,
.acct-add-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.6rem;
  padding: 0.55rem 0 0.8rem;
}
.acct-edit-fields[hidden],
.acct-add-form[hidden] { display: none; }
.acct-edit-fields label,
.acct-add-form label { font-size: 0.75rem; }
.acct-add-form { grid-template-columns: minmax(0, 1fr) auto; align-items: end; }
.acct-add-form .dash-save { margin-top: 0; }
.dash-side > h2 { margin-bottom: 0.7rem; }
.side-list { display: flex; flex-direction: column; }
.side-advisor {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 0.65rem;
  align-items: center;
  min-height: 3rem;
  border-bottom: 1px solid #1d2433;
}
.side-avatar {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #1a2030;
  color: #d5dbe8;
  font-size: 0.85rem;
  font-weight: 700;
}
.side-id { display: grid; min-width: 0; }
.side-id strong {
  color: #f2f4f8;
  font-size: 0.84rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.side-id span { color: #8b93a7; font-size: 0.75rem; }
.side-state {
  color: #9aa3b8;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}
.side-advisor.state-online .side-state { color: #3dd68c; }
.side-advisor.state-busy .side-state,
.side-advisor.state-ringing .side-state { color: #9cc4ff; }
.side-foot {
  margin: 0.75rem 0 0;
  color: #8b93a7;
  font-size: 0.78rem;
}
@media (max-width: 980px) {
  .dash { grid-template-columns: 1fr; }
  .acct-edit-fields { grid-template-columns: 1fr; }
}
