/**
 * FilmMerge r153.20 — Branded access page layout system.
 * Presentation only: authentication fields, actions, nonces, redirects and
 * plugin-owned handlers remain unchanged in the templates.
 */

html,
body.filmmerge-buyer-login-page,
body.filmmerge-filmmaker-login-page,
body.filmmerge-team-access-page,
body.filmmerge-portal-access-page {
  margin: 0;
  min-height: 100%;
}

body.filmmerge-buyer-login-page,
body.filmmerge-filmmaker-login-page,
body.filmmerge-team-access-page,
body.filmmerge-portal-access-page {
  color: #edf2f7;
  background-color: #02060d;
  font-family: 'Manrope', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.fmlog-shell,
.fmteam-shell,
.fm-access-shell {
  box-sizing: border-box;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(20px, 3.2vw, 42px);
  background-color: #02060d;
}

.fmlog-frame,
.fmteam-frame,
.fm-access-frame {
  position: relative;
  z-index: 1;
  width: min(100%, 1120px);
}

/* Buyer and filmmaker access: editorial left, glass form right. */
.fmlog-frame {
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(390px, .96fr);
  grid-template-areas:
    "intro login"
    "footer footer";
  gap: clamp(22px, 4vw, 58px);
  align-items: center;
}

.fmlog-intro {
  grid-area: intro;
  max-width: 560px;
  padding: clamp(12px, 2vw, 24px) 0;
}

.fmlog-logo,
.fmteam-logo {
  display: flex;
  justify-content: flex-start;
  margin-bottom: clamp(22px, 4vh, 38px);
}

.fmlog-logo a,
.fmteam-logo a,
.fm-access-top a {
  display: inline-flex;
}

.fmlog-logo img,
.fmteam-logo img {
  width: auto;
  height: clamp(36px, 4vw, 48px);
  max-width: 210px;
  object-fit: contain;
}

.fmlog-eyebrow,
.fmteam-eyebrow,
.fm-access-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 15px;
  padding: 8px 12px;
  border: 1px solid rgba(216, 175, 79, .24);
  border-radius: 999px;
  background: rgba(200, 151, 58, .08);
  color: #e7bd67;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.fmlog-title,
.fmteam-title,
.fm-access-head h1 {
  margin: 0 0 16px;
  color: #f6f1e8;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(2.7rem, 5.3vw, 4.8rem);
  line-height: .98;
  letter-spacing: -.035em;
  text-wrap: balance;
}

.fmlog-copy,
.fmteam-copy,
.fm-access-head p,
.fm-access-card p {
  margin: 0;
  color: #b4c2d0;
  font-size: 15px;
  line-height: 1.82;
}

.fmlog-links,
.fmteam-footer,
.fm-access-card__actions,
.fm-access-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.fmlog-links,
.fmteam-footer {
  margin-top: 24px;
}

.fmlog-links a,
.fmteam-footer a,
.fm-access-btn,
.fm-access-footer__links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 16px;
  border: 1px solid rgba(220, 231, 244, .18);
  border-radius: 999px;
  background: rgba(255, 255, 255, .035);
  color: #edf2f7;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  text-decoration: none;
  text-transform: uppercase;
  transition: border-color .2s ease, background-color .2s ease, transform .2s ease;
}

.fmlog-links a:hover,
.fmlog-links a:focus-visible,
.fmteam-footer a:hover,
.fmteam-footer a:focus-visible,
.fm-access-btn:hover,
.fm-access-btn:focus-visible,
.fm-access-footer__links a:hover,
.fm-access-footer__links a:focus-visible {
  border-color: rgba(231, 189, 103, .54);
  background: rgba(200, 151, 58, .1);
  transform: translateY(-1px);
}

.fmlog-links a.is-primary,
.fm-access-btn--primary {
  border-color: rgba(215, 174, 75, .62);
  background: linear-gradient(135deg, #dfbb69, #c8973a);
  color: #101316;
}

.fmlog-card,
.fmteam-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(199, 216, 236, .2);
  border-radius: 28px;
  background: rgba(5, 12, 23, .63);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .38), inset 0 1px 0 rgba(255, 255, 255, .06);
  backdrop-filter: blur(22px) saturate(1.18);
  -webkit-backdrop-filter: blur(22px) saturate(1.18);
}

.fmlog-card--login {
  grid-area: login;
  padding: clamp(24px, 3.5vw, 38px);
}

.fmlog-form,
.fmteam-form {
  display: grid;
  gap: 16px;
}

.fmlog-field label,
.fmteam-field label {
  display: block;
  margin-bottom: 8px;
  color: #d4deea;
  font-size: 13px;
  font-weight: 700;
}

.fmlog-field input,
.fmteam-field input {
  box-sizing: border-box;
  width: 100%;
  min-height: 52px;
  padding: 13px 15px;
  border: 1px solid rgba(161, 185, 211, .24);
  border-radius: 15px;
  outline: 0;
  background: rgba(4, 11, 21, .76);
  color: #f2f6fa;
  box-shadow: none;
}

.fmlog-field input:focus,
.fmteam-field input:focus {
  border-color: rgba(216, 175, 79, .66);
  box-shadow: 0 0 0 3px rgba(200, 151, 58, .12);
}

.fmlog-row,
.fmteam-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.fmlog-check,
.fmteam-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #b3c3d4;
  font-size: 13px;
}

.fmlog-check input,
.fmteam-check input {
  accent-color: #d7ae4b;
}

.fmlog-device-note,
.fmteam-subtle,
.fmlog-help,
.fmteam-help,
.fm-access-note__text,
.fm-access-footer {
  color: #9fb2c6;
  font-size: 12px;
  line-height: 1.65;
}

.fmlog-submit,
.fmteam-submit {
  width: 100%;
  min-height: 52px;
  border: 1px solid rgba(215, 174, 75, .62);
  border-radius: 999px;
  background: linear-gradient(135deg, #dfbb69, #c8973a);
  color: #101316;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
}

.fmlog-help {
  margin-top: 14px;
  text-align: center;
}

.fmlog-help a,
.fmteam-help a,
.fmteam-row a {
  color: #f2f5f8;
  text-decoration: none;
  border-bottom: 1px solid rgba(238, 242, 246, .28);
}

.fmlog-error,
.fmlog-success,
.fmteam-error,
.fmteam-success,
.fmteam-note {
  margin-bottom: 16px;
  padding: 12px 14px;
  border-radius: 14px;
  font-size: 13px;
  line-height: 1.55;
}

.fmlog-error,
.fmteam-error {
  border: 1px solid rgba(248, 113, 113, .3);
  background: rgba(248, 113, 113, .09);
  color: #ffd5d5;
}

.fmlog-success,
.fmteam-success {
  border: 1px solid rgba(72, 194, 128, .3);
  background: rgba(22, 107, 67, .14);
  color: #d2f4dd;
}

.fmteam-note {
  border: 1px solid rgba(215, 174, 75, .26);
  background: rgba(200, 151, 58, .09);
  color: #f0cf8c;
}

.fmlog-footer {
  grid-area: footer;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.fmlog-footer a {
  color: rgba(237, 242, 247, .8);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-decoration: none;
  text-transform: uppercase;
}

/* Internal sign-in uses the same transparent editorial / glass form composition. */
.fmteam-frame {
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(390px, .96fr);
  gap: clamp(22px, 4vw, 58px);
  align-items: center;
}

.fmteam-intro {
  max-width: 570px;
  padding: clamp(10px, 2vw, 24px) 0;
}

.fmteam-card--login {
  padding: clamp(24px, 3.5vw, 38px);
}

.fmteam-title {
  font-size: clamp(2.8rem, 5vw, 4.5rem);
}

.fmteam-side-note {
  margin-top: 22px;
  padding: 16px 0 0;
  border-top: 1px solid rgba(216, 175, 79, .2);
}

.fmteam-side-note strong {
  display: block;
  margin-bottom: 6px;
  color: #f3eadc;
  font-size: 14px;
}

.fmteam-side-note p {
  margin: 0;
  color: #aebdcd;
  font-size: 13px;
  line-height: 1.7;
}

.fmteam-meta {
  display: grid;
  gap: 12px;
  margin-bottom: 18px;
}

.fmteam-badge {
  display: inline-flex;
  width: fit-content;
  padding: 8px 12px;
  border: 1px solid rgba(215, 174, 75, .34);
  border-radius: 999px;
  background: rgba(200, 151, 58, .1);
  color: #f0c976;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.fmteam-help {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 16px;
}

/* Portal access: no outer card; the page content sits directly on the canvas. */
.fm-access-frame {
  display: grid;
  gap: 20px;
}

.fm-access-top {
  display: flex;
  justify-content: center;
}

.fm-access-top img {
  width: auto;
  height: clamp(40px, 5vw, 54px);
}

.fm-access-panel--unboxed {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.fm-access-head {
  max-width: 760px;
  margin: 0 auto 22px;
  text-align: center;
}

.fm-access-head h1 {
  margin-top: 14px;
  font-size: clamp(2.45rem, 5vw, 4rem);
}

.fm-access-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.fm-access-card {
  display: grid;
  align-content: start;
  gap: 14px;
  min-height: 260px;
  padding: clamp(22px, 3vw, 30px);
  border: 1px solid rgba(199, 216, 236, .18);
  border-radius: 24px;
  background: rgba(5, 12, 23, .58);
  box-shadow: 0 24px 64px rgba(0, 0, 0, .3), inset 0 1px 0 rgba(255, 255, 255, .05);
  backdrop-filter: blur(18px) saturate(1.15);
  -webkit-backdrop-filter: blur(18px) saturate(1.15);
}

.fm-access-card__kicker {
  color: #e0b45b;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.fm-access-card h2 {
  margin: 0;
  color: #f6f1e8;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(2rem, 3.4vw, 2.7rem);
  line-height: 1.03;
}

.fm-access-card__actions {
  margin-top: auto;
}

.fm-access-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .fmlog-card,
  .fmteam-card,
  .fm-access-card {
    background: rgba(5, 12, 23, .94);
  }
}

@media (max-width: 900px) {
  .fmlog-shell,
  .fmteam-shell,
  .fm-access-shell {
    align-items: flex-start;
  }

  .fmlog-frame,
  .fmteam-frame {
    grid-template-columns: 1fr;
    grid-template-areas:
      "intro"
      "login"
      "footer";
    width: min(100%, 660px);
    gap: 22px;
  }

  .fmteam-frame {
    display: grid;
  }

  .fmlog-intro,
  .fmteam-intro {
    max-width: none;
    padding-bottom: 0;
  }

  .fmlog-logo,
  .fmteam-logo {
    margin-bottom: 22px;
  }

  .fmlog-title,
  .fmteam-title {
    font-size: clamp(2.5rem, 9vw, 3.7rem);
  }

  .fmlog-footer {
    justify-content: flex-start;
  }
}

@media (max-width: 760px) {
  .fm-access-grid {
    grid-template-columns: 1fr;
  }

  .fm-access-card {
    min-height: 0;
  }
}

@media (max-width: 560px) {
  .fmlog-shell,
  .fmteam-shell,
  .fm-access-shell {
    padding: 18px 14px 26px;
  }

  .fmlog-card--login,
  .fmteam-card--login,
  .fm-access-card {
    padding: 20px;
    border-radius: 21px;
  }

  .fmlog-links,
  .fmteam-footer,
  .fmteam-help,
  .fmteam-row,
  .fm-access-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .fmlog-links a,
  .fmteam-footer a,
  .fm-access-btn,
  .fm-access-footer__links a {
    width: 100%;
  }

  .fm-access-footer__links {
    width: 100%;
  }
}

@media (max-height: 760px) and (min-width: 901px) {
  .fmlog-shell,
  .fmteam-shell,
  .fm-access-shell {
    align-items: flex-start;
    padding-top: 24px;
    padding-bottom: 24px;
  }

  .fmlog-logo,
  .fmteam-logo {
    margin-bottom: 20px;
  }

  .fmlog-title,
  .fmteam-title {
    font-size: clamp(2.55rem, 4.8vw, 4rem);
  }

  .fmlog-copy,
  .fmteam-copy {
    line-height: 1.65;
  }
}

/* r153.20 specificity lock: keep transparent editorial surfaces and a genuine
   glass treatment after the shared public/light presentation layers load. */
.fm-access-panel.fm-access-panel--unboxed,
.fmteam-intro .fmteam-side-note {
  background: transparent !important;
  border-right: 0 !important;
  border-bottom: 0 !important;
  border-left: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

html[data-theme="light"] .fmlog-card.fmlog-card--login,
html[data-theme="light"] .fmteam-card.fmteam-card--login,
html[data-theme="light"] .fm-access-card {
  background: rgba(255,255,255,.72) !important;
  border-color: rgba(84,64,36,.18) !important;
  box-shadow: 0 24px 64px rgba(49,35,11,.12), inset 0 1px 0 rgba(255,255,255,.78) !important;
  backdrop-filter: blur(22px) saturate(1.12) !important;
  -webkit-backdrop-filter: blur(22px) saturate(1.12) !important;
}
html[data-theme="light"] .fm-access-panel.fm-access-panel--unboxed,
html[data-theme="light"] .fmteam-intro .fmteam-side-note {
  background: transparent !important;
  box-shadow: none !important;
}

@media (prefers-color-scheme: light) {
  html:not([data-theme="dark"]) .fmlog-card.fmlog-card--login,
  html:not([data-theme="dark"]) .fmteam-card.fmteam-card--login,
  html:not([data-theme="dark"]) .fm-access-card {
    background: rgba(255,255,255,.72) !important;
    border-color: rgba(84,64,36,.18) !important;
    box-shadow: 0 24px 64px rgba(49,35,11,.12), inset 0 1px 0 rgba(255,255,255,.78) !important;
    backdrop-filter: blur(22px) saturate(1.12) !important;
    -webkit-backdrop-filter: blur(22px) saturate(1.12) !important;
  }
  html:not([data-theme="dark"]) .fm-access-panel.fm-access-panel--unboxed,
  html:not([data-theme="dark"]) .fmteam-intro .fmteam-side-note {
    background: transparent !important;
    box-shadow: none !important;
  }
}

/* r153.21 — Portal Access desktop viewport-fit refinement.
   Short viewports, browser zoom, and mobile retain natural scrolling. */
@media (min-width: 761px) and (min-height: 640px) {
  body.filmmerge-portal-access-page {
    overflow: hidden;
  }
  body.filmmerge-portal-access-page .fm-access-shell {
    height: 100vh;
    height: 100svh;
    min-height: 0;
    padding: clamp(12px, 2.2vh, 22px) clamp(20px, 3vw, 36px);
  }
  body.filmmerge-portal-access-page .fm-access-frame {
    max-height: calc(100svh - 24px);
    gap: clamp(10px, 1.8vh, 16px);
  }
  body.filmmerge-portal-access-page .fm-access-top img {
    height: clamp(34px, 4.4vh, 46px);
  }
  body.filmmerge-portal-access-page .fm-access-head {
    margin-bottom: clamp(10px, 1.8vh, 18px);
  }
  body.filmmerge-portal-access-page .fm-access-head h1 {
    margin-top: 9px;
    margin-bottom: 10px;
    font-size: clamp(2.2rem, 4.4vh, 3.35rem);
  }
  body.filmmerge-portal-access-page .fm-access-head p {
    line-height: 1.62;
  }
  body.filmmerge-portal-access-page .fm-access-grid {
    gap: clamp(12px, 1.8vh, 18px);
  }
  body.filmmerge-portal-access-page .fm-access-card {
    min-height: 0;
    padding: clamp(18px, 2.4vh, 25px);
    gap: clamp(9px, 1.5vh, 13px);
  }
  body.filmmerge-portal-access-page .fm-access-card h2 {
    font-size: clamp(1.8rem, 3.5vh, 2.35rem);
  }
  body.filmmerge-portal-access-page .fm-access-card p {
    line-height: 1.62;
  }
  body.filmmerge-portal-access-page .fm-access-footer {
    font-size: .78rem;
  }
}
@media (max-height: 639px), (max-width: 760px) {
  body.filmmerge-portal-access-page {
    overflow-y: auto;
  }
}
.fm-access-footer > span a {
  color: #e7bd67;
  font-weight: 750;
  text-decoration: none;
}
.fm-access-footer > span a:hover,
.fm-access-footer > span a:focus-visible {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* r153.26 — Buyer password recovery action, rebased on accepted r153.23. */
.fmlog-reset-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 7px 12px;
  border: 1px solid rgba(161, 185, 211, .22);
  border-radius: 999px;
  background: rgba(255,255,255,.025);
  color: #eef3f8;
  text-decoration: none;
  font-size: 12px;
  font-weight: 750;
  letter-spacing: .03em;
}

.fmlog-reset-link:hover,
.fmlog-reset-link:focus-visible {
  border-color: rgba(216, 175, 79, .5);
  color: #f4d88e;
  outline: none;
}

html[data-theme="light"] .fmlog-reset-link {
  color: #33281a;
  background: rgba(255,255,255,.68);
  border-color: rgba(84,64,36,.20);
}

html[data-theme="light"] .fmlog-reset-link:hover,
html[data-theme="light"] .fmlog-reset-link:focus-visible {
  color: #7d510d;
  background: #fff;
  border-color: rgba(138,91,15,.32);
}

@media (prefers-color-scheme: light) {
  html:not([data-theme="dark"]) .fmlog-reset-link {
    color: #33281a;
    background: rgba(255,255,255,.68);
    border-color: rgba(84,64,36,.20);
  }

  html:not([data-theme="dark"]) .fmlog-reset-link:hover,
  html:not([data-theme="dark"]) .fmlog-reset-link:focus-visible {
    color: #7d510d;
    background: #fff;
    border-color: rgba(138,91,15,.32);
  }
}

