:root {
  --ink: #111820;
  --ink-2: #25303a;
  --muted: #66727d;
  --line: #dfe4e8;
  --surface: #ffffff;
  --soft: #f4f6f8;
  --brand: #f4c84a;
  --brand-dark: #d4a71d;
  --danger: #b42318;
  --success: #16794a;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: #f4f6f8;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; }
.environment { background: #c40000; color: white; padding: .45rem; text-align: center; font-weight: 800; letter-spacing: .15em; }
.topbar { min-height: 78px; padding: 12px max(24px, calc((100vw - 1180px) / 2)); display: flex; align-items: center; justify-content: space-between; background: white; border-bottom: 4px solid var(--brand); }
.brand { color: var(--ink); text-decoration: none; display: flex; align-items: center; gap: .95rem; }
.brand img { display: block; width: 154px; height: auto; }
.product-label { padding-left: .95rem; border-left: 1px solid var(--line); color: var(--muted); font-size: .78rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.container { width: min(1180px, calc(100% - 32px)); margin: 38px auto; flex: 1; }
footer { padding: 28px; color: var(--muted); text-align: center; border-top: 1px solid var(--line); background: white; }
footer strong { color: var(--ink); letter-spacing: .08em; }
h1 { font-size: clamp(2rem, 5vw, 3.4rem); line-height: 1.05; margin: .25rem 0 1rem; letter-spacing: -.045em; }
h2 { margin: .1rem 0; font-size: 1.55rem; }
h3 { margin: 0; }
p { line-height: 1.55; }
.eyebrow { margin: 0; color: #7a6110; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; font-size: .75rem; }
.muted, small { color: var(--muted); }
.hero { position: relative; overflow: hidden; display: flex; gap: 2rem; justify-content: space-between; align-items: end; padding: 40px; border-radius: 18px; color: white; background: linear-gradient(135deg, var(--ink) 0%, var(--ink-2) 100%); border: 1px solid #303b45; margin-bottom: 38px; box-shadow: 0 16px 40px rgba(17,24,32,.12); }
.hero:after { content: ""; position: absolute; top: 0; right: 8%; width: 150px; height: 8px; background: var(--brand); }
.hero .eyebrow { color: var(--brand); }
.hero p:last-child { color: #d3d9de; }
.hero p:last-child { max-width: 680px; margin-bottom: 0; }
.upload-panel { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, .65fr); gap: 18px 28px; align-items: end; padding: 26px; border: 1px solid var(--line); border-top: 5px solid var(--brand); border-radius: 16px; background: white; box-shadow: 0 8px 28px rgba(17,24,32,.06); }
.upload-copy h2 { margin: .25rem 0 .45rem; }
.upload-copy p:last-child { max-width: 700px; margin: 0; color: var(--muted); }
.upload-folder-label { display: grid; gap: 4px; color: #3d4852; font-size: .86rem; font-weight: 750; }
.drop-zone { grid-column: 1 / -1; display: grid; place-items: center; gap: 8px; min-height: 190px; padding: 26px; border: 2px dashed #b8c0c7; border-radius: 14px; text-align: center; color: var(--muted); background: #f8fafb; cursor: pointer; transition: border-color .15s, background .15s, transform .15s; }
.drop-zone:hover, .drop-zone:focus-visible, .drop-zone.dragover { border-color: var(--brand-dark); background: #fff9df; outline: none; transform: translateY(-1px); }
.drop-zone strong { color: var(--ink); font-size: 1.05rem; }
.drop-icon { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 14px; color: var(--brand); background: var(--ink); font-size: 1.8rem; font-weight: 900; }
.drop-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 7px; }
.visually-hidden { position: absolute!important; width: 1px!important; height: 1px!important; padding: 0!important; margin: -1px!important; overflow: hidden!important; clip: rect(0,0,0,0)!important; white-space: nowrap!important; border: 0!important; }
.upload-status { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px 18px; align-items: center; padding: 16px; border-radius: 12px; background: var(--soft); }
.upload-status[hidden] { display: none; }
.upload-status div { display: grid; gap: 3px; }
.upload-status span { color: var(--muted); font-size: .85rem; }
.upload-status progress { grid-column: 1 / -1; width: 100%; height: 12px; accent-color: var(--brand-dark); }
.pending-uploads { margin-top: 14px; border: 1px solid var(--line); border-radius: 12px; background: white; }
.pending-uploads summary { padding: 14px 16px; font-weight: 750; cursor: pointer; }
.pending-list { border-top: 1px solid var(--line); }
.pending-list > div { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.pending-list > div:last-child { border-bottom: 0; }
.pending-list span, .pending-list small { display: block; }
.section-heading { display: flex; align-items: end; justify-content: space-between; margin: 38px 0 16px; }
.count { min-width: 34px; height: 34px; display: grid; place-items: center; border-radius: 99px; background: var(--soft); color: var(--muted); font-weight: 700; }
.folder-grid { display: grid; gap: 12px; }
.folder-card { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 18px; padding: 18px; background: white; border: 1px solid var(--line); border-radius: 14px; }
.folder-icon { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 12px; background: #fff5ca; font-size: 1.45rem; }
.folder-main p { margin: .25rem 0 0; color: var(--muted); font-size: .9rem; }
.button { display: inline-flex; justify-content: center; align-items: center; gap: .4rem; min-height: 42px; padding: .65rem 1rem; border: 1px solid var(--line); border-radius: 9px; background: white; color: var(--ink); text-decoration: none; font: inherit; font-weight: 750; cursor: pointer; }
.button:hover { transform: translateY(-1px); box-shadow: 0 4px 14px #17202b12; }
.button.primary { background: var(--ink); border-color: var(--ink); color: var(--brand); }
.button.primary:hover { background: #05080b; color: #ffe386; }
.button.secondary { background: var(--soft); }
.button.danger { color: var(--danger); border-color: #f1b7b2; }
.button.danger.solid { color: white; background: var(--danger); border-color: var(--danger); }
.button.small { min-height: 34px; padding: .4rem .65rem; font-size: .82rem; }
.button.large { padding: 1rem 1.4rem; font-size: 1.05rem; }
.button:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.link-button { border: 0; background: none; color: var(--muted); cursor: pointer; font: inherit; }
.table-wrap { overflow-x: auto; background: white; border: 1px solid var(--line); border-radius: 14px; }
table { width: 100%; border-collapse: collapse; font-size: .91rem; }
th, td { padding: 14px 13px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; background: #fafafa; }
tr:last-child td { border-bottom: 0; }
td small { display: block; margin-top: .35rem; max-width: 320px; }
.actions { display: flex; flex-wrap: wrap; gap: 6px; min-width: 220px; }
.pin-cell code { display: inline-block; padding: .35rem .5rem; border-radius: 6px; color: var(--ink); background: #fff4c4; font-size: .95rem; font-weight: 850; letter-spacing: .12em; }
.copy-pin { display: block; margin-top: 5px; padding: 0; border: 0; color: var(--muted); background: none; font: inherit; font-size: .72rem; cursor: pointer; }
.status { display: inline-block; padding: .3rem .6rem; border-radius: 99px; background: #edf0f2; font-size: .78rem; font-weight: 800; white-space: nowrap; }
.status-ready { color: var(--success); background: #e5f6ee; }
.status-error, .status-revoked, .status-deleted { color: var(--danger); background: #fdecea; }
.status-processing, .status-queued { color: #855400; background: #fff1cc; }
.error-text { color: var(--danger); }
.card, .download-card { background: white; border: 1px solid var(--line); border-radius: 20px; padding: clamp(24px, 5vw, 48px); box-shadow: 0 20px 60px #17202b0a; }
.card.narrow { max-width: 500px; margin: 8vh auto; }
.form-grid { display: grid; gap: 18px; margin-top: 24px; }
.form-grid.two-columns { grid-template-columns: 1fr 1fr; }
.form-grid label { display: grid; gap: 7px; font-weight: 700; }
.form-grid small { font-weight: 400; }
.full { grid-column: 1 / -1; }
input, textarea, select { width: 100%; border: 1px solid #bdc5cc; border-radius: 9px; padding: .78rem .85rem; background: white; color: var(--ink); font: inherit; }
input:focus, textarea:focus, select:focus { outline: 3px solid #f4c84a55; border-color: var(--brand-dark); }
.summary-strip { display: flex; flex-wrap: wrap; gap: 12px; margin: 22px 0; }
.summary-strip span { padding: .65rem .8rem; background: var(--soft); border-radius: 8px; }
.summary-strip .ok { background: #e5f6ee; color: var(--success); }
.summary-strip .warning { background: #fff1cc; color: #855400; }
.retention-note { margin: 0 0 22px; padding: 14px 16px; border-left: 4px solid var(--brand); border-radius: 0 9px 9px 0; background: #fff8d9; color: #5f511f; }
.trash-note { color: #876708; font-weight: 700; }
.form-actions { display: flex; justify-content: end; gap: 10px; margin-top: 10px; }
.back { display: inline-block; color: var(--muted); text-decoration: none; margin-bottom: 18px; }
.alert { padding: 13px 16px; border-radius: 9px; margin-bottom: 16px; border: 1px solid; }
.alert-error { color: #8d1b12; border-color: #efb2ad; background: #fff1ef; }
.alert-success { color: #12613d; border-color: #9ed2bb; background: #eaf8f1; }
.alert-waiting { color: #6d5200; border-color: #e6ca70; background: #fff8d9; }
.share-form { margin-top: 24px; }
.share-fields { min-width: 0; margin: 0; padding: 0; border: 0; }
.share-fields[disabled] { opacity: .58; }
.share-fields[disabled] input,
.share-fields[disabled] textarea,
.share-fields[disabled] select { background: #edf0f2; }
.download-card { max-width: 680px; margin: 7vh auto; text-align: center; }
.download-mark { width: 76px; height: 76px; display: grid; place-items: center; margin: 0 auto 24px; border-radius: 20px; background: var(--ink); color: var(--brand); font-size: 2.6rem; font-weight: 900; box-shadow: 0 0 0 8px #f4c84a33; }
.download-meta { color: var(--muted); margin-bottom: 28px; }
.pin-form { max-width: 360px; margin: 28px auto 0; display: grid; gap: 12px; text-align: left; }
.pin-form label { display: grid; gap: 7px; font-weight: 700; }
.unavailable, .empty-state { display: grid; gap: 8px; padding: 24px; background: var(--soft); border-radius: 12px; color: var(--muted); }
.unavailable strong, .empty-state strong { color: var(--ink); }
.empty-cell { text-align: center; padding: 30px; color: var(--muted); }
@media (max-width: 720px) {
  .topbar { min-height: 68px; padding-inline: 14px; }
  .brand img { width: 120px; }
  .product-label { padding-left: .7rem; font-size: .68rem; }
  .container { width: min(100% - 20px, 1180px); margin-top: 20px; }
  .hero { padding: 24px; align-items: stretch; flex-direction: column; }
  .upload-panel { grid-template-columns: 1fr; padding: 19px; }
  .drop-zone, .upload-status { grid-column: auto; }
  .upload-status { grid-template-columns: 1fr; }
  .upload-status progress { grid-column: auto; }
  .pending-list > div { align-items: flex-start; flex-direction: column; }
  .folder-card { grid-template-columns: auto 1fr; }
  .folder-card .button { grid-column: 1 / -1; }
  .form-grid.two-columns { grid-template-columns: 1fr; }
  .full { grid-column: auto; }
  .form-actions { flex-direction: column-reverse; }
}
