/* ============================================================
   BRIGHT LTS MANAGEMENT — Tenant Portal Styles
   ============================================================ */

/* === COMPACT HERO === */
.page-hero--compact {
  padding-top: calc(80px + var(--space-xl));
  padding-bottom: var(--space-lg);
  min-height: auto;
}

/* === STEP INDICATOR === */
.portal-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: var(--space-xl);
}

.portal-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3xs);
  position: relative;
}

.portal-step__num {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-tech);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-muted);
  transition: all var(--dur-base) var(--ease-out);
  background: var(--bg);
}

.portal-step__label {
  font-family: var(--font-tech);
  font-size: var(--text-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: color var(--dur-base) var(--ease-out);
}

.portal-step.active .portal-step__num {
  border-color: var(--gold);
  background: var(--gold);
  color: var(--black);
  box-shadow: 0 0 16px var(--gold-glow);
}

.portal-step.active .portal-step__label {
  color: var(--gold);
}

.portal-step.completed .portal-step__num {
  border-color: var(--gold);
  background: transparent;
  color: var(--gold);
}

.portal-step.completed .portal-step__label {
  color: var(--text-secondary);
}

.portal-step__line {
  width: 60px;
  height: 2px;
  background: var(--border);
  margin: 0 var(--space-2xs);
  margin-bottom: 20px;
  transition: background var(--dur-base) var(--ease-out);
}

.portal-step__line.active {
  background: var(--gold);
}

@media (max-width: 480px) {
  .portal-step__line { width: 24px; }
  .portal-step__label { font-size: 9px; }
  .portal-step__num { width: 30px; height: 30px; font-size: 12px; }
}

/* === PORTAL CARD === */
.portal-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  transition: border-color var(--dur-base) var(--ease-out);
}

.portal-card:hover {
  border-color: var(--gold-muted);
}

.portal-card__icon {
  width: 48px;
  height: 48px;
  margin-bottom: var(--space-sm);
}

.portal-card__icon svg {
  width: 100%;
  height: 100%;
}

.portal-card__icon--success {
  width: 56px;
  height: 56px;
  background: rgba(45, 106, 79, 0.1);
  border-radius: 50%;
  padding: 12px;
}

.portal-card h3 {
  font-size: var(--text-xl);
  margin-bottom: var(--space-2xs);
}

.portal-card__desc {
  color: var(--text-secondary);
  font-size: var(--text-sm);
  margin-bottom: var(--space-md);
}

.portal-card--success {
  text-align: center;
}

.portal-card--success .portal-card__icon {
  margin-inline: auto;
}

/* === PORTAL FORM === */
.portal-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.btn--full {
  width: 100%;
  justify-content: center;
}

.btn--lg {
  padding: var(--space-xs) var(--space-md);
  font-size: var(--text-base);
}

.btn--sm {
  padding: var(--space-3xs) var(--space-xs);
  font-size: var(--text-xs);
}

/* === OTP INPUTS === */
.otp-inputs {
  display: flex;
  gap: var(--space-2xs);
  justify-content: center;
}

.otp-input {
  width: 48px;
  height: 56px;
  text-align: center;
  font-family: var(--font-tech);
  font-size: var(--text-xl);
  font-weight: 600;
  letter-spacing: 0;
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg);
  color: var(--text-primary);
  transition: all var(--dur-fast) var(--ease-out);
}

.otp-input:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-subtle);
}

@media (max-width: 400px) {
  .otp-input { width: 40px; height: 48px; font-size: var(--text-lg); }
}

/* === INPUT WITH PREFIX === */
.input-with-prefix {
  position: relative;
}

.input-prefix {
  position: absolute;
  left: var(--space-xs);
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-tech);
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--text-muted);
  pointer-events: none;
}

.input-with-prefix .form-input {
  padding-left: calc(var(--space-xs) + 1.2em);
  font-family: var(--font-tech);
  font-size: var(--text-lg);
  font-weight: 600;
}

.form-hint {
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin-top: var(--space-3xs);
}

/* === BUILDING & UNIT SELECT GRID === */
.portal-select-grid {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.portal-select-grid__header {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-2xs);
}

.select-card {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg);
  cursor: pointer;
  transition: all var(--dur-fast) var(--ease-out);
}

.select-card:hover {
  border-color: var(--gold);
  background: var(--gold-subtle);
}

.select-card__icon {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  background: var(--gold-subtle);
  color: var(--gold);
}

.select-card__icon svg {
  width: 22px;
  height: 22px;
}

.select-card__info {
  flex: 1;
}

.select-card__title {
  font-family: var(--font-tech);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-primary);
}

.select-card__sub {
  font-size: var(--text-xs);
  color: var(--text-muted);
}

.select-card__arrow {
  width: 16px;
  height: 16px;
  color: var(--text-muted);
  transition: transform var(--dur-fast) var(--ease-out);
}

.select-card:hover .select-card__arrow {
  transform: translateX(3px);
  color: var(--gold);
}

/* === BALANCE SUMMARY === */
.balance-summary {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.balance-summary__header {
  background: var(--gold-subtle);
  padding: var(--space-sm) var(--space-md);
  text-align: center;
  border-bottom: 1px solid var(--border);
}

.balance-summary__label {
  display: block;
  font-family: var(--font-tech);
  font-size: var(--text-xs);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: var(--space-3xs);
}

.balance-summary__amount {
  display: block;
  font-family: var(--font-tech);
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--gold);
}

.balance-summary__due-date {
  display: block;
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin-top: var(--space-3xs);
}

.balance-summary__items {
  padding: var(--space-xs) var(--space-md);
}

.charge-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-2xs) 0;
  border-bottom: 1px solid var(--border-subtle);
  font-size: var(--text-sm);
}

.charge-item:last-child {
  border-bottom: none;
}

.charge-item__label {
  color: var(--text-secondary);
}

.charge-item__amount {
  font-family: var(--font-tech);
  font-weight: 600;
  color: var(--text-primary);
}

.charge-item__amount--credit {
  color: #2D6A4F;
}

.balance-summary__total {
  display: flex;
  justify-content: space-between;
  padding: var(--space-sm) var(--space-md);
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  font-family: var(--font-tech);
  font-weight: 700;
  font-size: var(--text-base);
}

/* === PAYMENT REDIRECT NOTICE === */
.payment-redirect-notice {
  display: flex;
  gap: var(--space-sm);
  padding: var(--space-sm);
  border: 1px solid rgba(200, 168, 78, 0.3);
  border-radius: var(--radius-md);
  background: var(--gold-subtle);
  margin-bottom: var(--space-md);
}

.payment-redirect-notice__icon {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
}

.payment-redirect-notice__icon svg {
  width: 100%;
  height: 100%;
}

.payment-redirect-notice strong {
  display: block;
  font-family: var(--font-tech);
  font-size: var(--text-sm);
  color: var(--gold);
  margin-bottom: var(--space-3xs);
}

.payment-redirect-notice p {
  font-size: var(--text-xs);
  color: var(--text-secondary);
  line-height: 1.5;
}

/* === PAYMENT METHODS === */
.payment-methods {
  margin-bottom: var(--space-md);
}

.payment-methods__label {
  display: block;
  font-family: var(--font-tech);
  font-size: var(--text-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: var(--space-2xs);
}

.payment-methods__icons {
  display: flex;
  gap: var(--space-2xs);
  flex-wrap: wrap;
}

.payment-method-icon {
  width: 52px;
  height: 34px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border);
  transition: border-color var(--dur-fast) var(--ease-out);
}

.payment-method-icon:hover {
  border-color: var(--gold);
}

.payment-method-icon svg {
  width: 100%;
  height: 100%;
}

/* === PORTAL DISCLAIMER === */
.portal-disclaimer {
  text-align: center;
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin-top: var(--space-sm);
}

/* === RECEIPT SUMMARY === */
.receipt-summary {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-top: var(--space-md);
  text-align: left;
}

.receipt-row {
  display: flex;
  justify-content: space-between;
  padding: var(--space-xs) var(--space-sm);
  font-size: var(--text-sm);
  border-bottom: 1px solid var(--border-subtle);
}

.receipt-row:last-child {
  border-bottom: none;
}

.receipt-row span:first-child {
  color: var(--text-muted);
}

.receipt-row span:last-child {
  font-family: var(--font-tech);
  font-weight: 600;
  color: var(--text-primary);
}

/* === PAYMENT HISTORY TABLE === */
.payment-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.payment-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
}

.payment-table th {
  font-family: var(--font-tech);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-align: left;
  padding: var(--space-xs) var(--space-sm);
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
}

.payment-table td {
  padding: var(--space-xs) var(--space-sm);
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}

.payment-table tbody tr:last-child td {
  border-bottom: none;
}

.payment-table .amount {
  font-family: var(--font-tech);
  font-weight: 600;
  color: var(--text-primary);
}

.status-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 12px;
  font-family: var(--font-tech);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.status-badge--approved {
  background: rgba(45, 106, 79, 0.12);
  color: #2D6A4F;
}

.status-badge--pending {
  background: rgba(200, 168, 78, 0.12);
  color: var(--gold-dark);
}

.status-badge--declined {
  background: rgba(204, 51, 51, 0.12);
  color: var(--safety-red);
}

/* === LOADING SPINNER === */
.portal-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  padding: var(--space-lg);
  color: var(--text-muted);
  font-family: var(--font-tech);
  font-size: var(--text-sm);
}

.portal-spinner {
  width: 20px;
  height: 20px;
  border: 2px solid var(--border);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: portalSpin 0.8s linear infinite;
}

@keyframes portalSpin {
  to { transform: rotate(360deg); }
}

/* === ALERT === */
.portal-alert {
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  margin-bottom: var(--space-sm);
}

.portal-alert--error {
  background: rgba(204, 51, 51, 0.08);
  border: 1px solid rgba(204, 51, 51, 0.2);
  color: var(--safety-red);
}

.portal-alert--info {
  background: var(--gold-subtle);
  border: 1px solid rgba(200, 168, 78, 0.2);
  color: var(--gold-dark);
}

/* === PANEL TRANSITIONS === */
.portal-panel {
  animation: portalFadeIn 0.4s var(--ease-out);
}

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