:root {
    color-scheme: light;
    --ink: #23344b;
    --muted: #596a7e;
    --mist: #f3f6fa;
    --sidebar: #e6ecf4;
    --line: #d6dfea;
    --accent: #315c91;
    font: 16px/1.5 Inter, system-ui, sans-serif;
    color: var(--ink);
    background: var(--mist);
}
* { box-sizing: border-box; }
body { margin: 0; }
a { color: var(--accent); }
.shell { display: grid; grid-template-columns: 235px minmax(0, 1fr); min-height: 100vh; }
aside { background: var(--sidebar); border-right: 1px solid var(--line); padding: 26px 18px; display: flex; flex-direction: column; gap: 10px; }
.brand { display: flex; align-items: center; gap: 10px; font-size: 1.2rem; font-weight: 700; color: var(--ink); text-decoration: none; margin-bottom: 14px; }
.brand-mark { flex: none; display: grid; place-items: center; background: var(--accent); color: white; width: 38px; height: 42px; border-radius: 9px; }
.brand-name { display: block; min-width: 0; line-height: 1.2; letter-spacing: -.025em; }
.brand-name small { display: block; margin-top: 4px; font-size: .75rem; font-weight: 400; letter-spacing: normal; line-height: 1.3; }
.aside-footer { margin-top: auto; padding-top: 20px; }
nav { display: grid; gap: 6px; }
button, input, select { font: inherit; }
button { cursor: pointer; }
.text-button, .languages button { color: var(--accent); background: transparent; border: 1px solid transparent; border-radius: 7px; padding: 7px 9px; }
.languages button[aria-pressed=true] { background: white; border-color: var(--line); }
.side-link { padding: 7px; }
.verify-link { display: inline-block; margin: 8px 0 0; }
main { width: min(100%, 1000px); padding: 42px clamp(18px, 5vw, 65px); }
h1 { font-size: clamp(1.65rem, 4vw, 2.2rem); line-height: 1.2; letter-spacing: -.025em; overflow-wrap: anywhere; }
h2 { font-size: 1.15rem; }
h1, h2, .caption { margin: 0 0 10px; }
.caption { font-size: .78rem; color: var(--muted); text-transform: uppercase; letter-spacing: .07em; }
.muted, small { color: var(--muted); }
.panel { background: white; border: 1px solid var(--line); border-radius: 12px; padding: clamp(18px, 4vw, 30px); margin-bottom: 20px; }
.account { max-width: 480px; }
.fields { display: grid; gap: 14px; margin-top: 18px; }
label { display: grid; gap: 6px; font-size: .9rem; font-weight: 550; }
input, select { width: 100%; min-height: 42px; border: 1px solid var(--line); border-radius: 7px; background: white; color: var(--ink); padding: 8px 10px; }
.primary { justify-self: start; background: var(--accent); color: white; border: 1px solid var(--accent); border-radius: 7px; min-height: 42px; padding: 8px 14px; }
.account-links { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 20px; }
.members { margin: 12px 0; padding: 0; list-style: none; }
.members li { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.members span { color: var(--muted); font-size: .9rem; }
.notice, .errors { padding: 12px 16px; border-radius: 8px; background: var(--sidebar); }
.errors { padding-left: 36px; background: #fce7e7; color: #802527; }
.invite-fields { grid-template-columns: 2fr 1fr auto; align-items: end; }
.new-property { max-width: 430px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
@media (max-width: 720px) {
    .shell { grid-template-columns: minmax(0, 1fr); }
    aside { border-right: 0; border-bottom: 1px solid var(--line); padding: 14px 18px; }
    main { padding-top: 22px; }
    .invite-fields { grid-template-columns: 1fr; }
}

.shell-centered {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(auto, 1fr) auto minmax(0, 1fr);
    min-height: 100svh;
}
.shell-centered aside {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    align-self: start;
    padding: 16px clamp(16px, 4vw, 32px);
    border: 0;
    background: transparent;
}
.shell-centered .brand { margin: 0; }
.shell-centered .aside-footer { margin: 0; padding: 0; }
.shell-centered main {
    justify-self: center;
    width: min(100%, 512px);
    padding: 16px;
}
.shell-centered .account { margin: 0; }

.property-switcher { position: relative; }
.property-switcher summary {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: var(--mist);
    cursor: pointer;
    list-style: none;
}
.property-switcher summary::-webkit-details-marker { display: none; }
.property-switcher-icon { font-size: 1.35rem; line-height: 1; }
.property-switcher-label { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.property-switcher-label small { display: block; margin-top: 2px; }
.property-switcher-chevron {
    width: 8px;
    height: 8px;
    margin: -4px 2px 0 0;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: rotate(45deg);
}
.property-switcher[open] .property-switcher-chevron { transform: rotate(225deg); margin-top: 4px; }
.property-options {
    position: absolute;
    inset: calc(100% + 6px) 0 auto;
    z-index: 2;
    padding: 5px;
    background: white;
    border: 1px solid var(--line);
    border-radius: 9px;
    box-shadow: 0 8px 24px #23344b1a;
}
.property-options ul { list-style: none; margin: 0; padding: 0; max-height: min(42vh, 260px); overflow-y: auto; }
.property-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
    padding: 9px 10px;
    border: 0;
    border-radius: 6px;
    color: var(--ink);
    background: transparent;
    text-align: left;
    text-decoration: none;
    overflow-wrap: anywhere;
}
.property-option.active, .property-option:hover { background: var(--mist); }
.property-add { color: var(--accent); justify-content: flex-start; margin-top: 4px; border-top: 1px solid var(--line); }
.property-overview { display: block; padding: 9px 12px; border-radius: 8px; text-decoration: none; }
.property-overview:hover, .property-overview[aria-current=page] { background: white; }
.property-overview[aria-current=page] { font-weight: 600; }
.property-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }

.page-heading { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: 16px; }
.page-heading h1 { margin: 0; }
.page-heading a { text-decoration: none; }
.space-empty { margin: 0; color: var(--muted); }
.space-list { list-style: none; margin: 0; padding: 0; }
.space-list li + li { border-top: 1px solid var(--line); }
.space-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 12px; padding: 9px 0; }
.space-name { display: flex; align-items: center; gap: 6px; min-height: 34px; margin-inline-start: calc(var(--space-depth) * clamp(8px, 2vw, 18px)); overflow-wrap: anywhere; font-weight: 550; }
.space-nested::before { content: ''; flex-shrink: 0; width: 8px; height: 7px; border-inline-start: 1px solid var(--line); border-block-end: 1px solid var(--line); }
.space-edit-button { display: grid; place-items: center; width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 7px; background: white; color: var(--accent); }
.space-edit-button:hover { background: var(--mist); }
@media (pointer: coarse) {
    .space-edit-button { width: 44px; height: 44px; }
}

.space-dialog {
    width: min(480px, calc(100% - 32px));
    max-height: calc(100% - 32px);
    padding: clamp(18px, 4vw, 28px);
    border: 1px solid var(--line);
    border-radius: 12px;
    background: white;
    color: var(--ink);
    box-shadow: 0 18px 55px #23344b30;
}
.space-dialog::backdrop { background: #23344b59; }
.space-dialog h2 { overflow-wrap: anywhere; }
.space-dialog-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-top: 6px; }
.space-dialog-actions .secondary { min-height: 42px; padding: 8px 14px; border: 1px solid var(--line); border-radius: 7px; background: white; color: var(--ink); }

.overview-links, .page-links { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 16px 0; }
.overview-link { display: grid; padding: 12px 16px; color: var(--ink); text-decoration: none; border: 1px solid var(--line); border-radius: 8px; background: white; }
.overview-link strong { color: var(--accent); font-size: 1.25rem; }
.overview-links .primary { text-decoration: none; }
.inventory-panel { padding: 0; }
.inventory-list, .record-list { list-style: none; margin: 0; padding: 0; }
.inventory-list li + li, .record-list li + li { border-top: 1px solid var(--line); }
.inventory-row { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto auto; align-items: center; gap: 12px; padding: 12px 16px; text-decoration: none; overflow-wrap: anywhere; }
.inventory-row:hover, .overview-link:hover { background: var(--mist); }
.inventory-row.compact { grid-template-columns: minmax(0, 1fr) auto; padding-inline: 0; }
.inventory-row small, .record-list small { display: block; margin-top: 3px; }
.inventory-symbol { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 8px; background: var(--sidebar); color: var(--accent); }
.inventory-arrow { font-size: 1.25rem; color: var(--muted); }
.inventory-empty { padding: 18px; color: var(--muted); }
.item-filters { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 1fr) auto; align-items: end; gap: 10px; margin: 0 0 16px; }
.secondary { display: inline-flex; align-items: center; min-height: 42px; padding: 8px 14px; border: 1px solid var(--line); border-radius: 7px; background: white; color: var(--ink); text-decoration: none; }
.secondary:hover { background: var(--mist); }
.back-link { display: inline-block; margin-bottom: 14px; }
.item-tabs a { padding: 8px 10px; border: 1px solid var(--line); border-radius: 7px; text-decoration: none; background: white; }
.form-columns, .item-attribute-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
textarea { width: 100%; padding: 8px 10px; resize: vertical; border: 1px solid var(--line); border-radius: 7px; background: white; color: var(--ink); font: inherit; }
main:has(.item-form) { width: min(100%, 1170px); }
.item-form .fields { margin: 0; }
.item-attributes { min-width: 0; border: 1px solid var(--line); border-radius: 9px; padding: 12px; margin: 5px 0; }
.item-attributes legend, .item-context, .item-attribute-list dt, .record-list time { color: var(--muted); font-size: .9rem; }
.item-context { margin: 4px 0 0; }
.item-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.item-tabs span { color: var(--muted); }
.item-attribute-list { margin-bottom: 0; }
.item-attribute-list dd { margin: 2px 0 0; overflow-wrap: anywhere; }
.item-description { white-space: pre-wrap; overflow-wrap: anywhere; }
.record-list li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 15px; padding: 12px 0; overflow-wrap: anywhere; }
.record-list li > div { min-width: 0; flex: 1 1 160px; }
.record-list p { margin: 5px 0 0; }
.item-audit summary { cursor: pointer; }
.space-dialog [hidden] { display: none; }
@media (max-width: 950px) { .item-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) {
    .form-columns, .item-filters { grid-template-columns: minmax(0, 1fr); }
    .inventory-row { grid-template-columns: 34px minmax(0, 1fr) auto; gap: 8px; }
    .inventory-type { display: none !important; }
}

.equipment-template-picker { max-width: 360px; }
.attribute-table { width: 100%; table-layout: fixed; border-collapse: collapse; text-align: start; }
.attribute-table th { color: var(--muted); font-size: .8rem; font-weight: 550; text-align: start; }
.attribute-table th, .attribute-row td { padding: 6px 4px; }
.attribute-table thead { border-bottom: 1px solid var(--line); }
.attribute-row td { vertical-align: top; border-bottom: 1px solid var(--line); }
.attribute-type-column { width: 21%; }
.attribute-action-column { width: 44px; }
.attribute-row input, .attribute-row select { min-width: 0; }
.attribute-row [hidden], .item-attributes [hidden] { display: none; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.attribute-combobox { position: relative; display: flex; }
.attribute-combobox input { padding-inline-end: 35px; }
.attribute-combobox button { position: absolute; inset: 1px 1px 1px auto; width: 34px; border: 0; border-radius: 0 6px 6px 0; background: var(--mist); color: var(--accent); }
.attribute-combobox ul { position: absolute; inset: calc(100% + 2px) 0 auto; z-index: 4; margin: 0; padding: 3px; overflow-y: auto; max-height: 200px; list-style: none; border: 1px solid var(--line); border-radius: 7px; background: white; box-shadow: 0 5px 16px #23344b25; }
.attribute-combobox li { padding: 6px 8px; cursor: pointer; overflow-wrap: anywhere; }
.attribute-combobox li:hover, .attribute-combobox li[aria-selected=true] { background: var(--sidebar); }
.attribute-type-field select { font-size: .875rem; padding-inline: 6px 3px; }
.attribute-remove { width: 36px; min-height: 42px; border: 1px solid var(--line); border-radius: 7px; background: white; color: var(--muted); font-size: 1.3rem; }
.attribute-remove:hover { background: var(--mist); }
.attribute-extra { margin-top: 7px; }
.attribute-feedback { margin: 9px 0 0; color: var(--accent); font-size: .875rem; }
.attribute-keyboard-hint { margin: 9px 4px 0; color: var(--muted); font-size: .8rem; }
@media (pointer: coarse) { .attribute-keyboard-hint { display: none; } }
.attribute-row[data-draft] .attribute-remove { visibility: hidden; }
@media (max-width: 900px) and (min-width: 721px), (max-width: 500px) {
    .attribute-table, .attribute-table thead, .attribute-table tbody { display: block; }
    .attribute-table colgroup { display: none; }
    .attribute-table tr { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 44px; }
    .attribute-table .attribute-type-heading { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
    .attribute-row { border-bottom: 1px solid var(--line); }
    .attribute-row td { border-bottom: 0; min-width: 0; }
    .attribute-value-field { grid-column: 2 / 4; }
    .attribute-type-field { grid-column: 2; }
    .attribute-action-field { grid-column: 3; }
    .attribute-row [type=date] { padding-inline: 5px; }
}

.document-filters { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) auto; align-items: end; gap: 12px; margin: 18px 0; }
.document-list { width: 100%; border-collapse: collapse; table-layout: fixed; text-align: left; }
.document-list th { font-weight: 550; color: var(--muted); background: var(--mist); }
.document-list th:first-child { width: 54%; }
.document-list th, .document-list td { padding: 12px; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; vertical-align: top; }
.document-list tr:last-child td { border-bottom: 0; }
.document-list td:first-child a { font-weight: 650; }
.document-list td small { display: block; }
.document-number { font-variant-numeric: tabular-nums; letter-spacing: .065em; font-weight: 650; color: var(--accent); }
.document-usage { font-size: .9rem; }
.document-form { margin-top: 16px; }
.document-form-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.document-file-input { border: 1px dashed #a9bdd6; border-radius: 8px; background: var(--mist); padding: 14px; }
.document-file-input input { border: 0; background: none; padding: 4px 0 0; }
.document-file-input input::file-selector-button { cursor: pointer; color: var(--ink); font: inherit; padding: 7px 10px; background: white; border: 1px solid var(--line); border-radius: 6px; margin-right: 9px; }
.document-items { border: 1px solid var(--line); border-radius: 8px; margin: 0; min-width: 0; }
.document-items > div { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(170px, 100%), 1fr)); gap: 6px; max-height: 14rem; overflow-y: auto; }
.document-items label { display: flex; align-items: center; gap: 7px; overflow-wrap: anywhere; }
.document-items input { min-height: 0; width: 18px; height: 18px; flex: 0 0 auto; }
.document-item-link + .document-item-link { margin-inline-start: 10px; }
.document-upload-progress { padding: 0; margin: 0; list-style: none; }
.document-upload-progress li { display: grid; padding: 6px 4px; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.document-image-preview { display: block; max-width: 100%; max-height: min(70vh, 750px); margin: auto; }
.document-pdf-preview { width: 100%; min-height: min(75vh, 740px); border: 1px solid var(--line); border-radius: 6px; }
.supplier-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 12px; padding: 12px; overflow-wrap: anywhere; }
.supplier-row small { display: block; }
.document-form [hidden], [data-document-pdf] [hidden] { display: none; }
@media (max-width: 550px) {
    .document-filters, .document-form-pair { grid-template-columns: 1fr; }
    .document-list th:first-child { width: 49%; }
    .document-list th, .document-list td { padding: 8px 5px; font-size: .8rem; }
}
.item-document-link-form { display: flex; flex-wrap: wrap; align-items: end; gap: 10px; margin-top: 12px; }
.item-document-link-form label { flex: 1 1 220px; min-width: 0; }

.version-upload { margin-top: 16px; }
.version-upload summary { cursor: pointer; color: var(--accent); font-weight: 650; }
.version-list small { display: block; }
.version-list .property-actions { margin-top: 8px; }
.version-list .property-actions form { margin: 0; }
.share-copy { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; margin-bottom: 18px; }
.share-copy label { flex: 1 1 250px; min-width: 0; }
.share-state { margin-top: 18px; }
.guest-document { margin: 0 auto; }
.guest-document .primary { display: inline-block; text-decoration: none; }

.export-options { border: 1px solid var(--line); border-radius: 8px; min-width: 0; margin: 0; }
.export-options-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 14px; }
.export-document-list { max-height: 19rem; overflow: auto; }
.export-options label, .export-boolean { display: flex; align-items: center; gap: 8px; overflow-wrap: anywhere; }
.export-options input, .export-boolean input { min-height: 0; width: 18px; height: 18px; flex: none; }
@media (max-width: 550px) { .export-options-grid { grid-template-columns: minmax(0, 1fr); } }

.mcp-disclosure { margin-top: 16px; }
.mcp-disclosure summary { cursor: pointer; color: var(--accent); font-weight: 650; }
.record-list code { overflow-wrap: anywhere; }

.term-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 8px; }
.term-weekday { text-align: center; padding: 5px; background: var(--mist); }
.term-cell { min-height: 72px; border-top: 1px solid var(--line); border-inline-end: 1px solid var(--line); padding: 4px; min-width: 0; }
.term-cell:nth-child(7n) { border-inline-end: 0; }
.term-cell time { display: block; padding: 0 3px; font-size: .9rem; }
.term-cell a { display: block; background: var(--mist); border-radius: 4px; padding: 2px 4px; margin-top: 4px; overflow-wrap: anywhere; font-size: .76rem; }
.term-today { background: var(--sidebar); }
.term-blank { background: var(--mist); }
.term-done { text-decoration: line-through; }
.term-late { display: block; color: #802527; }
.term-form fieldset > label { margin-top: 10px; }
.term-form fieldset .document-form-pair { grid-template-columns: repeat(auto-fit,minmax(160px,1fr)); }
@media(max-width: 550px) { .term-calendar { padding-inline: 8px; }.term-cell { padding: 2px; min-height: 49px; }.term-cell a { padding: 2px; font-size: .68rem; } }

/* Domokniha workspace */
.shell-workspace {
    --workspace-gutter: clamp(24px, 3.2vw, 48px);
    grid-template-columns: 270px minmax(0, 1fr);
    min-height: 100svh;
}
.workspace-sidebar {
    position: sticky;
    top: 0;
    align-self: start;
    z-index: 4;
    min-height: 100svh;
    gap: 0;
    padding: 26px 19px 18px;
}
.workspace-sidebar .brand { gap: 12px; padding-inline: 7px; margin: 0 0 26px; font-size: 1.52rem; }
.workspace-sidebar .brand-mark { width: 47px; height: 49px; border-radius: 12px; }
.workspace-sidebar .brand-name small { margin-top: 5px; font-size: .87rem; }
.workspace-sidebar-content { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.workspace-sidebar .property-switcher summary { min-height: 70px; padding: 12px; border-radius: 11px; border-color: #ccd8e7; }
.workspace-sidebar .property-switcher-icon { display: grid; place-items: center; }
.workspace-sidebar .property-switcher-label strong { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.workspace-sidebar .property-switcher-label small { font-size: .84rem; }
.workspace-mobile-menu { display: none; }
.workspace-collapse, .workspace-mobile-menu {
    align-items: center; gap: 12px; border: 0; border-radius: 8px;
    background: transparent; color: var(--muted); text-align: start;
}
.workspace-collapse { display: flex; padding: 10px 12px; margin: 11px 0 8px; font-size: .9rem; }
.workspace-collapse:hover, .workspace-mobile-menu:hover, .workspace-profile summary:hover { background: #f3f6fa; }
.workspace-nav { display: flex; flex: 1; flex-direction: column; gap: 20px; }
.workspace-primary-nav, .workspace-utility-nav { display: grid; gap: 3px; }
.workspace-utility-nav { margin-top: auto; }
.workspace-nav .property-overview {
    display: flex; align-items: center; gap: 12px;
    min-height: 42px; padding: 9px 12px; color: var(--ink);
}
.workspace-nav .property-overview[aria-current=page] { color: var(--accent); }
.workspace-nav svg { width: 20px; height: 20px; flex: none; }
.workspace-storage { padding: 0 10px; margin: 20px 0 17px; }
.workspace-storage > div {
    display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 6px;
    color: var(--muted); font-size: .83rem;
}
.workspace-storage progress {
    display: block; appearance: none; width: 100%; height: 5px; margin-top: 9px;
    border: 0; border-radius: 5px; background: #cdd8e7; accent-color: var(--accent);
}
.workspace-storage progress::-webkit-progress-bar { background: #cdd8e7; border-radius: 5px; }
.workspace-storage progress::-webkit-progress-value { background: var(--accent); border-radius: 5px; }
.workspace-storage progress::-moz-progress-bar { background: var(--accent); border-radius: 5px; }
.workspace-profile { position: relative; border-top: 1px solid #ccd8e7; padding-top: 12px; }
.workspace-profile summary {
    display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 10px;
    padding: 7px; border-radius: 8px; cursor: pointer; list-style: none;
}
.workspace-profile summary::-webkit-details-marker { display: none; }
.profile-avatar {
    display: grid; place-items: center; flex: none; border: 1px solid var(--line); border-radius: 50%;
    width: 38px; height: 38px; background: #fafcff; color: var(--accent); font-size: .88rem; text-decoration: none;
}
.profile-info { overflow-wrap: anywhere; }
.profile-info strong { display: block; font-size: .93rem; }
.profile-info small { display: block; font-size: .79rem; }
.profile-chevron { display: grid; place-items: center; transform: rotate(90deg); }
.profile-chevron svg { width: 17px; height: 17px; }
.workspace-profile[open] .profile-chevron { transform: rotate(-90deg); }
.workspace-profile-options {
    position: absolute; inset: auto 0 calc(100% + 5px); z-index: 3; padding: 10px;
    border: 1px solid var(--line); border-radius: 9px; background: white; box-shadow: 0 8px 24px #23344b1a;
}
.workspace-body { min-width: 0; }
.workspace-topbar {
    display: flex; align-items: center; gap: 16px;
    padding: 0 var(--workspace-gutter); min-height: 74px;
    background: #f7f9fc; border-bottom: 1px solid var(--line);
}
.workspace-search { display: flex; align-items: center; gap: 9px; flex: 1; min-width: 0; }
.workspace-search-input { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; color: var(--muted); }
.workspace-search-input svg { flex: none; }
.workspace-search input, .workspace-search select {
    border-color: transparent; background: transparent; padding-inline: 5px; color: var(--muted); font-weight: 450;
}
.workspace-search input { color: var(--ink); width: 100%; min-width: 0; }
.workspace-search input::placeholder { color: var(--muted); }
.workspace-search select { cursor: pointer; }
.workspace-search-submit {
    display: grid; place-items: center; flex: none; width: 30px; height: 38px;
    border: 0; border-radius: 7px; color: var(--accent); background: transparent;
}
.workspace-search-submit svg { width: 17px; height: 17px; }
.workspace-search-submit:hover { background: var(--sidebar); }
.workspace-body > main { width: min(100%, 1200px); margin: 0 auto; padding: 36px var(--workspace-gutter); }
.workspace-body > .workspace-dashboard { width: min(100%, 1500px); padding-top: 40px; }

.dashboard-hero { display: flex; align-items: center; gap: 19px; margin-bottom: 29px; }
.dashboard-property-icon {
    display: grid; place-items: center; flex: none;
    width: 74px; height: 74px; border-radius: 16px; color: var(--accent); background: #dfe8f4;
}
.dashboard-property-icon svg { width: 29px; height: 29px; }
.dashboard-hero .caption { margin-bottom: 7px; }
.dashboard-hero h1 { font-size: clamp(1.85rem, 3.5vw, 2.65rem); margin-bottom: 7px; }
.dashboard-hero p:last-child { margin: 0; }
.dashboard-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-bottom: 31px; }
.dashboard-actions a {
    display: inline-flex; align-items: center; gap: 8px; min-height: 45px;
    padding: 8px 14px; border: 1px solid var(--line); border-radius: 9px;
    background: white; color: var(--ink); font-weight: 550; text-decoration: none;
}
.dashboard-actions .primary { background: var(--accent); color: white; border-color: var(--accent); }
.dashboard-actions a:not(.primary):hover { border-color: var(--accent); }
.dashboard-actions .primary:hover { background: #284d7c; }
.dashboard-actions svg { width: 19px; height: 19px; }
.dashboard-columns { display: grid; grid-template-columns: minmax(0,1.08fr) minmax(0,1fr); gap: clamp(16px, 2.6vw, 32px); }
.dashboard-section { margin-top: 32px; }
.dashboard-section-heading {
    display: flex; align-items: baseline; justify-content: space-between;
    gap: 5px 12px; flex-wrap: wrap; margin-bottom: 14px;
}
.dashboard-section-heading h2 { margin: 0; font-size: 1.22rem; letter-spacing: -.02em; }
.dashboard-section-heading a {
    display: inline-flex; align-items: center; gap: 7px;
    text-decoration: none; font-size: .9rem; font-weight: 550;
}
.dashboard-section-heading a:hover { text-decoration: underline; }
.dashboard-section-heading svg { width: 15px; height: 15px; }
.dashboard-list, .dashboard-parts {
    margin: 0; padding: 0; list-style: none;
}
.dashboard-list, .dashboard-parts > li {
    border: 1px solid var(--line); border-radius: 12px; background: white;
}
.dashboard-list > li + li { border-top: 1px solid var(--line); }
.dashboard-row {
    display: flex; align-items: center; gap: 12px; min-height: 79px;
    padding: 14px clamp(12px, 1.65vw, 19px); color: var(--ink); text-decoration: none;
}
.dashboard-row:hover { background: #f7faff; }
.dashboard-list li:first-child .dashboard-row { border-radius: 11px 11px 0 0; }
.dashboard-list li:last-child .dashboard-row { border-radius: 0 0 11px 11px; }
.dashboard-list li:only-child .dashboard-row, .dashboard-parts .dashboard-row { border-radius: 11px; }
.dashboard-row-text { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.dashboard-row-text strong { display: block; font-weight: 600; }
.dashboard-row-text small { display: block; margin-top: 2px; }
.dashboard-document .dashboard-row-text strong { color: var(--accent); }
.dashboard-row-icon, .dashboard-date {
    display: grid; place-content: center; flex: none; text-align: center; gap: 1px;
    background: var(--sidebar); color: var(--accent); border-radius: 9px;
}
.dashboard-row-icon { width: 43px; height: 46px; }
.dashboard-date { min-width: 46px; min-height: 54px; padding: 3px 5px; font-size: .76rem; }
.dashboard-date strong { font-size: 1.35rem; line-height: 1.1; }
.dashboard-due { background: #f8efdf; color: #805d29; border-radius: 7px; padding: 4px 7px; font-size: .76rem; }
.dashboard-row-arrow, .dashboard-part-icon { display: grid; place-content: center; flex: none; color: var(--accent); }
.dashboard-row-arrow svg { width: 16px; height: 16px; color: var(--muted); }
.dashboard-empty { padding: 18px; color: var(--muted); }
.dashboard-parts { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 12px; }
.dashboard-timeline { list-style: none; margin: 0; padding: 0 0 0 4px; }
.dashboard-timeline li { position: relative; padding: 9px 0 9px 25px; overflow-wrap: anywhere; }
.dashboard-timeline li::before {
    content: ''; position: absolute; inset: 17px auto auto 3px;
    width: 8px; height: 8px; background: #a6b9d2; border-radius: 50%;
}
.dashboard-timeline a { color: var(--accent); text-decoration: none; }
.dashboard-timeline a:hover { text-decoration: underline; }
.dashboard-timeline small { display: block; margin-top: 3px; }
.timeline-details { margin-top: 6px; color: var(--muted); font-size: .88rem; }
.timeline-details summary { cursor: pointer; width: fit-content; }
.timeline-details dl { margin: 6px 0; }
.timeline-details dt { font-weight: 600; }
.timeline-details dd { margin: 0 0 7px; }

@media (min-width: 761px) {
    .workspace-collapsed { grid-template-columns: 74px minmax(0,1fr); }
    .workspace-collapsed .workspace-sidebar { padding-inline: 10px; }
    .workspace-collapsed .workspace-sidebar .brand { justify-content: center; padding-inline: 0; }
    .workspace-collapsed .brand-name, .workspace-collapsed .property-switcher-label,
    .workspace-collapsed .property-switcher-chevron, .workspace-collapsed .workspace-collapse span,
    .workspace-collapsed .workspace-nav a span, .workspace-collapsed .profile-info,
    .workspace-collapsed .profile-chevron, .workspace-collapsed .workspace-storage { display: none; }
    .workspace-collapsed .property-switcher summary, .workspace-collapsed .workspace-collapse,
    .workspace-collapsed .workspace-nav .property-overview { justify-content: center; padding-inline: 0; }
    .workspace-collapsed .property-switcher summary { min-height: 48px; }
    .workspace-collapsed .workspace-collapse svg { transform: scaleX(-1); }
    .workspace-collapsed .workspace-profile { margin-top: 16px; }
    .workspace-collapsed .workspace-profile summary { display: flex; justify-content: center; padding-inline: 0; }
    .workspace-collapsed .property-options { inset: 0 auto auto calc(100% + 7px); width: 235px; }
    .workspace-collapsed .workspace-profile-options { inset: auto auto 0 calc(100% + 7px); width: 195px; }
}
@media (max-height: 890px) and (min-width: 761px) {
    .workspace-sidebar { position: relative; }
    .workspace-sidebar .brand { margin-bottom: 17px; }
    .workspace-sidebar .property-switcher summary { min-height: 58px; }
    .workspace-collapse { margin: 6px 0 4px; }
    .workspace-nav { gap: 12px; }
    .workspace-nav .property-overview { min-height: 36px; padding-block: 6px; font-size: .92rem; }
    .workspace-storage { margin: 12px 0; }
}
@media (max-width: 1060px) {
    .dashboard-columns { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
    .shell-workspace { grid-template-columns: minmax(0,1fr); grid-template-rows: auto 1fr; }
    .workspace-sidebar { position: relative; min-height: 0; padding: 12px 16px; border-right: 0; border-bottom: 1px solid var(--line); }
    .workspace-sidebar .brand { width: fit-content; margin: 0; padding: 0; font-size: 1.2rem; }
    .workspace-sidebar .brand-mark { width: 38px; height: 40px; border-radius: 9px; }
    .workspace-sidebar .brand-name small { display: none; }
    .workspace-enhanced .workspace-mobile-menu { display: grid; place-items: center; position: absolute; inset: 12px 16px auto auto; width: 40px; height: 40px; }
    .workspace-enhanced:not(.workspace-menu-open) .workspace-sidebar-content { display: none; }
    .workspace-sidebar-content { margin-top: 14px; }
    .workspace-collapse { display: none; }
    .workspace-sidebar .property-switcher { margin-bottom: 8px; }
    .workspace-sidebar .property-switcher summary { min-height: 52px; padding-block: 8px; }
    .workspace-sidebar .workspace-nav { gap: 10px; }
    .workspace-primary-nav, .workspace-utility-nav { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .workspace-sidebar .workspace-nav a { font-size: .87rem; }
    .workspace-sidebar .workspace-storage { margin-top: 12px; }
    .workspace-topbar { padding: 0 15px; gap: 8px; min-height: 62px; }
    .workspace-search { gap: 3px; }
    .workspace-search-input { gap: 3px; }
    .workspace-search-input svg { width: 18px; height: 18px; }
    .workspace-search input, .workspace-search select { font-size: .8rem; }
    .workspace-search select { width: clamp(95px, 29vw, 160px); padding-inline: 0; }
    .workspace-search-submit { width: 25px; }
    .workspace-topbar .profile-avatar { width: 32px; height: 32px; font-size: .76rem; }
    .workspace-body > main, .workspace-body > .workspace-dashboard { padding: 25px 16px 32px; }
    .dashboard-hero { gap: 12px; margin-bottom: 20px; }
    .dashboard-property-icon { width: 59px; height: 59px; border-radius: 12px; }
    .dashboard-actions { margin-bottom: 23px; }
    .dashboard-actions a { padding: 6px 8px; gap: 5px; font-size: .84rem; }
    .dashboard-columns { gap: 22px; }
    .dashboard-section { margin-top: 24px; }
    .dashboard-parts { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 375px) {
    .dashboard-parts { grid-template-columns: 1fr; }
}

.share-entry { display: inline-flex; align-items: center; gap: 7px; }
.share-entry svg, .space-row-actions svg { width: 18px; height: 18px; }
.space-row-actions { display: flex; justify-content: flex-end; gap: 6px; }
.space-row-actions a:hover { background: var(--mist); }
.share-scope-note {
    color: var(--ink);
    background: var(--sidebar);
    border-left: 3px solid var(--accent);
    border-radius: 6px;
    padding: 10px 14px;
    margin: 8px 0 12px;
}
.guest-scope { width: min(100%, 860px); }
.guest-scope-heading { display: flex; align-items: center; gap: 16px; margin: 16px 0 25px; overflow-wrap: anywhere; }
.guest-scope-heading h1 { margin: 0 0 4px; }
.guest-scope-heading .caption { margin: 0 0 3px; }
.guest-scope-heading .muted { margin: 0; }
.guest-scope-section { margin: 22px 0; }
.guest-scope-contact { margin-bottom: 20px; overflow-wrap: anywhere; }

.member-list { list-style: none; padding: 0; margin: 12px 0 20px; }
.member-list > li {
    display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr) minmax(145px,auto); gap: 12px;
    align-items: start; padding: 11px 0; border-bottom: 1px solid var(--line); overflow-wrap: anywhere;
}
.member-list small, .member-targets small { display: block; }
.member-grants { margin: 6px 0 0; padding-inline-start: 20px; font-size: .88rem; }
.member-targets { min-width: 0; border: 1px solid var(--line); border-radius: 9px; padding: 8px 12px; }
.member-targets p { margin: 4px 0 10px; }
.member-target-list { display: grid; gap: 6px; max-height: 18rem; overflow: auto; }
.member-target-list label, .member-check { display: flex; align-items: start; gap: 9px; }
.member-target-list input, .member-check input { width: auto; min-height: 0; margin-top: .28rem; }
.member-check[hidden] { display: none; }
.member-invite-scope { grid-column: 1 / -1; display: grid; gap: 10px; }
@media (max-width: 690px) {
    .member-list > li { grid-template-columns: minmax(0,1fr); gap: 5px; }
}
.member-actions { display: grid; justify-items: start; }
.member-actions .text-button { padding-inline: 0; text-align: start; }
.member-inherited { margin-top: 7px; color: var(--muted); font-size: .88rem; }
.member-inherited summary { cursor: pointer; }

#guest-links h2 { padding: 14px 12px 0; }
.member-targets [hidden] { display: none; }
.member-targets input[type=search] { margin-bottom: 6px; }

.account-remember { display: flex; align-items: center; gap: 8px; }
.account-remember input { width: 16px; height: 16px; min-height: 0; margin: 0; flex: none; }

.trash-action { display: inline-flex; align-items: center; gap: 7px; color: #952e37; }
.trash-action svg { width: 18px; height: 18px; flex: none; }
.trash-danger { background: #952e37; border-color: #952e37; }
.trash-danger:hover { background: #78252c; border-color: #78252c; }

.bulk-toolbar { display: flex; flex-wrap: wrap; align-items: end; gap: 10px 18px; margin: 12px 0; }
.bulk-toolbar > label:not(.bulk-select-all) { flex: 1 1 200px; max-width: 340px; }
.bulk-select-all { display: flex; align-items: center; padding: 9px 0; }
.bulk-select-all[hidden] { display: none; }
.bulk-check { display: grid; place-items: center; min-width: 34px; min-height: 37px; cursor: pointer; }
.bulk-check input, .bulk-select-all input { width: 16px; height: 16px; min-height: 0; margin: 0; accent-color: var(--accent); }
.inventory-list .bulk-item { display: grid; grid-template-columns: auto minmax(0,1fr); align-items: center; padding-inline-start: 8px; }
.document-list .bulk-column { width: 43px; padding-inline: 4px; vertical-align: middle; }
.document-list.bulk-document-list th:first-child { width: 43px; }
.document-list.bulk-document-list th:nth-child(2) { width: 46%; }
.document-list.bulk-document-list td:nth-child(2) a { font-weight: 650; }
.bulk-access-row { border-top: 1px solid var(--line); padding-top: 10px; margin-top: 14px; overflow-wrap: anywhere; }
.bulk-access-row h3 { margin: 0; font-size: 1rem; }
.bulk-access-row p { margin: 3px 0 7px; }
.bulk-access-row ul { margin: 2px 0 9px; padding-inline-start: 22px; }
.bulk-access-gained strong { color: #276248; }
.bulk-access-lost strong { color: #952e37; }

/* Public introduction */
.shell-landing { display: block; min-height: 100svh; }
.landing-header {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px;
    width: min(100%, 1250px); margin: 0 auto; padding: 22px clamp(18px, 5vw, 56px);
    border-bottom: 1px solid var(--line);
}
.landing-header .brand { margin: 0; }
.landing-header .brand-mark { width: 41px; height: 43px; }
.landing-header-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.landing-header-actions .secondary { font-weight: 550; white-space: nowrap; }
.landing-main { width: min(100%, 1250px); margin: 0 auto; padding: 0 clamp(18px, 5vw, 56px) 44px; }
.landing-hero {
    display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr);
    gap: clamp(24px, 5.5vw, 84px); align-items: center; padding: clamp(36px, 6.5vw, 84px) 0 clamp(32px, 6vw, 72px);
}
.landing-copy h1 {
    font-size: clamp(2.35rem, 5.2vw, 4.65rem); line-height: 1.03; letter-spacing: -.05em;
    margin: 0 0 21px; text-wrap: balance;
}
.landing-copy > p { max-width: 49ch; margin: 0; color: var(--muted); font-size: clamp(1rem, 1.55vw, 1.2rem); line-height: 1.65; }
.landing-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 19px; margin-top: 26px; }
.landing-main a.primary {
    display: inline-flex; align-items: center; gap: 8px; font-weight: 650; min-height: 48px;
    text-decoration: none; padding: 9px 14px; border-radius: 9px;
}
.landing-main a.primary:hover { background: #274b78; }
.landing-main a.primary svg { width: 16px; height: 16px; }
.landing-jump { font-weight: 550; text-underline-offset: 3px; }
.landing-preview { min-width: 0; padding: clamp(15px, 2.8vw, 30px); border: 1px solid var(--line); border-radius: 23px; background: #e6edf6; }
.landing-preview-heading, .landing-preview-term, .landing-preview-documents li { display: flex; align-items: center; gap: 12px; }
.landing-preview-heading { margin-bottom: 18px; }
.landing-preview-heading strong { font-size: 1.3rem; }
.landing-preview strong, .landing-preview small { display: block; }
.landing-preview small { margin-top: 2px; }
.landing-icon { display: grid; place-items: center; flex: none; width: 42px; height: 42px; border-radius: 10px; color: var(--accent); background: #ebf1fa; }
.landing-preview-heading .landing-icon { width: 50px; height: 50px; background: var(--accent); color: white; }
.landing-preview-content { background: white; border: 1px solid var(--line); border-radius: 14px; padding: clamp(12px, 2.3vw, 20px); }
.landing-preview-title { margin: 0 0 5px; color: var(--muted); font-weight: 550; font-size: .84rem; }
.landing-preview-documents { list-style: none; padding: 0; margin: 0; }
.landing-preview-documents li { padding: 10px 0; }
.landing-preview-documents li + li { border-top: 1px solid var(--line); }
.landing-preview-term { margin-top: 11px; padding: 11px; border-radius: 10px; background: #f6f0e4; }
.landing-preview-term .landing-icon { color: #805d29; background: #efe3ca; }
.landing-features > h2, .landing-start h2 { font-size: clamp(1.45rem, 2.5vw, 2rem); letter-spacing: -.025em; }
.landing-feature-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.landing-feature-grid article { border: 1px solid var(--line); border-radius: 13px; background: white; padding: clamp(16px, 2.5vw, 25px); }
.landing-feature-grid h3 { margin: 13px 0 5px; font-size: 1.08rem; }
.landing-feature-grid p, .landing-start p { margin: 0; color: var(--muted); }
.landing-start {
    display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px;
    margin-top: 27px; padding: clamp(16px, 3vw, 27px); border-radius: 15px; background: var(--sidebar);
}
.landing-start h2 { margin: 0 0 4px; }
@media (max-width: 800px) {
    .landing-hero { grid-template-columns: minmax(0, 1fr); }
    .landing-preview { width: min(100%, 500px); }
}
@media (max-width: 660px) {
    .landing-feature-grid { grid-template-columns: minmax(0, 1fr); }
    .landing-header { padding-block: 13px; }
    .landing-header-actions { column-gap: 8px; }
}
