/* МАЯК · модальные диалоги */
.mk-modal-overlay {
  position: fixed; inset: 0; z-index: 10000;
  background: rgba(8, 12, 24, 0.62);
  display: flex; align-items: center; justify-content: center;
  padding: 20px; backdrop-filter: blur(2px);
  animation: mk-fade 0.12s ease;
}
@keyframes mk-fade { from { opacity: 0; } to { opacity: 1; } }

.mk-modal {
  width: 420px; max-width: 100%; max-height: 88vh; overflow: auto;
  background: var(--surface, #1c2540);
  color: var(--text, #e7ecf7);
  border: 1px solid var(--border, #2c375c);
  border-radius: 14px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.5);
  animation: mk-pop 0.14s cubic-bezier(.2,.9,.3,1.2);
}
@keyframes mk-pop { from { transform: translateY(8px) scale(.98); opacity: 0; } to { transform: none; opacity: 1; } }

.mk-modal-head { padding: 18px 20px 4px; }
.mk-modal-head h3 { margin: 0; font-size: 16.5px; font-weight: 650; }
.mk-modal-sub, .mk-modal-msg { color: var(--text-dim, #8792ad); font-size: 13px; margin: 6px 0 0; line-height: 1.5; }
.mk-modal-body { padding: 12px 20px 4px; }
.mk-modal-err {
  background: rgba(255, 86, 86, .12); border: 1px solid rgba(255, 86, 86, .4);
  color: #ff9a9a; border-radius: 8px; padding: 8px 10px; font-size: 12.5px; margin-bottom: 12px;
}

.mk-field { margin-bottom: 13px; }
.mk-field label { display: block; font-size: 11.5px; color: var(--text-dim, #8792ad); margin: 0 0 6px; letter-spacing: .02em; }
.mk-field input, .mk-field select, .mk-field textarea {
  width: 100%; box-sizing: border-box; padding: 9px 11px;
  background: var(--surface-2, #141b2e); color: var(--text, #e7ecf7);
  border: 1px solid var(--border, #2c375c); border-radius: 9px;
  font-size: 14px; outline: none; font-family: inherit;
}
.mk-field input:focus, .mk-field select:focus, .mk-field textarea:focus { border-color: var(--accent); }

.mk-modal-foot {
  display: flex; justify-content: flex-end; gap: 10px;
  padding: 14px 20px 20px;
}
.mk-btn {
  padding: 9px 16px; border-radius: 9px; border: 1px solid transparent;
  font-size: 13.5px; font-weight: 600; cursor: pointer; font-family: inherit;
}
.mk-btn.primary { background: var(--accent); color: #fff; }
.mk-btn.primary:hover { background: #00897b; }
.mk-btn.danger { background: #e0524f; color: #fff; }
.mk-btn.ghost { background: transparent; color: var(--text-dim, #8792ad); border-color: var(--border, #2c375c); }
.mk-btn.ghost:hover { color: var(--text, #e7ecf7); }

/* Светлая тема */
:root[data-theme="light"] .mk-modal { background: #fff; color: #1a2233; border-color: #e2e7f0; }
:root[data-theme="light"] .mk-field input,
:root[data-theme="light"] .mk-field select,
:root[data-theme="light"] .mk-field textarea { background: #f6f8fc; color: #1a2233; border-color: #e2e7f0; }
:root[data-theme="light"] .mk-modal-sub, :root[data-theme="light"] .mk-modal-msg,
:root[data-theme="light"] .mk-field label { color: #6b7590; }
