/* HMS Login Clean Theme v10
   Solid white hospital theme. No old blue image/background. */

:root {
  --hms-bg: #f8fbfd;
  --hms-white: #ffffff;
  --hms-navy: #12385f;
  --hms-text: #172033;
  --hms-muted: #63758a;
  --hms-teal: #0b7f7b;
  --hms-teal-soft: #e8f5f4;
  --hms-border: #dce8ee;
  --hms-shadow: rgba(18, 56, 95, 0.12);
}

html, body { background: var(--hms-bg) !important; }

body.rj-login-clean-active {
  margin: 0 !important;
  height: 100vh !important;
  min-height: 100vh !important;
  overflow: hidden !important;
  background: var(--hms-bg) !important;
  font-family: "Segoe UI", Roboto, Arial, sans-serif !important;
}

/* Hide original Angular login only AFTER the real login form is moved into our clean layout. */
body.rj-login-clean-active.rj-login-clean-moved app-root {
  position: fixed !important;
  left: -10000px !important;
  top: -10000px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.rj-clean-shell,
.rj-clean-shell * { box-sizing: border-box; }

.rj-clean-shell {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  background: #ffffff;
  color: var(--hms-text);
  overflow: hidden;
}

.rj-clean-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(18,56,95,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(18,56,95,0.035) 1px, transparent 1px);
  background-size: 38px 38px;
  pointer-events: none;
}

.rj-clean-left,
.rj-clean-right {
  position: relative;
  z-index: 1;
  min-width: 0;
}

.rj-clean-left {
  padding: 40px 56px 44px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.rj-brand-line {
  position: absolute;
  top: 34px;
  left: 56px;
  right: 56px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.rj-brand-logo {
  width: 250px;
  height: 68px;
  object-fit: contain;
  border: 1px solid var(--hms-border);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 12px 24px rgba(18,56,95,0.08);
}

.rj-brand-copy strong {
  display: block;
  color: var(--hms-navy);
  font-weight: 800;
  font-size: 15px;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.rj-brand-copy span {
  display: block;
  margin-top: 4px;
  color: var(--hms-muted);
  font-size: 13px;
}

.rj-left-content { max-width: 700px; padding-top: 74px; }

.rj-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--hms-teal-soft);
  color: var(--hms-teal);
  border: 1px solid #cfe9e7;
  font-size: 13px;
  font-weight: 800;
}
.rj-kicker::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--hms-teal);
}

.rj-clean-title {
  margin: 20px 0 12px;
  font-size: clamp(38px, 4vw, 60px);
  line-height: 1.03;
  letter-spacing: -0.04em;
  color: #13223a;
  font-weight: 850;
}
.rj-clean-title span { color: var(--hms-teal); }

.rj-clean-subtitle {
  max-width: 590px;
  margin: 0;
  color: var(--hms-muted);
  font-size: 17px;
  line-height: 1.7;
}

.rj-photo-area {
  margin-top: 28px;
  display: grid;
  grid-template-columns: minmax(320px, 1fr) 190px;
  gap: 18px;
  align-items: stretch;
}

.rj-hospital-photo-card {
  position: relative;
  min-height: 282px;
  border: 1px solid var(--hms-border);
  border-radius: 26px;
  background: #ffffff;
  box-shadow: 0 22px 52px rgba(18,56,95,0.10);
  overflow: hidden;
}

.rj-hospital-photo-card.has-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.rj-photo-placeholder {
  position: absolute;
  inset: 18px;
  border: 2px dashed #bddbd8;
  border-radius: 20px;
  background: #f7fcfc;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 24px;
}
.rj-photo-placeholder b {
  color: var(--hms-navy);
  font-size: 20px;
  margin-bottom: 8px;
}
.rj-photo-placeholder span {
  color: var(--hms-muted);
  font-size: 14px;
  line-height: 1.55;
}
.rj-photo-placeholder code {
  margin-top: 12px;
  display: inline-block;
  width: max-content;
  max-width: 100%;
  padding: 8px 11px;
  border-radius: 10px;
  background: #eef7f7;
  color: var(--hms-teal);
  border: 1px solid #d7eeec;
  font-size: 12px;
}

.rj-info-card {
  border: 1px solid var(--hms-border);
  border-radius: 26px;
  background: #ffffff;
  padding: 22px;
  box-shadow: 0 16px 38px rgba(18,56,95,0.08);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.rj-info-icon {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: var(--hms-teal-soft);
  color: var(--hms-teal);
  display: grid;
  place-items: center;
  font-size: 26px;
  font-weight: 900;
}
.rj-info-card h3 {
  margin: 18px 0 8px;
  color: var(--hms-navy);
  font-size: 22px;
}
.rj-info-card p,
.rj-info-card li {
  color: var(--hms-muted);
  font-size: 14px;
  line-height: 1.55;
}
.rj-info-card ul {
  margin: 14px 0 0;
  padding-left: 18px;
}

.rj-clean-right {
  padding: 46px 58px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.rj-login-panel {
  width: min(100%, 500px);
  border: 1px solid var(--hms-border);
  border-radius: 30px;
  background: #ffffff;
  box-shadow: 0 28px 76px var(--hms-shadow);
  overflow: hidden;
}

.rj-form-titlebar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 24px 28px 18px;
  border-bottom: 1px solid #eef3f6;
}
.rj-form-badge {
  width: 54px;
  height: 54px;
  border-radius: 17px;
  background: var(--hms-teal);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 27px;
  font-weight: 900;
  box-shadow: 0 14px 30px rgba(11,127,123,0.22);
}
.rj-form-titlebar strong {
  display: block;
  color: #13223a;
  font-size: 27px;
  line-height: 1.05;
}
.rj-form-titlebar span {
  display: block;
  margin-top: 4px;
  color: var(--hms-muted);
  font-size: 13px;
}

.rj-form-holder {
  padding: 26px 28px 24px;
  min-height: 330px;
}

.rj-form-holder > * {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  overflow: visible !important;
}

/* Remove every old image/logo from the moved Angular form. */
.rj-form-holder img,
.rj-form-holder [data-rj-hidden-old-login-img="1"],
.rj-form-holder *[src*="logo"],
.rj-form-holder *[src*="Logo"],
.rj-form-holder *[src*="RJ"],
.rj-form-holder *[src*="rj"] {
  display: none !important;
  visibility: hidden !important;
  width: 0 !important;
  height: 0 !important;
}

/* Hide old sign-in headings inside moved card; new titlebar is used. */
.rj-form-holder h1,
.rj-form-holder h2,
.rj-form-holder h3,
.rj-form-holder .card-header,
.rj-form-holder mat-card-header,
.rj-form-holder .mat-card-header,
.rj-form-holder .mat-card-title {
  display: none !important;
}

.rj-form-holder input,
.rj-form-holder select,
.rj-form-holder .mat-select-value,
.rj-form-holder .mat-select-trigger,
.rj-form-holder .mat-form-field-infix {
  color: #142033 !important;
  font-weight: 600 !important;
}

.rj-form-holder button,
.rj-form-holder .mat-button,
.rj-form-holder .mat-raised-button,
.rj-form-holder .mat-flat-button {
  width: 100% !important;
  min-height: 46px !important;
  border-radius: 14px !important;
  background: var(--hms-teal) !important;
  color: #ffffff !important;
  border: 0 !important;
  box-shadow: 0 12px 24px rgba(11,127,123,0.22) !important;
}

.rj-form-holder .mat-form-field-underline,
.rj-form-holder .mat-form-field-ripple {
  background-color: var(--hms-teal) !important;
}

.rj-version {
  text-align: center;
  color: #7d8ea3;
  font-size: 12px;
  padding: 0 28px 24px;
}

.rj-footer {
  position: absolute;
  right: 38px;
  bottom: 22px;
  color: #7b91a8;
  font-size: 13px;
}

.rj-loading {
  min-height: 300px;
  display: grid;
  place-items: center;
  color: var(--hms-muted);
}

@media (max-width: 1120px) {
  .rj-clean-shell { grid-template-columns: 1fr; overflow: auto; }
  body.rj-login-clean-active { overflow: auto !important; }
  .rj-clean-left { padding: 110px 28px 20px; }
  .rj-clean-right { padding: 20px 28px 48px; }
  .rj-brand-line { left: 28px; right: 28px; }
}

@media (max-width: 720px) {
  .rj-photo-area { grid-template-columns: 1fr; }
  .rj-brand-copy strong { font-size: 12px; }
  .rj-brand-copy span { display: none; }
  .rj-brand-logo { width: 300px; height: 58px; }
  .rj-clean-left { padding: 96px 18px 18px; }
  .rj-clean-right { padding: 14px 18px 40px; }
  .rj-clean-title { font-size: 36px; }
}
