/* ================= RESET ================= */

*{
  margin:0;
  padding:0;
  box-sizing:border-box;
  font-family:"Poppins",sans-serif;
}

html{
  scroll-behavior:smooth;
  overflow-x:hidden;
}

/* ================= BODY ================= */

body{
  color:#fff;
  overflow-x:hidden;

  background:
    linear-gradient(rgba(0,0,0,0.55), rgba(0,0,0,0.65)),
    url("images/Hero-imggg.jpg");

  background-size:cover;
  background-position:center;

  position:relative;
  min-height:100vh;
}

/* ================= PREMIUM OVERLAY ================= */

body::before{
  content:'';
  position:absolute;
  inset:0;

  background:linear-gradient(
    135deg,
    rgba(1,98,136,0.88),
    rgba(0,71,99,0.82),
    rgba(13,28,34,0.92)
  );

  z-index:0;
}

/* ================= GOLD GLOW ================= */

body::after{
  content:'';

  position:absolute;

  width:420px;
  height:420px;

  background:rgba(255,204,0,0.12);

  border-radius:50%;

  filter:blur(120px);

  top:-120px;
  right:-120px;

  z-index:0;
}

/* ================= LAYOUT ================= */

.admin-layout{
  display:flex;
  min-height:100vh;

  position:relative;
  z-index:2;
}

/* ================= SIDEBAR ================= */

.sidebar{
  position:fixed;

  top:0;
  left:0;

  width:280px;
  height:100vh;

  padding:30px 20px;

  background:rgba(255,255,255,0.08);

  backdrop-filter:blur(24px);

  border-right:1px solid rgba(255,255,255,0.12);

  z-index:100;
}

/* ================= LOGO ================= */

.sidebar h2{
  font-size:1.7rem;
  font-weight:800;

  margin-bottom:40px;

  background:linear-gradient(90deg,#ffcc00,#ffe27a);

  background-clip:text;
  -webkit-text-fill-color:transparent;
}

/* ================= MENU ================= */

.sidebar nav{
  display:flex;
  flex-direction:column;
  gap:14px;
}

.sidebar a{
  display:flex;
  align-items:center;
  gap:12px;

  padding:15px 18px;

  border-radius:16px;

  text-decoration:none;

  color:#cbd5e1;

  background:rgba(255,255,255,0.03);

  border:1px solid rgba(255,255,255,0.08);

  position:relative;

  overflow:hidden;

  transition:0.35s ease;
}

/* GOLD FLOW EFFECT */

.sidebar a::before{
  content:"";

  position:absolute;
  inset:0;

  background:linear-gradient(
    90deg,
    transparent,
    rgba(255,204,0,0.18),
    transparent
  );

  transform:translateX(-100%);
  transition:0.6s ease;
}

.sidebar a:hover{
  background:rgba(255,204,0,0.12);

  color:#ffcc00;

  border-color:rgba(255,204,0,0.25);

  transform:translateX(6px);
}

.sidebar a:hover::before{
  transform:translateX(100%);
}

.sidebar a.active{
  background:#ffcc00;

  color:#08131b;

  font-weight:700;

  box-shadow:
    0 10px 30px rgba(255,204,0,0.25);
}

/* ================= MAIN ================= */

.admin-main{
  flex:1;

  margin-left:280px;

  padding:35px;

  position:relative;
  z-index:2;
}

/* ================= TITLE ================= */

.admin-main h1{
  font-size:2.6rem;

  margin-bottom:30px;

  font-weight:800;
}

/* ================= STATS ================= */

.stats-grid{
  display:grid;

  grid-template-columns:repeat(auto-fit,minmax(240px,1fr));

  gap:22px;

  margin-bottom:35px;
}

/* ================= CARD ================= */

.card{
  background:rgba(255,255,255,0.08);

  backdrop-filter:blur(24px);

  border:1px solid rgba(255,255,255,0.12);

  border-radius:26px;

  padding:28px;

  box-shadow:
    0 20px 60px rgba(0,0,0,0.35),
    inset 0 1px 1px rgba(255,255,255,0.05);

  transition:0.35s ease;
}

.card:hover{
  transform:translateY(-8px);

  border-color:rgba(255,204,0,0.25);
}

.card h3{
  color:rgba(255,255,255,0.72);

  margin-bottom:12px;

  font-size:0.95rem;
}

.card p{
  font-size:2.2rem;

  font-weight:800;

  color:#ffcc00;
}

/* ================= ANALYTICS GRID ================= */

.analytics-grid{
  display:grid;

  grid-template-columns:2fr 1fr;

  gap:25px;

  margin-bottom:30px;
}

/* ================= CHART SECTION ================= */

.chart-section{
  background:rgba(255,255,255,0.08);

  backdrop-filter:blur(24px);

  border:1px solid rgba(255,255,255,0.12);

  border-radius:28px;

  padding:30px;

  box-shadow:
    0 20px 60px rgba(0,0,0,0.35),
    inset 0 1px 1px rgba(255,255,255,0.05);
}

.chart-section h2{
  margin-bottom:20px;

  font-size:1.3rem;
}

/* IMPORTANT FIX */

.chart-wrapper{
  position:relative;

  width:100%;
  height:320px;

  overflow:hidden;
}

/* CANVAS FIX */

#salesChart{
  width:100% !important;
  height:100% !important;
}

/* ================= INSIGHTS ================= */

.insights-section{
  background:rgba(255,255,255,0.08);

  backdrop-filter:blur(24px);

  border:1px solid rgba(255,255,255,0.12);

  border-radius:28px;

  padding:30px;

  box-shadow:
    0 20px 60px rgba(0,0,0,0.35),
    inset 0 1px 1px rgba(255,255,255,0.05);
}

.insights-section h2{
  margin-bottom:20px;

  font-size:1.3rem;
}

.insights-box{
  display:flex;
  flex-direction:column;

  gap:14px;
}

.insights-box p{
  padding:16px 18px;

  border-radius:18px;

  background:rgba(255,255,255,0.04);

  border:1px solid rgba(255,255,255,0.08);

  color:rgba(255,255,255,0.82);

  transition:0.3s ease;
}

.insights-box p:hover{
  transform:translateX(6px);

  border-color:rgba(255,204,0,0.22);

  background:rgba(255,204,0,0.05);
}

/* ================= DASHBOARD GRID ================= */

.dashboard-grid-2{
  display:grid;

  grid-template-columns:1fr 1fr;

  gap:25px;

  margin-top:10px;
}

/* ================= PANEL ================= */

.panel{
  background:rgba(255,255,255,0.08);

  backdrop-filter:blur(24px);

  border:1px solid rgba(255,255,255,0.12);

  border-radius:28px;

  padding:30px;

  box-shadow:
    0 20px 60px rgba(0,0,0,0.35),
    inset 0 1px 1px rgba(255,255,255,0.05);
}

.panel h2{
  margin-bottom:18px;

  font-size:1.3rem;
}

/* ================= SEARCH INPUT ================= */

.search-input{
  width:100%;

  padding:15px 18px;

  border-radius:16px;

  border:1px solid rgba(255,255,255,0.1);

  background:rgba(255,255,255,0.04);

  color:#fff;

  outline:none;

  margin-bottom:20px;

  transition:0.3s ease;
}

.search-input:focus{
  border-color:rgba(255,204,0,0.4);

  box-shadow:
    0 0 0 4px rgba(255,204,0,0.08);
}

/* ================= SALES LIST ================= */

#salesList,
#usersList{
  display:flex;
  flex-direction:column;

  gap:16px;
}

/* ================= SALE ITEM ================= */

.sale-item{
  background:rgba(255,255,255,0.05);

  border:1px solid rgba(255,255,255,0.08);

  border-radius:20px;

  padding:20px;

  transition:0.3s ease;
}

.sale-item:hover{
  transform:translateX(6px);

  border-color:rgba(255,204,0,0.25);

  background:rgba(255,204,0,0.06);
}

.sale-item h3{
  color:#ffcc00;

  margin-bottom:8px;
}

.sale-item p{
  color:rgba(255,255,255,0.7);

  line-height:1.6;
}

/* ================= USER ITEM ================= */

.user-item{
  background:rgba(255,255,255,0.05);

  border:1px solid rgba(255,255,255,0.08);

  border-radius:20px;

  padding:20px;

  transition:0.3s ease;
}

.user-item:hover{
  transform:translateX(6px);

  border-color:rgba(255,204,0,0.25);

  background:rgba(255,204,0,0.06);
}

.user-item h3{
  color:#ffcc00;

  margin-bottom:8px;
}

.user-item p{
  color:rgba(255,255,255,0.7);

  line-height:1.6;
}

/* ================= SCROLLBAR ================= */

::-webkit-scrollbar{
  width:8px;
}

::-webkit-scrollbar-thumb{
  background:linear-gradient(#ffcc00,#ffd84d);

  border-radius:20px;
}

/* ================= RESPONSIVE ================= */

@media(max-width:1100px){

  .analytics-grid{
    grid-template-columns:1fr;
  }

  .dashboard-grid-2{
    grid-template-columns:1fr;
  }
}

@media(max-width:900px){

  .sidebar{
    position:relative;

    width:100%;
    height:auto;

    border-right:none;

    border-bottom:1px solid rgba(255,255,255,0.12);
  }

  .admin-layout{
    flex-direction:column;
  }

  .admin-main{
    margin-left:0;

    padding:25px 20px;
  }
}

@media(max-width:700px){

  .admin-main h1{
    font-size:2rem;
  }

  .card p{
    font-size:1.8rem;
  }

  .chart-wrapper{
    height:260px;
  }
}