/* =====================================================
   GanttChart - Proje Yönetim Sistemi
   Modern, Clean Design
   ===================================================== */

/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --background: #fafafa;
  --foreground: #18181b;
  --card: #ffffff;
  --card-foreground: #18181b;
  --popover: #ffffff;
  --popover-foreground: #18181b;
  --primary: #18181b;
  --primary-foreground: #fafafa;
  --secondary: #f4f4f5;
  --secondary-foreground: #18181b;
  --muted: #f4f4f5;
  --muted-foreground: #71717a;
  --accent: #f1f5f9;
  --accent-foreground: #18181b;
  --destructive: #dc2626;
  --destructive-foreground: #ffffff;
  --border: #e4e4e7;
  --input: #e4e4e7;
  --ring: #18181b;
  --radius: 0;
  --red-accent: #dc2626;

  /* semantic tokens */
  --success: #16a34a;
  --success-bg: #f0fdf4;
  --success-fg: #15803d;
  --warning: #d97706;
  --warning-bg: #fffbeb;
  --warning-fg: #b45309;
  --danger: #dc2626;
  --danger-bg: #fef2f2;
  --danger-fg: #b91c1c;
  --info: #2563eb;
  --info-bg: #eff6ff;
  --info-fg: #1d4ed8;
  --today-bg: #eff6ff;
  --today-fg: #1d4ed8;

  /* shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 2px 6px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.10), 0 2px 6px rgba(0, 0, 0, 0.06);

  /* misc */
  --ring-focus: 0 0 0 3px rgba(24, 24, 27, 0.12);
  --overlay: rgba(0, 0, 0, 0.45);
}

.dark {
  --background: #09090b;
  --foreground: #e4e4e7;
  --card: #18181b;
  --card-foreground: #e4e4e7;
  --popover: #18181b;
  --popover-foreground: #e4e4e7;
  --primary: #e4e4e7;
  --primary-foreground: #09090b;
  --secondary: #1f1f23;
  --secondary-foreground: #e4e4e7;
  --muted: #1f1f23;
  --muted-foreground: #a1a1aa;
  --accent: #27272a;
  --accent-foreground: #e4e4e7;
  --destructive: #ef4444;
  --destructive-foreground: #ffffff;
  --border: #2e2e33;
  --input: #2e2e33;
  --ring: #e4e4e7;
  --red-accent: #ef4444;

  --success: #22c55e;
  --success-bg: #052e1a;
  --success-fg: #86efac;
  --warning: #f59e0b;
  --warning-bg: #3a2410;
  --warning-fg: #fcd34d;
  --danger: #ef4444;
  --danger-bg: #3a1414;
  --danger-fg: #fca5a5;
  --info: #3b82f6;
  --info-bg: #0f1d3a;
  --info-fg: #93c5fd;
  --today-bg: #1e293b;
  --today-fg: #93c5fd;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 10px rgba(0, 0, 0, 0.5), 0 1px 3px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.6), 0 4px 10px rgba(0, 0, 0, 0.4);

  --ring-focus: 0 0 0 3px rgba(228, 228, 231, 0.18);
  --overlay: rgba(0, 0, 0, 0.65);
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
  font-weight: 400;
  background: var(--background);
  color: var(--foreground);
  line-height: 1.5;
  overflow-x: hidden;
  min-height: 100vh;
  text-transform: lowercase;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: inherit;
  text-decoration: none;
}

/* Brand Logo */
.brand-link {
  display: inline-flex;
  align-items: center;
  color: var(--foreground);
  text-decoration: none;
  transition: opacity 0.15s;
}

.brand-link:hover {
  opacity: 0.7;
}

.brand-logo {
  width: 32px;
  height: 32px;
  display: block;
}

/* Dark Mode Toggle */
.theme-toggle {
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: var(--radius);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--foreground);
  transition: all 0.2s;
  font-size: 16px;
}

.theme-toggle:hover {
  background: var(--accent);
}

/* =====================================================
   Navbar Styles
   ===================================================== */
.navbar {
  height: 60px;
  background: var(--card);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.navbar-left {
  display: flex;
  align-items: center;
  gap: 32px;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 400;
  font-size: 18px;
  color: var(--foreground);
}

.brand-icon {
  color: var(--primary);
}

.navbar-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: var(--radius);
  color: var(--muted-foreground);
  text-decoration: none;
  font-size: 14px;
  font-weight: 300;
  transition: all 0.2s;
}

.nav-link:hover {
  background: var(--accent);
  color: var(--accent-foreground);
}

.nav-link.active {
  background: var(--accent);
  color: var(--accent-foreground);
}

.nav-icon {
  display: none;
}

.nav-icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: square;
  stroke-linejoin: miter;
}

.navbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-btn {
  position: relative;
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  border-radius: var(--radius);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted-foreground);
  transition: all 0.2s;
}

.nav-btn:hover {
  background: var(--accent);
  color: var(--accent-foreground);
}

.notification-dot {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 8px;
  height: 8px;
  background: var(--danger);
  border-radius: 0;
  border: 2px solid var(--card);
}

.navbar-divider {
  width: 1px;
  height: 24px;
  background: var(--border);
}

.avatar {
  width: 36px;
  height: 36px;
  border-radius: 0;
  background: var(--primary);
  color: var(--primary-foreground);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.avatar:hover {
  filter: brightness(1.1);
}

.avatar-sm {
  width: 28px;
  height: 28px;
  border-radius: 0;
  color: white;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
  flex-shrink: 0;
}

/* User Dropdown */
.user-menu-wrapper {
  position: relative;
}

.user-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  min-width: 200px;
  z-index: 200;
}

.user-dropdown.show {
  display: block;
}

.dropdown-header {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}

.dropdown-header strong {
  display: block;
  font-size: 14px;
}

.dropdown-email {
  display: block;
  font-size: 12px;
  color: var(--muted-foreground);
}

.dropdown-divider {
  height: 1px;
  background: var(--border);
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  font-size: 14px;
  color: var(--foreground);
  transition: background 0.2s;
}

.dropdown-item:hover {
  background: var(--accent);
}

/* =====================================================
   Flash Messages & Alerts
   ===================================================== */
.flash-container {
  max-width: 1200px;
  margin: 10px auto 0;
  padding: 0 24px;
}

.alert {
  padding: 12px 16px;
  border-radius: var(--radius);
  margin-bottom: 16px;
  font-size: 14px;
  border: 1px solid;
}

.alert-success {
  background: var(--success-bg);
  color: var(--success-fg);
  border-color: var(--success);
}

.alert-danger {
  background: var(--danger-bg);
  color: var(--danger-fg);
  border-color: var(--danger);
}

.alert-warning {
  background: var(--warning-bg);
  color: var(--warning-fg);
  border-color: var(--warning);
}

.alert-info {
  background: var(--info-bg);
  color: var(--info-fg);
  border-color: var(--info);
}

.alert ul {
  margin: 0;
  padding-left: 16px;
}

.alert li {
  margin-bottom: 2px;
}

/* =====================================================
   Auth Pages
   ===================================================== */
.auth-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 60px);
  padding: 40px 20px;
  background: var(--background);
}

.auth-card {
  background: var(--card);
  border-radius: 0;
  box-shadow: var(--shadow-md);
  padding: 40px;
  width: 100%;
  max-width: 440px;
  border: 1px solid var(--border);
}

.auth-header {
  text-align: center;
  margin-bottom: 32px;
}

.auth-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  background: var(--muted);
  border-radius: 0;
  margin-bottom: 16px;
  color: var(--primary);
}

.auth-logo-img {
  width: 36px;
  height: 36px;
  display: block;
}

.auth-title {
  font-size: 24px;
  font-weight: 300;
  margin-bottom: 8px;
}

.auth-subtitle {
  color: var(--muted-foreground);
  font-size: 14px;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.auth-footer {
  text-align: center;
  margin-top: 24px;
  font-size: 14px;
  color: var(--muted-foreground);
}

.auth-footer a {
  color: var(--primary);
  font-weight: 600;
  text-decoration: underline;
}

/* =====================================================
   Forms
   ===================================================== */
.form-group {
  margin-bottom: 16px;
  flex: 1;
}

.form-label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 6px;
  color: var(--foreground);
}

.required {
  color: var(--danger);
}

.form-control {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  font-family: inherit;
  transition: all 0.2s;
  background: var(--card);
  color: var(--foreground);
}

.form-control:focus {
  outline: none;
  border-color: var(--ring);
  box-shadow: var(--ring-focus);
}

textarea.form-control {
  resize: vertical;
}

select.form-control {
  cursor: pointer;
}

.form-hint {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted-foreground);
}

.form-row {
  display: flex;
  gap: 16px;
}

.form-horizontal {
  max-width: 640px;
}

.form-card {
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 24px;
}

.form-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

/* =====================================================
   Buttons
   ===================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s, box-shadow 0.15s, transform 0.05s;
  border: 1px solid transparent;
  font-family: inherit;
  text-decoration: none;
  white-space: nowrap;
  user-select: none;
}

.btn:focus-visible {
  outline: none;
  box-shadow: var(--ring-focus);
}

.btn:active {
  transform: translateY(1px);
}

.btn:disabled,
.btn[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.btn-sm {
  padding: 5px 10px;
  font-size: 13px;
}

.btn-block {
  width: 100%;
  justify-content: center;
}

.btn-outline {
  background: transparent;
  border-color: var(--border);
  color: var(--foreground);
}

.btn-outline:hover {
  background: var(--accent);
}

.btn-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--foreground);
}

.btn-ghost:hover {
  background: var(--accent);
}

.btn-primary {
  background: var(--primary);
  color: var(--primary-foreground);
}

.btn-primary:hover {
  opacity: 0.9;
}

.btn-danger-text {
  color: var(--danger);
}

.btn-danger {
  background: var(--danger);
  color: #fff;
  border-color: var(--danger);
}

.btn-danger:hover {
  filter: brightness(1.1);
}

.btn-success {
  background: var(--success);
  color: #fff;
  border-color: var(--success);
}

.btn-success:hover {
  filter: brightness(1.1);
}

.status-success { color: var(--success); font-weight: 500; }
.status-danger  { color: var(--danger);  font-weight: 500; }
.status-warning { color: var(--warning); font-weight: 500; }
.status-info    { color: var(--info);    font-weight: 500; }

/* =====================================================
   Admin / Data Table
   ===================================================== */
.table-container {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.data-table thead {
  background: var(--muted);
}

.data-table th {
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  font-size: 12px;
  color: var(--muted-foreground);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--border);
}

.data-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.data-table tbody tr:last-child td {
  border-bottom: none;
}

.data-table tbody tr:hover {
  background: var(--accent);
}

.user-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-name {
  font-weight: 500;
}

.user-username {
  font-size: 12px;
}

.avatar-sm {
  width: 32px;
  height: 32px;
  font-size: 12px;
  flex-shrink: 0;
}

.action-buttons {
  display: flex;
  gap: 6px;
  align-items: center;
}

.role-select {
  padding: 4px 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--background);
  color: var(--foreground);
  font-size: 13px;
  cursor: pointer;
}

.role-select:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: none;
  background: transparent;
  border-radius: var(--radius);
  cursor: pointer;
  color: var(--muted-foreground);
  transition: all 0.2s;
}

.btn-icon:hover {
  background: var(--accent);
  color: var(--foreground);
}

.btn-icon-danger:hover {
  background: var(--danger-bg);
  color: var(--danger);
}

/* =====================================================
   Badge Styles
   ===================================================== */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 0;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}

.badge-sm {
  padding: 2px 8px;
  font-size: 11px;
}

.badge-blue {
  background: var(--info-bg);
  color: var(--info-fg);
}

.badge-green {
  background: var(--success-bg);
  color: var(--success-fg);
}

.badge-yellow {
  background: var(--warning-bg);
  color: var(--warning-fg);
}

.badge-gray {
  background: var(--muted);
  color: var(--muted-foreground);
}

.badge-red {
  background: var(--danger-bg);
  color: var(--danger-fg);
}

/* =====================================================
   Toolbar Styles (Gantt page)
   ===================================================== */
.toolbar {
  min-height: 56px;
  background: var(--card);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  position: sticky;
  top: 60px;
  z-index: 99;
  flex-wrap: wrap;
  gap: 8px;
}

.toolbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.page-title {
  font-size: 20px;
  font-weight: 400;
  color: var(--foreground);
}

.toolbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.view-toggle {
  display: flex;
  background: var(--muted);
  border-radius: var(--radius);
  padding: 2px;
}

.view-btn {
  padding: 5px 10px;
  border: none;
  background: transparent;
  border-radius: 0;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted-foreground);
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.view-btn:hover {
  color: var(--foreground);
}

.view-btn.active {
  background: var(--card);
  color: var(--foreground);
  box-shadow: var(--shadow-sm);
}

.toolbar-divider {
  width: 1px;
  height: 24px;
  background: var(--border);
}

/* =====================================================
   Gantt Chart Container
   ===================================================== */
.gantt-page {
  /* Main gantt page wrapper */
}

.gantt-container {
  display: flex;
  height: calc(100vh - 124px);
  background: var(--background);
  position: relative;
}

/* Task Panel */
.task-panel {
  width: 400px;
  min-width: 300px;
  max-width: 600px;
  background: var(--card);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: width 0.25s ease;
  position: relative;
}

.task-panel-toggle {
  position: absolute;
  top: 50%;
  right: -14px;
  transform: translateY(-50%);
  z-index: 20;
  width: 28px;
  height: 28px;
  border-radius: 0;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--muted-foreground);
  font-size: 11px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
  transition: background 0.2s, color 0.2s;
}
.task-panel-toggle:hover {
  background: var(--accent);
  color: var(--foreground);
}

.task-panel.collapsed {
  width: 36px;
  min-width: 36px;
}
.task-panel.collapsed .task-panel-header,
.task-panel.collapsed .task-panel-body {
  display: none;
}

.task-panel-header {
  display: grid;
  grid-template-columns: 1fr 80px 100px;
  gap: 8px;
  padding: 10px 12px;
  background: var(--muted);
  border-bottom: 1px solid var(--border);
  font-size: 11px;
  font-weight: 600;
  color: var(--muted-foreground);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.task-panel-body {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
}

.task-row {
  display: grid;
  grid-template-columns: 1fr 80px 100px;
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  align-items: center;
  font-size: 13px;
  transition: background 0.15s;
  color: var(--foreground);
}

.task-row:nth-child(even) {
  background: color-mix(in srgb, var(--muted) 60%, transparent);
}

.task-row:hover {
  background: var(--accent);
}

.task-row.phase {
  background: var(--muted);
  font-weight: 500;
  cursor: pointer;
}

.task-row.phase:nth-child(even) {
  background: var(--muted);
}

.task-row.phase:hover {
  background: var(--accent);
}

.task-row.subtask {
  padding-left: 28px;
}

.task-expand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  margin-right: 6px;
  cursor: pointer;
  transition: transform 0.2s;
  flex-shrink: 0;
}

.task-expand.collapsed {
  transform: rotate(-90deg);
}

.task-col-name {
  display: flex;
  align-items: center;
  color: var(--foreground);
  overflow: hidden;
  min-width: 0;
}

.task-col-name > span:not(.task-expand) {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.phase-name {
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.phase-count {
  margin-left: 6px;
  font-size: 11px;
  font-weight: 400;
  color: var(--muted-foreground);
  background: var(--accent);
  padding: 1px 5px;
  border-radius: 0;
  white-space: nowrap;
  flex-shrink: 0;
}

.task-col-sorumlu {
  display: flex;
  align-items: center;
  gap: 4px;
  overflow: hidden;
  min-width: 0;
}

.assignee-name {
  font-size: 11px;
  color: var(--muted-foreground);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-col-durum {
  display: flex;
  align-items: center;
  gap: 5px;
  overflow: hidden;
  min-width: 0;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 0;
  flex-shrink: 0;
}

.status-label {
  font-size: 11px;
  color: var(--muted-foreground);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Timeline Panel */
.timeline-panel {
  flex: 1;
  overflow-x: auto;
  overflow-y: auto;
  position: relative;
  background: var(--background);
}

.timeline-header {
  display: flex;
  background: var(--muted);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
  height: 60px;
}

.timeline-month {
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
}

.timeline-month-name {
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--foreground);
  border-bottom: 1px solid var(--border);
}

.timeline-days {
  display: flex;
  flex: 1;
}

.timeline-day {
  min-width: 40px;
  padding: 4px;
  text-align: center;
  font-size: 11px;
  color: var(--muted-foreground);
  border-right: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
}

.timeline-day.weekend {
  background: var(--accent);
}

.timeline-day.today {
  background: var(--today-bg);
  color: var(--today-fg);
  font-weight: 600;
}

.timeline-body {
  position: relative;
  min-height: 100%;
}

.timeline-row {
  height: 49px;
  border-bottom: 1px solid var(--border);
  position: relative;
  display: flex;
}

.timeline-row:nth-child(even) {
  background: color-mix(in srgb, var(--muted) 60%, transparent);
}

.timeline-row.phase {
  background: var(--muted);
}

.timeline-row.phase:nth-child(even) {
  background: var(--muted);
}

.timeline-cell {
  min-width: 40px;
  border-right: 1px solid var(--border);
  position: relative;
}

.timeline-cell.weekend {
  background: var(--accent);
}

.gantt-bar {
  position: absolute;
  height: 28px;
  top: 50%;
  transform: translateY(-50%);
  border-radius: 0;
  display: flex;
  align-items: center;
  padding: 0 12px;
  font-size: 12px;
  font-weight: 500;
  color: white;
  cursor: pointer;
  transition: all 0.15s;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.gantt-bar:hover {
  filter: brightness(1.08);
  box-shadow: var(--shadow-md);
}

.gantt-bar.completed {
  background: var(--success);
}

.gantt-bar.in-progress {
  background: var(--warning);
}

.gantt-bar.pending {
  background: var(--muted-foreground);
}

.gantt-bar.phase-bar {
  background: var(--info);
  height: 32px;
  font-weight: 600;
}

/* Today Line */
.today-line {
  position: absolute;
  top: 60px;
  bottom: 0;
  width: 2px;
  background: var(--info);
  z-index: 5;
  pointer-events: none;
}

.today-marker {
  position: absolute;
  top: -24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--info);
  color: #fff;
  padding: 2px 8px;
  border-radius: 0;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

/* =====================================================
   Dashboard Page
   ===================================================== */
.dashboard-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px;
}

.dashboard-header {
  margin-bottom: 24px;
}

.dashboard-header h1 {
  font-size: 24px;
  font-weight: 400;
  margin-bottom: 4px;
}

.text-muted {
  color: var(--muted-foreground);
  font-size: 14px;
}

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-number {
  display: block;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.2;
}

.stat-label {
  font-size: 13px;
  color: var(--muted-foreground);
}

/* Dashboard Grid */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 24px;
}

.dashboard-sidebar {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.dashboard-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}

.card-header h2 {
  font-size: 16px;
  font-weight: 600;
}

.card-body {
  padding: 16px 20px;
}

.empty-state {
  text-align: center;
  padding: 24px;
  color: var(--muted-foreground);
  font-size: 14px;
}

.empty-state p {
  margin-bottom: 12px;
}

.empty-state-large {
  text-align: center;
  padding: 80px 40px;
  color: var(--muted-foreground);
}

.empty-state-large h3 {
  font-size: 18px;
  margin: 16px 0 8px;
  color: var(--foreground);
}

.empty-state-large p {
  margin-bottom: 20px;
}

/* Project List (dashboard) */
.project-list {
  display: flex;
  flex-direction: column;
}

.project-item {
  display: block;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
  transition: background 0.2s;
  text-decoration: none;
  color: inherit;
}

.project-item:last-child {
  border-bottom: none;
}

.project-item:hover {
  background: var(--accent);
  margin: 0 -20px;
  padding-left: 20px;
  padding-right: 20px;
  border-radius: var(--radius);
}

.project-item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

.project-item-header h3 {
  font-size: 15px;
  font-weight: 600;
}

.project-desc {
  font-size: 13px;
  color: var(--muted-foreground);
  margin-bottom: 8px;
}

.project-meta {
  display: flex;
  gap: 16px;
  margin-bottom: 8px;
}

.meta-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--muted-foreground);
}

.progress-bar-container {
  height: 4px;
  background: var(--muted);
  border-radius: 0;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background: var(--info);
  border-radius: 0;
  transition: width 0.3s ease;
}

/* Task Compact List - Todo el yazısı stili */
.task-list-compact {
  display: flex;
  flex-direction: column;
  counter-reset: task-counter;
}

.task-compact-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  color: var(--foreground);
  font-size: 14px;
  position: relative;
  counter-increment: task-counter;
}

.task-compact-item::before {
  content: counter(task-counter) ".";
  font-weight: 400;
  color: var(--red-accent);
  font-size: 14px;
  min-width: 24px;
  flex-shrink: 0;
}

.task-compact-item:last-child {
  border-bottom: none;
}

.task-compact-item .task-compact-title {
  color: var(--foreground);
}

.task-compact-item .task-compact-meta {
  color: var(--muted-foreground);
}

.priority-dot {
  width: 8px;
  height: 8px;
  border-radius: 0;
  flex-shrink: 0;
}

.task-compact-info {
  flex: 1;
  min-width: 0;
}

.task-compact-title {
  display: block;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.task-compact-meta {
  display: block;
  font-size: 12px;
  color: var(--muted-foreground);
}

/* Reminder List (dashboard) */
.reminder-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.reminder-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: var(--radius);
  transition: background 0.2s;
}

.reminder-item:hover {
  background: var(--accent);
}

.reminder-icon {
  color: var(--warning);
  flex-shrink: 0;
}

.reminder-info {
  flex: 1;
  min-width: 0;
}

.reminder-title {
  display: block;
  font-size: 14px;
  font-weight: 500;
}

.reminder-time {
  display: block;
  font-size: 12px;
  color: var(--muted-foreground);
}

/* =====================================================
   Projects Grid (projects/index)
   ===================================================== */
.page-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px;
}

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.page-header h1 {
  font-size: 24px;
  font-weight: 400;
  margin-bottom: 4px;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 20px;
}

.project-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: all 0.2s;
}

.project-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--ring);
}

.project-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.project-card-header h3 {
  font-size: 16px;
  font-weight: 600;
}

.project-card-header h3 a {
  text-decoration: none;
  color: inherit;
}

.project-card-header h3 a:hover {
  color: var(--info);
}

.project-card-desc {
  font-size: 13px;
  color: var(--muted-foreground);
  margin-bottom: 12px;
  line-height: 1.6;
}

.project-card-meta {
  display: flex;
  gap: 16px;
  margin-bottom: 12px;
}

.project-card-progress {
  margin-bottom: 12px;
}

.progress-info {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--muted-foreground);
  margin-bottom: 4px;
}

.project-card-footer {
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

/* =====================================================
   List View (Tasks table)
   ===================================================== */
.list-view-content {
  overflow-x: auto;
  padding: 0 24px 24px;
}

.task-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.task-table th {
  text-align: left;
  padding: 10px 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted-foreground);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 2px solid var(--border);
}

.task-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
}

.task-table tr:hover td {
  background: var(--accent);
}

.task-table .phase-row td {
  font-weight: 600;
  background: var(--muted);
}

/* =====================================================
   Bottom Tabs (Notes, Members, Info)
   ===================================================== */
.bottom-tabs {
  background: var(--card);
  border-top: 1px solid var(--border);
  margin: 0 24px 24px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.tab-header {
  display: flex;
  border-bottom: 1px solid var(--border);
}

.tab-btn {
  padding: 12px 20px;
  border: none;
  background: transparent;
  font-size: 14px;
  font-weight: 500;
  color: var(--muted-foreground);
  cursor: pointer;
  transition: all 0.2s;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}

.tab-btn:hover {
  color: var(--foreground);
}

.tab-btn.active {
  color: var(--foreground);
  border-bottom-color: var(--primary);
}

.tab-content {
  display: none;
  padding: 20px;
}

.tab-content.active {
  display: block;
}

/* Notes */
.note-form {
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.note-input-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.note-input-row .autocomplete-wrapper {
  width: 100%;
}

.note-input-row .autocomplete-dropdown {
  bottom: auto;
  top: calc(100% + 4px);
}

.notes-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.note-item {
  padding: 12px;
  background: var(--muted);
  border-radius: var(--radius);
  position: relative;
}

.note-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.note-author {
  display: flex;
  align-items: center;
  gap: 8px;
}

.note-author-name {
  font-size: 13px;
  font-weight: 600;
}

.note-time {
  font-size: 12px;
  color: var(--muted-foreground);
}

.note-content {
  font-size: 14px;
  line-height: 1.6;
  white-space: pre-wrap;
}

.note-actions {
  position: absolute;
  top: 8px;
  right: 8px;
  display: none;
}

.note-item:hover .note-actions {
  display: block;
}

/* Members */
.members-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.member-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: var(--radius);
  transition: background 0.2s;
}

.member-item:hover {
  background: var(--accent);
}

.member-info {
  flex: 1;
}

.member-name {
  display: block;
  font-size: 14px;
  font-weight: 500;
}

.member-email {
  display: block;
  font-size: 12px;
  color: var(--muted-foreground);
}

/* Project Info */
.project-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
}

.info-item label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted-foreground);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.info-item span, .info-item p {
  font-size: 14px;
}

/* =====================================================
   Reminders (Full Page)
   ===================================================== */
.reminder-list-full {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.reminder-item-full {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all 0.2s;
}

.reminder-item-full:hover {
  border-color: var(--info);
}

.reminder-item-full.overdue {
  border-left: 3px solid var(--danger);
}

.reminder-item-full.done {
  opacity: 0.7;
}

.reminder-details {
  flex: 1;
}

.reminder-details strong {
  display: block;
  font-size: 14px;
  margin-bottom: 2px;
}

.reminder-desc {
  font-size: 13px;
  color: var(--muted-foreground);
  margin-bottom: 4px;
}

.reminder-meta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.reminder-actions {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}

/* =====================================================
   Modal
   ===================================================== */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--overlay);
  backdrop-filter: blur(2px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.modal-overlay.show {
  display: flex;
}

.modal {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 0;
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
}

.modal-header h2 {
  font-size: 18px;
  font-weight: 600;
}

.modal-close {
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  font-size: 24px;
  cursor: pointer;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted-foreground);
  transition: all 0.2s;
}

.modal-close:hover {
  background: var(--accent);
  color: var(--foreground);
}

.modal-body {
  padding: 24px;
}

.modal-footer {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  padding: 16px 24px;
  border-top: 1px solid var(--border);
}

/* =====================================================
   Scrollbar Styles
   ===================================================== */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--muted);
}

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 0;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--muted-foreground);
}

/* =====================================================
   Responsive
   ===================================================== */
@media (max-width: 768px) {
  body.has-bottom-nav {
    padding-bottom: calc(74px + env(safe-area-inset-bottom));
  }

  .navbar {
    height: 56px;
    padding: 0 14px;
  }

  .navbar-left {
    gap: 12px;
  }

  .navbar-right {
    gap: 8px;
  }

  .navbar-divider {
    display: none;
  }

  .navbar-links {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 900;
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 1fr;
    gap: 0;
    min-height: calc(64px + env(safe-area-inset-bottom));
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
    background: var(--card);
    border-top: 1px solid var(--border);
    box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.08);
  }

  .nav-link {
    min-width: 0;
    height: 52px;
    padding: 6px 4px;
    flex-direction: column;
    justify-content: center;
    gap: 3px;
    border-radius: var(--radius);
    font-size: 11px;
    line-height: 1.1;
    text-align: center;
    white-space: nowrap;
  }

  .nav-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
  }

  .nav-link.active {
    background: var(--accent);
    color: var(--foreground);
  }
  
  .toolbar {
    flex-direction: column;
    height: auto;
    min-height: auto;
    padding: 10px 12px;
    gap: 10px;
    top: 56px;
    align-items: stretch;
  }
  
  .toolbar-left,
  .toolbar-right {
    width: 100%;
    justify-content: flex-start;
    gap: 8px;
    flex-wrap: wrap;
  }

  .toolbar-left {
    justify-content: space-between;
  }

  .toolbar-right .btn {
    min-height: 38px;
  }

  .toolbar-divider {
    display: none;
  }

  .page-title {
    min-width: 0;
    font-size: 18px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .view-toggle {
    flex: 1 1 140px;
  }

  .view-btn {
    flex: 1;
    min-height: 34px;
  }

  .gantt-container {
    height: calc(100dvh - 166px - env(safe-area-inset-bottom));
    min-height: 420px;
    overflow: hidden;
  }

  .task-panel {
    width: 176px;
    min-width: 176px;
    max-width: 176px;
  }

  .task-panel.collapsed {
    width: 32px;
    min-width: 32px;
  }

  .task-panel-toggle {
    right: -12px;
    width: 28px;
    height: 36px;
  }

  .task-panel-header,
  .task-row {
    grid-template-columns: 1fr;
    min-height: 46px;
    padding: 9px 10px;
  }

  .task-panel-header .task-col-sorumlu,
  .task-panel-header .task-col-durum,
  .task-row .task-col-sorumlu,
  .task-row .task-col-durum {
    display: none;
  }

  .task-row.subtask {
    padding-left: 18px;
  }

  .timeline-panel {
    min-width: 0;
    -webkit-overflow-scrolling: touch;
  }

  .timeline-header {
    height: 56px;
  }

  .timeline-month-name {
    padding: 7px 10px;
  }

  .timeline-row {
    height: 46px;
  }

  .gantt-bar {
    height: 26px;
    padding: 0 8px;
    font-size: 11px;
  }

  .gantt-bar.phase-bar {
    height: 28px;
  }

  .today-line {
    top: 56px;
  }

  .list-view-content {
    padding: 0 12px 16px;
  }

  .task-table {
    min-width: 720px;
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .projects-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .page-container,
  .dashboard-container {
    padding: 16px 12px;
  }

  .page-header {
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
  }

  .page-header .btn {
    width: 100%;
    min-height: 40px;
  }

  .project-card {
    padding: 16px;
  }

  .project-card-header {
    align-items: flex-start;
    gap: 10px;
  }

  .project-card-header h3 {
    min-width: 0;
  }

  .project-meta,
  .project-card-meta {
    flex-wrap: wrap;
    gap: 8px 12px;
  }

  .form-row {
    flex-direction: column;
    gap: 0;
  }

  .auth-card {
    padding: 24px;
  }

  .bottom-tabs {
    margin: 0 12px 16px;
  }

  .tab-header {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .tab-btn {
    flex: 1 0 auto;
    min-height: 44px;
    padding: 10px 14px;
    white-space: nowrap;
  }

  .tab-content {
    padding: 14px;
  }

  .note-header {
    align-items: flex-start;
    gap: 8px;
  }

  .note-time {
    white-space: nowrap;
  }

  .note-actions {
    display: block;
  }

  .member-add-form > div {
    flex-direction: column;
  }

  .member-add-form .form-control,
  .member-add-form .btn {
    width: 100%;
  }

  .member-item {
    align-items: flex-start;
  }

  .member-info {
    min-width: 0;
  }

  .member-email {
    overflow-wrap: anywhere;
  }

  .project-info-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .modal-overlay {
    align-items: flex-end;
    padding: 12px;
  }

  .modal {
    max-height: calc(92dvh - env(safe-area-inset-bottom));
  }

  .modal-header,
  .modal-body,
  .modal-footer {
    padding-left: 16px;
    padding-right: 16px;
  }

  .modal-footer {
    flex-wrap: wrap;
  }

  .modal-footer .btn {
    min-height: 38px;
  }
}

/* =====================================================
   Toast Notifications
   ===================================================== */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  padding: 12px 18px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  color: #fff;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.25s, transform 0.25s;
  pointer-events: auto;
  cursor: pointer;
  max-width: 320px;
}

.toast.show, .toast-success, .toast-error, .toast-warning, .toast-info {
  opacity: 1;
  transform: translateY(0);
}

.toast-success { background: var(--success); }
.toast-error   { background: var(--danger); }
.toast-warning { background: var(--warning); }
.toast-info    { background: var(--info); }

/* =====================================================
   Confirm Dialog
   ===================================================== */
.confirm-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--overlay);
  backdrop-filter: blur(2px);
  z-index: 2000;
  align-items: center;
  justify-content: center;
}

.confirm-overlay.show {
  display: flex;
}

.confirm-box {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 32px;
  width: 100%;
  max-width: 400px;
  box-shadow: var(--shadow-lg);
}

.confirm-box h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 10px;
}

.confirm-box p {
  color: var(--muted-foreground);
  font-size: 14px;
  margin-bottom: 24px;
  line-height: 1.6;
  white-space: pre-line;
}

.confirm-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

/* =====================================================
   Task Comments Section
   ===================================================== */
.task-comments-section {
  border-top: 1px solid var(--border);
  padding: 16px 24px;
}

.task-comments-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted-foreground);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 12px;
}

.task-comments-list {
  max-height: 220px;
  overflow-y: auto;
  margin-bottom: 12px;
}

.task-comment-input-row {
  display: flex;
  gap: 8px;
  align-items: flex-start;
}

/* =====================================================
   Autocomplete
   ===================================================== */
.autocomplete-wrapper {
  position: relative;
  flex: 1;
}

.autocomplete-dropdown {
  display: none;
  position: absolute;
  bottom: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  z-index: 500;
  max-height: 220px;
  overflow-y: auto;
}

.autocomplete-dropdown.show {
  display: block;
}

.autocomplete-hint {
  font-size: 11px;
  color: var(--muted-foreground);
  padding: 6px 12px;
  border-bottom: 1px solid var(--border);
}

.autocomplete-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  cursor: pointer;
  font-size: 13px;
  transition: background 0.15s;
}

.autocomplete-item:hover,
.autocomplete-item.active {
  background: var(--accent);
}

.ac-icon { font-size: 14px; flex-shrink: 0; }
.ac-label { flex: 1; }
.ac-date  { font-size: 11px; color: var(--muted-foreground); }

/* Color Dot Picker */
.color-dot {
  width: 28px;
  height: 28px;
  border-radius: 0;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s, border-color 0.15s;
}

.color-dot:hover {
  transform: scale(1.15);
}

.color-dot.selected {
  border-color: var(--foreground);
  transform: scale(1.15);
}

/* Tab count badge */
.tab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--muted);
  color: var(--muted-foreground);
  border-radius: 0;
  font-size: 11px;
  padding: 1px 7px;
  margin-left: 4px;
}
