/* ===== components.css =====
   Отвечает за: единые кнопки, карточки, модалки, тосты, формы.
   Блоки: button, .ghost, .danger, .modal-backdrop, .modal, .toast, формы.
   Все компоненты имеют фиксированные min-размеры — единый вид и стабильность. */

/* ===== Кнопки ===== */
button {
  font: inherit; border: none; border-radius: var(--radius); cursor: pointer;
  padding: 8px 14px; background: var(--accent); color: #fff; transition: .15s;
  min-height: var(--btn-h);
  min-width: var(--btn-min-w);
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
}
button:hover { background: var(--accent-dark); }
button.ghost { background: transparent; color: var(--accent); border: 1px solid var(--accent); }
button.ghost:hover { background: rgba(0,119,255,.08); }
button.danger { background: var(--danger); }
button.danger:hover { background: #c22; }
button:disabled { opacity: .5; cursor: not-allowed; }
button.small { padding: 5px 10px; font-size: 12px; min-height: 28px; min-width: 0; }

/* ===== Карточки ===== */
.card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 14px 16px;
  min-width: var(--card-min-w);
}

/* ===== Модалки ===== */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 50;
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.modal {
  background: var(--card); border-radius: 14px; max-width: 720px; width: 100%;
  max-height: 90vh; overflow-y: auto; padding: 22px;
}
.modal h3 { font-size: 18px; margin-bottom: 14px; }
.modal .close { float: right; background: transparent; color: var(--muted); font-size: 22px; padding: 0 6px; min-width: 0; }

/* ===== Тосты ===== */
.toast {
  position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%);
  background: #333; color: #fff; padding: 10px 18px; border-radius: 8px; font-size: 14px;
  z-index: 100; opacity: 0; transition: .3s; pointer-events: none;
  max-width: 80vw; text-align: center;
}
.toast.show { opacity: 1; }

/* ===== Формы ===== */
label { font-size: 12px; color: var(--muted); display: block; margin-bottom: 3px; }
input[type=text], input[type=number], input[type=password], input[type=date], input[type=time],
input[type=url], select, textarea {
  font: inherit; color: var(--text);
  padding: 8px; border: 1px solid var(--border); border-radius: var(--radius);
  min-height: var(--input-h);
  background: var(--card);
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(0,119,255,.12);
}
textarea { width: 100%; resize: vertical; }
.row { display: flex; gap: 10px; flex-wrap: wrap; }
.row > div { flex: 1; min-width: 180px; }

/* ===== Логин ===== */
.login-wrap { max-width: 360px; margin: 12vh auto; background: var(--card); padding: 28px; border-radius: 14px; box-shadow: 0 1px 6px rgba(0,0,0,.08); }
.login-wrap h2 { margin-bottom: 16px; font-size: 20px; }
.login-wrap input { width: 100%; padding: 10px; margin-bottom: 12px; }
.login-wrap button { width: 100%; }

/* ===== Пустые состояния ===== */
.empty-state { text-align: center; color: var(--muted); padding: 40px 0; font-size: 14px; }

/* ===== Разное ===== */
.grp-status { font-size: 12px; margin-top: 4px; }
.grp-status.ok { color: var(--ok); }
.grp-status.err { color: var(--danger); }
.field-note { font-size: 11px; color: var(--muted); margin-top: 2px; }
