/* Global sections stay above the navigation for the selected section. */
:root {
  --header-height: 72px;
  --navigation-width: 230px;
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: var(--navigation-width) minmax(0, 1fr);
  align-items: center;
  height: var(--header-height);
  border-bottom: 1px solid var(--line);
  background: var(--white);
}

.app-header .brand {
  margin: 0;
  padding: 0 22px;
  gap: 11px;
  font-size: 12px;
  letter-spacing: 1.2px;
}

.section-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 22px;
}

.section-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 40px;
  padding: 9px 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #707070;
  background: #fafafa;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.section-button:hover {
  background: var(--surface-hover);
  border-color: #c8c8c8;
  color: var(--accent-strong);
}

.section-button.current {
  color: var(--white);
  background: var(--accent-strong);
  border-color: var(--accent-strong);
}

.section-icon { font-size: 19px; line-height: 18px; }
.section-icon-amazon { font: bold 23px/18px Georgia, serif; }
.mail-nav-icon { font-size: 18px; }
.app-shell {
  grid-template-columns: var(--navigation-width) minmax(0, 1fr);
  min-height: calc(100vh - var(--header-height));
}
.sidebar {
  top: var(--header-height);
  height: calc(100vh - var(--header-height));
  padding-top: 25px;
}
.topbar { gap: 16px; }
.topbar > span:first-child { min-width: 0; overflow-wrap: anywhere; }
.today { flex-shrink: 0; }

@media (min-width: 1600px) {
  :root { --navigation-width: 250px; }
  .app-header .brand { padding-left: 27px; }
}

@media (max-width: 1200px) {
  :root { --navigation-width: 205px; }
  .app-header .brand { padding: 0 16px; font-size: 11px; }
}

@media (max-width: 850px) {
  :root { --navigation-width: 190px; }
  .app-header .brand { gap: 8px; font-size: 10px; letter-spacing: .7px; }
  .section-nav { padding: 0 17px; }
}

@media (max-width: 600px) {
  :root { --header-height: 108px; }
  .app-header {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: 44px 64px;
  }
  .app-header .brand { padding: 6px 15px 0; font-size: 11px; }
  .app-header .brand-mark { width: 28px; height: 28px; font-size: 23px; }
  .section-nav { gap: 8px; padding: 0 15px; }
  .section-button { flex: 1; min-height: 42px; padding: 9px 12px; }
  .app-shell { min-height: calc(100vh - var(--header-height)); }
  .sidebar { top: auto; height: auto; padding: 12px 15px; border-bottom: 1px solid var(--line); }
  .sidebar > .workspace-label { display: block; padding: 0 12px; margin-bottom: 7px; }
  .sidebar .nav-main { min-height: 38px; }
  .topbar { height: auto; min-height: 38px; padding: 10px 15px; }
  .topbar .today { display: none; }
}
