@import '../_admin-variables';
@import '../_admin-mixins';

:host { display: block; padding-bottom: 32px; }

/* ── BAŞLIK ──────────────────────────────────────────────────────────── */
.db-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}
.db-header-sol { display: flex; align-items: center; }
.db-header-sag {
  display: flex;
  align-items: center;
  gap: 12px;
}
.db-baslik-grup {
  display: flex;
  align-items: center;
  gap: 12px;
}
.db-baslik-ikon {
  font-size: 28px;
  color: #1890ff;
}
.db-baslik {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  color: #1a1a2e;
  line-height: 1.2;
}
.db-altbaslik {
  margin: 0;
  font-size: 12px;
  color: #8c8c8c;
}
.son-guncelleme-etiket {
  font-size: 12px;
  color: #8c8c8c;
  background: #f5f5f5;
  padding: 4px 10px;
  border-radius: 20px;
  display: flex;
  align-items: center;
}
.yenile-yazi {
  margin-left: 4px;
}

/* ── BÖLÜM ARALIĞI ────────────────────────────────────────────────────── */
.db-bolum {
  margin-bottom: 4px;
}

/* ── KART TEMEL STİLİ ─────────────────────────────────────────────────── */
.db-kart {
  border-radius: @admin-radius-lg;
  box-shadow: @admin-shadow-md;
  transition: box-shadow 0.25s ease, transform 0.25s ease;
  height: 100%;
}
.db-kart:hover {
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.1);
}

/* ── TREND GRAFİĞİ ────────────────────────────────────────────────────── */
.trend-grafik {
  display: flex;
  gap: 0;
  height: 180px;
  align-items: stretch;
}
.trend-y-eksen {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 0 8px 24px 0;
  font-size: 11px;
  color: #bbb;
  text-align: right;
  min-width: 32px;
}
.trend-barlar {
  display: flex;
  flex: 1;
  align-items: flex-end;
  justify-content: space-around;
  gap: 6px;
  padding-bottom: 24px;
}
.trend-bar-sutun {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  cursor: pointer;
}
.trend-bar-deger {
  font-size: 11px;
  font-weight: 700;
  color: #555;
  margin-bottom: 4px;
}
.trend-bar-track {
  width: 100%;
  max-width: 44px;
  height: 120px;
  display: flex;
  align-items: flex-end;
  background: #f5f5f5;
  border-radius: 6px 6px 0 0;
  overflow: hidden;
}
.trend-bar-dolgu {
  width: 100%;
  background: linear-gradient(180deg, #91caff 0%, #1890ff 100%);
  border-radius: 6px 6px 0 0;
  transition: height 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
  min-height: 4px;
}
.trend-bar-bugun {
  background: linear-gradient(180deg, #b37feb 0%, #722ed1 100%);
}
.trend-bar-gun {
  font-size: 11px;
  color: #888;
  margin-top: 6px;
  font-weight: 500;
}

/* ── YÜZ TANIMA WIDGET ───────────────────────────────────────────────── */
.yuz-kart ::ng-deep .ant-card-body {
  padding: 16px;
}
.yuz-kuyruk-baslik {
  display: flex;
  align-items: center;
  font-size: 13px;
  margin-bottom: 10px;
}
.yuz-kuyruk-barlar {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.yk-satir {
  display: flex;
  align-items: center;
  gap: 8px;
}
.yk-etiket {
  font-size: 12px;
  color: #666;
  width: 68px;
  flex-shrink: 0;
}
.yk-satir nz-progress {
  flex: 1;
}
.yk-sayi {
  font-size: 12px;
  font-weight: 700;
  color: #333;
  width: 28px;
  text-align: right;
}
.hata-sayi { color: #ff4d4f; }
.yuz-gauge-bolum {
  display: flex;
  align-items: center;
  gap: 16px;
}
.gauge-bilgi {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.gauge-bilgi strong {
  font-size: 13px;
  color: #333;
}
.gauge-aciklama {
  font-size: 11px;
  color: #999;
}
.gauge-detaylar {
  display: flex;
  gap: 8px;
  font-size: 11px;
  color: #722ed1;
  font-weight: 600;
  margin-top: 4px;
}

/* ── AKTİVİTE TİMLİNE ────────────────────────────────────────────────── */
.aktivite-kart ::ng-deep .ant-card-body {
  max-height: 420px;
  overflow-y: auto;
  padding: 16px;
}
.aktivite-kart ::ng-deep .ant-card-body::-webkit-scrollbar {
  width: 4px;
}
.aktivite-kart ::ng-deep .ant-card-body::-webkit-scrollbar-thumb {
  background: #e0e0e0;
  border-radius: 4px;
}
.aktivite-timeline ::ng-deep .ant-timeline-item {
  padding-bottom: 12px;
}
.aktivite-satir {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.aktivite-avatar-blok {
  flex-shrink: 0;
  margin-top: 1px;
}
.aktivite-avatar-img {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  overflow: hidden;
  border: 1px solid #f0f0f0;
}
.aktivite-icerik {
  flex: 1;
  min-width: 0;
}
.aktivite-ust {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}
.aktivite-kullanici {
  font-size: 13px;
  font-weight: 600;
  color: #333;
}
.aktivite-ayirici {
  color: #ccc;
}
.aktivite-aksiyon {
  font-size: 12px;
  color: #666;
}
.aksiyon-paylasim { color: #1890ff; }
.aksiyon-yorum { color: #52c41a; }
.aksiyon-kayit { color: #722ed1; }
.aksiyon-rapor { color: #ff4d4f; }
.aksiyon-yuz { color: #fa8c16; }
.aktivite-alt {
  display: flex;
  align-items: center;
  margin-top: 2px;
}
.aktivite-zaman {
  font-size: 11px;
  color: #aaa;
}

/* ── HIZLI ERİŞİM ────────────────────────────────────────────────────── */
.hizli-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.hizli-kart {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 10px;
  background: #fafafa;
  border: 1px solid #f0f0f0;
  transition: all 0.2s ease;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}
.hizli-kart:hover {
  background: color-mix(in srgb, var(--hizli-renk) 8%, #fff);
  border-color: var(--hizli-renk);
  transform: translateX(3px);
}
.hizli-ikon-cerceve {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  background: color-mix(in srgb, var(--hizli-renk) 15%, #fff);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.hizli-ikon {
  font-size: 18px;
  color: var(--hizli-renk);
}
.hizli-metin {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.hizli-baslik {
  font-size: 13px;
  font-weight: 600;
  color: #333;
}
.hizli-aciklama {
  font-size: 11px;
  color: #999;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hizli-ok {
  font-size: 12px;
  color: #ccc;
  transition: color 0.2s, transform 0.2s;
}
.hizli-kart:hover .hizli-ok {
  color: var(--hizli-renk);
  transform: translateX(2px);
}

/* ── SİSTEM SAĞLIĞI ──────────────────────────────────────────────────── */
.saglik-kart ::ng-deep .ant-card-body {
  padding: 14px 16px;
}
.saglik-liste {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.saglik-satir {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 0;
  border-bottom: 1px solid #f5f5f5;
}
.saglik-satir:last-child { border-bottom: none; }
.saglik-sol {
  display: flex;
  align-items: center;
  gap: 8px;
}
.saglik-nokta {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.nokta-aktif {
  background: #52c41a;
  box-shadow: 0 0 0 3px rgba(82,196,26,0.2);
  animation: puls 2s infinite;
}
.nokta-hata {
  background: #ff4d4f;
  box-shadow: 0 0 0 3px rgba(255,77,79,0.2);
}
.nokta-uyari { background: #faad14; }
.nokta-bilinmiyor { background: #d9d9d9; }
@keyframes puls {
  0%, 100% { box-shadow: 0 0 0 3px rgba(82,196,26,0.2); }
  50% { box-shadow: 0 0 0 5px rgba(82,196,26,0.1); }
}
.saglik-ad {
  font-size: 13px;
  color: #444;
}
.saglik-detay {
  font-size: 11px;
  color: #aaa;
  padding-left: 16px;
  margin-top: -2px;
  margin-bottom: 2px;
}
.son-kontrol-etiket {
  font-size: 11px;
  color: #aaa;
}
.kaynak-bolum {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.kaynak-satir {
  display: flex;
  align-items: center;
  gap: 8px;
}
.kaynak-etiket {
  font-size: 11px;
  color: #888;
  width: 52px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

/* ── EN AKTİF KULLANICILAR ────────────────────────────────────────────── */
.aktif-liste {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.aktif-satir {
  display: flex;
  align-items: center;
  gap: 8px;
}
.aktif-sira {
  width: 22px;
  flex-shrink: 0;
}
.sira-numara {
  font-size: 12px;
  font-weight: 700;
  color: #bbb;
}
.sira-1 { color: #f5a623; font-size: 14px; }
.sira-2 { color: #9e9e9e; font-size: 13px; }
.sira-3 { color: #cd7f32; font-size: 13px; }
.aktif-avatar-img {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  overflow: hidden;
  border: 1px solid #f0f0f0;
  flex-shrink: 0;
}
.aktif-bilgi {
  flex: 1;
  min-width: 0;
}
.aktif-kullanici-adi {
  font-size: 13px;
  font-weight: 600;
  color: #333;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.aktif-bar-blok {
  margin-top: 2px;
}
.aktif-sayi-etiket {
  font-size: 12px;
  font-weight: 700;
  color: #666;
  width: 28px;
  text-align: right;
}

/* ── İÇERİK TÜRÜ DAĞILIM ─────────────────────────────────────────────── */
.tur-liste {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.tur-satir {
  display: flex;
  align-items: center;
  gap: 8px;
}
.tur-sol {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 84px;
  flex-shrink: 0;
}
.tur-renk-nokta {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.tur-ad {
  font-size: 12px;
  color: #555;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tur-bar-blok {
  flex: 1;
}
.tur-bar-zemin {
  height: 16px;
  background: #f5f5f5;
  border-radius: 4px;
  overflow: hidden;
}
.tur-bar-dolgu {
  height: 100%;
  border-radius: 4px;
  transition: width 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
  min-width: 3px;
  opacity: 0.85;
}
.tur-sayi {
  font-size: 12px;
  font-weight: 700;
  color: #333;
  width: 32px;
  text-align: right;
}

/* ── RAPORLAR ─────────────────────────────────────────────────────────── */
.rapor-ozet-satir {
  display: flex;
  gap: 8px;
}
.rapor-ozet-kart {
  flex: 1;
  border-radius: 8px;
  padding: 10px 8px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.rapor-bekliyor {
  background: linear-gradient(135deg, #fff7e6, #ffe7ba);
  border: 1px solid #ffd591;
}
.rapor-incelendi {
  background: linear-gradient(135deg, #e6f7ff, #bae7ff);
  border: 1px solid #91d5ff;
}
.rapor-toplam {
  background: linear-gradient(135deg, #f6ffed, #d9f7be);
  border: 1px solid #b7eb8f;
}
.rapor-ozet-sayi {
  font-size: 22px;
  font-weight: 800;
  color: #333;
  line-height: 1;
}
.rapor-ozet-etiket {
  font-size: 11px;
  color: #666;
}
.son-raporlar-liste {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.son-rapor-satir {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 0;
  border-bottom: 1px solid #f5f5f5;
}
.son-rapor-satir:last-child { border-bottom: none; }
.son-rapor-icerik {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.son-rapor-sebep {
  font-size: 12px;
  color: #444;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.son-rapor-zaman {
  font-size: 10px;
  color: #aaa;
}

/* ── RESPONSIVE ──────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .db-header { flex-direction: column; align-items: flex-start; }
  .yenile-yazi { display: none; }
  .hero-sayi { font-size: 28px; }
  .trend-grafik { height: 150px; }
  .trend-bar-track { height: 90px; }
  .aktivite-kart ::ng-deep .ant-card-body { max-height: 300px; }
}
