/* ===== Files: cloud file manager (owner 2026-11-11) ===== */
.fm-headrow { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 4px 0 16px; }
.fm-headrow h1 { margin: 0; }
.fm-always { display: flex; align-items: center; gap: 8px; margin: 10px 0 0; font-size: 13px; color: var(--ink-3); }
.fm-always svg { color: var(--sel-ic, #d2602b); flex: none; }
.fm-sto { display: inline-flex; align-items: center; gap: 10px; font-size: 12.5px; color: var(--ink-3); white-space: nowrap; }
.fm-sto .meter { width: 90px; }
.fm-sto a { color: var(--ink-2); }
.fm-auth { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 12px; background: var(--sel, #f1eeea); font-size: 13px; color: var(--ink-2); margin: 0 0 14px; }

/* local copy card */
.fm-sync { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 12px 14px; margin: 0 0 16px; border-radius: 16px; background: var(--panel); box-shadow: var(--shadow-card); }
.fm-sync-h { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 240px; }
.fm-sync-ic { flex: none; width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; background: var(--sel, #f1eeea); color: var(--sel-ic, #d2602b); }
.fm-sync .tn { min-width: 0; }
.fm-sync b { display: block; font-weight: 500; font-size: 13.5px; }
.fm-sync small { display: block; font-size: 12.5px; color: var(--ink-3); line-height: 1.45; }
.fm-sync-b { display: flex; gap: 6px; flex-wrap: wrap; }
.fm-sync.warn { box-shadow: var(--shadow-card), inset 0 0 0 1.5px rgba(210, 96, 43, .35); }
.fm-sync.on .fm-sync-ic { background: rgba(47, 125, 79, .12); color: #2f7d4f; }

/* layout */
.fm-wrap { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 16px; align-items: start; }
.fm-projects { position: sticky; top: 0; display: grid; gap: 2px; padding: 6px; border-radius: var(--r-card); background: var(--panel); box-shadow: var(--shadow-card); max-height: calc(100vh - 160px); overflow-y: auto; scrollbar-width: thin; }
.fm-projects a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; text-decoration: none; color: var(--ink); min-width: 0; transition: background-color .15s var(--ease); }
.fm-projects a:hover { background: var(--hover); }
.fm-projects a.on { background: var(--sel, #f1eeea); }
.fm-projects a.on .fm-ic { color: var(--sel-ic, #d2602b); }
.fm-projects .tn { min-width: 0; }
.fm-projects b { display: block; font-weight: 500; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fm-projects small { display: block; font-size: 11.5px; color: var(--ink-3); }
.fm-ic { flex: none; display: grid; place-items: center; color: var(--ink-3); }
.fm-main { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-items: start; min-width: 0; }
.fm-main.with-pv { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); }
.fm-panel { border-radius: var(--r-card); background: var(--panel); box-shadow: var(--shadow-card); overflow: hidden; min-width: 0; transition: box-shadow .15s var(--ease); }
.fm-panel.over { box-shadow: var(--shadow-card), inset 0 0 0 2px var(--sel-ic, #d2602b); }
.fm-tools { display: flex; align-items: center; gap: 8px; padding: 12px 12px 12px 16px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.fm-crumb { min-width: 0; }
.fm-crumb b { display: block; font: 500 15px/1.3 var(--display); letter-spacing: -.01em; }
.fm-crumb small { font-size: 12px; color: var(--ink-3); }
.fm-view button { white-space: nowrap; }
.fm-up { cursor: pointer; }

/* tree */
.fm-head { display: grid; grid-template-columns: minmax(0, 1fr) 90px 80px 76px; gap: 8px; padding: 8px 12px 6px 16px; font-size: 11.5px; color: var(--ink-3); border-bottom: 1px solid var(--line); }
.fm-head .r, .fm-m.r { text-align: right; }
.fm-tree, .fm-tree ul { list-style: none; margin: 0; padding: 0; }
.fm-tree { padding: 4px 0; }
.fm-row { display: grid; grid-template-columns: minmax(0, 1fr) 90px 80px 76px; gap: 8px; align-items: center; width: 100%; min-height: 38px; padding: 0 12px 0 calc(10px + var(--d, 0) * 18px); text-align: left; color: var(--ink); font-size: 13px; transition: background-color .12s var(--ease); }
.fm-row:hover { background: var(--hover); }
.fm-row.on { background: var(--sel, #f1eeea); }
.fm-row.dir { grid-template-columns: 14px 22px minmax(0, 1fr) 90px 80px 76px; gap: 6px; }
.fm-row.dir > svg:first-child { color: var(--ink-3); transition: transform .18s var(--ease); width: 14px; height: 14px; }
.fm-row.dir.open > svg:first-child { transform: rotate(90deg); }
.fm-row.dir .fm-ic { color: var(--sel-ic, #d2602b); }
.fm-open { display: flex; align-items: center; gap: 6px; min-width: 0; height: 38px; text-align: left; color: inherit; }
.fm-sp { flex: none; width: 14px; }
.fm-n { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fm-row.dir .fm-n { font-weight: 500; }
.fm-m { font-size: 12px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.fm-acts { display: flex; justify-content: flex-end; gap: 2px; opacity: 0; transition: opacity .12s var(--ease); }
.fm-acts .icon-btn { width: 30px; height: 30px; }
.fm-row:hover .fm-acts, .fm-row:focus-within .fm-acts, .fm-acts.show { opacity: 1; }
@media (hover: none) { .fm-acts { opacity: 1; } }
.fm-none { display: flex; align-items: center; gap: 10px; padding: 28px 18px; font-size: 13px; color: var(--ink-3); }
.fm-note { margin: 0; padding: 10px 16px 14px; font-size: 12px; color: var(--ink-3); }
.fm-skel { height: 38px; margin: 10px 14px; border-radius: 10px; background: linear-gradient(90deg, var(--hover), var(--panel), var(--hover)); background-size: 200% 100%; animation: fmShim 1.2s linear infinite; }
@keyframes fmShim { to { background-position: -200% 0; } }

/* preview */
.fm-pv { position: sticky; top: 0; display: flex; flex-direction: column; max-height: calc(100vh - 160px); border-radius: var(--r-card); background: var(--panel); box-shadow: var(--shadow-card); overflow: hidden; min-width: 0; animation: fmIn .2s var(--ease); }
@keyframes fmIn { from { opacity: 0; transform: translateY(6px); } }
.fm-pv-h { display: flex; align-items: center; gap: 6px; padding: 12px 10px 12px 16px; border-bottom: 1px solid var(--line); }
.fm-pv-h .tn { flex: 1; min-width: 0; }
.fm-pv-h b { display: block; font-weight: 500; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fm-pv-h small { display: block; font-size: 11.5px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fm-code { margin: 0; padding: 12px 0; overflow: auto; flex: 1; min-height: 0; font: 12px/1.6 var(--mono); color: var(--ink); counter-reset: ln; tab-size: 2; }
.fm-code span { display: block; padding: 0 16px 0 0; white-space: pre; counter-increment: ln; }
.fm-code span::before { content: counter(ln); display: inline-block; width: 44px; padding-right: 14px; text-align: right; color: var(--ink-3); opacity: .6; user-select: none; }
.fm-pv-img { flex: 1; min-height: 200px; display: grid; place-items: center; padding: 16px; overflow: auto; background: repeating-conic-gradient(var(--hover) 0 25%, transparent 0 50%) 0 0 / 16px 16px; }
.fm-pv-img img { max-width: 100%; max-height: 60vh; object-fit: contain; border-radius: 6px; }
.fm-pv-none, .fm-pv-load { display: grid; justify-items: center; gap: 10px; padding: 48px 20px; color: var(--ink-3); text-align: center; }
.fm-pv-none b { color: var(--ink); font-weight: 500; font-size: 14px; }
.fm-pv-more { margin: 0; padding: 8px 16px 12px; font-size: 12px; color: var(--ink-3); border-top: 1px solid var(--line); }

/* empty */
.fm-empty { display: grid; justify-items: center; text-align: center; gap: 10px; padding: 64px 24px; }
.fm-empty b { font: 500 19px/1.3 var(--display); letter-spacing: -.015em; }
.fm-empty p { margin: 0 0 6px; max-width: 400px; font-size: 13.5px; color: var(--ink-2); line-height: 1.55; }
.fm-empty-ic { width: 56px; height: 56px; border-radius: 18px; display: grid; place-items: center; background: var(--sel, #f1eeea); color: var(--sel-ic, #d2602b); }

/* undo snackbar */
.fm-undo { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 90; display: flex; align-items: center; gap: 16px; padding: 10px 10px 10px 16px; border-radius: 14px; background: var(--ink); color: var(--bg); font-size: 13px; box-shadow: 0 18px 40px -16px rgba(0,0,0,.45); animation: fmUp .2s var(--ease); max-width: calc(100vw - 32px); }
.fm-undo span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fm-undo button { flex: none; height: 30px; padding: 0 12px; border-radius: 9px; background: rgba(255,255,255,.14); color: inherit; font-weight: 500; }
@keyframes fmUp { from { opacity: 0; transform: translate(-50%, 8px); } }

/* responsive */
@media (max-width: 1280px) { .fm-main.with-pv { grid-template-columns: minmax(0, 1fr); } .fm-pv { position: static; max-height: 70vh; } }
@media (max-width: 1024px) { .fm-head, .fm-row { grid-template-columns: minmax(0, 1fr) 70px 72px; } .fm-row.dir { grid-template-columns: 14px 22px minmax(0, 1fr) 70px 72px; } .fm-head > span:last-child { display: none; } .fm-acts { grid-column: 1 / -1; display: none; } .fm-row:hover .fm-acts, .fm-row.on .fm-acts { display: flex; } .fm-row.dir .fm-acts { display: none !important; } }
@media (max-width: 860px) {
  .fm-wrap { grid-template-columns: minmax(0, 1fr); }
  .fm-projects { position: static; display: flex; overflow-x: auto; overflow-y: hidden; max-height: none; padding: 0; background: transparent; box-shadow: none; gap: 6px; scrollbar-width: none; }
  .fm-projects a { flex: none; background: var(--panel); box-shadow: var(--shadow-1); border-radius: 99px; padding: 6px 14px 6px 10px; }
  .fm-projects small { display: none; }
  .fm-pv { position: fixed; inset: auto 0 0 0; z-index: 60; max-height: 82vh; border-radius: 22px 22px 0 0; box-shadow: 0 -20px 50px -20px rgba(0,0,0,.4); }
  .fm-hs { display: none; }
}
@media (max-width: 520px) { .fm-head span:nth-child(2), .fm-row > .fm-m:not(.r) { display: none; } .fm-head, .fm-row { grid-template-columns: minmax(0, 1fr) 64px; } .fm-row.dir { grid-template-columns: 14px 22px minmax(0, 1fr) 64px; } .fm-row.dir .fm-m:not(.r) { display: none; } .fm-sync-b { width: 100%; } }

/* ================= Files v2 (owner 2026-11-11: "very basic … much, much more better … show the app icon") ================= */
.fm2-search { flex: 0 1 360px; min-width: 220px; } .fm2-search input { width: 100%; height: 42px; border-radius: 12px; }
.fm2-over { display: grid; grid-template-columns: 1.25fr 1fr 1fr; gap: 14px; margin-bottom: 14px; }
.fm2-card { display: flex; flex-direction: column; gap: 10px; padding: 18px 20px; border-radius: var(--r-card); background: var(--panel); box-shadow: var(--shadow-card); min-width: 0; }
.fm2-ch { display: flex; align-items: center; gap: 12px; }
.fm2-ch .tn { flex: 1; min-width: 0; } .fm2-ch b { display: block; font-weight: 500; font-size: 14.5px; } .fm2-ch small { display: block; font-size: 12.5px; color: var(--ink-3); }
.fm2-ci { display: grid; place-items: center; flex: none; width: 38px; height: 38px; border-radius: 12px; background: var(--sel); color: var(--sel-ic); }
.fm2-ci.ok { background: rgba(34, 160, 90, .1); color: #1f8f52; }
.fm2-lnk { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; font-weight: 500; color: var(--ink); text-decoration: none; } .fm2-lnk svg { width: 14px; height: 14px; }
.fm2-on { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 500; color: #1f8f52; padding: 4px 10px; border-radius: 99px; background: rgba(34, 160, 90, .1); }
.fm2-on i { width: 6px; height: 6px; border-radius: 50%; background: #22a05a; box-shadow: 0 0 0 3px rgba(34, 160, 90, .18); }
.fm2-big { font: 500 30px/1.1 var(--font); letter-spacing: -.03em; font-variant-numeric: tabular-nums; margin-top: 4px; }
.fm2-big small { font-size: 14px; letter-spacing: 0; color: var(--ink-3); font-weight: 400; }
.fm2-big.sm { font-size: 17px; letter-spacing: -.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fm2-stack { display: flex; height: 8px; border-radius: 99px; background: var(--line); overflow: hidden; gap: 2px; }
.fm2-stack i { display: block; height: 100%; border-radius: 99px; } .fm2-stack i.a, .fm2-legend i.a { background: var(--brand, #e0682f); } .fm2-stack i.b, .fm2-legend i.b { background: #7d86f0; }
.fm2-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12.5px; color: var(--ink-2); } .fm2-legend span { display: inline-flex; align-items: center; gap: 6px; } .fm2-legend i { width: 8px; height: 8px; border-radius: 50%; }
.fm2-p { margin: 0; font-size: 12.5px; line-height: 1.5; color: var(--ink-3); }
.fm2-card .btn { align-self: flex-start; margin-top: auto; } .fm2-btns { display: flex; gap: 6px; flex-wrap: wrap; margin-top: auto; }
.fm2-wrap { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 14px; align-items: start; }
.fm2-rail { position: sticky; top: 0; display: grid; gap: 2px; padding: 10px; border-radius: var(--r-card); background: var(--panel); box-shadow: var(--shadow-card); }
.fm2-rh { display: flex; align-items: center; justify-content: space-between; padding: 6px 10px 8px; font-size: 12px; color: var(--ink-3); } .fm2-rh span { font-variant-numeric: tabular-nums; }
.fm2-rail > a { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 14px; color: var(--ink); text-decoration: none; transition: background .15s var(--ease); }
.fm2-rail > a:hover { background: var(--hover); }
.fm2-rail > a.on { background: var(--sel-raise, var(--sel)); box-shadow: var(--sel-edge, inset 0 0 0 1px var(--line-2)); }
.fm2-rail .ai-icon { flex: none; border-radius: 10px; box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.fm2-rail .tn { min-width: 0; } .fm2-rail b { display: block; font-weight: 500; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .fm2-rail small { display: block; font-size: 12px; color: var(--ink-3); }
.fm2-rail .fm2-new { margin-top: 4px; color: var(--ink-3); font-size: 13px; gap: 10px; padding: 10px; } .fm2-new svg { margin: 0 9px; }
.fm2-panel { position: relative; padding: 18px; }
.fm2-ph { display: flex; align-items: center; gap: 16px; padding-bottom: 16px; margin-bottom: 16px; border-bottom: 1px solid var(--line); }
.fm2-ph .ai-icon { flex: none; border-radius: 15px; box-shadow: 0 1px 2px rgba(0,0,0,.08), 0 10px 22px -12px rgba(0,0,0,.35); }
.fm2-ph .tn { min-width: 0; } .fm2-ph b { display: block; font: 500 22px/1.15 var(--font); letter-spacing: -.02em; } .fm2-ph small { display: block; margin-top: 4px; font-size: 13px; color: var(--ink-3); }
.fm2-ph .btn { height: 38px; }
.fm2-sub { font-size: 12px; color: var(--ink-3); margin-bottom: 8px; }
.fm2-rec { margin-bottom: 16px; }
.fm2-recs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.fm2-rc { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; border: 0; background: var(--bg, #f4f3f1); text-align: left; cursor: pointer; font: inherit; color: var(--ink); min-width: 0; transition: background .15s var(--ease), box-shadow .15s var(--ease); }
.fm2-rc:hover { background: var(--panel); box-shadow: inset 0 0 0 1px var(--line-2), var(--shadow-1); }
.fm2-rc .tn { min-width: 0; } .fm2-rc b { display: block; font-weight: 500; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .fm2-rc small { font-size: 11.5px; color: var(--ink-3); }
.fm2-rci { display: grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 10px; }
.fm2-bar { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; } .fm2-bar .cl-filters { flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.fm2-lay { display: inline-flex; padding: 3px; border-radius: 12px; background: var(--bg, #f1f0ee); }
.fm2-lay button { display: grid; place-items: center; width: 34px; height: 30px; border: 0; border-radius: 9px; background: none; color: var(--ink-3); cursor: pointer; }
.fm2-lay button.on { background: var(--panel); color: var(--ink); box-shadow: var(--shadow-1); }
/* the list: Name · Kind · Modified · Size · actions */
.fm2 .fm-head { grid-template-columns: minmax(0, 1fr) 90px 100px 80px 72px; padding: 10px 12px 8px 14px; }
.fm2 .fm-row { grid-template-columns: minmax(0, 1fr) 90px 100px 80px 72px; min-height: 44px; border-radius: 10px; }
.fm2 .fm-row.dir { grid-template-columns: 14px 26px minmax(0, 1fr) 90px 100px 80px 72px; }
.fm2 .fm-open { height: 44px; gap: 10px; }
.fm2 .fm-n small { margin-left: 8px; font-size: 11.5px; font-weight: 400; color: var(--ink-3); }
.fm2-fold { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; background: rgba(224, 104, 47, .12); color: var(--sel-ic); }
.fm2-badge { display: inline-grid; place-items: center; flex: none; min-width: 38px; height: 22px; padding: 0 6px; border-radius: 6px; font: 600 9.5px/1 var(--font); letter-spacing: .04em; }
.k-page { background: #fdeee5; color: #c4521d; } .k-style { background: #e7efff; color: #2f62d8; } .k-code { background: #fff4d6; color: #9a6b00; }
.k-image { background: #f1e8ff; color: #7444c9; } .k-data { background: #e4f6ee; color: #1d8456; } .k-doc { background: #eef0f3; color: #4c5563; } .k-other { background: #f1f0ee; color: #6b6b6b; }
.fm2-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; padding-top: 6px; }
.fm2-tile { display: flex; flex-direction: column; gap: 3px; padding: 8px 8px 10px; border: 0; border-radius: 16px; background: none; text-align: left; cursor: pointer; font: inherit; color: var(--ink); min-width: 0; transition: background .15s var(--ease); }
.fm2-tile:hover, .fm2-tile.on { background: var(--hover); }
.fm2-thumb { position: relative; display: grid; place-items: center; aspect-ratio: 4 / 3; border-radius: 12px; margin-bottom: 6px; overflow: hidden; }
.fm2-thumb img { width: 100%; height: 100%; object-fit: cover; background: repeating-conic-gradient(#f1f0ee 0 25%, #fff 0 50%) 0 0 / 14px 14px; }
.fm2-thumb .fm2-badge { position: absolute; left: 8px; bottom: 8px; background: rgba(255,255,255,.85); }
.fm2-tile b { font-weight: 500; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .fm2-tile small { font-size: 11.5px; color: var(--ink-3); }
.fm2-empty { display: grid; justify-items: center; gap: 6px; padding: 48px 16px; text-align: center; color: var(--ink-3); } .fm2-empty b { color: var(--ink); font-weight: 500; font-size: 15px; } .fm2-empty small { font-size: 13px; }
.fm2-empty.big { padding: 64px 16px; } .fm2-empty .btn { margin-top: 10px; }
.fm2-fine { margin: 10px 14px 4px; font-size: 12px; color: var(--ink-3); }
.fm2-drop { position: absolute; inset: 8px; display: none; place-items: center; align-content: center; gap: 8px; border-radius: 18px; border: 1.5px dashed var(--sel-ic); background: rgba(255, 248, 243, .92); color: var(--sel-ic); font-weight: 500; z-index: 3; }
.fm2-panel.over .fm2-drop { display: grid; }
@media (max-width: 1280px) { .fm2-over { grid-template-columns: 1fr 1fr; } .fm2-over .fm2-sto { grid-column: 1 / -1; } .fm2-recs { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 900px) { .fm2-wrap { grid-template-columns: minmax(0, 1fr); } .fm2-rail { position: static; display: flex; overflow-x: auto; } .fm2-rail .fm2-rh { display: none; } .fm2-rail > a { flex: none; } .fm2-over { grid-template-columns: minmax(0, 1fr); }
  .fm2 .fm-head, .fm2 .fm-row { grid-template-columns: minmax(0, 1fr) 80px 64px; } .fm2 .fm-row.dir { grid-template-columns: 14px 26px minmax(0, 1fr) 80px 64px; } .fm2 .fm-head span:nth-child(2), .fm2 .fm-row > .fm-m:nth-of-type(1) { display: none; } }
