:root,
html[data-theme="dark"] {
  --bg: #0b0c10;
  --surface: #0f121a;
  --surface-2: #10131b;
  --card: #13161f;
  --border: rgba(255, 255, 255, 0.08);
  --border-input: rgba(255, 255, 255, 0.14);
  --border-strong: #2c3539;
  --text: #f4f4f6;
  --text-menu: #ffffff;
  --muted: #8a8d98;
  --cyan: #00ffff;
  --pink: #ff00ff;
  --cyan-dim: rgba(0, 255, 255, 0.1);
  --cyan-glow: rgba(0, 255, 255, 0.35);
  --shadow-lg: rgba(0, 0, 0, 0.35);
  --sidebar-bg: rgba(19, 22, 31, 0.78);
  --header-bg: rgba(11, 12, 16, 0.88);
  --modal-overlay: rgba(0, 0, 0, 0.55);
  --btn-outline-border: rgba(255, 255, 255, 0.2);
  --icon-btn-bg: rgba(19, 22, 31, 0.92);
  --chart-grid: rgba(138, 141, 152, 0.25);
  --chart-tick: #8a8d98;
  --gradient-a: rgba(0, 255, 255, 0.07);
  --gradient-b: rgba(255, 0, 255, 0.06);
  --logo-glow: rgba(0, 255, 255, 0.55);
  --tooltip-bg: #13161f;
  --skel-a: rgba(255, 255, 255, 0.04);
  --skel-b: rgba(255, 255, 255, 0.12);
  --menu-hover: rgba(0, 255, 255, 0.1);
  --card-glow: rgba(0, 255, 255, 0.1);
  --hero-bg: linear-gradient(120deg, rgba(19, 22, 31, 0.96), rgba(19, 22, 31, 0.72));
  --hero-shadow: rgba(0, 0, 0, 0.35);
  --stat-bar-bg: rgba(255, 255, 255, 0.08);
  --heatmap-empty: rgba(255, 255, 255, 0.06);
  --log-message: #d5d7de;
}

html[data-theme="light"] {
  --bg: #eef2f7;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --card: #ffffff;
  --border: rgba(15, 23, 42, 0.1);
  --border-input: rgba(15, 23, 42, 0.14);
  --border-strong: #e2e8f0;
  --text: #0f172a;
  --text-menu: #0f172a;
  --muted: #64748b;
  --cyan: #0e7490;
  --pink: #a21caf;
  --cyan-dim: rgba(14, 116, 144, 0.1);
  --cyan-glow: rgba(14, 116, 144, 0.22);
  --shadow-lg: rgba(15, 23, 42, 0.1);
  --sidebar-bg: rgba(255, 255, 255, 0.97);
  --header-bg: rgba(255, 255, 255, 0.94);
  --modal-overlay: rgba(15, 23, 42, 0.45);
  --btn-outline-border: rgba(15, 23, 42, 0.14);
  --icon-btn-bg: #ffffff;
  --chart-grid: rgba(100, 116, 139, 0.22);
  --chart-tick: #64748b;
  --gradient-a: rgba(14, 116, 144, 0.09);
  --gradient-b: rgba(162, 28, 175, 0.07);
  --logo-glow: rgba(14, 116, 144, 0.35);
  --tooltip-bg: #ffffff;
  --skel-a: rgba(15, 23, 42, 0.05);
  --skel-b: rgba(15, 23, 42, 0.1);
  --menu-hover: rgba(14, 116, 144, 0.08);
  --card-glow: rgba(14, 116, 144, 0.12);
  --hero-bg: linear-gradient(120deg, #ffffff 0%, #f1f5f9 100%);
  --hero-shadow: rgba(15, 23, 42, 0.08);
  --stat-bar-bg: rgba(15, 23, 42, 0.08);
  --heatmap-empty: #e2e8f0;
  --log-message: #475569;
}

* { box-sizing: border-box; font-family: Inter, sans-serif; }

body.theme-body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  transition: background-color 0.25s ease, color 0.25s ease;
}
body.theme-body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 10% 0%, var(--gradient-a), transparent 28%),
    radial-gradient(circle at 90% 100%, var(--gradient-b), transparent 35%);
  z-index: 0;
}

.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: 280px;
  height: 100vh;
  padding: 20px 14px;
  background: var(--sidebar-bg);
  backdrop-filter: blur(16px);
  border-right: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  flex-direction: column;
  z-index: 30;
  transition: transform .28s ease-in-out, width .25s ease, padding .25s ease;
  overflow: hidden;
}

.sidebar > div:first-child {
  overflow-y: auto;
  overflow-x: hidden;
  min-height: 0;
  scrollbar-width: none;
}
.sidebar > div:first-child::-webkit-scrollbar { display: none; }

.logo { color: var(--cyan); text-shadow: 0 0 14px var(--logo-glow); font-size: 24px; font-weight: 800; margin-bottom: 20px; }
.sidebar-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }

.sidebar-collapse-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--btn-outline-border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  transition: all .2s ease;
}
.sidebar-collapse-btn:hover { border-color: var(--cyan); box-shadow: 0 0 12px var(--cyan-glow); }

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

.menu-item {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  color: var(--text-menu);
  transition: all .2s ease;
}
.menu-item:hover {
  background: var(--menu-hover);
  box-shadow: 0 0 10px var(--cyan-glow);
  transform: translateX(2px);
}
.menu-item.active::before {
  content: "";
  position: absolute;
  left: -8px;
  top: 7px;
  bottom: 7px;
  width: 4px;
  border-radius: 4px;
  background: var(--cyan);
  box-shadow: 0 0 12px rgba(0,255,255,.8);
  animation: activePulse 1.8s ease-in-out infinite;
}
@keyframes activePulse {
  0%, 100% { opacity: .7; }
  50% { opacity: 1; }
}

.menu-divider {
  height: 1px;
  background: var(--border);
  margin: 12px 0 8px;
}

.menu-section-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--muted);
  padding: 4px 12px;
  margin-bottom: 4px;
  font-weight: 600;
}

body.sidebar-collapsed .menu-section-label,
body.sidebar-collapsed .menu-divider {
  display: none;
}

.cmd-divider {
  height: 1px;
  background: var(--border);
  margin: 6px 0;
  list-style: none;
}

.sidebar-footer { border-top: 1px solid var(--border); padding-top: 12px; }
.connection { color: var(--muted); display: flex; align-items: center; gap: 7px; margin-bottom: 8px; font-size: 14px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: #32d583; }

.app-shell {
  margin-left: 280px;
  min-height: 100vh;
  transition: margin-left .25s ease;
  position: relative;
  z-index: 1;
}
body.sidebar-collapsed .app-shell { margin-left: 92px; }

.main-area {
  margin-left: 0;
  padding: 20px 24px 32px;
  position: relative;
  z-index: 1;
}

.title { font-size: 30px; font-weight: 800; }
.muted { color: var(--muted); }

.panel-card {
  background: var(--card);
  border: 1px solid var(--border-strong);
  border-radius: 24px;
  box-shadow: 0 8px 24px var(--shadow-lg), 0 0 15px var(--card-glow);
  padding: 16px;
  transition: transform .2s ease, box-shadow .25s ease, border-color .25s ease, background-color .25s ease;
}
.panel-card:hover {
  transform: translateY(-4px);
  border-color: var(--cyan);
  box-shadow: 0 12px 30px var(--shadow-lg), 0 0 22px var(--cyan-glow);
}

.value { font-size: 36px; font-weight: 800; margin-top: 6px; }
.section-title { font-size: 18px; font-weight: 700; margin-bottom: 12px; }

.table-ui { width: 100%; border-collapse: separate; border-spacing: 0 8px; }
.table-ui thead th { color: var(--muted); text-align: left; font-size: 12px; text-transform: uppercase; padding: 0 10px 8px; }
.table-ui tbody tr { background: var(--surface-2); transition: background-color 0.2s ease; }
.table-ui tbody tr td { padding: 11px 10px; }
.table-ui tbody tr td:first-child { border-radius: 10px 0 0 10px; }
.table-ui tbody tr td:last-child { border-radius: 0 10px 10px 0; }

.field {
  width: 100%;
  border: 1px solid var(--border-input);
  background: var(--surface);
  color: var(--text);
  border-radius: 14px;
  padding: 10px 12px;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.field:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 0 3px var(--cyan-dim); }
.input { width: 100%; border: 1px solid var(--border-input); background: var(--surface); color: var(--text); border-radius: 14px; padding: 10px 12px; transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease; }
.input:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 0 3px var(--cyan-dim); }
.mono { font-family: ui-monospace, Menlo, Monaco, Consolas, monospace; }

.btn-gradient {
  border: 0;
  border-radius: 40px;
  padding: 10px 14px;
  background: linear-gradient(135deg, var(--cyan), var(--pink));
  color: #050607;
  font-weight: 700;
  box-shadow: 0 0 15px rgba(255,0,255,.3);
  position: relative;
  overflow: hidden;
}
.btn-gradient:hover { filter: brightness(1.08); }
.btn-gradient:active { transform: scale(0.98); }
.btn-gradient::after {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: 40px;
  border: 1px solid rgba(0,255,255,.45);
  opacity: 0;
  transition: opacity .2s ease;
}
.btn-gradient:hover::after { opacity: 1; }

.btn-primary {
  border: 0;
  border-radius: 40px;
  padding: 10px 14px;
  background: linear-gradient(135deg, var(--cyan), var(--pink));
  color: #050607;
  font-weight: 700;
  box-shadow: 0 0 15px rgba(255,0,255,.3);
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  cursor: pointer;
  transition: filter .2s ease, transform .15s ease;
}
.btn-primary:hover { filter: brightness(1.08); }
.btn-primary:active { transform: scale(0.98); }
.btn-primary::after {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: 40px;
  border: 1px solid rgba(0,255,255,.45);
  opacity: 0;
  transition: opacity .2s ease;
}
.btn-primary:hover::after { opacity: 1; }

.btn-outline {
  border-radius: 40px;
  padding: 9px 14px;
  border: 1px solid var(--btn-outline-border);
  background: transparent;
  color: var(--text);
}
.btn-danger {
  border-radius: 40px;
  padding: 9px 14px;
  background: rgba(255, 70, 70, .15);
  border: 1px solid rgba(255, 70, 70, .45);
  color: #ff8b8b;
}

.badge { padding: 4px 9px; border-radius: 999px; font-size: 12px; }
.badge.ok { background: rgba(34,197,94,.2); color: #4ade80; }
.badge.warn { background: rgba(251,191,36,.2); color: #facc15; }
.badge.bad { background: rgba(248,113,113,.2); color: #f87171; }

.modal { position: fixed; inset: 0; display: flex; justify-content: center; align-items: center; padding: 16px; background: var(--modal-overlay); z-index: 70; }
.modal.hidden { display: none; }
.modal-card { width: min(680px, 95vw); position: relative; }
.modal-close {
  position: absolute;
  right: 12px;
  top: 12px;
  border: 1px solid var(--btn-outline-border);
  border-radius: 999px;
  width: 32px;
  height: 32px;
  color: var(--text);
  background: var(--surface);
}
.row { background: var(--surface); border-radius: 10px; padding: 8px 10px; border: 1px solid var(--border); }

.level.bilgi { color: var(--cyan); }
.level.uyari { color: #ca8a04; }
.level.hata { color: #db2777; }

.filter-btn {
  border: 1px solid var(--btn-outline-border);
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 13px;
  color: var(--text);
  background: var(--surface);
}
.filter-btn.active { border-color: var(--cyan); color: var(--cyan); }

.flash { border-radius: 12px; padding: 10px 12px; }
.flash.warning { background: rgba(255,204,0,.2); color: #ffd95b; }
.flash.info { background: rgba(0,255,255,.14); color: var(--cyan); }

.pass-toggle {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
}

.fade-in { animation: fadeIn .35s ease; }
@keyframes fadeIn { from {opacity:0;} to {opacity:1;} }

.menu-toggle {
  display: none;
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 80;
  border: 1px solid var(--btn-outline-border);
  background: var(--card);
  color: var(--text);
  padding: 8px;
  border-radius: 10px;
}

/* Desktop collapsible sidebar */
body.sidebar-collapsed .sidebar {
  width: 92px;
  padding-left: 10px;
  padding-right: 10px;
}
body.sidebar-collapsed .logo,
body.sidebar-collapsed .menu-item span,
body.sidebar-collapsed .connection-text,
body.sidebar-collapsed .btn-outline span {
  opacity: 0;
  visibility: hidden;
  width: 0;
  margin: 0;
  padding: 0;
  overflow: hidden;
}
body.sidebar-collapsed .menu-item {
  justify-content: center;
  padding-left: 0;
  padding-right: 0;
}
body.sidebar-collapsed .menu-item::after {
  content: attr(data-label);
  position: absolute;
  left: calc(100% + 10px);
  top: 50%;
  transform: translateY(-50%);
  white-space: nowrap;
  font-size: 12px;
  color: var(--text);
  background: var(--card);
  border: 1px solid var(--cyan);
  border-radius: 10px;
  padding: 6px 10px;
  box-shadow: 0 0 12px rgba(0,255,255,.22);
  opacity: 0;
  pointer-events: none;
  transition: opacity .16s ease;
}
body.sidebar-collapsed .menu-item:hover::after { opacity: 1; }
body.sidebar-collapsed .menu-item.active::before { left: 2px; }
body.sidebar-collapsed .sidebar-collapse-btn i { transform: rotate(180deg); }

.ripple {
  position: absolute;
  border-radius: 9999px;
  transform: scale(0);
  animation: rippleAnim .55s linear;
  background: rgba(255,255,255,.45);
  pointer-events: none;
}
@keyframes rippleAnim {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

@media (max-width: 1024px) {
  .sidebar-collapse-btn { display: none; }
  .menu-toggle { display: inline-flex; }
  .sidebar { transform: translateX(-100%); width: 280px; }
  .sidebar.open { transform: translateX(0); }
  .app-shell { margin-left: 0; }
  .main-area { padding-top: 8px; }
  body.sidebar-collapsed .app-shell { margin-left: 0; }
}

@media (max-width: 768px) {
  .title { font-size: 24px; }
  .value { font-size: 28px; }
}

/* Brand & hero */
.brand-wrap { display: flex; align-items: center; gap: 10px; }
.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(0,255,255,.25), rgba(255,0,255,.2));
  border: 1px solid rgba(0,255,255,.35);
  box-shadow: 0 0 16px rgba(0,255,255,.25);
  color: var(--cyan);
  flex-shrink: 0;
}
.brand-mark svg { width: 18px; height: 18px; }

.page-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 20px;
  border-radius: 24px;
  border: 1px solid var(--border);
  background: var(--hero-bg);
  box-shadow: 0 10px 30px var(--hero-shadow), inset 0 0 40px var(--cyan-dim);
  position: relative;
  overflow: hidden;
}
.page-hero::before {
  content: "";
  position: absolute;
  right: -40px;
  top: -60px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,0,255,.18), transparent 70%);
  pointer-events: none;
}
.page-hero.compact { padding: 14px 18px; }
.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--cyan);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.hero-kicker svg { width: 14px; height: 14px; }
.hero-visual {
  width: 110px;
  height: 110px;
  position: relative;
  flex-shrink: 0;
}
.hero-orbit {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px dashed rgba(0,255,255,.35);
  animation: spin 12s linear infinite;
}
.hero-core {
  position: absolute;
  inset: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(0,255,255,.2), rgba(255,0,255,.15));
  box-shadow: 0 0 24px rgba(0,255,255,.35);
  color: var(--text);
}
.hero-core svg { width: 32px; height: 32px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Stat cards */
.stat-card { position: relative; overflow: hidden; }
.stat-card::after {
  content: "";
  position: absolute;
  right: -20px;
  top: -20px;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  opacity: .35;
  pointer-events: none;
}
.stat-cyan::after { background: radial-gradient(circle, rgba(0,255,255,.5), transparent 70%); }
.stat-green::after { background: radial-gradient(circle, rgba(34,197,94,.5), transparent 70%); }
.stat-purple::after { background: radial-gradient(circle, rgba(168,85,247,.5), transparent 70%); }
.stat-pink::after { background: radial-gradient(circle, rgba(255,0,255,.45), transparent 70%); }

.stat-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.stat-icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
}
.stat-icon svg { width: 20px; height: 20px; }
.stat-cyan .stat-icon { color: var(--cyan); background: rgba(0,255,255,.12); }
.stat-green .stat-icon { color: #4ade80; background: rgba(34,197,94,.15); }
.stat-purple .stat-icon { color: #c084fc; background: rgba(168,85,247,.15); }
.stat-pink .stat-icon { color: #f472b6; background: rgba(255,0,255,.12); }

.stat-chip {
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid var(--border-input);
  color: var(--muted);
}
.stat-chip.ok { color: #16a34a; border-color: rgba(22, 163, 74, 0.35); }
.stat-chip.bad { color: #dc2626; border-color: rgba(220, 38, 38, 0.35); }

.stat-bar {
  margin-top: 12px;
  height: 6px;
  border-radius: 999px;
  background: var(--stat-bar-bg);
  overflow: hidden;
}
.stat-bar span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--cyan), var(--pink));
  transition: width .6s ease;
}

/* Section headers & charts */
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}
.section-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.section-title svg { width: 18px; height: 18px; color: var(--cyan); }
.section-title-sm { font-size: 15px; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.section-pill {
  font-size: 12px;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid rgba(0,255,255,.25);
  color: var(--cyan);
  background: rgba(0,255,255,.08);
  white-space: nowrap;
}

.chart-card { min-height: 280px; }
.chart-wrap {
  position: relative;
  padding: 8px 4px 4px;
  border-radius: 16px;
  background: var(--surface-2);
  border: 1px solid var(--border);
}
.chart-wrap-donut { max-width: 220px; margin: 0 auto; }
.chart-wrap-bar { max-height: 200px; }

.legend-list {
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.legend-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: var(--muted);
}
.legend-list strong { color: var(--text); }
.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 8px;
  display: inline-block;
}
.legend-1 { background: #22c55e; box-shadow: 0 0 8px rgba(34,197,94,.6); }
.legend-2 { background: #facc15; box-shadow: 0 0 8px rgba(250,204,21,.5); }
.legend-3 { background: #f87171; box-shadow: 0 0 8px rgba(248,113,113,.5); }

/* Tables & cells */
.cell-icon {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
}
.cell-icon svg { width: 14px; height: 14px; }
.id-pill {
  font-size: 12px;
  padding: 3px 8px;
  border-radius: 8px;
  background: rgba(0,255,255,.1);
  color: var(--cyan);
  border: 1px solid rgba(0,255,255,.2);
}
.platform-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(29,155,240,.15);
  color: #7dd3fc;
  border: 1px solid rgba(29,155,240,.3);
  font-size: 13px;
}
.platform-badge svg { width: 14px; height: 14px; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.badge svg { width: 13px; height: 13px; }

/* Forms & buttons with icons */
.field-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 4px;
}
.field-label svg { width: 14px; height: 14px; color: var(--cyan); }

.btn-gradient,
.btn-outline,
.btn-danger,
.filter-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}
.btn-gradient svg,
.btn-outline svg,
.btn-danger svg,
.filter-btn svg { width: 15px; height: 15px; }

/* Empty states */
.empty-state {
  text-align: center;
  padding: 28px 12px;
  color: var(--muted);
}
.empty-state svg {
  width: 42px;
  height: 42px;
  margin: 0 auto 10px;
  color: rgba(0,255,255,.55);
}
.empty-state.small { padding: 16px 8px; }
.empty-state.small svg { width: 28px; height: 28px; }

/* Task & settings cards */
.task-icon {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: 8px;
  vertical-align: middle;
}
.task-icon svg { width: 16px; height: 16px; }
.task-icon.cyan { background: rgba(0,255,255,.15); color: var(--cyan); }
.task-icon.pink { background: rgba(255,0,255,.12); color: #f472b6; }
.task-icon.green { background: rgba(34,197,94,.15); color: #4ade80; }
.task-card { border-top: 3px solid transparent; }
.task-card:nth-child(1) { border-top-color: var(--cyan); }
.task-card:nth-child(2) { border-top-color: var(--pink); }
.task-card:nth-child(3) { border-top-color: #4ade80; }

.detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}
.detail-grid p {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px;
  margin: 0;
  font-size: 14px;
}
.detail-grid p svg { width: 15px; height: 15px; color: var(--cyan); flex-shrink: 0; }
.timeline-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.timeline-row svg { width: 14px; height: 14px; color: var(--pink); flex-shrink: 0; }

/* Logs */
.pulse-dot { animation: pulseDot 1.6s ease-in-out infinite; }
@keyframes pulseDot {
  0%, 100% { box-shadow: 0 0 0 0 rgba(50,213,131,.5); }
  50% { box-shadow: 0 0 0 6px rgba(50,213,131,0); }
}
.connection svg { width: 14px; height: 14px; color: #32d583; }

.filter-row .filter-btn { padding: 8px 14px; }
.log-timeline .log-item { border-left: 3px solid transparent; }
.log-item.log-bilgi { border-left-color: var(--cyan); }
.log-item.log-uyarı,
.log-item.log-uyari { border-left-color: #facc15; }
.log-item.log-hata { border-left-color: #ff00aa; }

.log-item-head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px;
  align-items: start;
}
.log-icon-wrap {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.log-icon-wrap svg { width: 20px; height: 20px; }
.log-icon-wrap.level-bilgi { background: rgba(0,255,255,.12); color: var(--cyan); }
.log-icon-wrap.level-uyarı,
.log-icon-wrap.level-uyari { background: rgba(250,204,21,.15); color: #facc15; }
.log-icon-wrap.level-hata { background: rgba(255,0,170,.12); color: #ff00aa; }
.log-time {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  font-size: 13px;
}
.log-time svg { width: 13px; height: 13px; }
.log-message { color: var(--log-message); line-height: 1.5; }

/* Range sliders */
.range-block label { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; }
.range-block label svg { width: 14px; height: 14px; color: var(--cyan); }
.range-ui {
  width: 100%;
  accent-color: var(--cyan);
  height: 6px;
}
.settings-card { position: relative; overflow: hidden; }
.settings-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--cyan), var(--pink));
  opacity: .7;
}

.modal-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.modal-close svg { width: 16px; height: 16px; }

body.sidebar-collapsed .brand-wrap .logo { display: none; }
body.sidebar-collapsed .brand-mark { margin: 0 auto; }
body.sidebar-collapsed .connection { justify-content: center; }
body.sidebar-collapsed .connection .connection-text { display: none; }
body.sidebar-collapsed .btn-outline { justify-content: center; padding-left: 0; padding-right: 0; opacity: 1; visibility: visible; width: auto; }

@media (max-width: 768px) {
  .page-hero { flex-direction: column; align-items: flex-start; }
  .hero-visual { display: none; }
  .page-hero.compact { flex-direction: column; }
}

/* ========== PREMIUM UI LAYER ========== */
body.is-loading .main-area > *:not(#page-skeleton) { visibility: hidden; }
body:not(.is-loading) #page-skeleton { display: none; }
body:not(.is-loading) .main-area > * { visibility: visible; }

.page-skeleton {
  position: absolute;
  inset: 80px 24px 24px;
  z-index: 5;
  pointer-events: none;
}
.skel-bar, .skel-card, .skel-wide {
  background: linear-gradient(90deg, var(--skel-a) 25%, var(--skel-b) 50%, var(--skel-a) 75%);
  background-size: 200% 100%;
  animation: skelShine 1.2s ease-in-out infinite;
  border-radius: 16px;
}
.skel-bar { height: 72px; margin-bottom: 16px; }
.skel-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px; }
.skel-card { height: 120px; }
.skel-wide { height: 280px; }
@keyframes skelShine { to { background-position: -200% 0; } }

.top-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 24px;
  border-bottom: 1px solid var(--border);
  background: var(--header-bg);
  backdrop-filter: blur(14px);
  transition: background-color 0.25s ease, border-color 0.25s ease;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
}
.breadcrumb a { color: var(--cyan); }
.breadcrumb svg { width: 14px; height: 14px; }
.breadcrumb span { color: var(--text); font-weight: 600; }
.top-subtitle { margin: 4px 0 0; font-size: 13px; color: var(--muted); }
.top-header-right { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.search-global-wrap {
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid var(--border-input);
  background: var(--surface);
  min-width: 220px;
}
.search-global-wrap svg { width: 16px; height: 16px; color: var(--muted); }
.search-global-wrap input {
  flex: 1;
  border: 0;
  background: transparent;
  color: var(--text);
  outline: none;
  font-size: 14px;
  min-width: 120px;
}
.kbd {
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 6px;
  border: 1px solid var(--border-input);
  color: var(--muted);
  background: var(--surface-2);
}
.last-update {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
  padding: 6px 10px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
}
.last-update svg { width: 14px; height: 14px; }
.last-update.is-live svg { animation: spin 2s linear infinite; color: var(--cyan); }
@keyframes spin { to { transform: rotate(360deg); } }

.card {
  border-radius: 24px;
  padding: 18px 20px;
  background: var(--card);
  border: 1px solid var(--border-strong);
  box-shadow: 0 4px 16px var(--shadow-lg);
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.card:hover { border-color: var(--cyan); box-shadow: 0 6px 24px var(--card-glow); }
.btn-sm {
  border-radius: 30px;
  padding: 6px 12px;
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  transition: filter .2s ease, transform .15s ease;
}
.btn-sm.btn-primary { padding: 6px 12px; font-size: 12px; box-shadow: none; }
.btn-sm.btn-outline { padding: 5px 12px; font-size: 12px; }
.btn-sm.btn-danger { padding: 5px 12px; font-size: 12px; }

.icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  border: 1px solid var(--border-input);
  background: var(--icon-btn-bg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  cursor: pointer;
  transition: all .2s ease;
  position: relative;
}
.icon-btn:hover { border-color: var(--cyan); box-shadow: 0 0 12px rgba(0,255,255,.25); }
.icon-btn svg { width: 18px; height: 18px; }

.menu-badge {
  margin-left: auto;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--cyan);
  color: #050607;
  font-size: 11px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.menu-badge.warn { background: #f87171; color: #fff; }
body.sidebar-collapsed .menu-badge { position: absolute; top: 4px; right: 4px; margin: 0; min-width: 16px; height: 16px; font-size: 10px; }

.connection[data-state="online"] .dot { background: #32d583; }
.connection[data-state="offline"] .dot { background: #f87171; animation: none; }
.connection[data-state="connecting"] .dot { background: #facc15; }

.toast-stack {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: min(380px, 92vw);
}
.toast {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--card);
  box-shadow: 0 12px 32px var(--shadow-lg);
  animation: toastIn .35s ease;
}
.toast.out { animation: toastOut .3s ease forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateX(20px); } }
.toast-icon { width: 32px; height: 32px; border-radius: 10px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.toast-icon svg { width: 16px; height: 16px; }
.toast.warning .toast-icon { background: rgba(250,204,21,.2); color: #facc15; }
.toast.info .toast-icon { background: rgba(0,255,255,.15); color: var(--cyan); }
.toast.success .toast-icon { background: rgba(34,197,94,.2); color: #4ade80; }
.flash.success, .toast.success { border-color: rgba(34,197,94,.35); }
.toast p { margin: 0; font-size: 14px; line-height: 1.4; color: var(--text); }

.notif-wrap { position: relative; }
.notif-dot {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--pink);
  display: none;
}
.notif-dot.show { display: block; }
.notif-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: min(340px, 90vw);
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--card);
  box-shadow: 0 20px 50px var(--shadow-lg);
  overflow: hidden;
  z-index: 50;
}
.notif-head, .notif-foot {
  padding: 12px 14px;
  font-size: 13px;
  font-weight: 600;
}
.notif-foot { display: block; border-top: 1px solid var(--border); color: var(--cyan); text-align: center; }
#notif-list { list-style: none; margin: 0; padding: 0; max-height: 320px; overflow: auto; }
.notif-item { padding: 10px 14px; border-top: 1px solid var(--border); font-size: 13px; color: var(--text); }
.notif-item p { margin: 4px 0; color: var(--muted); }
.notif-item small { color: var(--muted); opacity: .8; }
.notif-empty { padding: 20px; text-align: center; color: var(--muted); }

.cmd-palette { position: fixed; inset: 0; z-index: 90; display: flex; align-items: flex-start; justify-content: center; padding: 12vh 16px 16px; }
.cmd-palette.hidden { display: none; }
.cmd-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.55); }
.cmd-card { position: relative; width: min(560px, 100%); z-index: 1; padding: 0; overflow: hidden; }
.cmd-search {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}
.cmd-search input { flex: 1; border: 0; background: transparent; color: var(--text); outline: none; font-size: 16px; }
.cmd-list { list-style: none; margin: 0; padding: 8px; max-height: 360px; overflow: auto; }
.cmd-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 14px;
}
.cmd-list li:hover, .cmd-list li.active { background: var(--menu-hover); color: var(--text); }
.cmd-list li svg { width: 16px; height: 16px; color: var(--cyan); }
.cmd-list kbd { margin-left: auto; }

.table-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
  align-items: center;
}
.table-search {
  flex: 1;
  min-width: 200px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border-input);
  background: var(--surface);
}
.table-search svg { width: 16px; height: 16px; color: var(--muted); }
.table-search input { flex: 1; border: 0; background: transparent; color: var(--text); outline: none; }
.status-filters { display: flex; flex-wrap: wrap; gap: 6px; }

.sparkline-wrap { height: 36px; margin-top: 10px; }
.sparkline-wrap canvas { width: 100% !important; height: 36px !important; }

.donut-center-wrap { position: relative; }
.donut-center-label {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.donut-center-label strong { font-size: 28px; font-weight: 800; }
.donut-center-label span { font-size: 12px; color: var(--muted); }

.heatmap-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 4px;
  margin-top: 12px;
}
.heatmap-cell {
  aspect-ratio: 1;
  border-radius: 4px;
  background: var(--heatmap-empty);
  border: 1px solid var(--border);
  cursor: default;
  transition: transform .15s ease;
}
.heatmap-cell:hover { transform: scale(1.15); z-index: 2; }
.heatmap-cell.lv-1 { background: color-mix(in srgb, var(--cyan) 28%, var(--heatmap-empty)); }
.heatmap-cell.lv-2 { background: color-mix(in srgb, var(--cyan) 48%, var(--heatmap-empty)); }
.heatmap-cell.lv-3 { background: color-mix(in srgb, var(--cyan) 68%, var(--heatmap-empty)); }
.heatmap-cell.lv-4 { background: var(--cyan); box-shadow: 0 0 8px var(--cyan-glow); }
.heatmap-legend { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 12px; color: var(--muted); }
.heatmap-legend span { display: flex; gap: 3px; }
.heatmap-legend i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; background: var(--heatmap-empty); }
.heatmap-legend i.lv-1 { background: color-mix(in srgb, var(--cyan) 28%, var(--heatmap-empty)); }
.heatmap-legend i.lv-2 { background: color-mix(in srgb, var(--cyan) 48%, var(--heatmap-empty)); }
.heatmap-legend i.lv-3 { background: color-mix(in srgb, var(--cyan) 68%, var(--heatmap-empty)); }
.heatmap-legend i.lv-4 { background: var(--cyan); }

.task-timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.task-timeline::before {
  content: "";
  position: absolute;
  left: 15px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: linear-gradient(180deg, var(--cyan), var(--pink));
  opacity: .4;
}
.task-timeline li {
  position: relative;
  padding: 12px 12px 12px 44px;
  margin-bottom: 8px;
  background: var(--surface);
  border-radius: 12px;
  border: 1px solid var(--border);
}
.task-timeline li::before {
  content: "";
  position: absolute;
  left: 10px;
  top: 18px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 10px rgba(0,255,255,.6);
}
.task-timeline .tl-meta { font-size: 12px; color: var(--muted); margin-top: 4px; }

.row-flash {
  animation: rowFlash 1.8s ease;
}
@keyframes rowFlash {
  0% { background: rgba(0,255,255,.25); box-shadow: inset 0 0 0 1px rgba(0,255,255,.5); }
  100% { background: inherit; box-shadow: none; }
}

.empty-state .btn-gradient { margin-top: 12px; }

.mobile-cards { display: none; }
@media (max-width: 900px) {
  .table-desktop { display: none; }
  .mobile-cards { display: grid; gap: 12px; }
  .mobile-card {
    padding: 14px;
    border-radius: 16px;
    background: var(--card);
    border: 1px solid var(--border);
  }
  .mobile-card-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
  .skel-grid { grid-template-columns: repeat(2, 1fr); }
  .heatmap-grid { grid-template-columns: repeat(7, 1fr); }
  .top-header { flex-direction: column; align-items: stretch; }
  .search-global-wrap { display: none !important; }
}

.value.count-up { font-variant-numeric: tabular-nums; }

/* Login */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.login-card {
  width: min(420px, 100%);
  padding: 28px;
}
.login-brand { margin-bottom: 8px; }
.login-brand .logo { font-size: 20px; margin: 0; }
.login-sub { margin-bottom: 20px; }
.login-hint { margin-top: 16px; font-size: 12px; text-align: center; }
.login-hint code {
  padding: 2px 6px;
  border-radius: 6px;
  background: var(--cyan-dim);
  color: var(--cyan);
}

/* Açık tema ince ayar */
html[data-theme="light"] .badge.ok { color: #15803d; background: rgba(22, 163, 74, 0.12); }
html[data-theme="light"] .badge.warn { color: #a16207; background: rgba(234, 179, 8, 0.15); }
html[data-theme="light"] .badge.bad { color: #b91c1c; background: rgba(239, 68, 68, 0.12); }
html[data-theme="light"] .menu-badge { color: #fff; }
html[data-theme="light"] .btn-gradient { color: #fff; }
html[data-theme="light"] .stat-green .stat-icon { color: #16a34a; }
html[data-theme="light"] .stat-pink .stat-icon { color: #be185d; }
html[data-theme="light"] .stat-purple .stat-icon { color: #7c3aed; }

.quick-empty {
  text-align: center;
  padding: 20px 12px;
  color: var(--muted);
}
.quick-empty svg { width: 40px; height: 40px; margin: 0 auto 10px; color: var(--cyan); opacity: .7; }

/* ── Help FAB ── */
.help-fab {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 999;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--cyan);
  background: var(--card);
  color: var(--cyan);
  font-size: 1.25rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 16px var(--cyan-glow);
  transition: transform .2s, box-shadow .2s;
}
.help-fab:hover {
  transform: scale(1.12);
  box-shadow: 0 0 24px var(--cyan-glow);
}

/* ── Help Drawer ── */
.help-drawer {
  position: fixed;
  inset: 0; z-index: 1001;
  display: flex;
  justify-content: flex-end;
  pointer-events: none;
  opacity: 0;
  transition: opacity .25s;
}
.help-drawer.open {
  pointer-events: auto;
  opacity: 1;
}
.help-drawer .help-drawer-panel {
  width: min(420px, 90vw);
  height: 100%;
  overflow-y: auto;
  border-radius: 0;
  border-left: 1px solid var(--border);
  transform: translateX(100%);
  transition: transform .3s ease;
  box-shadow: -8px 0 32px rgba(0,0,0,.4);
}
.help-drawer.open .help-drawer-panel {
  transform: translateX(0);
}
.help-content h4 {
  font-size: .85rem;
  font-weight: 600;
  margin: 1rem 0 .35rem;
  color: var(--cyan);
  display: flex;
  align-items: center;
  gap: 6px;
}
.help-content h4:first-child { margin-top: 0; }
.help-content ul { list-style: disc; padding-left: 1.25rem; font-size: .82rem; line-height: 1.7; color: var(--text); }
.help-content li { margin-bottom: 2px; }
.help-content p { font-size: .82rem; line-height: 1.6; color: var(--muted); margin-bottom: 6px; }
.help-content kbd { font-size: .7rem; padding: 1px 5px; border-radius: 3px; background: var(--bg-1); border: 1px solid var(--border); }
.help-kbd-list { list-style: none; padding: 0 !important; }
.help-kbd-list li { display: flex; align-items: center; gap: 8px; font-size: .8rem; padding: 3px 0; }
.help-kbd-list kbd { min-width: 20px; text-align: center; }

/* ── Tweet Yönetimi / Phone Mockup ── */
.tweet-layout {
  display: flex; gap: 24px; align-items: flex-start;
}
.tweet-phone-wrap {
  flex: 0 0 auto;
}
.phone-frame {
  width: 375px; height: 740px;
  background: #000;
  border-radius: 48px;
  border: 3px solid var(--border-strong);
  position: relative;
  overflow: hidden;
  box-shadow: 0 0 0 1px #333, 0 20px 60px rgba(0,0,0,.6);
}
.phone-notch {
  position: absolute; top: 12px; left: 50%; transform: translateX(-50%);
  width: 120px; height: 28px; background: #000; border-radius: 0 0 16px 16px; z-index: 10;
}
.phone-screen {
  height: 100%; width: 100%;
  background: #15202b; color: #e7e9ea;
  display: flex; flex-direction: column;
}
.x-topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px 6px; border-bottom: 1px solid #2f3336;
}
.x-topbar .x-logo {
  color: #e7e9ea; display: flex; align-items: center;
}
.x-tabs {
  display: flex; gap: 0; position: absolute; left: 50%; transform: translateX(-50%);
}
.x-tab {
  font-size: .85rem; font-weight: 500; padding: 8px 14px; cursor: pointer;
  color: #71767b; border-bottom: 3px solid transparent; transition: color .15s;
}
.x-tab.active { color: #e7e9ea; border-bottom-color: #1d9bf0; }
.x-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: #333; color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: .75rem; font-weight: 700; cursor: pointer;
}
.x-timeline {
  flex: 1; overflow-y: auto; padding-bottom: 8px;
}
.x-timeline::-webkit-scrollbar { width: 4px; }
.x-timeline::-webkit-scrollbar-thumb { background: #333; border-radius: 3px; }
.x-tweet {
  display: flex; gap: 10px; padding: 12px 16px;
  border-bottom: 1px solid #2f3336; cursor: pointer;
}
.x-tweet:hover { background: rgba(255,255,255,.03); }
.x-tweet-avatar {
  flex: 0 0 40px; width: 40px; height: 40px; border-radius: 50%;
  overflow: hidden; background: #333;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: .9rem; color: #fff;
}
.x-tweet-avatar img { width: 100%; height: 100%; object-fit: cover; }
.x-tweet-body { flex: 1; min-width: 0; }
.x-tweet-header { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; font-size: .82rem; }
.x-tweet-name { font-weight: 700; color: #e7e9ea; }
.x-tweet-username, .x-tweet-time { color: #71767b; }
.x-tweet-text { font-size: .88rem; line-height: 1.4; margin: 4px 0 8px; word-break: break-word; color: #e7e9ea; }
.x-tweet-text .x-link { color: #1d9bf0; }
.x-tweet-actions {
  display: flex; gap: 24px; color: #71767b; font-size: .75rem;
}
.x-act { display: flex; align-items: center; gap: 4px; }
.x-act svg { width: 16px; height: 16px; }
.x-act:hover:nth-child(1) { color: #1d9bf0; }
.x-act:hover:nth-child(2) { color: #00ba7c; }
.x-act:hover:nth-child(3) { color: #f91880; }
.x-loading { padding: 24px 16px; display: flex; flex-direction: column; gap: 16px; }
.x-pulse { height: 60px; background: linear-gradient(90deg, #1e2732 25%, #273340 50%, #1e2732 75%); background-size: 200% 100%; animation: xPulse 1.4s ease infinite; border-radius: 8px; }
@keyframes xPulse { 0%{background-position:200% 0} 100%{background-position:-200% 0} }
.x-empty { padding: 40px 20px; text-align: center; color: #71767b; font-size: .85rem; }
.x-empty .btn-outline { margin-top: 12px; }
.x-compose-bar {
  border-top: 1px solid #2f3336; background: #000; padding: 8px 12px 12px;
}
.x-compose-inner { display: flex; gap: 10px; align-items: flex-end; }
.x-compose-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: #333; color: #fff;
  display: flex; align-items: center; justify-content: center;
  flex: 0 0 32px; font-weight: 700; font-size: .7rem;
}
.x-compose-input-wrap { flex: 1; }
.x-compose-input {
  width: 100%; background: transparent; border: none; outline: none;
  color: #e7e9ea; font-size: .9rem; resize: none; line-height: 1.4;
  padding: 4px 0; font-family: inherit;
}
.x-compose-input::placeholder { color: #71767b; }
.x-tweet-btn {
  background: #1d9bf0; color: #fff; border: none;
  border-radius: 9999px; padding: 6px 16px; font-weight: 700;
  font-size: .82rem; cursor: pointer; transition: background .15s;
}
.x-tweet-btn:hover { background: #1a8cd8; }
.x-tweet-btn:disabled { opacity: .5; cursor: not-allowed; }
.x-compose-bottom {
  display: flex; justify-content: flex-end; align-items: center;
  margin-top: 2px; font-size: .75rem; color: #71767b;
}
.x-char-count { min-width: 24px; text-align: right; }

/* ── Side Panel ── */
.tweet-side {
  flex: 1; display: flex; flex-direction: column; gap: 16px;
  min-width: 280px; max-height: 740px; overflow-y: auto;
}
.tweet-side .panel-card { background: var(--card); border-radius: 12px; border: 1px solid var(--border); overflow: hidden; }
.panel-card-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; border-bottom: 1px solid var(--border);
}
.panel-card-header h3 { font-size: .85rem; font-weight: 600; display: flex; align-items: center; gap: 6px; margin: 0; }
.panel-card-header svg { width: 16px; height: 16px; }
.analytics-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--border); }
.stat-mini { background: var(--card); padding: 14px 16px; text-align: center; }
.stat-label { display: block; font-size: .7rem; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
.stat-value { display: block; font-size: 1.3rem; font-weight: 700; color: var(--text); margin-top: 2px; }
.history-list { padding: 8px 0; max-height: 320px; overflow-y: auto; }
.history-item { padding: 8px 16px; border-bottom: 1px solid var(--border); }
.history-item:last-child { border-bottom: none; }
.history-text { font-size: .82rem; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.history-meta { display: flex; align-items: center; gap: 8px; margin-top: 4px; font-size: .7rem; color: var(--muted); }
.history-meta a { color: var(--cyan); }
.badge { display: inline-block; padding: 1px 6px; border-radius: 4px; font-size: .65rem; font-weight: 600; }
.badge.ok { background: rgba(0,200,100,.15); color: #00c864; }
.badge.warn { background: rgba(255,200,0,.12); color: #ffc800; }

/* ── Archetype Personas ── */
.persona-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}
.persona-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  transition: border-color .15s, transform .15s;
  position: relative;
}
.persona-card:hover { border-color: var(--accent); transform: translateY(-1px); }
.persona-card.seed { border-left: 3px solid var(--green, #2ecc71); }
.persona-avatar {
  width: 44px; height: 44px; min-width: 44px;
  border-radius: 50%;
  background: var(--surface);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid var(--border);
}
.persona-avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-fallback {
  width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--accent), #6366f1);
  font-weight: 700; font-size: 18px; color: #fff;
}
.persona-info { flex: 1; min-width: 0; cursor: pointer; }
.persona-name { font-weight: 600; font-size: 15px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.persona-meta { font-size: 13px; color: var(--text-muted); margin-top: 2px; }
.persona-interests { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.persona-interests .tag { font-size: 11px; padding: 1px 8px; border-radius: 99px; background: var(--surface); color: var(--text-muted); border: 1px solid var(--border); }
.persona-actions { display: flex; flex-direction: column; gap: 4px; }
.btn-demo {
  background: none; border: 1px solid var(--border); border-radius: 8px;
  padding: 6px; cursor: pointer; color: var(--text-muted); line-height: 0;
  transition: all .15s;
}
.btn-demo:hover { border-color: var(--accent); color: var(--accent); background: var(--accent); color: #fff; }
.persona-card .persona-status {
  width: 8px; height: 8px; min-width: 8px;
  border-radius: 50%; margin-top: 4px;
  background: #666;
}
.persona-status.active { background: var(--green, #2ecc71); }
.persona-status.inactive { background: #e74c3c; }
.badge { font-size: 10px; padding: 1px 6px; border-radius: 4px; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; }
.badge-seed { background: #2ecc7133; color: #2ecc71; }
.badge-kadin { background: #e91e6333; color: #e91e63; }
.badge-erkek { background: #2196f333; color: #2196f3; }
.badge-active { background: #2ecc7133; color: #2ecc71; }
.badge-inactive { background: #e74c3c33; color: #e74c3c; }

.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.detail-item label { display: block; font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 2px; }
.detail-item span { font-size: 14px; }
.detail-section { margin-top: 16px; }
.detail-section label { display: block; font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 4px; }
.detail-section p { font-size: 14px; line-height: 1.5; margin: 0; }

.modal-actions { display: flex; gap: 8px; }
.btn-sm { padding: 4px 10px; font-size: 12px; }
.input-group { display: flex; align-items: stretch; }
.input-prefix { display: flex; align-items: center; padding: 0 10px; background: var(--surface); border: 1px solid var(--border); border-right: none; border-radius: 8px 0 0 8px; color: var(--text-muted); font-size: 14px; }
.input-group .field { border-radius: 0 8px 8px 0; }
.toggle-group { display: flex; align-items: center; gap: 8px; }
.toggle-label { display: flex; align-items: center; gap: 6px; font-size: 13px; cursor: pointer; }
.toggle-label input[type="checkbox"] { width: 16px; height: 16px; }

.demo-tweet {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 8px;
  font-size: 14px;
  line-height: 1.5;
  position: relative;
}
.demo-tweet::before {
  content: '';
  position: absolute; top: 0; left: 0; bottom: 0; width: 3px;
  border-radius: 8px 0 0 8px;
  background: linear-gradient(180deg, var(--accent), #6366f1);
}

/* ── Phone responsive ── */
@media (max-width: 900px) {
  .tweet-layout { flex-direction: column; align-items: center; }
  .tweet-side { max-height: none; width: 100%; min-width: 0; }
  .phone-frame { width: 340px; height: 660px; }
}
