/* =====================================================
   layout.css — topbar · mentions sticky header · bottom nav
   ===================================================== */

/* ── TOP BAR ──────────────────────────────────────── */
.topbar {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(0,0,0,0.90);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--bd);
}
.topbar-inner {
  display: flex;
  align-items: center;
  gap: 10px;
  height: var(--topbar-h);
  padding: 0 16px;
}

/* logo */
.tlogo {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.tlogo svg { width: 100%; height: 100%; }

/* app title */
.ttitle {
  font-size: 15px;
  font-weight: 700;
  flex: 1;
}

/* ── TIME FILTER BAR ──────────────────────────────── */
.tf-bar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 8px 16px;
  border-bottom: 1px solid var(--bd);
  background: var(--bg);
}
.tf-trigger {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  background: var(--bg2);
  border: 1px solid var(--bd);
  border-radius: 9999px;
  cursor: pointer;
  transition: border-color .15s;
  user-select: none;
}
.tf-trigger:hover,
.tf-trigger.open { border-color: var(--bl); }
.tf-cal-ico { width: 13px; height: 13px; color: var(--bl); flex-shrink: 0; }
.tf-texts { display: flex; flex-direction: column; gap: 1px; }
.tf-label { font-size: 12px; font-weight: 700; color: var(--tx); white-space: nowrap; line-height: 1; }
.tf-sub   { font-size: 10px; color: var(--tx2); white-space: nowrap; line-height: 1; }
.tf-arr   { color: var(--tx2); transition: transform .2s; flex-shrink: 0; }
.tf-arr svg { width: 11px; height: 11px; display: block; }
.tf-trigger.open .tf-arr { transform: rotate(180deg); }

/* panel */
.tf-panel {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 288px;
  background: var(--bg2);
  border: 1px solid var(--bd);
  border-radius: 16px;
  z-index: 200;
  box-shadow: 0 12px 40px rgba(0,0,0,.7);
  overflow: hidden;
  animation: tfFadeUp .14s ease;
}
.tf-panel.open { display: block; }
@keyframes tfFadeUp {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.tf-section-title {
  font-size: 9px;
  font-weight: 700;
  color: var(--tx2);
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 12px 14px 6px;
}
.tf-presets {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
  padding: 0 10px 10px;
}
.tf-preset {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--bd);
  background: var(--bg3);
  cursor: pointer;
  transition: all .14s;
  gap: 2px;
  text-align: center;
}
.tf-preset:hover { border-color: var(--bl); background: var(--bl2); }
.tf-preset.on    { border-color: var(--bl); background: var(--bl2); }
.tf-preset .p-lbl { font-size: 12px; font-weight: 700; color: var(--tx); line-height: 1; }
.tf-preset .p-sub { font-size: 10px; color: var(--tx2); }
.tf-preset.on .p-lbl { color: var(--bl); }
.tf-preset.on .p-sub { color: rgba(29,155,240,.7); }
.tf-divider { height: 1px; background: var(--bd); margin: 0 10px; }
.tf-range {
  padding: 10px 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.tf-range-row { display: flex; align-items: center; gap: 6px; }
.tf-range-label { font-size: 11px; font-weight: 600; color: var(--tx2); width: 60px; flex-shrink: 0; }
.tf-date-input {
  flex: 1;
  background: var(--bg3);
  border: 1px solid var(--bd);
  border-radius: 8px;
  color: var(--tx);
  font-family: var(--fn);
  font-size: 12px;
  padding: 6px 10px;
  outline: none;
  transition: border-color .15s;
  color-scheme: dark;
  cursor: pointer;
}
.tf-date-input:focus { border-color: var(--bl); }
.tf-apply-row { display: flex; gap: 6px; }
.tf-apply {
  flex: 1;
  padding: 7px;
  background: var(--bl);
  border: none;
  border-radius: 8px;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  font-family: var(--fn);
  cursor: pointer;
  transition: opacity .15s;
}
.tf-apply:hover    { opacity: .85; }
.tf-apply:disabled { opacity: .35; cursor: default; }
.tf-clear {
  padding: 7px 10px;
  background: transparent;
  border: 1px solid var(--bd);
  border-radius: 8px;
  color: var(--tx2);
  font-size: 12px;
  font-weight: 600;
  font-family: var(--fn);
  cursor: pointer;
  transition: all .15s;
}
.tf-clear:hover { border-color: var(--tx2); color: var(--tx); }

/* ── MENTIONS STICKY SUB-HEADER ───────────────────── */
.mentions-sticky {
  position: sticky;
  top: var(--topbar-h);
  z-index: 50;
  background: var(--bg);
}

/* tf-bar mobilde bnav içinde gizli — topbar'da ayrı yönetilir */
.bnav .tf-bar { display: none; }
.bnav-logo    { display: none; }
.main-col     { display: contents; }

.bnav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  background: rgba(0,0,0,0.92);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--bd);
  padding: 8px 0;
  z-index: 100;
}
.ntab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 6px 4px;
  cursor: pointer;
  color: var(--tx2);
  transition: color .15s;
  border-radius: 10px;
  margin: 0 2px;
}
.ntab:hover { color: var(--tx); background: rgba(231,233,234,0.05); }
.ntab.on    { color: var(--bl); }
.nico {
  width: 44px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
}
.ntab.on .nico { background: var(--bl2); }
.ntab svg { width: 22px; height: 22px; }
.nlbl { font-size: 10px; font-weight: 500; }


/* ── DESKTOP (≥768px) — sidebar layout ───────────── */
@media (min-width: 768px) {
  body {
    background: var(--bg);
    padding-bottom: 0;
  }

  .app-frame {
    max-width: none;
    width: 100%;
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: row;
    background: var(--bg);
    border: none;
  }

  /* ── Sidebar ── */
  .bnav {
    position: sticky;
    top: 0;
    height: 100vh;
    width: 220px;
    flex-shrink: 0;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    padding: 12px 12px 24px;
    border-top: none;
    border-bottom: none;
    border-right: 1px solid var(--bd);
    background: var(--bg);
    overflow-y: auto;
    gap: 2px;
  }

  .bnav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 12px 20px;
    cursor: pointer;
    width: 100%;
    flex-shrink: 0;
  }
  .bnav-logo-lbl {
    font-size: 16px;
    font-weight: 800;
    color: var(--tx);
    white-space: nowrap;
  }

  .ntab {
    flex: none;
    flex-direction: row;
    justify-content: flex-start;
    width: 100%;
    padding: 10px 14px;
    gap: 14px;
    border-radius: 9999px;
    margin: 0;
    min-height: unset;
  }
  .ntab .nico {
    width: 26px;
    height: 26px;
    background: none !important;
    border-radius: 0;
    flex-shrink: 0;
  }
  .ntab svg { width: 22px; height: 22px; }
  .nlbl { font-size: 15px; font-weight: 600; }
  .ntab.on {
    color: var(--tx);
    background: rgba(231,233,234,0.07);
  }
  .ntab.on .nlbl { color: var(--tx); font-weight: 700; }
  .ntab.on .nico svg { stroke: var(--bl); }
  .ntab:hover { background: rgba(231,233,234,0.05); }

  /* ── Main content col ── */
  .main-col {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
  }

  /* Topbar desktop'ta görünür — logo+başlık gizle, zaman filtresi kalsın */
  .topbar .tlogo,
  .topbar .ttitle { display: none; }
  .topbar-inner { justify-content: flex-end; }
}