/* ══════════════════════════════════════
   UPLOAD PAGE
══════════════════════════════════════ */
.upload-card {
    max-width: 900px; margin: 0 auto;
    background: var(--surface); border-radius: 20px;
    border: 1px solid var(--border);
    display: grid; grid-template-columns: 300px 1fr;
    overflow: hidden; position: relative; z-index: 1;
    box-shadow: 0 32px 80px rgba(0,0,0,.35);
}

/* ── Left panel ── */
.left-panel {
    background: var(--surf-el); padding: 32px 24px;
    display: flex; flex-direction: column; gap: 20px;
    border-right: 1px solid var(--border);
}

.cover-wrap { position: relative; width: 100%; aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: var(--bg); cursor: pointer; }
.cover-placeholder { width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; color: var(--muted); font-size: .75rem; font-weight: 500; letter-spacing: .05em; text-transform: uppercase; transition: color .2s; }
.cover-placeholder svg { opacity: .4; transition: opacity .2s; }
.cover-wrap:hover .cover-placeholder svg { opacity: .7; }
.cover-wrap:hover .cover-placeholder { color: var(--text); }
#coverPreview { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: none; }
.cover-overlay { position: absolute; inset: 0; background: rgba(0,0,0,.5); display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity .2s; font-size: .7rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: #fff; }
.cover-wrap:hover .cover-overlay { opacity: 1; }
#coverInput { display: none; }

.file-zone { border: 1.5px dashed var(--border); border-radius: 12px; padding: 20px 16px; text-align: center; cursor: pointer; transition: border-color .2s, background .2s; position: relative; }
.file-zone:hover, .file-zone.drag-over { border-color: var(--primary); background: rgba(68,217,149,.04); }
.file-zone input { display: none; }
.file-zone-label { font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.file-zone-label span { color: var(--primary); }
.file-name { margin-top: 8px; font-size: .72rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.vis-row { display: flex; gap: 6px; }
.vis-btn { flex: 1; padding: 8px 4px; border-radius: 8px; border: 1px solid var(--border); background: var(--bg); color: var(--muted); font-family: "Montserrat", sans-serif; font-size: .68rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; cursor: pointer; transition: all .18s; }
.vis-btn.active { background: var(--primary); border-color: var(--primary); color: #0E1116; }
.vis-btn:hover:not(.active) { border-color: var(--primary); color: var(--text); }

.owner-row { display: flex; align-items: center; gap: 10px; padding: 14px; border-radius: 10px; background: var(--bg); border: 1px solid var(--border); cursor: pointer; }
.toggle { width: 36px; height: 20px; background: var(--border); border-radius: 10px; position: relative; transition: background .2s; flex-shrink: 0; }
.toggle::after { content: ''; position: absolute; width: 14px; height: 14px; background: #fff; border-radius: 50%; top: 3px; left: 3px; transition: transform .2s; }
.toggle.on { background: var(--primary); }
.toggle.on::after { transform: translateX(16px); }
.owner-text { font-size: .72rem; font-weight: 600; color: var(--muted); line-height: 1.4; }

.flags-row { display: flex; gap: 8px; }
.flag-chip { flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px; padding: 10px 8px; border-radius: 8px; border: 1px solid var(--border); background: var(--bg); color: var(--muted); font-size: .68rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; cursor: pointer; transition: all .18s; }
.flag-chip.on { border-color: var(--accent); background: rgba(255,138,61,.08); color: var(--accent); }
.flag-chip:hover:not(.on) { border-color: var(--muted); color: var(--text); }

/* ── Right panel ── */
.right-panel { padding: 32px 32px 28px; display: flex; flex-direction: column; gap: 24px; }

.section-title { font-size: .65rem; font-weight: 700; text-transform: uppercase; letter-spacing: .14em; color: var(--muted); margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.section-title::after { content: ''; flex: 1; height: 1px; background: var(--border); }

.fields-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px 16px; }
.fields-grid .span2 { grid-column: span 2; }
.fields-grid .span3 { grid-column: span 3; }

.field { display: flex; flex-direction: column; gap: 5px; }
.field-label { font-size: .65rem; font-weight: 600; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.field input, .field textarea, .field select { font-family: "Montserrat", sans-serif; font-size: .82rem; font-weight: 500; padding: 9px 12px; border-radius: 8px; border: 1px solid var(--border); background: var(--surf-el); color: var(--text); outline: none; transition: border-color .18s, box-shadow .18s; width: 100%; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(68,217,149,.12); }
.field input::placeholder, .field textarea::placeholder { color: var(--muted); opacity: .5; }
.field textarea { resize: vertical; min-height: 60px; }

.genre-wrap { position: relative; }
#genreSuggestions { position: absolute; top: calc(100% + 4px); left: 0; right: 0; background: var(--surf-el); border: 1px solid var(--border); border-radius: 8px; list-style: none; max-height: 160px; overflow-y: auto; display: none; z-index: 100; box-shadow: 0 8px 24px rgba(0,0,0,.3); }
#genreSuggestions li { padding: 8px 12px; font-size: .8rem; cursor: pointer; transition: background .15s; }
#genreSuggestions li:hover { background: rgba(68,217,149,.08); color: var(--primary); }

.submit-area { display: flex; align-items: center; gap: 16px; margin-top: 4px; }
.btn-submit { flex-shrink: 0; padding: 14px 36px; border-radius: 10px; border: none; background: var(--primary); color: #0E1116; font-family: "Montserrat", sans-serif; font-size: .82rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; cursor: pointer; transition: background .2s, transform .15s; display: flex; align-items: center; gap: 10px; }
.btn-submit:active   { transform: scale(.98); }
.btn-submit:disabled { opacity: .5; cursor: not-allowed; }
.btn-submit .spinner { width: 16px; height: 16px; border: 2px solid rgba(0,0,0,.3); border-top-color: #0E1116; border-radius: 50%; animation: spin .7s linear infinite; display: none; }
.btn-submit.loading .spinner  { display: block; }
.btn-submit.loading .btn-text { opacity: .6; }
@keyframes spin { to { transform: rotate(360deg); } }
.msg         { font-size: .78rem; font-weight: 500; }
.msg.success { color: var(--primary); }
.msg.error   { color: var(--accent); }

.upload-bar      { height: 2px; background: var(--border); border-radius: 2px; overflow: hidden; display: none; }
.upload-bar.active { display: block; }
.upload-bar-fill { height: 100%; background: var(--primary); width: 0; transition: width .4s ease; }

#page-title-upload { margin-top: 30px; }