/* =========================================================
   Omama Login — Silva DS, Variação A (Split institucional)
   Tokens canônicos: tokens/colors.css, typography.css, etc.
   Source visual: brandbook_front.html + handoff Variation A.
   ========================================================= */

/* -----------------------------------------------------------
   Reset / page surface
   ----------------------------------------------------------- */
html, body { height: 100%; margin: 0; padding: 0; }
body.om-login-page {
  font-family: var(--font-body);
  color: var(--color-text-primary);
  background: var(--silva-offwhite);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body.om-login-page * { box-sizing: border-box; }

/* -----------------------------------------------------------
   Frame — split 1.05fr / 1fr, full viewport
   ----------------------------------------------------------- */
.om-login-frame {
  width: 100%;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  background: var(--silva-offwhite);
}

/* -----------------------------------------------------------
   Left pane — Marinho Noite, institutional voice
   ----------------------------------------------------------- */
.om-pane {
  background: var(--silva-navy);
  color: var(--silva-offwhite);
  padding: 48px 56px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}
.om-pane::after {
  content: '';
  position: absolute;
  right: 0; top: 0; bottom: 0;
  width: 1px;
  background: rgba(247, 245, 241, 0.07);
}

.om-pane-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.om-pane-silva-logo img {
  height: 22px;
  display: block;
}
.om-pane-tag {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(247, 245, 241, 0.55);
}

.om-pane-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  margin-top: 40px;
  max-width: 560px;
}
.om-pane-eyebrow {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--silva-green-30);
  margin: 0 0 22px;
}
.om-pane-title {
  font-family: var(--font-heading);
  font-size: 56px;
  line-height: 1.05;
  letter-spacing: -0.015em;
  font-weight: 700;
  color: var(--silva-offwhite);
  margin: 0 0 22px;
  max-width: 520px;
}
.om-pane-lede {
  font-size: 17px;
  line-height: 1.55;
  color: rgba(247, 245, 241, 0.78);
  margin: 0;
  max-width: 460px;
}

.om-pane-foot {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 11px;
  color: rgba(247, 245, 241, 0.55);
  margin-top: auto;
}
.om-pane-foot .om-status-pulse {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--silva-green-30);
  position: relative;
}
.om-pane-foot .om-status-pulse::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  border: 1.5px solid rgba(168, 205, 182, 0.35);
}
.om-pane-foot .om-version {
  margin-left: auto;
  font-family: var(--font-mono);
  letter-spacing: 0.05em;
}

/* -----------------------------------------------------------
   Right column — form on offwhite
   ----------------------------------------------------------- */
.om-form-col {
  background: var(--silva-offwhite);
  display: flex;
  flex-direction: column;
  padding: 48px 56px;
}

.om-form-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: var(--color-text-secondary);
}
.om-form-top .om-form-top-id {
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
}
.om-form-top a {
  color: var(--silva-green);
  text-decoration: none;
  font-weight: 600;
}
.om-form-top a:hover { text-decoration: underline; }

.om-form-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 100%;
  max-width: 440px;
  margin: 0 auto;
}

.om-brand-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}
.om-brand-row img.om-silva-mark {
  height: 56px;
  width: auto;
  display: block;
}
.om-brand-row .om-brand-divider {
  width: 1px;
  height: 40px;
  background: rgba(13, 27, 42, 0.25);
  display: inline-block;
}
.om-brand-row .om-wordmark {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 48px;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--color-text-primary);
}

.om-form-sub {
  font-size: 15px;
  color: var(--color-text-secondary);
  margin: 0 0 32px;
  line-height: 1.55;
}

/* -----------------------------------------------------------
   Field primitives
   ----------------------------------------------------------- */
.om-form { display: flex; flex-direction: column; gap: 18px; }

.om-field { display: flex; flex-direction: column; gap: 6px; }
.om-field-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.om-field-label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-secondary);
}
.om-field-row .om-link {
  font-size: 11px;
  color: var(--silva-green);
  text-decoration: none;
  font-weight: 600;
}
.om-field-row .om-link:hover {
  color: var(--silva-green-light);
  text-decoration: underline;
}

.om-input {
  appearance: none;
  width: 100%;
  height: 44px;
  padding: 0 14px;
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--color-text-primary);
  background: #ffffff;
  border: var(--stroke-thin) solid var(--color-border);
  border-radius: var(--radius-md);
  outline: none;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}
.om-input::placeholder { color: var(--color-text-tertiary); }
.om-input:hover { border-color: rgba(13, 27, 42, 0.25); }
.om-input:focus {
  border-color: var(--silva-green);
  box-shadow: 0 0 0 3px rgba(30, 91, 58, 0.18);
}
.om-input.has-error {
  border-color: var(--silva-terracotta);
}
.om-input.has-error:focus {
  box-shadow: 0 0 0 3px rgba(193, 96, 15, 0.18);
}

.om-input-affix { position: relative; }
.om-input-affix .om-input { padding-right: 44px; }
.om-input-affix .om-affix-btn {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  height: 32px;
  width: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 0;
  cursor: pointer;
  color: var(--color-text-secondary);
  border-radius: 6px;
}
.om-input-affix .om-affix-btn:hover {
  color: var(--color-text-primary);
  background: var(--silva-green-10);
}
.om-input-affix .om-affix-btn:focus-visible {
  outline: 2px solid var(--silva-green);
  outline-offset: 2px;
}

/* Field-level error message */
.om-field-error {
  font-size: 11px;
  color: var(--silva-terracotta);
  margin: 2px 0 0;
}

/* -----------------------------------------------------------
   Checkbox (Manter-me conectado)
   ----------------------------------------------------------- */
.om-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--color-text-primary);
  cursor: pointer;
  user-select: none;
  margin-top: 4px;
}
.om-checkbox input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.om-checkbox .om-check-box {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  border: var(--stroke-medium) solid rgba(13, 27, 42, 0.25);
  background: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 150ms ease, border-color 150ms ease;
}
.om-checkbox input:checked + .om-check-box {
  background: var(--silva-green);
  border-color: var(--silva-green);
}
.om-checkbox input:checked + .om-check-box::after {
  content: '';
  width: 10px;
  height: 6px;
  border-left: 2px solid #ffffff;
  border-bottom: 2px solid #ffffff;
  transform: rotate(-45deg) translate(1px, -1px);
}
.om-checkbox input:focus-visible + .om-check-box {
  box-shadow: 0 0 0 3px rgba(30, 91, 58, 0.18);
}

/* -----------------------------------------------------------
   Buttons
   ----------------------------------------------------------- */
.om-form-actions {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.om-btn {
  appearance: none;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 700;
  height: 48px;
  padding: 0 22px;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition:
    background 150ms ease,
    color 150ms ease,
    border-color 150ms ease,
    transform 80ms ease;
  border: var(--stroke-thin) solid transparent;
  letter-spacing: 0;
  text-decoration: none;
  width: 100%;
}
.om-btn-primary {
  background: var(--silva-green);
  color: var(--silva-offwhite);
}
.om-btn-primary:hover { background: var(--silva-green-light); }
.om-btn-primary:active { background: var(--silva-green-dark); transform: translateY(1px); }
.om-btn-primary:focus-visible { box-shadow: 0 0 0 3px rgba(30, 91, 58, 0.18); }

.om-btn-secondary {
  background: #ffffff;
  color: var(--color-text-primary);
  border-color: rgba(13, 27, 42, 0.25);
}
.om-btn-secondary:hover {
  background: var(--silva-green-10);
  border-color: var(--silva-green);
}
.om-btn-secondary:focus-visible {
  box-shadow: 0 0 0 3px rgba(30, 91, 58, 0.18);
}

/* Divider with label */
.om-divider {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--color-text-tertiary);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.om-divider::before,
.om-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--color-border);
}

/* Help / inline error block */
.om-help {
  margin-top: 26px;
  font-size: 11px;
  color: var(--color-text-secondary);
  line-height: 1.55;
}
.om-help a {
  color: var(--silva-green);
  font-weight: 600;
  text-decoration: none;
}
.om-help a:hover { text-decoration: underline; }

.om-error-banner {
  margin-bottom: 18px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: #fbece1;
  border: var(--stroke-thin) solid rgba(193, 96, 15, 0.35);
  color: #5a2d07;
  font-size: 13px;
  line-height: 1.5;
}
.om-error-banner strong { color: var(--silva-terracotta); }

/* -----------------------------------------------------------
   Footer (right column)
   ----------------------------------------------------------- */
.om-form-foot {
  margin-top: auto;
  padding-top: 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: var(--color-text-tertiary);
  letter-spacing: 0.02em;
}
.om-form-foot .om-foot-links {
  display: flex;
  gap: 18px;
}
.om-form-foot a {
  color: var(--color-text-secondary);
  text-decoration: none;
}
.om-form-foot a:hover { color: var(--silva-green); }

/* -----------------------------------------------------------
   Google icon (inline svg)
   ----------------------------------------------------------- */
.om-google-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* -----------------------------------------------------------
   Responsive — collapse into single column under 960px
   ----------------------------------------------------------- */
@media (max-width: 960px) {
  .om-login-frame {
    grid-template-columns: 1fr;
  }
  .om-pane {
    padding: 32px 28px;
    min-height: 320px;
  }
  .om-pane-body { margin-top: 24px; }
  .om-pane-title { font-size: 36px; }
  .om-pane-lede { font-size: 15px; }
  .om-form-col { padding: 32px 28px 40px; }
  .om-brand-row img.om-silva-mark { height: 44px; }
  .om-brand-row .om-brand-divider { height: 32px; }
  .om-brand-row .om-wordmark { font-size: 36px; }
}

@media (max-width: 480px) {
  .om-pane { padding: 24px 20px; }
  .om-form-col { padding: 24px 20px 32px; }
  .om-form-foot {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
}
