/* ═══════════════════════════════════════════════════════
   Vodeon AI — Dashboard CSS
   Inherits design system variables from landing/main.css
   ═══════════════════════════════════════════════════════ */

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

:root {
  --indigo:      #1C1954;
  --indigo-deep: #0D0B2E;
  --indigo-mid:  #2D2A6E;
  --coral:       #F47E60;
  --coral-h:     #E86D4F;
  --lav:         #A78BFA;
  --lav-bg:      #EDE9FE;
  --bg:          #FFFFFF;
  --bg-alt:      #F8FAFC;
  --bg-alt2:     #F1F5F9;
  --border:      #E2E8F0;
  --text:        #1C1954;
  --text-sec:    #64748B;
  --text-muted:  #94A3B8;
  --green:       #10B981;
  --r:           16px;
  --sh-sm: 0 1px 3px rgba(30,27,75,.06), 0 1px 2px rgba(30,27,75,.04);
  --sh-md: 0 4px 16px rgba(30,27,75,.08), 0 2px 6px rgba(30,27,75,.04);
  --sh-lg: 0 24px 56px rgba(30,27,75,.14), 0 8px 18px rgba(30,27,75,.07);
  --sidebar-w: 240px;
}

html { height: 100%; }
body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  background: var(--bg-alt);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

/* ══════════════════════════════════════════
   LAYOUT — Sidebar + Main
   ══════════════════════════════════════════ */

.app-layout {
  display: flex;
  min-height: 100vh;
}

/* ── Sidebar ── */
.sidebar {
  width: var(--sidebar-w);
  min-height: 100vh;
  background: var(--indigo-deep);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
  border-right: 1px solid rgba(255,255,255,.06);
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 24px 20px 20px;
  border-bottom: 1px solid rgba(255,255,255,.07);
  text-decoration: none;
}
.sidebar-logo img {
  height: 70px;
  width: auto;
  filter: brightness(1.1);
}
.sidebar-logo-text {
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -.4px;
  color: #fff;
}

.sidebar-nav {
  flex: 1;
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow-y: auto;
}

.sidebar-section-label {
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: rgba(255,255,255,.3);
  padding: 14px 8px 6px;
  margin-top: 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: .875rem;
  font-weight: 500;
  color: rgba(255,255,255,.6);
  text-decoration: none;
  transition: background .15s, color .15s;
}
.nav-item i { width: 18px; height: 18px; flex-shrink: 0; opacity: .7; transition: opacity .15s; }
.nav-item:hover { background: rgba(255,255,255,.08); color: rgba(255,255,255,.9); }
.nav-item:hover i { opacity: 1; }
.nav-item.active {
  background: rgba(244,126,96,.15);
  color: #fff;
  font-weight: 600;
}
.nav-item.active i { opacity: 1; color: var(--coral); }

.sidebar-site-link {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 12px 10px;
  padding: 11px 14px;
  border-radius: 13px;
  text-decoration: none;
  background: linear-gradient(135deg, rgba(244,126,96,.13) 0%, rgba(167,139,250,.09) 100%);
  border: 1px solid rgba(244,126,96,.22);
  transition: background .2s, border-color .2s, transform .15s;
  position: relative;
  overflow: hidden;
}
.sidebar-site-link::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(244,126,96,.08), rgba(167,139,250,.06));
  opacity: 0;
  transition: opacity .2s;
}
.sidebar-site-link:hover { border-color: rgba(244,126,96,.4); transform: translateY(-1px); }
.sidebar-site-link:hover::before { opacity: 1; }
.sidebar-site-icon {
  width: 28px; height: 28px; border-radius: 8px;
  background: linear-gradient(135deg, rgba(244,126,96,.25), rgba(167,139,250,.2));
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.sidebar-site-icon i { width: 13px; height: 13px; color: var(--coral); }
.sidebar-site-icon img { width: 18px; height: 18px; object-fit: contain; }
.sidebar-site-body { flex: 1; min-width: 0; }
.sidebar-site-label {
  font-size: .72rem; font-weight: 700;
  letter-spacing: .4px; color: rgba(255,255,255,.9);
  display: block;
}
.sidebar-site-sub {
  font-size: .65rem; color: rgba(255,255,255,.4);
  display: block; margin-top: 1px;
}
.sidebar-site-arrow {
  width: 16px; height: 16px;
  color: rgba(255,255,255,.3);
  flex-shrink: 0;
  transition: color .2s, transform .2s;
}
.sidebar-site-link:hover .sidebar-site-arrow {
  color: var(--coral);
  transform: translate(2px, -2px);
}

.sidebar-footer {
  padding: 16px 12px;
  border-top: 1px solid rgba(255,255,255,.07);
  display: flex;
  align-items: center;
  gap: 10px;
}
.user-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--indigo-mid), var(--lav));
  display: flex; align-items: center; justify-content: center;
  font-size: .75rem; font-weight: 700; color: #fff;
  flex-shrink: 0;
}
.user-info { flex: 1; min-width: 0; }
.user-name {
  font-size: .8rem; font-weight: 600;
  color: rgba(255,255,255,.9);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.user-role { font-size: .7rem; color: rgba(255,255,255,.4); }
.sidebar-logout {
  display: flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 8px;
  color: rgba(255,255,255,.35);
  text-decoration: none;
  transition: background .15s, color .15s;
  flex-shrink: 0;
}
.sidebar-logout:hover { background: rgba(255,255,255,.08); color: rgba(255,255,255,.8); }
.sidebar-logout i { width: 16px; height: 16px; }

/* ── Main content ── */
.main-content {
  margin-left: var(--sidebar-w);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.topbar {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: 0 32px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: var(--sh-sm);
}
.topbar-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--indigo);
  letter-spacing: -.3px;
}
.topbar-actions { display: flex; align-items: center; gap: 10px; }

.page-content {
  padding: 32px;
  flex: 1;
}

/* ══════════════════════════════════════════
   UTILITIES
   ══════════════════════════════════════════ */

.tag {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: .7rem; font-weight: 700; letter-spacing: .8px;
  text-transform: uppercase; padding: 4px 10px; border-radius: 100px;
}
.tag-lav    { background: var(--lav-bg);              color: #6D28D9; }
.tag-coral  { background: rgba(244,126,96,.12);       color: var(--coral-h); }
.tag-indigo { background: rgba(30,27,75,.07);         color: var(--indigo); }
.tag-green  { background: rgba(16,185,129,.12);       color: #059669; }
.tag-muted  { background: var(--bg-alt2);             color: var(--text-muted); }
.tag-orange { background: rgba(251,146,60,.12);       color: #D97706; }

.btn {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: inherit; font-size: .875rem; font-weight: 600;
  padding: 9px 18px; border-radius: 10px; cursor: pointer;
  border: none; text-decoration: none; transition: all .15s;
  white-space: nowrap;
}
.btn i { width: 15px; height: 15px; flex-shrink: 0; }
.btn-primary {
  background: var(--coral); color: #fff;
  box-shadow: 0 3px 12px rgba(244,126,96,.35);
}
.btn-primary:hover { background: var(--coral-h); transform: translateY(-1px); box-shadow: 0 6px 20px rgba(244,126,96,.4); }
.btn-outline {
  background: transparent; color: var(--indigo);
  border: 1.5px solid var(--border);
}
.btn-outline:hover { border-color: rgba(30,27,75,.3); background: var(--bg-alt); }
.btn-ghost {
  background: transparent; color: var(--text-sec);
  border: 1.5px solid var(--border);
}
.btn-ghost:hover { background: var(--bg-alt2); color: var(--text); }
.btn-danger { background: rgba(239,68,68,.1); color: #DC2626; border: 1.5px solid rgba(239,68,68,.2); }
.btn-danger:hover { background: rgba(239,68,68,.18); }
.btn-sm { font-size: .8rem; padding: 6px 13px; }
.btn-icon { padding: 8px; border-radius: 8px; }

/* ══════════════════════════════════════════
   CARDS
   ══════════════════════════════════════════ */

.card {
  background: var(--bg);
  border-radius: var(--r);
  box-shadow: var(--sh-md);
  border: 1px solid rgba(30,27,75,.05);
}
.card-header {
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.card-title {
  font-size: .95rem;
  font-weight: 700;
  color: var(--indigo);
  letter-spacing: -.2px;
}
.card-body { padding: 24px; }

/* ── Stat cards ── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}
.stat-card {
  background: var(--bg);
  border-radius: var(--r);
  box-shadow: var(--sh-md);
  border: 1px solid rgba(30,27,75,.05);
  padding: 22px 24px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
}
.stat-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.stat-icon i { width: 20px; height: 20px; }
.stat-icon-indigo { background: rgba(30,27,75,.08); color: var(--indigo); }
.stat-icon-coral  { background: rgba(244,126,96,.12); color: var(--coral); }
.stat-icon-lav    { background: var(--lav-bg); color: #6D28D9; }
.stat-icon-green  { background: rgba(16,185,129,.12); color: var(--green); }
.stat-body { flex: 1; }
.stat-value {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--indigo);
  letter-spacing: -1px;
  line-height: 1;
  margin-bottom: 4px;
}
.stat-label { font-size: .8rem; color: var(--text-sec); font-weight: 500; }
.stat-sub {
  font-size: .75rem;
  color: var(--text-muted);
  margin-top: 6px;
}

/* ══════════════════════════════════════════
   TABLE
   ══════════════════════════════════════════ */

.table-wrap { overflow-x: auto; }
table {
  width: 100%;
  border-collapse: collapse;
  font-size: .875rem;
}
thead th {
  text-align: left;
  padding: 12px 16px;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .8px;
  text-transform: uppercase;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
tbody tr {
  border-bottom: 1px solid rgba(30,27,75,.04);
  transition: background .12s;
}
tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: var(--bg-alt); }
tbody td {
  padding: 14px 16px;
  color: var(--text);
  vertical-align: middle;
}
.td-name { font-weight: 600; }
.td-muted { color: var(--text-sec); font-size: .82rem; }
.td-actions { display: flex; align-items: center; gap: 6px; }

/* Score badge */
.score-badge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 50%;
  font-size: .8rem; font-weight: 700;
}
.score-high   { background: rgba(16,185,129,.12); color: #059669; }
.score-mid    { background: rgba(251,146,60,.12);  color: #D97706; }
.score-low    { background: rgba(239,68,68,.1);   color: #DC2626; }
.score-none   { background: var(--bg-alt2);        color: var(--text-muted); }

/* ══════════════════════════════════════════
   FILTERS BAR
   ══════════════════════════════════════════ */

.filters-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.filter-input, .filter-select {
  font-family: inherit;
  font-size: .85rem;
  color: var(--text);
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 8px 13px;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
  height: 38px;
}
.filter-input:focus, .filter-select:focus {
  border-color: var(--lav);
  box-shadow: 0 0 0 3px rgba(167,139,250,.15);
}
.filter-input { min-width: 220px; }
.filter-select { min-width: 150px; }
.filters-bar .btn { height: 38px; }

/* ══════════════════════════════════════════
   FORMS
   ══════════════════════════════════════════ */

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.form-grid-1 { grid-column: 1 / -1; }

.form-group { display: flex; flex-direction: column; gap: 7px; }
.form-label {
  font-size: .82rem;
  font-weight: 600;
  color: var(--indigo);
  letter-spacing: -.1px;
}
.form-label span { color: var(--coral); margin-left: 2px; }
.form-hint { font-size: .75rem; color: var(--text-muted); }
.form-control {
  font-family: inherit;
  font-size: .9rem;
  color: var(--text);
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 10px 14px;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
  width: 100%;
}
.form-control:focus {
  border-color: var(--lav);
  box-shadow: 0 0 0 3px rgba(167,139,250,.15);
}
textarea.form-control { resize: vertical; min-height: 80px; line-height: 1.6; }
select.form-control { cursor: pointer; }
.form-check {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}
.form-check input[type="checkbox"] {
  width: 18px; height: 18px;
  accent-color: var(--lav);
  cursor: pointer;
}

.form-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 8px;
}

/* Form errors */
.form-error { font-size: .78rem; color: #DC2626; margin-top: 4px; }
.form-control.has-error { border-color: #DC2626; }

/* ══════════════════════════════════════════
   MESSAGES / ALERTS
   ══════════════════════════════════════════ */

.messages { margin-bottom: 20px; display: flex; flex-direction: column; gap: 8px; }
.alert {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px; border-radius: 10px;
  font-size: .875rem; font-weight: 500;
}
.alert i { width: 16px; height: 16px; flex-shrink: 0; }
.alert-success { background: rgba(16,185,129,.1); color: #065f46; border: 1px solid rgba(16,185,129,.2); }
.alert-error   { background: rgba(239,68,68,.08); color: #991b1b; border: 1px solid rgba(239,68,68,.15); }
.alert-info    { background: var(--lav-bg); color: #4c1d95; border: 1px solid rgba(167,139,250,.3); }

/* ══════════════════════════════════════════
   EMPTY STATE
   ══════════════════════════════════════════ */

.empty-state {
  text-align: center;
  padding: 60px 24px;
  color: var(--text-muted);
}
.empty-state i { width: 40px; height: 40px; margin-bottom: 14px; opacity: .4; }
.empty-state h3 { font-size: 1rem; font-weight: 600; color: var(--text-sec); margin-bottom: 6px; }
.empty-state p { font-size: .875rem; }

/* ══════════════════════════════════════════
   PAGE HEADER
   ══════════════════════════════════════════ */

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 16px;
  flex-wrap: wrap;
}
.page-header-left {}
.page-h1 {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--indigo);
  letter-spacing: -.6px;
  line-height: 1.2;
}
.page-sub { font-size: .875rem; color: var(--text-sec); margin-top: 2px; }

/* ══════════════════════════════════════════
   DASHBOARD SPECIFIC
   ══════════════════════════════════════════ */

.greeting {
  margin-bottom: 28px;
}
.greeting-text {
  font-size: 1.55rem;
  font-weight: 800;
  color: var(--indigo);
  letter-spacing: -.6px;
}
.greeting-sub { font-size: .9rem; color: var(--text-sec); margin-top: 4px; }

.mode-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  background: var(--bg);
  border-radius: 12px;
  border: 1.5px solid var(--border);
  box-shadow: var(--sh-sm);
}
.mode-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 3px rgba(16,185,129,.2);
  animation: pulse-dot 2s infinite;
}
.mode-dot.offline { background: var(--text-muted); box-shadow: none; animation: none; }
@keyframes pulse-dot { 0%,100% { box-shadow: 0 0 0 3px rgba(16,185,129,.2); } 50% { box-shadow: 0 0 0 5px rgba(16,185,129,.08); } }
.mode-label { font-size: .82rem; font-weight: 600; color: var(--indigo); }

/* ══════════════════════════════════════════
   LEAD DETAIL
   ══════════════════════════════════════════ */

.lead-hero {
  background: linear-gradient(135deg, var(--indigo-deep) 0%, var(--indigo-mid) 100%);
  border-radius: 20px;
  padding: 32px;
  color: #fff;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.lead-hero-name { font-size: 1.6rem; font-weight: 800; letter-spacing: -.5px; }
.lead-hero-phone { font-size: .9rem; color: rgba(255,255,255,.65); margin-top: 4px; }
.lead-hero-right { text-align: right; }
.lead-score-big {
  font-size: 2.8rem; font-weight: 800; letter-spacing: -2px;
  color: #fff; line-height: 1;
}
.lead-score-label { font-size: .75rem; color: rgba(255,255,255,.5); margin-top: 2px; }

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.info-card {
  background: var(--bg);
  border-radius: 12px;
  padding: 18px 20px;
  border: 1px solid var(--border);
  box-shadow: var(--sh-sm);
}
.info-card-label { font-size: .72rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: .8px; margin-bottom: 6px; }
.info-card-value { font-size: .95rem; font-weight: 600; color: var(--indigo); }

.transcript-box {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  font-size: .85rem;
  line-height: 1.75;
  color: var(--text-sec);
  white-space: pre-wrap;
  max-height: 360px;
  overflow-y: auto;
  font-family: 'Plus Jakarta Sans', sans-serif;
}

.data-list { display: flex; flex-direction: column; gap: 10px; }
.data-item {
  display: flex;
  gap: 12px;
  align-items: baseline;
  padding: 10px 14px;
  background: var(--bg-alt);
  border-radius: 10px;
  border: 1px solid var(--border);
}
.data-key {
  font-size: .78rem; font-weight: 700; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: .6px;
  min-width: 150px; flex-shrink: 0;
}
.data-val { font-size: .875rem; color: var(--text); }

/* ══════════════════════════════════════════
   PROPERTIES
   ══════════════════════════════════════════ */

.property-card {
  background: var(--bg);
  border-radius: 14px;
  border: 1px solid var(--border);
  padding: 20px;
  box-shadow: var(--sh-sm);
  display: flex;
  align-items: center;
  gap: 16px;
  transition: box-shadow .15s;
}
.property-card:hover { box-shadow: var(--sh-md); }
.property-icon {
  width: 44px; height: 44px; border-radius: 12px;
  background: rgba(30,27,75,.07);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  color: var(--indigo);
}
.property-icon i { width: 20px; height: 20px; }
.property-body { flex: 1; min-width: 0; }
.property-address {
  font-size: .9rem; font-weight: 600; color: var(--indigo);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.property-meta { font-size: .8rem; color: var(--text-sec); margin-top: 2px; }
.property-actions { display: flex; align-items: center; gap: 6px; }

.properties-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Toggle switch */
.toggle-switch { position: relative; display: inline-flex; align-items: center; cursor: pointer; }
.toggle-switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.toggle-track {
  width: 36px; height: 20px;
  background: var(--bg-alt2);
  border-radius: 100px;
  border: 1.5px solid var(--border);
  position: relative;
  transition: background .2s, border-color .2s;
}
.toggle-track::after {
  content: '';
  position: absolute;
  top: 2px; left: 2px;
  width: 12px; height: 12px;
  background: var(--text-muted);
  border-radius: 50%;
  transition: transform .2s, background .2s;
}
.toggle-switch input:checked + .toggle-track { background: var(--green); border-color: var(--green); }
.toggle-switch input:checked + .toggle-track::after { transform: translateX(16px); background: #fff; }

/* ══════════════════════════════════════════
   SCRIPT PAGE
   ══════════════════════════════════════════ */

.raison-item {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 18px;
  margin-bottom: 10px;
}
.raison-header {
  display: flex; align-items: center; gap: 10px; margin-bottom: 6px;
}
.raison-key {
  font-size: .72rem; font-weight: 700; color: var(--text-muted);
  background: var(--bg-alt2); padding: 2px 8px; border-radius: 6px;
  font-family: monospace; letter-spacing: .5px;
}
.raison-label { font-size: .875rem; font-weight: 600; color: var(--indigo); }
.raison-flow { font-size: .82rem; color: var(--text-sec); }

/* ══════════════════════════════════════════
   SETTINGS
   ══════════════════════════════════════════ */

.settings-section { margin-bottom: 32px; }
.settings-title {
  font-size: .82rem; font-weight: 700; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 1px;
  margin-bottom: 16px; padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.settings-info-row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px;
  background: var(--bg-alt);
  border-radius: 10px;
  border: 1px solid var(--border);
  margin-bottom: 10px;
  min-width: 0;
}
.settings-info-label {
  font-size: .8rem; font-weight: 600; color: var(--text-sec);
  flex: 0 0 auto;
  min-width: 110px;
}
.settings-info-value {
  font-size: .875rem; color: var(--text); font-weight: 500;
  flex: 1 1 auto;
  min-width: 0;
  text-align: right;
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* ══════════════════════════════════════════
   LOGIN PAGE
   ══════════════════════════════════════════ */

.login-page {
  min-height: 100vh;
  background: linear-gradient(135deg, var(--indigo-deep) 0%, #0f0e3a 50%, var(--indigo-deep) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  position: relative;
  overflow: hidden;
}
.login-page::before {
  content: '';
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
}
.login-orb {
  position: absolute; border-radius: 50%; pointer-events: none;
  filter: blur(80px); opacity: .35;
}
.login-orb-1 { width: 400px; height: 400px; top: -100px; right: -100px; background: radial-gradient(circle, var(--lav) 0%, transparent 70%); }
.login-orb-2 { width: 300px; height: 300px; bottom: -80px; left: -80px; background: radial-gradient(circle, var(--coral) 0%, transparent 70%); }

.login-card {
  position: relative; z-index: 1;
  background: rgba(255,255,255,.97);
  border-radius: 24px;
  padding: 40px;
  width: 100%;
  max-width: 420px;
  box-shadow: var(--sh-lg);
}
.login-logo {
  display: flex; align-items: center; gap: 12px;
  justify-content: center;
  width: fit-content;
  margin: 0 auto 28px;
}
.login-logo-link {
  text-decoration: none;
  display: flex; align-items: center; gap: 12px;
  transition: opacity .15s;
}
.login-logo-link:hover { opacity: .85; }
.login-logo-img-wrap {
  width: 56px; height: 56px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(30,27,75,.06) 0%, rgba(167,139,250,.12) 100%);
  border: 1.5px solid rgba(30,27,75,.08);
  box-shadow: 0 4px 14px rgba(30,27,75,.1);
  display: flex; align-items: center; justify-content: center;
  padding: 6px;
  flex-shrink: 0;
}
.login-logo-img-wrap img { width: 100%; height: 100%; object-fit: contain; }
.login-logo img { height: 44px; width: auto; }
.login-logo-img { height: 72px !important; width: auto; display: block; }
.login-logo-link { display: inline-flex; justify-content: center; }
.login-logo-text { font-size: 1.35rem; font-weight: 800; color: var(--indigo); letter-spacing: -.6px; }
.login-title {
  font-size: 1.35rem; font-weight: 800; color: var(--indigo);
  letter-spacing: -.5px; text-align: center; margin-bottom: 6px;
}
.login-sub { font-size: .875rem; color: var(--text-sec); text-align: center; margin-bottom: 28px; }
.login-form { display: flex; flex-direction: column; gap: 16px; }
.login-form .form-label { color: var(--indigo); font-size: .85rem; }
.login-form .form-control { height: 46px; }
.login-submit {
  height: 46px; width: 100%;
  background: var(--indigo); color: #fff;
  font-family: inherit; font-size: .95rem; font-weight: 700;
  border: none; border-radius: 12px; cursor: pointer;
  transition: background .15s, transform .15s, box-shadow .15s;
  box-shadow: 0 4px 20px rgba(30,27,75,.3);
  margin-top: 4px;
}
.login-submit:hover { background: var(--indigo-mid); transform: translateY(-1px); box-shadow: 0 8px 28px rgba(30,27,75,.35); }
.login-error {
  background: rgba(239,68,68,.08); color: #991b1b;
  border: 1px solid rgba(239,68,68,.2);
  border-radius: 10px; padding: 11px 14px;
  font-size: .84rem; text-align: center;
}

/* ══════════════════════════════════════════
   CLICKABLE ROWS
   ══════════════════════════════════════════ */

tr.row-clickable { cursor: pointer; }
tr.row-clickable:hover { background: var(--bg-alt) !important; }

/* ══════════════════════════════════════════
   CALLS PAGE
   ══════════════════════════════════════════ */

.call-status { display: flex; align-items: center; gap: 6px; }
.call-duration { color: var(--text-sec); font-size: .82rem; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.status-completed { background: var(--green); }
.status-in_progress { background: var(--coral); animation: pulse-dot 2s infinite; }
.status-ringing  { background: #FBBF24; }
.status-failed   { background: #EF4444; }

/* ══════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════ */

@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); transition: transform .25s; }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; }
  .page-content { padding: 20px 16px; }
  .topbar { padding: 0 16px; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .lead-hero { flex-direction: column; }
  .lead-hero-right { text-align: left; }
  .menu-toggle { display: flex !important; }
}

.menu-toggle {
  display: none;
  align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 9px;
  background: var(--bg-alt2); border: none; cursor: pointer;
  color: var(--indigo);
}
.menu-toggle i { width: 18px; height: 18px; }


/* ═══════════════════════════════════════════════════════
   VISUAL UPGRADE — aligne le dashboard sur la landing
   (halos lavande, gradients, hover lift, focus premium)
   ═══════════════════════════════════════════════════════ */

/* ── Ambient halo derrière le contenu principal ── */
.main-content {
  position: relative;
  background:
    radial-gradient(700px 340px at 90% -80px, rgba(167,139,250,.08), transparent 60%),
    radial-gradient(600px 320px at 5% 12%,  rgba(244,126,96,.06), transparent 60%),
    var(--bg-alt);
}

/* ── Sidebar : dégradé subtil + logo cadré ── */
.sidebar {
  background:
    radial-gradient(360px 220px at 20% 0%,  rgba(167,139,250,.14), transparent 65%),
    radial-gradient(300px 240px at 80% 100%, rgba(244,126,96,.10), transparent 65%),
    var(--indigo-deep);
}
.sidebar-logo {
  padding: 18px 20px 16px !important;
  justify-content: center;
}
.sidebar-logo img {
  height: 70px !important;
  width: auto;
  filter: brightness(1.05);
}

/* Active item : accent latéral coral + gradient discret */
.nav-item.active {
  background: linear-gradient(90deg, rgba(244,126,96,.22) 0%, rgba(244,126,96,.05) 100%);
  position: relative;
  box-shadow: inset 3px 0 0 var(--coral);
}
.nav-item.active i { color: var(--coral); }

/* ── Topbar : glass + hairline lavande ── */
.topbar {
  background: rgba(255,255,255,.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(30,27,75,.08);
  box-shadow: 0 1px 0 rgba(30,27,75,.02), 0 4px 24px rgba(30,27,75,.04);
}

/* ── Greeting : accent gradient + petit halo ── */
.greeting {
  position: relative;
  padding: 2px 0 4px 16px;
  border-left: 3px solid transparent;
  border-image: linear-gradient(180deg, var(--coral) 0%, var(--lav) 100%) 1;
}
.greeting-text {
  background: linear-gradient(135deg, var(--indigo) 0%, #4C1D95 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ── Page header : underline gradient sous H1 ── */
.page-h1 {
  position: relative;
  display: inline-block;
}
.page-h1::after {
  content: "";
  position: absolute;
  left: 0; bottom: -8px;
  width: 42px; height: 3px;
  background: linear-gradient(90deg, var(--coral), var(--lav));
  border-radius: 100px;
}
.page-header { margin-bottom: 32px; }

/* ── Stat cards : halo derrière icon + gradient border top + hover lift ── */
.stat-card {
  position: relative;
  overflow: hidden;
  transition: transform .18s cubic-bezier(.25,.46,.45,.94), box-shadow .18s;
}
.stat-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--coral), var(--lav));
  opacity: 0;
  transition: opacity .2s;
}
.stat-card::after {
  content: "";
  position: absolute;
  top: -30px; left: -30px;
  width: 120px; height: 120px;
  background: radial-gradient(circle, rgba(167,139,250,.18), transparent 70%);
  filter: blur(24px);
  pointer-events: none;
  opacity: 0;
  transition: opacity .25s;
}
.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--sh-lg);
}
.stat-card:hover::before,
.stat-card:hover::after { opacity: 1; }

.stat-icon {
  position: relative;
  transition: transform .2s;
}
.stat-card:hover .stat-icon { transform: scale(1.06); }

/* Per-icon halo tint */
.stat-icon-indigo { box-shadow: 0 0 0 4px rgba(30,27,75,.04); }
.stat-icon-coral  { box-shadow: 0 0 0 4px rgba(244,126,96,.08); }
.stat-icon-lav    { box-shadow: 0 0 0 4px rgba(167,139,250,.10); }
.stat-icon-green  { box-shadow: 0 0 0 4px rgba(16,185,129,.08); }

/* Value counter animation on load */
.stat-value {
  background: linear-gradient(135deg, var(--indigo) 0%, var(--indigo-mid) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ── Cards : hover lift subtil ── */
.card {
  transition: transform .18s cubic-bezier(.25,.46,.45,.94), box-shadow .18s, border-color .2s;
}
.card:hover {
  transform: translateY(-1px);
  box-shadow: var(--sh-lg);
  border-color: rgba(167,139,250,.18);
}
.card-header {
  background: linear-gradient(180deg, rgba(248,250,252,.6), transparent);
}
.card-title::before {
  content: "";
  display: inline-block;
  width: 4px; height: 14px;
  background: linear-gradient(180deg, var(--coral), var(--lav));
  border-radius: 100px;
  margin-right: 10px;
  vertical-align: -2px;
}

/* ── Mode toggle : mini glow ── */
.mode-toggle {
  background: rgba(255,255,255,.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-color: rgba(30,27,75,.08);
  transition: box-shadow .2s, transform .15s;
}
.mode-toggle:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(30,27,75,.08);
}

/* ── Tables : sticky thead + row lift ── */
.card > .table-wrap { border-radius: 0 0 var(--r) var(--r); overflow: hidden; }
thead th {
  background: linear-gradient(180deg, var(--bg-alt), var(--bg));
  position: sticky;
  top: 0;
  z-index: 2;
}
tbody tr { position: relative; }
tbody tr::after {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--coral), var(--lav));
  opacity: 0;
  transition: opacity .15s;
}
tbody tr:hover { background: linear-gradient(90deg, rgba(167,139,250,.04), transparent) !important; }
tbody tr:hover::after { opacity: 1; }
tr.row-clickable:hover {
  background: linear-gradient(90deg, rgba(167,139,250,.05), transparent) !important;
}

/* Score badge glow */
.score-badge { transition: transform .15s, box-shadow .2s; }
tbody tr:hover .score-badge { transform: scale(1.06); }
.score-high { box-shadow: 0 0 0 4px rgba(16,185,129,.06); }
.score-mid  { box-shadow: 0 0 0 4px rgba(251,146,60,.08); }
.score-low  { box-shadow: 0 0 0 4px rgba(239,68,68,.06); }

/* ── Forms : focus premium ── */
.form-control,
.filter-input,
.filter-select {
  background: var(--bg);
  transition: border-color .18s, box-shadow .18s, background .18s;
}
.form-control:hover,
.filter-input:hover,
.filter-select:hover {
  border-color: rgba(167,139,250,.35);
}
.form-control:focus,
.filter-input:focus,
.filter-select:focus {
  border-color: var(--lav);
  box-shadow:
    0 0 0 4px rgba(167,139,250,.15),
    0 2px 10px rgba(167,139,250,.10);
  background: #FCFCFF;
}

/* ── Tag pill : bord subtil pour crédibilité ── */
.tag {
  transition: transform .15s, box-shadow .15s;
}

/* ── Buttons : glow au hover ── */
.btn-primary {
  background: linear-gradient(180deg, var(--coral) 0%, var(--coral-h) 100%);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(244,126,96,.42);
}

/* ── Empty state : décoration ── */
.empty-state {
  position: relative;
}
.empty-state::before {
  content: "";
  position: absolute;
  inset: 20% 30%;
  background: radial-gradient(circle, rgba(167,139,250,.08), transparent 70%);
  pointer-events: none;
}
.empty-state i {
  color: var(--lav);
  opacity: .55;
  filter: drop-shadow(0 4px 10px rgba(167,139,250,.25));
}

/* ── Lead hero : ajouter aurora glow ── */
.lead-hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(500px 260px at 90% 20%, rgba(167,139,250,.25), transparent 60%),
    radial-gradient(400px 240px at 10% 90%, rgba(244,126,96,.22), transparent 60%),
    linear-gradient(135deg, var(--indigo-deep) 0%, var(--indigo-mid) 100%);
  box-shadow: 0 12px 40px rgba(13,11,46,.25);
}
.lead-hero::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.03) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  mask-image: radial-gradient(ellipse at 50% 50%, black 30%, transparent 90%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 50%, black 30%, transparent 90%);
}
.lead-hero > * { position: relative; z-index: 1; }

/* Info cards hover */
.info-card { transition: transform .15s, box-shadow .18s, border-color .2s; }
.info-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--sh-md);
  border-color: rgba(167,139,250,.25);
}

/* ── Property card : hover premium ── */
.property-card { transition: transform .18s, box-shadow .2s, border-color .2s; }
.property-card:hover {
  transform: translateY(-2px);
  border-color: rgba(167,139,250,.25);
  box-shadow: var(--sh-md);
}
.property-icon {
  background: linear-gradient(135deg, rgba(30,27,75,.06), rgba(167,139,250,.14));
  box-shadow: 0 0 0 4px rgba(167,139,250,.06);
}

/* ── Settings info rows : hover ── */
.settings-info-row {
  transition: border-color .2s, background .2s;
}
.settings-info-row:hover {
  border-color: rgba(167,139,250,.25);
  background: rgba(167,139,250,.04);
}

/* ── Sidebar site link : reinforce ── */
.sidebar-site-link {
  background: linear-gradient(135deg, rgba(244,126,96,.16) 0%, rgba(167,139,250,.10) 100%);
}

/* ── Reveal animation on page load ── */
@keyframes vd-fade-up {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
.stat-card { animation: vd-fade-up .4s cubic-bezier(.25,.46,.45,.94) both; }
.stat-card:nth-child(1) { animation-delay: .05s; }
.stat-card:nth-child(2) { animation-delay: .12s; }
.stat-card:nth-child(3) { animation-delay: .19s; }
.stat-card:nth-child(4) { animation-delay: .26s; }
.greeting, .page-header, .card {
  animation: vd-fade-up .5s cubic-bezier(.25,.46,.45,.94) both;
}

@media (prefers-reduced-motion: reduce) {
  .stat-card, .card, .greeting, .page-header { animation: none; }
  .stat-card:hover, .card:hover, .info-card:hover, .property-card:hover,
  .mode-toggle:hover { transform: none; }
}

/* ── Responsive tweaks ── */
@media (max-width: 768px) {
  .greeting { padding-left: 12px; }
  .stat-card { padding: 20px; }
}
