/* Portal CSS part: film-only shares and the project-room shared-file preview. */
/* Split from portal.css (Phase 6): linked straight after portal.css and the earlier portal-*.css parts, in this order, so the cascade is unchanged. */

/* Film-only shares deliberately reuse the screening-room player without any
   portal navigation, project controls or sibling-film data. */

body.portal-page.film-share-page [hidden] {
  display: none;
}

body.portal-page.film-share-page:not([data-film-state="ready"]) .watch-screening-room,
body.portal-page.film-share-page:not([data-film-state="error"]) .film-share-error,
body.portal-page.film-share-page:not([data-film-state="password"]) .film-share-password,
body.portal-page.film-share-page:not([data-film-state="loading"]) .film-share-loading {
  display: none;
}

body.portal-page.film-share-page .film-share-header {
  pointer-events: none;
}

body.portal-page.film-share-page .film-share-brand {
  display: inline-flex;
  align-items: center;
}

body.portal-page.film-share-page .film-share-brand .logo {
  display: block;
  width: auto;
  max-width: min(12rem, 46vw);
  height: 2.75rem;
  object-fit: contain;
  object-position: left center;
}

body.portal-page.film-share-page .film-share-main {
  flex: 1;
}

body.portal-page.film-share-page .film-share-loading {
  min-height: 52vh;
  display: grid;
  place-items: center;
  color: var(--client-text-soft, rgba(var(--cream-rgb), 0.78));
  font-family: var(--client-type-body, var(--font-body));
  font-size: var(--rf-type-size-1rem, 1rem);
  line-height: 1.5;
  text-align: center;
}

body.portal-page.film-share-page .film-share-password {
  width: min(100%, 28rem);
  margin: clamp(6rem, 16vh, 10rem) auto 4rem;
  padding: var(--space-6, 24px);
  border: 1px solid var(--client-border);
  border-top-color: rgba(var(--rf-tone-neutral-rgb), 0.16);
  border-radius: var(--client-panel-radius);
  background: var(--client-panel);
  color: var(--client-text, var(--text-primary));
  box-shadow: var(--client-shadow);
  backdrop-filter: blur(28px) brightness(1.06) saturate(1.34);
  -webkit-backdrop-filter: blur(28px) brightness(1.06) saturate(1.34);
}

body.portal-page.film-share-page .film-share-password h1,
body.portal-page.film-share-page .film-share-password p {
  margin: 0;
}

body.portal-page.film-share-page .film-share-password h1 {
  font-family: var(--rf-type-heading-family);
  font-weight: var(--rf-type-heading-weight);
  line-height: var(--rf-type-leading-1-2);
  letter-spacing: var(--rf-type-heading-tracking);
  --rf-type-heading-size: var(--rf-type-size-1-75rem);
}

body.portal-page.film-share-page .film-share-password > p {
  margin-top: var(--space-2, 8px);
  color: var(--client-text-soft, rgba(var(--cream-rgb), 0.78));
}

body.portal-page.film-share-page .film-share-password form {
  display: grid;
  gap: var(--space-3, 12px);
  margin-top: var(--space-5, 20px);
}

body.portal-page.film-share-page .film-share-password label {
  font-weight: 600;
}

body.portal-page.film-share-page #film-share-password-error {
  min-height: 20px;
  color: var(--rf-tone-danger-ink);
  font-size: 0.875rem;
}

body.portal-page.film-share-page .film-share-copy .view-meta {
  grid-template-columns: minmax(0, 1fr);
}

body.portal-page.film-share-page .film-share-client-name {
  margin: 0;
  color: var(--orange, var(--orange));
  font-family: var(--rf-type-heading-family);
  font-weight: var(--rf-type-heading-weight);
  line-height: var(--rf-type-leading-1-35);
  --rf-type-heading-size: var(--rf-type-size-1-125rem);
}

body.portal-page.film-share-page .film-share-meta {
  margin: 0;
  color: var(--client-text-soft, rgba(var(--cream-rgb), 0.78));
  font-family: var(--client-type-body, var(--font-body));
  font-size: var(--rf-type-size-1rem, 1rem);
  font-weight: 600;
  line-height: 1.5;
}

body.portal-page.film-share-page .film-share-error {
  width: min(100%, 40rem);
  margin: clamp(8rem, 20vh, 14rem) auto 4rem;
  padding: 0 var(--client-shell-gutter, 32px);
  text-align: center;
}

body.portal-page.film-share-page .film-share-error h1 {
  margin: 0 0 var(--space-3, 12px);
  color: var(--client-text, var(--text-primary));
  font-family: var(--rf-type-heading-family);
  font-weight: var(--rf-type-heading-weight);
  letter-spacing: var(--rf-type-heading-tracking);
  line-height: var(--rf-type-leading-1-05);
  text-wrap: balance;
  --rf-type-heading-size: var(--rf-type-size-clamp-2rem-4vw-3rem);
}

body.portal-page.film-share-page .film-share-error p {
  max-width: 55ch;
  margin: 0;
  color: var(--client-text-soft, rgba(var(--cream-rgb), 0.78));
  font-family: var(--client-type-body, var(--font-body));
  font-size: var(--rf-type-size-1rem, 1rem);
  line-height: 1.6;
}

body.portal-page.film-share-page .film-share-error-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-3, 12px);
  margin-top: var(--space-6, 24px);
}

body.portal-page.film-share-page .film-share-error-actions > button,
body.portal-page.film-share-page .film-share-error-actions > a {
  min-width: 12rem;
}

@media (max-width: 640px) {
  body.portal-page.film-share-page .film-share-brand .logo {
    height: 2.25rem;
  }

  body.portal-page.film-share-page .film-share-error {
    margin-top: 6rem;
    padding: var(--space-6, 24px);
  }
}

/* DELIVERY AND REQUEST FLOWS — canonical client owner; generated pages keep only injected brand variables inline. */

body.delivery-page *,body.delivery-page  *::before,body.delivery-page  *::after { box-sizing: border-box; margin: 0; padding: 0; }

body.delivery-page {
    --bg: var(--client-brand-black);
    --bg-dark: color-mix(in srgb, var(--client-brand-black) 88%, white);
    --bg-card: linear-gradient(150deg, rgba(var(--rf-white-rgb), 0.055) 0%, rgba(var(--rf-white-rgb), 0.026) 42%, rgba(0,0,0,0.12) 100%);
    --bg-elevated: rgba(var(--rf-white-rgb), 0.09);
    --text: var(--client-brand-cream);
    --text-muted: rgb(201, 206, 201);
    --text-soft: rgb(149, 159, 152);
    --accent: var(--client-brand-orange);
    --accent-hover: var(--client-brand-orange-light);
    --accent-rgb: var(--client-brand-orange-rgb);
    --orange: var(--client-brand-orange);
    --orange-rgb: var(--client-brand-orange-rgb);
    --orange-light: var(--client-brand-orange-light);
    --orange-dark: color-mix(in srgb, var(--client-brand-orange) 82%, black);
    --cream: var(--client-brand-cream);
    --cream-rgb: var(--client-brand-cream-rgb);
    --client-delivery-border: rgba(var(--rf-white-rgb), 0.10);
    --client-delivery-border-card: rgba(var(--rf-white-rgb), 0.14);
    --font: var(--rf-type-delivery-family, 'Inter', system-ui, sans-serif);
    --font-object: var(--rf-type-heading-family);
    --radius-sm: 8px;
    --radius-md: 10px;
    --radius-lg: 14px;
  }

body.delivery-page {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    padding: 40px 20px 80px;
    position: relative;
  }

body.delivery-page::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background:
      radial-gradient(circle at 72% 34%, rgba(var(--accent-rgb),0.09), transparent 30%),
      radial-gradient(circle at 22% 78%, rgba(var(--client-brand-green-deep-rgb),0.18), transparent 38%),
      radial-gradient(ellipse at center, transparent 35%, rgba(0,0,0,0.58) 100%);
  }

body.delivery-page .page {
    min-height: calc(100vh - 120px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    position: relative;
    z-index: 1;
  }

body.delivery-page .brand-logo {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: var(--space-2, 8px);
    margin-bottom: 32px;
  }

body.delivery-page .brand-logo-mark {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    background: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
  }

body.delivery-page .brand-logo-mark svg { width: 20px; height: 20px; }

body.delivery-page .brand-logo-name {
    font-size: var(--rf-type-size-15px, 15px);
    font-weight: 700;
    color: var(--text);
    line-height: var(--rf-type-leading-1-15, 1.15);
  }

body.delivery-page .brand-logo-name span {
    display: block;
    margin-top: 1px;
    font-size: var(--rf-type-size-9px, 9px);
    font-weight: 500;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--text-soft);
  }

body.delivery-page .card {
    background: var(--bg-card);
    border: 1px solid var(--client-delivery-border-card);
    border-top-color: rgba(var(--rf-white-rgb), 0.16);
    border-radius: var(--radius-lg);
    padding: 24px;
    max-width: 600px;
    width: 100%;
    box-shadow:
      0 20px 48px rgba(0,0,0,0.38),
      0 4px 14px rgba(0,0,0,0.24),
      inset 0 1px 0 rgba(var(--rf-white-rgb), 0.08);
    backdrop-filter: blur(28px) brightness(1.06) saturate(1.34);
    -webkit-backdrop-filter: blur(28px) brightness(1.06) saturate(1.34);
    position: relative;
    z-index: 1;
    overflow: hidden;
  }

body.delivery-page .card-label {
    font-size: var(--rf-type-size-11px, 11px);
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
  }

body.delivery-page .card-label::before {
    content: '';
    display: inline-block;
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 8px rgba(var(--accent-rgb),0.6);
    flex-shrink: 0;
  }

body.delivery-page h1 {
    font-family: var(--rf-type-heading-family);
    font-weight: var(--rf-type-heading-weight);
    color: var(--text);
    margin-bottom: var(--space-2, 8px);
    line-height: var(--rf-type-leading-1-3);
    word-break: break-word;
    --rf-type-heading-size: var(--rf-type-size-24px);
  }

body.delivery-page .meta {
    font-size: var(--rf-type-size-14px, 14px);
    color: var(--text-muted);
    margin-bottom: var(--space-8, 32px);
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
    line-height: 1.55;
  }

body.delivery-page .meta-dot {
    width: 3px; height: 3px; border-radius: 50%;
    background: var(--text-muted); display: inline-block; flex-shrink: 0;
  }

body.delivery-page .delivery-filename {
    margin: 20px 0 24px;
    padding-left: var(--space-4, 16px);
    border-left: 2px solid var(--accent);
    min-width: 0;
  }

body.delivery-page .delivery-filename span,
body.delivery-page .delivery-facts dt {
    display: block;
    margin-bottom: 4px;
    color: var(--text-soft);
    font-size: 0.7rem;
    font-weight: 650;
    letter-spacing: 0.06em;
    line-height: var(--rf-type-leading-1-3, 1.3);
    text-transform: uppercase;
  }

body.delivery-page .delivery-filename strong {
    display: block;
    color: var(--text);
    font-size: var(--rf-type-size-0-9rem, 0.9rem);
    font-weight: 650;
    line-height: var(--rf-type-leading-1-45, 1.45);
    overflow-wrap: anywhere;
  }

body.delivery-page .delivery-facts {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px 20px;
    margin: 20px 0 24px;
  }

body.delivery-page .delivery-facts div { min-width: 0; }

body.delivery-page .delivery-facts dd {
    color: var(--text-muted);
    font-size: 0.8rem;
    line-height: var(--rf-type-leading-1-45, 1.45);
    overflow-wrap: anywhere;
  }

body.delivery-page .delivery-limit-note {
    margin: -8px 0 24px;
    color: var(--text-soft);
    font-size: 0.75rem;
    line-height: 1.55;
  }

body.delivery-page .divider { height: 1px; background: var(--client-delivery-border); margin-bottom: var(--space-8, 32px); }

body.delivery-page .divider-spaced { margin-top: 24px; }

body.delivery-page .error-code {
    font-size: var(--rf-type-size-56px, 56px);
    font-weight: 800;
    color: rgba(var(--cream-rgb), 0.16);
    margin-bottom: 12px;
    line-height: var(--rf-type-leading-1, 1);
  }

body.delivery-page .file-list {
    list-style: none; margin-bottom: 24px;
    max-height: 340px; overflow-y: auto;
    border: 1px solid var(--client-delivery-border); border-radius: var(--radius-md);
  }

body.delivery-page .delivery-list-heading {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: var(--space-3, 12px);
  }

body.delivery-page .delivery-list-heading h2 {
    color: var(--text);
    line-height: var(--rf-type-leading-1-3);
    --rf-type-heading-size: var(--rf-type-size-0-9rem);
  }

body.delivery-page .delivery-list-heading .loading {
    padding: 0;
    text-align: right;
  }

body.delivery-page .delivery-list-retry {
    margin-bottom: 12px;
  }

body.delivery-page .delivery-list-retry[hidden] { display: none; }

body.delivery-page .file-list::-webkit-scrollbar { width: 4px; }

body.delivery-page .file-list::-webkit-scrollbar-thumb { background: var(--bg-elevated); border-radius: 2px; }

body.delivery-page .file-list li {
    display: flex; align-items: center; justify-content: space-between;
    padding: var(--space-3, 12px) var(--space-4, 16px); border-bottom: 1px solid var(--client-delivery-border); gap: var(--space-3, 12px);
  }

body.delivery-page .file-list li:last-child { border-bottom: none; }

body.delivery-page .file-info { display: flex; flex: 1 1 auto; flex-direction: column; gap: 3px; min-width: 0; }

body.delivery-page .file-name { color: var(--text); overflow-wrap: anywhere; word-break: break-word; line-height: var(--rf-type-leading-1-35); --rf-type-heading-size: var(--rf-type-size-13px); }

body.delivery-page .file-size { font-size: var(--rf-type-size-12px, 12px); color: var(--text-soft); }

body.delivery-page .delivery-file-action { flex: 0 0 auto; }

body.delivery-page .delivery-password-field { margin-bottom: var(--space-3, 12px); }

body.delivery-page .delivery-password-label {
    display: block;
    margin-bottom: 8px;
    font-size: var(--rf-type-size-11px, 11px);
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-soft);
  }

body.delivery-page .msg { min-height: 18px; font-size: var(--rf-type-size-13px, 13px); color: #e87171; margin-top: 8px; }

body.delivery-page .loading { color: var(--text-muted); font-size: var(--rf-type-size-13px, 13px); padding: 8px 0; line-height: var(--rf-type-leading-1-45, 1.45); }

body.delivery-page .footer {
    margin-top: 24px;
    font-size: var(--rf-type-size-11px, 11px);
    color: var(--text-soft);
    position: relative;
    z-index: 1;
  }

@media (max-width: 500px) {
    body.delivery-page { padding: var(--space-8, 32px) var(--space-4, 16px) 60px; }
    body.delivery-page .page { justify-content: flex-start; min-height: calc(100vh - 88px); }
    body.delivery-page .brand-logo { margin-bottom: var(--space-8, 32px); }
    body.delivery-page .card { padding: 20px 16px; }
    body.delivery-page h1 { --rf-type-heading-size: var(--rf-type-size-22px); }
    body.delivery-page .file-list { max-height: 260px; }
    body.delivery-page .file-list li { align-items: flex-start; flex-direction: column; }
  }

@media (max-width: 760px) {
    body.delivery-page .delivery-facts { grid-template-columns: 1fr; }
    body.delivery-page .delivery-list-heading { align-items: flex-start; flex-direction: column; }
    body.delivery-page .delivery-list-heading .loading { text-align: left; }
  }

@media (prefers-reduced-motion: reduce) {
    body.delivery-page *,body.delivery-page  *::before,body.delivery-page  *::after {
      animation-duration: 1ms;
      animation-iteration-count: 1;
      scroll-behavior: auto;
      transition-duration: 1ms;
    }
  }

body.request-upload-page {
      --black:          var(--client-brand-black);
      --green-deep:     var(--client-brand-green-deep);
      --green-deep-rgb: var(--client-brand-green-deep-rgb);
      --orange:         var(--client-brand-orange);
      --orange-rgb:     var(--client-brand-orange-rgb);
      --orange-light:   var(--client-brand-orange-light);
      --orange-dark:    color-mix(in srgb, var(--client-brand-orange) 82%, black);
      --cream:          var(--client-brand-cream);
      --cream-rgb:      var(--client-brand-cream-rgb);
      --white:          white;
      --bg:             var(--client-brand-black);
      --bg-deep:        color-mix(in srgb, var(--client-brand-black) 82%, black);
      --bg-dark:        color-mix(in srgb, var(--client-brand-black) 88%, white);
      --bg-card:        linear-gradient(150deg, rgba(var(--rf-white-rgb), 0.055) 0%, rgba(var(--rf-white-rgb), 0.026) 42%, rgba(0,0,0,0.12) 100%);
      --bg-elevated:    rgba(var(--rf-white-rgb), 0.10);
      --bg-glass:       rgba(var(--rf-white-rgb), 0.07);
      --accent:         var(--client-brand-orange);
      --accent-hover:   var(--client-brand-orange-light);
      --text:           var(--client-brand-cream);
      --client-delivery-muted:    rgba(var(--rf-muted-rgb), 0.55);
      --client-delivery-border:         rgba(var(--rf-white-rgb), 0.10);
      --client-delivery-border-hi:      rgba(var(--rf-white-rgb), 0.20);
      --client-delivery-glass-fill:     rgba(var(--rf-white-rgb), 0.05);
      --client-delivery-glass-border:   rgba(var(--rf-white-rgb), 0.10);
      --font-display:   var(--rf-type-heading-family);
      --font-body:      var(--rf-type-delivery-family, 'Inter', system-ui, sans-serif);
      --radius-sm:  8px;
      --radius-md:  10px;
      --radius-lg:  14px;
      --client-delivery-progress-radius: 2px;
      --client-delivery-shadow-card: 0 2px 8px rgba(0,0,0,0.30), 0 1px 3px rgba(0,0,0,0.20);
      --client-delivery-shadow-lg:   0 12px 32px rgba(0,0,0,0.50);
    }

body.request-upload-page *,body.request-upload-page  *::before,body.request-upload-page  *::after { box-sizing: border-box; margin: 0; padding: 0; }

html:has(body.request-upload-page) { font-size: var(--rf-type-size-16px, 16px); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

body.request-upload-page {
      font-family: var(--font-body);
      font-weight: 400;
      line-height: 1.5;
      color: var(--text);
      background: var(--bg);
      background-attachment: fixed;
      min-height: 100vh;
    }

body.request-upload-page .state { display: none; }

body.request-upload-page .state.active { display: flex; }

body.request-upload-page .page {
      min-height: 100vh;
      flex-direction: column;
      align-items: center;
      justify-content: flex-start;
      padding: 40px 20px 80px;
    }

body.request-upload-page::before {
      content: '';
      position: fixed;
      inset: 0;
      background:
        radial-gradient(circle at 50% 0%, rgba(var(--orange-rgb), 0.10), transparent 34%),
        radial-gradient(circle at 18% 18%, rgba(var(--green-deep-rgb),0.18), transparent 32%);
      opacity: 1;
      pointer-events: none;
      z-index: 0;
    }

body.request-upload-page .brand-logo { display: flex; align-items: center; gap: var(--space-2, 8px); margin-bottom: 40px; }

body.request-upload-page .brand-logo-mark {
      width: 36px; height: 36px; background: var(--accent); border-radius: var(--client-control-radius);
      display: flex; align-items: center; justify-content: center; flex-shrink: 0;
    }

body.request-upload-page .brand-logo-mark svg { width: 20px; height: 20px; }

body.request-upload-page .brand-logo-name {
      font-family: var(--font-display); font-size: var(--rf-type-size-15px, 15px); font-weight: 700;
      letter-spacing: 0.02em; color: var(--text); line-height: var(--rf-type-leading-1-15, 1.15);
    }

body.request-upload-page .brand-logo-name span {
      display: block; font-size: var(--rf-type-size-9px, 9px); font-weight: 500; letter-spacing: 0.22em;
      text-transform: uppercase; color: var(--client-delivery-muted); margin-top: 1px;
    }

body.request-upload-page .card {
      width: 100%; max-width: 560px;
      background: var(--bg-card);
      border: 1px solid var(--client-delivery-glass-border);
      border-top-color: rgba(var(--rf-white-rgb), 0.16);
      border-radius: var(--radius-lg);
      backdrop-filter: blur(30px) brightness(1.08) saturate(1.5);
      -webkit-backdrop-filter: blur(30px) brightness(1.08) saturate(1.5);
      box-shadow:
        0 20px 48px rgba(0,0,0,0.38),
        0 4px 14px rgba(0,0,0,0.24),
        inset 0 1px 0 rgba(var(--rf-white-rgb), 0.08);
      overflow: hidden; position: relative; z-index: 1;
    }

body.request-upload-page .card-body { padding: 24px; }

body.request-upload-page .project-pill {
      display: inline-flex; align-items: center; gap: var(--space-2, 8px);
      background: rgba(var(--orange-rgb), 0.12);
      border: 1px solid rgba(var(--orange-rgb), 0.28);
      border-radius: var(--radius-pill); padding: var(--space-1, 4px) var(--space-3, 12px) var(--space-1, 4px) var(--space-2, 8px); margin-bottom: 24px;
    }

body.request-upload-page .project-pill-dot {
      width: 6px; height: 6px; border-radius: 50%; background: var(--accent);
      box-shadow: 0 0 8px rgba(var(--orange-rgb), 0.6);
    }

body.request-upload-page .project-pill-text {
      font-family: var(--font-body); font-size: var(--rf-type-size-11px, 11px); font-weight: 600;
      letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent);
    }

body.request-upload-page .upload-headline {
      font-family: var(--rf-type-heading-family);
      font-weight: var(--rf-type-heading-weight); line-height: var(--rf-type-leading-1-2); color: var(--text);
      margin-bottom: var(--space-2, 8px); letter-spacing: var(--rf-type-heading-tracking); --rf-type-heading-size: var(--rf-type-size-clamp-22px-5vw-28px);
    }

body.request-upload-page .upload-headline em { font-style: normal; color: var(--accent); }

body.request-upload-page .upload-message {
      font-size: var(--rf-type-size-15px, 15px); line-height: 1.65; color: rgba(var(--cream-rgb), 0.70); margin-bottom: var(--space-8, 32px);
    }

body.request-upload-page .dropzone {
      border: 1px dashed rgba(var(--orange-rgb), 0.34);
      border-radius: var(--radius-md);
      background: rgba(var(--orange-rgb), 0.04);
      padding: 32px 24px; text-align: center; cursor: pointer;
      transition: border-color 240ms ease, background 240ms ease;
      position: relative; margin-bottom: 20px;
    }

body.request-upload-page .dropzone:hover,body.request-upload-page  .dropzone.drag-over {
      border-color: rgba(var(--orange-rgb), 0.65);
      background: rgba(var(--orange-rgb), 0.08);
    }

body.request-upload-page .dropzone:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

body.request-upload-page .dropzone-icon {
      width: 48px; height: 48px; border-radius: var(--client-control-radius);
      background: rgba(var(--orange-rgb), 0.15);
      border: 1px solid rgba(var(--orange-rgb), 0.25);
      display: flex; align-items: center; justify-content: center; margin: 0 auto 16px;
    }

body.request-upload-page .dropzone-icon svg { width: 24px; height: 24px; color: var(--accent); stroke: var(--accent); }

body.request-upload-page .dropzone-label {
      font-family: var(--font-display); font-size: var(--rf-type-size-15px, 15px); font-weight: 600;
      color: var(--text); margin-bottom: var(--space-2, 8px);
    }

body.request-upload-page .dropzone-hint { font-size: var(--rf-type-size-13px, 13px); color: var(--client-delivery-muted); line-height: 1.5; }

body.request-upload-page .dropzone-hint strong { color: var(--accent); font-weight: 600; }

body.request-upload-page .dropzone-actions {
      display: flex; justify-content: center; gap: var(--space-2, 8px); flex-wrap: wrap;
      margin-top: 16px;
    }

body.request-upload-page .dropzone-input {
      display: none;
    }

body.request-upload-page .file-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; }

body.request-upload-page .file-list:empty { display: none; }

body.request-upload-page .file-row {
      display: flex; align-items: center; gap: 12px;
      background: rgba(var(--rf-white-rgb), 0.04);
      border: 1px solid rgba(var(--rf-white-rgb), 0.08);
      border-radius: var(--radius-sm); padding: var(--space-2, 8px) var(--space-4, 16px);
    }

body.request-upload-page .file-row.errored { border-color: rgba(224,82,82,0.40); }

body.request-upload-page .file-row-icon {
      width: 32px; height: 32px; border-radius: var(--client-control-radius);
      background: rgba(var(--orange-rgb), 0.12);
      display: flex; align-items: center; justify-content: center; flex-shrink: 0;
    }

body.request-upload-page .file-row-icon svg { width: 16px; height: 16px; stroke: var(--accent); }

body.request-upload-page .file-row-info { flex: 1; min-width: 0; }

body.request-upload-page .file-row-name {
      font-size: var(--rf-type-size-13px, 13px); font-weight: 500; color: var(--text);
      white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
      line-height: var(--rf-type-leading-1-3, 1.3); margin-bottom: 4px;
    }

body.request-upload-page .file-row-size { font-size: var(--rf-type-size-11px, 11px); color: var(--client-delivery-muted); }

body.request-upload-page .file-row-size.error { color: rgb(232, 113, 113); }

body.request-upload-page .file-row-progress-wrap { flex-shrink: 0; width: 96px; }

body.request-upload-page .file-row-progress-track {
      height: 4px; background: rgba(var(--rf-white-rgb), 0.08);
      border-radius: var(--client-delivery-progress-radius); overflow: hidden; margin-bottom: 4px;
    }

body.request-upload-page .file-row-progress-fill {
      height: 100%; border-radius: var(--client-delivery-progress-radius);
      background: linear-gradient(90deg, var(--accent), var(--accent-hover));
      transition: width 0.3s ease; width: 0%;
    }

body.request-upload-page .file-row-progress-pct { font-size: var(--rf-type-size-11px, 11px); color: var(--client-delivery-muted); text-align: right; }

body.request-upload-page .file-row-done {
      flex-shrink: 0; width: 28px; height: 28px; border-radius: 50%;
      background: rgba(100, 220, 140, 0.15);
      border: 1px solid rgba(100, 220, 140, 0.35);
      display: flex; align-items: center; justify-content: center;
    }

body.request-upload-page .file-row-done svg { width: 14px; height: 14px; stroke: rgb(100, 220, 140); stroke-width: 2.5; }

body.request-upload-page .reassurance {
      display: flex; align-items: center; gap: 8px;
      background: rgba(var(--rf-white-rgb), 0.03);
      border: 1px solid rgba(var(--rf-white-rgb), 0.07);
      border-radius: var(--radius-sm); padding: var(--space-2, 8px) var(--space-4, 16px); margin-bottom: 24px;
    }

body.request-upload-page .reassurance svg { width: 14px; height: 14px; stroke: rgba(var(--cream-rgb), 0.40); flex-shrink: 0; }

body.request-upload-page .reassurance-text { font-size: var(--rf-type-size-12px, 12px); color: rgba(var(--cream-rgb), 0.45); line-height: var(--rf-type-leading-1-4, 1.4); }

body.request-upload-page .msg-banner { display: none; }

body.request-upload-page .msg-banner.show {
      display: block; font-size: var(--rf-type-size-13px, 13px); line-height: var(--rf-type-leading-1-45, 1.45);
      color: rgb(232, 113, 113); background: rgba(224,82,82,0.08);
      border: 1px solid rgba(224,82,82,0.22);
      border-radius: var(--radius-sm); padding: var(--space-2, 8px) var(--space-4, 16px); margin-bottom: 16px;
    }

body.request-upload-page .msg-banner.info {
      color: rgba(var(--cream-rgb), 0.78);
      background: rgba(var(--orange-rgb), 0.08);
      border-color: rgba(var(--orange-rgb), 0.22);
    }

body.request-upload-page .gate-icon {
      width: 56px; height: 56px; border-radius: var(--client-panel-radius);
      background: rgba(var(--orange-rgb), 0.12);
      border: 1px solid rgba(var(--orange-rgb), 0.25);
      display: flex; align-items: center; justify-content: center; margin: 0 auto 24px;
    }

body.request-upload-page .gate-icon svg { width: 26px; height: 26px; stroke: var(--accent); stroke-width: 1.8; }

body.request-upload-page .gate-title {
      font-family: var(--rf-type-heading-family); font-weight: var(--rf-type-heading-weight);
      color: var(--text); text-align: center; margin-bottom: var(--space-2, 8px); letter-spacing: var(--rf-type-heading-tracking); --rf-type-heading-size: var(--rf-type-size-22px);
    }

body.request-upload-page .gate-subtitle {
      font-size: var(--rf-type-size-14px, 14px); color: var(--client-delivery-muted); text-align: center;
      margin-bottom: 32px; line-height: 1.55;
    }

body.request-upload-page .request-password-wrap { position: relative; margin-bottom: var(--space-3, 12px); }

body.request-upload-page .request-password-label {
      display: block; font-size: var(--rf-type-size-11px, 11px); font-weight: 600; letter-spacing: 0.08em;
      text-transform: uppercase; color: rgba(var(--cream-rgb), 0.50); margin-bottom: 8px;
    }

body.request-upload-page .pw-show-toggle {
      position: absolute; right: 4px; bottom: 4px;
      display: inline-flex; align-items: center; justify-content: center;
    }

body.request-upload-page .pw-show-toggle svg { stroke: currentColor; }

body.request-upload-page .pw-msg { display: none; }

body.request-upload-page .pw-msg.show {
      display: block; font-size: var(--rf-type-size-13px, 13px); color: rgb(232, 113, 113);
      text-align: center; margin: 4px 0 12px;
    }

body.request-upload-page .pw-help {
      font-size: var(--rf-type-size-12px, 12px); color: rgba(var(--cream-rgb), 0.38); text-align: center;
      margin-top: 16px; line-height: 1.5;
    }

body.request-upload-page .pw-help a { color: var(--accent); text-decoration: none; font-weight: 500; }

body.request-upload-page .pw-help a:hover { text-decoration: underline; }

body.request-upload-page .done-icon {
      width: 64px; height: 64px; border-radius: 50%;
      background: rgba(100, 220, 140, 0.12);
      border: 1px solid rgba(100, 220, 140, 0.30);
      display: flex; align-items: center; justify-content: center;
      margin: 0 auto 24px; box-shadow: 0 0 32px rgba(100,220,140,0.10);
    }

body.request-upload-page .done-icon svg { width: 30px; height: 30px; stroke: rgb(100, 220, 140); stroke-width: 2.5; }

body.request-upload-page .done-title {
      font-family: var(--rf-type-heading-family); font-weight: var(--rf-type-heading-weight);
      color: var(--text); text-align: center; margin-bottom: var(--space-2, 8px); letter-spacing: var(--rf-type-heading-tracking); --rf-type-heading-size: var(--rf-type-size-22px);
    }

body.request-upload-page .done-body {
      font-size: var(--rf-type-size-15px, 15px); color: rgba(var(--cream-rgb), 0.65); text-align: center;
      line-height: 1.65; margin-bottom: 32px;
    }

body.request-upload-page .done-divider { height: 1px; background: rgba(var(--rf-white-rgb), 0.07); margin: var(--space-8, 32px) 0; }

body.request-upload-page .done-closed {
      background: rgba(var(--rf-white-rgb), 0.03);
      border: 1px solid rgba(var(--rf-white-rgb), 0.07);
      border-radius: var(--radius-sm); padding: 16px; text-align: center;
    }

body.request-upload-page .done-closed-label {
      font-size: var(--rf-type-size-10px, 10px); font-weight: 600; letter-spacing: 0.10em;
      text-transform: uppercase; color: rgba(var(--cream-rgb), 0.32); margin-bottom: var(--space-2, 8px);
    }

body.request-upload-page .done-closed-text { font-size: var(--rf-type-size-13px, 13px); color: rgba(var(--cream-rgb), 0.50); line-height: 1.55; }

body.request-upload-page .request-primary-action-offset { margin-top: var(--space-1, 4px); }

body.request-upload-page .icon-email { width: 16px; height: 16px; stroke: currentColor; stroke-width: 1.6; }

body.request-upload-page .done-icon-muted { background: rgba(var(--rf-white-rgb), 0.04); border-color: rgba(var(--rf-white-rgb), 0.10); box-shadow: none; }

body.request-upload-page .icon-lock-muted { stroke: rgba(var(--cream-rgb),0.45); stroke-width: 1.8; }

body.request-upload-page .card-footer {
      border-top: 1px solid rgba(var(--rf-white-rgb), 0.06); padding: 16px 32px;
      display: flex; align-items: center; justify-content: center; gap: 6px;
    }

body.request-upload-page .card-footer-text { font-size: var(--rf-type-size-11px, 11px); color: rgba(var(--cream-rgb), 0.30); letter-spacing: 0.04em; }

body.request-upload-page .card-footer-brand {
      font-family: var(--font-display); font-size: var(--rf-type-size-11px, 11px); font-weight: 700;
      color: rgba(var(--cream-rgb), 0.40); letter-spacing: 0.02em;
    }

body.request-upload-page .card-footer-dot { width: 3px; height: 3px; border-radius: 50%; background: rgba(var(--cream-rgb), 0.20); }

@media (max-width: 560px) {
      body.request-upload-page .page { padding: var(--space-8, 32px) var(--space-4, 16px) 60px; }
      body.request-upload-page .card-body { padding: var(--space-8, 32px) var(--space-5, 20px) var(--space-6, 24px); }
      body.request-upload-page .card-footer { padding: var(--space-4, 16px) var(--space-5, 20px); }
      body.request-upload-page .dropzone { padding: var(--space-8, 32px) var(--space-4, 16px); }
      body.request-upload-page .brand-logo { margin-bottom: var(--space-8, 32px); }
      body.request-upload-page .file-row { align-items: flex-start; flex-wrap: wrap; }
      body.request-upload-page .file-row-right { width: 100%; padding-left: 44px; }
      body.request-upload-page .file-row-progress-wrap { width: 100%; }
    }

@media (prefers-reduced-motion: reduce) {
      body.request-upload-page *,body.request-upload-page  *::before,body.request-upload-page  *::after {
        animation-duration: 1ms;
        animation-iteration-count: 1;
        scroll-behavior: auto;
        transition-duration: 1ms;
      }
    }

/* Project room shared-file preview: calm, bounded, and outcome-honest. */
body.portal-page.project-landing-page .portal-file-row.is-previewing {
  border-color: rgba(var(--orange-rgb), 0.48);
  background: rgba(var(--orange-rgb), 0.09);
}

body.portal-page.project-landing-page .portal-project-file-preview {
  box-sizing: border-box;
  padding: var(--space-6, 24px);
}

body.portal-page.project-landing-page .file-preview-modal {
  width: min(1180px, calc(100vw - 48px));
  max-height: calc(100vh - 48px);
  max-height: calc(100dvh - 48px);
  min-height: 0;
  overflow: hidden;
}

body.portal-page.project-landing-page .file-preview-header {
  align-items: flex-start;
  gap: var(--space-4, 16px);
}

body.portal-page.project-landing-page .file-preview-heading {
  flex: 1 1 18rem;
  min-width: 0;
  padding-block: var(--space-1, 4px);
}

body.portal-page.project-landing-page .file-preview-heading h3 {
  overflow-wrap: anywhere;
}

body.portal-page.project-landing-page #file-preview-meta {
  margin-top: var(--space-1, 4px);
  color: var(--client-text-dim, rgba(var(--cream-rgb), 0.56));
  font-size: var(--rf-type-size-11px, 11px);
  line-height: var(--rf-type-leading-1-45, 1.45);
}

body.portal-page.project-landing-page .file-preview-actions {
  flex: 0 1 auto;
  flex-wrap: wrap;
  justify-content: flex-end;
}

body.portal-page.project-landing-page .file-preview-navigation {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2, 8px);
}

body.portal-page.project-landing-page #file-preview-position {
  min-width: 3.5rem;
  color: var(--client-text-dim, rgba(var(--cream-rgb), 0.56));
  font-size: var(--rf-type-size-11px, 11px);
  text-align: center;
}

body.portal-page.project-landing-page .file-preview-body {
  min-width: 0;
  min-height: 0;
  overscroll-behavior: contain;
}

body.portal-page.project-landing-page .file-preview-body iframe {
  height: min(680px, calc(100dvh - 190px));
  min-height: 360px;
  border-radius: var(--radius-sm, 8px);
  background: var(--white);
}

body.portal-page.project-landing-page .file-preview-body img {
  max-height: calc(100dvh - 190px);
  object-fit: contain;
}

body.portal-page.project-landing-page .file-preview-body video {
  max-height: calc(100dvh - 190px);
  margin-inline: auto;
}

body.portal-page.project-landing-page .file-preview-body[data-preview-kind="audio"] {
  display: grid;
  min-height: 240px;
  place-items: center;
}

body.portal-page.project-landing-page .file-preview-body audio {
  width: min(100%, 720px);
}

body.portal-page.project-landing-page .docx-preview,
body.portal-page.project-landing-page .portal-text-preview {
  width: min(100%, 75ch);
  margin-inline: auto;
  overflow-wrap: anywhere;
}

body.portal-page.project-landing-page .docx-preview {
  padding: var(--space-5, 20px);
  border-radius: var(--radius-sm, 8px);
  background: rgba(var(--cream-rgb), 0.045);
  color: var(--client-text-soft, rgba(var(--cream-rgb), 0.78));
}

body.portal-page.project-landing-page .portal-text-preview {
  margin-block: 0;
  color: var(--client-text-soft, rgba(var(--cream-rgb), 0.78));
  font-size: var(--rf-type-size-12px, 12px);
  line-height: 1.65;
  white-space: pre-wrap;
  word-break: break-word;
}

body.portal-page.project-landing-page .portal-preview-truncated {
  width: min(100%, 75ch);
  margin: var(--space-4, 16px) auto 0;
  color: var(--client-text-dim, rgba(var(--cream-rgb), 0.56));
  font-size: var(--rf-type-size-12px, 12px);
}

body.portal-page.project-landing-page .portal-preview-fallback {
  display: grid;
  width: min(100%, 38rem);
  min-height: 240px;
  margin-inline: auto;
  place-content: center;
  gap: var(--space-2, 8px);
  text-align: center;
}

body.portal-page.project-landing-page .portal-preview-fallback strong {
  color: var(--client-text, rgba(var(--rf-tone-neutral-rgb), 0.92));
  font-size: var(--rf-type-size-17px, 17px);
}

body.portal-page.project-landing-page .portal-preview-fallback p {
  max-width: 46ch;
  color: var(--client-text-soft, rgba(var(--cream-rgb), 0.78));
  font-size: var(--rf-type-size-13px, 13px);
  line-height: 1.55;
}

body.portal-dashboard-page.portal-page .client-masthead {
  flex-direction: column;
  gap: var(--space-4, 16px);
}

body.portal-dashboard-page.portal-page #portal-home-link {
  align-self: flex-start;
}

body.portal-dashboard-page.portal-page #portal-home-link[hidden] {
  display: none;
}

body.portal-dashboard-page.portal-page .portal-client-name {
  margin: 0;
  text-align: center;
}

body.portal-dashboard-page.portal-page .portal-session-control {
  align-self: center;
}

body.portal-dashboard-page.portal-page .portal-session-control[hidden] {
  display: none;
}

@media (max-width: 900px) {
  body.portal-page.project-landing-page .file-preview-header {
    flex-direction: column;
  }

  body.portal-page.project-landing-page .file-preview-actions {
    width: 100%;
    justify-content: flex-start;
  }
}
