/* VALOKOÇUM — Modern bildirimler, toast, menüler (mobil öncelikli) */

/* ── Toast stack (sağ üst, minimal glass) ── */
.toast-container {
  position: fixed;
  top: max(72px, calc(env(safe-area-inset-top) + 56px));
  right: max(14px, env(safe-area-inset-right));
  left: auto;
  z-index: 99990;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  pointer-events: none;
  max-width: min(380px, calc(100vw - 28px));
}

.toast {
  pointer-events: auto;
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-rows: auto auto;
  gap: 0 12px;
  align-items: start;
  min-width: 0;
  width: min(360px, calc(100vw - 28px));
  padding: 12px 12px 14px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(14, 18, 28, 0.88);
  backdrop-filter: blur(18px) saturate(1.35);
  -webkit-backdrop-filter: blur(18px) saturate(1.35);
  box-shadow:
    0 16px 40px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(255, 255, 255, 0.04) inset,
    0 0 24px rgba(255, 70, 85, 0.06);
  overflow: hidden;
  animation: toast-slide-in 0.42s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.toast.removing {
  animation: toast-slide-out 0.28s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes toast-slide-in {
  from {
    opacity: 0;
    transform: translateX(24px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes toast-slide-out {
  to {
    opacity: 0;
    transform: translateX(20px) scale(0.95);
    max-height: 0;
    margin: 0;
    padding-top: 0;
    padding-bottom: 0;
  }
}

.toast::before {
  display: none;
}

.toast-accent {
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 10px;
  width: 3px;
  border-radius: 0 4px 4px 0;
  background: var(--accent-teal);
}

.toast.success .toast-accent { background: linear-gradient(180deg, #4ade80, #22c55e); box-shadow: 0 0 12px rgba(74, 222, 128, 0.45); }
.toast.error .toast-accent { background: linear-gradient(180deg, #ff6b7a, #ff4655); box-shadow: 0 0 12px rgba(255, 70, 85, 0.45); }
.toast.info .toast-accent { background: linear-gradient(180deg, #3ee0d0, #2bb8aa); box-shadow: 0 0 12px rgba(62, 224, 208, 0.4); }
.toast.warning .toast-accent { background: linear-gradient(180deg, #f0b232, #d4921a); box-shadow: 0 0 12px rgba(240, 178, 50, 0.4); }

.toast-icon {
  grid-row: 1 / span 2;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
  flex-shrink: 0;
  margin-left: 6px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--white);
}

.toast.success .toast-icon { background: rgba(74, 222, 128, 0.12); border-color: rgba(74, 222, 128, 0.3); color: #4ade80; }
.toast.error .toast-icon { background: rgba(255, 70, 85, 0.12); border-color: rgba(255, 70, 85, 0.35); color: #ff6b7a; }
.toast.info .toast-icon { background: rgba(62, 224, 208, 0.12); border-color: rgba(62, 224, 208, 0.3); color: #3ee0d0; }
.toast.warning .toast-icon { background: rgba(240, 178, 50, 0.12); border-color: rgba(240, 178, 50, 0.35); color: #f0b232; }

.toast-body {
  min-width: 0;
  padding-top: 1px;
}

.toast-title {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.35;
  margin: 0;
  color: rgba(255, 255, 255, 0.95);
}

.toast-msg {
  font-size: 12px;
  line-height: 1.45;
  color: rgba(236, 232, 225, 0.62);
  margin-top: 3px;
}

.toast-close {
  grid-row: 1;
  grid-column: 3;
  width: 26px;
  height: 26px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: rgba(255, 255, 255, 0.4);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  flex-shrink: 0;
}

.toast-close:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.toast-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: rgba(255, 255, 255, 0.06);
  transform-origin: left center;
  animation: toast-progress 4s linear forwards;
}

.toast.success .toast-progress { background: linear-gradient(90deg, #4ade80, transparent); }
.toast.error .toast-progress { background: linear-gradient(90deg, #ff4655, transparent); }
.toast.info .toast-progress { background: linear-gradient(90deg, #3ee0d0, transparent); }
.toast.warning .toast-progress { background: linear-gradient(90deg, #f0b232, transparent); }

@keyframes toast-progress {
  from { transform: scaleX(1); }
  to { transform: scaleX(0); }
}

/* ── Bildirim zili ── */
.notif-bell {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.75);
  font-size: 18px;
  cursor: pointer;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s, background 0.2s;
  position: relative;
}

.notif-bell:hover {
  border-color: rgba(255, 70, 85, 0.35);
  background: rgba(255, 70, 85, 0.1);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(255, 70, 85, 0.2);
}

.notif-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  min-width: 17px;
  height: 17px;
  padding: 0 5px;
  border-radius: 99px;
  background: linear-gradient(135deg, #ff4655, #e63946);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  line-height: 17px;
  text-align: center;
  box-shadow: 0 0 0 2px rgba(10, 14, 20, 0.95), 0 0 10px rgba(255, 70, 85, 0.5);
  animation: notif-badge-pulse 2s ease-in-out infinite;
}

@keyframes notif-badge-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}

/* ── Bildirim dropdown panel ── */
.notif-panel {
  position: fixed;
  z-index: 99980;
  top: max(68px, calc(env(safe-area-inset-top) + 52px));
  right: max(12px, env(safe-area-inset-right));
  width: min(360px, calc(100vw - 24px));
  max-height: min(480px, calc(100vh - 100px));
  display: flex;
  flex-direction: column;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(12, 16, 24, 0.94);
  backdrop-filter: blur(22px) saturate(1.4);
  -webkit-backdrop-filter: blur(22px) saturate(1.4);
  box-shadow:
    0 24px 56px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(255, 255, 255, 0.04) inset;
  overflow: hidden;
  animation: panel-pop 0.35s cubic-bezier(0.22, 1, 0.36, 1) both;
  transform-origin: top right;
}

@keyframes panel-pop {
  from { opacity: 0; transform: translateY(-8px) scale(0.96); }
  to { opacity: 1; transform: none; }
}

.notif-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 14px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.notif-panel-title {
  font-family: var(--font-title);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.9);
}

.notif-panel-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.notif-panel-count {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 99px;
  background: rgba(255, 70, 85, 0.15);
  color: #ff8a94;
  border: 1px solid rgba(255, 70, 85, 0.25);
}

.notif-panel-icon-glow {
  display: none;
}

.notif-panel-toolbar {
  display: flex;
  align-items: center;
  gap: 4px;
}

.notif-panel-btn {
  padding: 6px 10px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.65);
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
}

.notif-panel-btn:hover {
  border-color: rgba(62, 224, 208, 0.35);
  color: #fff;
  background: rgba(62, 224, 208, 0.1);
}

.notif-panel-close {
  width: 30px;
  height: 30px;
  border: none;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.55);
  font-size: 16px;
  cursor: pointer;
  transition: all 0.15s;
}

.notif-panel-close:hover {
  background: rgba(255, 70, 85, 0.15);
  color: #fff;
}

.notif-panel-body {
  overflow-y: auto;
  flex: 1;
  min-height: 0;
  -webkit-overflow-scrolling: touch;
}

.notif-panel-empty {
  padding: 36px 20px;
  text-align: center;
  color: rgba(255, 255, 255, 0.45);
  font-size: 13px;
}

.notif-panel-empty-ic {
  font-size: 32px;
  margin-bottom: 8px;
  opacity: 0.35;
}

.notif-panel-item {
  display: flex;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  cursor: pointer;
  transition: background 0.15s;
}

.notif-panel-item:last-child {
  border-bottom: none;
}

.notif-panel-item:hover {
  background: rgba(255, 255, 255, 0.04);
}

.notif-panel-item-unread {
  background: rgba(255, 70, 85, 0.06);
}

.notif-panel-item-unread:hover {
  background: rgba(255, 70, 85, 0.1);
}

.notif-panel-item-body {
  flex: 1;
  min-width: 0;
}

.notif-panel-item-title {
  font-size: 13px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.92);
  line-height: 1.35;
}

.notif-panel-item-msg {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.55);
  line-height: 1.4;
  margin-top: 2px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.notif-panel-item-time {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.35);
  margin-top: 5px;
}

/* Tip ikonları */
.notif-type-icon {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.notif-ic--session { background: rgba(255, 70, 85, 0.12); color: #ff6b7a; border-color: rgba(255, 70, 85, 0.25); }
.notif-ic--ok { background: rgba(74, 222, 128, 0.12); color: #4ade80; border-color: rgba(74, 222, 128, 0.28); }
.notif-ic--money { background: rgba(240, 178, 50, 0.12); color: #f0b232; border-color: rgba(240, 178, 50, 0.28); }
.notif-ic--chat { background: rgba(62, 224, 208, 0.12); color: #3ee0d0; border-color: rgba(62, 224, 208, 0.28); }
.notif-ic--warn { background: rgba(255, 140, 80, 0.12); color: #ff9f6b; border-color: rgba(255, 140, 80, 0.28); }
.notif-ic--default { background: rgba(255, 255, 255, 0.06); color: rgba(255, 255, 255, 0.7); }

/* ── Kullanıcı dropdown menü ── */
.dropdown-menu {
  min-width: 220px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(12, 16, 24, 0.96);
  backdrop-filter: blur(20px) saturate(1.3);
  -webkit-backdrop-filter: blur(20px) saturate(1.3);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.04) inset;
  padding: 6px;
  z-index: 99999;
  /* Varsayılan: gizli — .open ile gösterilir */
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px) scale(0.97);
  transform-origin: top right;
  transition: opacity 0.25s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.25s cubic-bezier(0.22, 1, 0.36, 1),
              visibility 0.25s;
}

.dropdown-menu.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.dropdown-menu a,
.dropdown-menu button {
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 500;
  gap: 10px;
  color: rgba(255, 255, 255, 0.72);
  display: flex;
  align-items: center;
  width: 100%;
  background: none;
  border: none;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}

.dropdown-menu a:hover,
.dropdown-menu button:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.dropdown-menu .divider {
  border: none;
  height: 1px;
  background: rgba(255, 255, 255, 0.07);
  margin: 4px 8px;
}

.dropdown-menu .logout {
  color: #ff8a94;
}

.dropdown-menu .logout:hover {
  background: rgba(255, 70, 85, 0.12);
  color: #ffb3ba;
}

.notif-page-mute {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.55);
  cursor: pointer;
}

.notif-page-empty h3 {
  font-size: 16px;
  margin: 12px 0 6px;
  color: rgba(255, 255, 255, 0.75);
}

.notif-page-empty p {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.45);
  margin: 0;
}

/* ── Bildirimler sayfası ── */
.notif-page {
  max-width: 640px;
  margin: 0 auto;
  padding: 24px 16px 48px;
}

.notif-page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.notif-page-title {
  font-family: var(--font-title);
  font-size: clamp(22px, 4vw, 28px);
  font-weight: 800;
  margin: 0;
  letter-spacing: 0.02em;
}

.notif-page-sub {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
  margin: 4px 0 0;
}

.notif-page-icon {
  display: none;
}

.notif-page-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.notif-page-filters .filter-pill {
  font-size: 12px;
  padding: 8px 14px;
  border-radius: 99px;
}

.notif-page-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.notif-page-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(255, 255, 255, 0.03);
  transition: transform 0.15s, border-color 0.15s, background 0.15s;
}

.notif-page-card:hover {
  transform: translateX(2px);
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
}

.notif-page-card-unread {
  border-color: rgba(255, 70, 85, 0.22);
  background: rgba(255, 70, 85, 0.05);
}

.notif-page-card-ic {
  flex-shrink: 0;
}

.notif-page-card-title {
  font-size: 14px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.92);
}

.notif-page-card-msg {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.55);
  line-height: 1.45;
  margin-top: 3px;
}

.notif-page-card-time {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.35);
  margin-top: 6px;
}

.notif-page-card-go {
  flex-shrink: 0;
  align-self: center;
  font-size: 11px;
  padding: 6px 12px;
}

.notif-page-empty {
  text-align: center;
  padding: 48px 20px;
  border-radius: 16px;
  border: 1px dashed rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.02);
}

/* ── Alt mobil menü ── */
.bottom-nav {
  background: rgba(8, 12, 20, 0.92) !important;
  backdrop-filter: blur(24px) saturate(1.4) !important;
  -webkit-backdrop-filter: blur(24px) saturate(1.4) !important;
  border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
  box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.4) !important;
  padding-bottom: env(safe-area-inset-bottom);
}

.bottom-nav-item {
  position: relative;
  color: rgba(255, 255, 255, 0.42) !important;
  font-size: 10px !important;
  font-weight: 600 !important;
  letter-spacing: 0.02em !important;
  text-transform: none !important;
  padding: 8px 4px 10px !important;
  min-height: 56px;
}

.bottom-nav-item .bnav-icon {
  font-size: 22px !important;
  line-height: 1 !important;
  transition: transform 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.bottom-nav-item .bnav-icon svg {
  display: block;
}

.bnav-label {
  font-size: 10px;
  line-height: 1.2;
}

.bottom-nav-item.active {
  color: #fff !important;
  text-shadow: none !important;
}

.bottom-nav-item.active::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 28px;
  height: 3px;
  border-radius: 0 0 4px 4px;
  background: linear-gradient(90deg, #ff4655, #f0b232);
  box-shadow: 0 0 12px rgba(255, 70, 85, 0.5);
}

.bottom-nav-item.active .bnav-icon {
  transform: translateY(-2px) scale(1.05);
  filter: drop-shadow(0 4px 8px rgba(255, 70, 85, 0.35));
}

.bottom-nav-badge {
  top: 4px !important;
  right: calc(50% - 22px) !important;
  left: auto !important;
  box-shadow: 0 0 0 2px rgba(8, 12, 20, 0.95) !important;
}

/* Mobil toast */
@media (max-width: 640px) {
  .toast-container {
    top: max(64px, calc(env(safe-area-inset-top) + 48px));
    right: 12px;
    left: 12px;
    align-items: stretch;
    max-width: none;
  }

  .toast {
    width: 100%;
    max-width: none;
  }

  .notif-panel {
    right: 8px;
    left: 8px;
    width: auto;
    max-height: min(70vh, 520px);
  }

  .notif-page {
    padding: 16px 12px 40px;
  }

  .notif-page-card {
    flex-wrap: wrap;
  }

  .notif-page-card-go {
    width: 100%;
    margin-top: 8px;
  }
}

@media (max-width: 768px) {
  .main-content {
    padding-bottom: calc(68px + env(safe-area-inset-bottom)) !important;
  }
}

/* Eski toast / panel stillerini geçersiz kıl */
.toast {
  border-left: none !important;
  padding: 12px 12px 14px 14px !important;
  min-width: 0 !important;
}

.toast.success,
.toast.error,
.toast.info,
.toast.warning {
  border-left: none !important;
}

.toast-container {
  top: max(72px, calc(env(safe-area-inset-top) + 56px)) !important;
  right: max(14px, env(safe-area-inset-right)) !important;
  z-index: 99990 !important;
}

.notif-panel {
  animation: panel-pop 0.35s cubic-bezier(0.22, 1, 0.36, 1) both !important;
}

.notif-bell {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 42px !important;
  height: 42px !important;
  border-radius: 12px !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  background: rgba(255, 255, 255, 0.04) !important;
  color: rgba(255, 255, 255, 0.75) !important;
  font-size: 18px !important;
}

.notif-bell svg {
  display: block;
}

.nav-balance-pill {
  border-radius: 12px !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  background: rgba(255, 255, 255, 0.04) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.nav-balance-pill:hover {
  border-color: rgba(240, 178, 50, 0.35) !important;
  box-shadow: 0 6px 20px rgba(240, 178, 50, 0.15);
}
