/* Land Edge — shared app shell (Spec 0018).
   ONE rail + header, fleet-wide, never forked. All color/texture comes from
   theme.css tokens (--c-*), so a theme tweak flows to every screen. The frame
   is a full viewport that does not scroll; only .le-content scrolls, so the
   rail and header can never come unstuck. A screen opts out with
   data-shell="off" (report/print views). */

html, body { height: 100%; }
body { margin: 0; }

.le-shell {
  display: flex; height: 100vh; overflow: hidden;
  background: var(--c-page);
  color: var(--c-text);
}
.le-rail, .le-topbar {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
.le-rail, .le-topbar, .le-fs-exit, .le-rail *, .le-topbar * { box-sizing: border-box; }
.le-iconbtn { padding: 0; }

/* ---- rail ---- */
.le-rail {
  width: 210px; flex-shrink: 0;
  background: var(--c-panel);
  border-right: 1px solid var(--c-border);
  box-shadow: var(--c-shadow-sm);
  display: flex; flex-direction: column;
  height: 100vh; overflow-y: auto; z-index: 2;
}
.le-brand { display: flex; align-items: center; gap: 10px; padding: 16px 15px 14px; text-decoration: none; color: inherit; }
.le-brand-mark {
  width: 34px; height: 34px; border-radius: var(--c-radius-sm); flex-shrink: 0;
  background: var(--c-brand); color: var(--c-brand-ink); box-shadow: var(--c-shadow-sm);
  display: flex; align-items: center; justify-content: center; font-size: 19px;
}
.le-brand-name { font-size: 14px; font-weight: 600; line-height: 1.2; color: var(--c-text); }
.le-brand-tenant { font-size: 12px; color: var(--c-text-3); line-height: 1.3; }

.le-nav { padding: 8px 10px; display: flex; flex-direction: column; gap: 3px; flex: 1; }
.le-nav-label { font-size: 11px; color: var(--c-text-3); margin: 12px 11px 4px; }
.le-nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 11px; border-radius: var(--c-radius-sm); font-size: 13px; color: var(--c-text-2);
  cursor: pointer; text-decoration: none; border: 1px solid transparent;
  transition: background .12s ease, color .12s ease, border-color .12s ease;
}
.le-nav-item i { font-size: 18px; width: 18px; text-align: center; }
.le-nav-item:not(.soon):not(.active):hover { background: var(--c-sunken); border-color: var(--c-text-3); }
.le-nav-item.active { background: var(--c-accent-soft); color: var(--c-accent); font-weight: 600; box-shadow: var(--c-shadow-sm); }
.le-nav-item.soon { opacity: .5; cursor: default; }
.le-nav-tag { margin-left: auto; font-size: 10px; padding: 1px 7px; border-radius: 20px; background: var(--c-warning-soft); color: var(--c-warning); }
.le-rail-foot { padding: 8px 10px; }

/* ---- main + header ---- */
.le-main { flex: 1; min-width: 0; display: flex; flex-direction: column; height: 100vh; overflow: hidden; }
.le-topbar {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 20px; background: var(--c-panel);
  border-bottom: 1px solid var(--c-border);
  box-shadow: var(--c-shadow-sm); flex-shrink: 0; z-index: 5;
}
.le-search {
  flex: 1; max-width: 520px; display: flex; align-items: center; gap: 8px;
  background: var(--c-page); border: 1px solid var(--c-border); border-radius: 22px;
  padding: 8px 14px; color: var(--c-text-3); font-size: 13px;
}
.le-search i { font-size: 16px; }
.le-search input {
  flex: 1; min-width: 0; border: 0; background: transparent; outline: none;
  font: inherit; font-size: 13px; color: var(--c-text);
}
.le-search input::placeholder { color: var(--c-text-3); }
.le-search input::-webkit-search-cancel-button { cursor: pointer; }
.le-filters { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.le-filters select {
  font: inherit; font-size: 12.5px; color: var(--c-text);
  background: var(--c-panel); border: 1px solid var(--c-border);
  border-radius: 18px; padding: 7px 10px; cursor: pointer; max-width: 190px;
}
.le-filters select:hover { border-color: var(--c-text-3); }
@media (max-width: 1100px) { .le-filters { display: none; } }
.le-ver {
  margin-left: auto; font-size: 11px; font-weight: 600; letter-spacing: .02em;
  color: var(--c-text-3); background: var(--c-sunken);
  border: 1px solid var(--c-border); border-radius: 20px; padding: 3px 9px;
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
}
.le-iconbtn {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--c-panel); color: var(--c-text-2); border: 1px solid var(--c-border);
  box-shadow: var(--c-shadow-sm); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: border-color .12s ease, color .12s ease;
}
.le-iconbtn:first-of-type { margin-left: auto; }   /* first control pushes the group right when no version badge */
.le-ver + .le-iconbtn { margin-left: 0; }
.le-iconbtn:hover { border-color: var(--c-text-3); color: var(--c-text); }
.le-iconbtn i { font-size: 17px; }
.le-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--c-accent-soft); color: var(--c-accent); box-shadow: var(--c-shadow-sm);
  display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 600;
}

.le-content { flex: 1; overflow-y: auto; }

/* ---- full-screen (chrome off) — session-only, driven by the header toggle ---- */
.le-shell.chrome-off .le-rail,
.le-shell.chrome-off .le-topbar { display: none; }
.le-fs-exit {
  position: fixed; top: 12px; right: 12px; z-index: 50; display: none;
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--c-panel); color: var(--c-text-2); border: 1px solid var(--c-border);
  box-shadow: var(--c-shadow); cursor: pointer;
  align-items: center; justify-content: center;
}
.le-fs-exit i { font-size: 18px; }
.le-shell.chrome-off .le-fs-exit { display: flex; }

@media (max-width: 720px) {
  .le-rail { display: none; }
}
