
/* Sidebar contrast and SNIPI palette correction */
:root{
  --sidebar-bg:#214b3a;
  --sidebar-bg-hover:#2d604b;
  --sidebar-active:#ead74b;
  --sidebar-active-text:#203c31;
  --sidebar-text:#f7faf8;
  --sidebar-muted:#d5e2db;
  --sidebar-line:rgba(255,255,255,.16);
}

.sidebar{
  background:var(--sidebar-bg)!important;
  color:var(--sidebar-text)!important;
  border-right:0!important;
  box-shadow:4px 0 20px rgba(27,57,45,.12)!important;
}

/* Official SNIPI logo remains on a clean white panel */
.sidebar .official-brand{
  background:#fff!important;
  color:#2f383a!important;
  border:1px solid rgba(255,255,255,.7)!important;
  border-radius:14px!important;
  padding:12px 10px!important;
  margin:2px 0 16px!important;
}
.sidebar .official-brand small{
  color:#5f6c67!important;
}
.sidebar .brand{
  color:#fff!important;
}
.sidebar .brand small{
  color:var(--sidebar-muted)!important;
}

.sidebar .nav{
  display:grid!important;
  gap:5px!important;
}

.sidebar .nav button,
.sidebar button[data-route]{
  display:block!important;
  width:100%!important;
  min-height:42px!important;
  padding:10px 12px!important;
  border:1px solid transparent!important;
  border-left:4px solid transparent!important;
  border-radius:9px!important;
  background:transparent!important;
  color:var(--sidebar-text)!important;
  text-align:left!important;
  font-weight:650!important;
  line-height:1.25!important;
  opacity:1!important;
  box-shadow:none!important;
}

.sidebar .nav button:hover,
.sidebar .nav button:focus-visible,
.sidebar button[data-route]:hover,
.sidebar button[data-route]:focus-visible{
  background:var(--sidebar-bg-hover)!important;
  color:#fff!important;
  border-left-color:#b9cf5b!important;
  outline:none!important;
}

/* Supports the active-state conventions used by the app */
.sidebar .nav button.active,
.sidebar .nav button.selected,
.sidebar .nav button[aria-current="page"],
.sidebar button[data-route].active,
.sidebar button[data-route].selected,
.sidebar button[data-route][aria-current="page"]{
  background:var(--sidebar-active)!important;
  color:var(--sidebar-active-text)!important;
  border-color:var(--sidebar-active)!important;
  border-left-color:#c93e45!important;
  font-weight:800!important;
}

.sidebar .who{
  color:var(--sidebar-muted)!important;
  border-top:1px solid var(--sidebar-line)!important;
  margin-top:16px!important;
  padding-top:14px!important;
  line-height:1.45!important;
}

.sidebar #logout.btn.ghost,
.sidebar .btn.ghost{
  background:transparent!important;
  color:#fff!important;
  border:1px solid rgba(255,255,255,.34)!important;
  box-shadow:none!important;
}
.sidebar #logout.btn.ghost:hover,
.sidebar .btn.ghost:hover{
  background:rgba(255,255,255,.10)!important;
  color:#fff!important;
  border-color:rgba(255,255,255,.55)!important;
}

/* Keep mobile header coherent */
.topbar-mobile{
  background:var(--sidebar-bg)!important;
  color:#fff!important;
}
.topbar-mobile button{
  color:#fff!important;
  border-color:rgba(255,255,255,.35)!important;
}

/* Improve general button contrast without overriding danger actions */
.main .btn:not(.danger){
  color:#fff;
}
.main .btn.ghost:not(.danger){
  color:var(--snipi-green-dark,#5f8128);
}

/* Avoid low-contrast muted copy on white cards */
.main .muted,
.card .muted{
  color:#596760!important;
}

@media (max-width:800px){
  .sidebar .nav button,
  .sidebar button[data-route]{
    min-height:44px!important;
  }
}
