/* CSB Bank Headless CMS - Standalone Login & Password Reset Styles */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800&display=swap');

:root {
  --csb-orange: #F37024;
  --csb-orange-hover: #D95509;
  --csb-navy: #1b3f91;
  --csb-navy-dark: #0f2963;
  --csb-navy-light: #234fae;
  --csb-card-bg: #FFFFFF;
  --csb-text-main: #0F172A;
  --csb-text-sub: #64748B;
  --csb-border: #E2E8F0;
  --csb-radius: 24px;
}

/* 1. PREVENT PAGE OVERFLOW AND SCROLLBARS STRICTLY ON AUTH PAGES */
html.csb-auth-page-active,
body.csb-auth-page-active {
  height: 100vh !important;
  min-height: 100vh !important;
  width: 100vw !important;
  max-width: 100vw !important;
  max-height: 100vh !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
  font-family: 'Outfit', system-ui, -apple-system, sans-serif !important;
  background-color: #091738 !important;
  background-image: radial-gradient(circle at 15% 15%, rgba(243, 112, 36, 0.25) 0%, transparent 45%),
                    radial-gradient(circle at 85% 85%, rgba(27, 63, 145, 0.85) 0%, transparent 50%),
                    linear-gradient(135deg, #091738 0%, #1b3f91 50%, #234fae 100%) !important;
  background-repeat: no-repeat !important;
  background-size: cover !important;
  background-attachment: fixed !important;
  background-position: center center !important;
}

/* HIDE CLARO & SYSTEM HEADERS, FOOTERS, TABS AND PAGE TITLES ONLY ON AUTH PAGES */
body.csb-auth-page-active header,
body.csb-auth-page-active footer,
body.csb-auth-page-active nav,
body.csb-auth-page-active .tabs,
body.csb-auth-page-active ul.tabs,
body.csb-auth-page-active .primary-tabs,
body.csb-auth-page-active .secondary-tabs,
body.csb-auth-page-active .page-title,
body.csb-auth-page-active h1.page-title,
body.csb-auth-page-active .region-header,
body.csb-auth-page-active .region-primary-menu,
body.csb-auth-page-active .region-secondary-menu,
body.csb-auth-page-active .region-navigation,
body.csb-auth-page-active .region-breadcrumb,
body.csb-auth-page-active .region-footer,
body.csb-auth-page-active .breadcrumb,
body.csb-auth-page-active #header,
body.csb-auth-page-active #footer,
body.csb-auth-page-active .site-header,
body.csb-auth-page-active .site-footer {
  display: none !important;
}

/* 2. RESET CONTAINER WRAPPERS ONLY ON AUTH PAGES */
body.csb-auth-page-active #main-content,
body.csb-auth-page-active main,
body.csb-auth-page-active .dialog-off-canvas-main-canvas,
body.csb-auth-page-active .region-content,
body.csb-auth-page-active .layout-container {
  width: 100% !important;
  height: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
}

/* 3. VIEWPORT & AUTH WRAPPER */
.csb-auth-viewport {
  width: 100% !important;
  height: 100% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 16px !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
}

.csb-auth-wrapper {
  width: 100%;
  max-width: 420px;
  box-sizing: border-box;
  margin: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.csb-auth-card {
  width: 100%;
  background: var(--csb-card-bg);
  border-radius: var(--csb-radius);
  padding: 36px 32px 28px 32px;
  box-sizing: border-box;
  box-shadow: 0 35px 70px -15px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.2);
  animation: csbPopUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  max-height: calc(100vh - 80px);
  overflow-y: auto;
}

@keyframes csbPopUp {
  from {
    opacity: 0;
    transform: scale(0.96) translateY(12px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.csb-auth-card::-webkit-scrollbar {
  width: 4px;
}
.csb-auth-card::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.15);
  border-radius: 4px;
}

/* 4. LOGO ABOVE FORM */
.csb-auth-logo-box {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 20px;
}

.csb-brand-logo-svg,
.csb-brand-logo-img {
  height: 52px;
  width: auto;
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.2));
  transition: transform 0.3s ease;
}

.csb-brand-logo-svg:hover,
.csb-brand-logo-img:hover {
  transform: scale(1.02);
}

.csb-auth-header-text {
  text-align: center;
  margin-bottom: 22px;
}

.csb-auth-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(27, 63, 145, 0.08);
  color: var(--csb-navy);
  font-size: 11px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 999px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

.csb-auth-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--csb-navy);
  margin: 8px 0 4px 0;
  letter-spacing: -0.5px;
}

.csb-auth-subtitle {
  font-size: 13px;
  color: var(--csb-text-sub);
  margin: 0;
  line-height: 1.4;
}

/* 5. FORM ELEMENTS */
.csb-auth-form-body form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.csb-auth-form-body .form-item {
  margin: 0 0 12px 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.csb-auth-form-body label {
  font-size: 11px;
  font-weight: 700;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  display: block;
  margin-bottom: 2px;
}

.csb-auth-form-body input[type="text"],
.csb-auth-form-body input[type="password"],
.csb-auth-form-body input[type="email"] {
  width: 100% !important;
  height: 46px !important;
  padding: 10px 14px !important;
  box-sizing: border-box !important;
  font-family: inherit !important;
  font-size: 14px !important;
  color: #0F172A !important;
  background: #F8FAFC !important;
  border: 1.5px solid var(--csb-border) !important;
  border-radius: 10px !important;
  transition: all 0.2s ease-in-out !important;
  outline: none !important;
}

.csb-auth-form-body input[type="text"]:focus,
.csb-auth-form-body input[type="password"]:focus,
.csb-auth-form-body input[type="email"]:focus {
  background: #FFFFFF !important;
  border-color: var(--csb-navy) !important;
  box-shadow: 0 0 0 3px rgba(27, 63, 145, 0.18) !important;
}

/* 6. SUBMIT BUTTON */
.csb-auth-form-body .form-actions {
  margin-top: 4px;
}

.csb-auth-form-body input[type="submit"],
.csb-auth-form-body button[type="submit"],
.csb-auth-btn {
  width: 100% !important;
  height: 48px !important;
  background: linear-gradient(135deg, #F37024 0%, #D95509 100%) !important;
  color: #FFFFFF !important;
  font-family: inherit !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  letter-spacing: 0.5px !important;
  border: none !important;
  border-radius: 10px !important;
  cursor: pointer !important;
  transition: all 0.25s ease-in-out !important;
  box-shadow: 0 6px 18px rgba(243, 112, 36, 0.35) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.csb-auth-form-body input[type="submit"]:hover,
.csb-auth-form-body button[type="submit"]:hover,
.csb-auth-btn:hover {
  background: linear-gradient(135deg, #E05C10 0%, #C44800 100%) !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 10px 22px rgba(243, 112, 36, 0.45) !important;
}

.csb-auth-form-body input[type="submit"]:active,
.csb-auth-form-body button[type="submit"]:active {
  transform: translateY(0) !important;
}

/* 7. LINKS & COPYRIGHT */
.csb-auth-links-row {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--csb-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
}

.csb-auth-link {
  color: var(--csb-navy) !important;
  text-decoration: none !important;
  font-weight: 700 !important;
  transition: color 0.2s !important;
}

.csb-auth-link:hover {
  color: var(--csb-orange) !important;
  text-decoration: underline !important;
}

.csb-auth-copyright {
  margin-top: 16px;
  text-align: center;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 500;
}

/* 8. DRUPAL MESSAGES & VALIDATION ERRORS */
.csb-auth-messages-container,
.csb-auth-messages {
  width: 100% !important;
  margin-bottom: 20px !important;
  text-align: left !important;
  box-sizing: border-box !important;
}

.csb-auth-messages-container:empty,
.csb-auth-messages:empty {
  display: none !important;
  margin: 0 !important;
}

.csb-msg-card {
  padding: 14px 16px !important;
  border-radius: 12px !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  line-height: 1.4 !important;
  box-sizing: border-box !important;
  text-align: left !important;
  margin-bottom: 12px !important;
}

.csb-msg-error {
  background: #FEF2F2 !important;
  color: #991B1B !important;
  border: 1px solid #FCA5A5 !important;
  border-left: 4px solid #DC2626 !important;
  box-shadow: 0 4px 14px rgba(220, 38, 38, 0.08) !important;
}

.csb-msg-warning {
  background: #FFFBEB !important;
  color: #92400E !important;
  border: 1px solid #FDE68A !important;
  border-left: 4px solid #D97706 !important;
  box-shadow: 0 4px 14px rgba(146, 64, 14, 0.08) !important;
}

.csb-msg-status {
  background: #F0FDF4 !important;
  color: #166534 !important;
  border: 1px solid #86EFAC !important;
  border-left: 4px solid #16A34A !important;
  box-shadow: 0 4px 14px rgba(22, 101, 52, 0.08) !important;
}

.csb-msg-header {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  margin-bottom: 6px !important;
}

.csb-msg-icon {
  width: 18px !important;
  height: 18px !important;
  flex-shrink: 0 !important;
  fill: currentColor !important;
}

.csb-msg-title {
  font-size: 13px !important;
  font-weight: 700 !important;
  color: inherit !important;
  letter-spacing: -0.2px !important;
}

.csb-msg-content {
  font-size: 12.5px !important;
  line-height: 1.4 !important;
  color: inherit !important;
}

.csb-msg-content a {
  color: inherit !important;
  font-weight: 700 !important;
  text-decoration: underline !important;
}

.csb-msg-list {
  margin: 4px 0 0 0 !important;
  padding: 0 0 0 18px !important;
  list-style: disc !important;
  text-align: left !important;
}

.csb-msg-item {
  font-size: 12.5px !important;
  font-weight: 500 !important;
  color: inherit !important;
  margin: 3px 0 !important;
  padding: 0 !important;
  line-height: 1.4 !important;
}
