* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  background: #f5f6f8;
  color: #1f2937;
}

/* ---------- Giriş ekranı ---------- */
.login-body {
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #eef1f4;
}

.login-box {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.12);
  width: 100%;
  max-width: 360px;
  overflow: hidden;
}

.login-logo-band {
  background: #0a0a0a;
  padding: 26px 24px;
  display: flex;
  justify-content: center;
}

.login-logo-band img {
  height: 38px;
  width: auto;
  display: block;
}

.login-box-body {
  padding: 32px 32px 40px;
}

.login-box h1 {
  margin: 0 0 4px;
  font-size: 20px;
  color: #111827;
  text-align: center;
}

.subtitle {
  margin: 0 0 24px;
  color: #6b7280;
  font-size: 14px;
  text-align: center;
}

.login-box button[type="submit"] {
  width: 100%;
  margin-top: 20px;
  padding: 12px;
}

/* ---------- Ortak form elemanları ---------- */
label {
  display: block;
  margin: 14px 0 6px;
  font-size: 13px;
  font-weight: 600;
  color: #374151;
}

input, select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  background: #fff;
}

input:focus, select:focus {
  outline: none;
  border-color: #111827;
  box-shadow: 0 0 0 3px rgba(17,24,39,0.08);
}

button {
  cursor: pointer;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
}

.btn-primary {
  background: #141414;
  color: #fff;
  padding: 10px 18px;
}
.btn-primary:hover { background: #2b2b2b; }

.btn-secondary {
  background: #eceef1;
  color: #374151;
  padding: 10px 18px;
}
.btn-secondary:hover { background: #e0e3e7; }

.btn-save {
  background: #16a34a;
  color: #fff;
  padding: 10px 18px;
}
.btn-save:hover { background: #15803d; }

.btn-exit {
  background: #991b1b;
  color: #fff;
  padding: 10px 18px;
}
.btn-exit:hover { background: #7f1d1d; }

.action-btn {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  font-size: 12.5px;
  font-weight: 600;
  border-radius: 6px;
  white-space: nowrap;
}

.action-edit { background: #dbeafe; color: #1d4ed8; }
.action-edit:hover { background: #c7dcfb; }

.action-reset { background: #ede9fe; color: #6d28d9; }
.action-reset:hover { background: #ddd6fe; }

.action-toggle { background: #ffedd5; color: #c2410c; }
.action-toggle:hover { background: #fed7aa; }

.action-delete { background: #fee2e2; color: #b91c1c; }
.action-delete:hover { background: #fecaca; }

.error-msg {
  color: #b91c1c;
  font-size: 13px;
  margin-top: 10px;
  min-height: 16px;
}

/* ---------- Uygulama kabuğu ---------- */
.app-shell {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 232px;
  flex-shrink: 0;
  background: #0a0a0a;
  display: flex;
  flex-direction: column;
  padding: 20px 0;
}

.sidebar-logo {
  padding: 6px 20px 22px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  margin-bottom: 14px;
}

.sidebar-logo img {
  height: 28px;
  width: auto;
  display: block;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0 12px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  color: #9ca3af;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  cursor: default;
  width: 100%;
  background: none;
  border: none;
  font-family: inherit;
  text-align: left;
}

.nav-item svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.nav-item.active {
  background: rgba(255,255,255,0.1);
  color: #fff;
}

.nav-item.disabled {
  color: #5b6370;
  cursor: not-allowed;
}

.nav-group-toggle {
  cursor: pointer;
  color: #d1d5db;
}
.nav-group-toggle:hover { background: rgba(255,255,255,0.06); }

.nav-chevron {
  margin-left: auto;
  width: 14px !important;
  height: 14px !important;
  transition: transform 0.15s ease;
}

.nav-group.open .nav-chevron { transform: rotate(180deg); }

.nav-submenu {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 4px 0 6px 34px;
}

.nav-group:not(.open) .nav-submenu { display: none; }

.nav-subitem {
  display: block;
  padding: 8px 10px;
  border-radius: 6px;
  color: #9ca3af;
  font-size: 13px;
  text-decoration: none;
  cursor: default;
}

.nav-subitem.active {
  background: rgba(255,255,255,0.1);
  color: #fff;
  font-weight: 600;
}

.soon-badge {
  margin-left: auto;
  font-style: normal;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  background: rgba(255,255,255,0.08);
  color: #9ca3af;
  padding: 3px 6px;
  border-radius: 4px;
}

.main-area {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.topheader {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
  padding: 16px 32px;
}

.topheader h1 {
  font-size: 19px;
  margin: 0;
  color: #111827;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 14px;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  color: #1f2937;
}

.content {
  padding: 28px 32px;
  width: 100%;
}

/* ---------- İstatistik kartları ---------- */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 22px;
}

#dashProjectStatsRow {
  grid-template-columns: repeat(5, 1fr);
}

.stat-card {
  background: #fff;
  border-radius: 12px;
  padding: 18px 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  border: 1px solid #eef0f2;
}

.stat-value {
  font-size: 26px;
  font-weight: 700;
  color: #111827;
}

.stat-label {
  font-size: 13px;
  color: #6b7280;
  margin-top: 4px;
}

.bar-chart-title {
  font-size: 13px;
  font-weight: 700;
  color: #374151;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin: 4px 0 12px;
}

.bar-chart-title:not(:first-child) {
  margin-top: 22px;
}

.bar-chart-row {
  display: grid;
  grid-template-columns: minmax(60px, 120px) minmax(40px, 1fr) 24px;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 12.5px;
}

.bar-chart-label {
  color: #374151;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bar-chart-track {
  background: #f1f3f5;
  border-radius: 999px;
  height: 12px;
  overflow: hidden;
}

.bar-chart-fill {
  height: 100%;
  background: #d4a24c;
  border-radius: 999px;
}

.bar-chart-fill.region {
  background: #6d28d9;
}

.bar-chart-count {
  font-weight: 700;
  color: #111827;
  text-align: right;
}

.donut-wrap {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 40px;
  row-gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 4px;
  padding-bottom: 4px;
}

.mini-legend-block {
  min-width: 240px;
  padding-left: 24px;
  border-left: 1px solid #f0f1f3;
}

.mini-legend-block:first-of-type {
  padding-left: 0;
  border-left: none;
}

.mini-legend-title {
  font-size: 11.5px;
  font-weight: 700;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 8px;
}

.donut-chart {
  position: relative;
  width: 88px;
  height: 88px;
  border-radius: 50%;
  flex-shrink: 0;
}

.donut-chart::after {
  content: '';
  position: absolute;
  inset: 14px;
  background: #fff;
  border-radius: 50%;
}

.donut-hole {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
  color: #111827;
}

.donut-legend {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12.5px;
  color: #374151;
  max-height: 92px;
  overflow-y: auto;
  padding-right: 4px;
}

.donut-legend-item {
  display: grid;
  grid-template-columns: auto minmax(120px, 160px) minmax(50px, 70px) 24px;
  align-items: center;
  gap: 8px;
}

.donut-legend-label {
  white-space: nowrap;
  overflow: visible;
}

.donut-mini-track {
  background: #f1f3f5;
  border-radius: 999px;
  height: 6px;
  overflow: hidden;
  display: block;
}

.donut-mini-fill {
  display: block;
  height: 100%;
  border-radius: 999px;
}

.donut-legend-count {
  text-align: right;
  font-weight: 700;
  color: #111827;
}

.donut-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
}

.ca-owner-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 6px;
}

.ca-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.ca-chip-remove {
  background: none;
  border: none;
  color: #3730a3;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  line-height: 1;
  padding: 0;
}
.ca-chip-remove:hover { color: #b91c1c; }

.ca-owner-add {
  font-size: 12.5px;
  min-width: 110px;
}

/* ---------- Kartlar / tablo ---------- */
.card {
  background: #fff;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  border: 1px solid #eef0f2;
  overflow-x: auto;
}

.filter-card {
  margin-bottom: 16px;
  overflow: visible;
  background: #f4f1ea;
  border: 1px solid #e6e0d2;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: flex-end;
}

.filter-field {
  display: flex;
  flex-direction: column;
  min-width: 160px;
}

.filter-field-search {
  min-width: 220px;
  flex: 1 1 220px;
}

.filter-field label {
  font-size: 11px;
  font-weight: 700;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin: 0 0 5px;
}

.filter-field input,
.filter-field select {
  margin: 0;
  padding: 9px 11px;
  font-size: 13.5px;
}

.active-filters-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #f0f1f3;
}
.active-filters-row.hidden { display: none; }

.active-filters-label {
  font-size: 12.5px;
  font-weight: 600;
  color: #6b7280;
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  flex: 1;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #eef2ff;
  color: #3730a3;
  font-size: 12.5px;
  font-weight: 600;
  padding: 5px 8px 5px 12px;
  border-radius: 999px;
}

.filter-chip-remove {
  background: rgba(55,48,163,0.12);
  color: #3730a3;
  border: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.filter-chip-remove:hover { background: rgba(55,48,163,0.22); }

.clear-filters-btn {
  background: #fee2e2;
  color: #b91c1c;
  border: none;
  padding: 7px 14px;
  font-size: 12.5px;
  font-weight: 600;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
}
.clear-filters-btn:hover { background: #fecaca; }

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

.card-header h2 {
  margin: 0;
  font-size: 16px;
  color: #111827;
}

.show-passive-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #4b5563;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
}

.show-passive-toggle input[type="checkbox"] {
  cursor: pointer;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 18px;
}

.table-footer {
  display: flex;
  justify-content: flex-end;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid #f0f1f3;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 13px;
  font-weight: 500;
  color: #4b5563;
  cursor: pointer;
  user-select: none;
}

.checkbox-label input {
  width: 16px;
  height: 16px;
  accent-color: #141414;
  cursor: pointer;
}

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

.data-table:not(.customers-table) th:nth-child(1) { width: 21%; }
.data-table:not(.customers-table) th:nth-child(2) { width: 19%; }
.data-table:not(.customers-table) th:nth-child(3) { width: 14%; }
.data-table:not(.customers-table) th:nth-child(4) { width: 12%; }
.data-table:not(.customers-table) th:nth-child(5) { width: 9%; }
.data-table:not(.customers-table) th:nth-child(6) { width: 25%; }

.customers-table { table-layout: auto; }

.dashboard-triple {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  align-items: stretch;
  margin-bottom: 20px;
}

.dashboard-triple .card {
  padding: 14px 16px;
  margin-bottom: 0;
  min-width: 0;
}

.dashboard-triple .dashboard-compact-table {
  overflow-x: hidden;
}

.dashboard-compact-table .dash-plan-table {
  width: 100%;
  table-layout: fixed;
  font-size: 11.5px;
}
.dashboard-compact-table .dash-plan-table th,
.dashboard-compact-table .dash-plan-table td {
  padding: 6px 5px;
  max-width: none;
  overflow: hidden;
  text-overflow: clip;
  white-space: normal;
  word-break: normal;
  overflow-wrap: break-word;
  vertical-align: top;
}
.dashboard-compact-table .dash-plan-table thead th { white-space: normal; font-size: 10.5px; }
.data-table.dash-plan-5:not(.customers-table) th:nth-child(1) { width: 15%; }
.data-table.dash-plan-5:not(.customers-table) th:nth-child(2) { width: 15%; }
.data-table.dash-plan-5:not(.customers-table) th:nth-child(3) { width: 34%; }
.data-table.dash-plan-5:not(.customers-table) th:nth-child(4) { width: 19%; }
.data-table.dash-plan-5:not(.customers-table) th:nth-child(5) { width: 17%; }
.data-table.dash-plan-6:not(.customers-table) th:nth-child(1) { width: 12%; }
.data-table.dash-plan-6:not(.customers-table) th:nth-child(2) { width: 12%; }
.data-table.dash-plan-6:not(.customers-table) th:nth-child(3) { width: 14%; }
.data-table.dash-plan-6:not(.customers-table) th:nth-child(4) { width: 30%; }
.data-table.dash-plan-6:not(.customers-table) th:nth-child(5) { width: 16%; }
.data-table.dash-plan-6:not(.customers-table) th:nth-child(6) { width: 16%; }
.dash-plan-table .outcome-track-badge,
.dash-plan-table .status-badge { font-size: 10px; padding: 2px 6px; white-space: normal; }

.pager { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 4px 2px; border-top: 1px solid #f0f1f3; margin-top: 8px; }
.pager-info { font-size: 13px; color: #6b7280; }
.pager-btns { display: flex; gap: 6px; }
.pager-btns .btn-secondary { padding: 7px 12px; font-size: 13px; }
.pager-btns .btn-secondary:disabled { opacity: 0.45; cursor: not-allowed; }
.pager-size { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 13px; font-weight: 500; color: #6b7280; }
.pager-size select { width: auto; padding: 6px 8px; }
.dash-origin { font-size: 9px; color: #9ca3af; font-weight: 500; margin-top: 1px; line-height: 1.2; }
.dash-origin.unplanned { color: #ea580c; font-weight: 600; }
.dash-status-cell { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; }
.dash-plan-table .account-type-badge { font-size: 10px; padding: 2px 6px; white-space: normal; line-height: 1.25; }
.dash-cust { display: flex; flex-direction: column; gap: 1px; }
.dash-cust-name { font-weight: 700; color: #111827; font-size: 12px; }
/* ---------- Seyahat planları ---------- */
.travel-badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 700; white-space: nowrap; }
.travel-badge.pending { background: #fef3c7; color: #b45309; }
.travel-badge.approved { background: #ede9fe; color: #6d28d9; }
.travel-badge.rejected { background: #fee2e2; color: #b91c1c; }
.travel-badge.completed { background: #dcfce7; color: #15803d; }
.travel-badge.cancelled { background: #e5e7eb; color: #6b7280; }
.travel-card { margin-top: 20px; }
.btn-travel { background: #ede9fe; color: #6d28d9; }
.btn-travel:hover { background: #ddd6fe; }
.tab-badge { display: inline-block; background: #dc2626; color: #fff; border-radius: 999px; padding: 1px 8px; font-size: 11px; margin-left: 6px; }
#travelModal.modal-overlay { z-index: 55; }
#travelDetailModal.modal-overlay { z-index: 56; }
.travel-modal { max-width: 980px; }
.travel-section { margin-bottom: 18px; padding: 14px 16px; border: 1px solid #e5e7eb; border-radius: 10px; background: #fafafa; }
.travel-section h3 { margin: 0 0 8px; font-size: 14px; color: #6d28d9; }
.travel-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.travel-grid .tv-full { grid-column: 1 / -1; }
.travel-grid label, .travel-visit-row label { margin-top: 4px; font-size: 12px; }
.travel-visit-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)) 34px; gap: 10px; align-items: end; padding: 10px; margin-bottom: 10px; background: #fff; border: 1px solid #e5e7eb; border-radius: 8px; }
.travel-visit-row .tv-wide { grid-column: span 2; }
#travelJournalModal.modal-overlay { z-index: 57; }
.h-timeline-resched { margin: 6px 0; padding: 6px 8px; background: #fff7ed; border: 1px solid #fdba74; border-left: 4px solid #ea580c; border-radius: 6px; font-size: 11.5px; line-height: 1.45; color: #9a3412; }
.h-timeline-resched b { color: #7c2d12; }
.j-head-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.trip-card { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; padding: 16px 18px; margin-bottom: 12px; background: #f5f3ff; border: 1px solid #c4b5fd; border-left: 6px solid #7c3aed; border-radius: 10px; }
.trip-card.ongoing { background: #ecfdf5; border-color: #6ee7b7; border-left-color: #059669; }
.trip-place { font-size: 18px; font-weight: 800; color: #111827; }
.trip-dates { color: #4b5563; margin-top: 3px; font-size: 13.5px; }
.trip-purpose { color: #6b7280; margin-top: 4px; font-size: 12.5px; white-space: pre-wrap; }
.trip-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.travel-badge.ongoing { background: #d1fae5; color: #047857; }
.travel-dest-row textarea, .travel-visit-row textarea, .travel-grid textarea, .j-visit textarea.j-people {
  width: 100%; padding: 10px 12px; border: 1px solid #d1d5db; border-radius: 8px; font-family: inherit; font-size: 14px; resize: vertical; min-height: 42px;
}
.travel-dest-row textarea:focus, .travel-visit-row textarea:focus, .travel-grid textarea:focus, .j-visit textarea:focus { outline: none; border-color: #111827; box-shadow: 0 0 0 3px rgba(17,24,39,0.08); }
.travel-banner { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; padding: 14px 18px; background: #f5f3ff; border: 1px solid #c4b5fd; border-left: 6px solid #7c3aed; border-radius: 10px; }
.travel-banner.ongoing { background: #ecfdf5; border-color: #6ee7b7; border-left-color: #059669; }
.travel-banner-label { font-size: 11.5px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em; color: #6d28d9; margin-bottom: 2px; }
.travel-banner.ongoing .travel-banner-label { color: #047857; }
.j-day { margin-top: 16px; }
.j-day > h4 { margin: 0 0 8px; padding: 6px 12px; background: #ede9fe; color: #5b21b6; border-radius: 8px; font-size: 14px; }
.j-visit { padding: 12px 14px; margin-bottom: 10px; border: 1px solid #e5e7eb; border-left: 4px solid #7c3aed; border-radius: 10px; background: #fff; }
.j-visit-head { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.j-visit textarea, .j-summary textarea { width: 100%; padding: 10px 12px; border: 1px solid #d1d5db; border-radius: 8px; font-family: inherit; font-size: 14px; resize: vertical; }
.j-actions { display: flex; align-items: center; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.j-upload-label { margin: 0; cursor: pointer; padding: 10px 16px; border-radius: 8px; display: inline-block; }
.j-status { font-size: 12.5px; color: #6b7280; }
.j-status.error { color: #b91c1c; font-weight: 800; background: #fee2e2; padding: 4px 10px; border-radius: 6px; }
.j-status.saved { color: #047857; font-weight: 800; background: #d1fae5; padding: 4px 10px; border-radius: 6px; }
.j-label { font-size: 11px; font-weight: 700; text-transform: uppercase; color: #6b7280; margin-top: 8px; }
.j-readtext { white-space: pre-wrap; margin: 2px 0 6px; }
.j-media-grid { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.j-media-item { position: relative; width: 200px; }
.j-media-item img, .j-media-item video { width: 200px; height: 140px; object-fit: cover; border-radius: 8px; border: 1px solid #e5e7eb; background: #111827; }
.j-media-name { font-size: 11px; color: #6b7280; margin-top: 3px; word-break: break-all; }
.j-media-name span { color: #9ca3af; }
.j-media-del { position: absolute; top: 4px; right: 4px; width: 24px; height: 24px; border-radius: 50%; background: rgba(220, 38, 38, 0.9); color: #fff; font-size: 15px; line-height: 1; }
.j-extra, .j-summary { margin-top: 18px; padding: 14px 16px; background: #faf7ff; border: 1px solid #ddd6fe; border-radius: 10px; }
.j-extra h4, .j-summary h4 { margin: 0 0 8px; color: #6d28d9; }
.tv-warn { grid-column: 1 / -1; display: none; margin-top: 6px; padding: 6px 10px; border-radius: 6px; background: #fee2e2; color: #b91c1c; font-size: 12.5px; font-weight: 700; }
.tv-warn.active { display: block; }
.travel-section > .tv-warn { margin-top: 10px; }
.travel-dest-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)) 34px; gap: 10px; align-items: end; padding: 10px; margin-bottom: 10px; background: #fff; border: 1px solid #ddd6fe; border-left: 4px solid #7c3aed; border-radius: 8px; }
.travel-dest-row .td-purpose-wrap { grid-column: span 4; }
.travel-dest-row .td-remove { grid-column: 5; grid-row: 1; }
.tv-remove { background: #fee2e2; color: #b91c1c; width: 30px; height: 38px; font-size: 18px; }
.travel-total { text-align: right; font-size: 16px; margin: 6px 0 4px; }
.travel-total strong { color: #6d28d9; font-size: 20px; }
.td-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.td-title { font-size: 20px; font-weight: 800; color: #111827; }
.td-sub { color: #6b7280; margin-top: 4px; }
.td-purpose { background: #f5f3ff; padding: 8px 12px; border-radius: 8px; }
.travel-modal h4 { margin: 18px 0 8px; color: #6d28d9; }
.td-costs { border: 1px solid #e5e7eb; border-radius: 8px; padding: 6px 14px; }
.td-row { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px solid #f3f4f6; font-size: 13.5px; }
.td-row span { color: #6b7280; }
.td-total { border-bottom: none; font-size: 15px; }
.td-decision { color: #4b5563; font-size: 13px; }
.td-decide { margin-top: 14px; padding: 12px; background: #fffbeb; border: 1px solid #fde68a; border-radius: 8px; }
.calendar-dot.travel { width: 10px; height: 10px; border-radius: 3px; }
.calendar-dot.travel.pending { background: #d97706; }
.calendar-dot.travel.approved { background: #7c3aed; }
.calendar-cell.has-travel.pending { box-shadow: inset 0 -4px 0 #d97706; background: #fffbeb; }
.calendar-cell.has-travel.approved { box-shadow: inset 0 -4px 0 #7c3aed; background: #f5f3ff; }
.travel-day-cards { display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; }
.travel-day-card { border-radius: 10px; padding: 10px 12px; border-left: 5px solid #d97706; background: #fffbeb; }
.travel-day-card.approved { border-left-color: #7c3aed; background: #f5f3ff; }
.travel-day-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 4px; }
.travel-day-sub { font-size: 12.5px; color: #4b5563; margin-bottom: 8px; }
@media (max-width: 900px) { .travel-grid, .travel-visit-row { grid-template-columns: 1fr 1fr; } .travel-visit-row { grid-template-columns: 1fr 1fr 34px; } }

.screen-tabs { display: inline-flex; gap: 4px; background: #e5e7eb; padding: 4px; border-radius: 10px; margin-bottom: 16px; }
.screen-tab { background: transparent; color: #4b5563; padding: 9px 20px; border-radius: 8px; font-size: 14px; }
.screen-tab.active { background: #111827; color: #fff; }
.dash-cust-owner { font-size: 10px; font-weight: 700; color: #2563eb; }
.dash-view-bar { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; background: #fff; border: 1px solid #e5e7eb; border-radius: 10px; padding: 10px 14px; }
.dash-view-bar label { margin: 0; font-size: 13px; font-weight: 700; color: #374151; white-space: nowrap; }
.dash-view-bar select { max-width: 320px; }
.dash-cust-meta { color: #9ca3af; font-size: 10.5px; line-height: 1.3; }
.dash-cust-amount { color: #dc2626; font-size: 10.5px; font-weight: 600; }

.project-amount-hint { color: #dc2626; font-size: 11px; font-weight: 600; margin-top: 4px; min-height: 0; }
.project-amount-hint:empty { display: none; }

.dash-card-projects { border-top: 4px solid #0d9488; background: #f4fbfa; }
.dash-card-projects .card-header h2 { color: #0f766e; display: flex; align-items: center; gap: 10px; }
.dash-proj-count {
  background: #0d9488;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  min-width: 24px;
  text-align: center;
  padding: 3px 9px;
  border-radius: 999px;
}
.dash-card-projects .dashboard-compact-table { overflow-x: auto; }
.dash-proj-summary { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin-bottom: 12px; }
.dash-sum-group { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.dash-sum-sep { color: #9ca3af; }
.dash-sum-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; font-size: 12px; font-weight: 600; background: #e5e7eb; color: #374151; }
.dash-sum-chip b { font-size: 14px; }
.dash-sum-chip.stacked { flex-direction: column; align-items: center; gap: 0; padding: 3px 14px 5px; border-radius: 14px; line-height: 1.25; }
.dash-sum-chip.stacked small { font-size: 10px; font-weight: 600; opacity: 0.85; }
.dash-sum-chip.active { background: #dbeafe; color: #1d4ed8; }
.dash-sum-chip.passive { background: #374151; color: #fff; }
.dash-sum-chip.won { background: #dcfce7; color: #15803d; }
.dash-sum-chip.lost { background: #fee2e2; color: #b91c1c; }
.dash-sum-chip.other { background: #f3f4f6; color: #6b7280; }
.dashboard-compact-table .dash-proj-table { width: 100%; font-size: 13px; }
.dash-proj-table thead th { background: #f4fbfa; color: #0f766e; }
.dash-proj-table td { padding: 10px 12px; border-bottom: 1px solid #d7ebe8; vertical-align: middle; }
.dash-proj-row td:first-child { border-left: 4px solid #3b82f6; }
.dash-proj-row.positive td:first-child { border-left-color: #16a34a; }
.dash-proj-row.negative td:first-child { border-left-color: #dc2626; }
.dash-proj-row:hover td { background: #e8f6f4; }
.dash-proj-name { font-weight: 700; color: #111827; font-size: 13.5px; }
.dash-proj-customer { color: #6b7280; }
.dash-proj-location { color: #0f766e; font-weight: 600; white-space: nowrap; }
.dash-proj-start { color: #9ca3af; }
.dash-proj-current { font-weight: 700; color: #111827; }

.dash-card-regions { border-top: 4px solid #7c3aed; background: #faf7ff; margin-top: 20px; }
.dash-card-regions .card-header h2 { color: #6d28d9; display: flex; align-items: center; gap: 10px; }
.dash-region-count { background: #7c3aed; color: #fff; font-size: 12px; font-weight: 700; min-width: 24px; text-align: center; padding: 3px 9px; border-radius: 999px; }
.dash-top-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.dash-top-card { background: #fff; border: 1px solid #e9def9; border-top: 3px solid #7c3aed; border-radius: 10px; padding: 10px 12px; min-width: 0; }
.dash-top-card.won { border-top-color: #16a34a; border-color: #d1f0dc; }
.dash-top-card.lost { border-top-color: #dc2626; border-color: #f8d4d4; }
.dash-top-card.proj { border-top-color: #2563eb; border-color: #d6e4fb; }
.dash-top-title { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; color: #6b7280; margin-bottom: 8px; }
.dash-top-row { display: grid; grid-template-columns: 18px minmax(0, 1fr); column-gap: 6px; align-items: baseline; padding: 4px 0; border-top: 1px solid #f3f4f6; }
.dash-top-row:first-of-type { border-top: none; }
.dash-top-rank { grid-row: 1 / span 2; font-size: 12px; font-weight: 800; color: #9ca3af; }
.dash-top-label { font-size: 12px; font-weight: 700; color: #111827; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dash-top-value { font-size: 10.5px; font-weight: 600; color: #6b7280; grid-column: 2; }
.dash-top-card.won .dash-top-value { color: #15803d; }
.dash-top-card.lost .dash-top-value { color: #b91c1c; }
.dash-top-who { grid-column: 2; font-size: 10px; font-weight: 700; color: #2563eb; }
.dash-region-who, .dash-proj-owner { font-size: 12px; font-weight: 600; color: #2563eb; }
.dash-top-empty { font-size: 11px; color: #9ca3af; }
@media (max-width: 1300px) { .dash-top-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.dash-region-hint { font-size: 11px; color: #9ca3af; }
.dash-card-regions .dashboard-compact-table { overflow-x: auto; }
.dashboard-compact-table .dash-region-table { width: 100%; font-size: 13px; }
.dash-region-table thead th { background: #faf7ff; color: #6d28d9; white-space: nowrap; }
.data-table.dash-region-table:not(.customers-table) th:nth-child(n) { width: auto; }
.data-table.dash-region-table:not(.customers-table) th:nth-child(1) { width: 30%; }
.data-table.dash-region-table:not(.customers-table) th:nth-child(2) { width: 20%; }
.dash-region-table td { padding: 9px 12px; border-bottom: 1px solid #e9def9; vertical-align: middle; }
.dash-region-name { font-weight: 700; color: #111827; }
.dash-region-tag { margin-left: 8px; font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.dash-region-tag.outside { background: #fef3c7; color: #b45309; }
.dash-region-tag.planned { background: #dbeafe; color: #1d4ed8; }
.dash-region-tag.none { background: #f3f4f6; color: #9ca3af; }
.dash-region-empty td { opacity: 0.6; }
.dash-region-bar { display: inline-block; vertical-align: middle; width: 90px; height: 8px; background: #ede9fe; border-radius: 999px; overflow: hidden; margin-right: 8px; }
.dash-region-bar-fill { display: block; height: 100%; background: #7c3aed; border-radius: 999px; }
.dash-region-active { color: #1d4ed8; }
.dash-region-won { color: #15803d; }
.dash-region-lost { color: #b91c1c; }
.dash-region-active b, .dash-region-won b, .dash-region-lost b { font-size: 14px; }
.dash-region-active small, .dash-region-won small, .dash-region-lost small { display: block; font-size: 10.5px; font-weight: 600; opacity: 0.8; }

.dash-card-today { border-top: 4px solid #2563eb; background: #f5f9ff; }
.dash-card-today .card-header h2 { color: #1d4ed8; }
.dash-today-badge {
  background: #2563eb;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 4px 10px;
  border-radius: 999px;
  white-space: nowrap;
}
.dash-card-today .dashboard-compact-table thead th { background: #f5f9ff; }

.dash-card-overdue { border-top: 4px solid #dc2626; background: #fff5f5; }
.dash-card-overdue .card-header h2 { color: #b91c1c; display: flex; align-items: center; gap: 8px; }
.dash-alert-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #dc2626;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  flex-shrink: 0;
}
.dash-count-badge {
  background: #dc2626;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  min-width: 24px;
  text-align: center;
  padding: 3px 9px;
  border-radius: 999px;
}
.dash-count-badge.zero { background: #d1d5db; }
.dash-card-overdue .dashboard-compact-table thead th { background: #fff5f5; }
.dash-card-overdue td:first-child { color: #b91c1c; font-weight: 700; }

@media (max-width: 1100px) {
  .dashboard-triple { grid-template-columns: 1fr; }
}

.dashboard-row {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  align-items: flex-start;
  margin-bottom: 20px;
}

.dashboard-row .dashboard-half-card,
.dashboard-row .dashboard-flex-card {
  margin-bottom: 0;
}

.dashboard-flex-card {
  flex: 1 1 420px;
  min-width: 380px;
}

.dashboard-half-card {
  max-width: 46%;
  min-width: 320px;
  margin-bottom: 20px;
}

.dashboard-compact-card .card {
  padding: 14px 16px;
  display: inline-block;
}

.dashboard-compact-table table {
  font-size: 12px;
  table-layout: auto;
  width: auto;
}

.dashboard-compact-table th,
.dashboard-compact-table td {
  padding: 6px 10px;
}

.dashboard-compact-table thead th {
  white-space: nowrap;
}

.outcome-track-badge {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}
.outcome-track-badge.pending { background: #e0edff; color: #1d4ed8; }
.outcome-track-badge.positive { background: #dcfce7; color: #047857; }
.outcome-track-badge.negative { background: #fee2e2; color: #b91c1c; }

.h-timeline {
  overflow-x: auto;
  padding-bottom: 12px;
}

.h-timeline-track {
  display: flex;
  align-items: flex-start;
  min-width: max-content;
  padding: 4px 2px 12px;
}

.h-timeline-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 230px;
  flex-shrink: 0;
}

.h-timeline-date {
  font-size: 11.5px;
  font-weight: 700;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 8px;
}

.h-timeline-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  margin-bottom: 10px;
  border: 3px solid #fff;
  box-shadow: 0 0 0 1px #e5e7eb;
  flex-shrink: 0;
}

.h-timeline-card {
  background: #fafafa;
  border: 1px solid #eef0f2;
  border-radius: 10px;
  padding: 10px 12px;
  width: 100%;
  font-size: 12px;
  color: #374151;
}

.h-timeline-title {
  font-weight: 700;
  color: #111827;
  font-size: 13px;
  margin-bottom: 4px;
}

.h-timeline-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 6px;
}

.h-timeline-topic {
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 6px;
}

.h-timeline-sub {
  color: #6b7280;
  font-size: 11.5px;
  margin-bottom: 6px;
  line-height: 1.5;
}

.h-timeline-notes {
  font-size: 12px;
  color: #374151;
  border-top: 1px solid #eef0f2;
  padding-top: 6px;
  margin-top: 6px;
}

.h-timeline-arrow {
  font-size: 20px;
  color: #d1d5db;
  flex-shrink: 0;
  align-self: center;
  margin: 0 6px;
  padding-top: 36px;
}

.dashboard-compact-table td:nth-child(4) {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-two-col {
  display: flex;
  gap: 32px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.dashboard-two-col .card {
  flex: 1 1 320px;
  margin-bottom: 0;
}

.mini-table-scroll {
  max-height: 172px;
  overflow-y: auto;
}

.mini-table-scroll table { margin: 0; }

.mini-table-scroll thead th {
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 1;
}

.data-table th, .data-table td {
  text-align: left;
  padding: 12px;
  border-bottom: 1px solid #f0f1f3;
}

.data-table tbody tr:hover { background: #fafafa; }

.data-table th {
  color: #6b7280;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.person-cell {
  display: flex;
  align-items: center;
  gap: 12px;
}

.person-name {
  font-weight: 600;
  color: #111827;
}

.badge-active { color: #059669; font-weight: 600; font-size: 13px; }
.badge-inactive { color: #9ca3af; font-weight: 600; font-size: 13px; }

.role-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.role-admin { background: #e5e7eb; color: #111827; }
.role-genel_mudur { background: #fef3c7; color: #92400e; }
.role-departman_muduru { background: #dbeafe; color: #1d4ed8; }
.role-satis_personeli { background: #d1fae5; color: #047857; }

.row-actions {
  white-space: nowrap;
  text-align: right;
  display: flex;
  gap: 6px;
  justify-content: flex-end;
}

.empty-state {
  text-align: center;
  color: #9ca3af;
  padding: 30px 0;
}

/* ---------- Avatarlar ---------- */
.avatar {
  border-radius: 50%;
  background: #e5e7eb;
  color: #6b7280;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  background-size: cover;
  background-position: center;
  flex-shrink: 0;
}

.avatar-sm { width: 30px; height: 30px; font-size: 12px; }
.avatar-md { width: 40px; height: 40px; font-size: 14px; }
.avatar-lg { width: 88px; height: 88px; font-size: 26px; }

.avatar-picker {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 6px;
}

.btn-upload {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  padding: 9px 14px;
}

.btn-upload svg { width: 16px; height: 16px; }

/* ---------- Modal ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15,15,15,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
}
.modal-overlay.hidden { display: none; }
#customerModal.modal-overlay { z-index: 60; }
#quickProjectModal.modal-overlay { z-index: 70; }
#projectHistoryModal.modal-overlay { z-index: 80; }
#quickProjectModal .modal { max-width: 480px; }
#quickProjectFormWrap .project-row-main {
  grid-template-columns: 1fr;
  gap: 14px;
}
#quickProjectFormWrap .field-label {
  margin-bottom: 4px;
}

.modal {
  background: #fff;
  border-radius: 14px;
  padding: 28px;
  width: 100%;
  max-width: 420px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 50px rgba(0,0,0,0.25);
}

.modal { position: relative; }
.modal h2 { margin-top: 0; font-size: 18px; color: #111827; }

.modal-close-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #fee2e2;
  color: #b91c1c;
  border: none;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal-close-btn:hover { background: #fecaca; }

.time-range-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.time-range-row input { width: auto; flex: 1; }
.time-range-row span { color: #9ca3af; }

.richtext-toolbar {
  display: flex;
  gap: 6px;
  margin-top: 6px;
  margin-bottom: 6px;
}

.rt-btn {
  background: #f3f4f6;
  color: #374151;
  border: 1px solid #e5e7eb;
  width: 30px;
  height: 30px;
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.rt-btn:hover { background: #e5e7eb; }
.rt-btn.rt-color { font-size: 16px; width: auto; padding: 0 10px; }

.richtext-editor {
  min-height: 110px;
  max-height: 260px;
  overflow-y: auto;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 14px;
  line-height: 1.5;
}
.richtext-editor:focus { outline: none; border-color: #111827; box-shadow: 0 0 0 3px rgba(17,24,39,0.08); }

.plan-origin-tag {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 3px 10px;
  border-radius: 999px;
  margin: -4px 0 16px;
}
.plan-origin-tag.planned { background: #dbeafe; color: #1d4ed8; }
.plan-origin-tag.unplanned { background: #ede9fe; color: #6d28d9; }

.richtext-display {
  font-size: 13px;
  line-height: 1.5;
  color: #374151;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 24px;
}

.modal-actions-split {
  justify-content: space-between;
  align-items: center;
}

.modal-actions-right {
  display: flex;
  gap: 10px;
}

#customerDeleteBtn.hidden { display: none; }
#ownerPickerGroup.hidden { display: none; }
#activityOwnerGroup.hidden { display: none; }

.input-with-btn {
  display: flex;
  gap: 8px;
  align-items: center;
}

.input-with-btn select {
  flex: 1;
  margin: 0;
}

.btn-icon-add {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  border: 1px solid #16a34a;
  background: #16a34a;
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}
.btn-icon-add:hover { background: #15803d; }
.btn-icon-add:disabled {
  background: #d1d5db;
  border-color: #d1d5db;
  cursor: not-allowed;
}

.modal-wide {
  max-width: 1120px;
  width: 95vw;
  padding: 34px 40px;
}

.modal-wide label {
  font-size: 13.5px;
  margin: 16px 0 7px;
}

.modal-wide input,
.modal-wide select,
.modal-wide textarea {
  font-size: 14.5px;
  padding: 11px 13px;
}

.modal-wide h2 {
  font-size: 20px;
  margin-bottom: 4px;
}

.modal-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 40px;
}

@media (max-width: 640px) {
  .modal-columns { grid-template-columns: 1fr; }
}

textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  resize: vertical;
  min-height: 160px;
}

.duplicate-warning {
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #92400e;
  font-size: 12.5px;
  padding: 8px 10px;
  border-radius: 6px;
  margin-top: 6px;
  line-height: 1.4;
}
.duplicate-warning.hidden { display: none; }

.star-picker {
  display: flex;
  gap: 4px;
}

.star-btn {
  background: none;
  border: none;
  font-size: 26px;
  line-height: 1;
  color: #d1d5db;
  padding: 2px;
  cursor: pointer;
}

.star-btn.filled { color: #f59e0b; }

.owner-picker {
  border: 1px solid #d1d5db;
  border-radius: 8px;
  max-height: 190px;
  overflow-y: auto;
  padding: 8px 10px;
}

.notes-tall {
  height: 110px;
  min-height: 0;
  overflow-y: auto;
  resize: vertical;
}

.owner-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
  font-size: 13.5px;
  color: #374151;
  cursor: pointer;
}

.owner-option input {
  width: 15px;
  height: 15px;
  cursor: pointer;
}

.owner-picker-empty {
  color: #9ca3af;
  font-size: 13px;
}

.owner-tag-readonly {
  display: inline-block;
  background: #eef2ff;
  color: #3730a3;
  font-size: 12.5px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  margin: 2px 4px 2px 0;
}

.account-type-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.account-type-musteri { background: #d1fae5; color: #047857; }
.account-type-potansiyel { background: #e0e7ff; color: #4338ca; }

.status-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.status-planned { background: #dbeafe; color: #1d4ed8; }
.status-done { background: #d1fae5; color: #047857; }
.status-postponed { background: #ffedd5; color: #c2410c; }
.status-cancelled { background: #fee2e2; color: #b91c1c; }

.action-complete { background: #d1fae5; color: #047857; }
.action-complete:hover { background: #a7f3d0; }
.action-postpone { background: #ffedd5; color: #c2410c; }
.action-postpone:hover { background: #fed7aa; }

.timeline {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-height: 60vh;
  overflow-y: auto;
  margin-top: 10px;
}

.timeline-item {
  border-left: 3px solid #d1d5db;
  padding-left: 14px;
  position: relative;
}
.timeline-item.status-done { border-left-color: #059669; }
.timeline-item.status-postponed { border-left-color: #c2410c; }
.timeline-item.status-cancelled { border-left-color: #b91c1c; }
.timeline-item.status-planned { border-left-color: #1d4ed8; }

.timeline-date {
  font-size: 12.5px;
  font-weight: 700;
  color: #111827;
}

.timeline-meta {
  font-size: 12.5px;
  color: #6b7280;
  margin: 2px 0 4px;
}

.timeline-notes {
  font-size: 13px;
  color: #374151;
  white-space: pre-wrap;
}

.timeline-products {
  margin-top: 6px;
  font-size: 12px;
  color: #6b7280;
}

/* ---------- Görünüm geçişi (Liste / Takvim) ---------- */
.view-toggle-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
}

.view-toggle-btn {
  background: #fff;
  border: 1px solid #e5e7eb;
  color: #6b7280;
  padding: 9px 18px;
  font-size: 13.5px;
  font-weight: 600;
  border-radius: 999px;
  cursor: pointer;
}
.view-toggle-btn:hover { background: #f9fafb; }
.view-toggle-btn.active {
  background: #141414;
  color: #fff;
  border-color: #141414;
}

/* ---------- Takvim ---------- */
.calendar-layout {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 28px;
  align-items: start;
}

@media (max-width: 800px) {
  .calendar-layout { grid-template-columns: 1fr; }
}

.calendar-panel {
  max-width: 640px;
}

@media (max-width: 800px) {
  .calendar-panel { max-width: none; }
}

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

.calendar-header h3 {
  margin: 0;
  font-size: 16px;
  color: #111827;
}

.calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  margin-bottom: 6px;
}

.calendar-weekdays span {
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  color: #9ca3af;
  text-transform: uppercase;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}

.calendar-cell {
  aspect-ratio: 1;
  border: 1px solid #eef0f2;
  border-radius: 8px;
  padding: 6px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
}
.calendar-cell:hover { background: #f9fafb; }
.calendar-cell.empty { border: none; cursor: default; }
.calendar-cell.empty:hover { background: none; }

.calendar-cell.weekend { background: #f3f4f6; }
.calendar-cell.weekend:hover { background: #e5e7eb; }
.calendar-cell.holiday { border-color: #f59e0b; border-width: 2px; }
.calendar-cell.today { border-color: #141414; border-width: 2px; }
.calendar-cell.selected { background: #dbeafe; border-color: #93c5fd; }

.calendar-holiday-mark {
  position: absolute;
  top: 4px;
  right: 5px;
  font-size: 8px;
  line-height: 1;
  color: #f59e0b;
}

.calendar-day-num {
  font-size: 13px;
  font-weight: 600;
  color: #374151;
}

.calendar-day-dots {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  align-self: flex-start;
}

.calendar-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
}

.calendar-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 16px;
  font-size: 12.5px;
  color: #4b5563;
}

.calendar-legend span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.calendar-detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.calendar-detail-header h3 {
  margin: 0;
  font-size: 16px;
  color: #111827;
}

.holiday-banner {
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #92400e;
  font-size: 12.5px;
  font-weight: 600;
  padding: 9px 12px;
  border-radius: 8px;
  margin-bottom: 14px;
}

.calendar-filter-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}

.calendar-tab-btn {
  background: #f3f4f6;
  color: #6b7280;
  border: none;
  padding: 7px 16px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 999px;
  cursor: pointer;
}
.calendar-tab-btn.active { background: #141414; color: #fff; }

.calendar-detail-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 60vh;
  overflow-y: auto;
}

.calendar-activity-card {
  border: 1px solid #eef0f2;
  border-radius: 10px;
  padding: 12px 14px;
  background: #fafafa;
}

.calendar-activity-card.solid {
  color: #fff;
  border: none;
}
.calendar-activity-card.solid.status-planned { background: #1d4ed8; }
.calendar-activity-card.solid.status-done { background: #047857; }
.calendar-activity-card.solid.status-postponed { background: #c2410c; }
.calendar-activity-card.solid.status-cancelled { background: #b91c1c; }

.calendar-activity-card.solid .calendar-card-sub { color: rgba(255,255,255,0.85); }
.calendar-activity-card.solid .action-btn { background: rgba(255,255,255,0.18); color: #fff; }
.calendar-activity-card.solid .action-btn:hover { background: rgba(255,255,255,0.3); }

.calendar-card-tag {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  background: rgba(255,255,255,0.25);
  padding: 3px 8px;
  border-radius: 999px;
}

.calendar-card-sub {
  font-size: 12.5px;
  color: #6b7280;
  margin: 2px 0;
}

.calendar-activity-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

.calendar-card-origin {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  background: rgba(255,255,255,0.2);
  color: #fff;
  padding: 2px 8px;
  border-radius: 999px;
  margin-bottom: 6px;
}

.calendar-card-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 16px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(255,255,255,0.25);
}

.calendar-card-col {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.calendar-card-field {
  display: flex;
  flex-direction: column;
}

.calendar-card-field.inline {
  flex-direction: row;
  align-items: baseline;
  gap: 5px;
  flex-wrap: wrap;
}

.calendar-card-field.inline .field-label {
  margin-bottom: 0;
  white-space: nowrap;
}

.calendar-card-field .field-label {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: rgba(255,255,255,0.7);
}

.calendar-card-field .field-value {
  font-size: 13px;
  color: #fff;
  font-weight: 500;
}

.calendar-card-notes {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid rgba(255,255,255,0.25);
}

.calendar-card-notes .field-label {
  display: block;
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: rgba(255,255,255,0.7);
  margin-bottom: 4px;
}

.stars-display {
  color: #d1d5db;
  font-size: 15px;
  letter-spacing: 1px;
}
.stars-display .filled { color: #f59e0b; }

.high-potential-badge {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 700;
  background: #ffedd5;
  color: #c2410c;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.meta-cell {
  font-size: 12.5px;
  color: #6b7280;
  line-height: 1.5;
}
.meta-cell strong { color: #374151; font-weight: 600; }

.owner-tags {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.contact-names-stack,
.project-names-stack {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.stack-more {
  color: #6b7280;
  font-size: 11.5px;
}

.owner-tag {
  background: #f3f4f6;
  color: #374151;
  font-size: 11.5px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 999px;
  white-space: nowrap;
}

/* ---------- Tekrarlanan alanlar (yetkili / proje) ---------- */
.form-section-full {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid #f0f1f3;
}

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

.section-header-row label {
  margin: 0;
}

.repeat-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 8px;
}

.repeat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr) auto;
  gap: 16px;
  align-items: end;
  padding: 12px 0;
  border-bottom: 1px solid #f0f1f3;
}

.repeat-row input,
.repeat-row select {
  margin: 0;
  width: 100%;
}

.field-label {
  display: block;
  font-size: 10.5px;
  font-weight: 700;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 4px;
}

.field-value {
  display: block;
  font-size: 14px;
  color: #111827;
  padding: 2px 0;
  word-break: break-word;
}

.row-btns {
  display: flex;
  gap: 6px;
  align-items: center;
  white-space: nowrap;
}

.managed-row.inactive-row,
.project-row.inactive-row {
  opacity: 0.5;
}

.btn-add-row {
  background: #f3f4f6;
  color: #111827;
  border: 1px dashed #cbd5e1;
  padding: 8px 14px;
  font-size: 13px;
  border-radius: 8px;
  margin-top: 12px;
  cursor: pointer;
}
.btn-add-row:hover { background: #e5e7eb; }
.btn-add-row.hidden { display: none; }

.product-table-wrap {
  overflow-x: auto;
  margin-top: 8px;
  border: 1px solid #eef0f2;
  border-radius: 8px;
}

.product-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}

.product-table th {
  font-size: 10.5px;
  font-weight: 700;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  text-align: left;
  padding: 8px 6px;
  border-bottom: 1px solid #eef0f2;
  background: #fafafa;
}

.product-table td {
  padding: 6px;
  border-bottom: 1px solid #f0f1f3;
  vertical-align: middle;
}

.product-table input,
.product-table select {
  margin: 0;
  width: 100%;
  min-width: 70px;
}

.product-table .ap-name { min-width: 140px; }
.product-table .ap-total {
  font-weight: 600;
  color: #111827;
  white-space: nowrap;
}

.product-table .remove-row-btn {
  background: none;
  border: none;
  color: #b91c1c;
  font-size: 18px;
  cursor: pointer;
  line-height: 1;
}

.project-row {
  background: #fafafa;
  border: 1px solid #eef0f2;
  border-radius: 8px;
  padding: 14px 16px;
  margin-bottom: 8px;
}

.project-row-main {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr 1fr auto;
  gap: 16px;
  align-items: end;
}

.project-row-main input,
.project-row-main select {
  margin: 0;
  width: 100%;
}

.project-city.hidden { display: none; }

#newContactRow.hidden,
#newProjectRow.hidden {
  display: none;
}

#newContactRow,
#newProjectRow {
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  padding: 12px;
  margin-top: 8px;
}

/* ---------- Mobil uyum ---------- */
.menu-btn, .sidebar-backdrop { display: none; }
@media (max-width: 900px) {
  .app-shell { display: block; }
  .sidebar { position: fixed; top: 0; left: 0; bottom: 0; width: 250px; z-index: 90; transform: translateX(-100%); transition: transform 0.2s; overflow-y: auto; }
  body.menu-open .sidebar { transform: translateX(0); }
  body.menu-open .sidebar-backdrop { display: block; position: fixed; inset: 0; background: rgba(0,0,0,0.45); z-index: 80; }
  .menu-btn { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; margin-right: 10px; padding: 0; background: #111827; color: #fff; border-radius: 8px; font-size: 20px; flex-shrink: 0; }
  .topheader { padding: 10px 14px; gap: 8px; position: sticky; top: 0; z-index: 40; }
  .topheader h1 { font-size: 16px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .user-chip span { display: none; }
  .content { padding: 14px 12px; }
  .card { padding: 14px; }
  .card-header { flex-wrap: wrap; gap: 8px; }
  .stats-row, .dash-top-grid, .dashboard-triple { grid-template-columns: 1fr !important; }
  .dashboard-row { flex-direction: column; }
  .dashboard-flex-card { min-width: 0; flex-basis: auto; width: 100%; }
  .filter-bar { gap: 10px; }
  .filter-field { flex: 1 1 100%; }
  .data-table, .data-table.customers-table { table-layout: auto; min-width: 640px; }
  .dashboard-triple .dashboard-compact-table { overflow-x: auto; }
  .dashboard-compact-table .dash-plan-table { min-width: 480px; }
  .modal-overlay { align-items: flex-start; }
  .modal { max-width: 100% !important; width: 100%; padding: 18px 14px; max-height: 100vh; border-radius: 0; min-height: 100vh; }
  .modal-columns, .travel-grid { grid-template-columns: 1fr !important; }
  .modal-actions { flex-wrap: wrap; }
  .screen-tabs { display: flex; overflow-x: auto; }
  .screen-tab { padding: 9px 14px; white-space: nowrap; }
  input, select, textarea { font-size: 16px; }
  .pager { justify-content: center; }
}
/* ---------- Excel'e aktar ---------- */
.export-modal { max-width: 460px; }
.export-modal label { display: block; margin-bottom: 6px; }
.export-modal select { width: 100%; }
.export-field { margin-bottom: 14px; }
.export-period-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.export-hint { font-size: 12px; color: #6b7280; margin: 4px 0 8px; }
.topheader #exportBtn { margin-right: 8px; }
@media (max-width: 900px) { .topheader #exportBtn { padding: 8px 10px; font-size: 12px; margin-right: 4px; } }
/* ---------- Mobil uyum (2. tur): kart liste, sabit Kaydet çubuğu, büyük dokunma alanları ---------- */
@media (max-width: 900px) {
  /* Pencereler tam ekran; Kaydet/Vazgeç çubuğu her zaman altta görünür */
  .modal.modal-wide, .modal { padding: 16px 14px 0; width: 100%; max-width: 100% !important; min-height: 100dvh; max-height: 100dvh; border-radius: 0; }
  .modal h2 { font-size: 17px; padding-right: 44px; }
  .modal-close-btn { position: fixed; top: 10px; right: 10px; width: 38px; height: 38px; font-size: 22px; z-index: 5; }
  .modal-actions { position: sticky; bottom: 0; z-index: 4; background: #fff; margin: 18px -14px 0; padding: 12px 14px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid #e5e7eb; box-shadow: 0 -4px 12px rgba(0,0,0,0.06); flex-wrap: wrap; }
  .modal-actions button, .modal-actions .btn-secondary { flex: 1 1 0; min-height: 46px; font-size: 15px; }
  .modal-actions-split { flex-direction: column-reverse; align-items: stretch; }
  .modal-actions-right { width: 100%; }
  .modal-actions-right button { flex: 1 1 0; }
  .modal-columns { display: block; }
  .modal-wide label { margin: 14px 0 6px; }
  .modal-wide input, .modal-wide select, .modal-wide textarea { font-size: 16px; }
  .travel-modal { max-width: 100%; }
  .btn-save, .btn-exit, .btn-secondary, .btn-primary { min-height: 42px; }
  .action-btn { min-height: 36px; padding: 7px 12px; }
}
@media (max-width: 700px) {
  /* Tablolar: her satır bir kart, başlıklar hücre etiketi olur */
  .data-table:not(.dash-region-table), .data-table:not(.dash-region-table) tbody, .data-table:not(.dash-region-table) tr, .data-table:not(.dash-region-table) td { display: block; width: 100% !important; min-width: 0 !important; }
  .data-table:not(.dash-region-table) thead { display: none; }
  .data-table:not(.dash-region-table) tr { border: 1px solid #e5e7eb; border-radius: 10px; margin-bottom: 10px; padding: 6px 12px; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,0.04); }
  .data-table:not(.dash-region-table) td { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; text-align: right; border: 0; border-bottom: 1px dashed #eef0f2; padding: 8px 0; overflow-wrap: anywhere; }
  .data-table:not(.dash-region-table) td:last-child { border-bottom: 0; }
  .data-table:not(.dash-region-table) td[data-label]::before { content: attr(data-label); flex: 0 0 34%; text-align: left; font-size: 11.5px; font-weight: 700; color: #6b7280; text-transform: uppercase; letter-spacing: 0.03em; padding-top: 2px; }
  .data-table:not(.dash-region-table) td .row-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; width: 100%; }
  .data-table:not(.dash-region-table) td.empty-state { display: block; text-align: center; }
  .dashboard-triple .dashboard-compact-table { overflow-x: visible; }
  .dashboard-compact-table .dash-plan-table { min-width: 0; }
  .card { padding: 12px; }
  .content { padding: 12px 10px; }
}
@media (max-width: 700px) {
  .stats-row { grid-template-columns: 1fr 1fr !important; gap: 10px; margin-bottom: 14px; }
  .stat-card { padding: 12px 14px; }
  .stat-value { font-size: 20px; }
  .stat-label { font-size: 12px; }
  .user-chip { display: none; }
  .topheader h1 { font-size: 15px; }
}