/* The unified Upload page (templates/upload.html, js/pages/upload.js;
   ADR 0030 §13). Everything carries the up- prefix; colors from tokens.css. */

#upload-page { padding: var(--space-4, 16px); }
.up-container { max-width: 860px; margin: 0 auto; display: flex; flex-direction: column; gap: 16px; }
.up-card { background: #fff; border-radius: var(--radius-lg); box-shadow: 0 1px 3px rgba(0,0,0,0.1); padding: 16px 20px; color: #223; font-size: 14px; }
.up-card h2 { margin: 0 0 6px; font-size: 18px; }
.up-card h3 { margin: 0 0 8px; font-size: 15px; }
.up-lede, .up-help { color: #556; margin: 0 0 12px; }
.up-help { font-size: 12px; margin-top: 4px; }

.up-chip { display: inline-flex; align-items: center; gap: 6px; margin: 0 0 12px; padding: 3px 4px 3px 12px; border-radius: 14px; background: #e7eefb; color: #1a4f9c; font-size: 13px; }
.up-chip[hidden] { display: none; }
.up-chip button { border: none; background: transparent; color: #1a4f9c; font-size: 16px; line-height: 1; cursor: pointer; padding: 0 6px; }

.up-drop { border: 2px dashed #b8c2d6; border-radius: var(--radius-lg); padding: 24px; text-align: center; background: #f7f9fc; transition: background .15s, border-color .15s; }
.up-drop-over { border-color: var(--color-accent); background: #e9f2ff; }
.up-drop-text { margin: 0 0 8px; color: #555; }

.up-btn { padding: 8px 14px; border: 1px solid #c9d2e3; border-radius: var(--radius-md); background: #fff; color: #222; cursor: pointer; font-size: 14px; }
.up-btn:hover:not(:disabled) { border-color: var(--color-accent); }
.up-btn:disabled { opacity: .5; cursor: default; }
.up-primary { background: var(--color-accent); border-color: var(--color-accent); color: #fff; }
.up-primary:hover:not(:disabled) { background: var(--color-accent-hover); }
.up-actions { display: flex; gap: 8px; margin-top: 12px; }

.up-notes { display: block; margin-top: 14px; font-weight: 600; }
.up-optional { font-weight: 400; color: #778; }
#up-notes { width: 100%; box-sizing: border-box; margin-top: 4px; padding: 8px 10px; border: 1px solid #c9d2e3; border-radius: var(--radius-md); font: inherit; resize: vertical; }

.up-list { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.up-row { display: grid; grid-template-columns: auto 1fr auto; gap: 8px; align-items: baseline; padding: 6px 8px; border: 1px solid #e3e8f0; border-radius: var(--radius-md); }
.up-row-child { margin-left: 22px; }
.up-row-child2 { margin-left: 44px; }
.up-kind { font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 10px; background: #eef1f6; color: #445; white-space: nowrap; }
.up-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.up-size { color: #778; font-size: 12px; white-space: nowrap; }
.up-text { grid-column: 2 / 4; font-size: 13px; color: #445; }
.up-tone-ok { border-color: #bfe3c6; }
.up-tone-ok .up-text { color: var(--color-severity-green); }
.up-tone-warn { border-color: #f1d9a6; background: #fffaf0; }
.up-tone-err { border-color: #f0c4c4; }
.up-tone-err .up-text { color: var(--color-severity-red); }
.up-tone-busy .up-text { color: #1a4f9c; }

.up-bar { height: 8px; border-radius: 4px; background: #e3e8f0; overflow: hidden; margin-top: 12px; }
.up-bar[hidden] { display: none; }
.up-bar-fill { height: 100%; width: 0; background: var(--color-accent); transition: width .2s; }

.up-msg { min-height: 1.2em; margin-top: 8px; color: #555; }
.up-msg:empty { display: none; }
.up-msg-error { color: var(--color-severity-red); }
.up-msg-ok { color: var(--color-severity-green); }

.up-summary { margin: 0 0 8px; }
.up-question { border: 1px solid #f1d9a6; background: #fffaf0; border-radius: var(--radius-md); padding: 10px 12px; margin: 8px 0; }
.up-question[hidden] { display: none; }
.up-question-items { margin: 4px 0 8px; padding-left: 18px; color: #445; }
.up-question-items label { cursor: pointer; }
.up-question-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.up-question-row select, .up-question-row input { padding: 7px 8px; border: 1px solid #c9d2e3; border-radius: var(--radius-md); font: inherit; min-width: 200px; }

#up-history-list a { color: var(--color-accent); text-decoration: none; }
