/* ============================================================
   Системный Администратор — Reusable component styles
   Primitive classes used by the React components (.ds-*).
   Shipped to consumers via styles.css. Token-driven.
   ============================================================ */

/* ---------- Button ---------- */
.ds-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  font-family: var(--font-display); font-weight: var(--fw-bold); font-size: var(--fs-md);
  line-height: 1; letter-spacing: -0.01em; white-space: nowrap; cursor: pointer;
  padding: 1rem 1.6rem; border-radius: var(--radius-pill); border: var(--bw-1) solid transparent;
  background: var(--color-primary); color: #fff; text-decoration: none;
  transition: transform var(--dur-fast) var(--ease-out), box-shadow var(--dur) var(--ease-out), background var(--dur) var(--ease-out), border-color var(--dur);
}
.ds-btn:hover { background: var(--color-primary-hover); box-shadow: var(--shadow-blue); transform: translateY(-1px); color:#fff; }
.ds-btn:active { transform: translateY(0); background: var(--color-primary-active); }
.ds-btn:disabled, .ds-btn[aria-disabled="true"] { opacity: .5; pointer-events: none; }
.ds-btn--sm { padding: .65rem 1.1rem; font-size: var(--fs-sm); }
.ds-btn--lg { padding: 1.15rem 2rem; font-size: var(--fs-lead); }
.ds-btn--block { display: flex; width: 100%; }
.ds-btn--ghost { background: transparent; color: var(--color-primary); border-color: var(--border-strong); }
.ds-btn--ghost:hover { background: var(--color-primary-soft); border-color: var(--color-primary); color: var(--color-primary-active); box-shadow: none; }
.ds-btn--on-dark { background: rgba(255,255,255,.06); color:#fff; border-color: rgba(255,255,255,.22); }
.ds-btn--on-dark:hover { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.4); box-shadow:none; color:#fff; }
.ds-btn__ic { width: 1.15em; height: 1.15em; display: inline-flex; }
.ds-btn__ic svg { width: 100%; height: 100%; }

/* ---------- 1C partner badge ---------- */
.ds-badge1c {
  display: inline-flex; align-items: center; gap: .55rem;
  padding: .45rem .5rem .45rem .55rem; border-radius: var(--radius-pill);
  background: linear-gradient(100deg, var(--yellow-1c) 0%, var(--yellow-1c) 52%, var(--red-500) 52%, var(--red-500) 100%);
  font-family: var(--font-display); font-size: var(--fs-xs); font-weight: var(--fw-extrabold);
  line-height: 1.1; box-shadow: 0 4px 14px -4px rgba(252,197,33,.6);
}
.ds-badge1c__mark { display:inline-grid; place-items:center; width:26px; height:26px; border-radius:7px; background:#fff; color:var(--red-600); font-weight:800; font-size:.9rem; flex:none; }
.ds-badge1c__a { color: var(--color-1c-ink); padding-left:.1rem; }
.ds-badge1c__b { color:#fff; padding-right:.6rem; }
.ds-badge1c--lg { padding:.55rem .65rem; font-size: var(--fs-sm); }
.ds-badge1c--lg .ds-badge1c__mark { width:30px; height:30px; }

/* ---------- Chip ---------- */
.ds-chip {
  display:inline-flex; align-items:center; gap:.5rem; padding:.6rem 1.05rem; border-radius: var(--radius-pill);
  font-family: var(--font-display); font-weight: var(--fw-semibold); font-size: var(--fs-sm);
  background: var(--surface-card); color: var(--text-strong); border: var(--bw-1) solid var(--border);
}
.ds-chip__dot { width:8px; height:8px; border-radius:50%; background: var(--color-primary); }
.ds-chip--1c .ds-chip__dot { background: var(--yellow-1c); }
.ds-chip--red .ds-chip__dot { background: var(--color-accent); }
.ds-chip--on-dark { background: rgba(255,255,255,.05); color:#fff; border-color: rgba(255,255,255,.14); }

/* ---------- Tag ---------- */
.ds-tag {
  display:inline-flex; align-items:center; gap:.4rem; padding:.3rem .7rem; border-radius: var(--radius-pill);
  font-size: var(--fs-2xs); font-weight: var(--fw-bold); letter-spacing: var(--ls-caps-sm); text-transform: uppercase;
  background: var(--color-primary-soft); color: var(--color-primary-active);
}
.ds-tag--1c { background: var(--yellow-1c-50); color: var(--yellow-1c-700); }
.ds-tag--red { background: var(--red-50); color: var(--red-700); }
.ds-tag--green { background: var(--color-success-soft); color: var(--color-success); }

/* ---------- Metric stat ---------- */
.ds-metric__num { font-family: var(--font-display); font-weight: var(--fw-extrabold); font-size: var(--fs-metric); line-height:1; letter-spacing: var(--ls-tight); color: var(--text-strong); }
.ds-metric__num em { font-style: normal; color: var(--color-accent); }
.ds-metric__label { margin-top:.5rem; font-size: var(--fs-sm); color: var(--text-muted); }
.ds-metric--on-dark .ds-metric__num { color:#fff; }
.ds-metric--on-dark .ds-metric__label { color: var(--text-on-dark-soft); }

/* ---------- Section heading ---------- */
.ds-eyebrow {
  display:inline-flex; align-items:center; gap:.5rem;
  font-family: var(--font-display); font-size: var(--fs-2xs); font-weight: var(--fw-bold);
  letter-spacing: var(--ls-caps); text-transform: uppercase; color: var(--color-primary);
}
.ds-eyebrow::before { content:""; width:22px; height:2px; background: var(--color-accent); border-radius:2px; }
.ds-heading { max-width: 760px; }
.ds-heading--center { margin-inline:auto; text-align:center; }
.ds-heading__title { font-family: var(--font-display); font-weight: var(--fw-extrabold); font-size: var(--fs-h1); line-height: var(--lh-heading); letter-spacing: var(--ls-tight); color: var(--text-strong); margin: .9rem 0 0; }
.ds-heading__lead { margin-top: 1rem; font-size: var(--fs-lead); color: var(--text-muted); }

/* ---------- Direction card ---------- */
.ds-dircard {
  position: relative; display:flex; flex-direction:column; gap:1rem; overflow:hidden;
  background: var(--surface-card); border: var(--bw-1) solid var(--border); border-radius: var(--radius-xl);
  padding: clamp(1.6rem,1rem + 1.6vw,2.4rem);
  transition: box-shadow var(--dur) var(--ease-out), transform var(--dur) var(--ease-out), border-color var(--dur);
}
.ds-dircard:hover { box-shadow: var(--shadow-card-hover); transform: translateY(-3px); border-color: var(--slate-300); }
.ds-dircard__top { display:flex; align-items:center; justify-content:space-between; gap:1rem; }
.ds-dircard__icon { width:56px; height:56px; border-radius: var(--radius-md); display:grid; place-items:center; background: var(--color-primary-soft); color: var(--color-primary); flex:none; }
.ds-dircard__icon svg { width:28px; height:28px; }
.ds-dircard__no { font-family: var(--font-mono); font-size: var(--fs-sm); font-weight:600; color: var(--slate-300); }
.ds-dircard__title { font-family: var(--font-display); font-weight: var(--fw-extrabold); font-size: var(--fs-h3); color: var(--text-strong); margin:0; }
.ds-dircard__desc { color: var(--text-muted); margin:0; }
.ds-dircard--1c { border-color: var(--yellow-1c-100); background: linear-gradient(180deg, var(--yellow-1c-50), #fff 60%); }
.ds-dircard--1c .ds-dircard__icon { background: var(--yellow-1c); color: var(--color-1c-ink); }
.ds-dircard--1c::before { content:""; position:absolute; inset:0 0 auto 0; height:4px; background: linear-gradient(90deg, var(--yellow-1c), var(--red-500)); }
.ds-dircard__link { margin-top:auto; display:inline-flex; align-items:center; gap:.45rem; font-family: var(--font-display); font-weight: var(--fw-bold); font-size: var(--fs-sm); color: var(--color-primary); text-decoration:none; }
.ds-dircard__link:hover { color: var(--color-primary-active); }

/* ---------- Phone lead form ---------- */
.ds-phoneform { display:flex; gap:.6rem; flex-wrap:wrap; }
.ds-phoneform__field { flex:1 1 220px; display:flex; align-items:center; gap:.65rem; background:#fff; border: var(--bw-1) solid var(--border-strong); border-radius: var(--radius-pill); padding: 0 .4rem 0 1.15rem; transition: box-shadow var(--dur), border-color var(--dur); }
.ds-phoneform__field:focus-within { border-color: var(--color-primary); box-shadow: var(--ring); }
.ds-phoneform__field svg { width:1.1rem; height:1.1rem; color: var(--text-muted); flex:none; }
.ds-phoneform input { flex:1; border:0; background:transparent; outline:none; padding:1rem .25rem; font-size: var(--fs-md); font-family: var(--font-body); color: var(--text-strong); min-width:0; }
.ds-phoneform input::placeholder { color: var(--slate-400); }

/* ---------- Card ---------- */
.ds-card { background: var(--surface-card); border: var(--bw-1) solid var(--border); border-radius: var(--radius-lg); padding: clamp(1.5rem,1rem + 1.4vw,2.2rem); }
.ds-card--hover { transition: box-shadow var(--dur) var(--ease-out), transform var(--dur) var(--ease-out); }
.ds-card--hover:hover { box-shadow: var(--shadow-card-hover); transform: translateY(-3px); }
