/* forms.css — the portal shell: top bar, card, field, button, message.
 *
 * These rules were written inside site/account/index.html and were about to be
 * copied into two new sign-in pages. They are the components every signed-in
 * surface is built from, so they live in one file instead.
 *
 * Built on assets/css/tokens.css, which must load first. The account page
 * carried a fourth private palette on top of the three this project already
 * had — its own green and its own red, neither matching anything else — so a
 * message that was "error red" there was a different red from every other
 * page. Gone.
 *
 * Light surfaces only. The admin dashboard and the rider portal are dark and
 * are served by admin.css.
 */

/* Local aliases so the rules below read the way they did when they lived in
 * the page, and so any page-specific CSS that referenced them still resolves. */
:root {
  --blue:      var(--gf-blue);
  --blue-dark: var(--gf-blue-dark);
  --ink:       #12202E;
  --ink-2:     #5B6B7C;
  --ink-3:     var(--gf-text-3);   /* the quietest text — section labels */
  --line:      var(--gf-border);
  --bg:        var(--gf-surface);
  --card:      var(--gf-white);
  --green:     var(--gf-green);
  --amber:     var(--gf-amber);
  --red:       var(--gf-red);

  /* The type scale and the radii live in tokens.css, so the rider portal and
   * the admin dashboard share them too. The radii are aliased here under
   * their short names, the same way the colours above are. */
  --r-sm:   var(--gf-r-sm);
  --r-md:   var(--gf-r-md);
  --r-lg:   var(--gf-r-lg);
  --r-pill: var(--gf-r-pill);
}

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

body {
  font-family: var(--gf-font);
  background: var(--bg);
  color: var(--ink);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  font-size: var(--fs-md);
}

a { color: var(--blue); }

/* ── Top bar ──────────────────────────────────────────────────────── */
.topbar {
  background: var(--card); border-bottom: 1px solid var(--line);
  padding: 12px 16px; display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; z-index: 20; gap: 12px;
}
.brand {
  display: flex; align-items: center; gap: 9px;
  font-weight: 700; text-decoration: none; color: var(--ink);
}
.brand img { width: 28px; height: 28px; object-fit: contain; }
.topbar-right { display: flex; align-items: center; gap: 14px; font-size: var(--fs-sm); color: var(--ink-2); }

/* ── Layout ───────────────────────────────────────────────────────── */
.wrap      { max-width: 760px; margin: 0 auto; padding: 20px 16px 56px; }
.auth-wrap { max-width: 420px; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-md); padding: 22px; }
.card + .card { margin-top: 14px; }

h1 { font-size: var(--fs-xl); letter-spacing: -.3px; margin-bottom: 6px; }
h2 { font-size: var(--fs-lg); margin-bottom: 6px; }
.sub     { color: var(--ink-2); font-size: var(--fs-base); line-height: 1.6; margin-bottom: 20px; }
.eyebrow { font-size: var(--fs-xs); font-weight: 700; letter-spacing: .5px; text-transform: uppercase;
           color: var(--blue); margin-bottom: 12px; }
.hint    { font-size: var(--fs-sm); color: var(--ink-2); }
.hidden  { display: none !important; }

/* ── Fields ───────────────────────────────────────────────────────── */
/* Matched to .form-field in home.css and .u-field in system.css, so a field
 * looks and behaves the same wherever a customer meets one.
 *
 * The three numbers that moved: 15px to 16px, because anything under 16px
 * makes iOS Safari zoom the page the moment the field is focused; 46px to
 * 48px, the minimum tap target; and the label up from 12px, which was small
 * enough to be a guess rather than a label. */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field:last-child { margin-bottom: 0; }
.field label { font-size: var(--fs-base); font-weight: 500; color: var(--ink-2); line-height: 1.4; }
.field input, .field select, .field textarea {
  border: 1px solid var(--line); border-radius: var(--r-sm); padding: 12px 16px; font-size: 16px;
  font-family: inherit; line-height: 1.4; color: var(--ink); background: var(--card);
  min-height: 48px; width: 100%; outline: none;
  transition: border-color .15s, box-shadow .15s;
  -webkit-appearance: none; appearance: none;
}
.field textarea { min-height: 96px; resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: var(--ink-3, #94A3B8); }
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--ink); box-shadow: 0 0 0 3px var(--bg);
}
.field select {
  background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23475569' stroke-width='2.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 16px center; padding-right: 42px;
}

/* Same rule as .divider in home.css. /account uses it to separate the
 * payment-on-delivery switch from the bank details, but never loaded a
 * stylesheet that defined it, so the separator rendered as nothing and the
 * two halves of that panel ran together. */
.divider { height: 1px; background: var(--line); margin: 18px 0; }

/* ── Buttons ──────────────────────────────────────────────────────── */
/* Same shape and weight as .btn in home.css, which is the canonical button
 * for everything customer-facing. This file exists because /account does not
 * load home.css; the values are deliberately kept identical, so a button on
 * the dashboard is the same object as a button on the site.
 *
 * If these two ever need to differ, add a modifier - do not edit one of them. */
.btn {
  width: 100%; min-height: 48px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--blue); color: var(--gf-white); border: none;
  border-radius: var(--r, var(--r-sm));
  font-size: var(--fs-md); font-weight: 600; line-height: 1; font-family: inherit;
  cursor: pointer; margin-top: 6px; padding: 0 18px;
  transition: all .18s ease; white-space: nowrap;
}
.btn:hover    { background: var(--blue-dark); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-out      { background: var(--card); color: var(--ink); border: 1px solid var(--line); }
.btn-out:hover{ background: var(--bg); }
.btn:focus-visible, .btn-google:focus-visible, .link-btn:focus-visible, .back:focus-visible {
  outline: 2px solid var(--blue); outline-offset: 2px;
}

.link-btn { background: none; border: none; font: inherit; color: var(--blue); cursor: pointer; padding: 0; }
.back     { background: none; border: none; color: var(--blue); font: inherit; cursor: pointer;
            padding: 0; margin-bottom: 12px; }

/* Google's button, to Google's brand guidance: white, their mark, our type. */
.btn-google {
  width: 100%; min-height: 48px;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  background: var(--card); border: 1px solid #DADCE0; border-radius: var(--r-sm);
  font-size: var(--fs-md); font-weight: 600; font-family: inherit; color: #3C4043; cursor: pointer;
}
.btn-google:hover    { background: #F7F8F8; box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.btn-google:disabled { opacity: .6; cursor: not-allowed; }

.auth-or {
  display: flex; align-items: center; gap: 12px;
  margin: 18px 0; font-size: var(--fs-sm); color: var(--ink-2);
}
.auth-or::before, .auth-or::after { content: ''; flex: 1; height: 1px; background: var(--line); }

/* ── Messages ─────────────────────────────────────────────────────── */
.msg       { border-radius: var(--r-sm); padding: 11px 14px; font-size: var(--fs-sm); margin-bottom: 14px;
             display: none; line-height: 1.5; }
.msg-error { background: #FEF2F2; border: 1px solid #FECACA; color: var(--red); }
.msg-ok    { background: #ECFDF5; border: 1px solid #A7F3D0; color: var(--green); }

/* ── The other doors ──────────────────────────────────────────────────
 * Every sign-in page carries a line pointing at the other two. Somebody who
 * bookmarked the old /login as staff, or who is a rider typing the customer
 * address from memory, lands somewhere that tells them where to go instead of
 * refusing their password with no explanation. */
.other-doors {
  margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line);
  text-align: center; font-size: var(--fs-sm); color: var(--ink-2); line-height: 1.9;
}
.other-doors a { color: var(--blue); text-decoration: none; font-weight: 600; }
.other-doors a:hover { text-decoration: underline; }

/* ── The Send hub ────────────────────────────────────────────────────────
 * One pane, four doors, each a real page. Replaces the old p-send, which was
 * a menu whose first two options were the two things either side of the rail's
 * Quick actions already offered — so it existed to be a second way into them.
 * A button called Send should send, not open a menu.
 *
 * The four tiles are the four ways to get a parcel moving, named for the
 * decision rather than the destination: what kind of job is it, and how many
 * of them. Each carries its own icon, its own one-line pitch, and a hint that
 * says what happens next — because a customer standing here does not yet know
 * whether a parcel is priced by a table or by a person, and that is the whole
 * reason this hub exists.
 *
 * The tiles carry their own icons as inline SVG rather than emoji, for the
 * same reason the rail does: an emoji cannot take the colour of the thing it
 * sits in, and it renders as a different drawing on every platform the
 * customers are actually using. */
.send-hub { display: flex; flex-direction: column; gap: 10px; }
.send-tile {
  display: flex; align-items: flex-start; gap: 16px; text-align: left;
  padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--r-md);
  background: var(--card); color: var(--ink); text-decoration: none;
  transition: border-color .15s, background .15s, transform .12s;
}
.send-tile:hover { border-color: var(--blue); background: var(--bg); transform: translateX(2px); }
.send-tile:active { transform: translateX(0) scale(.99); }
.send-tile__i {
  width: 40px; height: 40px; flex-shrink: 0; display: grid; place-items: center;
  border-radius: 12px; background: var(--bg); color: var(--blue);
}
.send-tile__i .ic { width: 22px; height: 22px; }
.send-tile__b { display: block; font-size: var(--fs-base); font-weight: 600; margin-bottom: 3px; }
.send-tile__p { display: block; font-size: var(--fs-sm); color: var(--ink-2); line-height: 1.55; }
.send-tile__p b { color: var(--ink); font-weight: 600; }
.send-hub__foot { font-size: var(--fs-sm); color: var(--ink-2); line-height: 1.6; margin-top: 4px; }
.send-hub__foot a { color: var(--blue); text-decoration: underline; text-underline-offset: 2px; }
