:root{
  --ink: #10131A;
  --panel: #171B24;
  --brass: #C9A24B;
  --cream: #ECE6D6;
  --muted: #8B8A84;
  --hairline: rgba(236,230,214,0.16);
}
*{ box-sizing: border-box; }
html,body{ margin:0; background:var(--ink); color:var(--cream); font-family: 'Work Sans', Arial, sans-serif; }
body{ display:flex; justify-content:center; padding: 6vh 5vw; }
main{ width:100%; max-width: 480px; }
h1{ font-size: 1.5rem; margin: 0 0 0.4rem 0; }
p.lede{ color: var(--muted); margin: 0 0 1.6rem 0; font-size: 0.95rem; }
form{ background: var(--panel); border: 1px solid var(--hairline); border-radius: 6px; padding: 1.6rem; display: flex; flex-direction: column; gap: 1.1rem; }
label{ display:flex; flex-direction: column; gap: 0.4rem; font-size: 0.9rem; color: var(--muted); }
input[type="text"], input[type="password"], input[type="file"], select{
  background: var(--ink); color: var(--cream); border: 1px solid var(--hairline);
  border-radius: 4px; padding: 0.6rem 0.7rem; font-size: 1rem; font-family: inherit;
  min-height: 44px; /* dimensione comoda per il tocco su smartphone */
  appearance: none; -webkit-appearance: none;
}
select{
  background-image: linear-gradient(45deg, transparent 50%, var(--brass) 50%), linear-gradient(135deg, var(--brass) 50%, transparent 50%);
  background-position: calc(100% - 18px) calc(50% - 3px), calc(100% - 13px) calc(50% - 3px);
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 2.2rem;
}
input:focus{ outline: 2px solid var(--brass); outline-offset: 1px; }
button{
  background: var(--brass); color: var(--ink); border: none; border-radius: 4px;
  padding: 0.7rem 1rem; font-size: 0.95rem; font-weight: 600; cursor: pointer;
}
button:disabled{ opacity: 0.6; cursor: not-allowed; }
#status{ margin-top: 1rem; font-size: 0.9rem; min-height: 1.2em; }
#status.ok{ color: #7DB88A; }
#status.err{ color: #C97757; }
p.err{ color: #C97757; font-size: 0.9rem; }
.topbar{ display:flex; justify-content: space-between; align-items:center; margin-bottom: 1.6rem; font-size: 0.9rem; }
.topbar a{ color: var(--brass); text-decoration:none; }
.topbar a:hover{ text-decoration: underline; }

main.wide{ max-width: 900px; }
table{ width:100%; border-collapse: collapse; background: var(--panel); border: 1px solid var(--hairline); border-radius: 6px; overflow: hidden; font-size: 0.88rem; }
th, td{ text-align: left; padding: 0.6rem 0.8rem; border-bottom: 1px solid var(--hairline); }
th{ color: var(--brass); font-weight: 600; }
tr:last-child td{ border-bottom: none; }

.part-field{ display:flex; flex-direction: column; gap: 0.3rem; }
.file-size{ font-size: 0.8rem; color: var(--muted); }

.progress-wrap{ display:flex; align-items:center; gap: 0.7rem; }
progress{ flex:1; height: 10px; accent-color: var(--brass); }
progress::-webkit-progress-bar{ background: var(--ink); border-radius: 6px; }
progress::-webkit-progress-value{ background: var(--brass); border-radius: 6px; }
#progressLabel{ font-size: 0.85rem; color: var(--muted); min-width: 3ch; text-align: right; }

