:root {
  --bg: #f9fafb; /* Açık gri/krem arka plan */
  --panel: #ffffff; /* Beyaz paneller */
  --muted: #6b7280;
  --border: #e5e7eb;
  --accent: #22c55e;
  --danger: #ef4444;
  --text-main: #1f2937;
  --text-inverse: #ffffff;
  --input-bg: #ffffff;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell;
  background: var(--bg);
  color: var(--text-main);
}
.header {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: stretch;
  padding: 24px;
  border-bottom: 1px solid var(--border);
  background: var(--panel);
}
.header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}
.header-bottom {
  display: flex;
  justify-content: center;
}
.header h1 { margin: 0; font-size: 24px; color: var(--text-main); }
.icon-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--accent);
  color: var(--text-inverse);
  border: none;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.new-task {
  display: flex;
  flex-direction: row;
  gap: 12px;
  align-items: center;
  flex: 1;
}
.members {
  display: flex;
  gap: 8px;
}
.members input, .members button, .new-task select {
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--input-bg);
  color: var(--text-main);
}
.members button {
  background: var(--accent);
  color: var(--text-inverse);
  border: none;
  font-weight: 600;
}
.members-list {
  display: flex;
  gap: 8px;
  padding: 8px 16px;
}
.chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--muted);
  font-size: 12px;
  text-decoration: none;
  cursor: pointer;
}
.chip.active {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--text-inverse);
}
.new-task input, .new-task button, .new-task select {
  padding: 12px 16px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--input-bg);
  color: var(--text-main);
  font-size: 14px;
}
.new-task input { flex: 2; }
.new-task select { flex: 1; }
.new-task button { flex: 0 0 auto; }
.new-task button {
  background: var(--accent);
  color: var(--text-inverse);
  border: none;
  font-weight: 600;
}

.assignee-group {
  display: flex;
  gap: 8px;
  flex: 1;
  align-items: center;
}
.new-task .assignee-group select {
  flex: 1;
}
.new-task .assignee-group .icon-btn {
  width: 32px;
  height: 32px;
  padding: 0;
  flex: 0 0 32px;
  border-radius: 8px;
  background: var(--accent);
  color: var(--text-inverse);
  border: none;
}
.board {
  display: flex;
  flex-direction: row;
  gap: 16px;
  padding: 16px;
  height: calc(100vh - 140px);
}
.column {
  background: #f3f4f6; /* Hafif gri kolon arka planı */
  border: 1px solid var(--border);
  border-radius: 10px;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 300px;
}
.column h2 {
    margin: 0;
    padding: 12px 16px;
    font-size: 16px;
    border-bottom: 1px solid var(--border);
    color: var(--text-main);
}
.dropzone {
  flex: 1;
  padding: 12px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.dropzone.dragover {
  background: #e5e7eb;
}
.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
  cursor: grab;
  position: relative;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}
.indicator {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.indicator.green { background: var(--accent); }
.indicator.orange { background: #f97316; }
.indicator.gray { background: #6b7280; }
.card header {
  font-weight: 600;
  margin-bottom: 8px;
  padding-right: 16px;
}
.card-desc {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 8px;
  cursor: pointer;
}
.card-desc .full-desc { display: none; }
.card-desc.expanded .short-desc { display: none; }
.card-desc.expanded .full-desc { display: block; }
.card-desc .more-link {
  color: var(--accent);
  font-size: 11px;
  margin-left: 4px;
}
.card-meta {
  font-size: 11px;
  color: #6b7280;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
  border-top: 1px solid var(--border);
  padding-top: 8px;
}
.card footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 8px;
}
.card footer button {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
  border-radius: 4px;
  padding: 4px 8px;
  font-size: 11px;
  cursor: pointer;
}
.card footer button.danger {
  color: var(--danger);
  border-color: var(--danger);
}
.assign {
  display: flex;
  gap: 4px;
}
.assign select {
  background: #0b1220;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 11px;
  max-width: 80px;
}

/* Modal */
.modal {
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0,0,0,0.6);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}
.modal.show {
  display: flex;
}
.modal-content {
  background: var(--panel);
  padding: 24px;
  border-radius: 12px;
  width: 90%;
  max-width: 500px;
  border: 1px solid var(--border);
}
.modal-content h3 { margin-top: 0; }
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 16px;
}
.modal-actions button {
  padding: 8px 16px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  font-weight: 600;
}
.modal-actions button[type="submit"] {
  background: var(--accent);
  color: #0b1220;
}
.modal-actions button[type="button"] {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
}
.task-details { margin-top: 16px; }
.activity-item {
  font-size: 12px;
  border-bottom: 1px solid var(--border);
  padding: 8px 0;
  display: flex;
  justify-content: space-between;
}
#activityForm {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}
#activityForm input {
  flex: 1;
  padding: 8px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: #0b1220;
  color: white;
}
#activityForm button {
  padding: 8px 12px;
  background: var(--accent);
  color: #0b1220;
  border: none;
  border-radius: 6px;
  font-weight: 600;
}
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}
.modal-header button {
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 20px;
  cursor: pointer;
}

/* Header Controls */
.nav-links {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.chip.danger {
  color: var(--danger);
  border-color: var(--danger);
}

/* Mobile Tabs */
.mobile-tabs {
  display: none;
  gap: 8px;
  margin-bottom: 16px;
}
.tab-btn {
  flex: 1;
  padding: 10px;
  background: var(--panel);
  border: 1px solid var(--border);
  color: var(--muted);
  border-radius: 6px;
  cursor: pointer;
}
.tab-btn.active {
  background: var(--accent);
  color: #0b1220;
  font-weight: bold;
  border-color: var(--accent);
}

/* Color Picker */
.color-dropdown {
  position: relative;
  display: flex;
  align-items: center;
}
.color-trigger {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid var(--border);
  cursor: pointer;
  position: relative;
}
.color-trigger::after {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 12px; height: 12px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,0.7)' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
}
.color-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-top: 8px;
  background: #1e293b;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
  width: 150px;
  flex-wrap: wrap;
  gap: 8px;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
  z-index: 100;
}
.color-menu.show {
  display: flex;
}
.color-option {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid var(--border);
  cursor: pointer;
  position: relative;
  transition: transform 0.1s;
}
.color-option:hover {
  transform: scale(1.1);
}
.color-option.selected::after {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 8px; height: 8px;
  background: white;
  border-radius: 50%;
  box-shadow: 0 0 2px rgba(0,0,0,0.5);
}
.card.light-text {
  color: #111827;
}
.card.light-text .card-desc,
.card.light-text .card-meta,
.card.light-text .muted,
.card.light-text footer button {
  color: #374151;
  border-color: rgba(0,0,0,0.1);
}
.card.light-text .card-desc .more-link {
  color: #0369a1;
}
.card.light-text .indicator.gray { background: #9ca3af; }
.card.light-text footer button.danger { color: #dc2626; border-color: #dc2626; }
.card.light-text select {
  background: rgba(255,255,255,0.5);
  color: #111827;
  border-color: rgba(0,0,0,0.1);
}

/* Mobile Actions */
.mobile-actions {
  display: none;
  margin-top: 8px;
  gap: 8px;
}
@media (max-width: 768px) {
  .mobile-actions {
    display: flex;
  }
  .mobile-actions button {
    flex: 1;
    padding: 8px;
    background: var(--panel);
    border: 1px solid var(--border);
    color: var(--text);
    border-radius: 6px;
    font-weight: 600;
  }
  .mobile-actions button.primary {
    background: var(--accent);
    color: #0b1220;
    border: none;
  }
  .card.light-text .mobile-actions button {
    background: rgba(255,255,255,0.5);
    color: #111827;
    border-color: rgba(0,0,0,0.1);
  }
  .card.light-text .mobile-actions button.primary {
    background: #0369a1; /* Dark blue for contrast on pastel */
    color: white;
  }
}

/* Tools Page */
.tools-container {
  padding: 24px;
  max-width: 1200px;
  margin: 0 auto;
}
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-top: 24px;
}
.tool-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  cursor: pointer;
  transition: transform 0.2s, border-color 0.2s;
}
.tool-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
}
.tool-icon {
  font-size: 48px;
  margin-bottom: 16px;
}
.tool-card h3 {
  margin: 0 0 8px 0;
  font-size: 20px;
}
.tool-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

/* Tool Forms */
.tool-form .form-group {
  margin-bottom: 16px;
}
.tool-form label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  font-size: 14px;
}
.tool-form input[type="text"],
.tool-form input[type="number"],
.tool-form select {
  width: 100%;
  padding: 10px;
  background: #0b1220;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: #e5e7eb;
}
.tool-form .radio-group {
  display: flex;
  gap: 16px;
}
.tool-form .radio-group label {
  font-weight: normal;
  display: flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
}
.tool-output {
  margin-top: 16px;
  background: #000;
  color: #0f0;
  padding: 12px;
  border-radius: 6px;
  font-family: monospace;
  white-space: pre-wrap;
  max-height: 300px;
  overflow-y: auto;
  border: 1px solid var(--border);
}
.mt-2 { margin-top: 8px; }

/* General Details Button */
.details-btn {
  background: var(--panel);
  border: 1px solid var(--border);
  color: var(--muted);
  border-radius: 6px;
  padding: 6px 12px;
  cursor: pointer;
  font-size: 13px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 500;
}
.details-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* Responsive */
@media (max-width: 768px) {
  .header-top {
    flex-direction: column;
    align-items: center;
  }
  .header h1 {
    text-align: center;
    margin-bottom: 8px;
  }
  .new-task {
    flex-direction: column;
    align-items: stretch;
  }
  .new-task input, .new-task select, .new-task button {
    width: 100%;
    flex: none;
  }
  .assignee-group {
    width: 100%;
    flex: none;
  }
  .new-task .assignee-group select {
    width: auto;
    flex: 1;
  }
  .new-task .assignee-group .icon-btn {
    width: 32px;
    flex: 0 0 32px;
  }
  .nav-links {
    justify-content: center;
    flex-wrap: wrap;
  }
  .board {
    display: block;
    height: auto;
    padding-bottom: 80px; /* Space for bottom interaction */
  }
  .mobile-tabs {
    display: flex;
  }
  .column {
    display: none;
    height: auto;
    min-height: 400px;
  }
  .column.active {
    display: flex;
  }
  .members-list {
    overflow-x: auto;
    white-space: nowrap;
    padding-bottom: 12px;
  }
}