:root {
    --crm-bg: #ece4d8;
    --crm-panel: rgba(255, 255, 255, 0.96);
    --crm-panel-strong: #ffffff;
    --crm-panel-soft: rgba(249, 245, 238, 0.98);
    --crm-ink: #111a16;
    --crm-muted: #40534b;
    --crm-accent: #0f6a52;
    --crm-accent-strong: #084837;
    --crm-accent-soft: #c8ebdd;
    --crm-border: #bcae99;
    --crm-border-strong: rgba(72, 61, 45, 0.36);
    --crm-divider: rgba(64, 83, 75, 0.26);
    --crm-warning: #a9680b;
    --crm-warning-soft: #ffe7b6;
    --crm-danger: #9f3429;
    --crm-danger-soft: #fbd2c9;
    --crm-success: #0d6547;
    --crm-success-soft: #c9ebda;
    --crm-neutral-soft: #e1e8e4;
    --crm-shadow: 0 28px 80px -34px rgba(17, 24, 21, 0.36);
    --crm-shadow-soft: 0 18px 46px -30px rgba(17, 24, 21, 0.32);
    --crm-focus-ring: rgba(15, 106, 82, 0.28);
    --crm-radius: 28px;
    --crm-radius-small: 18px;
    --crm-mark-green: #5b9d35;
    --crm-mark-green-strong: #417823;
    --crm-safe-top: env(safe-area-inset-top, 0px);
    --crm-safe-right: env(safe-area-inset-right, 0px);
    --crm-safe-bottom: env(safe-area-inset-bottom, 0px);
    --crm-safe-left: env(safe-area-inset-left, 0px);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: "IBM Plex Sans", "Trebuchet MS", "Segoe UI", sans-serif;
    color: var(--crm-ink);
    background: linear-gradient(180deg, #fbf8f4 0%, #efe8de 54%, #e6ddd0 100%);
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
select,
textarea {
    font: inherit;
}

.crm-public-page,
.crm-app-page {
    min-height: 100vh;
    min-height: 100svh;
}

.crm-public-shell {
    min-height: 100vh;
    min-height: 100svh;
    display: grid;
    place-items: center;
    padding:
        calc(40px + var(--crm-safe-top))
        calc(16px + var(--crm-safe-right))
        calc(40px + var(--crm-safe-bottom))
        calc(16px + var(--crm-safe-left));
}

.crm-public-hero {
    width: min(1120px, 100%);
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 32px;
    align-items: stretch;
    padding: 16px;
    border: 1px solid rgba(255, 255, 255, 0.72);
    background: var(--crm-panel);
    backdrop-filter: blur(18px);
    box-shadow: 0 40px 120px -44px rgba(15, 23, 42, 0.35);
    border-radius: 36px;
}

.crm-card,
.crm-stat-card {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--crm-border-strong);
    background: linear-gradient(180deg, #ffffff 0%, #faf5ed 100%);
    backdrop-filter: blur(18px);
    box-shadow: var(--crm-shadow);
    border-radius: var(--crm-radius);
}

.crm-card::before,
.crm-stat-card::before,
.crm-public-card::before,
.crm-loading-panel::before,
.crm-page-header::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 1px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.96), rgba(15, 106, 82, 0.48), rgba(255, 255, 255, 0.96));
    pointer-events: none;
}

.crm-public-brand {
    background: #020617;
    color: #ffffff;
    padding: 32px;
    border-radius: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.crm-public-brand .crm-muted {
    max-width: 42rem;
    font-size: 14px;
    line-height: 1.75;
    color: #cbd5e1;
}

.crm-public-card {
    width: 100%;
    max-width: 420px;
    justify-self: center;
    position: relative;
    overflow: hidden;
    border: 1px solid var(--crm-border-strong);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.97) 0%, rgba(248, 244, 238, 0.94) 100%);
    backdrop-filter: blur(18px);
    box-shadow: var(--crm-shadow);
    border-radius: 28px;
    padding: 24px;
}

.crm-public-card-wide {
    max-width: 560px;
}

.crm-brand-lockup {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 12px;
}

.crm-brand-lockup-public,
.crm-brand-lockup-sidebar {
    align-items: center;
    gap: 16px;
}

.crm-brand-lockup-public {
    justify-content: center;
    width: 100%;
}

.crm-brand-lockup-public .crm-brand-copy {
    display: flex;
    min-height: 56px;
    align-items: center;
    justify-content: center;
}

.crm-brand-lockup-public .crm-eyebrow {
    display: inline-flex;
    align-items: center;
    margin: 0;
    line-height: 1;
}

.crm-brand-copy > *:last-child {
    margin-bottom: 0;
}

.crm-mark {
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    background: linear-gradient(160deg, #74b248 0%, var(--crm-mark-green) 54%, var(--crm-mark-green-strong) 100%);
    border-radius: 22px;
    box-shadow: 0 18px 42px -28px rgba(8, 20, 13, 0.45);
}

.crm-mark-triangle {
    width: 0;
    height: 0;
    border-left: 16px solid transparent;
    border-right: 16px solid transparent;
    border-bottom: 28px solid #0f1210;
    transform: translateY(-2px);
    filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.16));
}

.crm-mark-default,
.crm-mark-card {
    width: 50px;
    height: 50px;
    margin-bottom: 14px;
    border-radius: 16px;
}

.crm-mark-sidebar {
    width: 58px;
    height: 58px;
    border-radius: 18px;
    box-shadow: 0 16px 36px -22px rgba(0, 0, 0, 0.72);
}

.crm-mark-sidebar .crm-mark-triangle {
    border-left-width: 14px;
    border-right-width: 14px;
    border-bottom-width: 24px;
}

.crm-mark-hero,
.crm-mark-loading {
    width: 56px;
    height: 56px;
    border-radius: 18px;
}

.crm-mark-hero .crm-mark-triangle,
.crm-mark-loading .crm-mark-triangle {
    border-left-width: 14px;
    border-right-width: 14px;
    border-bottom-width: 24px;
}

.crm-eyebrow {
    margin: 0 0 12px 0;
    font-size: 13px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: #89cdb9;
    font-weight: 700;
}

.crm-public-card .crm-eyebrow,
.crm-card .crm-eyebrow,
.crm-page-header .crm-eyebrow {
    color: var(--crm-accent);
}

.crm-public-card .crm-field {
    color: #334155;
    font-weight: 600;
}

.crm-public-card .crm-actions {
    display: grid;
}

.crm-public-card .crm-button,
.crm-public-card .crm-button-secondary {
    width: 100%;
}

.crm-public-card .crm-help {
    font-size: 12px;
    line-height: 1.6;
    color: var(--crm-muted);
}

.crm-login-help {
    line-height: 1.65;
}

.crm-inline-toggle-link {
    display: inline;
    padding: 0;
    border: 0;
    background: none;
    color: var(--crm-accent);
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    text-align: left;
}

.crm-inline-toggle-link:hover {
    text-decoration: underline;
}

.crm-inline-toggle-link:focus-visible {
    outline: 3px solid var(--crm-focus-ring);
    outline-offset: 3px;
    border-radius: 10px;
}

.crm-login-magic-panel[hidden] {
    display: none;
}

.crm-login-magic-panel .crm-inline-divider {
    margin-top: 0;
    margin-bottom: 18px;
}

h1,
h2,
h3,
h4,
p {
    margin-top: 0;
}

h1 {
    font-size: clamp(34px, 4.8vw, 42px);
    line-height: 1.15;
    margin-bottom: 16px;
}

h2 {
    font-size: clamp(28px, 3vw, 32px);
    line-height: 1.12;
    margin-bottom: 12px;
}

h3 {
    font-size: 22px;
    margin-bottom: 10px;
}

h4 {
    font-size: 17px;
    margin-bottom: 10px;
}

.crm-muted,
.crm-help,
.crm-meta,
dt {
    color: var(--crm-muted);
}

.crm-tag-row {
    margin-top: 24px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.crm-tag-row span,
.crm-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 14px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.crm-tag-row span {
    min-height: 74px;
    padding: 16px;
    align-items: flex-start;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.10);
    color: #d5deea;
}

.crm-badge {
    align-self: flex-start;
    white-space: normal;
    line-height: 1.35;
    text-align: center;
    border: 1px solid transparent;
}

button.crm-badge {
    font: inherit;
    cursor: pointer;
    appearance: none;
}

.crm-status-edit-trigger {
    position: relative;
    min-height: 38px;
    transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.crm-status-edit-trigger::after {
    content: "";
    width: 7px;
    height: 7px;
    margin-left: 2px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    opacity: 0.72;
    transform: rotate(-45deg);
}

.crm-status-edit-trigger:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 34px -28px rgba(29, 36, 31, 0.34);
}

.crm-status-edit-trigger:focus-visible {
    outline: none;
    box-shadow: 0 0 0 4px var(--crm-focus-ring);
}

.crm-app-shell {
    display: grid;
    grid-template-columns: 320px 1fr;
    min-height: 100vh;
    min-height: 100svh;
    position: relative;
    align-items: start;
}

.crm-sidebar {
    position: sticky;
    top: 0;
    align-self: start;
    min-height: 100vh;
    min-height: 100svh;
    padding:
        calc(28px + var(--crm-safe-top))
        calc(22px + var(--crm-safe-right))
        calc(28px + var(--crm-safe-bottom))
        calc(22px + var(--crm-safe-left));
    background: linear-gradient(180deg, rgba(12, 24, 21, 0.98) 0%, rgba(23, 39, 34, 0.96) 100%);
    color: #ffffff;
    display: flex;
    flex-direction: column;
    gap: 24px;
    box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.05);
}

.crm-sidebar-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.crm-sidebar-brand,
.crm-sidebar-footer,
.crm-page-navigation > *,
.crm-page-header > *,
.crm-card-header > *,
.crm-actions > *,
.crm-list-item > *,
.crm-timeline-item > *,
.crm-info-grid > div > * {
    min-width: 0;
}

.crm-sidebar-brand h1 {
    font-size: 34px;
    margin-bottom: 6px;
}

.crm-sidebar-copy,
.crm-sidebar-email {
    color: rgba(255, 255, 255, 0.86);
}

.crm-sidebar-copy,
.crm-sidebar-email,
.crm-nav-link,
.crm-install-body,
.crm-install-hint,
.crm-install-steps,
.crm-notice,
.crm-inline-static,
.crm-inline-static-block,
.crm-table th,
.crm-table td,
.crm-table td p,
.crm-table td a,
.crm-list-item,
.crm-timeline-item,
.crm-empty,
dd {
    overflow-wrap: anywhere;
    word-break: normal;
}

.crm-sidebar-close {
    display: none;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 46px;
    min-width: 46px;
    min-height: 46px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    box-shadow: none;
    cursor: pointer;
    transition: background-color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.crm-sidebar-close:hover {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.22);
    transform: translateY(-1px);
}

.crm-sidebar-close span {
    font-size: 24px;
    line-height: 1;
}

.crm-nav {
    display: grid;
    gap: 8px;
}

.crm-nav-section {
    display: grid;
    gap: 0;
    padding: 0;
}

.crm-nav-section-toggle {
    display: block;
    cursor: pointer;
    list-style: none;
}

.crm-nav-section-toggle::-webkit-details-marker {
    display: none;
}

.crm-nav-link-section {
    justify-content: space-between;
    gap: 12px;
}

.crm-nav-section-icon {
    flex: 0 0 auto;
    width: 9px;
    height: 9px;
    margin-left: auto;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
    transition: transform 0.18s ease;
}

.crm-nav-section[open] .crm-nav-section-icon {
    transform: rotate(225deg);
}

.crm-nav-section.is-active .crm-nav-link-section,
.crm-nav-section[open] .crm-nav-link-section {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.12);
    color: #ffffff;
}

.crm-nav-section-label {
    display: block;
    padding: 0 14px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.68);
}

.crm-nav-submenu {
    display: grid;
    gap: 6px;
    padding: 6px 0 10px;
}

.crm-nav-link {
    display: flex;
    align-items: center;
    min-height: 48px;
    padding: 12px 14px;
    border-radius: 16px;
    color: rgba(255, 255, 255, 0.9);
    border: 1px solid transparent;
    transition: 0.18s ease;
    font-weight: 600;
}

.crm-nav-link:hover,
.crm-nav-link.is-active {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.12);
    color: #ffffff;
}

.crm-nav-link-sub {
    min-height: 44px;
    margin-left: 10px;
    padding-left: 18px;
    font-size: 14px;
    border-radius: 14px;
}

.crm-sidebar-footer {
    margin-top: auto;
    display: grid;
    gap: 10px;
}

.crm-sidebar-footer .crm-badge {
    width: fit-content;
}

.crm-sidebar-user {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 0;
}

.crm-logout-link {
    margin-top: 8px;
    color: #d7efe7;
    font-weight: 700;
}

.crm-sidebar-backdrop {
    position: fixed;
    inset: 0;
    z-index: 34;
    border: 0;
    padding: 0;
    background: rgba(15, 23, 42, 0.34);
    backdrop-filter: blur(6px);
    cursor: pointer;
}

.crm-mobile-toolbar {
    display: none;
    align-items: center;
    gap: 14px;
    padding: 18px 20px;
    border: 1px solid var(--crm-border-strong);
    border-radius: 24px;
    background: linear-gradient(180deg, #ffffff 0%, #faf5ed 100%);
    box-shadow: var(--crm-shadow-soft);
}

.crm-sidebar-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 48px;
    padding: 12px 18px;
    border: 1px solid var(--crm-border);
    border-radius: 999px;
    background: linear-gradient(180deg, #ffffff 0%, #f8f2e8 100%);
    color: var(--crm-ink);
    box-shadow: var(--crm-shadow-soft);
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.crm-sidebar-toggle:hover {
    transform: translateY(-1px);
    box-shadow: 0 18px 40px -30px rgba(29, 36, 31, 0.24);
}

.crm-sidebar-toggle:focus-visible,
.crm-sidebar-close:focus-visible {
    outline: none;
    box-shadow: 0 0 0 4px var(--crm-focus-ring), var(--crm-shadow-soft);
}

.crm-sidebar-toggle-icon {
    display: inline-grid;
    gap: 4px;
}

.crm-sidebar-toggle-icon span {
    display: block;
    width: 18px;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
}

.crm-mobile-toolbar-copy {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.crm-mobile-toolbar-label,
.crm-mobile-toolbar-user {
    margin: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.crm-mobile-toolbar-label {
    font-size: 12px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--crm-muted);
    font-weight: 800;
}

.crm-mobile-toolbar-user {
    font-size: 16px;
    font-weight: 700;
    color: var(--crm-ink);
}

.crm-page-navigation {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    min-width: 0;
    padding: 14px 18px;
    border: 1px solid var(--crm-border-strong);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: var(--crm-shadow-soft);
}

.crm-page-back-link {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    padding: 9px 15px;
    border: 1px solid var(--crm-border);
    border-radius: 999px;
    background: linear-gradient(180deg, #ffffff 0%, #f8f2e8 100%);
    color: var(--crm-ink);
    font-weight: 800;
    box-shadow: var(--crm-shadow-soft);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.crm-page-back-link:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 36px -30px rgba(29, 36, 31, 0.26);
}

.crm-page-back-link:focus-visible {
    outline: none;
    box-shadow: 0 0 0 4px var(--crm-focus-ring), var(--crm-shadow-soft);
}

.crm-breadcrumbs {
    display: flex;
    flex: 1 1 auto;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    min-width: 0;
    margin: 0;
    padding: 0;
    list-style: none;
    color: var(--crm-muted);
    font-size: 13px;
    line-height: 1.45;
}

.crm-breadcrumb-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.crm-breadcrumb-item + .crm-breadcrumb-item::before {
    content: "/";
    color: rgba(95, 111, 104, 0.58);
    font-weight: 700;
}

.crm-breadcrumb-item a,
.crm-breadcrumb-item span {
    min-width: 0;
    overflow-wrap: anywhere;
}

.crm-breadcrumb-item a {
    color: var(--crm-accent);
    font-weight: 800;
}

.crm-breadcrumb-item [aria-current="page"] {
    color: var(--crm-ink);
    font-weight: 800;
}

.crm-install-panel {
    display: grid;
    gap: 14px;
    padding: 16px 18px;
    border-radius: 22px;
    border: 1px solid var(--crm-border);
    background: linear-gradient(180deg, #ffffff 0%, #faf5ed 100%);
    box-shadow: var(--crm-shadow-soft);
}

.crm-install-panel[hidden] {
    display: none;
}

.crm-install-panel-sidebar {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.04) 100%);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: none;
}

.crm-install-panel-sidebar .crm-install-title {
    color: #ffffff;
}

.crm-install-panel-sidebar .crm-install-body,
.crm-install-panel-sidebar .crm-install-hint,
.crm-install-panel-sidebar .crm-install-steps {
    color: rgba(255, 255, 255, 0.76);
}

body.crm-modal-open {
    overflow: hidden;
}

.crm-install-modal {
    position: fixed;
    inset: 0;
    z-index: 240;
    display: grid;
    place-items: center;
    padding:
        calc(24px + var(--crm-safe-top))
        calc(18px + var(--crm-safe-right))
        calc(24px + var(--crm-safe-bottom))
        calc(18px + var(--crm-safe-left));
}

.crm-install-modal[hidden] {
    display: none;
}

.crm-install-modal-backdrop {
    position: absolute;
    inset: 0;
    border: 0;
    background: rgba(15, 23, 42, 0.48);
    backdrop-filter: blur(10px);
    cursor: pointer;
}

.crm-install-modal-card {
    position: relative;
    z-index: 1;
    width: min(560px, 100%);
    padding: 28px;
    display: grid;
    gap: 16px;
    border: 1px solid var(--crm-border-strong);
    border-radius: 30px;
    background: linear-gradient(180deg, #ffffff 0%, #faf5ed 100%);
    box-shadow: 0 40px 120px -44px rgba(15, 23, 42, 0.46);
}

.crm-install-modal-close {
    position: absolute;
    top: 18px;
    right: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    min-width: 44px;
    min-height: 44px;
    padding: 0;
    border: 1px solid var(--crm-border);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.88);
    color: var(--crm-ink);
    cursor: pointer;
    box-shadow: var(--crm-shadow-soft);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.crm-install-modal-close:hover {
    transform: translateY(-1px);
    box-shadow: 0 18px 40px -30px rgba(29, 36, 31, 0.24);
}

.crm-install-modal-close:focus-visible {
    outline: none;
    box-shadow: 0 0 0 4px var(--crm-focus-ring), var(--crm-shadow-soft);
}

.crm-install-modal-close span {
    font-size: 24px;
    line-height: 1;
}

.crm-install-copy {
    display: grid;
    gap: 6px;
}

.crm-install-title {
    margin: 0;
    font-size: clamp(28px, 3vw, 34px);
    line-height: 1.12;
    font-weight: 800;
    color: var(--crm-ink);
}

.crm-install-body,
.crm-install-hint {
    margin: 0;
    font-size: 13px;
    line-height: 1.65;
    color: var(--crm-muted);
}

.crm-install-button {
    width: 100%;
}

.crm-install-ios-help {
    display: grid;
    gap: 10px;
    padding-top: 2px;
}

.crm-dashboard-owner-card {
    margin-bottom: 28px;
}

.crm-dashboard-owner {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.crm-user-avatar {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(15, 106, 82, 0.2) 0%, rgba(8, 72, 55, 0.32) 100%);
    border: 1px solid rgba(15, 106, 82, 0.3);
    color: var(--crm-accent-strong);
    font-weight: 800;
    letter-spacing: 0.06em;
    box-shadow: var(--crm-shadow-soft);
}

.crm-user-avatar-small {
    width: 36px;
    min-width: 36px;
    height: 36px;
    font-size: 12px;
}

.crm-user-avatar-medium {
    width: 44px;
    min-width: 44px;
    height: 44px;
    font-size: 14px;
}

.crm-user-meta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    color: var(--crm-muted);
    font-size: 14px;
    line-height: 1.5;
    flex-wrap: wrap;
}

.crm-user-meta-compact {
    gap: 8px;
}

.crm-user-meta-label {
    color: var(--crm-muted);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.4;
}

.crm-user-meta strong,
.crm-dashboard-owner strong {
    color: var(--crm-ink);
}

.crm-dashboard-metrics {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 14px;
}

.crm-dashboard-metric {
    min-height: 176px;
    display: grid;
    align-content: space-between;
    gap: 12px;
    padding: 20px;
    border: 1px solid var(--crm-border-strong);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: var(--crm-shadow-soft);
    transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

a.crm-dashboard-metric:hover,
a.crm-dashboard-metric:focus-visible {
    transform: translateY(-2px);
    border-color: rgba(29, 109, 89, 0.26);
    box-shadow: 0 24px 70px -38px rgba(22, 29, 25, 0.32);
}

a.crm-dashboard-metric:focus-visible {
    outline: 4px solid var(--crm-focus-ring);
    outline-offset: 3px;
}

.crm-dashboard-metric-label,
.crm-dashboard-metric-helper {
    font-size: 13px;
    line-height: 1.5;
}

.crm-dashboard-metric-label {
    font-weight: 800;
    color: rgba(17, 26, 22, 0.86);
}

.crm-dashboard-metric-value {
    display: block;
    font-size: clamp(34px, 4vw, 44px);
    line-height: 1;
    color: var(--crm-ink);
}

.crm-dashboard-metric-helper {
    color: var(--crm-muted);
}

.crm-dashboard-metric-success {
    background: linear-gradient(180deg, #0f3b31 0%, #165d4c 100%);
    color: #ffffff;
}

.crm-dashboard-metric-success .crm-dashboard-metric-label,
.crm-dashboard-metric-success .crm-dashboard-metric-helper,
.crm-dashboard-metric-success .crm-dashboard-metric-value {
    color: #ffffff;
}

.crm-dashboard-metric-warning {
    background: linear-gradient(180deg, #fff8eb 0%, #ffeac4 100%);
    border-color: rgba(213, 143, 41, 0.32);
}

.crm-dashboard-metric-danger {
    background: linear-gradient(180deg, #fff0ed 0%, #fbded8 100%);
    border-color: rgba(179, 74, 61, 0.28);
}

.crm-dashboard-metric-info {
    background: linear-gradient(180deg, #eef8ff 0%, #dff0fb 100%);
    border-color: rgba(56, 118, 157, 0.22);
}

.crm-dashboard-grid-primary {
    grid-template-columns: minmax(0, 1.18fr) minmax(320px, 0.82fr);
}

.crm-dashboard-grid-secondary {
    grid-template-columns: minmax(320px, 0.78fr) minmax(0, 1.22fr);
}

.crm-dashboard-action-item {
    color: inherit;
    transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.crm-dashboard-action-item:hover,
.crm-dashboard-action-item:focus-visible {
    transform: translateY(-1px);
    border-color: rgba(29, 109, 89, 0.24);
    background: rgba(255, 255, 255, 0.94);
}

.crm-dashboard-action-item:focus-visible {
    outline: 4px solid var(--crm-focus-ring);
    outline-offset: 3px;
}

.crm-dashboard-action-item > span:first-child {
    display: grid;
    gap: 7px;
}

.crm-dashboard-pipeline-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.crm-dashboard-pipeline-panel {
    display: grid;
    align-content: start;
    gap: 12px;
    min-width: 0;
}

.crm-dashboard-pipeline-panel h4 {
    margin-bottom: 0;
}

.crm-dashboard-pipeline-list,
.crm-dashboard-project-list {
    display: grid;
    gap: 10px;
}

.crm-dashboard-pipeline-row {
    display: grid;
    gap: 9px;
    padding: 10px;
    border-radius: 16px;
    transition: background 0.16s ease;
}

a.crm-dashboard-pipeline-row:hover,
a.crm-dashboard-pipeline-row:focus-visible {
    background: rgba(255, 255, 255, 0.72);
}

a.crm-dashboard-pipeline-row:focus-visible {
    outline: 4px solid var(--crm-focus-ring);
    outline-offset: 2px;
}

.crm-dashboard-pipeline-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: var(--crm-muted);
    font-size: 14px;
    font-weight: 700;
}

.crm-dashboard-pipeline-head strong {
    color: var(--crm-ink);
}

.crm-dashboard-pipeline-track {
    display: block;
    height: 9px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(95, 111, 104, 0.14);
}

.crm-dashboard-pipeline-fill {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: #64748b;
}

.crm-dashboard-pipeline-row-success .crm-dashboard-pipeline-fill {
    background: var(--crm-success);
}

.crm-dashboard-pipeline-row-warning .crm-dashboard-pipeline-fill {
    background: var(--crm-warning);
}

.crm-dashboard-pipeline-row-danger .crm-dashboard-pipeline-fill {
    background: var(--crm-danger);
}

.crm-dashboard-pipeline-row-info .crm-dashboard-pipeline-fill {
    background: #2f7ca7;
}

.crm-dashboard-project-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    color: var(--crm-muted);
    font-size: 13px;
    font-weight: 700;
}

.crm-dashboard-day-check {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    background: linear-gradient(135deg, #111827 0%, #102a25 100%);
    color: #ffffff;
}

.crm-dashboard-day-check h3,
.crm-dashboard-day-check .crm-muted {
    color: #ffffff;
}

.crm-dashboard-day-check .crm-muted {
    opacity: 0.78;
    margin-bottom: 0;
}

.crm-dashboard-storage-card {
    gap: 18px;
}

.crm-dashboard-storage-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.crm-dashboard-storage-summary span {
    display: grid;
    gap: 4px;
    min-width: 0;
    padding: 16px 18px;
    border: 1px solid var(--crm-divider);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.96);
    color: var(--crm-muted);
    font-size: 13px;
    font-weight: 700;
}

.crm-dashboard-storage-summary strong {
    color: var(--crm-ink);
    font-size: 24px;
    line-height: 1.15;
}

.crm-storage-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.crm-storage-layout {
    display: grid;
    grid-template-columns: minmax(300px, 0.34fr) minmax(0, 0.66fr);
    gap: 18px;
    align-items: start;
}

.crm-storage-sidebar,
.crm-storage-detail {
    min-width: 0;
}

.crm-storage-sidebar {
    position: sticky;
    top: 18px;
    max-height: calc(100vh - 36px);
    overflow: auto;
}

.crm-storage-tree,
.crm-storage-children {
    display: grid;
    gap: 8px;
}

.crm-storage-root,
.crm-storage-owner-node,
.crm-storage-folder-node {
    min-width: 0;
}

.crm-storage-root > summary,
.crm-storage-owner-node > summary,
.crm-storage-folder-node > summary {
    cursor: pointer;
    list-style: none;
}

.crm-storage-root > summary::-webkit-details-marker,
.crm-storage-owner-node > summary::-webkit-details-marker,
.crm-storage-folder-node > summary::-webkit-details-marker {
    display: none;
}

.crm-storage-root > summary {
    padding: 10px 12px;
    border-radius: 16px;
    background: rgba(15, 106, 82, 0.12);
    color: var(--crm-accent-strong);
    font-size: 13px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.crm-storage-owner-node > summary,
.crm-storage-folder-node > summary {
    margin-top: 8px;
}

.crm-storage-children {
    padding-left: 14px;
    border-left: 1px solid rgba(64, 83, 75, 0.28);
}

.crm-storage-node {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 10px;
    align-items: start;
    min-width: 0;
    padding: 10px 12px;
    border: 1px solid transparent;
    border-radius: 16px;
    color: inherit;
    text-decoration: none;
    transition: background 0.16s ease, border-color 0.16s ease, transform 0.16s ease;
}

.crm-storage-node:hover,
.crm-storage-node:focus-visible,
.crm-storage-node.is-active {
    border-color: rgba(15, 106, 82, 0.36);
    background: rgba(255, 255, 255, 0.96);
}

.crm-storage-node:focus-visible {
    outline: 4px solid var(--crm-focus-ring);
    outline-offset: 2px;
}

.crm-storage-node-kind {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 26px;
    border-radius: 999px;
    background: rgba(64, 83, 75, 0.16);
    color: var(--crm-muted);
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.crm-storage-file-node .crm-storage-node-kind {
    background: rgba(47, 124, 167, 0.12);
    color: #2f6f94;
}

.crm-storage-node-copy {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.crm-storage-node-copy strong,
.crm-storage-node-copy small {
    overflow-wrap: anywhere;
}

.crm-storage-node-copy strong {
    color: var(--crm-ink);
    font-size: 14px;
}

.crm-storage-node-copy small {
    color: var(--crm-muted);
    font-size: 12px;
    line-height: 1.45;
}

.crm-storage-tools {
    display: grid;
    grid-template-columns: minmax(240px, 0.42fr) minmax(280px, 0.58fr);
    gap: 16px;
    margin-top: 18px;
}

.crm-storage-tool-card {
    align-content: start;
    gap: 12px;
    padding: 16px;
    border: 1px solid var(--crm-divider);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.96);
}

.crm-storage-content {
    display: grid;
    gap: 14px;
    margin-top: 22px;
}

.crm-storage-content-list {
    display: grid;
    gap: 12px;
}

.crm-storage-content-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, auto);
    gap: 16px;
    align-items: start;
    padding: 16px;
    border: 1px solid var(--crm-divider);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.98);
}

.crm-storage-content-row strong {
    overflow-wrap: anywhere;
}

.crm-storage-folder-row {
    background: rgba(15, 106, 82, 0.1);
}

.crm-storage-row-actions,
.crm-storage-inline-form {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.crm-storage-inline-form {
    align-items: center;
}

.crm-storage-compact-input {
    width: min(220px, 100%);
}

.crm-storage-compact-select {
    width: min(190px, 100%);
}

.crm-task-list {
    gap: 16px;
}

.crm-task-card {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    padding: 20px;
    border: 1px solid var(--crm-divider);
    border-radius: 24px;
    background: linear-gradient(180deg, #ffffff 0%, #faf5ed 100%);
    box-shadow: var(--crm-shadow-soft);
}

.crm-task-card-history {
    opacity: 0.94;
}

.crm-task-card-main {
    flex: 1 1 auto;
    min-width: 0;
    display: grid;
    gap: 12px;
}

.crm-task-card-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
}

.crm-task-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 18px;
    align-items: center;
}

.crm-task-title-row {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    max-width: 100%;
    min-width: 0;
    vertical-align: middle;
}

.crm-task-title-row > strong,
.crm-task-title-row > span:not(.crm-task-notification-badge) {
    min-width: 0;
    overflow-wrap: anywhere;
}

.crm-nav-link .crm-task-notification-badge {
    margin-left: auto;
}

.crm-task-notification-badge {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    padding: 0 7px;
    border-radius: 999px;
    background: #c62828;
    color: #ffffff;
    box-shadow: 0 8px 18px -10px rgba(198, 40, 40, 0.72);
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
}

.crm-task-assignees {
    display: grid;
    gap: 8px;
    min-width: 0;
}

.crm-task-assignee-chips,
.crm-task-assignee-manage-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.crm-task-assignee-chip,
.crm-task-assignee-manage-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    max-width: 100%;
    min-height: 40px;
    padding: 3px 10px 3px 4px;
    border: 1px solid var(--crm-divider);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.98);
    color: var(--crm-ink);
    font-size: 13px;
    font-weight: 700;
}

.crm-task-assignee-chip span,
.crm-task-assignee-manage-chip span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.crm-task-assignee-manager {
    display: grid;
    gap: 14px;
    padding: 16px 18px;
    border: 1px solid var(--crm-divider);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.96);
}

.crm-task-assignee-remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--crm-muted);
    cursor: pointer;
    font-size: 19px;
    line-height: 1;
}

.crm-task-assignee-remove:hover,
.crm-task-assignee-remove:focus-visible {
    background: rgba(121, 59, 48, 0.1);
    color: var(--crm-danger);
    outline: none;
}

.crm-task-items {
    display: grid;
    gap: 14px;
    padding: 16px 18px;
    border: 1px solid var(--crm-divider);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.96);
}

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

.crm-task-item-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    min-height: 56px;
    padding: 10px 12px;
    border: 1px solid var(--crm-divider);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.98);
}

.crm-task-item-row.is-done {
    background: rgba(225, 232, 228, 0.88);
}

.crm-task-item-toggle-form,
.crm-task-item-delete-form {
    margin: 0;
}

.crm-task-item-toggle,
.crm-task-item-delete {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 999px;
    background: transparent;
    cursor: pointer;
}

.crm-task-item-toggle {
    width: 34px;
    height: 34px;
    border: 1px solid rgba(15, 106, 82, 0.46);
    background: rgba(255, 255, 255, 0.96);
}

.crm-task-item-toggle span {
    width: 16px;
    height: 16px;
    border-radius: 999px;
    background: transparent;
}

.crm-task-item-row.is-done .crm-task-item-toggle {
    background: var(--crm-accent);
    border-color: var(--crm-accent);
}

.crm-task-item-row.is-done .crm-task-item-toggle span {
    width: 14px;
    height: 8px;
    border-left: 3px solid #ffffff;
    border-bottom: 3px solid #ffffff;
    border-radius: 0;
    transform: rotate(-45deg) translate(1px, -1px);
}

.crm-task-item-copy {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.crm-task-item-copy strong {
    overflow-wrap: anywhere;
}

.crm-task-item-row.is-done .crm-task-item-copy strong {
    color: var(--crm-muted);
    text-decoration: line-through;
}

.crm-task-item-delete {
    width: 34px;
    height: 34px;
    color: var(--crm-muted);
    font-size: 20px;
    line-height: 1;
}

.crm-task-item-toggle:hover,
.crm-task-item-delete:hover,
.crm-task-item-toggle:focus-visible,
.crm-task-item-delete:focus-visible {
    outline: none;
    box-shadow: 0 0 0 4px var(--crm-focus-ring);
}

.crm-task-item-delete:hover,
.crm-task-item-delete:focus-visible {
    color: var(--crm-danger);
    background: rgba(121, 59, 48, 0.1);
}

.crm-task-items-add-form {
    padding-top: 4px;
}

.crm-select-multiple {
    min-height: 132px;
    border-radius: 18px;
    padding-block: 10px;
}

.crm-task-card-note,
.crm-task-detail-note p,
.crm-comment-item p {
    margin: 0;
    line-height: 1.7;
}

.crm-task-card-actions {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    min-width: 178px;
}

.crm-task-card-actions .crm-inline-form {
    width: 100%;
}

.crm-task-card-actions .crm-mini-button,
.crm-task-card-actions .crm-button,
.crm-task-card-actions .crm-button-secondary {
    width: 100%;
}

.crm-task-archive-card {
    margin-top: 28px;
}

.crm-status-modal {
    position: fixed;
    inset: 0;
    z-index: 246;
    display: grid;
    place-items: center;
    white-space: normal;
    padding:
        calc(24px + var(--crm-safe-top))
        calc(18px + var(--crm-safe-right))
        calc(24px + var(--crm-safe-bottom))
        calc(18px + var(--crm-safe-left));
}

.crm-status-modal[hidden] {
    display: none;
}

.crm-status-modal-backdrop {
    position: absolute;
    inset: 0;
    border: 0;
    background: rgba(15, 23, 42, 0.64);
    backdrop-filter: blur(10px);
    cursor: default;
}

.crm-status-modal-card {
    position: relative;
    z-index: 1;
    width: min(640px, 100%);
    max-height: min(92vh, 92svh);
    overflow-y: auto;
    display: grid;
    gap: 20px;
    padding: 28px;
    border: 1px solid var(--crm-border-strong);
    border-radius: 28px;
    background: linear-gradient(180deg, #ffffff 0%, #faf5ed 100%);
    box-shadow: 0 40px 120px -44px rgba(15, 23, 42, 0.48);
    text-align: left;
}

.crm-status-modal-card-wide {
    width: min(960px, 100%);
}

.crm-status-modal-card > .crm-card-header {
    padding-right: 74px;
}

.crm-status-modal-close {
    position: absolute;
    top: 18px;
    right: 18px;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    min-width: 44px;
    min-height: 44px;
    padding: 0;
    border: 1px solid var(--crm-border);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.98);
    color: var(--crm-ink);
    box-shadow: var(--crm-shadow-soft);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.crm-status-modal-close:hover {
    transform: translateY(-1px);
    box-shadow: 0 18px 40px -30px rgba(29, 36, 31, 0.24);
}

.crm-status-modal-close:focus-visible {
    outline: none;
    box-shadow: 0 0 0 4px var(--crm-focus-ring);
}

.crm-status-modal-close span {
    font-size: 28px;
    line-height: 1;
}

.crm-status-modal-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.crm-task-modal {
    position: fixed;
    inset: 0;
    z-index: 245;
    display: grid;
    place-items: center;
    padding:
        calc(24px + var(--crm-safe-top))
        calc(18px + var(--crm-safe-right))
        calc(24px + var(--crm-safe-bottom))
        calc(18px + var(--crm-safe-left));
}

.crm-task-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.64);
    backdrop-filter: blur(10px);
}

.crm-task-modal-card {
    position: relative;
    z-index: 1;
    width: min(920px, 100%);
    max-height: min(92vh, 92svh);
    overflow-y: auto;
    display: grid;
    gap: 20px;
    padding: 28px;
    border: 1px solid var(--crm-border-strong);
    border-radius: 32px;
    background: linear-gradient(180deg, #ffffff 0%, #faf5ed 100%);
    box-shadow: 0 40px 120px -44px rgba(15, 23, 42, 0.48);
}

.crm-task-create-modal-card {
    width: min(980px, 100%);
}

.crm-task-modal-card > .crm-card-header {
    padding-right: 74px;
}

.crm-task-modal-close {
    position: absolute;
    top: 18px;
    right: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    min-width: 44px;
    min-height: 44px;
    padding: 0;
    border: 1px solid var(--crm-border);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.98);
    color: var(--crm-ink);
    box-shadow: var(--crm-shadow-soft);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.crm-task-modal-close {
    z-index: 3;
}

.crm-task-modal-close:hover {
    transform: translateY(-1px);
    box-shadow: 0 18px 40px -30px rgba(29, 36, 31, 0.24);
}

.crm-task-modal-close span {
    font-size: 24px;
    line-height: 1;
}

.crm-task-modal-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.crm-task-modal-summary-item,
.crm-task-detail-note,
.crm-comment-item {
    padding: 16px 18px;
    border: 1px solid var(--crm-divider);
    border-radius: 22px;
    background: linear-gradient(180deg, #ffffff 0%, #faf5ed 100%);
    box-shadow: var(--crm-shadow-soft);
}

.crm-task-modal-summary-item {
    display: grid;
    gap: 8px;
}

.crm-task-status-editor {
    padding-top: 4px;
}

.crm-comment-item {
    display: grid;
    gap: 14px;
}

.crm-comment-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.crm-comment-head-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
}

.crm-mini-button.crm-comment-download-all {
    min-height: 36px;
    padding: 7px 12px;
    font-size: 12px;
}

.crm-comment-attachments {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.crm-comment-attachment {
    display: block;
    width: min(180px, 100%);
    text-decoration: none;
    color: inherit;
}

.crm-comment-photo {
    width: 100%;
    display: block;
    border-radius: 18px;
    border: 1px solid var(--crm-border);
    object-fit: cover;
    aspect-ratio: 1 / 1;
    box-shadow: var(--crm-shadow-soft);
}

.crm-comment-file {
    width: min(320px, 100%);
    min-height: 88px;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border-radius: 20px;
    border: 1px solid var(--crm-border);
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--crm-shadow-soft);
}

.crm-comment-file-badge {
    flex: 0 0 auto;
    min-width: 58px;
    padding: 12px 10px;
    border-radius: 16px;
    background: rgba(31, 107, 87, 0.12);
    color: var(--crm-primary);
    text-align: center;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.crm-comment-file-badge.is-gdpr {
    background: rgba(193, 117, 43, 0.14);
    color: #8a4b13;
}

.crm-comment-file-copy {
    min-width: 0;
    display: grid;
    gap: 4px;
}

.crm-comment-file-name {
    display: block;
    overflow-wrap: anywhere;
}

.crm-list-item-selected {
    border-radius: 24px;
    padding: 16px;
    background: rgba(215, 239, 231, 0.42);
    border: 1px solid rgba(31, 107, 87, 0.18);
}

.crm-email-template-preview {
    margin-top: 10px;
    white-space: pre-wrap;
    line-height: 1.65;
}

.crm-code-textarea {
    margin-top: 10px;
    min-height: 360px;
    border-radius: 24px;
    font-family: "SFMono-Regular", "Menlo", "Consolas", monospace;
    font-size: 13px;
    line-height: 1.6;
    white-space: pre;
    overflow: auto;
    tab-size: 4;
    background: #0f1b17;
    color: #d7efe7;
    border-color: rgba(29, 109, 89, 0.22);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
}

.crm-code-textarea[readonly] {
    opacity: 0.98;
}

.crm-help-inline {
    margin: -4px 0 0 0;
}

.crm-template-token-list {
    margin: 0;
    padding-left: 18px;
}

.crm-template-token-list li {
    overflow-wrap: anywhere;
}

.crm-template-token-list code {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(29, 109, 89, 0.08);
    color: var(--crm-accent-strong);
    font-weight: 700;
}

.crm-email-preview-frame {
    width: 100%;
    min-height: 520px;
    border: 1px solid var(--crm-border);
    border-radius: 24px;
    background: #ffffff;
}

.crm-email-preview-frame-template {
    min-height: 360px;
}

.crm-communication-table {
    table-layout: fixed;
    min-width: 1040px;
}

.crm-communication-col-when {
    width: 154px;
}

.crm-communication-col-recipient {
    width: 230px;
}

.crm-communication-col-status {
    width: 128px;
}

.crm-communication-col-actions {
    width: 74px;
}

.crm-communication-table th,
.crm-communication-table td {
    word-break: normal;
}

.crm-communication-table th:nth-child(4),
.crm-communication-table td:nth-child(4) {
    text-align: center;
}

.crm-communication-table th:nth-child(5),
.crm-communication-table td:nth-child(5) {
    text-align: right;
}

.crm-communication-when,
.crm-communication-what,
.crm-communication-recipient,
.crm-email-modal-form {
    display: grid;
    gap: 6px;
    min-width: 0;
}

.crm-communication-when strong,
.crm-communication-what strong,
.crm-communication-recipient strong {
    overflow-wrap: anywhere;
    word-break: normal;
}

.crm-communication-what strong {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.crm-communication-what .crm-meta {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.crm-communication-excerpt {
    display: -webkit-box;
    overflow: hidden;
    margin: 0;
    color: var(--crm-muted);
    overflow-wrap: anywhere;
    word-break: normal;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.crm-communication-table .crm-badge {
    max-width: 100%;
    justify-content: center;
    white-space: nowrap;
    overflow-wrap: normal;
    word-break: normal;
}

.crm-communication-table .crm-row-actions-menu {
    display: inline-flex;
}

.crm-email-modal-card {
    width: min(1120px, 100%);
}

.crm-unit-preview-modal-card {
    width: min(860px, 100%);
}

.crm-unit-preview-photo {
    margin: 0;
    overflow: hidden;
    border: 1px solid var(--crm-divider);
    border-radius: 24px;
    background: #ffffff;
}

.crm-unit-preview-photo img {
    display: block;
    width: 100%;
    max-height: 360px;
    object-fit: cover;
}

.crm-unit-preview-gallery {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.crm-unit-preview-thumb {
    margin: 0;
    overflow: hidden;
    border: 1px solid var(--crm-divider);
    border-radius: 18px;
    background: #ffffff;
}

.crm-unit-preview-thumb img {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

.crm-interest-preview-link {
    color: inherit;
    text-decoration: none;
    border-bottom: 1px dashed var(--crm-border-strong);
}

.crm-interest-preview-link:hover,
.crm-interest-preview-link:focus-visible {
    color: var(--crm-accent-strong);
    border-bottom-color: var(--crm-accent-strong);
}

.crm-email-modal-card-confirm {
    width: min(640px, 100%);
}

.crm-email-confirm-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.crm-install-manual-help {
    display: grid;
    gap: 10px;
    padding-top: 2px;
}

.crm-install-manual-help[hidden] {
    display: none;
}

.crm-install-ios-help[hidden] {
    display: none;
}

.crm-install-steps {
    margin: 0;
    padding-left: 18px;
    display: grid;
    gap: 6px;
    color: var(--crm-muted);
    font-size: 13px;
    line-height: 1.6;
}

.crm-content {
    padding:
        calc(28px + var(--crm-safe-top))
        calc(28px + var(--crm-safe-right))
        calc(28px + var(--crm-safe-bottom))
        calc(28px + var(--crm-safe-left));
    display: grid;
    gap: 24px;
    align-content: start;
    min-width: 0;
}

html.crm-standalone {
    background:
        radial-gradient(circle at top left, rgba(31, 107, 95, 0.18), transparent 30%),
        radial-gradient(circle at top right, rgba(196, 157, 92, 0.18), transparent 24%),
        linear-gradient(180deg, #fbf8f4 0%, #f4efe8 55%, #efe8df 100%);
}

html.crm-ios-standalone .crm-public-shell {
    padding-top: calc(24px + var(--crm-safe-top));
    padding-bottom: calc(24px + var(--crm-safe-bottom));
}

html.crm-ios-standalone .crm-sidebar {
    padding-top: calc(20px + var(--crm-safe-top));
}

html.crm-ios-standalone .crm-content {
    padding-top: calc(18px + var(--crm-safe-top));
}

html.crm-ios-standalone .crm-public-card,
html.crm-ios-standalone .crm-card,
html.crm-ios-standalone .crm-page-header {
    border-radius: 26px;
}

.crm-content > *,
.crm-grid > *,
.crm-stats-grid > * {
    min-width: 0;
}

.crm-text-link {
    color: var(--crm-accent);
    font-weight: 700;
}

.crm-page-header,
.crm-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 18px;
}

.crm-page-header {
    position: relative;
    overflow: hidden;
    padding: 28px;
    border: 1px solid var(--crm-border-strong);
    border-radius: var(--crm-radius);
    background: linear-gradient(135deg, #ffffff 0%, #eef7f2 48%, #faf3e8 100%);
    box-shadow: var(--crm-shadow-soft);
}

.crm-page-header .crm-muted,
.crm-card-header .crm-muted {
    margin-bottom: 0;
    max-width: 44rem;
}

.crm-page-header .crm-actions {
    justify-content: flex-end;
}

.crm-card,
.crm-stat-card {
    padding: 24px;
}

.crm-stats-grid,
.crm-grid {
    display: grid;
    gap: 18px;
}

.crm-stats-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

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

.crm-stat-card {
    background: linear-gradient(180deg, #ffffff, #f8f2e8);
}

.crm-card-header {
    padding-bottom: 18px;
    margin-bottom: 18px;
    border-bottom: 1px solid var(--crm-divider);
}

.crm-stat-value {
    font-size: 36px;
    font-weight: 800;
    margin-bottom: 8px;
}

.crm-stat-label {
    margin-bottom: 0;
    color: var(--crm-muted);
}

.crm-form,
.crm-list,
.crm-timeline,
.crm-info-grid,
.crm-detail-list {
    display: grid;
    gap: 16px;
}

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

.crm-list-group-head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 10px 14px;
    padding: 0 2px;
}

.crm-list-group-head h4 {
    margin: 0 0 4px;
    font-size: 15px;
}

.crm-list-group-head .crm-meta {
    margin-bottom: 0;
}

.crm-form-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: end;
}

.crm-form-inline .crm-field {
    flex: 1 1 210px;
    min-width: 180px;
}

.crm-form-inline > .crm-actions,
.crm-form-inline > .crm-inline-form {
    flex: 0 0 auto;
}

.crm-filter-bar {
    margin: 0 0 18px;
    padding: 16px;
    border: 1px solid var(--crm-border);
    border-radius: 24px;
    background: linear-gradient(180deg, rgba(248, 242, 232, 0.98), rgba(255, 255, 255, 0.92));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.94);
}

.crm-card-header + .crm-filter-bar {
    margin-top: -4px;
}

.crm-filter-bar + .crm-table-wrap,
.crm-filter-bar + .crm-list {
    margin-top: 4px;
}

.crm-unit-status-filter {
    display: grid;
    gap: 14px;
    margin: 0 0 18px;
    padding: 16px;
    border: 1px solid var(--crm-border);
    border-radius: 24px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 242, 232, 0.92));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.94);
}

.crm-unit-status-group {
    display: grid;
    gap: 8px;
}

.crm-unit-status-group > strong {
    color: var(--crm-muted);
    font-size: 13px;
    line-height: 1.4;
}

.crm-unit-status-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.crm-unit-status-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 8px 13px;
    border: 1px solid var(--crm-border);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.98);
    color: var(--crm-ink);
    font-size: 13px;
    font-weight: 800;
    line-height: 1.25;
    text-align: center;
    text-decoration: none;
    transition: background-color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.crm-unit-status-chip:hover,
.crm-unit-status-chip:focus-visible {
    transform: translateY(-1px);
    border-color: rgba(15, 106, 82, 0.4);
    background: rgba(200, 235, 221, 0.62);
    box-shadow: var(--crm-shadow-soft);
}

.crm-unit-status-chip:focus-visible {
    outline: 4px solid var(--crm-focus-ring);
    outline-offset: 2px;
}

.crm-unit-status-chip.is-active {
    border-color: rgba(8, 72, 55, 0.46);
    background: linear-gradient(180deg, var(--crm-accent) 0%, var(--crm-accent-strong) 100%);
    color: #ffffff;
}

.crm-form-grid {
    display: grid;
    gap: 16px;
    align-items: start;
}

.crm-form-grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.crm-form-grid-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.crm-unit-form-columns {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    align-items: start;
}

.crm-unit-form-panel {
    display: grid;
    gap: 14px;
    padding: 18px;
    border: 1px solid var(--crm-border);
    border-radius: 28px;
    background: linear-gradient(180deg, #ffffff, #faf5ed);
}

.crm-unit-form-panel .crm-card-header-compact {
    margin-bottom: 0;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--crm-divider);
}

/* The web fields stay reachable while publishing is off, just visibly idle. */
[data-unit-web-panel].is-unit-web-disabled > .crm-field:not(:first-child),
[data-unit-web-panel].is-unit-web-disabled > .crm-field-span-2:not(:first-child) {
    opacity: 0.55;
}

.crm-field {
    display: grid;
    gap: 8px;
    align-content: start;
    font-size: 14px;
    font-weight: 700;
    color: #24312b;
}

.crm-field > span:first-child {
    display: flex;
    align-items: flex-end;
    min-height: 24px;
    line-height: 1.35;
}

.crm-checkbox-field {
    gap: 10px;
    padding: 16px 18px;
    border-radius: 24px;
    border: 1px solid var(--crm-border);
    background: linear-gradient(180deg, #ffffff 0%, #faf5ed 100%);
}

.crm-checkbox-row {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 24px;
}

.crm-checkbox-row input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin: 0;
    accent-color: var(--crm-accent);
}

.crm-checkbox-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.crm-checkbox-stack .crm-checkbox-row {
    width: fit-content;
    min-height: 42px;
    padding: 9px 13px;
    border: 1px solid var(--crm-border);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.98);
    font-weight: 800;
}

.crm-checkbox-stack-compact {
    min-width: 250px;
    gap: 8px;
}

.crm-checkbox-stack-compact .crm-checkbox-row {
    min-height: 36px;
    padding: 7px 11px;
    font-size: 13px;
}

.crm-field-span-2 {
    grid-column: span 2;
}

.crm-input,
.crm-select,
.crm-textarea,
.crm-input-inline,
.crm-select-compact {
    width: 100%;
    border-radius: 999px;
    border: 1px solid var(--crm-border);
    background: linear-gradient(180deg, #ffffff 0%, #faf5ed 100%);
    color: #0f172a;
    padding: 13px 18px;
    min-height: 48px;
    outline: none;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.94);
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
    max-width: 100%;
}

.crm-input[type="date"],
.crm-input[type="datetime-local"],
.crm-input[type="file"] {
    display: block;
}

.crm-input[type="file"] {
    padding: 7px 10px 7px 12px;
    line-height: 1.35;
}

.crm-input:disabled,
.crm-select:disabled,
.crm-textarea:disabled {
    cursor: not-allowed;
    background: rgba(226, 219, 207, 0.86);
    color: #657069;
}

.crm-input[type="file"]::file-selector-button {
    margin-right: 12px;
    padding: 8px 14px;
    min-height: 34px;
    border: 1px solid rgba(15, 106, 82, 0.28);
    border-radius: 999px;
    background: rgba(200, 235, 221, 0.92);
    color: var(--crm-ink);
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.18s ease, border-color 0.18s ease;
}

.crm-input[type="file"]::file-selector-button:hover {
    background: var(--crm-accent-soft);
    border-color: rgba(15, 106, 82, 0.46);
}

.crm-file-input-native {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0 0 0 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.crm-file-dropzone {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 13px;
    width: 100%;
    min-height: 84px;
    padding: 15px 16px;
    border: 1px dashed rgba(15, 106, 82, 0.54);
    border-radius: 18px;
    background:
        linear-gradient(180deg, #ffffff 0%, #faf5ed 100%);
    color: var(--crm-ink);
    cursor: pointer;
    outline: none;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease, transform 0.18s ease;
}

.crm-file-dropzone:hover,
.crm-file-dropzone:focus-visible,
.crm-file-dropzone.is-dragover {
    border-color: rgba(29, 109, 89, 0.72);
    box-shadow: 0 0 0 4px rgba(29, 109, 89, 0.12);
}

.crm-file-dropzone.is-dragover {
    background:
        linear-gradient(180deg, rgba(232, 247, 241, 0.98) 0%, rgba(244, 250, 247, 0.98) 100%);
    transform: translateY(-1px);
}

.crm-file-dropzone.has-files {
    border-style: solid;
}

.crm-file-dropzone.is-invalid {
    border-color: rgba(190, 18, 60, 0.74);
    box-shadow: 0 0 0 4px rgba(190, 18, 60, 0.11);
}

.crm-file-dropzone.is-disabled {
    cursor: not-allowed;
    opacity: 0.62;
}

.crm-file-dropzone-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 999px;
    border: 1px solid rgba(15, 106, 82, 0.32);
    background: rgba(200, 235, 221, 0.96);
    color: var(--crm-accent-strong);
    font-size: 24px;
    font-weight: 800;
    line-height: 1;
}

.crm-file-dropzone-copy {
    display: grid;
    min-width: 0;
    gap: 4px;
}

.crm-file-dropzone-copy strong,
.crm-file-dropzone-copy small {
    overflow-wrap: anywhere;
}

.crm-file-dropzone-copy strong {
    color: var(--crm-ink);
    font-size: 0.95rem;
    line-height: 1.3;
}

.crm-file-dropzone-copy small {
    color: var(--crm-muted);
    font-size: 0.82rem;
    line-height: 1.35;
}

.crm-select,
.crm-select-compact {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    cursor: pointer;
    padding-right: 46px;
    background-image:
        linear-gradient(180deg, #ffffff 0%, #faf5ed 100%),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9' fill='none'%3E%3Cpath d='M1 1.5L7 7.5L13 1.5' stroke='%2340534b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat, no-repeat;
    background-position: center center, right 18px center;
    background-size: auto, 14px 9px;
}

.crm-multi-select {
    position: relative;
    width: 100%;
}

.crm-multi-select summary {
    list-style: none;
}

.crm-multi-select summary::-webkit-details-marker {
    display: none;
}

.crm-multi-select-trigger {
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 48px;
    padding: 13px 46px 13px 18px;
    border: 1px solid var(--crm-border);
    border-radius: 999px;
    background-image:
        linear-gradient(180deg, #ffffff 0%, #faf5ed 100%),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9' fill='none'%3E%3Cpath d='M1 1.5L7 7.5L13 1.5' stroke='%2340534b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat, no-repeat;
    background-position: center center, right 18px center;
    background-size: auto, 14px 9px;
    color: #0f172a;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.94);
    cursor: pointer;
    outline: none;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.crm-multi-select-trigger span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.crm-multi-select[open] .crm-multi-select-trigger,
.crm-multi-select-trigger:focus-visible {
    border-color: var(--crm-accent);
    box-shadow: 0 0 0 4px var(--crm-focus-ring);
}

.crm-multi-select-menu {
    display: grid;
    gap: 6px;
    margin-top: 8px;
    max-height: 260px;
    overflow-y: auto;
    padding: 8px;
    border: 1px solid var(--crm-border);
    border-radius: 20px;
    background: linear-gradient(180deg, #ffffff 0%, #faf5ed 100%);
    box-shadow: 0 22px 44px -34px rgba(15, 23, 42, 0.42);
}

.crm-multi-select-option {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 40px;
    padding: 8px 10px;
    border-radius: 14px;
    color: var(--crm-ink);
    cursor: pointer;
    font-weight: 800;
}

.crm-multi-select-option:hover,
.crm-multi-select-option:focus-within {
    background: rgba(15, 106, 82, 0.12);
}

.crm-multi-select-option input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 0;
    flex: 0 0 auto;
    accent-color: var(--crm-accent);
}

.crm-multi-select-option span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.crm-select-compact,
.crm-input-inline {
    width: auto;
    min-height: 44px;
}

.crm-input-inline,
.crm-select-compact,
.crm-inline-static,
.crm-mini-button {
    min-height: 44px;
    border-radius: 999px;
}

.crm-input-inline,
.crm-select-compact,
.crm-inline-static,
.crm-inline-static-block,
.crm-button,
.crm-button-secondary,
.crm-button-danger,
.crm-mini-button {
    max-width: 100%;
}

.crm-input:focus,
.crm-select:focus,
.crm-textarea:focus,
.crm-input-inline:focus,
.crm-select-compact:focus {
    border-color: var(--crm-accent);
    box-shadow: 0 0 0 4px var(--crm-focus-ring);
}

.crm-textarea {
    min-height: 128px;
    border-radius: 24px;
    resize: vertical;
}

.crm-help {
    display: block;
    min-height: 38px;
    line-height: 1.45;
}

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

.crm-list-side {
    display: flex;
    flex: 0 0 auto;
    flex-direction: column;
    align-items: flex-end;
    justify-content: flex-start;
    gap: 10px;
    min-width: 132px;
    text-align: right;
}

.crm-inline-form {
    display: inline-flex;
    align-items: center;
    margin: 0;
}

.crm-status-cell {
    min-width: 150px;
}

.crm-status-cell .crm-meta {
    margin-top: 8px;
}

.crm-table-actions-cell {
    width: 72px;
    vertical-align: top;
    text-align: right;
}

.crm-row-actions-menu {
    position: relative;
    display: inline-block;
}

.crm-row-actions-menu.is-open {
    z-index: 6;
}

.crm-row-actions-menu.is-floating.is-open {
    z-index: 280;
}

.crm-row-actions-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    min-width: 44px;
    min-height: 44px;
    padding: 0;
    border: 1px solid var(--crm-border);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    color: var(--crm-ink);
    box-shadow: var(--crm-shadow-soft);
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.crm-row-actions-menu.is-open .crm-row-actions-toggle {
    border-color: rgba(31, 107, 87, 0.24);
    background: rgba(215, 239, 231, 0.52);
    box-shadow: 0 18px 40px -30px rgba(29, 36, 31, 0.28);
}

.crm-row-actions-icon {
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
}

.crm-row-actions-toggle:hover {
    transform: translateY(-1px);
    box-shadow: 0 18px 40px -30px rgba(29, 36, 31, 0.24);
}

.crm-row-actions-toggle:focus-visible {
    outline: none;
    box-shadow: 0 0 0 4px var(--crm-focus-ring), var(--crm-shadow-soft);
}

.crm-row-actions-list {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    min-width: 230px;
    padding: 10px;
    display: grid;
    gap: 6px;
    border: 1px solid var(--crm-border-strong);
    border-radius: 22px;
    background: linear-gradient(180deg, #ffffff 0%, #faf5ed 100%);
    box-shadow: 0 26px 60px -34px rgba(15, 23, 42, 0.4);
}

.crm-row-actions-list[hidden] {
    display: none;
}

.crm-row-actions-list.is-floating {
    position: fixed;
    top: 0;
    left: 0;
    right: auto;
    z-index: 950;
    margin: 0;
}

.crm-row-actions-item {
    display: flex;
    width: 100%;
    min-height: 44px;
    align-items: center;
    justify-content: flex-start;
    padding: 10px 14px;
    border: 1px solid transparent;
    border-radius: 16px;
    background: transparent;
    color: var(--crm-ink);
    font-weight: 800;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.crm-row-actions-item:hover {
    background: rgba(200, 235, 221, 0.54);
    border-color: rgba(15, 106, 82, 0.24);
    transform: translateY(-1px);
}

.crm-row-actions-item-danger {
    color: var(--crm-danger);
}

.crm-row-actions-item-danger:hover {
    background: var(--crm-danger-soft);
    border-color: rgba(179, 74, 61, 0.18);
}

.crm-row-actions-item:focus-visible {
    outline: none;
    box-shadow: 0 0 0 4px var(--crm-focus-ring);
}

.crm-row-actions-form {
    margin: 0;
}

.crm-row-actions-button {
    box-shadow: none;
}

.crm-row-actions-item:disabled,
.crm-row-actions-button:disabled {
    cursor: not-allowed;
    opacity: 0.54;
    transform: none;
}

.crm-user-actions-list {
    min-width: 340px;
}

.crm-user-password-form {
    display: grid;
    gap: 10px;
}

.crm-user-password-form > strong {
    display: block;
    padding: 2px 4px 0;
}

.crm-field-compact {
    gap: 6px;
    font-size: 13px;
}

.crm-field-compact > span:first-child {
    min-height: auto;
}

.crm-field-compact .crm-input,
.crm-field-compact .crm-select {
    min-height: 42px;
    padding: 10px 14px;
    border-radius: 18px;
}

.crm-button,
.crm-button-secondary,
.crm-button-danger,
.crm-mini-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 12px 20px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    box-shadow: var(--crm-shadow-soft);
    transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease, border-color 0.18s ease;
}

.crm-button {
    background: linear-gradient(180deg, var(--crm-accent) 0%, var(--crm-accent-strong) 100%);
    color: #ffffff;
    border-color: rgba(8, 72, 55, 0.42);
}

.crm-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 18px 40px -28px rgba(21, 82, 66, 0.52);
}

.crm-button-secondary {
    background: rgba(255, 255, 255, 0.98);
    color: var(--crm-ink);
    border-color: var(--crm-border);
}

.crm-button-secondary:hover {
    transform: translateY(-1px);
    box-shadow: 0 18px 40px -30px rgba(29, 36, 31, 0.24);
}

.crm-button-danger {
    background: linear-gradient(180deg, #c55f52 0%, var(--crm-danger) 100%);
    color: #ffffff;
    border-color: rgba(117, 36, 28, 0.38);
}

.crm-button-danger:hover {
    transform: translateY(-1px);
    box-shadow: 0 18px 40px -28px rgba(179, 74, 61, 0.48);
}

.crm-mini-button {
    padding: 9px 16px;
    background: rgba(255, 255, 255, 0.98);
    border-color: var(--crm-border);
    color: var(--crm-ink);
}

.crm-mini-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 30px -26px rgba(29, 36, 31, 0.24);
}

.crm-button:focus-visible,
.crm-button-secondary:focus-visible,
.crm-button-danger:focus-visible,
.crm-mini-button:focus-visible {
    outline: none;
    box-shadow: 0 0 0 4px var(--crm-focus-ring), var(--crm-shadow-soft);
}

.crm-mini-link,
.crm-text-link,
.crm-row-link {
    color: var(--crm-accent);
    font-weight: 700;
}

button.crm-mini-link {
    padding: 0;
    border: 0;
    background: transparent;
    font: inherit;
    cursor: pointer;
}

.crm-danger-link {
    color: var(--crm-danger);
}

.crm-row-link:hover,
.crm-mini-link:hover,
.crm-text-link:hover,
.crm-logout-link:hover {
    text-decoration: underline;
}

.crm-inline-divider {
    height: 1px;
    background: var(--crm-border);
    margin: 14px 0;
}

.crm-notice {
    min-height: 44px;
    padding: 12px 16px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-size: 14px;
    font-weight: 600;
    box-shadow: var(--crm-shadow-soft);
    display: flex;
    align-items: center;
}

.crm-notice-success {
    background: var(--crm-success-soft);
    border-color: #8fd0b5;
    color: #073d2b;
}

.crm-notice-error {
    background: var(--crm-danger-soft);
    border-color: #e9a092;
    color: #6f1f17;
}

.crm-notice-info {
    background: #f0f9ff;
    border-color: #80c9ee;
    color: #064a6e;
}

.crm-badge-success {
    background: var(--crm-success-soft);
    color: var(--crm-success);
    border-color: #8ed1b7;
}

.crm-badge-warning {
    background: var(--crm-warning-soft);
    color: #684005;
    border-color: #e1b45d;
}

.crm-badge-danger {
    background: var(--crm-danger-soft);
    color: var(--crm-danger);
    border-color: #e89f92;
}

.crm-badge-neutral {
    background: var(--crm-neutral-soft);
    color: #34423c;
    border-color: #c2ccc7;
}

.crm-list-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    padding: 18px 20px;
    border: 1px solid var(--crm-divider);
    border-radius: 20px;
    background: linear-gradient(180deg, #ffffff 0%, #faf5ed 100%);
    box-shadow: var(--crm-shadow-soft);
}

.crm-list-item > :first-child {
    flex: 1 1 auto;
    min-width: 0;
}

.crm-list-item > .crm-badge {
    flex: 0 0 auto;
}

.crm-timeline-item {
    display: grid;
    gap: 10px;
    padding: 18px 20px;
    border: 1px solid var(--crm-divider);
    border-radius: 20px;
    background: linear-gradient(180deg, #ffffff 0%, #faf5ed 100%);
    box-shadow: var(--crm-shadow-soft);
}

.crm-list-item p,
.crm-timeline-item p {
    margin-bottom: 0;
}

.crm-timeline-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 0;
}

.crm-table-wrap {
    overflow: auto;
    max-width: 100%;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    scrollbar-gutter: stable both-edges;
    touch-action: pan-x pan-y;
    border: 1px solid var(--crm-border-strong);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.98);
}

.crm-table-wrap:focus-visible {
    outline: 3px solid rgba(29, 109, 89, 0.24);
    outline-offset: 3px;
}

.crm-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 880px;
}

.crm-table th,
.crm-table td {
    text-align: left;
    padding: 15px 16px;
    border-bottom: 1px solid var(--crm-divider);
    vertical-align: top;
}

.crm-table th,
.crm-table td,
.crm-table td p,
.crm-table td a,
.crm-table td strong,
.crm-table td span {
    max-width: 100%;
}

.crm-table td > * {
    min-width: 0;
}

.crm-table td .crm-input,
.crm-table td .crm-select,
.crm-table td .crm-textarea,
.crm-table td .crm-input-inline,
.crm-table td .crm-select-compact,
.crm-table td .crm-inline-static,
.crm-table td .crm-inline-static-block,
.crm-table td .crm-button,
.crm-table td .crm-button-secondary,
.crm-table td .crm-button-danger,
.crm-table td .crm-mini-button {
    width: 100%;
    min-width: 0;
}

.crm-table td .crm-inline-form,
.crm-table td form {
    max-width: 100%;
}

.crm-table td .crm-row-actions-menu {
    display: flex;
    justify-content: flex-end;
    width: 100%;
}

.crm-table td .crm-actions,
.crm-table td .crm-table-actions {
    align-items: flex-start;
}

.crm-table th {
    font-size: 12px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--crm-muted);
    font-weight: 800;
    background: rgba(236, 228, 216, 0.98);
}

.crm-table-sort {
    display: inline-grid;
    gap: 5px;
    min-width: max-content;
}

.crm-table-sort-label {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: inherit;
    text-decoration: none;
}

.crm-table-sort-label:hover {
    color: var(--crm-accent-strong);
}

.crm-table-sort-current {
    font-size: 11px;
    line-height: 1;
}

.crm-table-sort-controls {
    display: inline-flex;
    gap: 4px;
}

.crm-table-sort-control {
    display: inline-grid;
    place-items: center;
    width: 18px;
    height: 18px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.9);
    color: var(--crm-muted);
    font-size: 11px;
    line-height: 1;
    text-decoration: none;
}

.crm-table-sort-control:hover,
.crm-table-sort-control.is-active {
    background: rgba(29, 109, 89, 0.12);
    color: var(--crm-accent-strong);
}

.crm-table.crm-clients-table {
    min-width: 1240px;
    table-layout: fixed;
}

.crm-clients-table th,
.crm-clients-table td {
    padding: 12px 10px;
    font-size: 13px;
    line-height: 1.25;
}

.crm-clients-table th {
    font-size: 10px;
    letter-spacing: 0.06em;
}

.crm-clients-col-name {
    width: 180px;
}

.crm-clients-col-phone {
    width: 142px;
}

.crm-clients-col-email {
    width: 210px;
}

.crm-clients-col-status {
    width: 76px;
}

.crm-client-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.crm-client-status-dot {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 26px;
    width: 26px;
    height: 26px;
    border-radius: 999px;
    border: 1px solid transparent;
}

.crm-client-status-dot svg {
    width: 14px;
    height: 14px;
}

.crm-client-status-dot.is-new {
    background: var(--crm-success-soft);
    border-color: #8ed1b7;
}

.crm-client-status-dot.is-active {
    background: var(--crm-mark-green);
    border-color: var(--crm-mark-green-strong);
    color: #ffffff;
}

.crm-client-status-dot.is-closed {
    background: var(--crm-danger);
    border-color: #7f2a20;
    color: #ffffff;
}

.crm-client-status-dot.is-off,
.crm-client-status-dot.is-archived {
    background: var(--crm-neutral-soft);
    border-color: #c2ccc7;
    color: #4b5a53;
}

.crm-client-status-dot.is-deleted {
    background: var(--crm-danger-soft);
    border-color: #e89f92;
    color: var(--crm-danger);
}

.crm-client-status-label {
    font-size: 0.86rem;
    font-weight: 600;
    color: var(--crm-muted);
}

.crm-client-status-sr {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

.crm-client-status-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 18px;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--crm-divider);
}

.crm-client-status-legend .crm-client-status-dot {
    flex-basis: 20px;
    width: 20px;
    height: 20px;
}

.crm-client-status-legend .crm-client-status-dot svg {
    width: 11px;
    height: 11px;
}

.crm-client-status-legend .crm-client-status-label {
    font-size: 0.78rem;
    font-weight: 500;
}

.crm-clients-col-contact {
    width: 150px;
}

.crm-clients-col-project {
    width: auto;
}

.crm-clients-col-actions {
    width: 62px;
}

.crm-clients-table th:nth-child(2),
.crm-clients-table th:nth-child(3),
.crm-clients-table th:nth-child(5),
.crm-clients-table th:nth-child(6),
.crm-clients-table td:nth-child(2),
.crm-clients-table td:nth-child(3),
.crm-clients-table td:nth-child(5),
.crm-clients-table td:nth-child(6),
.crm-clients-table td:nth-child(2) a,
.crm-clients-table td:nth-child(3) a {
    white-space: nowrap;
    overflow-wrap: normal;
    word-break: normal;
}

.crm-clients-table td:nth-child(5),
.crm-clients-table td:nth-child(6) {
    font-variant-numeric: tabular-nums;
}

.crm-units-table {
    min-width: 1080px;
}

.crm-units-table th,
.crm-units-table td {
    padding: 10px 8px;
    white-space: nowrap;
    font-size: 12px;
    line-height: 1.22;
    vertical-align: middle;
}

.crm-units-table th,
.crm-units-table td,
.crm-units-table td p,
.crm-units-table td a,
.crm-units-table td strong,
.crm-units-table td span {
    overflow-wrap: normal;
    word-break: normal;
}

.crm-units-table th {
    font-size: 9.5px;
    letter-spacing: 0.03em;
}

.crm-units-table .crm-table-sort {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-width: 0;
    white-space: nowrap;
}

.crm-units-table .crm-table-sort-label {
    gap: 3px;
    white-space: nowrap;
}

.crm-units-table .crm-table-sort-controls {
    flex: 0 0 auto;
    gap: 2px;
}

.crm-units-table .crm-table-sort-control {
    width: 14px;
    height: 14px;
    font-size: 9px;
}

.crm-units-table .crm-badge {
    padding: 6px 9px;
    white-space: nowrap;
    font-size: 11px;
    line-height: 1.15;
}

.crm-units-table .crm-energy-label-compact {
    width: 24px;
    min-width: 24px;
    height: 24px;
    font-size: 12px;
}

.crm-units-table .crm-meta,
.crm-units-table .crm-mini-link {
    white-space: nowrap;
    font-size: 11px;
}

.crm-units-table .crm-table-actions {
    align-items: center;
    flex-direction: column;
    flex-wrap: nowrap;
    gap: 6px;
    justify-content: center;
    text-align: center;
}

.crm-units-table .crm-table-actions .crm-mini-link {
    display: block;
    width: 100%;
    text-align: center;
}

.crm-units-table td > * {
    vertical-align: middle;
}

.crm-table tbody tr:hover td {
    background: rgba(200, 235, 221, 0.36);
}

.crm-table tbody tr:last-child td {
    border-bottom: 0;
}

.crm-empty {
    padding: 18px;
    border: 1px solid var(--crm-border);
    border-radius: 18px;
    color: var(--crm-muted);
    background: linear-gradient(180deg, #ffffff 0%, #f8f2e8 100%);
}

.crm-info-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.crm-info-grid > div {
    padding: 16px 18px;
    min-height: 92px;
    border: 1px solid var(--crm-divider);
    border-radius: 20px;
    background: linear-gradient(180deg, #ffffff 0%, #faf5ed 100%);
    box-shadow: var(--crm-shadow-soft);
}

dt {
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-weight: 700;
    margin-bottom: 4px;
}

dd {
    margin: 0;
    font-weight: 700;
    line-height: 1.5;
}

.crm-block-copy {
    margin-top: 16px;
}

.crm-unit-card {
    display: grid;
    gap: 24px;
}

.crm-unit-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 22px;
    padding-bottom: 22px;
    border-bottom: 1px solid var(--crm-divider);
}

.crm-unit-card-head h2 {
    margin: 0 0 8px;
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.1;
}

.crm-unit-card-print-meta {
    margin: 10px 0 0;
    color: var(--crm-muted);
    font-size: 13px;
    font-weight: 700;
}

.crm-unit-card-statuses {
    display: flex;
    flex: 0 0 auto;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
    max-width: min(430px, 100%);
}

.crm-unit-card-summary {
    display: grid;
    grid-template-columns: minmax(280px, 0.82fr) minmax(0, 1fr);
    gap: 22px;
    align-items: stretch;
}

.crm-unit-card-photo,
.crm-unit-card-photo-placeholder {
    min-height: 280px;
    border-radius: 0;
    overflow: hidden;
    border: 0;
    background: #ffffff;
    box-shadow: none;
}

.crm-unit-card-photo img {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 280px;
    background: #ffffff;
    object-fit: contain;
    object-position: left center;
}

.crm-unit-card-photo-placeholder {
    display: grid;
    place-items: center;
    padding: 24px;
    color: var(--crm-accent-strong);
    font-weight: 800;
    text-align: center;
}

.crm-unit-card-section {
    display: grid;
    gap: 16px;
    padding-top: 22px;
    border-top: 1px solid var(--crm-divider);
}

.crm-unit-card-section > .crm-card-header {
    margin-bottom: 0;
}

.crm-unit-card-info-grid {
    align-items: stretch;
}

.crm-unit-card-note,
.crm-unit-card-photo-thumb {
    padding: 16px 18px;
    border: 1px solid var(--crm-divider);
    border-radius: 20px;
    background: linear-gradient(180deg, #ffffff 0%, #faf5ed 100%);
    box-shadow: var(--crm-shadow-soft);
}

.crm-unit-card-note h4,
.crm-unit-card-note p,
.crm-unit-card-photo-thumb {
    margin: 0;
}

.crm-unit-card-note p {
    margin-top: 8px;
    line-height: 1.7;
}

.crm-unit-card-note-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.crm-unit-card-photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
}

.crm-unit-card-photo-thumb {
    display: grid;
    gap: 10px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: #ffffff;
    box-shadow: none;
}

.crm-unit-card-photo-thumb img {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    border-radius: 0;
    background: #ffffff;
    object-fit: contain;
    object-position: left center;
}

.crm-unit-card-photo-thumb figcaption {
    color: var(--crm-muted);
    font-size: 13px;
    line-height: 1.45;
}

.crm-unit-card-notes-box {
    min-height: 300px;
    border: 1px solid var(--crm-divider);
    border-radius: 20px;
    background:
        repeating-linear-gradient(
            to bottom,
            rgba(255, 255, 255, 0.92) 0,
            rgba(255, 255, 255, 0.92) 31px,
            rgba(102, 112, 133, 0.28) 32px
        );
    box-shadow: var(--crm-shadow-soft);
}

.crm-unit-card-description p {
    margin: 0;
    padding: 16px 18px;
    border: 1px solid var(--crm-divider);
    border-radius: 20px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.84) 0%, rgba(247, 242, 235, 0.78) 100%);
    box-shadow: var(--crm-shadow-soft);
    line-height: 1.6;
}

.crm-unit-card-extra-photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 180px));
    justify-content: start;
    gap: 12px;
}

.crm-unit-card-extra-photo {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    margin: 0;
    overflow: hidden;
    border: 0;
    border-radius: 0;
    background: #ffffff;
    box-shadow: none;
}

.crm-unit-card-extra-photo img {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    background: #ffffff;
    object-fit: contain;
    object-position: left center;
}

.crm-unit-card-broker {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 18px;
    border: 1px solid var(--crm-divider);
    border-radius: 20px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.88) 0%, rgba(247, 242, 235, 0.78) 100%);
    box-shadow: var(--crm-shadow-soft);
}

.crm-unit-card-broker-photo {
    display: grid;
    flex: 0 0 auto;
    width: 76px;
    height: 76px;
    place-items: center;
    overflow: hidden;
    border: 1px solid var(--crm-border);
    border-radius: 50%;
    background: var(--crm-accent-soft);
    color: var(--crm-accent-strong);
    font-size: 22px;
    font-weight: 800;
}

.crm-unit-card-broker-photo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.crm-unit-card-broker-copy {
    min-width: 0;
}

.crm-unit-card-broker-copy h3,
.crm-unit-card-broker-copy p {
    margin: 0;
}

.crm-unit-card-broker-contact {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    margin-top: 8px;
}

.crm-unit-card-broker-contact a {
    color: var(--crm-accent-strong);
    font-weight: 800;
    text-decoration: none;
}

.crm-detail-list {
    padding-left: 18px;
}

.crm-card > .crm-list + .crm-form,
.crm-card > .crm-timeline + .crm-form,
.crm-card > .crm-table-wrap + .crm-form {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--crm-divider);
}

.crm-cell-nested {
    padding: 8px 0;
}

.crm-inline-static {
    display: inline-flex;
    align-items: center;
    padding: 10px 16px;
    min-width: 120px;
    border: 1px solid var(--crm-border);
    background: linear-gradient(180deg, #ffffff 0%, #faf5ed 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.94);
}

.crm-inline-static-block {
    display: flex;
    width: 100%;
    min-height: 48px;
    padding: 13px 18px;
    align-items: center;
    justify-content: flex-start;
}

.crm-hidden-form {
    display: none;
}

.crm-mini-button-block {
    width: 100%;
}

.crm-table-users {
    table-layout: fixed;
    min-width: 1120px;
}

.crm-table-users th:nth-child(1) {
    width: 18%;
}

.crm-table-users th:nth-child(2) {
    width: 22%;
}

.crm-table-users th:nth-child(3) {
    width: 13%;
}

.crm-table-users th:nth-child(4) {
    width: 13%;
}

.crm-table-users th:nth-child(5) {
    width: 14%;
}

.crm-table-users th:nth-child(6) {
    width: 12%;
}

.crm-table-users th:nth-child(7) {
    width: 8%;
}

.crm-table-users td {
    vertical-align: top;
}

.crm-table-users td .crm-input,
.crm-table-users td .crm-select,
.crm-table-users td .crm-inline-static,
.crm-table-users td .crm-inline-static-block,
.crm-table-users td .crm-button,
.crm-table-users td .crm-button-secondary,
.crm-table-users td .crm-mini-button {
    min-width: 0;
    width: 100%;
}

.crm-users-submit-cell {
    min-width: 128px;
}

.crm-users-row-actions {
    margin-top: 8px;
}

.crm-client-gdpr-card {
    gap: 22px;
}

.crm-client-documents-card {
    gap: 22px;
}

.crm-client-gdpr-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.crm-client-documents-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.crm-client-gdpr-summary-item {
    display: grid;
    gap: 6px;
    min-width: 0;
    padding: 16px 18px;
    border: 1px solid var(--crm-divider);
    border-radius: 20px;
    background: linear-gradient(180deg, #ffffff 0%, #faf5ed 100%);
    box-shadow: var(--crm-shadow-soft);
}

.crm-client-documents-summary-item {
    display: grid;
    gap: 6px;
    min-width: 0;
    padding: 16px 18px;
    border: 1px solid var(--crm-divider);
    border-radius: 20px;
    background: linear-gradient(180deg, #ffffff 0%, #faf5ed 100%);
    box-shadow: var(--crm-shadow-soft);
}

.crm-client-gdpr-summary-item strong {
    line-height: 1.45;
}

.crm-client-documents-summary-item strong {
    font-size: 24px;
    line-height: 1.2;
}

.crm-client-document-item {
    align-items: stretch;
}

.crm-client-document-main {
    display: grid;
    min-width: 0;
    gap: 12px;
}

.crm-client-document-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.crm-gdpr-modal-card {
    width: min(860px, 100%);
}

.crm-gdpr-modal-card > .crm-card-header {
    display: grid;
    gap: 12px;
    padding-right: 74px;
}

.crm-gdpr-modal-card > .crm-card-header > :last-child {
    justify-self: start;
}

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

.crm-gdpr-consent-item {
    align-items: stretch;
}

.crm-gdpr-form {
    margin-top: 4px;
    padding-top: 24px;
    border-top: 1px solid var(--crm-divider);
}

.crm-gdpr-form-head {
    margin-bottom: 2px;
}

.crm-code-block {
    margin-top: 16px;
    overflow-x: auto;
    background: #0f1b17;
    color: #d7efe7;
    padding: 14px;
    border-radius: 16px;
}

.crm-loading-active {
    overflow: hidden;
}

.crm-loading-screen {
    position: fixed;
    inset: 0;
    z-index: 999;
    display: grid;
    place-items: center;
    padding: 28px;
    background: rgba(244, 239, 232, 0.72);
    backdrop-filter: blur(16px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.22s ease;
}

.crm-loading-screen.is-visible {
    opacity: 1;
    pointer-events: auto;
}

.crm-loading-panel {
    width: min(420px, 100%);
    padding: 26px 24px;
    text-align: left;
    border-radius: 28px;
    position: relative;
    overflow: hidden;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(248, 244, 238, 0.94) 100%);
    border: 1px solid var(--crm-border-strong);
    box-shadow: var(--crm-shadow);
}

.crm-loading-panel .crm-mark {
    margin: 0 0 16px 0;
}

.crm-loading-panel h1,
.crm-loading-panel h2 {
    margin-bottom: 12px;
}

.crm-loading-panel-static {
    background: rgba(255, 255, 255, 0.95);
}

.crm-loading-bar {
    margin-top: 22px;
    height: 8px;
    overflow: hidden;
    border-radius: 999px;
    background: #e2e8f0;
}

.crm-loading-bar span {
    display: block;
    width: 66%;
    height: 100%;
    border-radius: 999px;
    background: var(--crm-accent);
    animation: crm-progress-pulse 1.15s ease-in-out infinite;
}

.crm-transition-page {
    background:
        radial-gradient(circle at top left, rgba(31, 107, 95, 0.16), transparent 30%),
        linear-gradient(180deg, #fbf8f4 0%, #f4efe8 100%);
}

.crm-realtor-page {
    background:
        radial-gradient(circle at 8% 0%, rgba(31, 107, 87, 0.22), transparent 30%),
        radial-gradient(circle at 92% 10%, rgba(193, 117, 43, 0.18), transparent 26%),
        linear-gradient(180deg, #fbf8f4 0%, #f3ecdf 48%, #e8ded0 100%);
}

.crm-realtor-topbar {
    position: sticky;
    top: 0;
    z-index: 30;
    width: min(1180px, calc(100% - 32px));
    margin: 16px auto 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 12px 14px;
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.78);
    backdrop-filter: blur(18px);
    box-shadow: 0 24px 70px -44px rgba(15, 23, 42, 0.45);
}

.crm-realtor-logo {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.crm-realtor-logo .crm-mark-hero {
    width: 46px;
    height: 46px;
    border-radius: 16px;
}

.crm-realtor-logo span {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.crm-realtor-logo strong,
.crm-realtor-logo small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.crm-realtor-logo small {
    color: var(--crm-muted);
    font-weight: 700;
}

.crm-realtor-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #334155;
    font-weight: 800;
}

.crm-realtor-nav a {
    padding: 11px 14px;
    border-radius: 999px;
    transition: background-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.crm-realtor-nav a:hover {
    transform: translateY(-1px);
    background: rgba(31, 107, 87, 0.09);
    color: var(--crm-accent-strong);
}

.crm-realtor-nav .crm-realtor-nav-login {
    color: #ffffff;
    background: var(--crm-accent);
    box-shadow: 0 18px 34px -26px rgba(21, 82, 66, 0.7);
}

.crm-realtor-nav .crm-realtor-nav-login:hover {
    color: #ffffff;
    background: var(--crm-accent-strong);
}

.crm-realtor-shell {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 56px 0 34px;
}

.crm-realtor-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
    gap: 28px;
    align-items: stretch;
}

.crm-realtor-hero-copy,
.crm-realtor-profile-card,
.crm-realtor-section,
.crm-realtor-contact {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--crm-border-strong);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.94) 0%, rgba(250, 246, 239, 0.9) 100%);
    backdrop-filter: blur(18px);
    box-shadow: var(--crm-shadow);
    border-radius: 34px;
}

.crm-realtor-hero-copy::before,
.crm-realtor-profile-card::before,
.crm-realtor-section::before,
.crm-realtor-contact::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 1px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.96), rgba(29, 109, 89, 0.28), rgba(255, 255, 255, 0.96));
}

.crm-realtor-hero-copy {
    min-height: 560px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: clamp(28px, 6vw, 58px);
    background:
        linear-gradient(145deg, rgba(15, 23, 42, 0.9) 0%, rgba(22, 41, 34, 0.86) 46%, rgba(32, 77, 62, 0.82) 100%),
        radial-gradient(circle at 15% 15%, rgba(215, 239, 231, 0.2), transparent 34%);
    color: #ffffff;
}

.crm-realtor-hero-copy .crm-eyebrow {
    color: #b9eadc;
}

.crm-realtor-hero-copy h1 {
    max-width: 760px;
    font-size: clamp(42px, 7vw, 76px);
    letter-spacing: -0.055em;
    line-height: 0.96;
}

.crm-realtor-lead {
    max-width: 700px;
    color: #dbe7e2;
    font-size: clamp(17px, 2vw, 21px);
    line-height: 1.72;
}

.crm-realtor-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 16px;
}

.crm-realtor-profile-card {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 18px;
    min-height: 560px;
    padding: clamp(26px, 4vw, 38px);
}

.crm-realtor-profile-overview {
    align-self: center;
    margin: 0;
    color: var(--crm-accent);
    text-align: center;
}

.crm-realtor-profile-dynamic {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    justify-content: flex-start;
    gap: 18px;
    min-height: 0;
    opacity: 1;
    filter: blur(0);
    transform: translate3d(0, 0, 0) scale(1);
    transition:
        opacity 420ms cubic-bezier(0.22, 1, 0.36, 1),
        filter 420ms cubic-bezier(0.22, 1, 0.36, 1),
        transform 420ms cubic-bezier(0.22, 1, 0.36, 1);
    will-change: opacity, filter, transform;
    backface-visibility: hidden;
}

.crm-realtor-profile-card.is-switching [data-broker-content] {
    opacity: 0;
    filter: blur(5px);
    transform: translate3d(0, 0, 0) scale(0.992);
}

.crm-realtor-portrait {
    position: relative;
    width: min(260px, 74vw);
    aspect-ratio: 1 / 1;
    display: grid;
    place-items: center;
    margin-inline: auto;
    overflow: hidden;
    border-radius: 999px;
    background:
        radial-gradient(circle at 30% 22%, rgba(255, 255, 255, 0.78), transparent 24%),
        linear-gradient(145deg, #d7efe7 0%, #9bcdbb 45%, #1d6d59 100%);
    box-shadow: 0 34px 80px -46px rgba(15, 23, 42, 0.55);
}

.crm-realtor-portrait span {
    width: 118px;
    height: 118px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.9);
    color: var(--crm-accent-strong);
    font-size: 36px;
    font-weight: 900;
    letter-spacing: 0.04em;
}

.crm-realtor-portrait img {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: 50% 50%;
    border-radius: 999px;
    transform: translate(-50%, -50%);
    backface-visibility: hidden;
    will-change: opacity;
}

.crm-realtor-profile-card h2 {
    min-height: 2.45em;
    font-size: clamp(28px, 3.6vw, 42px);
    letter-spacing: -0.04em;
}

.crm-realtor-profile-card .crm-muted {
    min-height: 6.8em;
}

.crm-realtor-profile-contact {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    align-content: flex-start;
    gap: 8px;
    min-height: 92px;
}

.crm-realtor-profile-contact a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    max-width: 100%;
    overflow-wrap: anywhere;
    padding: 10px 14px;
    border: 1px solid rgba(31, 107, 87, 0.14);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.72);
    color: var(--crm-accent-strong);
    font-size: 14px;
    font-weight: 900;
    text-decoration: none;
}

.crm-realtor-stat-list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    align-content: flex-start;
    gap: 10px;
    min-height: 116px;
}

.crm-realtor-stat-list span {
    padding: 10px 14px;
    border: 1px solid rgba(31, 107, 87, 0.14);
    border-radius: 999px;
    background: rgba(215, 239, 231, 0.48);
    color: var(--crm-accent-strong);
    font-weight: 800;
    white-space: nowrap;
}

.crm-realtor-broker-dots {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 12px;
}

.crm-realtor-broker-dots span {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: rgba(29, 109, 89, 0.22);
    transition: width 180ms ease, background-color 180ms ease;
}

.crm-realtor-broker-dots span.is-active {
    width: 24px;
    background: var(--crm-accent);
}

.crm-realtor-section,
.crm-realtor-contact {
    margin-top: 28px;
    padding: clamp(24px, 5vw, 44px);
}

.crm-realtor-section-head {
    max-width: 760px;
    margin-bottom: 24px;
}

.crm-realtor-section-head h2,
.crm-realtor-contact h2 {
    font-size: clamp(32px, 5vw, 54px);
    letter-spacing: -0.05em;
}

.crm-realtor-card-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.crm-realtor-offer-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.crm-realtor-offer-card {
    display: block;
    overflow: hidden;
    border: 1px solid var(--crm-border);
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.78);
    box-shadow: var(--crm-shadow-soft);
    color: inherit;
    text-decoration: none;
    transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.crm-realtor-offer-card:hover {
    border-color: rgba(31, 107, 87, 0.32);
    box-shadow: 0 28px 80px -48px rgba(15, 23, 42, 0.72);
    transform: translateY(-3px);
}

.crm-realtor-offer-card.is-unavailable {
    border-color: rgba(118, 126, 121, 0.28);
    background: rgba(241, 242, 239, 0.88);
    color: #626862;
}

.crm-realtor-offer-card.is-unavailable:hover {
    border-color: rgba(118, 126, 121, 0.4);
    box-shadow: 0 22px 64px -48px rgba(15, 23, 42, 0.58);
}

.crm-realtor-offer-card.is-unavailable .crm-realtor-offer-body {
    opacity: 0.78;
}

.crm-realtor-offer-photo {
    position: relative;
    min-height: 240px;
    display: grid;
    place-items: center;
    overflow: hidden;
    background:
        radial-gradient(circle at 20% 18%, rgba(255, 255, 255, 0.72), transparent 24%),
        linear-gradient(145deg, rgba(215, 239, 231, 0.82), rgba(31, 107, 87, 0.38));
    color: var(--crm-accent-strong);
    font-weight: 900;
}

.crm-realtor-offer-photo img {
    width: 100%;
    height: 100%;
    min-height: 240px;
    display: block;
    object-fit: cover;
}

.crm-realtor-offer-card.is-unavailable .crm-realtor-offer-photo img,
.crm-public-offer-main-photo.is-unavailable img {
    filter: grayscale(1);
    opacity: 0.52;
}

.crm-realtor-offer-card.is-unavailable .crm-realtor-offer-photo,
.crm-public-offer-main-photo.is-unavailable {
    background: linear-gradient(145deg, rgba(229, 231, 226, 0.92), rgba(143, 150, 145, 0.34));
    color: #626862;
}

.crm-public-offer-status-badge {
    position: absolute;
    top: 14px;
    left: 14px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 36px;
    padding: 7px 12px 7px 8px;
    border: 1px solid rgba(15, 23, 42, 0.1);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    color: #25302b;
    box-shadow: 0 14px 34px -24px rgba(15, 23, 42, 0.74);
    font-size: 13px;
    font-weight: 900;
    line-height: 1;
}

.crm-public-offer-status-badge.is-inline {
    position: static;
    width: fit-content;
}

.crm-public-offer-status-badge > span {
    width: 22px;
    height: 22px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: #6d756f;
    color: #ffffff;
    font-size: 11px;
    font-weight: 900;
}

.crm-public-offer-status-badge > span::before {
    content: "!";
}

.crm-public-offer-status-badge.is-reserved > span::before {
    content: "R";
}

.crm-public-offer-status-badge.is-sold > span::before {
    content: "P";
}

.crm-public-offer-status-badge.is-rented > span::before {
    content: "N";
}

.crm-realtor-offer-body {
    padding: 22px;
}

.crm-realtor-offer-body h3 {
    letter-spacing: -0.03em;
}

.crm-realtor-offer-body p {
    color: var(--crm-muted);
    line-height: 1.7;
}

.crm-realtor-offer-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.crm-realtor-offer-meta > span,
.crm-realtor-empty-offers {
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(215, 239, 231, 0.46);
    color: var(--crm-accent-strong);
    font-weight: 800;
}

.crm-realtor-empty-offers {
    border-radius: 24px;
}

.crm-public-offers-cta {
    display: flex;
    justify-content: center;
    margin-top: 28px;
}

.crm-public-offers-page-head {
    max-width: 980px;
}

.crm-public-offers-page-head h1 {
    margin: 0;
    color: var(--crm-text);
    font-size: clamp(34px, 6vw, 74px);
    line-height: 0.95;
    letter-spacing: -0.06em;
}

.crm-public-offers-layout {
    display: grid;
    grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
    gap: clamp(18px, 3vw, 34px);
    align-items: start;
}

.crm-public-offers-filter {
    position: sticky;
    top: 22px;
}

.crm-public-offers-filter .crm-form {
    gap: 14px;
}

.crm-public-offers-filter-actions {
    margin-top: 4px;
}

.crm-public-offers-results {
    min-width: 0;
}

.crm-public-offers-results-head {
    align-items: center;
    margin-bottom: 18px;
}

.crm-public-offers-results-head h2 {
    margin: 0;
}

.crm-public-offers-grid {
    grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
}

.crm-public-offers-index-page .crm-realtor-topbar,
.crm-public-offers-index-page .crm-realtor-shell {
    width: min(1560px, calc(100% - 40px));
}

.crm-public-offers-index-page .crm-public-offers-page-head {
    max-width: none;
}

.crm-public-offers-index-page .crm-public-offers-layout {
    grid-template-columns: minmax(280px, 340px) minmax(0, 1fr);
}

.crm-public-offers-index-page .crm-public-offers-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
}

.crm-public-offers-index-page .crm-realtor-offer-card {
    height: 100%;
}

@media (min-width: 1500px) {
    .crm-public-offers-index-page .crm-realtor-topbar,
    .crm-public-offers-index-page .crm-realtor-shell {
        width: min(1720px, calc(100% - 56px));
    }

    .crm-public-offers-index-page .crm-public-offers-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 1120px) {
    .crm-public-offers-index-page .crm-public-offers-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .crm-public-offers-index-page .crm-realtor-topbar,
    .crm-public-offers-index-page .crm-realtor-shell {
        width: min(100% - 24px, 1180px);
    }

    .crm-public-offers-index-page .crm-public-offers-grid {
        grid-template-columns: 1fr;
    }
}

.crm-energy-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
    max-width: 100%;
    padding: 8px 12px;
    border-radius: 999px;
    color: #102018;
    font-weight: 900;
    line-height: 1.2;
    box-shadow: inset 0 0 0 1px rgba(15, 27, 23, 0.12);
}

.crm-energy-letter {
    display: inline-grid;
    place-items: center;
    min-width: 26px;
    height: 26px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.72);
    color: inherit;
}

.crm-energy-label-compact {
    justify-content: center;
    width: 34px;
    min-width: 34px;
    height: 34px;
    padding: 0;
    font-size: 14px;
}

.crm-energy-label-a {
    background: #009640;
    color: #ffffff;
}

.crm-energy-label-b {
    background: #52ae32;
    color: #ffffff;
}

.crm-energy-label-c {
    background: #c8d400;
}

.crm-energy-label-d {
    background: #ffed00;
}

.crm-energy-label-e {
    background: #f39200;
}

.crm-energy-label-f {
    background: #e30613;
    color: #ffffff;
}

.crm-energy-label-g {
    background: #a90000;
    color: #ffffff;
}

.crm-realtor-offer-meta .crm-energy-label {
    background: var(--crm-energy-bg, #c8d400);
    color: var(--crm-energy-color, #102018);
}

.crm-realtor-offer-meta .crm-energy-label-a {
    --crm-energy-bg: #009640;
    --crm-energy-color: #ffffff;
}

.crm-realtor-offer-meta .crm-energy-label-b {
    --crm-energy-bg: #52ae32;
    --crm-energy-color: #ffffff;
}

.crm-realtor-offer-meta .crm-energy-label-c {
    --crm-energy-bg: #c8d400;
}

.crm-realtor-offer-meta .crm-energy-label-d {
    --crm-energy-bg: #ffed00;
}

.crm-realtor-offer-meta .crm-energy-label-e {
    --crm-energy-bg: #f39200;
}

.crm-realtor-offer-meta .crm-energy-label-f {
    --crm-energy-bg: #e30613;
    --crm-energy-color: #ffffff;
}

.crm-realtor-offer-meta .crm-energy-label-g {
    --crm-energy-bg: #a90000;
    --crm-energy-color: #ffffff;
}

.crm-public-back-link {
    width: fit-content;
    margin-bottom: 18px;
}

.crm-public-offer-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
    gap: 22px;
    align-items: stretch;
}

.crm-public-offer-gallery,
.crm-public-offer-summary,
.crm-public-offer-detail-card,
.crm-public-offer-contact {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--crm-border);
    border-radius: 34px;
    background: rgba(255, 255, 255, 0.78);
    box-shadow: var(--crm-shadow-soft);
}

.crm-public-offer-gallery {
    padding: 14px;
}

.crm-public-offer-main-photo {
    position: relative;
    min-height: clamp(320px, 52vw, 620px);
    display: grid;
    place-items: center;
    overflow: hidden;
    border-radius: 26px;
    background:
        radial-gradient(circle at 24% 18%, rgba(255, 255, 255, 0.78), transparent 24%),
        linear-gradient(145deg, rgba(215, 239, 231, 0.86), rgba(31, 107, 87, 0.38));
    color: var(--crm-accent-strong);
    font-size: clamp(24px, 4vw, 46px);
    font-weight: 900;
}

.crm-public-offer-main-photo img {
    width: 100%;
    height: 100%;
    min-height: clamp(320px, 52vw, 620px);
    display: block;
    object-fit: cover;
}

.crm-public-offer-photo-trigger {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: inherit;
    display: block;
    overflow: hidden;
    color: inherit;
    text-decoration: none;
    cursor: zoom-in;
}

.crm-public-offer-photo-trigger > span {
    position: absolute;
    right: 16px;
    bottom: 16px;
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 0 16px;
    border: 1px solid rgba(255, 255, 255, 0.58);
    border-radius: 999px;
    background: rgba(10, 18, 29, 0.72);
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    backdrop-filter: blur(14px);
}

.crm-public-offer-thumbs {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
    margin-top: 12px;
}

.crm-public-offer-thumbs a {
    overflow: hidden;
    border-radius: 18px;
    border: 1px solid var(--crm-border);
    background: rgba(255, 255, 255, 0.68);
    cursor: zoom-in;
}

.crm-public-offer-thumbs img {
    width: 100%;
    aspect-ratio: 1.35 / 1;
    display: block;
    object-fit: cover;
}

.crm-public-photo-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: grid;
    place-items: center;
    padding: clamp(18px, 4vw, 44px);
}

.crm-public-photo-modal[hidden] {
    display: none;
}

.crm-public-photo-modal-backdrop {
    position: absolute;
    inset: 0;
    border: 0;
    background: rgba(7, 14, 23, 0.78);
    backdrop-filter: blur(18px);
    cursor: zoom-out;
}

.crm-public-photo-modal-card {
    position: relative;
    z-index: 1;
    width: min(1120px, 100%);
    max-height: min(86vh, 860px);
    display: grid;
    gap: 12px;
    padding: clamp(10px, 2vw, 16px);
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 0 34px 90px rgba(0, 0, 0, 0.34);
}

.crm-public-photo-modal-card img {
    width: 100%;
    max-height: calc(86vh - 110px);
    display: block;
    border-radius: 22px;
    object-fit: contain;
    background: rgba(0, 0, 0, 0.36);
}

.crm-public-photo-modal-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.crm-public-photo-modal-card p,
.crm-public-photo-modal-footer span {
    margin: 0;
    color: rgba(255, 255, 255, 0.86);
    font-size: 13px;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.crm-public-photo-modal-footer span {
    flex: 0 0 auto;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(10, 18, 29, 0.68);
}

.crm-public-photo-modal-close {
    position: absolute;
    top: 18px;
    right: 18px;
    z-index: 2;
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.54);
    border-radius: 999px;
    background: rgba(10, 18, 29, 0.72);
    color: #fff;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    backdrop-filter: blur(14px);
}

.crm-public-photo-modal-nav {
    position: absolute;
    top: 50%;
    z-index: 2;
    width: clamp(46px, 6vw, 58px);
    height: clamp(46px, 6vw, 58px);
    display: grid;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.48);
    border-radius: 999px;
    background: rgba(10, 18, 29, 0.68);
    color: #ffffff;
    font-size: clamp(34px, 5vw, 50px);
    line-height: 1;
    cursor: pointer;
    transform: translateY(-50%);
    backdrop-filter: blur(14px);
    transition: transform 0.16s ease, background 0.16s ease;
}

.crm-public-photo-modal-nav:hover {
    background: rgba(31, 107, 87, 0.82);
}

.crm-public-photo-modal-nav.is-prev {
    left: clamp(18px, 3vw, 34px);
}

.crm-public-photo-modal-nav.is-next {
    right: clamp(18px, 3vw, 34px);
}

.crm-public-photo-modal-nav span {
    transform: translateY(-2px);
}

.crm-public-photo-modal-close:focus-visible,
.crm-public-photo-modal-nav:focus-visible,
.crm-public-offer-photo-trigger:focus-visible,
.crm-public-offer-thumbs a:focus-visible {
    outline: 3px solid rgba(31, 107, 87, 0.42);
    outline-offset: 3px;
}

.crm-public-offer-summary {
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: clamp(24px, 4vw, 40px);
}

.crm-public-offer-summary h1,
.crm-public-offer-detail-card h2,
.crm-public-offer-contact h2 {
    letter-spacing: -0.05em;
}

.crm-public-offer-summary h1 {
    font-size: clamp(34px, 5vw, 62px);
    line-height: 0.98;
}

.crm-public-offer-price {
    width: fit-content;
    padding: 12px 18px;
    border-radius: 999px;
    background: var(--crm-accent);
    color: #ffffff;
    font-size: 20px;
    font-weight: 900;
}

.crm-public-offer-price-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

.crm-public-offer-commission {
    width: fit-content;
    max-width: 100%;
    padding: 12px 18px;
    border-radius: 999px;
    border: 1px solid var(--crm-border);
    background: rgba(255, 255, 255, 0.88);
    color: var(--crm-ink);
    font-size: 15px;
    font-weight: 800;
    line-height: 1.4;
}

.crm-public-offer-unavailable-note {
    padding: 14px 16px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 18px;
    background: rgba(241, 242, 239, 0.88);
    color: #4b544e;
    font-weight: 800;
    line-height: 1.5;
}

.crm-public-offer-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
    gap: 22px;
    margin-top: 24px;
    align-items: start;
}

.crm-public-offer-description {
    color: var(--crm-muted);
    font-size: 16px;
    line-height: 1.8;
}

.crm-public-offer-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 24px;
}

.crm-public-offer-detail-grid div {
    padding: 16px;
    border: 1px solid var(--crm-border);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.68);
}

.crm-public-offer-detail-grid div > span:first-child {
    display: block;
    color: var(--crm-muted);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.crm-public-offer-detail-grid div > strong {
    display: block;
    margin-top: 6px;
    color: #1f2a24;
    font-size: 16px;
}

.crm-public-offer-contact {
    position: sticky;
    top: 20px;
}

.crm-public-offer-broker {
    display: flex;
    gap: 14px;
    align-items: center;
    padding: 14px;
    margin: 16px 0 18px;
    border: 1px solid var(--crm-border);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.68);
}

.crm-public-offer-broker img,
.crm-public-offer-broker > span {
    width: 66px;
    height: 66px;
    flex: 0 0 auto;
    border-radius: 999px;
}

.crm-public-offer-broker img {
    object-fit: cover;
}

.crm-public-offer-broker > span {
    display: grid;
    place-items: center;
    background: var(--crm-accent);
    color: #ffffff;
    font-weight: 900;
}

.crm-public-offer-broker a {
    display: block;
    margin-top: 4px;
    color: var(--crm-accent-strong);
    font-weight: 800;
    text-decoration: none;
    word-break: break-word;
}

.crm-public-honeypot {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.crm-public-consent {
    align-items: flex-start;
    color: var(--crm-muted);
    font-size: 13px;
    line-height: 1.5;
}

.crm-realtor-service-card,
.crm-realtor-steps article {
    min-height: 230px;
    padding: 22px;
    border: 1px solid var(--crm-border);
    border-radius: 26px;
    background: rgba(255, 255, 255, 0.72);
    box-shadow: var(--crm-shadow-soft);
}

.crm-realtor-service-card span,
.crm-realtor-steps strong {
    display: inline-grid;
    place-items: center;
    min-width: 42px;
    height: 42px;
    margin-bottom: 20px;
    padding: 0 12px;
    border-radius: 999px;
    background: #10251f;
    color: #d7efe7;
    font-weight: 900;
}

.crm-realtor-service-card h3,
.crm-realtor-steps h3 {
    letter-spacing: -0.02em;
}

.crm-realtor-service-card p,
.crm-realtor-steps p {
    color: var(--crm-muted);
    line-height: 1.72;
}

.crm-realtor-process {
    background:
        radial-gradient(circle at 88% 12%, rgba(31, 107, 87, 0.16), transparent 28%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.94) 0%, rgba(247, 241, 232, 0.92) 100%);
}

.crm-realtor-steps {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.crm-realtor-steps article {
    min-height: 210px;
}

.crm-realtor-steps strong {
    background: var(--crm-accent);
    color: #ffffff;
}

.crm-realtor-contact {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
    gap: 24px;
    align-items: center;
    background:
        linear-gradient(135deg, rgba(18, 35, 30, 0.94), rgba(31, 107, 87, 0.88)),
        radial-gradient(circle at 20% 0%, rgba(215, 239, 231, 0.26), transparent 30%);
    color: #ffffff;
}

.crm-realtor-contact .crm-eyebrow {
    color: #b9eadc;
}

.crm-realtor-contact .crm-muted {
    max-width: 680px;
    color: #d6e3de;
}

.crm-realtor-contact-card {
    display: grid;
    gap: 10px;
    padding: 22px;
    border-radius: 26px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.crm-realtor-contact-card span,
.crm-realtor-contact-card small {
    color: #d6e3de;
}

.crm-realtor-contact-card a:not(.crm-mini-link) {
    overflow-wrap: anywhere;
    font-size: clamp(22px, 3vw, 30px);
    font-weight: 900;
}

.crm-realtor-contact-card .crm-mini-link {
    color: #ffffff;
}

.crm-realtor-footer {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 0 0 calc(28px + var(--crm-safe-bottom));
    color: var(--crm-muted);
    font-weight: 800;
}

.crm-realtor-footer a {
    color: var(--crm-accent-strong);
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 4px;
}

.crm-web-offer-row-title {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 240px;
}

.crm-web-offer-row-title img {
    width: 58px;
    height: 58px;
    flex: 0 0 auto;
    border-radius: 18px;
    object-fit: cover;
    border: 1px solid var(--crm-border);
}

.crm-table-thumb {
    width: 54px;
    height: 54px;
    display: block;
    border: 1px solid var(--crm-border);
    border-radius: 18px;
    object-fit: cover;
}

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

.crm-web-photo-card {
    position: relative;
    display: grid;
    gap: 12px;
    padding: 12px;
    border: 1px solid var(--crm-border);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.82);
}

.crm-photo-sort-hint {
    margin: 0 0 12px;
}

.crm-photo-sort-hint .is-error {
    color: #b42318;
    font-weight: 700;
}

[data-photo-sort] .crm-web-photo-card {
    cursor: grab;
    touch-action: pan-y;
}

[data-photo-sort].is-sorting,
[data-photo-sort].is-sorting .crm-web-photo-card {
    cursor: grabbing;
    user-select: none;
    -webkit-user-select: none;
}

[data-photo-sort] .crm-web-photo-card.is-dragging {
    opacity: 0.55;
    outline: 2px dashed var(--crm-accent);
    outline-offset: 2px;
}

[data-photo-sort] .crm-web-photo-card [hidden] {
    display: none;
}

.crm-photo-sort-handle {
    position: absolute;
    top: 22px;
    right: 22px;
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    color: var(--crm-accent);
    font-size: 18px;
    line-height: 1;
    touch-action: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
}

.crm-web-photo-card img {
    width: 100%;
    aspect-ratio: 4 / 3;
    display: block;
    border-radius: 18px;
    object-fit: cover;
}

.crm-web-source-photos {
    padding: 16px;
    border: 1px solid var(--crm-border);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.72);
}

.crm-card-header-compact {
    margin-bottom: 12px;
}

.crm-card-header-compact h3 {
    margin: 0 0 4px;
}

.crm-web-source-photo-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.crm-web-source-photo {
    width: 92px;
    height: 72px;
    overflow: hidden;
    border: 1px solid var(--crm-border);
    border-radius: 18px;
    background: var(--crm-surface);
}

.crm-web-source-photo img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.crm-web-source-photo-more {
    display: grid;
    place-items: center;
    color: var(--crm-accent);
    font-weight: 900;
}

.crm-web-photo-main {
    position: absolute;
    top: 22px;
    left: 22px;
    padding: 8px 12px;
    border-radius: 999px;
    background: var(--crm-accent);
    color: #ffffff;
    font-size: 12px;
    font-weight: 900;
}

.crm-web-broker-card {
    display: grid;
    gap: 22px;
}

.crm-web-broker-head {
    display: flex;
    gap: 16px;
    align-items: center;
}

.crm-web-broker-photo {
    width: 92px;
    height: 92px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    overflow: hidden;
    border-radius: 28px;
    background: linear-gradient(145deg, #d7efe7, #1d6d59);
    color: #ffffff;
    font-size: 24px;
    font-weight: 900;
}

.crm-web-broker-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.crm-broker-icon-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: center;
}

.crm-broker-icon {
    position: relative;
    display: inline-flex;
    width: 84px;
    height: 84px;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #ffffff;
    text-decoration: none;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.crm-broker-icon:hover {
    transform: translateY(-2px);
}

.crm-broker-icon:focus-visible {
    outline: 4px solid var(--crm-focus-ring);
    outline-offset: 4px;
}

.crm-broker-icon-photo {
    width: 78px;
    height: 78px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border: 3px solid rgba(255, 255, 255, 0.88);
    border-radius: 999px;
    background: linear-gradient(145deg, #d7efe7, #1d6d59);
    box-shadow: 0 18px 46px -28px rgba(29, 36, 31, 0.48);
    color: #ffffff;
    font-size: 22px;
    font-weight: 900;
}

.crm-broker-icon-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.crm-broker-icon-state {
    position: absolute;
    right: 6px;
    bottom: 8px;
    width: 18px;
    height: 18px;
    border: 3px solid #ffffff;
    border-radius: 999px;
    background: #b9c4bd;
    box-shadow: 0 10px 22px -14px rgba(29, 36, 31, 0.55);
}

.crm-broker-icon.is-public .crm-broker-icon-state {
    background: var(--crm-accent);
}

.crm-broker-modal-card {
    width: min(980px, 100%);
}

.crm-broker-modal-header {
    align-items: center;
    justify-content: flex-start;
}

.crm-broker-modal-header .crm-web-broker-photo {
    border-radius: 999px;
}

@keyframes crm-progress-pulse {
    0%, 100% {
        opacity: 0.78;
        transform: scaleX(0.92);
        transform-origin: left center;
    }

    50% {
        opacity: 1;
        transform: scaleX(1);
        transform-origin: left center;
    }
}

@media (max-width: 1200px) {
    .crm-stats-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .crm-dashboard-metrics {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .crm-form-grid-4 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 1120px) {
    .crm-app-shell {
        grid-template-columns: 1fr;
    }

    .crm-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        z-index: 40;
        width: min(360px, calc(100vw - 28px));
        min-height: 100vh;
        min-height: 100svh;
        border-radius: 0 30px 30px 0;
        transform: translateX(calc(-100% - 24px));
        transition: transform 0.24s ease;
        box-shadow: 0 34px 100px -40px rgba(0, 0, 0, 0.62);
        overflow-y: auto;
    }

    .crm-app-shell.is-sidebar-open .crm-sidebar {
        transform: translateX(0);
    }

    body.crm-sidebar-open {
        overflow: hidden;
    }

    .crm-sidebar-close,
    .crm-mobile-toolbar {
        display: flex;
    }

    .crm-content {
        padding-top: calc(22px + var(--crm-safe-top));
    }

    .crm-page-navigation {
        align-items: flex-start;
        flex-direction: column;
    }

    .crm-breadcrumbs {
        justify-content: flex-start;
    }

    .crm-page-header,
    .crm-card-header,
    .crm-unit-card-head,
    .crm-list-item,
    .crm-timeline-head {
        flex-direction: column;
    }

    .crm-page-header .crm-actions {
        justify-content: flex-start;
        width: 100%;
    }

    .crm-page-header .crm-actions > * {
        flex: 1 1 220px;
    }

    .crm-public-hero,
    .crm-realtor-hero,
    .crm-realtor-contact,
    .crm-public-offer-hero,
    .crm-public-offer-layout,
    .crm-public-offers-layout,
    .crm-unit-card-summary,
    .crm-unit-card-note-grid,
    .crm-dashboard-grid-primary,
    .crm-dashboard-grid-secondary,
    .crm-grid-2,
    .crm-form-grid-2,
    .crm-info-grid,
    .crm-storage-layout,
    .crm-storage-tools,
    .crm-task-modal-summary {
        grid-template-columns: 1fr;
    }

    .crm-unit-preview-gallery {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .crm-storage-sidebar {
        position: static;
        max-height: none;
    }

    .crm-storage-content-row {
        grid-template-columns: 1fr;
    }

    .crm-storage-row-actions,
    .crm-storage-inline-form {
        justify-content: flex-start;
    }

    .crm-dashboard-storage-summary {
        grid-template-columns: 1fr;
    }

    .crm-unit-card-statuses {
        justify-content: flex-start;
    }

    .crm-public-offer-contact {
        position: static;
    }

    .crm-public-offers-filter {
        position: static;
    }

    .crm-client-gdpr-summary,
    .crm-client-documents-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .crm-public-hero {
        gap: 24px;
        padding: 14px;
    }

    .crm-public-card {
        max-width: none;
    }

    .crm-realtor-card-grid,
    .crm-realtor-offer-grid,
    .crm-realtor-steps {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .crm-field-span-2 {
        grid-column: span 1;
    }

    .crm-stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .crm-dashboard-pipeline-grid {
        grid-template-columns: 1fr;
    }

    .crm-task-card,
    .crm-task-card-head,
    .crm-comment-head {
        flex-direction: column;
    }

    .crm-comment-head-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .crm-task-card-actions {
        min-width: 0;
        width: 100%;
    }
}

@media (max-width: 980px) {
    .crm-unit-form-columns {
        grid-template-columns: 1fr;
    }

    .crm-table-wrap {
        max-height: min(76vh, 720px);
    }

    .crm-table-users {
        min-width: 1080px;
    }

    .crm-communication-table {
        min-width: 1180px;
    }

    .crm-table-users th,
    .crm-table-users td {
        padding: 14px 12px;
    }
}

@media (max-width: 640px) {
    .crm-dashboard-metrics {
        grid-template-columns: 1fr;
    }

    .crm-dashboard-day-check {
        align-items: stretch;
        flex-direction: column;
    }

    .crm-storage-node {
        grid-template-columns: 1fr;
    }

    .crm-storage-node-kind {
        justify-self: start;
    }

    .crm-storage-row-actions,
    .crm-storage-inline-form {
        display: grid;
        grid-template-columns: 1fr;
        width: 100%;
    }

    .crm-storage-compact-input,
    .crm-storage-compact-select {
        width: 100%;
    }

    .crm-dashboard-day-check .crm-actions {
        width: 100%;
    }

    .crm-form-grid-4 {
        grid-template-columns: 1fr;
    }

    .crm-realtor-topbar {
        position: relative;
        width: min(100% - 24px, 1180px);
        align-items: stretch;
        flex-direction: column;
        border-radius: 28px;
    }

    .crm-realtor-nav {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        width: 100%;
    }

    .crm-realtor-nav a {
        text-align: center;
    }

    .crm-realtor-shell {
        width: min(100% - 24px, 1180px);
        padding-top: 24px;
    }

    .crm-realtor-hero-copy {
        min-height: auto;
    }

    .crm-realtor-actions,
    .crm-realtor-footer {
        flex-direction: column;
    }

    .crm-realtor-card-grid,
    .crm-realtor-offer-grid,
    .crm-realtor-steps {
        grid-template-columns: 1fr;
    }

    .crm-public-offer-thumbs,
    .crm-public-offer-detail-grid {
        grid-template-columns: 1fr;
    }

    .crm-public-offer-main-photo,
    .crm-public-offer-main-photo img {
        min-height: 280px;
    }

    .crm-realtor-service-card,
    .crm-realtor-steps article {
        min-height: auto;
    }

    .crm-public-brand,
    .crm-public-card,
    .crm-card,
    .crm-stat-card,
    .crm-page-header,
    .crm-loading-panel {
        padding: 20px;
    }

    .crm-content {
        padding:
            calc(20px + var(--crm-safe-top))
            calc(20px + var(--crm-safe-right))
            calc(20px + var(--crm-safe-bottom))
            calc(20px + var(--crm-safe-left));
    }

    .crm-sidebar {
        padding:
            calc(20px + var(--crm-safe-top))
            calc(20px + var(--crm-safe-right))
            calc(20px + var(--crm-safe-bottom))
            calc(20px + var(--crm-safe-left));
    }

    .crm-page-header,
    .crm-card-header,
    .crm-unit-card-head,
    .crm-list-item,
    .crm-timeline-head {
        flex-direction: column;
    }

    .crm-stats-grid {
        grid-template-columns: 1fr;
    }

    .crm-table-wrap {
        max-height: min(72vh, 640px);
        border-radius: 20px;
    }

    .crm-table {
        min-width: 920px;
    }

    .crm-table th,
    .crm-table td,
    .crm-table td p,
    .crm-table td a,
    .crm-table td strong,
    .crm-table td span {
        overflow-wrap: normal;
        word-break: normal;
    }

    .crm-table th,
    .crm-table td {
        white-space: nowrap;
    }

    .crm-table td p,
    .crm-table td .crm-meta,
    .crm-table td .crm-muted,
    .crm-table td .crm-help,
    .crm-table td .crm-communication-what,
    .crm-table td .crm-communication-recipient,
    .crm-table td .crm-communication-excerpt {
        white-space: normal;
    }

    .crm-sidebar {
        width: min(92vw, 360px);
        border-radius: 0 28px 28px 0;
    }

    .crm-mobile-toolbar {
        padding: 16px;
        align-items: flex-start;
    }

    .crm-install-modal-card {
        padding: 22px 20px;
        border-radius: 26px;
    }

    .crm-status-modal-card {
        padding: 22px 20px;
        border-radius: 24px;
    }

    .crm-status-modal-card > .crm-card-header {
        padding-right: 56px;
    }

    .crm-status-modal-badges {
        justify-content: flex-start;
    }

    .crm-install-modal-close {
        top: 14px;
        right: 14px;
    }

    .crm-status-modal-close {
        top: 14px;
        right: 14px;
    }

    .crm-sidebar-toggle {
        flex: 0 0 auto;
    }

    .crm-form-inline,
    .crm-actions,
    .crm-table-actions {
        align-items: stretch;
    }

    .crm-list-side {
        min-width: 0;
        width: 100%;
        align-items: flex-start;
        text-align: left;
    }

    .crm-button,
    .crm-button-secondary,
    .crm-button-danger {
        width: 100%;
    }

    .crm-inline-form {
        width: 100%;
    }

    .crm-brand-lockup {
        align-items: flex-start;
        gap: 14px;
    }

    .crm-brand-lockup-public {
        align-items: center;
    }

    .crm-brand-lockup-public .crm-brand-copy {
        min-height: 50px;
    }

    .crm-mark-hero,
    .crm-mark-loading {
        width: 50px;
        height: 50px;
        border-radius: 16px;
    }

    .crm-mark-hero .crm-mark-triangle,
    .crm-mark-loading .crm-mark-triangle {
        border-left-width: 12px;
        border-right-width: 12px;
        border-bottom-width: 22px;
    }

    .crm-tag-row {
        grid-template-columns: 1fr;
    }

    .crm-task-modal-card {
        padding: 22px 20px;
        border-radius: 26px;
    }

    .crm-broker-icon-grid {
        gap: 12px;
    }

    .crm-broker-icon {
        width: 72px;
        height: 72px;
    }

    .crm-broker-icon-photo {
        width: 68px;
        height: 68px;
        font-size: 19px;
    }

    .crm-task-modal-card > .crm-card-header,
    .crm-gdpr-modal-card > .crm-card-header {
        padding-right: 58px;
    }

    .crm-task-modal-close {
        top: 14px;
        right: 14px;
    }

    .crm-task-card {
        padding: 18px;
    }

    .crm-user-meta {
        align-items: flex-start;
    }

    .crm-client-gdpr-summary,
    .crm-client-documents-summary {
        grid-template-columns: 1fr;
    }

    .crm-client-document-head {
        display: grid;
    }
}

@media print {
    @page {
        size: A4;
        margin: 5mm;
    }

    :root {
        --crm-bg: #ffffff;
        --crm-ink: #111827;
        --crm-muted: #4b5563;
        --crm-border: #d1d5db;
        --crm-divider: #e5e7eb;
        --crm-print-page-width: 200mm;
        --crm-print-page-height: 287mm;
    }

    body,
    body.crm-app-page {
        width: auto;
        height: auto;
        min-height: 0;
        overflow: hidden;
        margin: 0 !important;
        padding: 0 !important;
        background: #ffffff !important;
        color: #111827;
    }

    .crm-sidebar,
    .crm-sidebar-backdrop,
    .crm-mobile-toolbar,
    .crm-page-navigation,
    .crm-notice,
    .crm-print-hidden,
    .crm-unit-card-screen-detail,
    .crm-loading-overlay {
        display: none !important;
    }

    .crm-app-shell,
    .crm-content {
        display: block;
        width: var(--crm-print-page-width);
        min-height: 0;
        overflow: visible;
        padding: 0;
    }

    .crm-card.crm-unit-card {
        box-sizing: border-box;
        width: var(--crm-print-page-width);
        min-height: var(--crm-print-page-height);
        max-height: var(--crm-print-page-height);
        padding: 5mm;
        border: 0;
        border-radius: 0;
        background: #ffffff;
        box-shadow: none;
        backdrop-filter: none;
    }

    .crm-unit-card::before,
    .crm-unit-card .crm-card-header::before {
        display: none;
    }

    .crm-unit-card {
        display: flex;
        flex-direction: column;
        gap: 5px;
        overflow: hidden;
        font-size: 8pt;
    }

    .crm-unit-card-head,
    .crm-unit-card-section,
    .crm-unit-card-extra-photo,
    .crm-unit-card-broker {
        break-inside: avoid;
        page-break-inside: avoid;
    }

    .crm-unit-card-head {
        padding-bottom: 4px;
        gap: 6px;
    }

    .crm-unit-card-head h2 {
        margin-bottom: 2px;
        font-size: 15pt;
        line-height: 1.08;
    }

    .crm-unit-card-head .crm-eyebrow,
    .crm-unit-card-print-meta {
        display: none !important;
    }

    .crm-unit-card-head .crm-muted {
        margin-top: 2px;
        font-size: 7.4pt;
        line-height: 1.2;
    }

    .crm-unit-card-statuses {
        justify-content: flex-end;
        gap: 4px;
        max-width: 64mm;
    }

    .crm-unit-card-summary {
        grid-template-columns: 36mm minmax(0, 1fr);
        gap: 5px;
    }

    .crm-info-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 4px;
    }

    .crm-unit-card-photo,
    .crm-unit-card-photo-placeholder {
        min-height: 31mm;
        border: 0;
        border-radius: 0;
        box-shadow: none;
    }

    .crm-unit-card-photo img {
        height: 31mm;
        min-height: 31mm;
        max-height: 34mm;
        background: #ffffff;
        object-fit: contain;
        object-position: left center;
    }

    .crm-info-grid > div,
    .crm-list-item,
    .crm-empty,
    .crm-unit-card-note,
    .crm-unit-card-photo-thumb {
        border-color: #d1d5db;
        border-radius: 8px;
        background: #ffffff;
        box-shadow: none;
        break-inside: avoid;
        page-break-inside: avoid;
    }

    .crm-info-grid > div {
        min-height: 0;
        padding: 4px 5px;
        border-radius: 5px;
    }

    .crm-info-grid dt {
        margin-bottom: 2px;
        font-size: 6.4pt;
        line-height: 1.15;
    }

    .crm-info-grid dd {
        font-size: 7.6pt;
        line-height: 1.2;
    }

    .crm-card-header {
        padding-bottom: 0;
        margin-bottom: 0;
    }

    .crm-unit-card-section {
        gap: 4px;
        padding-top: 5px;
    }

    .crm-unit-card .crm-card-header h3 {
        margin: 0;
        font-size: 9pt;
        line-height: 1.15;
    }

    .crm-unit-card .crm-card-header .crm-muted {
        display: none;
    }

    .crm-unit-card-description p {
        margin: 0;
        overflow: visible;
        padding: 3px 5px;
        border-color: #d1d5db;
        border-radius: 5px;
        background: #ffffff;
        box-shadow: none;
        font-size: 6.8pt;
        line-height: 1.16;
    }

    .crm-unit-card-long-description .crm-unit-card-description p {
        font-size: 6.4pt;
        line-height: 1.1;
    }

    .crm-unit-card-extra-photo-grid {
        grid-template-columns: repeat(4, 32mm);
        justify-content: start;
        gap: 4px;
    }

    .crm-unit-card-long-description .crm-unit-card-extra-photo-grid {
        grid-template-columns: repeat(2, 32mm);
    }

    .crm-unit-card-extra-photo {
        border: 0;
        border-radius: 0;
        background: #ffffff;
        box-shadow: none;
        width: 32mm;
        height: 16mm;
    }

    .crm-unit-card-extra-photo img {
        width: 100%;
        height: 100%;
        aspect-ratio: auto;
        background: #ffffff;
        object-fit: contain;
        object-position: left center;
    }

    .crm-unit-card-notes-box {
        min-height: 18mm;
        border-radius: 5px;
        background:
            repeating-linear-gradient(
                to bottom,
                #ffffff 0,
                #ffffff 8mm,
                #cfd4dc 8.2mm
            );
        box-shadow: none;
    }

    .crm-unit-card-long-description .crm-unit-card-notes-box {
        min-height: 8mm;
    }

    .crm-unit-card-broker {
        margin-top: auto;
        padding: 3mm 0 0;
        border: 0;
        border-top: 1px solid #d1d5db;
        border-radius: 0;
        background: #ffffff;
        box-shadow: none;
        gap: 3mm;
    }

    .crm-unit-card-broker-photo {
        width: 16mm;
        height: 16mm;
        font-size: 9pt;
        box-shadow: none;
    }

    .crm-unit-card-broker-copy .crm-eyebrow {
        margin: 0 0 1mm;
        font-size: 6.4pt;
        line-height: 1.15;
    }

    .crm-unit-card-broker-copy h3 {
        margin: 0;
        font-size: 9pt;
        line-height: 1.18;
    }

    .crm-unit-card-broker-copy .crm-muted {
        margin-top: 1mm;
        font-size: 7.4pt;
        line-height: 1.2;
    }

    .crm-unit-card-broker-contact {
        gap: 2mm 5mm;
        margin-top: 2mm;
    }

    .crm-unit-card-broker-contact a {
        color: #111827;
        font-size: 7.6pt;
    }

    .crm-list {
        gap: 8px;
    }

    .crm-list-item {
        padding: 10px 12px;
    }

    .crm-list-side {
        min-width: 0;
    }

    .crm-badge,
    .crm-energy-label {
        box-shadow: none;
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
    }

    .crm-unit-card-photo-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 8px;
    }

    .crm-unit-card-photo-thumb {
        padding: 0;
        border: 0;
        border-radius: 0;
        background: #ffffff;
        box-shadow: none;
    }

    .crm-unit-card-photo-thumb img {
        border-radius: 0;
    }
}

/* Sbalitelná okna na detailu klienta: zavřená stránka je jen seznam nadpisů se symbolem +. */
.crm-client-sections {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
}

.crm-collapse {
    padding: 0;
}

.crm-collapse-summary {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 24px;
    cursor: pointer;
    list-style: none;
    -webkit-tap-highlight-color: transparent;
}

.crm-collapse-summary::-webkit-details-marker {
    display: none;
}

.crm-collapse-summary:hover {
    background: rgba(15, 106, 82, 0.06);
}

.crm-collapse-summary:focus-visible {
    outline: 3px solid var(--crm-focus-ring);
    outline-offset: -3px;
}

.crm-collapse-title {
    flex: 1 1 auto;
    min-width: 0;
    margin: 0;
    font-size: 19px;
    line-height: 1.3;
}

.crm-collapse-count {
    flex: 0 0 auto;
    min-width: 30px;
    padding: 3px 10px;
    border-radius: 999px;
    background: var(--crm-neutral-soft);
    color: var(--crm-muted);
    font-size: 13px;
    font-weight: 800;
    text-align: center;
}

.crm-collapse[open] > .crm-collapse-summary .crm-collapse-count {
    background: var(--crm-accent-soft);
    color: var(--crm-accent-strong);
}

.crm-collapse-toggle {
    position: relative;
    flex: 0 0 auto;
    width: 30px;
    height: 30px;
    border-radius: 999px;
    background: rgba(15, 106, 82, 0.1);
}

.crm-collapse-toggle::before,
.crm-collapse-toggle::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 13px;
    height: 2px;
    border-radius: 2px;
    background: var(--crm-accent);
    transform: translate(-50%, -50%);
    transition: transform 0.18s ease;
}

/* Svislá čárka se při otevření sklopí, takže se z + stane -. */
.crm-collapse-toggle::after {
    transform: translate(-50%, -50%) rotate(90deg);
}

.crm-collapse[open] > .crm-collapse-summary .crm-collapse-toggle::after {
    transform: translate(-50%, -50%) rotate(0deg);
}

.crm-collapse-body {
    padding: 18px 24px 24px;
    border-top: 1px solid var(--crm-divider);
}

.crm-collapse-body > .crm-card-header:first-child {
    margin-bottom: 18px;
}

.crm-collapse-body > .crm-list + .crm-form,
.crm-collapse-body > .crm-timeline + .crm-form,
.crm-collapse-body > .crm-table-wrap + .crm-form,
.crm-collapse-body > .crm-form + .crm-list,
.crm-collapse-body > .crm-form + .crm-timeline {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--crm-divider);
}

@media (max-width: 640px) {
    .crm-collapse-summary {
        padding: 14px 20px;
    }

    .crm-collapse-title {
        font-size: 17px;
    }

    .crm-collapse-body {
        padding: 16px 20px 20px;
    }
}
