/*!
 * HB Tema 1.0.0 — ortak bileşenler
 * Yalnız hb-tema.css token'larını kullanır. Sınıf ön eki: hb-
 */

.hb-container { width: min(100% - 32px, var(--hb-container)); margin-inline: auto; }
.hb-skip {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--hb-primary); color: var(--hb-on-primary);
  padding: 10px 16px; border-radius: var(--hb-radius-sm); text-decoration: none; font-weight: 600;
}
.hb-skip:focus { top: 12px; }

.hb-eyebrow {
  display: inline-flex; align-items: center; gap: .5rem;
  font-size: var(--hb-text-xs); font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--hb-accent-strong);
}
.hb-eyebrow::before { content: ""; width: 22px; height: 2px; border-radius: 2px; background: var(--hb-accent); }
.hb-muted { color: var(--hb-text-muted); }

/* ---------- Simge ---------- */
.hb-icon { width: 1.25em; height: 1.25em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.hb-icon--fill { fill: currentColor; stroke: none; }

/* ---------- Düğmeler ---------- */
.hb-btn {
  --_bg: var(--hb-surface); --_fg: var(--hb-text); --_bd: var(--hb-border-strong);
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  min-height: 44px; padding: .65rem 1.15rem;
  border: 1px solid var(--_bd); border-radius: var(--hb-radius-md);
  background: var(--_bg); color: var(--_fg);
  font-weight: 650; font-size: var(--hb-text-sm); line-height: 1.2; text-decoration: none; white-space: nowrap;
  cursor: pointer; transition: background var(--hb-dur) var(--hb-ease), border-color var(--hb-dur), transform var(--hb-dur), box-shadow var(--hb-dur);
}
.hb-btn:hover { border-color: var(--hb-text-muted); transform: translateY(-1px); }
.hb-btn:active { transform: translateY(0); }
.hb-btn--primary { --_bg: var(--hb-primary); --_fg: var(--hb-on-primary); --_bd: var(--hb-primary); box-shadow: var(--hb-shadow-md); }
.hb-btn--primary:hover { --_bg: var(--hb-primary-hover); border-color: var(--hb-primary-hover); }
.hb-btn--accent { --_bg: var(--hb-accent); --_fg: var(--hb-on-accent); --_bd: var(--hb-accent); }
.hb-btn--ghost { --_bg: transparent; --_bd: var(--hb-border-strong); }
.hb-btn--sm { min-height: 36px; padding: .45rem .8rem; font-size: var(--hb-text-xs); border-radius: var(--hb-radius-sm); }
.hb-btn--icon { width: 44px; padding: 0; }
.hb-btn[disabled], .hb-btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; transform: none; }

.hb-link-arrow { display: inline-flex; align-items: center; gap: .35rem; font-weight: 650; color: var(--hb-accent-strong); text-decoration: none; }
.hb-link-arrow .hb-icon { transition: transform var(--hb-dur) var(--hb-ease); }
.hb-link-arrow:hover .hb-icon { transform: translateX(3px); }

/* ---------- Kart ---------- */
.hb-card {
  background: var(--hb-surface); border: 1px solid var(--hb-border);
  border-radius: var(--hb-radius-lg); box-shadow: var(--hb-shadow-sm);
}
.hb-card--pad { padding: var(--hb-space-5); }
.hb-card__head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: var(--hb-space-4); }
.hb-card__head h3 { font-size: var(--hb-text-lg); }
.hb-card__meta { font-size: var(--hb-text-xs); color: var(--hb-text-muted); }

/* ---------- Rozet ---------- */
.hb-badge {
  display: inline-flex; align-items: center; gap: .3rem;
  padding: .2rem .55rem; border-radius: var(--hb-radius-pill);
  font-size: var(--hb-text-xs); font-weight: 650; line-height: 1.4;
  background: var(--hb-surface-2); color: var(--hb-text-muted); border: 1px solid var(--hb-border);
}
.hb-badge--accent { background: var(--hb-accent-soft); color: var(--hb-accent-strong); border-color: transparent; }
.hb-badge--soon { background: var(--hb-accent); color: var(--hb-on-accent); border-color: transparent; letter-spacing: .08em; text-transform: uppercase; }
.hb-badge--lock { color: var(--hb-warn); }
.hb-badge .hb-icon { width: 1em; height: 1em; }

/* ---------- Çip / filtre ---------- */
.hb-chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.hb-chip {
  min-height: 38px; padding: .4rem .95rem; border-radius: var(--hb-radius-pill);
  border: 1px solid var(--hb-border); background: var(--hb-surface); color: var(--hb-text-muted);
  font-size: var(--hb-text-sm); font-weight: 600; cursor: pointer;
  transition: background var(--hb-dur), color var(--hb-dur), border-color var(--hb-dur);
}
.hb-chip:hover { color: var(--hb-text); border-color: var(--hb-border-strong); }
.hb-chip[aria-pressed="true"], .hb-chip[aria-selected="true"] { background: var(--hb-primary); color: var(--hb-on-primary); border-color: var(--hb-primary); }

/* ---------- Form ---------- */
.hb-field { display: grid; gap: .35rem; font-size: var(--hb-text-sm); font-weight: 600; color: var(--hb-text-muted); }
.hb-input, .hb-select {
  width: 100%; min-height: 44px; padding: .55rem .85rem;
  border: 1px solid var(--hb-border-strong); border-radius: var(--hb-radius-md);
  background: var(--hb-surface); color: var(--hb-text); font-weight: 500;
}
.hb-input::placeholder { color: var(--hb-text-muted); opacity: .85; }
.hb-input:focus, .hb-select:focus { outline: 3px solid var(--hb-accent-soft); border-color: var(--hb-accent); }
.hb-search { position: relative; }
.hb-search .hb-icon { position: absolute; left: .85rem; top: 50%; transform: translateY(-50%); color: var(--hb-text-muted); pointer-events: none; }
.hb-search .hb-input { padding-left: 2.6rem; }

/* ---------- Sekmeler ---------- */
.hb-tabs { display: flex; gap: .35rem; padding: .3rem; border-radius: var(--hb-radius-pill); background: var(--hb-surface-2); border: 1px solid var(--hb-border); overflow-x: auto; scrollbar-width: none; max-width: 100%; }
.hb-tabs::-webkit-scrollbar { display: none; }
.hb-tab {
  flex: none; min-height: 40px; padding: .45rem 1.05rem; border: 0; border-radius: var(--hb-radius-pill);
  background: transparent; color: var(--hb-text-muted); font-weight: 650; font-size: var(--hb-text-sm); cursor: pointer;
}
.hb-tab:hover { color: var(--hb-text); }
.hb-tab[aria-selected="true"] { background: var(--hb-surface); color: var(--hb-text); box-shadow: var(--hb-shadow-sm); }
.hb-tabs--sm .hb-tab { min-height: 34px; padding: .3rem .8rem; font-size: var(--hb-text-xs); }

/* ---------- Tablo ---------- */
.hb-table-wrap { overflow-x: auto; border-radius: var(--hb-radius-md); }
.hb-table { width: 100%; border-collapse: collapse; font-size: var(--hb-text-sm); font-variant-numeric: tabular-nums; }
.hb-table th {
  text-align: right; font-size: var(--hb-text-xs); font-weight: 650; letter-spacing: .04em; text-transform: uppercase;
  color: var(--hb-text-muted); padding: .65rem .75rem; border-bottom: 1px solid var(--hb-border); white-space: nowrap;
}
.hb-table td { text-align: right; padding: .7rem .75rem; border-bottom: 1px solid var(--hb-border); white-space: nowrap; }
.hb-table th:first-child, .hb-table td:first-child { text-align: left; }
.hb-table tbody tr:last-child td { border-bottom: 0; }
.hb-table tbody tr:hover td { background: var(--hb-surface-2); }
.hb-table td small { display: block; color: var(--hb-text-muted); font-size: var(--hb-text-xs); font-weight: 500; white-space: normal; max-width: 22ch; overflow: hidden; text-overflow: ellipsis; }
.hb-table th button { all: unset; cursor: pointer; display: inline-flex; gap: .25rem; align-items: center; }
.hb-table th button:focus-visible { outline: 2px solid var(--hb-focus); outline-offset: 2px; }
.hb-table th button[aria-sort="ascending"]::after { content: "▲"; font-size: .7em; }
.hb-table th button[aria-sort="descending"]::after { content: "▼"; font-size: .7em; }

/* ---------- Değişim yüzdesi (renk + işaret; yalnız renge bağlı değil) ---------- */
.hb-pct { font-weight: 650; font-variant-numeric: tabular-nums; white-space: nowrap; }
.hb-pct--up { color: var(--hb-up); }
.hb-pct--up::before { content: "▲ "; font-size: .72em; }
.hb-pct--down { color: var(--hb-down); }
.hb-pct--down::before { content: "▼ "; font-size: .72em; }
.hb-pct--flat { color: var(--hb-text-muted); }

/* ---------- Durum noktası ---------- */
.hb-status { display: inline-flex; align-items: center; gap: .5rem; font-size: var(--hb-text-sm); color: var(--hb-text-muted); }
.hb-status__dot { width: 9px; height: 9px; border-radius: 50%; background: var(--hb-warn); box-shadow: 0 0 0 4px color-mix(in srgb, var(--hb-warn) 18%, transparent); }
.hb-status[data-durum="canli"] .hb-status__dot { background: var(--hb-up); box-shadow: 0 0 0 4px color-mix(in srgb, var(--hb-up) 18%, transparent); animation: hb-nabiz 2.4s ease-in-out infinite; }
.hb-status[data-durum="hata"] .hb-status__dot { background: var(--hb-down); box-shadow: 0 0 0 4px color-mix(in srgb, var(--hb-down) 18%, transparent); }
@keyframes hb-nabiz { 50% { box-shadow: 0 0 0 7px color-mix(in srgb, var(--hb-up) 6%, transparent); } }

.hb-empty { padding: var(--hb-space-5); text-align: center; color: var(--hb-text-muted); font-size: var(--hb-text-sm); border: 1px dashed var(--hb-border-strong); border-radius: var(--hb-radius-md); }
.hb-skeleton { border-radius: var(--hb-radius-sm); background: linear-gradient(90deg, var(--hb-surface-2), var(--hb-border), var(--hb-surface-2)); background-size: 200% 100%; animation: hb-isilti 1.4s linear infinite; }
@keyframes hb-isilti { to { background-position: -200% 0; } }

/* ---------- Üst çubuk ---------- */
.hb-topbar {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--hb-bg) 82%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(14px); backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--hb-border);
}
.hb-topbar__inner { display: flex; align-items: center; gap: 1rem; min-height: 72px; }
.hb-brand { display: inline-flex; align-items: center; gap: .75rem; color: var(--hb-text); text-decoration: none; margin-right: auto; }
.hb-brand__mark {
  position: relative; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 13px;
  background: var(--hb-band); color: var(--hb-on-band);
  font-family: var(--hb-font-serif); font-weight: 700; font-size: 1.1rem; letter-spacing: .02em;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.06), var(--hb-shadow-sm);
}
.hb-brand__mark::after { content: ""; position: absolute; right: 7px; bottom: 7px; width: 7px; height: 7px; border-radius: 2px; background: var(--hb-accent); }
.hb-brand__text { display: grid; line-height: 1.15; }
.hb-brand__text strong { font-size: .95rem; letter-spacing: .1em; font-weight: 800; }
.hb-brand__text small { font-size: var(--hb-text-xs); color: var(--hb-text-muted); font-weight: 550; letter-spacing: .02em; }

.hb-nav { display: flex; align-items: center; gap: .25rem; }
.hb-nav a {
  position: relative; padding: .5rem .8rem; border-radius: var(--hb-radius-sm);
  color: var(--hb-text-muted); font-weight: 600; font-size: var(--hb-text-sm); text-decoration: none;
}
.hb-nav a:hover { color: var(--hb-text); background: var(--hb-surface-2); }
.hb-nav a[aria-current="page"] { color: var(--hb-text); }
.hb-nav a[aria-current="page"]::after { content: ""; position: absolute; left: .8rem; right: .8rem; bottom: .15rem; height: 2px; border-radius: 2px; background: var(--hb-accent); }
.hb-topbar__actions { display: flex; align-items: center; gap: .5rem; }
.hb-menu-toggle { display: none; }

@media (max-width: 960px) {
  .hb-menu-toggle { display: inline-flex; }
  .hb-topbar__cta { display: none; }
  .hb-nav {
    position: absolute; left: 0; right: 0; top: 100%;
    display: none; flex-direction: column; align-items: stretch; gap: 0;
    padding: .5rem 16px 1rem; background: var(--hb-bg); border-bottom: 1px solid var(--hb-border); box-shadow: var(--hb-shadow-md);
  }
  .hb-nav.is-open { display: flex; }
  .hb-nav a { padding: .85rem .5rem; border-radius: 0; border-bottom: 1px solid var(--hb-border); font-size: var(--hb-text-md); }
  .hb-nav a:last-child { border-bottom: 0; }
  .hb-nav a[aria-current="page"]::after { display: none; }
}
@media (max-width: 420px) { .hb-brand__text small { display: none; } }

/* ---------- Tema seçici ---------- */
.hb-tema { position: relative; }
.hb-tema-panel {
  position: absolute; right: 0; top: calc(100% + 10px); z-index: 60; width: 270px;
  padding: .9rem; border-radius: var(--hb-radius-lg);
  background: var(--hb-surface); border: 1px solid var(--hb-border); box-shadow: var(--hb-shadow-lg);
}
.hb-tema-baslik { margin: .1rem .2rem .45rem; font-size: var(--hb-text-xs); font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--hb-text-muted); }
.hb-tema-paletler { display: grid; gap: .2rem; margin-bottom: .8rem; }
.hb-tema-secenek {
  display: flex; align-items: center; gap: .7rem; width: 100%; padding: .55rem .6rem;
  border: 1px solid transparent; border-radius: var(--hb-radius-sm); background: transparent;
  text-align: left; font-size: var(--hb-text-sm); font-weight: 600; cursor: pointer;
}
.hb-tema-secenek:hover { background: var(--hb-surface-2); }
.hb-tema-secenek[aria-checked="true"] { border-color: var(--hb-accent); background: var(--hb-accent-soft); }
.hb-tema-noktalar { display: inline-flex; }
.hb-tema-noktalar span { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--hb-surface); margin-left: -5px; box-shadow: 0 0 0 1px var(--hb-border-strong); }
.hb-tema-noktalar span:first-child { margin-left: 0; }
.hb-tema-modlar { display: grid; grid-template-columns: repeat(3, 1fr); gap: .25rem; padding: .25rem; border-radius: var(--hb-radius-md); background: var(--hb-surface-2); }
.hb-tema-mod { min-height: 36px; border: 0; border-radius: var(--hb-radius-sm); background: transparent; font-size: var(--hb-text-xs); font-weight: 650; color: var(--hb-text-muted); cursor: pointer; }
.hb-tema-mod[aria-checked="true"] { background: var(--hb-surface); color: var(--hb-text); box-shadow: var(--hb-shadow-sm); }
@media (max-width: 420px) { .hb-tema-panel { position: fixed; left: 16px; right: 16px; top: 80px; width: auto; } }

/* ---------- Bölüm başlığı ---------- */
.hb-section { padding-block: var(--hb-space-8); scroll-margin-top: 80px; }
.hb-section-head { display: grid; gap: .8rem; max-width: 680px; margin-bottom: var(--hb-space-6); }
.hb-section-head h2 { font-size: var(--hb-text-2xl); }
.hb-section-head p { color: var(--hb-text-muted); font-size: var(--hb-text-lg); }

/* ---------- Altbilgi ---------- */
.hb-footer { background: var(--hb-band); color: var(--hb-on-band); padding-block: var(--hb-space-7) var(--hb-space-5); }
.hb-footer a { color: var(--hb-on-band); text-decoration: none; }
.hb-footer a:hover { color: var(--hb-accent); }
.hb-footer__grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: var(--hb-space-6); }
.hb-footer__brand p { color: var(--hb-on-band-muted); font-size: var(--hb-text-sm); max-width: 34ch; margin-top: .9rem; }
.hb-footer h3 { color: var(--hb-on-band); font-family: var(--hb-font-sans); font-size: var(--hb-text-xs); letter-spacing: .14em; text-transform: uppercase; margin-bottom: .9rem; }
.hb-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; font-size: var(--hb-text-sm); }
.hb-footer ul a, .hb-footer ul button { color: var(--hb-on-band-muted); }
.hb-footer ul button { all: unset; cursor: pointer; color: var(--hb-on-band-muted); }
.hb-footer ul button:hover { color: var(--hb-accent); }
.hb-footer ul button:focus-visible { outline: 2px solid var(--hb-accent); outline-offset: 2px; }
.hb-footer .hb-brand { color: var(--hb-on-band); }
.hb-footer .hb-brand__mark { background: rgba(255,255,255,.08); }
.hb-footer .hb-brand__text small { color: var(--hb-on-band-muted); }
.hb-social { display: flex; gap: .5rem; margin-top: 1.1rem; }
.hb-social a { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; background: rgba(255,255,255,.07); color: var(--hb-on-band); }
.hb-social a:hover { background: var(--hb-accent); color: var(--hb-on-accent); }
.hb-social svg { width: 18px; height: 18px; fill: currentColor; }
.hb-footer__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .75rem; margin-top: var(--hb-space-7); padding-top: var(--hb-space-5); border-top: 1px solid rgba(255,255,255,.1); color: var(--hb-on-band-muted); font-size: var(--hb-text-xs); }
@media (max-width: 860px) { .hb-footer__grid { grid-template-columns: 1fr 1fr; } .hb-footer__brand { grid-column: 1 / -1; } }
@media (max-width: 480px) { .hb-footer__grid { grid-template-columns: 1fr; } }

/* ---------- İletişim kutusu ---------- */
.hb-dialog {
  width: min(100% - 32px, 760px); max-height: min(86vh, 900px); padding: 0;
  border: 1px solid var(--hb-border); border-radius: var(--hb-radius-xl);
  background: var(--hb-surface); color: var(--hb-text); box-shadow: var(--hb-shadow-lg);
}
.hb-dialog::backdrop { background: rgba(5, 10, 20, .55); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.hb-dialog__body { padding: var(--hb-space-6); overflow-y: auto; max-height: inherit; }
.hb-dialog__close { position: sticky; top: 0; float: right; margin: -.5rem -.5rem 0 0; }
.hb-dialog h2 { font-size: var(--hb-text-2xl); margin: .4rem 0 1rem; }
.hb-dialog h3 { font-size: var(--hb-text-md); margin: 1.4rem 0 .45rem; }
.hb-dialog p, .hb-dialog li { color: var(--hb-text-muted); font-size: var(--hb-text-sm); }
.hb-dialog ul { padding-left: 1.2rem; display: grid; gap: .35rem; }
