/* todo.css — TODO modülü v2 stilleri. SADECE .todo- prefix'li seçiciler.
   Mobil responsive; dokunma hedefleri ≥ 44px. */

.todo-root {
  font-family: inherit;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ── Araç çubuğu / filtreler ─────────────────────────────────────────── */
.todo-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding: 10px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
}
.todo-toolbar select,
.todo-toolbar input[type="search"] {
  min-height: 40px;
  padding: 6px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
  font-size: 13px;
}
.todo-filter-search { flex: 1 1 200px; }
.todo-filter-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  cursor: pointer;
  user-select: none;
}
.todo-filter-toggle input { width: 18px; height: 18px; }

.todo-btn {
  min-height: 40px;
  padding: 6px 14px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}
.todo-btn:hover { background: #f1f5f9; }
.todo-btn:disabled { opacity: 0.5; cursor: default; }
.todo-btn-primary { background: #4f46e5; border-color: #4338ca; color: #fff; }
.todo-btn-primary:hover { background: #4338ca; }

.todo-status { margin-left: auto; font-size: 12px; color: #16a34a; }
.todo-status-error { color: #b91c1c; }

/* ── Tablo ─────────────────────────────────────────────────────────── */
.todo-table-wrap {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
  overflow-x: auto;
}
.todo-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.todo-table th, .todo-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: top;
  text-align: left;
}
.todo-table thead th {
  background: #f8fafc;
  font-weight: 600;
  font-size: 12px;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.todo-table tbody tr:hover { background: #f8fafc; }
.todo-cell-content {
  cursor: pointer;
  overflow-wrap: anywhere;
  font-weight: 500;
}
.todo-cell-no {
  font-family: ui-monospace, "SF Mono", Consolas, monospace;
  font-size: 12px;
  color: #64748b;
  white-space: nowrap;
}
.todo-cell-actions {
  white-space: nowrap;
  text-align: right;
}
.todo-row-done .todo-cell-content {
  color: #94a3b8;
  text-decoration: line-through;
}
.todo-empty {
  text-align: center;
  color: #94a3b8;
  padding: 40px 16px !important;
}

/* ── Rozetler ───────────────────────────────────────────────────────── */
.todo-badge {
  display: inline-block;
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #e2e8f0;
  color: #334155;
  font-weight: 600;
  white-space: nowrap;
}
.todo-badge-status-pending     { background: #fef3c7; color: #92400e; }
.todo-badge-status-in_progress { background: #dbeafe; color: #1e40af; }
.todo-badge-status-done        { background: #dcfce7; color: #166534; }
.todo-badge-status-cancelled   { background: #f1f5f9; color: #64748b; }

.todo-badge-priority-urgent { background: #fecaca; color: #991b1b; }
.todo-badge-priority-high   { background: #fed7aa; color: #9a3412; }
.todo-badge-priority-normal { background: #e0e7ff; color: #3730a3; }
.todo-badge-priority-low    { background: #d1fae5; color: #065f46; }

.todo-badge-queue {
  margin-left: 6px;
  padding: 2px 6px;
  background: #ede9fe;
  color: #6d28d9;
}

.todo-icon-btn {
  min-height: 32px;
  padding: 4px 10px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  font-size: 12px;
  color: #475569;
  cursor: pointer;
  margin-left: 4px;
}
.todo-icon-btn:hover { background: #f1f5f9; border-color: #cbd5e1; }
.todo-icon-danger { color: #b91c1c; }
.todo-icon-danger:hover { background: #fef2f2; border-color: #fecaca; }

/* ── Modal ─────────────────────────────────────────────────────────── */
.todo-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 20px;
  background: rgba(15, 23, 42, 0.5);
  z-index: 1000;
  overflow-y: auto;
}
.todo-modal.is-visible { display: flex; }

.todo-modal-card {
  width: 100%;
  max-width: 900px;
  background: #fff;
  border-radius: 12px;
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: auto 0;
}

.todo-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 4px;
  border-bottom: 1px solid #f1f5f9;
}
.todo-modal-title {
  margin: 0;
  padding: 6px 12px;
  background: #4f46e5;
  color: #fff;
  border-radius: 6px;
  font-size: 15px;
}
.todo-modal-close {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: #64748b;
  padding: 4px 10px;
  border-radius: 6px;
  min-height: 36px;
  min-width: 36px;
}
.todo-modal-close:hover { background: #f1f5f9; }

.todo-modal-card label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #334155;
}
.todo-modal-card input,
.todo-modal-card select,
.todo-modal-card textarea {
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
  font-size: 14px;
  font-weight: 400;
  color: #0f172a;
}
.todo-modal-card textarea { resize: vertical; }
.todo-modal-card input:focus,
.todo-modal-card select:focus,
.todo-modal-card textarea:focus {
  outline: none;
  border-color: #4f46e5;
  box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.2);
}

.todo-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 640px) {
  .todo-grid-2 { grid-template-columns: 1fr; }
}

.todo-hint {
  font-weight: 400;
  color: #64748b;
  font-size: 11px;
}
.todo-req {
  color: #b91c1c;
  font-weight: 700;
}

/* ── Ekler ─────────────────────────────────────────────────────────── */
.todo-file-section {
  border: 1px dashed #cbd5e1;
  border-radius: 10px;
  padding: 12px;
  background: #f8fafc;
}
.todo-file-header {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #334155;
}
.todo-file-actions {
  margin-left: auto;
  display: flex;
  gap: 6px;
}
.todo-file-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 24px;
}
.todo-file-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px 4px 10px;
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  font-size: 12px;
}
.todo-file-name { color: #334155; font-weight: 500; }
.todo-file-open, .todo-file-del {
  background: none;
  border: none;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 12px;
  color: #4f46e5;
}
.todo-file-open:hover { background: #eef2ff; }
.todo-file-del { color: #b91c1c; font-size: 14px; line-height: 1; }
.todo-file-del:hover { background: #fef2f2; }
.todo-file-empty { color: #94a3b8; font-size: 12px; }
.todo-file-info {
  margin-top: 8px;
  font-size: 12px;
  color: #64748b;
}

/* ── Kuyruk satırı ─────────────────────────────────────────────────── */
.todo-queue-row {
  display: inline-flex !important;
  flex-direction: row !important;
  align-items: center;
  gap: 8px;
  font-size: 13px !important;
  font-weight: 500 !important;
  cursor: pointer;
}
.todo-queue-row input { width: 18px; height: 18px; }

/* ── Modal aksiyonlar ─────────────────────────────────────────────── */
.todo-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px solid #f1f5f9;
}

/* ── Mobil ─────────────────────────────────────────────────────────── */
@media (max-width: 640px) {
  .todo-toolbar select { flex: 1 1 130px; }
  .todo-modal { padding: 8px; }
  .todo-modal-card { padding: 16px; }
  .todo-file-actions { margin-left: 0; width: 100%; }
}
