/* Ford login: a photo of the site behind a graphite scrim, one centered card in the DashboardFord
   palette (graphite #1C2129/#14181F, Ford Blue #00095B/#003478 accents, silver #C9CED6, text #E3E6EA,
   selection #2B8FFF). The card becomes full width on a phone. No remote fonts or images; no inset,
   min(), backdrop-filter or other recent CSS, so an older HMI browser still lays it out. */
:root {
  color-scheme: dark;
  --bg: #14181F; --sf: #1C2129; --ink: #E3E6EA; --mu: #A3ABB6; --silver: #C9CED6;
  --ln: rgba(201, 206, 214, .22); --ford: #00095B; --ford-2: #003478; --sel: #2B8FFF;
  --ok: #22C87C; --bad: #FF4256;
  --ui: "Helvetica Neue", Helvetica, Arial, system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  display: flex; align-items: center; justify-content: center; padding: 24px 16px;
  background-color: var(--bg);
  background-image: linear-gradient(180deg, rgba(20, 24, 31, .55) 0%, rgba(20, 24, 31, .35) 45%, rgba(20, 24, 31, .80) 100%),
                    url("brand/fondo-ford.jpg");
  background-size: cover; background-position: center 40%; background-repeat: no-repeat;
  color: var(--ink); font: 400 15px/1.45 var(--ui); -webkit-text-size-adjust: 100%;
}
.card {
  width: 100%; max-width: 420px; padding: 30px 28px 24px; border: 1px solid var(--ln); border-radius: 14px;
  border-top: 3px solid var(--ford-2);
  background: rgba(28, 33, 41, .9); box-shadow: 0 20px 60px rgba(0, 0, 0, .55);
}
.brand { display: flex; align-items: center; justify-content: center; margin-bottom: 20px; }
.brand img { display: block; height: 64px; width: auto; }
h1 { margin: 0 0 18px; font-size: 21px; font-weight: 600; text-align: center; }
.lead { margin: 0 0 14px; color: var(--mu); }
.lead strong { color: var(--ink); }
.alert {
  margin: 0 0 14px; padding: 10px 12px; border-radius: 8px; border: 1px solid rgba(255, 66, 86, .5);
  background: rgba(255, 66, 86, .14); color: #ffd6db; font-size: 14px;
}
.form { display: flex; flex-direction: column; }
.form > * + * { margin-top: 6px; }
.form.row { flex-direction: row; flex-wrap: wrap; }
.form.row > * + * { margin-top: 14px; margin-left: 10px; }
.form.row button { flex: 1 1 140px; }
label { margin-top: 8px; color: var(--mu); font-size: 13px; font-weight: 600; }
input {
  width: 100%; min-height: 46px; padding: 10px 12px; border: 1px solid var(--ln); border-radius: 8px;
  background: rgba(20, 24, 31, .75); color: var(--ink); font: inherit; font-size: 16px; /* 16px: no zoom on iOS */
}
input:focus { outline: 2px solid var(--sel); outline-offset: 1px; border-color: transparent; }
input[readonly] { color: var(--mu); }
.user-row, .pw-row { display: flex; align-items: stretch; }
.user-row > * + *, .pw-row > * + * { margin-left: 8px; }
.change, .reveal {
  flex: none; display: inline-flex; align-items: center; padding: 0 12px; border-radius: 8px;
  border: 1px solid var(--ln); background: transparent; color: var(--silver); font: 600 13px var(--ui);
  text-decoration: none; cursor: pointer; min-height: 46px;
}
.change:hover, .reveal:hover { color: #fff; border-color: var(--silver); }
.change:focus-visible, .reveal:focus-visible, button:focus-visible { outline: 2px solid var(--sel); outline-offset: 2px; }
button.primary, button.secondary {
  margin-top: 14px; min-height: 48px; border-radius: 8px; font: 600 15px var(--ui); cursor: pointer;
}
button.primary { border: 1px solid #1a4f9c; background: var(--ford-2); color: #fff; }
button.primary:hover { background: #0a44a0; }
button.primary:disabled { opacity: .45; cursor: not-allowed; }
button.secondary { border: 1px solid var(--ln); background: transparent; color: var(--ink); }
.rules { list-style: none; margin: 8px 0 0; padding: 0; font-size: 13px; color: var(--mu); }
.rules li::before { content: "○ "; }
.rules li.met { color: var(--ok); }
.rules li.met::before { content: "● "; }
@media (max-width: 480px) {
  body { align-items: flex-start; padding: 0; }
  .card { max-width: none; min-height: 100%; border-radius: 0; border-left: 0; border-right: 0; border-bottom: 0; padding: 36px 18px; }
  .brand img { height: 54px; }
}
@media (prefers-reduced-motion: no-preference) { .card { animation: rise .25s ease-out; } }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
