/* =========================
   CORE 2026 UI (SAAS CLEAN)
========================= */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  color: #e5e7eb;
  background: #0b1220;
  overflow-x: hidden;
}

/* =========================
   GLOW BACKGROUND
========================= */

body::before {
  content:"";
  position:fixed;
  top:-200px;
  left:50%;
  transform:translateX(-50%);
  width:900px;
  height:900px;
  background: radial-gradient(circle, rgba(14,165,233,0.22), transparent 60%);
  filter: blur(80px);
  z-index:-1;
}

body::after {
  content:"";
  position:fixed;
  bottom:-200px;
  right:-200px;
  width:800px;
  height:800px;
  background: radial-gradient(circle, rgba(30,58,138,0.25), transparent 60%);
  filter: blur(90px);
  z-index:-1;
}

.toast {
  position: fixed !important;
  right: 24px;
  bottom: 24px;

  background: rgba(17, 24, 39, 0.95);
  color: #fff;

  padding: 14px 18px;
  border-radius: 12px;

  font-size: 14px;
  font-weight: 600;

  box-shadow: 0 12px 30px rgba(0,0,0,0.35);

  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;

  transition: all 0.25s ease;

  max-width: 320px;
  z-index: 999999;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

/* =========================
   HEADER
========================= */

.logo-panel {
  background: linear-gradient(135deg, #0b1220, #0f1b2d, #0c2540);
  padding: 10px 20px;

  display: flex;
  align-items: center;
  justify-content: space-between;

  box-shadow: 0 12px 35px rgba(0,0,0,.5);
  position: relative;
  z-index: 1000;
}

.logo-panel img {
  height: 60px;
}

/* =========================
   USER PANEL
========================= */

#user-panel {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}

/* LOGIN BUTTON */
#auth-open-btn {
  padding: 9px 14px;
  border-radius: 10px;

  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.05);

  color: #e5e7eb;
  cursor: pointer;

  transition: 0.2s ease;
}

#auth-open-btn:hover {
  background: rgba(14,165,233,0.15);
  border-color: rgba(14,165,233,0.5);
  transform: translateY(-1px);
}

/* =========================
   AVATAR — PREMIUM 2026
========================= */

#user-avatar {
  width: 44px;
  height: 44px;

  border-radius: 50%;
  object-fit: cover;

  cursor: pointer;

  border: 2px solid rgba(56, 189, 248, 0.75);

  box-shadow:
    0 0 0 3px rgba(56, 189, 248, 0.06),
    0 0 18px rgba(14, 165, 233, 0.22),
    inset 0 0 0 1px rgba(255,255,255,0.12);

  transition:
    transform 0.25s cubic-bezier(.4,0,.2,1),
    border-color 0.25s ease,
    box-shadow 0.25s ease;

  background:
    linear-gradient(
      135deg,
      rgba(56,189,248,0.12),
      rgba(59,130,246,0.08)
    );

  position: relative;
  z-index: 1;
}

#user-avatar:hover {
  transform: scale(1.04);

  border-color: rgba(125, 211, 252, 0.95);

  box-shadow:
    0 0 0 3px rgba(56, 189, 248, 0.08),
    0 0 24px rgba(14, 165, 233, 0.32),
    inset 0 0 0 1px rgba(255,255,255,0.18);
}



/* =========================
   ADMIN AVATAR — GOLD
========================= */

#user-avatar.admin {
  border-color: #f5c542;

  box-shadow:
    0 0 0 3px rgba(245, 197, 66, 0.08),
    0 0 7px rgba(245, 197, 66, 0.28),
    0 0 24px rgba(245, 197, 66, 0.10),
    inset 0 0 0 1px rgba(255, 236, 153, 0.25);
}

#user-avatar.admin:hover {
  transform: scale(1.04);

  border-color: #fde68a;

  box-shadow:
    0 0 0 3px rgba(245, 197, 66, 0.12),
    0 0 25px rgba(245, 197, 66, 0.38),
    0 0 45px rgba(245, 197, 66, 0.14),
    inset 0 0 0 1px rgba(255, 245, 190, 0.35);
}

/* =========================
   USER DROPDOWN MENU
========================= */

.user-menu {
  position: absolute;
  top: 60px;
  right: 0;
  z-index:9999;
  width: 180px;

  background: rgba(15, 27, 45, 0.95);
  backdrop-filter: blur(18px);

  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;

  box-shadow: 0 20px 40px rgba(0,0,0,0.5);

  display: flex;
  flex-direction: column;

  overflow: hidden;

  opacity: 0;
  transform: translateY(-10px);
  pointer-events: none;

  transition: 0.25s ease;
}

/* active state */
.user-menu.open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* links */
.user-menu a,
.user-menu button {
  padding: 12px 14px;
  text-align: left;

  background: none;
  border: none;

  color: #e5e7eb;
  font-size: 14px;

  cursor: pointer;

  text-decoration: none;

  transition: 0.2s ease;
}

.user-menu a:hover,
.user-menu button:hover {
  background: rgba(14,165,233,0.12);
  color: #38bdf8;
}

/* =========================
   NAV
========================= */

.nav-container {
  display: flex;
  justify-content: center;
  position: relative;
  z-index: 999;
}

nav {
  background: rgba(17,28,51,0.75);
  backdrop-filter: blur(14px);

  border: 1px solid rgba(255,255,255,0.08);
  border-top: none;

  display: flex;

  border-radius: 0 0 14px 14px;

  max-width: 1100px;
  width: 100%;
  overflow: hidden;

  box-shadow: 0 15px 30px rgba(0,0,0,.35);
}

nav a {
  padding: 15px 25px;
  text-decoration: none;

  color: #cbd5e1;
  font-weight: 600;

  transition: all .2s ease;
}

nav a:hover {
  background: rgba(14,165,233,0.15);
  color: #38bdf8;
}

/* =========================
   CTA
========================= */

.cta {
  max-width: 900px;
  margin: 60px auto;
  padding: 40px;
  text-align: center;

  background: linear-gradient(
    135deg,
    rgba(14,165,233,0.15),
    rgba(30,58,138,0.15)
  );

  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.08);
}

/* =========================
   DRAWER (SAAS CLEAN FIXED)
========================= */

.drawer {
  position: fixed;
  top: 0;
  right: -380px;

  width: 360px;
  height: 100vh;

  background: rgba(15, 27, 45, 0.95);
  backdrop-filter: blur(20px);

  border-left: 1px solid rgba(255,255,255,0.08);
  box-shadow: -20px 0 40px rgba(0,0,0,0.5);

  transition: 0.3s ease;
  z-index: 2000;
}

.drawer.open {
  right: 0;
}

/* CONTENT */
.drawer-content {
  position: relative;
  padding: 22px;
  color: white;
}

/* =========================
   CLOSE BUTTON (X FIXED)
========================= */

.drawer-close {
  all: unset;

  position: absolute;
  top: 10px;
  right: 10px;

  width: 34px;
  height: 34px;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 10px;

  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);

  color: #cbd5e1;
  font-size: 18px;

  cursor: pointer;

  transition: 0.2s ease;
  z-index: 10;
}

.drawer-close:hover {
  background: rgba(239,68,68,0.15);
  border-color: rgba(239,68,68,0.4);
  color: #f87171;
  transform: scale(1.05);
}

/* =========================
   INPUTS
========================= */

.drawer input {
  width: 100%;
  margin: 8px 0;
  padding: 10px;

  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.1);

  background: rgba(255,255,255,0.03);
  color: white;

  outline: none;
}



/* =========================
   BUTTONS (ONLY LOGIN BUTTONS)
========================= */

.drawer button:not(.drawer-close) {
  width: 100%;
  padding: 10px;

  margin-top: 10px;

  border-radius: 10px;
  border: none;

  background: linear-gradient(135deg, #0ea5e9, #3b82f6);
  color: white;

  cursor: pointer;
  font-weight: 600;

  transition: 0.2s ease;
}

.drawer button:not(.drawer-close):hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

.drawer p {
  font-size: 13px;
  color: #94a3b8;

  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;

  transition: 0.2s ease;

  position: relative;
}

.drawer p::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;

  width: 0%;
  height: 1px;

  background: #38bdf8;
  transition: 0.25s ease;
}

.drawer p:hover {
  color: #38bdf8;
}

.drawer p:hover::after {
  width: 100%;
}

/* =========================
   FOOTER
========================= */

footer {
  text-align: center;
  padding: 30px;
  color: #64748b;
}

.bg-particles {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

/* ZŁOTE KULKI */
.bg-particles span {
  position: absolute;
  bottom: -20px;

  width: 6px;
  height: 6px;
  border-radius: 50%;

  background: radial-gradient(
    circle,
    rgba(255, 215, 0, 0.9),
    rgba(255, 215, 0, 0.1)
  );

  opacity: 0.6;
  animation: floatUp linear infinite;
  filter: blur(0.3px);
}

/* ANIMACJA */
@keyframes floatUp {
  0% {
    transform: translateY(0) scale(1);
    opacity: 0;
  }
  10% { opacity: 0.7; }
  100% {
    transform: translateY(-110vh) scale(1.6);
    opacity: 0;
  }
}



/* =====================================
   ADMIN ORDERS WIDGET
===================================== */

#adminOrdersWidget{

display:flex;
align-items:center;
gap:12px;

padding:10px 14px;

border-radius:16px;

background:
rgba(15,27,45,.75);

backdrop-filter:
blur(16px);

border:
1px solid rgba(255,255,255,.08);

cursor:pointer;

transition:.25s ease;

position:relative;
}

#adminOrdersWidget:hover{

transform:
translateY(-2px);

border-color:
rgba(14,165,233,.4);

box-shadow:
0 10px 25px rgba(14,165,233,.15);
}

.admin-orders-content{

display:flex;
flex-direction:column;
}

#adminOrdersNumber{

font-size:20px;
font-weight:700;

color:white;
line-height:1;
}

.admin-orders-label{

font-size:11px;

color:#94a3b8;

text-transform:uppercase;
letter-spacing:.08em;
}

#adminOrdersPulse{

width:12px;
height:12px;

border-radius:50%;

background:#ef4444;

box-shadow:
0 0 15px rgba(239,68,68,.8);

animation:
ordersPulse 2s infinite;
}

@keyframes ordersPulse{

0%{
transform:scale(1);
}

50%{
transform:scale(1.4);
}

100%{
transform:scale(1);
}

}


/* =========================
   ADMIN MENU FIX
========================= */

#admin-section{
    display:flex;
    flex-direction:column;
    width:100%;
}


#admin-section a{

    width:100%;

    display:flex;
    align-items:center;

    padding:12px 14px;

    color:#e5e7eb;

    text-decoration:none;

    font-size:14px;

    transition:.2s ease;
}


#admin-section a:hover{

    background:rgba(14,165,233,.12);

    color:#38bdf8;
}







/* =====================================================
   RESPONSIVE NAVIGATION
===================================================== */


/* =========================
   NAV TOGGLE (MOBILE HAMBURGER)
========================= */

.nav-toggle{
  display:none;
}

@media(max-width:768px){

.logo-panel{
  gap:10px;
  padding:8px 12px;
}

.logo-panel img{
  height:42px;
}

.nav-container{
  width:100%;
  padding:0 3px;

  position:relative;
}

/* compact icon-only button, now living in the top bar before the logo */
.nav-toggle{
  display:flex;
  align-items:center;
  justify-content:center;
  flex-shrink:0;

  width:40px;
  height:40px;
  padding:0;

  background:rgba(255,255,255,0.05);
  backdrop-filter:blur(14px);

  border:1px solid rgba(255,255,255,0.08);
  border-radius:10px;

  color:#e5e7eb;
  cursor:pointer;

  transition:.2s ease;
}

.nav-toggle:hover,
.nav-toggle.open{
  background:rgba(14,165,233,0.15);
  border-color:rgba(14,165,233,.5);
  color:#38bdf8;
}

.nav-toggle-bars{
  display:flex;
  flex-direction:column;
  justify-content:center;
  gap:4px;

  width:18px;
  height:14px;

  flex-shrink:0;
}

.nav-toggle-bars span{
  display:block;
  height:2px;
  border-radius:2px;

  background:currentColor;

  transition:transform .25s ease, opacity .2s ease;
}

.nav-toggle.open .nav-toggle-bars span:nth-child(1){
  transform:translateY(6px) rotate(45deg);
}

.nav-toggle.open .nav-toggle-bars span:nth-child(2){
  opacity:0;
}

.nav-toggle.open .nav-toggle-bars span:nth-child(3){
  transform:translateY(-6px) rotate(-45deg);
}

/* the dropdown list itself */
nav{
  width:100%;
  margin-top:8px;

  flex-direction:column;

  background:rgba(15,27,45,0.95);
  backdrop-filter:blur(18px);

  border:1px solid rgba(255,255,255,0.08);
  border-radius:14px;

  box-shadow:0 20px 40px rgba(0,0,0,0.5);

  max-height:0;
  opacity:0;
  pointer-events:none;
  overflow:hidden;

  transition:max-height .3s ease, opacity .25s ease;
}

nav.open{
  max-height:400px;
  opacity:1;
  pointer-events:auto;
}

nav a{
  padding:14px 16px;
  text-align:left;

  border-bottom:1px solid rgba(255,255,255,0.06);
}

nav a:last-child{
  border-bottom:none;
}

nav a:hover{
  background:rgba(14,165,233,0.12);
  color:#38bdf8;
}

/* =========================
   HEADER RIGHT SIDE — COMPACT (MOBILE)
========================= */

#user-panel{
  gap:8px;
  flex-wrap:nowrap;

  overflow-x:auto;
  scrollbar-width:none;

  /* overflow-x:auto forces overflow-y to compute as auto too, so anything
     that bleeds outside the box (the admin avatar's glow/box-shadow) gets
     clipped top/bottom even though the avatar itself fits. This padding
     gives the glow room inside the scroll box instead. */
  padding:10px 2px;
}

#user-panel::-webkit-scrollbar{
  display:none;
}

#auth-open-btn{
  padding:8px 10px;
  font-size:13px;
  white-space:nowrap;
}

#user-avatar{
  width:38px;
  height:38px;
}

/* tighten the admin glow on mobile - the 25/45px hover blur used on
   desktop is overkill for a 38px avatar and is what was getting clipped */
#user-avatar.admin{
  box-shadow:
    0 0 0 2px rgba(245, 197, 66, 0.08),
    0 0 5px rgba(245, 197, 66, 0.28),
    0 0 12px rgba(245, 197, 66, 0.10),
    inset 0 0 0 1px rgba(255, 236, 153, 0.25);
}

#user-avatar.admin:hover{
  box-shadow:
    0 0 0 2px rgba(245, 197, 66, 0.12),
    0 0 14px rgba(245, 197, 66, 0.38),
    0 0 22px rgba(245, 197, 66, 0.14),
    inset 0 0 0 1px rgba(255, 245, 190, 0.35);
}

/* collapse the admin orders widget to just the pulse + number */
#adminOrdersWidget{
  gap:6px;
  padding:6px 10px;
}

.admin-orders-label{
  display:none;
}

#adminOrdersNumber{
  font-size:16px;
}

}