/* ==========================================================================
   720云全景 · 通用上传进度面板样式（前后台共用）
   ========================================================================== */

.up-panel {
    /* 深色主题（默认，适配前台暗色） */
    --up-bg: #131c27;
    --up-bg-2: #0e1620;
    --up-bd: #243040;
    --up-tx: #e8eef6;
    --up-sub: #8b9aad;
    --up-dim: #64748b;
    --up-track: rgba(255, 255, 255, .10);
    --up-accent: #16baaa;
    --up-accent-2: #3ad6c6;
    --up-err: #ff7568;
    --up-ok: #34d399;
    --up-shadow: 0 18px 44px rgba(0, 0, 0, .48);

    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 19999999;
    width: 348px;
    max-width: calc(100vw - 32px);
    box-sizing: border-box;
    background: var(--up-bg);
    border: 1px solid var(--up-bd);
    border-radius: 14px;
    box-shadow: var(--up-shadow);
    color: var(--up-tx);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
                 "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    font-size: 13px;
    line-height: 1.5;
    overflow: hidden;
    opacity: 0;
    transform: translateY(14px) scale(.98);
    transition: opacity .2s ease, transform .24s cubic-bezier(.2, .9, .3, 1.2);
    -webkit-font-smoothing: antialiased;
}
.up-panel.up-in { opacity: 1; transform: translateY(0) scale(1); }

/* 浅色主题（后台 Layui 等浅底页面） */
.up-panel.up-theme-light {
    --up-bg: #ffffff;
    --up-bg-2: #f7f9fc;
    --up-bd: #e4e9f0;
    --up-tx: #22303f;
    --up-sub: #6b7a8d;
    --up-dim: #98a5b6;
    --up-track: #edf1f6;
    --up-err: #d3372b;
    --up-ok: #12b981;
    --up-shadow: 0 14px 36px rgba(22, 44, 76, .16);
}

/* ---------------- 头部 ---------------- */
.up-head {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 11px 12px 9px;
    background: linear-gradient(180deg, var(--up-bg-2), var(--up-bg));
    border-bottom: 1px solid var(--up-bd);
}
.up-title {
    display: flex;
    align-items: center;
    gap: 7px;
    flex: 1;
    min-width: 0;
    font-weight: 600;
    font-size: 12.5px;
}
.up-title-text {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.up-dot {
    flex: 0 0 auto;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--up-accent);
    box-shadow: 0 0 0 0 rgba(22, 186, 170, .55);
    animation: up-pulse 1.5s infinite;
}
.up-panel.up-done .up-dot {
    background: var(--up-ok);
    animation: none;
    box-shadow: none;
}
@keyframes up-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(22, 186, 170, .5); }
    70%  { box-shadow: 0 0 0 7px rgba(22, 186, 170, 0); }
    100% { box-shadow: 0 0 0 0 rgba(22, 186, 170, 0); }
}

.up-total-pct {
    flex: 0 0 auto;
    font-size: 12px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: var(--up-accent);
    letter-spacing: .3px;
}
.up-panel.up-done .up-total-pct { color: var(--up-ok); }

.up-act {
    flex: 0 0 22px;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    color: var(--up-sub);
    text-decoration: none;
    transition: .15s;
}
.up-act:hover { background: var(--up-track); color: var(--up-tx); }
.up-act > i { position: relative; display: block; width: 11px; height: 11px; }
.up-min > i::before {
    content: "";
    position: absolute; left: 0; top: 5px;
    width: 11px; height: 1.6px;
    background: currentColor;
    border-radius: 2px;
}
.up-close > i::before,
.up-close > i::after {
    content: "";
    position: absolute; left: 0; top: 5px;
    width: 11px; height: 1.6px;
    background: currentColor;
    border-radius: 2px;
}
.up-close > i::before { transform: rotate(45deg); }
.up-close > i::after  { transform: rotate(-45deg); }
.up-close { opacity: .45; }
.up-close:hover { background: rgba(255, 117, 104, .16); color: var(--up-err); opacity: 1; }

/* ---------------- 汇总进度条 ---------------- */
.up-sum-bar {
    height: 3px;
    background: var(--up-track);
    overflow: hidden;
}
.up-sum-bar > i {
    display: block;
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, var(--up-accent), var(--up-accent-2));
    border-radius: 0 3px 3px 0;
    transition: width .25s ease;
}
.up-panel.up-done .up-sum-bar > i { background: linear-gradient(90deg, var(--up-ok), var(--up-ok)); }

/* ---------------- 任务列表 ---------------- */
.up-list {
    max-height: 264px;
    overflow-y: auto;
    overscroll-behavior: contain;
}
.up-list::-webkit-scrollbar { width: 6px; }
.up-list::-webkit-scrollbar-thumb { background: var(--up-track); border-radius: 3px; }

.up-item {
    padding: 9px 12px 10px;
    border-bottom: 1px solid var(--up-bd);
}
.up-item:last-child { border-bottom: 0; }

.up-row1 {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 6px;
}
.up-name {
    flex: 1;
    min-width: 0;
    font-size: 12.5px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.up-pct {
    flex: 0 0 auto;
    font-size: 12px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    color: var(--up-accent);
}
.up-item.is-success .up-pct { color: var(--up-ok); }
.up-item.is-error .up-pct   { color: var(--up-err); }
.up-item.is-canceled .up-pct { color: var(--up-dim); }

.up-bar {
    height: 5px;
    border-radius: 4px;
    background: var(--up-track);
    overflow: hidden;
}
.up-bar > i {
    display: block;
    height: 100%;
    width: 0;
    border-radius: 4px;
    background: linear-gradient(90deg, var(--up-accent), var(--up-accent-2));
    transition: width .2s ease;
}
.up-item.is-uploading .up-bar > i {
    background-image: linear-gradient(90deg, var(--up-accent), var(--up-accent-2), var(--up-accent));
    background-size: 200% 100%;
    animation: up-flow 1.4s linear infinite;
}
@keyframes up-flow {
    0%   { background-position: 0 0; }
    100% { background-position: -200% 0; }
}
.up-item.is-success .up-bar > i { background: var(--up-ok); animation: none; }
.up-item.is-error .up-bar > i   { background: var(--up-err); animation: none; }
.up-item.is-canceled .up-bar > i { background: var(--up-dim); opacity: .5; animation: none; }

.up-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 5px;
    font-size: 11.5px;
    color: var(--up-sub);
    min-height: 16px;
}
.up-meta-text {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.up-item.is-error .up-meta-text { color: var(--up-err); }

.up-retry {
    display: none;
    flex: 0 0 auto;
    padding: 0 8px;
    height: 20px;
    line-height: 19px;
    border: 1px solid var(--up-err);
    border-radius: 5px;
    color: var(--up-err);
    font-size: 11.5px;
    text-decoration: none;
    transition: .15s;
}
.up-retry:hover { background: var(--up-err); color: #fff; }
.up-item.is-error .up-retry { display: block; }

/* ---------------- 最小化 ---------------- */
.up-panel.up-minimized { width: 216px; }
.up-panel.up-minimized .up-list,
.up-panel.up-minimized .up-sum-bar { display: none; }
.up-panel.up-minimized .up-head { border-bottom: 0; padding: 9px 12px; }

@media (max-width: 560px) {
    .up-panel { right: 12px; bottom: 12px; left: 12px; width: auto; }
    .up-list { max-height: 40vh; }
}

/* ==========================================================================
   轻提示 / 确认框
   ========================================================================== */
.up-toast-box {
    position: fixed;
    top: 18px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 20000000;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    pointer-events: none;
}
.up-toast {
    max-width: min(560px, calc(100vw - 40px));
    box-sizing: border-box;
    padding: 9px 16px;
    border-radius: 10px;
    background: #131c27;
    border: 1px solid #243040;
    color: #e8eef6;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
                 "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    font-size: 13px;
    line-height: 1.55;
    box-shadow: 0 12px 30px rgba(0, 0, 0, .34);
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity .22s ease, transform .24s ease;
}
.up-toast.up-toast-in { opacity: 1; transform: translateY(0); }
.up-toast-error { border-color: #ff7568; color: #ffd9d5; background: #2a1414; }
.up-toast-success { border-color: #34d399; color: #d5f7e9; background: #0e2320; }

/* 确认框 */
.up-mask {
    position: fixed;
    inset: 0;
    z-index: 20000001;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(4, 8, 13, .55);
    opacity: 0;
    transition: opacity .2s ease;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
                 "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}
.up-mask.up-mask-in { opacity: 1; }
.up-dialog {
    width: 340px;
    max-width: calc(100vw - 40px);
    box-sizing: border-box;
    background: #131c27;
    border: 1px solid #243040;
    border-radius: 14px;
    box-shadow: 0 22px 50px rgba(0, 0, 0, .5);
    overflow: hidden;
    transform: scale(.96);
    transition: transform .22s cubic-bezier(.2, .9, .3, 1.2);
}
.up-mask.up-mask-in .up-dialog { transform: scale(1); }
.up-dialog-body {
    padding: 22px 20px 18px;
    color: #e8eef6;
    font-size: 13.5px;
    line-height: 1.7;
    text-align: center;
}
.up-dialog-foot {
    display: flex;
    gap: 1px;
    border-top: 1px solid #243040;
}
.up-btn {
    flex: 1;
    height: 42px;
    line-height: 42px;
    text-align: center;
    color: #8b9aad;
    font-size: 13.5px;
    text-decoration: none;
    transition: .15s;
}
.up-btn:hover { background: rgba(255, 255, 255, .05); color: #e8eef6; }
.up-btn-ok { color: #16baaa; font-weight: 600; }
.up-btn-ok:hover { background: rgba(22, 186, 170, .12); color: #3ad6c6; }

/* 浅色主题 */
.up-mask.up-theme-light .up-dialog { background: #fff; border-color: #e4e9f0; box-shadow: 0 18px 44px rgba(22, 44, 76, .2); }
.up-mask.up-theme-light .up-dialog-body { color: #22303f; }
.up-mask.up-theme-light .up-dialog-foot { border-top-color: #e9edf3; }
.up-mask.up-theme-light .up-btn { color: #6b7a8d; }
.up-mask.up-theme-light .up-btn:hover { background: #f5f8fb; color: #22303f; }
.up-mask.up-theme-light .up-btn-ok { color: #0f9c8f; }
.up-mask.up-theme-light .up-btn-ok:hover { background: #eefaf8; }
