/* The pages of ggwa (fe01/fe02) and of its files server ggwa-fs: a column
   on the left (the logo, projects or the navigation), the page on the right
   (ggwa-fs/mockup). One stylesheet for both, embedded in both binaries.
   No inline styles anywhere: ggwa-fs's CSP has style-src 'self'; icons are
   data: images (img-src allows them). The colours here are neutral: a
   brand's brand.css comes after this one and sets its own (brands/). */
:root {
  --side-bg: #272c33; --side-fg: #e9ebee; --side-muted: #9aa3ad; --side-hover: #343a43; --side-active: #414956; --brand: #8fa3b8;
  --side-rw-bg: rgba(143,163,184,.22); --side-rw-fg: #dbe3ec; --side-rw-line: rgba(143,163,184,.6);
  --accent: #3f6f9f; --accent-hover: #335a82; --accent-soft: #eaf0f6;
  --fg: #1d2330; --muted: #667085; --line: #e3e6ec; --bg: #f4f6f9; --card: #fff; --row-hover: #f5f8fc;
  --ok: #2f855a; --bad: #c53030; --bad-hover: #9b2c2c; --bad-soft: #fdecec; --warn: #b7791f;
  --radius: 8px;
  --i-folder: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23f0b429' d='M2 6.5A2.5 2.5 0 0 1 4.5 4h4.6l2.2 2.2h8.2A2.5 2.5 0 0 1 22 8.7v9.8a2.5 2.5 0 0 1-2.5 2.5h-15A2.5 2.5 0 0 1 2 18.5z'/%3E%3Cpath fill='%23f7c948' d='M2 9.5h20v9a2.5 2.5 0 0 1-2.5 2.5h-15A2.5 2.5 0 0 1 2 18.5z'/%3E%3C/svg%3E");
  --i-mount: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%237c5cbf' d='M2 6.5A2.5 2.5 0 0 1 4.5 4h4.6l2.2 2.2h8.2A2.5 2.5 0 0 1 22 8.7v9.8a2.5 2.5 0 0 1-2.5 2.5h-15A2.5 2.5 0 0 1 2 18.5z'/%3E%3Cpath fill='%239b7fd6' d='M2 9.5h20v9a2.5 2.5 0 0 1-2.5 2.5h-15A2.5 2.5 0 0 1 2 18.5z'/%3E%3Cpath fill='none' stroke='%23fff' stroke-width='1.8' stroke-linecap='round' d='M10.2 15.6l3.6-3.6M9.4 13.4l-1 1a1.9 1.9 0 0 0 2.7 2.7l1-1M14.6 14.2l1-1a1.9 1.9 0 0 0-2.7-2.7l-1 1'/%3E%3C/svg%3E");
  --i-file: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23fff' stroke='%2398a2b3' stroke-width='1.5' stroke-linejoin='round' d='M6 2.75h8.2l4.05 4.05v14.45H6z'/%3E%3Cpath fill='none' stroke='%2398a2b3' stroke-width='1.5' stroke-linejoin='round' d='M14 2.75v4.25h4.25'/%3E%3C/svg%3E");
  --i-symlink: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='%2398a2b3' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round' d='M5 19V12a4 4 0 0 1 4-4h10M15 4l4 4-4 4'/%3E%3C/svg%3E");
  --i-share: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='%238fa6b8' stroke-width='1.8' stroke-linecap='round' d='M10 14l4-4M8.5 11.5l-2 2a3.5 3.5 0 0 0 5 5l2-2M15.5 12.5l2-2a3.5 3.5 0 0 0-5-5l-2 2'/%3E%3C/svg%3E");
  --i-term: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect x='3' y='4.5' width='18' height='15' rx='2' fill='none' stroke='%238fa6b8' stroke-width='1.6'/%3E%3Cpath fill='none' stroke='%238fa6b8' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round' d='M7 10l3 2.5L7 15M12 15h5'/%3E%3C/svg%3E");
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; font: 14px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--fg); background: var(--bg); }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input { font: inherit; }
.muted { color: var(--muted); }
.bad { color: var(--bad); }
[hidden] { display: none !important; }
pre { background: #f3f5f8; border: 1px solid var(--line); border-radius: 6px; padding: 10px 12px; overflow-x: auto; font-size: 13px; }
h2 { font-size: 16px; margin: 20px 0 8px; }

/* ------------------------------------------------------------- layout -- */
body.app { display: flex; height: 100vh; overflow: hidden; }
.side { width: 240px; min-width: 240px; background: var(--side-bg); color: var(--side-fg); display: flex; flex-direction: column; overflow-y: auto; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.content { flex: 1; overflow: auto; padding: 16px 24px 96px; scroll-padding-top: 48px; }
.content > .narrow { max-width: 860px; }

/* pages without a user or a link: sign-in, signed out, errors */
body.plain { display: flex; justify-content: center; align-items: flex-start; padding: 8vh 16px 32px; height: auto; min-height: 100%; }
.box { width: 560px; max-width: 100%; background: var(--card); border-radius: 12px; box-shadow: 0 4px 20px rgba(16,24,40,.10); padding: 24px 28px 26px; }
.box .brand { padding: 0 0 16px; border-bottom: 1px solid var(--line); color: var(--fg); }
.box .brand small { color: var(--muted); }
.box h1 { font-size: 19px; margin: 18px 0 10px; overflow-wrap: anywhere; }
.box form { margin: 14px 0 0; }
.box input[type=password] { padding: 7px 10px; border: 1px solid var(--line); border-radius: 6px; width: 260px; max-width: 100%; }

/* ------------------------------------------------------------ sidebar -- */
.brand { display: flex; align-items: center; gap: 12px; padding: 18px 18px 16px; color: var(--side-fg); border-bottom: 1px solid rgba(255,255,255,.08); }
.brand:hover { text-decoration: none; }
.brand img { width: 52px; height: 52px; border-radius: 4px; flex: none; }
.brand b { display: block; font-size: 16px; letter-spacing: .06em; }
.brand small { display: block; color: var(--side-muted); font-size: 13px; }
.side-title { padding: 16px 18px 6px; font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--side-muted); }
.side-info { padding: 4px 18px 12px; color: var(--side-muted); font-size: 13px; }
.side-info div { margin: 6px 0; overflow-wrap: anywhere; }
.side-info strong { display: block; color: var(--side-fg); font-weight: 500; }
.side-empty { padding: 6px 18px; color: var(--side-muted); font-size: 13px; }
.projects a, .side-links a { display: flex; align-items: center; gap: 8px; padding: 9px 18px 9px 15px; color: var(--side-fg); border-left: 3px solid transparent; }
.projects a:hover, .side-links a:hover { background: var(--side-hover); text-decoration: none; }
.projects a.active, .side-links a.active { background: var(--side-active); border-left-color: var(--brand); }
.projects .pname { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-sep { border-top: 1px solid rgba(255,255,255,.08); margin: 10px 18px; }
.side-links a::before { content: ""; width: 18px; height: 18px; background: center / contain no-repeat; flex: none; }
.side-links a.l-shares::before { background-image: var(--i-share); }
.side-links a.l-cli::before { background-image: var(--i-term); }
.side-foot { margin-top: auto; padding: 14px 18px; font-size: 12px; color: var(--side-muted); }

.perm { font-size: 11px; line-height: 1; padding: 3px 6px; border-radius: 4px; font-weight: 600; letter-spacing: .03em; }
.side .perm.rw { background: var(--side-rw-bg); color: var(--side-rw-fg); box-shadow: inset 0 0 0 1px var(--side-rw-line); }
.side .perm.ro { background: rgba(255,255,255,.07); color: var(--side-muted); box-shadow: inset 0 0 0 1px rgba(255,255,255,.15); }
.main .perm.rw { background: var(--accent-soft); color: var(--accent); }
.main .perm.ro { background: #eef0f3; color: var(--muted); }
/* a files server in a beta test: marked in ggwa's column and tiles, a
   strip on its own pages */
.beta { flex: none; font-size: 11px; line-height: 1; padding: 3px 6px; border-radius: 4px; font-weight: 600; letter-spacing: .03em; background: #fdf3e1; color: var(--warn); box-shadow: inset 0 0 0 1px rgba(183,121,31,.35); }
.side .beta { background: rgba(240,180,41,.16); color: #f7c948; box-shadow: inset 0 0 0 1px rgba(240,180,41,.5); }
.beta-note { margin: 0; padding: 8px 24px; background: #fdf3e1; color: #6b4410; border-bottom: 1px solid #f3dcb0; overflow-wrap: anywhere; }
.beta-note .beta { margin-right: 8px; background: #fff; }
.box .beta-note { margin: 14px 0 0; padding: 8px 12px; border: 1px solid #f3dcb0; border-radius: 6px; }

/* ------------------------------------------------------------- header -- */
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 24px; background: var(--card); border-bottom: 1px solid var(--line); }
.top h1 { margin: 0; font-size: 20px; font-weight: 600; display: flex; align-items: center; gap: 10px; overflow-wrap: anywhere; }
.crumbs { margin-top: 2px; color: var(--muted); overflow-wrap: anywhere; }
.crumbs .sep { margin: 0 4px; color: #b3bac6; }
.user { display: flex; align-items: center; gap: 12px; white-space: nowrap; color: var(--muted); }
.user .uname { color: var(--fg); font-weight: 500; }
.user form { margin: 0; }

/* ------------------------------------------------------------ toolbar -- */
.toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 12px 24px; background: var(--card); border-bottom: 1px solid var(--line); }
.toolbar:empty { display: none; }
.toolbar .spacer { flex: 1; }
.toolbar .group { display: flex; gap: 8px; flex-wrap: wrap; }
.filter { width: 220px; padding: 7px 10px 7px 32px; border: 1px solid var(--line); border-radius: 6px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='10.5' cy='10.5' r='6' fill='none' stroke='%2398a2b3' stroke-width='2'/%3E%3Cpath stroke='%2398a2b3' stroke-width='2' stroke-linecap='round' d='M15 15l5 5'/%3E%3C/svg%3E") 9px center / 16px no-repeat; }
.filter:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 6px; border: 1px solid var(--line); background: #fff; color: var(--fg); cursor: pointer; white-space: nowrap; }
.btn:hover { background: var(--row-hover); border-color: #cfd5de; text-decoration: none; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn.danger { color: var(--bad); border-color: #f0c2c2; }
.btn.danger:hover { background: var(--bad-soft); }
.btn.danger.solid { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn.danger.solid:hover { background: var(--bad-hover); }
.btn:disabled, .btn:disabled:hover { background: #f3f4f6; border-color: var(--line); color: #a3aab6; cursor: not-allowed; }
.btn.ghost { border-color: transparent; background: none; color: var(--accent); padding: 7px 8px; }
.btn.ghost:hover { background: var(--accent-soft); }
.note { margin: 0 0 12px; padding: 8px 12px; border-radius: 6px; background: #eef0f3; color: var(--muted); }
.notice { margin: 0 0 12px; padding: 8px 12px; border-radius: 6px; background: var(--accent-soft); color: var(--fg); display: flex; gap: 12px; align-items: flex-start; }
.notice.bad { background: var(--bad-soft); color: var(--bad); }
.notice .text { flex: 1; overflow-wrap: anywhere; }
.notice button { border: 0; background: none; cursor: pointer; color: inherit; font-size: 16px; line-height: 1; padding: 0 2px; }

/* ------------------------------------------------------------ listing -- */
.card { background: var(--card); border-radius: var(--radius); box-shadow: 0 1px 3px rgba(16,24,40,.08); }
table.listing { width: 100%; border-collapse: separate; border-spacing: 0; }
/* sticky at the very top of .content (above its padding), rows scrolled to kept below it */
.listing th { position: sticky; top: -16px; z-index: 1; background: #f8f9fb; text-align: left; font-weight: 600; color: var(--muted); padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.listing th:first-child { border-top-left-radius: var(--radius); }
.listing th:last-child { border-top-right-radius: var(--radius); }
.listing td { padding: 8px 12px; border-bottom: 1px solid #eef0f3; vertical-align: middle; }
.listing tr:last-child td { border-bottom: 0; }
.listing tbody tr:hover { background: var(--row-hover); }
.listing tbody tr.selected { background: var(--accent-soft); }
/* the checkboxes and a row's buttons need the page's script */
.listing .c, .listing .a { display: none; }
body.js .listing .c, body.js .listing .a { display: table-cell; }
.listing .c { width: 44px; text-align: center; padding-right: 0; }
.listing input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--accent); cursor: pointer; vertical-align: middle; }
.listing .n { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; color: var(--muted); width: 110px; }
.listing .t { white-space: nowrap; font-variant-numeric: tabular-nums; color: var(--muted); width: 160px; }
.listing .a { width: 190px; text-align: right; white-space: nowrap; }
.name { display: flex; align-items: center; gap: 10px; }
.name > span { min-width: 0; overflow-wrap: anywhere; }
.name .tag { margin-left: 6px; }
.name::before { content: ""; width: 20px; height: 20px; flex: none; background: center / contain no-repeat; }
.name.dir::before { background-image: var(--i-folder); }
.name.mount::before { background-image: var(--i-mount); }
.name.file::before, .name.other::before { background-image: var(--i-file); }
.name.link::before { background-image: var(--i-symlink); }
.name.parent::before { background-image: var(--i-folder); opacity: .6; }
.name.dir a, .name.mount a { font-weight: 600; color: var(--fg); }
.name.file a, .name.parent a { color: var(--fg); }
.name a:hover { color: var(--accent); }
.name.link .nm, .name.other .nm { color: var(--muted); }
.tag { font-size: 12px; color: var(--muted); border: 1px solid var(--line); border-radius: 4px; padding: 0 6px; white-space: nowrap; }
.ra { opacity: 0; transition: opacity .1s; }
tr:hover .ra, tr:focus-within .ra { opacity: 1; }
@media (pointer: coarse) { .ra { opacity: 1; } }
.ra button { border: 0; background: none; color: var(--muted); cursor: pointer; padding: 2px 6px; border-radius: 4px; }
.ra button:hover { background: #e9edf3; color: var(--accent); }
.ra button.delete:hover { background: var(--bad-soft); color: var(--bad); }
.listing tr.more td { text-align: center; padding: 12px; }
.listing tr.empty td { text-align: center; padding: 28px; color: var(--muted); }
.foot { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px 16px; padding: 10px 4px; color: var(--muted); font-size: 13px; }
.foot .sel { color: var(--accent); font-weight: 500; }
mark { background: #fff3bf; color: inherit; padding: 0 1px; border-radius: 2px; }
.hint-line { margin: 4px 4px 0; }

/* files dropped onto the page (a writable folder) */
body.dragging .content { outline: 2px dashed var(--accent); outline-offset: -10px; background: var(--accent-soft); }
.dropzone { border: 2px dashed #cdd5df; border-radius: var(--radius); padding: 40px 24px; text-align: center; color: var(--muted); background: var(--card); }
.dropzone b { color: var(--fg); }
body.dragging .dropzone { border-color: var(--accent); }

/* a share link's single file */
.filecard { display: flex; align-items: center; gap: 16px; padding: 20px; max-width: 640px; }
.filecard .name { flex: 1; font-size: 16px; }
.filecard .name::before { width: 32px; height: 32px; }

/* my share links */
table.shares td { vertical-align: top; }
table.shares td.ev { font-size: 13px; color: var(--muted); }
table.shares td.ev div { white-space: nowrap; }

/* ------------------------------------------------- overview (start page) -- */
.overview { max-width: 980px; }
.overview h2 { margin: 4px 0 12px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; margin-bottom: 24px; }
.tile { display: flex; align-items: center; gap: 12px; padding: 14px 16px; background: var(--card); border-radius: var(--radius); box-shadow: 0 1px 3px rgba(16,24,40,.08); color: var(--fg); border: 1px solid transparent; }
.tile:hover { border-color: var(--accent); text-decoration: none; }
.tile::before { content: ""; width: 32px; height: 32px; flex: none; background: var(--i-folder) center / contain no-repeat; }
.tile .pname { flex: 1; min-width: 0; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hints { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.hint { padding: 14px 16px; background: var(--card); border-radius: var(--radius); box-shadow: 0 1px 3px rgba(16,24,40,.08); }
.hint h3 { margin: 0 0 4px; font-size: 14px; }
.hint p { margin: 0; color: var(--muted); }

/* ------------------------------------------------------- upload panel -- */
.uploads { position: fixed; right: 16px; bottom: 16px; width: 500px; max-width: calc(100vw - 32px); max-height: 55vh; display: flex; flex-direction: column; background: var(--card); border-radius: 10px; box-shadow: 0 8px 28px rgba(16,24,40,.22); z-index: 20; overflow: hidden; }
.uploads header { display: flex; align-items: center; gap: 8px; padding: 10px 14px; background: var(--accent); color: #fff; }
.uploads header .what { flex: 1; font-weight: 600; }
.uploads header button { border: 0; background: none; color: #fff; cursor: pointer; font-size: 16px; padding: 0 4px; opacity: .9; }
.uploads header button:hover { opacity: 1; }
.uploads header .up-cancel { font-size: 13px; font-weight: 600; padding: 3px 10px; border: 1px solid rgba(255,255,255,.65); border-radius: 6px; }
.uploads header .up-cancel:hover { background: rgba(255,255,255,.16); }
.uploads .opts { padding: 8px 14px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.uploads .opts label { white-space: nowrap; }
.summary { margin-top: 2px; }
.summary .bad { color: var(--bad); }
.uploads .list { overflow-y: auto; }
.up { padding: 8px 14px; border-bottom: 1px solid #eef0f3; }
.up:last-child { border-bottom: 0; }
.up .row { display: flex; align-items: baseline; gap: 8px; font-size: 13px; }
.up .row .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.up .row .sz { color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.up .row .st { color: var(--muted); white-space: nowrap; }
.up .row button { border: 0; background: none; color: var(--muted); cursor: pointer; padding: 0 2px; }
.up .row button:hover { color: var(--accent); }
.up .row button.x:hover { color: var(--bad); }
.up.failed .row { flex-wrap: wrap; }
.up.failed .row .st { flex-basis: 100%; order: 9; white-space: normal; }
.up progress { display: block; width: 100%; height: 6px; margin-top: 5px; appearance: none; border: 0; border-radius: 3px; background: #edf0f4; overflow: hidden; }
.up progress::-webkit-progress-bar { background: #edf0f4; }
.up progress::-webkit-progress-value { background: var(--accent); }
.up progress::-moz-progress-bar { background: var(--accent); }
.up.done .st { color: var(--ok); }
.up.done progress::-moz-progress-bar { background: var(--ok); }
.up.done progress::-webkit-progress-value { background: var(--ok); }
.up.failed .st { color: var(--bad); }
.up.waiting .st { color: var(--warn); }
.up.cancelled { opacity: .6; }
.uploads.collapsed .list, .uploads.collapsed .opts { display: none; }

/* ------------------------------------------------------------ dialogs -- */
dialog { border: 0; border-radius: 12px; padding: 0; width: 540px; max-width: calc(100vw - 32px); box-shadow: 0 16px 48px rgba(16,24,40,.28); color: var(--fg); }
dialog::backdrop { background: rgba(3,20,35,.45); }
dialog form { margin: 0; }
.dlg-h { padding: 18px 22px 6px; font-size: 17px; font-weight: 600; overflow-wrap: anywhere; }
.dlg-h.bad { color: var(--bad); }
.dlg-b { padding: 6px 22px 8px; }
.dlg-b p { margin: 6px 0 10px; }
.dlg-f { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 22px 18px; }
.items { list-style: none; margin: 8px 0 12px; padding: 6px 10px; max-height: 220px; overflow-y: auto; background: #f8f9fb; border: 1px solid #eef0f3; border-radius: 6px; }
.items li { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; border-bottom: 1px solid #eef0f3; }
.items li:last-child { border-bottom: 0; }
.items li span:first-child { overflow-wrap: anywhere; }
.items li .n { color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.warn-line { color: var(--bad); font-size: 13px; }
/* Info on an entry */
dialog.wide { width: 900px; }
dialog.info .dlg-b { max-height: calc(100vh - 170px); overflow-y: auto; }
dialog.info h3 { margin: 18px 0 8px; font-size: 15px; }
dialog.info .dlg-f { align-items: center; }
.dlg-hint { font-size: 13px; }
table.kv { border-collapse: collapse; width: 100%; font-size: 14px; }
table.kv th { text-align: left; font-weight: 500; color: var(--muted); padding: 3px 16px 3px 0; white-space: nowrap; vertical-align: top; width: 1%; }
table.kv td { padding: 3px 0; overflow-wrap: anywhere; }
code.sum { word-break: break-all; }
pre.segy, pre.text { font-size: 12px; line-height: 1.35; max-height: 42vh; margin: 0 0 8px; white-space: pre; }
.pic { background: repeating-conic-gradient(#eef1f5 0 25%, #fff 0 50%) 0 0 / 16px 16px; border: 1px solid var(--line); border-radius: 6px; padding: 8px; text-align: center; }
.pic img { max-width: 100%; max-height: 60vh; vertical-align: middle; }
.pic p { margin: 6px 0; }
.dlg-row { display: flex; gap: 8px; margin: 0 0 6px; align-items: center; flex-wrap: wrap; }
.muted.small { font-size: 12px; }
.btn.small { padding: 3px 10px; font-size: 13px; }
.btn[aria-pressed=true] { background: var(--accent-soft); border-color: var(--accent); }
.partial { background: #fff6e5; border: 1px solid #f3d9a4; color: #7a5200; border-radius: 6px; padding: 6px 10px; font-size: 13px; }
.arch { max-height: 42vh; overflow-y: auto; border: 1px solid var(--line); border-radius: 6px; }
.arch .listing th { top: 0; padding: 7px 10px; font-size: 13px; }
.arch .listing td { padding: 5px 10px; font-size: 13px; }
.field { margin: 10px 0; }
.field label.t { display: block; margin-bottom: 4px; color: var(--muted); font-size: 13px; }
.field input[type=text], .field input[type=email], .field input[type=number] { padding: 7px 10px; border: 1px solid var(--line); border-radius: 6px; width: 100%; }
.field input[type=number] { width: 90px; }
.field select { padding: 7px 10px; border: 1px solid var(--line); border-radius: 6px; width: 100%; background: var(--card); color: inherit; }
.radio { display: flex; gap: 8px; align-items: flex-start; margin: 6px 0; }
.radio input { margin-top: 3px; accent-color: var(--accent); }
.share-url { display: flex; gap: 8px; margin: 10px 0 6px; }
.dlg-f .left { margin-right: auto; }
/* the move dialog's folders */
.tree { list-style: none; margin: 8px 0 10px; padding: 6px; max-height: 300px; overflow-y: auto; border: 1px solid var(--line); border-radius: 6px; }
.tree ul { list-style: none; margin: 0; padding-left: 20px; }
.tree li.muted { padding: 4px 8px; font-size: 13px; }
.tree .node { display: flex; align-items: center; gap: 6px; width: 100%; padding: 5px 8px; border: 0; border-radius: 5px; background: none; text-align: left; cursor: pointer; color: var(--fg); }
.tree .node:hover { background: var(--row-hover); }
.tree .node.chosen { background: var(--accent); color: #fff; }
.tree .node.off { color: #a3aab6; cursor: default; }
.tree .node .car { width: 14px; color: var(--muted); flex: none; text-align: center; cursor: pointer; }
.tree .node.chosen .car { color: #fff; }
.tree .node .ic { width: 18px; height: 18px; background: var(--i-folder) center / contain no-repeat; flex: none; }
.tree .node .ic.m { background-image: var(--i-mount); }
.tree .node .nm { min-width: 0; overflow-wrap: anywhere; }
.tree .node .why { margin-left: auto; font-size: 12px; white-space: nowrap; }
.share-url input { flex: 1; min-width: 0; padding: 7px 10px; border: 1px solid var(--line); border-radius: 6px; font-family: ui-monospace, monospace; font-size: 13px; }

/* ------------------------------------------------------- narrow screens -- */
@media (max-width: 820px) {
  body.app { display: block; height: auto; overflow: visible; }
  .side { width: auto; min-width: 0; overflow: visible; }
  .brand { padding: 12px 16px; }
  .brand img { width: 40px; height: 40px; }
  .side-title, .side-foot, .side-sep { display: none; }
  .projects { display: flex; gap: 6px; overflow-x: auto; padding: 0 12px 10px; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.25) transparent; }
  .projects a { border: 1px solid rgba(255,255,255,.15); border-radius: 16px; padding: 5px 12px; white-space: nowrap; }
  .projects a.active { border-color: var(--brand); }
  .side-links { display: flex; padding: 0 8px 8px; }
  .side-links a { padding: 6px 10px; border: 0; font-size: 13px; }
  .side-info { padding: 0 16px 10px; }
  .top { flex-wrap: wrap; padding: 12px 16px; }
  .toolbar { padding: 10px 16px; }
  .filter { width: 100%; }
  .toolbar .spacer { display: none; }
  .content { padding: 12px 8px 96px; overflow: visible; }
  .listing .t, body.js .listing .a { display: none; }
  .listing th { top: 0; }
  .uploads { left: 8px; right: 8px; width: auto; }
}

/* ================================================================ ggwa ==
   The remote desktops' pages: sign-in, the user's desktops, administration.
   Navigation in the column, the same controls as the files server's. */
:root {
  --i-desk: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect x='3' y='4' width='18' height='12' rx='1.5' fill='none' stroke='%238fa6b8' stroke-width='1.6'/%3E%3Cpath fill='none' stroke='%238fa6b8' stroke-width='1.6' stroke-linecap='round' d='M9 20h6M12 16v4'/%3E%3C/svg%3E");
  --i-files: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='%238fa6b8' stroke-width='1.6' stroke-linejoin='round' d='M3 7a2 2 0 0 1 2-2h4l2 2h8a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z'/%3E%3C/svg%3E");
  --i-eye: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='%238fa6b8' stroke-width='1.6' stroke-linejoin='round' d='M2.5 12S6 5.5 12 5.5 21.5 12 21.5 12 18 18.5 12 18.5 2.5 12 2.5 12z'/%3E%3Ccircle cx='12' cy='12' r='3' fill='none' stroke='%238fa6b8' stroke-width='1.6'/%3E%3C/svg%3E");
  --i-user: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='8' r='4' fill='none' stroke='%238fa6b8' stroke-width='1.6'/%3E%3Cpath fill='none' stroke='%238fa6b8' stroke-width='1.6' stroke-linecap='round' d='M4 20c1.5-3.5 4.5-5 8-5s6.5 1.5 8 5'/%3E%3C/svg%3E");
  --i-server: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect x='3.5' y='4' width='17' height='7' rx='1.5' fill='none' stroke='%238fa6b8' stroke-width='1.6'/%3E%3Crect x='3.5' y='13' width='17' height='7' rx='1.5' fill='none' stroke='%238fa6b8' stroke-width='1.6'/%3E%3Cpath stroke='%238fa6b8' stroke-width='2' stroke-linecap='round' d='M7 7.5h.01M7 16.5h.01'/%3E%3C/svg%3E");
  --i-sync: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='%238fa6b8' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round' d='M19 8a7.5 7.5 0 0 0-13.5-1.5M5 4v3h3M5 16a7.5 7.5 0 0 0 13.5 1.5M19 20v-3h-3'/%3E%3C/svg%3E");
  --i-help: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='9' fill='none' stroke='%238fa6b8' stroke-width='1.6'/%3E%3Cpath fill='none' stroke='%238fa6b8' stroke-width='1.6' stroke-linecap='round' d='M9.5 9.5a2.5 2.5 0 1 1 3.5 2.3c-.6.3-1 .9-1 1.6M12 17h.01'/%3E%3C/svg%3E");
  --i-desk-tile: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect x='2.5' y='3.5' width='19' height='13' rx='1.8' fill='%233f6f9f'/%3E%3Crect x='4.3' y='5.3' width='15.4' height='9.4' rx='.6' fill='%238fa3b8'/%3E%3Cpath fill='none' stroke='%23272c33' stroke-width='1.8' stroke-linecap='round' d='M8.5 20.5h7M12 16.5v4'/%3E%3C/svg%3E");
}
.side-links a.l-desk::before { background-image: var(--i-desk); }
.side-links a.l-files::before, .side-links a.l-projects::before, .side-links a.l-dropbox::before { background-image: var(--i-files); }
.side-links a.l-sessions::before { background-image: var(--i-eye); }
.side-links a.l-users::before, .side-links a.l-account::before { background-image: var(--i-user); }
.side-links a.l-hosts::before { background-image: var(--i-server); }
.side-links a.l-sync::before { background-image: var(--i-sync); }
.side-links a.l-help::before { background-image: var(--i-help); }
.side-links a .ext { margin-left: auto; color: var(--side-muted); font-size: 12px; }
.side-foot .who { display: block; color: var(--side-fg); }

/* the user's desktops: a tile each, opening in its own window */
.tile .t-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.tile .sub { color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile.desk::before { background-image: var(--i-desk-tile); }
.tile.files::before { background-image: var(--i-folder); }

/* sign-in */
.box .lead { color: var(--muted); margin: 0 0 14px; }
.box .field input[type=text], .box .field input[type=email], .box .field input[type=password] { width: 100%; padding: 9px 11px; border: 1px solid var(--line); border-radius: 6px; font-size: 15px; }
.box .field input:focus, .box form > input[type=text]:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }
.box form > input[type=text] { padding: 8px 11px; border: 1px solid var(--line); border-radius: 6px; font-size: 15px; margin: 0 8px 8px 0; }
.box form .btn.primary.wide { width: 100%; justify-content: center; padding: 9px 14px; margin-top: 6px; }

/* administration: tables, cards of facts, forms, the built-in help */
/* tables take the page's width (wide lists); text, forms and help keep a readable one */
.admin > p, .admin > h2, .admin > details, .admin > form, .admin > .flash, .admin > .error, .admin > ul, .admin > ol { max-width: 1240px; }
.admin h2 { margin: 22px 0 10px; }
.admin p { margin: 8px 0 12px; }
.admin table { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--card); border-radius: var(--radius); box-shadow: 0 1px 3px rgba(16,24,40,.08); margin: 0 0 16px; }
.admin th, .admin td { padding: 9px 12px; border-bottom: 1px solid #eef0f3; text-align: left; vertical-align: top; }
.admin tr:last-child > td, .admin tr:last-child > th { border-bottom: 0; }
.admin table:not(.kv) th { background: #f8f9fb; color: var(--muted); font-weight: 600; white-space: nowrap; border-bottom-color: var(--line); }
.admin table:not(.kv) tr:first-child > th:first-child { border-top-left-radius: var(--radius); }
.admin table:not(.kv) tr:first-child > th:last-child { border-top-right-radius: var(--radius); }
.admin table:not(.kv) tr:hover > td { background: var(--row-hover); }
.admin table.kv { width: auto; min-width: 460px; }
.admin table.kv th { color: var(--muted); font-weight: 500; white-space: nowrap; padding-right: 28px; }
.admin form.edit table.kv th, .admin form.edit table.kv td { vertical-align: middle; }
.admin table.kv td { min-width: 240px; }
.admin td a { font-weight: 500; }
/* long paths are broken anywhere rather than widen the table past the page */
.admin table.wrap td { overflow-wrap: anywhere; }
.admin table.wrap td.nw { overflow-wrap: normal; white-space: nowrap; }
.admin table.wrap td.words { overflow-wrap: normal; }
.admin details summary { cursor: pointer; color: var(--muted); }
.admin td.used { white-space: nowrap; }
.admin .mark { cursor: help; }
/* a check's button (a form) beside links: no paragraph can hold a form */
.admin .checks { margin: 8px 0 12px; }
.admin .checks form.inline { margin-left: 0; }
.admin td.root { white-space: nowrap; }
.admin th a.sort { color: inherit; font-weight: inherit; text-decoration: none; }
.admin th a.sort:hover { text-decoration: underline; }
.admin .muted, .admin .note { color: var(--muted); }
.admin .open, .admin .good { color: var(--ok); }
.admin .bad { color: var(--bad); }
.admin .kill { color: var(--bad); margin-left: 6px; }
.admin .actions { margin: 4px 0 14px; }
.admin .actions a, .admin td.actions a, .admin a.btn { display: inline-flex; align-items: center; padding: 5px 11px; margin: 0 6px 6px 0; border: 1px solid var(--line); border-radius: 6px; background: #fff; color: var(--fg); font-weight: 400; text-decoration: none; white-space: nowrap; }
.admin .actions a:hover, .admin td.actions a:hover, .admin a.btn:hover { background: var(--row-hover); border-color: #cfd5de; }
.admin .actions.create a, .admin .actions a.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.admin .actions.create a:hover, .admin .actions a.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.admin td.actions a, .admin td.actions button { font-size: 13px; padding: 3px 9px; margin: 0 4px 4px 0; }
.admin .actions a.kill, .admin td.actions a.kill { color: var(--bad); border-color: #f0c2c2; }
.admin .actions a.kill:hover, .admin td.actions a.kill:hover { background: var(--bad-soft); }
.admin button.link { background: none; border: 0; padding: 0; color: var(--accent); cursor: pointer; font: inherit; }
.admin button.link:hover { text-decoration: underline; }
.admin form.inline { display: inline; margin-left: 10px; }
.admin form.edit, .admin form.grant { margin: 8px 0 12px; }
.admin form.edit input[type=text], .admin form.edit input[type=password], .admin form.edit select,
.admin form.grant input[type=text], .admin form.grant select, .admin form.inline select, .admin form.search input[type=text], .admin form.search input[type=search] {
  padding: 7px 10px; border: 1px solid var(--line); border-radius: 6px; background: #fff; font: inherit; }
.admin form.edit input[type=text], .admin form.edit input[type=password], .admin form.edit select { width: 300px; max-width: 100%; }
.admin form.edit input.path { width: 460px; }
.admin form.edit input:focus, .admin form.grant input:focus, .admin form.search input:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }
.admin form.edit input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--accent); vertical-align: -3px; margin-right: 6px; }
.admin form.edit > .btn, .admin form > .btn, .admin form.grant .btn { margin: 4px 6px 0 0; }
.admin form.search { display: flex; gap: 8px; flex-wrap: wrap; margin: 4px 0 14px; }
.admin form.search input[type=text] { width: 300px; }
.admin form.search input[type=search] { width: 520px; max-width: 100%; }
.admin form.search span { align-self: center; }
.admin form.grant input[type=text] { width: 220px; }
.admin .flash, .admin .error { padding: 9px 12px; border-radius: 6px; margin: 0 0 14px; }
.admin .flash { background: #e9f6ee; color: #22603f; }
.admin .error { background: var(--bad-soft); color: var(--bad); }
.admin details.help { background: var(--card); border-left: 3px solid var(--brand); border-radius: 0 var(--radius) var(--radius) 0; box-shadow: 0 1px 3px rgba(16,24,40,.06); padding: 9px 14px; margin: 0 0 16px; }
.admin details.help summary { cursor: pointer; color: var(--accent); }
.admin details.help[open] summary { margin-bottom: 6px; }
.admin details.help li { margin-bottom: 4px; }
.admin .guide { max-width: 860px; line-height: 1.55; background: var(--card); border-radius: var(--radius); box-shadow: 0 1px 3px rgba(16,24,40,.08); padding: 6px 28px 20px; }
.admin .guide h2 { border-bottom: 1px solid var(--line); padding-bottom: 5px; }
.admin .guide li { margin-bottom: 6px; }
.admin .guide .toc a { white-space: nowrap; }
.admin .help-lang { margin-left: 16px; color: var(--muted); }
.admin .qr svg { width: 220px; height: 220px; }
.admin code { background: #f3f5f8; border-radius: 4px; padding: 1px 5px; font-size: 13px; }
.admin code.wrap { word-break: break-all; }
.admin p.crumbs { font-family: ui-monospace, monospace; }
/* the admin forms' default button (Enter saves), out of sight */
.default-submit { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
@media (max-width: 820px) {
  .admin table.kv { min-width: 0; width: 100%; }
  .admin table { display: block; overflow-x: auto; }
}
