/* lk-layout.css — Shell grid structure */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%; font-family: var(--font-sans);
  font-size: var(--font-base, 13px);
  background: var(--bg-body); color: var(--tx-base);
  overflow: hidden;
}

/* ── Shell grid ──────────────────────────────────────────────────────────────── */
#lz-shell {
  display: grid;
  grid-template-columns: 52px 210px 1fr;
  grid-template-rows: 1fr;
  height: 100vh;
  transition: grid-template-columns var(--transition-normal);
}

html.ul-collapsed #lz-shell { grid-template-columns: 52px 0 1fr; }
html.ul-collapsed .ul1-panel { overflow: hidden; }

/* ── UL0 Rail ────────────────────────────────────────────────────────────────── */
.ul0-rail {
  grid-column: 1; display: flex; flex-direction: column;
  align-items: center; padding: var(--space-2) 0;
  background: var(--bg-card); border-right: 1px solid var(--border-soft);
  gap: 2px; z-index: var(--z-sticky);
}

.ul0-logo { width: 36px; height: 36px; margin-bottom: var(--space-3);
  display: flex; align-items: center; justify-content: center; }
.ul0-logo img { width: 28px; height: 28px; border-radius: var(--radius-sm); }

.ul0-groups { display: flex; flex-direction: column; gap: 2px; flex: 1; width: 100%; padding: 0 var(--space-1); }
.ul0-system { display: flex; flex-direction: column; gap: 2px; width: 100%; padding: 0 var(--space-1); }

.ul0-btn {
  width: 40px; height: 40px; border-radius: var(--radius-md);
  border: none; background: transparent; cursor: pointer;
  color: var(--tx-muted); display: flex; align-items: center; justify-content: center;
  transition: background var(--transition-fast), color var(--transition-fast);
  position: relative;
}
.ul0-btn:hover  { background: var(--bg-hover); color: var(--tx-base); }
.ul0-active, .ul0-btn.ul0-active { background: var(--bg-active); color: var(--c-brand-soft); }

/* ── UL1 Panel ───────────────────────────────────────────────────────────────── */
.ul1-panel {
  grid-column: 2; display: flex; flex-direction: column;
  background: var(--bg-card); border-right: 1px solid var(--border-soft);
  overflow: hidden; transition: width var(--transition-normal);
}
.ul1-scroll { flex: 1; overflow-y: auto; padding: var(--space-2); display: flex; flex-direction: column; gap: 2px; }

.ul1-item {
  width: 100%; display: flex; align-items: center; gap: var(--space-2);
  padding: 8px var(--space-2); border-radius: var(--radius-md);
  border: none; background: transparent; cursor: pointer;
  color: var(--tx-muted); font-size: var(--font-md); text-align: left;
  transition: background var(--transition-fast), color var(--transition-fast);
}
.ul1-item:hover  { background: var(--bg-hover); color: var(--tx-base); }
.ul1-item.active { background: var(--bg-active); color: var(--c-brand-soft); font-weight: 500; }
.ul1-icon { flex-shrink: 0; opacity: .75; }
.ul1-label { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ── TX Main ──────────────────────────────────────────────────────────────────── */
.tx-main { grid-column: 3; display: flex; flex-direction: column; min-width: 0; overflow: hidden; }

.tx-top {
  height: 52px; flex-shrink: 0; display: flex; align-items: center;
  padding: 0 var(--space-4); gap: var(--space-3);
  background: var(--bg-card); border-bottom: 1px solid var(--border-soft);
  position: relative; z-index: var(--z-sticky);
}

.top-hello    { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.top-greet    { font-size: var(--font-xs); color: var(--tx-muted); line-height: 1; }
.top-name     { font-size: var(--font-sm); font-weight: 600; color: var(--tx-base); white-space: nowrap; }
.top-center   { flex: 1; display: flex; justify-content: center; }
.top-right    { display: flex; align-items: center; gap: var(--space-2); margin-left: auto; }
.top-clock    { font-size: var(--font-sm); color: var(--tx-muted); font-variant-numeric: tabular-nums; }

.tx-content { flex: 1; overflow: hidden; position: relative; background: var(--bg-body); }
#moduleContent { width: 100%; height: 100%; overflow-y: auto; }

/* ── Footer ──────────────────────────────────────────────────────────────────── */
.tx-footer {
  padding: var(--space-2) var(--space-4);
  font-size: var(--font-xs); color: var(--tx-dim);
  border-top: 1px solid var(--border-soft); background: var(--bg-card);
  display: flex; align-items: center; justify-content: space-between;
}
