
/*
FILE: web/css/runtime_auth_portal_titles_compact_v18_61.css
ROLE: compact source truth for auth portal titles/cards
STATUS: active patch v18.61
DOES:
- makes Portal client / Portal partner / Portal administrator badges smaller
- makes Autentificare Client / Partner / Administrator titles smaller
- compacts the three auth portal cards from the start
- targets /client_dashboard/, /partner_dashboard/, /admin/ auth screens
- keeps action buttons visible
DOES NOT:
- touch backend auth logic, sessions, passwords, database, API, submit logic
*/

:root{
  --abc-v1861-auth-card-w: 520px;
  --abc-v1861-auth-gap: 7px;
  --abc-v1861-auth-title: clamp(24px, 2.35vw, 34px);
  --abc-v1861-auth-admin-green: rgba(75, 220, 145, .58);
  --abc-v1861-auth-client-blue: rgba(74, 166, 255, .42);
  --abc-v1861-auth-partner-purple: rgba(188, 132, 255, .52);
}

/* Auth page surface: no dead vertical area. */
body[data-page="auth_login"] .abc-stack,
body[data-page="auth_notice"] .abc-stack,
body[data-page="admin"] .abc-stack,
body[data-page="admin_login"] .abc-stack,
body[data-auth-role] .abc-stack{
  padding: 7px !important;
  min-height: 0 !important;
  height: auto !important;
  overflow: visible !important;
}

/* Auth content panel sits compactly inside motor. */
body[data-page="auth_login"] :is(.auth-shell-content-panel,.content-engine-panel,.clean-main-panel),
body[data-page="auth_notice"] :is(.auth-shell-content-panel,.content-engine-panel,.clean-main-panel),
body[data-page="admin"] :is(.auth-shell-content-panel,.content-engine-panel,.clean-main-panel),
body[data-page="admin_login"] :is(.auth-shell-content-panel,.content-engine-panel,.clean-main-panel),
body[data-auth-role] :is(.auth-shell-content-panel,.content-engine-panel,.clean-main-panel){
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 6px !important;
  margin: 0 !important;
  min-height: 0 !important;
  height: auto !important;
  overflow: visible !important;
}

/* The actual auth card: same compact base for client / partner / administrator. */
body[data-page="auth_login"] :is(.auth-panel-card,.auth-card,.auth-card-dashboard,.auth-dashboard-panel),
body[data-page="auth_notice"] :is(.auth-panel-card,.auth-card,.auth-card-dashboard,.auth-dashboard-panel),
body[data-page="admin"] :is(.auth-panel-card,.auth-card,.auth-card-dashboard,.auth-dashboard-panel),
body[data-page="admin_login"] :is(.auth-panel-card,.auth-card,.auth-card-dashboard,.auth-dashboard-panel),
body[data-auth-role] :is(.auth-panel-card,.auth-card,.auth-card-dashboard,.auth-dashboard-panel){
  width: min(var(--abc-v1861-auth-card-w), 100%) !important;
  max-width: var(--abc-v1861-auth-card-w) !important;
  min-height: 0 !important;
  height: auto !important;
  padding: 10px 12px !important;
  margin: 0 auto !important;
  border-width: 1px !important;
  border-radius: 15px !important;
  overflow: visible !important;
  gap: var(--abc-v1861-auth-gap) !important;
}

/* Portal badge: smaller from the source truth. */
body[data-page="auth_login"] :is(.auth-panel-badge,.portal-badge,.abc-auth-badge-compact-v18-61),
body[data-page="auth_notice"] :is(.auth-panel-badge,.portal-badge,.abc-auth-badge-compact-v18-61),
body[data-page="admin"] :is(.auth-panel-badge,.portal-badge,.abc-auth-badge-compact-v18-61),
body[data-page="admin_login"] :is(.auth-panel-badge,.portal-badge,.abc-auth-badge-compact-v18-61),
body[data-auth-role] :is(.auth-panel-badge,.portal-badge,.abc-auth-badge-compact-v18-61){
  display: inline-flex !important;
  align-items: center !important;
  min-height: 19px !important;
  max-height: 24px !important;
  padding: 3px 8px !important;
  margin: 0 0 5px 0 !important;
  font-size: 12px !important;
  line-height: 1 !important;
  font-weight: 700 !important;
  border-radius: 999px !important;
  letter-spacing: .01em !important;
}

/* Main auth title: smaller and never huge again. */
body[data-page="auth_login"] :is(h1,.auth-dashboard-panel__title,.auth-title,.abc-auth-title-compact-v18-61),
body[data-page="auth_notice"] :is(h1,.auth-dashboard-panel__title,.auth-title,.abc-auth-title-compact-v18-61),
body[data-page="admin"] :is(h1,.auth-dashboard-panel__title,.auth-title,.abc-auth-title-compact-v18-61),
body[data-page="admin_login"] :is(h1,.auth-dashboard-panel__title,.auth-title,.abc-auth-title-compact-v18-61),
body[data-auth-role] :is(h1,.auth-dashboard-panel__title,.auth-title,.abc-auth-title-compact-v18-61){
  font-size: var(--abc-v1861-auth-title) !important;
  line-height: 1.02 !important;
  margin: 0 0 10px 0 !important;
  padding: 0 !important;
  color: #f7fbff !important;
  opacity: 1 !important;
  max-width: 100% !important;
  white-space: normal !important;
}

/* Admin title/badge color truth: green. */
body[data-auth-role="admin"] :is(.auth-panel-card,.auth-card,.auth-card-dashboard,.auth-dashboard-panel),
body[data-page="admin"] :is(.auth-panel-card,.auth-card,.auth-card-dashboard,.auth-dashboard-panel),
body[data-page="admin_login"] :is(.auth-panel-card,.auth-card,.auth-card-dashboard,.auth-dashboard-panel){
  border-color: var(--abc-v1861-auth-admin-green) !important;
  box-shadow:
    inset 0 0 0 1px rgba(75,220,145,.09),
    0 12px 30px rgba(0,0,0,.25) !important;
}

body[data-auth-role="admin"] :is(.auth-panel-badge,.portal-badge),
body[data-page="admin"] :is(.auth-panel-badge,.portal-badge),
body[data-page="admin_login"] :is(.auth-panel-badge,.portal-badge){
  color: #b6ffd4 !important;
  border-color: rgba(75,220,145,.34) !important;
  background: rgba(75,220,145,.08) !important;
}

/* Client/partner role colors if body/route exposes them. */
body[data-auth-role="client"] :is(.auth-panel-card,.auth-card,.auth-card-dashboard,.auth-dashboard-panel),
body[data-page="client_dashboard"] :is(.auth-panel-card,.auth-card,.auth-card-dashboard,.auth-dashboard-panel){
  border-color: var(--abc-v1861-auth-client-blue) !important;
}

body[data-auth-role="partner"] :is(.auth-panel-card,.auth-card,.auth-card-dashboard,.auth-dashboard-panel),
body[data-page="partner_dashboard"] :is(.auth-panel-card,.auth-card,.auth-card-dashboard,.auth-dashboard-panel){
  border-color: var(--abc-v1861-auth-partner-purple) !important;
}

/* Form compactness. */
body[data-page="auth_login"] :is(form,.auth-form-v9,.auth-form),
body[data-page="auth_notice"] :is(form,.auth-form-v9,.auth-form),
body[data-page="admin"] :is(form,.auth-form-v9,.auth-form),
body[data-page="admin_login"] :is(form,.auth-form-v9,.auth-form),
body[data-auth-role] :is(form,.auth-form-v9,.auth-form){
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 8px !important;
  margin: 0 !important;
  padding: 0 !important;
}

body[data-page="auth_login"] :is(.client-form-field,.form-field,.auth-field),
body[data-page="auth_notice"] :is(.client-form-field,.form-field,.auth-field),
body[data-page="admin"] :is(.client-form-field,.form-field,.auth-field),
body[data-page="admin_login"] :is(.client-form-field,.form-field,.auth-field),
body[data-auth-role] :is(.client-form-field,.form-field,.auth-field){
  min-height: 0 !important;
  padding: 7px 9px !important;
  margin: 0 !important;
  border-width: 1px !important;
  border-radius: 11px !important;
}

body[data-page="auth_login"] label,
body[data-page="auth_notice"] label,
body[data-page="admin"] label,
body[data-page="admin_login"] label,
body[data-auth-role] label{
  font-size: 14px !important;
  line-height: 1.05 !important;
  margin: 0 0 5px 0 !important;
}

body[data-page="auth_login"] input,
body[data-page="auth_notice"] input,
body[data-page="admin"] input,
body[data-page="admin_login"] input,
body[data-auth-role] input{
  height: 33px !important;
  min-height: 33px !important;
  padding: 7px 9px !important;
}

/* Auth buttons: visible and compact. */
body[data-page="auth_login"] :is(.auth-actions,.auth-actions-dashboard,.form-actions,.button-row),
body[data-page="auth_notice"] :is(.auth-actions,.auth-actions-dashboard,.form-actions,.button-row),
body[data-page="admin"] :is(.auth-actions,.auth-actions-dashboard,.form-actions,.button-row),
body[data-page="admin_login"] :is(.auth-actions,.auth-actions-dashboard,.form-actions,.button-row),
body[data-auth-role] :is(.auth-actions,.auth-actions-dashboard,.form-actions,.button-row){
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 7px !important;
  margin: 8px 0 0 0 !important;
  padding: 0 !important;
}

body[data-page="auth_login"] :is(.auth-actions,.auth-actions-dashboard,.form-actions,.button-row) :is(a,button),
body[data-page="auth_notice"] :is(.auth-actions,.auth-actions-dashboard,.form-actions,.button-row) :is(a,button),
body[data-page="admin"] :is(.auth-actions,.auth-actions-dashboard,.form-actions,.button-row) :is(a,button),
body[data-page="admin_login"] :is(.auth-actions,.auth-actions-dashboard,.form-actions,.button-row) :is(a,button),
body[data-auth-role] :is(.auth-actions,.auth-actions-dashboard,.form-actions,.button-row) :is(a,button){
  min-height: 33px !important;
  padding: 7px 9px !important;
  font-size: 13px !important;
  line-height: 1.1 !important;
  border-radius: 11px !important;
  white-space: normal !important;
}

/* Kill big old title spacing even if old files define it with unusual wrappers. */
body[data-page="auth_login"] :is(.auth-heading,.portal-heading,.dashboard-heading,.auth-header),
body[data-page="auth_notice"] :is(.auth-heading,.portal-heading,.dashboard-heading,.auth-header),
body[data-page="admin"] :is(.auth-heading,.portal-heading,.dashboard-heading,.auth-header),
body[data-page="admin_login"] :is(.auth-heading,.portal-heading,.dashboard-heading,.auth-header),
body[data-auth-role] :is(.auth-heading,.portal-heading,.dashboard-heading,.auth-header){
  min-height: 0 !important;
  padding: 0 !important;
  margin: 0 0 8px 0 !important;
}

/* Mobile */
@media (max-width:760px){
  :root{
    --abc-v1861-auth-card-w: 100%;
    --abc-v1861-auth-title: clamp(23px, 7vw, 32px);
  }

  body[data-page="auth_login"] :is(form,.auth-form-v9,.auth-form),
  body[data-page="auth_notice"] :is(form,.auth-form-v9,.auth-form),
  body[data-page="admin"] :is(form,.auth-form-v9,.auth-form),
  body[data-page="admin_login"] :is(form,.auth-form-v9,.auth-form),
  body[data-auth-role] :is(form,.auth-form-v9,.auth-form),
  body[data-page="auth_login"] :is(.auth-actions,.auth-actions-dashboard,.form-actions,.button-row),
  body[data-page="auth_notice"] :is(.auth-actions,.auth-actions-dashboard,.form-actions,.button-row),
  body[data-page="admin"] :is(.auth-actions,.auth-actions-dashboard,.form-actions,.button-row),
  body[data-page="admin_login"] :is(.auth-actions,.auth-actions-dashboard,.form-actions,.button-row),
  body[data-auth-role] :is(.auth-actions,.auth-actions-dashboard,.form-actions,.button-row){
    grid-template-columns: 1fr !important;
  }
}
