/* THE-ABC.RO V18.23 — Portal Auth Mobile Truth Lock
   Scope: auth portal pages only. Keeps flow pages untouched. */
html,
body {
  max-width: 100% !important;
  overflow-x: hidden !important;
}

body.auth-shell-page,
body.auth-panel-page,
body[data-page="auth_login"],
body[data-page="auth_notice"] {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  overflow-x: hidden !important;
  background: var(--abc-page-bg, #f5f6f8) !important;
}

body.auth-shell-page::before,
body.auth-shell-page::after,
body.auth-panel-page::before,
body.auth-panel-page::after,
body[data-page="auth_login"]::before,
body[data-page="auth_login"]::after,
body[data-page="auth_notice"]::before,
body[data-page="auth_notice"]::after {
  display: none !important;
  content: none !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

body.auth-shell-page .page-shell,
body.auth-panel-page .page-shell,
body[data-page="auth_login"] .page-shell,
body[data-page="auth_notice"] .page-shell,
body.auth-shell-page .compact-auth-page,
body.auth-panel-page .compact-auth-page,
body.auth-shell-page .abc-portal-auth-page-shell-v18-22,
body.auth-panel-page .abc-portal-auth-page-shell-v18-22 {
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding-left: clamp(10px, 2.4vw, 28px) !important;
  padding-right: clamp(10px, 2.4vw, 28px) !important;
  box-sizing: border-box !important;
  overflow-x: hidden !important;
  border: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
}

body.auth-shell-page .abc-auth-stack-v18-22,
body.auth-panel-page .abc-auth-stack-v18-22,
body[data-page="auth_login"] main,
body[data-page="auth_notice"] main {
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
  display: grid !important;
  place-items: center !important;
  align-content: center !important;
  padding: clamp(8px, 2vh, 18px) 0 !important;
  overflow-x: hidden !important;
}

body.auth-shell-page .auth-content-panel,
body.auth-panel-page .auth-content-panel,
body.auth-shell-page .auth-shell-content-panel,
body.auth-panel-page .auth-shell-content-panel,
body.auth-shell-page .abc-auth-content-panel-v18-22,
body.auth-panel-page .abc-auth-content-panel-v18-22 {
  width: min(100%, 920px) !important;
  max-width: 920px !important;
  min-width: 0 !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding: clamp(10px, 1.8vw, 18px) !important;
  box-sizing: border-box !important;
  overflow: visible !important;
  border-width: 1px !important;
  border-style: solid !important;
  border-color: rgba(255, 255, 255, .78) !important;
  border-radius: 18px !important;
  background: rgba(255, 255, 255, .72) !important;
  box-shadow: 0 18px 40px rgba(15, 23, 42, .08) !important;
}

body.auth-shell-page .auth-card,
body.auth-panel-page .auth-card,
body.auth-shell-page .auth-panel-card,
body.auth-panel-page .auth-panel-card,
body.auth-shell-page .auth-dashboard-shell,
body.auth-panel-page .auth-dashboard-shell {
  width: min(100%, 640px) !important;
  max-width: 640px !important;
  min-width: 0 !important;
  margin: 0 auto !important;
  padding: clamp(14px, 2.2vw, 22px) !important;
  box-sizing: border-box !important;
  border-width: 1px !important;
  border-style: solid !important;
  border-radius: 16px !important;
  background: rgba(255, 255, 255, .96) !important;
  box-shadow: 0 14px 34px rgba(15, 23, 42, .10) !important;
  outline: 0 !important;
  overflow: hidden !important;
}

body.auth-panel-family-client .auth-card,
body.auth-panel-family-client .auth-panel-card,
body[data-auth-role="client"] .auth-card,
body[data-auth-role="client"] .auth-panel-card {
  border-color: rgba(245, 158, 11, .45) !important;
}
body.auth-panel-family-partner .auth-card,
body.auth-panel-family-partner .auth-panel-card,
body[data-auth-role="partner"] .auth-card,
body[data-auth-role="partner"] .auth-panel-card {
  border-color: rgba(124, 58, 237, .42) !important;
}
body.auth-panel-family-admin .auth-card,
body.auth-panel-family-admin .auth-panel-card,
body[data-auth-role="admin"] .auth-card,
body[data-auth-role="admin"] .auth-panel-card {
  border-color: rgba(22, 163, 74, .42) !important;
}

body.auth-shell-page .auth-dashboard-panel__heading,
body.auth-panel-page .auth-dashboard-panel__heading,
body.auth-shell-page .auth-dashboard-heading,
body.auth-panel-page .auth-dashboard-heading,
body.auth-shell-page .auth-dashboard-heading-inner,
body.auth-panel-page .auth-dashboard-heading-inner {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  margin: 0 0 10px 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  outline: 0 !important;
}

body.auth-shell-page .auth-dashboard-panel__title,
body.auth-panel-page .auth-dashboard-panel__title,
body.auth-shell-page h1,
body.auth-panel-page h1 {
  font-size: clamp(1.18rem, 4.7vw, 1.68rem) !important;
  line-height: 1.08 !important;
  margin: 4px 0 10px !important;
  letter-spacing: -.03em !important;
  color: #0f172a !important;
  text-wrap: balance;
}

body.auth-shell-page .auth-panel-badge,
body.auth-panel-page .auth-panel-badge {
  display: inline-flex !important;
  align-items: center !important;
  max-width: 100% !important;
  min-width: 0 !important;
  padding: 4px 8px !important;
  border-radius: 999px !important;
  font-size: .74rem !important;
  line-height: 1 !important;
  font-weight: 700 !important;
  border: 1px solid rgba(15, 23, 42, .10) !important;
  background: rgba(255, 255, 255, .78) !important;
  color: #334155 !important;
}

body.auth-shell-page .auth-form,
body.auth-panel-page .auth-form,
body.auth-shell-page .auth-actions,
body.auth-panel-page .auth-actions,
body.auth-shell-page .client-form-field,
body.auth-panel-page .client-form-field {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
}

body.auth-shell-page input,
body.auth-panel-page input,
body.auth-shell-page button,
body.auth-panel-page button,
body.auth-shell-page .button,
body.auth-panel-page .button {
  max-width: 100% !important;
  box-sizing: border-box !important;
}

/* Red legacy frame killer: auth pages must never inherit emergency/debug red shells. */
body.auth-shell-page .page-shell,
body.auth-shell-page .compact-auth-page,
body.auth-shell-page .auth-content-panel,
body.auth-shell-page .auth-dashboard-panel__heading,
body.auth-shell-page .auth-dashboard-heading,
body.auth-shell-page .auth-dashboard-heading-inner,
body.auth-panel-page .page-shell,
body.auth-panel-page .compact-auth-page,
body.auth-panel-page .auth-content-panel,
body.auth-panel-page .auth-dashboard-panel__heading,
body.auth-panel-page .auth-dashboard-heading,
body.auth-panel-page .auth-dashboard-heading-inner {
  border-color: rgba(255, 255, 255, .78) !important;
  outline-color: transparent !important;
}

@media (max-width: 430px) {
  html,
  body.auth-shell-page,
  body.auth-panel-page,
  body[data-page="auth_login"],
  body[data-page="auth_notice"] {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    overflow: hidden !important;
    min-height: 100svh !important;
  }

  body.auth-shell-page .page-shell,
  body.auth-panel-page .page-shell,
  body[data-page="auth_login"] .page-shell,
  body[data-page="auth_notice"] .page-shell {
    height: 100svh !important;
    min-height: 100svh !important;
    display: flex !important;
    flex-direction: column !important;
    padding-left: 8px !important;
    padding-right: 8px !important;
    gap: 6px !important;
  }

  body.auth-shell-page header,
  body.auth-panel-page header,
  body.auth-shell-page footer,
  body.auth-panel-page footer,
  body.auth-shell-page .site-footer,
  body.auth-panel-page .site-footer {
    flex: 0 0 auto !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }

  body.auth-shell-page .abc-auth-stack-v18-22,
  body.auth-panel-page .abc-auth-stack-v18-22,
  body[data-page="auth_login"] main,
  body[data-page="auth_notice"] main {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    align-content: start !important;
    place-items: start stretch !important;
    padding: 6px 0 !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch !important;
  }

  body.auth-shell-page .auth-content-panel,
  body.auth-panel-page .auth-content-panel,
  body.auth-shell-page .abc-auth-content-panel-v18-22,
  body.auth-panel-page .abc-auth-content-panel-v18-22 {
    width: 100% !important;
    max-width: 100% !important;
    padding: 8px !important;
    border-radius: 14px !important;
    box-shadow: none !important;
  }

  body.auth-shell-page .auth-card,
  body.auth-panel-page .auth-card,
  body.auth-shell-page .auth-panel-card,
  body.auth-panel-page .auth-panel-card {
    width: 100% !important;
    max-width: 100% !important;
    padding: 12px !important;
    border-radius: 14px !important;
    box-shadow: 0 8px 22px rgba(15, 23, 42, .08) !important;
  }

  body.auth-shell-page .auth-dashboard-panel__title,
  body.auth-panel-page .auth-dashboard-panel__title,
  body.auth-shell-page h1,
  body.auth-panel-page h1 {
    font-size: 1.16rem !important;
    margin-bottom: 8px !important;
  }

  body.auth-shell-page .auth-actions,
  body.auth-panel-page .auth-actions,
  body.auth-shell-page .auth-actions-single-line,
  body.auth-panel-page .auth-actions-single-line {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 7px !important;
    align-items: stretch !important;
  }

  body.auth-shell-page .auth-actions-left,
  body.auth-shell-page .auth-actions-center,
  body.auth-shell-page .auth-actions-right,
  body.auth-panel-page .auth-actions-left,
  body.auth-panel-page .auth-actions-center,
  body.auth-panel-page .auth-actions-right {
    width: 100% !important;
    max-width: 100% !important;
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 6px !important;
  }

  body.auth-shell-page .button,
  body.auth-panel-page .button,
  body.auth-shell-page button,
  body.auth-panel-page button {
    width: 100% !important;
    justify-content: center !important;
    min-height: 38px !important;
  }

  body.auth-shell-page .site-footer,
  body.auth-panel-page .site-footer,
  body.auth-shell-page footer,
  body.auth-panel-page footer {
    font-size: .72rem !important;
  }
}
