:root {
  --red: #D21A21;
  --red-on-dark: #FF5A66;
  --night: #101114;
  --night-raised: #1E2025;
  --white: #FFFFFF;
  --chalk: #F5F6F4;
  --surface-subtle: #F8F9FA;
  --text: #17191C;
  --text-secondary: #5A5D63;
  --text-label: #6B6E74;
  --text-muted: #8A8D93;
  --text-on-dark-sec: #C9CBCF;
  --border: #E9EAEC;
  --border-dark: #3A3D44;
  --positive: #3C7A00;
  --error: #C5221F;
  --amber: #B45309;
  --amber-bg: #FEF3C7;
  --sidebar-w: 272px;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, sans-serif;
  background: var(--chalk);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

.hidden { display: none !important; }

/* ==========================================
   STAFF LOGIN OVERLAY
   ========================================== */
.login-overlay {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: radial-gradient(circle at top left, #241215 0%, var(--night) 52%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  overflow-y: auto;
}

.login-shell {
  width: 100%;
  max-width: 1100px;
  background: var(--night-raised);
  border: 1px solid var(--border-dark);
  border-radius: 32px;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  overflow: hidden;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.55);
}

@media (max-width: 920px) {
  .login-shell { grid-template-columns: 1fr; }
}

.login-brand-pane {
  padding: 40px;
  background: linear-gradient(155deg, #1A1C21 0%, var(--night) 100%);
  color: var(--white);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 28px;
  position: relative;
  border-right: 1px solid var(--border-dark);
}

.login-brand-pane::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: var(--red);
}

.login-logo-box {
  width: 72px;
  height: 72px;
  border-radius: 20px;
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  margin-bottom: 20px;
}

.login-logo-img {
  max-width: 100%;
  max-height: 100%;
  display: block;
}

.login-kicker {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--red-on-dark);
  margin-bottom: 10px;
}

.login-headline {
  margin: 0;
  font-family: Archivo, sans-serif;
  font-weight: 900;
  font-size: 38px;
  line-height: 1.04;
  letter-spacing: -0.02em;
}

.login-sub {
  margin: 14px 0 0;
  font-size: 15px;
  line-height: 1.5;
  color: var(--text-on-dark-sec);
}

.login-feature-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.login-feature-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.login-feature-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--red);
  margin-top: 5px;
  flex: none;
}

.login-feature-item b {
  display: block;
  font-size: 13px;
  color: var(--white);
}

.login-feature-item span {
  display: block;
  font-size: 12px;
  color: var(--text-on-dark-sec);
  margin-top: 2px;
}

.login-form-pane {
  padding: 40px;
  background: var(--white);
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.login-form-head h2 {
  margin: 6px 0 6px;
  font-family: Archivo, sans-serif;
  font-weight: 800;
  font-size: 24px;
  letter-spacing: -0.02em;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.login-error {
  padding: 11px 14px;
  border-radius: 12px;
  background: #FEF2F2;
  border: 1px solid #FECACA;
  color: var(--error);
  font-size: 13px;
  font-weight: 600;
}

.login-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--text-label);
  margin-top: 4px;
}

.login-divider::before,
.login-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.demo-staff-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.demo-staff-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1.5px solid var(--border);
  background: var(--chalk);
  cursor: pointer;
  text-align: left;
  transition: border-color 150ms, background 150ms;
}

.demo-staff-btn:hover {
  border-color: var(--red);
  background: var(--white);
}

.demo-staff-btn.primary {
  grid-column: 1 / -1;
  background: var(--night);
  border-color: var(--night);
  color: var(--white);
}

.demo-staff-btn.primary:hover {
  border-color: var(--red);
}

.demo-avatar {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--red);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: Archivo, sans-serif;
  font-weight: 800;
  font-size: 12px;
  flex: none;
}

.demo-staff-meta b {
  display: block;
  font-size: 13px;
  line-height: 1.2;
}

.demo-staff-meta span {
  display: block;
  font-size: 11px;
  opacity: 0.75;
  margin-top: 2px;
}

/* ==========================================
   APP SHELL & BESPOKE VERTICAL SIDEBAR
   ========================================== */
.app-shell {
  display: flex;
  min-height: 100vh;
  background: var(--chalk);
}

.sidebar {
  width: var(--sidebar-w);
  flex: none;
  background: var(--night);
  color: var(--white);
  border-right: 1px solid #22252C;
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  z-index: 60;
}

.sidebar-top {
  padding: 18px 16px 14px;
  border-bottom: 1px solid #22252C;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-logo-wrap {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 4px;
  flex: none;
}

.brand-logo {
  height: 30px;
  width: auto;
  display: block;
}

.brand-kicker {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--red-on-dark);
}

.brand-title {
  margin: 2px 0 0;
  font-family: Archivo, sans-serif;
  font-weight: 800;
  font-size: 15px;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--white);
}

.sidebar-status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.sse-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 10px;
  height: 28px;
  border-radius: 999px;
  background: var(--night-raised);
  font-size: 11px;
  font-weight: 600;
  border: 1px solid var(--border-dark);
  color: var(--white);
}

.sse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #4ADE80;
  box-shadow: 0 0 0 3px rgba(74, 222, 128, 0.16);
}

.sse-pill.disconnected .sse-dot {
  background: var(--red-on-dark);
  box-shadow: 0 0 0 3px rgba(255, 90, 102, 0.2);
}

.api-health-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 28px;
  padding: 0 9px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-on-dark-sec);
  text-decoration: none;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: border-color 140ms, color 140ms;
}

.api-health-link:hover {
  border-color: var(--red);
  color: var(--white);
}

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 14px 10px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  scrollbar-width: thin;
  scrollbar-color: #2D3038 transparent;
}

.nav-group {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.nav-group-label {
  padding: 0 12px 6px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: #777B84;
  text-transform: uppercase;
}

.v-nav-item {
  position: relative;
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--text-on-dark-sec);
  border-radius: 12px;
  padding: 10px 12px 10px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  font: 600 13px Inter, sans-serif;
  text-align: left;
  cursor: pointer;
  transition: background 140ms, color 140ms;
}

.v-nav-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 7px;
  bottom: 7px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--red);
  opacity: 0;
  transform: scaleY(0.4);
  transition: opacity 150ms, transform 150ms;
}

.v-nav-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--white);
}

.v-nav-item.active {
  background: var(--night-raised);
  color: var(--white);
  font-weight: 700;
}

.v-nav-item.active::before {
  opacity: 1;
  transform: scaleY(1);
}

.v-nav-icon {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #8E939D;
  flex: none;
  transition: color 140ms;
}

.v-nav-item:hover .v-nav-icon {
  color: var(--white);
}

.v-nav-item.active .v-nav-icon {
  color: var(--red-on-dark);
}

.v-nav-label {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.v-nav-badge {
  font-variant-numeric: tabular-nums;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-on-dark-sec);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.25;
}

.v-nav-item.active .v-nav-badge {
  background: var(--red);
  color: var(--white);
}

.v-nav-item.locked {
  opacity: 0.48;
}

.v-nav-lock {
  display: inline-flex;
  color: #8E939D;
  flex: none;
}

.sidebar-footer {
  padding: 12px;
  border-top: 1px solid #22252C;
  background: #0D0E11;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.staff-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 14px;
  background: var(--night-raised);
  border: 1px solid var(--border-dark);
}

.staff-avatar-sm {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--red);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: Archivo, sans-serif;
  font-weight: 800;
  font-size: 12px;
  flex: none;
}

.staff-badge-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  flex: 1;
}

.staff-badge-name {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--white);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.staff-badge-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.staff-role-pill {
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(210, 26, 33, 0.22);
  color: var(--red-on-dark);
  font-size: 10px;
  font-weight: 700;
}

.staff-club-pill {
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-on-dark-sec);
  font-size: 10px;
  font-weight: 600;
}

.sidebar-footer-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.sidebar-footer-actions .btn-night-sm,
.sidebar-footer-actions .btn-red-sm {
  width: 100%;
  gap: 6px;
  font-size: 11.5px;
  padding: 0 8px;
}

.sidebar-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(16, 17, 20, 0.6);
  z-index: 55;
}

/* ==========================================
   MAIN COLUMN & WORKSPACE COMMAND HEADER
   ========================================== */
.main-shell {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.workspace-header {
  position: sticky;
  top: 0;
  z-index: 40;
  /* Opak arka plan: backdrop-filter, position:fixed açılır menüler için yeni bir
     containing block oluşturup dropdown'ı sağa kaydırıyor ve yatay scrollbar açıyordu. */
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.workspace-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-icon-hdr {
  display: none;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1.5px solid var(--border);
  background: var(--white);
  color: var(--text);
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.hdr-breadcrumb {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-label);
}

.hdr-title {
  margin: 2px 0 0;
  font-family: Archivo, sans-serif;
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -0.02em;
  color: var(--text);
}

.workspace-header-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.live-date-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.live-date-pill svg {
  color: var(--red);
}

.hdr-club-wrap {
  min-width: 190px;
}

.btn-hdr-sim {
  height: 36px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1.5px solid var(--night);
  background: var(--night);
  color: var(--white);
  font: 700 12px Inter, sans-serif;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  transition: background 140ms, border-color 140ms;
}

.btn-hdr-sim:hover {
  background: var(--red);
  border-color: var(--red);
}

@media (max-width: 1024px) {
  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    transform: translateX(-100%);
    transition: transform 200ms ease-out;
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .btn-icon-hdr {
    display: inline-flex;
  }
}

/* ==========================================
   WORKSPACE LAYOUT (SPLIT / FULL-WIDTH)
   ========================================== */
.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 412px;
  gap: 22px;
  padding: 20px 24px 40px;
  width: 100%;
  max-width: 1680px;
  margin: 0 auto;
  align-items: start;
}

.workspace.sim-hidden {
  grid-template-columns: minmax(0, 1fr);
}
.workspace.sim-hidden .simulator-column {
  display: none;
}

@media (max-width: 1280px) {
  .workspace { grid-template-columns: minmax(0, 1fr); }
}

.panel-view, .page-view { display: none; flex-direction: column; gap: 18px; min-width: 0; }
.panel-view.active, .page-view.active { display: flex; }

/* 6 KPI Cards */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.workspace.sim-hidden .kpi-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}
@media (max-width: 1460px) {
  .workspace.sim-hidden .kpi-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 820px) {
  .kpi-grid, .workspace.sim-hidden .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.kpi-card {
  background: var(--white); border-radius: 20px; padding: 16px;
  border: 1px solid var(--border); display: flex; flex-direction: column; gap: 6px;
}
.kpi-card.hero { background: var(--night); color: var(--white); border-color: var(--night); }
.kpi-label { font-size: 11.5px; font-weight: 700; letter-spacing: 0.03em; color: var(--text-label); }
.kpi-card.hero .kpi-label { color: var(--text-on-dark-sec); }
.kpi-value { font-family: Archivo, sans-serif; font-weight: 800; font-size: 26px; line-height: 1.05; font-variant-numeric: tabular-nums; }
.kpi-sub { font-size: 12px; font-weight: 600; color: var(--positive); }
.kpi-card.hero .kpi-sub { color: var(--red-on-dark); }

/* Grids & Cards */
.two-col { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.cards-grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.cards-grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 960px) {
  .two-col, .cards-grid-2, .cards-grid-3 { grid-template-columns: 1fr; }
}

.card {
  background: var(--white); border-radius: 22px; padding: 20px;
  border: 1px solid var(--border); display: flex; flex-direction: column; gap: 14px;
}
.card-night { background: var(--night); color: var(--white); border-color: var(--night); }
.card-sub {
  background: var(--chalk); border-radius: 18px; padding: 16px;
  border: 1px solid var(--border); display: flex; flex-direction: column; gap: 10px;
}

.card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.card-head h2 { margin: 4px 0 0; font-family: Archivo, sans-serif; font-weight: 800; font-size: 18px; letter-spacing: -0.01em; display: flex; align-items: center; gap: 8px; }
.kicker { font-size: 10.5px; font-weight: 700; letter-spacing: 0.12em; color: var(--text-label); text-transform: uppercase; }
.kicker-red { font-size: 10.5px; font-weight: 700; letter-spacing: 0.12em; color: var(--red-on-dark); text-transform: uppercase; }
.muted { margin: 0; font-size: 13px; color: var(--text-secondary); line-height: 1.5; }
.muted-on-dark { margin: 0; font-size: 13px; color: var(--text-on-dark-sec); line-height: 1.5; }

.badge-live {
  padding: 5px 10px; border-radius: 8px; background: var(--red); color: var(--white);
  font-size: 11px; font-weight: 700; white-space: nowrap;
}
.badge-night {
  padding: 5px 10px; border-radius: 8px; background: var(--night); color: var(--white);
  font-size: 11px; font-weight: 700; white-space: nowrap;
}
.count-pill {
  padding: 3px 9px; border-radius: 999px; background: var(--chalk);
  border: 1px solid var(--border); font-size: 12px; font-weight: 700; color: var(--text);
  font-variant-numeric: tabular-nums;
}

/* ==========================================
   CHARACTERIZED CUSTOM FORM CONTROLS
   ========================================== */
.input, .input-sm, .input-dark, .textarea {
  height: 42px;
  border-radius: 12px;
  border: 1.5px solid var(--border);
  padding: 0 12px;
  font: 500 13px Inter, sans-serif;
  color: var(--text);
  background: var(--surface-subtle);
  width: 100%;
  transition: border-color 140ms, background 140ms, box-shadow 140ms;
}
.textarea { height: auto; padding: 10px 12px; resize: vertical; }
.input-sm { width: auto; height: 36px; padding: 0 10px; font-size: 12.5px; }
.input-sm-w { width: 220px; height: 36px; }
.input-dark {
  background: var(--night-raised);
  border-color: var(--border-dark);
  color: var(--white);
}
.input:hover, .textarea:hover { border-color: #D2D5DB; }
.input:focus, .input-sm:focus, .textarea:focus {
  outline: none;
  background: var(--white);
  border-color: var(--night);
  box-shadow: 0 0 0 3px rgba(210, 26, 33, 0.11);
}
.input-dark:focus {
  outline: none;
  border-color: var(--red-on-dark);
  box-shadow: 0 0 0 3px rgba(255, 90, 102, 0.16);
}

.field-row { display: grid; grid-template-columns: 1fr 1.4fr; gap: 10px; }
.field-label, .field-label-dark {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.field-label { color: var(--text-label); }
.field-label-dark { color: var(--text-on-dark-sec); }
.field-label-title {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-label);
  display: block;
  margin-bottom: 6px;
}
.field-label-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }

.compact-form { display: flex; flex-direction: column; gap: 12px; }
.form-grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.form-grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.form-grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.form-grid-5 { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.form-submit-end { display: flex; align-items: flex-end; }
@media (max-width: 820px) {
  .form-grid-2, .form-grid-3, .form-grid-4, .form-grid-5 { grid-template-columns: 1fr; }
}

/* Custom Dropdown (.tg-select) */
.tg-select {
  position: relative;
  width: 100%;
  display: block;
}
.tg-select.tg-select-sm {
  width: auto;
  min-width: 124px;
}
.tg-select-native {
  position: absolute !important;
  opacity: 0 !important;
  pointer-events: none !important;
  width: 1px !important;
  height: 1px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
}
.tg-select-trigger {
  width: 100%;
  height: 42px;
  border-radius: 12px;
  border: 1.5px solid var(--border);
  background: var(--surface-subtle);
  padding: 0 11px 0 12px;
  font: 600 13px Inter, sans-serif;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  cursor: pointer;
  text-align: left;
  transition: border-color 140ms, background 140ms, box-shadow 140ms;
}
.tg-select-sm .tg-select-trigger {
  height: 36px;
  padding: 0 9px 0 10px;
  font-size: 12px;
  border-radius: 10px;
}
.tg-select.is-compact .tg-select-trigger {
  height: 30px;
  font-size: 11.5px;
  border-radius: 9px;
}
.tg-select.is-dark .tg-select-trigger {
  background: var(--night-raised);
  border-color: var(--border-dark);
  color: var(--white);
}
.tg-select-trigger:hover {
  border-color: #C8CCD4;
  background: var(--white);
}
.tg-select.is-dark .tg-select-trigger:hover {
  background: #252830;
  border-color: #545863;
}
.tg-select.open .tg-select-trigger {
  background: var(--white);
  border-color: var(--night);
  box-shadow: 0 0 0 3px rgba(210, 26, 33, 0.12);
}
.tg-select.is-dark.open .tg-select-trigger {
  background: var(--night-raised);
  border-color: var(--red-on-dark);
  box-shadow: 0 0 0 3px rgba(255, 90, 102, 0.18);
}
.tg-select-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
}
.tg-chevron {
  width: 15px;
  height: 15px;
  color: var(--text-label);
  flex: none;
  transition: transform 160ms ease-out;
}
.tg-select.is-dark .tg-chevron { color: var(--text-on-dark-sec); }
.tg-select.open .tg-chevron { transform: rotate(180deg); color: var(--red); }

.tg-select-menu {
  position: fixed;
  z-index: 140;
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: 14px;
  padding: 5px;
  box-shadow: 0 16px 38px rgba(16, 17, 20, 0.18);
  max-height: 256px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.tg-select-menu.is-dark {
  background: var(--night-raised);
  border-color: var(--border-dark);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.45);
}
.tg-option {
  position: relative;
  width: 100%;
  border: 0;
  background: transparent;
  border-radius: 9px;
  padding: 8px 10px 8px 12px;
  font: 500 12.5px Inter, sans-serif;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  cursor: pointer;
  text-align: left;
  transition: background 120ms;
}
.tg-select-menu.is-dark .tg-option { color: var(--white); }
.tg-option:hover { background: var(--chalk); }
.tg-select-menu.is-dark .tg-option:hover { background: rgba(255, 255, 255, 0.08); }
.tg-option.is-selected {
  background: #FFF2F2;
  color: var(--night);
  font-weight: 700;
}
.tg-select-menu.is-dark .tg-option.is-selected {
  background: rgba(210, 26, 33, 0.24);
  color: var(--white);
}
.tg-option.is-selected::before {
  content: '';
  position: absolute;
  left: 3px;
  top: 6px;
  bottom: 6px;
  width: 3px;
  border-radius: 3px;
  background: var(--red);
}
.tg-opt-check {
  color: var(--red);
  flex: none;
  display: inline-flex;
}

/* Custom Interactive Calendar Date Picker (.tg-datepicker) */
.tg-datepicker {
  position: relative;
  width: 100%;
}
.tg-date-trigger {
  width: 100%;
  height: 42px;
  border-radius: 12px;
  border: 1.5px solid var(--border);
  background: var(--surface-subtle);
  padding: 0 12px;
  font: 600 12.5px Inter, sans-serif;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  cursor: pointer;
  transition: border-color 140ms, background 140ms, box-shadow 140ms;
}
.tg-date-trigger:hover { border-color: #C8CCD4; background: var(--white); }
.tg-datepicker.open .tg-date-trigger {
  background: var(--white);
  border-color: var(--night);
  box-shadow: 0 0 0 3px rgba(210, 26, 33, 0.12);
}
.tg-date-trigger-left {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.tg-date-trigger-left svg { color: var(--red); flex: none; }
.tg-date-today-tag {
  padding: 2px 7px;
  border-radius: 999px;
  background: #FEE2E2;
  color: var(--red);
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.06em;
  flex: none;
}

.tg-datepicker-popover {
  position: fixed;
  z-index: 150;
  width: 292px;
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: 18px;
  padding: 14px;
  box-shadow: 0 20px 48px rgba(16, 17, 20, 0.2);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.tg-dp-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}
.tg-dp-month {
  font-family: Archivo, sans-serif;
  font-weight: 800;
  font-size: 14px;
  color: var(--text);
}
.tg-dp-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}
.tg-dp-nav-btn {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface-subtle);
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.tg-dp-nav-btn:hover { border-color: var(--night); background: var(--white); }
.tg-dp-today-btn {
  height: 28px;
  padding: 0 9px;
  border-radius: 8px;
  border: 0;
  background: #FEE2E2;
  color: var(--red);
  font: 700 11px Inter, sans-serif;
  cursor: pointer;
}
.tg-dp-today-btn:hover { background: var(--red); color: var(--white); }

.tg-dp-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  text-align: center;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--text-label);
  text-transform: uppercase;
}
.tg-dp-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 3px;
}
.tg-dp-day {
  position: relative;
  height: 34px;
  border-radius: 10px;
  border: 1.5px solid transparent;
  background: transparent;
  font: 600 12px Inter, sans-serif;
  font-variant-numeric: tabular-nums;
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 120ms, border-color 120ms;
}
.tg-dp-day:hover { background: var(--chalk); }
.tg-dp-day.is-outside { color: var(--text-muted); opacity: 0.55; }
.tg-dp-day.is-today {
  border-color: var(--red);
  color: var(--red);
  font-weight: 800;
}
.tg-dp-day.is-today::after {
  content: '';
  position: absolute;
  bottom: 3px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--red);
}
.tg-dp-day.is-selected {
  background: var(--night);
  border-color: var(--night);
  color: var(--white);
  font-weight: 800;
}
.tg-dp-day.is-selected.is-today::after {
  background: var(--red-on-dark);
}

/* Unit Adornments & Number Steppers */
.tg-unit-field {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  flex: 1;
}
.tg-unit-field .input {
  padding-right: 48px;
  font-variant-numeric: tabular-nums;
}
.tg-unit {
  position: absolute;
  right: 8px;
  padding: 2px 6px;
  border-radius: 6px;
  background: var(--chalk);
  border: 1px solid var(--border);
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--text-label);
  pointer-events: none;
}

.tg-stepper {
  display: flex;
  align-items: stretch;
  gap: 4px;
  width: 100%;
}
.tg-stepper input[type="number"] {
  -moz-appearance: textfield;
  text-align: center;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}
.tg-stepper .tg-unit-field input[type="number"] {
  text-align: left;
}
.tg-stepper input[type="number"]::-webkit-outer-spin-button,
.tg-stepper input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.tg-step-btn {
  width: 34px;
  height: 42px;
  flex: none;
  border-radius: 10px;
  border: 1.5px solid var(--border);
  background: var(--surface-subtle);
  color: var(--text);
  font: 700 15px Inter, sans-serif;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: border-color 140ms, background 140ms, color 140ms;
}
.tg-step-btn:hover {
  border-color: var(--night);
  background: var(--night);
  color: var(--white);
}

/* Custom Animated SVG Checkboxes (.perm-chip) */
.perm-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.perm-chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 11px;
  background: var(--surface-subtle);
  border: 1.5px solid var(--border);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
  transition: border-color 140ms, background 140ms;
}
.perm-chip:hover { border-color: #C8CCD4; }
.perm-chip input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  margin: 0;
}
.tg-checkbox-box {
  width: 17px;
  height: 17px;
  border-radius: 5px;
  border: 1.5px solid #B6BAC3;
  background: var(--white);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  flex: none;
  transition: background 140ms, border-color 140ms, transform 140ms;
}
.tg-checkbox-box svg {
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 120ms, transform 140ms;
}
.perm-chip input:checked + .tg-checkbox-box {
  background: var(--red);
  border-color: var(--red);
}
.perm-chip input:checked + .tg-checkbox-box svg {
  opacity: 1;
  transform: scale(1);
}
.perm-chip:has(input:checked) {
  background: #FFF6F6;
  border-color: rgba(210, 26, 33, 0.36);
  color: var(--night);
}

/* Tactile Pill Toggle Switches (.tg-switch) */
.tg-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
  padding: 6px 0;
}
.tg-switch input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}
.tg-switch-track {
  width: 42px;
  height: 24px;
  border-radius: 999px;
  background: #D5D7DC;
  padding: 3px;
  display: inline-flex;
  align-items: center;
  transition: background 180ms ease;
  flex: none;
}
.tg-switch-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--white);
  box-shadow: 0 2px 5px rgba(16, 17, 20, 0.22);
  transition: transform 180ms ease;
}
.tg-switch input:checked + .tg-switch-track {
  background: var(--red);
}
.tg-switch input:checked + .tg-switch-track .tg-switch-thumb {
  transform: translateX(18px);
}
.tg-switch-label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text);
}

/* Buttons */
.btn-red, .btn-night, .btn-dark-border, .btn-outline-sm, .btn-night-sm, .btn-red-sm {
  border: 0; border-radius: 12px; cursor: pointer; font: 700 13px Inter, sans-serif;
  display: inline-flex; align-items: center; justify-content: center; text-decoration: none; padding: 0 15px; height: 42px;
  transition: opacity 140ms, background 140ms, border-color 140ms;
}
.btn-red:hover, .btn-night:hover, .btn-red-sm:hover { opacity: 0.92; }
.btn-red { background: var(--red); color: var(--white); }
.btn-night { background: var(--night); color: var(--white); }
.btn-dark-border { background: transparent; color: var(--white); border: 1.5px solid var(--border-dark); }
.btn-outline-sm { height: 34px; border: 1.5px solid var(--border-dark); background: transparent; color: inherit; border-radius: 10px; font-size: 12px; padding: 0 11px; }
.card .btn-outline-sm, .modal-box .btn-outline-sm { border-color: var(--border); color: var(--text); }
.btn-night-sm { height: 34px; background: var(--night-raised); color: var(--white); border: 1px solid var(--border-dark); border-radius: 10px; font-size: 12px; padding: 0 12px; }
.btn-red-sm { height: 34px; background: var(--red); color: var(--white); border-radius: 10px; font-size: 12px; padding: 0 12px; }

.btn-xs-red, .btn-xs-night, .btn-xs-outline, .btn-xs-danger {
  border: 0; border-radius: 8px; cursor: pointer; font: 700 11px Inter, sans-serif;
  height: 28px; padding: 0 9px; display: inline-flex; align-items: center; justify-content: center; gap: 4px; white-space: nowrap;
}
.btn-xs-red { background: var(--red); color: var(--white); }
.btn-xs-night { background: var(--night); color: var(--white); }
.btn-xs-outline { background: var(--white); color: var(--text); border: 1px solid var(--border); }
.btn-xs-outline:hover { border-color: var(--night); }
.btn-xs-danger { background: #FEF2F2; color: var(--error); border: 1px solid #FECACA; }
.btn-xs-danger:disabled, .btn-xs-night:disabled { opacity: 0.45; cursor: not-allowed; }

.btn-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.full-width { width: 100%; }

/* Tables & Status Badges */
.filter-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

.table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 16px;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  text-align: left;
}

.admin-table th {
  background: var(--chalk);
  padding: 10px 12px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-label);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.admin-table td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.admin-table tr:last-child td { border-bottom: 0; }
.admin-table tbody tr:hover { background: #FAFAFA; }
.admin-table tr.row-active-mobile { background: #FFF5F5; }

.user-cell { display: flex; align-items: center; gap: 10px; }
.avatar-circle {
  width: 34px; height: 34px; border-radius: 10px; background: var(--night); color: var(--white);
  display: flex; align-items: center; justify-content: center; font-family: Archivo, sans-serif;
  font-weight: 800; font-size: 12px; flex: none;
}
.avatar-circle.red { background: var(--red); }

.pill {
  display: inline-flex; align-items: center; padding: 3px 8px; border-radius: 999px;
  font-size: 10.5px; font-weight: 700; white-space: nowrap;
}
.pill-green { background: #ECFCCB; color: var(--positive); }
.pill-red { background: #FEE2E2; color: var(--error); }
.pill-amber { background: var(--amber-bg); color: var(--amber); }
.pill-night { background: var(--night); color: var(--white); }
.pill-chalk { background: var(--chalk); color: var(--text-secondary); border: 1px solid var(--border); }
.pill-gold { background: #FEF3C7; color: #92400E; }
.pill-platinum { background: var(--night); color: var(--red-on-dark); }

/* Role Summary Grid */
.role-summary-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}
@media (max-width: 980px) { .role-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.role-stat-card {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: 18px;
  padding: 14px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: border-color 140ms;
}
.role-stat-card.active { border-color: var(--red); background: #FFF7F7; }
.role-stat-card b { font-family: Archivo, sans-serif; font-size: 24px; font-weight: 800; font-variant-numeric: tabular-nums; }
.role-stat-card span { font-size: 12px; font-weight: 600; color: var(--text-label); }

/* Member Chips in Groups */
.member-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.member-tag {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 8px;
  border-radius: 999px; background: var(--white); border: 1px solid var(--border);
  font-size: 11.5px; font-weight: 600;
}
.member-tag button {
  border: 0; background: transparent; color: var(--error); font-weight: 800; cursor: pointer; padding: 0 2px; line-height: 1;
}

/* Lists & Logs */
.sub-list-title { font-size: 10.5px; font-weight: 700; letter-spacing: 0.08em; color: var(--text-label); text-transform: uppercase; margin-top: 2px; }
.card-night .sub-list-title { color: var(--text-on-dark-sec); }

.log-list, .compact-list { display: flex; flex-direction: column; gap: 8px; max-height: 240px; overflow-y: auto; }
.compact-list-tall { max-height: 360px; }
.compact-list-sm { max-height: 170px; }
.log-item, .compact-item {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 14px; background: var(--chalk); font-size: 13px;
}
.card-night .log-item { background: var(--night-raised); color: var(--white); }

.slider-group { display: flex; flex-direction: column; gap: 6px; }
.slider-head { display: flex; justify-content: space-between; font-size: 13px; font-weight: 600; }
.range-red { width: 100%; accent-color: var(--red); }
.zones-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.zone-box { background: var(--chalk); border-radius: 14px; padding: 10px 12px; }

.bike-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.bike-cell {
  height: 34px; border-radius: 10px; display: flex; align-items: center; justify-content: center;
  font: 700 12px Inter, sans-serif; border: 1.5px solid var(--border); background: var(--white);
}
.bike-cell.taken { background: var(--night); color: var(--white); border-color: var(--night); }

.config-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.config-grid label { display: flex; flex-direction: column; gap: 4px; font-size: 10.5px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-label); }
.config-submit { display: flex; align-items: flex-end; }

.chat-box {
  background: var(--chalk); border-radius: 18px; padding: 14px; height: 220px; overflow-y: auto;
  display: flex; flex-direction: column; gap: 8px;
}
.chat-box-tall { height: 300px; }
.chat-msg { max-width: 82%; padding: 10px 12px; border-radius: 16px; font-size: 13px; line-height: 1.4; }
.chat-msg.from-member { align-self: flex-start; background: var(--white); border: 1px solid var(--border); }
.chat-msg.from-staff { align-self: flex-end; background: var(--night); color: var(--white); }
.chat-send-row { display: flex; gap: 8px; }
.chat-send-row .input { flex: 1; }

/* Modals */
.modal-overlay {
  position: fixed; inset: 0; z-index: 100; background: rgba(16, 17, 20, 0.62);
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.modal-box {
  width: 100%; max-width: 440px; background: var(--white); border-radius: 24px;
  padding: 22px; display: flex; flex-direction: column; gap: 14px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
}
.modal-box h2 { margin: 0; font-family: Archivo, sans-serif; font-weight: 800; font-size: 20px; }

/* ==========================================
   SAĞ SİMÜLATÖR (390×844)
   ========================================== */
.simulator-column { position: sticky; top: 82px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.sim-header { width: 390px; display: flex; justify-content: space-between; align-items: center; }
.sim-route { font-size: 12px; font-weight: 700; color: var(--red); background: var(--white); padding: 4px 10px; border-radius: 999px; border: 1px solid var(--border); }

.phone-frame {
  width: 390px;
  height: 844px;
  background: var(--white);
  border-radius: 44px;
  border: 10px solid var(--night);
  box-shadow: 0 24px 60px rgba(16, 17, 20, 0.22);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.phone-notch {
  height: 44px; padding: 10px 24px 0; display: flex; justify-content: space-between; align-items: center;
  font-size: 12px; font-weight: 700; flex: none; z-index: 20; background: transparent;
}
.phone-frame.dark .phone-notch { background: var(--night); color: var(--white); }
.phone-frame.red .phone-notch { background: var(--red); color: var(--white); }
.dynamic-island { width: 96px; height: 24px; border-radius: 14px; background: #000000; }

.phone-screen {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 10px 20px 104px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.phone-screen.no-tab { padding-bottom: 24px; }
.phone-frame.dark .phone-screen { background: var(--night); color: var(--white); }
.phone-frame.red .phone-screen { background: var(--red); color: var(--white); }

.phone-tabbar-wrap {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 10px 14px 18px;
  background: linear-gradient(to top, rgba(255,255,255,1) 60%, rgba(255,255,255,0));
  z-index: 25;
}
.phone-tabbar {
  height: 64px; border-radius: 32px; background: var(--night);
  display: flex; align-items: center; justify-content: space-between; padding: 0 8px;
  box-shadow: 0 10px 30px rgba(16, 17, 20, 0.18);
}
.tab-btn {
  border: 0; height: 48px; padding: 0 13px; border-radius: 24px; background: transparent;
  color: #A3A6AC; display: flex; align-items: center; gap: 7px; cursor: pointer;
  font: 700 13px Inter, sans-serif;
}
.tab-btn.active { background: var(--red); color: var(--white); padding: 0 16px; }

/* Mobil Ekran Yardımcıları */
.m-h1 { margin: 0; font-family: Archivo, sans-serif; font-weight: 800; font-size: 28px; letter-spacing: -0.02em; }
.m-h2 { margin: 0; font-family: Archivo, sans-serif; font-weight: 800; font-size: 18px; letter-spacing: -0.01em; }
.m-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.m-card-night { border-radius: 26px; background: var(--night); color: var(--white); padding: 18px; display: flex; flex-direction: column; gap: 10px; }
.m-card-red { border-radius: 26px; background: var(--red); color: var(--white); padding: 18px; display: flex; flex-direction: column; gap: 10px; }
.m-card-chalk { border-radius: 22px; background: var(--chalk); padding: 14px; }
.m-card-border { border-radius: 22px; border: 1px solid var(--border); padding: 14px; background: var(--white); }
.m-grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.m-grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.m-chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; }
.m-chip {
  flex: none; height: 40px; padding: 0 14px; border-radius: 999px; border: 0;
  background: var(--chalk); color: var(--text); font: 600 13px Inter, sans-serif; cursor: pointer;
}
.m-chip.active { background: var(--night); color: var(--white); }
.m-chip.red { background: var(--red); color: var(--white); }
.m-btn-red, .m-btn-night, .m-btn-outline {
  height: 52px; border-radius: 18px; font: 700 15px Inter, sans-serif; cursor: pointer;
  display: flex; align-items: center; justify-content: center; border: 0; width: 100%;
}
.m-btn-red { background: var(--red); color: var(--white); }
.m-btn-night { background: var(--night); color: var(--white); }
.m-btn-outline { background: var(--white); color: var(--text); border: 1.5px solid var(--border); }
.m-icon-btn {
  width: 42px; height: 42px; border-radius: 21px; border: 0; background: var(--chalk);
  color: var(--text); font-weight: 800; cursor: pointer; display: flex; align-items: center; justify-content: center; flex: none;
}
.m-icon-btn.dark { background: var(--night-raised); color: var(--white); }
.m-seg { display: flex; padding: 4px; border-radius: 16px; background: var(--chalk); }
.m-seg button { flex: 1; height: 40px; border: 0; border-radius: 12px; background: transparent; font: 600 13px Inter, sans-serif; color: var(--text-label); cursor: pointer; }
.m-seg button.active { background: var(--white); color: var(--text); }

/* Mobile Mini Calendar & Today Markers */
.m-today-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--red);
  margin: 2px auto 0;
}
.m-day-btn {
  position: relative;
  height: 60px;
  border: 1.5px solid transparent;
  border-radius: 14px;
  background: var(--chalk);
  color: var(--text);
  font-weight: 700;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  padding: 4px 2px;
}
.m-day-btn.is-today { border-color: var(--red); }
.m-day-btn.is-selected { background: var(--night); color: var(--white); border-color: var(--night); }
.m-day-btn.is-selected .m-today-dot { background: var(--red-on-dark); }

.m-cal-card {
  background: var(--chalk);
  border-radius: 18px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.m-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}
.m-cal-cell {
  position: relative;
  height: 32px;
  border-radius: 9px;
  border: 1.5px solid transparent;
  background: transparent;
  font: 600 12px Inter, sans-serif;
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.m-cal-cell.is-outside { color: var(--text-muted); opacity: 0.45; }
.m-cal-cell.is-today { border-color: var(--red); color: var(--red); font-weight: 800; }
.m-cal-cell.is-today::after {
  content: '';
  position: absolute;
  bottom: 2px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--red);
}
.m-cal-cell.is-selected { background: var(--night); border-color: var(--night); color: var(--white); }

.qr-box {
  width: 248px; height: 248px; border-radius: 30px; background: var(--white); padding: 18px;
  margin: 0 auto; box-shadow: 0 0 0 5px var(--red); display: grid; grid-template-columns: repeat(15, 1fr); gap: 1px;
}
.qr-cell { border-radius: 1.5px; }
.qr-cell.on { background: var(--night); }

.sheet-overlay {
  position: absolute; inset: 0; background: rgba(16, 17, 20, 0.58); z-index: 35;
  display: flex; align-items: flex-end;
}
.sheet-box {
  width: 100%; background: var(--white); color: var(--text); border-radius: 32px 32px 0 0;
  padding: 20px 20px 28px; display: flex; flex-direction: column; gap: 14px;
}

.toast {
  position: fixed; bottom: 24px; right: 24px; background: var(--night); color: var(--white);
  padding: 12px 18px; border-radius: 14px; font-size: 13px; font-weight: 600;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25); z-index: 160; border-left: 4px solid var(--red);
}

/* ==========================================
   API v4 · YENİ PANEL BİLEŞENLERİ
   ========================================== */
.cell-sub { font-size: 11px; color: var(--text-label); line-height: 1.45; }
.link-btn { background: none; border: 0; padding: 0; margin: 0; color: inherit; font: inherit; cursor: pointer; text-align: left; }
.link-btn:hover { color: var(--red); text-decoration: underline; }
.form-error { font-size: 12px; font-weight: 600; color: var(--error); background: #FEF2F2; border: 1px solid #FECACA; border-radius: 10px; padding: 8px 10px; }
.form-hint-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; min-height: 4px; }
.align-end { align-items: end; }
.is-past { opacity: 0.55; }
.is-editing { outline: 2px solid var(--red); outline-offset: -2px; }
.tg-select.is-disabled .tg-select-trigger { opacity: 0.6; cursor: not-allowed; }
.config-submit .form-error { margin-bottom: 8px; }

/* KPI */
.kpi-link { cursor: pointer; transition: transform .12s ease, box-shadow .12s ease; }
.kpi-link:hover { transform: translateY(-1px); box-shadow: 0 8px 22px rgba(16, 17, 20, 0.08); }
.kpi-of { font-size: 15px; font-weight: 700; opacity: 0.6; }
.kpi-sub.is-warn { color: var(--amber); }
.kpi-card.hero .kpi-sub.is-warn { color: #FBBF24; }
.kpi-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
@media (max-width: 820px) { .kpi-grid-3 { grid-template-columns: 1fr !important; } }

/* Üye tablosu */
.inclub-dot { position: absolute; right: -2px; bottom: -2px; width: 11px; height: 11px; border-radius: 50%; background: #22C55E; border: 2px solid var(--white); }
.admin-table.compact th, .admin-table.compact td { padding: 8px 10px; font-size: 12px; }

/* Mini istatistik */
.mini-stat-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.mini-stat { background: var(--chalk); border: 1px solid var(--border); border-radius: 14px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; }
.mini-stat b { font-family: Archivo, sans-serif; font-size: 20px; font-weight: 800; }
.mini-stat span { font-size: 11px; font-weight: 600; color: var(--text-label); }
.mini-stat.is-warn b { color: var(--error); }
@media (max-width: 720px) { .mini-stat-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Seans takvimi */
.sess-day-strip { display: grid; grid-template-columns: repeat(16, minmax(64px, 1fr)); gap: 6px; overflow-x: auto; padding-bottom: 4px; }
.sess-day { border: 1.5px solid var(--border); background: var(--white); border-radius: 14px; padding: 8px 4px; display: flex; flex-direction: column; align-items: center; gap: 1px; cursor: pointer; color: var(--text); }
.sess-day b { font-family: Archivo, sans-serif; font-size: 18px; font-weight: 800; line-height: 1.1; }
.sess-day-dow, .sess-day-mon { font-size: 10px; font-weight: 700; color: var(--text-label); text-transform: uppercase; }
.sess-day-count { font-size: 9.5px; color: var(--text-muted); white-space: nowrap; }
.sess-day.is-today { border-color: var(--red); }
.sess-day.is-today .sess-day-dow { color: var(--red); }
.sess-day.is-selected { background: var(--night); border-color: var(--night); color: var(--white); }
.sess-day.is-selected .sess-day-dow, .sess-day.is-selected .sess-day-mon, .sess-day.is-selected .sess-day-count { color: var(--text-on-dark-sec); }
.sess-list { display: flex; flex-direction: column; gap: 14px; }
.sess-group { display: flex; flex-direction: column; gap: 8px; }
.sess-card { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 12px; align-items: start; padding: 12px 14px; border: 1px solid var(--border); border-radius: 16px; background: var(--white); }
.sess-card.is-cancelled { background: #FAFAFA; }
.sess-card.is-cancelled .sess-title b { text-decoration: line-through; }
.sess-time { display: flex; flex-direction: column; align-items: center; }
.sess-time b { font-family: Archivo, sans-serif; font-size: 18px; font-weight: 800; }
.sess-time span { font-size: 11px; color: var(--text-label); }
.sess-main { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.sess-title { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.sess-occ { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.sess-occ-bar { flex: 1; max-width: 220px; height: 6px; border-radius: 3px; background: var(--border); overflow: hidden; }
.sess-occ-bar span { display: block; height: 6px; background: var(--red); border-radius: 3px; }
.roster-row { display: flex; flex-wrap: wrap; gap: 5px; }
.roster-chip { font-size: 11px; padding: 3px 8px; border-radius: 999px; background: var(--chalk); border: 1px solid var(--border); }
.roster-chip.is-wait { background: var(--amber-bg); border-color: #FDE68A; color: var(--amber); }
.sess-actions { display: flex; flex-direction: column; gap: 6px; }
@media (max-width: 640px) { .sess-card { grid-template-columns: 52px minmax(0, 1fr); } .sess-actions { grid-column: 1 / -1; } }

/* Program şablonları */
.tpl-strip { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 5px; }
.tpl-slot { background: var(--white); border: 1px solid var(--border); border-radius: 10px; padding: 6px; display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.tpl-slot span { font-size: 9.5px; font-weight: 700; color: var(--text-label); text-transform: uppercase; }
.tpl-slot b { font-size: 11px; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; }
.tpl-slot small { font-size: 10px; color: var(--text-muted); }
.tpl-slot.is-rest { background: transparent; border-style: dashed; }
.modal-box-wide { max-width: 860px; max-height: calc(100vh - 40px); overflow-y: auto; }
.tpl-edit-slot { border: 1px solid var(--border); border-radius: 14px; padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; }
.tpl-edit-slot.is-rest { background: var(--chalk); }
.tpl-edit-head { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 10px; align-items: center; }
.tpl-ex-list { display: flex; flex-direction: column; gap: 6px; }
.tpl-ex-row { display: grid; grid-template-columns: minmax(0, 1fr) 70px 80px 76px auto; gap: 6px; align-items: end; }
.tpl-ex-row label { display: flex; flex-direction: column; gap: 2px; font-size: 10px; font-weight: 700; color: var(--text-label); }
.tpl-ex-row .input { height: 36px; }
@media (max-width: 640px) { .tpl-ex-row { grid-template-columns: 1fr 1fr 1fr; } .tpl-ex-row .tg-select { grid-column: 1 / -1; } }

/* Destek talepleri */
.ticket-item { border: 1px solid var(--border); border-radius: 14px; padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; background: var(--white); }
.ticket-item.is-open { border-color: #FECACA; background: #FFFBFB; }
.ticket-head { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.chat-meta { font-size: 10px; opacity: 0.6; margin-top: 4px; }
.member-tag-btn { cursor: pointer; border: 1px solid var(--border-dark); background: var(--night-raised); color: var(--white); font-size: 12px; }

/* Üye detay çekmecesi */
body.drawer-open { overflow: hidden; }
.drawer-overlay { position: fixed; inset: 0; z-index: 90; background: rgba(16, 17, 20, 0.5); display: flex; justify-content: flex-end; }
.drawer-box { width: min(820px, 100vw); height: 100vh; background: var(--white); display: flex; flex-direction: column; box-shadow: -20px 0 60px rgba(0, 0, 0, 0.25); }
.drawer-head { display: flex; justify-content: space-between; gap: 12px; padding: 20px 22px 12px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.drawer-head h2 { margin: 4px 0 6px; font-family: Archivo, sans-serif; font-weight: 800; font-size: 22px; }
.drawer-sub { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.drawer-tabs { display: flex; gap: 4px; padding: 10px 22px 0; border-bottom: 1px solid var(--border); overflow-x: auto; }
.drawer-tab { border: 0; background: transparent; padding: 10px 12px; font-size: 13px; font-weight: 700; color: var(--text-label); border-bottom: 2.5px solid transparent; cursor: pointer; white-space: nowrap; }
.drawer-tab.active { color: var(--text); border-bottom-color: var(--red); }
.drawer-body { flex: 1; overflow-y: auto; padding: 18px 22px 28px; display: flex; flex-direction: column; gap: 14px; }
.drawer-section { border-top: 1px solid var(--border); padding-top: 12px; display: flex; flex-direction: column; gap: 10px; }
.info-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.info-tile { background: var(--chalk); border: 1px solid var(--border); border-radius: 14px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.info-tile span { font-size: 10.5px; font-weight: 700; color: var(--text-label); text-transform: uppercase; letter-spacing: 0.04em; }
.info-tile b { font-size: 14px; }
.info-tile small { font-size: 11px; color: var(--text-secondary); }
.progress-line { height: 6px; border-radius: 3px; background: var(--border); overflow: hidden; }
.progress-line span { display: block; height: 6px; background: var(--red); }
.week-strip { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.week-cell { border: 1.5px solid var(--border); border-radius: 14px; padding: 8px; display: flex; flex-direction: column; gap: 2px; min-width: 0; background: var(--white); }
.week-cell .wc-dow { font-size: 10.5px; font-weight: 700; color: var(--text-label); text-transform: uppercase; }
.week-cell b { font-size: 13px; }
.week-cell small { font-size: 10.5px; color: var(--text-secondary); line-height: 1.25; }
.week-cell .wc-flag { font-size: 9.5px; font-weight: 800; color: var(--red); letter-spacing: 0.04em; min-height: 12px; }
.week-cell.is-rest { background: var(--chalk); border-style: dashed; }
.week-cell.is-done { background: #F0FDF4; border-color: #BBF7D0; }
.week-cell.is-done .wc-flag { color: var(--positive); }
.week-cell.is-next { border-color: var(--night); }
.week-cell.is-today { border-color: var(--red); box-shadow: 0 0 0 2px rgba(210, 26, 33, 0.12); }
.chip-row { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-btn { border: 1px solid var(--border); background: var(--white); border-radius: 999px; padding: 6px 12px; font-size: 12px; font-weight: 700; cursor: pointer; }
.chip-btn span { opacity: 0.6; margin-left: 4px; }
.chip-btn.active { background: var(--night); color: var(--white); border-color: var(--night); }
@media (max-width: 720px) {
  .info-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .week-strip { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .drawer-head, .drawer-body { padding-left: 16px; padding-right: 16px; }
}

/* Simülatör */
.sim-member-bar { width: 390px; display: flex; align-items: center; gap: 8px; }
.sim-member-bar .tg-select { flex: 1; }
.m-tag { padding: 4px 8px; border-radius: 7px; background: rgba(255, 255, 255, 0.14); font-size: 10px; font-weight: 700; }
.m-hscroll { display: flex; gap: 5px; overflow-x: auto; padding-bottom: 4px; }
.m-hscroll::-webkit-scrollbar { height: 4px; }

.field-row > * { min-width: 0; }
.field-row .tg-select { max-width: 100%; }
.grid-assign { grid-template-columns: minmax(0, 1fr) minmax(190px, 1.2fr) auto; }
@media (max-width: 720px) { .grid-assign { grid-template-columns: 1fr; } }

/* ==========================================
   ASENKRON ÜYE SEÇİCİ (.tg-member-picker)
   ========================================== */
.tg-member-picker { position: relative; display: block; width: 100%; }
.tg-member-picker.tg-mp-sm { width: auto; flex: 1; min-width: 180px; }
.tg-member-picker .tg-mp-input { padding-left: 34px; padding-right: 32px; font-weight: 600; text-transform: none; letter-spacing: 0; }
.tg-member-picker .tg-mp-input::-webkit-search-cancel-button { display: none; }
.tg-member-picker .tg-mp-icon {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  color: var(--text-label); display: inline-flex; pointer-events: none;
}
.tg-member-picker.is-dark .tg-mp-icon { color: var(--text-on-dark-sec); }
.tg-member-picker.open .tg-mp-icon { color: var(--red); }
.tg-member-picker.open .tg-mp-input.input,
.tg-member-picker.open .tg-mp-input.input-sm {
  background: var(--white); border-color: var(--night); box-shadow: 0 0 0 3px rgba(210, 26, 33, 0.12); outline: none;
}
.tg-member-picker.is-dark.open .tg-mp-input {
  border-color: var(--red-on-dark); box-shadow: 0 0 0 3px rgba(255, 90, 102, 0.18); outline: none;
}
.tg-member-picker .tg-mp-clear {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  width: 22px; height: 22px; border-radius: 6px; border: 0; background: transparent;
  color: var(--text-label); display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
}
.tg-member-picker .tg-mp-clear:hover { background: var(--chalk); color: var(--text); }
.tg-member-picker.is-dark .tg-mp-clear { color: var(--text-on-dark-sec); }
.tg-member-picker.is-dark .tg-mp-clear:hover { background: rgba(255, 255, 255, 0.08); color: var(--white); }
.tg-mp-menu { max-height: 320px; }
.tg-mp-opt { align-items: center; }
.tg-mp-opt-main { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.tg-mp-opt-main b { font-size: 12.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tg-mp-opt-main small { font-size: 11px; color: var(--text-label); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 500; }
.tg-select-menu.is-dark .tg-mp-opt-main small { color: var(--text-on-dark-sec); }
.tg-mp-opt.is-active { background: var(--chalk); box-shadow: inset 0 0 0 1.5px var(--border); }
.tg-select-menu.is-dark .tg-mp-opt.is-active { background: rgba(255, 255, 255, 0.1); box-shadow: inset 0 0 0 1.5px var(--border-dark); }
.tg-mp-tag { font-size: 9.5px; font-weight: 800; color: var(--red); letter-spacing: 0.04em; margin-left: 4px; }
.tg-mp-state { padding: 10px 12px; font-size: 12px; color: var(--text-secondary); }
.tg-mp-state.is-error { color: var(--error); }
.tg-mp-state.tg-mp-more { font-size: 11px; color: var(--text-muted); border-top: 1px solid var(--border); margin-top: 2px; padding-top: 8px; }
.tg-select-menu.is-dark .tg-mp-state { color: var(--text-on-dark-sec); }
.sim-member-bar .tg-member-picker { flex: 1; }
.sim-member-bar .tg-member-picker .tg-mp-input { height: 36px; }

/* ==========================================
   ÜYE DİZİNİ · sunucu tarafı sayfalama
   ========================================== */
.member-filter-bar { margin: 4px 0 12px; }
.member-filter-bar .tg-select-sm { min-width: 128px; }
.pager-bar {
  display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-top: 12px; font-size: 12.5px; color: var(--text-secondary);
}
.pager-info { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--text); }
.pager-info small { font-weight: 500; color: var(--text-secondary); }
.pager-controls { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.pager-controls .btn-xs-outline:disabled { opacity: 0.45; cursor: not-allowed; }
.pager-size { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 600; color: var(--text-label); margin-right: 4px; }
.pager-size .tg-select-sm { min-width: 74px; }
.pager-jump { display: inline-flex; align-items: center; gap: 6px; font-variant-numeric: tabular-nums; }
.pager-input { width: 70px; height: 30px; text-align: center; padding: 0 6px; }
#adminMembersTable { position: relative; min-height: 64px; }
#adminMembersTable.is-loading > table { opacity: 0.45; transition: opacity 120ms; }
.table-loading-chip {
  position: absolute; top: 10px; right: 12px; z-index: 2;
  padding: 4px 10px; border-radius: 999px; background: var(--night); color: var(--white);
  font-size: 11px; font-weight: 700;
}
.member-no { font-size: 10.5px; font-weight: 700; color: var(--text-label); letter-spacing: 0.03em; font-variant-numeric: tabular-nums; }
.table-empty { padding: 22px 20px; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
@media (max-width: 640px) {
  .pager-bar { flex-direction: column; align-items: stretch; }
  .pager-controls { justify-content: space-between; }
  .tg-member-picker.tg-mp-sm { min-width: 0; }
}
/* Geniş tablolar sayfayı yatay taşırmasın: tablo kendi kabında kaydırılır */
.panel-area { min-width: 0; }
#adminMembersTable .admin-table { min-width: 1100px; }
#adminMembersTable td:last-child .btn-row { flex-wrap: nowrap; }

/* ==========================================
   DERS YOKLAMASI · REZERVASYON KURALLARI · YOĞUNLUK ANALİZİ
   ========================================== */
.sess-day.is-pastday { opacity: 0.72; border-style: dashed; }
.sess-day.is-pastday.is-selected { opacity: 1; }
.sess-opens { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 12px; }
a.sess-link { text-decoration: none; }
.att-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 6px; }
.att-row { display: flex; align-items: center; gap: 6px; padding: 5px 8px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-subtle); font-size: 12px; min-height: 36px; }
.att-row.is-in { background: #F0FAE6; border-color: #D9F2BF; }
.att-spot { font-size: 10.5px; font-weight: 800; color: var(--text-label); min-width: 24px; }
.att-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.att-pill { font-size: 10.5px; font-weight: 700; padding: 2px 7px; border-radius: 999px; background: var(--chalk); color: var(--text-secondary); white-space: nowrap; }
.att-pill.is-in { background: #ECFCCB; color: var(--positive); }
.att-pill.is-wait { background: var(--white); border: 1px solid var(--border); color: var(--text-label); }
.att-pill.is-miss { background: #FEE2E2; color: var(--error); }

.strike-list { display: flex; flex-direction: column; gap: 6px; }
.strike-item { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--white); }
.strike-item.is-forgiven { background: var(--surface-subtle); opacity: 0.75; }
.strike-item.is-active { border-color: #FECACA; background: #FFF7F7; }
.ban-banner { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 12px; border-radius: 12px; background: #FEE2E2; color: var(--error); font-size: 12.5px; font-weight: 600; }

.limit-box { border: 1px dashed var(--border); border-radius: 14px; padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; background: var(--surface-subtle); }
.limit-box .field-label-title { margin: 0; }

.rule-note { font-size: 11.5px; color: var(--text-secondary); line-height: 1.45; margin: 0; }
.config-grid .cfg-help { font-size: 10.5px; font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--text-muted); }
.config-grid .cfg-wide { grid-column: 1 / -1; }
.config-grid label.tg-switch { flex-direction: row; align-items: center; gap: 10px; text-transform: none; letter-spacing: 0; font-size: 12px; font-weight: 500; color: var(--text); }
.sleep-card { border-style: dashed; }
.sleep-card .pill { margin-left: 6px; vertical-align: middle; }

.heat-controls { display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; }
.heat-controls .field-label { min-width: 150px; }
.heat-wrap { overflow-x: auto; }
.heat-grid { display: grid; grid-template-columns: 44px repeat(18, minmax(28px, 1fr)); gap: 3px; min-width: 620px; font-size: 10.5px; }
.heat-grid .hh { text-align: center; color: var(--text-label); font-weight: 700; padding-bottom: 2px; }
.heat-grid .hd { display: flex; align-items: center; font-weight: 700; color: var(--text-secondary); }
.heat-cell { height: 30px; border-radius: 6px; display: flex; align-items: center; justify-content: center; font-weight: 700; color: rgba(0,0,0,.65); cursor: default; position: relative; }
.heat-cell.is-closed { background: repeating-linear-gradient(135deg, var(--chalk), var(--chalk) 4px, #ECEDEF 4px, #ECEDEF 8px); color: transparent; }
.heat-cell.is-peak { outline: 2px solid var(--night); outline-offset: 1px; }
.heat-legend { display: flex; align-items: center; gap: 8px; font-size: 11px; color: var(--text-secondary); flex-wrap: wrap; }
.heat-legend-bar { width: 160px; height: 10px; border-radius: 5px; background: linear-gradient(90deg, hsl(130 55% 78%), hsl(60 80% 70%), hsl(0 75% 62%)); }
.heat-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 8px; }
@media (max-width: 640px) { .config-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.config-grid .config-submit.cfg-wide { flex-direction: column; align-items: stretch; gap: 8px; }

/* ==========================================
   SATIŞ GİRİŞİ · DİJİTAL SÖZLEŞME · ŞABLONLAR
   ========================================== */
.btn-hdr-sale { background: var(--red); border-color: var(--red); }
.btn-hdr-sale:hover { background: var(--night); border-color: var(--night); }
.sale-kinds { display: flex; gap: 18px; flex-wrap: wrap; }
.sale-box { border: 1px solid var(--border); border-radius: 16px; padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; background: var(--surface-subtle); }
.sale-box-title { font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--red); }
.sale-prefill summary { cursor: pointer; font-size: 12.5px; font-weight: 700; color: var(--text-secondary); margin-bottom: 8px; }
.sale-prefill[open] { display: flex; flex-direction: column; gap: 10px; }
.is-disabled { opacity: .4; pointer-events: none; }
.sale-summary { border: 1.5px solid var(--night); border-radius: 14px; padding: 10px 14px; display: flex; flex-direction: column; gap: 6px; }
.sale-sum-row { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; font-size: 13px; }
.sale-sum-total { border-top: 1px solid var(--border); padding-top: 6px; font-size: 14px; }
.sale-sum-total b { font-family: Archivo, sans-serif; font-size: 20px; color: var(--red); }
.sale-sms { background: var(--amber-bg); color: var(--amber); border-radius: 12px; padding: 10px 12px; font-size: 12.5px; font-weight: 600; line-height: 1.45; }
.sale-sms.is-ok { background: #ECFCCB; color: var(--positive); }
.sign-qr { width: 220px; height: 220px; margin: 0 auto; display: flex; align-items: center; justify-content: center; background: #fff; border: 1px solid var(--border); border-radius: 16px; padding: 8px; }
.sign-qr svg { width: 100%; height: 100%; display: block; }
.sign-link-row { display: flex; gap: 8px; align-items: center; }
.sign-link-row .input { flex: 1; font-size: 12px; }
.table-scroll { overflow-x: auto; }
.ctr-head-pills { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.ctr-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.ctr-section { border: 1px solid var(--border); border-radius: 14px; padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ctr-section .sub-list-title { margin: 0 0 4px; }
.kv-row { display: flex; justify-content: space-between; gap: 10px; font-size: 12.5px; padding: 3px 0; border-bottom: 1px dashed var(--border); }
.kv-row:last-child { border-bottom: 0; }
.kv-row > span { color: var(--text-label); flex: 0 0 auto; max-width: 48%; }
.kv-row > b { text-align: right; font-weight: 600; min-width: 0; overflow-wrap: anywhere; display: flex; flex-direction: column; align-items: flex-end; }
.kv-row small { font-weight: 500; color: var(--text-secondary); font-size: 11px; }
code.hash { font-size: 10px; word-break: break-all; font-weight: 500; }
.ctr-doc-group { display: flex; flex-direction: column; gap: 4px; margin-bottom: 6px; }
.ctr-doc { display: flex; justify-content: space-between; gap: 10px; align-items: center; font-size: 12.5px; padding: 4px 8px; border-radius: 8px; background: var(--surface-subtle); }
.contract-settings-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 18px; align-items: start; }
.sample-warning { background: #FEF3C7; border: 2px solid #F59E0B; color: #92400E; border-radius: 14px; padding: 12px 14px; font-size: 13px; line-height: 1.45; }
.sample-warning b { color: #B45309; letter-spacing: .04em; }
.ctpl-textarea { width: 100%; min-height: 90px; resize: vertical; font: 12.5px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; padding: 10px 12px; height: auto; }
.ctpl-body { min-height: 220px; }
.ctpl-ph { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.ctpl-ph-chip { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 11px; padding: 4px 8px; font-weight: 600; }
.ctpl-docs { display: flex; flex-direction: column; gap: 10px; }
.ctpl-doc { border: 1px solid var(--border); border-radius: 14px; padding: 10px; display: flex; flex-direction: column; gap: 8px; background: var(--surface-subtle); }
.ctpl-doc-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ctpl-doc-head .input { flex: 1; min-width: 180px; }
.ctpl-doc-no { width: 24px; height: 24px; border-radius: 50%; background: var(--night); color: var(--white); font-size: 11px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.ctpl-save-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; border-top: 1px solid var(--border); padding-top: 10px; }
.ctpl-save-row .rule-note { flex: 1; min-width: 220px; }
#contractTemplatesEditor { display: flex; flex-direction: column; gap: 10px; }
@media (max-width: 1100px) { .contract-settings-grid { grid-template-columns: 1fr; } }
@media (max-width: 720px) { .ctr-grid { grid-template-columns: 1fr; } }
.doc-viewer-box { max-width: 980px; height: calc(100vh - 40px); }
.doc-viewer-frame { flex: 1; width: 100%; border: 1px solid var(--border); border-radius: 14px; background: #fff; min-height: 300px; }
#contractDocModal { z-index: 110; }
#confirmModal { z-index: 120; } /* onay penceresi sözleşme pencerelerinin üstünde */

/* ==========================================
   SAYFA DÜZENİ · GRUPLU KENAR MENÜ · FORM MODALLARI
   ========================================== */
.sidebar-nav { gap: 6px; }
a.v-nav-item { text-decoration: none; }
.nav-group-toggle { display: flex; align-items: center; justify-content: space-between; width: 100%; border: 0; background: transparent; padding: 8px 12px 6px; cursor: pointer; color: #777B84; border-radius: 8px; }
.nav-group-toggle:hover { color: var(--white); }
.nav-group-toggle .nav-group-label { padding: 0; }
.nav-group-toggle:hover .nav-group-label { color: var(--text-on-dark-sec); }
.nav-group-chev { transition: transform 150ms; flex: none; }
.nav-group.is-collapsed .nav-group-chev { transform: rotate(-90deg); }
.nav-group-items { display: flex; flex-direction: column; gap: 2px; }
.nav-group.is-collapsed .nav-group-items { display: none; }
.v-nav-item { padding: 8px 12px 8px 14px; }

.hdr-breadcrumb { text-transform: uppercase; letter-spacing: .1em; }
.workspace-header .hdr-title { font-size: 15px; font-family: Inter, sans-serif; font-weight: 700; letter-spacing: 0; }
.page-head .kicker { display: none; }

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; flex-wrap: wrap; padding: 2px 2px 0; }
.page-head-text { min-width: 0; }
.page-title { margin: 2px 0 2px; font-family: Archivo, sans-serif; font-weight: 800; font-size: 26px; line-height: 1.15; }
.page-desc { margin: 0; color: var(--text-secondary); font-size: 13px; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.page-action-btn { text-decoration: none; display: inline-flex; align-items: center; justify-content: center; white-space: nowrap; border: 0; cursor: pointer; font-weight: 700; }
.page-action-btn.btn-outline-sm { border: 1.5px solid var(--border); background: var(--white); color: var(--text); }
.narrow-card { max-width: 760px; width: 100%; }

.settings-tabs { display: flex; gap: 4px; flex-wrap: wrap; border-bottom: 1px solid var(--border); padding-bottom: 0; }
.settings-tabs a { text-decoration: none; color: var(--text-secondary); font-size: 13px; font-weight: 700; padding: 9px 12px; border-radius: 10px 10px 0 0; border-bottom: 2.5px solid transparent; margin-bottom: -1px; }
.settings-tabs a:hover { color: var(--text); }
.settings-tabs a.active { color: var(--text); border-bottom-color: var(--red); background: var(--white); }
.settings-pane { display: flex; flex-direction: column; gap: 18px; }
#configForm[data-sec="puan"] [data-cfg-sec="fiyat"], #configForm[data-sec="fiyat"] [data-cfg-sec="puan"] { display: none; }

.form-modal { align-items: flex-start; overflow-y: auto; }
.form-modal-box { max-width: 900px; margin: 20px auto; max-height: none; overflow: visible; }
.form-modal-top { display: flex; align-items: flex-start; gap: 10px; }
.form-modal-top > .card-head, .form-modal-top > div:first-child { flex: 1; min-width: 0; margin: 0; }
.form-modal-close { flex: none; }
body.form-modal-open { overflow: hidden; }

.attention-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 14px; }
.attention-card .card-head h2 { font-size: 16px; }
.attention-list { display: flex; flex-direction: column; gap: 4px; }
.attention-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; background: var(--surface-subtle); border: 1px solid var(--border); color: var(--text); text-decoration: none; font: 500 12.5px Inter, sans-serif; text-align: left; cursor: pointer; width: 100%; }
.attention-row:hover { border-color: var(--night); }
.attention-row > span:first-child, .attention-row > b + span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.attention-row small { color: var(--text-secondary); font-size: 11px; white-space: nowrap; }
.att-fill { width: 60px; height: 6px; border-radius: 3px; background: var(--border); overflow: hidden; flex: none; }
.att-fill span { display: block; height: 100%; background: var(--red); }
.attention-note { font-size: 12px; color: var(--amber); background: var(--amber-bg); border-radius: 10px; padding: 8px 10px; }
.attention-more { border: 0; background: none; color: var(--red); font: 700 12px Inter, sans-serif; cursor: pointer; text-align: left; padding: 4px 2px; }

@media (max-width: 720px) {
  .workspace { padding: 14px 12px 32px; }
  .page-title { font-size: 22px; }
  .two-col, .cards-grid-2, .cards-grid-3 { grid-template-columns: minmax(0, 1fr); }
  .form-grid-2, .form-grid-3, .form-grid-4 { grid-template-columns: minmax(0, 1fr); }
  .attention-grid { grid-template-columns: minmax(0, 1fr); }
  .workspace-header-right { width: 100%; }
  .workspace-header-right .hdr-club-wrap { min-width: 0; flex: 1 1 100%; }
  .workspace-header-right .btn-hdr-sim { flex: 1 1 0; justify-content: center; }
  .live-date-pill { display: none; }
  .modal-overlay { padding: 10px; }
  .form-modal-box { margin: 0 auto; }
}
@media (max-width: 430px) { .simulator-column { zoom: 0.88; } } /* 390px simülatör telefonda yatay kaydırma yapmasın */

/* ==========================================
   SOSYAL MEDYA · POTANSİYEL MÜŞTERİLER · SİMÜLATÖR · BOT · REKLAMLAR
   ========================================== */
.lead-status-tabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; }
.lead-tab { border: 1.5px solid var(--border); background: var(--white); border-radius: 999px; padding: 7px 12px; font: 700 12px Inter, sans-serif; cursor: pointer; white-space: nowrap; color: var(--text); }
.lead-tab span { opacity: .6; margin-left: 4px; font-variant-numeric: tabular-nums; }
.lead-tab.active { background: var(--night); border-color: var(--night); color: var(--white); }
.lead-filters, .lead-toggles { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.lead-filters select, .lead-filters .tg-select { min-width: 150px; }
.lead-date { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; color: var(--text-label); }
.lead-date input { height: 32px; }
.lead-table td { vertical-align: top; }
.lead-who { display: flex; gap: 8px; align-items: flex-start; }
.lead-stale td { background: #FFF7ED; }
.lead-stale-note { font-size: 11px; font-weight: 700; color: var(--error); margin-top: 2px; }
.lead-phone { font-weight: 700; color: var(--text); text-decoration: none; }
.lead-phone:hover { color: var(--red); }
.lead-ch { display: inline-flex; align-items: center; justify-content: center; min-width: 34px; height: 22px; padding: 0 6px; border-radius: 6px; font: 800 10px Inter, sans-serif; letter-spacing: .03em; color: #fff; flex: none; }
.lead-ch.ch-ig { background: linear-gradient(45deg, #F58529, #DD2A7B 55%, #8134AF); }
.lead-ch.ch-fb { background: #0866FF; }
.lead-ch.ch-form { background: var(--positive); }
.lead-ch.ch-manual { background: #5A5D63; }
.lead-ch.ch-sim { background: #9CA3AF; }
.lead-pill { display: inline-flex; align-items: center; padding: 3px 9px; border-radius: 999px; font-size: 11px; font-weight: 700; white-space: nowrap; }
.c-blue.lead-pill, .lead-status-btn.c-blue, .lead-tab.c-blue.active { background: #DBEAFE; color: #1D4ED8; border-color: #BFDBFE; }
.c-green.lead-pill, .lead-status-btn.c-green, .lead-tab.c-green.active { background: #DCFCE7; color: #166534; border-color: #BBF7D0; }
.c-amber.lead-pill, .lead-status-btn.c-amber, .lead-tab.c-amber.active { background: #FEF3C7; color: #92400E; border-color: #FDE68A; }
.c-purple.lead-pill, .lead-status-btn.c-purple, .lead-tab.c-purple.active { background: #EDE9FE; color: #5B21B6; border-color: #DDD6FE; }
.c-gray.lead-pill, .lead-status-btn.c-gray, .lead-tab.c-gray.active { background: #F3F4F6; color: #374151; border-color: #E5E7EB; }
.lead-drawer-box { width: min(720px, 100vw); }
.lead-contact { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 14px; border-radius: 14px; background: var(--surface-subtle); border: 1px solid var(--border); }
.lead-contact-phone { font-family: Archivo, sans-serif; font-weight: 800; font-size: 22px; }
.lead-call, .lead-wa { height: 40px; padding: 0 18px; font-size: 14px; display: inline-flex; align-items: center; }
.lead-wa { background: #128C7E; border-color: #128C7E; }
.lead-status-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.lead-status-btn { min-height: 46px; border-radius: 12px; border: 2px solid transparent; font: 700 13px Inter, sans-serif; cursor: pointer; padding: 6px 10px; }
.lead-status-btn.is-current { outline: 3px solid var(--night); outline-offset: 1px; }
.lead-note { width: 100%; resize: vertical; min-height: 54px; height: auto; padding: 8px 10px; }
.lead-won.is-won { background: #F0FDF4; border-radius: 12px; padding: 12px; }
.lead-chat { max-height: 360px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; padding: 10px; border-radius: 14px; background: var(--chalk); }
.lead-msg { display: flex; flex-direction: column; max-width: 82%; gap: 3px; }
.lead-msg.is-in { align-self: flex-start; }
.lead-msg.is-out { align-self: flex-end; align-items: flex-end; }
.lead-bubble { padding: 8px 12px; border-radius: 16px; font-size: 13px; line-height: 1.4; background: var(--white); border: 1px solid var(--border); overflow-wrap: anywhere; }
.lead-msg.is-out .lead-bubble { background: var(--night); color: var(--white); border-color: var(--night); }
.lead-msg.is-bot .lead-bubble { background: #3A3D44; border-color: #3A3D44; }
.lead-chips { display: flex; flex-wrap: wrap; gap: 4px; justify-content: flex-end; }
.lead-chip { font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 999px; border: 1px solid #0866FF; color: #0866FF; background: var(--white); }
.lead-chip.is-btn { border-radius: 8px; border-color: var(--border); color: var(--text); }
.lead-msg-meta { font-size: 10.5px; color: var(--text-muted); }
.form-error-inline { color: var(--error); font-weight: 700; }
.lead-reply { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.lead-reply textarea { width: 100%; resize: vertical; min-height: 56px; height: auto; padding: 8px 10px; }
.lead-reply.is-disabled textarea { opacity: .55; }
.lead-timeline { display: flex; flex-direction: column; gap: 8px; }
.lead-ev { display: flex; gap: 10px; font-size: 12.5px; }
.lead-ev-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--red); margin-top: 5px; flex: none; }
.lead-ev-note { font-style: italic; color: var(--text-secondary); }
.lead-form-box { max-width: 620px; }

.botsim-layout { display: grid; grid-template-columns: minmax(0, 420px) minmax(0, 1fr); gap: 18px; align-items: start; }
.botsim-phone { border: 10px solid var(--night); border-radius: 34px; background: var(--white); height: 640px; display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 20px 50px rgba(0,0,0,.18); }
.botsim-head { display: flex; gap: 10px; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--border); }
.botsim-head b { display: block; font-size: 14px; }
.botsim-head small { font-size: 11px; color: var(--text-label); }
.botsim-avatar { width: 34px; height: 34px; border-radius: 50%; background: linear-gradient(45deg, #F58529, #DD2A7B 55%, #8134AF); color: #fff; font: 800 12px Inter, sans-serif; display: inline-flex; align-items: center; justify-content: center; }
.botsim-messages { flex: 1; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 8px; background: #FAFAFA; }
.botsim-msg { display: flex; flex-direction: column; gap: 5px; max-width: 86%; }
.botsim-msg.is-me { align-self: flex-end; align-items: flex-end; }
.botsim-msg.is-bot { align-self: flex-start; }
.botsim-bubble { padding: 9px 13px; border-radius: 20px; font-size: 13.5px; line-height: 1.4; background: #EFEFEF; color: #111; overflow-wrap: anywhere; }
.botsim-msg.is-me .botsim-bubble { background: #3797F0; color: #fff; }
.botsim-typing { color: var(--text-muted); font-style: italic; }
.botsim-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.botsim-chip { border: 1.5px solid #3797F0; color: #3797F0; background: #fff; border-radius: 999px; padding: 6px 12px; font: 700 12px Inter, sans-serif; cursor: pointer; }
.botsim-chip:disabled { opacity: .45; cursor: default; }
.botsim-btn { display: block; width: 100%; border: 1px solid var(--border); background: #fff; color: #111; border-radius: 10px; padding: 8px 12px; font: 600 12.5px Inter, sans-serif; cursor: pointer; text-align: center; text-decoration: none; }
.botsim-chips:has(.botsim-btn) { flex-direction: column; min-width: 220px; }
.botsim-empty { color: var(--text-secondary); font-size: 13px; text-align: center; margin: auto 10px; line-height: 1.5; }
.botsim-err { align-self: center; font-size: 12px; color: var(--error); background: #FEE2E2; border-radius: 10px; padding: 6px 10px; }
.botsim-input { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--border); }
.botsim-input .input { flex: 1; border-radius: 999px; }
.botsim-side { position: sticky; top: 90px; }

#botSettingsEditor { display: flex; flex-direction: column; gap: 18px; }
.bot-region { border: 1px solid var(--border); border-radius: 16px; padding: 12px; display: flex; flex-direction: column; gap: 10px; background: var(--surface-subtle); }
.bot-region-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.bot-region-head .input { flex: 1; min-width: 160px; font-weight: 700; }
.bot-clubs { display: flex; flex-direction: column; gap: 8px; padding-left: 10px; border-left: 3px solid var(--border); }
.bot-club { border: 1px solid var(--border); border-radius: 12px; padding: 10px; background: var(--white); display: flex; flex-direction: column; gap: 8px; }
.bot-short-warn { font-size: 11px; font-weight: 700; color: var(--amber); }
.bot-texts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.bot-text { min-height: 90px; }
.bot-statuses { display: flex; flex-direction: column; gap: 6px; }
.bot-status-row { display: grid; grid-template-columns: 150px minmax(0, 1fr) 130px auto auto; gap: 8px; align-items: center; }
.bot-form-link { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.bot-form-link > div:last-child { flex: 1; min-width: 240px; display: flex; flex-direction: column; gap: 6px; }
.bot-qr { width: 140px; height: 140px; margin: 0; }

.meta-lights { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; }
.meta-light { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface-subtle); font-size: 12.5px; }
.meta-dot { width: 12px; height: 12px; border-radius: 50%; margin-top: 3px; flex: none; background: #9CA3AF; }
.meta-light.is-on .meta-dot { background: #16A34A; box-shadow: 0 0 0 4px #DCFCE7; }
.meta-light.is-off .meta-dot { background: #DC2626; box-shadow: 0 0 0 4px #FEE2E2; }
.meta-steps { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 10px; font-size: 13px; line-height: 1.5; }
.meta-steps code, .rule-note code { font-size: 11.5px; background: var(--chalk); padding: 1px 5px; border-radius: 4px; }
.soon-card { border-style: dashed; }
#metaStatusBox { display: flex; flex-direction: column; gap: 18px; }

.ads-page { display: flex; flex-direction: column; gap: 16px; }
.ads-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.ads-demo-banner { background: var(--amber-bg); color: var(--amber); border: 1.5px solid #FDE68A; border-radius: 14px; padding: 12px 14px; font-size: 13.5px; font-weight: 600; }
.ads-demo-banner a { color: inherit; }
.ads-kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
.ads-kpi .kpi-value { font-size: 22px; }
.ads-warn-list { display: flex; flex-direction: column; gap: 8px; }
.ads-warn { border: 1px solid var(--border); border-left-width: 5px; border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; background: var(--white); }
.ads-warn.is-critical { border-left-color: #DC2626; background: #FFF7F7; }
.ads-warn.is-warning { border-left-color: #F59E0B; }
.ads-warn.is-info { border-left-color: #9CA3AF; }
.ads-warn-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ads-warn-detail { font-size: 12.5px; color: var(--text-secondary); }
.ads-warn-sugg { font-size: 12.5px; font-weight: 600; }
.ads-chart { display: flex; flex-direction: column; gap: 10px; }
.ads-bar-row { display: grid; grid-template-columns: minmax(0, 200px) minmax(0, 1fr); gap: 10px; align-items: center; }
.ads-bar-label { font-size: 12.5px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ads-bars { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.ads-bar { height: 18px; border-radius: 5px; position: relative; min-width: 4px; }
.ads-bar span { position: absolute; left: 6px; top: 1px; font-size: 10.5px; font-weight: 700; white-space: nowrap; color: var(--text); }
.sw-spend { background: #FCA5A5; }
.sw-leads { background: #93C5FD; }
.ads-legend { display: flex; gap: 6px; align-items: center; font-size: 11.5px; color: var(--text-secondary); }
.ads-sw { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-left: 6px; }
.ads-table td, .ads-table th { white-space: nowrap; }
.ads-row.depth-1 td:first-child { padding-left: 26px; }
.ads-row.depth-2 td:first-child { padding-left: 48px; }
.ads-row.depth-0 { background: var(--surface-subtle); }
.ads-name { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.ads-toggle { border: 0; background: none; cursor: pointer; font-size: 13px; width: 20px; padding: 0; }
.ads-sort { font-weight: 700; text-transform: uppercase; font-size: inherit; letter-spacing: inherit; }
.ads-sort.active { color: var(--red); }
.ads-rules summary { cursor: pointer; display: flex; gap: 8px; align-items: baseline; list-style: none; }
.ads-rules summary::-webkit-details-marker { display: none; }
.ads-rules[open] summary { margin-bottom: 10px; }

@media (max-width: 900px) {
  .botsim-layout { grid-template-columns: minmax(0, 1fr); }
  .botsim-side { position: static; }
  .bot-texts { grid-template-columns: minmax(0, 1fr); }
  .bot-status-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}
@media (max-width: 720px) {
  .botsim-phone { height: 560px; border-width: 6px; border-radius: 24px; }
  .lead-filters > * { flex: 1 1 140px; }
  .lead-status-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ads-bar-row { grid-template-columns: minmax(0, 1fr); }
  .lead-msg { max-width: 92%; }
}

/* ── Potansiyel müşteri takibi: hazır listeler, uyarı şeridi, performans, reklam karşılaştırması ── */
.pill-purple { background: #EDE9FE; color: #6D28D9; }
.v-nav-badge.is-alert { background: var(--error); color: #fff; }
.lead-queue-bar { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; padding-bottom: 10px; border-bottom: 1px dashed var(--border); }
.lead-queue { border: 1.5px solid var(--border); background: var(--chalk, #f5f5f4); border-radius: 10px; padding: 7px 12px; font: 700 12.5px Inter, sans-serif; cursor: pointer; color: var(--text); white-space: nowrap; }
.lead-queue span { margin-left: 4px; font-variant-numeric: tabular-nums; opacity: .7; }
.lead-queue.active { background: var(--night); border-color: var(--night); color: var(--white); }
.lead-queue.is-alert:not(.active) { border-color: #FCA5A5; background: #FEF2F2; color: var(--error); }
.lead-queue.is-alert span { opacity: 1; }
.lead-alert-banner { display: flex; align-items: center; gap: 10px 14px; flex-wrap: wrap; margin-bottom: 12px; padding: 12px 14px; border-radius: 14px; background: #FEE2E2; color: #7F1D1D; border: 1.5px solid #FCA5A5; font-size: 13.5px; }
.lead-alert-list { display: flex; gap: 4px 12px; flex-wrap: wrap; flex: 1 1 260px; }
.lead-alert-list .link-btn { color: #7F1D1D; font-weight: 700; }
.lead-flags { display: flex; gap: 6px; flex-wrap: wrap; margin: 6px 0 2px; }
.report-kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-bottom: 14px; }
.report-table td.num, .report-table th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rate-bar { display: inline-block; width: 54px; height: 6px; border-radius: 3px; background: var(--border); vertical-align: middle; margin-left: 6px; overflow: hidden; }
.rate-bar i { display: block; height: 100%; background: var(--success, #16a34a); }
.cmp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.cmp-card { border: 1.5px solid var(--border); border-radius: 14px; padding: 12px 14px; background: var(--white); }
.cmp-card.is-cost { background: #FAFAF9; }
.cmp-card .cmp-label { font-size: 12px; font-weight: 700; color: var(--text-sec, #57534e); text-transform: uppercase; letter-spacing: .3px; }
.cmp-card .cmp-value { font-size: 22px; font-weight: 800; margin: 4px 0 2px; font-variant-numeric: tabular-nums; }
.cmp-card .cmp-prev { font-size: 12px; color: var(--text-sec, #57534e); }
.cmp-delta { font-weight: 800; font-size: 12px; margin-left: 4px; }
.cmp-delta.good { color: #15803d; }
.cmp-delta.bad { color: var(--error); }
.cmp-trend { width: 100%; height: 140px; display: block; }
.cmp-trend .bar { fill: #FCA5A5; }
.cmp-trend .bar.today { fill: var(--error); }
.cmp-trend .line { fill: none; stroke: var(--night, #111214); stroke-width: 2; }
.cmp-trend .dot { fill: var(--night, #111214); }
.cmp-legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--text-sec, #57534e); margin-top: 6px; }
.cmp-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 4px; vertical-align: -1px; }
.rules-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
@media (max-width: 640px) { .lead-queue { padding: 6px 10px; font-size: 12px; } .cmp-card .cmp-value { font-size: 19px; } }
.rules-grid .field-label .cell-sub { display: block; margin-top: 4px; text-transform: none; letter-spacing: 0; font-weight: 500; }

/* Form alan ipucu (büyük harf etiket içinde normal yazı) + açıklama paragrafı */
.field-label .field-hint { display: block; margin-top: 3px; text-transform: none; letter-spacing: 0; font-weight: 500; font-size: 11px; color: var(--text-secondary); }
.help-text { font-size: 12px; color: var(--text-secondary); margin: 4px 0 8px; line-height: 1.45; }
.lead-ch.ch-app { background: var(--red); }

/* Video kütüphanesi: dosya seçici ve önizleme */
.media-pick { display: flex; flex-direction: column; gap: 8px; margin-top: 6px; text-transform: none; letter-spacing: 0; font-weight: 500; }
.media-preview { width: 100%; max-height: 180px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 12px; background: #101114; }
.media-preview.is-empty { display: flex; align-items: center; justify-content: center; color: var(--text-secondary); background: var(--chalk); border: 1px dashed var(--border); font-size: 12px; max-height: 110px; }
.media-upload-btn { cursor: pointer; }
.media-progress { position: relative; height: 22px; border-radius: 8px; background: var(--chalk); overflow: hidden; }
.media-progress-bar { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--red); transition: width .2s; }
.media-progress-text { position: relative; font-size: 11px; font-weight: 700; padding-left: 8px; line-height: 22px; }
.media-list-thumb { width: 64px; height: 40px; border-radius: 8px; object-fit: cover; flex-shrink: 0; background: #101114; }
.media-list-thumb.is-empty { display: flex; align-items: center; justify-content: center; color: #fff; font-size: 13px; }
