/* MillFlow premium access experience – navy / gold identity.
   Auth views only; authenticated operations dashboards are unchanged. */
.auth-layout {
  --access-ink: #edf4fb;
  --access-muted: #a6bacf;
  --access-gold: #caa576;
  --access-gold-soft: #e3c698;
  min-height: 100dvh;
  width: 100%;
  padding: clamp(24px, 5vw, 68px) max(18px, env(safe-area-inset-right)) max(32px, env(safe-area-inset-bottom)) max(18px, env(safe-area-inset-left));
  position: relative;
  isolation: isolate;
  background:
    radial-gradient(ellipse 66% 50% at 80% 8%, rgba(30,87,131,.35), transparent 72%),
    radial-gradient(ellipse 60% 55% at 4% 97%, rgba(29,72,117,.18), transparent 72%),
    linear-gradient(140deg, #05111f 0%, #081a2c 48%, #09243d 100%);
  color: var(--access-ink);
  overflow: hidden;
}
.auth-layout::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background-image: linear-gradient(rgba(124,158,191,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(124,158,191,.04) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(90deg, rgba(0,0,0,.9), rgba(0,0,0,.25));
}
.auth-layout::after {
  content: "MILLFLOW  /  SECURE SYSTEMS";
  position: absolute;
  bottom: max(18px, env(safe-area-inset-bottom));
  right: 25px;
  color: rgba(167,191,215,.4);
  letter-spacing: .2em;
  font-size: 9px;
  font-weight: 800;
  pointer-events: none;
}
.auth-layout .auth-card,
.auth-layout .step-card {
  position: relative;
  width: min(540px, 100%);
  max-width: 100%;
  padding: clamp(24px, 5vw, 42px);
  overflow: hidden;
  background: linear-gradient(145deg, rgba(17,43,69,.97), rgba(9,28,47,.99));
  color: #edf4fb;
  border: 1px solid #2a4662;
  border-radius: 22px;
  box-shadow: 0 34px 100px rgba(0,0,0,.38), inset 0 1px 0 rgba(255,255,255,.06);
}
.auth-layout .auth-card::before,
.auth-layout .step-card::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 2px;
  background: linear-gradient(90deg, #97724b, #ebc996 45%, #436b8e 100%);
}
.auth-layout .brand { color: #f5f8fd; margin-bottom: 31px; font-size: 25px; line-height: 1.13; gap: 13px; }
.auth-layout .brand .logo {
  flex: 0 0 47px;
  width: 47px;
  height: 47px;
  border: 1px solid rgba(215,180,128,.65);
  border-radius: 13px;
  background: linear-gradient(148deg, #214e73, #123251 68%, #09263f);
  color: #f0d3aa;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.12), 0 5px 20px rgba(0,0,0,.22);
}
.auth-layout .brand .logo span { color: #e2c28e; }
.auth-layout .brand small {
  font-size: 9px; font-weight: 800; letter-spacing: .13em;
  line-height: 1.5; margin-top: 6px; color: #9bb1c7;
}
.auth-layout .eyebrow {
  display: flex; align-items: center; gap: 11px;
  margin-bottom: 13px; color: var(--access-gold);
  font-size: 10px; font-weight: 800; letter-spacing: .19em;
}
.auth-layout .eyebrow::before { content: ""; width: 18px; height: 1px; background: var(--access-gold); }
.auth-layout .auth-card h1, .auth-layout .step-card h1 {
  color: #f4f8fd; font-size: clamp(27px, 5vw, 37px);
  line-height: 1.18; letter-spacing: -.055em; font-weight: 800;
  margin-bottom: 12px;
}
.auth-layout .intro {
  color: var(--access-muted); font-size: 14px;
  line-height: 1.7; margin-bottom: 25px;
}
.auth-layout .auth-tabs {
  display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 5px;
  padding: 5px; margin: 0 0 24px;
  border: 1px solid #2b4965; border-radius: 12px;
  background: #071728;
}
.auth-layout .btn { transition: background .2s ease, border-color .2s ease, transform .2s ease; }
.auth-layout .auth-tabs .btn {
  min-width: 0; min-height: 42px; padding: 9px 7px;
  border: 1px solid transparent; border-radius: 8px;
  background: transparent; color: #95abc0; font-size: 12px;
}
.auth-layout .auth-tabs .btn:hover { background: #132d48; color: #fff; }
.auth-layout .auth-tabs .btn.active,
.auth-layout .auth-tabs .btn.active:hover {
  border-color: #426889;
  background: linear-gradient(145deg, #173c60, #12314f);
  color: #f1d5a8;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06);
}
.auth-layout .field { gap: 9px; margin-bottom: 18px; }
.auth-layout .field label { color: #cedae7; font-size: 12px; font-weight: 800; }
.auth-layout .field small { color: #a7bbd0; }
.auth-layout .field input, .auth-layout .field select, .auth-layout .field textarea {
  width: 100%; min-height: 49px; padding: 12px 14px;
  color: #f5f8fe; background: #081c30;
  border: 1px solid #35516d; border-radius: 10px;
  font-size: 16px; box-shadow: inset 0 1px 3px rgba(0,0,0,.15);
  outline: none; -webkit-appearance: none; appearance: none;
}
.auth-layout .field input::placeholder, .auth-layout .field textarea::placeholder { color: #8498ae; opacity: 1; }
.auth-layout .field input:hover, .auth-layout .field select:hover { border-color: #557291; }
.auth-layout .field input:focus, .auth-layout .field select:focus, .auth-layout .field textarea:focus {
  border-color: var(--access-gold-soft);
  box-shadow: 0 0 0 3px rgba(202,165,118,.15);
}
.auth-layout .btn.primary {
  min-height: 49px; border: 1px solid #537fa4;
  border-radius: 10px; color: #fff; font-size: 14px;
  background: linear-gradient(115deg, #225b88 0%, #15456f 60%, #0d3556 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.17), 0 8px 22px rgba(0,0,0,.16);
}
.auth-layout .btn.primary:hover { border-color: #bfa079; background: linear-gradient(115deg,#2b6a9c,#19517e); transform: translateY(-1px); }
.auth-layout .btn:not(.primary):not(.active):not(.auth-tabs .btn) {
  color: #e1ebf6; background: #122e49; border: 1px solid #3a5874;
}
.auth-layout .btn:focus-visible, .auth-layout a:focus-visible,
.auth-layout .crew-tile:focus-within { outline: 2px solid #edc891; outline-offset: 3px; }
.auth-layout .auth-links { margin-top: 17px; display: flex; justify-content: center; text-align: center; }
.auth-layout .auth-links a { color: #dabe90; font-size: 12px; font-weight: 700; text-decoration: none; }
.auth-layout .auth-links a:hover { text-decoration: underline; color: #f2d6ae; }
.auth-layout .alert {
  border: 1px solid #37506b; border-left: 2px solid #caa576;
  background: rgba(4,19,33,.55); border-radius: 9px;
  padding: 13px 15px; color: #b2c5d8;
  font-size: 11px; line-height: 1.7;
}
.auth-layout .alert b { color: #e5ceab; }
.auth-layout .alert.green { border-color:#375f77; border-left-color:#caa576; background:rgba(19,63,95,.35); color:#cbdbe7; }
.auth-layout .step-caption { color: #95abc2; border-bottom-color: #38526d; }
.auth-layout .step-caption b { color: #e0be8f; }
.auth-layout .crew-tile {
  background: #0b2137; border-color: #34516c; color: #edf4fb;
}
.auth-layout .crew-tile small { color: #a5b8cb; }
.auth-layout .crew-tile .letter { background: #163a5c; color: #d5bf9e; }
.auth-layout .crew-tile:hover { border-color: #c5a477; }
.auth-layout .crew-tile:has(input:checked) { border-color: #d8b789; background: #163851; }
.auth-layout .crew-tile:has(input:checked) .letter { background: #235581; color: #fff; }
@media (max-width: 620px) {
  .auth-layout { align-items: start; padding: max(20px, env(safe-area-inset-top)) 15px calc(48px + env(safe-area-inset-bottom)); }
  .auth-layout::after { left: 0; right: 0; bottom: 15px; text-align: center; font-size: 8px; }
  .auth-layout .auth-card, .auth-layout .step-card { padding: 26px 20px 24px; border-radius: 18px; }
  .auth-layout .brand { margin-bottom: 28px; font-size: 23px; }
  .auth-layout .brand small { font-size: 8px; letter-spacing: .11em; }
  .auth-layout .auth-card h1, .auth-layout .step-card h1 { font-size: 30px; }
  .auth-layout .auth-tabs { margin-bottom: 22px; }
}
@media (prefers-reduced-motion: reduce) {
  .auth-layout .btn { transition: none; }
  .auth-layout .btn.primary:hover { transform: none; }
}

/* Clear navigation back to the public MillFlow website from auth screens. */
.auth-layout .auth-card-top { display:flex;justify-content:flex-end;margin:-10px -4px 12px; }
.auth-layout .auth-home-link { display:inline-flex;align-items:center;gap:7px;min-height:42px;padding:7px 10px;border:1px solid rgba(200,164,117,.34);border-radius:9px;color:#e9cda2;font-size:12px;font-weight:800;line-height:1.3;text-decoration:none;transition:background .16s ease,border-color .16s ease; }
.auth-layout .auth-home-link:hover { background:rgba(54,106,147,.2);border-color:#caa576;color:#f4dbb5; }
.auth-layout .auth-brand-link { color:#f5f8fd;text-decoration:none;max-width:100%;width:max-content; }
.auth-layout .auth-brand-link:hover { color:#f1d5a8; }
@media (max-width:420px) { .auth-layout .auth-card-top { margin:-6px -1px 9px; } .auth-layout .auth-home-link { min-height:44px; } }
