:root {
  --brand: #1f3a63;
  --brand-2: #2e5490;
  --accent: #e8a33d;
  --ink: #152238;
  --muted: #6b7690;
  --line: #e7eaf1;
  --app-bg: #f4f6fa;
  --success: #1f9d6b;
  --success-bg: #e6f6ef;
  --danger: #d64550;
  --danger-bg: #fbe9ea;
  --info: #2f7bce;
  --info-bg: #e9f0fb;
  --card-shadow: 0 1px 2px rgba(21, 34, 56, .04), 0 8px 24px -12px rgba(21, 34, 56, .12);
}

html, body {
  font-family: 'Inter', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

body {
  background: var(--app-bg);
  color: var(--ink);
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 800;
  letter-spacing: -.01em;
  color: var(--ink);
}

a {
  color: var(--brand-2);
}

html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem var(--brand-2);
}

.form-control:focus, .form-select:focus {
  border-color: var(--brand-2);
}

.navbar {
  background: #ffffff !important;
}
.navbar-brand {
  font-weight: 800;
  color: var(--brand) !important;
}
.navbar .nav-link {
  font-weight: 600;
  color: var(--muted) !important;
}
.navbar .nav-link:hover {
  color: var(--brand) !important;
}

.card {
  --bs-card-border-color: var(--line);
  border-radius: 16px;
}
.shadow-sm {
  box-shadow: var(--card-shadow) !important;
}

.table {
  --bs-table-border-color: var(--line);
}
.table > thead {
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .03em;
  color: var(--muted);
}
.table > thead > tr > th {
  font-weight: 700;
  border-bottom-width: 1px;
}

.badge {
  font-weight: 700;
  padding: .4em .65em;
  border-radius: 999px;
}

.alert-secondary {
  background: #eef1f7;
  border-color: var(--line);
  color: var(--muted);
}

.progress {
  border-radius: 999px;
  background-color: #eef1f6;
}
.progress-bar {
  background-color: var(--brand-2);
  border-radius: 999px;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}

.btn {
  --bs-btn-border-radius: 0.55rem;
  --bs-btn-font-weight: 600;
  padding: 0.5rem 1.1rem;
  letter-spacing: 0.01em;
  transition: transform 150ms ease, box-shadow 150ms ease;
}

.btn-sm {
  padding: 0.3rem 0.75rem;
}

.btn-primary {
  --bs-btn-bg: var(--brand);
  --bs-btn-border-color: var(--brand);
  --bs-btn-hover-bg: #172d4e;
  --bs-btn-hover-border-color: #172d4e;
  --bs-btn-active-bg: #122340;
  --bs-btn-active-border-color: #122340;
  --bs-btn-disabled-bg: var(--brand);
  --bs-btn-disabled-border-color: var(--brand);
  box-shadow: 0 2px 8px rgba(31, 58, 99, 0.25);
}
.btn-primary:hover {
  transform: translateY(-1px);
}
.btn-primary:hover:not(:focus) {
  box-shadow: 0 4px 14px rgba(31, 58, 99, 0.35);
}
.btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 1px 4px rgba(31, 58, 99, 0.3);
}

.btn-danger {
  box-shadow: 0 2px 8px rgba(220, 53, 69, 0.22);
}
.btn-danger:hover {
  transform: translateY(-1px);
}
.btn-danger:hover:not(:focus) {
  box-shadow: 0 4px 14px rgba(220, 53, 69, 0.32);
}
.btn-danger:active {
  transform: translateY(0);
  box-shadow: 0 1px 4px rgba(220, 53, 69, 0.28);
}

.btn-secondary:hover,
.btn-outline-secondary:hover {
  transform: translateY(-1px);
}
.btn-secondary:active,
.btn-outline-secondary:active {
  transform: translateY(0);
}

.btn-link {
  font-weight: 500;
}

@media (prefers-reduced-motion: reduce) {
  .btn {
    transition: none;
  }
  .btn-primary:hover, .btn-danger:hover, .btn-secondary:hover, .btn-outline-secondary:hover,
  .btn-primary:active, .btn-danger:active, .btn-secondary:active, .btn-outline-secondary:active {
    transform: none;
  }
}

/* ---- Proje Paneli (Dashboard) ---- */

.dash-banner { margin-bottom: 4px; }
.dash-eyebrow {
  display: flex; align-items: center; gap: 8px;
  font-size: .8rem; font-weight: 700; color: var(--brand-2);
  letter-spacing: .04em; text-transform: uppercase;
}
.dash-banner h1 { margin: 2px 0 4px; font-size: 1.75rem; display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.dash-addr { color: var(--muted); font-size: .95rem; display: flex; align-items: center; gap: 6px; margin-bottom: 14px; }

.status-pill {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .75rem; font-weight: 700;
  padding: 4px 12px; border-radius: 999px;
}
.status-pill.status-success { background: var(--success-bg); color: var(--success); }
.status-pill.status-info { background: var(--info-bg); color: var(--info); }

.meta-bar { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 20px; }
.meta-chip {
  display: flex; align-items: center; gap: 8px;
  background: #fff; border: 1px solid var(--line);
  border-radius: 12px; padding: 9px 14px;
  font-size: .85rem; box-shadow: var(--card-shadow);
}
.meta-chip i { color: var(--brand-2); font-size: .95rem; }
.meta-chip .lbl { color: var(--muted); font-weight: 500; }
.meta-chip .val { font-weight: 700; }

.tabs-pill {
  display: flex; gap: 4px; background: #fff; border: 1px solid var(--line);
  border-radius: 14px; padding: 5px; box-shadow: var(--card-shadow);
  list-style: none; overflow-x: auto;
}
.tabs-pill .nav-link {
  padding: 10px 18px; border-radius: 10px;
  font-size: .875rem; font-weight: 600; color: var(--muted);
  white-space: nowrap;
}
.tabs-pill .nav-link.active { background: var(--brand); color: #fff; }
.tabs-pill .nav-link:not(.active):hover { background: #f0f2f7; color: var(--ink); }

.kpi-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-bottom: 22px; }
@media (max-width: 860px) { .kpi-grid { grid-template-columns: 1fr; } }

.kpi-card { padding: 20px; }
.kpi-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.kpi-title { font-size: .8rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
.kpi-icon {
  width: 36px; height: 36px; border-radius: 11px;
  display: flex; align-items: center; justify-content: center; font-size: 1rem; flex: 0 0 auto;
}
.kpi-icon.ic-blue { background: var(--info-bg); color: var(--brand-2); }
.kpi-icon.ic-amber { background: #fbf1de; color: var(--accent); }
.kpi-icon.ic-green { background: var(--success-bg); color: var(--success); }

.kpi-big { font-size: 1.6rem; font-weight: 800; letter-spacing: -.01em; margin-bottom: 12px; }
.kpi-rows { display: flex; flex-direction: column; gap: 7px; margin-bottom: 4px; }
.kpi-row { display: flex; align-items: center; justify-content: space-between; font-size: .85rem; }
.kpi-row .lbl { color: var(--muted); }
.kpi-row .val { font-weight: 700; }
.kpi-row .val.pos { color: var(--success); }

.bar-track { height: 9px; border-radius: 999px; background: #eef1f6; overflow: hidden; margin: 10px 0 4px; }
.bar-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--brand-2), var(--brand)); }
.bar-fill.amber { background: linear-gradient(90deg, #f0b856, var(--accent)); }
.bar-fill.green { background: linear-gradient(90deg, #33b982, var(--success)); }
.bar-caption { font-size: .75rem; color: var(--muted); }

.section-title { font-size: 1rem; font-weight: 800; margin: 0 0 4px; }
.section-sub { font-size: .8rem; color: var(--muted); margin: 0 0 18px; }

.split { display: grid; grid-template-columns: 260px minmax(0, 640px); gap: 24px; }
@media (max-width: 860px) { .split { grid-template-columns: minmax(0, 1fr); } }

.donut-wrap { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.donut { width: 168px; height: 168px; border-radius: 50%; position: relative; }
.donut::after { content: ''; position: absolute; inset: 20px; border-radius: 50%; background: #fff; }
.donut-center {
  position: absolute; inset: 20px; z-index: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
}
.donut-center .n { font-size: 1.05rem; font-weight: 800; }
.donut-center .t { font-size: .65rem; color: var(--muted); font-weight: 700; }

.legend { width: 100%; display: flex; flex-direction: column; gap: 8px; }
.legend-item { display: flex; align-items: center; gap: 8px; font-size: .8rem; }
.legend-dot { width: 9px; height: 9px; border-radius: 50%; flex: 0 0 auto; display: inline-block; }
.legend-item .name { font-weight: 600; flex: 1; }
.legend-item .pct { color: var(--muted); font-weight: 700; }

.cat-list { display: flex; flex-direction: column; min-width: 0; }
.cat-row {
  display: flex; flex-direction: column; gap: 10px; min-width: 0;
  padding: 12px 0; border-bottom: 1px solid var(--line);
}
.cat-row:last-child { border-bottom: none; }
.cat-row.cat-total { font-weight: 800; padding-top: 14px; }

.cat-row-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-width: 0; }
.cat-name { display: flex; align-items: center; gap: 9px; font-weight: 700; font-size: .85rem; white-space: nowrap; }
.cat-bar-wrap { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.cat-bar-track { height: 7px; border-radius: 999px; background: #eef1f6; width: 90px; overflow: hidden; }
.cat-bar-fill { height: 100%; border-radius: 999px; }
.cat-pct { font-size: .75rem; color: var(--muted); font-weight: 700; white-space: nowrap; }

.cat-figures { display: flex; flex-wrap: wrap; gap: 4px 20px; min-width: 0; }
.cat-figures .fig { flex: 0 1 auto; min-width: 70px; display: flex; flex-direction: column; gap: 1px; }
.cat-figures .fig-lbl { font-size: .7rem; color: var(--muted); font-weight: 600; }
.cat-figures .fig-val { font-size: .8rem; font-weight: 700; white-space: nowrap; }

@media (max-width: 420px) {
  .cat-bar-track { width: 70px; }
}