/* Neegy AIO panel chrome — matches tele web styling */

html.panel-neegy {
  --gold-glow: rgba(228, 188, 90, 0.35);
  --neegy-border: rgba(212, 168, 67, 0.14);
  --neegy-border-strong: rgba(228, 188, 90, 0.18);
  --neegy-gold-from: #ffd978;
  --neegy-gold-mid: #e4bc5a;
  --neegy-gold-to: #b8860b;
  --neegy-text-cream: #fff8eb;
  --neegy-text-muted: #c4a86a;
  --neegy-text-dim: #7a6640;
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
}

html.panel-neegy body {
  font-family: inherit;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html.panel-neegy .panel-app-shell ::selection,
html.panel-neegy .panel-login ::selection,
html.panel-neegy .panel-loading ::selection {
  background: rgba(228, 188, 90, 0.35);
  color: var(--neegy-text-cream);
}

/* —— scrollbars —— */
html.panel-neegy .panel-scrollbar,
html.panel-neegy .panel-scrollbar * {
  scrollbar-color: rgba(228, 188, 90, 0.35) transparent !important;
}

html.panel-neegy .panel-scrollbar::-webkit-scrollbar-thumb,
html.panel-neegy .panel-scrollbar *::-webkit-scrollbar-thumb {
  background: rgba(228, 188, 90, 0.35) !important;
}

html.panel-neegy .panel-scrollbar::-webkit-scrollbar-thumb:hover,
html.panel-neegy .panel-scrollbar *::-webkit-scrollbar-thumb:hover {
  background: rgba(228, 188, 90, 0.55) !important;
}

html.panel-neegy .settings-scrollbar,
html.panel-neegy .settings-scrollbar * {
  scrollbar-color: rgba(228, 188, 90, 0.45) transparent !important;
}

/* —— login / landing —— */
html.panel-neegy .panel-login {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  min-height: 100dvh;
  background: #000;
  overflow-x: hidden;
}

html.panel-neegy .panel-login-bg {
  position: fixed;
  inset: 0;
  background-color: #000;
  background-image: url('/neegy-aio-bg.png');
  background-position: center center;
  background-repeat: no-repeat;
  background-size: min(92vmin, 920px);
  pointer-events: none;
  z-index: 0;
}

html.panel-neegy .panel-login-shade {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse 70% 55% at 50% 45%, rgba(0, 0, 0, 0.15), rgba(0, 0, 0, 0.72) 78%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.35) 0%, rgba(0, 0, 0, 0.55) 100%);
}

html.panel-neegy .panel-login-wrap {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
  padding: 24px 20px;
}

html.panel-neegy .panel-auth-card {
  background: rgba(8, 6, 4, 0.82);
  border: 1px solid var(--neegy-border-strong);
  border-radius: 16px;
  padding: 28px 24px 24px;
  box-shadow:
    0 24px 80px rgba(0, 0, 0, 0.65),
    0 0 40px rgba(228, 188, 90, 0.06);
  backdrop-filter: blur(14px);
}

html.panel-neegy .panel-auth-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}

html.panel-neegy .panel-logo-mark {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: linear-gradient(145deg, var(--neegy-gold-from) 0%, var(--neegy-gold-mid) 42%, #8b6914 100%);
  color: #1a1205;
  font-weight: 700;
  font-size: 1rem;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  box-shadow: 0 0 18px var(--gold-glow);
}

html.panel-neegy .panel-logo-mark--img {
  padding: 0;
  overflow: hidden;
  background: #000;
  border: 1px solid rgba(228, 188, 90, 0.35);
}

html.panel-neegy .panel-logo-mark--img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

html.panel-neegy .panel-auth-brand-name {
  font-size: 1rem;
  font-weight: 650;
  letter-spacing: -0.02em;
  color: var(--neegy-text-cream);
}

html.panel-neegy .panel-auth-title {
  margin: 0 0 6px;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--neegy-text-cream);
}

html.panel-neegy .panel-auth-sub {
  margin: 0 0 22px;
  font-size: 0.82rem;
  color: #9ca3af;
}

html.panel-neegy .panel-auth-card label {
  font-size: 0.78rem;
  color: var(--neegy-text-muted);
}

html.panel-neegy .panel-auth-card input {
  border-radius: 9px !important;
  border-color: var(--neegy-border) !important;
  background: rgba(0, 0, 0, 0.35) !important;
}

html.panel-neegy .panel-auth-card input:focus-visible {
  border-color: rgba(255, 255, 255, 0.22) !important;
  box-shadow: none !important;
}

/* —— main app shell —— */
html.panel-neegy .panel-app-shell {
  position: relative;
  isolation: isolate;
}

html.panel-neegy .panel-app-shell::before {
  content: '';
  position: fixed;
  inset: 0;
  background-color: #000;
  background-image: url('/neegy-aio-bg.png');
  background-position: center center;
  background-repeat: no-repeat;
  background-size: min(92vmin, 920px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.22;
}

html.panel-neegy .panel-app-shell::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse 70% 55% at 50% 45%, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.82) 78%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.45) 0%, rgba(0, 0, 0, 0.65) 100%);
}

html.panel-neegy .panel-app-shell > aside,
html.panel-neegy .panel-app-shell > main {
  position: relative;
  z-index: 1;
}

html.panel-neegy .panel-app-shell > aside.bg-sidebar {
  background: rgba(3, 3, 2, 0.94) !important;
  border-right-color: rgba(212, 168, 67, 0.1) !important;
  backdrop-filter: blur(12px);
}

html.panel-neegy .panel-app-shell > aside nav button {
  border-radius: 999px !important;
}

html.panel-neegy .panel-app-shell > aside nav button.bg-sidebar-accent {
  background: rgba(228, 188, 90, 0.14) !important;
  color: var(--neegy-gold-from) !important;
  box-shadow: inset 0 0 0 1px rgba(228, 188, 90, 0.12);
}

html.panel-neegy .panel-app-shell > aside nav button:not(.bg-sidebar-accent):hover {
  background: rgba(228, 188, 90, 0.08) !important;
}

html.panel-neegy .panel-sidebar-logo-mark {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(145deg, var(--neegy-gold-from) 0%, var(--neegy-gold-mid) 42%, #8b6914 100%);
  color: #1a1205;
  font-weight: 700;
  font-size: 0.85rem;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  box-shadow: 0 0 14px var(--gold-glow);
}

html.panel-neegy .panel-sidebar-logo-mark--img {
  padding: 0;
  overflow: hidden;
  background: #000;
  border: 1px solid rgba(228, 188, 90, 0.35);
}

html.panel-neegy .panel-sidebar-logo-mark--img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

html.panel-neegy .panel-sidebar-brand {
  font-weight: 650;
  letter-spacing: -0.02em;
}

/* —— buttons: Neegy gold only inside panel shell / login —— */
html.panel-neegy .panel-app-shell .panel-btn-gold,
html.panel-neegy .panel-login .panel-btn-gold,
html.panel-neegy .panel-app-shell button.bg-primary.text-primary-foreground.rounded-full,
html.panel-neegy .panel-login button.bg-primary.text-primary-foreground.rounded-full {
  background: linear-gradient(135deg, var(--neegy-gold-from), var(--neegy-gold-mid) 50%, var(--neegy-gold-to)) !important;
  color: #1a1205 !important;
  box-shadow: 0 6px 20px var(--gold-glow);
  border: 0 !important;
}

html.panel-neegy .panel-app-shell .panel-btn-gold:hover,
html.panel-neegy .panel-login .panel-btn-gold:hover,
html.panel-neegy .panel-app-shell button.bg-primary.text-primary-foreground.rounded-full:hover,
html.panel-neegy .panel-login button.bg-primary.text-primary-foreground.rounded-full:hover {
  opacity: 0.92;
}

/* Visitor /site (no panel shell): never Neegy gold vault pills — use exchange --primary */
html.panel-neegy:not(:has(.panel-app-shell)) button.bg-primary.text-primary-foreground.rounded-full {
  background: hsl(var(--primary)) !important;
  background-image: none !important;
  box-shadow: none !important;
  color: hsl(var(--primary-foreground, 0 0% 100%)) !important;
}

html.panel-neegy.visitor-active button.bg-primary.text-primary-foreground.rounded-full,
html.panel-neegy.visitor-site button.bg-primary.text-primary-foreground.rounded-full {
  background: hsl(var(--primary)) !important;
  background-image: none !important;
  box-shadow: none !important;
  color: hsl(var(--primary-foreground, 0 0% 100%)) !important;
}

html.panel-neegy.visitor-site .visitor-exchange-continue {
  background: #0052ff !important;
  background-image: none !important;
  box-shadow: none !important;
  color: #ffffff !important;
}

/* —— telegram (compact, panel-themed) —— */
html.panel-neegy a.panel-telegram-link {
  text-decoration: none;
  color: hsl(var(--sidebar-foreground, var(--foreground)));
}

html.panel-neegy a.panel-telegram-link:hover {
  color: var(--neegy-gold-from);
}

html.panel-neegy a.panel-telegram-link .panel-telegram-icon {
  color: var(--neegy-gold-mid);
  flex-shrink: 0;
}

html.panel-neegy a.panel-telegram-link--auth {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 14px;
  padding: 7px 14px;
  font-size: 0.8rem;
  font-weight: 500;
  border-radius: 999px;
  border: 1px solid var(--neegy-border-strong);
  background: rgba(0, 0, 0, 0.35);
  color: var(--neegy-text-muted);
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

html.panel-neegy a.panel-telegram-link--auth:hover {
  background: rgba(228, 188, 90, 0.08);
  border-color: rgba(228, 188, 90, 0.28);
  color: var(--neegy-text-cream);
}

/* —— cards & surfaces —— */
html.panel-neegy .bg-card,
html.panel-neegy .bg-popover {
  backdrop-filter: blur(8px);
}

html.panel-neegy:not(.visitor-active) .panel-app-shell .border-border,
html.panel-neegy:not(.visitor-active) .panel-login .border-border {
  border-color: var(--neegy-border) !important;
}

html.panel-neegy:not(.visitor-active) .panel-app-shell :focus-visible,
html.panel-neegy:not(.visitor-active) .panel-login :focus-visible {
  outline: none;
  box-shadow:
    0 0 0 2px hsl(var(--background)),
    0 0 0 4px rgba(228, 188, 90, 0.45),
    0 0 16px -4px rgba(228, 188, 90, 0.25);
}

/* Visitor /site pages — no Neegy gold focus rings on form fields */
html.panel-neegy.visitor-active input:focus,
html.panel-neegy.visitor-active input:focus-visible,
html.panel-neegy.visitor-active textarea:focus,
html.panel-neegy.visitor-active textarea:focus-visible,
html.panel-neegy.visitor-active select:focus,
html.panel-neegy.visitor-active select:focus-visible {
  box-shadow: none !important;
  outline: none !important;
}

/* —— toasts —— */
html.panel-neegy [data-sonner-toast] {
  background: rgba(20, 16, 8, 0.95) !important;
  border: 1px solid var(--neegy-border) !important;
  border-radius: 10px !important;
  backdrop-filter: blur(12px) saturate(1.3) !important;
}

html.panel-neegy [data-sonner-toast][data-type='success'] {
  border-left: 3px solid hsl(var(--success, 142 71% 45%)) !important;
}

html.panel-neegy [data-sonner-toast][data-type='error'] {
  border-left: 3px solid hsl(var(--destructive, 0 84% 60%)) !important;
}

/* —— theme picker accent ring —— */
html.panel-neegy:not(.visitor-active) .panel-app-shell .ring-primary,
html.panel-neegy:not(.visitor-active) .panel-login .ring-primary {
  --tw-ring-color: rgba(228, 188, 90, 0.55) !important;
}

/* —— loading spinner —— */
html.panel-neegy .panel-loading {
  position: relative;
  min-height: 100vh;
  background: #000;
}

html.panel-neegy .panel-loading .text-primary {
  color: var(--neegy-gold-mid) !important;
}

/* —— neegy tools iframe —— */
html.panel-neegy .panel-app-shell {
  height: 100vh;
  max-height: 100vh;
}

html.panel-neegy main.panel-main--tools {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  padding: 0;
}

html.panel-neegy .neegy-tools-frame {
  border: 1px solid var(--neegy-border-strong);
  border-radius: 12px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.35);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
}

html.panel-neegy .neegy-tools-frame--full {
  border: none;
  border-radius: 0;
  box-shadow: none;
  background: #070708;
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
  width: 100%;
}

html.panel-neegy .neegy-tools-frame iframe {
  display: block;
  background: #050403;
}

html.panel-neegy .neegy-tools-frame--full iframe {
  width: 100%;
  height: 100%;
  min-height: 0;
  border-radius: 0;
}
