/* The Xenify server screens (Settings › Server, Open from / Save to a
   server), shared by Write and Draw: edit crates/xenify-server/client and
   run scripts/sync-server-client.sh. Uses the apps' own colours. */
.tab-server { display: inline-flex; color: var(--muted); }
.faces { display: inline-flex; margin-left: 4px; }
.face { width: 20px; height: 20px; border-radius: 999px; border: 2px solid var(--sheet); margin-left: -6px; display: inline-flex; align-items: center; justify-content: center; font: 700 9px Figtree, sans-serif; color: #fff; }
.face:first-child { margin-left: 0; }
.srv-row { display: flex; flex-direction: column; gap: 10px; }
/* "Open Xenify Hub" (the desktop apps sign in through the Hub). */
.srv-hub { display: flex; flex-direction: column; gap: 12px; }
.srv-hub .set-desc { margin: 0; }
.srv-signin { display: flex; flex-direction: column; gap: 10px; max-width: 420px; }
.srv-lbl { display: flex; flex-direction: column; gap: 5px; font-size: 13.5px; font-weight: 600; color: var(--ink-2); }
.modal.srv-modal { width: 860px; }
.srv-browser { display: flex; flex-direction: column; gap: 10px; }
.srv-panes { display: flex; gap: 12px; min-height: 340px; flex-wrap: wrap; }
.srv-places { flex: 1 1 180px; max-width: 220px; display: flex; flex-direction: column; gap: 2px; border-right: 1px solid var(--line); padding-right: 10px; }
.srv-place { text-align: left; height: 36px; padding: 0 10px; border: 0; border-radius: 9px; background: transparent; font: 500 14px Figtree, sans-serif; color: var(--ink-2); }
.srv-place:hover { background: var(--soft-2); }
.srv-place.on { background: var(--accent-soft); color: var(--ink); font-weight: 600; }
.srv-label { font-size: 12.5px; font-weight: 600; color: var(--muted); padding: 10px 10px 4px; }
.srv-right { flex: 999 1 380px; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.srv-crumbs { font-size: 13.5px; color: var(--muted); min-height: 20px; }
.srv-list { display: flex; flex-direction: column; gap: 2px; overflow-y: auto; max-height: 420px; }
.srv-item { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px 10px; border: 0; border-radius: 10px; background: transparent; text-align: left; font: 500 14.5px Figtree, sans-serif; color: var(--ink); }
.srv-item:hover:not(:disabled) { background: var(--soft); }
.srv-item.on { background: var(--accent-soft); outline: 2px solid var(--accent); }
.srv-item:disabled { color: var(--faint); }
.srv-ico { width: 26px; height: 32px; border-radius: 5px; display: inline-flex; align-items: flex-end; justify-content: center; font: 800 8px Figtree, sans-serif; padding-bottom: 4px; background: var(--accent-soft); color: var(--accent-ink); }
.srv-ico.folder { background: var(--soft-2); border-radius: 6px 6px 5px 5px; height: 24px; }
.srv-ico.draw { background: #CCFBF1; color: #115E59; }
.srv-ico.calc { background: #DCFCE7; color: #166534; }
.srv-ico.plan { background: #E0E7FF; color: #3730A3; }
.srv-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.srv-when { font-size: 13px; color: var(--muted); }
.srv-modal .srv-lbl + .srv-browser { margin-top: 12px; }
.srv-row .set-desc, .srv-modal .set-desc { font-size: 14px; line-height: 1.5; color: var(--muted); margin: 0; }
.srv-row .words-add, .srv-modal .words-add { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.srv-row .words-add .field { flex: 1 1 240px; }
.srv-row .btn.small, .srv-modal .btn.small { height: 34px; padding: 0 12px; font-size: 13.5px; }
.srv-row .link, .srv-modal .link { border: 0; background: none; padding: 0; color: var(--accent); font: 600 13.5px Figtree, sans-serif; cursor: pointer; align-self: flex-start; }
.srv-row .words-add .link { align-self: center; }
.srv-2step { max-width: 560px; margin-top: 8px; }
.srv-row .srv-check input, .srv-modal .srv-check input { accent-color: var(--accent); width: 16px; height: 16px; margin: 0; flex: none; }
.srv-share { display: flex; flex-direction: column; gap: 10px; }
/* (Beats the apps' `.modal label`, which stacks a label over its field.) */
.srv-check, .modal .srv-check { display: flex; flex-direction: row; gap: 8px; align-items: center; font-size: 14.5px; font-weight: 500; color: var(--ink); }
.srv-grant { display: grid; grid-template-columns: minmax(0, 1fr) 170px auto; gap: 10px; align-items: center; }
.srv-versions { display: flex; flex-direction: column; max-height: min(420px, 50vh); overflow-y: auto; border: 1px solid var(--line); border-radius: 10px; }
.srv-version { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border-top: 1px solid var(--line); }
.srv-version:first-child { border-top: 0; }
.srv-vtext { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.srv-vtext .srv-name { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.srv-version:not(.checkpoint) .srv-name { color: var(--ink-2); font-weight: 400; }
.srv-version.checkpoint .srv-name { font-weight: 600; }
.srv-vtext .srv-when { font-size: 12.5px; color: var(--ink-3, var(--ink-2)); }
.srv-vacts { display: flex; gap: 4px; flex: none; }
.srv-tag { margin-left: 8px; padding: 1px 7px; border-radius: 999px; background: var(--accent-soft, var(--soft-2)); color: var(--accent, var(--ink)); font-size: 11.5px; font-weight: 600; }
.srv-tidy { display: flex; gap: 8px; flex-wrap: wrap; }
.srv-tidy:empty { display: none; }
.modal.srv-history { width: min(640px, calc(100vw - 32px)); }
.srv-found { display: flex; flex-direction: column; gap: 8px; }
.srv-found-row { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; }
.srv-ico.server { background: var(--soft-2); color: var(--ink-2); align-items: center; padding: 0; width: 30px; height: 30px; border-radius: 8px; }
.srv-qr { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.srv-qr-img { display: block; width: 168px; height: 168px; padding: 8px; background: #fff; border: 1px solid var(--line); border-radius: 10px; }
.srv-qr-img svg { display: block; width: 100%; height: 100%; }
.srv-key, .srv-codes code { font: 600 14px ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: 0.04em; color: var(--ink); user-select: all; }
.srv-key { flex: 1 1 200px; max-width: 220px; }
.srv-codes { display: grid; grid-template-columns: repeat(2, max-content); gap: 6px 28px; padding: 12px 16px; border: 1px solid var(--line); border-radius: 12px; }

/* A server certificate's fingerprint, to read out and compare. */
.srv-fingerprint { font-family: ui-monospace, monospace; font-size: 12px; word-break: break-all; user-select: all; }
