:root {
    --primary: #275dde;
    --primary-hover: #184dc8;
    --primary-soft: #e9efff;
    --secondary: #19b7a5;
    --accent-violet: #7c5ce7;
    --accent-orange: #e8892e;
    --accent-rose: #e54b78;
    --danger: #cf3f4f;
    --danger-soft: #fff0f2;
    --warning: #b56b17;
    --warning-soft: #fff7e8;
    --success: #159c6b;
    --success-soft: #e8f8f2;
    --bg: #f6f8fc;
    --surface: #ffffff;
    --surface-2: #eff3f9;
    --surface-3: #e5ebf5;
    --text: #0b1736;
    --text-soft: #33415f;
    --muted: #6b7892;
    --border: #dce3ef;
    --border-strong: #c7d1e2;
    --shadow-sm: 0 1px 3px rgba(11, 23, 54, .07), 0 6px 18px rgba(11, 23, 54, .035);
    --shadow-md: 0 18px 50px rgba(11, 23, 54, .12);
    --radius-sm: 10px;
    --radius: 16px;
    --radius-lg: 24px;
    --sidebar-width: 246px;
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color-scheme: light;
}

:root[data-theme="dark"] {
    --primary: #79a0ff;
    --primary-hover: #94b3ff;
    --primary-soft: #172d61;
    --secondary: #54d6c7;
    --danger: #ff7e8c;
    --danger-soft: #421d29;
    --warning: #ffc16b;
    --warning-soft: #3b2a16;
    --success: #58d8a3;
    --success-soft: #123b31;
    --bg: #081225;
    --surface: #0f1b32;
    --surface-2: #15233e;
    --surface-3: #1c2d4b;
    --text: #f5f8ff;
    --text-soft: #d3dced;
    --muted: #9aa8bf;
    --border: #263653;
    --border-strong: #354869;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, .22), 0 10px 24px rgba(0, 0, 0, .12);
    --shadow-md: 0 20px 55px rgba(0, 0, 0, .42);
    color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--bg); }
body { margin: 0; min-width: 320px; min-height: 100vh; background: var(--bg); color: var(--text); font-size: 15px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
button, input, textarea, select { font: inherit; color: inherit; }
button, summary { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: none; }
img { display: block; max-width: 100%; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3, strong { letter-spacing: -.018em; }
h1 { font-size: clamp(2rem, 3.2vw, 3rem); line-height: 1.08; margin-bottom: .6rem; }
h2 { font-size: 1.45rem; line-height: 1.2; }
h3 { font-size: 1rem; }
small { color: var(--muted); }
fieldset { border: 0; padding: 0; margin: 0; }
legend { margin-bottom: .7rem; font-weight: 700; }
pre { white-space: pre-wrap; word-break: break-word; }

*:focus-visible { outline: 3px solid color-mix(in srgb, var(--primary) 34%, transparent); outline-offset: 2px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.muted { color: var(--muted); }
.danger { color: var(--danger) !important; }
.icon { width: 20px; height: 20px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.button { display: inline-flex; min-height: 42px; padding: .62rem 1rem; align-items: center; justify-content: center; gap: .48rem; border: 1px solid transparent; border-radius: 11px; font-weight: 700; line-height: 1; transition: transform .16s ease, background .16s ease, border-color .16s ease; }
.button:hover { transform: translateY(-1px); }
.button:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.button--primary { background: var(--primary); color: #fff; box-shadow: 0 7px 17px color-mix(in srgb, var(--primary) 23%, transparent); }
:root[data-theme="dark"] .button--primary { color: #071127; }
.button--primary:hover { background: var(--primary-hover); }
.button--soft { background: var(--surface); border-color: var(--border); color: var(--text); }
.button--soft:hover { border-color: var(--border-strong); background: var(--surface-2); }
.button--ghost { background: transparent; color: var(--text); }
.button--white { background: #fff; color: #0b1736; }
.button--danger { background: var(--danger-soft); color: var(--danger); border-color: color-mix(in srgb, var(--danger) 24%, transparent); }
.button--large { min-height: 50px; padding-inline: 1.35rem; border-radius: 13px; }
.button--block { width: 100%; }
.button-row { display: flex; align-items: center; flex-wrap: wrap; gap: .7rem; }
.text-button { border: 0; background: transparent; color: var(--primary); padding: .35rem 0; font-weight: 700; }
.icon-button { width: 42px; height: 42px; padding: 0; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; border: 1px solid var(--border); border-radius: 11px; background: var(--surface); color: var(--text-soft); }
.icon-button:hover, .icon-button.active { background: var(--primary-soft); color: var(--primary); border-color: color-mix(in srgb, var(--primary) 28%, var(--border)); }
.icon-button--small { width: 32px; height: 32px; border-radius: 8px; }
.icon-button--small .icon { width: 16px; height: 16px; }

input:not([type="checkbox"]):not([type="radio"]):not([type="color"]), textarea, select { width: 100%; min-height: 45px; border: 1px solid var(--border-strong); border-radius: 10px; background: var(--surface); padding: .7rem .82rem; outline: none; transition: border-color .16s, box-shadow .16s; }
textarea { resize: vertical; }
input:focus, textarea:focus, select:focus { border-color: var(--primary) !important; box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 13%, transparent); }
input:disabled { background: var(--surface-2); color: var(--muted); }
input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--primary); }
label { color: var(--text-soft); font-weight: 650; }
label > span:first-child { display: flex; justify-content: space-between; gap: .5rem; }
label > input:not([type="checkbox"]):not([type="radio"]), label > textarea, label > select { display: block; margin-top: .38rem; }
.validation-message { display: block; margin-top: .25rem; color: var(--danger); font-size: .82rem; }
.invalid:not([type="checkbox"]) { border-color: var(--danger) !important; }

.eyebrow { display: block; color: var(--primary); font-size: .73rem; font-weight: 850; letter-spacing: .11em; text-transform: uppercase; margin-bottom: .48rem; }
.avatar { width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--primary-soft); color: var(--primary); font-weight: 800; text-transform: uppercase; }
.avatar--large { width: 58px; height: 58px; font-size: 1.25rem; }
.tag-row { display: flex; align-items: center; gap: .35rem; flex-wrap: wrap; min-height: 22px; }
.tag { display: inline-flex; align-items: center; min-height: 23px; gap: .3rem; padding: .18rem .48rem; border-radius: 999px; background: color-mix(in srgb, var(--tag-color, var(--secondary)) 13%, var(--surface)); color: color-mix(in srgb, var(--tag-color, var(--secondary)) 78%, var(--text)); font-size: .72rem; font-weight: 750; }
.chip { min-height: 35px; display: inline-flex; align-items: center; gap: .4rem; padding: .42rem .7rem; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--text-soft); font-weight: 700; }
.chip.active, .chip:hover { color: var(--primary); border-color: color-mix(in srgb, var(--primary) 35%, var(--border)); background: var(--primary-soft); }
.chip .icon { width: 16px; height: 16px; }
.role-pill, .status-pill { display: inline-flex; padding: .22rem .52rem; border-radius: 999px; background: var(--surface-2); color: var(--muted); font-size: .72rem; font-weight: 800; white-space: nowrap; }
.status-pill--ok { background: var(--success-soft); color: var(--success); }
.status-pill--danger { background: var(--danger-soft); color: var(--danger); }

/* Application shell */
.app-shell { min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 40; width: var(--sidebar-width); padding: 24px 18px 18px; display: flex; flex-direction: column; background: var(--surface); border-right: 1px solid var(--border); }
.brand-link { display: inline-flex; align-items: center; }
.brand-link img { width: 176px; height: 42px; object-fit: contain; object-position: left center; }
.sidebar .brand-link { padding: 0 10px 22px; }
.sidebar__nav { display: grid; gap: 4px; }
.sidebar__nav a { min-height: 44px; display: flex; align-items: center; gap: .75rem; padding: .66rem .78rem; border-radius: 10px; color: var(--muted); font-weight: 680; }
.sidebar__nav a:hover { background: var(--surface-2); color: var(--text); }
.sidebar__nav a.active { background: var(--primary-soft); color: var(--primary); }
.sidebar__nav--secondary { margin-top: auto; padding-top: 18px; border-top: 1px solid var(--border); }
.sidebar__footer { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); }
.sidebar__footer a { display: grid; grid-template-columns: 34px 1fr; gap: .7rem; align-items: center; color: var(--text); padding: .4rem; border-radius: 10px; }
.sidebar__footer a:hover { background: var(--surface-2); }
.sidebar__footer strong, .sidebar__footer small { display: block; max-width: 145px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar__footer strong { font-size: .86rem; }.sidebar__footer small { font-size: .72rem; }
.topbar { position: fixed; z-index: 35; top: 0; right: 0; left: var(--sidebar-width); height: 72px; display: flex; align-items: center; gap: 1rem; padding: 0 clamp(20px, 3.2vw, 48px); background: color-mix(in srgb, var(--bg) 88%, transparent); border-bottom: 1px solid color-mix(in srgb, var(--border) 82%, transparent); backdrop-filter: blur(16px); }
.topbar__mark { display: none; width: 42px; height: 42px; flex: 0 0 42px; align-items: center; justify-content: center; }.topbar__mark img { width: 42px; height: 42px; }
.search-box { width: min(550px, 50vw); height: 43px; display: flex; align-items: center; gap: .65rem; padding: 0 .72rem; background: var(--surface); border: 1px solid var(--border); border-radius: 11px; }
.search-box input { min-height: unset !important; border: 0 !important; box-shadow: none !important; background: transparent !important; padding: 0 !important; }
.search-box .icon { color: var(--muted); }.search-box kbd { padding: .15rem .4rem; border: 1px solid var(--border); border-radius: 5px; background: var(--surface-2); color: var(--muted); font-size: .7rem; white-space: nowrap; }
.topbar__actions { display: flex; align-items: center; gap: .45rem; margin-left: auto; }
.connection-pill { width: 42px; height: 42px; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 42px; padding: 0; border: 1px solid color-mix(in srgb, var(--success) 20%, var(--border)); border-radius: 11px; background: var(--success-soft); color: var(--success); }
.connection-pill--offline { background: var(--warning-soft); border-color: color-mix(in srgb, var(--warning) 25%, var(--border)); color: var(--warning); }
.connection-pill--syncing { background: var(--primary-soft); border-color: color-mix(in srgb, var(--primary) 25%, var(--border)); color: var(--primary); }
.connection-pill--pending { background: var(--primary-soft); border-color: color-mix(in srgb, var(--primary) 25%, var(--border)); color: var(--primary); }
.connection-pill--unstable { background: var(--warning-soft); border-color: color-mix(in srgb, var(--warning) 25%, var(--border)); color: var(--warning); }
.connection-pill--error { background: var(--danger-soft); border-color: color-mix(in srgb, var(--danger) 30%, var(--border)); color: var(--danger); }
.connection-pill--conflict { background: color-mix(in srgb, #8b5cf6 14%, var(--surface)); border-color: color-mix(in srgb, #8b5cf6 35%, var(--border)); color: #8b5cf6; }
.connection-pill .icon { width: 20px; height: 20px; }
.connection-pill--syncing .icon { animation: spin 1.1s linear infinite; }
.app-main { min-height: 100vh; margin-left: var(--sidebar-width); padding: 104px clamp(22px, 4.4vw, 68px) 72px; }
.app-main > * { max-width: 1320px; margin-left: auto; margin-right: auto; }
.bottom-nav { display: none; }
.create-fab { position: fixed; right: 36px; bottom: 28px; z-index: 60; }
.create-fab summary { list-style: none; width: 56px; height: 56px; display: flex; align-items: center; justify-content: center; border-radius: 18px; background: var(--primary); color: #fff; box-shadow: 0 14px 30px color-mix(in srgb, var(--primary) 35%, transparent); cursor: pointer; }
.create-fab summary::-webkit-details-marker, .more-menu summary::-webkit-details-marker { display: none; }
.create-fab[open] summary .icon { transform: rotate(45deg); }.create-fab summary .icon { width: 25px; height: 25px; transition: transform .18s; }
.create-menu { position: absolute; right: 0; bottom: 66px; width: 190px; padding: 7px; background: var(--surface); border: 1px solid var(--border); border-radius: 13px; box-shadow: var(--shadow-md); }
.create-menu a { display: flex; gap: .65rem; align-items: center; padding: .7rem; border-radius: 9px; color: var(--text); font-weight: 700; }.create-menu a:hover { background: var(--surface-2); color: var(--primary); }

.page-header { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto auto; align-items: end; column-gap: 1.5rem; row-gap: .65rem; margin-bottom: 28px; }
.page-header__copy { grid-column: 1; grid-row: 1 / span 2; min-width: 0; }
.page-header h1 { margin: 0; }.page-header p { margin: .45rem 0 0; color: var(--muted); }.page-header__actions { display: flex; align-items: center; justify-content: flex-end; gap: .6rem; flex-wrap: wrap; }
.page-header__actions { grid-column: 2; grid-row: 1 / span 2; }
.page-header--installable .page-header__actions { grid-row: 2; }
.page-header__install { grid-column: 2; grid-row: 1; justify-self: end; min-height: 36px; padding: .5rem .8rem; color: var(--primary); }
.page-header__install .icon { width: 17px; height: 17px; }
.toolbar { min-height: 54px; display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 20px; }
.toolbar-search { width: min(285px, 100%); min-height: 40px; display: flex; align-items: center; gap: .5rem; padding: 0 .65rem; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
.toolbar-search input { min-height: auto !important; border: 0 !important; background: transparent !important; box-shadow: none !important; padding: 0 !important; }.toolbar-search .icon { width: 17px; color: var(--muted); }
.segmented { display: inline-flex; align-items: center; padding: 4px; background: var(--surface-2); border-radius: 10px; }
.segmented button, .segmented a { min-height: 34px; display: inline-flex; align-items: center; gap: .35rem; padding: .45rem .72rem; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font-weight: 700; }
.segmented .active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }.segmented span { padding: 0 .3rem; border-radius: 999px; background: var(--surface-3); font-size: .7rem; }
.page-tabs { margin-bottom: 24px; }.filter-row { display: flex; flex-wrap: wrap; gap: .45rem; }

.inline-banner { display: flex; align-items: center; gap: .55rem; margin-bottom: 18px; padding: .72rem .9rem; border-radius: 11px; background: var(--primary-soft); color: var(--primary); font-weight: 650; }.inline-banner .icon { width: 18px; }.inline-banner--warning { background: var(--warning-soft); color: var(--warning); }
.form-alert { margin: .5rem 0 1rem; padding: .7rem .85rem; border-radius: 10px; background: var(--primary-soft); color: var(--primary); }.form-alert--error { background: var(--danger-soft); color: var(--danger); }
.info-modal-layer { position: fixed; z-index: 9000; inset: 0; display: grid; place-items: center; padding: 20px; background: color-mix(in srgb, #020817 38%, transparent); backdrop-filter: blur(3px); }
.info-modal { width: min(430px, calc(100vw - 30px)); display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 1rem; padding: 1.15rem; border: 1px solid var(--border); border-radius: 17px; background: var(--surface); color: var(--text); box-shadow: var(--shadow-md); }
.info-modal h2 { margin: 0 0 .3rem; font-size: 1.12rem; }.info-modal p { margin: 0; color: var(--muted); }
.connection-info-icon { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 14px; background: var(--success-soft); color: var(--success); }
.connection-info-icon.connection-pill--offline { background: var(--warning-soft); color: var(--warning); }
.connection-info-icon.connection-pill--syncing { background: var(--primary-soft); color: var(--primary); }
.connection-info-icon.connection-pill--pending { background: var(--primary-soft); color: var(--primary); }
.connection-info-icon.connection-pill--unstable { background: var(--warning-soft); color: var(--warning); }
.connection-info-icon.connection-pill--error { background: var(--danger-soft); color: var(--danger); }
.connection-info-icon.connection-pill--conflict { background: color-mix(in srgb, #8b5cf6 14%, var(--surface)); color: #8b5cf6; }
.connection-info-icon .icon { width: 24px; height: 24px; }
.loading-state { min-height: 180px; display: flex; align-items: center; justify-content: center; gap: .7rem; color: var(--muted); }
.spinner { width: 22px; height: 22px; display: inline-block; border: 2px solid var(--border-strong); border-top-color: var(--primary); border-radius: 50%; animation: spin .8s linear infinite; }.spinner--small { width: 14px; height: 14px; }@keyframes spin { to { transform: rotate(360deg); } }
.empty-state { min-height: 330px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 2rem; border: 1px dashed var(--border-strong); border-radius: var(--radius-lg); background: color-mix(in srgb, var(--surface) 65%, transparent); }
.empty-state__icon { width: 68px; height: 68px; display: flex; align-items: center; justify-content: center; margin-bottom: 1rem; border-radius: 22px; background: var(--primary-soft); color: var(--primary); font-size: 2rem; }.empty-state__icon .icon { width: 30px; height: 30px; }.empty-state h1, .empty-state h2 { margin-bottom: .5rem; }.empty-state p { max-width: 460px; color: var(--muted); }.empty-state--small { min-height: 130px; padding: 1rem; }

/* Cards and dashboard */
.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 36px; }
.stat-grid > a { position: relative; min-height: 112px; display: grid; grid-template-columns: 44px 1fr; grid-template-rows: 1fr 1fr; column-gap: .75rem; align-items: end; padding: 1rem; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); }.stat-grid strong { font-size: 1.55rem; line-height: 1; }.stat-grid small { align-self: start; }.stat-icon { grid-row: 1 / 3; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; border-radius: 13px; background: var(--surface-2); color: var(--text-soft); }.stat-icon--blue { background: var(--primary-soft); color: var(--primary); }.stat-icon--teal { background: color-mix(in srgb, var(--secondary) 14%, var(--surface)); color: var(--secondary); }.stat-icon--violet { background: color-mix(in srgb, var(--accent-violet) 14%, var(--surface)); color: var(--accent-violet); }.stat-icon--orange { background: color-mix(in srgb, var(--accent-orange) 14%, var(--surface)); color: var(--accent-orange); }
.content-section { margin-top: 34px; }.section-title { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 14px; }.section-title h2 { margin: 0; }.section-title p { color: var(--muted); margin: .25rem 0 0; }.section-title > a { font-weight: 700; }
.card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }.card-grid--lists { grid-template-columns: repeat(4, minmax(0, 1fr)); }.card-grid--compact { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.content-card { position: relative; min-width: 0; min-height: 205px; display: flex; flex-direction: column; padding: 1rem; overflow: hidden; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); transition: transform .16s, box-shadow .16s, border-color .16s; }.content-card:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--primary) 25%, var(--border)); box-shadow: 0 14px 32px rgba(11, 23, 54, .09); }.content-card__link { position: absolute; inset: 0; z-index: 1; }.content-card > *:not(.content-card__link) { position: relative; z-index: 2; pointer-events: none; }.content-card header, .content-card footer { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }.content-card h3 { margin: .85rem 0 .35rem; font-size: 1.05rem; }.content-card > p { color: var(--muted); font-size: .86rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }.content-card footer { margin-top: auto; color: var(--muted); font-size: .73rem; }.content-card footer > span { min-height: 20px; display: flex; align-items: center; gap: .25rem; }.content-card footer .icon { width: 14px; height: 14px; }.card-actions { display: flex; align-items: center; gap: .3rem; color: var(--muted); }.card-actions .icon { width: 15px; height: 15px; }
.list-card { min-height: 220px; }.list-symbol { width: 42px; height: 42px; display: inline-flex; align-items: center; justify-content: center; border-radius: 13px; background: color-mix(in srgb, var(--item-color, var(--primary)) 13%, var(--surface)); color: var(--item-color, var(--primary)); }.list-card__progress { margin-top: auto; margin-bottom: .85rem; }.list-card__progress > div { height: 6px; overflow: hidden; background: var(--surface-3); border-radius: 999px; }.list-card__progress > div span { display: block; height: 100%; background: var(--item-color, var(--primary)); border-radius: inherit; }.list-card__progress small { display: block; margin-top: .35rem; font-size: .7rem; }
.check-preview { display: flex; align-items: center; gap: .6rem; margin-top: auto; margin-bottom: .7rem; color: var(--muted); font-size: .78rem; }.progress-ring { --size: 42px; width: var(--size); height: var(--size); display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; background: conic-gradient(var(--secondary) calc(var(--progress) * 1%), var(--surface-3) 0); }.progress-ring::before { content: ""; position: absolute; width: 33px; height: 33px; border-radius: 50%; background: var(--surface); }.progress-ring span { position: relative; z-index: 1; font-size: .63rem; font-weight: 800; color: var(--text); }
.welcome-empty { min-height: 310px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 2rem; text-align: center; border-radius: var(--radius-lg); background: radial-gradient(circle at 50% 10%, var(--primary-soft), transparent 55%), var(--surface); border: 1px solid var(--border); }.welcome-empty > div:first-child { position: relative; }.welcome-empty img { width: 72px; height: 72px; }.spark { position: absolute; color: var(--secondary); }.spark--one { top: -12px; right: -18px; }.spark--two { bottom: 0; left: -18px; font-size: 2rem; }.welcome-empty h2 { margin: .8rem 0 .4rem; }.welcome-empty p { color: var(--muted); max-width: 500px; }

/* Editors and details */
.editor-page--narrow { max-width: 790px !important; }.editor-header { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 1rem; margin-bottom: 22px; }.editor-header h1 { font-size: 1.6rem; margin: 0; }.editor-header .eyebrow { margin-bottom: .15rem; }.editor-header--sticky { position: sticky; top: 72px; z-index: 20; max-width: none !important; margin: -32px -30px 24px; padding: 14px 30px; background: color-mix(in srgb, var(--bg) 88%, transparent); border-bottom: 1px solid var(--border); backdrop-filter: blur(15px); }.editor-header__actions { display: flex; justify-self: end; gap: .45rem; align-items: center; min-width: 0; }.editor-header__save { white-space: nowrap; }
.settings-card { padding: clamp(18px, 2.6vw, 30px); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); }.settings-card > header { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; padding-bottom: 18px; margin-bottom: 20px; border-bottom: 1px solid var(--border); }.settings-card > header h2 { margin-bottom: .3rem; }.settings-card > header p { color: var(--muted); margin: 0; }.form-stack { display: grid; gap: 1rem; }.form-stack label small { font-weight: 500; color: var(--muted); }.form-stack > .button { justify-self: start; }
.switch-row { min-height: 56px; display: flex !important; align-items: center; justify-content: space-between; gap: 1rem; padding: .65rem 0; }.switch-row span { display: block !important; }.switch-row strong, .switch-row small { display: block; }.switch-row small { font-weight: 450; }.switch-row input { width: 42px; height: 23px; accent-color: var(--primary); }
.color-picker, .icon-picker { display: flex; flex-wrap: wrap; gap: .55rem; }.color-picker button { width: 34px; height: 34px; border: 4px solid var(--surface); border-radius: 50%; background: var(--choice); box-shadow: 0 0 0 1px var(--border); }.color-picker button.selected { box-shadow: 0 0 0 2px var(--text); }.icon-picker button { width: 42px; height: 42px; display: flex; align-items: center; justify-content: center; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }.icon-picker button.selected { color: var(--primary); background: var(--primary-soft); border-color: var(--primary); }
.note-editor { max-width: 1050px !important; }.editor-canvas { max-width: 820px; margin: 0 auto; padding: 28px clamp(18px, 5vw, 58px) 60px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }.editor-meta { display: flex; align-items: center; gap: .55rem; margin-bottom: 18px; }.editor-meta label { display: flex; align-items: center; gap: .4rem; color: var(--muted); }.editor-meta select { min-height: 35px; border: 0; padding: .25rem .4rem; background: transparent; box-shadow: none !important; }.title-input { min-height: 65px !important; padding: .2rem 0 .5rem !important; border: 0 !important; border-radius: 0 !important; box-shadow: none !important; background: transparent !important; color: var(--text) !important; font-size: clamp(1.9rem, 4vw, 2.8rem) !important; font-weight: 780; letter-spacing: -.035em; }.tag-selector { display: flex; align-items: center; flex-wrap: wrap; gap: .4rem; margin: -8px 0 16px; padding: .7rem; background: var(--surface-2); border-radius: 10px; }.tag-selector .tag { cursor: pointer; }.tag-selector input { width: 14px; height: 14px; }.tag-selector > a { margin-left: auto; font-size: .78rem; font-weight: 700; }
.block-list { display: grid; gap: 5px; }.editor-block { position: relative; display: grid; grid-template-columns: 22px 1fr 32px; gap: .5rem; align-items: start; padding: .45rem 0; border-radius: 8px; }.editor-block:hover { background: color-mix(in srgb, var(--surface-2) 55%, transparent); }.block-grip { padding-top: .65rem; color: var(--border-strong); cursor: grab; user-select: none; }.block-delete { margin-top: .3rem; opacity: 0; }.editor-block:hover .block-delete { opacity: 1; }.block-content textarea, .block-content > input { border: 0 !important; border-radius: 5px !important; box-shadow: none !important; background: transparent !important; padding: .55rem .2rem !important; line-height: 1.65; }.block-content hr { margin: 1rem 0; border: 0; border-top: 1px solid var(--border); }
.editor-checklist { display: grid; gap: .35rem; }.check-row { display: grid; grid-template-columns: 22px 1fr 32px; align-items: center; gap: .45rem; }.check-row input[type="checkbox"] { margin: 0; }.check-text { min-height: 37px !important; }.add-row { display: flex; align-items: center; gap: .4rem; width: fit-content; padding: .35rem .1rem; border: 0; background: transparent; color: var(--muted); }.add-row .icon { width: 16px; }.block-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: .4rem; margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--border); }.block-toolbar > span { margin-right: .3rem; color: var(--muted); font-size: .75rem; font-weight: 750; }.block-toolbar button { display: inline-flex; align-items: center; gap: .35rem; min-height: 34px; padding: .35rem .55rem; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--text-soft); font-size: .78rem; font-weight: 700; }.block-toolbar .icon { width: 15px; height: 15px; }
.detail-page { max-width: 1200px !important; }.detail-hero { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 1rem; padding: clamp(18px, 3vw, 32px); margin-bottom: 14px; border-radius: var(--radius-lg); background: linear-gradient(115deg, color-mix(in srgb, var(--item-color) 12%, var(--surface)), var(--surface)); border: 1px solid color-mix(in srgb, var(--item-color) 22%, var(--border)); }.detail-hero .back-link { grid-column: 1 / -1; }.back-link { display: inline-flex; align-items: center; gap: .35rem; margin-bottom: 1rem; color: var(--muted); font-weight: 700; }.back-link .icon { width: 17px; transform: rotate(90deg); }.detail-hero__main { display: flex; align-items: center; gap: 1rem; }.detail-hero__main .list-symbol { width: 64px; height: 64px; border-radius: 19px; }.detail-hero__main .icon { width: 29px; height: 29px; }.detail-hero h1 { margin: 0; }.detail-hero p { margin: .4rem 0 0; color: var(--muted); }.detail-hero__actions, .note-detail__actions { display: flex; align-items: center; gap: .5rem; }.detail-stats { display: flex; align-items: center; flex-wrap: wrap; gap: 1rem; padding: .7rem 1rem; margin-bottom: 14px; color: var(--muted); font-size: .82rem; }.detail-stats span + span { padding-left: 1rem; border-left: 1px solid var(--border); }.detail-stats strong { color: var(--text); }
.timeline, .member-list, .state-list, .invitation-list { display: grid; gap: .65rem; }.timeline article, .member-list article, .state-list article, .invitation-list article { display: flex; align-items: center; gap: .8rem; padding: .9rem 1rem; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; }.timeline article > div, .member-list article > div, .state-list article > div, .invitation-list article > div { min-width: 0; flex: 1; }.timeline p, .timeline time, .member-list strong, .member-list small, .state-list strong, .state-list small { display: block; }.timeline p { margin: .15rem 0; color: var(--muted); }.timeline time { color: var(--muted); font-size: .72rem; }
.invitation-tabs { margin-bottom: 1rem; }.invitation-list p { margin: .12rem 0; color: var(--muted); }.invitation-actions { flex: 0 1 auto !important; display: flex; justify-content: flex-end; flex-wrap: wrap; gap: .45rem; }.invitation-actions .button { min-height: 36px; padding: .5rem .72rem; font-size: .78rem; }
.note-detail { max-width: 1180px !important; }.note-detail__header { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 20px; }.note-detail__header h1 { margin-bottom: .25rem; }.note-byline { margin: 0; color: var(--muted); font-size: .8rem; }.presence-bar { display: flex; align-items: center; gap: .5rem; margin-bottom: 12px; color: var(--secondary); font-size: .8rem; font-weight: 700; }.presence-dots { display: flex; }.presence-dots i { width: 26px; height: 26px; display: flex; align-items: center; justify-content: center; margin-left: -5px; border: 2px solid var(--bg); border-radius: 50%; background: var(--secondary); color: #fff; font-style: normal; }.presence-dots i:first-child { margin-left: 0; }
.note-layout { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 18px; align-items: start; }.note-document { min-width: 0; padding: clamp(20px, 4vw, 48px); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }.note-block { color: var(--text-soft); font-size: 1.02rem; line-height: 1.72; }.note-block p { margin-bottom: .75rem; }.note-block hr { margin: 1.4rem 0; border: 0; border-top: 1px solid var(--border); }.detail-checklist { display: grid; gap: .55rem; margin: .8rem 0 1.2rem; }.detail-checklist label { display: grid; grid-template-columns: 22px 1fr auto auto; align-items: center; gap: .55rem; font-weight: 500; }.detail-checklist label.completed span { color: var(--muted); text-decoration: line-through; }.detail-checklist small, .detail-checklist time { color: var(--muted); font-size: .72rem; }.link-card { display: grid; grid-template-columns: 40px 1fr auto; align-items: center; gap: .7rem; margin: .8rem 0; padding: .8rem; border: 1px solid var(--border); border-radius: 11px; color: var(--text); }.link-card > .icon { padding: 8px; box-sizing: content-box; border-radius: 10px; background: var(--primary-soft); color: var(--primary); }.link-card strong, .link-card small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.note-sidebar { display: grid; gap: 14px; }.note-sidebar > section { padding: 1rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }.note-sidebar header { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-bottom: .8rem; }.note-sidebar h2 { margin: 0; font-size: .95rem; }.mini-form { display: grid; gap: .55rem; padding: .7rem; margin: .5rem 0; border-radius: 10px; background: var(--surface-2); }.reminder-row { display: grid; grid-template-columns: 20px 1fr auto; gap: .5rem; align-items: center; padding: .6rem 0; border-top: 1px solid var(--border); }.reminder-row strong, .reminder-row small { display: block; font-size: .73rem; }.reminder-row .icon { color: var(--accent-orange); }.avatar-stack { display: flex; align-items: center; }.avatar-stack .avatar { margin-right: -7px; border: 2px solid var(--surface); }
.attachments-section { margin-top: 30px; padding-top: 22px; border-top: 1px solid var(--border); }.attachments-section h2 { font-size: 1.05rem; }.file-button { position: relative; overflow: hidden; }.file-button input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }.attachment-list { display: grid; gap: .5rem; }.attachment-list article { display: grid; grid-template-columns: 42px 1fr auto; gap: .7rem; align-items: center; padding: .65rem; border: 1px solid var(--border); border-radius: 10px; }.attachment-list strong, .attachment-list small { display: block; }.file-type { width: 42px; height: 42px; display: flex; align-items: center; justify-content: center; border-radius: 10px; background: var(--primary-soft); color: var(--primary); font-size: .68rem; font-weight: 850; }
.comments-section { margin-top: 18px; padding: clamp(18px, 3vw, 30px); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); }.comment-list { display: grid; gap: 1rem; }.comment-list article { display: grid; grid-template-columns: 36px 1fr; gap: .7rem; }.comment-list header { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }.comment-list time { color: var(--muted); font-size: .72rem; }.comment-list p { margin: .2rem 0 0; color: var(--text-soft); }.comment-compose { display: grid; grid-template-columns: 36px 1fr auto; gap: .7rem; align-items: start; margin-top: 1.2rem; padding-top: 1.2rem; border-top: 1px solid var(--border); }.comment-compose textarea { min-height: 70px; }
.more-menu { position: relative; }.more-menu summary { list-style: none; cursor: pointer; }.more-menu > div { position: absolute; z-index: 30; right: 0; top: 48px; width: 205px; padding: 6px; background: var(--surface); border: 1px solid var(--border); border-radius: 11px; box-shadow: var(--shadow-md); }.more-menu > div button { width: 100%; display: flex; align-items: center; gap: .55rem; padding: .65rem; border: 0; border-radius: 8px; background: transparent; text-align: left; }.more-menu > div button:hover { background: var(--surface-2); }.more-menu > div .icon { width: 17px; }

/* Settings, history, admin */
.settings-layout { display: grid; grid-template-columns: 190px minmax(0, 820px); gap: 24px; align-items: start; }.settings-nav { position: sticky; top: 94px; display: grid; gap: 4px; }.settings-nav button { min-height: 40px; padding: .55rem .7rem; border: 0; border-radius: 9px; background: transparent; color: var(--muted); text-align: left; font-weight: 700; }.settings-nav button.active, .settings-nav button:hover { background: var(--surface); color: var(--primary); }.choice-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: .7rem; margin-bottom: 1.5rem; }.choice-cards legend { grid-column: 1 / -1; }.choice-cards label { display: grid; gap: .35rem; padding: .7rem; border: 1px solid var(--border); border-radius: 11px; cursor: pointer; }.choice-cards label.selected { border-color: var(--primary); background: var(--primary-soft); }.choice-cards input { position: absolute; opacity: 0; }.theme-preview { height: 64px; display: block; border-radius: 7px; border: 1px solid var(--border); }.theme-preview--light { background: linear-gradient(90deg, #e6ebf4 25%, #fff 25%); }.theme-preview--dark { background: linear-gradient(90deg, #081225 25%, #15233e 25%); }.theme-preview--auto { background: linear-gradient(110deg, #fff 49%, #15233e 50%); }.notification-table { display: grid; }.notification-table__head, .notification-table label { display: grid; grid-template-columns: 1fr repeat(3, 70px); align-items: center; gap: .5rem; padding: .7rem; border-bottom: 1px solid var(--border); }.notification-table__head { color: var(--muted); font-size: .72rem; font-weight: 800; }.notification-table label > span { display: block; }.notification-table strong, .notification-table small { display: block; }.notification-table input { justify-self: center; }
.security-feature { display: grid; grid-template-columns: 46px 1fr auto; gap: .8rem; align-items: center; padding: .9rem 0; }.security-feature p { margin: .15rem 0 0; color: var(--muted); }.two-factor-setup, .recovery-codes { padding: 1rem; margin: .8rem 0; border-radius: 12px; background: var(--surface-2); }.two-factor-setup code { display: block; padding: .6rem; margin: .5rem 0; border-radius: 7px; background: var(--surface); word-break: break-all; }.recovery-codes > div { display: grid; grid-template-columns: repeat(2, 1fr); gap: .4rem; }.recovery-codes code { padding: .4rem; background: var(--surface); border-radius: 5px; text-align: center; }.subheading { margin: 1.5rem 0 .6rem; }.session-list { display: grid; }.session-list article { display: grid; grid-template-columns: 44px 1fr auto; gap: .7rem; align-items: center; padding: .7rem 0; border-top: 1px solid var(--border); }.session-list strong, .session-list small { display: block; }.tag-create { display: grid; grid-template-columns: 1fr 50px auto; gap: .5rem; margin-bottom: 1rem; }.tag-create input[type="color"] { width: 50px; height: 45px; padding: 3px; border: 1px solid var(--border); border-radius: 9px; background: var(--surface); }.tag-manage { display: grid; }.tag-manage article { display: flex; align-items: center; justify-content: space-between; padding: .65rem 0; border-top: 1px solid var(--border); }.danger-zone { padding: 1rem; margin: 1.2rem 0; border: 1px solid color-mix(in srgb, var(--danger) 25%, var(--border)); border-radius: 12px; background: var(--danger-soft); }.danger-zone h3 { color: var(--danger); }.danger-zone p { color: var(--text-soft); }
.history-layout { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(280px, .8fr); gap: 20px; align-items: start; }.history-layout > section > h2 { font-size: 1.05rem; }.conflict-card { padding: 1rem; margin-bottom: .7rem; background: var(--surface); border: 1px solid color-mix(in srgb, var(--warning) 28%, var(--border)); border-radius: 13px; }.conflict-card > header, .conflict-card > footer { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }.conflict-card > header time { color: var(--muted); font-size: .72rem; }.conflict-card > div { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; margin: .8rem 0; }.conflict-card pre { max-height: 170px; overflow: auto; margin: .25rem 0; padding: .6rem; border-radius: 8px; background: var(--surface-2); font-size: .75rem; }.version-list { display: grid; gap: .5rem; }.version-list article { display: grid; grid-template-columns: 44px 1fr auto; gap: .6rem; align-items: center; padding: .7rem; border: 1px solid var(--border); border-radius: 11px; background: var(--surface); }.version-number { font-weight: 850; color: var(--primary); }.version-list strong, .version-list small { display: block; }
.admin-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 20px; }.admin-metrics article { min-height: 135px; padding: 1rem; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }.admin-metrics span, .admin-metrics small { color: var(--muted); }.admin-metrics strong { margin: auto 0 .2rem; font-size: 1.8rem; }.admin-metrics .metric-alert { border-color: color-mix(in srgb, var(--warning) 35%, var(--border)); background: var(--warning-soft); }.admin-actions { display: flex; gap: .7rem; flex-wrap: wrap; }.table-wrap { overflow: auto; }.table-wrap table { width: 100%; border-collapse: collapse; }.table-wrap th { padding: .6rem; color: var(--muted); font-size: .7rem; text-align: left; text-transform: uppercase; letter-spacing: .06em; }.table-wrap td { padding: .7rem .6rem; border-top: 1px solid var(--border); vertical-align: middle; }.table-wrap td > strong, .table-wrap td > small { display: block; }.user-cell { display: grid; grid-template-columns: 34px 1fr; gap: .55rem; align-items: center; }.user-cell strong, .user-cell small { display: block; white-space: nowrap; }.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }.health-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 20px; }.health-item { display: grid; grid-template-columns: 12px 1fr auto; align-items: center; gap: .7rem; padding: 1rem; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }.health-item strong, .health-item small { display: block; }.health-dot { width: 10px; height: 10px; border-radius: 50%; }.health-dot--ok { background: var(--success); box-shadow: 0 0 0 4px var(--success-soft); }.health-dot--warning { background: var(--warning); }.health-dot--danger { background: var(--danger); }
.search-hero { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: .7rem; padding: .55rem; margin-bottom: 14px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); box-shadow: var(--shadow-sm); }.search-hero > .icon { margin-left: .5rem; color: var(--muted); }.search-hero input { border: 0 !important; box-shadow: none !important; }.result-count { color: var(--muted); margin: 1.2rem 0 .5rem; }.search-results { display: grid; gap: .5rem; }.search-results > a { display: grid; grid-template-columns: 42px 1fr auto; gap: .8rem; align-items: center; padding: .8rem; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); color: var(--text); }.search-results > a:hover { border-color: var(--primary); }.search-result-icon { width: 42px; height: 42px; display: flex; align-items: center; justify-content: center; border-radius: 11px; background: var(--primary-soft); color: var(--primary); }.search-results p { margin: .1rem 0; color: var(--muted); }.search-results small, .search-results time { color: var(--muted); font-size: .72rem; }
.notification-bell { position: relative; }.notification-badge { position: absolute; top: -5px; right: -5px; min-width: 18px; height: 18px; display: grid; place-items: center; padding: 0 4px; border: 2px solid var(--bg); border-radius: 999px; background: var(--danger); color: #fff; font-size: .62rem; font-weight: 900; line-height: 1; }.notification-list { display: grid; gap: .55rem; }.notification-list article { position: relative; display: grid; grid-template-columns: 44px 1fr 34px; align-items: center; gap: .7rem; padding: .8rem; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }.notification-list article.unread { border-left: 3px solid var(--primary); }.notification-list article.unread::after { content: ""; position: absolute; right: 14px; top: 12px; width: 7px; height: 7px; border-radius: 50%; background: var(--primary); }.notification-icon { width: 42px; height: 42px; display: flex; align-items: center; justify-content: center; border-radius: 12px; background: var(--primary-soft); color: var(--primary); }.notification-list a { color: var(--text); }.notification-list p { margin: .1rem 0; color: var(--muted); }.notification-list time { color: var(--muted); font-size: .72rem; }.reminder-groups { max-width: 820px !important; display: grid; gap: 1.4rem; }.reminder-groups h2 { color: var(--muted); font-size: .85rem; text-transform: capitalize; }.reminder-card { display: grid; grid-template-columns: 44px 1fr auto; align-items: center; gap: .7rem; padding: .7rem; margin-bottom: .5rem; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); color: var(--text); }.reminder-card strong, .reminder-card small { display: block; }

/* Modals */
.modal-backdrop { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 1rem; background: rgba(5, 12, 28, .62); backdrop-filter: blur(4px); }.modal { width: min(480px, 100%); max-height: 90vh; overflow: auto; padding: 1.25rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-md); }.modal > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 1.1rem; }.modal h2 { margin: 0; }

/* Public website and auth */
.public-shell { min-height: 100vh; background: var(--surface); }.public-header { max-width: 1240px; height: 82px; display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin: 0 auto; padding: 0 28px; }.public-header nav { display: flex; align-items: center; gap: 1.35rem; }.public-header nav > a:not(.button) { color: var(--text-soft); font-weight: 650; }
.hero { max-width: 1300px; min-height: 680px; display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(30px, 5vw, 80px); align-items: center; margin: 0 auto; padding: 60px 30px 90px; overflow: hidden; }.hero__content h1 { font-size: clamp(3.1rem, 6vw, 5.6rem); line-height: .98; letter-spacing: -.06em; }.hero__content h1 em { color: var(--primary); font-style: normal; }.hero__content > p { max-width: 610px; color: var(--muted); font-size: 1.15rem; }.hero__actions, .hero__trust { display: flex; align-items: center; gap: .7rem; flex-wrap: wrap; }.hero__trust { margin-top: 1.4rem; color: var(--muted); font-size: .76rem; }.hero__visual { position: relative; min-width: 0; }.preview-window { padding: 9px; transform: perspective(1200px) rotateY(-3deg) rotateX(1deg); border: 1px solid #cbd6e8; border-radius: 22px; background: #fff; box-shadow: 0 40px 90px rgba(25, 56, 115, .2); }.preview-window__bar { height: 32px; display: flex; align-items: center; gap: 5px; padding: 0 6px; color: #8a97ad; }.preview-window__bar i { width: 8px; height: 8px; border-radius: 50%; background: #d4dce9; }.preview-window__bar span { margin: auto; font-size: .62rem; }.preview-app { min-height: 425px; display: grid; grid-template-columns: 68px 1fr; overflow: hidden; border-radius: 15px; background: #f3f6fb; color: #0b1736; }.preview-sidebar { display: flex; flex-direction: column; align-items: center; gap: 20px; padding: 18px 10px; background: #0b1736; }.preview-sidebar img { width: 34px; height: 34px; }.preview-sidebar span { width: 30px; height: 7px; border-radius: 5px; background: #304064; }.preview-content { padding: 30px; }.preview-heading { display: flex; justify-content: space-between; align-items: center; }.preview-heading small, .preview-heading strong { display: block; }.preview-heading small { color: #7b879c; }.preview-heading strong { font-size: 1.25rem; }.preview-heading b { width: 39px; height: 39px; display: flex; align-items: center; justify-content: center; border-radius: 12px; background: #275dde; color: #fff; font-size: 1.3rem; }.preview-stats { display: flex; gap: 7px; margin: 20px 0; }.preview-stats span { flex: 1; padding: 10px; border-radius: 9px; background: #fff; color: #7b879c; font-size: .63rem; }.preview-stats b { display: block; color: #0b1736; font-size: 1rem; }.preview-card { width: 87%; margin-bottom: 11px; padding: 16px; border-radius: 13px; background: #fff; box-shadow: 0 5px 18px rgba(11,23,54,.06); }.preview-card--blue { margin-left: 9%; border-left: 3px solid #275dde; }.preview-card small { color: #275dde; font-size: .55rem; font-weight: 800; }.preview-card strong { display: block; margin-top: 4px; }.preview-card > p { display: flex; gap: 5px; margin: 11px 0; color: #7b879c; font-size: .7rem; }.preview-card p i { width: 24%; height: 5px; border-radius: 5px; background: #e3e8f1; }.preview-card footer { display: flex; justify-content: space-between; color: #7b879c; font-size: .6rem; }.floating-chip { position: absolute; display: flex; align-items: center; gap: .4rem; padding: .55rem .7rem; border-radius: 10px; background: #fff; color: #0b1736; box-shadow: 0 14px 34px rgba(11,23,54,.16); font-size: .7rem; font-weight: 750; }.floating-chip .icon { width: 15px; color: #19b7a5; }.floating-chip--sync { left: -25px; bottom: 46px; }.floating-chip--share { right: -14px; top: 80px; }
.logo-strip { padding: 34px 20px; text-align: center; background: var(--bg); border-block: 1px solid var(--border); }.logo-strip p { color: var(--muted); font-size: .73rem; text-transform: uppercase; letter-spacing: .1em; }.logo-strip div { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: clamp(25px, 7vw, 90px); color: var(--muted); font-weight: 850; letter-spacing: .1em; }
.features-section { max-width: 1200px; margin: 0 auto; padding: 110px 28px; }.section-heading { text-align: center; margin-bottom: 50px; }.section-heading h2 { font-size: clamp(2.2rem, 4.5vw, 4rem); letter-spacing: -.05em; }.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }.feature-grid article { padding: 28px; border: 1px solid var(--border); border-radius: 20px; background: var(--surface); }.feature-grid h3 { margin: 1.2rem 0 .45rem; font-size: 1.12rem; }.feature-grid p { color: var(--muted); }.feature-icon { width: 48px; height: 48px; display: inline-flex; align-items: center; justify-content: center; border-radius: 14px; background: var(--primary-soft); color: var(--primary); }.feature-icon--teal { background: color-mix(in srgb, var(--secondary) 14%, var(--surface)); color: var(--secondary); }.feature-icon--violet { background: color-mix(in srgb, var(--accent-violet) 14%, var(--surface)); color: var(--accent-violet); }.feature-icon--orange { background: color-mix(in srgb, var(--accent-orange) 14%, var(--surface)); color: var(--accent-orange); }.feature-icon--rose { background: color-mix(in srgb, var(--accent-rose) 14%, var(--surface)); color: var(--accent-rose); }.feature-icon--navy { background: #e8edf6; color: #0b1736; }
.cta-section { max-width: 1160px; margin: 0 auto 80px; padding: 70px 25px; border-radius: 30px; background: #0b1736; color: #fff; text-align: center; }.cta-section img { width: 64px; height: 64px; margin: 0 auto 1rem; }.cta-section h2 { font-size: clamp(2rem, 4vw, 3.6rem); margin-bottom: .5rem; }.cta-section p { color: #aebbd4; }.public-footer { max-width: 1200px; display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin: 0 auto; padding: 35px 25px; border-top: 1px solid var(--border); }.public-footer img { width: 140px; }.public-footer p { margin: 0; color: var(--muted); }.public-footer nav { display: flex; gap: 1rem; }
.auth-page { min-height: calc(100vh - 82px); display: grid; grid-template-columns: minmax(400px, 580px) 1fr; background: var(--bg); }.auth-card { width: min(460px, calc(100% - 36px)); align-self: center; justify-self: center; padding: clamp(22px, 4vw, 42px); border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-md); }.auth-card__mark img { width: 50px; height: 50px; }.auth-card__heading { margin: 1.6rem 0; }.auth-card__heading h1 { font-size: 2rem; }.auth-card__heading p { color: var(--muted); }.auth-card__switch, .legal-copy { margin: 1.2rem 0 0; color: var(--muted); text-align: center; }.legal-copy { font-size: .75rem; }.form-hint { margin: -.5rem 0 0; color: var(--muted); font-size: .73rem; }.code-input { text-align: center; font-size: 1.4rem !important; letter-spacing: .35em; }.auth-aside { min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 8vw; background: radial-gradient(circle at 30% 20%, #3c72ef, #0b1736 70%); color: #fff; }.auth-aside blockquote { max-width: 600px; margin: 0 0 1.2rem; font-size: clamp(1.8rem, 3vw, 3rem); line-height: 1.2; letter-spacing: -.04em; }.auth-aside > span { color: #b9c8e5; }.auth-aside--teal { align-items: flex-start; background: radial-gradient(circle at 70% 20%, #24c8b5, #0b1736 70%); }.auth-aside--teal h2 { font-size: clamp(2.1rem, 4vw, 4rem); }.auth-aside ul { display: grid; gap: .8rem; padding: 0; list-style: none; }.auth-aside li { display: flex; align-items: center; gap: .5rem; }.auth-page--simple { display: flex; align-items: center; justify-content: center; }.success-state { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 1rem 0; }.success-state > span { width: 62px; height: 62px; display: flex; align-items: center; justify-content: center; margin-bottom: 1rem; border-radius: 50%; background: var(--success-soft); color: var(--success); font-size: 1.5rem; font-weight: 850; }.success-state > span .icon { width: 28px; height: 28px; }.success-state p { color: var(--muted); }.success-state--error > span { background: var(--danger-soft); color: var(--danger); }.legal-page { max-width: 760px; margin: 0 auto; padding: 90px 24px; }.legal-page h1 { font-size: 3.2rem; }.legal-page h2 { margin-top: 2.2rem; }.legal-page p { color: var(--text-soft); }.legal-page__date { color: var(--muted) !important; }.center-panel { min-height: 65vh; display: flex; align-items: center; justify-content: center; }.invitation-card { max-width: 500px; padding: 2rem; text-align: center; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-md); }.invitation-card .feature-icon { margin-bottom: 1rem; }.invitation-card .button-row { justify-content: center; }
.onboarding { max-width: 760px !important; min-height: calc(100vh - 200px); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }.onboarding__art { position: relative; width: 125px; height: 110px; margin-bottom: 1rem; }.onboarding__art img { position: relative; z-index: 2; width: 85px; height: 85px; margin: auto; }.onboarding__art span { position: absolute; width: 45px; height: 55px; top: 28px; border-radius: 12px; background: var(--primary-soft); transform: rotate(-12deg); }.onboarding__art span:nth-child(2) { left: 4px; }.onboarding__art span:nth-child(3) { right: 4px; transform: rotate(12deg); background: color-mix(in srgb, var(--secondary) 16%, var(--surface)); }.onboarding > p { max-width: 600px; color: var(--muted); }.onboarding__steps { width: 100%; display: grid; grid-template-columns: repeat(3, 1fr); gap: .7rem; margin: 1.5rem 0; }.onboarding__steps article { display: flex; align-items: center; gap: .6rem; padding: .8rem; text-align: left; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; }.onboarding__steps b { width: 30px; height: 30px; display: flex; align-items: center; justify-content: center; border-radius: 9px; background: var(--primary-soft); color: var(--primary); }.onboarding__steps strong, .onboarding__steps small { display: block; }

/* Arranque, actualización y errores fatales */
.boot-splash { min-height: 100dvh; display: grid; place-items: center; padding: max(24px, env(safe-area-inset-top)) max(18px, env(safe-area-inset-right)) max(24px, env(safe-area-inset-bottom)) max(18px, env(safe-area-inset-left)); background: var(--bg); }
.boot-card { width: min(390px, 92vw); display: grid; justify-items: center; gap: 18px; padding: 34px 28px 28px; border: 1px solid var(--border); border-radius: 26px; background: var(--surface); box-shadow: var(--shadow-md); text-align: center; }
.boot-mark { width: 76px; height: 76px; filter: drop-shadow(0 12px 24px color-mix(in srgb, var(--primary) 24%, transparent)); animation: boot-breathe 1.7s ease-in-out infinite; }
.boot-copy { display: grid; gap: 2px; }.boot-copy strong { font-size: 1.25rem; }.boot-copy span { color: var(--muted); font-size: .88rem; }
.boot-skeleton { width: min(250px, 70vw); display: grid; gap: 8px; }.boot-skeleton i { height: 9px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }.boot-skeleton i::after { content: ""; display: block; width: 42%; height: 100%; border-radius: inherit; background: var(--primary); opacity: .66; animation: boot-scan 1.25s ease-in-out infinite; }.boot-skeleton i:nth-child(2) { width: 84%; }.boot-skeleton i:nth-child(2)::after { animation-delay: 120ms; }.boot-skeleton i:nth-child(3) { width: 63%; }.boot-skeleton i:nth-child(3)::after { animation-delay: 240ms; }
#pwa-activation-ui { position: fixed; z-index: 10000; inset: 0; display: grid; place-items: center; padding: max(24px, env(safe-area-inset-top)) 20px max(24px, env(safe-area-inset-bottom)); background: color-mix(in srgb, var(--bg) 94%, transparent); backdrop-filter: blur(16px); color: var(--text); }
#pwa-activation-ui[hidden] { display: none; }.pwa-update-lock, .pwa-update-lock body { overflow: hidden; }
.pwa-activation-card { width: min(360px, 92vw); display: grid; justify-items: center; gap: 12px; padding: 30px; border: 1px solid var(--border); border-radius: 24px; background: var(--surface); box-shadow: var(--shadow-md); text-align: center; }.pwa-activation-card img { width: 72px; height: 72px; }.pwa-activation-card strong { font-size: 1.2rem; }.pwa-activation-card span { color: var(--muted); }
.pwa-activation-bars { height: 28px; display: flex; align-items: end; gap: 5px; }.pwa-activation-bars i { width: 7px; height: 10px; border-radius: 999px; background: var(--primary); animation: update-bars .9s ease-in-out infinite alternate; }.pwa-activation-bars i:nth-child(2) { animation-delay: 100ms; }.pwa-activation-bars i:nth-child(3) { animation-delay: 200ms; }.pwa-activation-bars i:nth-child(4) { animation-delay: 300ms; }
@keyframes boot-breathe { 50% { transform: translateY(-4px) scale(1.025); } }
@keyframes boot-scan { 0% { transform: translateX(-120%); } 100% { transform: translateX(340%); } }
@keyframes update-bars { to { height: 27px; background: var(--secondary); } }
.blazor-error-boundary { padding: 1rem; background: var(--danger); color: #fff; }.blazor-error-boundary::after { content: "Ha ocurrido un error inesperado."; }
#blazor-error-ui { position: fixed; z-index: 9999; right: 12px; bottom: max(12px, env(safe-area-inset-bottom)); left: 12px; display: none; padding: .8rem 3rem .8rem 1rem; border-radius: 10px; background: var(--danger-soft); color: var(--danger); box-shadow: var(--shadow-md); }#blazor-error-ui .dismiss { position: absolute; right: 1rem; cursor: pointer; }

@media (max-width: 1180px) {
    .card-grid--lists { grid-template-columns: repeat(3, 1fr); }.stat-grid { grid-template-columns: repeat(2, 1fr); }.hero { grid-template-columns: 1fr 1fr; }.hero__content h1 { font-size: 4rem; }.settings-layout { grid-template-columns: 165px 1fr; }.note-layout { grid-template-columns: 1fr 250px; }
}

@media (max-width: 900px) {
    :root { --sidebar-width: 0px; }.sidebar { display: none; }.topbar { left: 0; height: 64px; padding: 0 16px; }.topbar__mark { display: flex; }.topbar__actions > a:last-child { display: none; }.search-box { width: 100%; }.search-box kbd { display: none; }.app-main { margin-left: 0; padding: 86px 18px 105px; }.bottom-nav { position: fixed; z-index: 50; inset: auto 0 0; height: 72px; display: grid; grid-template-columns: repeat(5, 1fr); align-items: center; padding: 4px max(8px, env(safe-area-inset-left)) env(safe-area-inset-bottom); background: color-mix(in srgb, var(--surface) 94%, transparent); border-top: 1px solid var(--border); backdrop-filter: blur(16px); }.bottom-nav a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: var(--muted); font-size: .62rem; font-weight: 700; }.bottom-nav a.active { color: var(--primary); }.bottom-nav .icon { width: 21px; }.create-fab { right: 50%; bottom: 35px; transform: translateX(50%); }.create-fab summary { width: 56px; height: 56px; border: 5px solid var(--surface); border-radius: 50%; }.create-menu { right: 50%; transform: translateX(50%); bottom: 68px; }.editor-header--sticky { top: 64px; }.card-grid, .card-grid--lists { grid-template-columns: repeat(2, 1fr); }.note-layout { grid-template-columns: 1fr; }.note-sidebar { grid-template-columns: 1fr 1fr; }.settings-layout { grid-template-columns: 1fr; }.settings-nav { position: static; display: flex; overflow-x: auto; padding-bottom: 5px; }.settings-nav button { white-space: nowrap; }.history-layout { grid-template-columns: 1fr; }.hero { grid-template-columns: 1fr; padding-top: 80px; }.hero__content { text-align: center; }.hero__content > p { margin-inline: auto; }.hero__actions, .hero__trust { justify-content: center; }.hero__visual { width: min(620px, 100%); margin: auto; }.feature-grid { grid-template-columns: repeat(2, 1fr); }.auth-page { grid-template-columns: 1fr; padding: 30px 0; }.auth-aside { display: none; }.admin-metrics { grid-template-columns: repeat(2, 1fr); }.health-grid { grid-template-columns: 1fr; }
    .editor-header--sticky { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: .4rem; margin-inline: -13px; padding: 8px 13px; flex-wrap: nowrap; }
    .editor-header__close, .editor-header__actions > .icon-button { width: 44px; height: 44px; min-width: 44px; }
    .editor-header__actions { display: grid; grid-column: auto; grid-template-columns: 44px 44px minmax(0, 1fr); justify-self: stretch; gap: .4rem; width: auto; min-width: 0; }
    .editor-header__actions .button { width: 100%; min-width: 0; padding-inline: .55rem; overflow: hidden; text-overflow: ellipsis; }
}

@media (max-width: 620px) {
    body { font-size: 14px; }.app-main { padding-inline: 13px; }.topbar { gap: .65rem; padding-inline: 12px; }.topbar__mark, .topbar__mark img { width: 42px; height: 42px; flex-basis: 42px; }.topbar__actions { gap: .38rem; }.topbar__actions .connection-pill { width: 42px; height: 42px; flex-basis: 42px; }.page-header { grid-template-columns: minmax(0, 1fr) auto; align-items: start; margin-bottom: 20px; column-gap: .7rem; }.page-header__copy { grid-row: 1; }.page-header__install { grid-row: 1; align-self: start; }.page-header__actions, .page-header--installable .page-header__actions { grid-column: 1 / -1; grid-row: 2; width: 100%; justify-content: flex-start; }.page-header__actions .button { flex: 1; }.toolbar { align-items: stretch; flex-direction: column; }.toolbar-search { width: 100%; }.segmented { max-width: 100%; overflow-x: auto; }.segmented button, .segmented a { white-space: nowrap; }.stat-grid, .card-grid, .card-grid--lists, .card-grid--compact { grid-template-columns: 1fr; }.stat-grid { gap: 8px; }.stat-grid > a { min-height: 82px; }.content-card { min-height: 185px; }.detail-hero { grid-template-columns: 1fr; }.detail-hero__main { align-items: flex-start; }.detail-hero__actions, .note-detail__actions { flex-wrap: wrap; }.detail-stats { gap: .5rem; }.detail-stats span + span { padding-left: .5rem; }.note-detail__header { align-items: flex-start; flex-direction: column; }.note-document { padding: 22px 16px; }.note-sidebar { grid-template-columns: 1fr; }.comment-compose { grid-template-columns: 30px 1fr; }.comment-compose .button { grid-column: 2; justify-self: end; }.editor-canvas { padding-inline: 14px; }.editor-header { grid-template-columns: auto 1fr; }.editor-header > .button, .editor-header__actions { grid-column: 1 / -1; justify-self: stretch; }.editor-header > .button { width: 100%; }.editor-header--sticky { display: flex; flex-wrap: wrap; margin-inline: -13px; padding-inline: 13px; }.editor-header--sticky .save-status { margin-left: auto; }.editor-header__actions { width: 100%; }.editor-header__actions .button { flex: 1; }.block-grip { display: none; }.editor-block { grid-template-columns: 1fr 30px; }.choice-cards { grid-template-columns: 1fr; }.notification-table { overflow-x: auto; }.notification-table__head, .notification-table label { min-width: 560px; }.security-feature { grid-template-columns: 44px 1fr; }.security-feature .button { grid-column: 1 / -1; }.form-grid { grid-template-columns: 1fr; }.conflict-card > div { grid-template-columns: 1fr; }.conflict-card > footer { align-items: stretch; flex-direction: column; }.admin-metrics { grid-template-columns: 1fr 1fr; }.search-hero { grid-template-columns: auto 1fr; }.search-hero .button { grid-column: 1 / -1; }.search-results > a { grid-template-columns: 38px 1fr; }.search-results time { grid-column: 2; }.public-header { height: 70px; padding-inline: 16px; }.public-header .brand-link img { width: 145px; }.public-header nav > a:not(.button), .public-header nav .button--ghost { display: none; }.public-header nav { gap: .4rem; }.hero { padding: 65px 18px 70px; min-height: auto; }.hero__content h1 { font-size: 3.25rem; }.hero__visual { transform: scale(.96); }.preview-content { padding: 18px; }.floating-chip--sync { left: -4px; }.floating-chip--share { right: -4px; }.features-section { padding: 75px 16px; }.feature-grid { grid-template-columns: 1fr; }.cta-section { margin: 0 12px 55px; padding: 50px 18px; border-radius: 22px; }.public-footer { align-items: flex-start; flex-direction: column; padding-inline: 18px; }.auth-card { width: calc(100% - 24px); padding: 24px 18px; }.legal-page h1 { font-size: 2.3rem; }.onboarding__steps { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
    .invitation-list article { align-items: flex-start; flex-wrap: wrap; }
    .invitation-actions { width: 100%; flex: 1 0 100% !important; justify-content: stretch; padding-left: 0; }
    .invitation-actions .button { flex: 1 1 9rem; }
}

@media (max-width: 620px) {
    .editor-header--sticky { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: .4rem; margin-inline: -13px; padding: 8px 13px; flex-wrap: nowrap; }
    .editor-header__close, .editor-header__actions > .icon-button { width: 44px; height: 44px; min-width: 44px; }
    .editor-header__actions { display: grid; grid-column: auto; grid-template-columns: 44px 44px minmax(0, 1fr); justify-self: stretch; gap: .4rem; width: auto; min-width: 0; }
    .editor-header__actions .button { width: 100%; min-width: 0; padding-inline: .55rem; overflow: hidden; text-overflow: ellipsis; }
}

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } }
