/* ===== GLOBAL RESET ===== */
*{
  margin:0;
  padding:0;
  box-sizing:border-box;
  font-family:"Segoe UI", Arial, sans-serif;
}

body{
  background:#f6f7fb;
  color:#1e293b;
}

/* ===== HEADER ===== */
.header{
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:10px 18px;
  background:#fff;
  border-bottom:1px solid #e5e7eb;
  position:sticky;
  top:0;
  z-index:100;
}

.left-area{
  display:flex;
  align-items:center;
  gap:14px;
}

.logo{
  font-size:24px;
  font-weight:600;
}

.menu-btn{
  border:none;
  background:#6999fb;
  color:white;
  padding:8px;
  border-radius:8px;
  cursor:pointer;
  display:none;
}

.search-box{
  display:flex;
  align-items:center;
  gap:8px;
  background:#f3f4f6;
  padding:8px 12px;
  border-radius:10px;
}

.search-box input{
  border:none;
  outline:none;
  background:transparent;
}

/* ===== RIGHT AREA ===== */
.right-area{
  display:flex;
  align-items:center;
  gap:10px;
}

.icon-btn{
  border:none;
  width:40px;
  height:40px;
  border-radius:50%;
  background:#6999fb;
  color:white;
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:center;
}

.profile{
  width:40px;
  height:40px;
  border-radius:50%;
}

/* ===== LAYOUT ===== */
.layout{
  display:flex;
}

/* ===== SIDEBAR ===== */
.sidebar{
  width:260px;
  min-height:100vh;
  background:#fff;
  border-right:1px solid #e5e7eb;
  padding:12px;
  transition:.3s;
}

.sidebar-menu{
  list-style:none;
}

.menu-item > a{
  display:flex;
  align-items:center;
  gap:10px;
  padding:10px;
  border-radius:10px;
  cursor:pointer;
  color:#374151;
  text-decoration:none;
}

.menu-item > a:hover{
  background:#eef2ff;
  color:#4338ca;
}

.arrow{
  margin-left:auto;
  transition:.3s;
}

.submenu{
  list-style:none;
  margin-left:30px;
  display:none;
}

.submenu li a{
  display:block;
  padding:6px 0;
  text-decoration:none;
  color:#4b5563;
  font-size:14px;
}

.submenu li a:hover{
  color:#4338ca;
}

.menu-item.open .submenu{
  display:block;
}

.menu-item.open .arrow{
  transform:rotate(90deg);
}

.submenu a.active{
  color:#4338ca;
  font-weight:600;
}

/* ===== PAGE CONTENT ===== */
.pages{
  flex:1;
  padding:20px;
  overflow-x:auto;
}

/* ===== CARD DESIGN ===== */
.page-card,
.card,
.chart-card,
.country-card,
.user-card{
  background:#fff;
  border-radius:16px;
  box-shadow:0 10px 25px rgba(0,0,0,0.05);
  padding:16px;
}

/* ===== DASHBOARD CARDS ===== */
.card-grid{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:14px;
  margin-bottom:20px;
}

.card{
  display:flex;
  justify-content:space-between;
  align-items:center;
}

.card-info h4{
  font-size:14px;
  color:#64748b;
}

.card-info h2{
  font-size:26px;
  margin:4px 0;
}

.icon1{
  width:50px;
  height:50px;
  border-radius:50%;
  display:flex;
  align-items:center;
  justify-content:center;
  color:white;
}

.badge{ background:#7c3aed; }
.wallet{ background:#22c55e; }
.bill{ background:#ef4444; }

/* ===== CHART GRID ===== */
.charts-grid{
  display:grid;
  grid-template-columns:2fr 1fr 1fr;
  gap:16px;
  margin-bottom:20px;
}

.value{
  display:flex;
  align-items:center;
  gap:10px;
  margin:8px 0;
}

.green{
  background:#dcfce7;
  color:#16a34a;
  padding:4px 10px;
  border-radius:20px;
}

.red{
  background:#fee2e2;
  color:#dc2626;
  padding:4px 10px;
  border-radius:20px;
}

/* ===== TABLE ===== */
table{
  width:100%;
  border-collapse:collapse;
  background:#fff;
  border-radius:12px;
  overflow:hidden;
}

th{
  text-align:left;
  padding:12px;
  background:#f1f5f9;
  font-size:14px;
}

td{
  padding:12px;
  border-bottom:1px solid #e5e7eb;
  font-size:14px;
}

/* ===== BUTTONS ===== */
button{
  padding:7px 12px;
  background:#2563eb;
  color:white;
  border:none;
  border-radius:6px;
  cursor:pointer;
  font-size:13px;
}

.up-del{
  display:flex;
  gap:8px;
}

.edit-btn{ background:#2563eb; }
.delete-btn{ background:#dc2626; }

.logout-btn{
  display:flex;
  align-items:center;
  gap:6px;
  background:#ef4444;
  padding:8px 14px;
  border-radius:8px;
}

/* ===== QR IMAGE ===== */
.qr-img{
  width:55px;
  height:55px;
  object-fit:cover;
  border-radius:8px;
  border:1px solid #e5e7eb;
}

/* ===== RESPONSIVE ===== */
@media(max-width:1100px){
  .card-grid{
    grid-template-columns:repeat(2,1fr);
  }

  .charts-grid{
    grid-template-columns:1fr;
  }
}

@media(max-width:768px){

  .menu-btn{
    display:block;
  }

  .logo,
  .search-box{
    display:none;
  }

  .sidebar{
    position:fixed;
    left:0;
    top:60px;
    height:calc(100vh - 60px);
    transform:translateX(-100%);
    z-index:1000;
  }

  .sidebar.open{
    transform:translateX(0);
  }

  .card-grid{
    grid-template-columns:1fr;
  }

  table{
    display:block;
    overflow-x:auto;
    white-space:nowrap;
  }
}

@media(max-width:480px){
  .icon-btn{
    width:36px;
    height:36px;
  }

  .profile{
    width:36px;
    height:36px;
  }

  button{
    font-size:12px;
    padding:6px 10px;
  }
}
