/* V8.5 — polished universal upload + publication media integrity UI */
:root{
  --v85-upload-bg:#fff;--v85-upload-soft:#f7f9fb;--v85-upload-line:#d9e2e8;--v85-upload-line-strong:#c4d0d8;
  --v85-upload-text:#07131c;--v85-upload-muted:#4d6270;--v85-upload-gold:#d5a021;--v85-upload-gold-soft:#fff7df;
  --v85-upload-ok:#13795b;--v85-upload-ok-soft:#edf9f4;--v85-upload-danger:#b42336;--v85-upload-danger-soft:#fff1f3;
  --v85-upload-shadow:0 10px 28px rgba(11,38,61,.06)
}
[data-bs-theme="dark"]{
  --v85-upload-bg:#10232e;--v85-upload-soft:#0b1b24;--v85-upload-line:#294651;--v85-upload-line-strong:#385965;
  --v85-upload-text:#f7fbfd;--v85-upload-muted:#bdcbd2;--v85-upload-gold-soft:#2a261b;
  --v85-upload-ok:#6bdbb4;--v85-upload-ok-soft:#112d28;--v85-upload-danger:#ff9aa7;--v85-upload-danger-soft:#321b22;
  --v85-upload-shadow:0 12px 30px rgba(0,0,0,.2)
}
.smart-upload-native{position:absolute!important;width:1px!important;height:1px!important;opacity:0!important;pointer-events:none!important;overflow:hidden!important;margin:0!important;padding:0!important}
.smart-upload-v85{margin:.55rem 0 0;color:var(--v85-upload-text);font-family:inherit;min-width:0}
.smart-upload-drop-v85{min-height:112px;border:1.5px dashed var(--v85-upload-line-strong);border-radius:16px;background:var(--v85-upload-soft);padding:15px 16px;display:grid;grid-template-columns:46px minmax(0,1fr) auto;align-items:center;gap:12px;cursor:pointer;outline:none;transition:.18s ease;color:var(--v85-upload-text)}
.smart-upload-drop-v85:hover,.smart-upload-drop-v85:focus-visible,.smart-upload-drop-v85.is-dragging{border-color:var(--v85-upload-gold);background:color-mix(in srgb,var(--v85-upload-gold) 8%,var(--v85-upload-bg));box-shadow:0 0 0 4px color-mix(in srgb,var(--v85-upload-gold) 12%,transparent);transform:translateY(-1px)}
.smart-upload-icon-v85,.smart-upload-file-icon-v85{width:46px;height:46px;border-radius:13px;display:grid;place-items:center;background:var(--v85-upload-bg);border:1px solid var(--v85-upload-line);color:var(--v85-upload-gold);font-size:1.2rem;box-shadow:0 6px 18px rgba(11,38,61,.05)}
.smart-upload-copy-v85{display:grid;gap:3px;min-width:0}.smart-upload-copy-v85>strong{font-size:.92rem;font-weight:850;color:var(--v85-upload-text)}.smart-upload-copy-v85>small{font-size:.79rem;line-height:1.55;color:var(--v85-upload-muted)}
.smart-upload-meta-v85{display:flex;flex-wrap:wrap;gap:5px;margin-top:4px}.smart-upload-meta-v85 b{font-size:.69rem;font-weight:750;color:var(--v85-upload-muted);border:1px solid var(--v85-upload-line);background:var(--v85-upload-bg);border-radius:999px;padding:3px 7px}.smart-upload-meta-v85 b.is-required{color:#9a6510;border-color:color-mix(in srgb,var(--v85-upload-gold) 50%,var(--v85-upload-line));background:var(--v85-upload-gold-soft)}
.smart-upload-choose-v85{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:38px;border:1px solid var(--v85-upload-line-strong)!important;background:var(--v85-upload-bg)!important;color:var(--v85-upload-text)!important;border-radius:11px!important;font-weight:800!important;padding:.48rem .78rem!important;white-space:nowrap}
.smart-upload-file-v85{border:1px solid var(--v85-upload-line);background:var(--v85-upload-bg);border-radius:16px;padding:14px 15px;box-shadow:var(--v85-upload-shadow)}
.smart-upload-file-head-v85{display:grid;grid-template-columns:42px minmax(0,1fr) auto;align-items:center;gap:10px}.smart-upload-file-icon-v85{width:42px;height:42px;border-radius:12px;background:var(--v85-upload-soft);box-shadow:none}.smart-upload-file-name-v85{display:grid;min-width:0}.smart-upload-file-name-v85 strong{font-size:.88rem;color:var(--v85-upload-text);font-weight:850;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.smart-upload-file-name-v85 small{font-size:.74rem;color:var(--v85-upload-muted)}.smart-upload-percent-v85{font-size:.9rem;font-weight:900;color:var(--v85-upload-text);font-variant-numeric:tabular-nums}
.smart-upload-progress-v85{height:8px;border-radius:999px;background:var(--v85-upload-soft);border:1px solid color-mix(in srgb,var(--v85-upload-line) 82%,transparent);overflow:hidden;margin:11px 0 8px}.smart-upload-progress-v85>span{display:block;height:100%;border-radius:inherit;background:linear-gradient(90deg,var(--v85-upload-gold),#f0cf69);transition:width .12s linear}
.smart-upload-status-v85{display:flex;align-items:center;justify-content:space-between;gap:10px;color:var(--v85-upload-muted);font-size:.76rem;min-height:20px}.smart-upload-status-v85 [data-smart-status]{display:inline-flex;align-items:center;gap:5px}.smart-upload-actions-v85{display:flex;flex-wrap:wrap;gap:6px;margin-top:8px}.smart-upload-actions-v85 .btn{border-radius:9px;font-weight:750;font-size:.74rem}
.smart-upload-v85.is-complete .smart-upload-file-v85{border-color:color-mix(in srgb,var(--v85-upload-ok) 45%,var(--v85-upload-line));background:var(--v85-upload-ok-soft)}.smart-upload-v85.is-complete .smart-upload-file-icon-v85,.smart-upload-v85.is-complete [data-smart-status]{color:var(--v85-upload-ok)}
.smart-upload-v85.is-error .smart-upload-file-v85{border-color:color-mix(in srgb,var(--v85-upload-danger) 55%,var(--v85-upload-line));background:var(--v85-upload-danger-soft)}.smart-upload-v85.is-error .smart-upload-file-icon-v85,.smart-upload-v85.is-error [data-smart-status]{color:var(--v85-upload-danger)}
.smart-upload-v85.is-paused [data-smart-status]{color:var(--v85-upload-gold)}
.smart-upload-attention-v85{animation:v85UploadAttention .85s ease}@keyframes v85UploadAttention{0%,100%{transform:none}30%{transform:translateX(-5px)}60%{transform:translateX(5px)}}
[data-bs-theme="dark"] .smart-upload-v85 .btn-outline-dark{color:var(--v85-upload-text);border-color:var(--v85-upload-line-strong)}

.publication-upload-zone-v85{border:1px solid var(--v85-upload-line);border-radius:20px;background:color-mix(in srgb,var(--v85-upload-soft) 72%,var(--v85-upload-bg));padding:18px}
.publication-upload-intro-v85{display:flex;align-items:center;gap:12px;padding:2px 2px 16px;margin-bottom:2px;border-bottom:1px solid var(--v85-upload-line)}.publication-upload-intro-v85>span{width:44px;height:44px;border-radius:13px;display:grid;place-items:center;background:linear-gradient(145deg,#f1d170,var(--v85-upload-gold));color:#142735;font-size:1.2rem}.publication-upload-intro-v85>div{display:grid;gap:2px}.publication-upload-intro-v85 strong{color:var(--v85-upload-text);font-weight:900}.publication-upload-intro-v85 small{color:var(--v85-upload-muted);line-height:1.6}
.upload-field-shell-v85{height:100%;border:1px solid var(--v85-upload-line);background:var(--v85-upload-bg);border-radius:17px;padding:14px}.upload-field-shell-v85.is-primary{padding:16px;border-color:color-mix(in srgb,var(--v85-upload-gold) 38%,var(--v85-upload-line));box-shadow:0 8px 24px rgba(11,38,61,.04)}
.upload-field-heading-v85{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:8px}.upload-field-heading-v85>div{display:flex;align-items:flex-start;gap:9px;min-width:0}.upload-field-heading-v85>div>span:last-child{display:grid;gap:2px;min-width:0}.upload-field-heading-v85 label{color:var(--v85-upload-text)!important;font-size:.9rem;font-weight:850}.upload-field-heading-v85 small{color:var(--v85-upload-muted)!important;font-size:.75rem;line-height:1.55}.upload-field-icon-v85{width:36px;height:36px;flex:0 0 36px;border-radius:10px;display:grid;place-items:center;background:var(--v85-upload-soft);border:1px solid var(--v85-upload-line);color:var(--v85-upload-gold)}
.upload-existing-v85{display:inline-flex;align-items:center;gap:5px;flex:none;text-decoration:none;border:1px solid color-mix(in srgb,var(--v85-upload-ok) 36%,var(--v85-upload-line));background:var(--v85-upload-ok-soft);color:var(--v85-upload-ok)!important;border-radius:999px;padding:5px 8px;font-size:.7rem;font-weight:800}.upload-existing-v85:hover{filter:brightness(.98)}
.upload-integrity-note-v85{display:flex;align-items:flex-start;gap:10px;margin-top:15px;padding:12px 13px;border-radius:13px;border:1px solid var(--v85-upload-line);background:var(--v85-upload-soft);color:var(--v85-upload-text)}.upload-integrity-note-v85>i{color:var(--v85-upload-gold);font-size:1.05rem;margin-top:2px}.upload-integrity-note-v85>div{display:grid;gap:2px}.upload-integrity-note-v85 strong{font-size:.8rem}.upload-integrity-note-v85 span{font-size:.74rem;line-height:1.6;color:var(--v85-upload-muted)}

@media(max-width:767.98px){.publication-upload-zone-v85{padding:12px;border-radius:17px}.upload-field-heading-v85{flex-direction:column}.upload-existing-v85{align-self:flex-start}.smart-upload-drop-v85{grid-template-columns:42px minmax(0,1fr);min-height:108px;padding:13px}.smart-upload-drop-v85 .smart-upload-choose-v85{grid-column:1/-1;width:100%}.smart-upload-icon-v85{width:42px;height:42px}.smart-upload-status-v85{flex-direction:column;align-items:flex-start;gap:2px}.publication-upload-intro-v85{align-items:flex-start}}

/* V8.5.1 — typography alignment and previews for every upload field */
.form-label + .smart-upload-native + .smart-upload-v85,
.form-control.smart-upload-native + .smart-upload-v85{width:100%}
.smart-upload-v85,.smart-upload-v85 *{direction:rtl;text-align:right}
.smart-upload-v85 button{font-family:inherit}
.smart-upload-drop-v85{width:100%;overflow:hidden}
.smart-upload-copy-v85>strong{line-height:1.55;letter-spacing:0}
.smart-upload-copy-v85>small{max-width:68ch}
.smart-upload-choose-v85{justify-self:end}
.smart-upload-file-icon-v85{overflow:hidden}
.smart-upload-file-icon-v85 img{display:block;width:100%;height:100%;object-fit:cover;border-radius:inherit}
.smart-upload-file-name-v85,.smart-upload-status-v85,.smart-upload-actions-v85{direction:rtl;text-align:right}
.smart-upload-percent-v85,[data-smart-transfer]{direction:ltr;text-align:left}
.upload-field-shell-v85 .smart-upload-v85{margin-top:.35rem}
.upload-field-shell-v85 .form-label{margin:0}
[data-bs-theme="dark"] .smart-upload-drop-v85,
[data-bs-theme="dark"] .smart-upload-file-v85{color:var(--v85-upload-text)!important}
[data-bs-theme="dark"] .smart-upload-copy-v85>strong,
[data-bs-theme="dark"] .smart-upload-file-name-v85 strong{color:var(--v85-upload-text)!important}
[data-bs-theme="dark"] .smart-upload-copy-v85>small,
[data-bs-theme="dark"] .smart-upload-file-name-v85 small,
[data-bs-theme="dark"] .smart-upload-status-v85{color:var(--v85-upload-muted)!important}
@media(max-width:575.98px){
  .smart-upload-drop-v85{grid-template-columns:40px minmax(0,1fr);gap:10px;padding:12px;min-height:100px}
  .smart-upload-choose-v85{grid-column:1/-1;justify-self:stretch;width:100%}
  .smart-upload-file-v85{padding:12px}
  .smart-upload-file-head-v85{grid-template-columns:40px minmax(0,1fr) auto}
  .smart-upload-actions-v85 .btn{flex:1 1 auto;justify-content:center}
}
.smart-upload-v85.is-compact .smart-upload-drop-v85{min-height:76px;padding:10px;grid-template-columns:36px minmax(0,1fr) auto;border-radius:12px}
.smart-upload-v85.is-compact .smart-upload-icon-v85{width:36px;height:36px;border-radius:10px;font-size:1rem}
.smart-upload-v85.is-compact .smart-upload-copy-v85>small,.smart-upload-v85.is-compact .smart-upload-meta-v85{display:none}
.smart-upload-v85.is-compact .smart-upload-choose-v85{min-height:34px;padding:.35rem .55rem!important;font-size:.72rem}
.smart-upload-v85.is-compact .smart-upload-file-v85{padding:10px;border-radius:12px}
.smart-upload-v85.is-compact .smart-upload-actions-v85{margin-top:5px}
@media(max-width:575.98px){.smart-upload-v85.is-compact .smart-upload-drop-v85{grid-template-columns:34px minmax(0,1fr)}.smart-upload-v85.is-compact .smart-upload-choose-v85{grid-column:1/-1}}

/* V8.5 — align the upload instruction with surrounding form typography. */
.smart-upload-prompt-v85{font-weight:800;color:var(--v85-upload-text);margin-inline-end:.18rem}
.smart-upload-copy-v85>small{display:block}
.upload-field-shell-v85>.smart-upload-v85 .smart-upload-copy-v85>strong{font-size:.86rem}
[data-bs-theme="dark"] .smart-upload-prompt-v85{color:var(--v85-upload-text)!important}
