/* AdaKolay AdminPortal — Modernist tokenları üzerine panel yerleşimi. */

.shell { min-height: 100vh; display: grid; grid-template-columns: 264px 1fr; }

/* — kenar çubuğu — */
.sidebar {
  background: var(--color-neutral-900); color: var(--color-neutral-100);
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh;
}
.sidebar-head { padding: 28px 24px 24px; display: flex; flex-direction: column; gap: 14px; }
.mark {
  width: 34px; height: 34px; background: var(--color-accent); color: var(--color-neutral-900);
  display: grid; place-items: center; font-family: var(--font-heading); font-weight: 800; font-size: 16px;
}
.wordmark {
  font-family: var(--font-heading); font-weight: 800; font-size: 26px; line-height: .98;
  letter-spacing: -.035em; text-transform: uppercase;
}
.kicker { font-size: 10px; letter-spacing: .22em; text-transform: uppercase; color: var(--color-accent-700); }
.sidebar .kicker { color: var(--color-accent-400); }
.side-nav { display: flex; flex-direction: column; gap: 2px; padding: 8px 12px 0; }
.side-group {
  font-size: 9px; letter-spacing: .22em; text-transform: uppercase;
  color: var(--color-neutral-500); padding: 16px 12px 8px;
}
.side-link {
  display: flex; align-items: center; gap: 12px; padding: 11px 12px;
  font-size: 14px; color: var(--color-neutral-300); text-decoration: none;
}
.side-link span:first-of-type { margin-right: auto; }
.side-link:hover { background: var(--color-neutral-800); color: var(--color-neutral-100); }
.side-link.active { background: var(--color-accent); color: var(--color-neutral-900); font-weight: 600; }
.side-count { font-size: 11px; font-weight: 600; color: var(--color-accent-400); font-variant-numeric: tabular-nums; }
.side-link.active .side-count { color: var(--color-neutral-900); }
.side-foot {
  margin-top: auto; padding: 20px 24px; display: flex; align-items: center; gap: 12px;
  border-top: 1px solid var(--color-neutral-800);
}
.avatar {
  width: 36px; height: 36px; flex: none; background: var(--color-neutral-100); color: var(--color-neutral-900);
  display: grid; place-items: center; font-family: var(--font-heading); font-weight: 800; font-size: 13px;
}
.side-foot form { margin-left: auto; }

/* — ana alan — */
.main { display: flex; flex-direction: column; min-width: 0; }
.topbar {
  display: flex; align-items: center; gap: 20px; padding: 20px 40px;
  border-bottom: 2px solid var(--color-divider);
}
.search {
  display: flex; align-items: center; gap: 10px; flex: 1; max-width: 420px;
  border-bottom: 1px solid var(--color-divider); padding-bottom: 6px;
}
.search svg { opacity: .5; }
.search .input { border: 0; background: transparent; padding: 0; min-height: 22px; font-size: 14px; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.stamp {
  font-size: 11px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--color-neutral-600); font-variant-numeric: tabular-nums;
}

.page-head {
  padding: 44px 40px 36px; display: flex; align-items: flex-end; gap: 40px;
  border-bottom: 2px solid var(--color-divider);
}
.page-head h1 { margin: 0; font-size: clamp(38px, 4.4vw, 58px); line-height: .94; letter-spacing: -.04em; text-wrap: pretty; }
.page-head p { margin: 6px 0 0; font-size: 15px; color: var(--color-neutral-700); max-width: 48ch; }
.range { margin-left: auto; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }

.kpis { display: grid; grid-template-columns: repeat(4, 1fr); border-bottom: 2px solid var(--color-divider); }
.kpi { padding: 26px 40px 28px; border-right: 1px solid var(--color-divider); display: flex; flex-direction: column; gap: 8px; }
.kpi:last-child { border-right: 0; }
.kpi-label { font-size: 10px; letter-spacing: .18em; text-transform: uppercase; color: var(--color-neutral-600); }
.kpi-value {
  font-family: var(--font-heading); font-weight: 800; font-size: 40px; line-height: 1;
  letter-spacing: -.04em; font-variant-numeric: tabular-nums;
}
.kpi-note { font-size: 12px; color: var(--color-neutral-700); }
.kpi-note.up { color: var(--color-accent-700); font-weight: 600; }

.split { display: grid; grid-template-columns: 1.55fr 1fr; border-bottom: 2px solid var(--color-divider); }
.panel { padding: 32px 40px; display: flex; flex-direction: column; gap: 18px; }
.panel + .panel { border-left: 2px solid var(--color-divider); }
.panel-head { display: flex; align-items: flex-end; gap: 16px; }
.panel-head h3 { margin: 0; margin-right: auto; }
.panel-head .stamp { margin: 0; }

.rows { display: flex; flex-direction: column; }
.row {
  display: flex; align-items: center; gap: 12px; padding: 12px 0;
  border-bottom: 1px solid var(--color-divider);
}
.row-main { display: flex; flex-direction: column; margin-right: auto; min-width: 0; }
.row-title { font-size: 14px; font-weight: 600; }
.row-sub { font-size: 11px; color: var(--color-neutral-600); }
.dot-ok { width: 8px; height: 8px; background: var(--color-accent); }
.dot-idle { width: 8px; height: 8px; background: var(--color-neutral-500); }

.section { padding: 32px 40px; display: flex; flex-direction: column; gap: 16px; }
.section + .section { border-top: 2px solid var(--color-divider); }
.num { font-variant-numeric: tabular-nums; }
.table td.name { font-weight: 600; }
.table td.muted { color: var(--color-neutral-700); }

.chart { display: block; width: 100%; height: 200px; }
.chart .axis { stroke: var(--color-text); stroke-width: 2; }
.chart .grid { stroke: var(--color-neutral-300); stroke-width: 1; }
.chart .bar { fill: var(--color-neutral-800); }
.chart .bar.peak { fill: var(--color-accent); }
.chart text { font-size: 11px; fill: var(--color-neutral-700); font-family: var(--font-body); }
.chart text.peak { fill: var(--color-accent-700); }

/* — giriş ekranı — */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1.15fr 1fr; }
.auth-poster {
  background: var(--color-neutral-900); color: var(--color-neutral-100);
  padding: clamp(32px, 5vw, 64px); display: flex; flex-direction: column; gap: 40px;
  position: relative; overflow: hidden;
}
.auth-poster::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(to right, color-mix(in srgb, #f8f4f4 6%, transparent) 1px, transparent 1px),
    linear-gradient(to bottom, color-mix(in srgb, #f8f4f4 6%, transparent) 1px, transparent 1px);
  background-size: 72px 72px;
}
.auth-poster::after {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 40%; pointer-events: none;
  background: linear-gradient(to bottom, transparent, color-mix(in srgb, #ec3013 9%, transparent), transparent);
  animation: sweep 7s linear infinite;
}
@keyframes sweep { from { transform: translateY(-100%); } to { transform: translateY(100%); } }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .auth-poster::after { animation: none; }
  .auth-copy, .auth-form { animation: none; }
}
.auth-brand { position: relative; display: flex; align-items: center; gap: 12px; }
.auth-copy { position: relative; margin-top: auto; display: flex; flex-direction: column; gap: 18px; animation: rise .6s ease both; }
.auth-copy h1 {
  margin: 0; font-size: clamp(44px, 6.4vw, 92px); line-height: .9;
  letter-spacing: -.045em; text-transform: uppercase;
}
.auth-copy p { margin: 0; font-size: 16px; line-height: 1.5; max-width: 44ch; color: var(--color-neutral-400); }
.auth-stats {
  position: relative; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
  border-top: 2px solid color-mix(in srgb, #f8f4f4 22%, transparent); padding-top: 22px;
}
.auth-stats div { display: flex; flex-direction: column; gap: 4px; }
.auth-stats b {
  font-family: var(--font-heading); font-weight: 800; font-size: 26px;
  letter-spacing: -.03em; font-variant-numeric: tabular-nums;
}
.auth-stats span { font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--color-neutral-500); }

.auth-side { display: flex; flex-direction: column; padding: clamp(28px, 4vw, 56px); }
.auth-secure {
  display: flex; align-items: center; gap: 10px; font-size: 11px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--color-neutral-600);
}
.auth-secure i { width: 7px; height: 7px; background: var(--color-accent); }
.auth-form {
  margin: auto 0; display: flex; flex-direction: column; gap: 22px;
  max-width: 420px; width: 100%; animation: rise .55s ease both .08s;
}
.auth-form h2 { margin: 0; font-size: 34px; letter-spacing: -.03em; }
.auth-form .lead { margin: 0; font-size: 14px; color: var(--color-neutral-700); }
.field { display: flex; flex-direction: column; }
.field-row { display: flex; align-items: baseline; gap: 12px; }
.field-row label { margin-right: auto; }
.pw { display: flex; align-items: stretch; border: 1px solid var(--color-divider); background: var(--color-surface); }
.pw .input { border: 0; background: transparent; }
.pw .btn-icon { flex: none; border-left: 1px solid var(--color-divider); }
.check { display: inline-flex; align-items: center; gap: 10px; font-size: 13px; cursor: pointer; }
.check input { position: absolute; opacity: 0; width: 0; height: 0; }
.check i { width: 16px; height: 16px; flex: none; border: 1.5px solid var(--color-divider); }
.check:hover i { border-color: var(--color-accent); }
.check input:checked + i { background: var(--color-accent); border-color: var(--color-accent); box-shadow: inset 0 0 0 3px var(--color-bg); }
.check input:focus-visible + i { outline: 2px solid var(--color-accent); outline-offset: 2px; }
.auth-submit { min-height: 46px; font-size: 15px; margin-top: 0; }
.auth-submit span { margin-right: auto; }
.fine { margin: 0; font-size: 12px; color: var(--color-neutral-600); line-height: 1.5; }
.summary {
  border: 1px solid var(--color-accent); color: var(--color-accent-700);
  background: var(--color-accent-100); padding: 10px 12px; font-size: 13px;
}
.summary ul { margin: 0; padding-left: 18px; }
.auth-foot {
  display: flex; align-items: center; gap: 16px; border-top: 2px solid var(--color-divider);
  padding-top: 16px; font-size: 11px; color: var(--color-neutral-600);
}
.auth-foot span:first-child { margin-right: auto; }
.auth-foot a { color: inherit; }
.field-error { color: var(--color-accent-700); font-size: 12px; margin-top: 4px; }

@media (max-width: 1100px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; }
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .split { grid-template-columns: 1fr; }
  .panel + .panel { border-left: 0; border-top: 2px solid var(--color-divider); }
  .auth { grid-template-columns: 1fr; }
}

/* =====================================================================
   Mobil - telefon ve tablet
   1100px altinda kenar cubugu yandan acilan cekmeceye donusur.
   ===================================================================== */

.nav-toggle { display: none; }
.nav-backdrop { display: none; }

@media (max-width: 1100px) {
  /* Hamburger dugmesi yalnizca dar ekranda gorunur. */
  .nav-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    width: 38px; height: 38px; flex: 0 0 auto;
  }

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

  /* Kenar cubugu ekranin disinda bekler, acilinca kayar. */
  .sidebar {
    position: fixed; top: 0; left: 0; bottom: 0; z-index: 60;
    width: 276px; max-width: 84vw; height: 100vh;
    overflow-y: auto;
    transform: translateX(-100%);
    transition: transform .22s ease;
  }

  .shell.nav-open .sidebar { transform: translateX(0); }

  .nav-backdrop {
    display: block; position: fixed; inset: 0; z-index: 50;
    background: rgba(0, 0, 0, .45);
    opacity: 0; pointer-events: none; transition: opacity .22s ease;
  }

  .shell.nav-open .nav-backdrop { opacity: 1; pointer-events: auto; }

  /* Cekmece acikken arka plan kaymasin. */
  body.nav-locked { overflow: hidden; }

  .topbar { flex-wrap: wrap; gap: 10px; padding: 12px 16px; }
  .topbar .search { order: 3; flex: 1 1 100%; }
  .topbar-right { gap: 8px; }
  .topbar-right .stamp { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .sidebar, .nav-backdrop { transition: none; }
}

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

  /* Genis tablolar sayfayi degil kendi kutusunu kaydirsin. */
  .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .table-wrap table { min-width: 640px; }

  .page-head { flex-direction: column; align-items: flex-start; gap: 10px; }
}
