:root {
    color-scheme: dark;
    --bg: #0e1014;
    --surface: #14171d;
    --surface-2: #191d24;
    --surface-3: #20252e;
    --surface-hover: #242a34;
    --border: #2a303a;
    --border-strong: #39414d;
    --text: #f3f5f7;
    --text-soft: #c0c6cf;
    --muted: #8d96a5;
    --muted-2: #657080;
    --accent: #6d8cff;
    --accent-strong: #5576f2;
    --accent-soft: rgba(109, 140, 255, .14);
    --success: #4bc19b;
    --success-soft: rgba(75, 193, 155, .13);
    --warning: #e0a94f;
    --warning-soft: rgba(224, 169, 79, .13);
    --danger: #ef6b6b;
    --danger-soft: rgba(239, 107, 107, .13);
    --shadow: 0 16px 48px rgba(0, 0, 0, .28);
    --radius-sm: 7px;
    --radius: 10px;
    --radius-lg: 14px;
    --sidebar-width: 248px;
    --topbar-height: 68px;
    --font: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

:root[data-theme="light"] {
    color-scheme: light;
    --bg: #f4f5f7;
    --surface: #ffffff;
    --surface-2: #f9fafb;
    --surface-3: #eef1f5;
    --surface-hover: #f1f3f6;
    --border: #e1e5ea;
    --border-strong: #cbd1da;
    --text: #171a20;
    --text-soft: #414956;
    --muted: #6f7886;
    --muted-2: #929aa6;
    --accent: #4f6fe8;
    --accent-strong: #3f5ed4;
    --accent-soft: rgba(79, 111, 232, .10);
    --success: #258d70;
    --success-soft: rgba(37, 141, 112, .10);
    --warning: #a96c18;
    --warning-soft: rgba(169, 108, 24, .10);
    --danger: #c84444;
    --danger-soft: rgba(200, 68, 68, .10);
    --shadow: 0 18px 48px rgba(42, 48, 62, .14);
}

* {
    box-sizing: border-box;
}

html {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    min-width: 320px;
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--bg);
}

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

button,
a {
    -webkit-tap-highlight-color: transparent;
}

button {
    color: inherit;
}

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

[hidden] {
    display: none !important;
}

::selection {
    background: var(--accent);
    color: #fff;
}

::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-thumb {
    background: var(--border-strong);
    border: 3px solid transparent;
    background-clip: padding-box;
    border-radius: 999px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

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

.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 40;
    width: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border-right: 1px solid var(--border);
}

.sidebar-head {
    min-height: var(--topbar-height);
    padding: 0 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border);
}

.brand {
    display: flex;
    align-items: center;
    gap: 11px;
    min-width: 0;
}

.brand-mark {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    background: var(--accent);
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .05em;
}

.brand > div {
    min-width: 0;
}

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

.brand strong {
    font-size: 14px;
    letter-spacing: -.015em;
}

.brand > div > span {
    margin-top: 2px;
    color: var(--muted);
    font-size: 11px;
}

.main-nav,
.sidebar-section {
    padding: 14px 12px 0;
}

.sidebar-section {
    margin-top: 8px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.sidebar-label {
    display: block;
    padding: 0 10px 8px;
    color: var(--muted-2);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.nav-item {
    min-height: 40px;
    margin-bottom: 3px;
    padding: 0 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid transparent;
    border-radius: 8px;
    color: var(--text-soft);
    font-size: 13px;
    font-weight: 520;
    transition: background .15s ease, border-color .15s ease, color .15s ease;
}

.nav-item:hover {
    background: var(--surface-hover);
    color: var(--text);
}

.nav-item.is-active {
    background: var(--accent-soft);
    border-color: rgba(109, 140, 255, .18);
    color: var(--text);
}

.nav-icon {
    width: 20px;
    color: var(--muted);
    font-size: 16px;
    text-align: center;
}

.nav-item.is-active .nav-icon {
    color: var(--accent);
}

.nav-count {
    min-width: 22px;
    height: 20px;
    margin-left: auto;
    padding: 0 6px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: var(--surface-3);
    color: var(--muted);
    font-size: 10px;
    font-weight: 700;
}

.sidebar-foot {
    position: relative;
    margin-top: auto;
    padding: 12px;
    border-top: 1px solid var(--border);
}

.user-card {
    width: 100%;
    min-height: 50px;
    padding: 7px 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    cursor: pointer;
    text-align: left;
}

.user-card:hover {
    background: var(--surface-hover);
}

.avatar {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border: 1px solid var(--border-strong);
    border-radius: 9px;
    background: var(--surface-3);
    font-size: 11px;
    font-weight: 800;
}

.user-card-copy {
    min-width: 0;
    flex: 1;
}

.user-card-copy strong,
.user-card-copy small {
    display: block;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.user-card-copy strong {
    font-size: 12px;
}

.user-card-copy small {
    margin-top: 3px;
    color: var(--muted);
    font-size: 10px;
    text-transform: capitalize;
}

.user-menu {
    position: absolute;
    right: 12px;
    bottom: 68px;
    left: 12px;
    padding: 6px;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: var(--surface-2);
    box-shadow: var(--shadow);
}

.user-menu button {
    width: 100%;
    padding: 10px 11px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: var(--text-soft);
    cursor: pointer;
    text-align: left;
}

.user-menu button:hover {
    background: var(--surface-hover);
    color: var(--text);
}

.workspace {
    grid-column: 2;
    min-width: 0;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 30;
    height: var(--topbar-height);
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    border-bottom: 1px solid var(--border);
    background: color-mix(in srgb, var(--bg) 88%, transparent);
    backdrop-filter: blur(16px);
}

.topbar-start,
.topbar-actions {
    display: flex;
    align-items: center;
    gap: 9px;
}

.command-trigger {
    width: min(420px, 38vw);
    height: 38px;
    padding: 0 11px;
    display: flex;
    align-items: center;
    gap: 9px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    color: var(--muted);
    cursor: pointer;
    text-align: left;
}

.command-trigger:hover {
    border-color: var(--border-strong);
    color: var(--text-soft);
}

.command-trigger span:nth-child(2) {
    flex: 1;
    font-size: 12px;
}

kbd {
    padding: 2px 6px;
    border: 1px solid var(--border);
    border-bottom-color: var(--border-strong);
    border-radius: 5px;
    background: var(--surface-2);
    color: var(--muted);
    font: 10px/1.6 var(--font);
}

.icon-button {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    color: var(--text-soft);
    cursor: pointer;
}

.icon-button:hover {
    border-color: var(--border-strong);
    background: var(--surface-hover);
    color: var(--text);
}

.notification-button {
    position: relative;
}

.notification-dot {
    position: absolute;
    top: 7px;
    right: 7px;
    width: 6px;
    height: 6px;
    border: 2px solid var(--surface);
    border-radius: 50%;
    background: var(--danger);
}

.button {
    min-height: 38px;
    padding: 0 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    color: var(--text-soft);
    font-size: 12px;
    font-weight: 650;
    cursor: pointer;
    transition: transform .12s ease, background .15s ease, border-color .15s ease;
}

.button:hover {
    border-color: var(--border-strong);
    background: var(--surface-hover);
    color: var(--text);
}

.button:active {
    transform: translateY(1px);
}

.button--primary {
    border-color: var(--accent);
    background: var(--accent);
    color: #fff;
}

.button--primary:hover {
    border-color: var(--accent-strong);
    background: var(--accent-strong);
    color: #fff;
}

.button--ghost {
    background: transparent;
}

.button--danger {
    border-color: rgba(239, 107, 107, .28);
    background: var(--danger-soft);
    color: var(--danger);
}

.button--wide {
    width: 100%;
}

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

.main-content {
    width: 100%;
    max-width: 1540px;
    margin: 0 auto;
    padding: 28px 30px 48px;
    outline: none;
}

.page-head {
    margin-bottom: 24px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
}

.page-title-wrap {
    min-width: 0;
}

.eyebrow {
    display: block;
    margin-bottom: 7px;
    color: var(--muted);
    font-size: 10px;
    font-weight: 750;
    letter-spacing: .11em;
    text-transform: uppercase;
}

.page-head h1,
.modal-head h2,
.drawer-head h2 {
    margin: 0;
    letter-spacing: -.035em;
}

.page-head h1 {
    font-size: clamp(24px, 3vw, 32px);
    line-height: 1.12;
}

.page-head p {
    max-width: 720px;
    margin: 9px 0 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.65;
}

.page-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.summary-line {
    margin: -8px 0 24px;
    color: var(--text-soft);
    font-size: 15px;
}

.summary-line strong {
    color: var(--text);
}

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

.metric-card {
    min-height: 124px;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
}

.metric-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--muted);
    font-size: 11px;
    font-weight: 650;
}

.metric-icon {
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border-radius: 7px;
    background: var(--surface-3);
    color: var(--text-soft);
}

.metric-card strong {
    display: block;
    margin-top: 18px;
    font-size: 27px;
    letter-spacing: -.035em;
}

.metric-card small {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    font-size: 11px;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.18fr) minmax(330px, .82fr);
    gap: 14px;
}

.stack {
    display: grid;
    gap: 14px;
}

.panel {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    overflow: hidden;
}

.panel-head {
    min-height: 58px;
    padding: 0 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    border-bottom: 1px solid var(--border);
}

.panel-title h2,
.panel-title h3 {
    margin: 0;
    font-size: 13px;
    letter-spacing: -.01em;
}

.panel-title p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 10px;
}

.panel-body {
    padding: 18px;
}

.panel-body--flush {
    padding: 0;
}

.text-link {
    border: 0;
    background: none;
    color: var(--accent);
    font-size: 11px;
    font-weight: 650;
    cursor: pointer;
}

.text-link:hover {
    text-decoration: underline;
}

.task-list,
.activity-list,
.deadline-list,
.document-list {
    display: grid;
}

.task-row,
.deadline-row,
.activity-row,
.document-row {
    min-width: 0;
    padding: 13px 18px;
    display: grid;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid var(--border);
}

.task-row:last-child,
.deadline-row:last-child,
.activity-row:last-child,
.document-row:last-child {
    border-bottom: 0;
}

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

.task-check {
    width: 18px;
    height: 18px;
    border: 1px solid var(--border-strong);
    border-radius: 5px;
    background: transparent;
    cursor: pointer;
}

.task-check:hover {
    border-color: var(--accent);
}

.task-check.is-done {
    border-color: var(--success);
    background: var(--success);
    color: #fff;
}

.row-copy {
    min-width: 0;
}

.row-copy strong,
.row-copy span {
    display: block;
}

.row-copy strong {
    overflow: hidden;
    color: var(--text-soft);
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.row-copy span {
    margin-top: 4px;
    overflow: hidden;
    color: var(--muted);
    font-size: 10px;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.row-meta {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 7px;
    color: var(--muted);
    font-size: 10px;
    white-space: nowrap;
}

.badge {
    min-height: 22px;
    padding: 0 7px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--surface-2);
    color: var(--muted);
    font-size: 9px;
    font-weight: 750;
    letter-spacing: .02em;
    text-transform: uppercase;
}

.badge--accent {
    border-color: rgba(109, 140, 255, .24);
    background: var(--accent-soft);
    color: var(--accent);
}

.badge--success {
    border-color: rgba(75, 193, 155, .25);
    background: var(--success-soft);
    color: var(--success);
}

.badge--warning {
    border-color: rgba(224, 169, 79, .25);
    background: var(--warning-soft);
    color: var(--warning);
}

.badge--danger {
    border-color: rgba(239, 107, 107, .25);
    background: var(--danger-soft);
    color: var(--danger);
}

.deadline-row {
    grid-template-columns: 54px minmax(0, 1fr) auto;
}

.deadline-date {
    width: 46px;
    padding: 7px 3px;
    border: 1px solid var(--border);
    border-radius: 7px;
    background: var(--surface-2);
    text-align: center;
}

.deadline-date strong,
.deadline-date span {
    display: block;
}

.deadline-date strong {
    font-size: 15px;
}

.deadline-date span {
    margin-top: 2px;
    color: var(--muted);
    font-size: 8px;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.activity-row {
    grid-template-columns: 32px minmax(0, 1fr) auto;
}

.activity-icon,
.file-icon {
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface-2);
    color: var(--muted);
    font-size: 12px;
}

.activity-time {
    color: var(--muted);
    font-size: 9px;
    white-space: nowrap;
}

.toolbar {
    margin-bottom: 14px;
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
}

.toolbar-group {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.search-field {
    position: relative;
    min-width: 260px;
}

.search-field span {
    position: absolute;
    top: 50%;
    left: 11px;
    color: var(--muted);
    transform: translateY(-50%);
    pointer-events: none;
}

.search-field input {
    width: 100%;
    height: 36px;
    padding: 0 12px 0 34px;
    border: 1px solid var(--border);
    border-radius: 7px;
    background: var(--surface-2);
    color: var(--text);
    outline: none;
}

.search-field input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}

.select-control {
    height: 36px;
    padding: 0 30px 0 10px;
    border: 1px solid var(--border);
    border-radius: 7px;
    background: var(--surface-2);
    color: var(--text-soft);
    outline: none;
}

.data-table-wrap {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    overflow: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 860px;
}

.data-table th,
.data-table td {
    padding: 13px 16px;
    border-bottom: 1px solid var(--border);
    text-align: left;
}

.data-table th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: var(--surface-2);
    color: var(--muted);
    font-size: 9px;
    font-weight: 750;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.data-table td {
    color: var(--text-soft);
    font-size: 11px;
}

.data-table tbody tr {
    cursor: pointer;
    transition: background .12s ease;
}

.data-table tbody tr:hover {
    background: var(--surface-hover);
}

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

.table-primary {
    display: flex;
    align-items: center;
    gap: 10px;
}

.client-avatar {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface-3);
    color: var(--text-soft);
    font-size: 10px;
    font-weight: 800;
}

.table-primary strong,
.table-primary span {
    display: block;
}

.table-primary strong {
    color: var(--text);
    font-size: 11px;
}

.table-primary span {
    margin-top: 3px;
    color: var(--muted);
    font-size: 9px;
}

.priority-dot {
    width: 7px;
    height: 7px;
    display: inline-block;
    border-radius: 50%;
    background: var(--muted-2);
}

.priority-dot--high {
    background: var(--warning);
}

.priority-dot--critical {
    background: var(--danger);
}

.empty-state {
    min-height: 240px;
    padding: 34px;
    display: grid;
    place-items: center;
    text-align: center;
}

.empty-state-inner {
    max-width: 380px;
}

.empty-icon {
    width: 46px;
    height: 46px;
    margin: 0 auto 14px;
    display: grid;
    place-items: center;
    border: 1px solid var(--border);
    border-radius: 11px;
    background: var(--surface-2);
    color: var(--muted);
}

.empty-state h3 {
    margin: 0;
    font-size: 14px;
}

.empty-state p {
    margin: 8px 0 16px;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.55;
}

.modal,
.drawer,
.command-palette,
.overlay {
    position: fixed;
    z-index: 100;
}

.overlay {
    inset: 0;
    background: rgba(4, 6, 9, .64);
    backdrop-filter: blur(5px);
}

.modal {
    top: 50%;
    left: 50%;
    width: min(760px, calc(100vw - 32px));
    max-height: min(860px, calc(100vh - 40px));
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: var(--shadow);
    transform: translate(-50%, -50%);
    overflow: hidden;
}

.modal-head,
.drawer-head {
    min-height: 72px;
    padding: 16px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    border-bottom: 1px solid var(--border);
}

.modal-head h2,
.drawer-head h2 {
    font-size: 17px;
}

.modal-body,
.drawer-body {
    overflow: auto;
}

.modal-body {
    padding: 20px;
}

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

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

.field {
    display: grid;
    gap: 7px;
}

.field--full {
    grid-column: 1 / -1;
}

.field > span {
    color: var(--text-soft);
    font-size: 10px;
    font-weight: 650;
}

.field input,
.field select,
.field textarea {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface-2);
    color: var(--text);
    outline: none;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.field input,
.field select {
    height: 40px;
    padding: 0 11px;
}

.field textarea {
    min-height: 110px;
    padding: 11px;
    resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}

.field input::placeholder,
.field textarea::placeholder {
    color: var(--muted-2);
}

.form-actions {
    margin-top: 18px;
    padding-top: 16px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    border-top: 1px solid var(--border);
}

.form-error {
    margin: 0;
    padding: 10px 12px;
    border: 1px solid rgba(239, 107, 107, .25);
    border-radius: 8px;
    background: var(--danger-soft);
    color: var(--danger);
    font-size: 11px;
}

.drawer {
    top: 0;
    right: 0;
    bottom: 0;
    width: min(640px, calc(100vw - 40px));
    display: flex;
    flex-direction: column;
    border-left: 1px solid var(--border-strong);
    background: var(--surface);
    box-shadow: -22px 0 60px rgba(0, 0, 0, .26);
}

.drawer-body {
    padding: 20px;
}

.client-hero {
    padding: 18px;
    display: flex;
    align-items: flex-start;
    gap: 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface-2);
}

.client-hero .client-avatar {
    width: 48px;
    height: 48px;
    font-size: 13px;
}

.client-hero-copy {
    flex: 1;
    min-width: 0;
}

.client-hero-copy h3 {
    margin: 0;
    font-size: 18px;
}

.client-hero-copy p {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: 11px;
}

.client-hero-actions {
    display: flex;
    gap: 7px;
}

.tab-bar {
    margin: 16px 0;
    display: flex;
    gap: 4px;
    border-bottom: 1px solid var(--border);
    overflow: auto;
}

.tab-button {
    min-height: 38px;
    padding: 0 11px;
    border: 0;
    border-bottom: 2px solid transparent;
    background: transparent;
    color: var(--muted);
    font-size: 10px;
    font-weight: 650;
    cursor: pointer;
    white-space: nowrap;
}

.tab-button.is-active {
    border-bottom-color: var(--accent);
    color: var(--text);
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.info-card {
    padding: 13px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface-2);
}

.info-card span,
.info-card strong {
    display: block;
}

.info-card span {
    color: var(--muted);
    font-size: 9px;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.info-card strong {
    margin-top: 6px;
    color: var(--text-soft);
    font-size: 11px;
    font-weight: 600;
    overflow-wrap: anywhere;
}

.section-heading {
    margin: 22px 0 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.section-heading h3 {
    margin: 0;
    font-size: 12px;
}

.command-palette {
    inset: 0;
    padding: 12vh 20px 20px;
    background: rgba(4, 6, 9, .68);
    backdrop-filter: blur(7px);
}

.command-box {
    width: min(680px, 100%);
    margin: 0 auto;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.command-input-wrap {
    height: 58px;
    padding: 0 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid var(--border);
}

.command-input-wrap input {
    min-width: 0;
    flex: 1;
    border: 0;
    background: transparent;
    color: var(--text);
    outline: 0;
    font-size: 14px;
}

.command-results {
    max-height: 420px;
    padding: 8px;
    overflow: auto;
}

.command-group-label {
    display: block;
    padding: 10px 9px 6px;
    color: var(--muted-2);
    font-size: 9px;
    font-weight: 750;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.command-item {
    width: 100%;
    min-height: 48px;
    padding: 8px 10px;
    display: flex;
    align-items: center;
    gap: 11px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--text-soft);
    cursor: pointer;
    text-align: left;
}

.command-item:hover,
.command-item.is-active {
    background: var(--surface-hover);
    color: var(--text);
}

.command-item-icon {
    width: 31px;
    height: 31px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border: 1px solid var(--border);
    border-radius: 7px;
    background: var(--surface-2);
    color: var(--muted);
}

.command-item-copy {
    min-width: 0;
    flex: 1;
}

.command-item-copy strong,
.command-item-copy span {
    display: block;
}

.command-item-copy strong {
    font-size: 11px;
}

.command-item-copy span {
    margin-top: 3px;
    overflow: hidden;
    color: var(--muted);
    font-size: 9px;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.toast-stack {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 200;
    width: min(360px, calc(100vw - 36px));
    display: grid;
    gap: 8px;
}

.toast {
    padding: 13px 14px;
    display: grid;
    grid-template-columns: 24px minmax(0, 1fr);
    gap: 9px;
    border: 1px solid var(--border-strong);
    border-radius: 9px;
    background: var(--surface-2);
    box-shadow: var(--shadow);
    animation: toast-in .2s ease-out;
}

.toast-icon {
    width: 22px;
    height: 22px;
    display: grid;
    place-items: center;
    border-radius: 6px;
    background: var(--success-soft);
    color: var(--success);
    font-size: 11px;
}

.toast.is-error .toast-icon {
    background: var(--danger-soft);
    color: var(--danger);
}

.toast strong,
.toast span {
    display: block;
}

.toast strong {
    font-size: 11px;
}

.toast span {
    margin-top: 3px;
    color: var(--muted);
    font-size: 9px;
    line-height: 1.45;
}

@keyframes toast-in {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.loading-state {
    min-height: 54vh;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 12px;
    color: var(--muted);
    font-size: 12px;
}

.spinner {
    width: 24px;
    height: 24px;
    border: 2px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin .8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.login-view {
    min-height: 100vh;
    padding: 28px;
    display: grid;
    place-items: center;
    background:
        linear-gradient(90deg, transparent 49.9%, rgba(255,255,255,.018) 50%, transparent 50.1%),
        linear-gradient(0deg, transparent 49.9%, rgba(255,255,255,.018) 50%, transparent 50.1%),
        var(--bg);
    background-size: 52px 52px;
}

.login-card {
    width: min(420px, 100%);
    padding: 26px;
    border: 1px solid var(--border-strong);
    border-radius: 14px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.brand--login {
    margin-bottom: 40px;
}

.login-copy {
    margin-bottom: 24px;
}

.login-copy h1 {
    margin: 0;
    font-size: 28px;
    letter-spacing: -.04em;
}

.login-copy p {
    margin: 9px 0 0;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.6;
}

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

.placeholder-card {
    min-height: 180px;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
}

.placeholder-card h3 {
    margin: 0;
    font-size: 13px;
}

.placeholder-card p {
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 10px;
    line-height: 1.55;
}

.quick-create-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.quick-create-option {
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: var(--surface-2);
    color: var(--text-soft);
    cursor: pointer;
    text-align: left;
}

.quick-create-option:hover {
    border-color: var(--border-strong);
    background: var(--surface-hover);
    color: var(--text);
}

.quick-create-option span:first-child {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
}

.quick-create-option strong,
.quick-create-option small {
    display: block;
}

.quick-create-option strong {
    font-size: 11px;
}

.quick-create-option small {
    margin-top: 4px;
    color: var(--muted);
    font-size: 9px;
}

.document-row {
    grid-template-columns: 38px minmax(0, 1fr) auto;
}

.mobile-only {
    display: none;
}

@media (max-width: 1120px) {
    .metric-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 840px) {
    :root {
        --topbar-height: 60px;
    }

    .mobile-only {
        display: grid;
    }

    .app-shell {
        display: block;
    }

    .sidebar {
        width: min(290px, calc(100vw - 48px));
        transform: translateX(-102%);
        transition: transform .2s ease;
        box-shadow: var(--shadow);
    }

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

    .workspace {
        min-width: 0;
    }

    .topbar {
        padding: 0 14px;
    }

    .command-trigger {
        width: 42px;
        padding: 0;
        justify-content: center;
    }

    .command-trigger span:nth-child(2),
    .command-trigger kbd {
        display: none;
    }

    .main-content {
        padding: 22px 16px 36px;
    }

    .page-head {
        display: grid;
    }

    .toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .toolbar-group {
        width: 100%;
    }

    .search-field {
        min-width: 0;
        flex: 1;
    }
}

@media (max-width: 620px) {
    .metric-grid,
    .placeholder-grid,
    .form-grid,
    .info-grid,
    .quick-create-grid {
        grid-template-columns: 1fr;
    }

    .topbar-actions .icon-button:nth-child(2) {
        display: none;
    }

    .topbar-actions .button {
        padding: 0 11px;
    }

    .page-head h1 {
        font-size: 24px;
    }

    .toolbar-group {
        flex-wrap: wrap;
    }

    .search-field {
        width: 100%;
        flex-basis: 100%;
    }

    .modal {
        width: 100vw;
        max-height: 94vh;
        top: auto;
        bottom: 0;
        left: 0;
        border-right: 0;
        border-bottom: 0;
        border-left: 0;
        border-radius: 14px 14px 0 0;
        transform: none;
    }

    .drawer {
        width: 100vw;
    }

    .client-hero {
        display: grid;
    }

    .client-hero-actions {
        width: 100%;
    }

    .client-hero-actions .button {
        flex: 1;
    }

    .deadline-row {
        grid-template-columns: 46px minmax(0, 1fr);
    }

    .deadline-row .row-meta {
        grid-column: 2;
        justify-content: flex-start;
    }
}

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

/* CareFlow V3 – ERV / Outlook Integration */
.integration-banner {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
    margin: 0 0 18px;
    padding: 15px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
}

.integration-banner.is-ready {
    border-color: color-mix(in srgb, var(--success) 42%, var(--border));
    background: linear-gradient(90deg, var(--success-soft), var(--surface) 34%);
}

.integration-banner.is-warning {
    border-color: color-mix(in srgb, var(--warning) 48%, var(--border));
    background: linear-gradient(90deg, var(--warning-soft), var(--surface) 34%);
}

.integration-banner-icon {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border: 1px solid var(--border-strong);
    border-radius: 9px;
    background: var(--surface-2);
    font-size: 20px;
    font-weight: 700;
}

.integration-banner > div:nth-child(2) {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.integration-banner strong {
    font-size: 14px;
}

.integration-banner span {
    color: var(--muted);
    font-size: 13px;
}

.content-grid--wide {
    grid-template-columns: minmax(0, 1.55fr) minmax(300px, .65fr);
}

.ebo-list {
    display: grid;
}

.ebo-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    min-width: 0;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
}

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

.ebo-row:hover {
    background: var(--surface-hover);
}

.ebo-row-main {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr) auto;
    align-items: center;
    gap: 13px;
    min-width: 0;
    padding: 0;
    border: 0;
    background: transparent;
    text-align: left;
    cursor: pointer;
}

.ebo-channel {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border: 1px solid var(--border-strong);
    border-radius: 8px;
    background: var(--surface-2);
    color: var(--accent);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .04em;
}

.ebo-row-facts {
    display: grid;
    justify-items: end;
    gap: 4px;
    min-width: 126px;
}

.ebo-row-facts small {
    color: var(--muted);
    font-size: 11px;
}

.ebo-row-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 7px;
}

.row-error {
    color: var(--danger) !important;
}

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

.document-row--compact {
    grid-template-columns: 44px minmax(0, 1fr);
}

.document-row--compact .row-meta {
    grid-column: 2;
    align-items: flex-start;
    justify-content: flex-start;
}

.ebo-form {
    gap: 16px;
}

.form-section {
    display: grid;
    gap: 14px;
    padding: 17px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface-2);
}

.form-section-head {
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr);
    align-items: start;
    gap: 11px;
}

.form-section-head > span {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 7px;
    background: var(--accent-soft);
    color: var(--accent);
    font-weight: 800;
    font-size: 12px;
}

.form-section-head > div {
    display: grid;
    gap: 3px;
}

.form-section-head strong {
    font-size: 14px;
}

.form-section-head small,
.form-hint {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.5;
}

.recipient-preview {
    display: grid;
    gap: 3px;
    padding: 12px 13px;
    border-left: 3px solid var(--accent);
    background: var(--surface);
}

.recipient-preview span,
.recipient-preview small {
    color: var(--muted);
    font-size: 11px;
}

.check-field {
    display: flex;
    align-items: center;
    gap: 9px;
    color: var(--text-soft);
    font-size: 13px;
    cursor: pointer;
}

.check-field input {
    width: 16px;
    height: 16px;
    accent-color: var(--accent);
}

.attachment-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.attachment-toolbar input {
    min-width: 0;
    flex: 1;
    height: 38px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    color: var(--text);
    padding: 0 11px;
}

.attachment-toolbar span {
    color: var(--muted);
    font-size: 12px;
    white-space: nowrap;
}

.attachment-picker-list {
    display: grid;
    gap: 8px;
    max-height: 420px;
    overflow: auto;
    padding-right: 3px;
}

.attachment-picker {
    display: grid;
    gap: 11px;
    padding: 11px;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: var(--surface);
}

.attachment-picker.is-selected {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px var(--accent-soft);
}

.attachment-check {
    display: grid;
    grid-template-columns: 18px 44px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.attachment-check input {
    width: 16px;
    height: 16px;
    accent-color: var(--accent);
}

.attachment-check > span:last-child {
    display: grid;
    gap: 3px;
    min-width: 0;
}

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

.attachment-check strong {
    font-size: 13px;
}

.attachment-check small {
    color: var(--muted);
    font-size: 11px;
}

.attachment-meta {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    padding: 10px 0 0 28px;
    border-top: 1px solid var(--border);
}

.field--compact {
    gap: 5px;
}

.field--compact span {
    font-size: 11px;
}

.field--compact select {
    min-height: 36px;
}

.form-actions--sticky {
    position: sticky;
    bottom: -24px;
    z-index: 2;
    margin: 0 -24px -24px;
    padding: 15px 24px;
    border-top: 1px solid var(--border);
    background: color-mix(in srgb, var(--surface) 94%, transparent);
    backdrop-filter: blur(12px);
}

.integration-choice-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.integration-choice {
    position: relative;
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr);
    align-items: start;
    gap: 10px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface-2);
    cursor: pointer;
}

.integration-choice:has(input:checked) {
    border-color: var(--accent);
    background: var(--accent-soft);
}

.integration-choice input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.integration-choice-dot {
    width: 16px;
    height: 16px;
    margin-top: 2px;
    border: 2px solid var(--border-strong);
    border-radius: 50%;
}

.integration-choice:has(input:checked) .integration-choice-dot {
    border: 5px solid var(--accent);
    background: var(--surface);
}

.integration-choice > span:last-child {
    display: grid;
    gap: 5px;
}

.integration-choice strong {
    font-size: 13px;
}

.integration-choice small {
    color: var(--muted);
    font-size: 11px;
    line-height: 1.45;
}

.settings-block {
    display: grid;
    gap: 13px;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface-2);
}

.settings-block-head {
    display: grid;
    gap: 3px;
}

.settings-block-head strong {
    font-size: 14px;
}

.settings-block-head span {
    color: var(--muted);
    font-size: 12px;
}

.inline-actions,
.connection-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.inline-actions small {
    color: var(--muted);
}

.connection-card {
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
}

.connection-card.is-connected {
    border-color: color-mix(in srgb, var(--success) 50%, var(--border));
}

.connection-card > div {
    display: grid;
    gap: 3px;
}

.connection-card span {
    color: var(--muted);
    font-size: 12px;
}

.ebo-detail-hero {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--border);
}

.ebo-detail-hero h3 {
    margin: 4px 0;
    font-size: 20px;
}

.ebo-detail-hero p {
    margin: 0;
    color: var(--muted);
}

.drawer-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

code {
    padding: 2px 5px;
    border: 1px solid var(--border);
    border-radius: 5px;
    background: var(--surface);
    color: var(--text-soft);
    font-size: .92em;
}

@media (max-width: 1080px) {
    .content-grid--wide {
        grid-template-columns: 1fr;
    }

    .panel--span-2 {
        grid-column: auto;
    }

    .ebo-row {
        grid-template-columns: 1fr;
    }

    .ebo-row-actions {
        padding-left: 61px;
        justify-content: flex-start;
        flex-wrap: wrap;
    }
}

@media (max-width: 760px) {
    .integration-banner {
        grid-template-columns: 42px minmax(0, 1fr);
    }

    .integration-banner .button {
        grid-column: 2;
        justify-self: start;
    }

    .ebo-row-main {
        grid-template-columns: 44px minmax(0, 1fr);
    }

    .ebo-row-facts {
        grid-column: 2;
        justify-items: start;
        min-width: 0;
    }

    .ebo-row-actions {
        padding-left: 57px;
    }

    .attachment-meta,
    .integration-choice-grid {
        grid-template-columns: 1fr;
    }

    .attachment-meta {
        padding-left: 0;
    }

    .attachment-toolbar,
    .inline-actions,
    .connection-card {
        align-items: stretch;
        flex-direction: column;
    }
}

.modal:has(.ebo-form),
.modal:has(#integration-form) {
    width: min(1040px, calc(100vw - 32px));
}

/* CareFlow V4 ----------------------------------------------------------- */
.notification-button{position:relative}.notification-count{position:absolute;right:-4px;top:-5px;min-width:18px;height:18px;padding:0 5px;border-radius:9px;background:var(--danger,#dc5f65);color:#fff;font-size:10px;font-weight:800;display:grid;place-items:center}.notification-dot[hidden],.notification-count[hidden]{display:none!important}
.document-workspace{display:grid;grid-template-columns:minmax(360px,.9fr) minmax(420px,1.1fr);gap:16px;min-height:620px}.document-browser{min-height:620px}.document-filter{padding:12px 16px;border-bottom:1px solid var(--border)}.document-filter input{width:100%;border:1px solid var(--border);background:var(--surface-2);color:var(--text);border-radius:8px;padding:10px 12px}.document-row--button{width:100%;border:0;border-bottom:1px solid var(--border);background:transparent;color:inherit;text-align:left;cursor:pointer}.document-row--button:hover{background:var(--surface-2)}.document-preview-empty{display:grid;place-items:center}.preview-placeholder{display:grid;place-items:center;text-align:center;min-height:260px;padding:32px;color:var(--muted)}.preview-placeholder>span{font-size:36px;margin-bottom:12px}.document-detail-head{display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:14px;align-items:center;margin-bottom:16px}.file-icon--large{width:58px;height:58px;border-radius:12px;font-size:14px}.document-preview{height:480px;border:1px solid var(--border);border-radius:10px;overflow:hidden;background:#fff;margin-bottom:18px}.document-preview iframe{width:100%;height:100%;border:0}.version-list{display:grid;gap:8px}.version-row{display:flex;justify-content:space-between;gap:14px;padding:12px 14px;border:1px solid var(--border);border-radius:9px;color:inherit;text-decoration:none;background:var(--surface-2)}.version-row span{font-size:12px;color:var(--muted);text-align:right}
.calendar-summary{display:grid;grid-template-columns:2fr 1fr 1fr;gap:12px;margin-bottom:18px}.calendar-summary article{border:1px solid var(--border);background:var(--surface);border-radius:10px;padding:16px;display:flex;align-items:flex-end;justify-content:space-between}.calendar-summary span{font-size:12px;color:var(--muted)}.calendar-summary strong{font-size:22px}.agenda-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.agenda-day{border:1px solid var(--border);background:var(--surface);border-radius:11px;overflow:hidden}.agenda-day>header{display:flex;align-items:center;justify-content:space-between;padding:12px 14px;border-bottom:1px solid var(--border);background:var(--surface-2)}.agenda-day>header span{text-transform:uppercase;letter-spacing:.08em;font-size:10px;color:var(--muted)}.agenda-entry{display:grid;grid-template-columns:62px minmax(0,1fr) auto;gap:10px;align-items:center;padding:12px 14px;border-bottom:1px solid var(--border)}.agenda-entry:last-child{border-bottom:0}.agenda-entry--deadline{box-shadow:inset 3px 0 0 var(--warning)}.agenda-time{font-size:11px;font-weight:700;color:var(--muted)}.agenda-entry div{display:grid;gap:3px}.agenda-entry small{color:var(--muted)}
.settings-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.settings-card{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:16px;border:1px solid var(--border);background:var(--surface);border-radius:11px;padding:18px}.settings-card h2{font-size:16px;margin:0 0 4px}.settings-card p{margin:0;color:var(--muted);font-size:13px;line-height:1.5}.settings-icon{width:44px;height:44px;border:1px solid var(--border);border-radius:10px;display:grid;place-items:center;background:var(--surface-2);font-size:18px}
.team-list,.compact-list,.inbox-worklist{display:grid}.team-row,.inbox-item{display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:12px;align-items:center;padding:14px 16px;border-bottom:1px solid var(--border)}.team-row:last-child,.inbox-item:last-child{border-bottom:0}.compact-list>div{display:grid;gap:4px;padding:12px 16px;border-bottom:1px solid var(--border)}.compact-list>div:last-child{border-bottom:0}.compact-list span{font-size:12px;color:var(--muted);line-height:1.5}.inbox-channel{font-size:10px;font-weight:800;letter-spacing:.08em;padding:6px 8px;border-radius:6px;background:var(--accent-soft);color:var(--accent)}
.permission-matrix{display:grid;gap:14px;max-height:55vh;overflow:auto;padding-right:4px}.permission-matrix fieldset,.scope-fieldset{border:1px solid var(--border);border-radius:10px;padding:12px}.permission-matrix legend,.scope-fieldset legend{font-weight:800;font-size:12px;padding:0 6px}.permission-matrix label{display:flex;gap:10px;padding:9px 4px}.permission-matrix label+label{border-top:1px solid var(--border)}.permission-matrix label span{display:grid;gap:2px}.permission-matrix small{font-size:11px;color:var(--muted)}.check-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.check-line{display:flex;align-items:flex-start;gap:9px;font-size:13px}.check-line input{margin-top:2px}.form-note,.variable-hint{font-size:12px;color:var(--muted);line-height:1.55}.variable-hint code{display:inline-block;border:1px solid var(--border);background:var(--surface-2);padding:3px 5px;border-radius:5px;margin:2px}
.rich-editor{min-height:270px;border:1px solid var(--border);background:var(--surface-2);border-radius:9px;padding:16px;line-height:1.65;outline:none}.rich-editor:focus{border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-soft)}.rich-editor--large{min-height:430px}.letter-read-view{border:1px solid var(--border);background:var(--surface-2);border-radius:10px;padding:22px;line-height:1.7}.letter-read-view p{margin:0 0 14px}
.workspace-tabs{display:flex;gap:4px;overflow:auto;border-bottom:1px solid var(--border);margin:0 -20px 18px;padding:0 20px}.workspace-tabs .tab-button{white-space:nowrap}.workspace-tabs .tab-button span{font-size:10px;margin-left:4px;color:var(--muted)}.client-tab-panel{display:grid;gap:16px}.case-warning{border:1px solid color-mix(in srgb,var(--danger) 35%,var(--border));background:color-mix(in srgb,var(--danger) 8%,var(--surface));border-radius:10px;padding:13px 15px;margin-bottom:16px}.case-warning strong{color:var(--danger)}.case-warning p{margin:5px 0 0;font-size:13px}.case-card-list{display:grid;gap:10px}.case-card{border:1px solid var(--border);background:var(--surface-2);border-radius:10px;padding:14px;display:grid;gap:10px}.case-card>div,.case-card-title{display:flex;justify-content:space-between;gap:12px}.case-card>div>div,.case-card-title>div{display:grid;gap:3px}.case-card span,.case-card p{font-size:12px;color:var(--muted);margin:0}.case-card dl{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:0}.case-card dl div{display:grid;gap:2px}.case-card dt{font-size:10px;text-transform:uppercase;color:var(--muted)}.case-card dd{margin:0;font-size:12px}.contact-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.contact-card{border:1px solid var(--border);background:var(--surface-2);border-radius:10px;padding:13px}.contact-card-head{display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:10px;align-items:center}.contact-card-head div{display:grid;gap:2px}.contact-card-head span,.contact-card p,.contact-lines{font-size:11px;color:var(--muted)}.contact-lines{display:grid;gap:3px;margin-top:8px}
.deadline-table{display:grid}.deadline-card{display:grid;grid-template-columns:minmax(0,1fr) 210px auto;gap:16px;align-items:center;padding:14px 16px;border-bottom:1px solid var(--border)}.deadline-card.is-overdue{background:color-mix(in srgb,var(--danger) 6%,transparent);box-shadow:inset 3px 0 0 var(--danger)}.deadline-card-main{display:grid;grid-template-columns:auto minmax(0,1fr);gap:11px;align-items:center}.deadline-date{display:grid;gap:2px}.deadline-date span,.deadline-date small{font-size:10px;color:var(--muted)}.deadline-date strong{font-size:13px}.deadline-actions{display:flex;align-items:center;gap:7px;flex-wrap:wrap;justify-content:flex-end}
.notification-actions{display:flex;justify-content:flex-end;margin-bottom:10px}.notification-list{display:grid}.notification-item{display:grid;grid-template-columns:34px minmax(0,1fr);gap:10px;padding:13px 4px;border-bottom:1px solid var(--border);text-decoration:none;color:inherit}.notification-item.is-unread{background:var(--accent-soft);margin:0 -12px;padding-left:12px;padding-right:12px}.notification-item>span{width:30px;height:30px;border:1px solid var(--border);border-radius:8px;display:grid;place-items:center}.notification-item p{margin:4px 0;font-size:12px;color:var(--muted)}.notification-item small{font-size:10px;color:var(--muted)}
@media(max-width:1050px){.document-workspace{grid-template-columns:1fr}.document-preview-empty{display:none}.agenda-grid,.settings-grid{grid-template-columns:1fr}.deadline-card{grid-template-columns:1fr}.deadline-actions{justify-content:flex-start}.calendar-summary{grid-template-columns:1fr 1fr 1fr}}
@media(max-width:700px){.calendar-summary,.contact-grid,.check-grid{grid-template-columns:1fr}.agenda-entry{grid-template-columns:52px minmax(0,1fr)}.agenda-entry>.badge{grid-column:2}.settings-card{grid-template-columns:auto minmax(0,1fr)}.settings-card>.button,.settings-card>.badge{grid-column:1/-1}.team-row,.inbox-item{grid-template-columns:auto minmax(0,1fr)}.team-row .row-meta,.inbox-item .row-meta{grid-column:2;justify-content:flex-start}.document-detail-head{grid-template-columns:auto minmax(0,1fr)}.document-detail-head>.button{grid-column:1/-1}.case-card dl{grid-template-columns:1fr}}

/* CareFlow V5: Finanzen, Rechnungslegung, Vergütung --------------------- */
.metric-grid--finance{grid-template-columns:repeat(4,minmax(0,1fr))}.finance-tabs{display:flex;gap:4px;overflow:auto;border-bottom:1px solid var(--border);margin:4px 0 18px}.finance-tabs .tab-button{white-space:nowrap}.finance-tabs .tab-button span{font-size:10px;color:var(--muted);margin-left:4px}.finance-tab-panel{display:grid;gap:16px}.finance-account-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1px;background:var(--border)}.finance-account-card{display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:13px;align-items:center;border:0;background:var(--surface);color:inherit;padding:17px 18px;text-align:left;cursor:pointer}.finance-account-card:hover{background:var(--surface-2)}.finance-account-icon{width:44px;height:44px;border:1px solid var(--border);background:var(--surface-2);border-radius:10px;display:grid;place-items:center;font-size:9px;font-weight:900;letter-spacing:.08em}.finance-account-copy{display:grid;gap:3px;min-width:0}.finance-account-copy strong{font-size:14px}.finance-account-copy small,.finance-account-copy span{font-size:11px;color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.finance-account-balance{display:grid;gap:4px;text-align:right}.finance-account-balance strong{font-size:16px}.finance-account-balance small{font-size:10px;color:var(--muted)}.finance-table td small,.data-table td small{display:block;margin-top:3px;color:var(--muted);font-size:10px}.money-cell{text-align:right;font-weight:800;white-space:nowrap}.money-cell.is-negative{color:var(--danger)}.money-cell.is-positive{color:var(--success)}.row-actions{display:flex;gap:5px;justify-content:flex-end}.icon-button--small{width:30px;height:30px;font-size:12px}.finance-account-hero{display:flex;justify-content:space-between;align-items:flex-end;gap:18px;border:1px solid var(--border);background:var(--surface-2);border-radius:12px;padding:18px;margin-bottom:18px}.finance-account-hero>div:first-child{display:grid;gap:4px}.finance-account-hero strong{font-size:30px;line-height:1}.finance-account-hero p{margin:4px 0 0;color:var(--muted);font-size:12px}.compact-list>div{position:relative}.compact-list>div b{position:absolute;right:16px;top:50%;transform:translateY(-50%);font-size:12px}.compact-list>div:has(b){padding-right:150px}.notice-card{border:1px solid var(--border);background:var(--surface-2);border-radius:11px;padding:15px 17px;margin:0 0 16px}.notice-card strong{font-size:13px}.notice-card p{margin:5px 0 0;font-size:12px;color:var(--muted);line-height:1.55}.notice-card--compact{margin:0}.notice-card--success{border-color:color-mix(in srgb,var(--success) 38%,var(--border));background:color-mix(in srgb,var(--success) 8%,var(--surface))}.remuneration-balance{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin:16px 0}.remuneration-balance>div{border:1px solid var(--border);background:var(--surface-2);border-radius:10px;padding:15px}.remuneration-balance span{display:block;color:var(--muted);font-size:10px;text-transform:uppercase;letter-spacing:.06em}.remuneration-balance strong{display:block;font-size:20px;margin-top:6px}.remuneration-balance .is-open{border-color:color-mix(in srgb,var(--warning) 40%,var(--border));background:color-mix(in srgb,var(--warning) 8%,var(--surface))}.dropzone{display:grid;place-items:center;text-align:center;gap:6px;border:1px dashed var(--border);background:var(--surface-2);border-radius:10px;padding:26px;cursor:pointer}.dropzone input{max-width:100%}.dropzone span{font-weight:800}.dropzone small{color:var(--muted);line-height:1.5}.data-table tr[data-open-accounting],.data-table tr[data-open-remuneration]{cursor:pointer}.data-table tr[data-open-accounting]:hover,.data-table tr[data-open-remuneration]:hover{background:var(--surface-2)}
@media(max-width:1100px){.metric-grid--finance{grid-template-columns:repeat(2,minmax(0,1fr))}.finance-account-grid{grid-template-columns:1fr}}
@media(max-width:700px){.metric-grid--finance,.remuneration-balance{grid-template-columns:1fr}.finance-account-card{grid-template-columns:auto minmax(0,1fr)}.finance-account-balance{grid-column:2;text-align:left}.finance-account-hero{align-items:stretch;flex-direction:column}.compact-list>div:has(b){padding-right:16px}.compact-list>div b{position:static;transform:none;margin-top:4px}}


/* Öffentliche CareFlow-Webseite */
.public-site{min-height:100vh;background:#f5f2ec;color:#18201d;overflow-x:hidden}
.site-header{height:82px;max-width:1280px;margin:0 auto;padding:0 34px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid rgba(24,32,29,.12)}
.site-brand{display:inline-flex;align-items:center;gap:12px;color:#18201d}
.site-brand-mark{width:38px;height:38px;display:grid;place-items:center;background:#173f35;color:#fff;border-radius:4px;font-size:13px;font-weight:800;letter-spacing:.04em}
.site-brand>span:last-child{display:grid;gap:1px}.site-brand strong{font-size:15px;letter-spacing:.01em}.site-brand small{font-size:11px;color:#68716c}
.site-nav{display:flex;align-items:center;gap:30px}.site-nav a,.site-nav button,.site-footer button{border:0;background:none;color:#37413d;font:600 13px var(--font);cursor:pointer}.site-nav a:hover,.site-nav button:hover,.site-footer button:hover{color:#173f35}
.site-login-link{padding:11px 18px!important;border:1px solid rgba(23,63,53,.35)!important;border-radius:4px!important}
.site-hero{max-width:1280px;min-height:680px;margin:0 auto;padding:84px 34px 92px;display:grid;grid-template-columns:minmax(0,1fr) minmax(460px,.9fr);align-items:center;gap:76px}
.site-kicker{display:block;margin-bottom:20px;color:#8b6d45;font-size:11px;font-weight:800;letter-spacing:.17em;text-transform:uppercase}
.site-hero h1,.site-section h2,.site-workflow h2,.site-security h2{margin:0;font-family:Georgia,"Times New Roman",serif;font-weight:500;letter-spacing:-.045em;color:#18201d}
.site-hero h1{font-size:clamp(50px,6vw,80px);line-height:.98}.site-hero-copy>p{max-width:640px;margin:28px 0 0;color:#56605b;font-size:17px;line-height:1.75}
.site-hero-actions{margin-top:36px;display:flex;gap:12px;flex-wrap:wrap}.site-button{min-height:48px;padding:0 22px;display:inline-flex;align-items:center;justify-content:center;border-radius:4px;font-size:13px;font-weight:750;cursor:pointer}.site-button--primary{border:1px solid #173f35;background:#173f35;color:#fff}.site-button--primary:hover{background:#0e3027}.site-button--secondary{border:1px solid rgba(24,32,29,.22);color:#26312c;background:transparent}
.site-trust-row{margin-top:42px;padding-top:22px;border-top:1px solid rgba(24,32,29,.13);display:flex;gap:28px;flex-wrap:wrap;color:#6b746f;font-size:12px}.site-trust-row span:before{content:"";width:6px;height:6px;margin-right:9px;display:inline-block;background:#8b6d45;border-radius:50%;vertical-align:1px}
.site-hero-visual{position:relative}.site-hero-visual:before{content:"";position:absolute;inset:-34px 52px 34px -28px;background:#ded7ca;z-index:0}.site-preview-window{position:relative;z-index:1;background:#fff;border:1px solid rgba(24,32,29,.18);box-shadow:0 30px 70px rgba(42,47,44,.17)}
.site-preview-top{height:42px;padding:0 14px;display:flex;align-items:center;gap:6px;border-bottom:1px solid #e7e7e3;background:#fafaf8}.site-preview-top>span{width:7px;height:7px;border-radius:50%;background:#b7bcb8}.site-preview-top strong{margin-left:9px;font-size:10px;color:#77807b;font-weight:700}
.site-preview-body{min-height:410px;display:grid;grid-template-columns:58px 1fr}.site-preview-body aside{padding-top:18px;display:flex;align-items:center;flex-direction:column;gap:16px;background:#173f35}.site-preview-body aside b{width:28px;height:28px;display:grid;place-items:center;border:1px solid rgba(255,255,255,.3);color:#fff;font-size:9px}.site-preview-body aside i{width:16px;height:2px;background:rgba(255,255,255,.3)}
.site-preview-content{padding:30px}.site-preview-heading{display:grid;gap:6px}.site-preview-heading span{font-size:10px;color:#86908a}.site-preview-heading strong{font-family:Georgia,serif;font-size:24px;font-weight:500;color:#23302b}.site-preview-stats{margin-top:24px;display:grid;grid-template-columns:repeat(3,1fr);gap:10px}.site-preview-stats article{min-height:88px;padding:14px;border:1px solid #e2e5e2;background:#fafbf9}.site-preview-stats small{display:block;min-height:30px;color:#7b857f;font-size:9px;line-height:1.4}.site-preview-stats b{display:block;margin-top:4px;color:#26312c;font:500 24px Georgia,serif}
.site-preview-list{margin-top:18px;border-top:1px solid #e2e5e2}.site-preview-list>div{min-height:64px;display:grid;grid-template-columns:10px 1fr auto;align-items:center;gap:12px;border-bottom:1px solid #e9ebe8}.site-preview-list p{margin:0;display:grid;gap:4px}.site-preview-list b{font-size:10px;color:#303a35}.site-preview-list small{font-size:9px;color:#8a928e}.site-preview-list em{font-style:normal;font-size:8px;text-transform:uppercase;letter-spacing:.08em;color:#6f7873}.dot{width:6px;height:6px;border-radius:50%}.dot--red{background:#ad5d54}.dot--gold{background:#a8834c}.dot--green{background:#5c8a72}
.site-section{padding:110px max(34px,calc((100vw - 1212px)/2));background:#fff}.site-section-head{max-width:740px}.site-section h2,.site-workflow h2,.site-security h2{font-size:clamp(38px,4vw,56px);line-height:1.08}.site-section-head>p{max-width:650px;margin:22px 0 0;color:#65706a;font-size:15px;line-height:1.75}.site-feature-grid{margin-top:64px;display:grid;grid-template-columns:repeat(4,1fr);border-top:1px solid #dfe2df;border-left:1px solid #dfe2df}.site-feature-grid article{min-height:260px;padding:28px;border-right:1px solid #dfe2df;border-bottom:1px solid #dfe2df}.site-feature-grid article>span{color:#9b7b50;font:600 11px var(--font)}.site-feature-grid h3{margin:58px 0 13px;font:500 22px Georgia,serif;color:#24302b}.site-feature-grid p{margin:0;color:#68736d;font-size:13px;line-height:1.65}
.site-workflow{padding:110px max(34px,calc((100vw - 1212px)/2));display:grid;grid-template-columns:.9fr 1.1fr;gap:100px;background:#173f35}.site-workflow .site-kicker{color:#d5b98e}.site-workflow h2{color:#fff}.site-workflow ol{margin:0;padding:0;list-style:none;border-top:1px solid rgba(255,255,255,.18)}.site-workflow li{min-height:105px;display:grid;grid-template-columns:46px 1fr;gap:20px;align-items:center;border-bottom:1px solid rgba(255,255,255,.18)}.site-workflow li>span{width:30px;height:30px;display:grid;place-items:center;border:1px solid rgba(255,255,255,.35);color:#d8c09b;font-size:11px}.site-workflow li div{display:grid;grid-template-columns:190px 1fr;gap:25px;align-items:center}.site-workflow strong{color:#fff;font-size:14px}.site-workflow p{margin:0;color:#afc0b9;font-size:13px;line-height:1.55}
.site-security{padding:110px max(34px,calc((100vw - 1212px)/2));display:grid;grid-template-columns:1fr 1fr;gap:100px;background:#eee9df}.site-security-copy p{max-width:570px;color:#5f6964;font-size:15px;line-height:1.75}.site-security-points{border-top:1px solid rgba(24,32,29,.17)}.site-security-points>div{padding:24px 0;display:grid;gap:7px;border-bottom:1px solid rgba(24,32,29,.17)}.site-security-points strong{font:500 18px Georgia,serif;color:#27322d}.site-security-points span{color:#6c756f;font-size:13px}
.site-footer{min-height:120px;padding:30px max(34px,calc((100vw - 1212px)/2));display:flex;align-items:center;justify-content:space-between;gap:30px;background:#111714;color:#fff}.site-footer .site-brand{color:#fff}.site-footer .site-brand-mark{background:#f1ede4;color:#173f35}.site-footer .site-brand small{color:#9ba59f}.site-footer p{color:#929c96;font-size:12px}.site-footer button{color:#fff;border-bottom:1px solid rgba(255,255,255,.4);padding:8px 0}
.login-backdrop{position:fixed;inset:0;z-index:1000;padding:24px;display:grid;place-items:center;background:rgba(11,15,13,.72);backdrop-filter:blur(8px)}.login-backdrop[hidden]{display:none}.login-backdrop .login-card{position:relative;width:min(440px,100%);padding:34px;background:#15191f;border:1px solid #3a424e;box-shadow:0 30px 80px rgba(0,0,0,.45)}.login-close{position:absolute;right:16px;top:14px;border:0;background:transparent;color:#9aa3af;font-size:25px;cursor:pointer}.login-backdrop .login-copy h2{margin:8px 0 8px;font-size:28px;color:#fff}.login-backdrop .login-copy p{color:#9ba5b4}
@media(max-width:1000px){.site-hero{grid-template-columns:1fr;padding-top:62px}.site-hero-visual{max-width:720px}.site-feature-grid{grid-template-columns:repeat(2,1fr)}.site-workflow,.site-security{grid-template-columns:1fr;gap:54px}.site-workflow li div{grid-template-columns:180px 1fr}}
@media(max-width:720px){.site-header{height:70px;padding:0 20px}.site-nav a{display:none}.site-nav{gap:10px}.site-login-link{padding:9px 13px!important}.site-hero{padding:56px 20px 72px;gap:55px}.site-hero h1{font-size:46px}.site-hero-copy>p{font-size:15px}.site-hero-visual:before{inset:-18px 20px 24px -10px}.site-preview-content{padding:18px}.site-preview-stats{grid-template-columns:1fr}.site-preview-stats article{min-height:64px}.site-preview-body{grid-template-columns:44px}.site-section,.site-workflow,.site-security{padding:76px 20px}.site-feature-grid{grid-template-columns:1fr}.site-feature-grid article{min-height:220px}.site-workflow li{padding:18px 0}.site-workflow li div{grid-template-columns:1fr;gap:7px}.site-footer{padding:28px 20px;align-items:flex-start;flex-direction:column}.site-footer p{margin:0}}


/* ==========================================================================
   CAREFLOW ORIGINAL PUBLIC EXPERIENCE — VERSION 7
   Eigenständige visuelle Sprache: Orbit-System, Fallfluss und Aktenlogik.
   ========================================================================== */

.cf-public {
    --cf-ink: #14201c;
    --cf-ink-soft: #42514b;
    --cf-paper: #f4f1e9;
    --cf-paper-2: #ece8dd;
    --cf-line: rgba(20, 32, 28, .16);
    --cf-green: #155c4b;
    --cf-green-deep: #0b3c33;
    --cf-coral: #e76f51;
    --cf-lime: #c9dc72;
    min-height: 100vh;
    background:
        linear-gradient(rgba(20,32,28,.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(20,32,28,.035) 1px, transparent 1px),
        var(--cf-paper);
    background-size: 32px 32px;
    color: var(--cf-ink);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.cf-public-header {
    width: min(1380px, calc(100% - 48px));
    height: 92px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--cf-line);
}

.cf-wordmark {
    display: inline-flex;
    align-items: center;
    gap: 13px;
    color: inherit;
    text-decoration: none;
}

.cf-wordmark > span:last-child {
    display: grid;
    line-height: 1.05;
    gap: 5px;
}

.cf-wordmark strong {
    font-size: 15px;
    letter-spacing: -.02em;
}

.cf-wordmark small {
    color: var(--cf-ink-soft);
    font-size: 10px;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.cf-wordmark-symbol {
    position: relative;
    width: 42px;
    height: 42px;
    display: inline-grid;
    place-items: center;
    border: 1px solid var(--cf-ink);
    border-radius: 50%;
}

.cf-wordmark-symbol i {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--cf-ink);
    border-radius: 50%;
}

.cf-wordmark-symbol i:nth-child(1) { transform: translate(-8px, 5px); }
.cf-wordmark-symbol i:nth-child(2) { transform: translate(0, -8px); }
.cf-wordmark-symbol i:nth-child(3) { transform: translate(8px, 5px); }

.cf-public-nav {
    display: flex;
    align-items: center;
    gap: 30px;
}

.cf-public-nav a,
.cf-public-nav button {
    color: var(--cf-ink);
    font: inherit;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
}

.cf-public-nav button {
    min-height: 42px;
    padding: 0 18px;
    border: 1px solid var(--cf-ink);
    background: transparent;
    cursor: pointer;
}

.cf-intro {
    width: min(1380px, calc(100% - 48px));
    min-height: 720px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, .92fr) minmax(520px, 1.08fr);
    gap: 70px;
    align-items: center;
    border-bottom: 1px solid var(--cf-line);
}

.cf-intro-label,
.cf-section-number {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--cf-green);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .16em;
    text-transform: uppercase;
}

.cf-intro-label > span {
    width: 26px;
    height: 2px;
    background: var(--cf-coral);
}

.cf-intro h1 {
    max-width: 780px;
    margin: 26px 0 28px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(55px, 6.3vw, 101px);
    font-weight: 400;
    line-height: .91;
    letter-spacing: -.065em;
}

.cf-intro h1 em {
    display: block;
    color: var(--cf-green);
    font-style: normal;
}

.cf-intro-lead {
    max-width: 680px;
    margin: 0;
    color: var(--cf-ink-soft);
    font-size: 17px;
    line-height: 1.8;
}

.cf-intro-actions {
    margin-top: 38px;
    display: flex;
    align-items: center;
    gap: 24px;
}

.cf-primary-action {
    min-height: 56px;
    padding: 0 8px 0 22px;
    display: inline-flex;
    align-items: center;
    gap: 24px;
    border: 0;
    background: var(--cf-green-deep);
    color: #fff;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
}

.cf-primary-action b {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    background: var(--cf-lime);
    color: var(--cf-green-deep);
    font-size: 18px;
}

.cf-text-action {
    color: var(--cf-ink);
    font-size: 13px;
    font-weight: 800;
    text-underline-offset: 6px;
}

.cf-status-line {
    margin-top: 42px;
    padding-top: 18px;
    display: flex;
    gap: 26px;
    border-top: 1px solid var(--cf-line);
    color: var(--cf-ink-soft);
    font-size: 11px;
}

.cf-status-line span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.cf-status-line i {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--cf-green);
}

.cf-orbit {
    position: relative;
    min-height: 590px;
    overflow: hidden;
    isolation: isolate;
}

.cf-orbit-grid {
    position: absolute;
    inset: 44px;
    background:
        linear-gradient(rgba(20,32,28,.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(20,32,28,.08) 1px, transparent 1px);
    background-size: 42px 42px;
    border: 1px solid var(--cf-line);
}

.cf-orbit-core {
    position: absolute;
    z-index: 5;
    left: 50%;
    top: 50%;
    width: 164px;
    height: 164px;
    transform: translate(-50%, -50%);
    display: grid;
    place-items: center;
    align-content: center;
    border-radius: 50%;
    background: var(--cf-green-deep);
    color: #fff;
    box-shadow: 0 30px 80px rgba(11,60,51,.24);
}

.cf-orbit-core span {
    font-family: Georgia, serif;
    font-size: 44px;
}

.cf-orbit-core small {
    margin-top: 8px;
    color: rgba(255,255,255,.68);
    font-size: 10px;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.cf-orbit-ring {
    position: absolute;
    left: 50%;
    top: 50%;
    border: 1px solid rgba(21,92,75,.25);
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

.cf-orbit-ring--a { width: 360px; height: 360px; }
.cf-orbit-ring--b { width: 530px; height: 530px; border-style: dashed; }

.cf-orbit-node {
    position: absolute;
    z-index: 6;
    width: 215px;
    min-height: 82px;
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 13px;
    background: rgba(244,241,233,.96);
    border: 1px solid var(--cf-ink);
    box-shadow: 10px 10px 0 rgba(20,32,28,.07);
}

.cf-orbit-node > span {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border-radius: 50%;
    background: var(--cf-coral);
    color: #fff;
    font-size: 10px;
    font-weight: 900;
}

.cf-orbit-node div { display: grid; gap: 4px; }
.cf-orbit-node strong { font-size: 13px; }
.cf-orbit-node small { color: var(--cf-ink-soft); font-size: 10px; }

.cf-orbit-node--one { top: 58px; left: 50%; transform: translateX(-50%); }
.cf-orbit-node--two { right: 12px; top: 50%; transform: translateY(-50%); }
.cf-orbit-node--three { bottom: 44px; left: 50%; transform: translateX(-50%); }
.cf-orbit-node--four { left: 12px; top: 50%; transform: translateY(-50%); }

.cf-system,
.cf-process,
.cf-protection {
    width: min(1380px, calc(100% - 48px));
    margin: 0 auto;
    padding: 112px 0;
    border-bottom: 1px solid var(--cf-line);
}

.cf-system-heading {
    margin-top: 28px;
    display: grid;
    grid-template-columns: 1.3fr .7fr;
    gap: 80px;
    align-items: end;
}

.cf-system-heading h2,
.cf-process h2,
.cf-protection h2 {
    margin: 0;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(42px, 5vw, 76px);
    font-weight: 400;
    line-height: 1;
    letter-spacing: -.05em;
}

.cf-system-heading p,
.cf-process-layout > div > p,
.cf-protection-copy p {
    color: var(--cf-ink-soft);
    font-size: 16px;
    line-height: 1.75;
}

.cf-capability-grid {
    margin-top: 70px;
    display: grid;
    grid-template-columns: 1.15fr .85fr .85fr;
    gap: 16px;
}

.cf-capability {
    min-height: 330px;
    padding: 28px;
    display: flex;
    flex-direction: column;
    background: rgba(255,255,255,.43);
    border: 1px solid var(--cf-line);
}

.cf-capability--wide { grid-row: span 2; min-height: 676px; }
.cf-capability--dark {
    background: var(--cf-green-deep);
    color: #fff;
}

.cf-capability-head {
    display: flex;
    justify-content: space-between;
    color: var(--cf-green);
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.cf-capability--dark .cf-capability-head { color: var(--cf-lime); }

.cf-capability h3 {
    max-width: 490px;
    margin: auto 0 16px;
    font-family: Georgia, serif;
    font-size: clamp(28px, 2.8vw, 46px);
    font-weight: 400;
    line-height: 1.04;
    letter-spacing: -.04em;
}

.cf-capability p {
    color: var(--cf-ink-soft);
    line-height: 1.7;
}

.cf-capability--dark p { color: rgba(255,255,255,.68); }

.cf-mini-timeline {
    margin-top: 50px;
    display: grid;
    gap: 0;
}

.cf-mini-timeline span {
    min-height: 74px;
    display: flex;
    align-items: center;
    gap: 14px;
    border-top: 1px solid var(--cf-line);
    font-size: 12px;
    font-weight: 800;
}

.cf-mini-timeline i {
    width: 10px;
    height: 10px;
    background: var(--cf-coral);
    border-radius: 50%;
}

.cf-deadline-meter {
    display: grid;
    gap: 18px;
    margin-top: auto;
}

.cf-deadline-meter span {
    position: relative;
    padding-bottom: 10px;
    color: var(--cf-ink-soft);
    font-size: 11px;
    border-bottom: 3px solid var(--cf-paper-2);
}

.cf-deadline-meter span::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -3px;
    width: var(--p);
    height: 3px;
    background: var(--cf-coral);
}

.cf-ledger {
    display: grid;
    margin-top: auto;
}

.cf-ledger span {
    padding: 16px 0;
    display: flex;
    justify-content: space-between;
    border-top: 1px solid var(--cf-line);
}

.cf-ledger i {
    color: var(--cf-ink-soft);
    font-style: normal;
    font-size: 11px;
}

.cf-ledger b { font-size: 13px; }

.cf-audit-stamp {
    margin-top: auto;
    padding: 18px;
    border: 1px solid rgba(201,220,114,.55);
    color: var(--cf-lime);
    text-align: center;
    font: 800 11px/1 monospace;
    letter-spacing: .12em;
}

.cf-process-layout {
    margin-top: 30px;
    display: grid;
    grid-template-columns: .8fr 1.2fr;
    gap: 100px;
}

.cf-process ol {
    margin: 0;
    padding: 0;
    list-style: none;
    border-top: 1px solid var(--cf-line);
}

.cf-process li {
    min-height: 114px;
    display: grid;
    grid-template-columns: 70px 1fr;
    align-items: center;
    border-bottom: 1px solid var(--cf-line);
}

.cf-process li > b {
    color: var(--cf-coral);
    font-size: 13px;
}

.cf-process li span { display: grid; gap: 7px; }
.cf-process li strong { font-family: Georgia, serif; font-size: 28px; font-weight: 400; }
.cf-process li small { color: var(--cf-ink-soft); font-size: 12px; }

.cf-protection {
    display: grid;
    grid-template-columns: 1fr .9fr;
    gap: 90px;
    align-items: center;
}

.cf-protection-copy .cf-section-number { margin-bottom: 26px; }

.cf-protection-panel {
    min-height: 200px;
    padding: 34px;
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 24px;
    background: var(--cf-green-deep);
    color: #fff;
}

.cf-protection-panel > div:nth-child(2) {
    display: grid;
    gap: 7px;
}

.cf-protection-panel small { color: rgba(255,255,255,.58); }
.cf-protection-panel button {
    grid-column: 1 / -1;
    min-height: 48px;
    border: 0;
    background: var(--cf-lime);
    color: var(--cf-green-deep);
    font: inherit;
    font-weight: 900;
    cursor: pointer;
}

.cf-lock-mark {
    width: 52px;
    height: 52px;
    position: relative;
    border: 2px solid var(--cf-lime);
    border-radius: 50%;
}

.cf-lock-mark::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 12px;
    width: 13px;
    height: 11px;
    border: 2px solid var(--cf-lime);
    border-bottom: 0;
    border-radius: 8px 8px 0 0;
    transform: translateX(-50%);
}

.cf-lock-mark::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 24px;
    width: 18px;
    height: 15px;
    background: var(--cf-lime);
    transform: translateX(-50%);
}

.cf-public-footer {
    width: min(1380px, calc(100% - 48px));
    min-height: 150px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr auto auto;
    align-items: center;
    gap: 40px;
    color: var(--cf-ink-soft);
    font-size: 11px;
}

.cf-login-card {
    border-radius: 0 !important;
    border: 1px solid rgba(255,255,255,.18) !important;
    background: #111814 !important;
}

.cf-login-brand {
    display: flex;
    align-items: center;
    gap: 13px;
    margin-bottom: 28px;
    color: #fff;
}

.cf-login-brand > div { display: grid; gap: 4px; }
.cf-login-brand small { color: rgba(255,255,255,.55); }
.cf-login-brand .cf-wordmark-symbol { border-color: var(--cf-lime); }
.cf-login-brand .cf-wordmark-symbol i { background: var(--cf-lime); }

@media (max-width: 1100px) {
    .cf-intro {
        grid-template-columns: 1fr;
        padding: 80px 0;
    }
    .cf-orbit { min-height: 560px; }
    .cf-system-heading,
    .cf-process-layout,
    .cf-protection { grid-template-columns: 1fr; gap: 42px; }
    .cf-capability-grid { grid-template-columns: 1fr 1fr; }
    .cf-capability--wide { grid-column: span 2; grid-row: auto; min-height: 520px; }
}

@media (max-width: 760px) {
    .cf-public-header,
    .cf-intro,
    .cf-system,
    .cf-process,
    .cf-protection,
    .cf-public-footer {
        width: min(100% - 28px, 1380px);
    }
    .cf-public-nav a { display: none; }
    .cf-public-nav { gap: 0; }
    .cf-intro { min-height: auto; gap: 34px; }
    .cf-intro h1 { font-size: clamp(48px, 15vw, 76px); }
    .cf-intro-actions { align-items: flex-start; flex-direction: column; }
    .cf-status-line { flex-direction: column; gap: 12px; }
    .cf-orbit { min-height: 500px; }
    .cf-orbit-grid { inset: 20px 0; }
    .cf-orbit-ring--a { width: 270px; height: 270px; }
    .cf-orbit-ring--b { width: 410px; height: 410px; }
    .cf-orbit-core { width: 128px; height: 128px; }
    .cf-orbit-node { width: 170px; min-height: 67px; padding: 10px; }
    .cf-orbit-node--two { right: 0; }
    .cf-orbit-node--four { left: 0; }
    .cf-capability-grid { grid-template-columns: 1fr; }
    .cf-capability--wide { grid-column: auto; min-height: 520px; }
    .cf-system, .cf-process, .cf-protection { padding: 78px 0; }
    .cf-public-footer { padding: 34px 0; grid-template-columns: 1fr; gap: 18px; }
}



/* CareFlow Phase 1 – professioneller Klientenworkspace */
.client-metric-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin: 0 0 18px;
}
.client-metric {
    min-height: 116px;
    padding: 18px;
    display: grid;
    align-content: space-between;
    border: 1px solid var(--border);
    border-radius: 11px;
    background: linear-gradient(145deg, var(--surface), var(--surface-2));
}
.client-metric > span {
    color: var(--muted);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.client-metric > strong {
    margin: 8px 0 4px;
    color: var(--text);
    font-size: 30px;
    line-height: 1;
    letter-spacing: -.045em;
}
.client-metric > small { color: var(--muted); font-size: 11px; }
.client-metric--critical { border-color: color-mix(in srgb, var(--danger) 30%, var(--border)); }
.client-metric--critical > strong { color: var(--danger); }
.client-metric--review { border-color: color-mix(in srgb, var(--warning) 30%, var(--border)); }
.client-metric--review > strong { color: var(--warning); }
.client-metric--active { border-color: color-mix(in srgb, var(--success) 28%, var(--border)); }
.data-table th { padding-top: 14px; padding-bottom: 14px; font-size: 10px; }
.data-table td { padding-top: 16px; padding-bottom: 16px; font-size: 12px; }
.data-table .table-primary strong { font-size: 12px; color: var(--text); }
.data-table .table-primary span span { font-size: 10px; }
@media (max-width: 1050px) { .client-metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .client-metric-grid { grid-template-columns: 1fr; } .client-metric { min-height: 96px; } }
