/* ═══════════════════════════════════════════════════════════════════════
   FikoYT Admin — Modern Shell (2026)
   Glassmorphism · indigo→violet accent · micro-interactions
═══════════════════════════════════════════════════════════════════════ */
.admin-layout {
  --ad-accent: #6366f1;
  --ad-accent-2: #a855f7;
  --ad-glow: 0 8px 24px -8px rgba(99, 102, 241, .55);
  min-height: 100vh;
  position: relative;
}

/* ═══ SIDEBAR ═══ */
.admin-sidebar {
  position: fixed !important;
  left: 0; top: 0; bottom: 0;
  z-index: 100;
  overflow: hidden;
  transition: all .28s cubic-bezier(.4, 0, .2, 1);
  display: flex;
  flex-direction: column;
  box-shadow: 4px 0 24px -12px rgba(0, 0, 0, .5);
}
.admin-sidebar,
.admin-sidebar .ant-layout-sider-children {
  background: linear-gradient(185deg, #0f1530 0%, #161438 55%, #1b1145 100%) !important;
}
.admin-sidebar .ant-layout-sider-children {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  position: relative;
}
/* dekoratif ışıma */
.admin-sidebar .ant-layout-sider-children::before {
  content: '';
  position: absolute;
  top: -80px; left: -60px;
  width: 240px; height: 240px;
  background: radial-gradient(circle, rgba(99, 102, 241, .35), transparent 70%);
  pointer-events: none;
  filter: blur(8px);
}

/* ─── Logo ─── */
.sidebar-logo {
  height: 64px;
  display: flex;
  align-items: center;
  padding: 0 20px;
  border-bottom: 1px solid rgba(255, 255, 255, .07);
  flex-shrink: 0;
  position: relative;
  transition: all .25s ease;
}
.sidebar-logo.collapsed { padding: 0; justify-content: center; }
.logo-container { display: flex; align-items: center; gap: 12px; overflow: hidden; white-space: nowrap; }
.logo-icon-wrap {
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--ad-accent), var(--ad-accent-2));
  border-radius: 11px;
  flex-shrink: 0;
  box-shadow: var(--ad-glow);
  position: relative;
  animation: ad-logo-pulse 4s ease-in-out infinite;
}
@keyframes ad-logo-pulse {
  0%, 100% { box-shadow: 0 8px 24px -8px rgba(99, 102, 241, .55); }
  50% { box-shadow: 0 8px 30px -6px rgba(168, 85, 247, .7); }
}
.logo-icon { font-size: 20px; color: #fff; }
.logo-text-wrap { display: flex; flex-direction: column; line-height: 1.25; }
.logo-text-primary {
  font-size: 17px; font-weight: 800; letter-spacing: -.3px;
  background: linear-gradient(90deg, #fff, #c7d2fe);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.logo-text-secondary {
  font-size: 9.5px; font-weight: 600; color: rgba(199, 210, 254, .5);
  letter-spacing: 1.4px; text-transform: uppercase;
}

/* ─── Hizli istatistik seridi ─── */
.sidebar-quick-stats {
  display: flex; gap: 8px; padding: 12px 14px 4px; flex-shrink: 0;
}
.quick-stat {
  flex: 1; display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
  padding: 8px 10px; border-radius: 10px; cursor: pointer;
  background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(255, 255, 255, .06);
  transition: transform .18s cubic-bezier(.34, 1.56, .64, 1), background .2s ease, border-color .2s ease;
}
.quick-stat:hover { transform: translateY(-2px); background: rgba(255, 255, 255, .08); }
.quick-stat--rapor:hover { border-color: rgba(255, 77, 79, .55); }
.quick-stat--kuyruk:hover { border-color: rgba(250, 173, 20, .55); }
.quick-stat-deger { font-size: 18px; font-weight: 800; line-height: 1; }
.quick-stat--rapor .quick-stat-deger { color: #ff7875; }
.quick-stat--kuyruk .quick-stat-deger { color: #ffc53d; }
.quick-stat-label { font-size: 9.5px; font-weight: 600; letter-spacing: .3px; color: rgba(199, 210, 254, .55); white-space: nowrap; }

/* ─── Menu container ─── */
.sidebar-menu-container { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 10px 0; position: relative; }
.sidebar-menu-container::-webkit-scrollbar { width: 5px; }
.sidebar-menu-container::-webkit-scrollbar-thumb { background: rgba(139, 124, 248, .25); border-radius: 4px; }
.sidebar-menu-container::-webkit-scrollbar-thumb:hover { background: rgba(139, 124, 248, .45); }
.sidebar-menu-container::-webkit-scrollbar-track { background: transparent; }

.admin-menu { border-right: none !important; background: transparent !important; }

/* ─── Grup başlıkları ─── */
.menu-grup-baslik { padding: 18px 24px 7px !important; list-style: none; cursor: default; }
.grup-baslik-text {
  font-size: 9.5px; font-weight: 700; color: rgba(165, 180, 252, .42);
  text-transform: uppercase; letter-spacing: 1.4px;
}
.menu-grup-divider { list-style: none; padding: 0 !important; }

/* ─── Menu items ─── */
.admin-menu-item,
.admin-submenu .ant-menu-submenu-title {
  transition: all .22s cubic-bezier(.4, 0, .2, 1) !important;
  margin: 3px 10px !important;
  border-radius: 10px !important;
  height: 42px !important;
  line-height: 42px !important;
  color: rgba(226, 232, 240, .72) !important;
}
.admin-menu-item [nz-icon],
.admin-submenu .ant-menu-submenu-title [nz-icon] {
  font-size: 16px; transition: transform .2s cubic-bezier(.34, 1.56, .64, 1), color .2s ease;
}
.admin-menu-item:hover:not(.ant-menu-item-selected),
.admin-submenu .ant-menu-submenu-title:hover {
  background: rgba(255, 255, 255, .07) !important;
  color: #fff !important;
  transform: translateX(3px);
}
.admin-menu-item:hover [nz-icon] { transform: scale(1.18) rotate(-3deg); color: #c4b5fd; }
.admin-menu-item:active:not(.ant-menu-item-selected) { transform: translateX(3px) scale(.985); }

.admin-menu-item.ant-menu-item-selected {
  background: linear-gradient(100deg, rgba(99, 102, 241, .9), rgba(168, 85, 247, .82)) !important;
  color: #fff !important;
  box-shadow: 0 6px 18px -6px rgba(99, 102, 241, .7);
  position: relative;
}
.admin-menu-item.ant-menu-item-selected [nz-icon] { color: #fff !important; }
.admin-menu-item.ant-menu-item-selected::after { display: none !important; }
.admin-menu-item.ant-menu-item-selected::before {
  content: ''; position: absolute; left: -10px; top: 50%;
  width: 4px; height: 22px; border-radius: 0 4px 4px 0;
  background: linear-gradient(180deg, #818cf8, #c084fc);
  box-shadow: 0 0 12px rgba(129, 140, 248, .9);
  transform-origin: center;
  animation: ad-indicator-in .25s cubic-bezier(.34, 1.56, .64, 1) both;
}
@keyframes ad-indicator-in {
  from { opacity: 0; transform: translateY(-50%) scaleY(.2); }
  to { opacity: 1; transform: translateY(-50%) scaleY(1); }
}

.submenu-item { padding-left: 50px !important; }

.menu-badge { margin-left: auto; }
.menu-badge .ant-badge-count {
  font-size: 10px !important; min-width: 17px; height: 17px; line-height: 17px; padding: 0 5px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .3);
}

/* ─── Footer / user ─── */
.sidebar-footer { flex-shrink: 0; padding: 0 12px 10px; transition: all .25s ease; }
.sidebar-footer.collapsed { padding: 0 8px 10px; }
.sidebar-user {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 11px; border-radius: 12px; cursor: pointer;
  transition: background .2s ease, border-color .2s ease, transform .18s cubic-bezier(.34, 1.56, .64, 1);
  overflow: hidden;
  background: rgba(255, 255, 255, .03);
  border: 1px solid rgba(255, 255, 255, .05);
}
.sidebar-user:hover { background: rgba(99, 102, 241, .14); border-color: rgba(129, 140, 248, .35); transform: translateY(-1px); }
.sidebar-user:active { transform: translateY(0) scale(.985); }
.sidebar-avatar { flex-shrink: 0; }
.sidebar-user-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.sidebar-user-name {
  font-size: 13px; font-weight: 600; color: rgba(255, 255, 255, .92);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sidebar-user-rol { display: flex; }
.sidebar-user-more { color: rgba(199, 210, 254, .4); font-size: 16px; flex-shrink: 0; }

.sidebar-user-dropdown { min-width: 230px; }
.dropdown-user-header { cursor: default !important; opacity: 1 !important; }
.dropdown-user-header-content { display: flex; align-items: center; gap: 12px; padding: 4px 0; }
.dropdown-user-name { font-size: 14px; font-weight: 700; color: #1a1a1a; }
.dropdown-user-email { font-size: 12px; color: #999; }

/* ─── Collapse butonu ─── */
.sidebar-collapse-btn {
  display: flex; align-items: center; justify-content: center;
  height: 34px; margin-top: 6px; border-radius: 10px; cursor: pointer;
  color: rgba(199, 210, 254, .45);
  transition: background .2s ease, color .2s ease; font-size: 14px;
  background: rgba(255, 255, 255, .03);
}
.sidebar-collapse-btn [nz-icon] { transition: transform .22s cubic-bezier(.34, 1.56, .64, 1); }
.sidebar-collapse-btn:hover { background: rgba(99, 102, 241, .16); color: #c7d2fe; }
.sidebar-collapse-btn:hover [nz-icon] { transform: scale(1.25); }
.sidebar-collapse-btn:active [nz-icon] { transform: scale(.85); }

/* ═══ MAIN CONTENT ═══ */
.admin-content-layout {
  background:
    radial-gradient(1200px 600px at 100% -10%, rgba(99, 102, 241, .06), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, rgba(168, 85, 247, .05), transparent 55%),
    #f4f5fb;
  transition: margin-left .28s cubic-bezier(.4, 0, .2, 1);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ─── Header (glass) ─── */
.admin-header {
  background: rgba(255, 255, 255, .72) !important;
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  padding: 0 24px !important;
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid rgba(99, 102, 241, .1);
  box-shadow: 0 4px 20px -12px rgba(30, 27, 75, .25);
  height: 58px !important; line-height: 58px !important;
  z-index: 50; position: sticky; top: 0;
}
.admin-header-left { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; }
.admin-header-right { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }

.header-trigger {
  width: 38px; height: 38px; display: flex; align-items: center; justify-content: center;
  font-size: 18px; cursor: pointer; border-radius: 10px;
  transition: background .2s ease, color .2s ease, transform .18s cubic-bezier(.34, 1.56, .64, 1);
  color: var(--py-metin-ikincil, #475569); flex-shrink: 0;
}
.header-trigger:hover { background: rgba(99, 102, 241, .1); color: var(--ad-accent); transform: scale(1.06); }
.header-trigger:active { transform: scale(.92); }

.header-action-item {
  width: 38px; height: 38px; display: flex; align-items: center; justify-content: center;
  border-radius: 10px; cursor: pointer;
  transition: background .2s ease, transform .18s cubic-bezier(.34, 1.56, .64, 1);
}
.header-action-item:hover { background: rgba(99, 102, 241, .1); transform: translateY(-2px); }
.header-action-item:active { transform: translateY(0) scale(.94); }
.header-action-icon { font-size: 17px; color: var(--py-metin-ikincil, #64748b); transition: transform .2s cubic-bezier(.34, 1.56, .64, 1), color .2s ease; }
.header-action-item:hover .header-action-icon { color: var(--ad-accent); transform: scale(1.12); }

/* ─── Breadcrumb ─── */
.admin-breadcrumb { font-size: 13px; white-space: nowrap; overflow: hidden; }
.admin-breadcrumb a {
  color: var(--py-metin-ucuncul, #94a3b8);
  transition: color .2s ease, transform .18s ease;
  display: inline-flex; align-items: center;
}
.admin-breadcrumb a:hover { color: var(--ad-accent); transform: translateY(-1px); }
.admin-breadcrumb nz-breadcrumb-item:last-child { color: var(--py-metin, #1e293b); font-weight: 600; }

/* ─── Header user ─── */
.header-user-info {
  display: flex; align-items: center; gap: 8px; cursor: pointer;
  padding: 5px 12px 5px 6px; border-radius: 22px;
  transition: background .2s ease, border-color .2s ease, transform .18s cubic-bezier(.34, 1.56, .64, 1);
  margin-left: 4px;
  border: 1px solid transparent;
}
.header-user-info:hover { background: rgba(99, 102, 241, .08); border-color: rgba(99, 102, 241, .2); transform: translateY(-1px); }
.header-user-info:active { transform: translateY(0) scale(.98); }
.header-avatar { flex-shrink: 0; }
.header-user-name { font-size: 13px; color: var(--py-metin-ikincil, #334155); font-weight: 600; white-space: nowrap; }

/* ─── Bildirim dropdown ─── */
.bildirim-dropdown { width: 330px; background: #fff; border-radius: 14px; box-shadow: 0 12px 40px -12px rgba(30, 27, 75, .35); overflow: hidden; }
.bildirim-baslik { display: flex; align-items: center; padding: 14px 16px; font-size: 14px; font-weight: 700; color: #1e293b; }
.bildirim-liste { max-height: 300px; overflow-y: auto; }
.bildirim-item { display: flex; align-items: flex-start; gap: 10px; padding: 5px 0; }
.bildirim-item.bos { flex-direction: column; align-items: center; gap: 8px; padding: 24px 0; color: #94a3b8; font-size: 13px; }
.bildirim-item-baslik { font-size: 13px; font-weight: 600; color: #334155; }
.bildirim-item-aciklama { font-size: 12px; color: #94a3b8; margin-top: 2px; }

/* ═══ CONTENT ═══ */
.admin-content { flex: 1; overflow: auto; }
.admin-content-inner { width: 100%; padding: 22px 24px; animation: ad-fade-up .35s ease both; }
@keyframes ad-fade-up { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ═══ FOOTER ═══ */
.admin-footer { text-align: center; padding: 14px 24px; color: var(--py-metin-ucuncul, #94a3b8); font-size: 12px; flex-shrink: 0; }
.footer-divider { margin: 0 8px; color: var(--py-bolucu, #cbd5e1); }
.footer-version { color: #a855f7; font-weight: 600; }

/* ═══ OVERLAY ═══ */
.admin-overlay {
  position: fixed; inset: 0;
  background: rgba(15, 21, 48, .55);
  backdrop-filter: blur(2px);
  z-index: 99; animation: ad-fade .2s ease;
}
@keyframes ad-fade { from { opacity: 0; } to { opacity: 1; } }

/* ═══ DARK MODE ═══ */
.dark-mode .admin-content-layout {
  background:
    radial-gradient(1200px 600px at 100% -10%, rgba(99, 102, 241, .12), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, rgba(168, 85, 247, .1), transparent 55%),
    #0b1020;
}
.dark-mode .admin-header {
  background: rgba(17, 22, 43, .72) !important;
  border-bottom-color: rgba(129, 140, 248, .15);
}
.dark-mode .header-trigger { color: #cbd5e1; }
.dark-mode .header-trigger:hover,
.dark-mode .header-action-item:hover { background: rgba(99, 102, 241, .2); }
.dark-mode .header-action-icon { color: #cbd5e1; }
.dark-mode .header-user-info:hover { background: rgba(99, 102, 241, .2); }
.dark-mode .header-user-name { color: #e2e8f0; }
.dark-mode .admin-breadcrumb a { color: #94a3b8; }
.dark-mode .admin-breadcrumb nz-breadcrumb-item:last-child { color: #e2e8f0; }
.dark-mode .admin-content { background: transparent; }
.dark-mode .admin-footer { color: #64748b; }
.dark-mode .bildirim-dropdown { background: #161b33; box-shadow: 0 12px 40px -12px rgba(0, 0, 0, .6); }
.dark-mode .bildirim-baslik { color: #e2e8f0; }
.dark-mode .bildirim-item-baslik { color: #cbd5e1; }
.dark-mode .dropdown-user-name { color: #e2e8f0; }

/* ═══ RESPONSIVE ═══ */
@media (max-width: 768px) {
  .admin-sidebar { transform: translateX(-100%); z-index: 200; }
  .admin-sidebar.mobil-acik { transform: translateX(0); }
  .admin-content-layout { margin-left: 0 !important; }
  .admin-header { padding: 0 12px !important; height: 52px !important; line-height: 52px !important; }
  .admin-content-inner { padding: 14px 12px; }
  .header-user-name { display: none; }
  .admin-header-right { gap: 2px; }
  .bildirim-dropdown { width: 290px; }
  .admin-breadcrumb { font-size: 12px; }
}
@media (max-width: 480px) {
  .admin-content-inner { padding: 10px 8px; }
  .admin-header { padding: 0 8px !important; }
  .admin-header-left { gap: 8px; }
  .header-action-item, .header-trigger { width: 34px; height: 34px; }
}

/* ═══ HAREKETI AZALT (erisilebilirlik) ═══ */
@media (prefers-reduced-motion: reduce) {
  .admin-sidebar,
  .admin-content-layout,
  .admin-menu-item,
  .admin-submenu .ant-menu-submenu-title,
  .header-trigger,
  .header-action-item,
  .header-action-icon,
  .header-user-info,
  .sidebar-user,
  .admin-breadcrumb a,
  .sidebar-collapse-btn [nz-icon] {
    transition-duration: .01ms !important;
  }
  .logo-icon-wrap,
  .admin-content-inner,
  .admin-menu-item.ant-menu-item-selected::before {
    animation: none !important;
  }
}
