.shell {
  min-height: 100vh;
  height: 100dvh;
  display: grid;
  grid-template-columns: 228px 1fr;
  gap: 8px;
  transition: grid-template-columns 0.2s ease;
  position: relative;
  overflow: hidden;
}

.shell.is-collapsed {
  grid-template-columns: 64px 1fr;
}

.sidebar {
  padding: 12px;
  overflow: hidden;
  transition: width 0.2s ease, padding 0.2s ease;
  background: #fff;
}

.shell.is-collapsed .sidebar {
  padding: 12px 8px;
}

.sidebar-brand {
  font-weight: 700;
  color: #0d3e88;
  margin-bottom: 10px;
  white-space: nowrap;
  font-size: 14px;
}

.sidebar-brand-wrap {
  display: grid;
  justify-items: start;
  gap: 8px;
  margin-bottom: 10px;
}

.sidebar-brand-logo {
  display: block;
  width: 100%;
  max-width: 126px 130px;
  height: auto;
  object-fit: contain;
}

.sidebar-brand-wrap .sidebar-brand {
  margin-bottom: 0;
}

.sidebar-nav {
  display: grid;
  gap: 8px;
}

.sidebar-nav a,
.sidebar-group-toggle {
  text-decoration: none;
  color: #27456f;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid transparent;
  white-space: nowrap;
  font-weight: 500;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.sidebar-link-main {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.sidebar-link-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  display: block;
  color: #5b7398;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sidebar-icon rect,
.sidebar-icon circle {
  fill: none;
  stroke: currentColor;
}

.sidebar-group-toggle {
  width: 100%;
  background: #fff;
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sidebar-group-toggle::after {
  content: "▾";
  font-size: 11px;
  color: #4a6288;
  transition: transform .18s ease;
}

.sidebar-group.is-open .sidebar-group-toggle::after {
  transform: rotate(180deg);
}

.sidebar-nav a.is-active,
.sidebar-nav a:hover,
.sidebar-group-toggle:hover {
  background: #eef4ff;
  border-color: #d6e3fb;
}

.sidebar-nav a.is-active,
.sidebar-group-toggle.is-active {
  box-shadow: inset 0 0 0 1px #c6dafd;
}

.sidebar-nav a.is-active .sidebar-icon,
.sidebar-nav a:hover .sidebar-icon,
.sidebar-group-toggle:hover .sidebar-icon {
  color: #0b5bd3;
}

.sidebar-subnav {
  display: grid;
  gap: 6px;
  margin-top: 4px;
}

.sidebar-group:not(.is-open) .sidebar-subnav {
  display: none;
}

.sidebar-subnav a {
  margin-left: 8px;
  padding-left: 12px;
}

.sidebar-unread-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: #1b8f53;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
}

.sidebar-unread-badge.is-hidden {
  display: none;
}

.main {
  display: grid;
  gap: 8px;
  align-content: start;
  min-width: 0;
  min-height: 0;
  overflow: auto;
}

.kpis-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.kpi {
  padding: 12px;
  display: grid;
  gap: 6px;
  border-color: #dce5f2;
}

.kpi-accent {
  background: linear-gradient(145deg, #0b5bd3 0%, #1249a8 100%);
  color: #fff;
  border-color: transparent;
}

.kpi-accent .muted,
.kpi-accent .kpi-label {
  color: rgba(255, 255, 255, 0.84);
}

.kpi-label {
  color: #4f6382;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .03em;
}

.kpi strong {
  font-size: 24px;
  color: #0c3f91;
  line-height: 1;
}

.kpi-accent strong {
  color: #fff;
}

.main-grid {
  display: grid;
  grid-template-columns: 1.35fr .65fr;
  gap: 8px;
}

.panel {
  padding: 12px;
}

.panel h2 {
  margin: 0 0 6px;
  font-size: 16px;
}

.panel-soft {
  background: linear-gradient(180deg, #ffffff 0%, #f6f9ff 100%);
}

.progress-list {
  margin-top: 14px;
  display: grid;
  gap: 12px;
}

.summary-status {
  margin-top: 12px;
  display: grid;
  gap: 10px;
  align-content: start;
}

.summary-status__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-self: start;
  min-height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid #dce5f2;
  background: #eef4ff;
  color: #1249a8;
  font-weight: 700;
}

.summary-status__badge.is-ok {
  background: #ebf9f1;
  border-color: #b7e8ca;
  color: #147a46;
}

.summary-status__badge.is-warn {
  background: #fff4e8;
  border-color: #ffd39a;
  color: #9a5700;
}

.progress-item {
  display: grid;
  gap: 7px;
}

.progress-item span {
  font-size: 13px;
  color: #2b466f;
}

.progress-track {
  width: 100%;
  height: 11px;
  background: #e8eef8;
  border-radius: 999px;
  overflow: hidden;
}

.progress-track i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, #1f76ff 0%, #0d4fb7 100%);
  transition: width .25s ease;
}

.activity-list {
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.activity-kpis {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 4px;
}

.activity-kpi {
  border: 1px solid #dce5f2;
  border-radius: 10px;
  background: #fff;
  padding: 8px 10px;
  display: grid;
  gap: 4px;
}

.activity-kpi small {
  color: #4f6382;
  font-size: 12px;
}

.activity-kpi strong {
  color: #0c3f91;
  font-size: 20px;
  line-height: 1;
}

.activity-list li {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  color: #314a70;
  font-size: 13px;
  line-height: 1.45;
  word-break: break-word;
}

.dashboard-page .kpi {
  padding: 10px;
  gap: 4px;
}

.dashboard-page .kpi-label {
  font-size: 11px;
}

.dashboard-page .kpi strong {
  font-size: 21px;
}

.dashboard-page .main-grid {
  gap: 6px;
}

.dashboard-page .panel {
  padding: 10px;
}

.dashboard-page {
  display: grid;
  gap: 6px;
}

.dashboard-page--saas {
  gap: 10px;
}

.dashboard-hero {
  padding: 16px 18px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  background: linear-gradient(135deg, #fbfdff 0%, #f1f6ff 100%);
  border-color: #d7e2f5;
}

.dashboard-hero__main {
  display: grid;
  gap: 8px;
}

.dashboard-hero__eyebrow,
.panel-eyebrow {
  color: #5d7395;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .06em;
  font-weight: 700;
}

.dashboard-hero h2,
.panel h2 {
  margin: 0;
  color: #123a78;
}

.dashboard-hero p {
  margin: 0;
  max-width: 760px;
}

.dashboard-hero__actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.kpis-grid--priority {
  grid-template-columns: 1.2fr 1fr 1fr 1fr 1fr 1fr;
}

.kpi-spotlight {
  background: linear-gradient(180deg, #ffffff 0%, #f7faff 100%);
  border-color: #d4e0f3;
}

.kpi-spotlight strong {
  font-size: 28px;
}

.kpi-spotlight--danger {
  background: linear-gradient(180deg, #fffaf7 0%, #fff1ea 100%);
  border-color: #ffd4bb;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 8px;
}

.dashboard-grid--top {
  grid-template-columns: 1.15fr .85fr;
}

.dashboard-grid--chart {
  grid-template-columns: 1fr;
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.quick-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.quick-action {
  width: 100%;
  border: 1px solid #dbe4f0;
  border-radius: 12px;
  background: #fff;
  padding: 12px;
  text-align: left;
  display: grid;
  gap: 5px;
  cursor: pointer;
  transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease, background .18s ease;
}

.quick-action:hover {
  border-color: #bfd4f7;
  background: #f7faff;
  box-shadow: 0 10px 22px rgba(16, 33, 59, 0.08);
  transform: translateY(-1px);
}

.quick-action strong {
  color: #143e80;
  font-size: 14px;
}

.quick-action small {
  color: #60708a;
  line-height: 1.45;
}

.summary-status-card {
  display: grid;
  gap: 12px;
}

.summary-status-card__top {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.summary-status-card__top strong {
  color: #123a78;
  font-size: 18px;
}

.summary-status-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.summary-status-item {
  border: 1px solid #e1eaf7;
  border-radius: 12px;
  background: #fbfdff;
  padding: 10px 12px;
  display: grid;
  gap: 4px;
}

.summary-status-item small {
  color: #61728d;
}

.summary-status-item strong {
  color: #163b78;
  font-size: 18px;
}

.activity-kpis--wide {
  margin-top: 2px;
}

.activity-list--dashboard {
  margin-top: 12px;
}

.activity-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.activity-copy strong {
  color: #123a78;
  font-size: 14px;
}

.activity-copy span {
  color: #4f6382;
  font-size: 13px;
  line-height: 1.5;
  word-break: break-word;
}

.activity-list__empty {
  border: 1px dashed #d7e2f5;
  border-radius: 12px;
  padding: 12px;
  background: #fbfdff;
}

.chart-empty {
  min-height: 240px;
  border: 1px dashed #d7e2f5;
  border-radius: 16px;
  background: linear-gradient(180deg, #fbfdff 0%, #f6f9ff 100%);
  display: grid;
  place-content: center;
  gap: 8px;
  text-align: center;
  padding: 24px;
}

.chart-empty strong {
  color: #143e80;
  font-size: 16px;
}

.chart-empty span {
  color: #60708a;
  font-size: 13px;
  line-height: 1.5;
  max-width: 420px;
}

.kpis-grid--compact {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.bars-chart {
  min-height: 240px;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
  align-items: end;
  margin-top: 12px;
}

.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
  color: #4f6382;
  font-size: 12px;
}

.chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.chart-legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  display: inline-block;
}

.chart-legend-dot--in {
  background: #2e90fa;
}

.chart-legend-dot--out {
  background: #12b76a;
}

.chart-legend-dot--total {
  background: #d7e2f5;
  border: 1px solid #bfcde5;
}

.bars-chart-item {
  min-width: 0;
  display: grid;
  grid-template-rows: 180px auto auto auto;
  gap: 8px;
  justify-items: center;
  color: #35517a;
}

.bars-chart-item small {
  font-size: 12px;
  color: #62789c;
}

.bars-chart-item strong {
  font-size: 14px;
  color: #0c3f91;
}

.bars-chart-bar {
  width: 100%;
  max-width: 54px;
  height: 180px;
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  align-items: end;
  padding: 10px 8px 8px;
  border-radius: 14px;
  background: linear-gradient(180deg, #f8fbff 0%, #edf3fd 100%);
  border: 1px solid #d7e2f5;
  overflow: hidden;
}

.bars-chart-bar span {
  display: block;
  width: 100%;
  border-radius: 999px 999px 6px 6px;
  transition: height .2s ease;
  align-self: end;
  z-index: 1;
}

.bars-chart-bar-total {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 8px;
  width: auto !important;
  height: var(--bar-total, 0%);
  border-radius: 14px 14px 8px 8px !important;
  background: linear-gradient(180deg, #ecf2fb 0%, #d6e1f3 100%);
  z-index: 0;
}

.bars-chart-bar-in {
  height: var(--bar-in, 0%);
  background: linear-gradient(180deg, #66c2ff 0%, #2e90fa 100%);
}

.bars-chart-bar-out {
  height: var(--bar-out, 0%);
  background: linear-gradient(180deg, #3fe19a 0%, #12b76a 100%);
}

.alerts-list {
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.alerts-list li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 10px 12px;
  border: 1px solid #dce5f2;
  border-radius: 12px;
  background: #fff;
}

.alert-item-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.alert-item-copy strong {
  color: #153f80;
  font-size: 14px;
}

.alert-item-copy span {
  color: #4f6382;
  font-size: 13px;
  line-height: 1.45;
}

.dot {
  width: 9px;
  height: 9px;
  border-radius: 99px;
  display: inline-block;
}

.dot-ok { background: #12b76a; }
.dot-info { background: #2e90fa; }
.dot-warn { background: #f79009; }

.shell.is-collapsed .sidebar-brand {
  opacity: 0;
}

.shell.is-collapsed .sidebar-brand-wrap {
  justify-items: center;
}

.shell.is-collapsed .sidebar-brand-logo {
  max-width: 32px;
}

.shell.is-collapsed .sidebar-nav a {
  min-height: 42px;
  justify-content: center;
  position: relative;
  overflow: visible;
}

.shell.is-collapsed .sidebar-group-toggle {
  min-height: 42px;
  justify-content: center;
  position: relative;
  overflow: visible;
}

.shell.is-collapsed .sidebar-group-toggle::after,
.shell.is-collapsed .sidebar-unread-badge,
.shell.is-collapsed .sidebar-subnav {
  display: none;
}

.shell.is-collapsed .sidebar-link-label {
  display: none;
}

.shell.is-collapsed .sidebar-link-main {
  gap: 0;
  justify-content: center;
}

.shell.is-collapsed .sidebar-icon {
  width: 34px;
  height: 34px;
  flex-basis: 34px;
  stroke-width: 2.15;
}

.shell.is-collapsed .sidebar-nav a.is-active,
.shell.is-collapsed .sidebar-group-toggle:hover,
.shell.is-collapsed .sidebar-nav a:hover {
  background: linear-gradient(180deg, #eef4ff 0%, #e6efff 100%);
  border-color: #c8d9f7;
}

.shell.is-collapsed .sidebar-group {
  position: relative;
}

.shell.is-collapsed .sidebar-group-toggle {
  position: relative;
}

.shell.is-collapsed .sidebar-group-toggle::before {
  content: "";
  position: absolute;
  right: 7px;
  bottom: 7px;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #84a7de;
  opacity: 0.95;
}

.shell.is-collapsed .sidebar-group.is-open .sidebar-group-toggle::before {
  background: #2f7dff;
}

.shell.is-collapsed .sidebar-group.is-open .sidebar-subnav {
  display: grid;
  position: absolute;
  left: calc(100% + 10px);
  top: 0;
  min-width: 220px;
  max-width: 280px;
  margin: 0;
  padding: 8px;
  gap: 6px;
  border: 1px solid #d7e2f6;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 14px 30px rgba(16, 33, 59, 0.15);
  z-index: 65;
}

.shell.is-collapsed .sidebar-group.is-open .sidebar-subnav::before {
  display: none;
}

.shell.is-collapsed .sidebar-group.is-open .sidebar-subnav a {
  min-height: 40px;
  padding: 8px 10px;
  border-radius: 10px;
}

.shell.is-collapsed .sidebar-group.is-open .sidebar-subnav .sidebar-link-label {
  display: inline;
}

.shell.is-collapsed .sidebar-nav a[data-nav-label]::after,
.shell.is-collapsed .sidebar-group-toggle[data-nav-label]::after {
  content: attr(data-nav-label);
  position: absolute;
  left: calc(100% + 10px);
  top: 50%;
  transform: translateY(-50%);
  background: #173a71;
  color: #fff;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: 0 10px 24px rgba(16, 33, 59, 0.2);
  opacity: 0;
  pointer-events: none;
  transition: opacity .16s ease, transform .16s ease;
}

.shell.is-collapsed .sidebar-nav a[data-nav-label]:hover::after,
.shell.is-collapsed .sidebar-group-toggle[data-nav-label]:hover::after {
  opacity: 1;
  transform: translateY(-50%) translateX(2px);
}

.sidebar-overlay {
  display: none;
}

.pending-widget {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 40;
  width: auto;
}

.pending-widget.is-hidden {
  display: none;
}

.pending-widget.is-expanded {
  width: min(320px, calc(100vw - 24px));
}

.pending-widget__card {
  padding: 0;
  display: grid;
  gap: 8px;
  border-radius: 18px;
  box-shadow: none;
  border: 1px solid transparent;
  background: transparent;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.pending-widget__card.is-expanded {
  padding: 10px;
}


.pending-widget__card.is-danger {
  border-color: #ffc5c5;
  background: linear-gradient(180deg, #fff8f8 0%, #ffffff 100%);
}

.pending-widget__card.is-pulse {
  animation: pendingWidgetPulse 1.15s ease;
}

.pending-widget__toggle {
  width: auto;
  min-height: 70px;
  border: 0;
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 2px 4px;
  cursor: pointer;
  text-align: left;
}

.pending-widget__toggle-icon {
  width: 72px;
  height: 72px;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  flex: 0 0 72px;
  overflow: hidden;
}

.pending-widget__toggle-lottie,
.pending-widget__toggle-lottie dotlottie-wc {
  display: block;
  width: 100%;
  height: 100%;
}

.pending-widget__toggle-text {
  display: none;
}

.pending-widget__panel.is-hidden {
  display: none;
}

.pending-widget__panel {
  display: grid;
  gap: 10px;
  padding-top: 2px;
}

.pending-widget__panel:not(.is-hidden) {
  margin-top: 2px;
  padding: 10px;
  border-radius: 14px;
  border: 1px solid rgba(255, 211, 154, 0.45);
  background: linear-gradient(180deg, #fffdf8 0%, #ffffff 100%);
  box-shadow: 0 16px 38px rgba(16, 33, 59, 0.18);
}

.pending-widget.is-expanded .pending-widget__toggle {
  display: none;
}

.pending-widget__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.pending-widget__head strong {
  color: #123a78;
  font-size: 14px;
  line-height: 1.35;
}

.pending-widget__close {
  width: 28px;
  height: 28px;
  border: 1px solid #dce5f2;
  border-radius: 999px;
  background: #fff;
  color: #5d7395;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}

.pending-widget__body {
  display: grid;
  gap: 8px;
}

.pending-widget__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.pending-widget__chip {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
}

.pending-widget__chip--unclaimed {
  background: #fff5e8;
  border-color: #ffd39a;
  color: #9a5700;
}

.pending-widget__chip--pending_reply {
  background: #fff0f0;
  border-color: #ffc5c5;
  color: #b32323;
}

.pending-widget__chip--pending_close {
  background: #eef7ff;
  border-color: #bfdcff;
  color: #1453a3;
}

.pending-widget__copy {
  margin: 0;
  color: #4f6382;
  font-size: 13px;
  line-height: 1.5;
}

.pending-widget__actions {
  display: flex;
  justify-content: flex-end;
}

@keyframes pendingWidgetPulse {
  0% { transform: translateY(0) scale(1); }
  30% { transform: translateY(-1px) scale(1.02); }
  60% { transform: translateY(0) scale(0.995); }
  100% { transform: translateY(0) scale(1); }
}

@media (max-width: 980px) {
  .shell {
    grid-template-columns: 1fr;
    padding: 6px;
  }

  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: min(82vw, 280px);
    z-index: 30;
    transform: translateX(-105%);
    transition: transform 0.2s ease;
    border-radius: 0;
  }

  .shell.is-mobile-open .sidebar {
    transform: translateX(0);
  }

  .sidebar-overlay {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.35);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 20;
  }

  .shell.is-mobile-open .sidebar-overlay {
    opacity: 1;
    pointer-events: auto;
  }

  .pending-widget {
    right: 10px;
    bottom: 10px;
    width: auto;
  }

  .pending-widget.is-expanded {
    width: min(360px, calc(100vw - 20px));
  }

  .kpis-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .kpis-grid--compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .main-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-grid,
  .dashboard-grid--top {
    grid-template-columns: 1fr;
  }

  .kpis-grid--priority {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .topbar {
    padding: 6px 8px;
  }
}

@media (max-width: 640px) {
  .kpis-grid {
    grid-template-columns: 1fr;
  }

  .kpis-grid--compact {
    grid-template-columns: 1fr;
  }

  .activity-kpis {
    grid-template-columns: 1fr;
  }

  .quick-actions,
  .summary-status-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-hero {
    padding: 14px;
    grid-template-columns: 1fr;
    display: grid;
  }

  .bars-chart {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* Sidebar redesign v2 */
.shell {
  gap: 12px;
  grid-template-columns: 220px 1fr;
}

.shell.is-collapsed {
  grid-template-columns: 86px 1fr;
}

.sidebar {
  border: 1px solid #d8e1ef;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  box-shadow: 0 14px 34px rgba(20, 46, 90, 0.08);
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  border-radius: 0;
}

.sidebar-brand-wrap {
  justify-items: center;
  margin-bottom: 16px;
}

.sidebar-brand-logo {
  max-width: 158px;
}

.sidebar-nav {
  gap: 10px;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 4px;
}

.sidebar-nav a,
.sidebar-group-toggle,
.sidebar-collapse-btn {
  min-height: clamp(42px, 5vh, 52px);
  border-radius: 14px;
  padding: clamp(7px, 1.1vh, 10px) 12px;
  color: #223d66;
  border: 1px solid transparent;
}

.sidebar-link-label {
  font-size: clamp(12px, 0.78vw, 14px);
  font-weight: 600;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.sidebar-icon {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  color: #60779d;
  stroke-width: 1.95;
}

.sidebar-group-toggle::after {
  content: "";
  width: 7px;
  height: 7px;
  border-right: 2px solid #748caf;
  border-bottom: 2px solid #748caf;
  transform: rotate(45deg);
  margin-right: 2px;
}

.sidebar-group.is-open .sidebar-group-toggle::after {
  transform: rotate(225deg);
  margin-top: 4px;
}

.sidebar-nav a.is-active,
.sidebar-nav a:hover,
.sidebar-group-toggle:hover,
.sidebar-group-toggle.is-active,
.sidebar-collapse-btn:hover {
  background: #e3ecff;
  border-color: #d7e2f6;
}

.sidebar-nav a.is-active {
  border-color: transparent;
  box-shadow: none;
}

.sidebar-group-toggle.is-active {
  border-color: transparent;
}

.sidebar-nav a.is-active .sidebar-icon,
.sidebar-group-toggle:hover .sidebar-icon,
.sidebar-nav a:hover .sidebar-icon {
  color: #1f67dd;
}

.sidebar-subnav {
  margin: 2px 0 6px 9px;
  padding-left: 18px;
  gap: 6px;
  position: relative;
}

.sidebar-subnav::before {
  content: "";
  position: absolute;
  left: 9px;
  top: 10px;
  bottom: 10px;
  width: 2px;
  border-radius: 99px;
  background: #d7e5fb;
}

.sidebar-subnav a {
  margin-left: 0;
  position: relative;
  padding-left: 12px;
  min-height: clamp(36px, 4.2vh, 44px);
  white-space: normal;
}

.sidebar-subnav a::before {
  content: "";
  position: absolute;
  left: -14px;
  top: 50%;
  transform: translateY(-50%);
  width: 9px;
  height: 9px;
  border-radius: 99px;
  background: #2f7dff;
  box-shadow: 0 0 0 3px #f6faff;
}

.sidebar-footer {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid #e4eaf4;
  display: grid;
  gap: 10px;
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid #d9e3f3;
  background: #fbfdff;
  border-radius: 14px;
  padding: 8px 10px;
}

.sidebar-user-avatar-wrap {
  position: relative;
  flex: 0 0 auto;
}

.sidebar-user-avatar {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background: #e9f1ff;
  color: #1d64d8;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
}

.sidebar-user-dot {
  position: absolute;
  right: -1px;
  bottom: -1px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #19c37d;
  border: 2px solid #fff;
}

.sidebar-user-meta {
  min-width: 0;
  display: grid;
  flex: 1 1 auto;
}

.sidebar-user-meta strong {
  color: #1e355c;
  font-size: 15px;
}

.sidebar-user-meta small,
.sidebar-tenant {
  color: #6c82a4;
  font-size: 12px;
}

.sidebar-collapse-btn {
  width: 100%;
  background: #fff;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.sidebar-user-chevron {
  color: #5f779d;
  font-size: 26px;
  line-height: 1;
  transform: translateY(-1px);
}

.shell.is-collapsed .sidebar {
  padding: 14px 8px;
  overflow: visible;
}

.shell.is-collapsed .sidebar-brand-logo {
  max-width: 40px;
}

.shell.is-collapsed .sidebar-footer,
.shell.is-collapsed .sidebar-group-toggle::after,
.shell.is-collapsed .sidebar-unread-badge {
  display: none;
}

.shell.is-collapsed .sidebar-nav a,
.shell.is-collapsed .sidebar-group-toggle {
  justify-content: center;
}

.shell.is-collapsed .sidebar-link-main {
  gap: 0;
}

.shell.is-collapsed .sidebar-link-label {
  display: none;
}

.shell.is-collapsed .sidebar-group.is-open .sidebar-subnav {
  display: grid;
}

.shell.is-collapsed .sidebar-group.is-open .sidebar-subnav .sidebar-link-label {
  display: inline;
}

.shell.is-collapsed .sidebar-nav {
  overflow: visible;
}

.main {
  gap: 8px;
}

.topbar--global {
  border-radius: 0;
}

.shell {
  column-gap: 0;
}

.main > :not(.topbar--global) {
  margin-left: 12px;
}

@media (max-width: 980px) {
  .shell {
    grid-template-columns: 1fr;
    padding: 8px;
  }

  .topbar--global {
    width: 100%;
  }

  .main > :not(.topbar--global) {
    margin-left: 0;
  }

  .sidebar {
    width: min(86vw, 320px);
    height: 100dvh;
    min-height: 100dvh;
    border-radius: 0 24px 24px 0;
  }
}
