/* Дашборд разбора разговора: тёмная панель в стиле экрана звонка */
.db { --db-bg: #0b0a3a; --db-bg2: #15146a; --db-card: rgba(255,255,255,.055); --db-line: rgba(255,255,255,.1); --db-ink: #fff; --db-soft: rgba(255,255,255,.66);
  --db-blue: #6b7dff; --db-teal: #4fd6c4; --db-yellow: #ffd166; --db-green: #55d98d; --db-red: #ff6b5a; --db-orange: #ffa552;
  position: relative; overflow: hidden; color: var(--db-ink); border-radius: 26px; padding: 22px 22px 18px; box-sizing: border-box; max-width: 100%; min-width: 0; overflow-wrap: break-word;
  background: radial-gradient(120% 80% at 50% -10%, var(--db-bg2), var(--db-bg) 60%); font-family: "Golos Text", "Segoe UI", system-ui, sans-serif; font-size: 14px; line-height: 1.45; }
.db::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px); background-size: 28px 28px; pointer-events: none; }
.db > * { position: relative; }
.db h2, .db h3, .db h4, .db p, .db ul, .db ol, .db dl { margin: 0; }
.db-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; margin-bottom: 14px; }
.db-head h2 { font-size: clamp(20px, 2.6vw, 28px); font-weight: 700; letter-spacing: -.01em; }
.db-head p { color: var(--db-soft); font-size: 13px; margin-top: 2px; }
.db-status { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 999px; background: rgba(79,214,196,.14); border: 1px solid rgba(79,214,196,.35); font-size: 13px; white-space: nowrap; }
.db-status i { width: 8px; height: 8px; border-radius: 50%; background: var(--db-green); box-shadow: 0 0 0 3px rgba(85,217,141,.25); }

.db-ico { display: inline-flex; width: 30px; height: 30px; border-radius: 50%; background: rgba(107,125,255,.18); color: var(--db-blue); align-items: center; justify-content: center; flex: none; }
.db-ico svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.db-ico.gold { color: var(--db-yellow); background: rgba(255,209,102,.16); }
.db-ico.green { color: var(--db-green); background: rgba(85,217,141,.16); }
.db-ico.yellow { color: var(--db-yellow); background: rgba(255,209,102,.16); }
.db-ico.teal { color: var(--db-teal); background: rgba(79,214,196,.16); }

/* Сброс стилей страницы-хозяина, чтобы списки и абзацы внутри дашборда не наследовали чужое оформление */
:where(.db) li, :where(.db) dt, :where(.db) dd, :where(.db) p, :where(.db) span, :where(.db) b { color: inherit; background: none; border: 0; padding: 0; margin: 0; font-size: inherit; line-height: inherit; }
:where(.db) ul, :where(.db) ol { list-style: none; padding: 0; margin: 0; }
.db-tiles { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.db-tile { background: var(--db-card); border: 1px solid var(--db-line); border-radius: 16px; padding: 12px 12px 10px; display: grid; justify-items: center; align-content: start; gap: 5px; text-align: center; min-height: 118px; }
.db-tile b { font-size: 24px; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.db-tile b.db-small { font-size: 17px; }
.db-tile b small { font-size: 13px; color: var(--db-soft); font-weight: 500; }
.db-tile > span:last-child { font-size: 11.5px; color: var(--db-soft); line-height: 1.25; overflow-wrap: normal; hyphens: auto; }
.db-badge { display: inline-block; padding: 6px 14px; border-radius: 999px; font-weight: 700; font-size: 14px; margin: 8px 0 4px; }
.db-badge.resolved { background: var(--db-green); color: #0b3a1f; }
.db-badge.partial { background: var(--db-yellow); color: #4a3300; }
.db-badge.unresolved { background: var(--db-red); color: #fff; }
.db-qbar { display: flex; width: 70%; height: 6px; border-radius: 3px; overflow: hidden; gap: 2px; background: rgba(255,255,255,.1); }
.db-qbar i { display: block; height: 100%; }
.db-qbar .y { background: var(--db-green); } .db-qbar .p { background: var(--db-yellow); } .db-qbar .n { background: var(--db-red); }

.db-stars { display: inline-flex; gap: 2px; }
.db-star { position: relative; width: 16px; height: 16px; display: inline-block; }
.db-star svg { position: absolute; inset: 0; width: 16px; height: 16px; fill: rgba(255,255,255,.18); stroke: none; }
.db-star svg + svg { fill: var(--db-yellow); clip-path: inset(0 calc(100% - var(--f)) 0 0); }
.db-ring { display: block; }
.db-ring-bg { fill: none; stroke: rgba(255,255,255,.12); stroke-width: 6; }
.db-ring-fg { fill: none; stroke-width: 6; stroke-linecap: round; transform: rotate(-90deg); transform-origin: 50% 50%; transition: stroke-dashoffset 1s ease-out; }
.db-ring text { fill: #fff; font-size: 13px; font-weight: 700; }
.db-gauge { width: 130px; height: 74px; display: block; }
.db-gauge-bg { fill: none; stroke: rgba(255,255,255,.12); stroke-width: 9; stroke-linecap: round; }
.db-gauge-fg { fill: none; stroke: url(#dbg) var(--db-teal); stroke: var(--db-teal); stroke-width: 9; stroke-linecap: round; transition: stroke-dashoffset 1s ease-out; }
.db-gauge text { fill: #fff; font-size: 17px; font-weight: 700; }
.db-bar { display: block; flex: 1; height: 9px; border-radius: 5px; background: rgba(255,255,255,.12); overflow: hidden; }
.db-bar i { display: block; height: 100%; border-radius: 5px; transition: width 1s ease-out; }
.db-barrow { display: flex; align-items: center; gap: 10px; width: 100%; }
.db-barrow b { font-size: 16px; }
.db-dots { display: inline-flex; gap: 5px; align-items: flex-end; height: 22px; }
.db-dots i { width: 9px; border-radius: 3px; background: rgba(255,255,255,.14); height: 9px; }
.db-dots i.g { background: var(--db-green); height: 11px; } .db-dots i.y { background: var(--db-yellow); height: 15px; } .db-dots i.r { background: var(--db-red); height: 20px; }

.db-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); gap: 10px; }
.db-card { background: var(--db-card); border: 1px solid var(--db-line); border-radius: 18px; padding: 14px 16px; min-width: 0; }
.db-card h3 { display: flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 700; margin-bottom: 10px; }
.db-card h4 { font-size: 12.5px; color: var(--db-soft); margin: 12px 0 6px; }
.db-summary { font-size: 13.5px; }
.db-list { padding-left: 0; list-style: none; display: grid; gap: 6px; font-size: 13.5px; }
.db-bullets li { position: relative; padding-left: 16px; }
.db-bullets li::before { content: ""; position: absolute; left: 0; top: .55em; width: 7px; height: 7px; border-radius: 50%; background: var(--db-blue); }
.db-bullets.red li::before { background: var(--db-red); }
.db-bullets { margin-top: 10px; }
.db-marks li { position: relative; padding-left: 30px; }
.db-marks li::before { position: absolute; left: 0; top: 0; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; }
.db-marks.ok li::before { content: "✓"; background: rgba(85,217,141,.2); color: var(--db-green); }
.db-marks.warn li::before { content: "!"; background: rgba(255,209,102,.2); color: var(--db-yellow); }
.db-num { list-style: none; padding: 0; display: grid; gap: 6px; counter-reset: n; }
.db-num li { display: flex; align-items: center; gap: 10px; background: rgba(255,255,255,.05); border: 1px solid var(--db-line); border-radius: 12px; padding: 7px 10px; font-size: 13.5px; counter-increment: n; }
.db-num li i { width: 24px; height: 24px; border-radius: 50%; background: rgba(107,125,255,.2); color: #c9d0ff; display: grid; place-items: center; font-size: 12px; font-weight: 700; font-style: normal; flex: none; }
.db-num li i::before { content: counter(n); }
.db-mood { display: flex; gap: 8px; align-items: center; margin-top: 10px; color: var(--db-soft); font-size: 13px; }
.db-scores { display: grid; grid-template-columns: repeat(auto-fit, minmax(168px, 1fr)); gap: 8px; }
.db-score { background: rgba(255,255,255,.05); border: 1px solid var(--db-line); border-radius: 14px; padding: 10px 12px; display: grid; gap: 4px; justify-items: start; }
.db-score-l { font-size: 11.5px; color: var(--db-soft); overflow-wrap: normal; hyphens: auto; }
.db-score b { font-size: 22px; font-weight: 700; }
.db-score b.db-small { font-size: 15px; }
.db-score b small { font-size: 12px; color: var(--db-soft); font-weight: 500; }
.db-note { font-size: 11.5px; color: var(--db-soft); }
.db-qa { background: rgba(255,255,255,.05); border: 1px solid var(--db-line); border-radius: 12px; padding: 8px 10px; margin-bottom: 6px; display: grid; gap: 4px; }
.db-qa-q, .db-qa-a { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; }
.db-qa i { width: 20px; height: 20px; border-radius: 50%; flex: none; display: grid; place-items: center; font-size: 11px; font-weight: 700; font-style: normal; }
.db-qa-q i { background: rgba(107,125,255,.25); color: #c9d0ff; } .db-qa-a i { background: rgba(79,214,196,.2); color: var(--db-teal); }
.db-qa-q b { flex: 1; font-weight: 600; }
.db-qa-a span { color: var(--db-soft); }
.db-pill { font-style: normal; font-size: 11px; padding: 2px 8px; border-radius: 999px; white-space: nowrap; background: rgba(255,255,255,.12); }
.db-pill.yes { background: rgba(85,217,141,.25); color: #bdf5d3; } .db-pill.partial { background: rgba(255,209,102,.25); color: #ffe7a8; } .db-pill.no { background: rgba(255,107,90,.3); color: #ffc9c1; }
.db-checks { list-style: none; padding: 0; display: grid; gap: 5px; font-size: 13px; }
.db-checks li { display: grid; grid-template-columns: 20px 1fr; gap: 6px 8px; align-items: start; }
.db-checks li i { font-style: normal; font-weight: 700; text-align: center; }
.db-checks li.ok i { color: var(--db-green); } .db-checks li.bad i { color: var(--db-red); } .db-checks li.na { opacity: .55; }
.db-checks li em { grid-column: 2; font-style: normal; color: #ffc9c1; font-size: 12px; }
.db-crm { display: grid; grid-template-columns: max-content 1fr; gap: 4px 12px; font-size: 13.5px; }
.db-crm dt { color: var(--db-soft); } .db-crm dd { margin: 0; }
.db-muted { color: var(--db-soft); font-size: 13px; }
.db-next { margin-top: 10px; background: var(--db-card); border: 1px solid var(--db-line); border-radius: 18px; padding: 14px 16px; }
.db-next h3 { display: flex; align-items: center; gap: 10px; font-size: 15px; margin-bottom: 10px; }
.db-next-row { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 10px; }
.db-next-main, .db-next-side { display: flex; gap: 12px; align-items: center; border-radius: 14px; padding: 12px 14px; font-size: 13.5px; }
.db-next-main { background: rgba(79,214,196,.1); border: 1px solid rgba(79,214,196,.3); }
.db-next-side { background: rgba(255,255,255,.05); border: 1px solid var(--db-line); color: var(--db-soft); }
.db-next-side b { color: #fff; font-weight: 600; }
.db-foot { margin-top: 10px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; background: rgba(255,255,255,.05); border: 1px solid var(--db-line); border-radius: 14px; padding: 10px 14px; font-size: 13px; color: var(--db-soft); }
.db-foot b { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; color: var(--db-teal); font-weight: 600; }

/* Ожидание */
.db-waiting { min-height: 320px; }
.db-wave { display: flex; align-items: center; justify-content: center; gap: 4px; height: 70px; margin: 10px 0 8px; }
.db-wave i { width: 5px; height: 12px; border-radius: 3px; background: linear-gradient(180deg, var(--db-teal), var(--db-blue)); animation: db-wave 1.4s ease-in-out infinite; }
.db-wave i:nth-child(2n) { animation-delay: .12s; } .db-wave i:nth-child(3n) { animation-delay: .24s; } .db-wave i:nth-child(5n) { animation-delay: .4s; } .db-wave i:nth-child(7n) { animation-delay: .6s; }
@keyframes db-wave { 0%, 100% { height: 10px; opacity: .55; } 50% { height: 52px; opacity: 1; } }
.db-wait-text { position: relative; height: 24px; text-align: center; color: var(--db-soft); font-size: 15px; margin-bottom: 18px; }
.db-wait-text span { position: absolute; left: 0; right: 0; opacity: 0; animation: db-word 12s linear infinite both; }
@keyframes db-word { 0% { opacity: 0; transform: translateY(6px); } 4% { opacity: 1; transform: none; } 18% { opacity: 1; } 22% { opacity: 0; transform: translateY(-6px); } 100% { opacity: 0; } }
.db-skel .db-tile, .db-skel .db-card { min-height: 96px; background: linear-gradient(90deg, rgba(255,255,255,.05) 25%, rgba(255,255,255,.11) 50%, rgba(255,255,255,.05) 75%); background-size: 200% 100%; animation: db-shimmer 1.6s linear infinite; border-color: transparent; }
.db-skel .db-card { min-height: 130px; }
@keyframes db-shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
.db-enter { animation: db-in .5s ease-out; }
@keyframes db-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .db-wave i, .db-skel .db-tile, .db-skel .db-card, .db-enter { animation: none; } .db-wait-text span:first-child { opacity: 1; } }
@media (max-width: 900px) { .db-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px) {
  .db { padding: 16px 14px 14px; border-radius: 20px; }
  .db-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .db-grid { grid-template-columns: minmax(0, 1fr); }
  .db-scores { grid-template-columns: minmax(0, 1fr); }
  .db-next-row { grid-template-columns: minmax(0, 1fr); }
  .db-head { flex-direction: column; }
  .db-status { align-self: flex-start; }
}
/* Подписи не рвём посреди слова: длинные заголовки переносим целиком и, если надо, с дефисом */
.db-card h3, .db-checks li, .db-score b, .db-tile b { overflow-wrap: normal; hyphens: auto; }
.db-embed .db { padding: 16px 16px 14px; border-radius: 20px; }
