:root{
  --sidebar-w: 260px;
  --sidebar-bg: #133a20;
  --sidebar-bg-active: #1e7d3c;
}
.admin-body{
  padding-top:0;
  background:#f4f7f4;
}
.admin-shell{
  display:flex;
  min-height:100vh;
}

/* ---------- SIDEBAR ---------- */
.sidebar{
  width:var(--sidebar-w);
  min-width:var(--sidebar-w);
  background:var(--sidebar-bg);
  position:sticky;
  top:0;
  height:100vh;
  overflow-y:auto;
}
.sidebar-brand{
  border-bottom:1px solid rgba(255,255,255,.08);
}
.nav-section-label{
  color:rgba(255,255,255,.35);
  font-size:.7rem;
  text-transform:uppercase;
  letter-spacing:.08em;
  font-weight:600;
  padding:1rem .75rem .35rem;
}
.sidebar-link{
  display:flex;
  align-items:center;
  gap:.65rem;
  padding:.6rem .75rem;
  border-radius:10px;
  color:rgba(255,255,255,.75);
  text-decoration:none;
  font-size:.9rem;
  font-weight:500;
  margin-bottom:.15rem;
  transition:background .15s ease, color .15s ease;
}
.sidebar-link:hover{
  background:rgba(255,255,255,.06);
  color:#fff;
}
.sidebar-link.active{
  background:var(--sidebar-bg-active);
  color:#fff;
}
.sidebar-link.disabled{
  opacity:.45;
  cursor:not-allowed;
  pointer-events:none;
}
.sidebar-icon{
  width:20px;
  text-align:center;
  font-size:1rem;
}
.emoji-icon{ font-size:1.05rem; line-height:1; }
.badge-soon{
  margin-left:auto;
  background:rgba(255,255,255,.12);
  color:rgba(255,255,255,.8);
  font-size:.65rem;
  padding:.15rem .45rem;
  border-radius:20px;
}
.sidebar-footer{
  border-top:1px solid rgba(255,255,255,.08);
}
.logout-link{ color:#ffb4b4; }
.logout-link:hover{ color:#fff; background:#a83232; }

/* ---------- MAIN ---------- */
.main-wrap{
  flex:1;
  min-width:0;
  display:flex;
  flex-direction:column;
}
.topbar{
  height:64px;
  background:#fff;
  border-bottom:1px solid #e7ece7;
  position:sticky;
  top:0;
  z-index:10;
}
.user-avatar{
  width:36px; height:36px;
  border-radius:50%;
  background:var(--brand-green);
  color:#fff;
  display:flex; align-items:center; justify-content:center;
  font-weight:700; font-size:.9rem;
}
.main-content{
  flex:1;
}

/* ---------- KPI ---------- */
.kpi-card{
  background:#fff;
  border:1px solid #e7ece7;
  border-radius:16px;
  padding:1.1rem;
  height:100%;
}
.kpi-icon{
  width:42px; height:42px;
  border-radius:12px;
  display:flex; align-items:center; justify-content:center;
  font-size:1.15rem;
  margin-bottom:.6rem;
}
.kpi-value{
  font-size:1.6rem;
  font-weight:700;
  line-height:1.1;
}
.kpi-label{
  color:#6c7a70;
  font-size:.8rem;
  margin-top:.2rem;
}
.kpi-empty{ opacity:.85; }

.content-card{
  background:#fff;
  border:1px solid #e7ece7;
  border-radius:16px;
}

.cow-thumb{
  width:34px; height:34px;
  border-radius:8px;
  background:#eef5ee;
  display:flex; align-items:center; justify-content:center;
}

.status-badge{
  font-size:.72rem;
  font-weight:600;
  padding:.25rem .6rem;
  border-radius:20px;
  background:#eef5ee;
  color:#1e7d3c;
}
.status-sold{ background:#f1f1f1; color:#666; }
.status-dead{ background:#fdeaea; color:#c0392b; }
.status-sick, .status-under-treatment{ background:#fff4e0; color:#b8790a; }
.status-pregnant{ background:#f1e8fb; color:#7b3ec2; }
.status-lactating{ background:#e6f4ff; color:#1a73c7; }
.status-transferred{ background:#eef1f6; color:#4a5568; }

/* ---------- COW MODULE ---------- */
.section-title{
  display:flex; align-items:center; gap:.5rem;
  color:var(--brand-green-dark);
  margin-bottom:1rem;
  font-size:.9rem;
}
.cow-thumb-img{
  width:100%; height:100%;
  object-fit:cover;
  border-radius:8px;
}
.profile-photo{
  width:90px; height:90px;
  border-radius:16px;
  background:#eef5ee;
  display:flex; align-items:center; justify-content:center;
  overflow:hidden;
}
.profile-photo img{
  width:100%; height:100%; object-fit:cover;
}
.qr-placeholder{
  border:1.5px dashed #cfe0d2;
  border-radius:12px;
  padding:.6rem 1rem;
  text-align:center;
  display:inline-block;
}
.profile-tabs{
  border-bottom:1px solid #e7ece7;
  flex-wrap:nowrap;
  overflow-x:auto;
  overflow-y:hidden;
}
.profile-tabs .nav-link{
  color:#6c7a70;
  font-size:.85rem;
  font-weight:500;
  white-space:nowrap;
  border:none;
  border-bottom:2px solid transparent;
}
.profile-tabs .nav-link.active{
  color:var(--brand-green);
  border-bottom-color:var(--brand-green);
  background:transparent;
}
.breadcrumb-item a{ color:#6c7a70; }
.breadcrumb-item.active{ color:var(--brand-green); }

@media (max-width:991.98px){
  .sidebar{
    position:fixed;
    left:-280px;
    z-index:1050;
    transition:left .2s ease;
    box-shadow:0 0 30px rgba(0,0,0,.2);
  }
  .sidebar.show{ left:0; }
}
