@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@500;600;700&display=swap');

:root {
  --bg-dark: #0f172a;
  --bg-panel: rgba(15, 23, 42, 0.82);
  --bg-card: rgba(30, 41, 59, 0.7);
  --border-color: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  --accent-indigo: #6366f1;
  --accent-indigo-hover: #4f46e5;
  --accent-purple: #a855f7;
  --accent-emerald: #10b981;
  --accent-amber: #f59e0b;
  --accent-rose: #ef4444;

  --channel-general: #3b82f6;
  --channel-goldtalk: #f59e0b;
  --channel-signals: #10b981;
  --channel-news: #06b6d4;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  --sidebar-width: 244px;
  --backdrop-blur: blur(12px);
  --transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
  --mono: 'SFMono-Regular', ui-monospace, Menlo, Consolas, monospace;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* `hidden` özniteliğinin varsayılan display:none'ı, aşağıdaki display:flex
   kurallarının altında kalır — panelde gizlenen öğeler (kullanıcı profili,
   dil seçici, "daha fazla" butonu) görünür kalırdı. */
[hidden] {
  display: none !important;
}

body {
  background-color: var(--bg-dark);
  background-image:
    radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.12) 0, transparent 50%),
    radial-gradient(at 100% 100%, rgba(168, 85, 247, 0.1) 0, transparent 50%);
  background-attachment: fixed;
  color: var(--text-main);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  min-height: 100vh;
}

/* ---------- Kabuk ---------- */
.app-shell {
  display: grid;
  grid-template-columns: var(--sidebar-width) 1fr;
  min-height: 100vh;
}

.sidebar {
  background: var(--bg-panel);
  backdrop-filter: var(--backdrop-blur);
  -webkit-backdrop-filter: var(--backdrop-blur);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding: 1.25rem 0.875rem;
  position: sticky;
  top: 0;
  height: 100vh;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0 0.375rem;
}

.brand-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  object-fit: cover;
  flex-shrink: 0;
  display: block;
  background: #000;
}

.brand-title {
  display: block;
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 1rem;
}

.brand-badge {
  display: block;
  font-size: 0.7rem;
  color: var(--text-dim);
  letter-spacing: 0.03em;
}

.side-nav {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  overflow-y: auto;
  flex: 1;
}

.nav-btn {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  width: 100%;
  padding: 0.625rem 0.75rem;
  background: transparent;
  border: none;
  border-radius: var(--radius-md);
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.875rem;
  text-align: left;
  cursor: pointer;
  transition: var(--transition);
}

.nav-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
}

.nav-btn.active {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.22),
      rgba(168, 85, 247, 0.14));
  color: var(--text-main);
  box-shadow: inset 0 0 0 1px rgba(99, 102, 241, 0.35);
}

.nav-icon {
  font-size: 0.95rem;
  width: 1.15rem;
  text-align: center;
}

.nav-badge {
  margin-left: auto;
  min-width: 1.4rem;
  padding: 0.1rem 0.4rem;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  text-align: center;
  color: var(--text-muted);
}

.nav-badge.warn {
  background: rgba(239, 68, 68, 0.22);
  color: #fca5a5;
}

.sidebar-footer {
  padding: 0 0.375rem;
}

.status-indicator {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.65rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  color: var(--text-muted);
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-dim);
  flex-shrink: 0;
}

.dot.online {
  background: var(--accent-emerald);
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.7);
}

.dot.offline {
  background: var(--accent-rose);
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.7);
}

.app-body {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.125rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: var(--backdrop-blur);
  -webkit-backdrop-filter: var(--backdrop-blur);
  position: sticky;
  top: 0;
  z-index: 40;
}

.page-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.35rem;
  font-weight: 600;
}

.page-subtitle {
  font-size: 0.8rem;
  color: var(--text-dim);
}

.header-status {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding-left: 0.75rem;
  border-left: 1px solid var(--border-color);
}

.avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-indigo),
      var(--accent-purple));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
}

.user-info {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.user-name {
  font-size: 0.85rem;
  font-weight: 500;
}

.user-role {
  font-size: 0.7rem;
  color: var(--text-dim);
}

.app-main {
  padding: 1.5rem;
  flex: 1;
}

.tab-content {
  display: none;
  flex-direction: column;
  gap: 1.25rem;
}

.tab-content.active {
  display: flex;
}

/* ---------- Kartlar ---------- */
.glass-card {
  background: var(--bg-card);
  backdrop-filter: var(--backdrop-blur);
  -webkit-backdrop-filter: var(--backdrop-blur);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.section-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1rem;
  font-weight: 600;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.muted-note {
  font-size: 0.78rem;
  color: var(--text-dim);
}

.two-col {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 1.25rem;
}

/* ---------- Stat kartları ---------- */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.875rem;
}

.stat-grid.inner {
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

.stat-card {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 0.95rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.stat-value {
  font-family: 'Outfit', sans-serif;
  font-size: 1.4rem;
  font-weight: 600;
}

.stat-value.warn { color: var(--accent-amber); }
.stat-value.danger { color: var(--accent-rose); }

.stat-note {
  font-size: 0.72rem;
  color: var(--text-dim);
}

.meter {
  height: 5px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.meter-fill {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width 0.4s ease;
}

.meter-fill.ok { background: var(--accent-emerald); }
.meter-fill.warn { background: var(--accent-amber); }
.meter-fill.danger { background: var(--accent-rose); }
.meter-fill.dim { background: var(--text-dim); }

/* ---------- Servis özeti ---------- */
.unit-summary,
.unit-row,
.mini-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--border-color);
}

.unit-row:last-child,
.mini-row:last-child {
  border-bottom: none;
}

.unit-row span,
.mini-row span {
  display: flex;
  flex-direction: column;
}

/* ---------- Veri tazeliği ---------- */
.freshness-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 0.75rem;
}

.freshness-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.75rem 0.875rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
}

.freshness-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.freshness-label {
  font-size: 0.85rem;
  font-weight: 500;
}

.freshness-time {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.freshness-unit {
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--text-dim);
}

/* ---------- Tablolar ---------- */
.table-scroll {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.data-table th {
  text-align: left;
  padding: 0.6rem 0.75rem;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-dim);
  border-bottom: 1px solid var(--border-color);
  white-space: nowrap;
}

.data-table td {
  padding: 0.7rem 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  vertical-align: top;
}

.data-table tr:last-child td {
  border-bottom: none;
}

.data-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.03);
}

.cell-sub {
  display: block;
  font-size: 0.73rem;
  color: var(--text-dim);
}

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

.placeholder-cell {
  padding: 1.75rem 0.75rem;
  text-align: center;
  color: var(--text-dim);
  font-size: 0.85rem;
}

.ok-text {
  color: var(--accent-emerald) !important;
}

.table-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 0.875rem;
}

.row-actions {
  display: flex;
  gap: 0.35rem;
  align-items: center;
}

.row-actions.wrap {
  flex-wrap: wrap;
}

/* ---------- Rozetler ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-full);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.badge-ok { background: rgba(16, 185, 129, 0.18); color: #6ee7b7; }
.badge-warn { background: rgba(245, 158, 11, 0.18); color: #fcd34d; }
.badge-danger { background: rgba(239, 68, 68, 0.18); color: #fca5a5; }
.badge-purple { background: rgba(168, 85, 247, 0.2); color: #d8b4fe; }
.badge-dim { background: rgba(255, 255, 255, 0.07); color: var(--text-muted); }

/* ---- Simülasyon playground'u ---- */

.check-inline {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Bağımlılıksız SVG fiyat grafiği; nokta sayısı değiştikçe yeniden çizilir. */
.price-chart {
  display: block;
  width: 100%;
  height: 160px;
  margin: 0.75rem 0 0.25rem;
}

.tone-up { color: #6ee7b7; }
.tone-down { color: #fca5a5; }

/* ---- Mum grafiği (test tezgâhı) ---- */

.candle-chart {
  display: block;
  width: 100%;
  height: 420px;
  margin: 0.75rem 0;
  background: rgba(0, 0, 0, 0.25);
  border-radius: var(--radius-md, 8px);
}

.candle-up { stroke: #10b981; }
.candle-down { stroke: #ef4444; }
.candle-up-fill { fill: #10b981; }
.candle-down-fill { fill: #ef4444; }

.st-up { stroke: #10b981; stroke-width: 2; }
.st-down { stroke: #ef4444; stroke-width: 2; }

/* Premium = satış baskın (kırmızı), Discount = alım baskın (mavi) —
   müşterinin TradingView'da alıştığı renk kodu korunur. */
.zone-premium { fill: #ef4444; fill-opacity: 0.1; }
.zone-discount { fill: #3b82f6; fill-opacity: 0.12; }
.zone-eq { fill: #94a3b8; fill-opacity: 0.1; }

.chart-label-buy {
  fill: #10b981;
  font-size: 13px;
  font-weight: 700;
}

.chart-label-sell {
  fill: #ef4444;
  font-size: 13px;
  font-weight: 700;
}

/* Fiyat yön değiştirince kısa bir renk vurgusu. */
.price-up { animation: price-up 0.9s ease-out 1; }
.price-down { animation: price-down 0.9s ease-out 1; }

@keyframes price-up {
  0% { color: #6ee7b7; }
  100% { color: inherit; }
}

@keyframes price-down {
  0% { color: #fca5a5; }
  100% { color: inherit; }
}

/* Canlı Firestore akışı bağlıyken başlıkta yanan nokta. */
.live-dot {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-left: 0.5rem;
  padding: 0.1rem 0.5rem;
  border-radius: var(--radius-full);
  background: rgba(16, 185, 129, 0.15);
  color: #6ee7b7;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  vertical-align: middle;
}

.live-dot::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10b981;
  animation: live-pulse 1.6s ease-in-out infinite;
}

@keyframes live-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.25; }
}

/* Akışta yeni düşen satır — bir kez parlar, sonra normale döner. */
.row-flash {
  animation: row-flash 2.5s ease-out 1;
}

@keyframes row-flash {
  0% { background: rgba(16, 185, 129, 0.28); }
  100% { background: transparent; }
}

/* Hareket hassasiyeti olan kullanıcılarda animasyon kapatılır. */
@media (prefers-reduced-motion: reduce) {
  .live-dot::before,
  .row-flash,
  .price-up,
  .price-down {
    animation: none;
  }
}

.badge-channel { background: rgba(255, 255, 255, 0.07); }
.badge-channel.channel-general { color: var(--channel-general); }
.badge-channel.channel-goldTalk { color: var(--channel-goldtalk); }
.badge-channel.channel-signals { color: var(--channel-signals); }
.badge-channel.channel-news { color: var(--channel-news); }

/* ---------- Butonlar ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.5rem 0.9rem;
  background: linear-gradient(135deg, var(--accent-indigo),
      var(--accent-indigo-hover));
  border: none;
  border-radius: var(--radius-md);
  color: #fff;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.btn:hover:not(:disabled) {
  filter: brightness(1.1);
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn-sm {
  padding: 0.32rem 0.6rem;
  font-size: 0.75rem;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--border-color);
  color: var(--text-main);
}

.btn-warning {
  background: linear-gradient(135deg, #f59e0b, #d97706);
}

.btn-danger {
  background: linear-gradient(135deg, #ef4444, #dc2626);
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 0.8rem;
  cursor: pointer;
  transition: var(--transition);
}

.icon-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-main);
}

.icon-btn.danger:hover {
  background: rgba(239, 68, 68, 0.18);
  color: #fca5a5;
}

/* ---------- Formlar ---------- */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 0.875rem;
  flex: 1;
}

.form-row {
  display: flex;
  gap: 0.875rem;
}

.form-label {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.form-input,
.form-select,
.search-input,
.compose-input,
.channel-select {
  width: 100%;
  padding: 0.55rem 0.75rem;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.85rem;
  transition: var(--transition);
}

.form-input:focus,
.form-select:focus,
.search-input:focus,
.compose-input:focus {
  outline: none;
  border-color: var(--accent-indigo);
}

textarea.form-input {
  resize: vertical;
  min-height: 72px;
}

.form-select.compact {
  width: auto;
  padding: 0.32rem 0.55rem;
  font-size: 0.75rem;
}

/* Ayarlar sekmesi: alanları iki sütuna dizer, dar ekranda tek sütuna düşer. */
.settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.25rem 1rem;
  align-items: end;
}

.form-actions {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
  margin-top: 1rem;
}

.check-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
  color: var(--text-muted);
  cursor: pointer;
}

.search-box {
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 0.65rem;
  font-size: 0.8rem;
  color: var(--text-dim);
}

.search-input {
  padding-left: 2rem;
  min-width: 240px;
}

.preview-box {
  margin-top: 0.875rem;
  padding: 0.875rem 1rem;
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: var(--radius-md);
  font-size: 0.85rem;
}

.lookup-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin: 0.875rem 0;
  padding: 0.875rem 1rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
}

/* ---------- Sohbet ---------- */
.chat-dashboard {
  display: grid;
  grid-template-columns: 230px 1fr;
  gap: 1.25rem;
  min-height: 70vh;
}

.channel-sidebar {
  align-self: start;
}

.sidebar-title {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-dim);
  margin-bottom: 0.75rem;
}

.channel-list {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.channel-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.55rem 0.7rem;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
}

.channel-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
}

.channel-item.active {
  background: rgba(99, 102, 241, 0.16);
  color: var(--text-main);
}

.channel-info-pill {
  padding: 0.08rem 0.42rem;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-full);
  font-size: 0.68rem;
}

.chat-container {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 0.875rem;
  border-bottom: 1px solid var(--border-color);
}

.chat-title {
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  max-height: 58vh;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: 0.875rem 0;
}

.message-card {
  padding: 0.7rem 0.875rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
}

.message-card.is-admin {
  border-color: rgba(168, 85, 247, 0.35);
  background: rgba(168, 85, 247, 0.07);
}

.message-card.is-deleted {
  opacity: 0.55;
}

.message-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 0.4rem;
}

.author-block {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.author-name {
  font-size: 0.85rem;
  font-weight: 600;
}

.author-uid {
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--text-dim);
}

.message-tools {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.message-actions {
  display: flex;
  gap: 0.25rem;
}

.message-body {
  font-size: 0.88rem;
  color: var(--text-main);
  word-break: break-word;
}

.chat-compose {
  display: flex;
  gap: 0.5rem;
  padding-top: 0.875rem;
  border-top: 1px solid var(--border-color);
}

.channel-select {
  width: auto;
  flex-shrink: 0;
}

/* ---------- Şikayet kartları ---------- */
.report-card {
  padding: 0.875rem 1rem;
  margin-bottom: 0.75rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
}

.report-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 0.6rem;
}

.report-head > div:first-child {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.report-message {
  padding: 0.65rem 0.8rem;
  background: rgba(15, 23, 42, 0.55);
  border-radius: var(--radius-sm);
  margin-bottom: 0.5rem;
}

.report-message.is-deleted {
  opacity: 0.55;
}

.report-message p {
  margin-top: 0.3rem;
  font-size: 0.85rem;
  word-break: break-word;
}

/* ---------- Detay & JSON ---------- */
.fact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.6rem;
  margin-bottom: 1rem;
}

.fact {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.6rem 0.75rem;
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--radius-sm);
}

.fact-label {
  font-size: 0.7rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.fact-value {
  font-size: 0.82rem;
  word-break: break-all;
}

.json-view,
.log-view {
  max-height: 340px;
  overflow: auto;
  padding: 0.875rem;
  background: rgba(2, 6, 23, 0.75);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-family: var(--mono);
  font-size: 0.75rem;
  line-height: 1.55;
  color: var(--text-muted);
  white-space: pre-wrap;
  word-break: break-word;
}

.log-view {
  max-height: 60vh;
}

.analysis-card {
  margin-bottom: 1rem;
}

/* ---------- Modal ---------- */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, 0.72);
  backdrop-filter: blur(4px);
  z-index: 100;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.modal-overlay.active {
  display: flex;
}

.modal-box {
  width: 100%;
  max-width: 440px;
  max-height: 88vh;
  overflow-y: auto;
  padding: 1.35rem;
  background: #111c33;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

.modal-box.wide {
  max-width: 880px;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.modal-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.05rem;
  font-weight: 600;
}

.login-error {
  margin-top: 0.875rem;
  padding: 0.6rem 0.75rem;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: var(--radius-md);
  color: #fca5a5;
  font-size: 0.8rem;
}

/* ---------- Toast ---------- */
.toast-container {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  z-index: 200;
}

.toast {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1rem;
  background: #111c33;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.4);
  font-size: 0.85rem;
  animation: toast-in 0.2s ease;
}

.toast.success { border-color: rgba(16, 185, 129, 0.45); }
.toast.error { border-color: rgba(239, 68, 68, 0.45); }

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

/* ---------- Kaydırma çubukları ---------- */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.5);
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
    flex-direction: row;
    align-items: center;
    gap: 1rem;
    border-right: none;
    border-bottom: 1px solid var(--border-color);
    overflow-x: auto;
  }

  .side-nav {
    flex-direction: row;
    flex: 1;
  }

  .nav-btn {
    white-space: nowrap;
  }

  .sidebar-footer {
    flex-shrink: 0;
  }

  .chat-dashboard {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .app-main {
    padding: 1rem;
  }

  .app-header {
    flex-wrap: wrap;
  }

  .search-input {
    min-width: 160px;
  }

  .form-row {
    flex-direction: column;
    gap: 0;
  }
}

/* Yapı kırılımı (BOS/CHoCH) ve Order Block kutuları. */
.smc-buy { stroke: #10b981; stroke-width: 1; }
.smc-sell { stroke: #ef4444; stroke-width: 1; }

.smc-buy-label {
  fill: #6ee7b7;
  font-size: 10px;
  font-weight: 700;
}

.smc-sell-label {
  fill: #fca5a5;
  font-size: 10px;
  font-weight: 700;
}

/* Müşterinin TradingView'da alıştığı renk kodu: yükseliş OB'si yeşil. */
.ob-buy { fill: #10b981; fill-opacity: 0.18; }
.ob-sell { fill: #ef4444; fill-opacity: 0.18; }

/* ---- Sinyal motorları panosu ---- */
/* Kartlar yan yana; dar ekranda tek sütuna düşer. Motor rengi hem kartta hem
   kümülatif eğride AYNI kullanılır — karşılaştırmayı göz takip edebilsin. */
.engine-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 16px;
}

.engine-card {
  margin: 0;
}

.engine-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 6px;
  vertical-align: middle;
}

.engine-legend-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  margin-top: 8px;
  font-size: 13px;
  color: var(--text-muted);
}

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

.engine-diag-block {
  margin-bottom: 18px;
}

.engine-reason {
  margin: 8px 0;
}

.engine-reason-label {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  margin-bottom: 4px;
}

.engine-bar {
  height: 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.07);
  overflow: hidden;
}

.engine-bar-fill {
  height: 100%;
  border-radius: 3px;
  background: var(--accent-amber, #f59e0b);
}

.engine-bar-fill.ok {
  background: var(--accent-emerald, #10b981);
}

.danger-text {
  color: var(--accent-rose, #ef4444);
}

.engine-sim-line {
  color: var(--accent-purple, #a855f7);
}
