/* ---------- 网盘管理平台: drive-specific styles on top of base.css ---------- */

/* file-type tile */
.fi { --c: #8a919f; width: 34px; height: 34px; border-radius: 9px; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center;
  font-size: 18px; color: var(--c); background: color-mix(in srgb, var(--c) 14%, transparent); border: 1px solid color-mix(in srgb, var(--c) 22%, transparent); }
.fi.sm { width: 28px; height: 28px; font-size: 15px; border-radius: 7px; }
.fi.lg { width: 56px; height: 56px; font-size: 28px; border-radius: 14px; }
.fi.xl { width: 84px; height: 84px; font-size: 42px; border-radius: 20px; }
html.dark .fi { box-shadow: 0 0 14px color-mix(in srgb, var(--c) 18%, transparent); }

/* files page fills the viewport so the table scrolls inside the card */
.main.main-files { display: flex; flex-direction: column; min-height: 0; flex: 1; padding-bottom: 20px; }
.content-col:has(.main-files) { overflow: hidden; display: flex; flex-direction: column; }
.files-view { position: relative; display: flex; flex-direction: column; flex: 1; min-height: 0; }
.files-card { display: flex; flex-direction: column; flex: 1; min-height: 0; padding: 0; overflow: hidden; }
.fv-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px 0; flex-wrap: wrap; }
.fv-crumbs { display: flex; align-items: center; flex-wrap: wrap; gap: 2px; min-width: 0; font-size: 15px; }
.crumb { display: inline-flex; align-items: center; gap: 6px; padding: 4px 8px; border-radius: 6px; cursor: pointer; color: var(--pp-text2);
  max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; transition: background .15s, color .15s; }
.crumb:hover { background: var(--pp-hover); color: var(--el-color-primary); }
.crumb.cur { color: var(--pp-text); font-weight: 600; cursor: default; }
.crumb.cur:hover { background: none; }
.crumb-sep { color: var(--pp-sub); font-size: 12px; }
.fv-search { width: 300px; max-width: 100%; }
.fv-tools { display: flex; align-items: center; gap: 8px; padding: 12px 18px; border-bottom: 1px solid var(--pp-border); flex-wrap: wrap; min-height: 58px; }
.fv-tools .el-button + .el-button { margin-left: 0; }
.fv-right { margin-left: auto; display: flex; align-items: center; gap: 14px; font-size: 13px; }
.sel-info { font-size: 14px; color: var(--pp-text2); margin-right: 4px; }
.sel-info b { color: var(--el-color-primary); }
.fv-table { flex: 1; min-height: 0; --el-table-border-color: var(--pp-border); }
.fv-table .el-table__inner-wrapper::before { display: none; }
.fv-table .el-table__row { cursor: default; }
.fv-table .el-table__row:hover .row-ops .op { opacity: 1; }
.fname { display: flex; align-items: center; gap: 12px; min-width: 0; cursor: pointer; }
.fname-t { display: flex; flex-direction: column; min-width: 0; line-height: 1.35; }
.fname .fn { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--pp-text); font-weight: 500; }
.fname:hover .fn { color: var(--el-color-primary); }
.fname-t small { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-ops { display: inline-flex; gap: 4px; align-items: center; }
.op { width: 30px; height: 30px; border-radius: 7px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
  color: var(--pp-text2); font-size: 16px; transition: background .15s, color .15s, opacity .15s; }
.row-ops .op { opacity: .55; }
.op:hover { background: var(--pp-hover); color: var(--el-color-primary); }
.fv-scroll { flex: 1; min-height: 0; overflow-y: auto; padding: 14px 18px; }
.fv-empty { padding: 30px 0 40px; text-align: center; }

/* grid view */
.fgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.gcell { position: relative; border: 1px solid var(--pp-border); border-radius: 12px; padding: 10px; cursor: pointer; background: var(--pp-card);
  transition: border-color .15s, box-shadow .15s, transform .15s; display: flex; flex-direction: column; gap: 8px; }
.gcell:hover { border-color: var(--el-color-primary-light-5); box-shadow: var(--pp-shadow-hover); transform: translateY(-1px); }
.gcell.on { border-color: var(--el-color-primary); background: var(--pp-row-hover); }
.g-thumb { height: 104px; border-radius: 8px; background: var(--pp-soft); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.g-thumb img { width: 100%; height: 100%; object-fit: cover; }
.g-meta { min-width: 0; flex: 1; }
.g-name { font-size: 14px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--pp-text); }
.g-sub { font-size: 12px; margin-top: 2px; }
.gcell .g-check { position: absolute; top: 12px; left: 14px; z-index: 1; opacity: 0; transition: opacity .15s; }
.gcell:hover .g-check, .gcell.on .g-check { opacity: 1; }
.gcell .g-more { position: absolute; top: 12px; right: 12px; background: var(--pp-card); opacity: 0; }
.gcell:hover .g-more { opacity: 1; }

/* mobile list */
.m-list { display: flex; flex-direction: column; }
.m-row { display: flex; align-items: center; gap: 12px; padding: 11px 4px; border-bottom: 1px solid var(--pp-border); cursor: pointer; min-height: 60px; }
.m-row:last-child { border-bottom: 0; }
.m-row:active, .m-row.on { background: var(--pp-row-hover); }
.m-row .g-check { display: inline-flex; }
.m-selbar { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(18px + env(safe-area-inset-bottom)); z-index: 20; box-shadow: 0 8px 24px rgba(0,0,0,.25); }

/* drag & drop */
.drop-mask { position: absolute; inset: 0; z-index: 30; border-radius: 12px; border: 2px dashed var(--el-color-primary);
  background: color-mix(in srgb, var(--el-color-primary) 10%, transparent); backdrop-filter: blur(2px); display: flex; align-items: center; justify-content: center; pointer-events: none; }
.drop-mask > div { text-align: center; color: var(--el-color-primary); font-size: 16px; font-weight: 600; }
.drop-mask .el-icon { font-size: 56px; }

/* upload panel */
.up-panel { position: fixed; right: 24px; bottom: 24px; z-index: 2000; width: 380px; max-width: calc(100vw - 24px); background: var(--pp-card);
  border: 1px solid var(--pp-border); border-radius: 12px; box-shadow: 0 16px 40px rgba(0,0,0,.22); overflow: hidden; }
.up-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; cursor: pointer; font-size: 14px; }
.up-ico { font-size: 18px; color: var(--el-color-primary); }
.up-title { flex: 1; font-weight: 600; }
.up-speed { color: var(--pp-sub); font-size: 12px; }
.up-act { cursor: pointer; color: var(--pp-sub); font-size: 16px; }
.up-act:hover { color: var(--el-color-primary); }
.up-total { height: 3px; background: var(--pp-divider); }
.up-total i { display: block; height: 100%; background: linear-gradient(90deg, #00e5ff, #7c5cff); transition: width .3s; }
.up-list { max-height: 320px; overflow-y: auto; border-top: 1px solid var(--pp-border); }
.up-item { display: flex; align-items: center; gap: 10px; padding: 9px 14px; }
.up-item + .up-item { border-top: 1px solid var(--pp-border); }
.up-meta { flex: 1; min-width: 0; }
.up-name { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-bottom: 3px; }
.up-sub { font-size: 12px; color: var(--pp-sub); margin-top: 3px; }
.up-sub.done { color: var(--pp-ok-fg); }
.up-sub.error, .up-sub.exists { color: var(--pp-bad-fg); }
.spin { animation: nasspin 1s linear infinite; }
@keyframes nasspin { to { transform: rotate(360deg); } }

/* folder picker */
.picker-path { font-size: 13px; color: var(--pp-text2); margin-bottom: 10px; display: flex; align-items: center; gap: 6px; }
.picker-tree { border: 1px solid var(--pp-border); border-radius: 8px; padding: 6px; height: 320px; overflow: auto; }
.pt-node { display: inline-flex; align-items: center; gap: 6px; }

/* preview */
.pv-dialog .el-dialog__header { padding: 12px 16px; margin: 0; border-bottom: 1px solid var(--pp-border); }
.pv-dialog .el-dialog__body { padding: 0; }
.pv-head { display: flex; align-items: center; gap: 10px; min-width: 0; }
.pv-title { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.pv-title b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; }
.pv-title small { color: var(--pp-sub); font-size: 12px; }
.pv-ops { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
.pv-ops a.hdr-icon { color: inherit; }
.pv-body { background: var(--pp-soft); min-height: 300px; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.pv-img { max-width: 100%; max-height: 80vh; object-fit: contain; display: block; cursor: zoom-out; }
.pv-video { width: 100%; max-height: 80vh; background: #000; display: block; }
.pv-pdf { width: 100%; height: 80vh; border: 0; background: #fff; }
.el-dialog.is-fullscreen .pv-pdf, .el-dialog.is-fullscreen .pv-video { height: calc(100dvh - 64px); max-height: none; }
.el-dialog.is-fullscreen .pv-img { max-height: calc(100dvh - 64px); }
.pv-audio { padding: 40px 20px; display: flex; flex-direction: column; align-items: center; gap: 24px; width: 100%; }
.pv-audio audio { width: min(520px, 100%); }
.pv-disc { width: 140px; height: 140px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 56px; color: #fff;
  background: conic-gradient(from 0deg, #00e5ff, #7c5cff, #ff4ecd, #00e5ff); animation: nasspin 6s linear infinite; box-shadow: 0 10px 40px rgba(124,92,255,.35); }
.pv-text { width: 100%; padding: 12px; align-self: stretch; }
.pv-code .el-textarea__inner { font-family: ui-monospace, SFMono-Regular, Consolas, "Courier New", monospace; font-size: 13px; line-height: 1.6;
  height: 72vh !important; background: var(--pp-card); }
.el-dialog.is-fullscreen .pv-code .el-textarea__inner { height: calc(100dvh - 100px) !important; }
.pv-none { padding: 60px 20px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 14px; color: var(--pp-text2); }

/* share dialog */
.share-target { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 8px; background: var(--pp-soft); }
.share-target b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.share-result { margin-top: 14px; }
.sr-row { display: flex; align-items: center; gap: 10px; margin-top: 12px; }
.sr-row > span { width: 52px; flex-shrink: 0; color: var(--pp-text2); font-size: 14px; }
.sr-code .el-input__inner { font-family: ui-monospace, Consolas, monospace; font-size: 16px; letter-spacing: 4px; font-weight: 700; }
.code-pill { font-family: ui-monospace, Consolas, monospace; background: var(--pp-soft); border: 1px solid var(--pp-border); padding: 1px 8px; border-radius: 5px; letter-spacing: 2px; }

/* dashboard */
.dash-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.dash-grid .value.ok { color: var(--pp-ok-fg); }
.dash-grid .value.bad { color: var(--pp-bad-fg); }
/* row 2 uses the same 4-column rhythm as the stat cards: each card spans exactly two stat columns */
.dash-grid .value { margin: 8px 0 6px; }
.dash-grid .foot { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dash-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: stretch; }
.dash-2 > .card { margin-top: 0; display: flex; flex-direction: column; }
.usage { flex: 1; display: flex; align-items: center; justify-content: center; gap: 48px; flex-wrap: wrap; padding: 4px 0; }
.usage-in { display: flex; flex-direction: column; align-items: center; }
.usage-in b { font-size: 30px; color: var(--pp-text); line-height: 1.2; }
.usage-in span { font-size: 13px; color: var(--pp-sub); }
.usage-legend { display: flex; flex-direction: column; gap: 14px; font-size: 14px; color: var(--pp-text2); }
.lg-row { display: grid; grid-template-columns: 10px 52px 84px 44px; align-items: center; column-gap: 10px; }
.lg-row i { width: 10px; height: 10px; border-radius: 3px; }
.lg-row b { color: var(--pp-text); text-align: right; font-variant-numeric: tabular-nums; }
.lg-row em { font-style: normal; color: var(--pp-sub); text-align: right; font-variant-numeric: tabular-nums; }
.lg-total { padding-top: 12px; border-top: 1px dashed var(--pp-border); }
.lg-foot { font-size: 12px; color: var(--pp-sub); padding-left: 20px; }

/* access list + login devices: fixed columns  [icon 40] [content 1fr] [action 76] */
.access-list { display: flex; flex-direction: column; }
.acc, .sess { display: grid; grid-template-columns: 40px minmax(0, 1fr) 76px; column-gap: 14px; align-items: center; padding: 12px 0; }
.sess { grid-template-columns: 40px minmax(0, 1fr); }
.acc + .acc, .sess + .sess { border-top: 1px solid var(--pp-border); }
.acc:first-child, .sess:first-of-type { padding-top: 2px; }
.acc:last-child { padding-bottom: 0; }
.acc-main, .sess > div { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.acc b, .sess b { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--pp-text); line-height: 1.4; }
.acc-desc, .sess span:not(.f-icon) { font-size: 12.5px; color: var(--pp-sub); line-height: 1.5; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acc-code { display: block; margin-top: 3px; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 12.5px; line-height: 1.6; color: var(--pp-text2);
  background: var(--pp-soft); border: 1px solid var(--pp-border); border-radius: 6px; padding: 3px 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acc-btn { width: 76px; justify-self: end; }
.acc .f-icon, .sess .f-icon { --c: #1677ff; width: 40px; height: 40px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center;
  font-size: 18px; color: var(--c); background: color-mix(in srgb, var(--c) 14%, transparent); border: 1px solid color-mix(in srgb, var(--c) 24%, transparent); }
.pw-form { max-width: 440px; }
.pw-form .el-button { min-width: 120px; }

/* sidebar storage meter */
.sider-disk { margin: 18px 14px; padding: 12px; border-radius: 10px; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.08); color: rgba(255,255,255,.75); font-size: 12px; }
.sd-top { display: flex; justify-content: space-between; margin-bottom: 8px; }
.sd-sub { margin-top: 6px; color: rgba(255,255,255,.5); }
.sider-disk .el-progress-bar__outer { background: rgba(255,255,255,.12); }

/* public share page */
.share-page { align-items: center; }
.share-card { position: relative; z-index: 1; width: 520px; max-width: 100%; padding: 32px 32px 24px; border-radius: 18px;
  background: linear-gradient(160deg, rgba(22,119,255,.18), rgba(8,145,178,.10)), rgba(15,23,42,.78); backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,.1); box-shadow: 0 30px 80px rgba(0,0,0,.45); color: #e6edf7; }
html:not(.dark) .share-card { background: rgba(255,255,255,.92); color: #1f2329; border-color: #e8eaee; }
html:not(.dark) .share-card .brand-name { color: #111827; }
.sc-body { margin-top: 26px; }
.sc-file { display: flex; align-items: center; gap: 14px; }
.sc-file b { display: block; font-size: 17px; word-break: break-all; }
.sc-file span { font-size: 13px; }
.sc-code { display: flex; gap: 10px; }
.sc-err { color: #ff7875; font-size: 13px; margin-top: 8px; }
.sc-preview { margin: 18px 0 4px; border-radius: 10px; overflow: hidden; background: rgba(0,0,0,.25); }
.sc-preview img, .sc-preview video { width: 100%; max-height: 360px; object-fit: contain; display: block; }
.sc-list { margin-top: 16px; max-height: 360px; overflow-y: auto; border-radius: 10px; border: 1px solid rgba(255,255,255,.1); padding: 0 12px; }
html:not(.dark) .sc-list { border-color: #e8eaee; }
.sc-list .m-row { border-color: rgba(255,255,255,.08); }
.sc-crumb { margin-top: 14px; display: flex; align-items: center; gap: 10px; font-size: 13px; }
.share-card .login-btn { margin-top: 18px; width: 100%; }
.share-card .login-foot { margin-top: 22px; text-align: center; }

/* responsive */
@media (max-width: 1200px) { .dash-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .dash-2 { grid-template-columns: 1fr; } }
@media (max-width: 1500px) { .dash-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 1200px) { .dash-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 768px) {
  .main.main-files { padding: 10px 10px 10px; }
  .fv-bar { padding: 10px 12px 0; }
  .fv-search { width: 100%; }
  .fv-tools { padding: 10px 12px; gap: 6px; }
  .fv-tools .el-button { padding: 8px 12px; }
  .fv-scroll { padding: 4px 12px 80px; }
  .fgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .g-thumb { height: 92px; }
  .up-panel { right: 12px; left: 12px; width: auto; bottom: calc(12px + env(safe-area-inset-bottom)); }
  .dash-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .usage { gap: 20px; }
  .share-card { padding: 24px 18px 18px; }
  .sc-code { flex-direction: column; }
  .crumb { max-width: 120px; }
}
.fv-table th.col-name .cell, .fv-table td.col-name .cell { text-align: left; justify-content: flex-start; }
/* floating layers need an opaque surface (the dark theme's card colour is translucent glass) */
.up-panel { background: var(--el-bg-color-overlay); backdrop-filter: blur(18px) saturate(1.2); }
html.dark .up-panel { background: rgba(12, 18, 38, .97); border-color: rgba(120, 200, 255, .18); }
html.dark .gcell .g-more { background: rgba(12, 18, 38, .9); }
a.el-button, a.el-button:hover { text-decoration: none; }
.usage { gap: 56px; }
.usage-in b { font-size: 36px; }
.usage-legend { gap: 16px; font-size: 15px; }
.lg-row { grid-template-columns: 10px 56px 92px 48px; }

/* ---------- alignment pass: one rule for every table and card header ---------- */
/* text columns left, numeric / action columns right, header always follows its column */
.nas-table th.el-table__cell > .cell, .nas-table td.el-table__cell > .cell { text-align: left; justify-content: flex-start; }
.nas-table th.el-table__cell.is-right > .cell, .nas-table td.el-table__cell.is-right > .cell { text-align: right; justify-content: flex-end; }
.nas-table th.el-table__cell.is-center > .cell, .nas-table td.el-table__cell.is-center > .cell { text-align: center; justify-content: center; }
.nas-table .el-table-column--selection > .cell { justify-content: center; padding: 0 8px; }
.nas-table td.el-table__cell { height: 56px; }
.nas-table .cell { line-height: 1.45; }
/* card header: [◆ title] ............ [action] */
.card-title { justify-content: flex-start; }
.card-title .ct-action { margin-left: auto; }
.pw-form .el-input { width: 100%; }
.nas-table .el-tag { min-width: 76px; justify-content: center; }
.nas-table .code-pill { display: inline-block; min-width: 56px; text-align: center; }
/* access rows: [icon] [title / desc / (address box + copy button on one line)] — the button sits on the line it copies */
.acc { grid-template-columns: 40px minmax(0, 1fr); align-items: start; padding: 14px 0; }
.acc .f-icon { margin-top: 2px; }
.acc-line { display: flex; align-items: stretch; gap: 10px; margin-top: 6px; }
.acc-line .acc-code { flex: 1; min-width: 0; margin: 0; height: 32px; line-height: 24px; box-sizing: border-box; }
.acc-line .acc-btn { width: 84px; height: 32px; flex-shrink: 0; margin: 0; }

/* ---------- one-screen layout: every page fills the viewport, tables scroll inside their card ---------- */
@media (min-width: 769px) {
  .content-col:has(.main-fill) { overflow: hidden; display: flex; flex-direction: column; }
  .main.main-fill { flex: 1; min-height: 0; display: flex; flex-direction: column; overflow-y: auto; padding-bottom: 20px; }
  .page-fill { flex: 1 0 auto; min-height: 100%; display: flex; flex-direction: column; }
  .fill-card { flex: 1; min-height: 0; display: flex; flex-direction: column; }
  .fill-body { flex: 1; min-height: 0; position: relative; }
  .fill-body > .el-table { position: absolute; inset: 0; }
  .fill-row { flex: 1; }
  .fill-row > .card { min-height: 0; }
  .fill-card .el-table__empty-block { min-height: 100%; }
}
.fill-card .el-pagination { margin-top: 14px; justify-content: flex-end; }
@media (min-width: 769px) {
  .fill-row .access-list { flex: 1; }
  .fill-row .acc { flex: 1; align-content: center; padding: 12px 0; }
  .fill-row .acc:first-child { padding-top: 0; }
  .fill-row .acc:last-child { padding-bottom: 0; }
}

/* profile dialog */
.pf-head { display: flex; align-items: center; gap: 20px; padding: 4px 0 20px; margin-bottom: 18px; border-bottom: 1px solid var(--pp-border); }
.pf-head .u-avatar.xl { width: 84px; height: 84px; font-size: 34px; flex-shrink: 0; }
.pf-head-r { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.pf-name { font-size: 18px; font-weight: 700; color: var(--pp-text); }
.pf-sub, .pf-tip { font-size: 13px; color: var(--pp-sub); }
.pf-btns { display: flex; gap: 8px; margin: 6px 0 2px; }
.pf-form .el-form-item { margin-bottom: 18px; }
.u-avatar.has-img { background: none !important; overflow: hidden; }
.u-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; display: block; }

/* ---------- home dashboard ---------- */
.dash-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-top: 16px; align-items: stretch; }
.dash-4 > .card { margin-top: 0; display: flex; flex-direction: column; }
.chart-card { display: flex; flex-direction: column; }
.chart-box { flex: 1; min-height: 220px; width: 100%; }
.chart-box.sm { flex: 1; min-height: 150px; }
.card-title small { font-size: 12px; font-weight: 400; margin-left: 6px; }
.ct-now { display: inline-flex; gap: 14px; font-size: 14px; font-variant-numeric: tabular-nums; }
.ct-now.sm { font-size: 12.5px; gap: 10px; }
.ct-now b { font-weight: 600; }
.ct-now .dn { color: #13c2c2; } .ct-now .up { color: #7c5cff; }
.ct-now .c1 { color: #1677ff; } .ct-now .c2 { color: #fa8c16; }
.dash-4 .ct-now .dn { color: #52c41a; } .dash-4 .ct-now .up { color: #eb2f96; }
.kv-list { display: flex; flex-direction: column; flex: 1; justify-content: space-between; gap: 2px; }
.kv { display: grid; grid-template-columns: 96px minmax(0, 1fr); align-items: center; min-height: 32px; font-size: 13.5px; border-bottom: 1px dashed var(--pp-border); }
.kv:last-child { border-bottom: 0; }
.kv > span { color: var(--pp-sub); }
.kv > b, .kv > em { justify-self: end; text-align: right; font-weight: 600; color: var(--pp-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; font-variant-numeric: tabular-nums; }
.kv > em { font-style: normal; display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; padding: 2px 10px; border-radius: 999px; min-width: 64px; justify-content: center; }
.kv > em.ok { color: var(--pp-ok-fg); background: var(--pp-ok-bg); }
.kv > em.bad { color: var(--pp-bad-fg); background: var(--pp-bad-bg); }
.kv > em .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; box-shadow: 0 0 6px currentColor; }
.home .bad, .kv .bad { color: var(--pp-bad-fg); }
@media (max-width: 1200px) { .dash-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 768px) { .dash-4 { grid-template-columns: 1fr; gap: 10px; margin-top: 10px; } .chart-box { min-height: 200px; } .dash-2 { gap: 10px; } }
.kv { grid-template-columns: minmax(0, 1fr) auto; column-gap: 12px; }
.kv > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* global page loader sits over the content area only (sidebar / header stay usable) */
.main { position: relative; }
.page-loader { pointer-events: auto; }
.pl-box { display: inline-flex; align-items: center; gap: 12px; padding: 14px 22px; border-radius: 12px; }
html:not(.dark) .pl-box { background: rgba(255,255,255,.92); border: 1px solid #e5e6eb; box-shadow: 0 10px 30px rgba(0,0,0,.08); }
/* profile: account rename */
.pf-acc { display: flex; gap: 10px; width: 100%; }
.pf-acc .el-input { flex: 1; }
.pf-rename { display: flex; flex-direction: column; gap: 10px; width: 100%; }
.pf-rename-ops { display: flex; align-items: center; gap: 8px; }
.pf-rename-ops .pf-tip { flex: 1; }
.pf-rename-ops .el-button + .el-button { margin-left: 0; }
/* settings: right column stacks two cards that share the height */
.col-stack { display: flex; flex-direction: column; gap: 16px; min-height: 0; }
.col-stack > .card { margin: 0; flex: 1; display: flex; flex-direction: column; }
.app-row { grid-template-columns: 40px minmax(0, 1fr) auto; }

/* web page preview (sandboxed /view iframe) */
.pv-web { width: 100%; align-self: stretch; }
.pv-frame { display: block; width: 100%; height: 80vh; border: 0; background: #fff; }
.el-dialog.is-fullscreen .pv-frame { height: calc(100dvh - 64px); }
.pv-mode { margin-right: 6px; }
.share-card .sc-web-btn { margin-top: 14px; background: linear-gradient(90deg, #13c2c2, #1677ff) !important; border: 0; }
.share-card .sc-web-btn + .login-btn { margin-top: 10px; }

/* ---- rich previews: PDF (pdf.js) / Word / Excel / PPT / Markdown / ZIP ---- */
.pv-docframe { height: 80vh; }
.el-dialog.is-fullscreen .pv-docframe { height: calc(100dvh - 64px); }
.pv-dialog.pv-doc .pv-body, .pv-dialog.pv-md .pv-body { align-items: stretch; }
.pv-plain { background: #fff; }
html.dark .pv-plain { background: #f8fafc; }
.share-card.wide { width: min(1100px, 96vw); }
.sc-doc { background: transparent; }
.sc-doc .pv-frame { height: 70vh; border-radius: 10px; }
.sc-actions { display: flex; gap: 10px; align-items: center; }
.sc-actions .login-btn { flex: 1; margin-top: 18px; }
.sc-actions > .el-button:not(.login-btn) { margin-top: 18px; height: 46px; }
.sc-pv-body { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 200px; }
.sc-pv-body .pv-frame { height: 75vh; border-radius: 8px; }
.el-dialog.is-fullscreen .sc-pv-body .pv-frame { height: calc(100dvh - 130px); }
@media (max-width: 640px) {
  .sc-doc .pv-frame { height: 65vh; }
  .share-card.wide { padding-left: 12px; padding-right: 12px; }
}

/* web page preview: full-height loading state laid over the frame until the page has loaded */
.pv-web { position: relative; }
.pv-web-loading { height: 80vh; justify-content: center; }
.pv-web .pv-frame + .pv-web-loading { position: absolute; inset: 0; height: auto; background: var(--pp-soft); }
.el-dialog.is-fullscreen .pv-web-loading { height: calc(100dvh - 64px); }

/* sidebar: storage card pinned to the bottom */
.sider { display: flex; flex-direction: column; }
.sider > .el-menu { flex: none; }
.sider .sider-disk { margin-top: auto; margin-bottom: 16px; }

/* no mouse text selection across the panel; form fields (incl. share link / code boxes and the text editor) stay selectable */
html, body { -webkit-user-select: none; user-select: none; }
input, textarea, [contenteditable="true"], .el-input__inner, .el-textarea__inner { -webkit-user-select: text; user-select: text; }
img, a { -webkit-user-drag: none; }

/* ---- text reader ---- */
.tr { --tr-acc: #0e7490; --tr-key: #64748b; --tr-ip: #0891b2; --tr-num: #b45309; --tr-time: #7c3aed; --tr-ok: #059669; --tr-bad: #dc2626; --tr-warn: #d97706;
  display: flex; flex-direction: column; width: 100%; height: 75vh; border: 1px solid var(--pp-border); border-radius: 10px; background: var(--pp-card); overflow: hidden; }
html.dark .tr { --tr-acc: #38e8ff; --tr-key: #8aa0c2; --tr-ip: #5eead4; --tr-num: #fbbf24; --tr-time: #c4b5fd; --tr-ok: #34d399; --tr-bad: #f87171; --tr-warn: #fb923c; }
.el-dialog.is-fullscreen .tr { height: calc(100dvh - 100px); }
.tr-bar { display: flex; justify-content: space-between; align-items: center; gap: 8px 12px; flex-wrap: wrap; padding: 8px 12px; border-bottom: 1px solid var(--pp-border); font-size: 12px; color: var(--pp-text2); }
.tr-tools { display: flex; align-items: center; gap: 8px; }
.tr-scroll { flex: 1; overflow: auto; padding: 10px 0 14px; }
.tr-doc, .tr-codebox { font: var(--tr-fs, 14px)/1.75 "JetBrains Mono", "Cascadia Code", ui-monospace, SFMono-Regular, Consolas, "Microsoft YaHei", "PingFang SC", monospace; color: var(--pp-text); }
.tr-doc, .tr-src { -webkit-user-select: text; user-select: text; }
.tr-doc { counter-reset: ln; min-width: max-content; }
.tr-wrap .tr-doc { min-width: 0; }
.tr-l { counter-increment: ln; position: relative; padding: 0 18px 0 4.6em; white-space: pre; min-height: 1.75em; }
.tr-wrap .tr-l { white-space: pre-wrap; overflow-wrap: anywhere; }
.tr-l::before { content: counter(ln); position: absolute; left: 0; width: 3.4em; text-align: right; font-size: .85em; color: var(--pp-text2); opacity: .45; -webkit-user-select: none; user-select: none; }
.tr-l:hover { background: rgba(127, 127, 127, .07); }
.tr-h { color: var(--tr-acc); font-weight: 700; }
.tr-h:not(:first-child) { margin-top: .3em; }
.tr-li { padding-left: calc(4.6em + var(--ind, 0) * .55em + 1.3em); }
.t-bul { display: inline-block; width: 1.3em; margin-left: -1.3em; color: var(--tr-acc); font-weight: 700; }
.t-key { color: var(--tr-key); }
.t-ip { color: var(--tr-ip); }
.t-num { color: var(--tr-num); }
.t-time { color: var(--tr-time); }
.t-ok { color: var(--tr-ok); font-weight: 600; }
.t-bad { color: var(--tr-bad); font-weight: 600; }
.t-warn { color: var(--tr-warn); font-weight: 600; }
.tr-codebox { display: flex; min-width: max-content; }
.tr-gutter, .tr-src { margin: 0; font: inherit; background: none; }
.tr-gutter { padding: 0 12px 0 14px; text-align: right; color: var(--pp-text2); opacity: .45; border-right: 1px solid var(--pp-border); -webkit-user-select: none; user-select: none; }
.tr-src { padding: 0 18px; white-space: pre; }
.tr-note { padding: 10px 18px; font-size: 12px; color: var(--pp-text2); }
/* highlight.js tokens in the panel's palette */
.tr-src { --hk: #cf222e; --hs: #0a3069; --hn: #0550ae; --hc: #6e7781; --ht: #8250df; --ha: #116329; }
html.dark .tr-src { --hk: #ff7ab2; --hs: #a5d6ff; --hn: #79c0ff; --hc: #6e7f99; --ht: #d2a8ff; --ha: #7ee787; }
.tr-src .hljs-keyword, .tr-src .hljs-selector-tag, .tr-src .hljs-built_in, .tr-src .hljs-type { color: var(--hk); }
.tr-src .hljs-string, .tr-src .hljs-regexp, .tr-src .hljs-symbol { color: var(--hs); }
.tr-src .hljs-number, .tr-src .hljs-literal, .tr-src .hljs-variable, .tr-src .hljs-attr, .tr-src .hljs-property { color: var(--hn); }
.tr-src .hljs-comment, .tr-src .hljs-quote, .tr-src .hljs-meta { color: var(--hc); font-style: italic; }
.tr-src .hljs-title, .tr-src .hljs-section, .tr-src .hljs-name, .tr-src .hljs-selector-class, .tr-src .hljs-selector-id { color: var(--ht); }
.tr-src .hljs-tag, .tr-src .hljs-attribute, .tr-src .hljs-bullet, .tr-src .hljs-params { color: var(--ha); }
.tr-remote { width: 100%; }
.sc-text { background: transparent !important; }
.sc-text .tr { height: 70vh; }
@media (max-width: 640px) {
  .tr { height: calc(100dvh - 120px); }
  .tr-l { padding-left: 3.6em; padding-right: 10px; }
  .tr-l::before { width: 2.7em; }
  .tr-li { padding-left: calc(3.6em + var(--ind, 0) * .55em + 1.3em); }
  .sc-text .tr { height: 65vh; }
}

/* account & security: content-height cards, account summary, password meter */
.set-grid { align-items: start; }
.set-grid .pw-form { max-width: none; }
.acct { display: flex; align-items: center; gap: 14px; padding: 4px 0 14px; }
.acct-av { flex: none; width: 52px; height: 52px; border-radius: 50%; overflow: hidden; display: grid; place-items: center; font-size: 22px; font-weight: 700; color: #fff;
  background: linear-gradient(135deg, #00e5ff, #7c5cff); box-shadow: 0 0 0 2px var(--pp-border); }
.acct-av img { width: 100%; height: 100%; object-fit: cover; }
.acct-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.acct-main b { font-size: 17px; }
.acct-main .muted { font-size: 13px; }
.acct-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.acct-grid > div { display: flex; flex-direction: column; gap: 4px; padding: 10px 12px; border-radius: 10px; background: var(--pp-soft); border: 1px solid var(--pp-border); min-width: 0; }
.acct-grid span { font-size: 12px; color: var(--pp-text2); }
.acct-grid b { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pw-meter { display: flex; align-items: center; gap: 6px; margin-top: 8px; width: 100%; }
.pw-meter i { flex: 1; height: 4px; border-radius: 2px; background: var(--pp-border); transition: background .2s; }
.pw-meter i.on { background: var(--c); }
.pw-meter span { flex: none; width: 3em; text-align: right; font-size: 12px; }

/* storage overview: recent file activity under the gauge */
.recent { margin-top: 18px; padding-top: 14px; border-top: 1px dashed var(--pp-border); }
.recent-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; font-size: 14px; font-weight: 600; }
.recent-row { display: flex; align-items: center; gap: 10px; padding: 8px 4px; border-bottom: 1px solid var(--pp-border); font-size: 13px; }
.recent-row:last-child { border-bottom: 0; }
.rc-act { flex: none; min-width: 4.5em; text-align: center; padding: 1px 8px; border-radius: 6px; font-size: 12px; color: var(--c); background: color-mix(in srgb, var(--c) 14%, transparent); border: 1px solid color-mix(in srgb, var(--c) 35%, transparent); }
.rc-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rc-who { flex: none; max-width: 7em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rc-time { flex: none; width: 5.5em; text-align: right; }
.rc-empty { padding: 12px 4px; font-size: 13px; }

/* my shares: clickable names */
.fn-link { cursor: pointer; }
.fn-link:hover { color: var(--el-color-primary); text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 640px) { .acct-grid { grid-template-columns: 1fr; } .rc-who { display: none; } }

/* video player: native when possible, server-side compatible stream otherwise */
.vp { width: 100%; display: flex; flex-direction: column; }
.vp-wait { min-height: 50vh; justify-content: center; }
.vp-bar { display: flex; align-items: center; gap: 12px; padding: 8px 14px; background: var(--pp-card); border-top: 1px solid var(--pp-border); }
.vp-tag { flex: none; font-size: 12px; padding: 2px 8px; border-radius: 6px; color: #13c2c2; background: rgba(19, 194, 194, .12); border: 1px solid rgba(19, 194, 194, .35); cursor: help; }
.vp-time { flex: none; font: 12px ui-monospace, Consolas, monospace; color: var(--pp-text2); min-width: 3.4em; text-align: center; }
.vp-slider { flex: 1; min-width: 60px; }
.vp-msg { padding: 10px 14px; font-size: 13px; color: #fa8c16; }
.sc-preview .vp-bar { border-radius: 0 0 10px 10px; }
@media (max-width: 640px) { .vp-tag { display: none; } .vp-bar { gap: 8px; padding: 6px 10px; } }

/* grid view: name and details centred under the icon */
.gcell .g-meta { text-align: center; padding: 0 4px; }

/* recycle bin */
.tr-del { display: flex; flex-direction: column; line-height: 1.35; color: var(--pp-text2); }
.tr-del small { font-size: 12px; }
.tr-left { display: inline-block; min-width: 3.6em; text-align: center; padding: 1px 8px; border-radius: 6px; font-size: 12px; white-space: nowrap;
  color: var(--pp-text2); background: var(--pp-soft); border: 1px solid var(--pp-border); }
.tr-left.soon { color: #fa8c16; border-color: rgba(250, 140, 22, .4); background: rgba(250, 140, 22, .1); }
.tr-left.urgent { color: #f5222d; border-color: rgba(245, 34, 45, .4); background: rgba(245, 34, 45, .1); }
.fv-more { padding: 16px 0 6px; text-align: center; font-size: 13px; color: var(--el-text-color-secondary); cursor: pointer; }
