:root {
  --bhs-primary: #1f3b4d;
  --bhs-accent: #d9a441;
  --bhs-muted: #f3f5f7;
}

body {
  background: linear-gradient(180deg, #f7f8fa 0%, #eef2f5 100%);
  min-height: 100vh;
  color: #1d2433;
}

.app-shell {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 14px;
  min-height: calc(100vh - 26px);
  padding: 12px;
}

.app-sidebar {
  background: linear-gradient(180deg, #f6f8fd 0%, #f0f4fb 100%);
  border: 1px solid #dbe3ef;
  border-radius: 1rem;
  padding: 0.9rem;
  display: flex;
  flex-direction: column;
}

.app-brand-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.9rem;
}

.app-brand {
  font-size: 1.1rem;
  font-weight: 700;
  color: #151c2e;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 0;
}

.app-brand i {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.55rem;
  color: #fff;
  background: linear-gradient(140deg, #3f6df6, #6448de);
  font-size: 0.85rem;
}

.app-sidebar-toggle,
.app-sidebar-reopen {
  border: 1px solid #d5def0;
  border-radius: 0.55rem;
  width: 32px;
  height: 32px;
  font-size: 0.85rem;
  color: #5a6a86;
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.app-sidebar-toggle:hover,
.app-sidebar-reopen:hover {
  border-color: #bfcde8;
  background: #eef3ff;
  color: #2f4268;
}

.app-nav-section {
  text-transform: uppercase;
  color: #7a8599;
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  margin-top: 0.7rem;
  margin-bottom: 0;
}

.app-nav-section-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.45rem;
}

.app-nav-bulk-toggle {
  border: 1px solid #d5def0;
  border-radius: 0.5rem;
  width: 26px;
  height: 24px;
  font-size: 0.72rem;
  color: #5a6a86;
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.app-nav-bulk-toggle:hover {
  border-color: #bfcde8;
  background: #eef3ff;
  color: #2f4268;
}

.app-nav-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid transparent;
  border-radius: 0.7rem;
  padding: 0.58rem 0.72rem;
  text-decoration: none;
  color: #23304a;
  margin-bottom: 0.24rem;
  font-size: 0.92rem;
  background: transparent;
  width: 100%;
  text-align: left;
  cursor: pointer;
}

.app-nav-link:hover {
  border-color: #ced8ec;
  background: #eef3ff;
  color: #13233e;
}

.app-chip {
  border-radius: 999px;
  font-size: 0.72rem;
  padding: 0.08rem 0.42rem;
  border: 1px solid #d5def0;
  background: #fff;
  color: #45526a;
}

.app-acc-toggle .chevron {
  transition: transform 0.18s ease;
}

.app-acc-item.open .app-acc-toggle .chevron {
  transform: rotate(180deg);
}

.app-acc-collapse {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.2s ease;
}

.app-acc-item.open .app-acc-collapse {
  max-height: 1200px;
}

.app-submenu {
  margin: 0.2rem 0 0.3rem 0;
  padding-left: 1.85rem;
}

.app-submenu .app-subgroup:first-child .app-subgroup-toggle {
  margin-top: 0.15rem;
}

.app-sub-link {
  display: block;
  text-decoration: none;
  color: #50607c;
  font-size: 0.82rem;
  padding: 0.18rem 0;
}

.app-sub-link:hover {
  color: #253a62;
}

.app-subgroup {
  margin-bottom: 0.4rem;
}

.app-subgroup-toggle {
  width: 100%;
  border: 1px solid #d7dfec;
  border-radius: 0.55rem;
  padding: 0.26rem 0.4rem;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #66758e;
  background: #f7f9fd;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  margin-bottom: 0.05rem;
}

.app-subgroup .chevron-small {
  transition: transform 0.16s ease;
}

.app-subgroup.open .chevron-small {
  transform: rotate(180deg);
}

.app-subgroup-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.2s ease;
}

.app-subgroup.open .app-subgroup-body {
  max-height: 400px;
}

.app-user-card {
  margin-top: auto;
  border: 1px solid #dbe3f1;
  border-radius: 0.9rem;
  padding: 0.7rem;
  background: #fff;
}

.app-notif-btn {
  width: 100%;
  border: 1px solid #d6deee;
  border-radius: 0.7rem;
  background: #f8faff;
  color: #2a3753;
  padding: 0.45rem 0.6rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.app-notif-btn:hover {
  background: #eef3ff;
  border-color: #c7d4ec;
}

.app-user-inline {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: inherit;
  border: 1px solid transparent;
  border-radius: 0.7rem;
  padding: 0.28rem;
  width: 100%;
}

.app-user-inline:hover {
  border-color: #d6deee;
  background: #f8faff;
  color: inherit;
}

.app-avatar,
.app-avatar-placeholder {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  flex: 0 0 auto;
}

.app-avatar {
  object-fit: cover;
  border: 1px solid #d6deee;
  background: #fff;
}

.app-avatar-placeholder {
  border: 1px solid #d6deee;
  background: linear-gradient(140deg, #dbe6ff, #f3f6ff);
  color: #3a4c73;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
}

.app-main {
  min-width: 0;
  position: relative;
}

.app-frame {
  background: radial-gradient(circle at 14% 14%, #edf2ff 0%, #f8fafc 40%, #f4f6fb 100%);
  border: 1px solid #d7ddea;
  border-radius: 1.2rem;
  padding: 0.8rem;
  min-height: calc(100vh - 26px);
  overflow: hidden;
}

.app-sidebar-reopen {
  position: absolute;
  top: 4px;
  left: 6px;
  z-index: 5;
  display: none;
}

.app-shell.sidebar-hidden {
  grid-template-columns: 1fr;
}

.app-shell.sidebar-hidden .app-sidebar {
  display: none;
}

.app-shell.sidebar-hidden .app-sidebar-reopen {
  display: inline-flex;
}

@media (max-width: 1199.98px) {
  .app-shell {
    grid-template-columns: 1fr;
  }
  .app-main {
    order: 2;
  }
  .app-sidebar {
    order: 1;
  }
}

.card-bhs {
  border: 0;
  box-shadow: 0 10px 24px rgba(31, 59, 77, 0.08);
}

.metric-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--bhs-primary);
}
