/* app.css — Shared design system for the GASS dashboard (docs/03 + DESIGN sec10).
 *
 * The single stylesheet every dashboard page links: it defines the dark-mode
 * color palette (docs/03 "Color Palette") as CSS custom properties, base
 * typography, and the reusable card/button/form primitives. Pages style
 * themselves by composing these classes + variables rather than redefining
 * colors locally, so the palette stays in one place.
 *
 * Served static from repo-root dashboard/ by src/web/bridge.js (express.static).
 */

/* ── Color palette (docs/03) ─────────────────────────────────────────────── */
:root {
  --bg:       #0D1117; /* Background */
  --surface:  #161B22; /* Surface (cards, inputs) */
  --border:   #30363D; /* Border */
  --text:     #E6EDF3; /* Text */
  --dim:      #8B949E; /* Dim / secondary text */
  --accent:   #58A6FF; /* Accent */
  --success:  #3FB950; /* Success */
  --warning:  #D29922; /* Warning */
  --danger:   #F85149; /* Danger / errors */
  --cyan:     #39D2C0; /* Cyan / teal brand accent */

  /* Spacing / shape primitives reused across components. */
  --radius:   8px;
  --gap:      16px;
  --shadow:   0 8px 24px rgba(1, 4, 9, 0.6);
}

/* ── Base / typography ───────────────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
    Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

h1,
h2,
h3 {
  margin: 0 0 var(--gap);
  font-weight: 600;
  color: var(--text);
}

/* ── Card ────────────────────────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

/* ── Forms ───────────────────────────────────────────────────────────────── */
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: var(--gap);
}

.field label {
  font-size: 13px;
  color: var(--dim);
}

.input {
  width: 100%;
  padding: 10px 12px;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  font-family: inherit;
}

.input:focus {
  outline: none;
  border-color: var(--accent);
}

.input::placeholder {
  color: var(--dim);
}

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.btn {
  display: inline-block;
  width: 100%;
  padding: 10px 16px;
  background: var(--accent);
  color: var(--bg);
  border: none;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
}

.btn:hover {
  filter: brightness(1.1);
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ── Inline error message ────────────────────────────────────────────────── */
.error {
  margin: 0 0 var(--gap);
  padding: 10px 12px;
  background: rgba(248, 81, 73, 0.12);
  border: 1px solid var(--danger);
  border-radius: var(--radius);
  color: var(--danger);
  font-size: 13px;
}

.error[hidden] {
  display: none;
}

/* ── Login layout ────────────────────────────────────────────────────────── */
.login-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: var(--gap);
}

.login-card {
  width: 100%;
  max-width: 360px;
}

.brand {
  text-align: center;
  margin-bottom: 24px;
}

.brand .logo {
  font-size: 22px;
  font-weight: 700;
  color: var(--cyan);
}

.brand .tagline {
  margin-top: 4px;
  font-size: 13px;
  color: var(--dim);
}
