@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;750;800&display=swap');

:root {
    color-scheme: light;
    font-family: "Inter", "Segoe UI", Arial, sans-serif;
    background: var(--bg-main);
    color: var(--text-primary);
    scrollbar-gutter: stable;
    --main-content-inline-padding: 20px;
    --main-status-width: 248px;

    /* Background colors */
    --bg-main: #f5f7f8;
    --bg-card: #f9fbfb;
    --bg-light: #f3f6f7;
    --bg-message: #f4f7f8;
    --bg-passive: #fbfcfc;
    --bg-elevated: #eef3f4;
    --bg-active: #eef7f2;
    --bg-accent: #e8f4ef;
    --bg-clear: #edf8f2;
    --bg-planned: #eef5fb;
    --bg-working: #fff8e8;
    --bg-attention: #fff0ee;
    --bg-selected: #eaf3fb;
    --bg-token: #e5f4ee;
    --bg-success: #dff3e9;
    --bg-warning: #fff3cd;
    --bg-danger: #fde8e6;
    --bg-reservation: #d4edda;
    --bg-white: white;

    /* Sidebar colors */
    --sidebar-bg: #172326;
    --sidebar-element: #203034;
    --sidebar-hover: #243437;
    --sidebar-border: #2d4044;
    --sidebar-border-light: #40585d;

    /* Text colors */
    --text-primary: #1d2528;
    --text-secondary: #203034;
    --text-sidebar: #f6fbfb;
    --text-sidebar-light: #d7e2e4;
    --text-sidebar-muted: #b7c5c7;
    --text-sidebar-muted-light: #91a5a9;
    --text-muted: #617176;
    --text-muted-light: #65767b;
    --text-muted-darker: #64757a;
    --text-muted-darkest: #52666c;
    --text-label: #425157;
    --text-empty: #8a9a9e;

    /* Primary/accent colors */
    --primary-accent: #4fb286;
    --primary-dark: #1e6954;
    --primary-darkest: #0d1b1e;

    /* Border colors */
    --border-main: #c8d3d6;
    --border-panel: #dce4e6;
    --border-card: #e4ebed;
    --border-divider: #edf1f2;
    --border-icon: #d1dcdf;
    --border-status: #d8e3e5;
    --border-dashed: #cdd8db;
    --border-selection: #2b6f9f;

    /* Status colors */
    --danger-primary: #b42318;
    --danger-text: #9f1f17;
    --danger-border: #efb4ae;
    --warning-text: #765600;
    --success-text: #1c6b4d;
    --focus-border: #7aa99b;
    --hover-border: #9bb8b0;
    --success-border: #b9dfcf;
    --selected-border: #7ccaa8;
    --selected-calendar-border: #84b8de;
    --notification-active-border: #b7d8cf;

    /* Calendar colors */
    --reservation-border: #28a745;
    --reservation-text: #155724;
    --task-border: #ffc107;
    --task-text: #856404;

    /* Shadows */
    --shadow-backdrop: rgba(13, 27, 30, 0.62);
    --shadow-dialog: rgba(23, 35, 38, 0.32);
    --shadow-hover: rgba(79, 178, 134, 0.12);
    --shadow-focus: rgba(79, 178, 134, 0.16);
}

/* Ocean Theme - Blue/Cyan accent */
.theme-ocean {
    --primary-accent: #00bcd4;
    --primary-dark: #008ba3;
    --primary-darkest: #005f6b;
    --sidebar-bg: #1a3a4a;
    --sidebar-element: #244a5c;
    --sidebar-hover: #2a5568;
    --sidebar-border: #356678;
    --sidebar-border-light: #4a7a8a;
    --bg-accent: #e0f7fa;
    --bg-active: #e8f5f9;
    --bg-clear: #d1f2f5;
    --bg-token: #b3e5fc;
    --bg-selected: #e3f2fd;
    --focus-border: #4dd0e1;
    --hover-border: #80deea;
    --success-border: #80deea;
    --selected-border: #4dd0e1;
    --notification-active-border: #80deea;
    --shadow-hover: rgba(0, 188, 212, 0.12);
    --shadow-focus: rgba(0, 188, 212, 0.16);
}

/* Forest Theme - Deep green accent */
.theme-forest {
    --primary-accent: #4caf50;
    --primary-dark: #2e7d32;
    --primary-darkest: #1b5e20;
    --sidebar-bg: #1e3a2f;
    --sidebar-element: #2a4a3c;
    --sidebar-hover: #335a48;
    --sidebar-border: #3d6b56;
    --sidebar-border-light: #4a8068;
    --bg-accent: #e8f5e9;
    --bg-active: #f1f8f3;
    --bg-clear: #c8e6c9;
    --bg-token: #a5d6a7;
    --bg-selected: #e8f5e9;
    --focus-border: #81c784;
    --hover-border: #a5d6a7;
    --success-border: #a5d6a7;
    --selected-border: #81c784;
    --notification-active-border: #a5d6a7;
    --shadow-hover: rgba(76, 175, 80, 0.12);
    --shadow-focus: rgba(76, 175, 80, 0.16);
}

/* Sunset Theme - Warm apricot/chill colors with lighter sidebar */
.theme-sunset {
    --primary-accent: #f97316;
    --primary-dark: #ea580c;
    --primary-darkest: #c2410c;
    --sidebar-bg: #ffedd5;
    --sidebar-element: #fed7aa;
    --sidebar-hover: #fdba74;
    --sidebar-border: #fdba74;
    --sidebar-border-light: #fdba74;
    
    --bg-accent: #fff7ed;
    --bg-active: #ffedd5;
    --bg-clear: #fed7aa;
    --bg-token: #fdba74;
    --bg-selected: #ffedd5;
    
    --focus-border: #f97316;
    --hover-border: #fb923c;
    --success-border: #fdba74;
    --selected-border: #f97316;
    --notification-active-border: #fb923c;
    
    --text-sidebar: #9a3412;
    --text-sidebar-light: #c2410c;
    --text-sidebar-muted: #ea580c;
    --text-sidebar-muted-light: #f97316;
    
    --shadow-hover: rgba(249, 115, 22, 0.15);
    --shadow-focus: rgba(249, 115, 22, 0.25);
}

/* Dark Theme - Visual Studio inspired dark theme with colorful accents */
.theme-dark {
    color-scheme: dark;
    --bg-main: #1e1e1e;
    --bg-card: #252526;
    --bg-light: #2d2d30;
    --bg-message: #252526;
    --bg-passive: #2d2d30;
    --bg-elevated: #333337;
    --bg-active: #37373d;
    --bg-accent: #264f78;
    --bg-clear: #094771;
    --bg-planned: #264f78;
    --bg-working: #4e4e4e;
    --bg-attention: #4e2e2e;
    --bg-selected: #37373d;
    --bg-token: #264f78;
    --bg-success: #1e3a1e;
    --bg-warning: #4e3e1e;
    --bg-danger: #4e1e1e;
    --bg-reservation: #1e3a1e;
    --bg-white: #252526;
    
    --sidebar-bg: #333337;
    --sidebar-element: #3e3e42;
    --sidebar-hover: #2d2d30;
    --sidebar-border: #454545;
    --sidebar-border-light: #5a5a5a;
    
    --text-primary: #d4d4d4;
    --text-secondary: #cccccc;
    --text-sidebar: #ffffff;
    --text-sidebar-light: #e0e0e0;
    --text-sidebar-muted: #9d9d9d;
    --text-sidebar-muted-light: #808080;
    --text-muted: #858585;
    --text-muted-light: #6a6a6a;
    --text-muted-darker: #6a6a6a;
    --text-muted-darkest: #505050;
    --text-label: #9cdcfe;
    --text-empty: #6a6a6a;
    
    --border-main: #454545;
    --border-panel: #454545;
    --border-card: #3e3e42;
    --border-divider: #2d2d30;
    --border-icon: #5a5a5a;
    --border-status: #454545;
    --border-dashed: #5a5a5a;
    
    --primary-accent: #007acc;
    --primary-dark: #005a9e;
    --primary-darkest: #004080;
    
    --focus-border: #007acc;
    --hover-border: #1e90ff;
    --success-border: #4ec9b0;
    --selected-border: #007acc;
    --notification-active-border: #dcdcaa;
    
    --danger-primary: #f14c4c;
    --danger-text: #f14c4c;
    --danger-border: #f14c4c;
    --warning-text: #dcdcaa;
    --success-text: #4ec9b0;
    
    --reservation-border: #4ec9b0;
    --reservation-text: #4ec9b0;
    --task-border: #dcdcaa;
    --task-text: #dcdcaa;
    
    --shadow-backdrop: rgba(0, 0, 0, 0.8);
    --shadow-dialog: rgba(0, 0, 0, 0.6);
    --shadow-hover: rgba(0, 122, 204, 0.2);
    --shadow-focus: rgba(0, 122, 204, 0.3);
}

/* Colorful Theme - Strong signal colors for badges and important elements */
.theme-colorful {
    --primary-accent: #6366f1;
    --primary-dark: #4f46e5;
    --primary-darkest: #3730a3;
    --sidebar-bg: #6366f1;
    --sidebar-element: #818cf8;
    --sidebar-hover: #a5b4fc;
    --sidebar-border: #c7d2fe;
    --sidebar-border-light: #e0e7ff;
    
    --bg-accent: #e0e7ff;
    --bg-active: #eef2ff;
    --bg-clear: #c7d2fe;
    --bg-token: #a5b4fc;
    --bg-selected: #e0e7ff;
    
    --focus-border: #818cf8;
    --hover-border: #a5b4fc;
    --success-border: #34d399;
    --selected-border: #818cf8;
    --notification-active-border: #fbbf24;
    
    --danger-primary: #ef4444;
    --danger-text: #dc2626;
    --danger-border: #fca5a5;
    --warning-text: #d97706;
    --success-text: #059669;
    
    --reservation-border: #10b981;
    --reservation-text: #047857;
    --task-border: #f59e0b;
    --task-text: #b45309;
    
    --text-primary: #1f2937;
    --text-secondary: #374151;
    --text-label: #4b5563;
    --text-muted: #6b7280;
    
    --shadow-hover: rgba(99, 102, 241, 0.15);
    --shadow-focus: rgba(99, 102, 241, 0.25);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--bg-main);
    -webkit-user-select: none;
    user-select: none;
}

a {
    color: inherit;
}

input,
textarea,
[contenteditable="true"],
.copyable,
.selectable-text,
.detail-list dd,
.message-bubble p,
.document-main strong,
.document-main span,
.document-preview-header h2,
.document-preview-header span,
.document-preview-empty span,
.inventory-row-main strong,
.inventory-row-main span,
.inventory-row-detail {
    -webkit-user-select: text;
    user-select: text;
}

.app-shell {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    min-height: 100vh;
}

.mobile-topbar,
.mobile-menu-scrim {
    display: none;
}

.sidebar {
    background: var(--sidebar-bg);
    color: var(--text-sidebar);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 24px;
    height: 100vh;
    overflow-y: auto;
    padding: 24px 18px;
    position: sticky;
    top: 0;
}

.sidebar-primary {
    min-width: 0;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: inherit;
    text-decoration: none;
    margin-bottom: 28px;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 8px;
    background: var(--primary-accent);
    color: var(--primary-darkest);
    font-weight: 800;
}

.brand strong,
.brand small {
    display: block;
}

.brand small {
    color: var(--text-sidebar-muted);
    margin-top: 2px;
}

.active-property-picker {
    border-bottom: 1px solid var(--sidebar-border);
    border-top: 1px solid var(--sidebar-border);
    display: grid;
    gap: 10px;
    margin-top: 18px;
    padding: 14px 0;
}

.active-property-heading {
    align-items: center;
    display: flex;
    justify-content: space-between;
    gap: 8px;
}

.active-property-heading span {
    color: var(--text-sidebar-muted-light);
    font-size: 12px;
    font-weight: 750;
    text-transform: uppercase;
}

.active-property-heading small {
    color: var(--text-sidebar-muted-light);
    font-size: 12px;
}

.active-property-search {
    align-items: center;
    background: var(--sidebar-element);
    border: 1px solid var(--sidebar-border-light);
    border-radius: 7px;
    display: flex;
    gap: 8px;
    min-height: 36px;
    padding: 0 10px;
}

.active-property-search svg[blazicon] {
    color: var(--text-sidebar-muted-light);
    font-size: 15px;
}

.active-property-search input {
    background: transparent;
    border: 0;
    color: var(--text-sidebar);
    min-height: 34px;
    padding: 0;
}

.active-property-search input::placeholder {
    color: var(--text-sidebar-muted-light);
}

.active-property-list {
    display: grid;
    gap: 6px;
    max-height: 330px;
    overflow-y: auto;
    padding-right: 2px;
}

.active-property-option {
    align-items: center;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 7px;
    color: var(--text-sidebar-light);
    cursor: pointer;
    display: flex;
    font: inherit;
    gap: 8px;
    justify-content: space-between;
    min-height: 58px;
    padding: 9px 10px;
    text-align: left;
    width: 100%;
}

.active-property-option:hover,
.active-property-option.selected {
    background: var(--sidebar-hover);
    border-color: var(--sidebar-border-light);
    color: white;
}

.active-property-option.selected {
    border-color: var(--primary-accent);
}

.active-property-option span {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.active-property-option strong,
.active-property-option small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.active-property-option strong {
    font-size: 14px;
}

.active-property-option small {
    color: var(--text-sidebar-muted);
    font-size: 12px;
}

.active-property-option em {
    background: var(--sidebar-element);
    border-radius: 999px;
    color: var(--text-sidebar-light);
    flex: 0 0 auto;
    font-size: 11px;
    font-style: normal;
    font-weight: 700;
    padding: 3px 7px;
}

.active-property-empty {
    color: var(--text-sidebar-muted);
    font-size: 13px;
    margin: 0;
}

.active-property-manage {
    align-items: center;
    border-radius: 7px;
    color: var(--text-sidebar-muted);
    display: flex;
    font-size: 13px;
    font-weight: 700;
    gap: 8px;
    min-height: 34px;
    padding: 7px 10px;
    text-decoration: none;
}

.active-property-manage:hover {
    background: var(--sidebar-hover);
    color: white;
}

.active-property-manage svg[blazicon] {
    font-size: 15px;
}

.active-workspace-mode {
    background: var(--sidebar-element);
    border: 1px solid var(--sidebar-border-light);
    border-radius: 8px;
    display: grid;
    gap: 3px;
    grid-template-columns: 1fr 1fr;
    padding: 3px;
}

.active-workspace-mode button {
    background: transparent;
    border: 0;
    border-radius: 6px;
    color: var(--text-sidebar-muted);
    cursor: pointer;
    font: inherit;
    font-size: 12px;
    font-weight: 750;
    min-height: 32px;
    padding: 0 7px;
}

.active-workspace-mode button.active {
    background: var(--bg-white);
    color: var(--sidebar-bg);
}

.nav-list {
    display: grid;
    gap: 6px;
}

.nav-list a {
    align-items: center;
    border-radius: 7px;
    color: var(--text-sidebar-light);
    display: flex;
    gap: 10px;
    padding: 10px 12px;
    text-decoration: none;
}

.nav-list a.active,
.nav-list a:hover {
    background: var(--sidebar-hover);
    color: white;
}

.nav-list svg[blazicon] {
    flex: 0 0 auto;
    font-size: 18px;
}

.debug-identity {
    border-top: 1px solid var(--sidebar-border);
    display: grid;
    gap: 8px;
    padding-top: 16px;
}

.signed-in-user {
    border-top: 1px solid var(--sidebar-border);
    display: grid;
    gap: 5px;
    padding-top: 16px;
}

.signed-in-user span {
    color: var(--text-sidebar-muted-light);
    font-size: 12px;
    font-weight: 750;
    text-transform: uppercase;
}

.signed-in-user strong {
    color: var(--text-sidebar);
    overflow: hidden;
    text-overflow: ellipsis;
}

.signed-in-user small {
    color: var(--text-sidebar-muted-light);
    overflow: hidden;
    text-overflow: ellipsis;
}

.debug-identity label {
    color: var(--text-sidebar-light);
}

.debug-identity label span {
    color: var(--text-sidebar-muted-light);
    font-size: 12px;
    font-weight: 750;
    text-transform: uppercase;
}

.debug-identity select {
    background: var(--sidebar-element);
    border-color: var(--sidebar-border-light);
    color: var(--text-sidebar);
}

.debug-refresh {
    align-items: center;
    background: transparent;
    border: 0;
    color: var(--text-sidebar-muted);
    cursor: pointer;
    display: inline-flex;
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    gap: 7px;
    padding: 0;
    text-align: left;
}

.debug-refresh:hover {
    color: white;
}

.debug-identity small {
    color: var(--text-sidebar-muted-light);
    overflow: hidden;
    text-overflow: ellipsis;
}

.theme-switcher {
    border-top: 1px solid var(--sidebar-border);
    display: grid;
    gap: 8px;
    padding-top: 16px;
}

.theme-switcher label {
    color: var(--text-sidebar-light);
}

.theme-switcher label span {
    color: var(--text-sidebar-muted-light);
    font-size: 12px;
    font-weight: 750;
    text-transform: uppercase;
}

.theme-switcher select {
    background: var(--sidebar-element);
    border-color: var(--sidebar-border-light);
    color: var(--text-sidebar);
}

.main-content {
    padding: 20px;
    position: relative;
}

.app-main-topbar {
    align-items: flex-start;
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    min-height: 0;
    position: absolute;
    right: var(--main-content-inline-padding);
    top: 20px;
    z-index: 10;
}

.topbar-icon-link {
    align-items: center;
    background: var(--bg-white);
    border: 1px solid var(--border-main);
    border-radius: 8px;
    color: var(--text-secondary);
    display: inline-flex;
    height: 38px;
    justify-content: center;
    position: relative;
    text-decoration: none;
    width: 38px;
}

.topbar-icon-link.active {
    background: var(--bg-accent);
    border-color: var(--focus-border);
    color: var(--primary-darkest);
}

.topbar-icon-link.passive {
    background: var(--bg-passive);
    color: var(--text-muted-darkest);
}

.topbar-icon-link svg[blazicon] {
    font-size: 18px;
}

.page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 24px;
    padding-right: calc(var(--main-status-width) + 18px);
}

.property-header-actions {
    align-items: flex-start;
    display: flex;
    flex: 0 0 auto;
    gap: 10px;
}

.property-header-photo-wrap {
    display: grid;
    gap: 0;
    justify-items: end;
    max-width: 180px;
}

.property-header-photo-wrap .muted,
.property-header-photo-wrap .notice {
    font-size: 12px;
    margin: 0;
    max-width: 180px;
    text-align: right;
}

.property-header-photo {
    align-items: center;
    background: var(--bg-white);
    border: 1px solid var(--border-main);
    border-radius: 8px;
    color: var(--text-label);
    cursor: pointer;
    display: inline-flex;
    flex: 0 0 auto;
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    gap: 7px;
    height: 80px;
    justify-content: center;
    overflow: hidden;
    padding: 0;
    position: relative;
    text-align: center;
    width: 140px;
}

.property-header-photo.empty,
.property-header-photo.is-loading {
    border-style: dashed;
    padding: 0 10px;
}

.property-header-photo.has-image {
    border-style: solid;
}

.property-header-photo:hover {
    border-color: var(--primary-accent);
    box-shadow: 0 0 0 3px var(--shadow-hover);
}

.property-header-photo svg[blazicon] {
    color: var(--primary-dark);
    flex: 0 0 auto;
    font-size: 18px;
}

.property-header-photo img {
    height: 100%;
    object-fit: cover;
    width: 100%;
}

.property-header-photo-input {
    cursor: pointer;
    inset: 0;
    opacity: 0;
    position: absolute;
}

.property-photo-dialog {
    display: grid;
    gap: 14px;
}

.property-photo-dialog img {
    background: var(--bg-light);
    border: 1px solid var(--border-panel);
    border-radius: 8px;
    display: block;
    max-height: 68vh;
    max-width: min(820px, 78vw);
    object-fit: contain;
    width: 100%;
}

.property-photo-dialog-missing {
    align-items: center;
    background: var(--bg-light);
    border: 1px dashed var(--border-dashed);
    border-radius: 8px;
    color: var(--text-muted);
    display: grid;
    gap: 8px;
    justify-items: center;
    min-height: 280px;
    padding: 24px;
    text-align: center;
}

.property-photo-dialog-missing svg[blazicon] {
    color: var(--text-muted);
    font-size: 34px;
}

.property-photo-dialog-actions {
    display: flex;
    justify-content: flex-end;
}

.property-photo-dialog-actions label.button {
    position: relative;
}

.page-header h1 {
    font-size: 34px;
    line-height: 1.1;
    margin: 0;
    order: 1;
}

.page-header > div:first-child {
    display: flex;
    flex-direction: column;
}

.eyebrow {
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0;
    margin: 6px 0 0;
    order: 2;
    text-transform: uppercase;
}

.muted {
    color: var(--text-muted-darker);
    order: 3;
}

.header-actions {
    display: flex;
    gap: 10px;
}

.segmented-control {
    background: var(--bg-elevated);
    border: 1px solid var(--border-main);
    border-radius: 8px;
    display: inline-flex;
    padding: 3px;
}

.segmented-control button {
    align-items: center;
    background: transparent;
    border: 0;
    border-radius: 6px;
    color: var(--text-label);
    cursor: pointer;
    display: inline-flex;
    font: inherit;
    font-weight: 650;
    gap: 6px;
    min-height: 32px;
    padding: 0 12px;
}

.segmented-control button.active {
    background: var(--bg-white);
    color: var(--sidebar-bg);
}

.button {
    align-items: center;
    border: 1px solid var(--border-main);
    border-radius: 7px;
    cursor: pointer;
    display: inline-flex;
    font: inherit;
    font-weight: 650;
    justify-content: center;
    min-height: 40px;
    padding: 0 14px;
    text-decoration: none;
}

.button svg[blazicon],
.icon-button svg[blazicon] {
    font-size: 16px;
}

.button svg[blazicon] {
    margin-right: 7px;
}

.button.icon-only svg[blazicon],
.icon-button svg[blazicon] {
    margin-right: 0;
}

.button.primary {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    color: white;
}

.button.secondary,
.button.small {
    background: var(--bg-white);
    color: var(--text-secondary);
}

.button.small {
    min-height: 32px;
    padding: 0 10px;
}

.button:disabled {
    cursor: not-allowed;
    opacity: .55;
}

.danger-button {
    border-color: var(--danger-border);
    color: var(--danger-text);
}

.danger-primary {
    background: var(--danger-primary);
    border-color: var(--danger-primary);
}

.owner-status-panel {
    align-items: center;
    border: 1px solid var(--border-panel);
    border-radius: 8px;
    display: flex;
    gap: 18px;
    justify-content: space-between;
    margin-bottom: 18px;
    padding: 20px;
}

.owner-status-panel.clear {
    background: var(--bg-clear);
    border-color: var(--success-border);
}

.owner-status-panel.planned {
    background: var(--bg-planned);
    border-color: var(--selected-calendar-border);
}

.owner-status-panel.working {
    background: var(--bg-working);
    border-color: var(--warning-text);
}

.owner-status-panel.attention {
    background: var(--bg-attention);
    border-color: var(--danger-border);
}

.owner-status-panel span {
    color: var(--text-muted);
    display: block;
    font-size: 13px;
    font-weight: 750;
    margin-bottom: 5px;
    text-transform: uppercase;
}

.owner-status-panel strong {
    display: block;
    font-size: 26px;
    line-height: 1.1;
}

.owner-status-panel p {
    color: var(--text-label);
    margin: 7px 0 0;
}

.owner-status-panel svg[blazicon] {
    color: var(--primary-dark);
    flex: 0 0 auto;
    font-size: 34px;
}

.owner-status-panel.attention svg[blazicon] {
    color: var(--danger-primary);
}

.owner-message-panel {
    margin-top: 18px;
}

.command-panel {
    margin-bottom: 18px;
}

.command-list {
    gap: 10px;
}

.command-row {
    align-items: center;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
}

.command-row > div {
    min-width: 0;
}

.command-badge {
    justify-content: center;
    min-width: 72px;
}

.operations-grid {
    align-items: start;
}

.metric-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.metric,
.panel {
    background: var(--bg-white);
    border: 1px solid var(--border-panel);
    border-radius: 8px;
}

.metric {
    padding: 18px;
}

.metric span {
    color: var(--text-muted-light);
    display: block;
    font-size: 14px;
    margin-bottom: 8px;
}

.metric strong {
    display: block;
    font-size: 30px;
    line-height: 1;
}

.metric.urgent strong {
    color: var(--danger-primary);
}

.content-grid,
.split-view {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 18px;
}

.content-grid.single-column {
    grid-template-columns: minmax(0, 1fr);
}

.split-view {
    align-items: start;
}

.panel {
    padding: 18px;
}

.panel-header {
    align-items: center;
    border-bottom: 1px solid var(--border-divider);
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin: -2px 0 16px;
    padding-bottom: 12px;
}

.panel-header h2 {
    font-size: 18px;
    margin: 0;
}

.panel-header span,
.panel-header a {
    color: var(--text-muted);
    font-size: 14px;
}

.messages-page {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 112px);
    min-height: 0;
    overflow: hidden;
}

.messages-page .page-header {
    flex: 0 0 auto;
    margin-bottom: 18px;
}

.messages-workspace {
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
}

.messages-workspace > .message-panel {
    height: 100%;
    min-height: 0;
}

.panel-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tab-control {
    background: var(--bg-white);
    border: 1px solid var(--border-panel);
    border-radius: 8px;
    display: flex;
    gap: 4px;
    margin-bottom: 18px;
    overflow-x: auto;
    padding: 5px;
}

.tab-button {
    align-items: center;
    background: transparent;
    border: 0;
    border-radius: 6px;
    color: var(--text-label);
    cursor: pointer;
    display: inline-flex;
    flex: 0 0 auto;
    font: inherit;
    font-weight: 700;
    gap: 8px;
    min-height: 38px;
    padding: 0 13px;
}

.tab-button:hover,
.tab-button.active {
    background: var(--bg-elevated);
    color: var(--sidebar-bg);
}

.tab-button.active {
    box-shadow: inset 0 0 0 1px var(--border-main);
}

.tab-button em {
    background: var(--bg-elevated);
    border-radius: 999px;
    color: var(--text-label);
    font-size: 12px;
    font-style: normal;
    min-width: 24px;
    padding: 3px 7px;
    text-align: center;
}

.search-label {
    align-items: center;
    background: var(--bg-white);
    border: 1px solid var(--border-main);
    border-radius: 7px;
    display: inline-flex;
    gap: 8px;
    min-height: 36px;
    padding: 0 10px;
}

.search-label svg[blazicon] {
    color: var(--text-muted);
    font-size: 16px;
}

.search-label input {
    border: 0;
    min-height: 32px;
    padding: 0;
    width: min(220px, 46vw);
}

.date-picker-label {
    align-items: center;
    background: var(--bg-white);
    border: 1px solid var(--border-main);
    border-radius: 7px;
    display: inline-flex;
    gap: 8px;
    min-height: 32px;
    padding: 0 10px;
}

.date-picker-label svg[blazicon] {
    color: var(--text-muted);
    font-size: 16px;
}

.date-picker-label input {
    border: 0;
    font: inherit;
    min-height: 30px;
    padding: 0;
}

.property-list,
.task-list,
.people-list {
    display: grid;
    gap: 8px;
}

.table-wrap {
    overflow-x: auto;
}

.entity-table {
    border-collapse: collapse;
    min-width: 780px;
    width: 100%;
}

.entity-table th,
.entity-table td {
    border-bottom: 1px solid var(--border-divider);
    padding: 12px;
    text-align: left;
    vertical-align: middle;
}

.entity-table th {
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 750;
    text-transform: uppercase;
}

.entity-table td a {
    font-weight: 750;
    text-decoration: none;
}

.entity-name-button {
    appearance: none;
    background: transparent;
    border: 0;
    color: var(--text-secondary);
    cursor: pointer;
    display: inline;
    font: inherit;
    font-weight: 750;
    padding: 0;
    text-align: left;
}

.entity-name-button:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.entity-name-button:focus-visible {
    border-radius: 3px;
    outline: 2px solid var(--primary);
    outline-offset: 3px;
}

.entity-table tr.selected-entity-row td {
    background: var(--bg-clear);
    border-bottom-color: var(--success-border);
}

.table-subtext {
    color: var(--text-muted-light);
    display: block;
    font-size: 13px;
    margin-top: 3px;
}

.row-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.card-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

.entity-card {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: 8px;
    display: grid;
    gap: 14px;
    padding: 14px;
}

.entity-card.selected-entity-card {
    background: var(--bg-clear);
    border-color: var(--selected-border);
    box-shadow: inset 0 0 0 1px var(--selected-border);
}

.card-title {
    display: block;
    font-size: 18px;
    font-weight: 750;
    margin-bottom: 4px;
    text-decoration: none;
}

.entity-card p {
    color: var(--text-muted-light);
    margin: 0;
}

.entity-card dl {
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: 0;
}

.entity-card dt {
    color: var(--text-muted-light);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.entity-card dd {
    font-weight: 750;
    margin: 3px 0 0;
}

.card-actions {
    display: flex;
    gap: 8px;
}

.card-heading {
    align-items: center;
    display: flex;
    gap: 8px;
    justify-content: space-between;
}

.task-card dl {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.task-card dd .task-party-badges {
    margin-top: 0;
}

.task-title-summary {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.task-title-link {
    overflow-wrap: anywhere;
}

.card-heading strong {
    font-size: 17px;
}

.task-planner-panel {
    margin-bottom: 18px;
}

.keyholder-plan-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}

.keyholder-plan-summary span {
    background: var(--bg-light);
    border: 1px solid var(--border-panel);
    border-radius: 8px;
    color: var(--text-label);
    font-size: 13px;
    padding: 6px 10px;
}

.keyholder-plan-table td,
.keyholder-plan-table th {
    vertical-align: middle;
}

.keyholder-plan-table tr.drop-target {
    outline: 2px solid var(--primary-accent);
    outline-offset: -2px;
}

.keyholder-plan-table tr.dragging {
    opacity: .6;
}

.day-task-list {
    display: grid;
    gap: 10px;
}

.day-task-row {
    align-items: center;
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: 8px;
    display: grid;
    gap: 12px;
    grid-template-columns: 40px minmax(220px, 1.35fr) minmax(260px, 1fr) auto;
    min-height: 72px;
    padding: 10px 12px;
}

.day-task-row.drop-target {
    border-color: var(--primary-accent);
    box-shadow: inset 0 0 0 1px var(--primary-accent);
}

.day-task-row.dragging {
    opacity: .6;
}

.day-task-row.completed {
    background: var(--bg-light);
}

.drag-handle {
    cursor: grab;
}

.drag-handle:active {
    cursor: grabbing;
}

.day-task-main {
    min-width: 0;
}

.day-task-property {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.day-task-property strong {
    color: var(--text-secondary);
    overflow-wrap: anywhere;
}

.day-task-property span {
    color: var(--text-muted-light);
    font-size: 13px;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.day-task-title {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.day-task-title strong {
    overflow-wrap: anywhere;
}

.day-task-main p {
    color: var(--text-muted-light);
    margin: 5px 0 0;
}

.task-context {
    color: var(--text-muted-light);
    display: block;
    font-size: 14px;
    margin-top: 4px;
}

.inventory-panel,
.checklist-panel {
    margin-top: 0;
}

.calendar-panel {
    margin-bottom: 18px;
}

.calendar-panel .calendar-grid-day,
.calendar-panel .calendar-grid-week {
    min-height: calc(100vh - 280px);
}

.property-overview {
    display: grid;
    gap: 18px;
}

.property-overview .calendar-panel {
    margin-bottom: 0;
}

.property-overview .calendar-grid-week {
    min-height: auto;
}

.property-overview .calendar-day {
    min-height: 80px;
    padding: 6px;
}

.photo-upload {
    background: var(--bg-white);
    border: 1px solid var(--border-panel);
    border-radius: 8px;
    display: grid;
    gap: 14px;
    padding: 18px;
}

.photo-upload.drag-over {
    border-color: var(--primary-accent);
    box-shadow: 0 0 0 3px var(--shadow-focus);
}

.photo-upload-header {
    align-items: center;
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.photo-upload-header h3 {
    font-size: 18px;
    margin: 0;
}

.photo-upload-header p {
    color: #65767b;
    margin: 3px 0 0;
}

.photo-upload-header label.button {
    position: relative;
}

.photo-upload-input {
    cursor: pointer;
    inset: 0;
    opacity: 0;
    position: absolute;
}

.photo-upload-drop {
    align-items: center;
    background: var(--bg-card);
    border: 1px dashed var(--border-dashed);
    border-radius: 8px;
    color: var(--text-muted);
    display: grid;
    gap: 6px;
    justify-items: center;
    min-height: 180px;
    padding: 20px;
    text-align: center;
}

.photo-upload-drop svg[blazicon] {
    color: var(--primary-dark);
    font-size: 28px;
}

.photo-upload-drop strong {
    color: var(--text-secondary);
}

.photo-upload-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
}

.photo-upload-grid.single {
    grid-template-columns: minmax(0, 420px);
}

.photo-upload-card {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: 8px;
    overflow: hidden;
}

.photo-upload-card img {
    aspect-ratio: 16 / 10;
    display: block;
    object-fit: cover;
    width: 100%;
}

.photo-upload-missing {
    align-items: center;
    aspect-ratio: 16 / 10;
    background: var(--bg-light);
    color: var(--text-muted-darkest);
    display: flex;
    flex-direction: column;
    gap: 8px;
    justify-content: center;
    padding: 16px;
    text-align: center;
}

.photo-upload-missing svg[blazicon] {
    height: 28px;
    width: 28px;
}

.photo-upload-card > div:not(.photo-upload-missing) {
    align-items: center;
    display: flex;
    gap: 8px;
    justify-content: space-between;
    padding: 9px 10px;
}

.photo-upload-card span {
    color: var(--text-label);
    font-size: 13px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.detail-list {
    display: grid;
    gap: 0;
    margin: 0;
}

.detail-list div {
    border-bottom: 1px solid var(--border-divider);
    display: grid;
    gap: 8px;
    grid-template-columns: minmax(140px, 220px) minmax(0, 1fr);
    padding: 11px 0;
}

.detail-list div:last-child {
    border-bottom: 0;
}

.detail-list dt {
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 750;
    text-transform: uppercase;
}

.detail-list dd {
    color: var(--text-secondary);
    margin: 0;
    overflow-wrap: anywhere;
}

.calendar-header {
    align-items: flex-start;
}

.calendar-header h2 {
    margin-bottom: 3px;
}

.calendar-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.calendar-date-display {
    font-weight: 700;
    min-width: 140px;
}

.calendar-grid {
    display: grid;
    gap: 8px;
}

.calendar-grid-day {
    grid-template-columns: minmax(0, 1fr);
}

.calendar-grid-week {
    grid-template-columns: repeat(7, minmax(0, 1fr));
}

.calendar-grid-month {
    grid-template-columns: repeat(7, minmax(130px, 1fr));
    overflow-x: auto;
}

.calendar-day {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: 8px;
    cursor: pointer;
    display: grid;
    gap: 8px;
    min-height: 110px;
    min-width: 0;
    padding: 8px;
}

.calendar-day:hover {
    background: var(--bg-main);
}

.calendar-day.today {
    border-color: var(--primary-accent);
    box-shadow: inset 0 0 0 1px var(--primary-accent);
}

.calendar-day.selected {
    background: var(--bg-selected);
    border-color: var(--selected-calendar-border);
}

.calendar-day.selection-start,
.calendar-day.selection-end {
    box-shadow: inset 0 0 0 2px var(--border-selection);
}

.calendar-context-menu {
    background: var(--bg-white);
    border: 1px solid var(--border-panel);
    border-radius: 8px;
    box-shadow: 0 18px 40px rgba(18, 33, 39, 0.18);
    display: grid;
    min-width: 188px;
    padding: 6px;
    position: fixed;
    z-index: 30;
}

.calendar-context-menu button {
    align-items: center;
    appearance: none;
    background: transparent;
    border: 0;
    border-radius: 6px;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    font: inherit;
    gap: 8px;
    padding: 9px 10px;
    text-align: left;
}

.calendar-context-menu button:hover {
    background: var(--bg-selected);
}

.booking-type-list {
    display: grid;
    gap: 8px;
}

.booking-type-row {
    align-items: center;
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: 8px;
    display: grid;
    gap: 12px;
    grid-template-columns: auto minmax(0, 1fr) auto;
    padding: 10px;
}

.booking-type-row strong,
.booking-type-row small {
    display: block;
}

.booking-type-row small {
    color: var(--text-muted);
    font-size: 12px;
    margin-top: 2px;
}

.booking-type-swatch {
    border: 1px solid rgba(18, 33, 39, 0.12);
    border-radius: 999px;
    display: block;
    height: 22px;
    width: 22px;
}

.calendar-day-heading {
    align-items: center;
    display: flex;
    justify-content: space-between;
}

.calendar-day-heading strong {
    font-size: 13px;
    text-transform: uppercase;
}

.calendar-day-heading span {
    color: var(--text-muted);
    font-weight: 750;
}

.calendar-empty {
    color: var(--text-empty);
    font-size: 13px;
}

.calendar-entry-list {
    display: grid;
    gap: 4px;
}

.calendar-entry {
    appearance: none;
    border: 0;
    border-left: 4px solid var(--primary-dark);
    border-radius: 7px;
    display: grid;
    gap: 2px;
    min-height: 44px;
    padding: 6px 7px;
    text-align: left;
    width: 100%;
}

.calendar-entry:not(:disabled) {
    cursor: pointer;
}

.calendar-entry:not(:disabled):hover {
    filter: brightness(0.97);
}

.calendar-entry:disabled {
    cursor: default;
}

.calendar-entry.reservation {
    background: var(--bg-reservation);
    border-color: var(--reservation-border);
    color: var(--reservation-text);
}

.calendar-entry.task {
    background: var(--bg-warning);
    border-color: var(--task-border);
    color: var(--task-text);
}

.calendar-entry span,
.calendar-entry small {
    color: inherit;
    font-size: 12px;
    opacity: 0.85;
}

.calendar-entry strong {
    font-size: 14px;
    line-height: 1.25;
    overflow-wrap: anywhere;
    color: inherit;
}

.checklist-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.inventory-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.inventory-card dl {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.inventory-tree,
.inventory-list {
    display: grid;
    gap: 8px;
}

.inventory-row {
    align-items: center;
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: 7px;
    display: grid;
    gap: 10px;
    grid-template-columns: minmax(180px, 1fr) minmax(160px, 240px) auto auto auto auto auto;
    min-height: 58px;
    padding: 10px 12px 10px calc(12px + (var(--inventory-depth, 0) * 26px));
}

.document-panel {
    display: grid;
    gap: 16px;
}

.document-upload {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: 8px;
    display: grid;
    gap: 12px;
    padding: 14px;
}

.document-upload-heading h3 {
    font-size: 17px;
    margin: 0;
}

.document-upload-heading p {
    color: var(--text-muted-light);
    margin: 3px 0 0;
}

.document-upload-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: minmax(220px, 1fr) minmax(160px, 220px) minmax(180px, 260px);
}

.document-toolbar {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.document-toolbar-spacer {
    flex: 1;
}

.document-toolbar span {
    color: var(--text-muted);
    font-size: 14px;
}

.document-filter {
    min-height: 36px;
    width: min(220px, 46vw);
}

.document-list {
    display: grid;
    gap: 8px;
}

.document-row {
    align-items: center;
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: 7px;
    display: grid;
    gap: 12px;
    grid-template-columns: 38px minmax(220px, 1fr) auto minmax(140px, 220px) auto auto;
    min-height: 64px;
    padding: 11px 12px;
}

.document-row:hover {
    border-color: var(--hover-border);
}

.dialog-panel-right .document-row {
    align-items: flex-start;
    grid-template-columns: 38px minmax(0, 1fr);
}

.dialog-panel-right .document-row .badge,
.dialog-panel-right .document-row .document-owner,
.dialog-panel-right .document-row .document-date,
.dialog-panel-right .document-row .row-actions {
    grid-column: 2;
}

.dialog-panel-right .document-row .row-actions {
    justify-content: flex-start;
}

.document-file-icon {
    align-items: center;
    background: var(--bg-elevated);
    border: 1px solid var(--border-icon);
    border-radius: 7px;
    color: var(--primary-dark);
    display: inline-flex;
    height: 38px;
    justify-content: center;
    width: 38px;
}

.document-file-icon svg[blazicon] {
    font-size: 18px;
}

.document-main {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.document-main strong,
.document-main span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.document-main span,
.document-date,
.document-owner {
    color: var(--text-muted-light);
    font-size: 14px;
}

.document-date,
.document-owner {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.document-preview-backdrop {
    align-items: center;
    background: var(--shadow-backdrop);
    display: flex;
    inset: 0;
    justify-content: center;
    padding: 22px;
    position: fixed;
    z-index: 950;
}

.document-preview-panel {
    background: var(--bg-main);
    border: 1px solid var(--border-panel);
    border-radius: 8px;
    box-shadow: 0 28px 90px rgba(13, 27, 30, .38);
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    height: min(780px, calc(100vh - 44px));
    overflow: hidden;
    transition: height .18s ease, width .18s ease;
    width: min(1080px, calc(100vw - 44px));
}

.document-preview-panel.expanded {
    height: min(940px, calc(100vh - 24px));
    width: min(1480px, calc(100vw - 24px));
}

.document-preview-header {
    align-items: center;
    background: var(--bg-white);
    border-bottom: 1px solid var(--border-panel);
    display: flex;
    gap: 16px;
    justify-content: space-between;
    padding: 16px 18px;
}

.document-preview-header h2 {
    font-size: 20px;
    margin: 0;
    overflow-wrap: anywhere;
}

.document-preview-header span {
    color: var(--text-muted-light);
    display: block;
    font-size: 14px;
    margin-top: 3px;
}

.document-preview-actions {
    align-items: center;
    display: flex;
    flex: 0 0 auto;
    gap: 8px;
}

.document-preview-actions a.icon-button {
    color: var(--text-secondary);
    text-decoration: none;
}

.document-preview-body {
    align-items: center;
    display: grid;
    min-height: 0;
    overflow: hidden;
    padding: 14px;
}

.document-preview-frame {
    background: var(--bg-white);
    border: 1px solid var(--border-panel);
    border-radius: 7px;
    height: 100%;
    width: 100%;
}

.document-preview-image {
    align-self: center;
    justify-self: center;
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
}

.document-preview-empty {
    align-content: center;
    background: var(--bg-white);
    border: 1px dashed var(--border-dashed);
    border-radius: 8px;
    color: var(--text-muted-light);
    display: grid;
    gap: 10px;
    justify-items: center;
    margin: auto;
    min-height: 260px;
    padding: 28px;
    text-align: center;
    width: min(520px, 100%);
}

.document-preview-empty svg[blazicon] {
    color: var(--primary-dark);
    font-size: 34px;
}

.document-preview-empty strong {
    color: var(--text-secondary);
    font-size: 18px;
}

.inventory-row-main {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.inventory-row-main strong,
.inventory-row-main span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.inventory-row-main span,
.inventory-row-detail {
    color: var(--text-muted-light);
    font-size: 14px;
}

.inventory-row-detail {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.delete-tree-actions {
    display: flex;
    gap: 8px;
    margin: 16px 0 12px;
}

.inventory-delete-tree {
    border: 1px solid var(--border-card);
    border-radius: 8px;
    display: grid;
    overflow: hidden;
}

.inventory-delete-row {
    align-items: center;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-divider);
    display: flex;
    gap: 10px;
    min-height: 42px;
    padding: 8px 12px 8px calc(12px + (var(--inventory-depth, 0) * 24px));
}

.inventory-delete-row:last-child {
    border-bottom: 0;
}

.inventory-delete-row input[type="checkbox"] {
    min-height: 18px;
    width: 18px;
}

.checklist-card dl {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.property-row,
.task-row,
.person-row {
    align-items: center;
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: 7px;
    display: flex;
    gap: 12px;
    justify-content: space-between;
    min-height: 58px;
    padding: 12px;
    text-decoration: none;
}

.property-row:hover {
    border-color: var(--hover-border);
}

.property-row strong,
.task-row strong,
.person-row strong {
    display: block;
    margin-bottom: 3px;
}

.property-row span,
.task-row span,
.person-row span,
.property-row small {
    color: var(--text-muted-light);
    font-size: 14px;
}

.person-row-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.person-row-main {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.person-row-main p {
    color: var(--text-muted-darkest);
    font-size: 13px;
    line-height: 1.4;
    margin: 2px 0 0;
    max-width: 760px;
}

.access-summary-grid {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-bottom: 12px;
}

.access-summary {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: 7px;
    display: grid;
    gap: 4px;
    padding: 12px;
}

.access-summary span {
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 750;
    text-transform: uppercase;
}

.access-summary strong {
    color: var(--text-secondary);
    font-size: 24px;
    line-height: 1;
}

.access-summary small,
.access-editor-help {
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.4;
}

.access-editor-help {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: 7px;
    margin: 0 0 12px;
    padding: 10px 12px;
}

.badge {
    background: var(--bg-elevated);
    border-radius: 999px;
    color: var(--text-label);
    display: inline-flex;
    font-size: 12px;
    font-weight: 650;
    line-height: 1.2;
    min-height: 24px;
    padding: 3px 9px;
    white-space: nowrap;
}

.badge.subtle {
    background: var(--bg-main);
    border: 1px solid var(--border-icon);
    color: var(--text-muted-darkest);
}

.badge.warning {
    background: var(--bg-warning);
    color: var(--warning-text);
}

.badge.danger {
    background: var(--bg-danger);
    color: var(--danger-text);
}

.badge.success {
    background: var(--bg-success);
    color: var(--success-text);
}

.task-party-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 6px;
}

.status-select {
    appearance: none;
    background: var(--bg-elevated);
    border: 1px solid var(--border-status);
    border-radius: 999px;
    color: var(--text-label);
    cursor: pointer;
    font: inherit;
    font-size: 12px;
    font-weight: 650;
    line-height: 1.2;
    min-height: 26px;
    padding: 3px 9px;
    white-space: nowrap;
    width: auto;
}

.status-select.warning {
    background: var(--bg-warning);
    border-color: var(--warning-text);
    color: var(--warning-text);
}

.status-select.danger {
    background: var(--bg-danger);
    border-color: var(--danger-border);
    color: var(--danger-text);
}

.status-select.success {
    background: var(--bg-success);
    border-color: var(--success-border);
    color: var(--success-text);
}

.message-panel {
    display: grid;
    gap: 18px;
    grid-template-columns: minmax(260px, 360px) minmax(0, 1fr);
    min-height: 560px;
}

.message-panel.single-task-conversation {
    grid-template-columns: minmax(0, 1fr);
}

.message-thread-list,
.message-detail {
    min-width: 0;
}

.message-thread-list {
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

.message-threads {
    display: grid;
    gap: 10px;
    min-height: 0;
    overflow-y: auto;
    padding-right: 4px;
}

.message-thread-button {
    appearance: none;
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: 8px;
    color: var(--text-secondary);
    cursor: pointer;
    display: grid;
    gap: 4px;
    padding: 12px;
    text-align: left;
    width: 100%;
}

.message-thread-button.active,
.message-thread-button:hover {
    background: var(--bg-active);
    border-color: var(--selected-border);
}

.message-thread-button span,
.message-thread-button small {
    color: var(--text-muted-light);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.message-detail {
    border-left: 1px solid var(--border-divider);
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto auto;
    min-height: 0;
    overflow: hidden;
    padding-left: 18px;
}

.message-detail-header {
    align-items: flex-start;
    display: flex;
    gap: 16px;
    justify-content: space-between;
    padding-bottom: 14px;
}

.message-detail-header h3 {
    font-size: 22px;
    margin: 0 0 4px;
}

.message-participants {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: flex-end;
}

.message-participants-block {
    align-items: flex-end;
    display: grid;
    gap: 10px;
    justify-items: end;
}

.message-participant-chip {
    align-items: center;
    background: var(--bg-elevated);
    border: 1px solid var(--border-status);
    border-radius: 8px;
    color: var(--text-label);
    display: grid;
    gap: 2px;
    min-width: 0;
    padding: 7px 10px;
}

.message-participant-chip strong,
.message-participant-chip small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.message-participant-chip strong {
    color: var(--text-secondary);
    font-size: 13px;
}

.message-participant-chip small {
    color: var(--text-muted-light);
    font-size: 12px;
}

.message-participant-chip.removable {
    appearance: none;
    cursor: pointer;
    grid-template-columns: minmax(0, 1fr) auto;
    text-align: left;
}

.message-participant-chip.removable svg[blazicon] {
    color: var(--text-muted);
    font-size: 14px;
}

.message-list {
    align-content: start;
    display: grid;
    gap: 12px;
    overflow-y: auto;
    padding: 4px 6px 14px 0;
}

.message-bubble {
    background: var(--bg-message);
    border: 1px solid var(--border-card);
    border-radius: 8px;
    padding: 12px 14px;
    width: min(680px, 88%);
}

.message-bubble.own {
    background: var(--bg-accent);
    border-color: var(--success-border);
    justify-self: end;
}

.message-bubble div {
    align-items: baseline;
    display: flex;
    gap: 10px;
    justify-content: space-between;
}

.message-bubble time {
    color: var(--text-muted-light);
    font-size: 12px;
}

.message-bubble p {
    margin: 8px 0 0;
    white-space: pre-wrap;
}

.message-composer {
    align-items: flex-end;
    border-top: 1px solid var(--border-divider);
    display: grid;
    gap: 10px;
    grid-template-columns: minmax(0, 1fr) auto;
    padding-top: 14px;
}

.message-composer textarea {
    min-height: 72px;
}

.message-empty-detail {
    align-content: center;
    color: var(--text-muted-light);
    display: grid;
    gap: 8px;
    justify-items: center;
    min-height: 360px;
    text-align: center;
}

.message-empty-detail svg[blazicon] {
    color: var(--text-empty);
    font-size: 42px;
}

.message-participant-picker {
    border: 1px solid var(--border-panel);
    border-radius: 8px;
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 12px;
}

.message-participant-picker legend {
    color: var(--text-label);
    font-size: 13px;
    font-weight: 750;
    padding: 0 4px;
}

.message-participant-picker label {
    align-items: center;
    display: flex;
    flex-direction: row;
    gap: 8px;
}

.empty-state {
    background: var(--bg-card);
    border: 1px dashed var(--border-dashed);
    border-radius: 8px;
    color: var(--text-muted);
    margin: 0;
    padding: 18px;
}

.task-activity-history {
    border-top: 1px solid var(--border);
    display: grid;
    gap: 12px;
    padding-top: 18px;
}

.task-activity-history h3 {
    font-size: 1rem;
    margin: 0;
}

.task-activity-list {
    display: grid;
    gap: 8px;
}

.task-activity-entry {
    border: 1px solid var(--border-card);
    border-radius: 8px;
    padding: 10px 12px;
}

.task-activity-entry div {
    display: grid;
    gap: 4px;
}

.task-activity-entry span {
    color: var(--text-muted);
    font-size: 0.88rem;
}

.tool-summary {
    display: grid;
    gap: 6px;
    margin-bottom: 16px;
}

.tool-summary strong {
    font-size: 17px;
}

.tool-summary p {
    color: var(--text-muted-light);
    margin: 0;
}

.notice {
    background: var(--bg-elevated);
    border: 1px solid var(--border-icon);
    border-radius: 8px;
    color: var(--text-secondary);
    margin-top: 18px;
    padding: 14px 16px;
}

.notice.success {
    background: var(--bg-success);
    border-color: var(--success-border);
    color: var(--success-text);
}

.notice.danger {
    background: var(--bg-danger);
    border-color: var(--danger-border);
    color: var(--danger-text);
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 14px;
}

.form-grid.one-column {
    grid-template-columns: 1fr;
}

.form-grid.compact {
    margin-top: 18px;
}

label,
.full-label {
    color: var(--text-label);
    display: grid;
    font-size: 14px;
    font-weight: 650;
    gap: 6px;
}

input,
select,
textarea {
    background: var(--bg-white);
    border: 1px solid var(--border-main);
    border-radius: 7px;
    color: var(--text-primary);
    font: inherit;
    min-height: 40px;
    padding: 8px 10px;
    width: 100%;
}

input[type="checkbox"] {
    accent-color: var(--primary-dark);
    flex: 0 0 18px;
    height: 18px;
    min-height: 18px;
    padding: 0;
    width: 18px;
}

textarea {
    min-height: 88px;
    resize: vertical;
}

.full-label {
    margin-bottom: 14px;
}

.checkbox-label {
    align-items: center;
    display: flex;
    gap: 8px;
}

.message-participant-picker input[type="checkbox"] {
    flex: 0 0 18px;
    height: 18px;
    min-height: 18px;
    padding: 0;
    width: 18px;
}

.message-participant-picker label span {
    min-width: 0;
}

.message-participant-token-control {
    position: relative;
}

.message-participant-token-input {
    align-items: center;
    background: var(--bg-white);
    border: 1px solid var(--border-main);
    border-radius: 7px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    min-height: 42px;
    padding: 5px 8px;
}

.message-participant-token-input:focus-within {
    border-color: var(--focus-border);
    box-shadow: 0 0 0 3px var(--shadow-focus);
}

.message-participant-token-input input {
    border: 0;
    flex: 1 1 140px;
    min-height: 28px;
    padding: 0;
    width: auto;
}

.message-participant-token-input input:focus {
    outline: 0;
}

.message-participant-token {
    align-items: center;
    background: var(--bg-token);
    border: 1px solid var(--success-border);
    border-radius: 7px;
    color: var(--text-secondary);
    display: flex;
    gap: 6px;
    max-width: 100%;
    min-height: 30px;
    padding: 4px 6px 4px 9px;
}

.message-participant-token > span {
    display: grid;
    gap: 1px;
    min-width: 0;
}

.message-participant-token strong,
.message-participant-token small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.message-participant-token strong {
    font-size: 13px;
}

.message-participant-token small {
    color: var(--text-muted-light);
    font-size: 11px;
}

.message-participant-token button {
    align-items: center;
    background: transparent;
    border: 0;
    color: var(--success-text);
    cursor: pointer;
    display: flex;
    flex: 0 0 auto;
    min-height: 24px;
    padding: 0;
}

.message-participant-token svg[blazicon] {
    font-size: 14px;
}

.message-participant-token-options {
    background: var(--bg-white);
    border: 1px solid var(--border-card);
    border-radius: 8px;
    box-shadow: 0 16px 36px rgba(23, 35, 38, .16);
    left: 0;
    max-height: 260px;
    overflow-y: auto;
    position: absolute;
    right: 0;
    top: calc(100% + 6px);
    z-index: 30;
}

.dialog-panel-body .message-participant-token-options {
    margin-top: 6px;
    position: static;
}

.message-participant-token-option {
    align-items: center;
    appearance: none;
    background: transparent;
    border: 0;
    border-bottom: 1px solid var(--border-divider);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    gap: 10px;
    justify-content: space-between;
    padding: 10px 12px;
    text-align: left;
    width: 100%;
}

.message-participant-token-option:last-child {
    border-bottom: 0;
}

.message-participant-token-option:hover {
    background: var(--bg-active);
}

.message-participant-token-option span {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.message-participant-token-option strong,
.message-participant-token-option small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.message-participant-token-option small {
    color: var(--text-muted-light);
    font-size: 12px;
}

.message-participant-token-option svg[blazicon] {
    color: var(--primary-dark);
    flex: 0 0 auto;
    font-size: 16px;
}

.message-participant-select {
    display: grid;
    gap: 10px;
}

.message-participant-selected {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.message-participant-select > input {
    width: 100%;
}

.message-participant-options {
    border: 1px solid var(--border-card);
    border-radius: 8px;
    display: grid;
    max-height: 260px;
    overflow-y: auto;
}

.message-participant-option {
    align-items: center;
    appearance: none;
    background: var(--bg-white);
    border: 0;
    border-bottom: 1px solid var(--border-divider);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    gap: 10px;
    justify-content: space-between;
    padding: 10px 12px;
    text-align: left;
    width: 100%;
}

.message-participant-option:last-child {
    border-bottom: 0;
}

.message-participant-option:hover {
    background: var(--bg-active);
}

.message-participant-option span {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.message-participant-option strong,
.message-participant-option small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.message-participant-option small {
    color: var(--text-muted-light);
    font-size: 12px;
}

.message-participant-option svg[blazicon] {
    color: var(--primary-dark);
    flex: 0 0 auto;
    font-size: 16px;
}

.form-checkbox {
    align-self: end;
    min-height: 40px;
}

.form-section-header {
    align-items: center;
    border-top: 1px solid var(--border-divider);
    display: flex;
    justify-content: space-between;
    margin: 18px 0 12px;
    padding-top: 16px;
}

.form-section-header h3 {
    font-size: 16px;
    margin: 0;
}

.select-list-view {
    position: relative;
}

.select-list-chip {
    align-items: center;
    background: var(--bg-token);
    border: 1px solid var(--success-border);
    border-radius: 999px;
    color: var(--success-text);
    display: inline-flex;
    font-size: 13px;
    font-weight: 700;
    gap: 6px;
    min-height: 28px;
    max-width: 100%;
    padding: 3px 7px 3px 10px;
}

.select-list-chip span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.select-list-chip button {
    align-items: center;
    background: transparent;
    border: 0;
    color: inherit;
    cursor: pointer;
    display: inline-flex;
    height: 22px;
    justify-content: center;
    padding: 0;
    width: 22px;
}

.select-list-chip svg[blazicon] {
    font-size: 14px;
}

.select-list-textbox {
    align-items: center;
    background: var(--bg-white);
    border: 1px solid var(--border-main);
    border-radius: 7px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    min-height: 40px;
    padding: 5px 8px;
    width: 100%;
}

.select-list-textbox:focus-within {
    border-color: var(--focus-border);
    box-shadow: 0 0 0 3px var(--shadow-focus);
}

.select-list-textbox input {
    border: 0;
    flex: 1 1 140px;
    min-height: 28px;
    min-width: 120px;
    padding: 0 2px;
}

.select-list-textbox input:focus {
    outline: 0;
}

.select-list-options {
    background: var(--bg-white);
    border: 1px solid var(--border-card);
    border-radius: 8px;
    display: grid;
    gap: 0;
    left: 0;
    margin-top: 4px;
    max-height: 230px;
    overflow-y: auto;
    position: absolute;
    right: 0;
    top: 100%;
    z-index: 920;
    box-shadow: 0 14px 28px rgba(23, 35, 38, .14);
}

.select-list-option-row {
    align-items: center;
    background: var(--bg-white);
    border-bottom: 1px solid var(--border-divider);
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
}

.select-list-option-row:last-child {
    border-bottom: 0;
}

.select-list-option,
.select-list-create {
    align-items: center;
    background: transparent;
    border: 0;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    font: inherit;
    gap: 10px;
    justify-content: space-between;
    min-height: 48px;
    padding: 8px 10px;
    text-align: left;
    width: 100%;
}

.select-list-option:hover,
.select-list-option.selected,
.select-list-create:hover {
    background: var(--bg-active);
}

.select-list-option span,
.select-list-create span {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.select-list-option strong,
.select-list-option small,
.select-list-create strong,
.select-list-create small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.select-list-option strong,
.select-list-create strong {
    font-size: 14px;
}

.select-list-option small,
.select-list-create small {
    color: var(--text-muted-light);
    font-size: 12px;
}

.select-list-option svg[blazicon],
.select-list-create svg[blazicon] {
    color: var(--primary-dark);
    flex: 0 0 auto;
    font-size: 16px;
}

.select-list-create {
    border-top: 1px solid var(--border-divider);
}

.select-list-delete {
    align-items: center;
    align-self: stretch;
    background: transparent;
    border: 0;
    color: var(--danger-text);
    cursor: pointer;
    display: inline-flex;
    justify-content: center;
    min-height: 34px;
    width: 42px;
}

.select-list-delete:hover {
    background: var(--bg-danger);
}

.select-list-empty {
    color: var(--text-muted-light);
    margin: 0;
    padding: 12px;
}

.checklist-item-editor-list,
.checklist-run-list {
    display: grid;
    gap: 12px;
}

.checklist-item-editor,
.checklist-run-item {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: 8px;
    padding: 14px;
}

.checklist-run-item label span {
    color: var(--text-muted-light);
    display: block;
    font-size: 13px;
    font-weight: 400;
}

.checklist-run-item input[type="checkbox"] {
    height: 22px;
    margin-top: 2px;
    width: 22px;
}

#blazor-error-ui {
    background: #b42318;
    bottom: 0;
    color: white;
    display: none;
    left: 0;
    padding: 12px 16px;
    position: fixed;
    right: 0;
    z-index: 1000;
}

#blazor-error-ui .reload {
    color: white;
    font-weight: 700;
    margin-left: 12px;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    float: right;
}

.dialog-backdrop {
    background: var(--shadow-dialog);
    display: flex;
    inset: 0;
    padding: 0;
    position: fixed;
    z-index: 900;
}

.dialog-backdrop-right {
    justify-content: flex-end;
}

.dialog-backdrop-left {
    justify-content: flex-start;
}

.dialog-backdrop-top {
    align-items: flex-start;
}

.dialog-backdrop-bottom {
    align-items: flex-end;
}

.dialog-backdrop-center {
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.dialog-panel {
    background: var(--bg-white);
    box-shadow: 0 24px 70px rgba(23, 35, 38, .28);
    display: flex;
    flex-direction: column;
    max-height: 100vh;
    min-height: 0;
    overflow: hidden;
    z-index: 901;
}

.dialog-panel-right,
.dialog-panel-left {
    height: 100vh;
    width: min(560px, 100vw);
}

.dialog-panel-right {
    border-left: 1px solid var(--border-panel);
    box-shadow: -18px 0 40px rgba(23, 35, 38, .18);
}

.dialog-panel-left {
    border-right: 1px solid var(--border-panel);
    box-shadow: 18px 0 40px rgba(23, 35, 38, .18);
}

.dialog-panel-top,
.dialog-panel-bottom {
    max-height: min(620px, 100vh);
    width: 100vw;
}

.dialog-panel-top {
    border-bottom: 1px solid var(--border-panel);
}

.dialog-panel-bottom {
    border-top: 1px solid var(--border-panel);
}

.dialog-panel-center {
    border-radius: 8px;
    max-width: 460px;
    width: min(460px, 100%);
}

.dialog-panel-center:has(.property-photo-dialog) {
    max-width: min(900px, calc(100vw - 40px));
    width: min(900px, calc(100vw - 40px));
}

.dialog-panel-header {
    align-items: flex-start;
    border-bottom: 1px solid var(--border-divider);
    display: flex;
    flex: 0 0 auto;
    justify-content: space-between;
    padding: 22px 22px 14px;
}

.dialog-panel-header h2 {
    margin: 0;
}

.icon-button {
    align-items: center;
    background: var(--bg-elevated);
    border: 1px solid var(--border-icon);
    border-radius: 7px;
    cursor: pointer;
    display: inline-flex;
    font: inherit;
    font-weight: 800;
    height: 34px;
    justify-content: center;
    width: 34px;
}

.dialog-panel-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding: 18px 22px;
}

.dialog-message {
    color: var(--text-label);
    margin: 0;
}

.dialog-panel-actions {
    background: var(--bg-white);
    border-top: 1px solid var(--border-divider);
    display: flex;
    flex: 0 0 auto;
    gap: 10px;
    padding: 16px 22px;
}

.dialog-action-spacer {
    flex: 1;
}

.account-page {
    align-items: center;
    background: var(--bg-main);
    display: grid;
    min-height: 100vh;
    padding: 24px;
}

.account-panel {
    background: var(--bg-white);
    border: 1px solid var(--border-panel);
    border-radius: 8px;
    box-shadow: 0 18px 45px rgba(23, 35, 38, .10);
    display: grid;
    gap: 18px;
    justify-self: center;
    padding: 28px;
    width: min(440px, 100%);
}

.account-brand {
    color: var(--sidebar-bg);
    margin-bottom: 6px;
}

.account-form {
    display: grid;
    gap: 14px;
}

.account-form .button {
    margin-top: 4px;
}

.code-input {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: 0;
    text-align: center;
}

.account-switch {
    color: var(--text-muted);
    margin: 0;
}

.account-switch a {
    color: var(--primary-dark);
    font-weight: 750;
}

.notification-panel {
    margin-bottom: 18px;
}

.notification-panel-passive {
    background: var(--bg-passive);
}

.notification-panel-active {
    border-color: var(--notification-active-border);
}

.notification-list {
    display: grid;
    gap: 12px;
}

.notification-row {
    align-items: start;
    border: 1px solid var(--border-panel);
    border-radius: 8px;
    display: grid;
    gap: 14px;
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 14px;
}

.notification-row p {
    color: var(--text-muted-darkest);
    margin: 6px 0 0;
    white-space: pre-line;
}

.notification-actions {
    display: flex;
    gap: 8px;
}

.notification-dot {
    align-items: center;
    background: var(--bg-accent);
    border: 1px solid white;
    border-radius: 999px;
    color: var(--primary-darkest);
    display: inline-flex;
    font-size: 11px;
    font-weight: 800;
    height: 18px;
    justify-content: center;
    min-width: 18px;
    padding: 0 5px;
    position: absolute;
    right: -5px;
    top: -6px;
}

@media (max-width: 900px) {
    body {
        background: var(--bg-main);
    }

    .app-shell {
        display: block;
        min-height: 100vh;
        padding-top: 66px;
    }

    .mobile-topbar {
        align-items: center;
        background: var(--sidebar-bg);
        border-bottom: 1px solid var(--sidebar-border);
        color: var(--text-sidebar);
        display: flex;
        gap: 12px;
        justify-content: space-between;
        left: 0;
        min-height: 66px;
        padding: 10px 12px;
        position: fixed;
        right: 0;
        top: 0;
        z-index: 70;
    }

    .mobile-brand {
        margin: 0;
        min-width: 0;
    }

    .mobile-brand .brand-mark {
        height: 36px;
        width: 36px;
    }

    .mobile-brand strong,
    .mobile-brand small {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .mobile-brand small {
        font-size: 11px;
    }

    .mobile-icon-link,
    .mobile-menu-toggle {
        align-items: center;
        background: var(--sidebar-element);
        border: 1px solid var(--sidebar-border-light);
        border-radius: 7px;
        color: var(--text-sidebar);
        align-items: center;
        display: flex;
        flex: 0 0 auto;
        gap: 6px;
    }

    .mobile-icon-link,
    .mobile-menu-toggle {
        align-items: center;
        background: #203034;
        border: 1px solid #40585d;
        border-radius: 7px;
        color: #f6fbfb;
        cursor: pointer;
        display: inline-flex;
        height: 42px;
        justify-content: center;
        padding: 0;
        position: relative;
        text-decoration: none;
        width: 42px;
    }

    .mobile-icon-link:hover,
    .mobile-menu-toggle:hover {
        background: var(--sidebar-hover);
    }

    .mobile-icon-link svg[blazicon],
    .mobile-menu-toggle svg[blazicon] {
        font-size: 19px;
    }

    .mobile-menu-toggle {
        background: var(--primary-accent);
        border-color: var(--primary-accent);
        color: var(--primary-darkest);
    }

    .sidebar {
        box-shadow: 22px 0 50px rgba(9, 18, 20, .26);
        gap: 20px;
        height: calc(100vh - 66px);
        left: 0;
        max-width: min(86vw, 360px);
        overflow-y: auto;
        padding: 18px 16px 22px;
        position: fixed;
        top: 66px;
        transform: translateX(-105%);
        transition: transform .18s ease;
        width: min(86vw, 360px);
        z-index: 80;
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .sidebar > .sidebar-primary > .brand {
        display: none;
    }

    .mobile-menu-scrim {
        background: rgba(15, 25, 28, .48);
        border: 0;
        bottom: 0;
        cursor: pointer;
        left: 0;
        opacity: 0;
        pointer-events: none;
        position: fixed;
        right: 0;
        top: 66px;
        transition: opacity .18s ease;
        z-index: 75;
    }

    .mobile-menu-scrim.open {
        display: block;
        opacity: 1;
        pointer-events: auto;
    }

    .nav-list {
        gap: 8px;
        grid-template-columns: 1fr;
    }

    .nav-list a {
        min-height: 46px;
    }

    .active-property-picker {
        margin-top: 16px;
    }

    .active-property-list {
        max-height: 260px;
    }

    .main-content {
        --main-content-inline-padding: 14px;
        padding: 18px 14px 24px;
    }

    .app-main-topbar {
        display: none;
    }

    .messages-page {
        height: calc(100vh - 156px);
    }

    .metric-grid,
    .access-summary-grid,
    .content-grid,
    .split-view,
    .message-panel,
    .form-grid,
    .calendar-grid-week,
    .calendar-grid-month {
        grid-template-columns: 1fr;
    }

    .message-detail {
        border-left: 0;
        border-top: 1px solid var(--border-divider);
        padding-left: 0;
        padding-top: 18px;
    }

    .messages-workspace > .message-panel {
        grid-template-rows: minmax(150px, 34%) minmax(0, 1fr);
    }

    .message-detail-header,
    .message-composer {
        display: grid;
        grid-template-columns: 1fr;
    }

    .message-participants {
        justify-content: flex-start;
    }

    .inventory-row {
        align-items: flex-start;
        grid-template-columns: 1fr;
    }

    .document-upload-grid,
    .document-row {
        grid-template-columns: 1fr;
    }

    .document-preview-backdrop {
        padding: 10px;
    }

    .document-preview-panel,
    .document-preview-panel.expanded {
        height: calc(100vh - 20px);
        width: calc(100vw - 20px);
    }

    .document-preview-header {
        align-items: flex-start;
        display: grid;
    }

    .document-preview-actions {
        flex-wrap: wrap;
    }

    .document-file-icon {
        display: none;
    }

    .day-task-row {
        grid-template-columns: 40px minmax(0, 1fr);
    }

    .day-task-property {
        grid-column: 2 / -1;
    }

    .day-task-row .row-actions {
        grid-column: 1 / -1;
        justify-content: flex-start;
    }

    .inventory-row .row-actions {
        justify-content: flex-start;
    }

    .page-header {
        display: grid;
        padding-right: 0;
    }

    .property-header-actions {
        justify-self: end;
    }

    .tab-control {
        margin-left: -4px;
        margin-right: -4px;
    }

    .detail-list div {
        grid-template-columns: 1fr;
    }
}
