/* PasswordNexa additions to the shared CN/AN/RN stylesheet (app.css). */
/* ⚠ The `hidden` attribute ALWAYS hides (2026-10-08). An author rule such as .pn-check's
   display:flex outranks the browser's [hidden]{display:none}, so a hidden element with that
   class stayed visible -- found when the CSV-only "not encrypted" checkbox showed for a .pnxx. */
[hidden] { display: none !important; }
.table { width: 100%; border-collapse: collapse; font-size: 0.86rem; }
.table th { text-align: left; padding: 0.5rem 0.7rem; font-size: 0.67rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.07em; color: #667085; background: #f9fafb; border-bottom: 2px solid #e4e7ec; white-space: nowrap; }
.table td { padding: 0.55rem 0.7rem; border-bottom: 1px solid #f2f4f7; vertical-align: top; }
.table tbody tr:hover { background: #f9fafb; }
.table tbody tr:last-child td { border-bottom: none; }
.sidebar .nav-item-primary { background: rgba(255,255,255,0.10); font-weight: 700; }
.sidebar .nav-item.active { background: rgba(255,255,255,0.16); }
.sidebar .sidebar-labelled-btn { width: auto; gap: 0.35rem; padding: 0.3rem 0.55rem; display: inline-flex; align-items: center; }
.sidebar .sidebar-btn-label { font-size: 0.75rem; }
html.sidebar-collapsed .sidebar .sidebar-btn-label { display: none; }
@media (max-width: 768px) { .sidebar .sidebar-collapse-btn { display: none !important; } }
html.force-mobile-view .sidebar .sidebar-collapse-btn { display: none !important; }

.pn-narrow { max-width: 560px; margin: 0 auto; }
.pn-narrow-wide { max-width: 760px; }
.pn-center { display: flex; flex-direction: column; align-items: center; gap: 0.75rem; padding: 3rem 1rem; }
.pn-spinner { width: 34px; height: 34px; border: 3px solid var(--gray-200); border-top-color: var(--app-accent);
  border-radius: 50%; animation: pn-spin 0.9s linear infinite; }
@keyframes pn-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .pn-spinner { animation: none; } }
.pn-input-row { display: flex; gap: 0.5rem; align-items: center; }
.pn-input-row .form-control { flex: 1; }
.pn-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; margin: 1rem 0 0.5rem; }
.pn-check { display: flex; gap: 0.5rem; align-items: flex-start; font-size: 0.86rem; margin: 0.6rem 0; }
.pn-checks { display: flex; flex-wrap: wrap; gap: 0 1.25rem; }
.pn-mono, .pn-secret-key { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.pn-meter { height: 6px; background: var(--gray-100); border-radius: 3px; margin-top: 0.4rem; overflow: hidden; }
.pn-meter span { display: block; height: 100%; width: 0; transition: width 0.2s; background: var(--red); }
.pn-meter span.ok { background: var(--yellow); } .pn-meter span.good { background: var(--green); }
.pn-kit { border: 2px dashed var(--gray-300); border-radius: var(--radius-md); padding: 1rem; margin: 1rem 0; }
.pn-kit-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem; padding: 0.45rem 0;
  border-bottom: 1px solid var(--gray-100); }
.pn-kit-row:last-child { border-bottom: 0; }
.pn-secret-key { font-size: 1.02rem; letter-spacing: 0.03em; word-break: break-all; background: var(--app-accent-light);
  padding: 0.2rem 0.45rem; border-radius: 4px; }
.pn-kit-blank { color: var(--gray-500); font-style: italic; }
/* #2712 item 3: the designed Emergency Kit (PN-REC-009) and the recovery code */
.pn-kit-qrrow { display: flex; flex-wrap: wrap; gap: 1rem; align-items: flex-start; padding: 0.8rem 0; border-bottom: 1px solid var(--gray-100); }
.pn-kit-qr { width: 156px; height: 156px; flex: 0 0 auto; }
.pn-kit-qr svg { width: 100%; height: 100%; display: block; }
.pn-kit-fill { flex: 1 1 220px; display: flex; flex-direction: column; gap: 0.35rem; }
.pn-kit-fillbox { height: 2.6rem; border: 1.5px solid var(--gray-400, #9ca3af); border-radius: 4px; background: #fff; }
.pn-kit-guide { padding-top: 0.6rem; font-size: 0.86rem; }
.pn-kit-guide ul { margin: 0.3rem 0 0 1.1rem; padding: 0; }
.pn-kit-rc { margin: 1rem 0; }
.pn-unlock-more { margin-top: 0.8rem; text-align: center; }
.pn-rc-shown { margin: 0.8rem 0; }
.pn-toolbar { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-bottom: 1rem; align-items: center; }
.pn-search { flex: 1 1 280px; margin: 0; }
.pn-filter { width: auto; min-width: 150px; }
.pn-split { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; align-items: start; }
.pn-split.has-detail { grid-template-columns: minmax(0, 1.25fr) minmax(320px, 1fr); }
.pn-items tbody tr { cursor: pointer; }
.pn-items tbody tr.selected { background: var(--app-accent-light); }
.pn-items .pn-sub { color: var(--gray-500); font-size: 0.8rem; }
.pn-fav { color: var(--yellow); margin-left: 0.3rem; }
.pn-detail .card-body { padding: 1.1rem 1.25rem; }
.pn-field { padding: 0.55rem 0; border-bottom: 1px solid var(--gray-100); }
.pn-field:last-child { border-bottom: 0; }
.pn-field-label { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--gray-500); }
.pn-field-value { display: flex; align-items: center; gap: 0.5rem; justify-content: space-between; word-break: break-word; }
.pn-field-value .pn-value { flex: 1; min-width: 0; white-space: pre-wrap; }
.pn-field-buttons { display: flex; gap: 0.3rem; flex-shrink: 0; }
.pn-totp { font-size: 1.15rem; letter-spacing: 0.12em; }
.pn-totp-ring { font-size: 0.75rem; color: var(--gray-500); }
.pn-generated { background: var(--gray-50); border: 1px solid var(--gray-200); border-radius: var(--radius-sm);
  padding: 1rem; font-size: 1.15rem; word-break: break-all; min-height: 3rem; }
.pn-range { width: 100%; }
.pn-tag { display: inline-block; background: var(--gray-100); color: var(--gray-700); border-radius: 999px;
  padding: 0.05rem 0.55rem; font-size: 0.72rem; margin: 0 0.25rem 0.25rem 0; }
.pn-header-actions { display: flex; gap: 0.5rem; }
@media (max-width: 900px) {
  .pn-split.has-detail { grid-template-columns: minmax(0, 1fr); }
  .pn-col-wide { display: none; }
}
html.force-mobile-view .pn-split.has-detail { grid-template-columns: minmax(0, 1fr); }
html.force-mobile-view .pn-col-wide { display: none; }
@media print {
  .sidebar, .mobile-topbar, .pn-actions, .pn-check, .page-header, .alert, .pn-noprint { display: none !important; }
  .pn-kit { border-style: solid; }
  .app-main { margin: 0 !important; }
}

/* R5 custom fields · R8 launch authenticator · R1 plan badge (2026-10-06) */
.pn-custom { border: 1px solid var(--border, #e5e7eb); border-radius: 8px; padding: 0.6rem 0.8rem 0.2rem; margin: 0 0 1rem; }
.pn-custom legend { font-size: 0.86rem; font-weight: 600; padding: 0 0.3rem; }
.pn-custom-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr) auto; gap: 0.5rem; align-items: center; margin-bottom: 0.5rem; }
.pn-custom-row .pn-check { margin: 0; white-space: nowrap; }
@media (max-width: 640px) { .pn-custom-row { grid-template-columns: 1fr; } }
.pn-gate-main { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 16px; }
.pn-gate-card { width: 100%; max-width: 460px; }
.pn-gate-qr { display: flex; justify-content: center; margin: 0.75rem 0; }
.pn-gate-qr svg { width: 200px; height: 200px; background: #fff; padding: 6px; border-radius: 6px; }
.pn-setup-key { font-size: 1rem; letter-spacing: 0.06em; word-break: break-all; }
.pn-plan-badge { display: inline-block; font-size: 0.72rem; font-weight: 600; padding: 0.1rem 0.5rem; border-radius: 999px; background: #eef2ff; color: #3730a3; }
/* P2 sharing */
.pn-shared-badge { margin-left: 0.3rem; background: #ecfdf5; color: #065f46; }
.pn-share-vault { border: 1px solid var(--border, #e5e7eb); border-radius: 8px; padding: 0.6rem 0.8rem; margin-bottom: 0.75rem; }
.pn-share-members { list-style: none; padding: 0; margin: 0.4rem 0; }
.pn-share-members li { display: flex; gap: 0.5rem; align-items: center; padding: 0.2rem 0; flex-wrap: wrap; }
.pn-inline-form { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; margin-top: 0.5rem; }
.pn-inline-form .form-control { flex: 1 1 180px; width: auto; }
/* Certificates */
.pn-cert { border: 1px solid var(--border, #e5e7eb); border-radius: 8px; padding: 0.5rem 0.7rem; margin: 0.5rem 0; }
.pn-cert-head { display: flex; align-items: center; gap: 0.4rem; margin-bottom: 0.3rem; }
.pn-cert-edit { border-bottom: 1px dashed var(--border, #e5e7eb); padding: 0.5rem 0; }
.pn-cert-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; }
@media (max-width: 640px) { .pn-cert-grid { grid-template-columns: 1fr; } }
/* a long secret value stays blurred until the field has focus */
.pn-masked-text:not(.pn-revealed) { -webkit-text-security: disc; filter: blur(3px); }
/* sharing one item for a while */
.pn-share-item { border-top: 1px solid var(--border, #e5e7eb); margin-top: 0.75rem; padding-top: 0.5rem; }
.pn-share-row { display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; font-size: 0.86rem; margin: 0.25rem 0; }

/* Owner request 2026-10-06: the item list and the open item scroll INDEPENDENTLY.
   On a wide screen, while the list view shows, the main area becomes a column that
   fills the window and the split takes what is left; each side is its own scroll
   box, so scrolling a long list never moves the open item, and clicking an item far
   down leaves the list where it was. Pure CSS: an alert above the list resizes it
   without any script measuring heights. Narrow screens keep one flowing page
   (the detail stacks under the list and vault.js scrolls it into view).
   ⚠ EVERY selector carries :not([hidden]) — an author display:flex beats the hidden
   attribute, and would show the vault while it is locked. */
@media (min-width: 901px) {
  html:not(.force-mobile-view) .app-main:has(> #screen-main:not([hidden]) > #view-list:not([hidden])) { display: flex; flex-direction: column; }
  html:not(.force-mobile-view) .app-main:has(> #screen-main:not([hidden]) > #view-list:not([hidden])) > #screen-main:not([hidden]),
  html:not(.force-mobile-view) #view-list:not([hidden]) { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
  html:not(.force-mobile-view) #view-list > .pn-split { flex: 1 1 auto; min-height: 320px; grid-template-rows: minmax(0, 1fr); }
  html:not(.force-mobile-view) #view-list > .pn-split > .pn-list-card,
  html:not(.force-mobile-view) #view-list > .pn-split > .pn-detail { max-height: 100%; overflow-y: auto; overscroll-behavior: contain; }
  html:not(.force-mobile-view) .pn-list-card .pn-items thead th { position: sticky; top: 0; z-index: 1; background: var(--white); }
}
html.force-desktop-view .app-main:has(> #screen-main:not([hidden]) > #view-list:not([hidden])) { display: flex; flex-direction: column; }
html.force-desktop-view .app-main:has(> #screen-main:not([hidden]) > #view-list:not([hidden])) > #screen-main:not([hidden]),
html.force-desktop-view #view-list:not([hidden]) { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
html.force-desktop-view #view-list > .pn-split { flex: 1 1 auto; min-height: 320px; grid-template-rows: minmax(0, 1fr); }
html.force-desktop-view #view-list > .pn-split > .pn-list-card,
html.force-desktop-view #view-list > .pn-split > .pn-detail { max-height: 100%; overflow-y: auto; overscroll-behavior: contain; }
html.force-desktop-view .pn-list-card .pn-items thead th { position: sticky; top: 0; z-index: 1; background: var(--white); }

/* Apps & Extensions */
.pn-apps-card { max-width: 720px; }
.pn-steps { margin: 0.75rem 0 0.5rem 1.2rem; }
.pn-steps li { margin: 0.35rem 0; }
.pn-steps code { background: var(--gray-100); padding: 0.05rem 0.35rem; border-radius: 4px; }
.pn-ml { margin-left: 0.5rem; }

/* Collapsible left-pane sections (owner request 2026-10-08). COLLAPSED BY DEFAULT;
   <html data-nav-open="vault tools"> opens them (prepaint.js / shell.js). A collapsed
   section that holds the current page shows a dot, so "where am I" is never lost.
   The icon-only rail shows every item: it has no headings to open. */
.sidebar .nav-section-toggle { display: flex; align-items: center; justify-content: space-between; width: 100%;
  background: none; border: 0; cursor: pointer; font-family: inherit; text-align: left; border-radius: var(--radius-sm);
  margin-top: 0.15rem; }
.sidebar .nav-section-toggle:hover { color: rgba(255,255,255,0.8); background: rgba(255,255,255,0.05); }
.sidebar .nav-section-toggle:focus-visible { outline: 2px solid rgba(255,255,255,0.6); outline-offset: 1px; }
.sidebar .nav-chevron { width: 12px; height: 12px; flex-shrink: 0; transition: transform 0.15s; }
@media (prefers-reduced-motion: reduce) { .sidebar .nav-chevron { transition: none; } }
.sidebar .nav-group-items { display: none; padding-bottom: 0.25rem; }
.sidebar .nav-group:has(.nav-item.active) > .nav-section-toggle .nav-section-label::after {
  content: ''; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--app-accent);
  margin-left: 0.45rem; vertical-align: middle; }
html[data-nav-open~="vault"] .sidebar .nav-group[data-group="vault"] > .nav-group-items,
html[data-nav-open~="tags"] .sidebar .nav-group[data-group="tags"] > .nav-group-items,
html[data-nav-open~="categories"] .sidebar .nav-group[data-group="categories"] > .nav-group-items,
html[data-nav-open~="tools"] .sidebar .nav-group[data-group="tools"] > .nav-group-items,
html[data-nav-open~="account"] .sidebar .nav-group[data-group="account"] > .nav-group-items,
html[data-nav-open~="biz"] .sidebar .nav-group[data-group="biz"] > .nav-group-items,
html[data-nav-open~="fam"] .sidebar .nav-group[data-group="fam"] > .nav-group-items,
html[data-nav-open~="mine"] .sidebar .nav-vaultset[data-group="mine"] > .nav-group-items,
html[data-nav-open~="shared"] .sidebar .nav-vaultset[data-group="shared"] > .nav-group-items,
html[data-nav-open~="mine-fam"] .sidebar .nav-vaultset[data-group="mine-fam"] > .nav-group-items,
html[data-nav-open~="shared-fam"] .sidebar .nav-vaultset[data-group="shared-fam"] > .nav-group-items { display: block; }
html[data-nav-open~="vault"] .sidebar .nav-group[data-group="vault"] > .nav-section-toggle .nav-chevron,
html[data-nav-open~="tags"] .sidebar .nav-group[data-group="tags"] > .nav-section-toggle .nav-chevron,
html[data-nav-open~="categories"] .sidebar .nav-group[data-group="categories"] > .nav-section-toggle .nav-chevron,
html[data-nav-open~="tools"] .sidebar .nav-group[data-group="tools"] > .nav-section-toggle .nav-chevron,
html[data-nav-open~="account"] .sidebar .nav-group[data-group="account"] > .nav-section-toggle .nav-chevron,
html[data-nav-open~="biz"] .sidebar .nav-group[data-group="biz"] > .nav-section-toggle .nav-chevron,
html[data-nav-open~="fam"] .sidebar .nav-group[data-group="fam"] > .nav-section-toggle .nav-chevron,
html[data-nav-open~="mine"] .sidebar .nav-vaultset[data-group="mine"] > .nav-vaultset-head .nav-chevron,
html[data-nav-open~="shared"] .sidebar .nav-vaultset[data-group="shared"] > .nav-vaultset-head .nav-chevron,
html[data-nav-open~="mine-fam"] .sidebar .nav-vaultset[data-group="mine-fam"] > .nav-vaultset-head .nav-chevron,
html[data-nav-open~="shared-fam"] .sidebar .nav-vaultset[data-group="shared-fam"] > .nav-vaultset-head .nav-chevron { transform: rotate(90deg); }
/* My Vaults / Shared Vaults (2026-10-08, later): the heading link and its chevron share one row.
   A collapsed heading holding the open vault shows the same dot as a collapsed section. */
.sidebar .nav-vaultset-head { display: flex; align-items: center; }
.sidebar .nav-vaultset-head > .nav-item { flex: 1; min-width: 0; }
.sidebar .nav-vaultset-toggle { background: none; border: 0; cursor: pointer; color: rgba(255,255,255,0.55);
  padding: 0.35rem 0.5rem; border-radius: var(--radius-sm); display: flex; align-items: center; }
.sidebar .nav-vaultset-toggle:hover { color: #fff; background: rgba(255,255,255,0.08); }
.sidebar .nav-vaultset-toggle:focus-visible { outline: 2px solid rgba(255,255,255,0.6); outline-offset: 1px; }
.sidebar .nav-vaultset:has(> .nav-group-items .nav-item.active) > .nav-vaultset-head .nav-vaultset-toggle::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--app-accent); margin-right: 0.3rem; }
html.sidebar-collapsed .sidebar .nav-vaultset-toggle { display: none; }
/* The vault group's own headings (2026-10-08): My Vaults / Shared Vaults, and with a joined
   Family plan the Business Plan / Family Plan sub-groups (biz, fam). */
.sidebar .nav-group .nav-group { margin-left: 0.35rem; }
.sidebar .nav-sub { padding-left: 2.2rem; font-size: 0.84rem; }
.sidebar .nav-head { font-weight: 600; }
@media (min-width: 769px) { html.sidebar-collapsed:not(.force-mobile-view) .sidebar .nav-group-items { display: block; } }
@media (max-width: 768px) { html.sidebar-collapsed:not(.force-desktop-view) .sidebar .nav-group-items { display: block; } }
html.force-desktop-view.sidebar-collapsed .sidebar .nav-group-items { display: block; }

/* Settings › Import and Export (2026-10-08) */
.pn-howto { background: var(--gray-50); border: 1px solid var(--gray-200); border-radius: var(--radius-sm); padding: 0.6rem 0.8rem;
  font-size: 0.85rem; margin-bottom: 0.9rem; }
.pn-howto ol { margin: 0.3rem 0 0 1.1rem; padding: 0; }
.pn-map { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 0.35rem 0.75rem; align-items: center; margin: 0.5rem 0 1rem; }
.pn-map label { font-size: 0.82rem; }
@media (max-width: 640px) { .pn-map { grid-template-columns: 1fr; } }
.pn-import-table { max-height: 320px; overflow: auto; border: 1px solid var(--gray-200); border-radius: var(--radius-sm); margin: 0.5rem 0; }
.pn-import-table .table td, .pn-import-table .table th { padding: 0.35rem 0.55rem; }
.pn-import-counts { display: flex; flex-wrap: wrap; gap: 0.35rem; margin: 0.4rem 0; }
.pn-warn-list { font-size: 0.84rem; margin: 0.4rem 0 0.6rem 1.1rem; }
.pn-progress { height: 8px; background: var(--gray-100); border-radius: 4px; overflow: hidden; margin: 0.5rem 0; }
.pn-progress span { display: block; height: 100%; width: 0; background: var(--app-accent); transition: width 0.2s; }

/* Tabs (Sharing & People, Settings), vault and people lists, tag chips (2026-10-08) */
.pn-tabs { display: flex; gap: 0.25rem; border-bottom: 1px solid var(--gray-200); margin-bottom: 0.9rem; flex-wrap: wrap; }
.pn-tab { padding: 0.5rem 0.95rem; font-size: 0.88rem; font-weight: 600; color: var(--gray-600, #4b5563); text-decoration: none;
  border-bottom: 2px solid transparent; margin-bottom: -1px; }
.pn-tab:hover { color: var(--app-accent); }
.pn-tab.active { color: var(--app-accent); border-bottom-color: var(--app-accent); }
.pn-tabpanel { max-width: 980px; }
.pn-row-actions { display: flex; gap: 0.3rem; flex-wrap: wrap; justify-content: flex-end; }
.pn-vault-table td { vertical-align: middle; }
.pn-plan-head { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--gray-500, #6b7280); margin: 1rem 0 0.35rem; }
.pn-plan-strip p { margin: 0.2rem 0; }
.pn-click { cursor: pointer; }
.pn-click:hover { background: var(--gray-50); }
.pn-person-pick { display: flex; gap: 0.6rem; align-items: center; justify-content: space-between; padding: 0.25rem 0; border-bottom: 1px solid var(--gray-100); }
.pn-person-pick select { max-width: 150px; }
.form-control-sm { padding: 0.2rem 0.4rem; font-size: 0.82rem; height: auto; }
.pn-big { font-size: 1.25rem; letter-spacing: 0.08em; }
.pn-tagpick { display: flex; flex-wrap: wrap; gap: 0.3rem; margin-bottom: 0.4rem; min-height: 1.6rem; align-items: center; }
.pn-chip { display: inline-flex; align-items: center; gap: 0.2rem; }
.pn-chip-x { border: 0; background: none; cursor: pointer; font-size: 0.95rem; line-height: 1; padding: 0 0.1rem; color: inherit; }

/* Help panel (2026-10-08): the portal's panel (lutonlabs_app platform_portal/_help_panel.html), as a
   stylesheet because this page's CSP allows no inline style block. Same slot as the portal's pill:
   right/bottom 1.5rem, 36px, z-index 9990 -- view-toggle.js measures it and sits to its left. */
.pnhelp-fab { position: fixed; right: 1.5rem; bottom: 1.5rem; z-index: 9990; height: 36px; padding: 0 1rem; border-radius: 18px;
  border: 2px solid rgba(255,255,255,.3); cursor: pointer; background: #1e5eff; color: #fff; font-size: .82rem; font-weight: 700;
  font-family: inherit; box-shadow: 0 3px 14px rgba(0,0,0,.28); display: flex; align-items: center; gap: .4rem; white-space: nowrap; }
.pnhelp-fab:hover { background: #0d3bc4; }
.pnhelp-fab:focus-visible { outline: 3px solid #93c5fd; outline-offset: 2px; }
@media print { .pnhelp-fab, .pnhelp-wrap { display: none !important; } }
.pnhelp-wrap { position: fixed; inset: 0; z-index: 9999; background: rgba(15,23,42,.42); }
.pnhelp { position: absolute; right: 0; top: 0; bottom: 0; width: min(560px, 100%); background: #fff; display: flex; flex-direction: column;
  box-shadow: -8px 0 28px rgba(0,0,0,.18); }
.pnhelp-hd { padding: 18px 44px 14px 20px; border-bottom: 1px solid #e5e7eb; }
.pnhelp-hd h2 { margin: 0 0 6px; font-size: 1.15rem; color: #064e3b; }
.pnhelp-sum { font-size: .86rem; color: #374151; line-height: 1.5; }
.pnhelp-meta { font-size: .72rem; color: #6b7280; margin-top: 8px; }
.pnhelp-sr { padding: 10px 20px 0; }
.pnhelp-sr input { width: 100%; border: 1px solid #d1d5db; border-radius: 8px; padding: 7px 10px; font-size: .85rem; font-family: inherit; }
.pnhelp-bd { overflow: auto; padding: 6px 20px 28px; flex: 1; }
.pnhelp-x { position: absolute; right: 14px; top: 12px; border: none; background: none; font-size: 20px; cursor: pointer; color: #6b7280; line-height: 1; }
.pnhelp h3 { font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; color: #6b7280; margin: 22px 0 10px; font-weight: 700; }
.pnhelp details { border: 1px solid #e5e7eb; border-radius: 8px; padding: 9px 12px; margin-bottom: 8px; background: #fff; }
.pnhelp details[open] { background: #f8fafc; }
.pnhelp summary { cursor: pointer; font-size: .86rem; font-weight: 600; color: #111827; }
.pnhelp .mins { color: #1e5eff; font-weight: 600; font-size: .76rem; }
.pnhelp .body { font-size: .83rem; color: #374151; line-height: 1.55; margin-top: 7px; }
.pnhelp .pre { font-size: .75rem; color: #6b7280; margin-top: 6px; }
.pnhelp .note { border-left: 3px solid #f59e0b; background: #fffbeb; padding: 10px 12px; border-radius: 0 6px 6px 0; margin-bottom: 10px; }
.pnhelp .note.info { border-left-color: #0ea5e9; background: #f0f9ff; }
.pnhelp .note b { display: block; font-size: .82rem; color: #111827; margin-bottom: 3px; }
.pnhelp .note p { margin: 0; font-size: .8rem; color: #374151; line-height: 1.5; }
.pnhelp .note a { display: inline-block; margin-top: 8px; font-size: .78rem; font-weight: 600; color: #fff; background: #1e5eff; padding: 5px 11px; border-radius: 6px; text-decoration: none; }
.pnhelp ol { margin: 0; padding-left: 20px; }
.pnhelp ol li { margin-bottom: 12px; font-size: .83rem; line-height: 1.5; }
.pnhelp .act { font-weight: 600; color: #111827; }
.pnhelp .det { color: #4b5563; }
.pnhelp .res { color: #0d3bc4; }
.pnhelp .res::before { content: "✓ "; font-weight: 700; }
.pnhelp table { width: 100%; border-collapse: collapse; font-size: .78rem; margin-top: 6px; }
.pnhelp table td { padding: 4px 6px; border-bottom: 1px solid #f1f5f9; vertical-align: top; color: #374151; }
.pnhelp table td:first-child { color: #6b7280; white-space: nowrap; width: 34%; }
.pnhelp .flow { display: flex; gap: 8px; font-size: .74rem; overflow-x: auto; padding-bottom: 6px; }
.pnhelp .band { flex: 1; min-width: 150px; }
.pnhelp .band > span { display: block; font-size: .65rem; text-transform: uppercase; letter-spacing: .05em; color: #9ca3af; font-weight: 700; margin-bottom: 5px; }
.pnhelp .node { display: block; border: 1px solid #e5e7eb; border-radius: 6px; padding: 6px 8px; margin-bottom: 5px; text-decoration: none; color: #065f46; background: #fff; }
.pnhelp .node.here { background: #1e5eff; color: #fff; border-color: #1e5eff; font-weight: 700; }
.pnhelp .links a { display: block; font-size: .82rem; color: #0d3bc4; padding: 4px 0; text-decoration: none; }
.pnhelp .empty { font-size: .83rem; color: #6b7280; padding: 14px 0; }
.pnhelp-ft { border-top: 1px solid #e5e7eb; padding: 12px 20px; display: flex; justify-content: space-between; align-items: center; font-size: .74rem; color: #6b7280; }
.pnhelp-ft a { background: #1e5eff; color: #fff; padding: 7px 13px; border-radius: 6px; text-decoration: none; font-weight: 600; font-size: .82rem; }
html.pnhelp-open { overflow: hidden; }

/* PN-17: the authenticator code asked at every export */
.pn-code-input { max-width: 11rem; letter-spacing: .15em; }

/* Widen the left pane (owner request 2026-10-08, later): --pn-nav-w is set by shell.js while dragging
   and by prepaint.js from the saved width. Desktop layout only; the phone overlay and the icon-only
   rail keep their own widths. A long vault or tag name stays on one line (its full name is the
   link's title) until the pane is widened. */
.pn-nav-resize { display: none; }
@media (min-width: 769px) {
  html:not(.force-mobile-view):not(.sidebar-collapsed) .sidebar { width: var(--pn-nav-w, 240px); }
  html:not(.force-mobile-view):not(.sidebar-collapsed) .pn-nav-resize { display: block; }
}
html.force-desktop-view:not(.sidebar-collapsed) .sidebar { width: var(--pn-nav-w, 240px); }
html.force-desktop-view:not(.sidebar-collapsed) .pn-nav-resize { display: block; }
.pn-nav-resize { flex: 0 0 6px; width: 6px; margin-left: -6px; height: 100vh; position: relative; z-index: 20;
  cursor: col-resize; background: transparent; touch-action: none; transition: background 0.15s; }
.pn-nav-resize:hover, .pn-nav-resize.dragging, .pn-nav-resize:focus-visible { background: rgba(124,58,237,0.55); outline: none; }
html.pn-nav-resizing, html.pn-nav-resizing * { cursor: col-resize !important; user-select: none !important; }
.sidebar .nav-item .nav-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Settings › Preferences: the extension's "never for this site" list (0.1.4) */
.pn-plain-list { list-style: none; margin: 0 0 .5rem; padding: 0; }
.pn-plain-list li { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .35rem 0; border-bottom: 1px solid var(--gray-100); }
/* PN-20 (2026-10-08): Import from your browser + the import review */
.pn-browser-pick { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0.6rem 0; }
.pn-browser-pick button[aria-selected="true"] { background: var(--app-accent); color: var(--white); border-color: var(--app-accent); }
.pn-howto code.pn-addr { user-select: all; }
.pn-review-bar { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; margin: 0.6rem 0 0.2rem; }
.pn-review-bar button[aria-pressed="true"] { background: var(--gray-200); font-weight: 600; }
.pn-review-bulk { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 0.35rem 0.75rem; align-items: center; margin: 0.5rem 0; }
@media (max-width: 640px) { .pn-review-bulk { grid-template-columns: 1fr; } }
.pn-import-table select.form-control { padding: 0.15rem 0.3rem; font-size: 0.82rem; min-width: 10rem; }
.pn-import-table tr.pn-row-skip td { color: var(--gray-500); }
.pn-gen-rules { margin: 0.5rem 0; } .pn-gen-rules summary { cursor: pointer; } .pn-gen-rules summary .pn-check { display: inline-flex; margin: 0.3rem 0; }
.pn-gen-rules .form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }

/* #2696 multi-select, bulk actions, merge. ⚠ Every display rule here also carries :not([hidden]). */
.pn-row-check { margin: 0 0.5rem 0 0; vertical-align: middle; width: 1rem; height: 1rem; cursor: pointer; }
.pn-items tbody tr.pn-checked { background: #eef6ff; }
.pn-items tbody tr.pn-group-row { cursor: default; background: var(--gray-50); }
.pn-items tbody tr.pn-group-row td { font-size: 0.82rem; }
.pn-selbar:not([hidden]) { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 0.6rem; margin: -0.4rem 0 0.75rem;
  padding: 0.5rem 0.75rem; border: 1px solid var(--app-accent, #4f46e5); border-radius: 8px; background: var(--app-accent-light, #eef2ff); }
.pn-selbar-actions { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.pn-selpanel:not([hidden]) { display: block; margin-bottom: 0.75rem; }
.pn-tag-checks { display: flex; flex-wrap: wrap; gap: 0 1rem; max-height: 180px; overflow-y: auto; }
.pn-tag-checks .pn-check { margin: 0.25rem 0; }
.pn-bulk-report, .pn-undo { margin-bottom: 0.75rem; }
.pn-undo:not([hidden]) { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.pn-more-filters summary { cursor: pointer; font-size: 0.86rem; color: var(--gray-600); }
.pn-more-filters .pn-inline-form { margin-top: 0.35rem; }
.pn-merge-fields th, .pn-merge-result th { width: 30%; font-weight: 600; vertical-align: top; }
.pn-merge-notes { white-space: pre-wrap; word-break: break-word; max-height: 260px; overflow-y: auto; font-size: 0.82rem; }
.pn-import-preview-row { background: var(--gray-50); padding: .4rem .6rem; margin-top: .3rem; border-radius: 4px; }
.pn-import-preview-row dl { display: grid; grid-template-columns: max-content 1fr; gap: .15rem .8rem; margin: 0; }
.pn-import-preview-row dt { font-weight: 600; }
.pn-import-preview-row dd { margin: 0; overflow-wrap: anywhere; }
/* #2712 item history (PN-VLT-005) */
.pn-history { display: flex; flex-direction: column; gap: .5rem; margin: .4rem 0; }
.pn-history-row { border: 1px solid var(--gray-200); border-radius: 6px; padding: .5rem .7rem; }
.pn-history-head { font-size: .85rem; margin-bottom: .25rem; }
.pn-bad { color: #dc2626; font-weight: 600; }

/* ── 2026-10-11: the PHONE layout. Until the PasswordNexa phone app ships, the web vault IS the phone app, so on a
   phone it behaves like one. Everything here hangs off html.pn-phone, which vault.js syncPhone() sets from the
   width (<= 900px) AND the Desktop/Mobile Site toggle -- one answer, so this file and vault.js cannot disagree. */
.pn-phone-only { display: none !important; }
html.pn-phone .pn-phone-only { display: revert !important; }
html.pn-phone div.pn-phone-only { display: block !important; }
/* the shared stylesheet gives every table min-width 520px on small screens; the item list is one column here */
html.pn-phone .pn-items { min-width: 0 !important; }
html.pn-phone .pn-items tbody td { padding-top: 0.75rem; padding-bottom: 0.75rem; }
html.pn-phone .pn-phone-sub { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 70vw; }
/* tick-boxes only in Select mode */
html.pn-phone:not(.pn-selecting) .pn-items .pn-row-check { display: none; }
html.pn-phone .pn-items thead { display: none; }
html.pn-phone.pn-selecting .pn-items thead { display: table-header-group; }
/* an opened item is its own screen, with Back */
html.pn-phone.pn-detail-open #view-list > :not(.pn-split),
html.pn-phone.pn-detail-open #view-list .pn-split > .pn-list-card { display: none !important; }
html.pn-phone.pn-detail-open body:has(#view-list:not([hidden])) .page-header { display: none !important; }
html.pn-phone .pn-detail .card-header { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
/* the floating Help and Desktop Site buttons must never sit on the last field or button */
html.pn-phone .app-main { padding-bottom: 6rem; }
html.pn-phone .pn-toolbar { flex-wrap: wrap; }
/* the selection bar: ONE row that stays in view while ticking down the list (the actions scroll sideways) */
html.pn-phone .pn-selbar:not([hidden]) { position: sticky; top: 3.6rem; z-index: 5; flex-wrap: nowrap; overflow-x: auto;
  -webkit-overflow-scrolling: touch; margin-top: 0; box-shadow: 0 4px 12px rgba(15, 23, 42, .12); }
html.pn-phone .pn-selbar > * { flex: 0 0 auto; }
html.pn-phone .pn-selbar-actions { flex-wrap: nowrap; }
html.pn-phone .pn-selbar .btn { white-space: nowrap; }
@media (min-width: 769px) { html.pn-phone .pn-selbar:not([hidden]) { top: 0; } }   /* no sticky top bar above 768px */
/* ONE scroller on a phone: the window. The shared layout scrolls .app-main (height 100vh) under a 56px sticky top
   bar, so the page had TWO scrolling layers -- the window moved by the top bar's height as well -- and Back, swipes
   and the browser's own scroll restoring fought over them. vault.js scroller() follows whichever is in force. */
@media (max-width: 768px) { html:not(.force-desktop-view) .app-main { height: auto; overflow: visible; } }
html.force-mobile-view .app-main { height: auto; overflow: visible; }
