/* MSP v2 / MediServPro — Tenant onboarding registration (MVC) */

:root {
  --ob-primary: #0052cc;
  --ob-primary-hover: #0047b3;
  --ob-primary-soft: rgba(0, 82, 204, 0.1);
  --ob-primary-ring: rgba(0, 82, 204, 0.2);
  --ob-bg-page: #f5f7f8;
  --ob-bg-form: #ffffff;
  --ob-bg-panel: #0f172a;
  --ob-text: #0f172a;
  --ob-text-muted: #64748b;
  --ob-border: #e2e8f0;
  --ob-radius: 10px;
  --ob-radius-lg: 14px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  height: 100%;
}

body {
  margin: 0;
  min-height: 100%;
  font-family: "Inter", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: var(--ob-text);
  background: var(--ob-bg-page);
  -webkit-font-smoothing: antialiased;
}

/* Register split layout: lock document scroll; only .ob-form-panel scrolls */
html:has(.ob-page),
body:has(.ob-page) {
  height: 100%;
  overflow: hidden;
}

.material-symbols-outlined {
  font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 24;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* ----- Page shell ----- */
.ob-page {
  display: flex;
  min-height: 0;
  height: 100vh;
  height: 100dvh;
  max-height: 100vh;
  max-height: 100dvh;
  overflow: hidden;
}

/* Public partner registration: single centered column (no right panel) */
.ob-page--partner-register .ob-form-panel {
  max-width: 720px;
  margin-inline: auto;
  width: 100%;
  border-right: none;
}

/* ----- Left: form panel ----- */
.ob-form-panel {
  flex: 1;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: var(--ob-bg-form);
  border-right: 1px solid var(--ob-border);
  padding: 24px 20px 32px;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: rgba(148, 163, 184, 0.45) transparent;
}

.ob-form-panel::-webkit-scrollbar {
  width: 10px;
}

.ob-form-panel::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.45);
  border-radius: 999px;
}

.ob-form-panel::-webkit-scrollbar-track {
  background: transparent;
}

.ob-form-panel__header {
  flex-shrink: 0;
  margin-bottom: 24px;
}

.ob-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ob-primary);
}

.ob-brand__icon {
  font-size: 2rem;
}

.ob-brand__name {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ob-text);
}

.ob-brand--logo {
  align-items: flex-start;
}

.ob-brand__link {
  display: inline-block;
  line-height: 0;
  text-decoration: none;
}

.ob-brand__link:focus-visible {
  outline: 2px solid var(--ob-primary);
  outline-offset: 4px;
  border-radius: 4px;
}

.ob-brand__logo-img {
  display: block;
  max-height: 56px;
  width: auto;
  max-width: min(100%, 340px);
  object-fit: contain;
}

/* Progress */
.ob-progress {
  margin-bottom: 32px;
}

.ob-progress__title {
  margin: 0 0 4px;
  font-size: 1.875rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ob-text);
}

.ob-progress__step {
  margin: 0 0 16px;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--ob-text-muted);
}

.ob-progress__bar-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ob-progress__bar {
  height: 8px;
  width: 100%;
  background: var(--ob-primary-soft);
  border-radius: 999px;
  overflow: hidden;
}

.ob-progress__bar-fill {
  display: block;
  height: 100%;
  background: var(--ob-primary);
  border-radius: 999px;
  transition: width 0.3s ease;
}

.ob-progress__meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ob-text);
}

.ob-progress__pct {
  color: var(--ob-primary);
}

/* Form */
.ob-form {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.ob-form .alert {
  margin-bottom: 0;
  padding: 12px 16px;
  border-radius: var(--ob-radius);
  font-size: 0.875rem;
}

.ob-form .text-danger {
  font-size: 0.75rem;
  margin-top: 2px;
  color: #dc2626;
}

.ob-section {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.ob-section__title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--ob-border);
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--ob-text);
}

.ob-section__icon {
  font-size: 1.25rem;
  color: var(--ob-primary);
}

.ob-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px 24px;
}

.ob-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ob-field--span-2 {
  grid-column: 1 / -1;
}

.ob-field__helper {
  font-size: 0.75rem;
  color: var(--ob-text-muted);
  margin-top: 2px;
}

.ob-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: #334155;
}

.ob-input {
  width: 100%;
  height: 48px;
  padding: 0 16px;
  border: 1px solid var(--ob-border);
  border-radius: var(--ob-radius);
  font-size: 0.875rem;
  color: var(--ob-text);
  background: #fff;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.ob-input::placeholder {
  color: #94a3b8;
}

.ob-input:focus {
  border-color: var(--ob-primary);
  box-shadow: 0 0 0 3px var(--ob-primary-ring);
}

.ob-input--select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 40px;
}

.ob-input-wrap {
  position: relative;
}

.ob-input-wrap--suffix .ob-input {
  padding-right: 140px;
}

.ob-input-suffix {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.75rem;
  font-weight: 500;
  color: #94a3b8;
  pointer-events: none;
}

.ob-input-wrap--password .ob-input {
  padding-right: 48px;
}

.ob-password-toggle {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  padding: 0;
  border: none;
  border-radius: var(--ob-radius);
  background: transparent;
  color: #94a3b8;
  cursor: pointer;
}

.ob-password-toggle:hover {
  color: var(--ob-primary);
}

.ob-password-toggle svg {
  width: 20px;
  height: 20px;
  display: block;
}

/* Agreement */
.ob-agreement__box {
  padding: 24px;
  border-radius: var(--ob-radius-lg);
  border: 1px solid rgba(0, 82, 204, 0.2);
  background: var(--ob-primary-soft);
}

.ob-agreement__row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
}

.ob-agreement__row:last-child {
  margin-bottom: 0;
}

.ob-checkbox {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  flex-shrink: 0;
  border-radius: 4px;
  border: 1px solid #cbd5e1;
  accent-color: var(--ob-primary);
  cursor: pointer;
}

.ob-agreement__label {
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--ob-text);
  cursor: pointer;
}

.ob-link {
  font-weight: 700;
  color: var(--ob-primary);
  text-decoration: none;
}

.ob-link:hover {
  text-decoration: underline;
}

/* Actions */
.ob-actions {
  padding-top: 8px;
}

.ob-btn-primary {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 24px;
  border: none;
  border-radius: var(--ob-radius);
  font-size: 0.9375rem;
  font-weight: 700;
  color: #fff;
  background: var(--ob-primary);
  cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease;
  box-shadow: 0 4px 14px rgba(0, 82, 204, 0.25);
}

.ob-btn-primary:hover {
  background: var(--ob-primary-hover);
}

.ob-btn-primary:active {
  transform: scale(0.99);
}

.ob-btn-primary__icon {
  font-size: 1.25rem;
}

.ob-actions__hint {
  margin: 24px 0 0;
  text-align: center;
  font-size: 0.875rem;
  color: var(--ob-text-muted);
}

/* ----- Right: enterprise panel ----- */
.ob-panel {
  display: none;
  position: relative;
  flex: 1;
  flex-direction: column;
  justify-content: center;
  align-items: stretch;
  gap: 32px;
  overflow: hidden;
  background: var(--ob-bg-panel);
  padding: 48px 32px;
  color: #fff;
}

.ob-panel__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0.15;
}

.ob-panel__bg::before {
  content: "";
  position: absolute;
  top: -10%;
  right: -10%;
  width: 500px;
  height: 500px;
  background: var(--ob-primary);
  border-radius: 50%;
  filter: blur(120px);
}

.ob-panel__bg::after {
  content: "";
  position: absolute;
  bottom: -10%;
  left: -10%;
  width: 400px;
  height: 400px;
  background: #4338ca;
  border-radius: 50%;
  filter: blur(100px);
}

.ob-panel__inner {
  position: relative;
  z-index: 1;
  width: 100%;
  min-width: 0;
}

.ob-panel__badge {
  display: inline-block;
  margin-bottom: 24px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ob-primary);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(0, 82, 204, 0.3);
}

.ob-panel__title {
  margin: 0 0 32px;
  font-size: 2.25rem;
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -0.02em;
  max-width: 32rem;
  color: #ffffff;
}

.ob-panel__cards {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.ob-panel-card {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.ob-panel-card__icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--ob-radius);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--ob-primary);
}

.ob-panel-card__icon .material-symbols-outlined {
  font-size: 24px;
}

.ob-panel-card__title {
  margin: 0 0 4px;
  font-size: 1.125rem;
  font-weight: 700;
  color: #fff;
}

.ob-panel-card__text {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.5;
  color: rgba(148, 163, 184, 0.9);
}

.ob-panel__badges {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 0;
  flex-shrink: 0;
}

.ob-trust-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: var(--ob-radius);
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
}

.ob-trust-badge .material-symbols-outlined {
  font-size: 16px;
  color: var(--ob-primary);
}

/* ----- Responsive ----- */
@media (min-width: 768px) {
  .ob-form-panel {
    padding: 32px 40px 48px;
  }

  .ob-grid {
    gap: 24px 32px;
  }
}

@media (min-width: 1024px) {
  .ob-form-panel {
    padding: 48px 40px 64px;
  }

  /* Split onboarding only: half width + center form stack in the left column */
  .ob-page:not(.ob-page--partner-register) .ob-form-panel {
    align-items: center;
    width: 50%;
    flex: 0 0 50%;
    flex-shrink: 0;
  }

  .ob-page:not(.ob-page--partner-register) .ob-form-panel > * {
    width: 100%;
    max-width: min(100%, 640px);
  }

  .ob-panel {
    display: flex;
    width: 50%;
    flex: 0 0 50%;
    min-width: 0;
    min-height: 0;
    align-self: stretch;
    height: auto;
    align-items: center;
  }

  .ob-panel__inner {
    max-width: 28rem;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .ob-panel__title {
    text-align: center;
    max-width: none;
    width: 100%;
  }

  .ob-panel__cards {
    align-self: stretch;
    width: 100%;
  }

  .ob-panel__badges {
    justify-content: center;
  }

  .ob-progress__title {
    font-size: 2rem;
  }
}

@media (min-width: 1280px) {
  .ob-form-panel {
    padding: 48px 56px 72px;
  }

  .ob-panel {
    padding: 64px 40px;
  }

  .ob-panel__title {
    font-size: 2.5rem;
    text-align: center;
    max-width: none;
    width: 100%;
    color: #ffffff;
  }
}

@media (max-width: 767.98px) {
  .ob-grid {
    grid-template-columns: 1fr;
  }

  .ob-field--span-2 {
    grid-column: 1;
  }
}
