/* Reelusion customer portal: light pearl + liquid glass */
.portal-body {
  --bg: #e8ebef;
  --bg-deep: #dce1e7;
  --surface: rgba(255, 255, 255, .68);
  --surface-solid: #f7f8f9;
  --surface-2: rgba(255, 255, 255, .46);
  --border: rgba(255, 255, 255, .76);
  --border-dark: rgba(24, 29, 36, .09);
  --text: #15191f;
  --muted: #68717c;
  --muted-2: #929aa4;
  --accent-1: #6489ff;
  --accent-2: #735ff0;
  --accent-3: #57dde8;
  --accent-gradient: linear-gradient(120deg, #57dde8, #6489ff 48%, #735ff0);
  --font-display: "Manrope", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: "DM Sans", -apple-system, BlinkMacSystemFont, sans-serif;
  --radius-md: 22px;
  --radius-lg: 34px;
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  font-family: var(--font-body);
  background:
    radial-gradient(circle at 8% 6%, rgba(255, 255, 255, .96), transparent 29rem),
    radial-gradient(circle at 91% 18%, rgba(188, 204, 227, .56), transparent 31rem),
    radial-gradient(circle at 45% 92%, rgba(219, 215, 249, .34), transparent 28rem),
    linear-gradient(145deg, var(--bg), var(--bg-deep));
  background-attachment: fixed;
}

.portal-body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: .24;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.09'/%3E%3C/svg%3E");
}

.portal-header {
  position: sticky;
  top: 16px;
  z-index: 100;
  width: min(1180px, calc(100% - 32px));
  min-height: 68px;
  margin: 16px auto 0;
  padding: 9px 10px 9px 18px;
  display: flex;
  align-items: center;
  gap: 24px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(255, 255, 255, .68), rgba(255, 255, 255, .34));
  box-shadow:
    0 18px 50px rgba(32, 36, 45, .11),
    inset 0 1px 0 rgba(255, 255, 255, .94),
    inset 0 -1px 0 rgba(255, 255, 255, .22);
  backdrop-filter: blur(24px) saturate(185%);
  -webkit-backdrop-filter: blur(24px) saturate(185%);
}

.portal-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-family: var(--font-display);
  font-size: 1.02rem;
  font-weight: 800;
  letter-spacing: -.045em;
  white-space: nowrap;
}

.portal-brand::before {
  content: "";
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  background: url("images/reelusion-mark.png") center / contain no-repeat;
  filter: drop-shadow(0 8px 16px rgba(61, 78, 110, .18));
}

.portal-brand span {
  color: var(--muted);
  font-weight: 600;
  letter-spacing: -.025em;
}

.portal-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex: 1;
}

.portal-nav a {
  position: relative;
  padding: 10px 13px;
  border-radius: 999px;
  color: #606873;
  font-size: .86rem;
  font-weight: 650;
  text-decoration: none;
  transition: color .25s ease, background .25s ease, transform .25s ease;
}

.portal-nav a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, .48);
  transform: translateY(-1px);
}

.portal-nav a.active {
  color: #fff;
  background: rgba(21, 25, 31, .95);
  box-shadow: 0 10px 24px rgba(20, 24, 30, .17);
}

.portal-header > form {
  margin: 0;
}

.portal-header .btn-ghost {
  min-height: 44px;
  padding-inline: 17px;
  color: #343a42;
  background: rgba(255, 255, 255, .58);
  border: 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9);
}

.portal-main {
  width: min(100%, 900px);
  max-width: none;
  margin: 0 auto;
  padding: clamp(56px, 7vw, 88px) 24px 110px;
}

.portal-main > h1,
.portal-card h1,
.dash-hero h1 {
  font-family: var(--font-display);
  letter-spacing: -.055em;
}

.portal-main > h1 {
  margin-bottom: 10px;
  font-size: clamp(2.15rem, 5vw, 3.8rem);
  line-height: 1;
  font-weight: 800;
}

.portal-muted {
  color: var(--muted);
  line-height: 1.65;
  margin-bottom: 25px;
}

.portal-hint {
  color: var(--muted);
  font-size: .84rem;
  line-height: 1.55;
  margin-top: 9px;
}

.portal-flash {
  padding: 14px 18px;
  margin-bottom: 22px;
  border: 1px solid rgba(255, 255, 255, .8);
  border-radius: 16px;
  color: var(--text);
  font-size: .9rem;
  box-shadow: 0 14px 35px rgba(37, 44, 55, .08);
  backdrop-filter: blur(18px);
}

.portal-flash-error { background: rgba(255, 229, 235, .78); }
.portal-flash-success { background: rgba(221, 248, 239, .82); }

.portal-card {
  position: relative;
  overflow: hidden;
  padding: clamp(24px, 4vw, 38px);
  margin-bottom: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  color: var(--text);
  background:
    radial-gradient(circle at 9% 0, rgba(255, 255, 255, .88), transparent 19rem),
    linear-gradient(145deg, rgba(255, 255, 255, .72), rgba(255, 255, 255, .34));
  box-shadow:
    0 28px 80px rgba(42, 49, 60, .11),
    inset 0 1px 0 rgba(255, 255, 255, .96);
  backdrop-filter: blur(28px) saturate(165%);
  -webkit-backdrop-filter: blur(28px) saturate(165%);
}

.portal-card h2 {
  margin: 0 0 18px;
  font-family: var(--font-display);
  font-size: 1.22rem;
  font-weight: 800;
  letter-spacing: -.035em;
}

.offer-hero { text-align: center; }
.offer-card { max-width: 760px; margin-inline: auto; }
.offer-price { padding-bottom: 26px; text-align: center; border-bottom: 1px solid var(--border-dark); }
.offer-price span, .offer-facts span, .offer-message > span { display: block; color: var(--muted); font-size: .78rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.offer-price strong { display: block; margin-top: 8px; font-family: var(--font-display); font-size: clamp(2.2rem, 7vw, 4.5rem); line-height: 1; letter-spacing: -.07em; }
.offer-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 24px 0; }
.offer-facts > div { padding: 18px; border: 1px solid var(--border); border-radius: 18px; background: rgba(255,255,255,.42); }
.offer-facts strong { display: block; margin-top: 7px; font-size: 1rem; }
.offer-message { padding: 20px; margin: 22px 0; border-radius: 18px; background: rgba(255,255,255,.38); }
.offer-message p { margin: 9px 0 0; color: var(--muted); line-height: 1.65; white-space: pre-line; }
.offer-actions { display: flex; gap: 10px; margin-top: 28px; }
.offer-actions form { flex: 1; }
.offer-actions .btn { width: 100%; justify-content: center; }
.offer-reject { color: #8d3343 !important; }
.offer-privacy { margin: 14px 0 0; color: var(--muted-2); font-size: .76rem; line-height: 1.5; text-align: center; }

@media (max-width: 620px) {
  .offer-facts { grid-template-columns: 1fr; }
  .offer-actions { flex-direction: column; }
}

.portal-auth-wrap {
  max-width: 480px;
  margin: clamp(3vh, 7vh, 80px) auto 0;
}

.portal-auth-wrap::before {
  content: "";
  display: block;
  width: 74px;
  height: 74px;
  margin: 0 auto -16px;
  position: relative;
  z-index: 2;
  border-radius: 24px;
  background:
    url("images/reelusion-mark.png") center / 64% no-repeat,
    linear-gradient(145deg, rgba(255, 255, 255, .94), rgba(255, 255, 255, .48));
  box-shadow: 0 20px 52px rgba(35, 43, 56, .16), inset 0 1px 0 #fff;
  backdrop-filter: blur(22px);
  animation: portalLogoFloat 5s ease-in-out infinite;
}

.portal-auth-wrap .portal-card {
  padding-top: 52px;
}

.portal-auth-wrap h1 {
  margin: 0 0 8px;
  text-align: center;
  font-size: clamp(2rem, 6vw, 2.8rem);
  font-weight: 800;
}

.portal-auth-wrap .portal-muted {
  max-width: 34ch;
  margin-inline: auto;
  text-align: center;
}

.portal-card label {
  display: block;
  margin: 16px 0 7px;
  color: #343a42;
  font-size: .82rem;
  font-weight: 700;
}

.portal-card label:first-of-type { margin-top: 0; }

.portal-card input[type="text"],
.portal-card input[type="email"],
.portal-card input[type="password"],
.portal-card textarea {
  width: 100%;
  min-height: 50px;
  padding: 12px 15px;
  border: 1px solid rgba(31, 38, 48, .1);
  border-radius: 15px;
  outline: none;
  color: var(--text);
  background: rgba(255, 255, 255, .67);
  box-shadow: inset 0 1px 2px rgba(34, 41, 52, .04);
  font: inherit;
  font-size: .94rem;
  transition: border-color .25s ease, box-shadow .25s ease, background .25s ease;
}

.portal-card textarea {
  min-height: 112px;
  resize: vertical;
}

.portal-card input:focus,
.portal-card textarea:focus {
  border-color: rgba(100, 137, 255, .48);
  background: rgba(255, 255, 255, .9);
  box-shadow: 0 0 0 4px rgba(100, 137, 255, .1);
}

.portal-body .btn {
  min-height: 46px;
  padding: 11px 20px;
  border: 0;
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: .9rem;
  font-weight: 750;
  text-decoration: none;
  transition: transform .25s ease, box-shadow .25s ease, background .25s ease;
}

.portal-body .btn:hover { transform: translateY(-2px); }

.portal-body .btn-primary {
  color: #fff;
  background: #171a20;
  box-shadow: 0 14px 30px rgba(20, 24, 30, .19);
}

.portal-body .btn-primary:hover {
  background: #30343b;
  box-shadow: 0 18px 38px rgba(20, 24, 30, .23);
}
.portal-body .btn-secondary { color: #303740; background: rgba(255, 255, 255, .7); }
.portal-body .btn-danger { color: #9b3043; background: rgba(255, 225, 232, .78); }
.portal-body .btn-lg { min-height: 52px; padding-inline: 25px; }

.portal-radio-row {
  display: flex;
  gap: 12px;
  margin: 9px 0 5px;
  flex-wrap: wrap;
}

.portal-radio-row label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 10px 13px;
  border-radius: 13px;
  background: rgba(255, 255, 255, .5);
  font-weight: 600;
}

.portal-table {
  width: 100%;
  border-collapse: collapse;
}

.portal-table th,
.portal-table td {
  padding: 13px 10px;
  border-bottom: 1px solid var(--border-dark);
  text-align: left;
  vertical-align: top;
  font-size: .9rem;
}

.portal-table th {
  width: 40%;
  color: var(--muted);
  font-weight: 650;
}

.portal-doc-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border-dark);
}

.portal-doc-row:last-child { border-bottom: 0; }
.portal-doc-row strong { display: block; }
.portal-doc-row span { font-size: .8rem; }

.portal-video {
  display: block;
  width: 100%;
  max-height: 480px;
  border-radius: 22px;
  background: #080a0e;
  box-shadow: 0 22px 55px rgba(13, 17, 23, .19);
}

.portal-content-actions { margin-top: 12px; }

.portal-accepted-box {
  margin-top: 18px;
  padding: 20px;
  border: 1px solid rgba(78, 168, 137, .2);
  border-radius: 20px;
  background: rgba(223, 248, 239, .62);
}

.portal-danger-zone {
  border-color: rgba(164, 72, 91, .13);
  background: linear-gradient(145deg, rgba(255, 246, 248, .74), rgba(255, 255, 255, .34));
}

.portal-danger-zone h2 { color: #8d394a; }

/* Dashboard */
.dash-hero {
  margin-bottom: 34px;
  text-align: center;
  animation: portalRise .65s ease both;
}

.dash-eyebrow {
  display: inline-block;
  padding: 8px 16px;
  margin-bottom: 18px;
  border: 1px solid rgba(255, 255, 255, .82);
  border-radius: 999px;
  color: #4e5661;
  background: rgba(255, 255, 255, .5);
  box-shadow: inset 0 1px 0 #fff;
  backdrop-filter: blur(18px);
  font-size: .84rem;
  font-weight: 650;
}

.dash-hero h1 {
  margin: 0 0 12px;
  font-size: clamp(2.25rem, 6vw, 4.2rem);
  line-height: .98;
  font-weight: 800;
}

.dash-sub {
  max-width: 49ch;
  margin: 0 auto;
  font-size: 1.02rem;
}

.dash-timeline-card { animation: portalRise .65s ease .1s both; }
.dash-timeline { list-style: none; padding: 0; margin: 0; }

.dash-step {
  position: relative;
  display: flex;
  gap: 18px;
  padding-bottom: 27px;
  opacity: 0;
  animation: portalRise .5s ease forwards;
  animation-delay: calc(var(--d) * .1s + .16s);
}

.dash-step:last-child { padding-bottom: 0; }

.dash-step-icon {
  position: relative;
  z-index: 1;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .85);
  border-radius: 50%;
  color: var(--muted);
  background: rgba(255, 255, 255, .64);
  box-shadow: 0 10px 24px rgba(43, 51, 64, .09), inset 0 1px 0 #fff;
  font-family: var(--font-display);
  font-weight: 800;
}

.dash-step:not(:last-child) .dash-step-icon::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  width: 2px;
  height: 28px;
  transform: translateX(-50%);
  background: rgba(37, 44, 54, .12);
}

.dash-step.done .dash-step-icon {
  color: #fff;
  border-color: transparent;
  background: var(--accent-gradient);
  background-size: 180% 100%;
  animation: portalGradient 4.5s ease-in-out infinite alternate;
}

.dash-step.done .dash-step-icon svg { width: 21px; height: 21px; }
.dash-step.done:not(:last-child) .dash-step-icon::after { background: #7187e9; }

.dash-step.current .dash-step-icon {
  color: var(--text);
  box-shadow: 0 0 0 5px rgba(100, 137, 255, .11), 0 13px 28px rgba(42, 49, 60, .12);
  animation: dashPulse 1.8s ease-in-out infinite;
}

.dash-step-body { padding-top: 2px; }
.dash-step-body strong { display: block; margin-bottom: 3px; font-size: 1rem; }
.dash-step-body span { color: var(--muted); font-size: .87rem; line-height: 1.5; }
.dash-next-btn { margin-top: 28px; }
.dash-done-note { margin-top: 24px; color: var(--muted); }

/* Read-only CMS preview */
.portal-preview-bar {
  position: sticky;
  top: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 12px clamp(18px, 4vw, 54px);
  color: #fff;
  background: linear-gradient(110deg, #10131a, #262d3b);
  box-shadow: 0 10px 30px rgba(15, 18, 25, .18);
}

.portal-preview-bar div { display: flex; align-items: baseline; gap: 12px; }
.portal-preview-bar strong { font-family: var(--font-display); }
.portal-preview-bar span { color: rgba(255, 255, 255, .72); font-size: .9rem; }
.portal-preview-bar .btn-preview-exit { color: #11141a; background: #fff; white-space: nowrap; }
.portal-preview-bar + .portal-header { top: 72px; }

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

@keyframes portalLogoFloat {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50% { transform: translateY(-7px) rotate(2deg); }
}

@keyframes portalGradient {
  from { background-position: 0 50%; }
  to { background-position: 100% 50%; }
}

@keyframes dashPulse {
  0%, 100% { box-shadow: 0 0 0 5px rgba(100, 137, 255, .11), 0 13px 28px rgba(42, 49, 60, .12); }
  50% { box-shadow: 0 0 0 9px rgba(100, 137, 255, .045), 0 13px 28px rgba(42, 49, 60, .12); }
}

@media (max-width: 940px) {
  .portal-header {
    border-radius: 28px;
    flex-wrap: wrap;
    gap: 10px 16px;
    padding: 12px 14px;
  }

  .portal-nav {
    order: 3;
    width: 100%;
    justify-content: flex-start;
    overflow-x: auto;
    padding-top: 5px;
    scrollbar-width: none;
  }

  .portal-nav::-webkit-scrollbar { display: none; }
  .portal-header > form { margin-left: auto; }
}

@media (max-width: 640px) {
  .portal-header {
    top: 8px;
    width: calc(100% - 16px);
    margin-top: 8px;
  }

  .portal-brand span { display: none; }
  .portal-header .btn-ghost { min-height: 40px; padding-inline: 13px; font-size: .8rem; }
  .portal-nav a { padding: 8px 11px; font-size: .8rem; }
  .portal-main { padding: 46px 16px 80px; }
  .portal-card { padding: 24px 19px; border-radius: 26px; }
  .portal-table { display: block; overflow-x: auto; }
  .portal-doc-row { align-items: flex-start; flex-direction: column; }

  .portal-preview-bar,
  .portal-preview-bar div {
    align-items: flex-start;
    flex-direction: column;
  }

  .portal-preview-bar { gap: 10px; }
  .portal-preview-bar div { gap: 3px; }
  .portal-preview-bar + .portal-header { top: 128px; }
}

@media (prefers-reduced-motion: reduce) {
  .portal-body *,
  .portal-body *::before,
  .portal-body *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
}
.mfa-card{max-width:580px}.mfa-qr{display:grid;place-items:center;width:222px;min-height:222px;margin:26px auto;padding:16px;border-radius:22px;background:#fff;box-shadow:0 22px 55px rgba(20,30,45,.14)}.mfa-secret{display:grid;gap:8px;text-align:center}.mfa-secret span{color:#697586;font-size:.8rem}.mfa-secret code{overflow-wrap:anywhere;padding:11px;border-radius:12px;background:#e8edf2;color:#17202b}.mfa-recovery-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:26px 0}.mfa-recovery-grid code{padding:13px;border-radius:11px;background:#e8edf2;color:#17202b;text-align:center;font-weight:750}@media(max-width:560px){.mfa-recovery-grid{grid-template-columns:1fr}}
.portal-project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.portal-project-card {
  display: flex;
  min-height: 220px;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
}

.portal-project-card.is-selected {
  outline: 2px solid rgba(112, 92, 255, .55);
}

.portal-project-card-head {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
}

.portal-project-card form,
.portal-project-card .btn {
  margin-top: auto;
}

.portal-new-project-card {
  border-style: dashed;
}
