/* =========================================================
   VD Messenger Case — design tokens (Volga-Dnepr navy)
   ========================================================= */
:root {
  --vd-navy-900: #06255C;
  --vd-navy-800: #0B3D91;
  --vd-navy-700: #1A4FA8;
  --vd-navy-600: #2E66C2;
  --vd-navy-400: #7AA3E0;
  --vd-navy-100: #E3ECFA;
  --vd-navy-050: #F2F6FC;
  --vd-ink-900:  #0E1320;
  --vd-ink-600:  #4A5266;
  --vd-ink-300:  #BEC5D3;
  --vd-success:  #2EA05C;
  --vd-warning:  #DE8A1A;
  --vd-danger:   #D43B34;
  --vd-amber:    #E88A2C;
  --shadow-1: 0 1px 2px rgba(6,37,92,.06), 0 1px 1px rgba(6,37,92,.04);
  --shadow-2: 0 2px 6px rgba(6,37,92,.08), 0 1px 2px rgba(6,37,92,.06);
  --shadow-3: 0 8px 24px rgba(6,37,92,.12), 0 2px 6px rgba(6,37,92,.06);
  --radius-md: 8px;
  --radius-lg: 16px;
  --radius-xl: 24px;
}

/* ── Hero ─────────────────────────────────────────────── */
.vd-hero {
  background: linear-gradient(135deg, var(--vd-navy-900) 0%, var(--vd-navy-800) 55%, #1A4FA8 100%);
  color: white;
  padding: 5rem 0 4rem;
  position: relative;
  overflow: hidden;
}
.vd-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none'%3E%3Cg fill='%237AA3E0' fill-opacity='0.06'%3E%3Ccircle cx='30' cy='30' r='1.5'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.vd-hero__content { position: relative; z-index: 1; }
.vd-hero__badge {
  display: inline-flex; align-items: center; gap: .5rem;
  background: rgba(122,163,224,.15); padding: .5rem 1.25rem;
  border-radius: 9999px; font-size: .875rem; color: var(--vd-navy-400);
  border: 1px solid rgba(122,163,224,.3); margin-bottom: 1.5rem;
}
.vd-hero__badge-dot {
  width: 8px; height: 8px; background: var(--vd-navy-400);
  border-radius: 50%; animation: vd-pulse 2s infinite;
}
@keyframes vd-pulse { 0%,100%{opacity:1} 50%{opacity:.3} }

.vd-hero__title {
  font-size: clamp(1.9rem, 4.5vw, 3.75rem);
  font-weight: 700; line-height: 1.15; margin-bottom: 1.25rem;
}
.vd-hero__subtitle {
  font-size: 1.2rem; opacity: .9; max-width: 720px; margin-bottom: 2rem; line-height: 1.7;
}
.vd-hero__tags { display: flex; gap: .6rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.vd-hero__cta { margin-bottom: 2rem; }
.vd-hero__tag {
  background: rgba(255,255,255,.1); padding: .35rem .9rem;
  border-radius: 9999px; font-size: .8rem; border: 1px solid rgba(255,255,255,.18);
}
.vd-hero__stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1.25rem; margin-top: 2.5rem;
}
.vd-hero__stat {
  text-align: center; background: rgba(255,255,255,.08);
  padding: 1.5rem 1rem; border-radius: var(--radius-lg);
  backdrop-filter: blur(8px); border: 1px solid rgba(255,255,255,.1);
}
.vd-hero__stat-value { font-size: 2.25rem; font-weight: 700; color: var(--vd-navy-400); line-height: 1; }
.vd-hero__stat-label { font-size: .8rem; opacity: .8; margin-top: .5rem; }

/* ── Общие утилиты блока ─────────────────────────────── */
.vd-section { padding: 4rem 0; }
.vd-section--gray { background: var(--vd-navy-050); }
.vd-section--dark { background: var(--vd-navy-900); color: white; }
.vd-section__eyebrow {
  text-transform: uppercase; font-size: .75rem; letter-spacing: .1em;
  color: var(--vd-navy-600); font-weight: 600; margin-bottom: .75rem;
}
.vd-section__title { font-size: clamp(1.5rem, 3vw, 2.25rem); font-weight: 700; margin-bottom: 1rem; }
.vd-section__lead { font-size: 1.1rem; color: var(--vd-ink-600); max-width: 700px; line-height: 1.7; }

/* ── Metaphor-блок ───────────────────────────────────── */
.vd-metaphor {
  background: linear-gradient(135deg, #FEF9EC 0%, #FEF3C7 100%);
  border-radius: var(--radius-xl); padding: 2.5rem; margin: 2rem 0;
  border: 2px solid #FBD14B; position: relative;
}
.vd-metaphor__badge {
  position: absolute; top: -18px; left: 50%; transform: translateX(-50%);
  background: #FBD14B; color: #78350F; font-size: .75rem; font-weight: 700;
  padding: .3rem .9rem; border-radius: 9999px; white-space: nowrap;
}
.vd-metaphor__title { font-size: 1.3rem; font-weight: 700; color: #92400E; margin: .75rem 0 .75rem; text-align: center; }
.vd-metaphor p { color: #78350F; text-align: center; line-height: 1.7; max-width: 680px; margin: 0 auto; }

/* ── Требования-timeline ─────────────────────────────── */
.vd-req-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.25rem;
}
.vd-req-card {
  background: white; border-radius: var(--radius-lg); padding: 1.5rem;
  box-shadow: var(--shadow-2); border-top: 4px solid var(--vd-navy-800);
  transition: transform .2s, box-shadow .2s;
}
.vd-req-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-3); }
.vd-req-card--warn { border-top-color: var(--vd-warning); }
.vd-req-card--danger { border-top-color: var(--vd-danger); }
.vd-req-card--success { border-top-color: var(--vd-success); }
.vd-req-card--amber { border-top-color: var(--vd-amber); }
.vd-req-card__num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--vd-navy-100); color: var(--vd-navy-800);
  font-size: .8rem; font-weight: 700; margin-bottom: .75rem;
}
.vd-req-card__title { font-weight: 600; font-size: 1rem; margin-bottom: .5rem; color: var(--vd-ink-900); }
.vd-req-card__body { font-size: .875rem; color: var(--vd-ink-600); line-height: 1.6; }
.vd-req-card__conflict {
  margin-top: .75rem; font-size: .78rem; background: #FEF3C7;
  border: 1px solid #FCD34D; border-radius: 6px; padding: .5rem .75rem; color: #92400E;
}

/* ── Tabs (фичи) ─────────────────────────────────────── */
.vd-tabs { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.vd-tab {
  padding: .6rem 1.25rem; border-radius: 9999px;
  border: 2px solid var(--vd-ink-300); background: white;
  cursor: pointer; font-size: .875rem; font-weight: 500;
  color: var(--vd-ink-600); transition: all .2s;
}
.vd-tab:hover { border-color: var(--vd-navy-600); color: var(--vd-navy-800); }
.vd-tab--active {
  background: var(--vd-navy-800); color: white !important;
  border-color: var(--vd-navy-800);
}
.vd-tab-panel { display: none; }
.vd-tab-panel--active { display: block; }

/* ── Роли RBAC ────────────────────────────────────────── */
.vd-roles { display: flex; flex-direction: column; gap: .75rem; }
.vd-role {
  display: grid; grid-template-columns: 140px 1fr auto;
  align-items: center; gap: 1rem;
  background: white; border-radius: var(--radius-md); padding: 1rem 1.25rem;
  box-shadow: var(--shadow-1); border-left: 4px solid var(--vd-navy-400);
  transition: box-shadow .2s;
}
.vd-role:hover { box-shadow: var(--shadow-2); }
.vd-role--guest  { border-left-color: var(--vd-ink-300); }
.vd-role--emp    { border-left-color: var(--vd-navy-400); }
.vd-role--mgr    { border-left-color: var(--vd-navy-600); }
.vd-role--tm     { border-left-color: var(--vd-amber); }
.vd-role--admin  { border-left-color: var(--vd-danger); }
.vd-role__name   { font-weight: 600; font-size: .9rem; color: var(--vd-ink-900); }
.vd-role__desc   { font-size: .83rem; color: var(--vd-ink-600); line-height: 1.5; }
.vd-role__badge  {
  font-size: .72rem; font-weight: 600; padding: .25rem .65rem;
  border-radius: 9999px; white-space: nowrap;
}
.vd-role__badge--gray   { background: #F3F4F6; color: #6B7280; }
.vd-role__badge--blue   { background: var(--vd-navy-100); color: var(--vd-navy-800); }
.vd-role__badge--amber  { background: #FEF3C7; color: #92400E; }
.vd-role__badge--red    { background: #FEE2E2; color: #991B1B; }

/* ── DLP chip-stati ──────────────────────────────────── */
.vd-dlp-chip {
  display: inline-flex; align-items: center; gap: .4rem;
  font-size: .75rem; font-weight: 600; padding: .25rem .7rem;
  border-radius: 4px;
}
.vd-dlp-chip--public       { background:#D1FAE5; color:#065F46; }
.vd-dlp-chip--internal     { background:#DBEAFE; color:#1E40AF; }
.vd-dlp-chip--confidential { background:#FEF3C7; color:#92400E; }
.vd-dlp-chip--secret       { background:#FEE2E2; color:#991B1B; }

/* ── Демо-терминал (лог событий) ─────────────────────── */
.vd-terminal {
  background: #0E1320; border-radius: var(--radius-lg);
  padding: 1.25rem; font-family: 'JetBrains Mono', 'Fira Mono', 'Consolas', monospace;
  font-size: .8rem; color: #A5C0EA; overflow-y: auto; max-height: 320px;
}
.vd-terminal__header {
  display: flex; align-items: center; gap: .5rem;
  padding-bottom: .75rem; margin-bottom: .75rem;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.vd-terminal__dot { width: 12px; height: 12px; border-radius: 50%; }
.vd-terminal__line { padding: .2rem 0; border-bottom: 1px solid rgba(255,255,255,.04); }
.vd-terminal__time { color: #4A5266; margin-right: .5rem; }
.vd-terminal__ok   { color: #2EA05C; }
.vd-terminal__warn { color: #E88A2C; }
.vd-terminal__err  { color: #D43B34; }
.vd-terminal__sys  { color: #7AA3E0; }

/* ── Мессенджер-UI-превью ────────────────────────────── */
.vd-messenger-preview {
  background: var(--vd-navy-050); border-radius: var(--radius-xl);
  overflow: hidden; box-shadow: var(--shadow-3);
  border: 1px solid var(--vd-navy-100);
}
.vd-messenger-preview__topbar {
  background: var(--vd-navy-800); color: white;
  display: grid; grid-template-columns: auto 1fr auto;
  align-items: center; gap: .75rem; padding: .75rem 1.25rem;
  font-size: .875rem;
}
.vd-messenger-preview__avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--vd-navy-600); display: flex; align-items: center;
  justify-content: center; font-size: .75rem; font-weight: 700; flex-shrink: 0;
}
.vd-messenger-preview__name  { font-weight: 600; }
.vd-messenger-preview__sub   { font-size: .7rem; opacity: .7; }
.vd-messenger-preview__status {
  font-size: .7rem; background: rgba(46,160,92,.25); color: #6EE7A0;
  padding: .2rem .6rem; border-radius: 9999px;
}
.vd-messenger-preview__body {
  padding: 1rem 1.25rem; min-height: 220px;
  display: flex; flex-direction: column; gap: .6rem;
  background: white;
}
.vd-bubble {
  max-width: 72%; padding: .6rem .9rem; border-radius: 12px;
  font-size: .875rem; line-height: 1.5;
}
.vd-bubble--me    { align-self: flex-end; background: var(--vd-navy-800); color: white; border-radius: 12px 12px 2px 12px; }
.vd-bubble--them  { align-self: flex-start; background: var(--vd-navy-050); color: var(--vd-ink-900); border: 1px solid var(--vd-navy-100); border-radius: 12px 12px 12px 2px; }
.vd-bubble--sys   { align-self: center; background: transparent; color: var(--vd-ink-600); font-size: .75rem; font-style: italic; }
.vd-bubble--block { align-self: stretch; background: #FEE2E2; color: #991B1B; border: 1px solid #FECACA; font-size: .8rem; border-radius: var(--radius-md); }
.vd-bubble__time  { font-size: .65rem; opacity: .55; margin-top: .25rem; }
.vd-messenger-preview__composer {
  display: flex; align-items: center; gap: .75rem;
  padding: .75rem 1.25rem; border-top: 1px solid var(--vd-navy-100);
  background: white;
}
.vd-composer-input {
  flex: 1; border: 1px solid var(--vd-navy-100); border-radius: 20px;
  padding: .5rem 1rem; font-size: .875rem; outline: none;
  transition: border-color .2s; font-family: inherit;
}
.vd-composer-input:focus { border-color: var(--vd-navy-600); }
.vd-composer-send {
  background: var(--vd-navy-800); color: white; border: none;
  border-radius: 20px; padding: .5rem 1.25rem; font-size: .875rem;
  cursor: pointer; font-weight: 500; transition: background .2s;
}
.vd-composer-send:hover { background: var(--vd-navy-700); }
.vd-composer-send:disabled { background: var(--vd-ink-300); cursor: not-allowed; }

/* ── Cтек-теги ───────────────────────────────────────── */
.vd-stack { display: flex; flex-wrap: wrap; gap: .5rem; }
.vd-stack-tag {
  background: var(--vd-navy-100); color: var(--vd-navy-800);
  font-size: .8rem; font-weight: 500; padding: .3rem .8rem;
  border-radius: 6px; border: 1px solid rgba(11,61,145,.15);
}

/* ── Метрики count-up ─────────────────────────────────── */
.vd-metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1.25rem; }
.vd-metric-card {
  background: white; border-radius: var(--radius-lg); padding: 1.75rem 1.5rem;
  box-shadow: var(--shadow-2); text-align: center; border-bottom: 4px solid var(--vd-navy-800);
}
.vd-metric-card--warn  { border-bottom-color: var(--vd-warning); }
.vd-metric-card--success { border-bottom-color: var(--vd-success); }
.vd-metric-card--amber { border-bottom-color: var(--vd-amber); }
.vd-metric__value { font-size: 2.25rem; font-weight: 700; color: var(--vd-navy-800); line-height: 1; }
.vd-metric-card--warn  .vd-metric__value { color: var(--vd-warning); }
.vd-metric-card--success .vd-metric__value { color: var(--vd-success); }
.vd-metric-card--amber .vd-metric__value { color: var(--vd-amber); }
.vd-metric__suffix { font-size: 1.25rem; font-weight: 700; }
.vd-metric__label { font-size: .8rem; color: var(--vd-ink-600); margin-top: .5rem; line-height: 1.4; }

/* ── CTA-финал ────────────────────────────────────────── */
.vd-cta {
  background: linear-gradient(135deg, var(--vd-navy-900) 0%, var(--vd-navy-800) 100%);
  border-radius: var(--radius-xl); padding: 3rem 2.5rem; text-align: center; color: white;
}
.vd-cta__title { font-size: clamp(1.4rem, 3vw, 2rem); font-weight: 700; margin-bottom: 1rem; }
.vd-cta__sub   { opacity: .85; font-size: 1.05rem; margin-bottom: 2rem; line-height: 1.7; }
.vd-cta__btn {
  display: inline-flex; align-items: center; gap: .5rem;
  background: var(--vd-navy-400); color: var(--vd-navy-900);
  font-weight: 700; font-size: 1rem; padding: .85rem 2rem;
  border-radius: 9999px; text-decoration: none; transition: background .2s;
}
.vd-cta__btn:hover { background: white; }

/* ── TTL-схема ────────────────────────────────────────── */
.vd-ttl-flow {
  display: flex; align-items: center; flex-wrap: wrap; gap: 0;
  background: white; border-radius: var(--radius-lg); padding: 1.5rem;
  box-shadow: var(--shadow-2); overflow-x: auto;
}
.vd-ttl-node {
  display: flex; flex-direction: column; align-items: center;
  min-width: 110px; text-align: center;
}
.vd-ttl-box {
  padding: .75rem 1rem; border-radius: var(--radius-md); font-size: .8rem;
  font-weight: 600; line-height: 1.4; width: 100%;
}
.vd-ttl-box--active  { background: var(--vd-navy-100); color: var(--vd-navy-800); border: 2px solid var(--vd-navy-600); }
.vd-ttl-box--archive { background: #FEF3C7; color: #92400E; border: 2px solid #FCD34D; }
.vd-ttl-box--delete  { background: #FEE2E2; color: #991B1B; border: 2px solid #FECACA; }
.vd-ttl-box--audit   { background: #D1FAE5; color: #065F46; border: 2px solid #6EE7B7; }
.vd-ttl-label { font-size: .7rem; color: var(--vd-ink-600); margin-top: .35rem; }
.vd-ttl-arrow {
  display: flex; align-items: center; padding: 0 .5rem;
  font-size: .7rem; color: var(--vd-ink-600); flex-shrink: 0; align-self: flex-start;
  margin-top: .75rem;
}
.vd-ttl-arrow svg { width: 20px; height: 20px; color: var(--vd-ink-300); }

/* ── Иконки (inline SVG helper) ─────────────────────── */
.vd-icon { display: inline-block; vertical-align: middle; flex-shrink: 0; }

/* ── Responsive ─────────────────────────────────────── */
@media(max-width:640px){
  .vd-role { grid-template-columns: 1fr; }
  .vd-role__badge { justify-self: start; }
  .vd-ttl-flow { flex-direction: column; align-items: flex-start; }
  .vd-ttl-arrow { transform: rotate(90deg); align-self: center; }
}
