:root{
  --meiko-blue: #0083bb;
  --meiko-dark: #0E151A;
  --page-bg: #f0f0f0;
  --shadow: 0 4px 12px rgba(0,0,0,.15);
  --radius: 14px;
  --header-h: 70px;
  --sidebar-w: 250px;
}

html, body { height: 100%; }

body{
  background: var(--page-bg);
  font-family: "Helvetica Neue", Arial, sans-serif;
  overflow-x: hidden;
  margin: 0;
}

/* ================= HEADER ================= */
.meiko-header{
  height: var(--header-h);
  background: #fff;
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1050;
  box-shadow: 0 2px 10px rgba(0,0,0,.06);
}

.meiko-header .logo{
  height: 56px;
  width: auto;
  display: block;
}

/* ================= SIDEBAR ================= */
.meiko-sider{
  position: fixed;
  top: var(--header-h);
  left: 0;
  bottom: 0;
  width: var(--sidebar-w);
  box-sizing: border-box; /* FIX OVERLAP */
  background: var(--meiko-dark);
  padding: 18px 12px;
  overflow-y: auto;
  z-index: 1020;
}

.meiko-sider a{
  color: #fff;
  text-decoration: none;
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
  margin-bottom: 8px;
}

.meiko-sider a.active{
  color: #009FE4;
  font-weight: 600;
}

.meiko-sider a:hover{
  background: rgba(255,255,255,.08);
}

/* ================= MAIN ================= */
.meiko-main{
  margin-left: var(--sidebar-w);
  padding-top: var(--header-h);
  min-height: 100vh;
}

.meiko-content{
  width: 100%;
  max-width: 100%;
  padding: 24px;
  box-sizing: border-box;
}

/* ================= SEARCH ================= */
.meiko-search{
  max-width: 600px;
  width: 100%;
  box-shadow: var(--shadow);
}

/* ================= CARDS ================= */
.meiko-card{
  border: 0;
  border-radius: var(--radius);
  box-shadow: rgba(0, 0, 0, 0.16) 0 3px 6px,
              rgba(0, 0, 0, 0.23) 0 3px 6px;
  background: var(--meiko-blue);
  color: #fff;
  overflow: hidden;
  min-height: 420px;
  display: flex;
  flex-direction: column;
}

.meiko-card img{
  width: 100%;
  height: 240px;
  object-fit: contain;
  object-position: center center;
  transition: transform .3s ease;
  background: #f8f9fa;
  padding: 10px;
}

.meiko-card:hover img{
  transform: scale(1.05);
}

.meiko-card .p-3{
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.meiko-actions{
  display: flex;
  border-top: 1px solid rgba(255,255,255,.25);
  margin-top: auto;
}

.meiko-actions a{
  flex: 1;
  text-align: center;
  padding: 10px 0;
  color: #fff;
  text-decoration: none;
}

.meiko-actions a:hover{
  background: rgba(255,255,255,.10);
}

/* ================= BAG BADGE ================= */
.bag-badge{
  display: inline-block;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  line-height: 22px;
  border-radius: 999px;
  background: var(--meiko-blue);
  color: #fff;
  font-size: 12px;
  text-align: center;
  margin-left: 8px;
}

/* ================= OFFCANVAS ================= */
.offcanvas-header{
  border-bottom: 1px solid rgba(0,0,0,.08);
}

/* ================= CATEGORY TREE ================= */
.cat-node{ margin-bottom: 2px; }

.cat-line{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:10px 12px;
  border-radius:10px;
}

.cat-a{
  color:#fff;
  text-decoration:none;
  flex:1;
  line-height:1.2;
}

.cat-a.active{
  background: rgba(255,255,255,.12);
  border-radius: 10px;
  padding:10px 12px;
  margin: -10px -12px;
}

.cat-a:hover{
  background: rgba(255,255,255,.08);
  border-radius:10px;
}

.cat-btn{
  border:0;
  background:transparent;
  color:#fff;
}

.cat-chev{
  transition: transform .2s ease;
}

.cat-btn-spacer{
  width:22px;
}

.cat-children{
  padding-left:14px;
}

.cat-child{
  display:block;
  padding:8px 12px;
  margin:4px 0;
  border-radius:10px;
  color:#fff;
  text-decoration:none;
}

.cat-child:hover{
  background: rgba(255,255,255,.08);
}

.cat-child.active{
  background: rgba(0,131,187,.25);
}

/* ================= FOLDER ================= */
.folder-cover{
  width:100%;
  height:160px;
  border-radius:14px;
  overflow:hidden;
  background:#f5f5f5;
  border:1px solid #e5e7eb;
}

.folder-cover img{
  width:100%;
  height:100%;
  object-fit:cover;
}

.folder-icon{
  width:100%;
  height:160px;
  border-radius:14px;
  display:flex;
  align-items:center;
  justify-content:center;
  background:#f8f9fa;
  border:1px solid #e5e7eb;
  font-size:48px;
  color:#98a2b3;
}

/* ================= TABLET ================= */
@media (max-width: 991.98px){
  .meiko-sider{
    display: none !important;
  }

  .meiko-main{
    margin-left: 0 !important;
    width: 100% !important;
  }

  .meiko-content{
    padding: 16px 12px !important;
  }

  .meiko-search{
    max-width: 100%;
  }
}

/* ================= MOBILE ================= */
@media (max-width: 575.98px){
  .meiko-header .logo{
    height: 48px;
  }

  .meiko-content{
    padding: 14px 10px !important;
  }

  .meiko-card{
    min-height: auto;
  }

  .meiko-card img{
    height: 200px;
  }
}