/* $Revision$ */
/*
  login.cgi stock stylesheet (src/css/login.css), reskinned 2026-11-13 (login.cgi Reskin).
  Matches the standard login page (Site Login Pages, index.html): USGN tokens, white card,
  labels above fields, navy Login + outlined Cancel, short footer.
  CSS only: no login.cgi markup changes. A site's own /vol1/<site>/css/login.css still wins.
  Hidden here: "Problems logging in?" and "Forgotten Password?" rows (.loginHelp), and the old
  footer rows (About / Legal / browser list, rule, support email + phone).
  Selectors with :has() fall back to the old look on browsers without :has() support.
*/
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap');

:root {
  --navy: #005898; --navy-700: #003D69; --navy-100: #E4EEF6; --blue: #0070B8;
  --gray-900: #17242F; --gray-800: #263640; --gray-700: #48575F; --gray-500: #7C8B93;
  --gray-300: #C6D0D6; --gray-200: #DEE6EA; --gray-100: #F2F6F8; --white: #FFFFFF;
  --error: #D14343;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

BODY {
  margin: 0;
  padding: 0 16px;
  text-align: center;
  background: var(--gray-100);
  color: var(--gray-800);
  font: 14px/20px var(--font);
}

/* ---- Card (login form, and the result / message pages) ---- */
.loginBody {
  display: block;
  box-sizing: border-box;
  width: 100%;
  max-width: 400px;
  margin: 32px auto 0;
  padding: 24px;
  text-align: left;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(23, 36, 47, .08);
}
.loginBody tbody, .loginBody tr, .loginBody td { display: block; }
.loginBody td { padding: 0; }
/* spacer cells (&nbsp;, no class) on the login form */
.loginBody td:not([class]) { display: none; }

.loginTitle {
  margin: 0 0 8px;
  font-size: 20px;
  line-height: 28px;
  font-weight: 700;
  color: var(--gray-900);
  text-align: left;
}

/* Labels above fields */
.loginLabel {
  margin: 16px 0 4px;
  font-size: 13px;
  line-height: 16px;
  font-weight: 600;
  color: var(--gray-800);
  text-align: left;
}
/* "Username :" / "Password :" -> "Username" / "Password" */
.loginBody tr:has(input[name="user"]) .loginLabel,
.loginBody tr:has(input[name="input_pass"]) .loginLabel { font-size: 0; }
.loginBody tr:has(input[name="user"]) .loginLabel::before { content: "Username"; font-size: 13px; }
.loginBody tr:has(input[name="input_pass"]) .loginLabel::before { content: "Password"; font-size: 13px; }

.loginValue { color: var(--gray-700); }
.loginValue input[name="user"],
.loginValue input[type="text"],
.loginValue input[type="password"] {
  display: block;
  box-sizing: border-box;
  width: 100%;
  margin: 0;
  padding: 10px 12px;
  border: 1.5px solid var(--gray-300);
  border-radius: 8px;
  background: var(--white);
  font: 14px/20px var(--font);
  color: var(--gray-900);
}
.loginValue input:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px var(--navy-100);
}
.loginValue br { display: none; }
#caps {
  display: block !important; /* overrides inline display:inline so the note sits under the field */
  margin: 4px 0 0;
  font-size: 12px;
  line-height: 1.4;
  font-weight: 700;
  color: var(--error) !important;
}
#caps:empty { margin: 0; }

/* ---- Buttons ---- */
.loginButtons {
  display: flex !important;
  gap: 8px;
  margin-top: 24px;
}
.loginButton {
  flex: 1 1 0;
  width: auto;
  margin: 0;
  padding: 11px 22px;
  border-radius: 8px;
  cursor: pointer;
  font: 600 14.5px/20px var(--font);
  -webkit-appearance: none;
  appearance: none;
  /* Login (first) = primary */
  background: var(--navy);
  border: 1.5px solid var(--navy);
  color: var(--white);
}
.loginButton:hover, .loginButton:focus { background: var(--navy-700); border-color: var(--navy-700); }
/* Cancel (second) = secondary */
.loginButton + .loginButton { background: transparent; color: var(--navy); }
.loginButton + .loginButton:hover,
.loginButton + .loginButton:focus { background: var(--navy-100); border-color: var(--navy); }
.loginButton:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--navy-100); }

/* ---- Hidden: Problems logging in? / Forgotten Password? ---- */
.loginHelp { display: none !important; }

/* ---- Links (result pages: "Back to login page") ---- */
.loginLink { color: var(--navy); font-weight: 600; text-decoration: none; }
.loginLink:hover { text-decoration: underline; }
.loginBody .loginValue[colspan] { text-align: center; }
.loginBody .loginTitle[colspan] { text-align: center; }

/* ---- Footer: keep "Powered by USGN" + copyright only ---- */
.loginFooter {
  width: 100%;
  margin: 16px auto 24px;
  padding: 0;
  border: 0;
  border-collapse: collapse;
  text-align: center;
  font-size: 12px;
  line-height: 16px;
  color: var(--gray-500);
}
.loginFooter td { padding: 0; }
/* stock footer only (the one with .loginPower); a site's own login_footer.htm is left alone */
.loginFooter:has(.loginPower) tr:first-child,
.loginFooter:has(.loginPower) tr:has(.loginLine),
.loginFooter:has(.loginPower) tr:last-child { display: none; }
.loginLine { border: 0; }
.loginPower {
  font-size: 12px;
  font-weight: 400;
  color: var(--navy);
  text-decoration: none;
}
.loginPower:hover { text-decoration: underline; }
