/* Console shell layout. Colours come from the brand include's custom properties
   (--pa-primary, --pa-accent, --pa-ink, --pa-surface). */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--pa-surface, #191d31);
  color: var(--pa-ink, #e9ecf6);
  font: 16px/1.5 -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
}
[hidden] { display: none !important; }
.cs-page { width: 100%; max-width: 1080px; margin: 0 auto; padding: 24px 16px 32px; }
.cs-card {
  max-width: 460px; margin: 8px auto 0; padding: 24px 22px;
  border: 1px solid rgba(127, 127, 127, .28); border-radius: 14px;
  background: rgba(127, 127, 127, .06);
}
.cs-card h1 { margin: 0 0 6px; font-size: 24px; }
.cs-lede { margin: 0 0 18px; font-size: 14.5px; opacity: .78; }
.cs-note { margin: 12px 0 0; font-size: 14px; }
#cs-signin-form { display: grid; gap: 12px; margin-top: 16px; }
#cs-signin-form label { font-size: 13px; opacity: .8; margin-bottom: -6px; }
#cs-signin-form input {
  width: 100%; padding: 11px 12px; border-radius: 10px; font-size: 15px;
  border: 1px solid rgba(127, 127, 127, .4); background: rgba(0, 0, 0, .18); color: var(--pa-ink, #e9ecf6);
}
#cs-signin-form input:focus { outline: 2px solid var(--pa-primary, #5b7cfa); outline-offset: 1px; }
.cs-btn {
  padding: 11px 16px; border: 0; border-radius: 10px; cursor: pointer; font-size: 15px; font-weight: 600;
  color: #fff; background: linear-gradient(135deg, var(--pa-primary, #5b7cfa), var(--pa-accent, #8a6cff));
}
.cs-btn:disabled { opacity: .6; cursor: default; }
.cs-btn:focus-visible, #cs-nav a:focus-visible { outline: 2px solid var(--pa-ink, #e9ecf6); outline-offset: 2px; }
.cs-btn-quiet {
  background: transparent; color: var(--pa-ink, #e9ecf6);
  border: 1px solid rgba(127, 127, 127, .45); font-weight: 500;
}
#cs-passkey-btn { width: 100%; }
.cs-line { min-height: 22px; margin: 14px auto 0; max-width: 460px; font-size: 14px; text-align: center; }
.cs-line a { color: var(--pa-ink, #e9ecf6); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }

/* Unlocked shell: left rail at >= 768px. */
#cs-shell {
  display: grid; grid-template-columns: 200px minmax(0, 1fr); grid-template-rows: auto 1fr;
  gap: 16px 24px; margin-top: 8px;
}
#cs-nav { grid-column: 1; grid-row: 1 / span 2; }
#cs-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
#cs-nav a {
  display: block; padding: 9px 12px; border-radius: 9px; text-decoration: none;
  color: var(--pa-ink, #e9ecf6); font-size: 15px;
}
#cs-nav a:hover { background: rgba(127, 127, 127, .14); }
#cs-nav a[aria-current="page"] { background: rgba(127, 127, 127, .22); font-weight: 600; }
#cs-view { grid-column: 2; grid-row: 2; min-width: 0; min-height: 200px; }
#cs-view:focus { outline: none; }
#cs-view h2 { margin: 0 0 8px; font-size: 22px; }
#cs-view p { margin: 0 0 10px; overflow-wrap: anywhere; }
#cs-actions { grid-column: 2; grid-row: 1; display: flex; justify-content: flex-end; gap: 8px; }

/* Below 768px: fixed bottom bar. */
@media (max-width: 767.98px) {
  .cs-page { padding: 16px 12px 96px; }
  #cs-shell { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; }
  #cs-actions { grid-column: 1; grid-row: 1; }
  #cs-view { grid-column: 1; grid-row: 2; }
  #cs-nav {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
    background: var(--pa-surface, #191d31); border-top: 1px solid rgba(127, 127, 127, .35);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom, 0px));
  }
  #cs-nav ul { flex-direction: row; justify-content: space-between; gap: 2px; }
  #cs-nav li { flex: 1 1 auto; min-width: 0; }
  #cs-nav a {
    padding: 8px 2px; text-align: center; font-size: 12px; border-radius: 8px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }
}
@media (max-width: 359.98px) {
  #cs-nav ul { gap: 0; }
  #cs-nav a { font-size: 11.5px; padding: 8px 1px; }
}
