/*
 * Gelokey Yönetim — panel stilleri.
 * CSP gereği tek kaynak bu dosya: satır içi stil yok. Renkler :root
 * değişkenlerinde; koyu tema prefers-color-scheme ile. Turkuaz çuha + bal ıstaka.
 */

:root {
  color-scheme: light;

  --bg: #f3f6f5;
  --surface: #ffffff;
  --surface-2: #f6f9f8;
  --surface-3: #ebf1f0;
  --border: #dde5e3;
  --border-strong: #c3cfcc;

  --text: #132322;
  --text-2: #42524f;
  --text-3: #66726f;

  --accent: #0f8b8d;
  --accent-strong: #0b7a7c;
  --accent-hover: #0a6f71;
  --accent-text: #0b7a7c;
  --accent-soft: #e2f3f2;
  --accent-soft-2: #c9e9e7;
  --on-accent: #ffffff;

  --honey: #d4a017;
  --honey-text: #8a6200;
  --honey-soft: #fbf3dc;
  --honey-border: #ecd28a;

  --danger: #c4321f;
  --danger-strong: #b42318;
  --danger-text: #b42318;
  --danger-soft: #fdecea;
  --danger-border: #f3c2bb;
  --on-danger: #ffffff;

  --success: #15803d;
  --success-text: #15803d;
  --success-soft: #e6f6ec;

  --series: #008f8c;
  --series-hover: #007875;
  --series-track: #d5ecea;
  --grid: #e8eeec;
  --axis: #c3cfcc;

  --focus: #0f8b8d;
  --ring: 0 0 0 3px rgb(15 139 141 / 0.22);
  --shadow-1: 0 1px 2px rgb(16 40 38 / 0.05), 0 1px 3px rgb(16 40 38 / 0.06);
  --shadow-2: 0 12px 32px -12px rgb(16 40 38 / 0.28);
  --shadow-3: 0 28px 70px -20px rgb(10 30 28 / 0.4);
  --backdrop: rgb(9 22 21 / 0.46);

  --radius: 14px;
  --radius-sm: 10px;
  --radius-xs: 7px;

  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif,
    "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji";
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;

  --topbar-h: 58px;
  --bottomnav-h: 0px;
  --sidenav-w: 232px;
  --gutter: 32px;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;

    --bg: #0b1514;
    --surface: #12201f;
    --surface-2: #172726;
    --surface-3: #1e302e;
    --border: #243634;
    --border-strong: #345250;

    --text: #e6efee;
    --text-2: #b2c2c0;
    --text-3: #8a9c9a;

    --accent: #14b8a6;
    --accent-strong: #14b8a6;
    --accent-hover: #2dd4bf;
    --accent-text: #5ad8cf;
    --accent-soft: rgb(20 184 166 / 0.13);
    --accent-soft-2: rgb(20 184 166 / 0.24);
    --on-accent: #04201e;

    --honey: #e0b03a;
    --honey-text: #f0c75e;
    --honey-soft: rgb(224 176 58 / 0.12);
    --honey-border: rgb(224 176 58 / 0.4);

    --danger: #f07878;
    --danger-strong: #f07878;
    --danger-text: #f58c8c;
    --danger-soft: rgb(240 120 120 / 0.12);
    --danger-border: rgb(240 120 120 / 0.4);
    --on-danger: #2a0606;

    --success: #3fcf8e;
    --success-text: #57d69c;
    --success-soft: rgb(63 207 142 / 0.12);

    --series: #1aa39a;
    --series-hover: #26bdb2;
    --series-track: #1d3a37;
    --grid: #1f302e;
    --axis: #345250;

    --focus: #2dd4bf;
    --ring: 0 0 0 3px rgb(45 212 191 / 0.25);
    --shadow-1: none;
    --shadow-2: 0 12px 32px -12px rgb(0 0 0 / 0.6);
    --shadow-3: 0 28px 70px -20px rgb(0 0 0 / 0.75);
    --backdrop: rgb(2 8 8 / 0.62);
  }
}

/* ------------------------------------------------------------------ temel */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

html:has(dialog[open]) {
  overflow: hidden;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  font: 15px/1.5 var(--font);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

[hidden] {
  display: none !important;
}

h1,
h2,
h3,
h4,
p,
dl,
dd,
ul,
ol,
figure {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

h1,
h2,
h3,
h4 {
  line-height: 1.25;
}

a {
  color: var(--accent-text);
  text-underline-offset: 2px;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
}

fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

legend {
  padding: 0;
}

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

::selection {
  background: var(--accent-soft-2);
}

.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.muted {
  color: var(--text-3);
}

.mono {
  font-family: var(--mono);
  font-size: 0.92em;
}

.nowrap {
  white-space: nowrap;
}

.truncate {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.icon {
  display: inline-block;
  flex: none;
  width: 18px;
  height: 18px;
  vertical-align: middle;
}

.noscript {
  padding: 24px;
  text-align: center;
}

/* ------------------------------------------------------------------ logo */

.logo {
  display: block;
  flex: none;
  width: 32px;
  height: 32px;
}

.logo-felt {
  fill: var(--accent);
}

.logo-tile {
  fill: #fdf8ec;
}

.logo-g {
  fill: #d7262f;
  font-family: var(--font);
}

.logo-rack {
  fill: var(--honey);
}

/* ------------------------------------------------------------------ açılış */

.boot {
  display: grid;
  min-height: 100vh;
  min-height: 100dvh;
  place-items: center;
  align-content: center;
  gap: 14px;
  color: var(--text-3);
}

.boot .logo {
  width: 44px;
  height: 44px;
  animation: breathe 1.6s ease-in-out infinite;
}

@keyframes breathe {
  50% {
    opacity: 0.55;
    transform: scale(0.94);
  }
}

/* ------------------------------------------------------------------ giriş */

.login {
  display: flex;
  min-height: 100vh;
  min-height: 100dvh;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 32px 16px;
  background:
    radial-gradient(900px 480px at 50% -8%, var(--accent-soft-2), transparent 70%),
    radial-gradient(600px 300px at 50% 108%, var(--honey-soft), transparent 70%),
    var(--bg);
}

.login-card {
  width: min(400px, 100%);
  padding: 32px 28px 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: var(--shadow-2);
}

.login-brand {
  display: grid;
  justify-items: center;
  gap: 6px;
  margin-bottom: 24px;
  text-align: center;
}

.login-brand .logo {
  width: 52px;
  height: 52px;
  margin-bottom: 6px;
}

.login-brand h1 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.login-brand p {
  color: var(--text-3);
  font-size: 14px;
}

.login-actions {
  display: grid;
  gap: 14px;
}

.login .notice {
  margin-bottom: 16px;
}

.login-hint {
  color: var(--text-3);
  font-size: 13.5px;
  text-align: center;
}

/* Google "G" işareti beyaz zemin üstünde kalır (marka kuralı). */
.btn.btn-google {
  min-height: 48px;
  padding: 0 18px 0 8px;
  gap: 12px;
  font-size: 15.5px;
}

.g-chip {
  display: grid;
  width: 32px;
  height: 32px;
  flex: none;
  place-items: center;
  background: #ffffff;
  border-radius: 7px;
}

.g-logo {
  display: block;
  width: 18px;
  height: 18px;
}

.btn.btn-google:disabled {
  opacity: 0.75;
  cursor: progress;
}

/* ------------------------------------------------------------------ üst çubuk */

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

/* Marka yan menünün hizasında, oturum bilgisi sağ kenarda. */
.topbar-inner {
  display: flex;
  height: var(--topbar-h);
  padding: 0 24px 0 22px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
  color: inherit;
  text-decoration: none;
  border-radius: 8px;
}

.brand-text {
  display: grid;
  min-width: 0;
  line-height: 1.2;
}

.brand-name {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.brand-name span {
  color: var(--text-2);
  font-weight: 500;
}

.brand-who {
  display: none;
  color: var(--text-3);
  font-size: 12px;
}

.topbar-actions {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
}

.who {
  max-width: 440px;
  color: var(--text-2);
  font-size: 14px;
}

.who-name {
  margin-right: 8px;
  color: var(--text);
  font-weight: 600;
}

.who-email {
  color: var(--text-3);
}

/* ------------------------------------------------------------------ gezinme (ai-docs/61) */

/*
 * 14 sekme tek şeride sığmıyordu (1440 px'te 399 px taşıyordu). Masaüstünde
 * solda gruplu menü; 1024 px'in altında alt çubukta dört sık sekme + Menü,
 * Menü bütün grupları alttan açılan pencerede gösterir. Üçü de aynı .tab
 * bağlantılarını taşır (admin.js buildNavCopies).
 */
.shell {
  display: grid;
  grid-template-columns: var(--sidenav-w) minmax(0, 1fr);
  align-items: start;
}

.tab {
  position: relative;
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
  color: var(--text-2);
  font-weight: 550;
  text-decoration: none;
}

.tab:hover {
  color: var(--text);
}

.tab-label {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.tab .tab-badge {
  margin-left: auto;
}

.sidenav {
  position: sticky;
  top: var(--topbar-h);
  height: calc(100vh - var(--topbar-h));
  height: calc(100dvh - var(--topbar-h));
  padding: 18px 12px 28px;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--surface);
  border-right: 1px solid var(--border);
  scrollbar-width: thin;
}

.nav-group + .nav-group {
  margin-top: 18px;
}

.nav-group-title {
  padding: 0 10px 6px;
  color: var(--text-3);
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.02em;
}

.sidenav .tab,
.menu-body .tab {
  padding: 7px 10px;
  font-size: 14.5px;
  border-radius: 9px;
  transition: background-color 0.12s;
}

.sidenav .tab + .tab {
  margin-top: 2px;
}

.sidenav .tab:hover,
.menu-body .tab:hover {
  background: var(--surface-2);
}

.sidenav .tab[aria-current="page"],
.menu-body .tab[aria-current="page"] {
  color: var(--accent-text);
  font-weight: 650;
  background: var(--accent-soft);
}

.sidenav .tab:focus-visible,
.menu-body .tab:focus-visible {
  outline-offset: -2px;
}

/* Alt çubuk yalnız dar ekranda (aşağıdaki 1024 px kuralı). */
.bottomnav {
  display: none;
}

.bottomnav-menu {
  margin: 0;
  background: none;
  border: 0;
}

/* Menü penceresi: telefonda alttan açılır, grupların sekmeleri iki sütun. */
.dialog.menu-sheet {
  width: min(560px, 100vw);
  max-width: none;
}

.menu-body {
  gap: 18px;
  padding-bottom: calc(22px + env(safe-area-inset-bottom));
}

.menu-body .nav-groups {
  display: grid;
  gap: 16px;
}

.menu-body .nav-group {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.menu-body .nav-group + .nav-group {
  margin-top: 0;
}

.menu-body .nav-group-title {
  grid-column: 1 / -1;
  padding: 0 2px 2px;
}

.menu-body .tab {
  min-height: 48px;
  padding: 10px 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.menu-body .tab[aria-current="page"] {
  border-color: var(--accent-soft-2);
}

/* Rozet kutunun köşesine biner: iki sütunda etiket ("Geri bildirim") kesilmesin. */
.menu-body .tab .tab-badge {
  position: absolute;
  top: -7px;
  right: -5px;
  box-shadow: 0 0 0 2px var(--surface);
}

/* ------------------------------------------------------------------ ana alan */

.main {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 28px var(--gutter) calc(48px + var(--bottomnav-h));
}

.view {
  display: grid;
  gap: 20px;
}

.view-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px 20px;
}

.view-title {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.015em;
}

.view-desc {
  margin-top: 4px;
  color: var(--text-2);
}

.view-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px 16px;
  margin-bottom: 12px;
}

.section-title {
  font-size: 18px;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.section-aside {
  color: var(--text-3);
  font-size: 13px;
}

/* ------------------------------------------------------------------ kart */

.card {
  min-width: 0;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-1);
}

.card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  margin-bottom: 16px;
}

.card-title {
  font-size: 16px;
  font-weight: 650;
}

.card-sub {
  margin-top: 2px;
  color: var(--text-3);
  font-size: 13.5px;
}

.card-foot {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  font-size: 14px;
}

.grid-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 20px;
  align-items: start;
}

/* ------------------------------------------------------------------ düğmeler */

.btn {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 14px;
  color: var(--text);
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  text-decoration: none;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  transition: background-color 0.15s, border-color 0.15s, color 0.15s, box-shadow 0.15s;
}

.btn:hover:not(:disabled) {
  background: var(--surface-2);
  border-color: var(--text-3);
}

.btn:disabled {
  opacity: 0.55;
}

.btn .icon {
  width: 17px;
  height: 17px;
}

.btn-primary {
  color: var(--on-accent);
  background: var(--accent-strong);
  border-color: var(--accent-strong);
}

.btn-primary:hover:not(:disabled) {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}

.btn-danger {
  color: var(--on-danger);
  background: var(--danger-strong);
  border-color: var(--danger-strong);
}

.btn-danger:hover:not(:disabled) {
  background: var(--danger);
  border-color: var(--danger);
}

.btn-danger-ghost {
  color: var(--danger-text);
  background: transparent;
  border-color: transparent;
}

.btn-danger-ghost:hover:not(:disabled) {
  background: var(--danger-soft);
  border-color: transparent;
}

.btn-ghost {
  background: transparent;
  border-color: transparent;
}

.btn-ghost:hover:not(:disabled) {
  background: var(--surface-3);
  border-color: transparent;
}

.btn-sm {
  min-height: 32px;
  padding: 0 10px;
  font-size: 13.5px;
  border-radius: 8px;
}

.btn-icon {
  width: 38px;
  padding: 0;
}

.btn-sm.btn-icon {
  width: 32px;
}

.btn-block {
  width: 100%;
}

.btn[aria-busy="true"] {
  position: relative;
  color: transparent !important;
  pointer-events: none;
}

.btn[aria-busy="true"]::after {
  position: absolute;
  inset: 0;
  width: 16px;
  height: 16px;
  margin: auto;
  content: "";
  border: 2px solid var(--text-3);
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.btn-primary[aria-busy="true"]::after,
.btn-danger[aria-busy="true"]::after {
  border-color: var(--on-accent);
  border-right-color: transparent;
}

.link-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0;
  color: var(--accent-text);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 3px;
  background: none;
  border: 0;
  border-radius: 4px;
}

.link-btn:hover {
  text-decoration-color: currentColor;
}

.link-btn .icon {
  width: 15px;
  height: 15px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  flex: none;
  vertical-align: -3px;
  border: 2px solid var(--border-strong);
  border-right-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* ------------------------------------------------------------------ rozet, durum */

.badge {
  display: inline-flex;
  max-width: 100%;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  color: var(--text-2);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.5;
  white-space: nowrap;
  background: var(--surface-3);
  border: 1px solid transparent;
  border-radius: 999px;
}

.badge-accent {
  color: var(--accent-text);
  background: var(--accent-soft);
}

.badge-honey {
  color: var(--honey-text);
  background: var(--honey-soft);
}

.badge-danger {
  color: var(--danger-text);
  background: var(--danger-soft);
}

.badge-success {
  color: var(--success-text);
  background: var(--success-soft);
}

.badge-outline {
  background: transparent;
  border-color: var(--border-strong);
}

.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 3px 10px 3px 8px;
  color: var(--text-2);
  font-size: 13px;
  font-weight: 600;
  background: var(--surface-3);
  border-radius: 999px;
}

.status-dot {
  width: 8px;
  height: 8px;
  flex: none;
  background: var(--text-3);
  border-radius: 50%;
}

.status.is-online {
  color: var(--success-text);
  background: var(--success-soft);
}

.status.is-online .status-dot {
  background: var(--success);
  box-shadow: 0 0 0 0 var(--success);
  animation: pulse 2s ease-out infinite;
}

.status.is-error {
  color: var(--danger-text);
  background: var(--danger-soft);
}

.status.is-error .status-dot {
  background: var(--danger);
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgb(21 128 61 / 0.45);
  }
  70% {
    box-shadow: 0 0 0 6px rgb(21 128 61 / 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgb(21 128 61 / 0);
  }
}

/* ------------------------------------------------------------------ uyarı kutusu */

.notice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 11px 14px;
  color: var(--text-2);
  font-size: 14px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.notice > .icon {
  margin-top: 1px;
}

.notice-body {
  display: grid;
  min-width: 0;
  gap: 6px;
}

.notice-info {
  color: var(--text);
  background: var(--accent-soft);
  border-color: transparent;
}

.notice-info > .icon {
  color: var(--accent-text);
}

.notice-warn {
  color: var(--text);
  background: var(--honey-soft);
  border-color: var(--honey-border);
}

.notice-warn > .icon {
  color: var(--honey-text);
}

.notice-danger {
  color: var(--text);
  background: var(--danger-soft);
  border-color: var(--danger-border);
}

.notice-danger > .icon {
  color: var(--danger-text);
}

.form-error {
  padding: 10px 12px;
  color: var(--danger-text);
  font-size: 14px;
  font-weight: 550;
  background: var(--danger-soft);
  border-radius: var(--radius-sm);
}

/* ------------------------------------------------------------------ boş durum */

.empty {
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 28px 16px;
  color: var(--text-3);
  text-align: center;
}

.empty-icon {
  display: grid;
  width: 44px;
  height: 44px;
  margin-bottom: 4px;
  place-items: center;
  color: var(--text-3);
  background: var(--surface-3);
  border-radius: 12px;
}

.empty-icon .icon {
  width: 22px;
  height: 22px;
}

.empty-title {
  color: var(--text);
  font-size: 15px;
  font-weight: 650;
}

.empty-text {
  max-width: 46ch;
  font-size: 14px;
}

.empty .btn {
  margin-top: 8px;
}

.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 32px 16px;
  color: var(--text-3);
}

/* ------------------------------------------------------------------ istatistik */

.stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 16px;
}

.stat {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.stat-label {
  color: var(--text-3);
  font-size: 13px;
}

.stat-value {
  overflow: hidden;
  font-size: 21px;
  font-weight: 650;
  letter-spacing: -0.01em;
  line-height: 1.25;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.stat-value small {
  margin-left: 2px;
  color: var(--text-3);
  font-size: 13px;
  font-weight: 500;
}

.stat-value.is-danger {
  color: var(--danger-text);
}

.kv {
  display: grid;
  gap: 8px;
  margin-top: 16px;
  padding-top: 14px;
  font-size: 14px;
  border-top: 1px solid var(--border);
}

.kv-row {
  display: flex;
  min-width: 0;
  justify-content: space-between;
  gap: 12px;
}

.kv-key {
  flex: none;
  color: var(--text-3);
}

.kv-val {
  min-width: 0;
  overflow: hidden;
  text-align: right;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.last-error {
  margin-top: 14px;
  padding: 10px 12px;
  font-size: 13.5px;
  background: var(--danger-soft);
  border-radius: var(--radius-sm);
}

.last-error strong {
  display: block;
  color: var(--danger-text);
  font-size: 12.5px;
}

.last-error p {
  display: -webkit-box;
  overflow: hidden;
  font-family: var(--mono);
  font-size: 12.5px;
  overflow-wrap: anywhere;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

/* ------------------------------------------------------------------ gösterge (meter) */

.meter {
  height: 6px;
  overflow: hidden;
  background: var(--series-track);
  border-radius: 999px;
}

.meter-fill {
  display: block;
  width: 0;
  height: 100%;
  background: var(--series);
  border-radius: inherit;
  transition: width 0.3s ease;
}

.meter.is-warn .meter-fill {
  background: var(--honey);
}

.meter.is-danger .meter-fill {
  background: var(--danger);
}

.limit {
  display: grid;
  gap: 6px;
  margin-top: 16px;
  padding-top: 14px;
  font-size: 13.5px;
  border-top: 1px solid var(--border);
}

.limit-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--text-3);
}

.limit-row strong {
  color: var(--text);
  font-weight: 600;
}

/* ------------------------------------------------------------------ anahtar listesi (genel) */

.key-list {
  display: grid;
  gap: 2px;
}

.key-list li {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 0;
  font-size: 14px;
  border-bottom: 1px solid var(--border);
}

.key-list li:last-child {
  border-bottom: 0;
}

/* ------------------------------------------------------------------ ana anahtar (durum) */

.mode-card .card-head {
  margin-bottom: 14px;
}

.mode-switch {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  padding: 6px;
  background: var(--surface-3);
  border-radius: 14px;
}

.mode-switch[aria-busy="true"] {
  opacity: 0.7;
  pointer-events: none;
}

.mode-option {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 13px 14px;
  cursor: pointer;
  border: 1.5px solid transparent;
  border-radius: 10px;
  transition: background-color 0.15s, border-color 0.15s;
}

.mode-option:hover {
  background: var(--surface-2);
}

.mode-option input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
  opacity: 0;
}

.mode-radio {
  position: relative;
  width: 18px;
  height: 18px;
  flex: none;
  margin-top: 2px;
  border: 2px solid var(--border-strong);
  border-radius: 50%;
}

.mode-text {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.mode-title {
  font-weight: 650;
}

.mode-desc {
  color: var(--text-3);
  font-size: 13.5px;
  line-height: 1.4;
}

.mode-option:has(input:checked) {
  background: var(--surface);
  border-color: var(--text-3);
  box-shadow: var(--shadow-1);
}

.mode-option:has(input:checked) .mode-radio {
  border-color: var(--text-2);
}

.mode-option:has(input:checked) .mode-radio::after {
  position: absolute;
  inset: 3px;
  content: "";
  background: var(--text-2);
  border-radius: 50%;
}

.mode-option[data-mode="test"]:has(input:checked) {
  border-color: var(--honey);
  background: var(--honey-soft);
}

.mode-option[data-mode="test"]:has(input:checked) .mode-radio {
  border-color: var(--honey);
}

.mode-option[data-mode="test"]:has(input:checked) .mode-radio::after {
  background: var(--honey);
}

.mode-option[data-mode="on"]:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.mode-option[data-mode="on"]:has(input:checked) .mode-radio {
  border-color: var(--accent);
}

.mode-option[data-mode="on"]:has(input:checked) .mode-radio::after {
  background: var(--accent);
}

.mode-option:has(input:focus-visible) {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.mode-info {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.mode-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  color: var(--text-3);
  font-size: 13.5px;
}

.mode-meta strong {
  color: var(--text-2);
  font-weight: 600;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chip {
  max-width: 100%;
  padding: 2px 10px;
  overflow: hidden;
  color: var(--text);
  font-size: 13px;
  white-space: nowrap;
  text-overflow: ellipsis;
  background: var(--surface);
  border: 1px solid var(--honey-border);
  border-radius: 999px;
}

/* ------------------------------------------------------------------ canlı masalar */

.refresh-state {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-3);
  font-size: 13px;
}

.refresh-state .status-dot {
  background: var(--success);
}

.refresh-state.is-paused .status-dot {
  background: var(--text-3);
}

.refresh-state.is-error {
  color: var(--danger-text);
}

.refresh-state.is-error .status-dot {
  background: var(--danger);
}

.live-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 380px), 1fr));
  gap: 20px;
  align-items: start;
}

.table-card {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.table-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.table-title {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 650;
}

.table-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  color: var(--text-3);
  font-size: 13px;
}

.people {
  display: grid;
  gap: 8px;
}

.people-row {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 10px;
  align-items: baseline;
  font-size: 14px;
}

.people-label {
  color: var(--text-3);
  font-size: 13px;
}

.people-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
}

.person {
  display: inline-flex;
  max-width: 100%;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.person-sub {
  color: var(--text-3);
  font-size: 12.5px;
}

.speaking {
  display: inline-block;
  animation: speak 1s ease-in-out infinite;
}

@keyframes speak {
  50% {
    transform: scale(1.18);
  }
}

.log {
  display: grid;
  max-height: 300px;
  overflow-y: auto;
  gap: 2px;
  padding: 8px;
  overscroll-behavior: contain;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.line {
  display: grid;
  grid-template-columns: auto 20px minmax(0, 1fr);
  gap: 8px;
  padding: 4px 6px;
  font-size: 14px;
  line-height: 1.45;
  border-radius: 6px;
}

.line-time {
  padding-top: 1px;
  color: var(--text-3);
  font-family: var(--mono);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.line-ch {
  text-align: center;
}

.line-msg {
  min-width: 0;
  overflow-wrap: anywhere;
}

.line-who {
  margin-right: 6px;
  font-weight: 650;
}

.line-bot {
  color: var(--accent-text);
  background: var(--accent-soft);
}

.line-human {
  color: var(--text);
}

.line-note {
  padding-top: 1px;
  padding-bottom: 1px;
  color: var(--text-3);
  font-size: 12.5px;
  font-style: italic;
}

.line-note .line-who {
  font-weight: 600;
}

.log-empty {
  padding: 14px 8px;
  color: var(--text-3);
  font-size: 13.5px;
  text-align: center;
}

/* ------------------------------------------------------------------ grafik */

.usage-card {
  display: grid;
  gap: 20px;
}

.chart {
  position: relative;
}

.chart-body {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 8px;
}

.chart-y {
  position: relative;
  height: 180px;
  color: var(--text-3);
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
}

.chart-y span {
  position: absolute;
  right: 0;
  line-height: 1;
  transform: translateY(50%);
}

.chart-plot {
  position: relative;
  height: 180px;
  border-bottom: 1px solid var(--axis);
}

.chart-gridline {
  position: absolute;
  right: 0;
  left: 0;
  height: 0;
  border-top: 1px solid var(--grid);
}

.chart-cols {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(var(--cols, 14), minmax(0, 1fr));
}

.chart-col {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  border-radius: 6px 6px 0 0;
  outline-offset: -2px;
}

.chart-col:hover,
.chart-col:focus-visible {
  background: var(--surface-2);
}

.chart-bar {
  width: min(24px, 62%);
  height: 0;
  background: var(--series);
  border-radius: 4px 4px 0 0;
}

.chart-col:hover .chart-bar,
.chart-col:focus-visible .chart-bar {
  background: var(--series-hover);
}

.chart-val {
  position: absolute;
  right: 0;
  left: 0;
  padding-bottom: 3px;
  color: var(--text-2);
  font-size: 11.5px;
  font-weight: 650;
  text-align: center;
  transform: translateY(-100%);
  pointer-events: none;
}

.chart-x {
  display: grid;
  grid-template-columns: repeat(var(--cols, 14), minmax(0, 1fr));
  margin: 6px 0 0 48px;
  color: var(--text-3);
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
  line-height: 1.3;
  text-align: center;
}

.chart-x span {
  display: grid;
  min-width: 0;
}

.chart-x small {
  font-size: 10.5px;
  opacity: 0.85;
}

.chart-x .is-today {
  color: var(--text);
  font-weight: 650;
}

.chart-empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--text-3);
  font-size: 14px;
  pointer-events: none;
}

.chart-tip {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 1000;
  display: grid;
  gap: 2px;
  min-width: 120px;
  max-width: min(320px, calc(100vw - 8px));
  padding: 8px 10px;
  color: var(--text);
  font-size: 12.5px;
  pointer-events: none;
  overflow-wrap: anywhere;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  box-shadow: var(--shadow-2);
}

.chart-tip[hidden] {
  display: none;
}

.chart-tip strong {
  font-size: 13px;
}

.chart-tip-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.chart-tip-row .gx-key {
  flex: none;
  margin-right: 0;
}

.chart-tip-row .gx-key-none {
  background: none;
}

.chart-tip-label {
  flex: 1;
  color: var(--text-3);
}

.chart-tip-value {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

/* ------------------------------------------------------------------ tablo */

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
  font-variant-numeric: tabular-nums;
}

table.data th,
table.data td {
  padding: 8px 12px;
  text-align: right;
  white-space: nowrap;
  border-bottom: 1px solid var(--border);
}

table.data th:first-child,
table.data td:first-child {
  text-align: left;
}

table.data thead th {
  position: sticky;
  top: 0;
  color: var(--text-3);
  font-size: 12.5px;
  font-weight: 600;
  background: var(--surface-2);
}

table.data tbody th {
  font-weight: 550;
}

table.data tbody tr:last-child th,
table.data tbody tr:last-child td {
  border-bottom: 0;
}

table.data tbody tr:hover th {
  background: var(--surface-2);
}

table.data tbody tr:hover td {
  background: var(--surface-2);
}

table.data td.is-zero {
  color: var(--text-3);
}

table.data td.is-danger {
  color: var(--danger-text);
  font-weight: 600;
}

/* ------------------------------------------------------------------ karakter kartları */

.char-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr));
  gap: 16px;
}

.char-card {
  position: relative;
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 18px;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}

.char-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-2);
}

.char-card:has(.char-open:focus-visible) {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.char-card.is-off {
  background: var(--surface-2);
}

.char-card.is-off .avatar,
.char-card.is-off .char-persona,
.char-card.is-off .char-meter {
  opacity: 0.6;
}

.char-top {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.avatar {
  display: grid;
  width: 44px;
  height: 44px;
  flex: none;
  place-items: center;
  color: var(--accent-text);
  font-size: 18px;
  font-weight: 700;
  background: var(--accent-soft);
  border-radius: 12px;
}

.avatar.is-female {
  color: var(--honey-text);
  background: var(--honey-soft);
}

.char-head {
  display: grid;
  min-width: 0;
  flex: 1;
  gap: 1px;
}

.char-name {
  font-size: 16px;
  font-weight: 650;
}

.char-open {
  padding: 0;
  color: inherit;
  font: inherit;
  text-align: left;
  background: none;
  border: 0;
}

.char-open::after {
  position: absolute;
  inset: 0;
  content: "";
  border-radius: var(--radius);
}

.char-open:focus-visible {
  outline: none;
}

.char-age {
  color: var(--text-3);
  font-weight: 500;
}

.char-sub {
  color: var(--text-3);
  font-size: 13.5px;
}

.char-sub .is-auto {
  font-style: italic;
}

.char-persona {
  display: -webkit-box;
  overflow: hidden;
  color: var(--text-2);
  font-size: 13.5px;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.char-meter {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) 28px;
  align-items: center;
  gap: 10px;
  color: var(--text-3);
  font-size: 13px;
}

.char-meter strong {
  color: var(--text);
  font-weight: 600;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.char-voice {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 6px;
  color: var(--text-2);
  font-size: 13px;
}

.char-voice .icon {
  width: 15px;
  height: 15px;
  color: var(--text-3);
}

.char-voice.is-none {
  color: var(--text-3);
}

.char-badges {
  position: relative;
  z-index: 1;
  pointer-events: none;
}

.seat-badge {
  flex: none;
}

/* ------------------------------------------------------------------ form */

.form {
  display: grid;
  gap: 20px;
}

.form-card {
  display: grid;
  gap: 18px;
}

.form-card > .card-head {
  margin-bottom: 0;
}

.field {
  display: grid;
  min-width: 0;
  align-content: start;
  gap: 6px;
}

.field > label,
.field-label {
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
}

.field-label .opt {
  color: var(--text-3);
  font-weight: 500;
}

.help {
  color: var(--text-3);
  font-size: 13px;
  line-height: 1.45;
}

.field-error {
  color: var(--danger-text);
  font-size: 13px;
  font-weight: 550;
}

.field-foot {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.counter {
  flex: none;
  margin-left: auto;
  color: var(--text-3);
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
}

.counter.is-over {
  color: var(--danger-text);
  font-weight: 600;
}

.input {
  width: 100%;
  min-height: 40px;
  padding: 8px 12px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.input::placeholder {
  color: var(--text-3);
  opacity: 0.85;
}

.input:hover {
  border-color: var(--text-3);
}

.input:focus,
.input:focus-visible {
  border-color: var(--accent);
  outline: none;
  box-shadow: var(--ring);
}

.input[aria-invalid="true"] {
  border-color: var(--danger);
}

.input[aria-invalid="true"]:focus {
  box-shadow: 0 0 0 3px var(--danger-soft);
}

.input:disabled {
  color: var(--text-3);
  background: var(--surface-2);
}

textarea.input {
  min-height: 84px;
  resize: vertical;
  line-height: 1.5;
}

select.input {
  padding-right: 34px;
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--text-3) 50%),
    linear-gradient(135deg, var(--text-3) 50%, transparent 50%);
  background-position:
    calc(100% - 17px) 52%,
    calc(100% - 12px) 52%;
  background-repeat: no-repeat;
  background-size: 5px 5px;
}

.input-num {
  width: 92px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* Chip tutarı: 92 px'te "100000" bile kesiliyordu; 100.000.000 sığar (ai-docs/61). */
.input-num.input-amount {
  width: 140px;
}

.input-pct {
  width: 140px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.input-wide-num {
  width: 100%;
  max-width: 200px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.stack {
  display: grid;
  gap: 20px;
}

.input-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.unit {
  flex: none;
  color: var(--text-3);
  font-size: 13.5px;
}

.row-2,
.row-3,
.row-4 {
  display: grid;
  gap: 16px;
}

.row-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.row-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

/* Chip > Ligler: eşik ve standart masa kısa sayı, masa listesi uzun metin; listeye pay ver (ai-docs/61). */
.row-3.league-row {
  grid-template-columns: minmax(0, 150px) minmax(0, 1fr) minmax(0, 170px);
}

.row-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.range-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.range-row input[type="range"] {
  flex: 1;
  min-width: 0;
  height: 22px;
  margin: 0;
  accent-color: var(--accent);
  cursor: pointer;
}

.segmented {
  display: inline-flex;
  max-width: 100%;
  justify-self: start;
  padding: 3px;
  background: var(--surface-3);
  border-radius: 10px;
}

.segmented label {
  position: relative;
  flex: 1;
}

.segmented input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
  opacity: 0;
}

.segmented span {
  display: block;
  min-width: 52px;
  padding: 6px 16px;
  color: var(--text-2);
  font-size: 14px;
  font-weight: 550;
  text-align: center;
  white-space: nowrap;
  border-radius: 7px;
  transition: background-color 0.15s, color 0.15s;
}

.segmented input:checked + span {
  color: var(--accent-text);
  font-weight: 650;
  background: var(--surface);
  box-shadow: var(--shadow-1), 0 0 0 1px var(--border);
}

.segmented input:focus-visible + span {
  outline: 2px solid var(--focus);
  outline-offset: 1px;
}

.toggle-list {
  display: grid;
  gap: 4px;
}

.toggle-field {
  display: grid;
  gap: 4px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.toggle-field:last-child {
  border-bottom: 0;
}

.toggle {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  cursor: pointer;
}

.toggle-text {
  font-size: 14.5px;
  font-weight: 600;
}

.toggle input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  opacity: 0;
}

.toggle-track {
  position: relative;
  width: 40px;
  height: 24px;
  flex: none;
  background: var(--border-strong);
  border-radius: 999px;
  transition: background-color 0.15s;
}

.toggle-track::after {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  content: "";
  background: #ffffff;
  border-radius: 50%;
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.25);
  transition: transform 0.15s;
}

.toggle input:checked + .toggle-track {
  background: var(--accent-strong);
}

.toggle input:checked + .toggle-track::after {
  transform: translateX(16px);
}

.toggle input:focus-visible + .toggle-track {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.toggle input:disabled + .toggle-track {
  opacity: 0.5;
}

.radio-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.radio-card {
  position: relative;
  display: grid;
  gap: 2px;
  padding: 12px 14px 12px 42px;
  cursor: pointer;
  background: var(--surface);
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-sm);
}

.radio-card input {
  position: absolute;
  top: 15px;
  left: 14px;
  width: 17px;
  height: 17px;
  margin: 0;
  accent-color: var(--accent);
}

.radio-card strong {
  font-size: 14.5px;
}

.radio-card span {
  color: var(--text-3);
  font-size: 13px;
}

.radio-card:has(input:checked) {
  background: var(--accent-soft);
  border-color: var(--accent);
}

.legend {
  margin-bottom: 8px;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
}

/* Kaydet çubuğu yalnız kaydedilmemiş değişiklik varken ekranın altına yapışır. */
.savebar {
  position: relative;
  z-index: 10;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  padding: 12px 14px 12px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-1);
}

.savebar.is-sticky {
  position: sticky;
  bottom: calc(var(--bottomnav-h) + 12px + env(safe-area-inset-bottom));
  border-color: var(--honey-border);
  box-shadow: var(--shadow-2);
}

.savebar-status {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
  color: var(--text-3);
  font-size: 14px;
}

.savebar-status .status-dot {
  background: var(--success);
}

.savebar-status.is-dirty {
  color: var(--honey-text);
  font-weight: 600;
}

.savebar-status.is-dirty .status-dot {
  background: var(--honey);
}

.savebar-actions {
  display: flex;
  margin-left: auto;
  gap: 8px;
}

.konusma-form {
  max-width: 860px;
}

/* ------------------------------------------------------------------ anahtarlar */

.key-group {
  display: grid;
  gap: 0;
  padding: 0;
  overflow: hidden;
}

.key-group > .card-head {
  margin: 0;
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--border);
}

.key-balance,
.key-balance-result {
  display: flex;
  flex-basis: 100%;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 12px;
}

.key-balance-result:empty {
  display: none;
}

.key-row {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 12px 24px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}

.key-row:last-child {
  border-bottom: 0;
}

.key-info {
  display: grid;
  min-width: 0;
  align-content: start;
  gap: 4px;
}

.key-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  font-weight: 650;
}

.key-env {
  color: var(--text-3);
  font-family: var(--mono);
  font-size: 12px;
}

.key-current {
  overflow: hidden;
  color: var(--text-2);
  font-size: 13.5px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.key-current code {
  color: var(--text);
  font-family: var(--mono);
  font-size: 13px;
}

.key-form {
  display: grid;
  min-width: 0;
  align-content: start;
  gap: 8px;
}

.key-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.key-result {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 10px;
  font-size: 13.5px;
  overflow-wrap: anywhere;
  border-radius: 8px;
}

.key-result .icon {
  width: 16px;
  height: 16px;
  margin-top: 2px;
}

.key-result.is-ok {
  color: var(--success-text);
  background: var(--success-soft);
}

.key-result.is-fail {
  color: var(--danger-text);
  background: var(--danger-soft);
}

.key-result small {
  color: var(--text-3);
  white-space: nowrap;
}

/* ------------------------------------------------------------------ yöneticiler */

.admin-list {
  display: grid;
}

.admin-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.admin-item:first-child {
  padding-top: 0;
}

.admin-item:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.admin-main {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.admin-name {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}

.admin-name span:first-child {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.admin-mail {
  color: var(--text-2);
  font-size: 14px;
  overflow-wrap: anywhere;
}

.admin-meta {
  color: var(--text-3);
  font-size: 13px;
}

.inline-form {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.inline-form .field {
  flex: 1;
}

.inline-form .btn {
  margin-top: 27px;
}

.admins-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.admins-side {
  display: grid;
  gap: 20px;
}

/* ------------------------------------------------------------------ oyuncu bakımı: ortak */

.tab-badge {
  display: inline-grid;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  place-items: center;
  color: var(--on-danger);
  font-size: 11.5px;
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  background: var(--danger-strong);
  border-radius: 999px;
}

.small {
  font-size: 13.5px;
}

/* Başlık + uzun açıklama yanında düğme: düğme sağda kalsın, yazı sarsın. */
.card-head-text {
  min-width: 0;
  flex: 1 1 260px;
}

/* Uzun etiketli düğme dar kartta satır kırar. */
.btn.btn-wrap {
  justify-content: flex-start;
  padding-top: 7px;
  padding-bottom: 7px;
  text-align: left;
  white-space: normal;
}

.player-link {
  color: var(--accent-text);
  font-weight: 600;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.player-link:hover {
  text-decoration: underline;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 18px;
  margin-bottom: 16px;
}

.filters-stack {
  display: grid;
  justify-items: start;
  gap: 10px;
}

.filter {
  min-width: 0;
  max-width: 100%;
}

.filter .segmented {
  overflow-x: auto;
  scrollbar-width: none;
}

.filter .segmented::-webkit-scrollbar {
  display: none;
}

.filter .segmented span {
  min-width: 0;
  padding: 5px 12px;
  font-size: 13.5px;
}

.toggle.toggle-inline {
  display: inline-flex;
  justify-content: flex-start;
  gap: 10px;
}

.toggle-inline .toggle-text {
  color: var(--text-2);
  font-size: 14px;
  font-weight: 550;
}

.meta-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px 8px;
  margin-top: 6px;
  color: var(--text-3);
  font-size: 13px;
}

.meta-line > * {
  min-width: 0;
}

.meta-line > :not(:first-child)::before {
  margin-right: 8px;
  content: "·";
}

.care-list {
  display: grid;
}

.care-list > li {
  position: relative;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

.care-list > li:first-child {
  padding-top: 0;
}

.care-list > li:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.list-more {
  display: flex;
  justify-content: center;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.sub-title {
  color: var(--text-2);
  font-size: 13px;
  font-weight: 650;
}

.quote {
  margin-top: 4px;
  padding: 4px 0 4px 12px;
  color: var(--text);
  font-size: 14px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  border-left: 3px solid var(--border-strong);
}

.stack-sm {
  display: grid;
  gap: 12px;
}

.card-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.disclosure {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.disclosure > summary {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  color: var(--text-2);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  border-radius: inherit;
}

.disclosure > summary::-webkit-details-marker {
  display: none;
}

.disclosure > summary::before {
  width: 7px;
  height: 7px;
  flex: none;
  content: "";
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg);
  transition: transform 0.15s;
}

.disclosure[open] > summary::before {
  transform: rotate(45deg);
}

.disclosure > summary:hover {
  color: var(--text);
  background: var(--surface-2);
}

.disclosure-body {
  display: grid;
  gap: 8px;
  padding: 0 10px 10px;
}

.disclosure .log {
  max-height: 340px;
}

/* Sohbet dökümü (vaka, şikayet anı) */
.line.line-t {
  grid-template-columns: auto minmax(0, 1fr);
}

.line-server {
  color: var(--text-3);
}

.line-guilty {
  color: var(--text);
  background: var(--danger-soft);
  box-shadow: inset 3px 0 0 var(--danger);
}

.line-target {
  background: var(--honey-soft);
}

.line-tag {
  display: inline-block;
  margin-right: 6px;
  padding: 0 6px;
  color: var(--text-3);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.6;
  vertical-align: 1px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
}

.legend-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  color: var(--text-3);
  font-size: 12.5px;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.legend-item::before {
  width: 12px;
  height: 12px;
  content: "";
  border-radius: 3px;
}

.legend-item.is-guilty::before {
  background: var(--danger-soft);
  box-shadow: inset 3px 0 0 var(--danger);
}

.legend-item.is-target::before {
  background: var(--honey-soft);
  border: 1px solid var(--honey-border);
}

.legend-item.is-server::before {
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
}

/* ------------------------------------------------------------------ geri bildirim */

.stars {
  display: inline-flex;
  flex: none;
  color: var(--honey);
  font-size: 17px;
  letter-spacing: 1px;
  line-height: 1;
}

.stars-off {
  color: var(--border-strong);
}

.fb-summary {
  display: grid;
  grid-template-columns: minmax(150px, 210px) minmax(0, 760px);
  align-items: center;
  gap: 16px 32px;
}

.fb-avg {
  display: grid;
  justify-items: start;
  gap: 2px;
}

.fb-avg-value {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 40px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.fb-avg-star {
  color: var(--honey);
  font-size: 32px;
}

.fb-avg-label {
  color: var(--text-3);
  font-size: 13px;
}

.fb-avg-sub {
  margin-top: 6px;
  color: var(--text-2);
  font-size: 13.5px;
}

.dist {
  display: grid;
  gap: 2px;
}

.dist-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 104px;
  align-items: center;
  gap: 12px;
  padding: 5px 8px;
  text-align: left;
  background: none;
  border: 0;
  border-radius: 8px;
}

.dist-row:hover {
  background: var(--surface-2);
}

.dist-row .meter {
  height: 8px;
}

.dist-label {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

.dist-star {
  color: var(--honey);
  font-size: 13px;
}

.dist-count {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  color: var(--text-3);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.dist-count strong {
  color: var(--text);
  font-weight: 600;
}

/* Değerlendirilmemiş 1–2 yıldız: kartın kenarında kırmızı çizgi. */
.fb-item.is-open::before {
  position: absolute;
  top: 14px;
  bottom: 14px;
  left: -20px;
  width: 3px;
  content: "";
  background: var(--danger);
  border-radius: 0 3px 3px 0;
}

.fb-item.is-open:first-child::before {
  top: 0;
}

.fb-item.is-open:last-child::before {
  bottom: 0;
}

.fb-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 12px;
}

/* Dar ekranda düğme alt satıra iner, ad ve tarih yıldızların yanında kalır. */
.fb-who {
  min-width: 0;
  flex: 1 1 200px;
  font-size: 14px;
}

.fb-action {
  margin-left: auto;
}

.fb-comment {
  margin-top: 8px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.fb-comment.is-empty {
  color: var(--text-3);
  font-size: 13.5px;
  font-style: italic;
}

.fb-reviewed {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--success-text);
  font-size: 13px;
  font-weight: 600;
}

.fb-reviewed .icon {
  width: 16px;
  height: 16px;
}

.fb-note {
  margin-top: 8px;
  padding: 8px 12px;
  color: var(--text-2);
  font-size: 13.5px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  background: var(--surface-2);
  border-radius: var(--radius-xs);
}

.note-form {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  padding: 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.note-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

/* ------------------------------------------------------------------ destek */

.split {
  display: grid;
  grid-template-columns: minmax(300px, 410px) minmax(0, 1fr);
  align-items: start;
  gap: 20px;
}

.card.split-list {
  padding: 0;
  overflow: hidden;
}

.split-list .filters {
  margin: 0;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}

.ticket-items {
  display: grid;
}

.ticket-items li + li {
  border-top: 1px solid var(--border);
}

.ticket-item {
  display: grid;
  width: 100%;
  gap: 4px;
  padding: 12px 16px;
  color: inherit;
  text-align: left;
  background: none;
  border: 0;
}

.ticket-item:hover {
  background: var(--surface-2);
}

.ticket-item.is-current {
  background: var(--accent-soft);
  box-shadow: inset 3px 0 0 var(--accent);
}

.ticket-item:focus-visible {
  outline-offset: -2px;
}

.ticket-item-top {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.ticket-item-time {
  flex: none;
  color: var(--text-3);
  font-size: 12.5px;
}

.ticket-item-who {
  font-size: 14.5px;
  font-weight: 650;
}

.ticket-item-preview {
  display: -webkit-box;
  overflow: hidden;
  color: var(--text-2);
  font-size: 13.5px;
  overflow-wrap: anywhere;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.ticket-detail {
  display: grid;
  gap: 16px;
}

.ticket-head {
  display: grid;
  gap: 4px;
}

.ticket-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
}

.ticket-title-row .card-title {
  font-size: 18px;
}

.back-btn {
  display: none;
  justify-self: start;
  margin: -4px 0 4px -8px;
}

.ticket-kv {
  margin-top: 0;
  padding: 12px 14px;
  background: var(--surface-2);
  border: 0;
  border-radius: var(--radius-sm);
}

.thread {
  display: grid;
  gap: 10px;
}

.msg {
  display: grid;
  max-width: min(560px, 88%);
  justify-self: start;
  gap: 4px;
  padding: 10px 14px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 14px 14px 14px 4px;
}

.msg-admin {
  justify-self: end;
  background: var(--accent-soft);
  border-color: transparent;
  border-radius: 14px 14px 4px 14px;
}

.msg-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 10px;
  color: var(--text-3);
  font-size: 12.5px;
}

.msg-head strong {
  color: var(--text);
  font-size: 13.5px;
}

.msg-body {
  font-size: 14.5px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.reply-form,
.reply-mail {
  display: grid;
  gap: 10px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.reply-actions {
  display: flex;
  justify-content: flex-end;
}

.ticket-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.ticket-actions-label {
  margin-right: 4px;
  color: var(--text-3);
  font-size: 13px;
  font-weight: 600;
}

/* ------------------------------------------------------------------ şikayetler */

.care-section {
  display: grid;
}

.section-head-main {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 12px;
}

.care-section > .section-head {
  align-items: center;
}

.case-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 480px), 1fr));
  align-items: start;
  gap: 16px;
}

.case-card,
.report-card {
  display: grid;
  gap: 12px;
  padding: 18px;
}

.report-card.is-closed {
  background: var(--surface-2);
}

.case-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px 12px;
}

.case-title {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 6px 10px;
}

.case-name {
  display: grid;
  min-width: 0;
  font-size: 16px;
  font-weight: 650;
}

.case-kicker {
  color: var(--text-3);
  font-size: 12px;
  font-weight: 600;
}

.case-card > .meta-line,
.report-card > .meta-line {
  margin-top: -6px;
}

.verdict {
  display: grid;
  gap: 8px;
  padding: 12px 14px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.verdict-label {
  color: var(--text-3);
  font-size: 12px;
  font-weight: 650;
}

.verdict-summary {
  font-size: 14px;
}

.verdict-list {
  display: grid;
  gap: 6px;
}

.verdict-item {
  padding: 8px 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.verdict-item.is-guilty {
  background: var(--danger-soft);
  border-color: var(--danger-border);
}

.verdict-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 10px;
  font-size: 14px;
}

.verdict-reason {
  margin-top: 2px;
  color: var(--text-2);
  font-size: 13.5px;
}

.mini-list {
  display: grid;
  gap: 8px;
  margin-top: 6px;
}

.mini-top {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 10px;
  font-size: 14px;
}

.mini-who {
  margin-top: 4px;
  color: var(--text-2);
  font-size: 13.5px;
}

.report-people {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  font-size: 15px;
}

.report-arrow {
  display: inline-flex;
  color: var(--text-3);
}

.report-arrow .icon {
  width: 16px;
  height: 16px;
}

/* Ceza penceresi: puan merdiveni */
.ladder {
  display: grid;
  gap: 8px;
  padding: 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.ladder-title {
  color: var(--text-2);
  font-size: 13px;
  font-weight: 650;
}

.ladder-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.ladder-step {
  display: grid;
  gap: 1px;
  padding: 6px 4px;
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.ladder-pts {
  color: var(--text-3);
  font-size: 12px;
}

.ladder-dur {
  font-size: 14px;
  font-weight: 650;
  white-space: nowrap;
}

.ladder-step.is-active {
  color: var(--danger-text);
  background: var(--danger-soft);
  border-color: var(--danger-border);
}

.ladder-step.is-active .ladder-pts {
  color: inherit;
}

/* ------------------------------------------------------------------ oyuncular */

.subnav {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  gap: 6px;
}

.subnav-link {
  display: inline-flex;
  min-height: 36px;
  max-width: 100%;
  align-items: center;
  gap: 7px;
  padding: 0 14px;
  color: var(--text-2);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
}

.subnav-link .icon {
  width: 16px;
  height: 16px;
}

a.subnav-link:hover {
  color: var(--text);
  border-color: var(--border-strong);
}

.subnav-link[aria-current="page"] {
  color: var(--accent-text);
  background: var(--accent-soft);
  border-color: transparent;
}

.subnav-link.is-player {
  display: inline-block;
  overflow: hidden;
  line-height: 34px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.subnav-count {
  display: inline-grid;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  place-items: center;
  color: var(--honey-text);
  font-size: 11.5px;
  font-weight: 700;
  background: var(--honey-soft);
  border: 1px solid var(--honey-border);
  border-radius: 999px;
}

.search-form {
  display: flex;
  gap: 10px;
}

.search-input {
  position: relative;
  min-width: 0;
  flex: 1;
}

.search-input > .icon {
  position: absolute;
  top: 50%;
  left: 12px;
  color: var(--text-3);
  transform: translateY(-50%);
  pointer-events: none;
}

.search-input .input {
  min-height: 44px;
  padding-left: 38px;
}

.search-form .btn {
  min-height: 44px;
}

.search-form + .help {
  margin-top: 8px;
}

.results {
  margin-top: 16px;
}

.result-count {
  margin-bottom: 6px;
  color: var(--text-3);
  font-size: 13px;
}

.player-list {
  display: grid;
}

.player-list li + li {
  border-top: 1px solid var(--border);
}

.pager {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.pager > :first-child {
  justify-self: start;
}

.pager > :last-child {
  justify-self: end;
}

.pager-at {
  color: var(--text-3);
  font-size: 13px;
}

.player-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 8px;
  color: inherit;
  text-decoration: none;
  border-radius: var(--radius-sm);
}

.player-row:hover {
  background: var(--surface-2);
}

.player-row:focus-visible {
  outline-offset: -2px;
}

.player-row-main {
  display: grid;
  min-width: 0;
  flex: 1;
  gap: 2px;
}

.player-row-name {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  font-weight: 650;
}

.player-row .meta-line {
  margin-top: 0;
}

/* Çarşı (ai-docs/71 Ek 4): işletme süzgeci ve satırdaki işletmeler. */
.player-filters {
  margin: 12px 0 0;
}

.player-row .biz-on {
  color: var(--success-text);
  font-weight: 600;
}

.player-row-chips {
  display: grid;
  flex: none;
  justify-items: end;
  line-height: 1.25;
  font-variant-numeric: tabular-nums;
}

.player-row-chips small {
  color: var(--text-3);
  font-size: 12px;
}

.avatar-sm {
  width: 36px;
  height: 36px;
  font-size: 15px;
  border-radius: 10px;
}

.avatar-lg {
  width: 56px;
  height: 56px;
  font-size: 22px;
  border-radius: 16px;
}

.player-head {
  display: grid;
  gap: 18px;
}

.player-top {
  display: flex;
  flex-wrap: wrap;
  min-width: 0;
  align-items: center;
  gap: 14px;
}

.player-id {
  display: grid;
  flex: 1 1 200px;
  min-width: 0;
  gap: 6px;
}

/* Chip hediyesi penceresi: telefonda göründüğü gibi başlık + metin (ai-docs/51). */
.gift-amount {
  width: min(220px, 100%);
  font-variant-numeric: tabular-nums;
}

.gift-preview {
  display: grid;
  gap: 6px;
}

.gift-preview-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.gift-preview-box {
  display: grid;
  gap: 2px;
  padding: 10px 12px;
  font-size: 14px;
  overflow-wrap: anywhere;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.gift-reach {
  display: grid;
  gap: 8px;
}

/* Planlı bildirimler: Bildirimler sekmesindeki liste ve plan penceresi (ai-docs/62). */
.sched-body > .notice {
  margin-bottom: 16px;
}

.sched-list {
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
}

.sched-item {
  display: grid;
  min-width: 0;
  gap: 6px;
  padding: 14px 0;
  border-top: 1px solid var(--border);
}

.sched-item:first-child {
  padding-top: 0;
  border-top: 0;
}

.sched-item:last-child {
  padding-bottom: 0;
}

.sched-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
}

.sched-title {
  min-width: 0;
  font-size: 15px;
  overflow-wrap: anywhere;
}

.sched-text {
  color: var(--text-2);
  font-size: 14px;
  overflow-wrap: anywhere;
}

.sched-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  color: var(--text-2);
  font-size: 13.5px;
}

.sched-meta > span {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 6px;
  overflow-wrap: anywhere;
}

.sched-meta .icon {
  flex: none;
  width: 15px;
  height: 15px;
  color: var(--text-3);
}

.sched-when {
  display: grid;
  gap: 2px;
  color: var(--text-3);
  font-size: 13.5px;
}

.sched-runs {
  display: grid;
  gap: 4px;
  margin: 0;
  padding: 0;
  color: var(--text-2);
  font-size: 13.5px;
  list-style: none;
}

.sched-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding-top: 4px;
}

.sched-actions .toggle-inline {
  margin-right: auto;
}

.sched-times {
  display: grid;
  gap: 8px;
}

.sched-time {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sched-time .input,
.sched-date {
  width: min(180px, 100%);
  font-variant-numeric: tabular-nums;
}

.sched-days {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.sched-day {
  position: relative;
}

.sched-day input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
  opacity: 0;
}

.sched-day span {
  display: block;
  min-width: 46px;
  padding: 6px 10px;
  color: var(--text-2);
  font-size: 14px;
  font-weight: 550;
  text-align: center;
  background: var(--surface-3);
  border: 1px solid var(--border);
  border-radius: 999px;
  transition: background-color 0.15s, color 0.15s;
}

.sched-day input:checked + span {
  color: var(--on-accent);
  font-weight: 650;
  background: var(--accent);
  border-color: var(--accent);
}

.sched-day input:focus-visible + span {
  outline: 2px solid var(--focus);
  outline-offset: 1px;
}

.sched-shortcuts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.sched-preview-wrap {
  display: grid;
  gap: 6px;
}

.sched-preview {
  display: grid;
  gap: 2px;
  padding: 10px 12px;
  font-size: 14px;
  overflow-wrap: anywhere;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.sched-next {
  color: var(--text-2);
  font-size: 13.5px;
}

.player-name {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.01em;
  overflow-wrap: anywhere;
}

.player-head .kv {
  margin-top: 0;
}

.stats-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.stats-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.stat-value.is-warn {
  color: var(--honey-text);
}

.kv-val code {
  font-family: var(--mono);
  font-size: 13px;
}

.kv-copy {
  display: inline-flex;
  min-width: 0;
  max-width: 100%;
  align-items: center;
  gap: 2px;
  vertical-align: middle;
}

.kv-copy .btn-icon {
  margin: -6px -6px -6px 0;
}

/* ai-docs/73: the player's photo in Oyuncular > oyuncu. */
.player-photo-row {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px 10px;
  max-width: 100%;
}

.player-photo-link {
  display: inline-flex;
  border-radius: 12px;
}

.player-photo {
  display: block;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  object-fit: cover;
  background: var(--surface-2, #eee);
}

.providers {
  display: grid;
  justify-items: end;
  gap: 2px;
}

.provider {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.player-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 20px;
}

.penalty-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
}

.penalty-reason {
  min-width: 0;
  flex: 1;
  font-size: 14px;
  overflow-wrap: anywhere;
}

.penalty-item.is-revoked .penalty-reason {
  color: var(--text-3);
  text-decoration: line-through;
}

table.data.data-left th,
table.data.data-left td {
  text-align: left;
}

.logins-wrap {
  max-height: 480px;
  overflow: auto;
}

.ip-btn {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 550;
}

.ua-cell {
  max-width: 260px;
  overflow: hidden;
  color: var(--text-2);
  text-overflow: ellipsis;
}

.ip-account {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.uid-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.uid-main {
  display: grid;
  min-width: 0;
  gap: 6px;
}

.uid-main .meta-line {
  margin-top: 0;
}

.uid-list {
  display: grid;
  gap: 2px;
}

.uid-row {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 4px;
}

.uid-row code {
  font-family: var(--mono);
  font-size: 13px;
}

/* ------------------------------------------------------------------ diyaloglar */

.dialog {
  width: min(460px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  padding: 0;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow-3);
}

.dialog::backdrop {
  background: var(--backdrop);
}

.dialog-wide {
  width: min(640px, calc(100vw - 32px));
}

.dialog[open] {
  animation: dialog-in 0.18s ease-out;
}

@keyframes dialog-in {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.985);
  }
}

.dialog-box {
  display: flex;
  max-height: inherit;
  flex-direction: column;
}

.dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 22px 0;
}

.dialog-title {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.dialog-sub {
  margin-top: 2px;
  color: var(--text-3);
  font-size: 13.5px;
}

.dialog-close {
  margin: -6px -8px 0 0;
}

.dialog-body {
  display: grid;
  min-height: 0;
  gap: 16px;
  padding: 16px 22px;
  overflow-y: auto;
}

.dialog-body > p {
  color: var(--text-2);
}

.dialog-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 22px 18px;
}

.dialog-foot .spacer {
  flex: 1;
}

/* Karakter düzenleyici: masaüstünde sağdan panel, telefonda tam ekran. */
.sheet {
  width: min(680px, 100vw);
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0 0 0 auto;
  border-width: 0 0 0 1px;
  border-radius: 18px 0 0 18px;
}

.sheet[open] {
  animation: sheet-in 0.22s ease-out;
}

@keyframes sheet-in {
  from {
    opacity: 0.4;
    transform: translateX(32px);
  }
}

.sheet .dialog-box {
  height: 100%;
}

.sheet .dialog-head {
  padding: 18px 24px 14px;
  border-bottom: 1px solid var(--border);
}

.sheet .dialog-body {
  flex: 1;
  gap: 28px;
  padding: 22px 24px 32px;
}

.sheet .dialog-foot {
  padding: 14px 24px;
  border-top: 1px solid var(--border);
  background: var(--surface);
}

.sheet .form-error {
  margin: 0 24px 0;
}

.form-section {
  display: grid;
  gap: 16px;
}

.form-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 8px;
  color: var(--text);
  font-size: 15px;
  font-weight: 700;
  border-bottom: 1px solid var(--border);
}

.form-section-title .icon {
  color: var(--accent-text);
}

.voice-tools {
  display: grid;
  gap: 12px;
  padding: 14px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.voice-tools-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px;
}

.voice-tools-row .field {
  flex: 1 1 220px;
}

.voice-tools-row .field-emotion {
  flex: 0 1 150px;
}

.voice-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

audio.audio {
  width: 100%;
  height: 40px;
}

.design-result {
  display: grid;
  gap: 10px;
  padding: 14px;
  background: var(--accent-soft);
  border-radius: var(--radius-sm);
}

.design-result p {
  font-size: 14px;
}

/* ------------------------------------------------------------------ bildirimler */

.toasts {
  position: fixed;
  inset: auto 20px 20px auto;
  z-index: 100;
  display: grid;
  width: min(340px, calc(100vw - 32px));
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  overflow: visible;
  gap: 10px;
  color: var(--text);
  background: transparent;
  border: 0;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  font-size: 14px;
  font-weight: 550;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: 12px;
  box-shadow: var(--shadow-2);
  animation: toast-in 0.2s ease-out;
}

.toast .icon {
  margin-top: 1px;
}

.toast-success {
  border-left-color: var(--success);
}

.toast-success .icon {
  color: var(--success-text);
}

.toast-error {
  border-left-color: var(--danger);
}

.toast-error .icon {
  color: var(--danger-text);
}

.toast-info .icon {
  color: var(--accent-text);
}

.toast.leaving {
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.2s, transform 0.2s;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

/* ------------------------------------------------------------------ Genel: Bugün şeridi (ai-docs/61) */

.day-strip .section-head {
  margin-bottom: 10px;
}

.day-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(128px, 1fr));
  gap: 12px;
}

.day-tile {
  display: grid;
  min-width: 0;
  align-content: start;
  gap: 2px;
  padding: 14px 16px;
  color: inherit;
  text-decoration: none;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-1);
  transition: border-color 0.12s, background-color 0.12s;
}

.day-tile:hover {
  border-color: var(--border-strong);
}

.day-label {
  color: var(--text-2);
  font-size: 13.5px;
  font-weight: 550;
}

.day-value {
  font-size: 26px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
}

.day-hint {
  overflow: hidden;
  color: var(--text-3);
  font-size: 12.5px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.day-hint:empty::before {
  content: "\00a0";
}

/* Bekleyen iş varsa kutu bal rengine döner. */
.day-tile.is-warn {
  background: var(--honey-soft);
  border-color: var(--honey-border);
}

.day-tile.is-warn .day-value,
.day-tile.is-warn .day-hint {
  color: var(--honey-text);
}

/* ------------------------------------------------------------------ Chip: bölüm şeridi (ai-docs/61) */

/* min-width: 0 — ızgara öğesi düğmelerin toplam genişliğine uzayıp sayfayı taşırmasın. */
.jump {
  position: sticky;
  top: var(--topbar-h);
  z-index: 15;
  min-width: 0;
  margin: -8px calc(var(--gutter) * -1) -6px;
  padding: 8px var(--gutter);
  background: var(--bg);
  border-bottom: 1px solid transparent;
}

.jump-inner {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
}

.jump-inner::-webkit-scrollbar {
  display: none;
}

.jump-btn {
  flex: none;
  padding: 6px 12px;
  color: var(--text-2);
  font-size: 13.5px;
  font-weight: 600;
  white-space: nowrap;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
}

.jump-btn:hover {
  color: var(--text);
  border-color: var(--border-strong);
}

.jump-btn[aria-current] {
  color: var(--accent-text);
  background: var(--accent-soft);
  border-color: var(--accent-soft-2);
}

#view-chip .form-card {
  scroll-margin-top: calc(var(--topbar-h) + 64px);
  /* Çarşı kartının tablosu ve özeti sütunu içeriğe göre genişletmesin (390 px'te 632 px oluyordu, ai-docs/71). */
  grid-template-columns: minmax(0, 1fr);
}

/* ------------------------------------------------------------------ Gelişler: özet tek satır (ai-docs/61) */

#view-gelisler .stats {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

table.data td.is-zero {
  opacity: 0.6;
}

/* ------------------------------------------------------------------ duyarlı */

@media (max-width: 980px) {
  .admins-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .key-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .player-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  /* Destek: dar ekranda liste ya da seçili talep, biri. */
  .split {
    grid-template-columns: minmax(0, 1fr);
  }

  .split.has-current .split-list,
  .split:not(.has-current) .split-detail {
    display: none;
  }

  .back-btn {
    display: inline-flex;
  }
}

/* Alçak pencerede (768 px'lik dizüstü) 14 sekme kaydırmadan sığsın. */
@media (min-width: 1024px) and (max-height: 859.98px) {
  .sidenav {
    padding-top: 12px;
  }

  .sidenav .tab {
    padding-top: 5px;
    padding-bottom: 5px;
  }

  .sidenav .nav-group + .nav-group {
    margin-top: 10px;
  }
}

/* Yan menü 232 px aldığı dar masaüstünde liste sütunu daralır, ayrıntıya yer kalsın (ai-docs/61). */
@media (min-width: 1024px) and (max-width: 1279.98px) {
  .split {
    grid-template-columns: minmax(0, 300px) minmax(0, 1fr);
  }

  .split .filter .segmented {
    flex-wrap: wrap;
  }

  .split .filter .segmented label {
    flex: 0 0 auto;
  }
}

/* Yan menü yerine alt çubuk: Genel, Oyuncular, Destek, Şikayetler + Menü (ai-docs/61). */
@media (max-width: 1023.98px) {
  :root {
    --bottomnav-h: 64px;
  }

  .shell {
    display: block;
  }

  .sidenav {
    display: none;
  }

  .bottomnav {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 40;
    display: grid;
    height: calc(var(--bottomnav-h) + env(safe-area-inset-bottom));
    padding: 0 4px env(safe-area-inset-bottom);
    grid-template-columns: repeat(5, minmax(0, 1fr));
    background: var(--surface);
    border-top: 1px solid var(--border);
  }

  .bottomnav .tab {
    display: grid;
    justify-items: center;
    align-content: center;
    gap: 3px;
    padding: 6px 2px;
    font-size: 11.5px;
    font-weight: 600;
    border-radius: 12px;
  }

  .bottomnav .tab .icon {
    width: 44px;
    height: 28px;
    padding: 4px 12px;
    border-radius: 999px;
    transition: background-color 0.15s;
  }

  .bottomnav .tab[aria-current="page"],
  .bottomnav .bottomnav-menu.is-active {
    color: var(--accent-text);
  }

  .bottomnav .tab[aria-current="page"] .icon,
  .bottomnav .bottomnav-menu.is-active .icon {
    background: var(--accent-soft);
  }

  .bottomnav .tab:focus-visible {
    outline-offset: -2px;
  }

  .bottomnav .tab-label {
    max-width: 100%;
  }

  .bottomnav .tab-badge {
    position: absolute;
    top: 5px;
    left: calc(50% + 7px);
    min-width: 17px;
    height: 17px;
    padding: 0 4px;
    font-size: 10.5px;
    box-shadow: 0 0 0 2px var(--surface);
  }

  .toasts {
    bottom: calc(var(--bottomnav-h) + 12px + env(safe-area-inset-bottom));
  }

  /* Menü penceresi alttan açılır. */
  .dialog.menu-sheet {
    max-height: min(88dvh, 720px);
    margin: auto auto 0;
    border-width: 1px 0 0;
    border-radius: 20px 20px 0 0;
  }

  .menu-sheet[open] {
    animation: sheet-up 0.22s cubic-bezier(0.2, 0.8, 0.2, 1);
  }
}

@media (min-width: 561px) and (max-width: 1023.98px) {
  .dialog.menu-sheet {
    border-width: 1px 1px 0;
  }
}

@keyframes sheet-up {
  from {
    transform: translateY(24px);
    opacity: 0.4;
  }
}

@media (max-width: 720px) {
  :root {
    --gutter: 16px;
    --topbar-h: 56px;
  }

  body {
    font-size: 15px;
  }

  /* iOS büyütmesin diye giriş alanları 16px. */
  .input {
    font-size: 16px;
  }

  .who {
    display: none;
  }

  .brand-who {
    display: block;
    max-width: 52vw;
  }

  .topbar-inner {
    padding: 0 var(--gutter);
  }

  .fb-summary {
    grid-template-columns: minmax(0, 1fr);
  }

  .dist-row {
    grid-template-columns: 30px minmax(0, 1fr) 88px;
    gap: 10px;
    padding: 5px 4px;
  }

  .fb-item.is-open::before {
    left: -16px;
  }

  /* Süzgeçler telefonda kaymaz, satır kırar: her seçenek görünsün. */
  .filter .segmented {
    flex-wrap: wrap;
  }

  .filter .segmented label {
    flex: 0 0 auto;
  }

  .stats-4,
  #view-gelisler .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .day-tiles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .day-tile:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }

  .day-value {
    font-size: 24px;
  }

  .case-card,
  .report-card {
    padding: 16px;
  }

  .msg {
    max-width: 94%;
  }

  .uid-item {
    flex-direction: column;
  }

  .main {
    padding-top: 20px;
    padding-bottom: calc(var(--bottomnav-h) + 40px + env(safe-area-inset-bottom));
  }

  .view {
    gap: 16px;
  }

  .view-title {
    font-size: 22px;
  }

  .card {
    padding: 16px;
  }

  .grid-cards,
  .live-grid,
  .char-grid {
    gap: 16px;
  }

  .mode-switch {
    grid-template-columns: minmax(0, 1fr);
  }

  .row-2,
  .row-3,
  .row-3.league-row,
  .radio-cards {
    grid-template-columns: minmax(0, 1fr);
  }

  .row-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .people-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
  }

  .chart-x small {
    display: none;
  }

  .chart-body {
    grid-template-columns: 32px minmax(0, 1fr);
    gap: 6px;
  }

  .chart-x {
    margin-left: 38px;
    font-size: 10.5px;
  }

  .key-group > .card-head,
  .key-row {
    padding-right: 16px;
    padding-left: 16px;
  }

  .inline-form {
    flex-direction: column;
    align-items: stretch;
  }

  .inline-form .btn {
    margin-top: 0;
  }

  .savebar {
    padding: 10px 12px;
  }

  .toasts {
    inset: auto 16px calc(var(--bottomnav-h) + 12px + env(safe-area-inset-bottom)) 16px;
    width: auto;
  }

  .sheet {
    width: 100vw;
    border-width: 0;
    border-radius: 0;
  }

  .sheet .dialog-head,
  .sheet .dialog-foot {
    padding-right: 16px;
    padding-left: 16px;
  }

  .sheet .dialog-body {
    padding: 18px 16px 28px;
  }

  .sheet .form-error {
    margin: 0 16px;
  }

  .dialog-head {
    padding: 18px 18px 0;
  }

  .dialog-body {
    padding: 14px 18px;
  }

  .dialog-foot {
    padding: 12px 18px 16px;
  }

  .dialog-foot .btn {
    flex: 1 1 auto;
  }

  .dialog-foot .spacer {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media (forced-colors: active) {
  .chart-bar,
  .meter-fill {
    background: CanvasText;
  }

  .toggle-track::after {
    background: CanvasText;
  }
}

/* Odalar (ai-docs/80) */
/* Oda kartları: görselli ızgara */
.rooms-sort {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.rooms-sort .field-label {
  margin: 0;
}

.rooms-sort .input {
  width: auto;
  min-width: 170px;
}

.room-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.room-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.room-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-1px);
}

.room-art {
  position: relative;
  display: flex;
  justify-content: center;
  padding: 38px 12px 8px;
  color: var(--accent-text);
  background: var(--accent-soft);
  border-bottom: 1px solid var(--border);
}

.room-card[data-game="tavla"] .room-art {
  color: var(--honey-text);
  background: var(--honey-soft);
}

.room-card[data-game="batak"] .room-art {
  color: var(--danger-text);
  background: var(--danger-soft);
}

.room-card[data-game="other"] .room-art {
  color: var(--text-2);
  background: var(--surface-3);
}

.room-art-svg {
  width: 120px;
  height: 64px;
}

.room-art-svg .art-fill {
  fill: var(--surface);
  stroke: currentColor;
  stroke-width: 2;
}

.room-art-svg .art-fill-soft {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  opacity: 0.55;
}

.room-art-svg .art-mark {
  fill: currentColor;
  stroke: none;
}

.room-art-svg .art-line,
.room-art-svg .art-dots {
  fill: none;
  stroke: currentColor;
  stroke-width: 3;
  stroke-linecap: round;
}

.room-badges {
  position: absolute;
  top: 8px;
  right: 8px;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 6px;
  max-width: calc(100% - 16px);
}

.room-status {
  background: var(--surface);
}

.room-wait {
  padding: 2px 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-2);
  font-size: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.room-wait:empty {
  display: none;
}

.room-wait.is-long {
  border-color: var(--danger);
  background: var(--danger-soft);
  color: var(--danger-text);
}

.room-card[data-status="finished"] .room-art {
  filter: saturate(0.5);
}

.room-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 14px 14px;
  min-width: 0;
}

.room-title {
  margin: 0;
  overflow: hidden;
  font-size: 15px;
  font-weight: 650;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.room-sub {
  display: block;
  margin: 0;
  color: var(--text-3);
  font-size: 12px;
  font-weight: 400;
}

.room-seats {
  display: flex;
  align-items: center;
  gap: 8px;
}

.seat-dots {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
}

.seat-dot {
  box-sizing: border-box;
  width: 11px;
  height: 11px;
  border: 2px solid var(--border-strong);
  border-radius: 50%;
}

.seat-dot.is-human {
  background: var(--accent);
  border-color: var(--accent);
}

.seat-dot.is-bot {
  background: var(--honey);
  border-color: var(--honey);
  border-radius: 3px;
}

.seat-text {
  font-size: 13px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.room-players {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 10px;
  margin: 0;
  font-size: 13px;
  overflow-wrap: anywhere;
}

.room-player {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.room-facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 12px;
  margin: 2px 0 0;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.room-fact {
  min-width: 0;
}

.room-fact dt {
  color: var(--text-3);
  font-size: 11px;
}

.room-fact dd {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
}

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

  .rooms-sort {
    width: 100%;
    margin-left: 0;
  }

  .rooms-sort .input {
    flex: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .room-card {
    transition: none;
  }

  .room-card:hover {
    transform: none;
  }
}

.rooms-count {
  margin: 0 0 10px;
}

/* Gelişler grafikleri (ai-docs/81) */
.gx-charts { display: grid; gap: 20px; }
.gx-title { font-size: 14px; font-weight: 600; margin: 0 0 6px; color: var(--text-2); }
.gx-svg { width: 100%; height: auto; display: block; }
.gx-grid { stroke: var(--border); stroke-width: 1; }
.gx-axis { fill: var(--text-3); font-size: 11px; }
.gx-hit { fill: transparent; }
.gx-hit:hover { fill: var(--surface-3); }
.gx-bar.c-new, .gx-key.c-new { fill: #e8590c; background: #e8590c; }
.gx-bar.c-old, .gx-key.c-old { fill: var(--accent); background: var(--accent); }
.gx-bar.c-and, .gx-key.c-and { fill: #2f9e44; background: #2f9e44; }
.gx-bar.c-ios, .gx-key.c-ios { fill: #4263eb; background: #4263eb; }
.gx-bar.c-web, .gx-key.c-web { fill: #868e96; background: #868e96; }
.gx-legend { display: flex; flex-wrap: wrap; gap: 14px; list-style: none; margin: 4px 0 0; padding: 0; font-size: 12px; color: var(--text-2); }
.gx-key { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; }

/* Gelişler alt sekmeleri ve tıklama grafikleri (ai-docs/59 Ek 2) */
.gx-bar.c-play, .gx-key.c-play { fill: #0ca678; background: #0ca678; }
.gx-bar.c-guest, .gx-key.c-guest { fill: #f59f00; background: #f59f00; }
.gx-bar.c-reg, .gx-key.c-reg { fill: #7048e8; background: #7048e8; }
.gx-svg-bar { max-width: 440px; }
.gx-lbl { fill: var(--text-2); font-size: 14px; }
.gx-lbl.is-other { font-style: italic; }
.gx-val { fill: var(--text); font-size: 14px; font-variant-numeric: tabular-nums; }
.gl-tabs { display: flex; gap: 4px; margin: 0 0 16px; border-bottom: 1px solid var(--border); overflow-x: auto; }
.gl-tab {
  appearance: none; background: none; border: 0; border-bottom: 3px solid transparent; margin-bottom: -1px;
  padding: 10px 16px; font: inherit; font-weight: 600; color: var(--text-2); cursor: pointer; white-space: nowrap;
  transition: color 0.15s, border-color 0.15s;
}
.gl-tab:hover { color: var(--text); }
.gl-tab[aria-selected="true"] { color: var(--accent); border-bottom-color: var(--accent); }
.gl-tab:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; border-radius: 4px; }
.gl-panel { display: grid; gap: 16px; min-width: 0; }
.gl-panel:focus-visible { outline: none; }
/* Anlık max online (ai-docs/96): özet notu ile grafik arasında boşluk */
.gl-online-note { margin: 8px 0 20px; }
.gl-online-table-title { margin-top: 20px; }
.gl-days { border: 0; margin: 0; padding: 0; min-width: 0; }
@media (prefers-reduced-motion: reduce) { .gl-tab { transition: none; } }

/* ------------------------------------------------------------------ Oda penceresi (ai-docs/80 Ek 3) */

:root {
  --tile-bg: #fbf6e8;
  --tile-edge: #c9bd9a;
  --tile-red: #c4321f;
  --tile-yellow: #a87500;
  --tile-blue: #1d5fbf;
  --tile-black: #1f2a29;
  --felt: #e3efe9;
  --felt-edge: #b7d0c5;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --tile-bg: #ece4cc;
    --tile-edge: #8c845f;
    --tile-red: #b3261b;
    --tile-yellow: #8a6200;
    --tile-blue: #1a4fa3;
    --tile-black: #1a2322;
    --felt: #143a33;
    --felt-edge: #245a4f;
  }
}

:root[data-theme="dark"] {
  --tile-bg: #ece4cc;
  --tile-edge: #8c845f;
  --tile-red: #b3261b;
  --tile-yellow: #8a6200;
  --tile-blue: #1a4fa3;
  --tile-black: #1a2322;
  --felt: #143a33;
  --felt-edge: #245a4f;
}

.room-card {
  position: relative;
}

.room-open {
  display: block;
  max-width: 100%;
  padding: 0;
  overflow: hidden;
  color: inherit;
  font: inherit;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
  background: none;
  border: 0;
  cursor: pointer;
}

/* Kartın tamamı tıklanır: düğmenin görünmez örtüsü kartı kaplar. */
.room-open::after {
  position: absolute;
  inset: 0;
  z-index: 1;
  content: "";
}

.room-open:focus-visible {
  outline: none;
}

.room-open:focus-visible::after {
  border-radius: var(--radius);
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

.room-modal {
  width: min(980px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
}

.rd-head {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.room-mode {
  justify-self: start;
}

.room-mode.is-live .status-dot {
  background: var(--success);
}

.room-mode.is-poll .status-dot {
  background: var(--honey);
}

.room-mode.is-warn .status-dot,
.room-mode.is-ended .status-dot {
  background: var(--danger);
}

.room-detail {
  gap: 20px;
}

.room-notice:empty {
  display: none;
}

.room-notice {
  display: grid;
  gap: 8px;
}

.rd-section {
  display: grid;
  min-width: 0;
  gap: 10px;
}

.rd-h {
  font-size: 15px;
  font-weight: 700;
}

.rd-label {
  margin: 0;
  color: var(--text-3);
  font-size: 12px;
  font-weight: 600;
}

.rd-none {
  color: var(--text-3);
  font-size: 13px;
}

.rd-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rd-foot-note {
  color: var(--text-3);
  font-size: 12.5px;
}

/* Masa: dört koltuk ortadaki panelin çevresinde. */
.rd-felt {
  display: grid;
  grid-template-areas:
    ". north ."
    "west center east"
    ". south .";
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 10px;
  padding: 12px;
  background: var(--felt);
  border: 1px solid var(--felt-edge);
  border-radius: 16px;
}

.rd-seat,
.rd-center {
  display: grid;
  min-width: 0;
  align-content: start;
  gap: 6px;
  padding: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.rd-seat.is-current {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-soft-2);
}

.rd-seat.side-north { grid-area: north; }
.rd-seat.side-west { grid-area: west; }
.rd-seat.side-east { grid-area: east; }
.rd-seat.side-south { grid-area: south; }
.rd-center { grid-area: center; align-content: center; }

.rd-seat-head {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.rd-seat-meta,
.rd-turn,
.rd-last {
  margin: 0;
  color: var(--text-2);
  font-size: 13px;
}

.rd-turn {
  color: var(--text);
  font-weight: 650;
}

.rd-center-tiles {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 14px;
}

.rd-deck-n {
  font-size: 18px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.rd-clock {
  font-variant-numeric: tabular-nums;
}

.rd-conn.is-ok { color: var(--success-text); border-color: var(--success); }
.rd-conn.is-warn { color: var(--honey-text); border-color: var(--honey-border); }
.rd-conn.is-bot { color: var(--text-2); }

.rd-tiles {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
}

.rd-tile {
  display: inline-flex;
  min-width: 26px;
  height: 34px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0 2px;
  color: var(--tile-black);
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
  background: var(--tile-bg);
  border: 1px solid var(--tile-edge);
  border-radius: 5px;
  box-shadow: 0 1px 0 var(--tile-edge);
}

.rd-tile-m {
  margin-top: 2px;
  font-size: 9px;
}

.rd-tile.t-red { color: var(--tile-red); }
.rd-tile.t-yellow { color: var(--tile-yellow); }
.rd-tile.t-blue { color: var(--tile-blue); }
.rd-tile.t-green { color: var(--tile-black); }
.rd-tile.t-joker { color: var(--tile-red); }

.rd-tile.is-okey {
  outline: 2px dashed var(--accent);
  outline-offset: 1px;
}

.rd-melds {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.rd-meld {
  display: grid;
  gap: 2px;
}

.rd-meld-owner {
  color: var(--text-3);
  font-size: 12px;
}

.rd-players {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.rd-player {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.rd-player.is-current {
  border-color: var(--accent);
}

.rd-seatno,
.rd-score {
  color: var(--text-3);
  font-size: 12.5px;
}

.rd-score {
  margin-left: auto;
}

.rd-chat {
  display: grid;
  max-height: 260px;
  align-content: start;
  gap: 6px;
  margin: 0;
  padding: 10px 12px;
  overflow-y: auto;
  list-style: none;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.rd-msg {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  font-size: 13.5px;
  overflow-wrap: anywhere;
}

.rd-msg-time {
  color: var(--text-3);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.rd-msg.is-system {
  color: var(--text-3);
  font-style: italic;
}

.rd-msg.is-removed .rd-msg-text {
  color: var(--text-3);
  font-style: italic;
}

.rd-info {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 10px 16px;
}

@media (max-width: 720px) {
  .room-modal {
    width: 100vw;
    max-width: none;
    height: 100dvh;
    max-height: none;
    margin: 0;
    border-width: 0;
    border-radius: 0;
  }

  .room-modal .dialog-box {
    height: 100%;
  }

  .rd-felt {
    grid-template-areas:
      "center"
      "south"
      "east"
      "north"
      "west";
    grid-template-columns: minmax(0, 1fr);
    padding: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .room-modal[open] {
    animation: none;
  }
}

/* ------------------------------------------------------------------ Gelişler: Genel büyüme KPI kartları ve sekme ikonları */

.gl-tab { display: inline-flex; align-items: center; gap: 8px; }
.gl-tab-icon, .card-icon { width: 18px; height: 18px; flex: none; }
.card-icon { margin-right: 8px; vertical-align: -3px; color: var(--accent-text); }
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.kpi { display: grid; align-content: start; gap: 6px; padding: 14px 16px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; min-width: 0; }
.kpi-head { display: flex; align-items: center; gap: 8px; color: var(--text-2); font-weight: 600; font-size: 0.9rem; }
.kpi-icon { width: 20px; height: 20px; flex: none; color: var(--accent-text); }
.kpi-value { font-size: 1.9rem; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; color: var(--text); }
.kpi.is-nodata .kpi-value { font-size: 1.2rem; color: var(--text-3); font-weight: 600; }
.kpi-compare { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-size: 0.85rem; }
.kpi-delta { display: inline-flex; align-items: center; gap: 3px; padding: 1px 8px 1px 5px; border-radius: 999px; font-weight: 700; background: var(--surface-3); color: var(--text-2); }
.kpi-delta.is-up { background: var(--success-soft); color: var(--success-text); }
.kpi-delta.is-down { background: var(--danger-soft); color: var(--danger-text); }
.kpi-delta-icon { width: 14px; height: 14px; }
.kpi-prev { color: var(--text-3); font-variant-numeric: tabular-nums; }
.kpi-spark { width: 100%; height: 32px; display: block; }
.kpi-spark-line { stroke: var(--accent); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.kpi-period { margin: 0; font-size: 0.78rem; color: var(--text-3); }
.kpi-hint { margin: 0; font-size: 0.78rem; color: var(--text-3); line-height: 1.35; }

/* Filtre > Lobi sohbeti (ai-docs/94) */
.lc-list {
  max-height: 360px;
  margin-top: 10px;
}

.lc-msg {
  align-items: baseline;
}

.lc-shown {
  flex-basis: 100%;
  color: var(--text-3);
  font-size: 12.5px;
}

.lc-remove {
  margin-left: auto;
}

/* ---- Gelişler > Büyüme / Aktiflik / Yüklemeler (ai-docs/97) ---- */
.gl-ext { display: grid; gap: 16px; min-width: 0; }
.gl-ext-body { display: grid; gap: 16px; min-width: 0; }
.gl-range { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.gl-custom { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.gl-custom[hidden] { display: none; }
.gl-custom .input { width: auto; min-width: 9.5rem; }
.gl-range .field-error { flex-basis: 100%; margin: 0; }
.gl-heat-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin: 0 0 12px; }
.gl-info {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 18px; height: 18px; padding: 0; border-radius: 50%; border: 1px solid var(--border);
  background: var(--surface-3); color: var(--text-2); font: 700 11px/1 inherit; cursor: help;
}
.gl-info:hover, .gl-info:focus-visible { color: var(--accent-text); border-color: var(--accent); }
.gl-info:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.gx-line { fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.gx-dot { stroke: none; }
.gx-line.c-new { stroke: #e8590c; } .gx-dot.c-new { fill: #e8590c; }
.gx-line.c-old { stroke: var(--accent); } .gx-dot.c-old { fill: var(--accent); }
.gx-line.c-and { stroke: #2f9e44; } .gx-dot.c-and { fill: #2f9e44; }
.gx-line.c-ios { stroke: #4263eb; } .gx-dot.c-ios { fill: #4263eb; }
.gx-line.c-web { stroke: #868e96; } .gx-dot.c-web { fill: #868e96; }
.gx-line.c-play { stroke: #0ca678; } .gx-dot.c-play { fill: #0ca678; }
.gx-line.c-reg { stroke: #7048e8; } .gx-dot.c-reg { fill: #7048e8; }
.gx-line.c-peak { stroke: #d4a017; stroke-dasharray: 5 3; } .gx-dot.c-peak { fill: #d4a017; }
.gx-key.c-peak { background: #d4a017; }
/* Isı haritası: 0 boş, 1..5 koyuluk (renk + hücre içindeki sayı ekran okuyucuya, özet cümle de var). */
.hm { border-collapse: separate; border-spacing: 2px; width: 100%; min-width: 560px; table-layout: fixed; }
.hm th { font-weight: 600; font-size: 11px; color: var(--text-3); text-align: center; padding: 0; }
.hm .hm-d { text-align: right; padding-right: 6px; width: 34px; font-size: 12px; color: var(--text-2); }
.hm .hm-corner { width: 34px; }
.hm-c { height: 22px; border-radius: 3px; background: var(--surface-3); }
.hm-c.l1 { background: color-mix(in srgb, var(--accent) 22%, var(--surface-3)); }
.hm-c.l2 { background: color-mix(in srgb, var(--accent) 42%, var(--surface-3)); }
.hm-c.l3 { background: color-mix(in srgb, var(--accent) 62%, var(--surface-3)); }
.hm-c.l4 { background: color-mix(in srgb, var(--accent) 82%, var(--surface-3)); }
.hm-c.l5 { background: var(--accent); }
.hm-c:hover { outline: 2px solid var(--text-2); outline-offset: -1px; }
.hm-scale { display: flex; align-items: center; gap: 4px; margin: 10px 0 0; font-size: 11px; color: var(--text-3); }
.hm-scale .hm-c { width: 22px; height: 12px; }
.hm-summary { margin: 8px 0 0; font-size: 13px; color: var(--text-2); }
.hm-hours { display: grid; grid-template-columns: repeat(24, minmax(0, 1fr)); gap: 3px; align-items: end; height: 96px; }
.hm-hour { display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; gap: 2px; }
.hm-bar { width: 100%; height: 64px; border-radius: 3px; background: var(--accent); }
.hm-bar.l1 { height: 10px; opacity: .45; } .hm-bar.l2 { height: 22px; opacity: .6; } .hm-bar.l3 { height: 34px; opacity: .75; }
.hm-bar.l4 { height: 48px; opacity: .9; } .hm-bar.l5 { height: 64px; }
.hm-hl { font-size: 10px; color: var(--text-3); height: 12px; }
/* Mağaza bağlantısı yok kartı */
.gl-setup { display: grid; gap: 6px; }
.gl-setup-title { display: flex; align-items: center; gap: 8px; margin: 0; }
.gl-setup-icon { width: 18px; height: 18px; color: var(--warn-text, var(--text-2)); flex: none; }
.gl-setup-sub { margin: 6px 0 0; font-size: 13px; color: var(--text-2); font-weight: 600; }
.gl-setup-steps, .gl-setup-env { margin: 0; padding-left: 20px; font-size: 13px; color: var(--text-2); display: grid; gap: 4px; }
.gl-setup-steps { list-style: decimal; }
.gl-setup-env { list-style: square; }
.gl-setup code { font-size: 12px; background: var(--surface-3); padding: 1px 6px; border-radius: 4px; }
@media (max-width: 600px) { .hm-c { height: 18px; } }
