@charset "UTF-8";
/* Core colors sampled from ideapage.ru on 2026-09-29; see design/BRAND.md. */
:root {
  color-scheme: light;
  --canvas: #f6f7fb;
  --surface: #ffffff;
  --sidebar: #f0f1f8;
  --ink: #11131a;
  --muted: #62697a;
  --primary: #6757f5;
  --primary-hover: #5143de;
  --primary-soft: #eeebff;
  --primary-strong: #5143de;
  --accent: #b9f34a;
  --line: #e6e8f0;
  --hover: #f4f2ff;
  --hero: #efedff;
  --hero-gradient: radial-gradient(ellipse at 0% 10%, #b9f34a24, transparent 60%), radial-gradient(ellipse at 95% 60%, #6757f524, transparent 70%), var(--canvas);
  --success: #20a875;
  --success-soft: #e7f7f0;
  --warning: #896219;
  --warning-soft: #fff3d9;
  --danger: #b53f52;
  --danger-hover: #913245;
  --danger-strong: #a93448;
  --danger-soft: #fff0f3;
  --danger-line: #f0cbd3;
  --on-primary: #ffffff;
  --on-toast: #ffffff;
  --shadow-color: #231f5314;
  --focus-halo: #6757f526;
  --backdrop: #10121780;
  --radius: 22px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --canvas: #101217;
  --surface: #191c24;
  --sidebar: #151820;
  --ink: #f2f4fa;
  --muted: #a8afbd;
  --primary: #8b7cff;
  --primary-hover: #b8afff;
  --primary-soft: #292441;
  --primary-strong: #5143de;
  --line: #2d323d;
  --hover: #222432;
  --hero: #222037;
  --hero-gradient: radial-gradient(ellipse at 0% 10%, #b9f34a12, transparent 60%), radial-gradient(ellipse at 95% 60%, #8b7cff24, transparent 70%), var(--canvas);
  --success: #4fd6a1;
  --success-soft: #18372e;
  --warning: #e7be6d;
  --warning-soft: #332c1d;
  --danger: #ff9caf;
  --danger-hover: #bc4157;
  --danger-soft: #38212a;
  --danger-line: #603441;
  --on-primary: #101217;
  --shadow-color: #00000040;
  --focus-halo: #8b7cff33;
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--canvas); font-size: 14px; line-height: 1.55; }
button, input { font: inherit; }
button, a, input { -webkit-tap-highlight-color: transparent; }
button { color: inherit; cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .55; }
a { color: var(--primary); }
button, a, input { outline-offset: 4px; }
:focus-visible { outline: 3px solid var(--primary); }
button { touch-action: manipulation; }
input { min-width: 0; }
svg { flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }
.icon { width: 20px; height: 20px; }
.icon-library { position: absolute; width: 0; height: 0; overflow: hidden; }
[hidden] { display: none !important; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-weight: 600; }
h1 { letter-spacing: -1.1px; font-size: 34px; line-height: 1.2; }
h2 { letter-spacing: -.45px; font-size: 21px; line-height: 1.35; }
h3 { font-size: 16px; line-height: 1.4; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.eyebrow { display: block; color: var(--muted); font-size: 10px; font-weight: 650; letter-spacing: 1.7px; line-height: 1.5; }
.skip-link { position: fixed; z-index: 100; top: 8px; left: 8px; padding: 12px 20px; background: var(--surface); border-radius: 8px; transform: translateY(-150%); }
.skip-link:focus { transform: translateY(0); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-size: 27px; font-weight: 650; line-height: 1; letter-spacing: -1.2px; width: fit-content; color: var(--ink); }
.brand-dot { color: var(--primary); }
.brand-icon { width: 39px; height: 39px; stroke-width: 1.3; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 9px; border: 1px solid transparent; border-radius: 9px; min-height: 44px; padding: 10px 17px; font-weight: 550; font-size: 13px; text-decoration: none; transition: background .15s, border-color .15s, box-shadow .15s; }
.button-primary { color: var(--on-primary); background: var(--primary); box-shadow: 0 2px 3px var(--shadow-color); }
.button-primary:hover:not(:disabled) { background: var(--primary-hover); box-shadow: 0 3px 10px var(--shadow-color); }
.button-secondary { color: var(--ink); background: var(--surface); border-color: var(--line); }
.button-secondary:hover:not(:disabled) { background: var(--sidebar); border-color: var(--line); }
.button-danger { color: #fff; background: var(--danger-strong); }
.button-danger:hover:not(:disabled) { background: var(--danger-hover); }
.button-danger-outline { color: var(--danger); background: var(--surface); border-color: var(--danger-line); }
.button-danger-outline:hover:not(:disabled) { background: var(--danger-soft); }
.icon-button { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; padding: 8px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); flex-shrink: 0; transition: background .15s, color .15s; }
.icon-button:hover:not(:disabled) { color: var(--primary); background: var(--primary-soft); }
.icon-button.danger:hover { color: var(--danger); background: var(--danger-soft); }
.text-button { display: inline-flex; align-items: center; gap: 7px; min-height: 36px; padding: 6px 0; border: 0; background: transparent; color: var(--primary); font-size: 12px; font-weight: 550; text-decoration: none; }
.text-button:hover { text-decoration: underline; text-underline-offset: 4px; }
.text-button .icon { width: 16px; height: 16px; }
.status-dot { display: inline-block; width: 7px; height: 7px; flex-shrink: 0; border-radius: 50%; background: var(--success); }
.status-dot.offline { background: var(--warning); }
.spinner { display: inline-block; width: 20px; height: 20px; border: 2px solid var(--line); border-top-color: var(--primary); border-radius: 50%; animation: spin .85s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.connection-banner { position: relative; z-index: 20; padding: 10px 24px; color: var(--warning); background: var(--warning-soft); text-align: center; font-size: 13px; }
.boot-screen { min-height: 100svh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; color: var(--muted); }
.boot-screen .brand-icon { color: var(--primary); width: 56px; height: 56px; }
.brand-name { font-size: 28px; font-weight: 650; color: var(--ink); }
.boot-screen p { font-size: 13px; }
.noscript-message { position: fixed; inset: 0; display: grid; place-items: center; padding: 40px; background: var(--canvas); z-index: 100; }

/* Entry */
.auth-layout { min-height: 100svh; display: grid; grid-template-columns: minmax(360px, 1fr) minmax(480px, 1fr); }
.auth-story { display: flex; flex-direction: column; padding: 45px 58px 30px; position: relative; overflow: hidden; background: var(--hero-gradient); border-right: 1px solid var(--line); }
.auth-story-content { width: 100%; max-width: 490px; margin: auto; padding: 58px 0 16px; }
.auth-story h1 { margin-top: 23px; font-size: clamp(39px, 4vw, 63px); letter-spacing: -2.7px; line-height: 1.12; font-weight: 550; }
.auth-note { position: relative; display: flex; align-items: center; gap: 10px; color: var(--primary); font-size: 12px; }
.next-step { color: var(--muted); font-size: 11px; line-height: 1.65; }
.auth-story > .next-step { margin-top: 30px; }
.auth-panel { display: flex; align-items: center; justify-content: center; padding: 56px 48px; background: var(--surface); }
.auth-card { width: 100%; max-width: 380px; }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; padding: 4px; margin-bottom: 40px; background: var(--canvas); border: 1px solid var(--line); border-radius: 10px; }
.auth-tabs button { min-height: 40px; padding: 9px 12px; background: transparent; border: 0; border-radius: 7px; font-size: 13px; color: var(--muted); }
.auth-tabs button[aria-selected="true"] { color: var(--primary); background: var(--surface); box-shadow: 0 1px 5px var(--shadow-color); font-weight: 600; }
.auth-eyebrow { font-size: 9px; letter-spacing: 1.5px; margin-bottom: 12px; }
.auth-card h2 { font-size: 29px; letter-spacing: -.8px; margin-bottom: 8px; }
.auth-card #auth-description { margin-bottom: 26px; font-size: 13px; }
.field { margin: 0 0 19px; }
.field label { display: block; margin-bottom: 7px; font-size: 12px; font-weight: 600; }
.field input, .field select { width: 100%; min-width: 0; height: 46px; padding: 11px 13px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); background: var(--surface); transition: border-color .15s, box-shadow .15s; font: inherit; }
.field input::placeholder { color: var(--muted); font-size: 13px; }
.field input:focus, .field select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--focus-halo); outline: 0; }
.field input[aria-invalid="true"] { border-color: var(--danger); }
.field-hint { font-size: 11px; color: var(--muted); margin-top: 7px; line-height: 1.6; }
.optional { font-weight: 400; color: var(--muted); margin-left: 5px; font-size: 11px; }
.input-with-action { position: relative; }
.input-with-action input { padding-right: 47px; }
.input-with-action .icon-button { position: absolute; right: 4px; top: 4px; }
.auth-submit { width: 100%; margin-top: 6px; height: 46px; justify-content: space-between; }
.auth-server { display: flex; justify-content: center; align-items: center; gap: 7px; margin-top: 30px; color: var(--muted); font-size: 11px; overflow-wrap: anywhere; }
.auth-server .status-dot { background: var(--success); width: 5px; height: 5px; }
.setup-received { margin: -1px 0 18px; padding: 11px 13px; background: var(--primary-soft); border-radius: 8px; font-size: 11px; }
.setup-received > span { display: flex; align-items: center; gap: 6px; }
.setup-received .icon { width: 15px; height: 15px; }
.setup-received .text-button { min-height: 28px; font-size: 11px; margin-left: 21px; }
.registration-note { color: var(--muted); background: var(--canvas); padding: 16px; border-radius: 8px; line-height: 1.8; }
.notice, .error-box { padding: 12px 14px; border-radius: 9px; margin-bottom: 18px; font-size: 12px; line-height: 1.65; overflow-wrap: anywhere; }
.notice { color: var(--primary); background: var(--primary-soft); border: 1px solid var(--line); }
.error-box { background: var(--danger-soft); color: var(--danger); border: 1px solid var(--danger-line); }
.data-error { display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.data-error .text-button { color: var(--danger); flex-shrink: 0; }

/* Application shell */
.app-layout { display: grid; grid-template-columns: 252px minmax(0, 1fr); min-height: 100svh; }
.sidebar { display: flex; flex-direction: column; position: sticky; top: 0; height: 100svh; padding: 32px 18px 0; background: var(--sidebar); border-right: 1px solid var(--line); overflow-y: auto; }
.sidebar > .brand { margin-left: 14px; }
.sidebar-caption { margin: 44px 14px 14px; color: var(--muted); font-size: 9px; letter-spacing: 1.4px; font-weight: 600; }
.navigation { display: flex; flex-direction: column; gap: 5px; }
.nav-item { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 44px; padding: 11px 14px; color: var(--muted); background: none; border: 1px solid transparent; border-radius: 9px; text-align: left; font-size: 13px; }
.nav-item:hover { background: var(--hover); color: var(--primary); }
.nav-item.active { background: var(--primary-soft); color: var(--primary); font-weight: 600; }
.nav-item .icon { width: 18px; height: 18px; }
.nav-count { margin-left: auto; font-size: 10px; font-variant-numeric: tabular-nums; font-weight: 500; color: var(--muted); }
.nav-item.active .nav-count { color: var(--primary); }
.nav-divider { height: 1px; background: var(--line); margin: 18px 12px; }
.sidebar-bottom { margin-top: auto; padding-top: 48px; }
.server-card { display: flex; align-items: center; gap: 9px; margin: 0 6px; padding: 13px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--canvas); }
.server-card > div { min-width: 0; }
.server-card strong { display: block; font-size: 11px; font-weight: 600; }
.server-card .small { display: block; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10px; margin-top: 2px; }
.server-card-icon { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 7px; color: var(--primary); background: var(--primary-soft); }
.server-card-icon .icon { width: 16px; height: 16px; }
.server-card > .status-dot { margin-left: auto; width: 5px; height: 5px; }
.sidebar-bottom > .next-step { margin: 13px 16px 27px; font-size: 10px; }
.sidebar-profile { display: flex; align-items: center; width: 100%; padding: 20px 9px; gap: 10px; background: none; border: 0; border-top: 1px solid var(--line); text-align: left; }
.sidebar-profile:hover .profile-text strong { color: var(--primary); text-decoration: underline; }
.avatar { display: grid; place-items: center; width: 34px; height: 34px; flex-shrink: 0; border-radius: 50%; background: var(--primary-soft); color: var(--primary); font-size: 13px; font-weight: 600; }
.profile-text { display: flex; flex-direction: column; min-width: 0; gap: 2px; }
.profile-text strong { font-size: 12px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.profile-text > span { color: var(--muted); font-size: 10px; }
.sidebar-profile > .icon { width: 15px; height: 15px; margin-left: auto; color: var(--muted); }
.workspace { min-width: 0; }
.topbar { height: 76px; padding: 0 42px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); }
.service-label { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 11px; }
.service-label .icon { width: 18px; height: 18px; color: var(--muted); }
.topbar-right { display: flex; gap: 20px; align-items: center; }
.connection-status { display: flex; align-items: center; gap: 7px; font-size: 10px; color: var(--muted); }
.topbar-right > .icon-button { width: 32px; height: 32px; border: 1px solid var(--line); background: var(--canvas); }
.topbar-right > .icon-button .icon { width: 15px; height: 15px; }
.topbar-right > .icon-button[aria-busy="true"] .icon { animation: spin 1.3s linear infinite; }
main { max-width: 1510px; margin: 0 auto; padding: 37px 42px 22px; outline: none; }
#page-action { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 29px; }
.page-heading .eyebrow { margin-bottom: 9px; font-size: 9px; letter-spacing: 1.4px; }
.page-heading h1 { font-size: 30px; }
.page-heading .muted { margin-top: 9px; font-size: 12px; }
.page-date { color: var(--muted); font-size: 11px; text-transform: capitalize; }
.workspace-footer { display: flex; justify-content: space-between; gap: 20px; margin-top: 31px; padding-top: 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: 10px; }
.footer-dot { margin: 0 5px; }

/* Overview */
.welcome-card { display: flex; position: relative; overflow: hidden; justify-content: space-between; align-items: center; min-height: 234px; padding: 32px 35px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--hero-gradient); }
.welcome-copy { z-index: 1; max-width: 460px; }
.welcome-greeting { margin-bottom: 13px; font-size: 11px; color: var(--muted); overflow-wrap: anywhere; }
.welcome-copy h2 { font-size: 34px; letter-spacing: -1.15px; font-weight: 550; line-height: 1.15; }
.welcome-copy > p:last-child { max-width: 370px; margin-top: 17px; color: var(--muted); font-size: 12px; line-height: 1.8; }
.welcome-art { position: relative; width: 238px; height: 166px; margin-right: 12px; color: var(--primary); flex-shrink: 0; }
.stats-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 17px; margin: 22px 0 29px; }
.stat-card { display: block; position: relative; padding: 21px 23px 19px; text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; transition: border-color .2s, transform .2s; }
.stat-card:hover { border-color: var(--line); transform: translateY(-2px); }
.stat-top { display: flex; align-items: center; justify-content: space-between; gap: 9px; color: var(--muted); font-size: 12px; }
.stat-icon { display: grid; place-items: center; width: 33px; height: 33px; border-radius: 9px; background: var(--primary-soft); color: var(--primary); }
.stat-icon .icon { width: 17px; height: 17px; }
.stat-card.history .stat-icon { color: var(--warning); background: var(--warning-soft); }
.stat-card.passwords .stat-icon { color: var(--muted); background: var(--success-soft); }
.stat-value { display: block; margin-top: 5px; font-size: 35px; letter-spacing: -1px; font-weight: 500; line-height: 1.5; font-variant-numeric: tabular-nums; }
.stat-bottom { display: flex; align-items: center; justify-content: space-between; font-size: 10px; color: var(--muted); }
.stat-bottom .icon { width: 15px; height: 15px; color: var(--muted); }
.overview-bottom { display: grid; grid-template-columns: minmax(0, 1fr) 252px; gap: 21px; align-items: start; }
.panel { border: 1px solid var(--line); border-radius: 13px; background: var(--surface); overflow: hidden; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 21px 23px 18px; }
.panel-heading h2 { font-size: 15px; letter-spacing: -.2px; }
.panel-heading p { margin-top: 5px; color: var(--muted); font-size: 10px; }
.section-label { font-size: 10px; color: var(--muted); }
.recent-item { display: flex; align-items: center; gap: 12px; padding: 14px 23px; border-top: 1px solid var(--line); }
.recent-item .item-symbol { width: 33px; height: 33px; border-radius: 9px; }
.recent-item .item-symbol .icon { width: 16px; height: 16px; }
.recent-details { min-width: 0; flex: 1; }
.recent-title { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; color: var(--ink); font-weight: 500; text-decoration: none; }
a.recent-title:hover { text-decoration: underline; text-underline-offset: 3px; }
.recent-meta { display: flex; gap: 6px; margin-top: 3px; color: var(--muted); font-size: 10px; }
.recent-meta > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recent-time { color: var(--muted); font-size: 10px; white-space: nowrap; }
.info-panel { padding: 22px; }
.info-panel > .stat-icon { width: 36px; height: 36px; margin-bottom: 14px; }
.info-panel h3 { font-size: 14px; margin-bottom: 10px; }
.info-panel p { font-size: 11px; color: var(--muted); line-height: 1.8; }
.info-panel .text-button { margin-top: 13px; font-size: 11px; }
.info-panel-bottom { margin-top: 19px; padding-top: 16px; border-top: 1px solid var(--line); display: flex; align-items: center; gap: 7px; font-size: 10px; color: var(--muted); }

/* Collections and empty states */
.collection-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.search-field { position: relative; max-width: 370px; width: 100%; }
.search-field > .icon { position: absolute; top: 12px; left: 12px; width: 17px; height: 17px; color: var(--muted); }
.search-field input { width: 100%; height: 42px; padding: 10px 36px 10px 39px; border: 1px solid var(--line); border-radius: 8px; background: var(--canvas); color: var(--ink); font-size: 12px; }
.search-field input::placeholder { color: var(--muted); }
.result-count { color: var(--muted); font-size: 11px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.table-scroll { overflow: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; }
thead { background: var(--canvas); }
th { font-size: 9px; font-weight: 600; letter-spacing: .8px; text-transform: uppercase; color: var(--muted); padding: 13px 21px; white-space: nowrap; }
td { padding: 16px 21px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
tbody tr:hover { background: var(--hover); }
.primary-cell { display: flex; gap: 12px; align-items: center; min-width: 0; }
.item-symbol { display: grid; place-items: center; width: 37px; height: 37px; flex-shrink: 0; background: var(--primary-soft); border: 1px solid var(--line); border-radius: 10px; color: var(--muted); }
.primary-cell > div { min-width: 0; }
.item-title { display: block; max-width: 340px; color: var(--ink); font-weight: 550; font-size: 12px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; text-decoration: none; }
a.item-title:hover { color: var(--primary); text-decoration: underline; text-underline-offset: 4px; }
.item-url { display: block; margin-top: 4px; max-width: 340px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: var(--muted); font-size: 10px; }
.cell-date { white-space: nowrap; font-size: 11px; font-variant-numeric: tabular-nums; }
.cell-username { max-width: 170px; overflow-wrap: anywhere; }
.cell-password { min-width: 120px; max-width: 220px; }
.password-value { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 12px; overflow-wrap: anywhere; color: var(--ink); }
.password-value.masked { letter-spacing: 2px; font-size: 13px; user-select: none; }
.cell-actions { width: 1%; white-space: nowrap; padding-left: 8px; padding-right: 14px; }
.row-actions { display: flex; gap: 2px; justify-content: flex-end; }
.row-actions .icon-button .icon { width: 16px; height: 16px; }
.table-footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; border-top: 1px solid var(--line); padding: 12px 21px; color: var(--muted); font-size: 10px; }
.pagination { display: flex; gap: 6px; }
.pagination button { width: 32px; height: 32px; border: 1px solid var(--line); background: transparent; border-radius: 7px; }
.pagination .icon { width: 15px; height: 15px; }
.previous .icon { transform: rotate(180deg); }
.empty-state { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 56px 28px; }
.empty-state .empty-icon { display: grid; place-items: center; width: 57px; height: 57px; margin-bottom: 20px; background: var(--primary-soft); border: 1px solid var(--line); border-radius: 17px; color: var(--muted); }
.empty-state .empty-icon .icon { width: 24px; height: 24px; stroke-width: 1.4; }
.empty-state h3 { font-size: 15px; font-weight: 550; }
.empty-state p { max-width: 360px; margin-top: 9px; font-size: 12px; line-height: 1.8; color: var(--muted); }
.empty-state .button { margin-top: 22px; }
.compact-empty { padding: 36px 24px 37px; }
.compact-empty .empty-icon { width: 42px; height: 42px; border-radius: 13px; margin-bottom: 13px; }
.compact-empty .empty-icon .icon { width: 20px; height: 20px; }
.compact-empty h3 { font-size: 13px; }
.compact-empty p { font-size: 11px; max-width: 280px; }
.compact-empty .text-button { margin-top: 11px; font-size: 11px; }
.loading-state { min-height: 218px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; color: var(--muted); font-size: 12px; }
.collection-note { display: flex; align-items: flex-start; gap: 8px; margin-top: 17px; color: var(--muted); font-size: 11px; line-height: 1.7; }
.collection-note .icon { width: 15px; height: 15px; margin-top: 2px; }

/* Devices and account */
.device-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.device-card { padding: 24px; }
.device-card-top { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 23px; }
.device-card-top .item-symbol { width: 44px; height: 44px; }
.device-card-top > div { min-width: 0; }
.device-card h2 { font-size: 15px; letter-spacing: 0; overflow-wrap: anywhere; }
.device-card-top p { color: var(--muted); font-size: 11px; margin-top: 4px; }
.badge { display: inline-block; padding: 3px 8px; border-radius: 5px; background: var(--primary-soft); font-size: 9px; color: var(--primary); font-weight: 550; white-space: nowrap; }
.device-card .badge { margin-top: 8px; }
.device-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 0 0 23px; }
.device-meta dt { font-size: 10px; color: var(--muted); margin-bottom: 5px; }
.device-meta dd { margin: 0; font-size: 11px; color: var(--ink); }
.device-card-bottom { display: flex; justify-content: flex-end; padding-top: 16px; border-top: 1px solid var(--line); }
.device-card-bottom .button { min-height: 38px; font-size: 11px; }
.account-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(230px, .8fr); gap: 22px; }
.account-profile { display: flex; align-items: center; gap: 17px; padding: 28px; border-bottom: 1px solid var(--line); }
.account-profile .avatar { width: 54px; height: 54px; font-size: 21px; border-radius: 18px; }
.account-profile > div { min-width: 0; }
.account-profile h2 { font-size: 20px; overflow-wrap: anywhere; }
.account-profile p { margin-top: 3px; color: var(--muted); font-size: 12px; }
.account-details { margin: 0; padding: 6px 28px 10px; }
.account-details > div { padding: 19px 0; border-bottom: 1px solid var(--line); }
.account-details > div:last-child { border: 0; }
.account-details dt { font-size: 10px; color: var(--muted); margin-bottom: 7px; }
.account-details dd { margin: 0; font-size: 13px; color: var(--ink); overflow-wrap: anywhere; }
.logout-panel { padding: 28px; }
.logout-panel > .icon { color: var(--muted); margin-bottom: 17px; }
.logout-panel h2 { font-size: 16px; }
.logout-panel p { font-size: 12px; color: var(--muted); line-height: 1.8; margin: 10px 0 21px; }
.account-storage { margin-top: 20px; }
.invitations-panel { margin-top: 22px; }
.invitations-panel .panel-heading { flex-wrap: wrap; }
.invitations-panel .panel-heading > div { flex: 1; min-width: 220px; }
.invitations-panel .panel-heading p { max-width: 480px; font-size: 12px; }
.invitations-panel .error-box { margin: 0 22px 18px; }
.invitation-result { margin: 0 22px 22px; padding: 20px; border: 1px solid var(--line); border-radius: 14px; background: var(--canvas); }
.invitation-result input { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 12px; }
.invitation-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.invitation-empty { padding: 0 23px 24px; font-size: 12px; }
.invitation-list { list-style: none; margin: 0; padding: 0; }
.invitation-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 16px 22px; border-top: 1px solid var(--line); }
.invitation-row > div { flex: 1; min-width: 180px; }
.invitation-row strong { font-size: 12px; }
.invitation-row .button { min-height: 38px; font-size: 12px; }
#return-to-account { margin: -10px 0 18px; }

/* Modals and transient feedback */
dialog { width: min(480px, calc(100% - 32px)); max-height: calc(100svh - 48px); padding: 28px; border: 1px solid var(--line); border-radius: 17px; background: var(--surface); color: var(--ink); box-shadow: 0 24px 100px var(--shadow-color); overflow-y: auto; }
dialog::backdrop { background: var(--backdrop); backdrop-filter: blur(3px); }
.dialog-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 11px; }
.dialog-heading .eyebrow { font-size: 8px; letter-spacing: 1.4px; margin-bottom: 7px; }
.dialog-heading h2 { font-size: 23px; }
dialog > .muted { font-size: 12px; line-height: 1.8; margin-bottom: 23px; }
.dialog-footer { display: flex; justify-content: flex-end; gap: 10px; padding-top: 20px; border-top: 1px solid var(--line); margin-top: 23px; }
.dialog-footer .button { min-width: 101px; }
.confirm-dialog { width: min(430px, calc(100% - 32px)); padding: 29px; }
.confirm-icon { display: grid; place-items: center; width: 44px; height: 44px; margin-bottom: 18px; border-radius: 12px; background: var(--danger-soft); color: var(--danger); }
.confirm-dialog h2 { margin-bottom: 12px; }
.confirm-dialog > .muted { overflow-wrap: anywhere; }
.conflict-reload { font-size: 12px; margin-top: -5px; }
.toast { position: fixed; bottom: 25px; left: calc(50% + 100px); transform: translateX(-50%); z-index: 50; max-width: min(480px, calc(100% - 32px)); padding: 13px 20px; color: var(--on-toast); background: var(--primary-strong); border: 1px solid var(--primary-strong); border-radius: 10px; box-shadow: 0 8px 30px var(--shadow-color); font-size: 12px; text-align: center; }
.toast.error { background: var(--danger-strong); border-color: var(--danger-strong); }

@media (min-width: 1550px) { .app-layout { grid-template-columns: 252px minmax(0, 1fr); } main { padding: 45px 60px 26px; } .topbar { padding: 0 60px; } .welcome-card { min-height: 260px; } }
@media (max-width: 1180px) {
  .app-layout { grid-template-columns: 236px minmax(0, 1fr); }
  .sidebar { padding-left: 12px; padding-right: 12px; }
  .topbar { padding-left: 28px; padding-right: 28px; }
  main { padding: 30px 28px 20px; }
  .overview-bottom { grid-template-columns: minmax(0, 1fr) 222px; gap: 17px; }
  .welcome-art { width: 200px; margin-right: 0; }
  .welcome-card { padding: 28px; }
  .welcome-copy h2 { font-size: 30px; }
  .stat-card { padding: 18px; }
  .stats-grid { gap: 12px; }
  .item-title, .item-url { max-width: 240px; }
  th, td { padding-left: 16px; padding-right: 16px; }
  .passwords-table { min-width: 730px; }
  .auth-story { padding-left: 36px; padding-right: 36px; }
}
@media (max-width: 960px) {
  .overview-bottom { grid-template-columns: 1fr; }
  .info-panel { display: grid; grid-template-columns: 40px 1fr; column-gap: 16px; }
  .info-panel > .stat-icon { grid-column: 1; grid-row: 1 / 4; }
  .info-panel h3, .info-panel p, .info-panel .text-button { grid-column: 2; }
  .info-panel h3 { margin-bottom: 4px; }
  .info-panel .text-button { margin-top: 4px; width: fit-content; }
  .info-panel-bottom { grid-column: 1 / -1; margin-top: 13px; padding-top: 12px; }
  .welcome-art { width: 155px; margin-right: -15px; }
  .welcome-copy h2 { font-size: 28px; }
  .account-grid { grid-template-columns: 1fr; }
  .auth-panel { padding: 40px 32px; }
  .auth-layout { grid-template-columns: minmax(300px, .9fr) minmax(370px, 1fr); }
  .auth-story h1 { font-size: 44px; }
  .auth-art { transform: scale(.85); margin-left: -25px; }
}
@media (max-width: 780px) {
  .app-layout { display: block; }
  .sidebar { position: relative; height: auto; padding: 19px 20px 0; border-right: 0; border-bottom: 1px solid var(--line); overflow: visible; }
  .sidebar > .brand { margin-left: 2px; font-size: 26px; }
  .brand-icon { width: 33px; height: 33px; }
  .sidebar-caption, .sidebar-bottom, .nav-divider { display: none; }
  .navigation { flex-direction: row; margin: 16px -20px 0; padding: 0 16px 10px; overflow-x: auto; gap: 4px; scrollbar-width: thin; }
  .nav-item { width: auto; min-height: 44px; padding: 10px 12px; gap: 7px; flex-shrink: 0; font-size: 12px; }
  .nav-count { display: none; }
  .topbar { height: 57px; padding: 0 23px; }
  .topbar-right { gap: 11px; }
  main { padding: 29px 23px 20px; }
  .welcome-art { width: 205px; }
  .page-heading h1 { font-size: 28px; }
  .toast { left: 50%; }
  .auth-layout { display: block; }
  .auth-story { padding: 24px 28px; border-right: 0; border-bottom: 1px solid var(--line); }
  .auth-story-content { max-width: none; padding: 0; margin: 0; }
  .auth-story-content > .eyebrow, .auth-art, .auth-note { display: none; }
  .auth-story h1 { font-size: 25px; letter-spacing: -.8px; margin-top: 22px; }
  .auth-story h1 br { display: none; }
  .auth-story > .next-step { margin-top: 12px; }
  .auth-panel { padding: 31px 26px 42px; }
  .auth-card { max-width: 440px; }
  .auth-tabs { margin-bottom: 28px; }
  .auth-card h2 { font-size: 26px; }
  .icon-button { width: 44px; height: 44px; }
  .input-with-action .icon-button { top: 1px; right: 2px; }
  .topbar-right > .icon-button { width: 40px; height: 40px; }
  .text-button { min-height: 44px; }
  .field input, .search-field input { font-size: 16px; }
}
@media (max-width: 580px) {
  main { padding: 25px 17px 20px; }
  .topbar { padding: 0 17px; }
  .service-label { font-size: 10px; gap: 6px; }
  .connection-status { font-size: 9px; gap: 5px; }
  .page-heading { flex-wrap: wrap; align-items: flex-start; gap: 14px; margin-bottom: 23px; }
  .page-heading h1 { font-size: 27px; }
  .page-heading .muted { font-size: 11px; max-width: 245px; }
  .page-heading .eyebrow { font-size: 8px; }
  .page-heading #page-action > .button { padding: 10px 12px; font-size: 11px; white-space: nowrap; margin-top: 0; }
  .page-heading #page-action > .button .icon { width: 16px; height: 16px; }
  .page-date { display: none; }
  .welcome-card { min-height: 225px; padding: 25px; align-items: flex-start; }
  .welcome-copy { max-width: 80%; }
  .welcome-copy h2 { font-size: 30px; }
  .welcome-copy > p:last-child { font-size: 11px; max-width: 225px; }
  .welcome-greeting { font-size: 10px; }
  .welcome-art { position: absolute; right: -73px; top: 35px; opacity: .45; width: 200px; height: 200px; }
  .stats-grid { gap: 8px; margin: 15px 0 22px; }
  .stat-card { padding: 13px 11px; border-radius: 10px; }
  .stat-top { flex-direction: column-reverse; align-items: flex-start; gap: 9px; font-size: 10px; }
  .stat-icon { width: 28px; height: 28px; border-radius: 8px; }
  .stat-icon .icon { width: 15px; height: 15px; }
  .stat-value { font-size: 29px; margin-top: 4px; }
  .stat-bottom { font-size: 8px; align-items: flex-end; gap: 4px; }
  .stat-bottom .icon { width: 12px; height: 12px; }
  .panel-heading { padding: 19px 17px 17px; }
  .panel-heading h2 { font-size: 14px; }
  .recent-item { padding: 14px 17px; gap: 10px; }
  .recent-time { font-size: 9px; }
  .recent-title { font-size: 11px; }
  .recent-meta { font-size: 9px; }
  .workspace-footer { flex-direction: column; gap: 6px; font-size: 9px; margin-top: 24px; }
  .collection-toolbar { padding: 14px; gap: 10px; flex-wrap: wrap; }
  .search-field { max-width: none; }
  .result-count { font-size: 10px; }
  .empty-state { padding: 40px 24px; }
  .empty-state h3 { font-size: 14px; }
  .empty-state p { font-size: 11px; }
  .table-scroll { overflow: visible; }
  .passwords-table { min-width: 0; }
  table, tbody { display: block; }
  thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
  tbody tr { display: flex; flex-wrap: wrap; padding: 16px; border-top: 1px solid var(--line); gap: 10px; }
  tbody tr:first-child { border-top: 0; }
  td { display: block; padding: 0; border: 0; }
  td.cell-primary { flex-basis: 100%; }
  .primary-cell { gap: 10px; }
  .primary-cell > div { max-width: calc(100% - 50px); }
  .item-title, .item-url { max-width: 100%; }
  .item-title { font-size: 12px; }
  td[data-label]::before { display: block; content: attr(data-label); color: var(--muted); font-size: 9px; margin-bottom: 4px; }
  .cell-username { flex-basis: 45%; max-width: none; }
  .cell-password { flex-basis: 48%; max-width: none; min-width: 0; }
  .cell-date { align-self: center; font-size: 10px; }
  .cell-actions { margin-left: auto; width: auto; }
  .row-actions { gap: 4px; }
  .passwords-table .cell-actions { flex-basis: 100%; }
  .row-actions .icon-button { border: 1px solid var(--line); width: 44px; height: 44px; }
  .table-footer { padding: 12px 16px; }
  .pagination button { width: 44px; height: 44px; }
  .device-grid { grid-template-columns: 1fr; gap: 14px; }
  .device-card { padding: 21px; }
  .device-card-bottom .button { min-height: 44px; }
  .device-meta { gap: 12px; }
  .account-profile, .logout-panel { padding: 22px; }
  .account-details { padding-left: 22px; padding-right: 22px; }
  dialog, .confirm-dialog { padding: 23px; max-height: calc(100svh - 32px); }
  .dialog-heading h2 { font-size: 21px; }
  .dialog-footer .button { flex: 1; min-width: 0; }
  .data-error { align-items: flex-start; flex-direction: column; gap: 0; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }

/* KCBrowser identity and appearance controls. */
.brand-icon { object-fit: contain; flex-shrink: 0; }
.brand-name, .brand { white-space: nowrap; }
.auth-story h1 strong { color: var(--primary); font-weight: inherit; }
.auth-panel { position: relative; }
.auth-theme { position: absolute; top: 22px; right: 24px; }
.theme-toggle { display: inline-grid; place-items: center; flex-shrink: 0; width: 44px; height: 44px; padding: 10px; color: var(--warning); background: color-mix(in srgb, var(--primary) 6%, var(--surface)); border: 1px solid var(--line); border-radius: 14px; transition: background .15s, border-color .15s; }
.theme-toggle:hover { background: var(--primary-soft); border-color: var(--primary); }
.theme-toggle .icon { width: 20px; height: 20px; stroke-width: 1.7; }
.theme-toggle .theme-moon { display: none; }
:root[data-theme="dark"] .theme-toggle { color: var(--primary-hover); }
:root[data-theme="dark"] .theme-toggle .theme-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .theme-moon { display: block; }
.auth-art { position: relative; width: 310px; height: 232px; margin: 24px auto 25px; }
.sync-line { position: absolute; height: 1px; background: var(--line); width: 110px; left: 90px; top: 120px; transform-origin: 50% 50%; }
.sync-line.one { transform: rotate(-24deg); width: 220px; left: 45px; }
.sync-line.two { transform: rotate(70deg); }
.auth-art-logo { position: absolute; width: 128px; height: 128px; left: 93px; top: 53px;  }
.sync-tile { display: grid; place-items: center; position: absolute; width: 45px; height: 45px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); color: var(--primary); box-shadow: 0 8px 20px var(--shadow-color); }
.sync-tile svg { width: 21px; height: 21px; }
.sync-tile.one { left: 17px; top: 112px; transform: rotate(-8deg); }
.sync-tile.two { right: 8px; top: 58px; transform: rotate(9deg); color: var(--ink); background: var(--accent); border-color: var(--accent); }
.sync-tile.three { left: 179px; bottom: 0; transform: rotate(6deg); }
:root[data-theme="dark"] .sync-tile.two { color: #101217; }
.welcome-art { display: grid; place-items: center; }
.welcome-art img { width: 160px; height: 160px; object-fit: contain;  }
.auth-story > .next-step { color: var(--muted); }
.sidebar .brand { font-size: 25px; gap: 8px; }
.sidebar .brand-icon { width: 35px; height: 35px; }
@media (min-width: 781px) { .auth-card { margin-top: 35px; } }
@media (max-width: 960px) and (min-width: 781px) { .auth-art { transform: scale(.85); margin-left: -20px; } }
@media (max-width: 780px) {
  .auth-story { padding-bottom: 23px; }
  .auth-panel { padding-top: 79px; }
  .auth-theme { top: 18px; right: 26px; }
  .auth-art { display: none; }
}
@media (max-width: 580px) {
  .topbar { height: auto; min-height: 62px; flex-wrap: wrap; padding-top: 9px; padding-bottom: 9px; }
  .topbar-right { gap: 9px; margin-left: auto; }
  .welcome-art img { width: 140px; height: 140px; }
  .sidebar .brand { font-size: 26px; }
}

.device-tabs{display:flex;gap:6px;overflow-x:auto;scrollbar-width:none;padding:16px 20px 0;overscroll-behavior-x:contain}.device-tabs::-webkit-scrollbar{display:none}.device-tab{flex:0 0 auto;max-width:240px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;border:1px solid var(--line);border-radius:9px;padding:8px 12px;background:transparent;color:var(--muted);font:inherit;cursor:pointer}.device-tab[aria-selected="true"]{background:var(--primary-soft);color:var(--primary);border-color:var(--primary)}.device-tab:focus-visible{outline:2px solid var(--primary);outline-offset:2px}
