/* CasaBlancaPanel — karanlık / altın tema + toggle */

:root,
html[data-ebp-theme="gold"] {
  --ebp-bg-0: #07080c;
  --ebp-bg-1: #0e1016;
  --ebp-bg-2: #151820;
  --ebp-accent: #d4af5f;
  --ebp-accent-soft: rgba(212, 175, 95, 0.18);
  --ebp-accent-border: rgba(212, 175, 95, 0.35);
  --ebp-accent-text: #f0d78c;
  --ebp-glow: rgba(212, 175, 95, 0.22);
  --ebp-card-border: rgba(255, 255, 255, 0.08);
  --ebp-sidebar-active: rgba(212, 175, 95, 0.12);
}

html[data-ebp-theme="graphite"] {
  --ebp-bg-0: #050608;
  --ebp-bg-1: #0a0c10;
  --ebp-bg-2: #121418;
  --ebp-accent: #94a3b8;
  --ebp-accent-soft: rgba(148, 163, 184, 0.14);
  --ebp-accent-border: rgba(148, 163, 184, 0.28);
  --ebp-accent-text: #cbd5e1;
  --ebp-glow: rgba(100, 116, 139, 0.2);
  --ebp-card-border: rgba(255, 255, 255, 0.07);
  --ebp-sidebar-active: rgba(255, 255, 255, 0.1);
}

.ebp-bg-panel-photo {
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  filter: saturate(1.06) contrast(1.04);
  transform: scale(1.05);
}

.ebp-bg-panel-vignette {
  background:
    radial-gradient(ellipse 95% 85% at 50% 40%, rgba(0, 0, 0, 0.22) 0%, rgba(0, 0, 0, 0.72) 100%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.35) 0%, rgba(0, 0, 0, 0.5) 100%);
  pointer-events: none;
}

.ebp-bg-theme {
  background:
    radial-gradient(ellipse 90% 70% at 50% -10%, var(--ebp-glow) 0%, transparent 55%),
    linear-gradient(165deg, rgba(14, 16, 22, 0.42) 0%, rgba(0, 0, 0, 0.52) 100%);
  pointer-events: none;
  opacity: 0.72;
}

.ebp-shell .ebp-ui-card,
.ebp-shell .ebp-sidebar {
  background: linear-gradient(155deg, rgba(22, 22, 26, 0.82) 0%, rgba(10, 11, 15, 0.88) 100%);
  backdrop-filter: blur(14px);
}

.ebp-shell {
  color-scheme: dark;
}

.ebp-sidebar-brand .brand-gold,
.home-hero-badge,
.ebp-nav-badge.is-gold {
  color: var(--ebp-accent-text);
}

.ebp-ui-card {
  border-color: var(--ebp-card-border);
}

.ebp-sidebar a.bg-white\/11,
.ebp-sidebar a.bg-white\/10 {
  background: var(--ebp-sidebar-active) !important;
  box-shadow: inset 0 0 0 1px var(--ebp-accent-border);
}

/* Tema düğmesi */
.ebp-theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.65rem;
  border-radius: 999px;
  border: 1px solid var(--ebp-card-border);
  background: rgba(0, 0, 0, 0.35);
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.6875rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.ebp-theme-toggle:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.ebp-theme-toggle svg {
  width: 16px;
  height: 16px;
  color: var(--ebp-accent);
}

/* Menü rozetleri */
.ebp-nav-badge {
  margin-left: auto;
  min-width: 1.25rem;
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
  font-size: 0.625rem;
  font-weight: 700;
  text-align: center;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.ebp-nav-badge.is-warn {
  background: rgba(251, 191, 36, 0.22);
  color: #fde68a;
}

.ebp-nav-badge.is-live {
  background: var(--ebp-accent-soft);
  color: var(--ebp-accent-text);
  box-shadow: 0 0 0 1px var(--ebp-accent-border);
}

.ebp-sidebar-section {
  margin-top: 1rem;
  margin-bottom: 0.35rem;
  padding: 0 0.5rem;
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.32);
}

.ebp-sidebar-sub {
  margin-left: 0.25rem;
  padding-left: 0.75rem;
  border-left: 1px solid rgba(255, 255, 255, 0.06);
}

.ebp-sidebar-sub a {
  font-size: 0.8125rem !important;
  padding-top: 0.45rem !important;
  padding-bottom: 0.45rem !important;
}

/* Toast */
.ebp-toast-stack {
  position: fixed;
  top: 0.85rem;
  right: 0.85rem;
  z-index: 10050;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-width: min(22rem, calc(100vw - 1.5rem));
  pointer-events: none;
}

.ebp-toast {
  pointer-events: auto;
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.75rem 0.95rem;
  border-radius: 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(12, 14, 20, 0.94);
  backdrop-filter: blur(14px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
  font-size: 0.8125rem;
  line-height: 1.45;
  color: #fff;
  animation: ebpToastIn 0.35s ease;
}

.ebp-toast.is-ok {
  border-color: rgba(52, 211, 153, 0.4);
}

.ebp-toast.is-err {
  border-color: rgba(248, 113, 113, 0.45);
}

.ebp-toast-dot {
  width: 8px;
  height: 8px;
  margin-top: 0.35rem;
  border-radius: 50%;
  flex-shrink: 0;
}

.ebp-toast.is-ok .ebp-toast-dot {
  background: #34d399;
}

.ebp-toast.is-err .ebp-toast-dot {
  background: #f87171;
}

.ebp-toast.is-leaving {
  animation: ebpToastOut 0.28s ease forwards;
}

@keyframes ebpToastIn {
  from {
    opacity: 0;
    transform: translateY(-8px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes ebpToastOut {
  to {
    opacity: 0;
    transform: translateY(-6px);
  }
}

/* Boş durum */
.ebp-empty-state {
  padding: 2rem 1rem 2.25rem;
  text-align: center;
}

.ebp-empty-art {
  color: var(--ebp-accent);
  opacity: 0.85;
  margin: 0 auto 0.85rem;
  max-width: 140px;
}

.ebp-empty-icon {
  width: 100%;
  height: auto;
  display: block;
}

.ebp-empty-title {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.88);
}

.ebp-empty-hint {
  margin: 0.45rem auto 0;
  max-width: 18rem;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.45);
}

/* Skeleton */
.ebp-skeleton-line {
  height: 0.65rem;
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.06) 0%,
    rgba(255, 255, 255, 0.14) 50%,
    rgba(255, 255, 255, 0.06) 100%
  );
  background-size: 200% 100%;
  animation: ebpSkel 1.1s ease infinite;
}

@keyframes ebpSkel {
  0% {
    background-position: 100% 0;
  }
  100% {
    background-position: -100% 0;
  }
}

.ebp-logs-list.is-refreshing .ebp-log-row,
.ebp-logs-list.is-refreshing .ebp-log-item {
  opacity: 0.72;
  transition: opacity 0.2s;
}

.ebp-logs-skeleton-row td {
  padding: 0.65rem 0.5rem;
}

.ebp-admin-tab .ebp-tab-badge {
  margin-left: 0.35rem;
  padding: 0.05rem 0.35rem;
  border-radius: 999px;
  font-size: 0.625rem;
  font-weight: 700;
  background: rgba(251, 191, 36, 0.25);
  color: #fde68a;
}

.ebp-admin-tab.is-active .ebp-tab-badge {
  background: rgba(0, 0, 0, 0.15);
  color: inherit;
}

.ebp-admin-wrap .ebp-admin-hero {
  background: linear-gradient(135deg, rgba(212, 175, 95, 0.08) 0%, rgba(0, 0, 0, 0.35) 55%);
  border-color: rgba(212, 175, 95, 0.15);
}

.ebp-admin-wrap .ebp-admin-hero::before {
  background: var(--ebp-glow, rgba(212, 175, 95, 0.2));
}

/* Dashboard platform grid */
.home-platform-section {
  margin-top: 1.25rem;
}

.home-platform-title {
  margin: 0 0 0.65rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
}

.home-platform-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
}

@media (min-width: 640px) {
  .home-platform-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.home-platform-card {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.75rem 0.85rem;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s, transform 0.15s;
}

.home-platform-card:hover {
  border-color: var(--ebp-accent-border);
  transform: translateY(-1px);
}

.home-platform-card img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  border-radius: 4px;
}

.home-platform-card span {
  font-size: 0.8125rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
}

.ebp-notify-bar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
  padding: 0.35rem 0.85rem 0;
  min-height: 2.25rem;
}

.ebp-notify-spacer {
  flex: 1;
}

.ebp-logs-live-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: rgba(34, 197, 94, 0.15);
  color: #86efac;
  border: 1px solid rgba(34, 197, 94, 0.35);
}

/* —— Sol menü · underground elite —— */
.ebp-sidebar--elite {
  border: 1px solid var(--ebp-accent-border);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.65),
    0 28px 60px rgba(0, 0, 0, 0.65),
    inset 0 1px 0 rgba(255, 255, 255, 0.07),
    0 0 48px var(--ebp-glow);
  overflow: hidden;
}

.ebp-sidebar--elite::before {
  content: "";
  position: absolute;
  inset: -40% -60%;
  background: conic-gradient(
    from 210deg at 50% 50%,
    transparent 0deg,
    var(--ebp-accent-soft) 40deg,
    transparent 80deg
  );
  opacity: 0.35;
  pointer-events: none;
  animation: ebpSidebarSheen 10s linear infinite;
}

.ebp-sidebar--elite::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(
    180deg,
    transparent 0%,
    var(--ebp-accent) 35%,
    var(--ebp-accent-text) 50%,
    var(--ebp-accent) 65%,
    transparent 100%
  );
  opacity: 0.85;
  pointer-events: none;
}

@keyframes ebpSidebarSheen {
  to {
    transform: rotate(360deg);
  }
}

.ebp-sidebar-motto {
  margin: 0 1rem 1.25rem;
  padding: 0.35rem 0.5rem;
  text-align: center;
  font-size: 0.5625rem;
  font-weight: 800;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--ebp-accent-text);
  border: 1px solid var(--ebp-accent-border);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.35);
  box-shadow: 0 0 18px var(--ebp-glow);
  position: relative;
  z-index: 1;
}

.ebp-sidebar-user {
  position: relative;
  z-index: 1;
  border-color: var(--ebp-accent-border) !important;
  background: linear-gradient(145deg, rgba(0, 0, 0, 0.45) 0%, rgba(255, 255, 255, 0.04) 100%) !important;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.ebp-sidebar-user .rounded-full {
  box-shadow: 0 0 0 2px var(--ebp-accent-soft), 0 0 16px var(--ebp-glow);
}

.ebp-sidebar-nav {
  position: relative;
  z-index: 1;
  scrollbar-width: thin;
  scrollbar-color: var(--ebp-accent-border) transparent;
}

.ebp-sidebar-nav > a,
.ebp-sidebar-nav > button,
.ebp-sidebar-sub a {
  position: relative;
  border: 1px solid transparent;
}

.ebp-sidebar-nav > a:hover,
.ebp-sidebar-nav > button:hover,
.ebp-sidebar-sub a:hover {
  border-color: rgba(255, 255, 255, 0.06);
}

.ebp-sidebar-nav > a[class*="bg-white"],
.ebp-sidebar-nav > button.font-semibold.text-white,
.ebp-sidebar-nav #submarkets-grid a.bg-white\/20 {
  border-color: var(--ebp-accent-border) !important;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.04),
    0 0 20px var(--ebp-glow);
}

.ebp-sidebar-nav > a[class*="bg-white"]::before,
.ebp-sidebar-nav > button.font-semibold.text-white::before {
  content: "";
  position: absolute;
  left: 0;
  top: 18%;
  bottom: 18%;
  width: 3px;
  border-radius: 0 4px 4px 0;
  background: linear-gradient(180deg, var(--ebp-accent-text), var(--ebp-accent));
  box-shadow: 0 0 10px var(--ebp-accent);
}

.ebp-sidebar-section {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--ebp-accent-text);
  opacity: 0.55;
}

.ebp-sidebar-section::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--ebp-accent-border), transparent 85%);
}

.ebp-sidebar #submarkets-grid span[class*="border-red"],
.ebp-sidebar #submarkets-grid span[class*="border-yellow"] {
  border-style: dashed !important;
  opacity: 0.92;
}

.ebp-sidebar form button[type="submit"] {
  position: relative;
  z-index: 1;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: linear-gradient(135deg, #ffffff 0%, #d4d4d4 100%) !important;
  box-shadow:
    0 0 24px var(--ebp-glow),
    0 8px 20px rgba(0, 0, 0, 0.35);
  font-size: 1rem !important;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.ebp-sidebar form button[type="submit"]:hover {
  background: linear-gradient(135deg, #fff 0%, #eee 100%) !important;
  transform: translateY(-1px);
}

@media (max-width: 767px) {
  .ebp-sidebar--elite.open {
    box-shadow:
      0 0 0 1px var(--ebp-accent-border),
      0 0 80px rgba(0, 0, 0, 0.85),
      0 0 40px var(--ebp-glow);
  }

  .ebp-sidebar-motto {
    font-size: 0.5rem;
    letter-spacing: 0.22em;
  }
}
