/* CashDesk base reset and shell layout */
*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  font-family: var(--font-sans);
  font-size: var(--font-size-base);
  color: hsl(var(--foreground));
  background: hsl(var(--background));
  -webkit-font-smoothing: antialiased;
}

button, input, select, textarea {
  font-family: inherit;
}

/* ── SHELL LAYOUT ── */
/*
  Three-zone full-viewport column:
  [topbar 52px fixed] [content flex:1 scrolls] [footer 52px fixed]

  The key to making content scroll without calc(100vh - X):
  - .cd-shell is 100vh with overflow:hidden
  - .cd-shell__content has flex:1 AND min-height:0
  - min-height:0 overrides flex's default min-height:auto,
    which otherwise prevents the content from shrinking below its content size
*/
.cd-shell {
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
}

.cd-shell__topbar {
  flex-shrink: 0;
  height: var(--shell-topbar-height); /* 52px */
  z-index: var(--z-topbar);           /* 400 */
}

.cd-shell__content {
  flex: 1;
  min-height: 0;          /* CRITICAL — without this flex ignores overflow */
  overflow-y: auto;
  overflow-x: hidden;
  background: hsl(var(--background));
  /* Bottom padding so content isn't hidden behind fixed footer */
  padding-bottom: var(--shell-footer-height); /* 52px */
}

.cd-shell__footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--shell-footer-height); /* 52px */
  z-index: var(--z-footer);           /* 300 */
}
