/* Shared by the sign-in pages, the app home and the admin area (spec 10). Colours come from tokens.css,
   which every page links first; no colour is typed here. */

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/fonts/inter-latin-wght.woff2') format('woff2');
}

@font-face {
  font-family: 'Geist Mono';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/fonts/geist-mono-latin-wght.woff2') format('woff2');
}

* { box-sizing: border-box; }
html { color-scheme: dark; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--surface-bg) url('/img/stars.svg') repeat;
  color: var(--text-primary);
  font-family: Inter, system-ui, sans-serif;
  font-size: var(--type-size-base);
  line-height: 1.5;
}
code, .mono, time, pre { font-family: 'Geist Mono', ui-monospace, monospace; }
a { color: var(--text-primary); }
h1 { font-size: var(--type-size-xl); font-weight: var(--type-weight-semibold); margin: 0 0 4px; letter-spacing: -0.01em; }
h2 { font-size: var(--type-size-md); font-weight: var(--type-weight-semibold); margin: 24px 0 8px; }
.muted { color: var(--text-muted); }
.faint { color: var(--text-faint); }
.err { color: var(--feedback-error); margin: 0 0 12px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Mode bar and logo tile: the neutral (white) tile with the three mode dots. */
.modebar { display: flex; height: 3px; }
.modebar span { flex: 1; }
.modebar .s, .dots .s { background: var(--mode-sneakers-light); }
.modebar .t, .dots .t { background: var(--mode-tours-light); }
.modebar .m, .dots .m { background: var(--mode-magic-base); }
.brand { display: flex; align-items: center; gap: 10px; font-weight: var(--type-weight-semibold); font-size: var(--type-size-md); }
.tile { width: 30px; height: 30px; border-radius: var(--radius-button); background: var(--text-primary); display: grid; place-items: center; }
.tile::after { content: ''; width: 8px; height: 12px; border-radius: 4px 4px 2px 2px; background: var(--surface-bg); }
.dots { display: inline-flex; gap: 3px; }
.dots span { width: 5px; height: 5px; border-radius: 50%; }

/* Sign-in card on the star field. */
.center { display: grid; place-items: center; min-height: calc(100vh - 3px); padding: 24px 16px; }
.card { width: 100%; max-width: 446px; background: var(--surface-card); border: 1px solid var(--surface-border); border-radius: var(--radius-panel); padding: 32px; }
.card .brand { margin-bottom: 24px; }
.card .lede { color: var(--text-muted); margin: 0 0 20px; }
.card .foot { border-top: 1px solid var(--surface-divider); margin-top: 22px; padding-top: 18px; color: var(--text-faint); font-size: var(--type-size-sm); }
label { display: block; margin: 14px 0 6px; color: var(--text-muted); font-size: var(--type-size-sm); }
input, select {
  width: 100%; padding: 11px 12px; border: 1px solid var(--surface-border); border-radius: var(--radius-control);
  background: var(--surface-bg); color: var(--text-primary); font: inherit;
}
input:focus, select:focus { outline: none; border-color: var(--text-secondary); }
button, .button {
  display: inline-block; padding: 10px 14px; border: 0; border-radius: var(--radius-button); background: var(--text-primary);
  color: var(--surface-bg); font: inherit; font-weight: var(--type-weight-semibold); cursor: pointer; text-decoration: none;
}
.card button[type=submit] { width: 100%; margin-top: 16px; }
button.ghost { background: transparent; color: var(--text-secondary); border: 1px solid var(--surface-border); font-weight: var(--type-weight-medium); }
.notice { background: var(--surface-card-raised); border: 1px solid var(--surface-border); border-radius: var(--radius-control); padding: 10px 12px; margin: 0 0 12px; }

/* Signed-in pages on the app host: a top bar with the account menu. */
.topbar { display: flex; justify-content: space-between; align-items: center; padding: 14px 24px; border-bottom: 1px solid var(--surface-divider); }
.page { max-width: 720px; margin: 0 auto; padding: 32px 16px; }
.menu { position: relative; }
.menu summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px; }
.menu summary::-webkit-details-marker { display: none; }
.avatar { width: 26px; height: 26px; border-radius: 50%; background: var(--surface-control); display: grid; place-items: center; font-size: var(--type-size-xs); font-weight: var(--type-weight-semibold); text-transform: uppercase; }
.menu .who { line-height: 1.2; }
.menu .who small { display: block; color: var(--text-faint); font-size: var(--type-size-xs); text-transform: capitalize; }
.menu .panel {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 200px; z-index: 10; background: var(--surface-card-raised);
  border: 1px solid var(--surface-border); border-radius: var(--radius-card); padding: 6px;
}
.menu .panel a, .menu .panel button {
  display: block; width: 100%; text-align: left; padding: 8px 10px; border-radius: var(--radius-control); background: transparent;
  color: var(--text-secondary); font-weight: var(--type-weight-regular); text-decoration: none; margin: 0;
}
.menu .panel a:hover, .menu .panel button:hover { background: var(--surface-row-hover); color: var(--text-primary); }
.menu .panel form { margin: 0; }
