/* Soigna — Dashboard preview & full dashboard page */

/* used inside hero (smaller) and as full page */
.dp {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  font-family: var(--font-sans);
  color: var(--ink);
}
.dp-window {
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  background: var(--surface);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.dp-chrome {
  height: 36px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 6px;
  padding: 0 14px;
}
.dp-chrome .tl {
  width: 11px; height: 11px; border-radius: 50%;
  background: rgba(14, 44, 92, 0.18);
}
.dp-chrome .url {
  flex: 1; margin-left: 10px;
  background: var(--bg);
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 11.5px; color: var(--muted);
  font-family: "JetBrains Mono", ui-monospace, monospace;
  display: inline-flex; align-items: center; gap: 6px;
}

.dp-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.dp-header .dp-logo { font-weight: 800; color: var(--primary); font-size: 18px; letter-spacing: -0.02em; }
.dp-header .dp-user { display: flex; align-items: center; gap: 14px; font-size: 13.5px; color: var(--ink-2); }
.dp-header .dp-user .badge {
  background: var(--urgent-bg); color: var(--urgent);
  font-size: 12px; font-weight: 600;
  padding: 3px 10px; border-radius: 999px;
}

.dp-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  min-height: 600px;
}
@media (max-width: 920px) { .dp-layout { grid-template-columns: 1fr; } }

.dp-side {
  background: var(--surface-2);
  border-right: 1px solid var(--border);
  padding: 20px 14px;
  display: flex; flex-direction: column; gap: 4px;
}
@media (max-width: 920px) { .dp-side { display: none; } }
.dp-side h4 { font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted-2); padding: 12px 10px 6px; margin: 0; }
.dp-side a {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px;
  border-radius: 8px;
  font-size: 14px;
  color: var(--ink-2);
  font-weight: 500;
}
.dp-side a.active {
  background: var(--surface);
  color: var(--primary);
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(14,44,92,0.05);
}
.dp-side a .ico { width: 16px; height: 16px; color: currentColor; opacity: 0.7; }
.dp-side .pill { margin-left: auto; font-size: 11px; background: var(--urgent); color: white; padding: 1px 7px; border-radius: 999px; font-weight: 600; }

.dp-main {
  padding: 28px;
  background: var(--bg);
}
.dp-pagetitle { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.dp-pagetitle h2 { font-size: 24px; letter-spacing: -0.015em; }
.dp-pagetitle .meta { font-size: 13px; color: var(--muted); }

.dp-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 20px;
}
@media (max-width: 760px) { .dp-stats { grid-template-columns: repeat(2, 1fr); } }
.dp-stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 18px 18px;
}
.dp-stat .lbl { font-size: 12.5px; color: var(--muted); font-weight: 500; }
.dp-stat .val { font-size: 30px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; margin-top: 6px; }
.dp-stat .delta { font-size: 12px; margin-top: 4px; color: var(--success); }
.dp-stat .delta.neg { color: var(--urgent); }
.dp-stat.is-urgent .val { color: var(--urgent); }
.dp-stat.is-new .val { color: var(--warn); }

.dp-sparkline {
  width: 100%; height: 28px; margin-top: 8px;
  display: block;
}

.dp-row2 {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 14px;
  margin-bottom: 20px;
}
@media (max-width: 880px) { .dp-row2 { grid-template-columns: 1fr; } }

.dp-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 20px;
}
.dp-card h3 { font-size: 15px; margin-bottom: 12px; font-weight: 600; }
.dp-card .sub { font-size: 12.5px; color: var(--muted); margin-top: -8px; margin-bottom: 14px; }

/* Mini chart */
.chart-bars { display: flex; align-items: flex-end; gap: 10px; height: 140px; padding-bottom: 24px; border-bottom: 1px solid var(--border); position: relative; }
.chart-bar { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; position: relative; }
.chart-bar .bar { width: 100%; background: var(--primary-500); border-radius: 6px 6px 0 0; min-height: 4px; position: relative; }
.chart-bar.urgent .bar { background: var(--urgent); }
.chart-bar.warn .bar { background: var(--warn); }
.chart-bar .lbl { position: absolute; bottom: -22px; font-size: 12px; color: var(--muted); white-space: nowrap; }
.chart-bar .num { position: absolute; top: -18px; font-size: 11px; font-weight: 600; color: var(--ink-2); }

/* Filter row */
.dp-filters {
  display: flex; gap: 6px; align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 6px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.dp-filter {
  background: transparent; border: 0; cursor: pointer;
  padding: 8px 14px;
  border-radius: 8px;
  font: inherit;
  font-size: 13.5px; font-weight: 500;
  color: var(--ink-2);
  display: inline-flex; align-items: center; gap: 6px;
}
.dp-filter:hover { background: var(--bg); }
.dp-filter.active { background: var(--ink); color: white; }
.dp-filter .cnt { font-size: 11px; padding: 1px 7px; background: var(--urgent); color: white; border-radius: 999px; font-weight: 600; }
.dp-filter.active .cnt { background: rgba(255,255,255,0.15); color: white; }
.dp-spacer { flex: 1; }
.dp-select {
  appearance: none;
  padding: 8px 30px 8px 14px;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: var(--surface);
  font: inherit; font-size: 13.5px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'><path fill='%235B6478' d='M0 0h10L5 6z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 10px center;
}

/* Call card */
.calls { display: flex; flex-direction: column; gap: 12px; }
.call {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 18px 20px;
  display: flex; flex-direction: column; gap: 12px;
  position: relative;
}
.call.is-urgent { border-color: rgba(217,75,58,0.3); border-left: 3px solid var(--urgent); }
.call.is-new { border-color: rgba(199,122,10,0.25); }
.call.is-done { opacity: 0.7; }
.call-head {
  display: flex; align-items: center; gap: 12px;
  flex-wrap: wrap;
}
.call-head .who { font-weight: 600; font-size: 14.5px; display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2); }
.call-head .time { margin-left: auto; font-size: 12.5px; color: var(--muted); }
.call-body { font-size: 14.5px; color: var(--ink-2); line-height: 1.5; }
.call-body .quote { color: var(--ink); }
.transcript-toggle { font-size: 13px; color: var(--primary-600); font-weight: 500; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; }

.audio {
  display: flex; align-items: center; gap: 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 14px 6px 6px;
}
.audio .play {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--primary); color: white;
  border: 0; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
}
.audio .wave { flex: 1; height: 22px; display: flex; align-items: center; gap: 2px; }
.audio .wave .bit { width: 2px; background: var(--primary-100); border-radius: 2px; }
.audio .wave .bit.on { background: var(--primary-600); }
.audio .ts { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; font-family: "JetBrains Mono", ui-monospace, monospace; }

.call-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.call-actions .btn { height: 36px; padding: 0 14px; font-size: 13.5px; border-radius: 8px; }
.call-actions .btn-primary { background: var(--primary); }
.call-actions .btn-icon { padding: 0 10px; }
.call-actions .btn-danger { background: transparent; color: var(--urgent); border-color: transparent; }
.call-actions .btn-danger:hover { background: var(--urgent-bg); }

/* Schedule / agenda card on dashboard */
.agenda-list { display: flex; flex-direction: column; gap: 10px; }
.agenda-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.agenda-item:last-child { border-bottom: 0; }
.agenda-time {
  font-variant-numeric: tabular-nums;
  font-weight: 600; font-size: 13.5px;
  color: var(--ink-2);
  flex: 0 0 56px;
}
.agenda-body { flex: 1; font-size: 13.5px; }
.agenda-body .who { color: var(--ink); font-weight: 500; }
.agenda-body .meta { color: var(--muted); font-size: 12.5px; }
.agenda-tag {
  font-size: 11px; padding: 2px 8px; border-radius: 999px; font-weight: 600;
}

/* Activity timeline */
.activity { display: flex; flex-direction: column; gap: 0; }
.activity-row {
  display: grid; grid-template-columns: 80px 1fr;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13.5px;
}
.activity-row:last-child { border: 0; }
.activity-time { color: var(--muted); font-variant-numeric: tabular-nums; }
.activity-text strong { color: var(--ink); }

/* Settings page */
.settings-shell {
  max-width: 880px;
  margin: 0 auto;
}
.settings-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 32px;
  margin-bottom: 20px;
}
.settings-card-head {
  display: flex; align-items: center; gap: 16px;
  margin-bottom: 24px;
}
.settings-card-head .ico-bx {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: var(--primary-50);
  color: var(--primary-600);
  display: inline-flex; align-items: center; justify-content: center;
}
.settings-card-head.is-success .ico-bx { background: var(--success-bg); color: var(--success); }
.settings-card-head.is-danger .ico-bx { background: var(--urgent-bg); color: var(--urgent); }
.settings-card-head h3 { font-size: 18px; }
.settings-card-head p { margin: 2px 0 0; color: var(--muted); font-size: 13.5px; }

.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 700px) { .field-grid { grid-template-columns: 1fr; } }
.field { display: flex; flex-direction: column; gap: 8px; }
.field label { font-size: 13.5px; font-weight: 500; color: var(--ink-2); }
.field input, .field textarea, .field select {
  background: var(--bg);
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  padding: 12px 14px;
  font: inherit; font-size: 14.5px;
  color: var(--ink);
}
.field input:focus, .field textarea:focus { outline: 2px solid var(--primary-100); border-color: var(--primary-600); }
.field textarea { resize: vertical; min-height: 110px; line-height: 1.6; }
.field-hint { font-size: 12.5px; color: var(--muted); }

.phone-display {
  background: var(--primary-50);
  border: 1px solid var(--primary-100);
  border-radius: 12px;
  padding: 22px;
  text-align: center;
}
.phone-display .lbl { font-size: 13px; color: var(--primary-700); }
.phone-display .num { font-size: 30px; font-weight: 700; letter-spacing: -0.01em; color: var(--primary); font-variant-numeric: tabular-nums; margin-top: 6px; }

.codes-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 18px; }
@media (max-width: 600px) { .codes-grid { grid-template-columns: 1fr; } }
.code-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
}
.code-card .op { font-size: 12.5px; color: var(--muted); font-weight: 500; margin-bottom: 6px; }
.code-card .val {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  color: var(--primary-700); font-weight: 600;
  background: var(--primary-50);
  padding: 8px 12px; border-radius: 8px;
  font-size: 13px;
}
.code-card .val button {
  background: transparent; border: 0; color: var(--primary-600); cursor: pointer;
  padding: 2px 6px; font-size: 11px; font-weight: 600; border-radius: 4px;
}
.code-card .val button:hover { background: var(--primary-100); }

.danger-zone {
  border: 1px solid rgba(217,75,58,0.25);
  background: var(--urgent-bg);
  border-radius: var(--r-md);
  padding: 18px 20px;
  margin-top: 6px;
}
.danger-zone p { margin: 0; font-size: 13.5px; color: var(--urgent); }

.alert-box {
  display: flex; gap: 10px; align-items: flex-start;
  background: var(--urgent-bg);
  border: 1px solid rgba(217,75,58,0.2);
  border-radius: var(--r-md);
  padding: 14px 16px;
  margin: 18px 0;
  font-size: 13.5px;
  color: var(--urgent);
}
.alert-box svg { flex: 0 0 18px; margin-top: 1px; }

/* Toggle */
.toggle-row { display: flex; align-items: center; justify-content: space-between; padding: 14px 0; border-bottom: 1px solid var(--border); }
.toggle-row:last-child { border-bottom: 0; }
.toggle-row .label .t { font-weight: 500; font-size: 14.5px; }
.toggle-row .label .d { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.toggle {
  --w: 38px; --h: 22px;
  width: var(--w); height: var(--h);
  background: rgba(14,44,92,0.15);
  border-radius: 999px;
  position: relative;
  cursor: pointer;
  transition: background 0.18s ease;
  flex-shrink: 0;
}
.toggle.on { background: var(--primary); }
.toggle::after {
  content: "";
  position: absolute;
  top: 2px; left: 2px;
  width: 18px; height: 18px;
  background: white;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
  transition: transform 0.18s ease;
}
.toggle.on::after { transform: translateX(16px); }
