/* Fixed sidebar layout: reserve its width once, outside the page content. */
.app.desktop-parity {
  --sidebar-width: 250px;
  display: block;
  min-height: 100vh;
}

.desktop-parity > .main {
  width: calc(100% - var(--sidebar-width));
  min-width: 0;
  min-height: 100vh;
  margin: 0 var(--sidebar-width) 0 0;
  padding: 0;
}

.desktop-parity > .side {
  position: fixed;
  inset: 0 0 0 auto;
  width: var(--sidebar-width);
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.desktop-parity .brand {
  display: flex;
  flex-shrink: 0;
}

.desktop-parity .side-foot {
  flex-shrink: 0;
}

.desktop-parity .nav {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-content: start;
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
}

.desktop-parity .topbar {
  height: auto;
  min-height: 88px;
  padding-block: 14px;
  flex-wrap: wrap;
}

.desktop-parity .office-clock {
  flex: 1 1 360px;
  flex-wrap: wrap;
  row-gap: 6px;
}

.desktop-parity .top-actions {
  max-width: 100%;
  flex-wrap: wrap;
}

.desktop-parity .main-inner,
.desktop-parity .grid > *,
.desktop-parity .dashboard-columns > *,
.desktop-parity .settings-grid > * {
  min-width: 0;
}

.desktop-parity .hero {
  flex-wrap: wrap;
}

.desktop-parity .hero-copy {
  flex: 1 1 300px;
  min-width: 0;
  overflow-wrap: anywhere;
}

.desktop-parity .hero-date {
  max-width: 100%;
}

.desktop-parity .hero-actions {
  flex-wrap: wrap;
}

.desktop-parity .table-wrap {
  max-width: 100%;
}

@media (max-width: 1000px) {
  .app.desktop-parity { --sidebar-width: 82px; }
}

@media (max-width: 650px) {
  .app.desktop-parity { --sidebar-width: 0px; }
  .desktop-parity > .side { width: min(82vw, 300px); }
  .desktop-parity .nav button {
    width: 100%;
    min-width: 0;
    min-height: 44px;
    font-size: 12px !important;
    text-align: start;
    justify-content: flex-start;
  }
  .desktop-parity .topbar {
    min-height: 82px;
    gap: 10px;
    align-items: center;
    padding: 10px 12px;
  }
  .desktop-parity .office-clock {
    flex: 1 1 calc(100% - 65px);
  }
  .desktop-parity .top-actions {
    width: 100%;
    justify-content: flex-end;
  }
  .desktop-parity .hero-date {
    min-width: 0;
    overflow-wrap: anywhere;
  }
  .desktop-parity .money-stat {
    font-size: clamp(13px, 4vw, 16px) !important;
    overflow-wrap: anywhere;
  }
}

@media print {
  .desktop-parity > .main { width: 100%; margin: 0; }
  .desktop-parity .topbar { position: static; }
}
