.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  background: var(--bg);
}

.status-toast {
  position: fixed;
  top: calc(88px + env(safe-area-inset-top));
  right: 18px;
  z-index: 220;
  max-width: min(420px, calc(100vw - 36px));
  padding: 12px 14px;
  border: 1px solid #cfe6da;
  border-radius: var(--radius);
  background: var(--success-soft);
  color: var(--ink);
  box-shadow: var(--shadow);
  font-size: var(--text-small);
  line-height: 1.45;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  max-height: calc(100dvh - 112px);
  overflow: auto;
}

.status-toast strong {
  display: block;
  margin-bottom: 2px;
}

.status-toast-close {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  border: 1px solid rgba(18, 63, 68, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  font-size: 1rem;
  line-height: 1;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 12;
  width: 76px;
  height: 100dvh;
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(24px);
  color: var(--ink);
  display: flex;
  flex-direction: column;
  padding: 16px 12px;
  gap: 20px;
  overflow: hidden;
  border-right: 1px solid rgba(226, 229, 225, 0.76);
  transition: width 180ms ease, box-shadow 180ms ease, padding 180ms ease;
}

.workspace {
  grid-column: 2;
}

.sidebar:hover,
body.sidebar-pinned .sidebar {
  width: 240px;
  padding: 16px;
  box-shadow: 18px 0 45px rgba(24, 50, 53, 0.08);
}

body.sidebar-pinned .app-shell {
  grid-template-columns: 240px minmax(0, 1fr);
}

.brand {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 216px;
}

.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(19, 174, 179, 0.18);
  background: var(--slate);
  color: #ffffff;
  font-weight: 800;
}

.brand span,
.sidebar-footer {
  color: var(--muted);
  font-size: 0.9rem;
}

.brand > div:not(.brand-mark),
.sidebar-footer span:not(.status-dot) {
  opacity: 0;
  transition: opacity 140ms ease;
}

.sidebar:hover .brand > div:not(.brand-mark),
body.sidebar-pinned .brand > div:not(.brand-mark),
.sidebar:hover .sidebar-footer span:not(.status-dot),
body.sidebar-pinned .sidebar-footer span:not(.status-dot) {
  opacity: 1;
}

.sidebar-pin {
  margin-left: auto;
  width: 30px;
  height: 30px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--muted);
  opacity: 0;
  transition: opacity 140ms ease, background 140ms ease;
}

.sidebar:hover .sidebar-pin,
body.sidebar-pinned .sidebar-pin {
  opacity: 1;
}

.sidebar-pin[aria-pressed="true"] {
  border-color: var(--accent-soft-2);
  background: var(--accent-soft);
  color: var(--accent);
}

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

.nav-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 0;
  border-radius: var(--radius);
  padding: 10px 12px;
  background: transparent;
  color: var(--muted);
  text-align: left;
  min-height: 40px;
  white-space: nowrap;
  overflow: hidden;
  font-weight: 700;
  transition: background 140ms ease, color 140ms ease;
}

.nav-icon {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: rgba(247, 248, 246, 0.92);
  color: var(--soft);
}

.nav-icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nav-label {
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity 140ms ease, transform 140ms ease;
}

.sidebar:hover .nav-label,
body.sidebar-pinned .nav-label {
  opacity: 1;
  transform: translateX(0);
}

.nav-item:hover,
.nav-item.active {
  background: rgba(247, 248, 246, 0.9);
  color: var(--ink);
}

.nav-item.active {
  background: var(--slate-soft);
  color: var(--slate);
}

.nav-item.active::after {
  content: "";
  position: absolute;
  inset: 8px auto 8px 0;
  width: 3px;
  border-radius: 999px;
  background: var(--slate);
}

.nav-item.active .nav-icon {
  background: #ffffff;
  color: var(--slate);
  box-shadow: 0 8px 18px rgba(19, 174, 179, 0.12);
}

.sidebar-footer {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--success);
}

.workspace {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  background: rgba(251, 252, 255, 0.78);
  backdrop-filter: blur(22px);
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 30px 13px;
  border-bottom: 1px solid rgba(226, 229, 225, 0.72);
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  font-size: var(--text-page);
  line-height: 1;
  letter-spacing: -0.01em;
  color: var(--ink);
}

h2 {
  font-size: var(--text-section);
}

.eyebrow,
.section-kicker {
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.74rem;
  font-weight: 700;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.tool-menu {
  position: relative;
}

.tool-menu-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 30;
  width: 230px;
  display: grid;
  gap: 4px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.tool-menu-panel button {
  width: 100%;
  min-height: 34px;
  justify-content: flex-start;
  border: 0;
  background: transparent;
  color: var(--ink);
  text-align: left;
}

.tool-menu-panel button:hover {
  background: var(--surface-muted);
}

.search-box {
  width: min(420px, 36vw);
  min-width: 260px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(226, 229, 225, 0.9);
  border-radius: 999px;
  padding: 0 12px;
  height: 38px;
  transition: border-color 140ms ease, background 140ms ease, box-shadow 140ms ease;
}

.search-box:focus-within {
  background: var(--surface);
  border-color: rgba(19, 174, 179, 0.36);
  box-shadow: var(--focus-ring);
}

.search-box input {
  border: 0;
  outline: 0;
  background: transparent;
  width: 100%;
}

.global-search-results {
  position: absolute;
  top: 74px;
  right: 32px;
  z-index: 20;
  width: min(520px, calc(100vw - 64px));
  max-height: 60vh;
  overflow: auto;
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(226, 229, 225, 0.9);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
}

.search-result {
  width: 100%;
  display: grid;
  gap: 4px;
  text-align: left;
  border: 1px solid transparent;
  border-radius: 14px;
  background: rgba(247, 248, 246, 0.7);
  padding: 10px 12px;
}

.search-result:hover {
  border-color: rgba(201, 206, 199, 0.9);
  background: #ffffff;
}

.content {
  padding: 26px 32px 40px;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.cockpit-brief {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
  margin-bottom: 22px;
  padding: 2px 2px 0;
}

.cockpit-brief > div {
  position: relative;
}

.cockpit-brief h2 {
  margin-top: 6px;
  font-size: var(--text-context);
  line-height: 1.12;
  letter-spacing: -0.01em;
}

.info-heading {
  position: relative;
  display: inline-flex;
  align-items: flex-start;
  gap: 4px;
}

.quiet-clock {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  color: var(--info);
  font-size: 0.88rem;
  font-weight: 700;
  white-space: nowrap;
  padding: 0 4px;
}

.info-dot {
  position: relative;
  width: 18px;
  height: 18px;
  min-height: 18px;
  margin-top: -2px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  font-weight: 800;
  font-size: 0.66rem;
  line-height: 1;
  padding: 0;
  transform: translateY(-0.35em);
}

.info-dot::before {
  content: "";
  position: absolute;
  inset: -6px;
}

.info-dot:hover,
.info-dot:focus-visible,
.info-dot[aria-expanded="true"] {
  color: var(--accent);
  border-color: var(--accent-soft-2);
  background: var(--accent-soft);
}

.info-popover {
  position: absolute;
  z-index: 20;
  max-width: 340px;
  margin-top: 8px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--muted);
  box-shadow: var(--shadow);
  font-size: 0.88rem;
  line-height: 1.45;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(420px, 1.35fr) minmax(280px, 0.65fr);
  gap: 20px;
  align-items: start;
}
