@import url('https://fonts.googleapis.com/css2?family=Lexend:wght@300;400;500;600;700;800&display=swap');

:root {
    --gold: #FFBF3B;
    --gold-deep: #e9a827;
    --blue: #121047;
    --blue-2: #242088;
    --ink: #0e0c33;
    --paper: #f4f5fa;
    --card: #ffffff;
    --line: #e7e9f2;
    --muted: #6b6f8a;
    --font: "Lexend", Helvetica, Arial, sans-serif;
    --shadow: 0 20px 50px -20px rgba(18, 16, 71, .35);
}

* { box-sizing: border-box; }
body.uploadFile {
    margin: 0;
    font-family: var(--font);
    color: var(--ink);
    background: radial-gradient(1200px 500px at 50% -10%, #ece9ff, var(--paper));
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 28px;
}
.material-symbols-outlined {
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

/* Card */
.card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 22px;
    box-shadow: var(--shadow);
    width: 100%;
    max-width: 480px;
    padding: 34px 34px 30px;
}
.brand { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; }
.brand .badge {
    width: 48px;
    height: 48px;
    border-radius: 13px;
    background: linear-gradient(140deg, var(--blue), var(--blue-2));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gold);
    font-weight: 800;
    font-size: 19px;
}
.brand h1 { font-size: 21px; margin: 0; font-weight: 800; letter-spacing: -.02em; }
.brand p { margin: 2px 0 0; color: var(--muted); font-size: 13.5px; }

/* Form */
.upload-form { display: flex; flex-direction: column; gap: 16px; }
label.fld { font-size: 13px; font-weight: 600; color: var(--muted); display: block; margin-bottom: 7px; }
.name-in {
    width: 100%;
    padding: 13px 15px;
    border: 1px solid var(--line);
    border-radius: 12px;
    font-family: var(--font);
    font-size: 15px;
    background: #fbfbfe;
}
.name-in:focus {
    outline: none;
    border-color: var(--gold-deep);
    box-shadow: 0 0 0 3px rgba(255, 191, 59, .2);
}

/* Dropzone */
.drop {
    border: 2px dashed #d3d6ea;
    border-radius: 14px;
    padding: 26px 18px;
    text-align: center;
    cursor: pointer;
    transition: .15s;
    background: #fbfbfe;
    position: relative;
}
.drop:hover { border-color: var(--gold-deep); background: #fffdf6; }
.drop.drag { border-color: var(--gold-deep); background: #fff7e6; }
.drop.has-file { border-style: solid; border-color: var(--blue); background: #f4f4fb; }
.drop .material-symbols-outlined { font-size: 34px; color: var(--blue); }
.drop .big { font-weight: 600; font-size: 14.5px; margin-top: 6px; }
.drop .sub { color: var(--muted); font-size: 12.5px; margin-top: 3px; }
.drop .fname { font-weight: 700; color: var(--blue); word-break: break-all; }
.drop input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

/* Buttons */
.btn {
    border: 0;
    border-radius: 13px;
    padding: 15px 0;
    font-family: var(--font);
    font-weight: 700;
    font-size: 15.5px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: .15s;
}
.btn-upload { background: var(--blue); color: var(--gold); }
.btn-upload:hover { background: #1b1866; }
.btn-upload .material-symbols-outlined { font-size: 20px; }
.spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 191, 59, .4);
    border-top-color: var(--gold);
    border-radius: 50%;
    animation: spin .7s linear infinite;
    display: none;
}
@keyframes spin { to { transform: rotate(360deg); } }
.upload-form.busy .btn-upload { opacity: .85; pointer-events: none; }
.upload-form.busy .spinner { display: inline-block; }

/* Secondary link + divider */
.divider { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 12px; margin: 20px 0 16px; }
.divider::before, .divider::after { content: ""; height: 1px; background: var(--line); flex: 1; }
.btn-secondary { width: 100%; background: #f1f2f8; color: var(--blue); border: 1px solid var(--line); text-decoration: none; }
.btn-secondary:hover { background: #e9ebf5; }
.btn-secondary .material-symbols-outlined { font-size: 19px; }

/* Import result panel (direct .mdb import) */
.result {
    margin-top: 18px;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 16px 18px;
    background: #fbfbfe;
    animation: fadeUp .25s ease;
}
@keyframes fadeUp { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.result.ok { border-color: #bfe3c8; background: #f2fbf4; }
.result.err { border-color: #f0c4c4; background: #fdf4f4; }
.result-head { display: flex; align-items: center; gap: 10px; }
.result.ok .result-head .material-symbols-outlined { color: #1d9a45; }
.result.err .result-head .material-symbols-outlined { color: #c43d3d; }
.result-title { font-weight: 700; font-size: 15px; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 14px; }
.stat { background: #ffffff; border: 1px solid var(--line); border-radius: 11px; padding: 10px 8px; text-align: center; }
.stat .v { font-weight: 800; font-size: 16px; color: var(--blue); }
.stat .k { color: var(--muted); font-size: 11px; margin-top: 2px; }
.err-msg { color: #8f2f2f; font-size: 13.5px; margin: 10px 0 0; }
.warn-list { color: #8f2f2f; font-size: 12.5px; margin: 8px 0 0; padding-left: 18px; }
.result-actions { margin-top: 14px; }
.result-actions .btn { width: 100%; text-decoration: none; }
@media (max-width: 420px) { .stats { grid-template-columns: repeat(2, 1fr); } }

/* Competition ID line in the success report */
.comp-id {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    font-size: 14px;
    color: var(--muted);
}
.comp-id b { color: var(--blue); font-size: 17px; font-weight: 800; letter-spacing: .02em; }
.copy-id {
    border: 1px solid var(--line);
    background: #ffffff;
    border-radius: 8px;
    padding: 3px 6px 1px;
    cursor: pointer;
    color: var(--muted);
    transition: .15s;
}
.copy-id:hover { color: var(--blue); border-color: var(--blue); }
.copy-id .material-symbols-outlined { font-size: 16px; }
.copy-id.copied { color: #1d9a45; border-color: #1d9a45; }
