/* Pagina di accesso (login.html) di gesacom.it e orderentry.it: stesso file nei due siti,
   il colore del marchio cambia con la classe del body (auth-gesacom / auth-oe). */
:root {
  --accent: #b10456;
  --accent-2: #ac3f6c;
  --accent-soft: #fff7fb;
  --brand-bg: linear-gradient(145deg, #27272f 0%, #3a1528 55%, #b10456 130%);
  --ink: #27272f;
  --muted: #64748b;
  --line: #e5e7eb;
  --bg: #f4f5f8;
  --card: #ffffff;
  --err: #b91c1c;
  --err-soft: #fee2e2;
  --ok: #15803d;
  --ok-soft: #dcfce7;
}
body.auth-oe {
  --accent: #283a6a;
  --accent-2: #00aeef;
  --accent-soft: #eef7fc;
  --brand-bg: linear-gradient(145deg, #1b2442 0%, #283a6a 55%, #00aeef 140%);
}
@media (prefers-color-scheme: dark) {
  :root { --ink: #e7e7ea; --muted: #a1a1aa; --line: #34343c; --bg: #18181c; --card: #222228; --accent-soft: #2a1520; --err-soft: #3b1414; --ok-soft: #12321f; }
  body.auth-oe { --accent-soft: #14233a; }
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body.auth { font-family: Montserrat, Arial, sans-serif; background: var(--bg); color: var(--ink); }
.auth a { color: var(--accent); }
body.auth-oe a { color: #0b7fb4; }

.auth-wrap { min-height: 100vh; display: grid; grid-template-columns: minmax(320px, 1fr) minmax(360px, 520px); }

/* pannello del marchio */
.auth-brand { background: var(--brand-bg); color: #fff; padding: 48px 56px; display: flex; flex-direction: column; }
.auth-brand .logo { height: 44px; width: auto; align-self: flex-start; cursor: pointer; }
.auth-brand h2 { font-size: 32px; line-height: 1.2; margin: auto 0 14px; font-weight: 800; max-width: 460px; }
.auth-brand p { color: rgba(255, 255, 255, .8); max-width: 440px; margin: 0 0 26px; line-height: 1.5; }
.auth-brand ul { list-style: none; padding: 0; margin: 0 0 auto; display: grid; gap: 12px; max-width: 440px; }
.auth-brand li { display: flex; gap: 12px; align-items: flex-start; color: rgba(255, 255, 255, .92); }
.auth-brand li i { width: 22px; margin-top: 2px; color: #fff; opacity: .9; }
.auth-brand .legal { margin-top: 32px; font-size: 12px; color: rgba(255, 255, 255, .6); }
.auth-brand .legal a { color: rgba(255, 255, 255, .8); }

/* riquadro di accesso */
.auth-main { display: flex; align-items: center; justify-content: center; padding: 32px 24px; }
.auth-card { width: 100%; max-width: 420px; background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  box-shadow: 0 10px 30px rgba(16, 24, 40, .08); padding: 32px 30px 26px; }
.auth-card .logo-mobile { display: none; height: 40px; margin: 0 auto 18px; }
.auth-card h1 { font-size: 24px; font-weight: 800; margin: 0 0 6px; }
.auth-card .sub { color: var(--muted); margin: 0 0 22px; font-size: 14px; }
.auth-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.auth-field label { font-size: 12.5px; font-weight: 700; color: var(--muted); }
.auth-field input {
  width: 100%; padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px; font: inherit; font-size: 15px;
  background: var(--card); color: var(--ink);
}
.auth-field input:focus { outline: 2px solid var(--accent-2); outline-offset: 0; border-color: transparent; }
.auth-pass { position: relative; }
.auth-pass input { padding-right: 44px; }
.auth-pass button {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%); background: none; border: 0; padding: 8px;
  color: var(--muted); cursor: pointer; font-size: 15px;
}
.auth-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: 4px 0 18px; font-size: 13.5px; }
.auth-row label { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; color: var(--ink); }
.auth-row input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--accent); }
.auth-submit {
  width: 100%; padding: 12px 16px; border: 0; border-radius: 10px; background: var(--accent); color: #fff;
  font: inherit; font-weight: 800; font-size: 15px; letter-spacing: .3px; cursor: pointer; transition: filter .15s;
}
.auth-submit:hover { filter: brightness(1.1); }
.auth-submit:disabled { opacity: .55; cursor: not-allowed; filter: none; }
.auth-msg:empty { display: none; }
.auth-msg { border-radius: 8px; padding: 9px 12px; margin-bottom: 14px; font-size: 13.5px; }
#loginMessage.auth-msg { background: var(--err-soft); color: var(--err); }
#loginMessagesuces.auth-msg { background: var(--ok-soft); color: var(--ok); }
.auth-foot { text-align: center; margin-top: 20px; font-size: 14px; color: var(--muted); }
.auth-foot p { margin: 6px 0; }

/* pulsanti social dentro il riquadro (js/social-login.js) */
.auth-card #social-login { max-width: none; margin: 18px 0 0; }

@media (max-width: 860px) {
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-brand { display: none; }
  .auth-card .logo-mobile { display: block; }
  .auth-main { padding: 24px 16px; align-items: flex-start; }
}

/* ---------------------------------------------------------- registrazione (newUser.html) */
.auth-card form input[type=email], .auth-card form input[type=text]:not([tabindex="-1"]):not([name=website]) {
  width: 100%; padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px; font: inherit; font-size: 15px;
  background: var(--card); color: var(--ink); margin: 0;
}
.auth-card form input:focus { outline: 2px solid var(--accent-2); outline-offset: 0; border-color: transparent; }
.auth-card form br { display: none; }
/* campo anti-robot: non deve mai essere visibile */
.website-check { position: absolute !important; left: -10000px !important; width: 1px !important; height: 1px !important; overflow: hidden !important; }

/* codice di sicurezza: gesacom.it (.captcha-box) e orderentry.it (.captcha-panel) */
.captcha-box, .captcha-panel { background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 14px; margin: 4px 0 16px; display: grid; gap: 10px; }
.captcha-box > label { font-size: 12.5px; font-weight: 700; color: var(--muted); }
.captcha-row, .captcha-image-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.captcha-image-container img, .captcha-image-row img {
  display: block; width: 170px; height: 52px; object-fit: contain; background: #fff; border: 1px solid var(--line); border-radius: 8px;
}
.captcha-refresh-button, .captcha-refresh {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; padding: 0 12px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--card); color: var(--ink); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
}
.captcha-refresh-button { width: 44px; padding: 0; }
.captcha-refresh-button:hover, .captcha-refresh:hover { border-color: var(--accent-2); }
.captcha-refresh-button svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.captcha-box input[name=captchaAnswer], .captcha-panel input[name=captchaAnswer] {
  width: 100%; padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px; font: inherit; font-size: 15px;
  letter-spacing: 2px; text-transform: uppercase; background: var(--card); color: var(--ink);
}
.captcha-message { margin: 0; font-size: 12.5px; color: var(--muted); }
.captcha-message-error { color: var(--err); }
.auth-card form .auth-submit { margin-top: 4px; }
.auth-note { font-size: 12px; color: var(--muted); margin: 12px 0 0; line-height: 1.45; }
