.alert .btn-close {
  position: absolute;
  top: 8px;
  right: 12px;
  padding: 0;
  margin: 0;
  background: none !important;
  border: none !important;
  opacity: 1 !important;
  font-size: 24px;
}

.alert .btn-close::before {
  content: "×";
  color: #444;
}

.alert .btn-close:hover::before {
  color: #000;
}

.alert .btn-close svg {
  display: none;
}
.task-card {
  border-radius: 12px;
  padding: 0;
  overflow: hidden;
  background: white;
  border: 1px solid #e0e0e0;
  transition: 0.2s;
}

.task-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.task-header {
  background: #faf6cc;
  padding: 12px;
}

.task-body {
  padding: 10px;
  flex: 1;
  overflow: hidden;
  /* Taşmayı engelle */
}

.task-footer {
  border-top: 1px solid #eee;
  padding: 12px 16px;
  font-size: 14px;
  color: #444;
}

.badge-user {
  background: #007bff;
}

.badge-status {
  background: #ff9f43;
}

.badge-complete {
  background: rgb(5, 150, 105);
}

.task-settings {
  color: #666;
  cursor: pointer;
}

.task-settings:hover {
  color: #000;
}

.description-limit {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  /* kaç satır görünmesini istiyorsun */
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fixed-card {
  height: 240px;
  /* Sabit yükseklik */
  display: flex;
  flex-direction: column;
}
/* =====================
   MOBİL (default)
   ===================== */
.notes-toolbar {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 12px;
}

#btnAddNote {
  width: 100%;
}

.notes-filters {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.notes-filters > * {
  width: 100%;
}

/* =====================
   MASAÜSTÜ
   ===================== */
@media (min-width: 768px) {
  .notes-toolbar {
    flex-direction: row;
    align-items: center;
    gap: 12px;
  }

  /* Buton solda, auto */
  #btnAddNote {
    width: auto;
    white-space: nowrap;
  }

  /* Filtreler SAĞDA ve TEK SATIR */
  .notes-filters {
    flex-direction: row;
    align-items: center;
    margin-left: auto; /* <<< KRİTİK NOKTA */
    gap: 10px;
  }

  #statusFilter {
    min-width: 180px;
  }
  #userFilter {
    min-width: 220px;
  }
  #searchFilter {
    width: 300px;
  }
}
.tm-loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
}

.tm-loader-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(1px);
}

.tm-loader-box {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #fff;
  border-radius: 14px;
  padding: 18px 22px;
  min-width: 220px;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
}

.tm-loader-text {
  color: #6c757d;
}
.tpl-card {
  border-radius: 10px;
}
/* tpl-sub küçükse bile badge’i ezsin */
.tpl-sub {
  font-size: 14px;
} /* istersen 13-14 yap */

/* Badge görünümü */
.type-badge {
  display: inline-block !important;
  font-size: 13px !important; /* ufak olmasın */
  font-weight: 700 !important;
  padding: 6px 10px !important;
  border-radius: 999px !important;
  line-height: 1 !important;
  letter-spacing: 0.2px;
}

/* Renkler (tema ezse bile kalsın) */
.type-elektra {
  background: #0d6efd !important;
  color: #fff !important;
}
.type-elektraweb {
  background: #0dcaf0 !important;
  color: #111 !important;
}
.type-nova {
  background: #198754 !important;
  color: #fff !important;
}
.type-nova-subeli {
  background: #ffc107 !important;
  color: #111 !important;
}
.type-elektra-subeli {
  background: #fc0000 !important;
  color: #fff !important;
}

@media (max-width: 576px) {
  #addNoteModal .modal-dialog {
    /* id'ni kendine göre değiştir */
    margin: 0;
    width: 100%;
    max-width: 100%;
    height: 100vh;
  }

  #addNoteModal .modal-content {
    height: 100vh;
    border-radius: 0;
  }

  /* Header sabit kalsın */
  #addNoteModal .modal-header {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #fff;
  }

  /* Footer varsa sabit kalsın */
  #addNoteModal .modal-footer {
    position: sticky;
    bottom: 0;
    z-index: 2;
    background: #fff;
  }

  /* İçerik kaydırılabilir olsun */
  #addNoteModal .modal-body {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    max-height: calc(100vh - 56px); /* header yüksekliğine göre */
    padding-bottom: 24px;
  }
  #addNoteModal .form-control,
  #addNoteModal .form-select {
    min-height: 44px; /* parmak hedefi */
  }
}

/* Android/iOS: klavye açılınca modal zıplamasını azaltır */
.modal {
  overscroll-behavior: contain;
}
