@font-face {
    font-family: "WebHat Manrope";
    font-style: normal;
    font-weight: 700 800;
    font-display: optional;
    src: url("../fonts/webhat-manrope-latin.woff2") format("woff2");
}

:root {
    color-scheme: light;
    --bg: #f3f5f4;
    --panel: #ffffff;
    --ink: #101312;
    --muted: #66736d;
    --line: #d9e0dc;
    --accent: #d90f1f;
    --accent-dark: #ad0d19;
    --good: #0f7a4f;
    --good-bg: #e9f8f0;
    --wait: #9a650d;
    --wait-bg: #fff4d8;
    --danger: #b4232e;
    --danger-bg: #fdecee;
    --neutral-bg: #edf1f0;
    --radius: 8px;
    --shadow: 0 18px 44px rgba(16, 19, 18, .08);
    --shadow-soft: 0 10px 24px rgba(16, 19, 18, .06);
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    background: var(--bg);
    overflow-x: hidden;
}

body {
    min-height: 100%;
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: Arial, Helvetica, sans-serif;
    line-height: 1.5;
    overflow-x: hidden;
    text-rendering: optimizeLegibility;
}

html.webhat-mobile-menu-open,
body.webhat-mobile-menu-open {
    overflow: hidden !important;
    overscroll-behavior: none;
    touch-action: none;
}

html.property-modal-open,
body.property-modal-open,
html.form-modal-open,
body.form-modal-open,
body.quick-actions-open {
    overflow: hidden;
}

.pwa-dock {
    position: fixed;
    left: max(14px, env(safe-area-inset-left));
    bottom: max(14px, env(safe-area-inset-bottom));
    z-index: 45;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    max-width: min(360px, calc(100vw - 28px));
    pointer-events: none;
}

.pwa-dock-button {
    width: auto;
    min-height: 40px;
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 999px;
    background: #050606;
    color: #fff;
    padding: 9px 14px;
    box-shadow: 0 14px 32px rgba(16, 19, 18, .18);
    cursor: pointer;
    font-size: .82rem;
    font-weight: 800;
    pointer-events: auto;
    transition: transform .16s ease, background .16s ease;
}

.pwa-dock-button:hover {
    background: var(--accent);
    transform: translateY(-1px);
}

.pwa-dock-button:disabled {
    cursor: wait;
    opacity: .72;
}

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

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

.skip-link {
    position: fixed;
    top: 10px;
    left: 10px;
    z-index: 500;
    padding: 9px 13px;
    border-radius: var(--radius);
    background: #050606;
    color: #fff;
    font-weight: 800;
    transform: translateY(-160%);
    transition: transform .16s ease;
}

.skip-link:focus {
    transform: translateY(0);
}

img,
svg {
    max-width: 100%;
}

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

input,
select,
textarea {
    width: 100%;
    min-width: 0;
    min-height: 42px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    color: var(--ink);
    padding: 10px 12px;
    outline: none;
    transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}

textarea {
    resize: vertical;
}

.tall-select {
    min-height: 168px;
}

.tall-select option {
    padding: 6px 8px;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(217, 15, 31, .12);
}

label {
    display: grid;
    gap: 7px;
    min-width: 0;
    color: #2a332f;
    font-size: .92rem;
    font-weight: 700;
}

.field-hint {
    color: var(--muted);
    font-size: .78rem;
    font-weight: 600;
    line-height: 1.35;
}

.field-label,
.quick-field-label,
.metric-card-label,
.heading-with-help {
    display: flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
}

.crm-help {
    position: relative;
    display: inline-flex;
    flex: 0 0 auto;
    vertical-align: middle;
}

.crm-help-trigger {
    display: inline-grid;
    place-items: center;
    width: 19px;
    min-width: 19px;
    height: 19px;
    padding: 0;
    border: 1px solid #aeb8b3;
    border-radius: 999px;
    background: #fff;
    color: #56605b;
    cursor: help;
    font-size: .72rem;
    font-weight: 900;
    line-height: 1;
}

.crm-help-trigger:hover,
.crm-help-trigger:focus-visible,
.crm-help.is-open .crm-help-trigger {
    border-color: var(--accent);
    background: #fff2f3;
    color: var(--accent-dark);
    outline: 0;
}

.crm-tooltip {
    position: fixed;
    z-index: 300;
    width: max-content;
    max-width: min(300px, calc(100vw - 24px));
    padding: 9px 11px;
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 9px;
    background: #111513;
    color: #fff;
    box-shadow: 0 14px 34px rgba(0, 0, 0, .24);
    font-size: .78rem;
    font-weight: 650;
    line-height: 1.4;
    text-align: left;
    white-space: normal;
}

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

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
    overflow-wrap: normal;
    word-break: normal;
}

th {
    color: var(--muted);
    font-size: .78rem;
    letter-spacing: .02em;
    text-transform: uppercase;
}

td small,
.small {
    display: block;
    color: var(--muted);
    font-size: .82rem;
}

.app-shell {
    display: block;
    min-height: 100vh;
    min-width: 0;
    width: 100%;
}

.crm-site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    border-top: 10px solid #fff;
    border-bottom: 1px solid #263029;
    background: #050606;
    color: #f7fbf8;
}

.crm-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
    width: min(1160px, calc(100% - 40px));
    min-height: 92px;
    margin: 0 auto;
}

.crm-brand {
    --webhat-logo-mark-size: 64px;
    --webhat-eye-dot-size: 3.2px;
    position: relative;
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    gap: 10px;
    min-width: 222px;
    color: #fff;
}

.crm-logo-mark {
    display: inline-flex;
    flex: 0 0 auto;
    width: 64px;
}

.crm-logo-mark img {
    display: block;
    width: 64px;
    height: auto;
}

.crm-brand::before,
.crm-brand::after {
    content: "";
    position: absolute;
    z-index: 1;
    top: calc(var(--webhat-logo-mark-size) * .878);
    width: var(--webhat-eye-dot-size);
    height: var(--webhat-eye-dot-size);
    border-radius: 999px;
    background: #fff;
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, -50%) scale(.8);
    animation: webhat-logo-eye-pulse 9s ease-in-out 5s infinite;
}

.crm-brand::before {
    left: calc(var(--webhat-logo-mark-size) * .296);
}

.crm-brand::after {
    left: calc(var(--webhat-logo-mark-size) * .7);
}

@keyframes webhat-logo-eye-pulse {
    0%,
    14%,
    28%,
    42%,
    56%,
    66% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(.86);
    }

    7%,
    21%,
    35%,
    49%,
    63% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.42);
    }

    67%,
    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(.72);
    }
}

@media (prefers-reduced-motion: reduce) {
    .crm-brand::before,
    .crm-brand::after {
        animation: none;
        opacity: 0;
    }
}

.crm-brand-copy {
    display: grid;
    gap: 3px;
    color: #fff;
    font-family: "WebHat Manrope", "Trebuchet MS", "Segoe UI", Arial, sans-serif;
    line-height: 1;
}

.crm-brand-name {
    display: block;
    font-size: 1.9rem;
    font-weight: 800;
    letter-spacing: .015em;
    white-space: nowrap;
}

.crm-brand-motto {
    display: block;
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .055em;
    opacity: .82;
    white-space: nowrap;
}

.crm-client-switcher {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) auto;
    align-items: center;
    gap: 11px;
    width: min(430px, 42vw);
    min-height: 56px;
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 999px;
    background: #fff;
    color: var(--ink);
    padding: 6px 10px 6px 6px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, .22);
    cursor: pointer;
    text-align: left;
    transition: transform .16s ease, box-shadow .16s ease;
}

.crm-client-switcher:hover,
.crm-client-switcher:focus-visible {
    outline: 0;
    transform: translateY(-1px);
    box-shadow: 0 18px 38px rgba(0, 0, 0, .3);
}

.crm-client-switcher-logo,
.client-picker-choice-logo {
    display: grid;
    place-items: center;
    overflow: hidden;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    font-weight: 900;
    letter-spacing: .04em;
}

.crm-client-switcher-logo {
    width: 44px;
    height: 44px;
    font-size: .82rem;
}

.crm-client-switcher-logo img,
.client-picker-choice-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.crm-client-switcher-copy {
    display: grid;
    min-width: 0;
    line-height: 1.1;
}

.crm-client-switcher-copy small {
    color: var(--muted);
    font-size: .68rem;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.crm-client-switcher-copy strong {
    overflow: hidden;
    color: var(--ink);
    font-size: .98rem;
    font-weight: 900;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.crm-client-switcher-status {
    border-radius: 999px;
    background: var(--good-bg);
    color: var(--good);
    padding: 7px 10px;
    font-size: .72rem;
    font-weight: 900;
    white-space: nowrap;
}

.crm-global-nav {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    min-width: 0;
}

.crm-global-nav > a,
.crm-global-nav .crm-nav-item > a {
    display: block;
    padding: .5rem .65rem;
    border-radius: var(--radius);
    color: #f7fbf8;
    font-size: .86rem;
    font-weight: 800;
    white-space: nowrap;
}

.crm-global-nav > a:hover,
.crm-global-nav > a:focus-visible,
.crm-global-nav > a.is-active,
.crm-global-nav .crm-nav-item:hover > a,
.crm-global-nav .crm-nav-item:focus-within > a {
    background: #fff;
    color: #050606;
    outline: 0;
}

.crm-client-context-bar {
    position: sticky;
    top: 103px;
    z-index: 48;
    border-bottom: 1px solid var(--line);
    background: rgba(243, 245, 244, .95);
    backdrop-filter: blur(14px);
}

.crm-client-context-inner {
    width: min(1160px, calc(100% - 40px));
    margin: 0 auto;
}

.crm-client-context-nav {
    position: relative;
    min-height: 62px;
    padding: 8px 0;
    overflow: visible;
}

.crm-client-context-track {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
}

.crm-client-nav-layer {
    display: none;
}

.crm-client-nav-group {
    position: relative;
    flex: 0 0 auto;
}

.crm-client-nav-control {
    display: flex;
    align-items: stretch;
    gap: 0;
}

.crm-client-nav-trigger,
.crm-client-nav-menu a {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 38px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    color: #25322d;
    padding: 8px 12px;
    font-size: .8rem;
    font-weight: 900;
    white-space: nowrap;
}

.crm-client-nav-trigger {
    position: relative;
    z-index: 2;
}

.crm-client-nav-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    flex: 0 0 38px;
    width: 38px;
    min-width: 38px;
    min-height: 38px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    color: #25322d;
    padding: 0;
    cursor: pointer;
}

.crm-client-nav-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    z-index: 20;
    display: none;
    min-width: 220px;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 22px 46px rgba(16, 19, 18, .14);
}

.crm-client-nav-menu a {
    display: flex;
    justify-content: flex-start;
    width: 100%;
    border-color: transparent;
    border-radius: var(--radius);
    box-shadow: none;
}

.crm-client-nav-menu.is-open {
    display: grid;
    gap: 4px;
}

.crm-client-nav-group.is-active .crm-client-nav-trigger,
.crm-client-nav-trigger:hover,
.crm-client-nav-trigger:focus-visible,
.crm-client-nav-toggle:hover,
.crm-client-nav-toggle[aria-expanded="true"],
.crm-client-nav-menu a.is-active,
.crm-client-nav-menu a:hover,
.crm-client-nav-menu a:focus-visible {
    border-color: var(--accent);
    background: var(--accent);
    color: #fff;
    outline: 0;
}

.crm-client-nav-toggle:focus-visible {
    border-color: var(--accent);
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.crm-client-context-nav svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.crm-client-nav-chevron {
    width: 13px !important;
    height: 13px !important;
    opacity: .72;
}

.crm-client-nav-inline-chevron {
    display: block;
}

.crm-client-nav-toggle[aria-expanded="true"] .crm-client-nav-chevron {
    transform: rotate(180deg);
}

@media (min-width: 1041px) {
    .crm-client-nav-group.has-menu:hover .crm-client-nav-menu,
    .crm-client-nav-group.has-menu:focus-within .crm-client-nav-menu {
        display: grid;
        gap: 4px;
    }

    .crm-client-nav-menu::before {
        content: "";
        position: absolute;
        right: 0;
        bottom: 100%;
        left: 0;
        height: 9px;
    }
}

.client-picker-overlay {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(16, 19, 18, .58);
    padding: 20px;
}

.client-picker-overlay[hidden] {
    display: none;
}

body.client-picker-open {
    overflow: hidden;
}

.client-picker-modal {
    width: min(760px, 100%);
    max-height: min(760px, calc(100vh - 40px));
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .72);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 36px 92px rgba(0, 0, 0, .34);
}

.client-picker-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    padding: 24px 26px 18px;
    border-bottom: 1px solid var(--line);
}

.client-picker-head h2 {
    margin: 2px 0 0;
    font-size: clamp(1.8rem, 4vw, 2.35rem);
    line-height: 1.05;
}

.client-picker-head-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    margin-left: auto;
}

.client-picker-filter-tabs {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #f3f6f5;
}

.client-picker-filter {
    min-height: 36px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    font: inherit;
    font-size: .82rem;
    font-weight: 900;
    line-height: 1;
    padding: 0 14px;
    white-space: nowrap;
}

.client-picker-filter:hover,
.client-picker-filter:focus-visible {
    color: var(--ink);
    outline: 0;
}

.client-picker-filter.is-active {
    background: #101312;
    color: #fff;
    box-shadow: 0 10px 24px rgba(16, 19, 18, .16);
}

.client-picker-close {
    width: 48px;
    min-width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #fff;
    color: var(--ink);
}

.client-picker-search {
    padding: 18px 26px 10px;
}

.client-picker-search label {
    font-size: .78rem;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.client-picker-search input {
    min-height: 46px;
    border-radius: 999px;
    background: #f8faf9;
}

.client-picker-list {
    display: grid;
    gap: 10px;
    max-height: min(420px, calc(100vh - 330px));
    overflow: auto;
    padding: 10px 26px 20px;
}

.client-picker-choice {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    min-height: 76px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fbfcfc;
    color: var(--ink);
    padding: 12px 16px;
}

.client-picker-choice[hidden],
.client-picker-choice.is-hidden {
    display: none;
}

.client-picker-choice:hover,
.client-picker-choice:focus-visible,
.client-picker-choice.is-selected {
    border-color: #1d73e8;
    background: #eef6ff;
    outline: 0;
    box-shadow: 0 0 0 1px rgba(29, 115, 232, .2);
}

.client-picker-choice-logo {
    width: 42px;
    height: 42px;
    font-size: .78rem;
}

.client-picker-choice-copy {
    min-width: 0;
}

.client-picker-choice-copy strong,
.client-picker-choice-copy small {
    display: block;
}

.client-picker-choice-copy strong {
    overflow: hidden;
    font-size: 1.04rem;
    font-weight: 900;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.client-picker-choice-copy small {
    margin-top: 2px;
    color: var(--muted);
    font-size: .83rem;
    font-weight: 700;
}

.client-picker-choice-status {
    border-radius: 999px;
    background: var(--good-bg);
    color: var(--good);
    padding: 6px 10px;
    font-size: .72rem;
    font-weight: 900;
    white-space: nowrap;
}

.client-picker-empty {
    display: none;
    border: 1px dashed var(--line);
    border-radius: 12px;
    color: var(--muted);
    padding: 22px;
    text-align: center;
    font-weight: 800;
}

.client-picker-empty.is-visible {
    display: block;
}

.client-picker-list[aria-busy="true"] {
    opacity: .58;
}

.client-picker-status {
    min-height: 18px;
    margin: -8px 26px 10px;
    color: var(--muted);
    font-size: .76rem;
    font-weight: 700;
}

.client-picker-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 18px 26px 22px;
    border-top: 1px solid var(--line);
    background: #f8faf9;
}

.client-picker-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.client-picker-foot p {
    max-width: 300px;
    margin: 0;
    color: var(--muted);
    font-size: .78rem;
    font-weight: 800;
    text-align: right;
}

.client-lookup-source {
    position: absolute !important;
    width: 1px !important;
    min-width: 1px !important;
    height: 1px !important;
    min-height: 1px !important;
    margin: -1px !important;
    padding: 0 !important;
    overflow: hidden !important;
    clip: rect(0 0 0 0) !important;
    clip-path: inset(50%) !important;
    border: 0 !important;
    white-space: nowrap !important;
}

.client-lookup-control {
    position: relative;
    width: 100%;
    min-width: 0;
}

.client-lookup-input {
    padding-right: 40px;
    background: #fff;
}

.client-lookup-control.is-loading::after {
    content: "";
    position: absolute;
    top: 14px;
    right: 14px;
    width: 14px;
    height: 14px;
    border: 2px solid #cbd4d0;
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: client-lookup-spin .7s linear infinite;
}

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

.client-lookup-results {
    position: absolute;
    z-index: 120;
    top: calc(100% + 6px);
    left: 0;
    display: grid;
    gap: 5px;
    width: min(380px, calc(100vw - 32px));
    min-width: 100%;
    max-height: 310px;
    overflow: auto;
    padding: 7px;
    border: 1px solid #cbd4d0;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 22px 48px rgba(15, 20, 18, .2);
}

.client-lookup-results[hidden] {
    display: none;
}

.client-lookup-result {
    display: grid;
    gap: 2px;
    width: 100%;
    min-height: 44px;
    padding: 9px 10px;
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
    color: var(--ink);
    cursor: pointer;
    text-align: left;
}

.client-lookup-result:hover,
.client-lookup-result:focus-visible,
.client-lookup-result.is-active {
    border-color: rgba(29, 115, 232, .28);
    background: #eef6ff;
    outline: 0;
}

.client-lookup-result strong,
.client-lookup-result small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.client-lookup-result strong {
    font-size: .88rem;
    font-weight: 900;
}

.client-lookup-result small {
    color: var(--muted);
    font-size: .73rem;
    font-weight: 700;
}

.client-lookup-empty {
    padding: 14px 10px;
    color: var(--muted);
    font-size: .82rem;
    font-weight: 700;
    text-align: center;
}

.client-lookup-message {
    display: block;
    min-height: 0;
    margin-top: 4px;
    color: var(--muted);
    font-size: .72rem;
    font-weight: 650;
    line-height: 1.3;
}

.client-lookup-message:empty {
    display: none;
}

.crm-nav {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    min-width: 0;
}

.crm-nav-item {
    position: relative;
}

.crm-nav-item::after {
    content: "";
    position: absolute;
    z-index: 59;
    top: 100%;
    right: 0;
    left: 0;
    display: none;
    height: 10px;
}

.crm-nav > a,
.crm-nav-item > a {
    display: block;
    padding: .5rem .65rem;
    border-radius: var(--radius);
    color: #f7fbf8;
    font-size: .94rem;
    font-weight: 700;
    white-space: nowrap;
}

.crm-nav > a:hover,
.crm-nav > a:focus-visible,
.crm-nav > a.is-active,
.crm-nav-item:hover > a,
.crm-nav-item:focus-within > a,
.crm-nav-item.is-active > a {
    background: #fff;
    color: #050606;
    outline: 0;
}

.crm-submenu {
    position: absolute;
    left: 0;
    top: calc(100% + 6px);
    z-index: 60;
    display: none;
    min-width: 220px;
    padding: 10px;
    border: 1px solid #263029;
    border-radius: var(--radius);
    background: #070907;
    box-shadow: 0 20px 50px rgba(0, 0, 0, .38);
}

.crm-nav-item:nth-last-child(-n+2) .crm-submenu {
    right: 0;
    left: auto;
}

.crm-nav-item:hover::after,
.crm-nav-item:focus-within::after,
.crm-nav-item:hover .crm-submenu,
.crm-nav-item:focus-within .crm-submenu {
    display: grid;
    gap: 4px;
}

.crm-submenu a,
.crm-mobile-nav a,
.crm-mobile-submenu summary {
    display: block;
    padding: .58rem .62rem;
    border-radius: var(--radius);
    color: #f7fbf8;
    font-weight: 700;
}

.crm-submenu a:hover,
.crm-submenu a:focus-visible,
.crm-submenu a.is-active,
.crm-mobile-nav a:hover,
.crm-mobile-nav a:focus-visible,
.crm-mobile-nav a.is-active,
.crm-mobile-submenu summary:hover,
.crm-mobile-submenu:focus-within summary {
    background: #fff;
    color: #050606;
    outline: 0;
}

.crm-account {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
    color: #d8ded9;
    font-size: .88rem;
    font-weight: 800;
}

.crm-account form {
    margin: 0;
}

.icon-button,
.crm-mobile-logout {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #263029;
    border-radius: var(--radius);
    background: #111613;
    color: #f7fbf8;
    cursor: pointer;
    transition: transform .16s ease, background .16s ease, border-color .16s ease, color .16s ease;
}

.icon-button {
    width: 36px;
    min-width: 36px;
    height: 36px;
    padding: 0;
}

.icon-button svg,
.crm-mobile-logout svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.icon-button:hover,
.icon-button:focus-visible,
.crm-mobile-logout:hover,
.crm-mobile-logout:focus-visible {
    border-color: #fff;
    background: #fff;
    color: #050606;
    outline: 0;
    transform: translateY(-1px);
}

.crm-mobile-menu {
    display: none;
}

.impersonation-banner {
    position: sticky;
    top: 112px;
    z-index: 49;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-width: 0;
    padding: 10px 20px;
    border-bottom: 1px solid #f2c66c;
    background: #fff4d8;
    color: #5d3c05;
    font-weight: 900;
}

.impersonation-banner span {
    min-width: 0;
}

.impersonation-banner form {
    flex: 0 0 auto;
    margin: 0;
}

.main {
    display: grid;
    align-content: start;
    gap: 22px;
    min-width: 0;
    width: min(1360px, calc(100% - 40px));
    margin: 0 auto;
    padding: 26px 0;
}

.topbar,
.toolbar,
.panel-head,
.client-hero,
.hero-actions,
.userbar,
.form-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-width: 0;
}

.topbar > *,
.toolbar > *,
.panel-head > *,
.client-hero > *,
.hero-actions > *,
.userbar > *,
.form-actions > * {
    min-width: 0;
}

.topbar h1,
.client-hero h2,
.panel h2 {
    margin: 0;
}

.topbar h1 {
    font-size: 1.68rem;
    line-height: 1.12;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    margin: 0 0 8px;
    padding: 3px 8px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #fff;
    color: #050606;
    font-size: .72rem;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.userbar {
    justify-content: flex-end;
    color: var(--muted);
    font-weight: 700;
}

.userbar form {
    margin: 0;
}

.hero-actions form {
    display: inline-flex;
    margin: 0;
}

.button {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 0;
    min-height: 42px;
    max-width: 100%;
    border: 1px solid var(--accent);
    border-radius: var(--radius);
    background: var(--accent);
    color: #fff;
    padding: 10px 14px;
    cursor: pointer;
    font-weight: 800;
    line-height: 1.15;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: center;
    box-shadow: 0 10px 22px rgba(217, 15, 31, .18);
    transition: transform .16s ease, box-shadow .16s ease, background .16s ease, border-color .16s ease;
}

.button:hover {
    background: var(--accent-dark);
    border-color: var(--accent-dark);
    transform: translateY(-1px);
    box-shadow: 0 14px 26px rgba(217, 15, 31, .22);
}

.button-icon {
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
}

.button:disabled,
.button[aria-disabled="true"] {
    cursor: wait;
    opacity: .72;
    transform: none;
    box-shadow: none;
}

.button.is-loading {
    cursor: wait;
    gap: 8px;
}

.button.is-loading::before {
    content: "";
    width: 14px;
    height: 14px;
    flex: 0 0 14px;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 999px;
    opacity: .9;
    animation: webhat-spin .75s linear infinite;
}

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

.button.is-light {
    border-color: var(--line);
    background: #fff;
    color: var(--ink);
    box-shadow: var(--shadow-soft);
}

.button.is-light:hover {
    border-color: #c5cfca;
    background: #f6f8f7;
    box-shadow: 0 12px 24px rgba(16, 19, 18, .09);
}

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

.button.is-small {
    min-height: 34px;
    padding: 7px 10px;
    font-size: .84rem;
}

.mobile-action-icon {
    display: none;
}

.mobile-action-label {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mobile-action-icon svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.section-tabs {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    overflow-x: auto;
    padding: 6px 0 2px;
    scrollbar-width: thin;
}

.section-tabs.is-sticky {
    position: sticky;
    top: 112px;
    z-index: 35;
    margin: -6px 0 2px;
    padding: 10px 0;
    background: rgba(243, 245, 244, .94);
    backdrop-filter: blur(8px);
}

.section-tabs a {
    flex: 0 0 auto;
    padding: 9px 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    color: var(--ink);
    font-weight: 900;
    white-space: nowrap;
    box-shadow: var(--shadow-soft);
}

.section-tabs a:hover,
.section-tabs a:focus-visible,
.section-tabs a.is-active {
    border-color: #c5cfca;
    background: #f6f8f7;
}

.section-tabs a.is-active {
    border-color: var(--accent);
    color: var(--accent-dark);
}

.section-panel[hidden] {
    display: none !important;
}

.section-panel {
    display: grid;
    gap: 18px;
    min-width: 0;
}

.quick-actions {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 100;
}

.quick-fab {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 58px;
    min-width: 58px;
    height: 58px;
    padding: 0;
    border: 1px solid var(--accent);
    border-radius: 999px;
    background: var(--accent);
    color: #fff;
    cursor: pointer;
    font-weight: 700;
    line-height: 1;
    box-shadow: 0 18px 40px rgba(217, 15, 31, .34);
    transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
}

.quick-fab:hover,
.quick-fab:focus-visible {
    background: var(--accent-dark);
    transform: translateY(-2px);
    box-shadow: 0 22px 48px rgba(217, 15, 31, .42);
    outline: 0;
}

.quick-fab[hidden] {
    display: none;
}

.quick-fab-plus {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
}

.quick-fab-label {
    position: absolute;
    right: calc(100% + 10px);
    padding: 9px 12px;
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 10px;
    background: #17201c;
    box-shadow: 0 10px 28px rgba(6, 10, 8, .22);
    max-width: 190px;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    transform: translateX(5px);
    visibility: hidden;
    font-size: .84rem;
    font-weight: 900;
    text-overflow: ellipsis;
    transition: opacity .16s ease, transform .16s ease, visibility .16s ease;
    white-space: nowrap;
}

.quick-fab:hover .quick-fab-label,
.quick-fab:focus-visible .quick-fab-label {
    opacity: 1;
    transform: translateX(0);
    visibility: visible;
}

.quick-overlay {
    position: fixed;
    inset: 0;
    z-index: 110;
    display: grid;
    place-items: end center;
    padding: 16px;
    background: rgba(4, 6, 5, .46);
    backdrop-filter: blur(4px);
}

.quick-overlay[hidden] {
    display: none;
}

.quick-modal {
    display: grid;
    gap: 16px;
    width: min(1040px, calc(100vw - 32px));
    max-height: min(760px, calc(100dvh - 32px));
    overflow: auto;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    box-shadow: 0 28px 70px rgba(0, 0, 0, .28);
}

.quick-modal-head,
.quick-panel-intro {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    min-width: 0;
}

.quick-modal-head {
    position: sticky;
    top: -20px;
    z-index: 3;
    align-items: center;
    margin: -20px -20px 0;
    padding: 16px 20px 12px;
    border-bottom: 1px solid var(--line);
    background: #fff;
}

.quick-modal-head .eyebrow {
    margin-bottom: 4px;
}

.quick-modal-head .icon-button {
    flex: 0 0 auto;
    width: 32px;
    min-width: 32px;
    height: 32px;
    border-color: var(--line);
    background: #fff;
    color: var(--ink);
    box-shadow: var(--shadow-soft);
}

.quick-modal-head h2,
.quick-panel-intro h3,
.quick-panel-intro p {
    margin: 0;
}

.quick-panel-intro {
    display: grid;
    gap: 5px;
}

.quick-panel-intro p {
    color: var(--muted);
}

.quick-tabs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 2px;
}

.quick-tabs button {
    flex: 0 0 auto;
    min-height: 38px;
    padding: 8px 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #f7f9f8;
    color: var(--ink);
    cursor: pointer;
    font-weight: 900;
    white-space: nowrap;
}

.quick-tabs button.is-active {
    border-color: var(--accent);
    background: var(--accent);
    color: #fff;
}

.quick-tabs[hidden],
.quick-tabs button[hidden] {
    display: none;
}

.quick-panel {
    display: none;
    gap: 14px;
    margin: 0;
}

.quick-panel[hidden] {
    display: none !important;
}

.quick-panel.is-active {
    display: grid;
}

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

.quick-form-grid .is-wide {
    grid-column: 1 / -1;
}

.quick-field {
    display: grid;
    align-content: start;
    gap: 7px;
    min-width: 0;
}

.quick-field-label {
    min-height: 20px;
}

.quick-field-label > label {
    display: block;
    color: #2a332f;
    font-size: .92rem;
    font-weight: 700;
}

.quick-field select[multiple] {
    min-height: 150px;
}

.quick-check-control {
    display: flex;
    align-items: center;
    gap: 9px;
    min-height: 42px;
    padding: 9px 11px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #f8faf9;
    cursor: pointer;
}

.quick-check-control input {
    width: 18px;
    min-width: 18px;
    min-height: 18px;
    margin: 0;
}

.quick-check-control span {
    font-size: .88rem;
    font-weight: 800;
}

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

.metric-grid.is-compact {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.metric-card,
.panel,
.login-card,
.client-hero {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel);
    box-shadow: var(--shadow);
}

.metric-card {
    display: grid;
    gap: 8px;
    min-height: 112px;
    min-width: 0;
    padding: 18px;
    border-top: 3px solid var(--accent);
}

.metric-card > span,
.metric-card-label {
    color: var(--muted);
    font-size: .84rem;
    font-weight: 800;
}

.metric-card.is-link {
    position: relative;
    color: inherit;
    text-decoration: none;
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.metric-card-link {
    position: absolute;
    inset: 0;
    z-index: 1;
    border-radius: inherit;
}

.metric-card.is-link .metric-card-label,
.metric-card.is-link > strong {
    position: relative;
    z-index: 2;
    pointer-events: none;
}

.metric-card.is-link .metric-card-label .crm-help {
    position: relative;
    z-index: 3;
    pointer-events: auto;
}

.metric-card.is-link:hover {
    border-color: #c6cfca;
    border-top-color: var(--accent);
    box-shadow: 0 16px 36px rgba(14, 23, 19, .12);
    transform: translateY(-2px);
}

.metric-card.is-link:focus-within {
    outline: 3px solid rgba(217, 15, 31, .2);
    outline-offset: 3px;
}

.metric-card-link:focus-visible {
    outline: 0;
}

.metric-card strong {
    font-size: 1.55rem;
}

.panel,
.client-hero {
    min-width: 0;
    padding: 22px;
}

.client-profile-head {
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
}

.client-logo-wrap {
    position: relative;
    flex: 0 0 auto;
    width: 86px;
    height: 86px;
}

.client-logo {
    display: grid;
    place-items: center;
    width: 86px;
    height: 86px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    color: var(--accent-dark);
    font-weight: 900;
    box-shadow: var(--shadow-soft);
}

.client-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.client-logo-form {
    margin: 0;
}

.client-logo-upload {
    position: absolute;
    left: 50%;
    bottom: -6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    min-width: 54px;
    min-height: 28px;
    padding: 4px 9px;
    border: 1px solid var(--accent);
    border-radius: 999px;
    background: var(--accent);
    color: #fff;
    cursor: pointer;
    font-size: .72rem;
    font-weight: 900;
    line-height: 1;
    transform: translateX(-50%);
    box-shadow: 0 10px 24px rgba(217, 15, 31, .24);
}

.client-logo-upload input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.client-logo-delete {
    position: absolute;
    top: -4px;
    right: -4px;
    margin: 0;
}

.client-logo-delete button {
    display: inline-grid;
    place-items: center;
    width: 25px;
    height: 25px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    color: var(--muted);
    cursor: pointer;
    font-weight: 900;
    line-height: 1;
    box-shadow: var(--shadow-soft);
}

.content-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.75fr) minmax(320px, .65fr);
    gap: 18px;
    min-width: 0;
}

.content-grid > .panel:only-child {
    grid-column: 1 / -1;
}

.list {
    display: grid;
    gap: 8px;
    margin-top: 16px;
}

.version-list {
    display: grid;
    gap: 16px;
    margin-top: 16px;
}

.version-item {
    display: grid;
    gap: 8px;
    padding-top: 14px;
    border-top: 1px solid var(--line);
}

.list-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 14px;
    min-width: 0;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fbfcfb;
    transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease, background .16s ease;
}

.list-row > * {
    min-width: 0;
}

.list-row small {
    display: block;
    color: var(--muted);
    overflow-wrap: anywhere;
}

.report-metric-value {
    text-align: right;
    overflow-wrap: anywhere;
}

.report-metric-value small {
    margin-top: 3px;
    font-size: .78rem;
    font-weight: 700;
}

a.list-row:hover,
.list-details > summary:hover {
    border-color: #c8d2cd;
    background: #fff;
    box-shadow: var(--shadow-soft);
    transform: translateY(-1px);
}

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

.list-details > summary {
    cursor: pointer;
    list-style: none;
}

.list-details > summary::-webkit-details-marker {
    display: none;
}

.list-details > summary::after {
    content: "+";
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 999px;
    background: var(--neutral-bg);
    color: var(--muted);
    font-weight: 900;
}

.list-details[open] > summary::after {
    content: "-";
}

.detail-body {
    display: grid;
    gap: 10px;
    padding: 0 12px 12px;
}

.detail-body p {
    margin: 0;
}

.badge {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    max-width: 100%;
    border-radius: 999px;
    padding: 4px 10px;
    font-size: .76rem;
    font-weight: 900;
    white-space: nowrap;
    overflow-wrap: anywhere;
}

.badge.is-good {
    background: var(--good-bg);
    color: var(--good);
}

.badge.is-waiting {
    background: var(--wait-bg);
    color: var(--wait);
}

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

.badge.is-neutral {
    background: var(--neutral-bg);
    color: #4e5b55;
}

.table-wrap td a:not(.button),
.details dd a:not(.button),
.text-content a:not(.button),
.version-item a:not(.button),
.note-box a:not(.button),
.integration-meta a:not(.button),
.legal-card a:not(.button),
.list-row strong a:not(.button),
a.text-link {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    min-height: 26px;
    padding: 3px 8px;
    border: 1px solid #dde5e1;
    border-radius: 999px;
    background: #edf1f0;
    color: #26312d;
    font-size: .86rem;
    font-weight: 900;
    line-height: 1.25;
    vertical-align: baseline;
    overflow-wrap: anywhere;
    transition: background .16s ease, border-color .16s ease, box-shadow .16s ease, color .16s ease;
}

.table-wrap td a:not(.button):hover,
.table-wrap td a:not(.button):focus-visible,
.details dd a:not(.button):hover,
.details dd a:not(.button):focus-visible,
.text-content a:not(.button):hover,
.text-content a:not(.button):focus-visible,
.version-item a:not(.button):hover,
.version-item a:not(.button):focus-visible,
.note-box a:not(.button):hover,
.note-box a:not(.button):focus-visible,
.integration-meta a:not(.button):hover,
.integration-meta a:not(.button):focus-visible,
.legal-card a:not(.button):hover,
.legal-card a:not(.button):focus-visible,
.list-row strong a:not(.button):hover,
.list-row strong a:not(.button):focus-visible,
a.text-link:hover,
a.text-link:focus-visible {
    border-color: #cad4cf;
    background: #e5ebe8;
    color: #101312;
    box-shadow: 0 4px 12px rgba(16, 19, 18, .06);
}

.table-wrap {
    min-width: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
}

.table-wrap table {
    min-width: 960px;
}

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

.table-wrap th:last-child,
.table-wrap td:last-child {
    position: sticky;
    right: 0;
    z-index: 2;
    width: 1%;
    min-width: 148px;
    background: #fff;
    white-space: nowrap;
    text-align: right;
    box-shadow: -12px 0 18px rgba(16, 19, 18, .05);
}

.table-wrap th:last-child {
    z-index: 3;
    background: linear-gradient(90deg, rgba(255, 255, 255, .92), #fff 18px);
}

.table-wrap td:last-child form {
    display: inline-flex;
    justify-content: flex-end;
    margin: 0;
}

.table-wrap td:last-child .button {
    min-width: 86px;
}

.table-wrap .button {
    flex: 0 0 auto;
    white-space: nowrap;
}

.table-wrap .row-actions {
    flex-wrap: nowrap;
    width: max-content;
    max-width: min(760px, calc(100vw - 56px));
    justify-content: flex-end;
}

.table-wrap .row-actions input,
.table-wrap .row-actions select {
    flex: 0 0 auto;
}

.table-wrap .row-actions input {
    width: 220px;
}

.crm-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--line);
}

.crm-pagination-summary {
    margin: 0;
    color: var(--muted);
    font-size: .86rem;
}

.crm-pagination-summary strong {
    color: var(--ink);
}

.crm-pagination-links {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 6px;
}

.crm-page-control {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    min-height: 40px;
    padding: 7px 10px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
    color: var(--ink);
    font-size: .82rem;
    font-weight: 900;
    line-height: 1;
    text-decoration: none;
}

a.crm-page-control:hover {
    border-color: var(--accent);
    color: var(--accent);
}

a.crm-page-control:focus-visible {
    outline: 3px solid rgba(217, 15, 31, .2);
    outline-offset: 2px;
}

.crm-page-control.is-direction {
    min-width: 104px;
}

.crm-page-control.is-current {
    border-color: var(--ink);
    background: var(--ink);
    color: #fff;
}

.crm-page-control.is-disabled {
    opacity: .48;
    cursor: default;
}

.crm-page-ellipsis {
    min-width: 24px;
    color: var(--muted);
    text-align: center;
}

.users-grid {
    grid-template-columns: minmax(0, 1fr) minmax(300px, 360px);
}

.user-filters {
    width: 100%;
}

.user-management-table {
    min-width: 1120px;
}

.user-management-table th:nth-child(1),
.user-management-table td:nth-child(1) {
    width: 210px;
}

.user-management-table th:nth-child(2),
.user-management-table td:nth-child(2) {
    width: 150px;
}

.user-management-table th:nth-child(3),
.user-management-table td:nth-child(3) {
    width: 190px;
}

.user-management-table th:nth-child(4),
.user-management-table td:nth-child(4) {
    width: 480px;
}

.user-management-table th:nth-child(5),
.user-management-table td:nth-child(5) {
    width: 130px;
}

.user-edit-form {
    margin: 0;
}

.user-edit-grid {
    display: grid;
    grid-template-columns: minmax(130px, 1fr) minmax(170px, 1.1fr) minmax(120px, .75fr);
    gap: 8px;
    min-width: 0;
}

.user-edit-grid input,
.user-edit-grid select {
    min-height: 36px;
    padding: 7px 9px;
    font-size: .88rem;
}

.user-edit-grid .button {
    min-height: 36px;
    grid-column: auto;
}

.user-edit-grid .button[data-action-iconified] {
    width: 38px;
    min-width: 38px;
    max-width: 38px;
    height: 36px;
    min-height: 36px;
    padding: 0;
    justify-self: end;
    gap: 0;
}

.user-edit-grid .button[data-action-iconified] .mobile-action-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.user-edit-grid .button[data-action-iconified] .mobile-action-label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.onboarding-table {
    min-width: 860px;
    table-layout: fixed;
}

.onboarding-table th:nth-child(1),
.onboarding-table td:nth-child(1) {
    width: 32%;
}

.onboarding-table th:nth-child(2),
.onboarding-table td:nth-child(2) {
    width: 210px;
}

.onboarding-table th:nth-child(3),
.onboarding-table td:nth-child(3) {
    width: auto;
}

.onboarding-table th:nth-child(4),
.onboarding-table td:nth-child(4) {
    width: 116px;
    min-width: 116px;
}

.onboarding-table td {
    vertical-align: middle;
}

.onboarding-step-cell strong,
.onboarding-step-cell small {
    display: block;
    min-width: 0;
    overflow-wrap: anywhere;
}

.onboarding-step-cell strong {
    line-height: 1.32;
}

.onboarding-step-cell small {
    margin-top: 4px;
    color: var(--muted);
    font-weight: 700;
}

.onboarding-status-select,
.onboarding-notes-input {
    width: 100%;
}

.table-wrap td:last-child .onboarding-actions,
.table-wrap .onboarding-actions {
    width: 100%;
    max-width: none;
    justify-content: flex-end;
}

tbody tr {
    transition: background .16s ease;
}

tbody tr:hover {
    background: #fbfcfb;
}

.filters,
.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    min-width: 0;
}

.filters {
    grid-template-columns: minmax(260px, 1.4fr) minmax(170px, .8fr) minmax(190px, .8fr) auto;
    align-items: center;
}

.form-grid {
    display: grid;
    gap: 22px;
    min-width: 0;
}

.form-section {
    display: grid;
    gap: 14px;
    min-width: 0;
}

.form-section h2 {
    font-size: 1.05rem;
}

.section-title-line {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    min-width: 0;
}

.section-title-line h2,
.section-title-line p {
    margin: 0;
}

.section-title-line .eyebrow {
    margin-bottom: 5px;
}

.selected-client-field {
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr) auto;
    align-items: center;
    min-height: 86px;
    gap: 14px;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #f7faf8;
}

.selected-client-logo {
    display: grid;
    place-items: center;
    width: 58px;
    height: 58px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    color: var(--ink);
    font-size: .9rem;
    font-weight: 950;
}

.selected-client-logo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 5px;
}

.selected-client-copy,
.selected-client-field strong,
.selected-client-label {
    display: block;
    min-width: 0;
    overflow-wrap: anywhere;
}

.selected-client-copy {
    display: grid;
    gap: 5px;
}

.selected-client-label {
    color: var(--muted);
    font-size: .78rem;
    font-weight: 900;
}

.selected-client-field strong {
    font-size: 1.08rem;
}

.selected-client-status {
    justify-self: end;
    background: #dff7ea;
    color: #087045;
}

.form-actions {
    justify-content: flex-end;
}

.row-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    min-width: 0;
}

.automation-toolbar {
    align-items: flex-start;
}

.automation-filters {
    flex: 0 1 auto;
    width: fit-content;
    max-width: 100%;
    grid-template-columns: minmax(170px, 220px) minmax(150px, 190px) max-content;
}

.automation-run-form {
    flex: 0 0 auto;
    margin: 0;
}

.automation-filters .button {
    min-width: 124px;
}

.automation-create-form {
    grid-template-columns: minmax(260px, 1.4fr) minmax(150px, .55fr) auto;
    align-items: end;
}

.automations-catalog-list .list-row {
    align-items: flex-start;
}

.automations-catalog-list .list-row > span:first-child {
    flex: 1 1 360px;
}

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

.automation-table th:nth-child(1),
.automation-table td:nth-child(1) {
    width: 24%;
}

.automation-table th:nth-child(2),
.automation-table td:nth-child(2) {
    width: 13%;
}

.automation-table th:nth-child(3),
.automation-table td:nth-child(3) {
    width: 13%;
}

.automation-table th:nth-child(4),
.automation-table td:nth-child(4),
.automation-table th:nth-child(5),
.automation-table td:nth-child(5) {
    width: 12%;
}

.automation-table-wrap th:last-child,
.automation-table-wrap td:last-child {
    width: 360px;
    min-width: 360px;
}

.automation-table td {
    overflow-wrap: anywhere;
}

.automation-table-wrap td:last-child .automation-row-actions {
    display: grid;
    grid-template-columns: minmax(126px, 1fr) minmax(110px, .72fr) auto;
    align-items: center;
    width: 100%;
    max-width: none;
    gap: 8px;
}

.automation-row-actions select {
    width: 100%;
    min-width: 0;
    min-height: 36px;
    padding: 7px 32px 7px 10px;
    font-size: .86rem;
}

.automation-row-actions .button {
    min-width: 84px;
}

.table-wrap .automation-report-table {
    min-width: 1180px;
    table-layout: fixed;
}

.automation-report-table th:nth-child(1),
.automation-report-table td:nth-child(1) {
    width: 15%;
}

.automation-report-table th:nth-child(2),
.automation-report-table td:nth-child(2) {
    width: 21%;
}

.automation-report-table th:nth-child(3),
.automation-report-table td:nth-child(3) {
    width: 13%;
}

.automation-report-table th:nth-child(4),
.automation-report-table td:nth-child(4) {
    width: 25%;
}

.automation-report-table th:nth-child(5),
.automation-report-table td:nth-child(5) {
    width: 13%;
}

.automation-report-table th:nth-child(6),
.automation-report-table td:nth-child(6) {
    width: 16%;
}

.table-wrap.automation-report-table-wrap th:last-child,
.table-wrap.automation-report-table-wrap td:last-child {
    width: 168px;
    min-width: 168px;
}

.table-wrap.automation-report-table-wrap td:last-child .row-actions {
    width: max-content;
    max-width: none;
}

.automation-report-table td {
    vertical-align: top;
    overflow-wrap: anywhere;
}

.automation-report-table td small {
    display: block;
    margin-top: 5px;
    color: var(--muted);
    font-weight: 700;
    line-height: 1.35;
    white-space: normal;
}

.automation-checks {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.automation-checks .badge {
    white-space: normal;
    text-align: left;
}

.compact-details {
    position: relative;
}

.compact-details > summary {
    list-style: none;
}

.compact-details > summary::-webkit-details-marker {
    display: none;
}

.compact-details .inline-form {
    position: absolute;
    right: 0;
    z-index: 20;
    width: min(360px, calc(100vw - 32px));
    white-space: normal;
    box-shadow: var(--shadow);
}

.inline-form {
    display: grid;
    gap: 12px;
    min-width: 0;
    margin: 16px 0 18px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fbfcfb;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .65);
}

.field-static {
    display: flex;
    align-items: center;
    min-height: 50px;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: var(--muted);
    font-weight: 800;
}

.timeline {
    display: grid;
    gap: 12px;
}

.timeline article {
    display: grid;
    gap: 5px;
    padding: 14px 0 14px 16px;
    border-left: 3px solid var(--line);
}

.timeline time,
.timeline small,
.muted {
    color: var(--muted);
}

.details {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 10px 14px;
    margin: 0;
}

.details dt {
    color: var(--muted);
    font-weight: 800;
}

.details dd {
    margin: 0;
}

.text-content {
    display: grid;
    gap: 10px;
    margin-top: 14px;
    color: #33403a;
}

.text-content h3 {
    margin: 0;
}

.metric-editor {
    display: grid;
    gap: 10px;
}

.metric-months {
    display: grid;
    gap: 14px;
}

.metric-month-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 5px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #f6f8f7;
}

.metric-month-tabs button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 8px 14px;
    border: 1px solid transparent;
    border-radius: calc(var(--radius) - 3px);
    background: transparent;
    color: var(--muted);
    font: inherit;
    font-size: .9rem;
    font-weight: 900;
    cursor: pointer;
}

.metric-month-tabs button strong {
    color: inherit;
    font-size: .84rem;
    letter-spacing: .02em;
}

.metric-month-tabs button:hover,
.metric-month-tabs button:focus-visible,
.metric-month-tabs button.is-active {
    border-color: var(--line);
    background: #fff;
    color: var(--ink);
    box-shadow: 0 10px 24px rgba(15, 18, 17, .06);
}

.metric-month-tabs button.is-active {
    box-shadow: inset 0 3px 0 var(--brand), 0 10px 24px rgba(15, 18, 17, .06);
}

.metric-month-panel[hidden] {
    display: none;
}

.metric-row {
    display: grid;
    grid-template-columns: minmax(92px, .45fr) minmax(150px, .8fr) minmax(220px, 1.4fr) minmax(130px, .7fr) minmax(120px, .6fr);
    gap: 10px;
    align-items: end;
    min-width: 0;
}

.metric-include {
    display: flex;
    align-items: center;
    min-height: 48px;
    gap: 8px;
    padding: 0 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fbfcfb;
    font-size: .85rem;
    font-weight: 900;
}

.metric-include input {
    width: 18px;
    height: 18px;
    min-height: 18px;
}

.note-box,
.empty-line,
.debug-box {
    margin-top: 14px;
    border-radius: var(--radius);
    background: #f6f8f7;
    padding: 13px;
    color: #33403a;
}

.note-box.is-compact {
    margin-top: 10px;
    padding: 10px 11px;
    font-size: .88rem;
    line-height: 1.45;
}

.note-box,
.list-row,
.integration-item,
.integration-meta span,
.mini-list li,
.rules-grid article {
    overflow-wrap: anywhere;
}

.breakable-code {
    display: block;
    max-width: 100%;
    margin-top: 3px;
    color: var(--ink);
    font-weight: 900;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.debug-box {
    max-height: 360px;
    overflow: auto;
    white-space: pre-wrap;
}

.flash-stack {
    display: grid;
    gap: 10px;
    position: sticky;
    top: 112px;
    z-index: 45;
}

.flash {
    border-radius: var(--radius);
    padding: 12px 14px;
    font-weight: 800;
    box-shadow: var(--shadow-soft);
}

.flash.is-success {
    background: var(--good-bg);
    color: var(--good);
}

.flash.is-danger {
    background: var(--danger-bg);
    color: var(--danger);
}

.flash.is-warning {
    background: var(--wait-bg);
    color: var(--wait);
}

.flash.is-info {
    background: #eef6f1;
    color: #234135;
}

.flash-popup-stack {
    position: fixed;
    top: max(16px, env(safe-area-inset-top));
    right: max(16px, env(safe-area-inset-right));
    z-index: 140;
    display: grid;
    gap: 10px;
    width: min(440px, calc(100vw - 32px));
    pointer-events: none;
}

.flash-popup {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 36px;
    gap: 14px;
    align-items: start;
    border: 1px solid currentColor;
    pointer-events: auto;
}

.flash-popup-copy {
    min-width: 0;
}

.flash-popup-copy > strong {
    display: block;
    font-size: 1rem;
}

.flash-popup-copy > p {
    margin: 5px 0 0;
    color: inherit;
    font-size: .92rem;
    font-weight: 650;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.flash-popup-close {
    display: inline-grid;
    place-items: center;
    width: 36px;
    min-width: 36px;
    height: 36px;
    padding: 0;
    border: 1px solid currentColor;
    border-radius: 10px;
    background: rgba(255, 255, 255, .7);
    color: inherit;
    font: inherit;
    font-size: 1.35rem;
    line-height: 1;
    cursor: pointer;
}

.flash-popup-close:hover,
.flash-popup-close:focus-visible {
    background: #fff;
    outline: 3px solid currentColor;
    outline-offset: 2px;
}

.guest-body {
    display: grid;
    place-items: center;
    min-height: 100vh;
    padding: 24px;
    background: #050606;
}

.guest-shell {
    width: min(100%, 460px);
    min-width: 0;
}

.guest-shell.legal-shell {
    width: min(100%, 920px);
}

.legal-page {
    display: grid;
    gap: 24px;
    color: #111716;
}

.legal-brand {
    display: grid;
    justify-items: center;
    gap: 12px;
    text-align: center;
}

.legal-card {
    display: grid;
    gap: 16px;
    padding: clamp(24px, 4vw, 42px);
}

.legal-card h1,
.legal-card h2,
.legal-card p {
    margin: 0;
}

.legal-card h1 {
    max-width: 760px;
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.04;
}

.legal-card h2 {
    margin-top: 10px;
    font-size: 1.08rem;
}

.legal-card p {
    color: #46524e;
    font-weight: 700;
    line-height: 1.65;
}

.legal-audit-section {
    display: grid;
    gap: 16px;
    scroll-margin-top: 24px;
}

.login-screen {
    display: grid;
    gap: 22px;
    color: #fff;
    animation: loginIn .26s ease-out both;
}

.login-identity {
    display: grid;
    justify-items: center;
    gap: 14px;
    text-align: center;
}

.login-logo {
    display: block;
    width: min(320px, 82vw);
    height: auto;
}

.login-brand {
    justify-self: center;
}

.login-identity h1 {
    margin: 4px 0 2px;
    color: #fff;
    font-size: 2.8rem;
    line-height: 1.03;
}

.login-identity .eyebrow {
    letter-spacing: 0;
}

.login-notices {
    display: grid;
    gap: 8px;
}

.login-notice {
    margin: 0;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    color: #27332e;
    font-size: .88rem;
    font-weight: 800;
    line-height: 1.35;
}

.login-notice.is-danger {
    border-color: #f0c9cd;
    color: var(--danger);
}

.login-notice.is-warning {
    border-color: #ead8a8;
    color: var(--wait);
}

.login-notice.is-success {
    border-color: #bddfcd;
    color: var(--good);
}

.login-identity p:not(.eyebrow) {
    margin: 0;
    color: #b7c2bd;
    font-size: 1rem;
    font-weight: 800;
}

.login-card {
    display: grid;
    gap: 18px;
    padding: 28px;
    border-color: rgba(255, 255, 255, .12);
    background: linear-gradient(180deg, #121715 0%, #0d100f 100%);
    box-shadow: 0 26px 70px rgba(0, 0, 0, .42);
}

.login-card-head {
    display: grid;
    gap: 6px;
}

.login-card-head h1 {
    margin: 0;
    color: #fff;
    font-size: 1.48rem;
    line-height: 1.14;
}

.login-card-head p {
    margin: 0;
    color: #b7c2bd;
    font-size: .94rem;
    font-weight: 800;
    line-height: 1.45;
}

@keyframes loginIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-card label {
    color: #f2f6f4;
}

.login-card input {
    border-color: rgba(255, 255, 255, .12);
    background: #080a09;
    color: #fff;
}

.login-card input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(217, 15, 31, .24);
}

.password-field {
    position: relative;
}

.password-field input {
    padding-right: 48px;
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 8px;
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: #d9e0dc;
    cursor: pointer;
    transform: translateY(-50%);
    transition: background .16s ease, color .16s ease;
}

.password-toggle:hover,
.password-toggle:focus-visible,
.password-toggle.is-active {
    background: rgba(255, 255, 255, .08);
    color: #fff;
    outline: none;
}

.password-toggle svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.login-remember {
    display: flex;
    align-items: center;
    color: #d9e0dc;
    font-size: .88rem;
    font-weight: 800;
}

.login-actions {
    display: grid;
    gap: 10px;
}

.login-link {
    justify-self: center;
    color: #f4f7f6;
    font-size: .9rem;
    font-weight: 900;
    text-decoration: underline;
    text-decoration-color: rgba(255, 255, 255, .28);
    text-underline-offset: 4px;
}

.login-link:hover,
.login-link:focus-visible {
    color: #fff;
    text-decoration-color: #fff;
    outline: none;
}

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

.section-stack {
    display: grid;
    gap: 16px;
    margin-top: 22px;
    min-width: 0;
}

.check-line {
    display: flex;
    grid-template-columns: none;
    align-items: center;
    gap: 10px;
}

.check-line input {
    width: 18px;
    min-height: 18px;
    height: 18px;
}

.report-toolbar {
    align-items: flex-start;
}

.report-workbench {
    border-top: 4px solid var(--accent);
}

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

.report-flow-grid article {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
    gap: 12px;
    min-width: 0;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fbfcfb;
}

.report-flow-grid article .button {
    grid-column: 2;
    width: fit-content;
}

.report-flow-step {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 999px;
    background: #0f1412;
    color: #fff;
    font-weight: 950;
}

.report-flow-grid h3,
.report-flow-grid p {
    margin: 0;
}

.report-flow-grid h3 {
    font-size: 1rem;
}

.report-flow-grid p {
    margin-top: 5px;
    color: var(--muted);
    font-size: .9rem;
    line-height: 1.45;
}

.report-page-tabs {
    margin: -2px 0 6px;
}

.report-work-list {
    display: grid;
    gap: 10px;
}

.report-work-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    min-width: 0;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
}

.report-work-card h3,
.report-work-card p {
    margin: 0;
}

.report-work-card h3 {
    margin-top: 8px;
    font-size: 1rem;
    overflow-wrap: anywhere;
}

.report-work-card p {
    margin-top: 4px;
    color: var(--muted);
    font-size: .88rem;
    font-weight: 800;
}

.report-form-panel {
    border-top: 0;
}

.report-form-steps {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    min-width: 0;
    margin: 0;
    padding: 0;
    list-style: none;
}

.report-form-steps li {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    min-height: 66px;
    padding: 11px 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #f7faf8;
    color: var(--muted);
}

.report-form-steps li.is-current,
.report-form-steps li.is-active {
    border-color: rgba(217, 15, 31, .28);
    background: #fff;
    color: var(--ink);
    box-shadow: 0 10px 24px rgba(15, 18, 17, .06);
}

.report-form-steps li.is-complete {
    border-color: #b9dfcc;
    background: #f3fbf7;
    color: var(--ink);
}

.report-step-number {
    display: grid;
    flex: 0 0 auto;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: 999px;
    background: #e5ebe8;
    color: #52615a;
    font-size: .84rem;
    font-weight: 950;
}

.report-form-steps li.is-current .report-step-number,
.report-form-steps li.is-active .report-step-number {
    background: var(--accent);
    color: #fff;
}

.report-form-steps li.is-complete .report-step-number {
    background: #178a55;
    color: #fff;
}

.report-step-copy {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.report-step-copy strong,
.report-step-copy small {
    display: block;
    min-width: 0;
    overflow-wrap: anywhere;
}

.report-step-copy strong {
    font-size: .88rem;
    font-weight: 950;
    line-height: 1.18;
}

.report-step-copy small {
    color: var(--muted);
    font-size: .75rem;
    font-weight: 700;
    line-height: 1.25;
}

.report-context-section,
.report-create-sync,
.report-preview-section,
.report-narrative-editor,
.report-advanced-editor {
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
}

.report-context-grid {
    align-items: end;
}

.report-field-wide {
    grid-column: 1 / -1;
}

.report-status-readonly {
    align-self: stretch;
    justify-content: center;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #f7faf8;
}

.report-status-readonly > .badge {
    width: fit-content;
}

.report-template-control {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
}

.report-preview-stale-alert {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 12px 14px;
    border: 1px solid #ecc47c;
    border-radius: var(--radius);
    background: #fff8e8;
    color: #6f4b00;
}

.report-preview-stale-alert[hidden] {
    display: none;
}

.report-preview-stale-alert > span,
.report-preview-stale-alert strong,
.report-preview-stale-alert small {
    display: block;
    min-width: 0;
}

.report-preview-stale-alert small {
    margin-top: 2px;
    font-weight: 700;
}

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

.report-source-card .badge {
    width: fit-content;
    margin: 4px 0 6px;
}

.report-source-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-width: 0;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #f7faf8;
}

.report-source-summary > span,
.report-source-summary strong,
.report-source-summary small {
    display: block;
    min-width: 0;
}

.report-source-summary small {
    margin-top: 4px;
    color: var(--muted);
    font-weight: 700;
    overflow-wrap: anywhere;
}

.report-preview-section {
    background: linear-gradient(180deg, #ffffff 0%, #fbfcfb 100%);
}

.report-narrative-editor textarea {
    min-height: 148px;
}

.report-advanced-editor {
    display: grid;
    gap: 14px;
    border-color: #8fc9aa;
    background: linear-gradient(180deg, #def3e8 0%, var(--good-bg) 100%);
    color: var(--ink);
    box-shadow: 0 12px 28px rgba(15, 122, 79, .1);
}

.report-advanced-editor > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    cursor: pointer;
    list-style: none;
    color: #0b4f35;
}

.report-advanced-editor > summary:focus-visible {
    border-radius: 6px;
    outline: 3px solid #075535;
    outline-offset: 2px;
}

.report-advanced-editor > summary .eyebrow {
    border-color: #83bea0;
    background: #fff;
    color: #0b5e3e;
}

.report-advanced-editor > summary .badge.is-neutral {
    background: var(--good);
    color: #fff;
}

.report-advanced-editor[open] > summary {
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(15, 122, 79, .24);
}

.report-advanced-editor > summary::-webkit-details-marker {
    display: none;
}

.report-advanced-editor > summary strong,
.report-advanced-editor > summary span {
    display: block;
}

.report-advanced-editor > summary strong {
    font-size: 1.05rem;
}

.report-advanced-editor > .form-section {
    margin-top: 0;
}

.report-advanced-editor .muted {
    color: #355e4a;
}

.report-advanced-editor .report-metric-search input {
    border-color: #8fc9aa;
    background: #fff;
    color: var(--ink);
}

.report-advanced-editor .report-metric-search input::placeholder {
    color: #526c5f;
}

.report-advanced-editor .report-metric-search input:focus {
    border-color: var(--good);
    box-shadow: 0 0 0 3px rgba(15, 122, 79, .16);
}

.report-advanced-editor .button.is-light {
    border-color: #6eaf8c;
    background: #fff;
    color: #0b5e3e;
    box-shadow: 0 7px 16px rgba(15, 122, 79, .1);
}

.report-advanced-editor .button.is-light:hover {
    border-color: var(--good);
    background: #f0faf5;
    color: #084c32;
    box-shadow: 0 10px 20px rgba(15, 122, 79, .14);
}

.report-advanced-editor [data-report-metric-add].button.is-light {
    border-color: var(--good);
    background: var(--good);
    color: #fff;
}

.report-advanced-editor [data-report-metric-add].button.is-light:hover {
    border-color: #0a5e3c;
    background: #0a5e3c;
    color: #fff;
}

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

.report-metric-search {
    flex: 1 1 320px;
    max-width: 520px;
}

.report-metric-list {
    display: grid;
    max-height: min(58vh, 620px);
    overflow: auto;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
}

.report-advanced-editor .report-metric-list {
    border-color: #9ccfb5;
    background: #fff;
}

.report-metric-row {
    display: grid;
    grid-template-columns: 44px minmax(180px, 1fr) minmax(120px, auto) auto;
    align-items: center;
    gap: 12px;
    min-width: 0;
    padding: 10px 12px;
    border-bottom: 1px solid #e8ecea;
}

.report-advanced-editor .report-metric-row {
    border-bottom-color: #d2e9dd;
    background: #fff;
}

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

.report-metric-row.is-excluded {
    background: #f6f8f7;
    opacity: .66;
}

.report-advanced-editor .report-metric-row.is-excluded {
    background: #edf5f1;
    color: #4b5d54;
    opacity: 1;
}

.report-metric-row.is-filtered {
    display: none;
}

.report-metric-include {
    display: grid;
    place-items: center;
    width: 44px;
    min-height: 44px;
}

.report-metric-include input {
    width: 19px;
    height: 19px;
    min-height: 19px;
}

.report-advanced-editor .report-metric-include input {
    accent-color: var(--good);
}

.report-metric-copy,
.report-metric-copy strong,
.report-metric-copy small {
    display: block;
    min-width: 0;
}

.report-advanced-editor .report-metric-copy small {
    color: #355e4a;
}

.report-metric-copy strong,
.report-metric-copy small,
.report-metric-value {
    overflow-wrap: anywhere;
}

.report-advanced-editor .report-metric-value {
    color: #0b5e3e;
}

.report-advanced-editor .report-metric-edit.button.is-light {
    background: #f1faf5;
}

.report-metric-copy small {
    margin-bottom: 2px;
    color: var(--muted);
    font-size: .76rem;
    font-weight: 850;
}

.report-metric-value {
    color: #33403a;
    font-size: .9rem;
    font-weight: 900;
    text-align: right;
}

.report-form-modal-body {
    display: grid;
    gap: 16px;
    padding: 20px;
}

.report-template-preview-copy {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.report-template-preview-copy > div {
    padding: 13px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #f7faf8;
}

.report-template-preview-copy small,
.report-template-preview-copy p {
    display: block;
    margin: 0;
}

.report-template-preview-copy small {
    margin-bottom: 6px;
    color: var(--muted);
    font-weight: 900;
}

.report-template-preview-copy p {
    line-height: 1.5;
    white-space: pre-wrap;
}

.report-template-metric-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    max-height: 220px;
    margin-top: 10px;
    overflow: auto;
}

.report-template-metric-preview span {
    padding: 6px 9px;
    border-radius: 999px;
    background: #eef3f0;
    color: #33403a;
    font-size: .78rem;
    font-weight: 850;
}

.report-template-replace-option {
    align-items: flex-start;
    padding: 12px;
    border: 1px solid #e6c47f;
    border-radius: var(--radius);
    background: #fff9ed;
}

.report-template-replace-option strong,
.report-template-replace-option small {
    display: block;
}

.report-template-replace-option small {
    margin-top: 3px;
    color: var(--muted);
}

.report-previous-metric-list {
    display: grid;
    max-height: min(60vh, 620px);
    overflow: auto;
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.report-previous-metric-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 11px 13px;
    border-bottom: 1px solid #e8ecea;
}

.report-previous-metric-row:last-child {
    border-bottom: 0;
}

.report-previous-metric-row span,
.report-previous-metric-row small,
.report-previous-metric-row strong {
    display: block;
    min-width: 0;
    overflow-wrap: anywhere;
}

.report-previous-metric-row small {
    margin-bottom: 2px;
    color: var(--muted);
    font-size: .76rem;
    font-weight: 850;
}

.report-previous-metric-row > strong {
    flex: 0 1 35%;
    text-align: right;
}

.report-save-actions {
    position: sticky;
    bottom: 14px;
    z-index: 15;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, .94);
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(8px);
}

.report-save-copy {
    display: grid;
    gap: 2px;
    margin-right: auto;
    color: var(--ink);
}

.report-save-copy strong,
.report-save-copy small {
    display: block;
}

.report-save-copy strong {
    font-size: .94rem;
    font-weight: 950;
}

.report-save-copy small {
    color: var(--muted);
    font-size: .8rem;
    font-weight: 700;
}

.report-save-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
}

.report-tools-grid {
    align-items: start;
}

.report-tool-card {
    min-width: 0;
}

.report-tool-form {
    display: grid;
    gap: 16px;
    margin-top: 14px;
}

.report-option-grid {
    display: grid;
    gap: 10px;
    min-width: 0;
}

.report-option-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: flex-start;
    gap: 12px;
    padding: 13px 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
}

.report-option-card.is-active {
    border-color: #cfdad5;
    box-shadow: 0 12px 28px rgba(17, 22, 20, .06);
}

.report-option-card.is-disabled {
    background: #f5f7f6;
    color: var(--muted);
}

.report-option-card.report-option-link {
    grid-template-columns: minmax(0, 1fr);
    color: inherit;
    text-decoration: none;
}

.report-option-card input {
    width: 18px;
    height: 18px;
    min-height: 18px;
    margin-top: 2px;
}

.report-option-card strong,
.report-option-card small {
    display: block;
    min-width: 0;
    overflow-wrap: anywhere;
}

.report-option-card strong {
    margin-bottom: 3px;
}

.report-option-card small {
    color: var(--muted);
    line-height: 1.35;
}

.is-danger-text {
    color: #b4232f !important;
}

.report-manual-whatsapp-form {
    display: grid;
    gap: 16px;
}

.report-manual-recipient {
    margin-top: 2px;
}

.form-modal.report-email-modal {
    width: min(760px, 100%);
    transition: width .18s ease;
}

.form-modal.report-email-modal.is-preview-open {
    width: min(1120px, 100%);
}

.report-email-modal .form-modal-head p {
    margin: 8px 0 0;
}

.report-email-summary {
    margin-top: 0;
}

.report-email-recipients {
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

.report-email-recipients legend {
    padding: 0;
    font-weight: 900;
}

.report-email-recipients > .muted {
    margin: 6px 0 14px;
}

.report-email-recipient {
    cursor: pointer;
}

.report-email-recipient:has(input:checked) {
    border-color: #98c7b0;
    background: #f2fbf6;
    box-shadow: 0 12px 28px rgba(17, 22, 20, .08);
}

.report-email-composer {
    display: grid;
    gap: 16px;
    min-width: 0;
    padding: 16px;
    border: 1px solid #cfdad5;
    border-radius: var(--radius);
    background: #f7f9f8;
}

.report-email-composer[hidden] {
    display: none;
}

.report-email-composer-head,
.report-email-preview-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    min-width: 0;
}

.report-email-composer-head h4,
.report-email-composer-head p,
.report-email-editor h5,
.report-email-preview-head h5 {
    margin: 0;
}

.report-email-composer-head h4 {
    margin-top: 8px;
}

.report-email-composer-head p {
    margin-top: 6px;
}

.report-email-mobile-tabs {
    display: none;
}

.report-email-compose-grid {
    display: grid;
    grid-template-columns: minmax(280px, .82fr) minmax(420px, 1.18fr);
    gap: 16px;
    min-width: 0;
}

.report-email-editor,
.report-email-preview {
    display: grid;
    align-content: start;
    gap: 14px;
    min-width: 0;
}

.report-email-editor[hidden],
.report-email-preview[hidden] {
    display: none;
}

.report-email-editor textarea {
    min-height: 210px;
}

.report-email-protected-note {
    margin: 0;
}

.report-email-protected-note p {
    margin: 6px 0 8px;
}

.report-email-preview-window {
    min-width: 0;
    overflow: hidden;
    border: 1px solid #cfd6d3;
    border-radius: var(--radius);
    background: #050606;
    box-shadow: 0 16px 36px rgba(16, 19, 18, .12);
}

.report-email-preview-subject {
    display: grid;
    gap: 4px;
    padding: 11px 13px;
    border-bottom: 1px solid #dce3df;
    background: #fff;
}

.report-email-preview-subject small {
    color: var(--muted);
    font-size: .74rem;
    font-weight: 800;
}

.report-email-preview-subject strong {
    min-width: 0;
    overflow-wrap: anywhere;
}

.report-email-preview-body {
    min-width: 0;
    max-height: 520px;
    overflow: auto;
    padding: 10px;
    overscroll-behavior: auto;
    background: #050606;
}

.report-email-preview-body a {
    pointer-events: none;
}

.report-email-actions {
    position: sticky;
    bottom: -20px;
    z-index: 2;
    margin: 0 -20px -20px;
    padding: 14px 20px;
    border-top: 1px solid var(--line);
    background: rgba(255, 255, 255, .96);
    backdrop-filter: blur(8px);
}

@media (max-width: 900px) {
    .report-email-compose-grid {
        grid-template-columns: 1fr;
    }

    .report-email-mobile-tabs {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .report-email-mobile-tabs .button {
        min-height: 44px;
    }

    .report-email-mobile-tabs .button.is-active {
        border-color: #111614;
        background: #111614;
        color: #fff;
        box-shadow: none;
    }

    .report-email-preview-body {
        max-height: 46dvh;
        overscroll-behavior: auto;
    }
}

.report-section-stack {
    display: grid;
    gap: 16px;
    min-width: 0;
}

.report-client-overview {
    grid-template-columns: minmax(0, 1fr);
}

.report-metrics-panel .report-metric-section > .list {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
}

.report-metric-section {
    display: grid;
    gap: 8px;
    min-width: 0;
}

.report-metric-section h3 {
    margin: 0;
    font-size: .96rem;
}

.business-impact-panel {
    position: relative;
    overflow: hidden;
    border-top: 4px solid #0f1412;
    background:
        linear-gradient(135deg, rgba(217, 15, 31, .08), rgba(255, 255, 255, 0) 38%),
        #fff;
}

.business-impact-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(220px, .32fr);
    gap: 18px;
    align-items: start;
    margin-bottom: 18px;
}

.business-impact-head h2 {
    margin: 0;
}

.business-impact-head p {
    max-width: 920px;
    margin: 8px 0 0;
    color: #27322d;
    font-size: 1.02rem;
    line-height: 1.55;
}

.business-impact-total {
    position: relative;
    display: grid;
    gap: 8px;
    align-content: center;
    justify-items: start;
    min-height: 96px;
    padding: 18px 18px 16px 32px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    color: var(--ink);
    box-shadow: 0 18px 38px rgba(15, 18, 17, .08);
}

.business-impact-total::before {
    content: "";
    position: absolute;
    top: 18px;
    bottom: 18px;
    left: 14px;
    width: 4px;
    border-radius: 999px;
    background: var(--accent);
}

.business-impact-total span {
    color: var(--muted);
    font-size: .74rem;
    font-weight: 900;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.business-impact-total strong {
    color: #0f1412;
    font-size: clamp(1.45rem, 2vw, 2.15rem);
    line-height: 1.05;
    text-align: left;
}

.business-impact-total-track {
    width: 100%;
    height: 7px;
    overflow: hidden;
    border-radius: 999px;
    background: #edf2ef;
}

.business-impact-total-track i {
    display: block;
    height: 100%;
    min-width: 20px;
    border-radius: inherit;
    background: linear-gradient(90deg, #0f1412 0 18px, var(--accent) 18px 100%);
}

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

.business-impact-card {
    display: grid;
    align-content: start;
    gap: 10px;
    min-width: 0;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, .9);
}

.business-impact-card-top {
    display: grid;
    gap: 5px;
    min-width: 0;
}

.business-impact-card-top span {
    color: var(--muted);
    font-size: .72rem;
    font-weight: 900;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.business-impact-card-top strong {
    color: #0f1412;
    font-size: 1.28rem;
    line-height: 1.08;
    overflow-wrap: anywhere;
}

.business-impact-track {
    height: 10px;
    overflow: hidden;
    border-radius: 999px;
    background: #edf2ef;
}

.business-impact-track i {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #0f1412 0%, var(--accent) 100%);
}

.business-impact-card p {
    margin: 0;
    color: #39443f;
    font-size: .86rem;
    line-height: 1.36;
}

.business-impact-card small {
    color: var(--muted);
    font-size: .76rem;
    font-weight: 800;
    line-height: 1.35;
}

.growth-insights-panel {
    position: relative;
    overflow: hidden;
    border-top: 4px solid var(--accent);
}

.growth-insights-summary {
    max-width: 980px;
    margin: -2px 0 18px;
    color: #27322d;
    font-size: 1.02rem;
    line-height: 1.6;
}

.growth-insights-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    min-width: 0;
}

.growth-insight-card {
    display: grid;
    gap: 12px;
    min-width: 0;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: linear-gradient(180deg, #ffffff 0%, #fbfcfb 100%);
}

.growth-insight-card-head {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.growth-insight-card-head span {
    color: var(--muted);
    font-size: .72rem;
    font-weight: 900;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.growth-insight-card-head strong {
    overflow-wrap: anywhere;
    color: #0f1412;
    font-size: .98rem;
    line-height: 1.24;
}

.growth-insight-values {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.growth-insight-values span {
    min-width: 0;
    padding: 8px;
    border-radius: var(--radius);
    background: #f4f7f5;
    color: #111614;
    font-weight: 900;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.growth-insight-values small {
    display: block;
    margin-bottom: 3px;
    color: var(--muted);
    font-size: .68rem;
    font-weight: 900;
    letter-spacing: .02em;
    text-transform: uppercase;
}

.growth-insight-bar {
    height: 9px;
    overflow: hidden;
    border-radius: 999px;
    background: #edf2ef;
}

.growth-insight-bar i {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--accent);
}

.growth-insight-card p {
    margin: 0;
    color: #0f7a45;
    font-weight: 950;
}

.report-block-grid {
    display: grid;
    gap: 16px;
    min-width: 0;
}

.report-block {
    display: grid;
    gap: 12px;
    min-width: 0;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
}

.report-block-head {
    display: grid;
    gap: 4px;
}

.report-block-head h3 {
    margin: 0;
    font-size: 1.05rem;
    overflow-wrap: anywhere;
}

.report-block-location {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 2px 0 0;
    color: var(--muted);
    font-size: .86rem;
    line-height: 1.35;
}

.report-block-location span {
    position: relative;
    width: 12px;
    height: 12px;
    flex: 0 0 12px;
    margin-top: 3px;
    border: 2px solid var(--accent);
    border-radius: 999px 999px 999px 2px;
    transform: rotate(-45deg);
}

.report-block-location span::after {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 3px;
    height: 3px;
    border-radius: 999px;
    background: var(--accent);
    content: "";
}

.report-chart {
    display: grid;
    gap: 10px;
    min-width: 0;
}

.report-chart-svg {
    display: block;
    width: 100%;
    height: auto;
    min-height: 220px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fbfcfb;
}

.report-chart-grid-line {
    stroke: #dfe6e2;
    stroke-width: 1;
}

.report-chart-line {
    fill: none;
    stroke-width: 3.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.report-chart-axis {
    fill: #68736f;
    font-size: 12px;
    font-weight: 800;
}

.report-chart-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.report-chart-legend span,
.report-block-preview {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    padding: 7px 10px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #f6f8f7;
    color: #31403a;
    font-size: .84rem;
    font-weight: 900;
}

.report-chart-legend i {
    width: 10px;
    height: 10px;
    flex: 0 0 auto;
    border-radius: 999px;
}

.report-summary-card-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    min-width: 0;
}

.report-summary-card {
    display: grid;
    gap: 4px;
    min-width: 0;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fbfcfb;
}

.report-summary-card small {
    color: var(--muted);
    font-size: .72rem;
    font-weight: 900;
    letter-spacing: .035em;
    line-height: 1.2;
    text-transform: uppercase;
}

.report-summary-card strong {
    color: #111614;
    font-size: 1rem;
    font-weight: 950;
    line-height: 1.2;
    overflow-wrap: anywhere;
}

.report-block-table {
    margin: 0;
}

.report-block-table td,
.report-block-table th {
    overflow-wrap: anywhere;
}

.report-block-preview-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.report-block-preview {
    flex-direction: column;
    align-items: flex-start;
    border-radius: var(--radius);
}

.report-block-preview span {
    color: var(--muted);
    font-size: .78rem;
}

.rules-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    min-width: 0;
}

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

#google-oauth > .rules-grid,
#meta-oauth > .rules-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.oauth-resource-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 18px 0;
}

.oauth-overview-panel,
.oauth-advanced-panel {
    margin-top: 18px;
}

.oauth-overview-panel > .panel-head {
    padding: 16px 16px 0;
}

.oauth-overview-panel h3,
.oauth-advanced-panel h3 {
    margin: 0;
}

.oauth-connection-list {
    padding: 0 16px 16px;
}

.oauth-resource-panel {
    background: #fff;
}

.oauth-resource-list {
    display: grid;
    gap: 8px;
    padding: 0 14px 14px;
}

.oauth-resource-groups {
    display: grid;
    gap: 12px;
    padding: 0 16px 16px;
}

.oauth-advanced-panel > .oauth-manual-grid {
    padding: 0 14px 14px;
}

.oauth-action-card .inline-form {
    margin-bottom: 0;
}

.list-row.is-muted {
    border-style: dashed;
    background: #f7f7f5;
    color: var(--muted);
}

.rules-grid article {
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fbfcfb;
}

.panel-lite {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fbfcfb;
}

.panel-lite > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px;
    cursor: pointer;
    list-style: none;
}

.panel-lite > summary::-webkit-details-marker {
    display: none;
}

.panel-lite > summary small {
    display: block;
    margin-top: 3px;
    color: var(--muted);
}

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

.panel-lite > form {
    padding: 0 14px 14px;
}

.rules-grid h3 {
    margin: 0 0 8px;
}

.rules-grid p {
    margin: 0;
    color: var(--muted);
}

.rules-grid article .form-actions {
    margin-top: 14px;
}

.integration-list {
    display: grid;
    gap: 16px;
    margin-top: 18px;
}

.platform-grid {
    display: grid;
    gap: 16px;
    margin-top: 18px;
}

.platform-card {
    display: grid;
    gap: 14px;
    min-width: 0;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fbfcfb;
}

.platform-card-head,
.platform-actions,
.platform-report-line {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    min-width: 0;
}

.platform-card-head h3,
.platform-card-head p {
    margin: 0;
}

.platform-title-badge {
    display: inline-flex;
    width: fit-content;
    max-width: 100%;
    align-items: center;
    padding: 7px 12px;
    border-radius: 6px;
    background: #080b0a;
    color: #fff;
    font-size: .82rem;
    font-weight: 900;
    line-height: 1.15;
    letter-spacing: .05em;
    text-transform: uppercase;
    overflow-wrap: anywhere;
}

.platform-card-head p {
    margin-top: 10px;
    color: var(--muted);
}

.platform-status-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    min-width: 0;
}

.platform-status-grid span {
    min-width: 0;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    color: #33403a;
    font-size: .88rem;
    overflow-wrap: anywhere;
}

.platform-status-grid strong {
    display: block;
    margin-bottom: 3px;
    color: var(--muted);
    font-size: .72rem;
    letter-spacing: .02em;
    text-transform: uppercase;
}

.platform-actions {
    justify-content: flex-start;
    flex-wrap: wrap;
}

.platform-actions form {
    margin: 0;
}

.platform-report-line {
    justify-content: flex-start;
    align-items: center;
    flex-wrap: wrap;
}

.integration-item {
    display: grid;
    gap: 14px;
    min-width: 0;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fbfcfb;
}

.integration-top,
.integration-meta,
.integration-tags {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    min-width: 0;
}

.integration-top h3,
.integration-top p,
.integration-item h4 {
    margin: 0;
}

.integration-top p {
    margin-top: 6px;
    color: var(--muted);
}

.integration-tags {
    flex: 0 0 auto;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.integration-meta {
    justify-content: flex-start;
    flex-wrap: wrap;
    color: #33403a;
    font-size: .9rem;
}

.integration-meta a {
    font-weight: 900;
    color: #26312d;
}

.integration-columns {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    min-width: 0;
}

.mini-list {
    display: grid;
    gap: 6px;
    margin: 10px 0 0;
    padding-left: 18px;
    color: var(--muted);
}

.integration-form {
    display: grid;
    grid-template-columns: minmax(170px, .75fr) minmax(150px, .55fr) minmax(220px, .9fr) minmax(260px, 1.45fr) auto;
    align-items: end;
    gap: 12px;
    min-width: 0;
    margin: 0;
}

.integration-config {
    min-width: 0;
}

.integration-config textarea {
    min-height: 132px;
    font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
    font-size: .86rem;
}

.property-grid {
    display: grid;
    gap: 16px;
    margin-top: 18px;
}

.property-flow-note,
.property-zone {
    display: grid;
    gap: 12px;
    min-width: 0;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
}

.property-flow-note {
    margin-bottom: 16px;
    background: #f7f9f8;
}

.property-flow-note p {
    margin: 0;
    color: var(--muted);
}

.property-flow-steps {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    min-width: 0;
}

.property-flow-steps span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    color: var(--text);
    font-weight: 750;
}

.property-flow-steps strong {
    color: var(--accent);
}

.property-create-zone {
    margin-bottom: 18px;
}

.property-zone-head,
.property-zone-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    min-width: 0;
}

.property-zone-head h3,
.property-zone-head p,
.property-zone-heading small {
    margin: 0;
}

.property-zone-head > div,
.property-zone-heading > div {
    min-width: 0;
}

.property-list-head {
    margin-top: 4px;
}

.property-zone-heading {
    align-items: center;
    justify-content: flex-start;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #f7f9f8;
}

.property-zone-heading small {
    color: var(--muted);
}

.property-card {
    display: grid;
    gap: 14px;
    min-width: 0;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fbfcfb;
}

.property-card-head,
.property-integration-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    min-width: 0;
}

.property-card-head h3,
.property-card-head p,
.property-integrations h4 {
    margin: 0;
}

.property-form,
.property-integration-form {
    display: grid;
    gap: 12px;
    min-width: 0;
    margin: 0;
}

.property-form .grid-2 .is-wide,
.property-create-form .grid-2 .is-wide {
    grid-column: 1 / -1;
}

.property-integration-form .property-zone-heading {
    grid-column: 1 / -1;
}

.property-integrations {
    display: grid;
    gap: 10px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
}

.panel-head.is-tight {
    margin-bottom: 2px;
}

.property-integration-row {
    align-items: center;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fbfcfb;
}

.property-integration-row > span:first-child {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.property-integration-row small {
    color: var(--muted);
    overflow-wrap: anywhere;
}

.property-integration-row form {
    margin: 0;
}

.property-integration-form {
    grid-template-columns: minmax(150px, .65fr) minmax(280px, 1.35fr) minmax(140px, .55fr) auto;
    align-items: end;
}

.checkbox-card {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 48px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    color: #111614;
    font-weight: 900;
}

.checkbox-card input {
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
}

.badge.is-dark {
    color: #fff;
    border-color: var(--text);
    background: var(--text);
}

.property-workspace-panel {
    display: grid;
    gap: 22px;
}

.property-hero-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 520px);
    gap: 24px;
    align-items: stretch;
    min-width: 0;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: linear-gradient(135deg, #fff 0%, #f7f9f8 100%);
}

.property-hero-panel h2,
.property-hero-panel p {
    margin: 0;
}

.property-hero-panel p:not(.eyebrow) {
    max-width: 780px;
    color: var(--muted);
}

.property-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.property-score-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    min-width: 0;
}

.property-score-grid article {
    min-width: 0;
    min-height: 112px;
    padding: 15px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
}

.property-score-grid span,
.property-status-card p {
    color: var(--muted);
}

.property-score-grid span,
.property-status-card strong,
.property-platform-tile strong {
    display: block;
}

.property-score-grid span {
    margin-bottom: 16px;
    font-size: .78rem;
    font-weight: 950;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.property-score-grid strong {
    display: block;
    color: var(--text);
    font-size: clamp(2rem, 4vw, 2.7rem);
    line-height: 1;
}

.property-status-overview {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
    min-width: 0;
}

.property-status-card {
    min-width: 0;
    padding: 15px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    box-shadow: 0 14px 35px rgba(10, 20, 20, .05);
}

.property-status-card strong {
    margin-bottom: 6px;
    color: var(--text);
    font-size: 1rem;
}

.property-status-card p {
    min-height: 42px;
    margin: 0 0 12px;
    font-size: .88rem;
}

.property-workspace-grid {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 18px;
    align-items: start;
    min-width: 0;
}

.property-side-nav,
.property-add-panel,
.property-section-block,
.property-map-panel,
.property-card-v2,
.property-location-row {
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
}

.property-side-nav {
    position: sticky;
    top: 112px;
    display: grid;
    gap: 14px;
    padding: 16px;
}

.property-side-nav h3,
.property-side-nav p {
    margin: 0;
}

.property-side-list,
.property-location-list,
.property-main-column {
    display: grid;
    gap: 12px;
    min-width: 0;
}

.property-side-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-width: 0;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    color: var(--text);
    background: #f8faf9;
    text-decoration: none;
}

.property-side-item.is-active {
    border-color: var(--text);
    background: #fff;
}

.property-side-item span:first-child {
    min-width: 0;
}

.property-side-item strong,
.property-side-item small {
    display: block;
}

.property-side-item small {
    overflow: hidden;
    color: var(--muted);
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.property-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.property-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    padding: 5px 10px;
    border-radius: 999px;
    color: var(--muted);
    background: #f1f5f3;
    font-size: .78rem;
    font-weight: 950;
    white-space: nowrap;
}

.property-chip.is-on {
    color: #087d45;
    background: #e7f7ef;
}

.property-chip.is-waiting {
    color: #9a6a00;
    background: #fff6dd;
}

.property-section-block,
.property-map-panel {
    padding: 18px;
}

.property-modal-overlay,
.form-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 90;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
    overflow: auto;
    background: rgba(4, 6, 5, .52);
    backdrop-filter: blur(5px);
}

.property-modal-overlay[hidden],
.form-modal-overlay[hidden] {
    display: none;
}

.property-modal,
.form-modal {
    width: min(920px, 100%);
    max-height: calc(100dvh - 36px);
    overflow: auto;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    box-shadow: 0 28px 70px rgba(0, 0, 0, .28);
}

.property-modal-head,
.form-modal-head {
    position: sticky;
    top: 0;
    z-index: 2;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    min-width: 0;
    padding: 18px 20px 14px;
    border-bottom: 1px solid var(--line);
    background: #fff;
}

.property-modal-head h3,
.form-modal-head h3 {
    margin: 8px 0 0;
}

.property-modal-head .icon-button,
.form-modal-head .icon-button {
    flex: 0 0 auto;
    width: 44px;
    min-width: 44px;
    height: 44px;
    border-color: var(--line);
    background: #fff;
    color: var(--ink);
    font-size: 1.55rem;
    line-height: 1;
    box-shadow: var(--shadow-soft);
}

.property-modal form,
.form-modal form {
    display: grid;
    gap: 16px;
    padding: 20px;
}

.property-add-panel > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    cursor: pointer;
    list-style: none;
}

.property-add-panel > summary::-webkit-details-marker,
.property-edit-details > summary::-webkit-details-marker,
.property-row-details > summary::-webkit-details-marker {
    display: none;
}

.property-add-panel > summary strong,
.property-edit-details > summary,
.property-row-details > summary {
    color: var(--text);
    font-weight: 950;
}

.property-add-panel > form {
    margin-top: 16px;
}

.property-section-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 14px;
    min-width: 0;
    margin-bottom: 14px;
}

.property-section-head h3,
.property-section-head p,
.property-map-panel h3,
.property-map-panel p {
    margin: 0;
}

.property-section-head p,
.property-map-panel p {
    color: var(--muted);
}

.property-card-v2 {
    overflow: hidden;
}

.property-card-v2 + .property-card-v2 {
    margin-top: 14px;
}

.property-card-v2.is-primary {
    border-color: var(--text);
}

.property-card-v2-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    min-width: 0;
    padding: 18px;
    border-bottom: 1px solid var(--line);
    background: #fbfcfb;
}

.property-title-line {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.property-title-line > span:last-child {
    min-width: 0;
}

.property-title-line h3,
.property-title-line p {
    margin: 0;
}

.property-title-line a,
.property-title-line small {
    display: block;
    overflow: hidden;
    max-width: 100%;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.property-type-icon {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 46px;
    height: 46px;
    border-radius: var(--radius);
    color: #fff;
    background: var(--text);
    font-weight: 950;
}

.property-type-icon.is-maps {
    color: #087d45;
    background: #e7f7ef;
}

.property-platform-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    min-width: 0;
    padding: 18px;
}

.property-platform-tile {
    display: grid;
    gap: 8px;
    align-content: start;
    min-width: 0;
    min-height: 142px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
}

.property-platform-tile.is-connected {
    border-color: rgba(8, 125, 69, .25);
    background: #f2fbf6;
}

.property-platform-tile.is-missing {
    background: #f8faf9;
}

.property-platform-tile small {
    color: var(--muted);
    overflow-wrap: anywhere;
}

.property-platform-tile-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: auto;
}

.property-platform-tile-foot form {
    margin: 0;
}

.property-edit-details,
.property-row-details {
    margin: 0 18px 18px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
}

.property-edit-details > form,
.property-row-details > form,
.property-row-details > p {
    margin-top: 12px;
}

.property-location-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 420px) auto;
    gap: 14px;
    align-items: center;
    padding: 15px;
}

.property-location-main {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.property-location-main > span:last-child {
    min-width: 0;
}

.property-location-main h4 {
    margin: 0 0 3px;
    color: var(--text);
}

.property-location-main small {
    display: block;
    overflow: hidden;
    color: var(--muted);
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.property-location-status {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.property-row-details {
    margin: 0;
}

.property-row-details[open] {
    grid-column: 1 / -1;
}

.property-map-panel {
    display: grid;
    gap: 14px;
}

.property-quick-map-form {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) minmax(160px, .75fr) minmax(260px, 1.35fr) minmax(130px, .55fr);
    gap: 10px;
    align-items: end;
    min-width: 0;
}

.property-quick-map-form label {
    min-width: 0;
}

.property-quick-map-form select {
    width: 100%;
}

.property-resource-field {
    position: relative;
}

.property-resource-picker {
    position: relative;
    display: block;
    min-width: 0;
}

.property-resource-search {
    width: 100%;
    min-height: 42px;
    margin: 8px 0 8px;
    padding: 9px 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #f7f9f8;
    color: var(--ink);
    font-weight: 800;
}

.property-resource-search::placeholder {
    color: var(--muted);
}

.property-resource-search:focus {
    border-color: var(--accent);
    outline: 2px solid rgba(217, 15, 31, .12);
    background: #fff;
}

.property-resource-results {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    z-index: 42;
    display: grid;
    gap: 4px;
    max-height: 280px;
    overflow: auto;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    box-shadow: var(--shadow);
}

.property-resource-results[hidden] {
    display: none;
}

.property-resource-result,
.property-resource-empty {
    display: block;
    width: 100%;
    min-width: 0;
    padding: 9px 10px;
    border: 0;
    border-radius: calc(var(--radius) - 4px);
    background: transparent;
    color: var(--ink);
    font: inherit;
    font-size: .86rem;
    font-weight: 850;
    line-height: 1.3;
    text-align: left;
    overflow-wrap: anywhere;
}

.property-resource-result {
    cursor: pointer;
}

.property-resource-result:hover,
.property-resource-result:focus-visible {
    background: #f4f7f5;
    outline: 0;
}

.property-resource-empty {
    color: var(--muted);
}

.property-quick-map-form .form-actions {
    grid-column: 1 / -1;
    justify-content: flex-end;
    min-width: 0;
}

.property-quick-map-form .form-actions .button {
    max-width: 260px;
}

@media (max-width: 1180px) {
    .property-hero-panel,
    .property-workspace-grid {
        grid-template-columns: 1fr;
    }

    .property-side-nav {
        position: static;
    }

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

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

    .property-location-row,
    .property-quick-map-form {
        grid-template-columns: 1fr 1fr;
    }

    .property-quick-map-form .form-actions {
        grid-column: 1 / -1;
    }
}

@media (max-width: 720px) {
    .property-hero-panel,
    .property-section-block,
    .property-map-panel {
        padding: 14px;
    }

    .property-modal-overlay,
    .form-modal-overlay {
        align-items: flex-end;
        padding: 8px;
    }

    .property-modal,
    .form-modal {
        width: 100%;
        max-height: calc(100dvh - 16px);
    }

    .property-modal-head,
    .form-modal-head {
        padding: 14px;
    }

    .property-modal form,
    .form-modal form {
        padding: 14px;
    }

    .report-form-modal-body {
        padding: 14px;
    }

    .report-email-modal .form-modal-head .icon-button {
        width: 44px;
        min-width: 44px;
        height: 44px;
    }

    .report-email-composer {
        padding: 12px;
    }

    .report-email-composer-head {
        flex-direction: column;
    }

    .report-email-composer-head .button {
        width: 100%;
    }

    .report-email-preview-body {
        padding: 5px;
    }

    .report-email-actions {
        bottom: -14px;
        margin: 0 -14px -14px;
        padding: 12px 14px;
    }

    .report-email-actions .button {
        min-height: 46px;
        height: auto;
        padding-top: 10px;
        padding-bottom: 10px;
        white-space: normal;
        line-height: 1.2;
        text-align: center;
    }

    .property-modal .form-actions,
    .form-modal .form-actions {
        width: 100%;
    }

    .property-score-grid,
    .property-status-overview,
    .property-platform-grid,
    .property-location-row,
    .property-quick-map-form {
        grid-template-columns: 1fr;
    }

    .property-card-v2-head,
    .property-section-head,
    .property-platform-tile-foot {
        align-items: flex-start;
        flex-direction: column;
    }

    .property-card-v2-head .integration-tags {
        justify-content: flex-start;
    }

    .property-location-main small,
    .property-title-line a,
    .property-title-line small,
    .property-side-item small {
        white-space: normal;
    }

    .property-platform-tile-foot .button,
    .property-row-details .button,
    .property-edit-details .button,
    .property-modal .button,
    .form-modal .button,
    .property-quick-map-form .button {
        max-width: none;
        width: 100%;
    }
}

.portal-body {
    min-height: 100vh;
    background: var(--bg);
}

.portal-header {
    position: sticky;
}

.portal-header-inner {
    width: min(1180px, calc(100% - 40px));
}

.portal-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 0;
}

.portal-nav a {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: .5rem .66rem;
    border-radius: var(--radius);
    color: #f7fbf8;
    font-size: .94rem;
    font-weight: 800;
    white-space: nowrap;
}

.portal-nav a:hover,
.portal-nav a:focus-visible {
    background: #fff;
    color: #050606;
    outline: 0;
}

.portal-account {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex: 0 0 auto;
    color: #d8ded9;
    font-size: .88rem;
    font-weight: 800;
}

.portal-account form {
    margin: 0;
}

.portal-main {
    display: grid;
    align-content: start;
    gap: 22px;
    width: min(1180px, calc(100% - 40px));
    min-width: 0;
    margin: 0 auto;
    padding: 26px 0;
}

.portal-hero {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    min-width: 0;
    padding: 26px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background:
        linear-gradient(135deg, rgba(5, 6, 6, .92), rgba(19, 25, 22, .88)),
        #050606;
    color: #fff;
    box-shadow: var(--shadow);
}

.portal-hero > * {
    min-width: 0;
}

.portal-hero h1 {
    margin: 0;
    font-size: 2rem;
    line-height: 1.08;
}

.portal-hero p:not(.eyebrow) {
    margin: 8px 0 0;
    color: #cdd7d2;
    font-weight: 800;
}

.portal-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    min-width: 0;
}

.portal-list {
    display: grid;
    gap: 10px;
    margin-top: 16px;
}

.portal-item,
.portal-approval > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    min-width: 0;
    padding: 13px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fbfcfb;
}

a.portal-item {
    transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease, background .16s ease;
}

a.portal-item:hover,
a.portal-item:focus-visible {
    border-color: #c8d2cd;
    background: #fff;
    box-shadow: var(--shadow-soft);
    transform: translateY(-1px);
    outline: 0;
}

.portal-item > span:first-child,
.portal-approval > summary > span:first-child {
    min-width: 0;
}

.portal-item strong,
.portal-approval strong {
    display: block;
    overflow-wrap: anywhere;
}

.portal-approval {
    min-width: 0;
}

.portal-approval > summary {
    cursor: pointer;
    list-style: none;
}

.portal-approval > summary::-webkit-details-marker {
    display: none;
}

.portal-decision {
    display: grid;
    gap: 12px;
    padding: 12px 4px 4px;
}

.portal-decision textarea {
    min-height: 94px;
}

.status-form select {
    min-width: 180px;
}

/* Email marketing: campaign cards keep the delivery flow readable without a wide action table. */
.email-campaigns-grid {
    grid-template-columns: minmax(0, 1fr) minmax(300px, 360px);
}

.email-marketing-campaigns .button {
    white-space: normal;
    text-overflow: clip;
}

.campaign-list {
    display: grid;
    gap: 14px;
}

.campaign-card {
    display: grid;
    gap: 16px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fbfcfb;
}

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

.campaign-badges {
    display: flex;
    flex: 0 0 auto;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 6px;
}

.campaign-card-copy {
    min-width: 0;
}

.campaign-card-copy .eyebrow {
    margin-bottom: 4px;
}

.campaign-card h3 {
    margin: 0;
    font-size: 1.04rem;
    overflow-wrap: anywhere;
}

.campaign-subject {
    margin: 5px 0 0;
    color: var(--muted);
    overflow-wrap: anywhere;
}

.campaign-meta,
.campaign-results {
    display: grid;
    margin: 14px 0 0;
}

.campaign-meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.campaign-meta > div {
    min-width: 0;
    padding: 9px 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.campaign-meta dt,
.campaign-results dt,
.campaign-status-form label > span {
    color: var(--muted);
    font-size: .72rem;
    font-weight: 900;
    letter-spacing: .02em;
    text-transform: uppercase;
}

.campaign-meta dd,
.campaign-results dd {
    margin: 4px 0 0;
    font-weight: 800;
    overflow-wrap: anywhere;
}

.campaign-results {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 1px;
    overflow: hidden;
    margin: 0;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--line);
}

.campaign-results > div {
    min-width: 0;
    padding: 10px 8px;
    background: #fff;
    text-align: center;
}

.campaign-results dd {
    font-size: 1.08rem;
}

.campaign-review-state {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 11px 12px;
    border: 1px solid #d6deda;
    border-radius: 8px;
    background: #f6f8f7;
}

.campaign-review-state small {
    color: var(--muted);
}

.campaign-review-state form {
    margin: 0 0 0 auto;
}

.campaign-actions {
    display: grid;
    grid-template-columns: minmax(250px, 1.2fr) minmax(230px, .9fr) auto;
    align-items: end;
    gap: 10px;
    padding-top: 2px;
}

.campaign-actions form {
    min-width: 0;
    margin: 0;
}

.campaign-queue-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 11px;
    border: 1px solid #d6deda;
    border-radius: 8px;
    background: #f1f6f3;
}

.campaign-action-copy {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.campaign-action-copy strong {
    font-size: .88rem;
}

.campaign-action-copy small {
    color: var(--muted);
    line-height: 1.35;
}

.campaign-queue-form .button {
    min-height: 38px;
}

.campaign-status-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 8px;
}

.campaign-status-form label {
    display: grid;
    gap: 5px;
    min-width: 0;
}

.campaign-status-form select {
    width: 100%;
    min-width: 0;
    min-height: 38px;
    padding: 7px 30px 7px 9px;
    font-size: .86rem;
}

.campaign-status-form .button,
.campaign-delete-form .button {
    min-height: 38px;
}

.campaign-delete-form .button {
    border-color: #efc9ce;
    color: var(--danger);
    box-shadow: none;
}

.campaign-delete-form .button:hover {
    border-color: #dfa9b0;
    background: var(--danger-bg);
    color: var(--danger);
    box-shadow: none;
}

.campaign-workflow {
    display: grid;
    gap: 7px;
    margin: 0 0 12px;
    padding: 11px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f6f8f7;
}

.campaign-workflow span {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #33403a;
    font-size: .84rem;
    font-weight: 800;
}

.campaign-workflow b {
    display: inline-grid;
    place-items: center;
    flex: 0 0 20px;
    width: 20px;
    height: 20px;
    border-radius: 999px;
    background: #dce8e0;
    color: #087045;
    font-size: .72rem;
}

.newsletter-draft-form .note-box {
    margin-top: 0;
}

.newsletter-draft-form .button {
    min-height: 46px;
}

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

.newsletter-automation-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

.newsletter-automation-summary > span {
    display: grid;
    gap: 4px;
    min-width: 0;
    padding: 11px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8faf9;
}

.newsletter-automation-summary small {
    color: var(--muted);
    font-size: .72rem;
    font-weight: 900;
    text-transform: uppercase;
}

.newsletter-automation-summary strong {
    overflow-wrap: anywhere;
}

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

.newsletter-settings-form > label,
.newsletter-language-options {
    display: grid;
    gap: 6px;
    min-width: 0;
    margin: 0;
}

.newsletter-language-options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
}

.newsletter-language-options legend {
    padding: 0 4px;
    font-weight: 800;
}

.newsletter-language-options label {
    display: flex;
    align-items: center;
    gap: 7px;
}

.newsletter-settings-form .form-actions {
    grid-column: 1 / -1;
}

.newsletter-safety-note {
    margin: 0;
    color: var(--muted);
    font-size: .9rem;
}

@media (max-width: 1180px) {
    .metric-grid,
    .metric-grid.is-compact {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .content-grid,
    .users-grid,
    .rules-grid,
    .portal-grid,
    .integration-columns,
    .business-impact-head,
    .growth-insights-grid {
        grid-template-columns: 1fr;
    }

    .business-impact-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

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

    #google-oauth > .rules-grid,
    #meta-oauth > .rules-grid {
        grid-template-columns: 1fr;
    }

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

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

    .integration-config,
    .integration-form .form-actions,
    .property-integration-form .form-actions {
        grid-column: 1 / -1;
    }

    .email-campaigns-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 860px) {
    .campaign-results {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .campaign-actions {
        grid-template-columns: 1fr;
    }

    .campaign-status-form {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .campaign-delete-form .button {
        width: 100%;
    }

    .campaign-card-head {
        align-items: stretch;
        flex-direction: column;
    }

    .campaign-badges {
        justify-content: flex-start;
    }

    .campaign-review-state form {
        width: 100%;
        margin-left: 0;
    }

    .campaign-review-state .button {
        width: 100%;
    }

    .newsletter-automation-summary,
    .newsletter-settings-form {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .newsletter-automation-summary,
    .newsletter-settings-form {
        grid-template-columns: 1fr;
    }

    .newsletter-language-options,
    .newsletter-settings-form .form-actions {
        grid-column: 1;
    }
}

@media (max-width: 1040px) {
    .impersonation-banner {
        align-items: stretch;
        flex-direction: column;
        top: 78px;
        padding: 10px 14px;
        text-align: center;
    }

    .impersonation-banner .button {
        width: 100%;
    }

    .flash-stack {
        top: 78px;
    }

    .section-tabs.is-sticky {
        top: 78px;
    }

    .crm-header-inner {
        position: relative;
        width: min(100% - 32px, 760px);
        min-height: 78px;
        padding: 12px 0;
    }

    .crm-brand {
        --webhat-logo-mark-size: 58px;
        --webhat-eye-dot-size: 2.9px;
        min-width: 196px;
        gap: 9px;
    }

    .crm-logo-mark,
    .crm-logo-mark img {
        width: 58px;
    }

    .crm-brand-name {
        font-size: 1.66rem;
    }

    .crm-brand-motto {
        font-size: .64rem;
        letter-spacing: .045em;
    }

    .crm-nav,
    .crm-global-nav,
    .crm-account,
    .portal-nav,
    .portal-account {
        display: none;
    }

    .crm-client-switcher {
        width: min(360px, 44vw);
        min-height: 48px;
        grid-template-columns: 38px minmax(0, 1fr);
        padding: 5px 10px 5px 5px;
    }

    .crm-client-switcher-logo {
        width: 38px;
        height: 38px;
    }

    .crm-client-switcher-status {
        display: none;
    }

    .crm-client-context-bar {
        top: 78px;
    }

    .crm-client-context-inner {
        width: 100%;
    }

    .crm-client-context-nav {
        width: 100%;
        min-height: 60px;
        padding: 0;
    }

    .crm-client-context-track {
        justify-content: flex-start;
        flex-wrap: nowrap;
        gap: 8px;
        min-height: 60px;
        overflow-x: auto;
        overflow-y: hidden;
        padding: 8px 14px;
        scrollbar-width: none;
        scroll-padding-inline: 14px;
        scroll-snap-type: x proximity;
        overscroll-behavior-inline: contain;
        -webkit-overflow-scrolling: touch;
    }

    .crm-client-context-track::-webkit-scrollbar {
        display: none;
    }

    .crm-client-nav-group {
        scroll-snap-align: start;
    }

    .crm-client-nav-layer {
        position: absolute;
        top: 0;
        right: 0;
        left: 0;
        z-index: 30;
        display: block;
        height: 0;
        overflow: visible;
        pointer-events: none;
    }

    .crm-client-nav-menu {
        min-width: min(230px, calc(100vw - 38px));
    }

    .crm-client-nav-menu.is-mobile-popover {
        position: absolute;
        top: 0;
        left: 0;
        z-index: 1;
        display: grid;
        gap: 4px;
        min-width: 0;
        max-width: calc(100vw - 24px);
        overflow-y: auto;
        overscroll-behavior: contain;
        pointer-events: auto;
    }

    .crm-client-nav-trigger,
    .crm-client-nav-toggle {
        min-height: 44px;
    }

    .crm-client-nav-inline-chevron {
        display: none;
    }

    .crm-client-nav-group.has-menu .crm-client-nav-trigger {
        border-right: 0;
        border-radius: 999px 0 0 999px;
    }

    .crm-client-nav-toggle {
        display: inline-flex;
        flex-basis: 44px;
        width: 44px;
        min-width: 44px;
        border-radius: 0 999px 999px 0;
    }

    .crm-client-nav-toggle .crm-client-nav-chevron {
        width: 19px !important;
        height: 19px !important;
    }

    .crm-mobile-client-trigger {
        width: 100%;
        min-height: 46px;
        border: 1px solid #263029;
        border-radius: var(--radius);
        background: #fff;
        color: #050606;
        padding: .68rem .8rem;
        font-weight: 900;
        text-align: left;
    }

    .crm-mobile-menu {
        display: block;
        margin-left: auto;
    }

    .crm-mobile-menu > summary {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        position: relative;
        z-index: 61;
        width: 46px;
        min-width: 46px;
        height: 46px;
        min-height: 46px;
        padding: 0;
        border: 1px solid #fff;
        border-radius: 999px;
        background: transparent;
        color: #f7fbf8;
        cursor: pointer;
        font-weight: 800;
        list-style: none;
    }

    .crm-mobile-menu > summary:focus-visible {
        outline: 2px solid #fff;
        outline-offset: 4px;
    }

    .crm-mobile-menu[open] > summary {
        border-color: #fff;
        background: #fff;
        color: #050606;
    }

    .crm-mobile-menu summary::-webkit-details-marker,
    .crm-mobile-submenu summary::-webkit-details-marker {
        display: none;
    }

    .mobile-menu-dot {
        position: relative;
        width: 12px;
        height: 12px;
        border-radius: 999px;
        background: #fff;
        animation: webhat-menu-dot-breathe 1.35s ease-in-out infinite;
        transform-origin: center;
    }

    .crm-mobile-menu[open] .mobile-menu-dot {
        width: 20px;
        height: 20px;
        border-radius: 0;
        background: transparent;
        animation: none;
    }

    .crm-mobile-menu[open] .mobile-menu-dot::before,
    .crm-mobile-menu[open] .mobile-menu-dot::after {
        content: "";
        position: absolute;
        top: 50%;
        left: 50%;
        width: 21px;
        height: 2px;
        border-radius: 999px;
        background: #050606;
        transform: translate(-50%, -50%) rotate(45deg);
    }

    .crm-mobile-menu[open] .mobile-menu-dot::after {
        transform: translate(-50%, -50%) rotate(-45deg);
    }

    .crm-mobile-menu > summary .mobile-menu-label {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }

    .crm-mobile-nav {
        position: absolute;
        left: 0;
        right: 0;
        top: 78px;
        z-index: 60;
        display: grid;
        grid-template-columns: 1fr;
        gap: 6px;
        max-height: calc(100vh - 120px);
        overflow: auto;
        padding: 10px;
        border: 1px solid #263029;
        border-radius: var(--radius);
        background: #070907;
        box-shadow: 0 20px 50px rgba(0, 0, 0, .38);
    }

    .crm-mobile-menu:not([open]) .crm-mobile-nav {
        display: none;
    }

    .crm-mobile-nav a,
    .crm-mobile-submenu summary {
        background: #111613;
        color: #f7fbf8;
        text-align: left;
    }

    .crm-mobile-submenu summary {
        display: flex;
        justify-content: space-between;
        cursor: pointer;
        list-style: none;
    }

    .crm-mobile-submenu summary::after {
        content: "+";
    }

    .crm-mobile-submenu[open] summary::after {
        content: "-";
    }

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

    .crm-mobile-submenu-links a {
        background: #0f1511;
        color: #d8ded9;
    }

    .crm-mobile-nav form {
        margin: 6px 0 0;
    }

    .crm-mobile-logout {
        width: 100%;
        min-height: 44px;
        gap: 8px;
        padding: .62rem;
        font-weight: 800;
    }
}

@keyframes webhat-menu-dot-breathe {
    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.55);
    }
}

@media (prefers-reduced-motion: reduce) {
    .crm-mobile-menu:not([open]) .mobile-menu-dot {
        animation: none;
    }
}

@media (max-width: 820px) {
    .crm-header-inner {
        gap: 10px;
    }

    .crm-brand {
        min-width: 0;
    }

    .crm-client-switcher {
        flex: 1 1 auto;
        width: auto;
        min-width: 0;
    }

    .crm-client-switcher-copy small {
        font-size: .62rem;
    }

    .crm-client-switcher-copy strong {
        font-size: .9rem;
    }

    .crm-client-nav-trigger,
    .crm-client-nav-menu a {
        min-height: 44px;
        padding: 7px 10px;
        font-size: .76rem;
    }

    .client-picker-overlay {
        align-items: flex-start;
        padding: 10px;
    }

    .client-picker-modal {
        max-height: calc(100dvh - 20px);
        border-radius: 12px;
    }

    .client-picker-head {
        align-items: flex-start;
        padding: 16px;
    }

    .client-picker-head h2 {
        font-size: 1.85rem;
    }

    .client-picker-head-actions {
        gap: 8px;
    }

    .client-picker-filter-tabs {
        gap: 3px;
        padding: 3px;
    }

    .client-picker-filter {
        min-height: 34px;
        padding: 0 10px;
        font-size: .74rem;
    }

    .client-picker-close {
        width: 42px;
        min-width: 42px;
        height: 42px;
    }

    .client-picker-search {
        padding: 14px 16px 8px;
    }

    .client-picker-list {
        max-height: calc(100dvh - 286px);
        padding: 8px 16px 16px;
    }

    .client-picker-status {
        margin: -6px 16px 8px;
    }

    .client-picker-choice {
        grid-template-columns: 42px minmax(0, 1fr);
        gap: 12px;
        min-height: 72px;
        padding: 11px 12px;
    }

    .client-picker-choice-status {
        grid-column: 2;
        justify-self: start;
        width: fit-content;
        margin-top: -4px;
    }

    .client-picker-foot {
        display: grid;
        gap: 10px;
        padding: 14px 16px 16px;
    }

    .client-picker-actions,
    .client-picker-actions .button {
        width: 100%;
    }

    .client-picker-foot p {
        max-width: none;
        text-align: left;
    }

    .client-lookup-results {
        width: 100%;
        max-width: calc(100vw - 32px);
    }

    .main {
        width: min(100% - 28px, 760px);
        padding: 16px 0;
    }

    .topbar,
    .toolbar,
    .panel-head,
    .client-hero,
    .form-actions {
        align-items: flex-start;
        flex-direction: column;
    }

    .toolbar,
    .toolbar form,
    .form-actions,
    .form-actions .button,
    .toolbar .button {
        width: 100%;
    }

    .metric-grid,
    .metric-grid.is-compact,
    .filters,
    .grid-2,
    .user-edit-grid,
    .metric-row,
    .integration-form,
    .report-flow-grid,
    .report-form-steps,
    .report-source-grid,
    .business-impact-head,
    .business-impact-grid,
    .growth-insights-grid,
    .report-summary-card-grid,
    .report-metrics-panel .report-metric-section > .list {
        grid-template-columns: 1fr;
    }

    .business-impact-total {
        justify-items: start;
    }

    .business-impact-total strong {
        text-align: left;
    }

    .metric-month-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .metric-month-tabs button {
        flex: 1 0 max-content;
        min-width: 168px;
    }

    .growth-insight-values {
        grid-template-columns: 1fr;
    }

    .integration-top,
    .integration-meta {
        align-items: flex-start;
        flex-direction: column;
    }

    .integration-tags {
        justify-content: flex-start;
    }

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

    .panel,
    .client-hero,
    .metric-card {
        padding: 16px;
    }

    .section-title-line,
    .report-work-card,
    .report-advanced-editor > summary {
        align-items: flex-start;
        flex-direction: column;
    }

    .report-flow-grid article {
        grid-template-columns: 1fr;
    }

    .report-flow-grid article .button {
        grid-column: auto;
        width: 100%;
    }

    .report-context-section,
    .report-create-sync,
    .report-preview-section,
    .report-narrative-editor,
    .report-advanced-editor {
        padding: 14px;
    }

    .report-form-steps {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 6px;
    }

    .report-form-steps li {
        justify-content: center;
        min-height: 44px;
        gap: 4px;
        padding: 6px 4px;
    }

    .report-step-number {
        width: 23px;
        height: 23px;
        font-size: .68rem;
    }

    .report-step-copy strong {
        font-size: .68rem;
    }

    .report-step-copy small {
        display: none;
    }

    .report-preview-stale-alert,
    .report-source-summary,
    .report-metric-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .report-preview-stale-alert .button,
    .report-source-summary .button,
    .report-metric-toolbar > *,
    .report-metric-toolbar .button {
        width: 100%;
        max-width: none;
    }

    .report-template-control {
        grid-template-columns: 1fr;
    }

    .report-metric-list {
        max-height: 55dvh;
    }

    .report-metric-row {
        grid-template-columns: 44px minmax(0, 1fr) auto;
        gap: 8px;
        padding: 10px;
    }

    .report-metric-value {
        grid-column: 2;
        text-align: left;
    }

    .report-metric-edit {
        grid-column: 3;
        grid-row: 1 / span 2;
    }

    .report-template-preview-copy {
        grid-template-columns: 1fr;
    }

    .report-previous-metric-row {
        align-items: flex-start;
        flex-direction: column;
        gap: 6px;
    }

    .report-previous-metric-row > strong {
        max-width: none;
        text-align: left;
    }

    .selected-client-field {
        grid-template-columns: 48px minmax(0, 1fr);
        gap: 12px;
    }

    .selected-client-logo {
        width: 48px;
        height: 48px;
    }

    .selected-client-status {
        grid-column: 2;
        justify-self: start;
    }

    .report-save-actions {
        bottom: max(10px, env(safe-area-inset-bottom));
        align-items: stretch;
        padding: 9px;
    }

    .report-save-copy {
        display: none;
    }

    .report-save-buttons {
        display: grid;
        grid-template-columns: minmax(0, .8fr) minmax(0, 1.4fr);
        justify-content: stretch;
        width: 100%;
        gap: 8px;
    }

    .report-save-buttons .button {
        min-height: 46px;
        padding-right: 10px;
        padding-left: 10px;
        line-height: 1.15;
        white-space: normal;
    }

    .report-cancel-action {
        display: none;
    }

    .table-wrap {
        margin: 0 -2px;
    }

    .login-identity h1 {
        font-size: 2.2rem;
    }

    .guest-body {
        padding: 18px;
    }

    .login-card {
        padding: 22px;
    }

    .portal-main {
        width: min(100% - 28px, 760px);
        padding: 16px 0;
    }

    .portal-header-inner {
        width: min(100% - 32px, 760px);
    }

    .portal-hero {
        align-items: flex-start;
        flex-direction: column;
        padding: 18px;
    }

    .portal-hero h1 {
        font-size: 1.58rem;
    }

    .report-block {
        padding: 12px;
    }

    .report-chart-svg {
        min-height: 190px;
    }

    .report-chart-legend span {
        width: 100%;
    }

    .portal-item,
    .portal-approval > summary {
        align-items: flex-start;
        flex-direction: column;
    }

    .portal-decision .row-actions {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 2px;
    }

    .client-profile-head {
        align-items: flex-start;
    }

    .client-logo-wrap,
    .client-logo {
        width: 72px;
        height: 72px;
    }

    .quick-actions {
        right: 16px;
        bottom: 16px;
    }

    .quick-fab {
        width: 58px;
        min-width: 58px;
        height: 58px;
        padding: 0;
    }

    .quick-fab-label {
        display: none;
    }

    .quick-overlay {
        align-items: end;
        padding: 8px;
    }

    .quick-modal {
        width: calc(100vw - 16px);
        max-height: calc(100dvh - 16px);
        padding: 14px;
    }

    .quick-modal-head {
        top: -14px;
        margin: -14px -14px 0;
        padding: 12px 14px 10px;
    }

    .quick-modal-head h2 {
        font-size: 1.18rem;
        line-height: 1.12;
    }

    .quick-modal-head .eyebrow {
        display: none;
    }

    .quick-panel-intro h3 {
        font-size: 1.04rem;
    }

    .quick-panel-intro p {
        font-size: .92rem;
    }

    .quick-tabs {
        gap: 6px;
    }

    .quick-tabs button {
        min-height: 34px;
        padding: 7px 10px;
        font-size: .9rem;
    }

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

    .quick-modal-head {
        align-items: flex-start;
    }

    .table-wrap th:last-child,
    .table-wrap td:last-child {
        min-width: 104px;
        padding-right: 8px;
        padding-left: 8px;
    }

    .table-wrap td:last-child .row-actions {
        gap: 6px;
        width: max-content;
        max-width: 96px;
    }

    .table-wrap .button[data-action-iconified],
    .table-wrap td:last-child .button[data-action-iconified],
    .hero-actions .button[data-action-iconified],
    .platform-actions .button[data-action-iconified],
    .list-row .row-actions .button[data-action-iconified],
    .portal-decision .row-actions .button[data-action-iconified],
    .compact-details > summary.button[data-action-iconified] {
        width: 38px;
        min-width: 38px;
        height: 38px;
        min-height: 38px;
        padding: 0;
        gap: 0;
        border-radius: var(--radius);
    }

    .table-wrap .button[data-action-iconified] .mobile-action-icon,
    .table-wrap td:last-child .button[data-action-iconified] .mobile-action-icon,
    .hero-actions .button[data-action-iconified] .mobile-action-icon,
    .platform-actions .button[data-action-iconified] .mobile-action-icon,
    .list-row .row-actions .button[data-action-iconified] .mobile-action-icon,
    .portal-decision .row-actions .button[data-action-iconified] .mobile-action-icon,
    .compact-details > summary.button[data-action-iconified] .mobile-action-icon {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .table-wrap .button[data-action-iconified] .mobile-action-label,
    .table-wrap td:last-child .button[data-action-iconified] .mobile-action-label,
    .hero-actions .button[data-action-iconified] .mobile-action-label,
    .platform-actions .button[data-action-iconified] .mobile-action-label,
    .list-row .row-actions .button[data-action-iconified] .mobile-action-label,
    .portal-decision .row-actions .button[data-action-iconified] .mobile-action-label,
    .compact-details > summary.button[data-action-iconified] .mobile-action-label {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }

    .section-tabs {
        max-width: 100%;
        padding-bottom: 6px;
    }

    .platform-card-head,
    .platform-report-line,
    .property-card-head,
    .property-integration-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .platform-status-grid {
        grid-template-columns: 1fr;
    }

    .property-flow-steps {
        display: grid;
    }

    .property-flow-steps span {
        border-radius: var(--radius);
    }

    .property-zone-head,
    .property-zone-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .platform-actions {
        display: flex;
        flex-wrap: nowrap;
        max-width: 100%;
        overflow-x: auto;
        padding-bottom: 2px;
    }

    .property-integration-form {
        grid-template-columns: 1fr;
    }

    .property-integration-row .button {
        min-width: 96px;
    }

    .section-tabs.is-sticky {
        margin-right: -14px;
        margin-left: -14px;
        padding-right: 14px;
        padding-left: 14px;
    }

    .onboarding-table-wrap {
        overflow-x: visible;
        max-width: 100%;
    }

    .mobile-card-table,
    .table-wrap .mobile-card-table {
        width: 100%;
        min-width: 0;
        table-layout: auto;
    }

    .onboarding-table th,
    .onboarding-table td,
    .onboarding-table th:nth-child(1),
    .onboarding-table td:nth-child(1),
    .onboarding-table th:nth-child(2),
    .onboarding-table td:nth-child(2),
    .onboarding-table th:nth-child(3),
    .onboarding-table td:nth-child(3),
    .onboarding-table th:nth-child(4),
    .onboarding-table td:nth-child(4) {
        width: 100%;
        min-width: 0;
    }

    .mobile-card-table th,
    .mobile-card-table td,
    .mobile-card-table th:nth-child(n),
    .mobile-card-table td:nth-child(n) {
        width: 100%;
        min-width: 0;
    }

    .mobile-card-table thead {
        display: none;
    }

    .mobile-card-table tbody {
        display: grid;
        gap: 10px;
        padding: 10px;
        width: 100%;
        min-width: 0;
    }

    .mobile-card-table tr {
        display: block;
        width: 100%;
        min-width: 0;
        overflow: hidden;
        border: 1px solid var(--line);
        border-radius: var(--radius);
        background: #fff;
    }

    .mobile-card-table tr:hover {
        background: #fff;
    }

    .mobile-card-table td,
    .mobile-card-table td:last-child {
        position: static;
        display: block;
        width: 100%;
        max-width: 100%;
        min-width: 0;
        padding: 10px 12px;
        border-bottom: 1px solid var(--line);
        background: #fff;
        box-shadow: none;
        text-align: left;
        white-space: normal;
    }

    .mobile-card-table td:last-child {
        border-bottom: 0;
    }

    .mobile-card-table td::before {
        content: attr(data-label);
        display: block;
        margin-bottom: 4px;
        color: var(--muted);
        font-size: .72rem;
        font-weight: 900;
        letter-spacing: .02em;
        text-transform: uppercase;
    }

    .mobile-card-table td:last-child form,
    .mobile-card-table .row-actions,
    .mobile-card-table td:last-child .row-actions {
        display: grid;
        width: 100%;
        max-width: none;
        gap: 8px;
        justify-content: stretch;
    }

    .mobile-card-table .row-actions input,
    .mobile-card-table .row-actions select,
    .mobile-card-table .onboarding-status-select,
    .mobile-card-table .onboarding-notes-input {
        width: 100%;
    }

    .mobile-card-table .row-actions .button[data-action-iconified] {
        justify-self: end;
    }

    .automation-table-wrap td:last-child .automation-row-actions {
        grid-template-columns: 1fr;
        max-width: none;
    }

    .automation-table-wrap .automation-row-actions .button[data-action-iconified] {
        justify-self: start;
    }

    .table-wrap.automation-report-table-wrap .mobile-card-table td:last-child {
        width: 100%;
        min-width: 0;
    }

    .table-wrap.automation-report-table-wrap .mobile-card-table td:last-child .row-actions {
        width: 100%;
        max-width: none;
    }

    .onboarding-step-cell strong,
    .onboarding-step-cell small,
    .onboarding-table-wrap .note-box {
        min-width: 0;
        overflow-wrap: anywhere;
    }

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

    .crm-pagination-summary {
        text-align: center;
    }

    .crm-pagination-links {
        justify-content: center;
    }

    .crm-page-control.is-direction {
        flex: 1 1 96px;
    }
}

@media (max-width: 460px) {
    .report-form-steps li {
        flex-direction: column;
        gap: 3px;
        min-height: 58px;
        padding: 6px 3px;
    }

    .report-step-copy strong {
        overflow-wrap: normal;
        white-space: nowrap;
    }

    .crm-brand {
        min-width: 0;
    }

    .crm-brand-copy {
        display: none;
    }

    .crm-logo-mark,
    .crm-logo-mark img {
        width: 50px;
    }

    .crm-client-switcher {
        grid-template-columns: 34px minmax(0, 1fr);
        min-height: 44px;
        gap: 8px;
    }

    .crm-client-switcher-logo {
        width: 34px;
        height: 34px;
    }

    .crm-mobile-menu > summary {
        width: 46px;
        min-width: 46px;
        justify-content: center;
        padding-right: 0;
        padding-left: 0;
    }

    .crm-mobile-menu > summary .mobile-menu-label {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }
}
