/* ═══════════════════════════════════════════════════════
   PFI — RENOVATION TRACKER CUSTOMER PORTAL
   Theme: Luxury Dark Gold  |  Matching PFI brand identity
   Fonts: Cinzel (display) + Inter (body)
═══════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@600;700;900&family=Inter:wght@400;500;600&display=swap');

:root {
  /* ── Brand palette ── */
  --pfi-gold:        #c9952a;
  --pfi-gold-light:  #f0c060;
  --pfi-gold-glow:   rgba(201,149,42,.35);
  --pfi-orange:      #e07b20;
  --pfi-dark:        #0a0a0f;
  --pfi-dark2:       #111118;
  --pfi-dark3:       #1a1a24;
  --pfi-card:        #15151f;
  --pfi-card2:       #1c1c28;
  --pfi-border:      rgba(201,149,42,.22);
  --pfi-border2:     rgba(201,149,42,.12);
  --pfi-text:        #f0e8d0;
  --pfi-muted:       #8a8070;
  --pfi-success:     #4ade80;
  --pfi-danger:      #f87171;
  --pfi-radius:      14px;
  --pfi-shadow:      0 4px 32px rgba(0,0,0,.6);
  --pfi-shadow-gold: 0 0 40px rgba(201,149,42,.15);
}

/* ── WRAPPER ──────────────────────────────────────── */
.rpt-portal-wrap {
  font-family: 'Inter', sans-serif;
  max-width: 820px;
  margin: 0 auto;
  padding: 24px 16px 80px;
  color: var(--pfi-text);
  background: transparent;
}

/* ─────────────────────────────────────────────────────
   LOGIN PAGE
───────────────────────────────────────────────────── */
.rpt-portal-wrap:not(.rpt-status-page) {
  /* Full-page dark BG with subtle gold grid pattern */
  min-height: 85vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.rpt-login-card {
  background: var(--pfi-card);
  border-radius: 22px;
  padding: 52px 44px 44px;
  box-shadow: var(--pfi-shadow), var(--pfi-shadow-gold);
  text-align: center;
  width: 100%;
  max-width: 480px;
  border: 1px solid var(--pfi-border);
  position: relative;
  overflow: hidden;
}
/* Gold top edge accent */
.rpt-login-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--pfi-gold), var(--pfi-gold-light), var(--pfi-gold), transparent);
}
/* Subtle gold radial glow in background */
.rpt-login-card::after {
  content: '';
  position: absolute;
  top: -60px; left: 50%;
  transform: translateX(-50%);
  width: 300px; height: 200px;
  background: radial-gradient(ellipse, rgba(201,149,42,.08) 0%, transparent 70%);
  pointer-events: none;
}

.rpt-login-icon { font-size: 46px; margin-bottom: 14px; }

.rpt-login-title {
  font-family: 'Cinzel', serif;
  font-size: 24px;
  font-weight: 700;
  color: var(--pfi-gold-light);
  margin: 0 0 10px;
  letter-spacing: 1px;
  text-shadow: 0 0 20px rgba(240,192,96,.3);
}
.rpt-login-sub {
  color: var(--pfi-muted);
  font-size: 14px;
  line-height: 1.65;
  margin-bottom: 32px;
}

/* ── FORM FIELDS ──────────────────────────────────── */
.rpt-field { text-align: left; margin-bottom: 18px; }
.rpt-field label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .8px;
  text-transform: uppercase;
  color: var(--pfi-gold);
  margin-bottom: 8px;
}
.rpt-field input {
  width: 100%;
  padding: 14px 18px;
  border: 1px solid var(--pfi-border);
  border-radius: 10px;
  font-size: 15px;
  font-family: 'Inter', sans-serif;
  background: var(--pfi-dark3);
  color: var(--pfi-text);
  transition: border-color .25s, box-shadow .25s;
  box-sizing: border-box;
}
.rpt-field input::placeholder { color: #4a4535; }
.rpt-field input:focus {
  outline: none;
  border-color: var(--pfi-gold);
  box-shadow: 0 0 0 3px rgba(201,149,42,.18);
}

/* ── BUTTON ───────────────────────────────────────── */
.rpt-btn-primary {
  width: 100%;
  padding: 16px;
  background: linear-gradient(135deg, var(--pfi-orange), var(--pfi-gold));
  color: #0a0a0f;
  font-family: 'Cinzel', serif;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  margin-top: 10px;
  transition: opacity .2s, transform .15s, box-shadow .2s;
  box-shadow: 0 4px 20px rgba(201,149,42,.35);
}
.rpt-btn-primary:hover {
  opacity: .92;
  transform: translateY(-1px);
  box-shadow: 0 6px 28px rgba(201,149,42,.5);
}
.rpt-btn-primary:active { transform: translateY(0); }

/* ── ALERT ────────────────────────────────────────── */
.rpt-alert { border-radius: 8px; padding: 12px 16px; margin-bottom: 18px; font-size: 14px; font-weight: 500; text-align: left; }
.rpt-alert-error { background: rgba(248,113,113,.12); border: 1px solid rgba(248,113,113,.35); color: #fca5a5; }

/* ─────────────────────────────────────────────────────
   STATUS PAGE — shared elements
───────────────────────────────────────────────────── */

/* ── FINANCE BAR ──────────────────────────────────── */
.rpt-finance-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}
.rpt-finance-item {
  background: var(--pfi-card);
  border: 1px solid var(--pfi-border2);
  border-radius: var(--pfi-radius);
  padding: 16px 18px;
  position: relative;
  overflow: hidden;
}
.rpt-finance-item::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 3px; height: 100%;
  background: linear-gradient(180deg, var(--pfi-gold), var(--pfi-orange));
}
.rpt-fi-overdue::before { background: var(--pfi-danger) !important; }
.rpt-fi-label {
  display: block;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .9px;
  color: var(--pfi-gold);
  margin-bottom: 7px;
}
.rpt-fi-value {
  display: block;
  font-family: 'Cinzel', serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--pfi-text);
}
.rpt-paid       { color: var(--pfi-success) !important; }
.rpt-overdue-val { color: var(--pfi-danger)  !important; }
.rpt-overdue-badge {
  display: inline-block;
  background: var(--pfi-danger);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 20px;
  margin-left: 6px;
  vertical-align: middle;
  letter-spacing: .6px;
}

/* ── ORDER HEADER ─────────────────────────────────── */
.rpt-order-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--pfi-card);
  border: 1px solid var(--pfi-border);
  border-radius: var(--pfi-radius);
  padding: 20px 24px;
  margin-bottom: 12px;
  position: relative;
  overflow: hidden;
}
.rpt-order-header::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--pfi-gold), var(--pfi-gold-light), var(--pfi-gold), transparent);
}
.rpt-order-title {
  font-family: 'Cinzel', serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--pfi-gold-light);
  margin: 0 0 4px;
  text-shadow: 0 0 15px rgba(240,192,96,.2);
}
.rpt-order-sub { font-size: 13px; color: var(--pfi-muted); margin: 0; }
.rpt-logout-btn {
  background: rgba(201,149,42,.12);
  border: 1px solid var(--pfi-border);
  color: var(--pfi-gold);
  text-decoration: none;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  transition: background .2s, border-color .2s;
  white-space: nowrap;
  letter-spacing: .3px;
}
.rpt-logout-btn:hover { background: rgba(201,149,42,.22); border-color: var(--pfi-gold); color: var(--pfi-gold-light); }

/* ── PROGRESS BAR ─────────────────────────────────── */
.rpt-progress-section {
  background: var(--pfi-card);
  border: 1px solid var(--pfi-border2);
  border-radius: var(--pfi-radius);
  padding: 18px 22px;
  margin-bottom: 12px;
}
.rpt-progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.rpt-progress-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .8px;
  color: var(--pfi-muted);
}
.rpt-progress-pct {
  font-family: 'Cinzel', serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--pfi-gold-light);
  text-shadow: 0 0 12px rgba(240,192,96,.35);
}
.rpt-progress-track {
  height: 8px;
  background: rgba(255,255,255,.06);
  border-radius: 99px;
  overflow: hidden;
}
.rpt-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--pfi-orange), var(--pfi-gold), var(--pfi-gold-light));
  border-radius: 99px;
  box-shadow: 0 0 10px rgba(201,149,42,.5);
  transition: width 1.2s cubic-bezier(.4,0,.2,1);
}

/* ── CURRENT STATUS CARD ──────────────────────────── */
.rpt-current-status-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--pfi-card);
  border: 1px solid var(--pfi-border);
  border-radius: var(--pfi-radius);
  padding: 22px 24px;
  margin-bottom: 12px;
  position: relative;
  overflow: hidden;
}
.rpt-current-status-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 80% 50%, rgba(201,149,42,.06) 0%, transparent 60%);
  pointer-events: none;
}
.rpt-current-pulse {
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--pfi-gold-light);
  flex-shrink: 0;
  box-shadow: 0 0 0 0 rgba(240,192,96,.5);
  animation: pfi-pulse 2.2s infinite;
}
@keyframes pfi-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(240,192,96,.6); }
  70%  { box-shadow: 0 0 0 10px rgba(240,192,96,0); }
  100% { box-shadow: 0 0 0 0 rgba(240,192,96,0); }
}
.rpt-current-info { flex: 1; }
.rpt-current-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--pfi-gold);
  margin-bottom: 5px;
  font-weight: 600;
}
.rpt-current-value {
  font-family: 'Cinzel', serif;
  font-size: 17px;
  font-weight: 700;
  color: var(--pfi-text);
  line-height: 1.3;
}
.rpt-current-time { font-size: 12px; color: var(--pfi-muted); margin-top: 5px; }
.rpt-current-step {
  font-family: 'Cinzel', serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--pfi-gold);
  opacity: .5;
  flex-shrink: 0;
}

/* ─────────────────────────────────────────────────────
   TIMELINE
───────────────────────────────────────────────────── */
.rpt-steps-section {
  background: var(--pfi-card);
  border: 1px solid var(--pfi-border2);
  border-radius: var(--pfi-radius);
  padding: 24px;
  margin-bottom: 12px;
}
.rpt-steps-title {
  font-family: 'Cinzel', serif;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .8px;
  text-transform: uppercase;
  color: var(--pfi-gold);
  margin: 0 0 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--pfi-border2);
}

.rpt-timeline { display: flex; flex-direction: column; }
.rpt-tl-item {
  display: flex;
  gap: 16px;
  position: relative;
  padding: 14px 0;
}
.rpt-tl-item:not(:last-child)::after {
  content: '';
  position: absolute;
  left: 15px;
  top: 44px;
  bottom: 0;
  width: 1px;
  background: linear-gradient(var(--pfi-border), transparent);
}
.rpt-tl-latest::after { background: linear-gradient(var(--pfi-gold-glow), transparent) !important; }

.rpt-tl-marker {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--pfi-dark3);
  border: 1px solid var(--pfi-gold);
  color: var(--pfi-gold-light);
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
  margin-top: 2px;
}
.rpt-tl-latest .rpt-tl-marker {
  background: linear-gradient(135deg, var(--pfi-orange), var(--pfi-gold));
  border-color: var(--pfi-gold-light);
  color: #0a0a0f;
  box-shadow: 0 0 16px rgba(201,149,42,.4);
}
.rpt-tl-dot-active {
  width: 11px; height: 11px;
  background: #0a0a0f;
  border-radius: 50%;
  display: block;
  animation: pfi-pulse 2.2s infinite;
}

.rpt-tl-body { flex: 1; }
.rpt-tl-label { font-size: 14px; font-weight: 600; color: var(--pfi-muted); line-height: 1.4; }
.rpt-tl-latest .rpt-tl-label { color: var(--pfi-text); font-size: 15px; }
.rpt-tl-time { font-size: 11px; color: rgba(138,128,112,.7); margin-top: 3px; letter-spacing: .2px; }
.rpt-tl-note {
  margin-top: 8px;
  font-size: 13px;
  color: var(--pfi-muted);
  background: rgba(201,149,42,.07);
  border-left: 2px solid var(--pfi-gold);
  padding: 7px 12px;
  border-radius: 0 6px 6px 0;
  line-height: 1.5;
}

/* ── PHOTO THUMBNAILS ─────────────────────────────── */
.rpt-tl-images {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.rpt-img-thumb {
  position: relative;
  width: 82px; height: 82px;
  border-radius: 8px;
  overflow: hidden;
  display: block;
  border: 1px solid var(--pfi-border);
  transition: border-color .2s, transform .2s, box-shadow .2s;
  text-decoration: none;
}
.rpt-img-thumb:hover {
  border-color: var(--pfi-gold);
  transform: scale(1.05);
  box-shadow: 0 0 16px rgba(201,149,42,.35);
}
.rpt-img-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rpt-img-overlay {
  position: absolute;
  inset: 0;
  background: rgba(10,10,15,.65);
  color: var(--pfi-gold-light);
  font-size: 11px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity .2s;
  letter-spacing: .5px;
}
.rpt-img-thumb:hover .rpt-img-overlay { opacity: 1; }

/* ── DOCUMENT LINKS ───────────────────────────────── */
.rpt-tl-docs { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.rpt-doc-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(201,149,42,.08);
  border: 1px solid var(--pfi-border);
  border-radius: 8px;
  padding: 8px 14px;
  text-decoration: none;
  color: var(--pfi-gold-light);
  font-size: 13px;
  font-weight: 500;
  transition: background .2s, border-color .2s;
  max-width: 320px;
}
.rpt-doc-link:hover { background: rgba(201,149,42,.16); border-color: var(--pfi-gold); color: var(--pfi-gold-light); }
.rpt-doc-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rpt-doc-arrow { font-size: 13px; opacity: .6; }

/* ── PAYMENT HISTORY ──────────────────────────────── */
.rpt-payment-section {
  background: var(--pfi-card);
  border: 1px solid var(--pfi-border2);
  border-radius: var(--pfi-radius);
  padding: 24px;
  margin-bottom: 12px;
}
.rpt-payment-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--pfi-border2);
  font-size: 14px;
}
.rpt-payment-row:last-child { border-bottom: none; }
.rpt-payment-label { font-weight: 600; color: var(--pfi-success); }
.rpt-payment-date  { color: var(--pfi-muted); font-size: 12px; }

/* ── PORTAL FOOTER ────────────────────────────────── */
.rpt-portal-footer {
  text-align: center;
  padding-top: 28px;
  font-size: 13px;
  color: var(--pfi-muted);
}
.rpt-portal-footer a { color: var(--pfi-gold); text-decoration: none; }
.rpt-portal-footer a:hover { color: var(--pfi-gold-light); }
.rpt-logout-link { display: block; margin-top: 8px; font-size: 12px; color: var(--pfi-muted); }

/* ── LIGHTBOX ─────────────────────────────────────── */
.rpt-lightbox { position: fixed; inset: 0; z-index: 99999; }
.rpt-lightbox-overlay { position: absolute; inset: 0; background: rgba(0,0,0,.92); cursor: pointer; }
.rpt-lightbox-inner {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%,-50%);
  max-width: 90vw; max-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.rpt-lightbox-img {
  max-width: 90vw; max-height: 85vh;
  border-radius: 10px;
  box-shadow: 0 20px 80px rgba(0,0,0,.8), 0 0 40px rgba(201,149,42,.15);
  display: block;
  border: 1px solid var(--pfi-border);
}
.rpt-lightbox-close {
  position: fixed;
  top: 20px; right: 24px;
  background: rgba(201,149,42,.15);
  border: 1px solid var(--pfi-border);
  color: var(--pfi-gold-light);
  font-size: 20px;
  width: 44px; height: 44px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s;
  z-index: 1;
}
.rpt-lightbox-close:hover { background: rgba(201,149,42,.3); }

/* ── RESPONSIVE ───────────────────────────────────── */
@media (max-width: 520px) {
  .rpt-login-card { padding: 36px 22px 30px; }
  .rpt-finance-bar { grid-template-columns: 1fr 1fr; }
  .rpt-order-header { flex-direction: column; align-items: flex-start; gap: 12px; }
  .rpt-current-status-card { flex-wrap: wrap; }
  .rpt-img-thumb { width: 68px; height: 68px; }
  .rpt-fi-value { font-size: 16px; }
}
