/* v0.34 (the owner, 2026-10-12): accounts and access - the profile chip with its missing-details badge, the program
   version (small and muted) and the administrator's "Piekļuve pēc ielūguma". Colours come from the shared tokens in
   styles.css, so the dark theme follows. This file loads early: rules that meet later design files are specific. */

/* ---------------------------------------------------------------- profile chip -> Settings */
.topbar a.userbox { color: inherit; text-decoration: none; border-radius: 999px; padding: 3px 10px 3px 3px; margin-right: -4px; }
.topbar a.userbox:hover { background: var(--canvas-alt); }
.topbar a.userbox:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.topbar .userbox .avatar, .topbar .mother-settings-shortcut { position: relative; }
.topbar .userbox .avatar .pm-badge, .topbar .mother-settings-shortcut .pm-badge {
  position: absolute; top: -6px; right: -8px; display: grid; place-items: center; min-width: 17px; height: 17px;
  padding: 0 4px; box-sizing: border-box; border-radius: 9px; border: 2px solid var(--surface);
  background: var(--suspected); color: #241400; font-size: 10px; font-weight: 700; line-height: 1; font-style: normal;
}
.topbar a.userbox.pm-has-missing .avatar { margin-right: 5px; }
.topbar .mother-settings-shortcut .pm-badge { top: 1px; right: 1px; }
/* Phones hide the name chip in most designs; the round settings shortcut carries the badge instead. It is shown in
   every design while something is missing (V6 and V7 always show it). */
@media (max-width: 640px) {
  body:not([data-ui-variant="v6"]) .topbar .mother-settings-shortcut.pm-has-missing {
    display: inline-flex; align-items: center; justify-content: center; flex: 0 0 40px; width: 40px; height: 40px;
    border-radius: 50%; color: var(--ink-2); text-decoration: none;
  }
}

/* ---------------------------------------------------------------- Settings: what is missing */
.mother-settings .pm-summary {
  margin: -8px 0 18px; padding: 10px 12px; border-radius: var(--radius); background: var(--suspected-light);
  border: 1px solid color-mix(in srgb, var(--suspected) 45%, var(--line));
}
.mother-settings .pm-summary p { margin: 0; line-height: 1.5; }
.mother-settings .pm-summary ul { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 0; padding: 0; }
.mother-settings .pm-summary button.quiet {
  height: auto; min-height: 32px; padding: 4px 12px; border: 1px solid color-mix(in srgb, var(--suspected) 55%, var(--line));
  border-radius: 999px; background: var(--surface); color: var(--ink);
}
.mother-settings .pm-missing input, .mother-settings .pm-missing select { border-color: var(--suspected); }
.mother-settings .pm-flag {
  display: inline-block; margin-left: 4px; padding: 0 7px; border-radius: 9px; border: 1px solid var(--suspected);
  background: var(--suspected-light); color: var(--ink); font-size: 11px; font-weight: 600; line-height: 1.5; vertical-align: 1px;
}
.mother-settings .pm-note { margin: 5px 0 0; color: var(--ink-2); line-height: 1.45; }
.mother-settings .pm-note .pm-flag { margin: 0 4px 0 0; }
.mother-settings .sheet.pm-missing { box-shadow: inset 3px 0 0 var(--suspected); }
.mother-settings .sheet.pm-missing > .pm-note { margin: 0 0 8px; }
.mother-settings .pm-confirm { margin-top: 6px; height: auto; min-height: 32px; border: 1px solid var(--line-strong); }

/* ---------------------------------------------------------------- program version */
.app-version { color: var(--ink-muted); font-variant-numeric: tabular-nums; letter-spacing: 0.01em; }
.login-card .login-version { margin: 14px 0 0; text-align: center; font-size: 11.5px; }
.rail .rail-version { display: block; margin: 2px 4px 0; text-align: center; font-size: 9.5px; line-height: 1.3; }
.topbar .topbar-version { font-size: 11px; white-space: nowrap; }
.settings-version { padding: 18px 0 4px; text-align: center; font-size: 11.5px; background: none; border: 0; }
@media (max-width: 640px) {
  .rail .rail-version { display: none !important; }
}
@media (max-width: 400px) {
  .topbar .topbar-version { display: none !important; }
}

/* ---------------------------------------------------------------- login: invitation note */
.login-card .invite-note {
  margin: 10px 0 2px; padding: 8px 10px; border-radius: var(--radius); background: var(--blue-light); color: var(--ink);
  border: 1px solid color-mix(in srgb, var(--blue) 25%, var(--line)); font-size: 12.5px; line-height: 1.45;
}

/* ---------------------------------------------------------------- administrator: "Piekļuve pēc ielūguma" */
.ia { margin: 0 0 12px; }
.ia .ia-box { margin: 0; }
.ia .ia-box > summary { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin: 0; padding: 10px 12px; }
.ia .ia-title { font-weight: 600; }
.ia .ia-state { padding: 1px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; border: 1px solid transparent; }
.ia .ia-state.ia-invite { background: var(--verified-light); color: var(--ink); border-color: color-mix(in srgb, var(--verified) 45%, var(--line)); }
.ia .ia-state.ia-open { background: var(--suspected-light); color: var(--ink); border-color: color-mix(in srgb, var(--suspected) 45%, var(--line)); }
.ia .ia-warn { color: var(--compromised); font-weight: 600; }
.ia .ia-body { padding: 0 12px 12px; border-top: 1px solid var(--line); }
.ia .ia-mode { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; padding-top: 12px; }
.ia .ia-mode .seg { flex: none; }
.ia .ia-mode .seg button { padding: 0 14px; height: 32px; }
.ia .ia-mode p { flex: 1 1 280px; margin: 0; line-height: 1.45; }
.ia .ia-add { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) auto; gap: 8px 10px; align-items: end; margin: 14px 0 10px; }
.ia .ia-add label { display: block; font-size: 12px; color: var(--ink-2); margin-bottom: 3px; }
.ia .ia-add input { width: 100%; }
.ia .ia-add .ia-error { grid-column: 1 / -1; margin: 0; }
.ia .ia-add .ia-error:empty { display: none; }
.ia table.params.ia-table td { vertical-align: top; }
.ia .ia-email { font-weight: 600; overflow-wrap: anywhere; }
.ia .ia-unlisted { margin-top: 12px; }
.ia .ia-unlisted > summary { margin: 0 0 6px; }
.ia .ia-unlisted-list { list-style: none; margin: 0 0 10px; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.ia .ia-unlisted-list li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 10px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.ia .ia-unlisted-list li > span { overflow-wrap: anywhere; min-width: 0; }
.ia [data-ia-status]:empty { display: none; }
.ia [data-ia-status] { margin: 8px 0 0; }
.ia .ia-k { display: none; }
@media (max-width: 640px) {
  .ia .ia-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .ia .ia-table, .ia .ia-table tbody { display: block; width: 100%; }
  .ia .ia-table tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; padding: 9px 0; border-bottom: 1px solid var(--line); }
  .ia table.params.ia-table td { display: block; grid-column: 1; padding: 0; border: 0; white-space: normal; }
  .ia table.params.ia-table td:last-child { grid-column: 2; grid-row: 1 / span 4; align-self: start; }
  .ia .ia-k { display: inline; color: var(--ink-muted); }
  .ia .ia-table td:nth-child(4) .muted { display: inline; }
  .ia .ia-table td:nth-child(4) .muted::before { content: " · "; }
  .ia .ia-add { grid-template-columns: minmax(0, 1fr); }
  .ia .ia-mode .seg { width: 100%; }
  .ia .ia-mode .seg button { flex: 1; padding: 0 6px; }
}
