/* ==========================================================================
   O'Hara & Harrison ERP — Material 3 login skin
   Additive override stylesheet. Load LAST, after all theme CSS.
   Scope: login page only (.oh-login / body.oh-login-page).
   Safe to remove to revert to the stock theme login.
   ========================================================================== */

:root {
  --oh-red: #ed1c24;
  --oh-red-dark: #c8151c;
  --oh-red-deep: #a01016;
  --oh-ink: #212121;
  --oh-grey: #5f5f5f;
  --oh-charcoal: #3f3f3f;
  --oh-charcoal-2: #4a4a4a;
  --oh-charcoal-deep: #2b2b2b;
  --oh-line: #d9d9dc;
  --oh-bg: #f4f4f5;
  --oh-radius-card: 24px;
  --oh-radius-field: 10px;
}

/* ---- Scoped resets (theme normally provides these; kept local so the
   stylesheet works standalone too) ---------------------------------------- */
.oh-login, .oh-login *, .oh-login *::before, .oh-login *::after { box-sizing: border-box; }
.oh-login fieldset { min-width: 0; }

/* ---- Neutralise theme chrome on the login page only (PHP page) ---------- */
body.oh-login-page { background: var(--oh-bg) !important; }
body.oh-login-page .app-content,
body.oh-login-page .content-wrapper,
body.oh-login-page .content-body { padding: 0 !important; margin: 0 !important; }
body.oh-login-page .content-header { display: none !important; }

/* ---- Shell --------------------------------------------------------------- */
.oh-login {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr);
  min-height: 100vh;
  width: 100%;
  margin: 0;
  background: var(--oh-bg);
  font-family: 'Open Sans', 'Segoe UI', Helvetica, Arial, sans-serif;
  color: var(--oh-ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
.oh-login a { color: var(--oh-red-dark); text-decoration: none; }
.oh-login a:hover { color: var(--oh-red); text-decoration: underline; }
.oh-login a:focus-visible,
.oh-login input:focus-visible,
.oh-login button:focus-visible {
  outline: 3px solid rgba(237, 28, 36, 0.35);
  outline-offset: 2px;
}

/* ==========================================================================
   LEFT — brand panel
   ========================================================================== */
.oh-brand {
  position: relative;
  overflow: hidden;
  color: #ffffff;
  background: linear-gradient(160deg, #474747 0%, #383838 52%, var(--oh-charcoal-deep) 100%);
  display: flex;
  align-items: center;
}
/* subtle industrial grid, CSS only */
.oh-brand::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(130% 100% at 18% 8%, #000 25%, transparent 78%);
  mask-image: radial-gradient(130% 100% at 18% 8%, #000 25%, transparent 78%);
  pointer-events: none;
}
/* red accent line, echoing the website's red headings */
.oh-brand::after {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: var(--oh-red);
}
.oh-brand-content {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 620px;
  margin: 0 auto;
  padding: 72px 64px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.oh-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.72);
}
.oh-eyebrow::before {
  content: "";
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--oh-red);
  box-shadow: 0 0 0 4px rgba(237, 28, 36, 0.22);
}
.oh-brand-title {
  margin: 0;
  font-size: 44px;
  line-height: 1.12;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: #ffffff;
}
.oh-brand-title .oh-erp { color: var(--oh-red); }
.oh-redline {
  width: 64px; height: 4px;
  border-radius: 2px;
  background: var(--oh-red);
  margin: -8px 0;
}
.oh-brand-sub {
  margin: 0;
  max-width: 46ch;
  font-size: 16.5px;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.82);
  text-wrap: pretty;
}

/* service chips — dark cards, white uppercase text, red circular arrow */
.oh-chips {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 6px;
}
.oh-chip {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 16px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(255, 255, 255, 0.11);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #ffffff;
  transition: border-color 160ms ease, background-color 160ms ease, transform 160ms ease;
}
.oh-chip:hover {
  border-color: rgba(237, 28, 36, 0.65);
  background: rgba(237, 28, 36, 0.08);
  transform: translateY(-1px);
}
.oh-chip-arrow {
  flex: 0 0 auto;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--oh-red);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  line-height: 1;
  letter-spacing: 0;
}

/* trust / status items */
.oh-trust {
  list-style: none;
  margin: 4px 0 0;
  padding: 18px 0 0;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 24px;
}
.oh-trust li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13.5px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
}
.oh-trust li::before {
  content: "";
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--oh-red);
  flex: 0 0 auto;
}
.oh-brand-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin-top: 8px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.55);
}
.oh-brand-foot a { color: rgba(255, 255, 255, 0.75); }
.oh-brand-foot a:hover { color: #ffffff; }

/* ==========================================================================
   RIGHT — login card
   ========================================================================== */
.oh-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 22px;
  padding: 48px 32px;
  background: var(--oh-bg);
}
.oh-card {
  width: 100%;
  max-width: 448px;
  background: #ffffff;
  border: 1px solid var(--oh-line);
  border-radius: var(--oh-radius-card);
  box-shadow: 0 1px 2px rgba(33, 33, 33, 0.05), 0 16px 48px rgba(33, 33, 33, 0.10);
  padding: 44px 44px 32px;
}
.oh-logo {
  display: block;
  max-width: 240px;
  max-height: 56px;
  width: auto;
  height: auto;
  margin: 0 auto 26px;
}
.oh-title {
  margin: 0 0 6px;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--oh-ink);
}
.oh-subtitle {
  margin: 0 0 30px;
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--oh-grey);
}

/* ---- Material 3 outlined text fields ------------------------------------ */
.oh-login .oh-field { margin: 0 0 20px; padding: 0; border: 0; }
.oh-login .oh-field .controls { position: relative; }
.oh-login .oh-field input.form-control {
  display: block;
  width: 100%;
  height: 56px;
  padding: 16px 16px 0;
  font-size: 15.5px;
  font-family: inherit;
  color: var(--oh-ink);
  background: #ffffff !important;
  border: 1px solid #8a8a8f !important;
  border-radius: var(--oh-radius-field) !important;
  box-shadow: none !important;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}
.oh-login .oh-field input.form-control:hover { border-color: var(--oh-charcoal) !important; }
.oh-login .oh-field input.form-control:focus {
  border-color: var(--oh-red) !important;
  box-shadow: inset 0 0 0 1px var(--oh-red) !important;
  outline: none;
}
.oh-login .oh-field .oh-float {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  padding: 0 5px;
  margin: 0;
  background: #ffffff;
  color: var(--oh-grey);
  font-size: 15px;
  font-weight: 400;
  line-height: 1;
  pointer-events: none;
  transition: top 140ms ease, font-size 140ms ease, color 140ms ease, transform 140ms ease;
}
.oh-login .oh-field input.form-control:focus + .oh-float,
.oh-login .oh-field input.form-control:not(:placeholder-shown) + .oh-float {
  top: 0;
  transform: translateY(-50%);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.oh-login .oh-field input.form-control:focus + .oh-float { color: var(--oh-red-dark); }
/* validation messages injected by jqBootstrapValidation */
.oh-login .oh-field .help-block,
.oh-login .oh-field .help-block ul,
.oh-login .oh-field .help-block li {
  list-style: none;
  margin: 6px 0 0;
  padding: 0;
  font-size: 12.5px;
  color: var(--oh-red-dark);
}
.oh-login .oh-field.error input.form-control,
.oh-login .oh-field .controls.error input.form-control {
  border-color: var(--oh-red-dark) !important;
}

/* ---- remember me / forgot password row ---------------------------------- */
.oh-row-remember {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin: 2px 0 24px;
}
.oh-row-remember > div { padding: 0; flex: 0 0 auto; width: auto; }
.oh-remember { margin: 0; padding: 0; border: 0; display: flex; align-items: center; gap: 9px; }
.oh-remember input[type="checkbox"] {
  width: 18px; height: 18px;
  accent-color: var(--oh-red);
  margin: 0;
}
.oh-remember label {
  margin: 0;
  white-space: nowrap;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--oh-ink);
  cursor: pointer;
}
.oh-login .oh-link {
  white-space: nowrap;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--oh-red-dark);
}

/* ---- primary button (overrides theme .btn-info) -------------------------- */
.oh-login .btn.oh-btn,
.oh-login .btn.oh-btn.btn-info {
  display: block;
  width: 100%;
  height: 52px;
  border: none !important;
  border-radius: 12px !important;
  background: var(--oh-red) !important;
  background-image: none !important;
  color: #ffffff !important;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  box-shadow: 0 2px 6px rgba(237, 28, 36, 0.30);
  transition: background-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
  cursor: pointer;
}
.oh-login .btn.oh-btn:hover {
  background: var(--oh-red-dark) !important;
  box-shadow: 0 6px 16px rgba(200, 21, 28, 0.35);
  transform: translateY(-1px);
}
.oh-login .btn.oh-btn:active {
  background: var(--oh-red-deep) !important;
  box-shadow: 0 1px 3px rgba(160, 16, 22, 0.4);
  transform: translateY(0);
}
.oh-login .btn.oh-btn:focus-visible {
  outline: 3px solid rgba(237, 28, 36, 0.35);
  outline-offset: 2px;
}

/* ---- flash / server messages --------------------------------------------- */
.oh-flash { margin-top: 18px; }
.oh-flash, .oh-flash .alert {
  border-radius: 12px;
  font-size: 13.5px;
}
.oh-flash .alert {
  margin: 0;
  padding: 12px 16px;
  background: #fdeaea;
  color: #8c1116;
  border: 1px solid rgba(237, 28, 36, 0.25);
}

/* ---- card + panel footers ------------------------------------------------ */
.oh-authorised {
  margin: 26px 0 0;
  padding-top: 18px;
  border-top: 1px solid #ececee;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--oh-grey);
}
.oh-panel-foot {
  margin: 0;
  max-width: 448px;
  text-align: center;
  font-size: 12.5px;
  line-height: 1.7;
  color: #7a7a7f;
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1024px) {
  .oh-login { grid-template-columns: 1fr; min-height: 100vh; }
  .oh-brand { align-items: flex-start; }
  .oh-brand-content { padding: 48px 36px; gap: 20px; max-width: 640px; }
  .oh-brand-title { font-size: 32px; }
  .oh-brand-sub { font-size: 15px; }
  .oh-trust { display: none; }
  .oh-brand-foot { display: none; }
  .oh-panel { padding: 40px 24px 56px; }
}
@media (max-width: 560px) {
  .oh-brand-content { padding: 36px 22px; gap: 16px; }
  .oh-brand-title { font-size: 26px; }
  .oh-chips { grid-template-columns: 1fr 1fr; gap: 8px; }
  .oh-chip { padding: 10px 12px; font-size: 10.5px; letter-spacing: 0.08em; gap: 8px; }
  .oh-chip-arrow { width: 18px; height: 18px; font-size: 10px; }
  .oh-card { padding: 30px 22px 24px; border-radius: 20px; }
  .oh-title { font-size: 24px; }
  .oh-panel { padding: 28px 16px 44px; }
}

/* ============ Post-review hardening (2026-07-08 verification pass) ============ */
/* Controller-injected alert carries theme classes with !important bg — force skin colours */
.oh-flash .alert[class*="bg-"] { background-color: #fdeaea !important; color: #8c1116; }
.oh-flash .alert.alert-icon-left { border-left-width: 1px !important; padding-left: 16px; }
.oh-flash .alert .alert-icon { display: none; }
.oh-flash .alert.alert-dismissible { padding-right: 44px; }

/* iCheck skin sprites are absent repo-wide (pre-existing) — style the wrapper so the
   remember-me checkbox is actually visible; iCheck toggles .hover/.checked classes */
.oh-remember .icheckbox_square-blue { width: 18px; height: 18px; display: inline-block; vertical-align: middle; position: relative; border: 1.5px solid #8a8a8f; border-radius: 4px; background: #fff; cursor: pointer; transition: background .12s, border-color .12s; }
.oh-remember .icheckbox_square-blue.hover { border-color: var(--oh-red); }
.oh-remember .icheckbox_square-blue.checked { background: var(--oh-red); border-color: var(--oh-red); }
.oh-remember .icheckbox_square-blue.checked::after { content: ""; position: absolute; left: 5px; top: 1px; width: 5px; height: 10px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }

@media (prefers-reduced-motion: reduce) {
  .oh-login *, .oh-login *::before, .oh-login *::after { transition: none !important; animation: none !important; }
}
