/* The shell's furniture: tokens, the app bar, the signed-out frame, a form.
 *
 * One sheet rather than three because the shell is one bar and one pane; a
 * page's own styles live in its .vue file. Tokens first, so a page never writes
 * a colour or a spacing literal of its own.
 */

:root {
  /* --- ground --- neutral, pulled a few degrees toward the accent so it reads
   * as chosen rather than inherited. */
  --page:    #f4f2f2;
  --surface: #ffffff;
  --sunk:    #ece9e9;

  /* --- ink --- */
  --ink:   #16110f;
  --muted: #6a5f5d;   /* 5.8:1 on page - fine for a label, never for a paragraph */

  /* --- hairlines --- */
  --rule:   #dcd6d5;

  /* --- the accent --- Swiss red, adjusted from the flag's pure #ff0000, which
   * vibrates against text and fails contrast as a fill. */
  --accent:      #d8232a;
  --accent-d:    #ab161c;
  --accent-wash: #fbebeb;

  --danger: #b3261e;

  --shadow: 0 1px 2px rgba(22, 17, 15, .08), 0 6px 20px rgba(22, 17, 15, .06);

  /* One grotesque, separated by weight and size rather than by family. The
   * mono is for anything compared character by character - an account id. */
  --grot: "Helvetica Neue", "Arial Nova", Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", "SF Mono", Menlo, Consolas, monospace;

  /* An 8px scale, so nothing is set by eye. */
  --s1: .25rem;  --s2: .5rem;   --s3: .75rem;  --s4: 1rem;
  --s5: 1.5rem;  --s6: 2rem;    --s7: 3rem;

  --appbar-h: 52px;
  --content-max: 1200px;
}

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

html { font: 15px/1.5 var(--grot); color: var(--ink); background: var(--page); }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--accent); }
a:hover { color: var(--accent-d); }

code { font-family: var(--mono); font-size: .92em; }

/* --- the app bar ---------------------------------------------------------- */

.appbar {
  height: var(--appbar-h);
  display: flex;
  align-items: center;
  gap: var(--s4);
  padding: 0 var(--s5);
  background: var(--surface);
  border-bottom: 1px solid var(--rule);
}

.appbrand {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  letter-spacing: .01em;
}
.appbrand svg { color: var(--accent); }
.appbrand-dot { color: var(--accent); }

.appbar-spacer { flex: 1; }

.appbar-account {
  display: inline-flex;
  align-items: center;
  gap: var(--s3);
  color: var(--muted);
  font-size: .93rem;
}
.appbar-account a { color: var(--ink); text-decoration: none; }
.appbar-account a:hover { color: var(--accent-d); }

/* --- the panes ------------------------------------------------------------ */

.main {
  flex: 1;
  width: 100%;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: var(--s6) var(--s5);
}

/* The signed-out frame: no bar to navigate from, the mark centred over a card. */
.authbar {
  display: flex;
  justify-content: center;
  padding: var(--s7) 0 var(--s5);
}
.authmain {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 0 var(--s4) var(--s7);
}

.card {
  width: 100%;
  max-width: 400px;
  padding: var(--s6);
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

h1 { font-size: 1.5rem; margin: 0 0 var(--s2); }
.lede { color: var(--muted); margin: 0 0 var(--s5); }

/* --- forms ---------------------------------------------------------------- */

.field { display: block; margin-bottom: var(--s4); }
.field-label {
  display: block;
  font-size: .85rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: var(--s1);
}
input[type="email"], input[type="password"], input[type="text"] {
  width: 100%;
  padding: var(--s2) var(--s3);
  font: inherit;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 6px;
}
input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: var(--s2) var(--s4);
  font: inherit;
  font-weight: 600;
  border: 1px solid var(--rule);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  text-decoration: none;
}
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-d); border-color: var(--accent-d); }
.btn:disabled { opacity: .6; cursor: default; }

.form-error {
  color: var(--danger);
  background: var(--accent-wash);
  padding: var(--s2) var(--s3);
  border-radius: 6px;
  margin: 0 0 var(--s4);
}

.or-divider {
  display: flex;
  align-items: center;
  gap: var(--s3);
  color: var(--muted);
  font-size: .85rem;
  margin: var(--s5) 0;
}
.or-divider::before, .or-divider::after {
  content: "";
  flex: 1;
  border-top: 1px solid var(--rule);
}

/* --- an empty state ------------------------------------------------------- */

.empty {
  padding: var(--s7) var(--s5);
  text-align: center;
  color: var(--muted);
  background: var(--surface);
  border: 1px dashed var(--rule);
  border-radius: 8px;
}
.empty h2 { color: var(--ink); margin: 0 0 var(--s2); font-size: 1.15rem; }
.empty p { margin: 0; }

/* --- the app bar's pages ------------------------------------------------- */

.appnav { display: flex; gap: var(--s4); margin-left: var(--s5); }
.appnav a { color: var(--muted); text-decoration: none; padding: var(--s1) 0; border-bottom: 2px solid transparent; }
.appnav a:hover { color: var(--ink); }
.appnav a.router-link-active { color: var(--ink); border-bottom-color: var(--accent); }
