/**handles:klds-dashboard**/

/* =========================================================
   KL Dashboard Suite (Option A) — Base
   Scope: .kl-dash-wrap
   ========================================================= */

.kl-dash-wrap{
  --kl-brand: var(--brand, #FF7A00);
  --kl-txt: #111827;
  --kl-muted: #6b7280;
  --kl-border: #e9e9ef;
  --kl-bg: #ffffff;
  --kl-soft: #f9f9fb;

  display:grid;
  grid-template-columns: 320px 1fr;
  gap:24px;
  align-items:start;

  font-size:14px;
  line-height:1.45;
  color: var(--kl-txt);
}

.kl-dash-wrap *{ box-sizing:border-box; }

@media (max-width: 991px){
  .kl-dash-wrap{ grid-template-columns: 1fr; gap:14px; }
  .kl-dash-aside{ order:1; }
  .kl-dash-main{ order:2; }
}

/* Sticky top (overrideable) */
:root{ --kl-sticky-top: 90px; }
@media (max-width: 991px){ :root{ --kl-sticky-top: 64px; } }
body.admin-bar{ --kl-sticky-top: calc(var(--kl-sticky-top) + 32px); }

.kita-sidebar .kl-side{
  position: sticky;
  top: var(--kl-sticky-top);
  z-index: 5;
}

/* =========================
   Sidebar card
   ========================= */
.kita-sidebar .kl-side__profile{
  margin-bottom: 12px;
}

.kita-sidebar .kl-side__list{
  list-style:none; margin:0; padding:10px;
  background: var(--kl-bg);
  border:1px solid var(--kl-border);
  border-radius:16px;
  box-shadow: 0 0 0 rgba(17,24,39,.00);
  display:flex; flex-direction:column; gap:6px;
}

.kita-sidebar .sidebar-link{
  display:flex; align-items:center; gap:10px;
  padding:12px 14px;
  border-radius:12px;
  color: var(--kl-muted);
  font-weight:700;
  text-decoration:none;
  line-height:1.2;
  transition: background .18s, color .18s, transform .08s;
  outline:none;
}

.kita-sidebar .sidebar-link:hover{
  background:#FFF5EA;
  color: var(--kl-txt);
}
.kita-sidebar .sidebar-link:focus-visible{
  box-shadow: 0 0 0 3px rgba(255,122,0,.25);
}

.kita-sidebar .sidebar-link.active{
  background: color-mix(in srgb, var(--kl-brand) 12%, white);
  border: 1px solid color-mix(in srgb, var(--kl-brand) 38%, transparent);
  color: var(--kl-brand);
}

.kita-sidebar .sidebar-link.active::before{
  content:"";
  width:6px; height:70%;
  border-radius:6px;
  background: var(--kl-brand);
  margin-right:2px;
}

.kita-sidebar .icon{
  width:32px; height:32px;
  display:inline-flex; align-items:center; justify-content:center;
  flex:0 0 40px;
}
.kita-sidebar .icon img{
  width:100%; height:100%;
  display:block; object-fit:contain;
  filter: grayscale(.15) saturate(.9) opacity(.95);
  transition: filter .2s ease, transform .12s ease;
}
.kita-sidebar .sidebar-link:hover .icon img{ transform: translateY(-1px); }
.kita-sidebar .sidebar-link.active .icon img{ filter:none; }
.kita-sidebar .label{ font-size:14px; }

/* Mobile: top tabs style */
@media (max-width: 991px){
  .kita-sidebar .kl-side__list{
    padding:10px;
    flex-direction:row;
    overflow-x:auto;
    gap:8px;
    scroll-snap-type:x mandatory;
    scroll-padding:10px;
  }
  .kita-sidebar .kl-side__list>li{ flex:1 0 auto; scroll-snap-align:start; }
  .kita-sidebar .sidebar-link{
    justify-content:center;
    padding:10px 12px;
  }
}

@media (max-width: 480px){
  .kita-sidebar .sidebar-link .label{ display:none; }
  .kita-sidebar .sidebar-link{ padding:10px; border-radius:10px; }
  .kita-sidebar .icon{ width:40px; height:40px; }
}

/* =========================
   Panel card
   ========================= */
/* override any legacy CSS that forced display:none */
.kl-dash-main .dashboard-panel{ display:block; }
.dashboard-panel[hidden]{ display:none !important; }

.dashboard-panel{
  background:#fff;
  padding:24px;
  border-radius:14px;
  box-shadow: 0 0 0 rgba(0,0,0,0);
  border: 1px solid rgba(233,233,239,.0);
}

@media (max-width: 480px){
  .dashboard-panel{ padding:16px; border-radius:14px; }
}

/* Panel heading */
.kl-panel-head{
  display:flex;
  align-items:center;
  gap:10px;
  margin:0 0 14px;
}
.kl-panel-head .icon{
  width:24px; height:24px;
  display:inline-grid;
  place-items:center;
  flex:0 0 24px;
  line-height:0;
}
.kl-panel-head .icon img{
  width:100%; height:100%;
  object-fit:contain;
  display:block;
  vertical-align:middle;
}
.kl-panel-title{
  margin:0 !important;
  line-height:1.1;
  font-weight:800;
  font-size: clamp(18px, 1.6vw, 22px) !important;
  color: var(--kl-txt);
}
.kl-panel-head .icon.nudge-1 img{ transform: translateY(-1px); }
.kl-panel-head .icon.nudge-2 img{ transform: translateY(-2px); }

/* =========================
   Profile card (sidebar top)
   ========================= */
.kl-profile-card{
  display:flex;
  align-items:center;
  gap:10px;
  padding:12px;
  background:#fff;
  border:1px solid var(--kl-border);
  border-radius:16px;
  box-shadow: 0 0 0 rgba(16,24,40,.0);
}

.kl-profile-card__avatar{
  width:44px; height:44px; flex:0 0 44px;
  border-radius:999px;
  overflow:hidden;
  border:2px solid #fff;
  outline:2px solid #e7ebf3;
  background: #f3f4f6;
}
.kl-profile-card__avatar img{
  width:100%; height:100%;
  object-fit:cover;
  display:block;
}

.kl-profile-card__text{ min-width:0; flex:1 1 auto; }
.kl-profile-card__name{
  font-weight:800;
  font-size:14px;
  color: var(--kl-brand);
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  margin:0 0 2px;
}
.kl-profile-card__email{
  font-size:12px;
  color: var(--kl-muted);
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  margin:0 0 6px;
}
.kl-profile-card__badge{
  display:inline-flex;
  align-items:center;
  height:22px;
  padding:0 10px;
  border-radius:999px;
  background:#eef2ff;
  color:#3730a3;
  font-weight:800;
  font-size:10px;
  letter-spacing:.05em;
  text-transform:uppercase;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce){
  .kita-sidebar .sidebar-link,
  .kita-sidebar .icon img{ transition:none; }
}