/* 文件传输页面（在 app.css 共享设计规范之上） */

.drop-main { display: flex; flex-direction: column; gap: 16px; padding-bottom: calc(48px + env(safe-area-inset-bottom)); }
#view-home, #view-download, #view-upload { display: flex; flex-direction: column; gap: 16px; }
.drop-main .lz-page-head { padding-bottom: 4px; }
.drop-center { display: flex; justify-content: center; padding-top: 6vh; }
.drop-login { box-shadow: var(--lz-shadow); animation: none; }

/* 收件人 / 扫码上传的人看不到 Private 导航 */
body.lz-guest .lz-nav .lz-tabs,
body.lz-guest .lz-nav .seg,
body.lz-guest .lz-nav .lz-nav__logout,
body.lz-guest .lz-nav .lz-nav__tabs-row { display: none !important; }

.panel-intro { margin-bottom: 18px; }
.panel-intro__title { font-size: 20px; font-weight: 800; letter-spacing: -0.025em; margin-bottom: 4px; }
.panel-intro .lz-hint { margin: 0; }

/* 发送 / 接收 切换 */
.tabs .seg__item { padding: 9px 22px; font-size: 15px; }

/* 拖放区 */
.dropzone {
    position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
    padding: 36px 16px; border-radius: 22px; background: var(--lz-surface-2); cursor: pointer; text-align: center;
    border: 2px dashed transparent; transition: background 0.15s ease, border-color 0.15s ease;
}
.dropzone:hover, .dropzone.is-over { background: var(--lz-blue-soft); border-color: rgba(6, 102, 235, 0.45); }
.dropzone input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.dropzone:focus-within { border-color: var(--lz-blue); }
.dropzone__icon { width: 52px; height: 52px; border-radius: 18px; background: var(--lz-ink); color: #fff; display: flex; align-items: center; justify-content: center; }
.dropzone__title { font-weight: 800; font-size: 16px; letter-spacing: -0.01em; }
.dropzone__hint { font-size: 13px; color: var(--lz-muted); }

/* 文件列表 */
.files { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.files:empty { display: none; }
.file { display: flex; align-items: center; gap: 14px; padding: 10px 6px; border-radius: 16px; }
.file:hover { background: var(--lz-surface-2); }
.file__icon {
    flex: none; width: 44px; height: 44px; border-radius: 14px; background: var(--lz-blue-soft); color: var(--lz-blue);
    display: flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 800; text-transform: uppercase; overflow: hidden;
}
.file__main { flex: 1; min-width: 0; }
.file__name { font-weight: 700; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file__meta { font-size: 13px; color: var(--lz-muted); margin-top: 2px; }
.file__bar { height: 4px; border-radius: 999px; background: var(--lz-surface-3); overflow: hidden; margin-top: 6px; }
.file__bar > span { display: block; height: 100%; width: 0; background: var(--lz-blue); transition: width 0.15s linear; }
.file .lz-btn { flex: none; }
.file--done .file__icon { background: var(--lz-green-soft); color: var(--lz-green); }
.icon-x { border: 0; background: var(--lz-surface-2); color: var(--lz-muted); width: 32px; height: 32px; border-radius: 999px; font-size: 18px; cursor: pointer; }
.icon-x:hover { background: var(--lz-surface-3); color: var(--lz-ink); }

.options { display: flex; flex-wrap: wrap; gap: 14px 22px; align-items: flex-end; margin-top: 18px; }
.options .field { min-width: 190px; }
select.lz-input { appearance: auto; padding: 12px 14px; font-size: 15px; }
.check { display: flex; align-items: center; gap: 10px; font-size: 15px; cursor: pointer; padding-bottom: 12px; }
.check input { width: 19px; height: 19px; accent-color: var(--lz-blue); }
#send-btn, #recv-btn, #up-btn { margin-top: 20px; }

/* 进度条 */
.progress { position: relative; margin-top: 16px; height: 30px; border-radius: 999px; background: var(--lz-surface-2); overflow: hidden; }
.progress > span { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--lz-blue); transition: width 0.2s linear; }
.progress > em { position: relative; display: flex; height: 100%; align-items: center; justify-content: center; font-style: normal; font-size: 12px; font-weight: 800; color: var(--lz-ink); text-shadow: 0 0 6px rgba(255, 255, 255, 0.9); }

/* 二维码 + 链接 */
.result { display: grid; grid-template-columns: 232px 1fr; gap: 26px; align-items: start; }
.result__title { font-size: 20px; font-weight: 800; letter-spacing: -0.025em; }
.result__meta { font-size: 14px; color: var(--lz-muted); margin-top: 4px; }
.result__body { min-width: 0; }
.qr { width: 232px; height: 232px; padding: 12px; background: #fff; border-radius: 24px; box-shadow: inset 0 0 0 1px var(--lz-line); display: flex; align-items: center; justify-content: center; }
.qr svg { display: block; width: 100%; height: 100%; }
.qr.is-used { background: var(--lz-surface-2); box-shadow: none; }
.qr__gone { font-size: 14px; font-weight: 700; color: var(--lz-faint); }
.linkbox { display: flex; gap: 8px; margin-top: 16px; }
.linkbox .lz-input { font-size: 12px; padding: 12px 14px; }
.row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }

/* 校验码 */
.codebox { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 2px 14px; margin-top: 14px; padding: 14px 16px; border-radius: 18px; background: var(--lz-ink); color: #fff; }
.codebox__label { grid-row: span 2; font-size: 13px; font-weight: 700; color: rgba(255, 255, 255, 0.6); }
.codebox__code { font-size: 26px; font-weight: 700; letter-spacing: 0.12em; }
.codebox__hint { font-size: 12px; color: rgba(255, 255, 255, 0.65); }
#up-codebox { margin: 0 0 16px; }

.status { margin-top: 14px; font-size: 15px; font-weight: 600; color: var(--lz-ink-2); display: flex; align-items: center; gap: 10px; line-height: 1.5; }
.status:empty { display: none; }
.status--ok { color: var(--lz-green); }
.status--err { color: var(--lz-red); }
.status--warn { color: var(--lz-amber); }
.spinner { flex: none; width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(6, 102, 235, 0.2); border-top-color: var(--lz-blue); animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* 服务器上的传输 */
.active { list-style: none; margin: 0; padding: 0; }
.active:empty::before { content: '没有进行中的传输'; display: block; padding: 18px 0; color: var(--lz-muted); font-size: 14px; }
.active li { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--lz-line); font-size: 14px; }
.active li:first-child { border-top: 0; }
.active__id { font-weight: 700; }
.active__main { flex: 1; min-width: 0; color: var(--lz-muted); }

.banner { border-radius: 20px; padding: 16px 20px; font-size: 14px; line-height: 1.6; margin-top: 20px; }
.banner--err { background: var(--lz-red-soft); color: var(--lz-red); }

.security summary { cursor: pointer; font-weight: 800; font-size: 16px; list-style: none; display: flex; align-items: center; gap: 10px; }
.security summary::-webkit-details-marker { display: none; }
.security summary::after { content: '+'; margin-left: auto; font-size: 22px; font-weight: 500; color: var(--lz-muted); }
.security[open] summary::after { content: '−'; }
.security ul { margin: 14px 0 0; padding-left: 18px; font-size: 14px; color: var(--lz-ink-2); line-height: 1.8; }
.security code { font-family: var(--lz-mono); background: var(--lz-surface-2); padding: 0 5px; border-radius: 5px; }

.toast {
    position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 100;
    max-width: calc(100vw - 32px); padding: 13px 20px; border-radius: 999px; font-size: 14px; font-weight: 600;
    background: var(--lz-ink); color: #fff; box-shadow: var(--lz-shadow-lg);
}
.toast.is-err { background: var(--lz-red); }

@media (max-width: 640px) {
    .lz-card { padding: 20px; }
    .result { grid-template-columns: 1fr; }
    .qr { margin: 0 auto; width: 248px; height: 248px; }
    .result__title, .result__meta { text-align: center; }
    .options .field { flex: 1 1 100%; }
}
