/* keyDrop shell v3 (2026-09-19): Volia Software palette, light and dark.
 *
 * Three theme states: bare :root is the light palette; the dark tokens apply
 * when the system prefers dark and the viewer has not chosen light, and again
 * whenever the viewer chose dark (html[data-theme]). Nothing is coloured
 * outside the tokens, so every component resolves in both themes.
 *
 * No web fonts: the Content-Security-Policy admits nothing off this origin,
 * so the stacks below are system faces. */

:root {
  color-scheme: light;
  --page: #f6f4f9;
  --shell: #ffffff;
  --panel: #ffffff;
  --panel-2: #f2eef7;
  --line: #e2dbea;
  --line-strong: #c9bfd6;
  --text: #22172b;
  --text-2: #5d5268;
  --text-3: #8d8299;
  --brand: #442852;
  --brand-deep: #341943;
  --brand-ink: #f6effc;
  --brand-soft: #efe6f5;
  --accent: #1a73e8;
  --accent-ink: #0b57c2;
  --accent-soft: #e4eefc;
  /* Initials need a stable high-contrast pair, including the dark palette. */
  --avatar-background: #0b57c2;
  --avatar-ink: #ffffff;
  --link: #0b57c2;
  --ok: #2e8b57;
  --ok-soft: #e4f4ea;
  --warn: #b6791c;
  --warn-soft: #fbf1dc;
  --bad: #c73a4a;
  --bad-soft: #fbe5e8;
  --focus: #1a73e8;
  --sun: #d98a00;
  /* The release-notes star: the top bar is purple in both themes. */
  --news-star: #ff9a3c;
  /* A request (you ask) reads purple next to a share's blue (2026-09-24). */
  --req: #7a3f96;
  --req-soft: #f1e6f7;
  --shadow: 0 1px 2px rgba(34, 23, 43, 0.06), 0 10px 30px rgba(68, 40, 82, 0.1);
  --radius: 6px;
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --page: #1c1024;
    --shell: #28103d;
    --panel: #2f1b40;
    --panel-2: #3a2450;
    --line: #4a3260;
    --line-strong: #64487c;
    --text: #f1eaf6;
    --text-2: #c2b4cf;
    --text-3: #9585a6;
    --brand: #9d69b7;
    --brand-deep: #28103d;
    --brand-ink: #f6effc;
    --brand-soft: #3d2453;
    --accent: #4a8df0;
    --accent-ink: #8ab4f8;
    --accent-soft: #24345c;
    --link: #8ab4f8;
    --ok: #6fcf97;
    --ok-soft: #1f3a2c;
    --warn: #e6b45a;
    --warn-soft: #3f3220;
    --bad: #f28b95;
    --bad-soft: #472229;
    --focus: #8ab4f8;
    --sun: #f2b544;
    --req: #c79be0;
    --req-soft: #3d2453;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.5), 0 12px 32px rgba(0, 0, 0, 0.45);
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --page: #1c1024;
  --shell: #28103d;
  --panel: #2f1b40;
  --panel-2: #3a2450;
  --line: #4a3260;
  --line-strong: #64487c;
  --text: #f1eaf6;
  --text-2: #c2b4cf;
  --text-3: #9585a6;
  --brand: #9d69b7;
  --brand-deep: #28103d;
  --brand-ink: #f6effc;
  --brand-soft: #3d2453;
  --accent: #4a8df0;
  --accent-ink: #8ab4f8;
  --accent-soft: #24345c;
  --link: #8ab4f8;
  --ok: #6fcf97;
  --ok-soft: #1f3a2c;
  --warn: #e6b45a;
  --warn-soft: #3f3220;
  --bad: #f28b95;
  --bad-soft: #472229;
  --focus: #8ab4f8;
  --sun: #f2b544;
  --req: #c79be0;
  --req-soft: #3d2453;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.5), 0 12px 32px rgba(0, 0, 0, 0.45);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--page);
  color: var(--text);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { letter-spacing: -0.01em; text-wrap: balance; margin: 0; }
a { color: var(--link); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

svg.i {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}

/* ---------- shell: top bar, rail, content ---------- */

.app {
  display: grid;
  grid-template-columns: 200px 1fr;
  grid-template-rows: auto 1fr;
  min-height: 100vh;
}

/* Compact workspace: one small tool, independent of browser window width. */
.app.compact {
  display: flex;
  flex-direction: column;
  width: min(600px, calc(100% - 32px));
  min-height: 0;
  margin: clamp(16px, 6vh, 64px) auto;
  background: var(--shell);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
}
.compact .topbar {
  min-height: 62px;
  border-radius: 17px 17px 0 0;
  padding: 12px 18px;
  gap: 10px;
  flex-wrap: nowrap;
}
.compact .topbar .user > span:first-child { display: none; }
.compact .content, .compact .content.plain {
  width: 100%; max-width: none; margin: 0; padding: 24px;
  gap: 22px;
}
.compact .grid-2, .compact .grid-3 { grid-template-columns: minmax(0, 1fr); }
.compact .page-head h1 { font-size: 23px; }
.compact .page-head p { font-size: 14px; margin-top: 5px; }
.compact .back-home { font-size: 13px; margin: 18px 24px -6px; text-decoration: none; }
.compact .card, .compact .result-card { min-width: 0; max-width: 100%; box-shadow: none; }
.workspace-menu { position: relative; flex: none; }
.workspace-menu > summary {
  display: grid; place-items: center; width: 32px; height: 32px;
  border: 1px solid #ffffff30; border-radius: 50%; cursor: pointer;
  list-style: none; color: var(--brand-ink);
}
.workspace-menu > summary::-webkit-details-marker { display: none; }
.menu-links {
  position: absolute; right: 0; top: 42px; z-index: 20;
  width: min(260px, 80vw); max-height: 70vh; overflow-y: auto;
  padding: 8px; background: var(--panel); color: var(--text);
  border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow);
}
.menu-links a { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 7px; text-decoration: none; color: var(--text); }
.menu-links a:hover, .menu-links a[aria-current="page"] { background: var(--accent-soft); color: var(--accent-ink); }
.menu-links .group { font-size: 11px; text-transform: uppercase; color: var(--text-2); padding: 8px 10px 3px; }
.menu-links .group:empty { display: none; }
.menu-identity { margin: 0; padding: 10px; font-size: 12px; overflow-wrap: anywhere; }
.menu-role { margin: -8px 10px 8px; font-size: 11px; color: var(--text-2); }
.quick-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.action-tile {
  display: flex; flex-direction: column; align-items: flex-start; gap: 7px;
  padding: 20px 16px; border: 1px solid var(--line); border-radius: 12px;
  color: var(--text); background: var(--panel-2); text-decoration: none;
}
.action-tile.primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.action-tile:hover { box-shadow: var(--shadow); }
.action-tile .i { width: 24px; height: 24px; margin-bottom: 5px; }
.action-tile strong { font-size: 15px; }
.action-tile span { font-size: 12px; opacity: .85; }
.inbox-card { border: 1px solid var(--line); border-radius: 12px; min-width: 0; }
.inbox-tabs { display: flex; gap: 2px; padding: 5px; border-bottom: 1px solid var(--line); }
.inbox-tabs a { flex: 1; min-width: 0; display: flex; justify-content: center; align-items: center; gap: 5px; padding: 10px 4px; color: var(--text-2); text-decoration: none; border-radius: 8px; font-size: 13px; font-weight: 650; }
.inbox-tabs a[aria-current="page"] { background: var(--accent-soft); color: var(--accent-ink); }
.tab-count { font-size: 11px; padding: 1px 5px; border-radius: 6px; background: var(--panel-2); font-variant-numeric: tabular-nums; }
.inbox-hint { margin: 0; padding: 14px 16px; font-size: 12px; color: var(--text-2); }
.compact .inbox-row { display: flex; flex-direction: column; align-items: stretch; gap: 8px; padding: 14px 16px; }
.compact .inbox-row-main { flex-direction: row; flex-wrap: wrap; align-items: baseline; gap: 8px; }
.compact .inbox-row-main .kind { font-size: 14px; font-weight: 650; }
.compact .inbox-row-main .counterpart { font-size: 12px; }
.transfer-endpoints { display: flex; flex-wrap: wrap; gap: 4px 12px; color: var(--text-2); font-size: 12px; min-width: 0; }
.transfer-endpoints > span { overflow-wrap: anywhere; }
.endpoint-more { display: inline-block; margin-inline-start: 6px; vertical-align: top; }
.endpoint-more summary { cursor: pointer; }
.endpoint-more ul { margin: 4px 0; padding-inline-start: 18px; }
.service-audit { margin-block: 16px; }
.service-audit summary { cursor: pointer; font-weight: 600; }
.file-menu summary { cursor: pointer; padding: 8px 12px; border: 1px solid var(--line-strong); border-radius: var(--radius); }
.file-menu button { margin: 8px 8px 0 0; }
.compact .inbox-row-meta { justify-content: flex-start; text-align: left; gap: 6px; flex-wrap: wrap; font-size: 11px; }
.compact .inbox-row-meta .btn { margin-left: auto; }
.inbox-empty { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 32px 16px 40px; color: var(--text-2); }
.inbox-empty .i { width: 30px; height: 30px; color: var(--accent); }
.inbox-empty p { margin: 12px 0 4px; font-weight: 650; color: var(--text); }
.inbox-empty span { font-size: 13px; }
.inbox-pager { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px; font-size: 12px; border-top: 1px solid var(--line); }
@media (max-width: 640px) {
  .app.compact { width: calc(100% - 16px); margin: 8px auto; border-radius: 12px; }
  .compact .topbar { border-radius: 11px 11px 0 0; padding: 12px; gap: 7px; }
  .compact .content, .compact .content.plain { padding: 18px 14px; gap: 18px; }
  .compact .back-home { margin-inline: 14px; }
  .action-tile { padding: 16px 12px; }
  .action-tile strong { font-size: 14px; }
}
@media (max-width: 360px) {
  .compact .user .avatar { display: none; }
  .quick-actions { gap: 8px; }
  .inbox-tabs a { font-size: 12px; gap: 3px; }
}
.app.plain { grid-template-columns: 1fr; }

/* Quick Card: the approved Worksection-inspired tool, with a quiet header. */
body:has(.quick-card) { background: light-dark(#f2f3f7, #171820); }
.app.quick-card {
  --panel: light-dark(#fff, #272833);
  --shell: light-dark(#fff, #22232d);
  --panel-2: light-dark(#f5f5f8, #30313c);
  --line: light-dark(#dedfe7, #454652);
  --line-strong: light-dark(#858896, #767988);
  --text: light-dark(#242632, #f2f2f6);
  --text-2: light-dark(#656875, #b8bac6);
  --text-3: light-dark(#656875, #b8bac6);
  --accent: light-dark(#6658d3, #978cff);
  --accent-ink: light-dark(#594bbf, #b8afff);
  --accent-soft: light-dark(#eeecff, #373252);
  --link: var(--accent-ink);
  --radius: 8px;
  width: min(480px, calc(100% - 16px));
  border-radius: 13px;
  margin-block: 12px;
}
.quick-card .topbar {
  min-height: 48px; padding: 8px 14px; background: var(--shell);
  color: var(--text); border-color: var(--line); border-radius: 12px 12px 0 0;
}
.quick-card .brand { color: var(--text); }
.quick-card .theme-btn, .quick-card .lang-btn,
.quick-card .workspace-menu > summary { color: var(--text-2); border-color: var(--line); }
.quick-card .lang-btn[aria-current="true"] { color: var(--accent-ink); background: var(--accent-soft); }
.quick-card .content { padding: 12px; gap: 12px; }
.quick-card .card { border: 0; }
.quick-card .card-body { padding: 0; }
.quick-card .transfer-tabs { background: var(--panel-2); }
.quick-card .transfer-tabs a[aria-current="page"] { background: var(--shell); }
.quick-card .avatar { color: var(--avatar-ink); }
.quick-card .btn.primary, .quick-card button.primary,
.quick-card .brand .mark { color: light-dark(#fff, #171820); }

/* Small windows and installed PWA already have their own system frame. */
@media (max-width: 760px), (display-mode: standalone) {
  body:has(.app.quick-card) { background: light-dark(#fff, #22232d); }
  .app.compact.quick-card, .app.compact.quick-card:has(.transfer-form) {
    width: 100%; min-height: 100dvh; margin: 0;
    border: 0; border-radius: 0; box-shadow: none;
  }
  .quick-card .topbar { border-radius: 0; }
}

.topbar {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 18px;
  min-height: 54px;
  background: var(--brand-deep);
  color: var(--brand-ink);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.topbar .spacer { flex: 1; }
/* The running version beside the name; an orange star while this browser
   has not opened the notes for it (2026-09-24). */
.version-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: -6px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: rgba(246, 239, 252, 0.72);
  background: rgba(255, 255, 255, 0.08);
  text-decoration: none;
}
.version-badge:hover,
.version-badge:focus-visible { color: var(--brand-ink); background: rgba(255, 255, 255, 0.16); }
.version-badge.has-news { color: var(--brand-ink); }
.version-badge .new-star { display: inline-flex; color: var(--news-star); line-height: 0; }
.version-badge .new-star svg { width: 12px; height: 12px; display: block; }
.release-date { color: var(--text-3); font-size: 12px; font-variant-numeric: tabular-nums; }
.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 700;
  font-size: 15px;
  color: inherit;
  text-decoration: none;
}
.brand .mark {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background: var(--accent);
  display: grid;
  place-items: center;
  color: #fff;
}
.brand .mark svg {
  width: 16px;
  height: 16px;
  display: block;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.topbar .user {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: rgba(246, 239, 252, 0.85);
  min-width: 0;
}
.topbar .user > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--avatar-background);
  color: var(--avatar-ink);
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 12px;
  flex: none;
}

/* Theme button: the icon follows <html data-theme>, not the script. */
.theme-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.06);
  color: var(--brand-ink);
  cursor: pointer;
  display: grid;
  place-items: center;
  padding: 0;
  margin: 0;
  flex: none;
}
.theme-btn svg {
  width: 17px;
  height: 17px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
  display: none;
}
html:not([data-theme]) .theme-btn .half { display: block; }
html[data-theme="light"] .theme-btn .sun { display: block; }
html[data-theme="dark"] .theme-btn .moon { display: block; }
html[data-theme="light"] .theme-btn { color: var(--sun); }
html[data-theme="dark"] .theme-btn { color: var(--accent-ink); }

/* Language switch: two submit buttons, the current one disabled. */
.lang-switch {
  display: inline-flex;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  overflow: hidden;
  margin: 0;
}
.lang-btn {
  margin: 0;
  padding: 4px 10px;
  border: 0;
  background: transparent;
  color: rgba(246, 239, 252, 0.75);
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.lang-btn[aria-current="true"] { background: var(--accent); color: #fff; cursor: default; }

.rail {
  background: var(--shell);
  border-right: 1px solid var(--line);
  padding: 12px 8px;
}
.rail .group {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-3);
  padding: 12px 10px 6px;
  font-weight: 700;
}
.rail a {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-2);
  padding: 8px 10px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 13px;
  border-left: 3px solid transparent;
}
.rail a:hover { color: var(--text); background: var(--panel-2); }
.rail a[aria-current="page"] {
  color: var(--text);
  background: var(--accent-soft);
  border-left-color: var(--accent);
}

.content {
  padding: 22px 26px 40px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-width: 0;
}
.content.plain { max-width: 34rem; margin: 6vh auto 0; width: 100%; padding-inline: 16px; }

.page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
}
.page-head h1 { font-size: 21px; font-weight: 700; }
.page-head p { margin: 2px 0 0; color: var(--text-2); max-width: 70ch; }
.page-head .actions { margin: 0; }
.section-title { font-size: 15px; font-weight: 700; color: var(--text-2); margin-top: 6px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }

/* ---------- buttons, cards, pills, tables ---------- */

.btn, button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font: inherit;
  font-weight: 700;
  font-size: 13px;
  padding: 8px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--line-strong);
  background: var(--panel);
  color: var(--text);
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  margin: 0;
}
.btn.primary, button.primary, button[type="submit"]:not(.btn):not(.lang-btn):not(.icon-btn) {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.btn.ghost { border-color: transparent; background: transparent; color: var(--link); }
.btn.danger { color: var(--bad); }
.btn.block { width: 100%; padding: 11px 14px; font-size: 14px; }
.btn.sm { padding: 3px 10px; font-size: 12px; }

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  min-width: 0;
}
.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}
.card-head h2 { font-size: 14px; font-weight: 700; }
.card-body { padding: 16px; }
.card-body > p { margin: 0 0 10px; }
.card-body > p:last-child { margin-bottom: 0; }
.card.login { padding: 28px 28px 24px; display: flex; flex-direction: column; gap: 14px; }
.card.login h1 { font-size: 24px; }
.card.login p { margin: 0; color: var(--text-2); }

.callout {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 16px;
  background: var(--accent-soft);
  border: 1px solid var(--accent);
  border-left-width: 4px;
  border-radius: var(--radius);
}
.callout h2 { font-size: 14px; }
.callout p { margin: 0; color: var(--text-2); }
.callout ul { margin: 6px 0 0; padding-left: 1.2rem; }

.warning {
  padding: 12px 16px;
  border: 1px solid var(--warn);
  border-left-width: 4px;
  border-radius: var(--radius);
  background: var(--warn-soft);
  color: var(--text);
  margin: 0;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--panel-2);
  color: var(--text-2);
  border: 1px solid var(--line);
  white-space: nowrap;
}
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--text-3); }
.pill.ok { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.pill.ok::before { background: var(--ok); }
.pill.warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.pill.warn::before { background: var(--warn); }
.pill.bad { background: var(--bad-soft); color: var(--bad); border-color: transparent; }
.pill.bad::before { background: var(--bad); }
.pill.accent { background: var(--accent-soft); color: var(--accent-ink); border-color: transparent; }
.pill.accent::before { background: var(--accent); }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; margin: 0; }
th {
  text-align: left;
  font-weight: 700;
  color: var(--text-2);
  font-size: 12px;
  padding: 9px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--panel-2);
  white-space: nowrap;
}
td {
  padding: 9px 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
  font-variant-numeric: tabular-nums;
}
tr:last-child td { border-bottom: 0; }
code, .mono { font-family: var(--mono); font-size: 12px; word-break: break-all; }
td code, td .id {
  display: inline-block;
  max-width: 11ch;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
  white-space: nowrap;
  word-break: normal;
}
.contact-id, .profile-id { color: var(--text-2); }
.id { font-family: var(--mono); font-size: 12px; color: var(--text-2); }
a.id { color: var(--link); }
time.local-time { white-space: nowrap; }

/* The home page is an inbox, not an admin table. Rows stay scannable while
 * the counterpart and expiry can still collapse gracefully on small screens. */
.inbox-list { display: flex; flex-direction: column; }
.inbox-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}
.inbox-row:last-child { border-bottom: 0; }
.inbox-row-main { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.inbox-row-main .kind { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inbox-row-main .counterpart { color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inbox-row-meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px 10px;
  color: var(--text-3);
  font-size: 12px;
  text-align: right;
}
.inbox-row-meta .pill { white-space: nowrap; }

/* ---------- forms ---------- */

form { margin: 0; }
label { display: block; margin: 0 0 14px; }
label > span { display: block; font-weight: 700; font-size: 13px; margin-bottom: 4px; }
label .hint, .file-selection .hint { display: block; font-weight: 400; font-size: 12px; color: var(--text-3); margin-top: 4px; }
label .hint.bad, .file-selection .hint.bad { color: var(--bad); font-weight: 600; }
.file-selection { margin-bottom: 14px; }
input, select, textarea {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  font: inherit;
  background: var(--panel);
  color: var(--text);
}
textarea { min-height: 6rem; font-family: var(--mono); }
input[type="file"] { padding: 6px; }
input[type="checkbox"] { width: auto; padding: 0; margin: 0; }
.checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); gap: 4px 12px; }
.checks .check { display: flex; align-items: center; gap: 8px; margin: 0; font-weight: 400; }
.steps { margin: 0 0 12px; padding-left: 1.2rem; }
/* New secret: the send / request switch and the folded options. */
.segmented { display: inline-flex; border: 1px solid var(--line-strong); border-radius: 999px; overflow: hidden; }
.segmented a { padding: 7px 16px; font-weight: 700; font-size: 13px; color: var(--text-2); text-decoration: none; }
.segmented a[aria-current="page"] { background: var(--accent); color: #fff; }
details.advanced { margin: 4px 0 14px; }
details.advanced summary { cursor: pointer; font-weight: 700; font-size: 13px; color: var(--link); list-style: none; }
details.advanced summary::-webkit-details-marker { display: none; }
details.advanced summary::before { content: "+ "; }
details.advanced[open] summary::before { content: "- "; }
details.advanced > div { margin-top: 12px; }
.advanced-security {
  margin: 8px 0 14px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}
.advanced-security summary {
  cursor: pointer;
  color: var(--link);
  font-size: 13px;
  font-weight: 700;
  list-style: none;
}
.advanced-security summary::-webkit-details-marker { display: none; }
.advanced-security summary::before { content: "+ "; }
.advanced-security[open] summary::before { content: "- "; }
.advanced-security > label { margin-top: 12px; }
.pin-toggle { display: flex; align-items: center; gap: 8px; }
.pin-toggle > span { display: inline; margin: 0; }
.kind { font-weight: 700; }
.kind small { display: block; font-weight: 400; color: var(--text-3); font-family: var(--mono); font-size: 11px; }
/* Request dialog: the "Open" modal. */
dialog.modal {
  width: min(40rem, calc(100vw - 32px));
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--text);
  box-shadow: var(--shadow);
}
dialog.modal::backdrop { background: rgba(28, 16, 36, 0.55); }
dialog.modal .modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}
dialog.modal .modal-head h2 { font-size: 15px; }
dialog.modal .modal-body { padding: 16px; display: flex; flex-direction: column; gap: 12px; }
dialog.modal .modal-body p { margin: 0; color: var(--text-2); }
dialog.modal .modal-result:empty { display: none; }
dialog.modal .modal-result .warning { margin-bottom: 12px; }
.directory-search { position: relative; }
.directory-search .suggestions {
  position: absolute;
  z-index: 5;
  left: 0;
  right: 0;
  top: calc(100% - 14px);
  background: var(--panel);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  max-height: 16rem;
  overflow-y: auto;
}
.directory-search .suggestion {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
  width: 100%;
  margin: 0;
  padding: 8px 12px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  color: var(--text);
  font-weight: 400;
  text-align: left;
  white-space: normal;
}
.directory-search .suggestion:last-child { border-bottom: 0; }
.directory-search .suggestion:hover, .directory-search .suggestion:focus-visible { background: var(--accent-soft); }
.directory-search .suggestion b { font-weight: 700; }
.directory-search .suggestion span { font-size: 12px; color: var(--text-2); }
.directory-search .suggestion.empty { color: var(--text-3); cursor: default; }
.steps li { margin: 4px 0; }
.grid-2.even { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.card h3 { font-size: 14px; margin: 16px 0 8px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 14px; }
.grid-2 { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 18px; align-items: start; }
.card-body > form > .btn, .card-body > form > button { margin-top: 4px; }

/* ---------- narrow screens ---------- */

@media (max-width: 760px) {
  .app { grid-template-columns: 1fr; }
  .rail { display: flex; flex-wrap: wrap; gap: 2px 6px; padding: 8px; border-right: 0; border-bottom: 1px solid var(--line); }
  .rail .group { width: 100%; padding: 6px 8px 2px; }
  .content { padding: 16px 16px 32px; }
  .topbar { padding: 8px 16px; flex-wrap: wrap; gap: 10px; }
  .topbar .user > span:first-child { display: none; }
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .content { padding-inline: 14px; }
  .page-head { align-items: flex-start; }
  .page-head .actions { width: 100%; }
  .page-head .actions .btn { flex: 1 1 auto; }
  .inbox-row { align-items: stretch; flex-direction: column; gap: 9px; padding-inline: 14px; }
  .inbox-row-meta { justify-content: flex-start; text-align: left; }
}

/* The created page (2026-09-19): the one-time link in a read-only field with
 * a copy button, and the recent contacts with one icon per sharing method. */
.one-time { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 12px 0 4px; }
.one-time input {
  flex: 1 1 280px;
  min-width: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  padding: 8px 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--text);
}
.one-time .btn { display: inline-flex; align-items: center; gap: 6px; }
.one-time .sent-note { flex-basis: 100%; }
.notice {
  margin: 0 0 12px;
  padding: 10px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--panel);
}
.notice.ok { border-color: var(--ok); background: var(--ok-soft); color: var(--text); }
.section-label {
  margin: 14px 0 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-3);
}
.recipients { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.recipient form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 12px;
  padding: 8px 2px;
  border-bottom: 1px solid var(--line);
}
.recipient .who { display: flex; flex-direction: column; min-width: 0; flex: 1 1 160px; }
.recipient .who b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recipient .who small { font-size: 12px; color: var(--text-3); }
.recipient .ways { display: inline-flex; gap: 4px; }
.recipient .sent-note { flex-basis: 100%; }
.sent-note:empty { display: none; }
.sent-note { font-size: 12px; color: var(--text-2); }
.sent-note .ok { color: var(--ok); }
.sent-note.bad { color: var(--bad); }
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--text-2);
  cursor: pointer;
}
.icon-btn svg.i { width: 17px; height: 17px; }
.icon-btn:hover, .icon-btn:focus-visible { color: var(--link); border-color: var(--link); background: var(--accent-soft); }
.icon-btn:disabled { opacity: 0.5; cursor: default; }
.recipient.just-added form { background: var(--accent-soft); }


/* Revealed credentials (2026-09-20): label, one field, icons; login and
 * password rows share one shape. The password field is a real password
 * input, so it reads as bullets until the eye is pressed. */
.secret-fields { display: flex; flex-direction: column; gap: 10px; }
.field-row {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr) 82px; /* two icon slots, so every field is one width */
  align-items: center;
  gap: 8px 12px;
}
.field-row .field-name { font-size: 12px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-3); }
.field-row input[readonly], .field-row textarea[readonly] {
  width: 100%; min-width: 0; margin: 0; box-sizing: border-box;
  padding: 8px 12px; border: 1px solid var(--line-strong); border-radius: var(--radius);
  background: var(--panel); color: var(--text); font-size: 14px; line-height: 20px;
}
.field-row input[readonly] { height: 38px; }
.field-row input.mono, .field-row input[type="password"] { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: 0.02em; }
.field-row textarea.note { resize: vertical; min-height: 76px; }
.field-row .field-icons { display: inline-flex; justify-content: flex-start; gap: 6px; align-self: start; }
.field-row .field-icons .icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; padding: 0; margin: 0;
  border: 1px solid var(--line-strong); border-radius: var(--radius);
  background: var(--panel); color: var(--text-2); cursor: pointer;
}
.field-row .field-icons .icon-btn:hover, .field-row .field-icons .icon-btn:focus-visible { color: var(--link); border-color: var(--link); }
.field-row .field-icons svg.i { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.eye-btn svg.i + svg.i { display: none; }
.eye-btn[aria-pressed="true"] svg.i { display: none; }
.eye-btn[aria-pressed="true"] svg.i + svg.i { display: inline; }
@media (max-width: 480px) {
  .field-row { grid-template-columns: minmax(0, 1fr) 82px; }
  .field-row .field-name { grid-column: 1 / -1; }
}


/* ---- Transfer history (2026-09-24): one row, one timeline, every screen ---- */
.history-card { display: grid; gap: 12px; margin-top: 18px; }
.hhead-page h2 { margin: 0; font-size: 18px; }
.hhead-page p { margin: 2px 0 0; font-size: 12.5px; color: var(--text-3); }
.hfilters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.hseg { display: inline-flex; gap: 2px; padding: 3px; border-radius: 8px; background: var(--panel-2); }
.hseg a { display: inline-flex; gap: 6px; align-items: center; padding: 5px 10px; border-radius: 6px; font-size: 12.5px; font-weight: 600; color: var(--text-2); text-decoration: none; }
.hseg a[aria-current="page"] { background: var(--panel); color: var(--text); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08); }
.hseg em { font-style: normal; font-size: 11px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.hsearch { flex: 1; min-width: 160px; display: flex; align-items: center; gap: 7px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); color: var(--text-3); }
.hsearch svg { width: 15px; height: 15px; flex: none; stroke: currentColor; fill: none; stroke-width: 2; }
.hsearch input { flex: 1; min-width: 0; border: 0; background: transparent; padding: 7px 0; font: inherit; font-size: 12.5px; color: var(--text); outline: none; }
.hgroup { display: grid; gap: 6px; }
.hgroup-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 11.5px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-3); }
.hbulk { font-size: 12px; font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--bad); text-decoration: none; }
.hlist { display: grid; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; }
.hrow { position: relative; border-top: 1px solid var(--line); }
.hrow:first-child { border-top: 0; }
.hrow > details > summary { list-style: none; cursor: pointer; }
.hrow > details > summary::-webkit-details-marker { display: none; }
.hhead { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto 22px; gap: 10px; align-items: center; padding: 10px 12px; }
.hrow.acts-1 .hhead { padding-right: 122px; }
.hrow.acts-2 .hhead { padding-right: 212px; }
.hdir { width: 30px; height: 30px; border-radius: 8px; display: inline-grid; place-items: center; vertical-align: middle; }
.hdir svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.hdir.out { background: var(--accent-soft); color: var(--accent-ink); }
.hdir.in { background: var(--req-soft); color: var(--req); }
.hmain { display: grid; gap: 1px; min-width: 0; }
.htitle { font-weight: 600; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.htitle .none { color: var(--text-3); font-weight: 500; font-style: italic; }
.hsub { font-size: 12px; color: var(--text-2); overflow-wrap: anywhere; }
.hrow.done .htitle, .hrow.off .htitle, .hrow.expired .htitle, .hrow.done .hsub, .hrow.off .hsub, .hrow.expired .hsub { color: var(--text-3); }
.hpill { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 600; white-space: nowrap; background: var(--panel-2); color: var(--text-3); }
.hpill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.hpill.wait { background: var(--accent-soft); color: var(--accent-ink); }
.hpill.ans { background: var(--warn-soft); color: var(--warn); }
.hpill.done { background: var(--ok-soft); color: var(--ok); }
.hpill.off { background: var(--bad-soft); color: var(--bad); }
.hchev { display: grid; place-items: center; color: var(--text-3); }
.hchev svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; transition: transform 0.15s ease; }
.hrow > details[open] .hchev svg { transform: rotate(180deg); }
.hactions { position: absolute; top: 10px; right: 42px; display: flex; gap: 6px; align-items: center; }
.hkill-wrap { position: relative; }
.hkill-wrap > summary { list-style: none; cursor: pointer; color: var(--bad); border-color: color-mix(in srgb, var(--bad) 40%, var(--line)); }
.hkill-wrap > summary::-webkit-details-marker { display: none; }
.hkill-wrap[open] > summary { background: var(--bad-soft); }
.hconfirm { position: absolute; z-index: 5; top: calc(100% + 6px); right: 0; width: min(320px, 80vw); display: grid; gap: 8px; padding: 10px 12px; border-radius: 10px; background: var(--panel); border: 1px solid var(--line-strong); box-shadow: var(--shadow); font-size: 12.5px; }
.hconfirm p { margin: 0; color: var(--text); }
.hconfirm form { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.hconfirm .btn.danger { background: var(--bad); border-color: var(--bad); color: #fff; }
.hreason { display: grid; gap: 3px; width: 100%; font-size: 12px; color: var(--text-2); }
.hbody { padding: 0 12px 12px 52px; display: grid; gap: 8px; }
.hmore { font-size: 12px; }
.htl { list-style: none; margin: 0; padding: 0; position: relative; }
.htl::before { content: ""; position: absolute; left: 9px; top: 8px; bottom: 8px; width: 1.5px; background: var(--line); }
.hev { position: relative; display: grid; grid-template-columns: 20px auto minmax(0, 1fr); gap: 8px; padding: 4px 0; font-size: 12.5px; align-items: start; }
.hev .ic { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; background: var(--panel); border: 1.5px solid var(--line-strong); color: var(--text-3); position: relative; }
.hev .ic svg { width: 11px; height: 11px; stroke: currentColor; fill: none; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.hev.acc .ic { border-color: var(--accent); color: var(--accent); }
.hev.ok .ic { border-color: var(--ok); color: var(--ok); }
.hev.warn .ic { border-color: var(--warn); color: var(--warn); }
.hev.bad .ic { border-color: var(--bad); color: var(--bad); background: var(--bad-soft); }
.hev > time { font: 11.5px var(--mono); color: var(--text-3); padding-top: 2px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.hev .tx { min-width: 0; }
.hev .tx b { font-weight: 600; }
.hev .by, .hev .times { color: var(--text-3); }
.hev .ctx { display: block; color: var(--text-2); }
.hev .meta { display: block; font: 11px var(--mono); color: var(--text-3); overflow-wrap: anywhere; }
.hfeed { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 6px 12px; }
.hfeed::before { display: none; }
.hfeed .hev { border-top: 1px solid var(--line); padding: 7px 0; }
.hfeed .hev:first-child { border-top: 0; }
.hlegend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0; font-size: 12px; color: var(--text-3); }
.hlegend .hdir { width: 22px; height: 22px; border-radius: 6px; }
.hlegend .hdir svg { width: 12px; height: 12px; }
.htoast { display: flex; align-items: center; gap: 8px; width: fit-content; margin: 0; padding: 8px 12px; border-radius: 8px; background: var(--text); color: var(--page); font-size: 12.5px; font-weight: 600; }
.htoast svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 2; }
.hkpis { display: flex; flex-wrap: wrap; gap: 8px; }
.hkpis span { padding: 5px 10px; border-radius: 8px; background: var(--panel); border: 1px solid var(--line); font-size: 12px; color: var(--text-2); }
.hkpis b { color: var(--text); font-variant-numeric: tabular-nums; }
.hkpis .warn b { color: var(--warn); }
.htabs { display: flex; gap: 18px; border-bottom: 1px solid var(--line); }
.htabs a { padding: 8px 0; margin-bottom: -1px; font-size: 13px; font-weight: 600; color: var(--text-3); text-decoration: none; border-bottom: 2px solid transparent; }
.htabs a[aria-current="page"] { color: var(--text); border-color: var(--accent); }
.hadmin-filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.hadmin-filters select, .hadmin-filters input[type="search"] { width: auto; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); color: var(--text); font: inherit; font-size: 12.5px; }
.hadmin-filters input[type="search"] { flex: 1; min-width: 160px; }
.help-h { font-size: 15px; margin: 18px 0 8px; }
.help-table { width: 100%; border-collapse: collapse; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; font-size: 13px; }
.help-table td { padding: 9px 12px; border-top: 1px solid var(--line); vertical-align: top; }
.help-table tr:first-child td { border-top: 0; }
.help-table td:first-child { width: 1%; white-space: nowrap; }
.help-table .hev { display: inline-block; padding: 0; }
@media (max-width: 560px) {
  .hrow.acts-1 .hhead, .hrow.acts-2 .hhead { padding-right: 12px; }
  /* The pill moves under the title so the text keeps the row's width. */
  .hhead { grid-template-columns: 30px minmax(0, 1fr) 22px; row-gap: 6px; }
  .hhead .hdir { grid-row: 1 / span 2; align-self: start; }
  .hhead .hmain { grid-column: 2; grid-row: 1; }
  .hhead .hpill { grid-column: 2; grid-row: 2; justify-self: start; }
  .hhead .hchev { grid-column: 3; grid-row: 1; }
  .hactions { position: static; padding: 0 12px 10px 52px; }
  .hconfirm { position: static; width: auto; margin-top: 6px; }
  .hbody { padding-left: 12px; }
}
@media (prefers-reduced-motion: reduce) { .hchev svg { transition: none; } }

/* CSV is progressive enhancement; the page itself retains no export copy. */
.credentials-export { display: none; }
.credentials-csv-ready .credentials-export {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
  margin-top: 4px;
}
.credentials-export .hint { margin: 0; }
