:root {
  --ebh-ink: #1c2b24;
  --ebh-forest: #1b4332;
  --ebh-green: #2d6a4f;
  --ebh-leaf: #40916c;
  --ebh-mint: #d8f3dc;
  --ebh-cream: #f3efe6;
  --ebh-paper: #fffcf7;
  --ebh-gold: #b08968;
  --ebh-gold-dark: #9c6644;
  --ebh-line: #e4ddd0;
  --sidebar-w: 268px;
}

html, body {
  height: 100%;
}

body.app-body {
  margin: 0;
  font-family: "Source Sans 3", "Segoe UI", sans-serif;
  color: var(--ebh-ink);
  background: var(--ebh-cream);
}

h1, h2, h3, .brand-text strong, .login-title {
  font-family: Fraunces, Georgia, serif;
}

.app-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sidebar-w);
  background: linear-gradient(180deg, #16382a 0%, #1b4332 55%, #142e24 100%);
  color: #f4f1ea;
  display: flex;
  flex-direction: column;
  padding: 1.25rem 0.9rem 1rem;
  z-index: 20;
}

.brand {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  text-decoration: none;
  color: inherit;
  padding: 0.35rem 0.5rem 1.15rem;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.brand-logo {
  width: 56px;
  height: 56px;
  object-fit: contain;
  flex-shrink: 0;
}

.login-logo {
  width: 160px;
  height: 160px;
  object-fit: contain;
  margin-bottom: 1.4rem;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-text strong {
  font-size: 0.95rem;
  font-weight: 600;
}

.brand-text small {
  font-size: 0.75rem;
  opacity: .7;
}

.side-nav {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  margin-top: 1rem;
  flex: 1;
}

.side-label {
  font-size: 0.7rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  opacity: .45;
  margin: 0.9rem 0.6rem 0.25rem;
}

.side-link {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 0.75rem;
  border-radius: 10px;
  color: #e8efe9;
  text-decoration: none;
  font-weight: 500;
}

.side-link:hover,
.side-link.active {
  background: rgba(216, 243, 220, .14);
  color: #fff;
}

.side-link.active {
  background: #d8f3dc;
  color: #1b4332;
}

.sidebar-footer {
  border-top: 1px solid rgba(255,255,255,.08);
  padding-top: 0.9rem;
}

.sidebar-user-name {
  font-weight: 600;
  padding: 0 0.5rem;
}

.sidebar-user-role {
  font-size: 0.8rem;
  opacity: .65;
  padding: 0 0.5rem 0.65rem;
}

.btn-logout {
  width: 100%;
  border: 1px solid rgba(255,255,255,.16);
  background: transparent;
  color: #f4f1ea;
  border-radius: 10px;
  padding: 0.4rem 0.7rem;
}

.btn-logout:hover {
  background: rgba(255,255,255,.08);
}

.app-main {
  margin-left: var(--sidebar-w);
  min-height: 100vh;
}

.app-topbar {
  padding: 1.5rem 2rem 0.4rem;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.nav-toggle {
  display: none;
  flex-shrink: 0;
  width: 2.5rem;
  height: 2.5rem;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--ebh-line);
  background: var(--ebh-paper);
  color: var(--ebh-forest);
  border-radius: 10px;
  font-size: 1.4rem;
  line-height: 1;
  margin-top: 0.15rem;
}

.nav-toggle:hover {
  background: var(--ebh-mint);
}

.nav-backdrop {
  display: none;
}

.app-topbar h1 {
  font-size: 1.7rem;
  margin: 0;
  color: var(--ebh-forest);
}

.topbar-sub {
  margin: 0.2rem 0 0;
  color: #5c6b63;
}

.app-content {
  padding: 1rem 2rem 2.5rem;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.stat-card {
  background: var(--ebh-paper);
  border: 1px solid var(--ebh-line);
  border-radius: 16px;
  padding: 1.1rem 1.2rem;
}

.stat-card span {
  display: block;
  color: #66756d;
  font-size: 0.9rem;
}

.stat-card strong {
  font-size: 1.8rem;
  font-family: Fraunces, Georgia, serif;
  color: var(--ebh-forest);
}

.panel {
  background: var(--ebh-paper);
  border: 1px solid var(--ebh-line);
  border-radius: 16px;
  padding: 1.25rem 1.4rem;
  margin-top: 1.1rem;
  overflow-x: auto;
}

.panel h2 {
  font-size: 1.15rem;
  margin: 0 0 1rem;
  color: var(--ebh-forest);
}

.table-ebh {
  width: 100%;
  border-collapse: collapse;
}

.table-ebh th {
  text-align: left;
  font-size: 0.78rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #6b776f;
  border-bottom: 1px solid var(--ebh-line);
  padding: 0.6rem 0.5rem;
  font-weight: 600;
}

.table-ebh td {
  padding: 0.8rem 0.5rem;
  border-bottom: 1px solid #efeae0;
  vertical-align: middle;
}

.table-ebh tr:hover td {
  background: #faf6ee;
}

.ebh-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.2rem 0.65rem;
  font-size: 0.78rem;
  font-weight: 600;
}

.badge-kayitli { background: #f0e6d8; color: #6b4f2e; }
.badge-beklemede { background: #fff3cd; color: #7a5b00; }
.badge-calismada { background: #d7e8ff; color: #1d4f91; }
.badge-tamamlandi { background: #d8f3dc; color: #1b4332; }
.badge-arsiv { background: #ece7de; color: #5b5348; }
.badge-aktif { background: #d8f3dc; color: #1b4332; }
.badge-pasif { background: #f8d7da; color: #842029; }

.btn-ebh {
  background: var(--ebh-green);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 0.45rem 0.9rem;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.btn-ebh:hover { background: var(--ebh-forest); color: #fff; }

.btn-gold {
  background: var(--ebh-gold-dark);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 0.45rem 0.9rem;
  font-weight: 600;
}

.btn-gold:hover { background: #7f5539; color: #fff; }

.btn-outline-ebh {
  border: 1px solid var(--ebh-green);
  color: var(--ebh-green);
  background: transparent;
  border-radius: 10px;
  padding: 0.4rem 0.8rem;
  font-weight: 600;
  text-decoration: none;
}

.btn-outline-ebh:hover {
  background: var(--ebh-mint);
  color: var(--ebh-forest);
}

.form-section {
  background: var(--ebh-paper);
  border: 1px solid var(--ebh-line);
  border-radius: 16px;
  padding: 1.3rem 1.4rem;
  margin-bottom: 1rem;
}

.form-section h2 {
  font-size: 1.15rem;
  color: var(--ebh-forest);
  margin-bottom: 1rem;
}

.muted {
  color: #66756d;
}

.empty-state {
  text-align: center;
  padding: 2.5rem 1rem;
  color: #66756d;
}

.detail-grid {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 0.45rem 1rem;
}

.detail-grid dt {
  color: #66756d;
  font-weight: 600;
}

.login-body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(1200px 500px at 10% -10%, #d8f3dc 0%, transparent 50%),
    linear-gradient(160deg, #1b4332 0%, #2d6a4f 45%, #f3efe6 45%);
  font-family: "Source Sans 3", "Segoe UI", sans-serif;
}

.login-wrap {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
}

.login-copy {
  color: #f4f1ea;
  padding: 4rem 4.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.login-copy h1 {
  font-family: Fraunces, Georgia, serif;
  font-size: 2.5rem;
  line-height: 1.15;
}

.login-card {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.login-card inner, .login-box {
  width: 100%;
  max-width: 420px;
  background: #fffcf7;
  border-radius: 20px;
  padding: 2rem;
  box-shadow: 0 20px 50px rgba(27, 67, 50, .15);
}

.demo-box {
  background: #f3efe6;
  border-radius: 12px;
  padding: 0.9rem 1rem;
  font-size: 0.88rem;
  margin-top: 1rem;
}

.check-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.4rem 1rem;
}

.check-list {
  display: grid;
  gap: 0.55rem;
}

.check-item {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--ebh-line);
  border-radius: 12px;
  background: #faf7f0;
  cursor: pointer;
}

.check-item:has(input:checked) {
  background: #e8f5ee;
  border-color: #b7d8c4;
}

.check-item .form-check-input {
  margin-top: 0.2rem;
  width: 1.15rem;
  height: 1.15rem;
}

.check-item small {
  display: block;
  color: #66756d;
  font-weight: 400;
}

.check-done {
  list-style: none;
  padding: 0;
  margin: 0;
}

.check-done li {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.25rem;
}

.check-done .done { color: var(--ebh-forest); font-weight: 600; }
.check-done .pending { color: #8a918c; }

.rapor-filtre {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.rapor-yil {
  width: auto;
  min-width: 7rem;
}

.rapor-grafik {
  position: relative;
  height: 320px;
}

.filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.filter-pill {
  border: 1px solid var(--ebh-line);
  color: var(--ebh-forest);
  background: var(--ebh-paper);
  border-radius: 999px;
  padding: 0.35rem 0.9rem;
  font-weight: 600;
  text-decoration: none;
}

.filter-pill:hover,
.filter-pill.active {
  background: var(--ebh-green);
  border-color: var(--ebh-green);
  color: #fff;
}

.rapor-terapist {
  border: 1px solid var(--ebh-line);
  border-radius: 12px;
  padding: 0.75rem 1rem;
  margin-bottom: 0.7rem;
  background: #faf7f0;
}

.rapor-terapist summary {
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  list-style: none;
}

.rapor-terapist summary::-webkit-details-marker { display: none; }

.rapor-terapist-ad {
  font-weight: 700;
  color: var(--ebh-forest);
}

.rapor-terapist-ozet {
  color: #66756d;
  font-size: 0.92rem;
}

.actions-row {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.islem-hucre {
  min-width: 13.5rem;
  max-width: 16.5rem;
  vertical-align: top;
}

.islem-linkler {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}

.islem-linkler .btn,
.islem-linkler .btn-outline-ebh,
.islem-linkler .btn-ebh {
  font-size: 0.8rem;
  padding: 0.28rem 0.6rem;
}

.atama-kutu {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-top: 0.5rem;
  padding: 0.55rem;
  background: #f6f1e6;
  border: 1px solid var(--ebh-line);
  border-radius: 10px;
}

.atama-kutu > form {
  margin: 0;
}

.atama-kutu .btn,
.atama-kutu .btn-outline-ebh {
  width: 100%;
  justify-content: center;
  font-size: 0.8rem;
  padding: 0.32rem 0.55rem;
}

.atama-kutu-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.35rem;
  align-items: center;
}

.atama-kutu-form .btn {
  width: auto;
}

.atama-kutu .form-select {
  font-size: 0.82rem;
  padding: 0.28rem 0.45rem;
  min-width: 0;
}

.atama-panel .atama-kutu {
  margin-top: 0;
  max-width: 28rem;
}

@media (max-width: 992px) {
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .login-wrap { grid-template-columns: 1fr; }
  .login-copy { display: none; }
  .nav-toggle { display: inline-flex; }
  .app-main { margin-left: 0; }
  .app-sidebar {
    transform: translateX(-110%);
    transition: transform .22s ease;
    box-shadow: none;
    z-index: 40;
  }
  body.nav-open .app-sidebar {
    transform: translateX(0);
    box-shadow: 16px 0 40px rgba(20, 30, 24, .28);
  }
  .nav-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(20, 30, 24, .46);
    z-index: 30;
  }
  body.nav-open .nav-backdrop {
    display: block;
  }
  .table-ebh thead {
    display: none;
  }
  .table-ebh,
  .table-ebh tbody,
  .table-ebh tr,
  .table-ebh td {
    display: block;
    width: 100%;
  }
  .table-ebh tr {
    border: 1px solid var(--ebh-line);
    border-radius: 12px;
    padding: 0.65rem 0.85rem;
    margin-bottom: 0.75rem;
    background: #fffdf9;
  }
  .table-ebh tr:hover td {
    background: transparent;
  }
  .table-ebh td {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    border-bottom: 1px dashed #efeae0;
    padding: 0.45rem 0;
  }
  .table-ebh td:last-child {
    border-bottom: none;
  }
  .table-ebh td::before {
    content: attr(data-label);
    flex: 0 0 38%;
    color: #66756d;
    font-weight: 600;
    font-size: 0.82rem;
  }
  .table-ebh td[data-label=""] {
    justify-content: flex-start;
    flex-wrap: wrap;
  }
  .table-ebh td[data-label=""]::before {
    display: none;
  }
  .table-ebh td .actions-row {
    width: 100%;
  }
  .islem-hucre {
    min-width: 0;
    max-width: none;
  }
  .table-ebh td.islem-hucre {
    flex-direction: column;
    align-items: stretch;
  }
  .table-ebh td.islem-hucre .islem-linkler,
  .table-ebh td.islem-hucre .atama-kutu {
    width: 100%;
  }
}

@media (max-width: 768px) {
  .detail-grid { grid-template-columns: 1fr; }
  .app-content, .app-topbar { padding-left: 1rem; padding-right: 1rem; }
  .stat-grid { grid-template-columns: 1fr; }
  .app-topbar h1 { font-size: 1.35rem; }
  .rapor-grafik { height: 260px; }
  .form-section, .panel { padding: 1rem; }
}
