/* Automotive Europe portals: sign-in page. Same tokens as prototype/styles.css. */
:root {
  color-scheme: light;
  --clearcoat: #0a1929;
  --clearcoat-mid: #123048;
  --clearcoat-lift: #1b4368;
  --ink: #142231;
  --ink-2: #44525f;
  --ink-3: #5f6c79;
  --line: #e1e6ec;
  --line-2: #b9c4cf;
  --paper: #f4f6f9;
  --surface: #ffffff;
  --marque: #1c4e8f;
  --marque-hover: #163f75;
  --marque-soft: #e8f0fa;
  --accent: var(--marque);
  --bad: #b3261e;
  --bad-bg: #fbe7e5;
  --font: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}
.portal-admin { --accent: #5b3fa8; }

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
p { margin: 0; }

.auth {
  min-height: 100%;
  display: -webkit-box;
  display: flex;
}

/* Brand panel: dark, quiet linework, no imagery. */
.auth-brand {
  -webkit-box-flex: 0;
  flex: 0 0 42%;
  max-width: 560px;
  position: relative;
  overflow: hidden;
  color: #fff;
  background-color: var(--clearcoat);
  background-image:
    radial-gradient(120% 80% at 0% 100%, rgba(27, 67, 104, .9) 0%, rgba(27, 67, 104, 0) 60%),
    linear-gradient(160deg, var(--clearcoat) 0%, var(--clearcoat-mid) 100%);
  display: flex;
  align-items: flex-end;
  padding: 56px 48px;
}
.auth-brand::before {
  /* Fine sweeping lines, in the spirit of the mark's curves. */
  content: "";
  position: absolute;
  inset: 0;
  top: 0; right: 0; bottom: 0; left: 0;
  background-image: repeating-radial-gradient(circle at 120% -10%, rgba(255, 255, 255, 0) 0, rgba(255, 255, 255, 0) 22px, rgba(255, 255, 255, .045) 23px, rgba(255, 255, 255, 0) 24px);
  pointer-events: none;
}
.brand-inner { position: relative; max-width: 380px; }
.brand-eyebrow {
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #9fbbd8;
}
.brand-title {
  font-size: 34px;
  line-height: 1.15;
  font-weight: 650;
  letter-spacing: -0.015em;
  margin-top: 10px;
  padding-top: 18px;
  border-top: 3px solid var(--accent);
  display: inline-block;
}
.portal-admin .brand-title { border-top-color: #9c86de; }
.portal-dealer .brand-title { border-top-color: #5b8fd0; }
.brand-lede { margin-top: 14px; color: #c5d3e2; font-size: 15.5px; }

/* Form side */
.auth-main {
  -webkit-box-flex: 1;
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px 24px;
  background: var(--surface);
}
.auth-card { width: 100%; max-width: 380px; margin: auto 0; }
.auth-logo { display: block; width: 132px; height: auto; margin: 0 0 28px; }
h1 {
  margin: 0;
  font-size: 26px;
  line-height: 1.2;
  font-weight: 650;
  letter-spacing: -0.015em;
  overflow-wrap: break-word;
}
.auth-sub { margin-top: 6px; color: var(--ink-2); }

.auth-form { margin-top: 26px; }
.field + .field { margin-top: 18px; }
label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; }
input[type="text"], input[type="password"] {
  display: block;
  width: 100%;
  height: 46px;
  padding: 0 14px;
  font: inherit;
  font-size: 16px; /* 16px: iOS Safari does not zoom on focus */
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line-2);
  border-radius: 8px;
  -webkit-appearance: none;
  appearance: none;
  box-shadow: inset 0 1px 1px rgba(10, 25, 41, .04);
  transition: border-color .12s ease, box-shadow .12s ease;
}
input:hover { border-color: #8a98a6; }
input:focus { outline: none; }
input:focus-visible, input:focus {
  border-color: var(--marque);
  box-shadow: 0 0 0 3px rgba(28, 78, 143, .28);
}
input[aria-invalid="true"] { border-color: var(--bad); }
input[aria-invalid="true"]:focus { box-shadow: 0 0 0 3px rgba(179, 38, 30, .22); }

.btn-signin {
  display: block;
  width: 100%;
  margin-top: 26px;
  height: 48px;
  font: inherit;
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  background: var(--marque);
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  transition: background-color .12s ease;
}
.btn-signin:hover { background: var(--marque-hover); }
.btn-signin:focus { outline: none; }
.btn-signin:focus-visible { outline: 3px solid var(--marque); outline-offset: 3px; }
.btn-signin:active { background: #10305a; }

.msg {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-top: 20px;
  padding: 12px 14px;
  border-radius: 8px;
  font-size: 14.5px;
}
.msg p { min-width: 0; overflow-wrap: break-word; }
.msg-error { color: #7c1a15; background: var(--bad-bg); border: 1px solid #efc2bd; }
.msg-info { color: #163f75; background: var(--marque-soft); border: 1px solid #c8d9ee; }
.msg-icon {
  flex: 0 0 auto;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--bad);
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  line-height: 20px;
  text-align: center;
  margin-top: 1px;
}

.auth-note { margin-top: 22px; font-size: 13px; color: var(--ink-3); }
.auth-foot {
  margin-top: 32px;
  font-size: 12.5px;
  color: var(--ink-3);
  letter-spacing: .01em;
}

/* Tablet and phone: the brand panel becomes a slim band above the form. */
@media (max-width: 860px) {
  .auth { display: block; }
  .auth-brand { max-width: none; padding: 18px 20px; align-items: center; }
  .brand-inner { max-width: none; }
  .brand-eyebrow { font-size: 11.5px; }
  .brand-title { font-size: 17px; margin-top: 4px; padding-top: 0; border-top: 0; }
  .brand-lede { display: none; }
  body { background: var(--surface); }
  .auth-main { padding: 32px 16px 20px; justify-content: flex-start; }
  .auth-logo { width: 104px; margin-bottom: 22px; }
  h1 { font-size: 23px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
@media (forced-colors: active) {
  .btn-signin { border: 1px solid ButtonText; }
  input:focus { outline: 2px solid Highlight; }
}
