/* Typography — Inter (Cyrillic OK) */
html, body, button, input, select, textarea {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI',
               system-ui, 'Helvetica Neue', Arial, sans-serif;
}
body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  letter-spacing: -0.005em;
  background: #e4e7ed;          /* основной фон — заметно темнее белого */
  color: #1f2937;
}
h1, h2, h3, h4, h5, h6 { letter-spacing: -0.015em; color:#0f172a; }
table, .tabular-nums { font-variant-numeric: tabular-nums; }

/* ── Поля ввода ───────────────────────────────────────── */
.field      { width:100%; border:1px solid #b8c0cc; border-radius:.6rem;
              padding:.55rem .8rem; font-size:.9rem; background:#fff;
              transition: border-color .15s, box-shadow .15s; }
.field:focus{ outline:none; border-color:#7c3aed;
              box-shadow:0 0 0 3px rgba(124,58,237,.15); }
.field:disabled { background:#e2e8f0; color:#94a3b8; cursor:not-allowed; }

/* ── Основная кнопка ─────────────────────────────────── */
.btn        { background:#7c3aed; color:#fff; border-radius:.6rem;
              font-weight:600; padding:.6rem 1rem; transition:background .15s; }
.btn:hover  { background:#6d28d9; }
.btn:disabled { opacity:.5; cursor:not-allowed; }

/* ── Карточки ─────────────────────────────────────────── */
.card       { background:#ffffff; border:1px solid #c8cfd9; border-radius:1rem;
              box-shadow: 0 1px 2px rgba(15,23,42,.05),
                          0 1px 3px rgba(15,23,42,.03); }

/* ── Глобальный хедер (тёмный) ─────────────────────────── */
.cc-header {
  background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
  border-bottom: 1px solid #0b1322;
  color: #e2e8f0;
}
.cc-header a { color: #cbd5e1; }
.cc-header a:hover { color: #fff; }
.cc-header .cc-nav-link {
  padding: .4rem .85rem; border-radius: .6rem; font-size: .875rem;
  white-space: nowrap; transition: background .15s, color .15s;
}
.cc-header .cc-nav-link:hover { background: rgba(255,255,255,.07); color:#fff; }
.cc-header .cc-nav-link.active {
  background: #7c3aed; color: #fff; font-weight: 500;
}

/* ── Бейджи: единый стиль для статусов/режимов/состояний ──────────────── */
.cc-badge {
  display: inline-flex; align-items: center; gap: .35rem;
  padding: .15rem .55rem; border-radius: 9999px; font-size: .7rem;
  font-weight: 600; line-height: 1.4; white-space: nowrap;
  border: 1px solid transparent;
}
.cc-badge--green   { background:#d1fae5; color:#065f46; border-color:#a7f3d0; }
.cc-badge--blue    { background:#dbeafe; color:#1e40af; border-color:#bfdbfe; }
.cc-badge--violet  { background:#ede9fe; color:#5b21b6; border-color:#ddd6fe; }
.cc-badge--sky     { background:#e0f2fe; color:#075985; border-color:#bae6fd; }
.cc-badge--amber   { background:#fef3c7; color:#92400e; border-color:#fde68a; }
.cc-badge--rose    { background:#ffe4e6; color:#9f1239; border-color:#fecdd3; }
.cc-badge--grey    { background:#e2e8f0; color:#475569; border-color:#cbd5e1; }
.cc-badge--slate   { background:#f1f5f9; color:#64748b; border-color:#e2e8f0; }
.cc-badge .cc-dot {
  width: .375rem; height: .375rem; border-radius: 9999px; background: currentColor;
}

/* ── Суб-хедер с разделами (мини-навигация на странице) ─────────────────── */
.cc-subheader {
  background: linear-gradient(180deg, #ffffff 0%, #f1f5f9 100%);
  border: 1px solid #cbd5e1;
  border-radius: 1rem;
  padding: .35rem;
  display: flex;
  gap: .15rem;
  overflow-x: auto;
  margin-bottom: 1.25rem;
  box-shadow: 0 1px 2px rgba(15,23,42,.04);
}
.cc-tab {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .55rem .95rem; font-size: .85rem; font-weight: 600;
  color: #64748b; border-radius: .65rem;
  transition: background .15s, color .15s;
  cursor: pointer; white-space: nowrap; flex-shrink: 0;
  background: transparent; border: 0;
}
.cc-tab:hover { color: #7c3aed; background: rgba(124,58,237,.06); }
.cc-tab.active {
  color: #fff;
  background: linear-gradient(135deg, #7c3aed 0%, #5b21b6 100%);
  box-shadow: 0 2px 6px rgba(124,58,237,.25);
}
.cc-tab-counter {
  display: inline-block; min-width: 1.5em; text-align: center;
  font-size: .65rem; font-weight: 700; padding: .05rem .4rem;
  border-radius: 9999px; background: #e2e8f0; color: #475569;
}
.cc-tab.active .cc-tab-counter { background: rgba(255,255,255,.25); color: #fff; }
.cc-tab-panel { display: none; }
.cc-tab-panel.active { display: block; }

/* ── Тост-уведомления ───────────────────────────────────────────────────── */
#cc-toasts {
  position: fixed; bottom: 1rem; right: 1rem; z-index: 9999;
  display: flex; flex-direction: column; gap: .5rem; max-width: 22rem;
  pointer-events: none;
}
.cc-toast {
  pointer-events: auto;
  background: #1e293b; color: #f1f5f9;
  border-radius: .75rem; padding: .75rem 1rem;
  display: flex; gap: .65rem; align-items: flex-start;
  box-shadow: 0 8px 30px rgba(15,23,42,.35);
  animation: cc-toast-in .25s ease-out;
  font-size: .85rem; line-height: 1.4;
  border-left: 3px solid #7c3aed;
}
.cc-toast--success { border-left-color: #10b981; }
.cc-toast--error   { border-left-color: #ef4444; }
.cc-toast--info    { border-left-color: #3b82f6; }
.cc-toast .cc-toast-close {
  background: transparent; border: 0; color: #94a3b8;
  cursor: pointer; padding: 0 .15rem; font-size: 1rem; line-height: 1;
}
.cc-toast .cc-toast-close:hover { color: #f1f5f9; }
@keyframes cc-toast-in {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes cc-toast-out {
  to { opacity: 0; transform: translateX(20px); }
}
.cc-toast.cc-toast-leaving { animation: cc-toast-out .2s ease-in forwards; }
