/* style.css */

:root {
  --bg: #081028;
  --card: rgba(255,255,255,0.08);
  --border: rgba(255,255,255,0.1);
  --text: #ffffff;
  --text-light: #9ca3af;
  --primary: #4f46e5;
  --secondary: #3b82f6;
  --shadow: 0 10px 30px rgba(0,0,0,0.25);
}

body.light-mode {
  --bg: #f4f7fb;
  --card: rgba(255,255,255,0.7);
  --border: rgba(0,0,0,0.08);
  --text: #111827;
  --text-light: #6b7280;
  --shadow: 0 10px 25px rgba(0,0,0,0.08);
}

*{
  margin:0;
  padding:0;
  box-sizing:border-box;
}

html{
  scroll-behavior:smooth;
}

body{
  font-family:'Inter',sans-serif;
  background:var(--bg);
  color:var(--text);
  transition:0.3s ease;
  overflow-x:hidden;
}

.dashboard{
  display:flex;
  min-height:100vh;
  width:100%;
}

/* ===============================
   PAGE SWITCHING SYSTEM
================================= */

.page{
  display:none;
  animation:pageFade 0.35s ease;
  width:100%;
  min-width:0;
}

.page.active{
  display:block;
}

@keyframes pageFade{

  from{
    opacity:0;
    transform:translateY(15px);
  }

  to{
    opacity:1;
    transform:translateY(0);
  }

}

/* SIDEBAR */

.sidebar{
  width:270px;
  padding:30px 20px;
  border-right:1px solid var(--border);
  background:rgba(255,255,255,0.03);
  backdrop-filter:blur(20px);
  position:fixed;
  height:100vh;
  transition:0.3s ease;
  z-index:999;
  overflow-y:auto;
}

.logo{
  display:flex;
  align-items:center;
  gap:12px;
  margin-bottom:40px;
}

.logo-icon{
  width:50px;
  height:50px;
  border-radius:15px;
  background:linear-gradient(135deg,#4f46e5,#3b82f6);
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:20px;
  flex-shrink:0;
}

.nav-links{
  display:flex;
  flex-direction:column;
  gap:10px;
}

.nav-item{
  display:flex;
  align-items:center;
  gap:14px;
  padding:15px;
  border-radius:16px;
  color:var(--text-light);
  text-decoration:none;
  transition:0.3s ease;
  position:relative;
  overflow:hidden;
}

.nav-item::before{
  content:"";
  position:absolute;
  inset:0;
  background:linear-gradient(135deg,#4f46e5,#3b82f6);
  opacity:0;
  transition:0.3s ease;
  z-index:-1;
}

.nav-item:hover::before,
.nav-item.active::before{
  opacity:1;
}

.nav-item:hover,
.nav-item.active{
  color:#fff;
  transform:translateX(4px);
}

.nav-item i{
  min-width:20px;
}

/* MAIN */

.main{
  flex:1;
  margin-left:270px;
  padding:30px;
  width:100%;
  overflow:hidden;
  min-width:0;
}

.main > *{
  width:100%;
  min-width:0;
}

/* TOPBAR */

.topbar{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:20px;
  margin-bottom:30px;
  width:100%;
}

.top-left{
  display:flex;
  align-items:center;
  gap:15px;
  flex:1;
  min-width:0;
}

.search-box{
  display:flex;
  align-items:center;
  gap:10px;
  background:var(--card);
  border:1px solid var(--border);
  padding:14px 18px;
  border-radius:18px;
  min-width:320px;
  width:100%;
  max-width:500px;
}

.search-box input{
  background:none;
  border:none;
  outline:none;
  color:var(--text);
  width:100%;
  font-size:15px;
}

.search-box input::placeholder{
  color:var(--text-light);
}

.top-right{
  display:flex;
  align-items:center;
  gap:15px;
}

.icon-btn,
.primary-btn,
.table-actions button,
.chart-card button{
  border:none;
  cursor:pointer;
  transition:0.3s ease;
}

.icon-btn{
  width:50px;
  height:50px;
  border-radius:16px;
  background:var(--card);
  color:var(--text);
  border:1px solid var(--border);
  font-size:18px;
  display:flex;
  align-items:center;
  justify-content:center;
}

.icon-btn:hover{
  transform:translateY(-3px);
}

.profile{
  display:flex;
  align-items:center;
  gap:12px;
  background:var(--card);
  padding:10px 14px;
  border-radius:18px;
  border:1px solid var(--border);
}

.profile img{
  width:45px;
  height:45px;
  border-radius:50%;
  object-fit:cover;
}

.profile p{
  color:var(--text-light);
  font-size:13px;
}

/* GLASS */

.glass{
  background:var(--card);
  backdrop-filter:blur(20px);
  border:1px solid var(--border);
  box-shadow:var(--shadow);
}

/* HERO */

.hero-card{
  position:relative;
  overflow:hidden;
  padding:40px;
  border-radius:30px;
  margin-bottom:30px;
  width:100%;
  max-width:100%;
}

.hero-card h1{
  font-size:42px;
  margin-bottom:12px;
  line-height:1.2;
}

.hero-card p{
  color:var(--text-light);
  max-width:650px;
  line-height:1.7;
  margin-bottom:25px;
}

.primary-btn{
  padding:14px 24px;
  border-radius:14px;
  background:linear-gradient(135deg,#4f46e5,#3b82f6);
  color:#fff;
  font-weight:600;
}

.primary-btn:hover{
  transform:translateY(-3px);
}

.hero-circle{
  position:absolute;
  width:300px;
  height:300px;
  border-radius:50%;
  background:linear-gradient(135deg,#4f46e5,#9333ea);
  top:-100px;
  right:-100px;
  opacity:0.3;
}

/* STATS */

.stats-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
  gap:20px;
  margin-bottom:30px;
  width:100%;
}

.stat-card{
  padding:24px;
  border-radius:24px;
  display:flex;
  justify-content:space-between;
  align-items:center;
  transition:0.3s ease;
  gap:15px;
  width:100%;
  max-width:100%;
  min-width:0;
}

.stat-card:hover{
  transform:translateY(-6px);
}

.stat-icon{
  width:55px;
  height:55px;
  border-radius:16px;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:22px;
  flex-shrink:0;
}

.blue{background:#3b82f633;}
.purple{background:#8b5cf633;}
.orange{background:#f59e0b33;}
.green{background:#10b98133;}

.stat-card p{
  color:var(--text-light);
  margin-top:5px;
}

.badge{
  padding:6px 10px;
  border-radius:999px;
  font-size:13px;
  font-weight:600;
  white-space:nowrap;
}

.positive{
  background:#10b98133;
  color:#10b981;
}

.negative{
  background:#ef444433;
  color:#ef4444;
}

/* CHARTS */

.charts-grid{
  display:grid;
  grid-template-columns:minmax(0,2fr) minmax(320px,1fr);
  gap:20px;
  margin-bottom:30px;
  width:100%;
}

.chart-card{
  padding:24px;
  border-radius:24px;
  min-height:350px;
  width:100%;
  max-width:100%;
  min-width:0;
  overflow:hidden;
}

.chart-card canvas{
  width:100% !important;
  height:280px !important;
}

.card-header{
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-bottom:20px;
  gap:15px;
}

.chart-card button,
.table-actions button{
  padding:10px 14px;
  border-radius:12px;
  background:rgba(255,255,255,0.08);
  color:var(--text);
  border:1px solid var(--border);
}

.chart-card button:hover,
.table-actions button:hover{
  transform:translateY(-2px);
}

/* CONTENT */

.content-grid{
  display:grid;
  grid-template-columns:minmax(0,2fr) minmax(320px,1fr);
  gap:20px;
  align-items:start;
  width:100%;
}

.table-card{
  padding:24px;
  border-radius:24px;
  width:100%;
  overflow:hidden;
  min-width:0;
  max-width:100%;
}

.table-wrapper{
  width:100%;
  overflow-x:auto;
  overflow-y:hidden;
}

table{
  width:100%;
  border-collapse:collapse;
  min-width:650px;
}

th,td{
  padding:18px;
  text-align:left;
}

th{
  color:var(--text-light);
}

tbody tr{
  border-top:1px solid var(--border);
  transition:0.3s ease;
}

tbody tr:hover{
  background:rgba(255,255,255,0.03);
}

.status{
  padding:8px 12px;
  border-radius:999px;
  font-size:13px;
  white-space:nowrap;
}

.completed{
  background:#10b98133;
  color:#10b981;
}

.pending{
  background:#f59e0b33;
  color:#f59e0b;
}

.cancelled{
  background:#ef444433;
  color:#ef4444;
}

/* WIDGETS */

.widgets{
  display:flex;
  flex-direction:column;
  gap:20px;
  width:100%;
  min-width:0;
}

.widget{
  padding:24px;
  border-radius:24px;
  width:100%;
  overflow:hidden;
  max-width:100%;
}

.team-member{
  display:flex;
  align-items:center;
  gap:12px;
  margin-bottom:18px;
}

.team-member img{
  width:45px;
  height:45px;
  border-radius:50%;
  object-fit:cover;
}

.team-member p{
  color:var(--text-light);
  font-size:13px;
}

/* PROGRESS */

.progress-item{
  margin-bottom:20px;
}

.progress-top{
  display:flex;
  justify-content:space-between;
  margin-bottom:10px;
  gap:10px;
}

.progress-bar{
  width:100%;
  height:10px;
  border-radius:999px;
  background:rgba(255,255,255,0.08);
  overflow:hidden;
}

.progress-bar div{
  height:100%;
  border-radius:999px;
  background:linear-gradient(135deg,#4f46e5,#3b82f6);
}

/* ACTIVITY */

.activity-item{
  display:flex;
  align-items:center;
  gap:12px;
  margin-bottom:16px;
  animation:pageFade 0.3s ease;
}

.dot{
  width:10px;
  height:10px;
  border-radius:50%;
  background:#4f46e5;
  flex-shrink:0;
}

/* CALENDAR */

.calendar-box{
  text-align:center;
}

.calendar-box h2{
  font-size:52px;
}

.calendar-box p{
  color:var(--text-light);
  margin-bottom:20px;
}

.meeting{
  background:rgba(255,255,255,0.05);
  padding:14px;
  border-radius:16px;
  margin-bottom:14px;
}

/* MENU */

.menu-btn{
  display:none;
  width:50px;
  height:50px;
  border:none;
  border-radius:16px;
  background:var(--card);
  color:var(--text);
  font-size:20px;
  align-items:center;
  justify-content:center;
  cursor:pointer;
}

/* RESPONSIVE */

@media (max-width:1200px){

  .main{
    padding:20px;
  }

  .hero-card h1{
    font-size:36px;
  }

}

@media(max-width:1100px){

  .charts-grid,
  .content-grid{
    grid-template-columns:1fr;
  }

}

@media (max-width:992px){

  .sidebar{
    position:fixed;
    left:-280px;
    transition:0.3s ease;
    z-index:1000;
  }

  .sidebar.show{
    left:0;
  }

  .main{
    margin-left:0;
  }

  .menu-btn{
    display:flex;
  }

  .topbar{
    flex-wrap:wrap;
    gap:15px;
  }

  .search-box{
    min-width:100%;
    max-width:100%;
  }

  .charts-grid{
    grid-template-columns:1fr;
  }

  .content-grid{
    grid-template-columns:1fr;
  }

  .stats-grid{
    grid-template-columns:repeat(2,1fr);
  }

}

@media (max-width:768px){

  .stats-grid{
    grid-template-columns:1fr;
  }

  .hero-card{
    padding:25px;
  }

  .hero-card h1{
    font-size:28px;
  }

  .hero-card p{
    font-size:14px;
  }

  .top-right{
    width:100%;
    justify-content:space-between;
    flex-wrap:wrap;
  }

  .profile div{
    display:none;
  }

  table{
    font-size:14px;
  }

  th,
  td{
    padding:12px;
  }

  .card-header{
    flex-direction:column;
    align-items:flex-start;
  }

}

@media (max-width:480px){

  .main{
    padding:15px;
  }

  .hero-card h1{
    font-size:24px;
  }

  .primary-btn{
    width:100%;
    text-align:center;
  }

  .icon-btn{
    width:45px;
    height:45px;
  }

  .stat-card{
    flex-direction:column;
    align-items:flex-start;
    gap:10px;
  }

  .charts-grid,
  .content-grid{
    gap:15px;
  }

  .widget,
  .table-card,
  .chart-card{
    padding:18px;
  }

  .table-wrapper{
    overflow-x:auto;
  }

  table{
    min-width:600px;
  }

  .search-box{
    padding:12px 15px;
  }

}
