/* ── Base ─────────────────────────────────────────── */
* { box-sizing: border-box; }
body { -webkit-font-smoothing: antialiased; }

/* ── Auth Tabs ────────────────────────────────────── */
.auth-tab-active {
  background: white;
  color: #1f2937;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

/* ── Navigation ───────────────────────────────────── */
.nav-link { color: #6b7280; }
.nav-link:hover { background: #f3f4f6; color: #1f2937; }
.nav-link.active { background: #eff6ff; color: #2563eb; }

/* ── Kanban ────────────────────────────────────────── */
.kanban-board {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  min-height: calc(100vh - 220px);
}
@media (max-width: 1024px) {
  .kanban-board { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .kanban-board {
    grid-template-columns: 1fr;
    min-height: auto;
  }
  .kanban-column { min-height: 120px; }
  #page-content { padding: 0.75rem; }
  .stat-card .stat-number { font-size: 1.5rem; }
  #modal-content { max-height: 95vh; max-width: 100%; border-radius: 0.5rem; }
  .data-table th, .data-table td { padding: 0.5rem; font-size: 0.75rem; }
  .filter-bar { gap: 0.375rem; }
  .filter-bar select { font-size: 0.75rem; padding: 0.25rem 0.5rem; }
}

.kanban-column {
  background: #f9fafb;
  border-radius: 0.75rem;
  padding: 0.75rem;
  min-height: 200px;
}
.kanban-column-header {
  font-weight: 600;
  font-size: 0.875rem;
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.kanban-card {
  background: white;
  border-radius: 0.5rem;
  padding: 0.875rem;
  margin-bottom: 0.5rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  cursor: grab;
  border-left: 3px solid transparent;
  transition: box-shadow 0.15s, transform 0.15s;
}
.kanban-card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
.kanban-card:active { cursor: grabbing; }
.kanban-card.sortable-ghost {
  opacity: 0.4;
  background: #dbeafe;
}
.kanban-card.sortable-chosen {
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
  transform: rotate(2deg);
}

/* Priority borders */
.priority-dusuk { border-left-color: #10B981; }
.priority-orta { border-left-color: #2563EB; }
.priority-yuksek { border-left-color: #F59E0B; }
.priority-acil { border-left-color: #EF4444; }

/* Priority badges */
.badge-dusuk { background: #d1fae5; color: #065f46; }
.badge-orta { background: #dbeafe; color: #1e40af; }
.badge-yuksek { background: #fef3c7; color: #92400e; }
.badge-acil { background: #fee2e2; color: #991b1b; animation: pulse-red 2s infinite; }

@keyframes pulse-red {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

/* Status badges */
.status-bekliyor { background: #f3f4f6; color: #4b5563; }
.status-devam_ediyor { background: #dbeafe; color: #1e40af; }
.status-revizyonda { background: #fef3c7; color: #92400e; }
.status-tamamlandi { background: #d1fae5; color: #065f46; }

/* ── Dashboard Cards ──────────────────────────────── */
.stat-card {
  background: white;
  border-radius: 0.75rem;
  padding: 1.25rem;
  border: 1px solid #e5e7eb;
  transition: box-shadow 0.15s;
}
.stat-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.06); }
.stat-card .stat-number {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1;
}
.stat-card-danger { border-left: 4px solid #EF4444; }
.stat-card-danger .stat-number { color: #EF4444; }

/* ── Tags ──────────────────────────────────────────── */
.tag-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.125rem 0.5rem;
  border-radius: 9999px;
  font-size: 0.6875rem;
  font-weight: 500;
  color: white;
  line-height: 1.5;
}

/* ── Calendar ──────────────────────────────────────── */
.fc { font-family: 'Inter', system-ui, sans-serif !important; }
.fc .fc-toolbar-title { font-size: 1.25rem !important; font-weight: 600 !important; }
.fc .fc-button-primary {
  background-color: #2563eb !important;
  border-color: #2563eb !important;
}
.fc .fc-button-primary:hover {
  background-color: #1d4ed8 !important;
}
.fc .fc-button-primary:not(:disabled).fc-button-active {
  background-color: #1e40af !important;
}
.fc .fc-day-today { background: #eff6ff !important; }
.fc .fc-event {
  border-radius: 4px !important;
  padding: 1px 4px !important;
  font-size: 0.75rem !important;
  border: none !important;
  cursor: pointer;
}
.fc .fc-daygrid-day-number { font-size: 0.875rem; color: #374151; }
.fc .fc-col-header-cell-cushion { font-weight: 600; color: #4b5563; }

/* TimeGrid (hafta/gün görünümü) */
.fc .fc-timegrid-slot { height: 2.5rem; }
.fc .fc-timegrid-slot-label-cushion { font-size: 0.75rem; color: #6b7280; }
.fc .fc-timegrid-now-indicator-line { border-color: #EF4444; border-width: 2px; }
.fc .fc-timegrid-now-indicator-arrow { border-color: #EF4444; }
.fc .fc-timegrid-event { border-radius: 4px !important; border: none !important; }
.fc .fc-timegrid-event .fc-event-main { padding: 2px 6px; font-size: 0.75rem; }
.fc .fc-timegrid-event .fc-event-title { font-weight: 600; }
.fc .fc-timegrid-event .fc-event-time { font-size: 0.6875rem; opacity: 0.85; }
.fc .fc-timegrid-col.fc-day-today { background: #fafbff !important; }
.fc .fc-daygrid-day.fc-day-today .fc-daygrid-day-number {
  background: #2563eb;
  color: white;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.fc .fc-timegrid-divider { display: none; }
.fc .fc-scrollgrid { border: none !important; }
.fc th { border-color: #e5e7eb !important; }
.fc td { border-color: #f3f4f6 !important; }
.fc .fc-timegrid-axis { border: none !important; }
.fc .fc-col-header { border-bottom: 2px solid #e5e7eb !important; }

/* ── Modal ─────────────────────────────────────────── */
#modal-overlay {
  animation: fadeIn 0.15s ease;
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
#modal-content {
  animation: slideUp 0.2s ease;
}
@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* ── Toast ─────────────────────────────────────────── */
.toast {
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  color: white;
  animation: slideIn 0.3s ease;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}
.toast-success { background: #059669; }
.toast-error { background: #dc2626; }

/* ── Avatar ────────────────────────────────────────── */
.avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6875rem;
  font-weight: 600;
  color: white;
  flex-shrink: 0;
}

/* ── Activity Log ──────────────────────────────────── */
.activity-item {
  display: flex;
  gap: 0.75rem;
  padding: 0.625rem 0;
  border-bottom: 1px solid #f3f4f6;
  font-size: 0.8125rem;
}
.activity-item:last-child { border-bottom: none; }

/* ── Table ─────────────────────────────────────────── */
.data-table {
  width: 100%;
  border-collapse: collapse;
}
.data-table th {
  text-align: left;
  padding: 0.75rem 1rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  color: #6b7280;
  border-bottom: 2px solid #e5e7eb;
}
.data-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #f3f4f6;
  font-size: 0.875rem;
}
.data-table tr:hover td { background: #f9fafb; }

/* ── Form Elements ─────────────────────────────────── */
.form-input {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.form-input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}
.form-label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 500;
  color: #374151;
  margin-bottom: 0.25rem;
}

.btn-primary {
  background: #2563eb;
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: background 0.15s;
}
.btn-primary:hover { background: #1d4ed8; }

.btn-secondary {
  background: #f3f4f6;
  color: #374151;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  border: 1px solid #d1d5db;
  cursor: pointer;
  transition: background 0.15s;
}
.btn-secondary:hover { background: #e5e7eb; }

.btn-danger {
  background: #ef4444;
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: background 0.15s;
}
.btn-danger:hover { background: #dc2626; }

/* ── Day Timeline ──────────────────────────────────── */
.day-timeline {
  position: relative;
  border-left: 2px solid #e5e7eb;
  margin-left: 3.5rem;
}
.day-hour-row {
  position: relative;
  height: 60px;
  border-bottom: 1px solid #f3f4f6;
  cursor: pointer;
  transition: background 0.1s;
}
.day-hour-row:hover {
  background: #f0f7ff;
}
.day-hour-label {
  position: absolute;
  left: -3.75rem;
  top: -0.5rem;
  width: 3rem;
  text-align: right;
  font-size: 0.75rem;
  color: #9ca3af;
  font-weight: 500;
}
.day-task-block {
  position: absolute;
  left: 0.5rem;
  right: 0.5rem;
  border-radius: 0.375rem;
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
  color: white;
  overflow: hidden;
  cursor: pointer;
  z-index: 2;
  transition: opacity 0.15s, transform 0.15s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}
.day-task-block:hover {
  opacity: 0.9;
  transform: scale(1.01);
}
.day-task-block .task-block-title {
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.day-task-block .task-block-meta {
  font-size: 0.6875rem;
  opacity: 0.85;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.day-now-line {
  position: absolute;
  left: -0.5rem;
  right: 0;
  height: 2px;
  background: #EF4444;
  z-index: 5;
}
.day-now-line::before {
  content: '';
  position: absolute;
  left: -4px;
  top: -3px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #EF4444;
}

/* ── Misc ──────────────────────────────────────────── */
.deadline-overdue { color: #ef4444; font-weight: 600; }
.empty-state {
  text-align: center;
  padding: 2rem;
  color: #9ca3af;
  font-size: 0.875rem;
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #9ca3af; }

/* ── Dropdown filter bar ──────────────────────────── */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.filter-bar select {
  padding: 0.375rem 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  font-size: 0.8125rem;
  background: white;
  outline: none;
  color: #374151;
}
.filter-bar select:focus {
  border-color: #2563eb;
}
