*{box-sizing:border-box}

:root{
    --bg:#f6f8fb;
    --surface:#ffffff;
    --surface-soft:#f8fafc;
    --text:#172033;
    --text-2:#475569;
    --text-3:#7b8798;
    --line:#e4e9f0;
    --line-strong:#d4dbe5;
    --primary:#1f5eff;
    --primary-hover:#164bd7;
    --primary-soft:#eef4ff;
    --success:#14855f;
    --success-soft:#effaf6;
    --success-line:#cfeee2;
    --danger:#c93838;
    --danger-soft:#fff6f6;
    --danger-line:#f2caca;
    --radius-sm:8px;
    --radius-md:10px;
    --radius-lg:12px;
    --shadow:0 12px 34px rgba(23,32,51,.06);
    --shadow-sm:0 2px 8px rgba(23,32,51,.04);
}

html,body{
    margin:0;
    min-height:100%;
    background:var(--bg);
    color:var(--text);
    font-family:Tahoma,Arial,sans-serif;
    -webkit-font-smoothing:antialiased;
}

body{
    font-size:14px;
    line-height:1.75;
}

button,input{
    font:inherit;
}

svg{
    display:block;
}

.container{
    width:min(1180px,calc(100% - 48px));
    margin-inline:auto;
}

.topbar{
    height:76px;
    background:#fff;
    border-bottom:1px solid var(--line);
}

.topbar-inner{
    height:100%;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:24px;
}

.brand{
    display:flex;
    align-items:center;
    gap:12px;
    color:inherit;
    text-decoration:none;
}

.brand-icon{
    width:42px;
    height:42px;
    border-radius:10px;
    display:grid;
    place-items:center;
    background:var(--primary);
    color:#fff;
    box-shadow:0 6px 16px rgba(31,94,255,.18);
}

.brand-icon svg{
    width:21px;
    height:21px;
    fill:none;
    stroke:currentColor;
    stroke-width:1.7;
    stroke-linecap:round;
    stroke-linejoin:round;
}

.brand-text{
    display:grid;
    gap:0;
}

.brand-text strong{
    font-size:15px;
    line-height:1.45;
    font-weight:700;
}

.brand-text small{
    font-size:11px;
    color:var(--text-3);
    line-height:1.5;
}

.topbar-badge{
    display:inline-flex;
    align-items:center;
    gap:8px;
    padding:7px 10px;
    border:1px solid var(--line);
    border-radius:8px;
    background:#fff;
    color:var(--text-2);
    font-size:11px;
    white-space:nowrap;
}

.pulse-dot{
    width:7px;
    height:7px;
    border-radius:50%;
    background:var(--success);
    box-shadow:0 0 0 4px rgba(20,133,95,.10);
}

.page{
    padding:54px 0 64px;
}

.hero{
    display:grid;
    grid-template-columns:minmax(0,1fr) auto;
    align-items:end;
    gap:48px;
    margin-bottom:32px;
}

.hero-copy{
    max-width:680px;
}

.eyebrow{
    display:inline-block;
    margin-bottom:8px;
    color:var(--primary);
    font-size:11px;
    font-weight:700;
    letter-spacing:.08em;
    text-transform:uppercase;
}

.hero h1{
    margin:0;
    font-size:clamp(30px,3.3vw,42px);
    line-height:1.45;
    letter-spacing:-.035em;
    font-weight:800;
}

.hero p{
    max-width:650px;
    margin:12px 0 0;
    color:var(--text-2);
    font-size:14px;
    line-height:2;
}

.hero-meta{
    display:flex;
    gap:10px;
}

.meta-item{
    min-width:156px;
    padding:14px 14px;
    display:flex;
    align-items:center;
    gap:10px;
    border:1px solid var(--line);
    border-radius:10px;
    background:#fff;
    box-shadow:var(--shadow-sm);
}

.meta-icon{
    width:34px;
    height:34px;
    flex:0 0 auto;
    display:grid;
    place-items:center;
    border-radius:8px;
    background:var(--surface-soft);
    color:var(--primary);
}

.meta-icon svg{
    width:18px;
    height:18px;
    fill:none;
    stroke:currentColor;
    stroke-width:1.7;
    stroke-linecap:round;
    stroke-linejoin:round;
}

.meta-item div{
    display:grid;
    gap:1px;
}

.meta-item small{
    color:var(--text-3);
    font-size:10px;
}

.meta-item strong{
    color:var(--text);
    font-size:12px;
    font-weight:700;
}

.workspace{
    display:grid;
    grid-template-columns:minmax(0,1.65fr) minmax(350px,.85fr);
    gap:20px;
    align-items:start;
}

.side-column{
    display:grid;
    gap:14px;
}

.card{
    background:#fff;
    border:1px solid var(--line);
    border-radius:12px;
    box-shadow:var(--shadow);
}

.upload-card{
    padding:28px;
}

.receive-card{
    padding:24px;
}

.card-head{
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:18px;
    margin-bottom:22px;
}

.card-head.compact{
    margin-bottom:20px;
}

.card-title-group{
    display:flex;
    align-items:flex-start;
    gap:12px;
}

.step-badge{
    width:34px;
    height:34px;
    flex:0 0 auto;
    display:grid;
    place-items:center;
    border:1px solid var(--line);
    border-radius:8px;
    background:var(--surface-soft);
    color:var(--text-3);
    font-size:10px;
    font-weight:800;
}

.card h2{
    margin:0;
    font-size:17px;
    line-height:1.55;
    font-weight:800;
}

.card-head p{
    margin:3px 0 0;
    color:var(--text-3);
    font-size:11px;
    line-height:1.75;
}

.limit-badge{
    padding:6px 9px;
    border:1px solid var(--line);
    border-radius:7px;
    background:var(--surface-soft);
    color:var(--text-3);
    font-size:10px;
    white-space:nowrap;
}

.dropzone{
    min-height:310px;
    padding:34px 28px 20px;
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    border:1px dashed var(--line-strong);
    border-radius:10px;
    background:linear-gradient(180deg,#fcfdff 0%,#f8fafc 100%);
    text-align:center;
    cursor:pointer;
    transition:border-color .18s ease,background .18s ease,box-shadow .18s ease;
}

.dropzone:hover,
.dropzone.is-dragging{
    border-color:#8eb0ff;
    background:#f7faff;
    box-shadow:inset 0 0 0 1px rgba(31,94,255,.03);
}

.dropzone-icon{
    width:54px;
    height:54px;
    display:grid;
    place-items:center;
    border:1px solid #dce6ff;
    border-radius:10px;
    background:var(--primary-soft);
    color:var(--primary);
    margin-bottom:16px;
}

.dropzone-icon svg{
    width:24px;
    height:24px;
    fill:none;
    stroke:currentColor;
    stroke-width:1.7;
    stroke-linecap:round;
    stroke-linejoin:round;
}

.dropzone-copy{
    display:grid;
    gap:4px;
    margin-bottom:16px;
}

.dropzone-copy strong{
    font-size:14px;
    font-weight:800;
}

.dropzone-copy span{
    color:var(--text-3);
    font-size:11px;
}

.browse-btn{
    height:38px;
    padding:0 15px;
    border:1px solid var(--line-strong);
    border-radius:8px;
    background:#fff;
    color:var(--text-2);
    font-size:11px;
    font-weight:700;
    pointer-events:none;
}

.selected-file-wrap{
    width:100%;
    margin-top:28px;
    padding-top:16px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:16px;
    border-top:1px solid var(--line);
    text-align:right;
}

.selected-file-label{
    color:var(--text-3);
    font-size:10px;
    white-space:nowrap;
}

.selected-file{
    min-width:0;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
    color:var(--text-2);
    font-size:11px;
    font-weight:700;
}

.btn{
    min-height:46px;
    padding:0 16px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:8px;
    border-radius:8px;
    border:1px solid transparent;
    cursor:pointer;
    font-size:12px;
    font-weight:800;
    transition:background .18s ease,border-color .18s ease,transform .18s ease,box-shadow .18s ease;
}

.btn svg{
    width:17px;
    height:17px;
    fill:none;
    stroke:currentColor;
    stroke-width:1.8;
    stroke-linecap:round;
    stroke-linejoin:round;
}

.btn-primary{
    background:var(--primary);
    border-color:var(--primary);
    color:#fff;
    box-shadow:0 8px 18px rgba(31,94,255,.16);
}

.btn-primary:hover{
    background:var(--primary-hover);
    border-color:var(--primary-hover);
    transform:translateY(-1px);
}

.btn-primary:disabled{
    opacity:.65;
    cursor:wait;
    transform:none;
}

.btn-secondary{
    background:#fff;
    border-color:var(--line-strong);
    color:var(--text-2);
}

.btn-secondary:hover{
    background:var(--surface-soft);
}

.btn-block{
    width:100%;
    margin-top:14px;
}

.receive-card .btn-block{
    margin-top:18px;
}

.otp-wrap label{
    display:block;
    margin-bottom:10px;
    color:var(--text-2);
    font-size:11px;
    font-weight:800;
}

.otp{
    display:grid;
    grid-template-columns:repeat(4,1fr);
    gap:8px;
}

.otp-input{
    width:100%;
    height:62px;
    border:1px solid var(--line-strong);
    border-radius:9px;
    outline:none;
    background:#fff;
    color:var(--text);
    text-align:center;
    font-family:Arial,sans-serif;
    font-size:25px;
    font-weight:800;
    transition:border-color .16s ease,box-shadow .16s ease,background .16s ease;
}

.otp-input:hover{
    border-color:#b8c2cf;
}

.otp-input:focus{
    border-color:var(--primary);
    box-shadow:0 0 0 3px rgba(31,94,255,.10);
}

.otp-input.has-error{
    border-color:#df6060;
    background:#fffafa;
}

.otp-help{
    display:block;
    margin-top:9px;
    color:var(--text-3);
    font-size:10px;
}

.info-card{
    padding:16px;
    display:flex;
    align-items:flex-start;
    gap:12px;
    border:1px solid var(--line);
    border-radius:10px;
    background:#fff;
    box-shadow:var(--shadow-sm);
}

.info-icon{
    width:34px;
    height:34px;
    flex:0 0 auto;
    display:grid;
    place-items:center;
    border-radius:8px;
    background:var(--success-soft);
    color:var(--success);
}

.info-icon svg{
    width:18px;
    height:18px;
    fill:none;
    stroke:currentColor;
    stroke-width:1.7;
    stroke-linecap:round;
    stroke-linejoin:round;
}

.info-card strong{
    display:block;
    margin-bottom:2px;
    font-size:11px;
    font-weight:800;
}

.info-card p{
    margin:0;
    color:var(--text-3);
    font-size:10px;
    line-height:1.75;
}

.alert{
    margin-bottom:20px;
    padding:14px 16px;
    display:flex;
    align-items:flex-start;
    gap:12px;
    border:1px solid var(--danger-line);
    border-radius:10px;
    background:var(--danger-soft);
}

.alert-icon{
    width:30px;
    height:30px;
    flex:0 0 auto;
    display:grid;
    place-items:center;
    border-radius:8px;
    background:#fff;
    border:1px solid var(--danger-line);
    color:var(--danger);
    font-weight:800;
}

.alert strong{
    display:block;
    color:var(--danger);
    font-size:12px;
}

.alert p{
    margin:1px 0 0;
    color:#8f2e2e;
    font-size:11px;
}

.success-card{
    margin-bottom:20px;
    display:grid;
    grid-template-columns:minmax(0,1.4fr) minmax(280px,.6fr);
    border:1px solid var(--success-line);
    border-radius:12px;
    background:#fff;
    overflow:hidden;
    box-shadow:var(--shadow-sm);
}

.success-main{
    padding:22px;
    background:linear-gradient(180deg,#fbfffd 0%,#f5fcf9 100%);
}

.success-heading{
    display:flex;
    align-items:flex-start;
    gap:12px;
}

.success-check{
    width:36px;
    height:36px;
    flex:0 0 auto;
    display:grid;
    place-items:center;
    border-radius:9px;
    background:var(--success);
    color:#fff;
}

.success-check svg{
    width:18px;
    height:18px;
    fill:none;
    stroke:currentColor;
    stroke-width:2;
    stroke-linecap:round;
    stroke-linejoin:round;
}

.success-eyebrow{
    color:var(--success);
    margin-bottom:2px;
}

.success-heading h2{
    margin:0;
    font-size:16px;
    line-height:1.6;
}

.success-heading p{
    margin:2px 0 0;
    color:var(--text-3);
    font-size:10px;
}

.code-row{
    display:flex;
    gap:8px;
    margin:18px 0 12px;
}

.code-row span{
    width:48px;
    height:48px;
    display:grid;
    place-items:center;
    border:1px solid var(--success-line);
    border-radius:8px;
    background:#fff;
    color:var(--text);
    font-family:Arial,sans-serif;
    font-size:22px;
    font-weight:800;
}

.copy-code-btn{
    min-height:38px;
    padding-inline:12px;
    font-size:10px;
}

.success-info{
    display:grid;
    align-content:center;
    padding:18px 20px;
    border-right:1px solid var(--success-line);
    background:#fff;
}

.success-info>div{
    padding:10px 0;
}

.success-info>div+div{
    border-top:1px solid var(--line);
}

.success-info span,
.success-info strong{
    display:block;
}

.success-info span{
    color:var(--text-3);
    font-size:9px;
    margin-bottom:2px;
}

.success-info strong{
    min-width:0;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
    color:var(--text);
    font-size:10px;
}

.footer{
    border-top:1px solid var(--line);
    background:#fff;
}

.footer-inner{
    min-height:64px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:20px;
    color:var(--text-3);
    font-size:10px;
}

@media(max-width:960px){
    .hero{
        grid-template-columns:1fr;
        align-items:start;
        gap:20px;
    }

    .hero-meta{
        justify-content:flex-start;
    }

    .workspace{
        grid-template-columns:1fr;
    }

    .side-column{
        grid-template-columns:minmax(0,1fr) minmax(260px,.55fr);
        align-items:start;
    }
}

@media(max-width:700px){
    .container{
        width:min(100% - 28px,1180px);
    }

    .topbar{
        height:70px;
    }

    .topbar-badge{
        display:none;
    }

    .page{
        padding:36px 0 46px;
    }

    .hero{
        margin-bottom:24px;
    }

    .hero h1{
        font-size:28px;
    }

    .hero-meta{
        display:grid;
        grid-template-columns:1fr 1fr;
        width:100%;
    }

    .meta-item{
        min-width:0;
    }

    .workspace{
        gap:14px;
    }

    .upload-card,
    .receive-card{
        padding:20px;
    }

    .card-head{
        flex-direction:column;
        align-items:stretch;
        gap:12px;
    }

    .limit-badge{
        width:max-content;
    }

    .dropzone{
        min-height:260px;
        padding:28px 18px 18px;
    }

    .side-column{
        grid-template-columns:1fr;
    }

    .success-card{
        grid-template-columns:1fr;
    }

    .success-info{
        border-right:0;
        border-top:1px solid var(--success-line);
        grid-template-columns:1fr 1fr;
        gap:0 18px;
    }

    .success-info>div:nth-child(2){
        border-top:0;
    }
}

@media(max-width:460px){
    .brand-text small{
        display:none;
    }

    .hero-meta{
        grid-template-columns:1fr;
    }

    .meta-item{
        width:100%;
    }

    .otp{
        gap:6px;
    }

    .otp-input{
        height:56px;
        font-size:22px;
    }

    .selected-file-wrap{
        align-items:flex-start;
        flex-direction:column;
        gap:4px;
    }

    .success-info{
        grid-template-columns:1fr;
    }

    .success-info>div:nth-child(2){
        border-top:1px solid var(--line);
    }

    .footer-inner{
        justify-content:center;
    }

    .footer-inner span:last-child{
        display:none;
    }
}


/* Clean layout overrides */
.page{
    padding-top:40px;
}

.workspace{
    grid-template-columns:repeat(2,minmax(0,1fr));
    align-items:stretch;
}

.upload-card,
.receive-card{
    min-height:520px;
    height:100%;
    display:flex;
    flex-direction:column;
}

.upload-card form,
.receive-card form{
    display:flex;
    flex-direction:column;
    flex:1;
}

.upload-card .dropzone{
    flex:1;
    min-height:0;
}

.receive-card .otp-wrap{
    margin-top:4px;
}

.receive-card .download-btn{
    margin-top:auto;
}

.side-column{
    display:block;
    height:100%;
}

.side-column .receive-card{
    height:100%;
}

.upload-submit{
    position:relative;
}

.btn-loader{
    width:17px;
    height:17px;
    display:none;
    flex:0 0 auto;
    border:2px solid rgba(255,255,255,.38);
    border-top-color:#fff;
    border-radius:50%;
    animation:filebox-spin .7s linear infinite;
}

.upload-submit.is-loading .btn-loader{
    display:inline-block;
}

.upload-submit.is-loading .btn-arrow{
    display:none;
}

@keyframes filebox-spin{
    to{transform:rotate(360deg)}
}

.upload-progress{
    display:none;
    margin-top:12px;
    padding:12px 14px;
    border:1px solid var(--line);
    border-radius:8px;
    background:var(--surface-soft);
}

.upload-progress.is-visible{
    display:block;
}

.upload-progress-bar{
    height:5px;
    overflow:hidden;
    border-radius:999px;
    background:#e8edf4;
}

.upload-progress-bar span{
    display:block;
    width:38%;
    height:100%;
    border-radius:inherit;
    background:var(--primary);
    animation:filebox-progress 1.25s ease-in-out infinite;
}

@keyframes filebox-progress{
    0%{transform:translateX(170%)}
    50%{transform:translateX(-30%)}
    100%{transform:translateX(-230%)}
}

.upload-progress-text{
    margin-top:9px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    color:var(--text-3);
    font-size:10px;
}

.upload-progress-text span:first-child{
    color:var(--text-2);
    font-weight:700;
}

@media(max-width:960px){
    .workspace{
        grid-template-columns:1fr;
    }

    .upload-card,
    .receive-card{
        min-height:unset;
    }

    .side-column{
        height:auto;
    }
}

@media(max-width:700px){
    .page{
        padding-top:24px;
    }

    .upload-progress-text{
        align-items:flex-start;
        flex-direction:column;
        gap:2px;
    }
}


/* Compact / Minimal desktop refinement */
@media (min-width: 961px){

    .workspace{
        align-items:stretch;
    }

    .upload-card,
    .receive-card{
        min-height:420px;
        height:420px;
    }

    .upload-card{
        padding:22px;
    }

    .receive-card{
        padding:22px;
    }

    .card-head{
        margin-bottom:16px;
    }

    .card-head.compact{
        margin-bottom:16px;
    }

    .card-title-group{
        gap:10px;
    }

    .step-badge{
        width:30px;
        height:30px;
        border-radius:7px;
        font-size:9px;
    }

    .card h2{
        font-size:15px;
        line-height:1.45;
    }

    .card-head p{
        margin-top:2px;
        font-size:10px;
        line-height:1.6;
    }

    .limit-badge{
        padding:5px 8px;
        font-size:9px;
    }

    .dropzone{
        min-height:0;
        padding:24px 22px 16px;
    }

    .dropzone-icon{
        width:46px;
        height:46px;
        margin-bottom:12px;
    }

    .dropzone-icon svg{
        width:21px;
        height:21px;
    }

    .dropzone-copy{
        gap:2px;
        margin-bottom:12px;
    }

    .dropzone-copy strong{
        font-size:13px;
    }

    .dropzone-copy span{
        font-size:10px;
    }

    .browse-btn{
        height:34px;
        padding:0 13px;
        font-size:10px;
    }

    .selected-file-wrap{
        margin-top:18px;
        padding-top:12px;
    }

    .selected-file-label,
    .selected-file{
        font-size:9px;
    }

    .btn{
        min-height:40px;
        border-radius:7px;
        font-size:11px;
    }

    .btn svg{
        width:15px;
        height:15px;
    }

    .btn-block{
        margin-top:10px;
    }

    .receive-card form{
        justify-content:flex-start;
    }

    .otp-wrap{
        margin-top:0 !important;
    }

    .otp-wrap label{
        margin-bottom:7px;
        font-size:10px;
    }

    .otp{
        grid-template-columns:repeat(4,48px);
        justify-content:start;
        gap:7px;
    }

    .otp-input{
        width:48px;
        height:48px;
        border-radius:7px;
        font-size:20px;
    }

    .otp-help{
        margin-top:7px;
        font-size:9px;
    }

    .receive-card .download-btn{
        margin-top:18px;
    }

    .upload-progress{
        margin-top:8px;
        padding:9px 10px;
    }

    .upload-progress-text{
        margin-top:6px;
        font-size:9px;
    }
}

@media (max-width: 960px){
    .otp-input{
        height:52px;
        font-size:21px;
    }

    .upload-card,
    .receive-card{
        padding:18px;
    }

    .dropzone{
        min-height:220px;
    }
}


/* Balanced compact layout - remove artificial empty card height */
@media (min-width: 961px){

    .workspace{
        grid-template-columns:repeat(2,minmax(0,1fr));
        gap:20px;
        align-items:stretch;
    }

    .upload-card,
    .receive-card{
        min-height:0 !important;
        height:auto !important;
    }

    .side-column{
        display:flex;
        height:auto !important;
    }

    .side-column .receive-card{
        width:100%;
        height:auto !important;
    }

    .upload-card,
    .receive-card{
        padding:20px;
    }

    .card-head,
    .card-head.compact{
        margin-bottom:14px;
    }

    .upload-card form,
    .receive-card form{
        display:flex;
        flex-direction:column;
        flex:1;
    }

    .dropzone{
        min-height:230px;
        flex:none !important;
        padding:22px 20px 14px;
    }

    .dropzone-icon{
        width:42px;
        height:42px;
        margin-bottom:10px;
    }

    .dropzone-copy{
        margin-bottom:10px;
    }

    .selected-file-wrap{
        margin-top:14px;
        padding-top:10px;
    }

    .receive-card form{
        justify-content:flex-start !important;
    }

    .otp-wrap{
        margin-top:0 !important;
    }

    .otp{
        grid-template-columns:repeat(4,44px);
        gap:6px;
    }

    .otp-input{
        width:44px;
        height:44px;
        font-size:18px;
        border-radius:7px;
    }

    .receive-card .download-btn{
        margin-top:14px !important;
    }

    .btn{
        min-height:38px;
    }
}


/* Centered compact refinement */
@media (min-width: 961px){

    .container{
        width:min(920px, calc(100% - 48px));
    }

    .workspace{
        width:100%;
        max-width:920px;
        margin-inline:auto;
        grid-template-columns:repeat(2,minmax(0,1fr));
        gap:18px;
    }

    .upload-card,
    .receive-card{
        padding:18px;
    }

    .card-head{
        margin-bottom:12px;
    }

    .otp-wrap{
        text-align:center;
    }

    .otp-wrap label{
        text-align:center;
    }

    .otp{
        justify-content:center !important;
        grid-template-columns:repeat(4,42px) !important;
        gap:6px !important;
    }

    .otp-input{
        width:42px !important;
        height:42px !important;
        font-size:17px !important;
    }

    .otp-help{
        text-align:center;
    }

    .receive-card .download-btn{
        width:100%;
    }

    .dropzone{
        min-height:220px;
    }
}

@media (min-width: 1200px){
    .container,
    .workspace{
        max-width:900px;
    }
}


/* 70 / 30 desktop layout */
@media (min-width: 961px){

    .container{
        width:min(980px, calc(100% - 48px));
    }

    .workspace{
        max-width:980px;
        grid-template-columns:minmax(0, 7fr) minmax(260px, 3fr) !important;
        gap:18px;
    }

    .upload-card,
    .receive-card{
        width:100%;
    }

    .receive-card{
        padding:18px;
    }

    .otp-wrap{
        width:100%;
    }

    .otp{
        width:100%;
        display:grid;
        grid-template-columns:repeat(4, minmax(0, 1fr)) !important;
        gap:6px !important;
        justify-content:stretch !important;
    }

    .otp-input{
        width:100% !important;
        min-width:0;
        height:44px !important;
        font-size:18px !important;
    }

    .receive-card .download-btn{
        width:100%;
    }
}

@media (min-width: 1200px){
    .container,
    .workspace{
        max-width:980px;
    }
}


/* 60 / 40 desktop layout override */
@media (min-width: 961px){
    .workspace{
        grid-template-columns:minmax(0, 6fr) minmax(0, 4fr) !important;
    }
}


/* Real upload progress */
.upload-progress{
    margin-top:10px;
    padding:12px 13px;
    border:1px solid var(--line);
    border-radius:9px;
    background:#f8fafc;
    transition:border-color .2s ease, background .2s ease;
}

.upload-progress-head,
.upload-progress-foot{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
}

.upload-progress-head{
    margin-bottom:9px;
}

.upload-progress-title{
    display:flex;
    align-items:center;
    gap:7px;
    min-width:0;
    color:var(--text-2);
    font-size:10px;
    font-weight:700;
}

.upload-status-dot{
    width:7px;
    height:7px;
    flex:0 0 auto;
    border-radius:50%;
    background:var(--primary);
    box-shadow:0 0 0 4px rgba(31,94,255,.08);
}

.upload-progress-percent{
    flex:0 0 auto;
    color:var(--primary);
    font-family:Arial,sans-serif;
    font-size:11px;
    line-height:1;
}

.upload-progress-bar{
    position:relative;
    width:100%;
    height:6px;
    overflow:hidden;
    border-radius:999px;
    background:#e5eaf1;
}

.upload-progress-bar span{
    display:block;
    width:0;
    height:100%;
    border-radius:inherit;
    background:var(--primary);
    transition:width .16s linear;
    animation:none !important;
    transform:none !important;
}

.upload-progress-foot{
    margin-top:8px;
    color:var(--text-3);
    font-size:9px;
}

.upload-progress.is-processing .upload-status-dot{
    animation:filebox-status-pulse 1s ease-in-out infinite;
}

.upload-progress.is-processing .upload-progress-bar span{
    position:relative;
    overflow:hidden;
}

.upload-progress.is-processing .upload-progress-bar span::after{
    content:"";
    position:absolute;
    inset:0;
    background:linear-gradient(
        90deg,
        transparent,
        rgba(255,255,255,.45),
        transparent
    );
    transform:translateX(-100%);
    animation:filebox-shine 1.1s linear infinite;
}

.upload-progress.is-complete{
    border-color:#cfeee2;
    background:#f4fbf8;
}

.upload-progress.is-complete .upload-status-dot{
    background:var(--success);
    box-shadow:0 0 0 4px rgba(20,133,95,.08);
}

.upload-progress.is-complete .upload-progress-percent{
    color:var(--success);
}

.upload-progress.is-complete .upload-progress-bar span{
    background:var(--success);
}

.upload-progress.is-error{
    border-color:#f0caca;
    background:#fff7f7;
}

.upload-progress.is-error .upload-status-dot{
    background:var(--danger);
    box-shadow:0 0 0 4px rgba(201,56,56,.08);
}

.upload-progress.is-error .upload-progress-percent{
    color:var(--danger);
}

@keyframes filebox-status-pulse{
    0%,100%{opacity:1;transform:scale(1)}
    50%{opacity:.45;transform:scale(.82)}
}

@keyframes filebox-shine{
    to{transform:translateX(100%)}
}

@media(max-width:700px){
    .upload-progress{
        padding:11px;
    }

    .upload-progress-foot{
        flex-direction:row;
        align-items:center;
    }
}


/* Upload result modal */
body.modal-open{
    overflow:hidden;
}

.result-modal{
    position:fixed;
    inset:0;
    z-index:1000;
    display:none;
    align-items:center;
    justify-content:center;
    padding:24px;
}

.result-modal.is-open{
    display:flex;
}

.result-modal-backdrop{
    position:absolute;
    inset:0;
    background:rgba(15,23,42,.34);
    backdrop-filter:blur(2px);
}

.result-modal-dialog{
    position:relative;
    z-index:1;
    width:min(440px,100%);
    padding:28px;
    border:1px solid var(--line);
    border-radius:14px;
    background:#fff;
    box-shadow:0 24px 80px rgba(15,23,42,.18);
    animation:result-modal-in .22s ease-out;
}

.result-modal-close{
    position:absolute;
    top:14px;
    left:14px;
    width:32px;
    height:32px;
    display:grid;
    place-items:center;
    border:1px solid var(--line);
    border-radius:8px;
    background:#fff;
    color:var(--text-3);
    cursor:pointer;
}

.result-modal-close:hover{
    background:var(--surface-soft);
    color:var(--text);
}

.result-modal-close svg{
    width:16px;
    height:16px;
    fill:none;
    stroke:currentColor;
    stroke-width:1.8;
    stroke-linecap:round;
}

.result-modal-icon{
    width:46px;
    height:46px;
    margin:0 auto 14px;
    display:grid;
    place-items:center;
    border-radius:12px;
    background:var(--success-soft);
    color:var(--success);
}

.result-modal-icon svg{
    width:22px;
    height:22px;
    fill:none;
    stroke:currentColor;
    stroke-width:2;
    stroke-linecap:round;
    stroke-linejoin:round;
}

.result-modal-head{
    text-align:center;
}

.result-modal-head .eyebrow{
    margin-bottom:3px;
    color:var(--success);
}

.result-modal-head h2{
    margin:0;
    font-size:18px;
    line-height:1.6;
}

.result-modal-head p{
    margin:4px 0 0;
    color:var(--text-3);
    font-size:11px;
}

.modal-code-row{
    display:grid;
    grid-template-columns:repeat(4,1fr);
    gap:8px;
    margin:22px 0 12px;
}

.modal-code-row span{
    height:56px;
    display:grid;
    place-items:center;
    border:1px solid var(--success-line);
    border-radius:9px;
    background:#fbfffd;
    color:var(--text);
    font-family:Arial,sans-serif;
    font-size:24px;
    font-weight:800;
}

.modal-copy-btn{
    width:100%;
    min-height:40px;
}

.result-file-info{
    margin-top:18px;
    border:1px solid var(--line);
    border-radius:10px;
    overflow:hidden;
}

.result-file-info>div{
    padding:10px 12px;
    display:grid;
    grid-template-columns:90px minmax(0,1fr);
    gap:10px;
    align-items:center;
}

.result-file-info>div+div{
    border-top:1px solid var(--line);
}

.result-file-info span{
    color:var(--text-3);
    font-size:9px;
}

.result-file-info strong{
    min-width:0;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
    color:var(--text);
    font-size:10px;
    text-align:left;
    direction:ltr;
}

.modal-done-btn{
    width:100%;
    margin-top:16px;
}

@keyframes result-modal-in{
    from{
        opacity:0;
        transform:translateY(8px) scale(.985);
    }
    to{
        opacity:1;
        transform:translateY(0) scale(1);
    }
}

@media(max-width:520px){
    .result-modal{
        padding:14px;
    }

    .result-modal-dialog{
        padding:22px 18px 18px;
        border-radius:12px;
    }

    .modal-code-row span{
        height:52px;
        font-size:22px;
    }

    .result-file-info>div{
        grid-template-columns:78px minmax(0,1fr);
    }
}
