/* Modal */
.modal { position: fixed; inset: 0; z-index: 1000; display:none; }
.modal.show { display:block; }
.modal-backdrop { position:absolute; inset:0; background: rgba(0,0,0,0.4); }
.modal-dialog { position:relative; max-width: 520px; margin: 12vh auto; padding: 0 16px; }
.modal-content { background:#f5f5f5; border-radius:12px; box-shadow:0 10px 30px rgba(0,0,0,0.2); padding:20px; }
.modal-title { font-size:18px; margin:0 0 8px; }
.modal-text { color:#444; margin:0 0 16px; }
.modal-actions { display:flex; gap:10px; align-items:center; }
.btn.success { background:#2fb344; color:#fff; }
.btn.danger { background:#e03131; color:#fff; width:auto; display:inline-block; }

/* Edit abonement modal */
.edit-abonement-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 3000;
  background: rgba(0, 0, 0, 0.45);
  align-items: center;
  justify-content: center;
}
.edit-abonement-modal__dialog {
  background: #fff;
  border-radius: 12px;
  padding: 20px 24px;
  max-width: 420px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 10px 40px rgba(15, 23, 42, 0.25);
  position: relative;
}
.edit-abonement-modal__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.edit-abonement-modal__title {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: #111827;
}
.edit-abonement-modal__close-btn {
  background: none;
  border: none;
  font-size: 22px;
  cursor: pointer;
  color: #9ca3af;
}
.edit-abonement-modal__form {
  font-size: 16px;
}
.edit-abonement-modal__meta {
  margin-bottom: 12px;
  color: #000;
}
.edit-abonement-modal__operations-field {
  margin: 25px 0 10px 0;
}
.edit-abonement-modal__operations-label {
  display: block;
  font-weight: 500;
  color: #000;
  font-size: 18px;
}
.edit-abonement-modal__operations-row {
  display: flex;
  gap: 10px;
  height: 40px;
  margin-bottom: 10px;
}
.edit-abonement-modal__radio-label {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}
.edit-abonement-modal__input {
  width: 100%;
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid #d1d5db;
}
.edit-abonement-modal__expires-field {
  margin-bottom: 12px;
}
.edit-abonement-modal__expires-label {
  display: block;
  margin-bottom: 4px;
  font-weight: 500;
  color: #000;
}
.edit-abonement-modal__error {
  display: none;
  margin-bottom: 10px;
  color: #b91c1c;
  background: #fee2e2;
  border-radius: 6px;
  padding: 6px 8px;
}
/* Тост «С абонемента списано» на странице абонементов */
.writeoff-toast {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  padding: 12px 24px;
  background: #fff;
  border: 2px solid #22c55e;
  border-radius: 8px;
  color: #000;
  font-size: 15px;
  font-weight: 500;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  z-index: 10000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.8s ease-out;
}
.writeoff-toast.writeoff-toast--visible {
  opacity: 1;
}
.writeoff-toast.writeoff-toast--fade {
  opacity: 0;
}
.edit-abonement-modal__actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 12px;
}
.edit-abonement-modal__cancel-btn {
  background: #e5e7eb;
  color: #111827;
}
.edit-abonement-modal__save-btn {
  background: #3b82f6;
  color: #fff;
}

.edit-abonement-modal__footer-actions {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid #e5e7eb;
}
.edit-abonement-modal__trash-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid #fecaca;
  background: #fef2f2;
  color: #b91c1c;
  border-radius: 8px;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.2s, color 0.2s;
}
.edit-abonement-modal__trash-btn:hover {
  background: #fee2e2;
  color: #dc2626;
}
.edit-abonement-delete-block {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.25s ease-out, opacity 0.2s ease-out;
}
.edit-abonement-delete-block.edit-abonement-delete-block--visible {
  max-height: 140px;
  opacity: 1;
}
.edit-abonement-delete-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.edit-abonement-delete-form__label {
  width: 100%;
  margin: 0;
  font-size: 13px;
  font-weight: 500;
  color: #374151;
}
.edit-abonement-delete-form__input {
  flex: 1;
  min-width: 160px;
  margin:0;
}
.edit-abonement-delete-form__submit {
  background: #b91c1c;
  color: #fff;
  border: none;
  padding: 8px 14px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
}
.edit-abonement-delete-form__submit:hover {
  background: #991b1b;
}

