/* Light navigation, with a persistent column for expanded and compact states. */
:root { color-scheme: light; }
.app { --nav-width: 17rem; display: grid; grid-template-columns: var(--nav-width) minmax(0, 1fr); }
.app.is-compact { --nav-width: 5rem; }
.app > .sidebar {
  position: sticky; top: 0; bottom: auto; grid-column: 1; grid-row: 1;
  width: var(--nav-width); height: 100vh; height: 100dvh; min-height: 0;
  padding: 24px 16px 0; display: flex; flex-direction: column; flex-wrap: nowrap;
  gap: 0; background: #fff; color: #4f5d70; border-right: 1px solid #e3e8ef;
  overflow: visible; z-index: 15;
}
.sidebar-head { display: flex; align-items: center; gap: 8px; margin-bottom: 30px; flex: none; }
.sidebar .brand { flex: 1; min-width: 0; padding: 0; gap: 10px; }
.sidebar .brand-mark {
  width: 36px; height: 36px; flex: none; background: var(--blue);
  color: #fff; border: none; border-radius: 7px; font-size: 22px;
}
.brand-copy { min-width: 0; }
.sidebar .brand strong { display: block; font-size: .9375rem; color: #223148; white-space: nowrap; }
.sidebar .brand span { font-size: .75rem; color: #6c7a8b; white-space: nowrap; }
.side-icon { display: block; flex: none; width: 21px; height: 21px; }
.sidebar-toggle {
  display: grid; place-items: center; width: 32px; height: 36px; padding: 0;
  border: 0; border-radius: 6px; background: transparent; color: #6a7888; flex: none;
}
.sidebar-toggle:hover { color: var(--blue); background: #f1f5fa; }
.sidebar .new-wrap { flex: none; width: 100%; margin: 0 0 22px; z-index: 2; }
.sidebar .new-btn {
  display: flex; align-items: center; justify-content: flex-start; gap: 12px;
  height: 46px; padding: 0 14px; border: 1px solid #d4e3ff; border-radius: 7px;
  color: var(--blue-deep); background: #f1f6ff; font-size: .9375rem; font-weight: 650;
}
.sidebar .new-btn:hover { background: #e6efff; }
.new-chevron { margin-left: auto; font-size: 19px; line-height: 1; }
.sidebar .new-menu { top: 52px; left: 0; width: 100%; min-width: 0; max-height: calc(100dvh - 160px); overflow-y: auto; border-radius: 7px; }
.sidebar-scroll { display: flex; flex-direction: column; flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; scrollbar-width: none; -ms-overflow-style: none; }
.sidebar-scroll::-webkit-scrollbar { display: none; width: 0; height: 0; }
.sidebar .nav { display: grid; grid-template-columns: 1fr; gap: 8px; width: 100%; }
.sidebar .nav button, .sidebar-setting {
  display: flex; align-items: center; justify-content: flex-start; gap: 13px;
  min-height: 48px; padding: 12px 14px; border: 0; border-radius: 8px;
  background: transparent; color: #657385; font-size: .9375rem; font-weight: 500; text-align: left;
}
.sidebar .nav button:hover, .sidebar-setting:hover { background: #f5f8fc; color: #334f71; }
.sidebar .nav button.active { background: #edf4ff; color: var(--blue); font-weight: 650; border: 0; }
.sidebar .nav button.active .side-icon { stroke-width: 2.1; }
.sidebar-bottom { margin-top: auto; padding-top: 32px; padding-bottom: 14px; }
.sidebar-setting { border-top: 1px solid #e8edf3; border-radius: 0; width: 100%; padding-top: 18px; margin-top: 6px; }
.sidebar .profile-switch { display: flex; flex-direction: column; gap: 7px; margin: 16px 8px 10px; color: #6c7a8b; font-size: .75rem; }
.sidebar .profile-switch select { max-width: 100%; width: 100%; background: #fff; color: #465870; border: 1px solid #dce3ed; padding: 7px 8px; border-radius: 5px; font-size: .8125rem; }
.sidebar .side-footer { display: block; margin: 0; padding: 4px 8px 0; border: 0; color: #748093; font-size: .75rem; }
.sidebar-user { display: flex; align-items: center; gap: 10px; flex: none; margin: 0 -16px; padding: 17px 18px; background: linear-gradient(110deg, #e5f3eb 0%, #eff8f3 55%, #f8fbf9 100%); border-top: 1px solid #d7e8dd; }
.sidebar-user .avatar { flex: none; width: 35px; height: 35px; color: #2b6853; background: #dceee3; border: 1px solid #c5dfcf; }
.user-copy { min-width: 0; }
.user-copy strong { display: block; color: #2a5546; font-size: .875rem; font-weight: 650; white-space: nowrap; }
.user-copy span { display: block; margin-top: 2px; color: #617d70; font-size: .75rem; white-space: nowrap; }
.sidebar button:focus-visible, .sidebar select:focus-visible { outline: 2px solid var(--blue); outline-offset: -2px; }
.app > .main { grid-column: 2; grid-row: 1; min-width: 0; width: 100%; }
.main > .content { max-width: none; padding: 36px 40px 48px; }
.sidebar-backdrop, .sidebar-backdrop[hidden] { display: none; }
.is-compact > .sidebar { padding: 22px 12px 0; }
.is-compact .sidebar-head { flex-direction: column; gap: 12px; margin-bottom: 22px; }
.is-compact .sidebar .brand { flex: none; min-width: 0; }
.is-compact .brand-copy, .is-compact .nav-label, .is-compact .new-chevron,
.is-compact .sidebar .profile-switch, .is-compact .sidebar .side-footer, .is-compact .user-copy { display: none; }
.is-compact .sidebar .new-btn, .is-compact .sidebar .nav button, .is-compact .sidebar-setting { justify-content: center; padding: 12px 0; width: 100%; }
.is-compact .sidebar .new-menu { left: calc(100% + 10px); top: 0; width: 224px; }
.is-compact .sidebar-user { justify-content: center; margin: 0 -12px; padding: 17px 0; }
.is-compact .sidebar-bottom { padding-top: 24px; }
.modal { z-index: 30; }
.toast { z-index: 40; }
@media (max-width: 1080px) {
  .main > .content { padding: 28px 24px 40px; }
}
@media (max-width: 760px) {
  .app, .app.is-compact { --nav-width: 4.5rem; display: grid; grid-template-columns: 4.5rem minmax(0, 1fr); }
  .app > .sidebar { position: sticky; top: 0; height: 100vh; height: 100dvh; width: min(17rem, calc(100vw - 20px)); }
  .app.is-compact > .sidebar { width: 4.5rem; padding: 18px 10px 0; }
  .is-compact .sidebar-user { margin: 0 -10px; }
  .is-compact .sidebar .new-menu { width: min(224px, calc(100vw - 84px)); }
  .app:not(.is-compact) .sidebar-backdrop:not([hidden]) { display: block; position: fixed; inset: 0; border: 0; background: #25385426; z-index: 14; }
  .main > .content { padding: 24px 16px 32px; }
  .main .title-row { gap: 12px; }
  .main .project-line { flex-wrap: wrap; }
  .main .category-line { grid-template-columns: minmax(0, 1fr) auto; }
  .main .category-line .track { grid-column: 1 / -1; grid-row: 2; }
  .main .category-line span:last-child { grid-column: 2; grid-row: 1; }
  .main .report-projects { min-width: 0; max-width: 100%; }
}
@media (max-width: 480px) {
  .main > .content { padding: 22px 12px 28px; }
  .main .metrics, .main .onepage-grid { grid-template-columns: minmax(0, 1fr); }
  .main .metric, .main .onepage-grid > div { border-right: 0; border-bottom: 1px solid var(--line); }
  .main .metric:last-child, .main .onepage-grid > div:last-child { border-bottom: 0; }
  .main .view-toggle { flex-direction: column; }
  .main .panel-head { flex-wrap: wrap; }
  .main .bar-row { grid-template-columns: 4.5rem minmax(0, 1fr) 4.5rem; gap: 4px; font-size: .8125rem; }
  .main .report-detail .category-line { grid-template-columns: minmax(0, 1fr); }
  .main .report-detail .category-line span:last-child { grid-column: 1; grid-row: 2; text-align: left; }
  .main .report-detail .category-line .track { grid-row: 3; }
}
