/* ======================================================
   AMFR RESIDENT UPLOAD — BLACK & GOLD
   Visual layer only. Upload mechanics remain in upload.js.
====================================================== */

:root{
    --gold:#d7a63c;
    --gold-light:#f1ca72;
    --gold-dark:#8f651d;
    --panel:rgba(5,5,5,.90);
    --panel-soft:rgba(10,9,6,.88);
    --line:rgba(215,166,60,.58);
    --glow:rgba(215,166,60,.28);
    --text:#ffffff;
    --text-dim:#c8c8c8;
}

*{
    box-sizing:border-box;
    -webkit-tap-highlight-color:transparent;
}

html,body{min-height:100%;}

body{
    margin:0;
    font-family:Arial,system-ui,-apple-system,sans-serif;
    color:var(--text);
    background:
        linear-gradient(rgba(0,0,0,.38),rgba(0,0,0,.50)),
        url("/images/tlo.jpg") no-repeat center center fixed;
    background-size:cover;
    padding:20px 0 120px;
}

/* ===== TOP NAVIGATION ===== */
.header-nav{
    width:calc(100% - 40px);
    max-width:900px;
    margin:0 auto 22px;
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:12px;
}

.btn-back{
    min-height:48px;
    padding:13px 16px;
    display:flex;
    align-items:center;
    justify-content:center;
    text-align:center;
    text-decoration:none;
    border:1px solid rgba(215,166,60,.78);
    border-radius:12px;
    background:linear-gradient(180deg,rgba(20,17,10,.96),rgba(5,5,5,.96));
    color:var(--gold-light)!important;
    font-weight:700;
    opacity:1!important;
    filter:none!important;
    text-shadow:0 0 7px rgba(241,202,114,.35);
    box-shadow:0 0 12px rgba(215,166,60,.34),inset 0 0 10px rgba(215,166,60,.06);
    transition:.2s ease;
}

.btn-back:hover{
    transform:translateY(-2px);
    color:#ffe2a0!important;
    border-color:var(--gold-light);
    background:rgba(215,166,60,.10);
    box-shadow:0 0 16px rgba(215,166,60,.50),inset 0 0 10px rgba(215,166,60,.08);
}

/* ===== INTRO / HEADER ===== */
.page-header{
    width:calc(100% - 40px);
    max-width:900px;
    margin:0 auto 20px;
    padding:28px;
    text-align:center;
    background:linear-gradient(145deg,rgba(4,4,4,.94),rgba(12,10,6,.90));
    border:1px solid var(--line);
    border-radius:20px;
    box-shadow:0 0 0 1px rgba(215,166,60,.05),0 0 22px rgba(215,166,60,.22),0 20px 55px rgba(0,0,0,.45);
    backdrop-filter:blur(6px);
}

.page-header h1,
.resident-title{
    margin:0 0 20px;
    color:var(--gold-light);
    font-size:clamp(1.7rem,4vw,2.35rem);
    text-shadow:0 0 10px rgba(215,166,60,.28);
}

.resident-info{
    max-width:780px;
    margin:0 auto;
    color:var(--text-dim);
    line-height:1.7;
    text-align:left;
}

.resident-info p{margin:0 0 14px;}

.resident-info strong{color:#fff;}

.candidate-link{
    color:var(--gold-light);
    font-weight:700;
    text-decoration:none;
}

.candidate-link:hover{
    color:#ffe2a0;
    text-decoration:underline;
}

/* ===== ARTIST NAME ===== */
.artist-box{
    width:calc(100% - 40px);
    max-width:900px;
    margin:0 auto 20px;
    padding:20px;
    background:linear-gradient(145deg,rgba(4,4,4,.94),rgba(12,10,6,.90));
    border:1px solid var(--line);
    border-radius:14px;
    box-shadow:0 0 18px rgba(215,166,60,.16);
}

.artist-box label{
    display:block;
    color:var(--gold-light);
    font-size:18px;
    font-weight:700;
    margin-bottom:10px;
}

.artist-box input{
    width:100%;
    padding:14px;
    background:rgba(7,7,7,.92);
    border:1px solid rgba(215,166,60,.34);
    border-radius:10px;
    color:#fff;
    font-size:16px;
    outline:none;
}

.artist-box input:focus{
    border-color:var(--gold);
    box-shadow:0 0 12px rgba(215,166,60,.22);
}

/* ===== MAIN UPLOAD ===== */
.upload-container{
    width:calc(100% - 40px);
    max-width:900px;
    margin:0 auto;
    padding:0;
}

.upload-zone{
    position:relative;
    min-height:320px;
    border-radius:20px;
    border:1px dashed rgba(215,166,60,.72);
    background:linear-gradient(145deg,rgba(4,4,4,.92),rgba(12,10,6,.88));
    display:flex;
    align-items:center;
    justify-content:center;
    cursor:pointer;
    transition:.25s ease;
    overflow:hidden;
    box-shadow:0 0 18px rgba(215,166,60,.14);
}

.upload-zone::before{
    content:"";
    position:absolute;
    inset:0;
    background:radial-gradient(circle at center,rgba(215,166,60,.09),transparent 70%);
    opacity:0;
    transition:.25s ease;
    pointer-events:none;
}

.upload-zone:hover,
.upload-zone.drag-over{
    border-color:var(--gold-light);
    background:linear-gradient(145deg,rgba(10,8,4,.95),rgba(5,5,5,.94));
    box-shadow:0 0 24px rgba(215,166,60,.30);
}

.upload-zone:hover::before,
.upload-zone.drag-over::before{opacity:1;}

.upload-zone-content{
    position:relative;
    z-index:2;
    text-align:center;
    padding:40px 20px;
}

.upload-icon{
    font-size:3.2em;
    margin-bottom:16px;
    transition:transform .25s ease;
}

.upload-zone:hover .upload-icon{transform:scale(1.06) translateY(-3px);}

.upload-zone-content h2{
    margin:0 0 8px;
    color:var(--gold-light);
    font-size:1.6em;
    text-shadow:0 0 10px rgba(215,166,60,.24);
}

.upload-zone-content p{
    margin:0 0 4px;
    color:var(--text-dim);
    font-size:.95em;
}

.upload-formats{
    margin-top:12px!important;
    color:var(--gold-light)!important;
    font-size:.85em!important;
    text-transform:uppercase;
    letter-spacing:1px;
}

/* ===== BUTTONS ===== */
.btn-primary,.btn-secondary{
    padding:12px 28px;
    border:1px solid var(--line);
    border-radius:12px;
    font-size:.95em;
    font-weight:700;
    cursor:pointer;
    transition:.2s ease;
    text-transform:uppercase;
    letter-spacing:.5px;
    background:linear-gradient(180deg,rgba(20,17,10,.96),rgba(5,5,5,.96));
    color:var(--gold-light);
    box-shadow:0 0 10px var(--glow),inset 0 0 12px rgba(215,166,60,.05);
}

.btn-primary{
    width:100%;
    border-color:var(--gold);
    background:linear-gradient(180deg,rgba(33,26,12,.98),rgba(8,7,5,.98));
}

.btn-primary:hover:not(:disabled),
.btn-secondary:hover{
    transform:translateY(-2px);
    color:#ffe2a0;
    border-color:var(--gold-light);
    background:rgba(215,166,60,.10);
    box-shadow:0 0 16px rgba(215,166,60,.50);
}

.btn-primary:disabled{
    opacity:.5;
    cursor:not-allowed;
    transform:none;
}

/* ===== FILES INFO ===== */
.files-info{
    margin-top:26px;
    padding:20px;
    border:1px solid var(--line);
    border-radius:14px;
    background:linear-gradient(145deg,rgba(4,4,4,.94),rgba(12,10,6,.90));
    box-shadow:0 0 18px rgba(215,166,60,.14);
}

.info-header{
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:12px;
    margin-bottom:20px;
}

.info-header h3{
    margin:0;
    color:var(--gold-light);
    font-size:1.2em;
}

.pairing-info{
    margin-bottom:16px;
    padding:12px 16px;
    border-radius:12px;
    background:rgba(215,166,60,.07);
    border:1px solid rgba(215,166,60,.22);
}

.pairing-stats{
    display:flex;
    gap:24px;
    flex-wrap:wrap;
    font-size:.95em;
    color:#e6e6e6;
}

.pairing-stats span{
    display:flex;
    align-items:center;
    gap:6px;
    font-weight:500;
}

.pairing-stats span:nth-child(3){color:#59d47b;}

.files-list{
    max-height:400px;
    overflow-y:auto;
    margin-bottom:24px;
    border-radius:12px;
    background:rgba(5,5,5,.70);
    border:1px solid rgba(215,166,60,.16);
}

.file-item{
    display:flex;
    align-items:center;
    gap:12px;
    padding:12px 16px;
    border-bottom:1px solid rgba(215,166,60,.10);
    transition:background .2s ease;
}

.file-item:last-child{border-bottom:none;}
.file-item:hover{background:rgba(215,166,60,.05);}

.file-info{
    flex:1;
    min-width:0;
    display:flex;
    align-items:center;
    gap:12px;
}

.file-icon{font-size:1.8em;flex-shrink:0;}
.file-column{flex:1;min-width:0;}
.file-column.file-original,.file-column.file-technical{min-width:180px;}
.file-column.file-pairing{min-width:140px;}
.file-column.file-upload-status{min-width:120px;}

.file-label{
    font-size:.75em;
    color:rgba(241,202,114,.72);
    text-transform:uppercase;
    letter-spacing:.5px;
    margin-bottom:4px;
}

.file-value,.file-name{
    color:#fff;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
    font-weight:500;
}

.file-name{font-weight:700;margin-bottom:4px;}

.file-details{flex:1;min-width:0;}

.file-meta{
    font-size:.85em;
    color:rgba(255,255,255,.58);
    display:flex;
    gap:12px;
}

.file-status{
    flex-shrink:0;
    display:flex;
    align-items:center;
    gap:8px;
    font-size:.9em;
}

.status-badge,.pairing-badge{
    display:inline-block;
    padding:4px 12px;
    border-radius:8px;
    background:rgba(215,166,60,.12);
    color:var(--gold-light);
    border:1px solid rgba(215,166,60,.18);
    font-size:.85em;
    font-weight:700;
    white-space:nowrap;
}

.status-badge.success,.pairing-badge.paired{
    background:rgba(34,197,94,.15);
    color:#59d47b;
}

.status-badge.error{
    background:rgba(239,68,68,.15);
    color:#ef6666;
}

.pairing-badge.warning{
    background:rgba(255,193,7,.12);
    color:#f1ca72;
}

.file-remove{
    flex-shrink:0;
    width:28px;
    height:28px;
    border:1px solid rgba(239,68,68,.25);
    border-radius:6px;
    background:rgba(239,68,68,.12);
    color:#ef6666;
    cursor:pointer;
    font-size:1.2em;
    display:flex;
    align-items:center;
    justify-content:center;
}

.file-remove:hover{background:rgba(239,68,68,.25);}

/* ===== PROGRESS ===== */
.progress-section{
    margin-top:26px;
    padding:20px;
    border:1px solid var(--line);
    border-radius:14px;
    background:linear-gradient(145deg,rgba(4,4,4,.94),rgba(12,10,6,.90));
}

.progress-header{
    display:flex;
    justify-content:space-between;
    align-items:center;
    margin-bottom:12px;
    font-size:.95em;
    color:#e5e5e5;
}

.progress-bar{
    width:100%;
    height:10px;
    background:rgba(215,166,60,.12);
    border-radius:5px;
    overflow:hidden;
    border:1px solid rgba(215,166,60,.22);
}

.progress-fill{
    height:100%;
    width:0%;
    background:linear-gradient(90deg,var(--gold-dark),var(--gold-light));
    box-shadow:0 0 12px rgba(215,166,60,.38);
    transition:width .3s ease;
}

.progress-text{
    margin-top:12px;
    font-size:.9em;
    color:var(--text-dim);
    text-align:center;
}

/* ===== RESULTS ===== */
.results-container{
    width:calc(100% - 40px);
    max-width:900px;
    margin:40px auto 0;
    padding:20px;
    border:1px solid var(--line);
    border-radius:14px;
    background:linear-gradient(145deg,rgba(4,4,4,.94),rgba(12,10,6,.90));
}

.results-header{
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:12px;
    margin-bottom:24px;
}

.results-header h2{
    margin:0;
    color:var(--gold-light);
}

#resultsList{display:grid;gap:12px;}

.result-item{
    padding:12px 16px;
    border-radius:8px;
    border-left:4px solid var(--gold);
    background:rgba(5,5,5,.65);
}

.result-item.success{
    border-left-color:#22c55e;
    background:rgba(34,197,94,.08);
}

.result-item.error{
    border-left-color:#ef4444;
    background:rgba(239,68,68,.08);
}

.result-item strong{color:var(--gold-light);}
.result-item.success strong{color:#59d47b;}
.result-item.error strong{color:#ef6666;}

/* ===== SCROLLBAR ===== */
.files-list::-webkit-scrollbar{width:8px;}
.files-list::-webkit-scrollbar-track{background:rgba(215,166,60,.05);border-radius:4px;}
.files-list::-webkit-scrollbar-thumb{background:rgba(215,166,60,.28);border-radius:4px;}
.files-list::-webkit-scrollbar-thumb:hover{background:rgba(215,166,60,.48);}

/* ===== RESPONSIVE ===== */
@media(max-width:768px){
    body{padding-top:12px;}

    .header-nav{
        width:calc(100% - 24px);
        grid-template-columns:1fr;
        gap:8px;
    }

    .page-header,.artist-box,.upload-container,.results-container{
        width:calc(100% - 24px);
    }

    .page-header{padding:20px 15px;}
    .resident-info{text-align:left;}

    .upload-zone{min-height:240px;}
    .upload-zone-content{padding:24px 16px;}
    .upload-icon{font-size:2.4em;}

    .file-item{flex-wrap:wrap;}
    .file-column{flex:0 0 100%;}

    .file-column.file-original,
    .file-column.file-technical,
    .file-column.file-pairing,
    .file-column.file-upload-status{
        min-width:auto;
        flex:0 0 calc(50% - 6px);
    }

    .file-column.file-upload-status{order:5;}

    .pairing-stats{gap:12px;}

    .info-header,.results-header{
        flex-direction:column;
        align-items:stretch;
    }

    .btn-secondary{width:100%;}
}
