:root { --accent: #2f6f9f; --danger: #b03a2e; --line: #d8dde3; font-family: system-ui, sans-serif; }
[v-cloak] { display: none; }
body { margin: 0; color: #1d232a; background: #f5f7f9; }
header { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; padding: 0.8rem 1.2rem; background: var(--accent); color: white; }
header h1 { margin: 0; font-size: 1.3rem; flex: 1; }
nav button { background: transparent; color: white; border: 1px solid #ffffff80; }
nav button.active { background: white; color: var(--accent); }
/* The language: as wide as its longest name, at the header's right end. */
header select.language { width: auto; margin-left: auto; padding: 0.15rem 0.3rem; border-radius: 4px; border: 1px solid #ffffff80; }
/* Tiles of at least 18rem, or the page's width where it is narrower. */
main { display: grid; gap: 1rem; padding: 1rem 1.2rem; grid-template-columns: repeat(auto-fit, minmax(min(18rem, 100%), 1fr)); }
section { min-width: 0; background: white; border: 1px solid var(--line); border-radius: 6px; padding: 0.8rem 1rem; }
h2 { margin: 0 0 0.6rem; font-size: 1.05rem; color: var(--accent); }
/* The values' column may be narrower than its longest word (an address,
   a URL): such a value breaks, rather than reach out of its tile. */
dl { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 0.3rem 1rem; margin: 0 0 0.8rem; }
dt { color: #5b6670; }
dd { margin: 0; min-width: 0; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
table { border-collapse: collapse; width: 100%; }
th, td { text-align: left; padding: 0.3rem 0.4rem; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
td.key { font-family: ui-monospace, monospace; }
td.key .hint { font-family: system-ui, sans-serif; font-size: 0.8rem; margin-top: 0.15rem; }
td.actions { white-space: nowrap; }
main.config { grid-template-columns: repeat(auto-fit, minmax(min(32rem, 100%), 1fr)); }
main.config table.config td:nth-child(2) { width: 38%; }
select { font: inherit; padding: 0.2rem 0.3rem; width: 100%; }
input::placeholder { color: #9aa3ab; font-style: italic; }
input { width: 100%; box-sizing: border-box; font: inherit; padding: 0.2rem 0.3rem; }
button, .button { font: inherit; padding: 0.25rem 0.7rem; border-radius: 4px; border: 1px solid var(--accent); background: white; color: var(--accent); cursor: pointer; display: inline-block; text-decoration: none; }
button:disabled { opacity: 0.4; cursor: default; }
button:hover:not(:disabled), .button:hover { background: #eaf2f8; }
button.danger { border-color: var(--danger); color: var(--danger); }
.error { margin: 1rem 1.2rem 0; padding: 0.5rem 0.8rem; background: #fbeae8; color: var(--danger); border-radius: 4px; }
.hint { color: #5b6670; font-size: 0.9rem; }
.warn { color: var(--danger); font-size: 0.9rem; font-weight: 600; }
/* A file to choose: the browser's own control, which speaks the browser's
   language and looks its own, stays out of sight but in reach of the
   keyboard; a .button with our text opens it, and the name chosen shows:
   <label class="file">Text <span class="choose"><input type="file" …>
   <span class="button">{{ t.choose_file }}</span>
   <span class="file-name">{{ file ? file.name : t.no_file }}</span></span></label> */
label.file { display: block; margin-bottom: 0.5rem; color: #5b6670; }
.choose { display: flex; align-items: center; gap: 0.6rem; margin-top: 0.3rem; }
.choose input[type=file] { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.choose:focus-within .button { outline: 2px solid var(--accent); outline-offset: 2px; }
.file-name { color: #5b6670; font-size: 0.9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
section .error { margin: 0.5rem 0 0; }

/* The service's own: the login, the device list. */
main.devices { grid-template-columns: 1fr; }
.user { font-size: 0.9rem; }
/* Logging out, beside who is logged in. */
button.header { margin-left: 0.5rem; background: transparent; color: white; border: 1px solid #ffffff80; }
button.header:hover:not(:disabled) { background: #ffffff26; }
.user button { background: transparent; color: white; border: 1px solid #ffffff80; margin-left: 0.4rem; }
.online { color: #2e7d32; }
.offline { color: #5b6670; }
.blocked { color: var(--danger); }
td.mono { font-family: ui-monospace, monospace; }
main.updates { grid-template-columns: 1fr; }
td.update select { width: auto; margin-right: 0.4rem; }
td.update p { margin: 0.3rem 0 0; }
progress { width: 100%; margin-top: 0.5rem; }

/* The page NATS: tabs below the header, wide tiles of tables. */
nav.tabs { display: flex; flex-wrap: wrap; gap: 0.4rem; padding: 0.8rem 1.2rem 0; }
nav.tabs button { background: white; color: var(--accent); border: 1px solid var(--accent); }
nav.tabs button.active { background: var(--accent); color: white; }
main.nats { grid-template-columns: repeat(auto-fit, minmax(min(26rem, 100%), 1fr)); }
main.nats section.wide { grid-column: 1 / -1; }
.scroll { overflow-x: auto; }
.bar { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin: 0.6rem 0; }
.bar input { flex: 1; min-width: 10rem; width: auto; }
.bar select { width: auto; }
.bar input[type=checkbox] { flex: none; min-width: 0; }
label.check { display: inline-flex; align-items: center; gap: 0.3rem; color: #5b6670; }
label.check input { width: auto; }
form.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(14rem, 100%), 1fr)); gap: 0.5rem 1rem; }
form.grid label { color: #5b6670; font-size: 0.9rem; }
form.grid .buttons { grid-column: 1 / -1; }
textarea { width: 100%; box-sizing: border-box; font: inherit; padding: 0.3rem; }
.mono, textarea.mono { font-family: ui-monospace, monospace; }
.nowrap { white-space: nowrap; }
pre.data { margin: 0; max-height: 4.5em; overflow: hidden; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 0.85rem; cursor: pointer; }
pre.data.open { max-height: none; cursor: auto; }
ul.keys { list-style: none; margin: 0.4rem 0; padding: 0; max-height: 24rem; overflow-y: auto; }
ul.keys li { padding: 0.15rem 0.3rem; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; gap: 0.8rem; }
ul.keys li a { overflow-wrap: anywhere; }
ul.keys .when { color: #5b6670; white-space: nowrap; font-size: 0.85em; }
ul.keys li.active { background: #eaf2f8; }
.received { max-height: 36rem; overflow-y: auto; }
.received .message { border-bottom: 1px solid var(--line); padding: 0.3rem 0; }
.received pre.data { max-height: 12em; overflow: auto; cursor: auto; }
.done { margin: 1rem 1.2rem 0; padding: 0.5rem 0.8rem; background: #e8f4ea; color: #2e7d32; border-radius: 4px; }
.contents { display: contents; }
main.nats tr.heads th { white-space: nowrap; }
main.nats td button { white-space: nowrap; }
main.apps { grid-template-columns: 1fr; }
/* A form of the page /remote: its fields one below the other. */
form.form { display: flex; flex-direction: column; align-items: flex-start; gap: 0.5rem; }
form.form > label:not(.check) { align-self: stretch; color: #5b6670; font-size: 0.9rem; }
form.invite { display: flex; flex-wrap: wrap; align-items: end; gap: 0.6rem; }
form.invite label { flex: 1 1 14rem; color: #5b6670; }
.invitation { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; margin-top: 0.8rem; }
.invitation .qr svg { width: 15rem; height: 15rem; display: block; }
.invitation dl { margin: 0; }
