:root {
    color-scheme: light;
    --company-page: #f4f7f8;
    --company-panel: #ffffff;
    --company-soft: #f8faf9;
    --company-text: #142129;
    --company-muted: #63737b;
    --company-line: #d8e2e0;
    --company-strong-line: #c4d2cf;
    --company-brand: #0f766e;
    --company-brand-dark: #115e59;
    --company-brand-soft: #e7f5f2;
    --company-warn: #b45309;
    --company-warn-soft: #fff7ed;
    --company-danger: #b42318;
    --company-danger-soft: #fff1f0;
    --company-shadow: 0 18px 46px rgba(20, 33, 41, 0.08);
    --company-sidebar-width: 264px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    overflow-x: hidden;
    background: var(--company-page);
    color: var(--company-text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
    color: inherit;
}

.company-auth-page {
    display: grid;
    place-items: center;
    padding: 24px;
    background:
        linear-gradient(135deg, rgba(15, 118, 110, 0.12), rgba(248, 250, 249, 0.88)),
        var(--company-page);
}

.company-auth-shell {
    width: min(100%, 440px);
}

.company-auth-panel {
    display: grid;
    gap: 24px;
    border: 1px solid var(--company-line);
    border-radius: 8px;
    background: var(--company-panel);
    padding: 30px;
    box-shadow: var(--company-shadow);
}

.company-auth-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 12px;
    margin-bottom: 20px;
}

.company-auth-logo {
    display: block;
    width: 120px;
    max-width: 100%;
    height: auto;
    margin: 0 auto;
}

.company-auth-brand > div {
    width: 100%;
}

.company-auth-brand .company-muted-label {
    margin: 0 0 6px;
    text-align: center;
}



.company-auth-brand h1,
.company-heading h1,
.company-panel-heading h2 {
    margin: 0;
    letter-spacing: 0;
}

.company-auth-brand h1 {
    font-size: 2rem;
    line-height: 1.08;
}

.company-muted-label,
.company-topbar-subtitle,
.company-brand-context {
    color: var(--company-muted);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.company-alert {
    border: 1px solid #fecaca;
    border-radius: 8px;
    background: var(--company-danger-soft);
    padding: 12px 14px;
    color: var(--company-danger);
    font-size: 0.93rem;
    font-weight: 750;
}

.company-login-form,
.company-field,
.company-brand-copy,
.company-sidebar-account,
.company-panel-heading {
    display: grid;
    gap: 10px;
}

.company-auth-copy {
    margin: -8px 0 0;
    color: var(--company-muted);
    font-size: 0.94rem;
    font-weight: 650;
    line-height: 1.6;
    text-align: center;
}

.company-field label {
    color: #344852;
    font-size: 0.92rem;
    font-weight: 800;
}

.company-field input {
    width: 100%;
    min-height: 46px;
    border: 1px solid var(--company-line);
    border-radius: 8px;
    background: #ffffff;
    padding: 0 12px;
    color: var(--company-text);
    font: inherit;
}

.company-field input:focus {
    border-color: var(--company-brand);
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.16);
    outline: none;
}

.company-password-wrap {
    position: relative;
}

.company-password-wrap input {
    padding-right: 52px;
}

.company-password-toggle,
.company-icon-button {
    display: inline-grid;
    place-items: center;
    border: 1px solid var(--company-line);
    border-radius: 8px;
    background: #ffffff;
    color: var(--company-brand-dark);
    cursor: pointer;
    transition: transform 140ms ease, border-color 140ms ease, background 140ms ease;
}

.company-password-toggle:hover,
.company-password-toggle:focus-visible,
.company-icon-button:hover,
.company-icon-button:focus-visible {
    border-color: var(--company-brand);
    background: var(--company-brand-soft);
    transform: translateY(-1px);
    outline: none;
}

.company-password-toggle {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 36px;
    height: 36px;
}

.company-password-toggle span {
    width: 17px;
    height: 11px;
    border: 2px solid currentColor;
    border-radius: 50%;
    position: relative;
}

.company-password-toggle span::after {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: currentColor;
    content: "";
    transform: translate(-50%, -50%);
}

.company-primary-button,
.company-secondary-button {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    border: 1px solid transparent;
    border-radius: 8px;
    padding: 0 16px;
    font-weight: 850;
    text-decoration: none;
    cursor: pointer;
}

.company-primary-button {
    width: 100%;
    background: var(--company-brand);
    color: #ffffff;
}

.company-primary-button:hover,
.company-primary-button:focus-visible {
    background: var(--company-brand-dark);
    outline: none;
}

.company-secondary-button {
    border-color: var(--company-line);
    background: #ffffff;
    color: var(--company-brand-dark);
}

.company-secondary-button:hover,
.company-secondary-button:focus-visible {
    border-color: var(--company-brand);
    background: var(--company-brand-soft);
    outline: none;
}

.company-shell {
    display: flex;
}

.company-backdrop {
    position: fixed;
    inset: 0;
    z-index: 30;
    background: rgba(20, 33, 41, 0.44);
}

.company-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 40;
    display: flex;
    width: var(--company-sidebar-width);
    height: 100vh;
    min-height: 100vh;
    flex-direction: column;
    overflow-x: hidden;
    overflow-y: auto;
    border-right: 1px solid var(--company-line);
    background: #ffffff;
    transition: transform 180ms ease;
    overscroll-behavior: contain;
    scrollbar-width: thin;
}

.company-sidebar-brand {
    display: grid;
    min-height: 76px;
    align-items: center;
    justify-items: center;
    gap: 0;
    padding: 14px 18px;
    border-bottom: 1px solid var(--company-line);
}

.company-sidebar-brand .company-brand-logo {
    width: min(178px, 100%);
    height: 46px;
}

.company-brand-name {
    font-size: 1rem;
    font-weight: 950;
}

.company-sidebar-identity {
    display: grid;
    align-items: center;
    justify-items: center;
    margin: 12px 14px;
    border: 1px solid var(--company-line);
    border-radius: 8px;
    background: var(--company-soft);
    padding: 12px 10px;
    text-align: center;
}

.company-sidebar-identity div,
.company-sidebar-account {
    min-width: 0;
}

.company-sidebar-identity strong,
.company-sidebar-account strong {
    display: block;
    overflow-wrap: anywhere;
}

.company-sidebar-identity span {
    display: block;
    margin-top: 3px;
    color: var(--company-muted);
    font-size: 0.85rem;
    font-weight: 750;
}

.company-sidebar-email {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.company-sidebar-name-only {
    font-size: 0.95rem;
    line-height: 1.25;
}

.company-sidebar-logo,
.company-avatar {
    width: 48px;
    height: 48px;
    flex: 0 0 auto;
    border-radius: 8px;
    object-fit: contain;
}

.company-sidebar-logo-only {
    width: min(164px, 100%);
    height: 56px;
}

.company-avatar-initials {
    display: inline-grid;
    place-items: center;
    background: var(--company-brand-soft);
    color: var(--company-brand-dark);
    font-weight: 950;
}

.company-nav {
    display: grid;
    gap: 5px;
    padding: 12px 12px 16px;
}

.company-nav-link {
    display: flex;
    min-height: 40px;
    align-items: center;
    gap: 10px;
    border-radius: 8px;
    padding: 0 10px;
    color: #344852;
    font-size: 0.92rem;
    font-weight: 800;
    text-decoration: none;
    transition: background 140ms ease, color 140ms ease, transform 140ms ease;
}

.company-nav-link:hover,
.company-nav-link:focus-visible {
    background: var(--company-soft);
    color: var(--company-brand-dark);
    transform: translateX(2px);
    outline: none;
}

.company-nav-link:focus-visible {
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.16);
}

.company-nav-link.is-active {
    background: var(--company-brand-soft);
    color: var(--company-brand-dark);
    box-shadow: inset 3px 0 0 var(--company-brand);
}

.company-nav-icon {
    display: inline-grid;
    width: 20px;
    height: 20px;
    flex: 0 0 auto;
    place-items: center;
}

.company-nav-icon svg,
.company-logout-link svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.company-sidebar-account {
    margin: auto 14px 16px;
    padding-top: 10px;
}

.company-logout-link,
.company-table-link {
    width: max-content;
    color: var(--company-brand-dark);
    font-weight: 850;
    text-decoration: none;
}

.company-logout-link {
    display: inline-flex;
    min-height: 34px;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--company-line);
    border-radius: 8px;
    background: #ffffff;
    padding: 0 10px;
    transition: border-color 140ms ease, box-shadow 140ms ease, color 140ms ease;
}

.company-logout-link:hover,
.company-logout-link:focus-visible,
.company-table-link:hover,
.company-table-link:focus-visible {
    border-color: var(--company-brand);
    background: var(--company-brand-soft);
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
    outline: none;
}

.company-frame {
    width: 100%;
    min-width: 0;
    margin-left: var(--company-sidebar-width);
}

.company-topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    min-height: 72px;
    align-items: center;
    gap: 16px;
    border-bottom: 1px solid var(--company-line);
    background: rgba(255, 255, 255, 0.95);
    padding: 0 28px;
    backdrop-filter: blur(14px);
}

.company-topbar-left {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 14px;
    justify-self: start;
}

.company-topbar-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 950;
}

.company-topbar-subtitle {
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.company-menu-button {
    display: none;
    width: 42px;
    height: 42px;
}

.company-menu-button span {
    width: 18px;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
}

.company-subscription-notice.is-active {
    color: var(--company-brand-dark);
}

.company-subscription-notice.is-upcoming {
    color: var(--company-warn);
}

.company-subscription-notice.is-locked {
    color: var(--company-danger);
}

.company-main {
    display: grid;
    gap: 18px;
    width: min(100%, 1180px);
    margin: 0 auto;
    padding: 22px;
}

.company-subscription-notice,
.company-heading,
.company-panel,
.company-metric {
    border: 1px solid var(--company-line);
    border-radius: 8px;
    background: var(--company-panel);
    box-shadow: 0 12px 30px rgba(20, 33, 41, 0.05);
}

.company-subscription-notice {
    display: grid;
    gap: 4px;
    padding: 10px 12px;
}

.company-subscription-notice p {
    margin: 0;
    color: #344852;
    font-weight: 700;
}

.company-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 18px;
}

.company-heading-copy {
    min-width: 0;
}

.company-heading h1 {
    margin-top: 4px;
    font-size: 1.75rem;
    line-height: 1.08;
}

.company-heading p,
.company-empty-state p {
    margin: 8px 0 0;
    color: var(--company-muted);
    font-weight: 650;
}

.company-hero-identity {
    display: inline-flex;
    min-width: 220px;
    align-items: center;
    gap: 12px;
    border: 1px solid var(--company-line);
    border-radius: 8px;
    background: var(--company-soft);
    padding: 12px;
}

.company-hero-logo {
    width: 62px;
    height: 62px;
    border-radius: 8px;
    object-fit: contain;
}

.company-hero-identity span,
.company-current-subscription span,
.company-metric span,
.company-detail-list dt {
    color: var(--company-muted);
    font-size: 0.84rem;
    font-weight: 800;
}

.company-hero-identity strong,
.company-current-subscription strong {
    display: block;
    margin-top: 4px;
    overflow-wrap: anywhere;
}

.company-metric-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.company-metric {
    display: grid;
    gap: 8px;
    min-height: 106px;
    padding: 18px;
}

.company-metric strong {
    font-size: 1.35rem;
    overflow-wrap: anywhere;
}

.company-panel-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.company-panel {
    padding: 22px;
}

.company-panel-heading {
    margin-bottom: 18px;
}

.company-panel-heading h2 {
    font-size: 1.25rem;
}

.company-detail-list {
    display: grid;
    gap: 14px;
    margin: 0;
}

.company-detail-list div {
    display: grid;
    grid-template-columns: minmax(120px, 0.45fr) minmax(0, 1fr);
    gap: 12px;
    border-top: 1px solid var(--company-line);
    padding-top: 14px;
}

.company-detail-list dd {
    margin: 0;
    color: #243943;
    font-weight: 750;
    overflow-wrap: anywhere;
}

.company-current-subscription {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
    gap: 14px;
    align-items: center;
}

.company-empty-state {
    display: grid;
    place-items: center;
    min-height: 210px;
    padding: 28px;
    text-align: center;
}

.company-empty-state strong {
    font-size: 1.2rem;
}

.company-table-wrap {
    overflow-x: auto;
}

.company-table {
    width: 100%;
    min-width: 760px;
    border-collapse: collapse;
}

.company-table th,
.company-table td {
    border-bottom: 1px solid var(--company-line);
    padding: 14px 12px;
    text-align: left;
    vertical-align: middle;
}

.company-table th {
    color: var(--company-muted);
    font-size: 0.78rem;
    font-weight: 900;
    text-transform: uppercase;
}

.company-table td {
    color: #243943;
    font-weight: 700;
}

.company-table td span {
    color: var(--company-muted);
}

.company-status-pill {
    display: inline-flex;
    min-height: 30px;
    align-items: center;
    border-radius: 8px;
    background: var(--company-brand-soft);
    padding: 0 10px;
    color: var(--company-brand-dark);
    font-size: 0.82rem;
    font-weight: 850;
}

.company-muted-text {
    color: var(--company-muted);
    font-weight: 750;
}

@media (max-width: 980px) {
    .company-sidebar {
        transform: translateX(-100%);
    }

    .company-sidebar-open .company-sidebar {
        transform: translateX(0);
    }

    .company-frame {
        margin-left: 0;
    }

    .company-menu-button {
        display: inline-grid;
    }

    .company-metric-grid,
    .company-panel-grid,
    .company-current-subscription {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 680px) {
    .company-auth-page {
        padding: 16px;
    }

    .company-auth-panel {
        padding: 22px;
    }

    .company-topbar {
        grid-template-columns: minmax(0, 1fr) auto;
        padding: 0 16px;
    }

    .company-main {
        padding: 18px 14px;
    }

    .company-subscription-notice,
    .company-heading {
        align-items: stretch;
        flex-direction: column;
    }

    .company-hero-identity {
        width: 100%;
        min-width: 0;
    }

    .company-metric-grid,
    .company-panel-grid,
    .company-current-subscription {
        grid-template-columns: 1fr;
    }

    .company-detail-list div {
        grid-template-columns: 1fr;
        gap: 4px;
    }
}


.dashboard-metric-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
}

.dashboard-message-metric small {
    color: var(--company-muted);
    font-size: 0.78rem;
    font-weight: 800;
}

.dashboard-panel-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.dashboard-status-line {
    display: inline-flex;
    min-height: 40px;
    align-items: center;
    gap: 10px;
    border: 1px solid var(--company-line);
    border-radius: 8px;
    background: var(--company-soft);
    padding: 0 12px;
    margin-bottom: 14px;
    color: #344852;
}

.dashboard-status-line span {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: currentColor;
}

.dashboard-status-connected {
    color: var(--company-brand-dark);
}

.dashboard-status-error,
.dashboard-status-not_configured {
    color: var(--company-danger);
}

.dashboard-status-configured {
    color: var(--company-warn);
}

.dashboard-compact-list div:first-child {
    border-top: 0;
    padding-top: 0;
}

.dashboard-feature-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.dashboard-feature-list li {
    display: inline-flex;
    min-height: 34px;
    align-items: center;
    border: 1px solid var(--company-line);
    border-radius: 8px;
    background: var(--company-brand-soft);
    padding: 0 10px;
    color: var(--company-brand-dark);
    font-size: 0.85rem;
    font-weight: 850;
}

.dashboard-small-empty {
    min-height: 150px;
    padding: 20px;
}

.dashboard-lock-state {
    display: grid;
    gap: 8px;
    border: 1px solid var(--company-line);
    border-radius: 8px;
    background: var(--company-soft);
    padding: 16px;
}

.dashboard-lock-state.is-open {
    border-color: #a7d8cf;
    background: var(--company-brand-soft);
    color: var(--company-brand-dark);
}

.dashboard-lock-state.is-locked {
    border-color: #fecaca;
    background: var(--company-danger-soft);
    color: var(--company-danger);
}

.dashboard-lock-state p {
    margin: 0;
    color: #344852;
    font-weight: 700;
}

.dashboard-section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.dashboard-message-list {
    display: grid;
    gap: 10px;
}

.dashboard-message-row {
    display: grid;
    grid-template-columns: 140px minmax(0, 1fr) minmax(170px, auto);
    gap: 14px;
    align-items: center;
    border: 1px solid var(--company-line);
    border-radius: 8px;
    background: var(--company-soft);
    padding: 14px;
}

.dashboard-message-direction,
.dashboard-message-body,
.dashboard-message-meta {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.dashboard-message-direction span,
.dashboard-message-body span,
.dashboard-message-meta time {
    color: var(--company-muted);
    font-size: 0.82rem;
    font-weight: 800;
}

.dashboard-message-direction strong,
.dashboard-message-body strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dashboard-message-meta {
    justify-items: end;
}

@media (max-width: 1180px) {
    .dashboard-metric-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 980px) {
    .dashboard-panel-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .dashboard-metric-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dashboard-message-row {
        grid-template-columns: 1fr;
    }

    .dashboard-message-meta {
        justify-items: start;
    }
}

/* Mobile and tablet safety layer. Keep the approved desktop layout unchanged. */
@media (max-width: 980px) {
    html {
        overflow-x: hidden;
    }

    .company-sidebar {
        height: 100dvh;
        min-height: 100dvh;
    }

    .company-main > *,
    .company-topbar-left,
    .company-topbar-actions,
    .company-heading-copy,
    .company-panel,
    .company-metric,
    .company-subscription-notice,
    .developer-api-panel,
    .cmp-panel,
    .tpl-panel,
    .analytics-panel {
        min-width: 0;
        max-width: 100%;
    }

    .company-table-wrap,
    .tpl-table-wrap,
    .cmp-table-wrap,
    .analytics-table-wrap,
    .cmp-report-table-wrap {
        max-width: 100%;
        overscroll-behavior-inline: contain;
    }

    .company-status-pill,
    .cmp-status,
    .tpl-badge,
    .contacts-badge,
    .optin-badge,
    .team-badge {
        max-width: 100%;
        overflow-wrap: anywhere;
        text-align: center;
        white-space: normal;
    }

    .live-chat-thread-header h2,
    .developer-api-head h1,
    .developer-api-head p,
    .developer-api-keybox code,
    .developer-api-endpoints code,
    .developer-api-panel pre,
    .cmp-upload strong,
    .cmp-file-summary strong,
    .cmp-media-selected strong,
    .cmp-media-library-item strong,
    .tpl-table td,
    .tpl-template-card strong {
        overflow-wrap: anywhere;
    }

    .developer-api-keybox code,
    .developer-api-endpoints code,
    .developer-api-copy-row,
    .developer-api-copy-row code,
    .developer-api-panel pre {
        min-width: 0;
        max-width: 100%;
    }
}

@media (max-width: 760px) {
    .company-topbar {
        min-height: 64px;
        gap: 8px;
        padding: 0 12px;
    }

    .company-topbar-left {
        gap: 10px;
    }

    .company-topbar-title {
        font-size: 0.95rem;
    }

    .company-main {
        gap: 14px;
        padding: 16px 12px;
    }

    .company-heading,
    .company-panel {
        padding: 16px;
    }

    .company-heading h1 {
        font-size: 1.75rem;
    }

    .company-heading p,
    .company-empty-state p {
        font-size: 0.94rem;
        line-height: 1.45;
    }

    .company-panel-heading {
        margin-bottom: 14px;
    }

    .company-metric {
        min-height: 0;
        padding: 14px;
    }

    .company-metric strong {
        font-size: 1.2rem;
    }

    .company-empty-state {
        min-height: 160px;
        padding: 20px 14px;
    }

    .company-nav-link {
        min-height: 44px;
    }

    .company-logout-link {
        min-height: 42px;
    }

    .company-table-wrap,
    .tpl-table-wrap,
    .cmp-table-wrap,
    .cmp-report-table-wrap {
        -webkit-overflow-scrolling: touch;
    }

    .cmp-table-wrap:not(.analytics-table-wrap) .cmp-table,
    .cmp-report-table-wrap .cmp-table {
        min-width: 680px;
    }

    .analytics-table-wrap {
        overflow: visible;
    }

    .analytics-table td {
        overflow-wrap: anywhere;
    }

    .analytics-chart-labels {
        gap: 6px;
        overflow-wrap: anywhere;
        text-align: center;
    }

    .contacts-card,
    .history-card,
    .tags-card,
    .optin-card,
    .team-card,
    .tpl-template-card {
        min-width: 0;
    }

    .contacts-pagination,
    .history-pagination,
    .tags-pagination,
    .optin-pagination,
    .team-pagination,
    .tpl-pagination {
        width: 100%;
    }

    .contacts-pagination span,
    .history-pagination span,
    .tags-pagination span,
    .optin-pagination span,
    .team-pagination span,
    .tpl-pagination span {
        text-align: center;
    }

    .contacts-modal-shell,
    .history-modal-shell,
    .tags-modal-shell,
    .optin-modal-shell,
    .team-modal-shell,
    .templates-modal-shell,
    .tpl-modal-shell,
    .cmp-modal,
    .cmp-list-modal {
        padding-bottom: calc(12px + env(safe-area-inset-bottom));
    }

    .developer-api-head {
        display: grid;
        gap: 12px;
        padding: 16px;
    }

    .developer-api-status {
        width: max-content;
        max-width: 100%;
        white-space: normal;
    }

    .developer-api-panel-head {
        min-width: 0;
    }

    .developer-api-endpoints div {
        min-width: 0;
    }

    .cmp-panel-header-actions,
    .cmp-report-toolbar,
    .cmp-report-pagination,
    .cmp-media-library-head,
    .cmp-step2-phone-head {
        min-width: 0;
    }

    .cmp-panel-header-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .cmp-table-filter,
    .cmp-report-actions {
        width: 100%;
    }

    .cmp-report-actions {
        justify-content: flex-start;
    }

    .cmp-report-pagination > div {
        width: 100%;
        justify-content: space-between;
    }

    .cmp-step2-phone-card,
    .cmp-preview-card {
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .company-account-button {
        width: 40px;
        min-height: 40px;
    }

    .company-metric-grid.dashboard-metric-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .analytics-segment {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .analytics-segment span {
        min-height: 38px;
        white-space: normal;
    }

    .analytics-segment label:nth-child(2) span {
        border-right: 0;
    }

    .analytics-segment label:nth-child(-n + 2) span {
        border-bottom: 1px solid #cfe3df;
    }

    .developer-api-panel,
    .developer-api-head {
        padding: 14px;
    }

    .live-chat-search,
    .live-chat-composer {
        padding-left: 10px;
        padding-right: 10px;
    }
}

@media (max-width: 360px) {
    .company-main {
        padding-right: 10px;
        padding-left: 10px;
    }

    .company-metric-grid.dashboard-metric-grid {
        grid-template-columns: 1fr;
    }

    .company-heading,
    .company-panel {
        padding: 14px;
    }

    .cmp-table-wrap:not(.analytics-table-wrap) .cmp-table,
    .cmp-report-table-wrap .cmp-table {
        min-width: 620px;
    }
}

@media (max-width: 520px) {
    .dashboard-metric-grid {
        grid-template-columns: 1fr;
    }
}

.live-chat-heading {
    align-items: center;
    padding: 14px 16px;
}

.live-chat-heading h1 {
    margin-top: 0;
    font-size: 1.35rem;
}

.live-chat-subscription-line {
    margin: 4px 0 0;
    font-size: 0.88rem;
    font-weight: 800;
}

.live-chat-subscription-line.is-active {
    color: var(--company-brand-dark);
}

.live-chat-subscription-line.is-upcoming {
    color: var(--company-warn);
}

.live-chat-subscription-line.is-locked {
    color: var(--company-danger);
}

.live-chat-refresh,
.live-chat-back,
.live-chat-close,
.live-chat-mark-read,
.live-chat-send {
    width: 42px;
    height: 42px;
    flex: 0 0 auto;
}

.live-chat-back span {
    width: 13px;
    height: 13px;
    border-left: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
}

.live-chat-mark-read span {
    width: 18px;
    height: 10px;
    border-left: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(-45deg) translateY(-2px);
}

.live-chat-send span {
    width: 0;
    height: 0;
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
    border-left: 16px solid currentColor;
    transform: translateX(2px);
}

.live-chat-alert.is-success {
    border-color: #a7d8cf;
    background: var(--company-brand-soft);
    color: var(--company-brand-dark);
}

.live-chat-alert.is-error {
    border-color: #fecaca;
    background: var(--company-danger-soft);
    color: var(--company-danger);
}

.live-chat-layout {
    display: grid;
    grid-template-columns: minmax(300px, 332px) minmax(0, 1fr);
    height: calc(100dvh - 220px);
    min-height: 320px;
    border: 1px solid var(--company-line);
    border-radius: 8px;
    background: var(--company-panel);
    box-shadow: 0 12px 30px rgba(20, 33, 41, 0.05);
    overflow: hidden;
}

.live-chat-list {
    display: flex;
    min-height: 0;
    min-width: 0;
    flex-direction: column;
    border-right: 1px solid var(--company-line);
    background: var(--company-soft);
}

.live-chat-search {
    display: grid;
    gap: 6px;
    padding: 10px 12px;
    border-bottom: 1px solid var(--company-line);
    background: #ffffff;
}

.live-chat-search-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.live-chat-search-head .company-muted-label {
    margin: 0;
}

.live-chat-search-head .live-chat-refresh {
    width: 34px;
    height: 34px;
}

.live-chat-search input,
.live-chat-composer textarea {
    width: 100%;
    border: 1px solid var(--company-line);
    border-radius: 8px;
    background: #ffffff;
    color: var(--company-text);
    font: inherit;
}

.live-chat-search input {
    min-height: 38px;
    padding: 0 10px;
}

.live-chat-composer textarea {
    min-height: 58px;
    max-height: 180px;
    resize: vertical;
    padding: 12px;
}

.live-chat-search input:focus,
.live-chat-composer textarea:focus {
    border-color: var(--company-brand);
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.16);
    outline: none;
}

.live-chat-conversation-list {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    flex: 1 1 0;
    min-height: 0;
    overflow-y: auto;
    padding: 8px;
}

.live-chat-conversation-list.is-empty {
    display: none;
}

.live-chat-conversation {
    display: grid;
    align-content: center;
    gap: 3px;
    flex: 0 0 70px;
    height: 70px;
    min-height: 70px;
    max-height: 70px;
    min-width: 0;
    overflow: hidden;
    border: 1px solid transparent;
    border-radius: 8px;
    background: #ffffff;
    padding: 9px 10px;
    color: var(--company-text);
    text-decoration: none;
    transition: border-color 140ms ease, transform 140ms ease, background 140ms ease;
}

.live-chat-conversation[hidden],
.live-chat-empty-list[hidden],
.live-chat-thread-placeholder[hidden],
.live-chat-layout.is-thread-closed .live-chat-thread > [hidden] {
    display: none !important;
}

.live-chat-conversation:hover,
.live-chat-conversation:focus-visible {
    border-color: var(--company-brand);
    background: var(--company-brand-soft);
    transform: translateY(-1px);
    outline: none;
}

.live-chat-conversation.is-active {
    border-color: var(--company-brand);
    background: var(--company-brand-soft);
}

.live-chat-contact-line {
    display: flex;
    min-width: 0;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.live-chat-contact-line strong,
.live-chat-conversation p,
.live-chat-preview-line time {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.live-chat-contact-line strong {
    min-width: 0;
    font-size: 0.92rem;
}

.live-chat-conversation span,
.live-chat-preview-line time {
    color: var(--company-muted);
    font-size: 0.82rem;
    font-weight: 800;
}

.live-chat-preview-line {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    align-items: center;
    min-width: 0;
}

.live-chat-conversation p {
    min-width: 0;
    margin: 0;
    color: #344852;
    font-size: 0.82rem;
    font-weight: 750;
}

.live-chat-unread {
    display: inline-grid;
    min-width: 24px;
    height: 24px;
    place-items: center;
    border-radius: 999px;
    background: var(--company-brand);
    color: #ffffff !important;
    font-size: 0.74rem !important;
}

.live-chat-thread {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    min-height: 0;
    min-width: 0;
    background: #ffffff;
}

.live-chat-thread-header {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 58px;
    border-bottom: 1px solid var(--company-line);
    padding: 10px 12px;
}

.live-chat-thread-header h2 {
    margin: 0 0 2px;
    font-size: 0.96rem;
}

.live-chat-thread-header div {
    min-width: 0;
    flex: 1;
}

.live-chat-thread-header div span {
    color: var(--company-muted);
    font-size: 0.86rem;
    font-weight: 800;
}

.live-chat-thread-header .live-chat-customer-details-button {
    flex: 0 0 auto;
}

.contacts-detail-modal.live-chat-customer-details-card {
    width: min(540px, 100%);
}

.live-chat-messages {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 0;
    overflow-y: auto;
    padding: 12px;
    background: #f7faf9;
}

.live-chat-message {
    display: flex;
}

.live-chat-message.is-outbound {
    justify-content: flex-end;
}

.live-chat-bubble {
    display: grid;
    gap: 5px;
    max-width: min(72%, 620px);
    border: 1px solid var(--company-line);
    border-radius: 8px;
    background: #ffffff;
    padding: 9px 10px;
    box-shadow: 0 8px 18px rgba(20, 33, 41, 0.05);
}

.live-chat-media-preview {
    display: grid;
    width: min(260px, 100%);
    gap: 8px;
    border: 1px solid var(--company-line);
    border-radius: 8px;
    background: var(--company-soft);
    padding: 6px;
    color: var(--company-text);
    cursor: pointer;
    font: inherit;
    text-align: left;
}

.live-chat-media-preview:hover,
.live-chat-media-preview:focus-visible {
    border-color: var(--company-brand);
    outline: none;
}

.live-chat-media-preview img {
    display: block;
    width: 100%;
    max-height: 220px;
    border-radius: 6px;
    object-fit: cover;
}

.live-chat-media-preview.is-pdf,
.live-chat-media-preview.is-file {
    grid-template-columns: 32px minmax(0, 1fr);
    align-items: center;
    min-height: 58px;
    padding: 10px;
}

.live-chat-media-preview.is-audio,
.live-chat-media-preview.is-video {
    width: min(320px, 100%);
    cursor: default;
}

.live-chat-media-preview.is-audio audio {
    display: block;
    width: 100%;
    height: 34px;
}

.live-chat-media-preview.is-video video {
    display: block;
    width: 100%;
    max-height: 220px;
    border-radius: 6px;
    background: #10252b;
}

.live-chat-media-preview.is-audio > span:last-child,
.live-chat-media-preview.is-video > span:last-child {
    display: block;
    width: 100%;
    overflow: hidden;
    font-size: 0.75rem;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.live-chat-file-preview-icon {
    display: inline-grid;
    width: 30px;
    height: 30px;
    place-items: center;
    border-radius: 7px;
    background: var(--company-brand-soft);
    color: var(--company-brand-dark);
}

.live-chat-file-preview-icon svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
}

.live-chat-media-preview > span:last-child {
    overflow: hidden;
    font-size: 0.8rem;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.live-chat-message.is-outbound .live-chat-bubble {
    border-color: #a7d8cf;
    background: var(--company-brand-soft);
}

.live-chat-type {
    color: var(--company-muted);
    font-size: 0.7rem;
    font-weight: 900;
    text-transform: uppercase;
}

.live-chat-bubble p {
    margin: 0;
    color: #243943;
    font-size: 0.9rem;
    line-height: 1.38;
    overflow-wrap: anywhere;
    white-space: pre-wrap;
}

.live-chat-bubble footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    color: var(--company-muted);
    font-size: 0.72rem;
    font-weight: 800;
}

.status-sent,
.status-delivered,
.status-read,
.status-failed,
.status-neutral {
    color: var(--company-muted);
}

.status-delivered,
.status-read {
    color: var(--company-brand-dark);
}

.status-failed {
    color: var(--company-danger);
}

.live-chat-composer {
    display: grid;
    gap: 5px;
    border-top: 1px solid var(--company-line);
    padding: 8px 10px 10px;
    background: #ffffff;
}

.live-chat-compose-label {
    margin: 0;
    font-size: 0.68rem;
}

.live-chat-attachment-status {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 8px;
    overflow: hidden;
}

.live-chat-attachment-status[hidden] {
    display: none;
}

.live-chat-compose-row {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr) 42px;
    gap: 7px;
    align-items: center;
}

.live-chat-message-field {
    position: relative;
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    min-height: 40px;
    align-items: center;
    border: 1px solid var(--company-line);
    border-radius: 21px;
    background: #f8fbfa;
    min-width: 0;
}

.live-chat-emoji-toggle,
.live-chat-attach {
    width: 34px;
    height: 34px;
    flex: 0 0 auto;
}

.live-chat-emoji-toggle {
    border: 0;
    background: transparent;
    font-size: 1.15rem;
}

.live-chat-emoji-toggle:hover,
.live-chat-emoji-toggle:focus-visible {
    border: 1px solid var(--company-line);
}

.live-chat-attach {
    position: relative;
    cursor: pointer;
    border-radius: 50%;
}

.live-chat-recording-controls {
    display: flex;
    align-items: center;
    gap: 4px;
}

.live-chat-recording-controls[hidden] {
    display: none;
}

.live-chat-record-button[hidden],
.live-chat-lock-note[data-live-chat-recording-notice][hidden],
.live-chat-lock-note[data-live-chat-ffmpeg-notice][hidden] {
    display: none;
}

.live-chat-record-button {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #ffffff;
    color: var(--company-brand-dark);
}

.live-chat-record-button svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

.live-chat-message-field textarea {
    min-height: 38px;
    max-height: 150px;
    overflow-y: hidden;
    border: 0;
    border-radius: 0 21px 21px 0;
    background: transparent;
    padding: 8px 12px 8px 0;
    resize: none;
    line-height: 1.35;
}

.live-chat-message-field textarea:focus {
    border: 0;
    box-shadow: none;
}

.live-chat-attach input {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.live-chat-attachment-name {
    max-width: min(240px, 50vw);
    overflow: hidden;
    color: var(--company-muted);
    font-size: 0.78rem;
    font-weight: 750;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.live-chat-attachment-preview {
    display: inline-flex;
    max-width: min(220px, 70vw);
}

.live-chat-attachment-preview[hidden] {
    display: none;
}

.live-chat-local-preview {
    display: inline-grid;
    grid-template-columns: 34px minmax(0, 1fr);
    align-items: center;
    gap: 7px;
    min-width: 0;
    max-width: 220px;
    min-height: 34px;
    border: 1px solid var(--company-line);
    border-radius: 7px;
    background: #ffffff;
    padding: 3px 7px 3px 3px;
    color: var(--company-ink);
    cursor: pointer;
    font: inherit;
    text-align: left;
}

.live-chat-local-preview:hover,
.live-chat-local-preview:focus-visible {
    border-color: var(--company-brand);
    outline: none;
}

.live-chat-local-preview img {
    display: block;
    width: 34px;
    height: 34px;
    border-radius: 5px;
    object-fit: cover;
}

.live-chat-local-preview > span:last-child {
    overflow: hidden;
    font-size: 0.76rem;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.live-chat-emoji-panel {
    position: absolute;
    bottom: 42px;
    left: 0;
    z-index: 5;
    display: grid;
    grid-template-columns: 1fr;
    gap: 4px;
    border: 1px solid var(--company-line);
    border-radius: 8px;
    background: #ffffff;
    padding: 6px;
    box-shadow: 0 12px 26px rgba(20, 33, 41, 0.16);
}

.live-chat-emoji-panel[hidden],
.live-chat-emoji-page[hidden] {
    display: none;
}

.live-chat-emoji-page {
    display: grid;
    grid-template-columns: repeat(4, 38px);
    gap: 4px;
}

.live-chat-emoji-panel button {
    width: 38px;
    height: 34px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    cursor: pointer;
    font-size: 1.1rem;
}

.live-chat-emoji-nav {
    display: flex;
    justify-content: center;
    gap: 4px;
    border-top: 1px solid var(--company-line);
    padding-top: 6px;
}

.live-chat-emoji-nav button {
    width: 28px;
    height: 26px;
    font-size: 0.9rem;
}

.live-chat-emoji-nav button.is-active {
    background: var(--company-brand-soft);
}

.live-chat-emoji-panel button:hover,
.live-chat-emoji-panel button:focus-visible {
    background: var(--company-brand-soft);
    outline: none;
}

.live-chat-recording-modal {
    position: fixed;
    inset: 0;
    z-index: 1210;
    display: grid;
    place-items: center;
    background: rgba(20, 33, 41, 0.72);
    padding: 18px;
}

.live-chat-recording-card {
    display: grid;
    grid-template-rows: auto auto minmax(190px, 1fr) auto;
    width: min(560px, 100%);
    max-height: min(720px, calc(100vh - 36px));
    overflow: hidden;
    border: 1px solid var(--company-line);
    border-radius: 10px;
    background: #ffffff;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.3);
}

.live-chat-recording-header,
.live-chat-recording-meta,
.live-chat-recording-footer {
    display: flex;
    align-items: center;
}

.live-chat-recording-header {
    justify-content: space-between;
    min-height: 50px;
    border-bottom: 1px solid var(--company-line);
    padding: 8px 10px 8px 14px;
    color: var(--company-ink);
}

.live-chat-recording-header .company-icon-button {
    width: 32px;
    height: 32px;
}

.live-chat-recording-meta {
    justify-content: space-between;
    gap: 12px;
    padding: 10px 14px;
    color: var(--company-muted);
    font-size: 0.82rem;
    font-weight: 800;
}

.live-chat-recording-meta time {
    color: var(--company-brand-dark);
    font-variant-numeric: tabular-nums;
}

.live-chat-recording-stage {
    display: grid;
    min-height: 190px;
    place-items: center;
    overflow: auto;
    background: #f4f8f8;
    padding: 14px;
}

.live-chat-recording-stage video,
.live-chat-recording-stage audio {
    display: block;
    width: min(100%, 520px);
    max-height: min(56vh, 430px);
    border-radius: 8px;
    background: #10252b;
}

.live-chat-recording-stage audio {
    background: transparent;
}

.live-chat-recording-footer {
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
    border-top: 1px solid var(--company-line);
    padding: 10px 12px;
}

.live-chat-recording-footer button {
    width: auto;
    min-height: 38px;
    padding: 0 14px;
}

.live-chat-media-viewer {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: grid;
    place-items: center;
    background: rgba(20, 33, 41, 0.72);
    padding: 20px;
}

.live-chat-media-viewer[hidden] {
    display: none;
}

.live-chat-media-viewer-card {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    width: min(920px, 100%);
    max-height: min(760px, calc(100vh - 40px));
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 10px;
    background: #ffffff;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.3);
}

.live-chat-media-viewer-toolbar {
    display: flex;
    align-items: center;
    gap: 6px;
    min-height: 48px;
    border-bottom: 1px solid var(--company-line);
    padding: 6px 8px 6px 14px;
}

.live-chat-media-viewer-title {
    flex: 1 1 auto;
    overflow: hidden;
    color: var(--company-ink);
    font-size: 0.86rem;
    font-weight: 850;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.live-chat-media-viewer-toolbar button {
    display: inline-grid;
    width: 32px;
    height: 32px;
    place-items: center;
    border: 1px solid var(--company-line);
    border-radius: 6px;
    background: #ffffff;
    color: var(--company-ink);
    cursor: pointer;
    font: inherit;
    font-weight: 850;
}

.live-chat-media-viewer-toolbar button:hover,
.live-chat-media-viewer-toolbar button:focus-visible {
    border-color: var(--company-brand);
    outline: none;
}

.live-chat-media-viewer-stage {
    display: grid;
    min-height: 220px;
    place-items: center;
    overflow: auto;
    background: #f4f8f8;
    padding: 18px;
}

.live-chat-media-viewer-stage img {
    display: block;
    max-width: 100%;
    max-height: calc(100vh - 150px);
    transform-origin: center center;
}

.live-chat-media-viewer-stage iframe,
.live-chat-media-viewer-stage video {
    width: min(860px, 90vw);
    height: min(680px, 72vh);
    border: 0;
    background: #ffffff;
}

.live-chat-crop-stage {
    position: relative;
}

.live-chat-crop-image-wrap {
    position: relative;
    display: block;
    max-width: 100%;
    max-height: min(62vh, 560px);
    line-height: 0;
    touch-action: none;
}

.live-chat-crop-image {
    display: block;
    width: auto;
    max-width: min(820px, calc(100vw - 80px));
    max-height: min(62vh, 560px);
    object-fit: contain;
    user-select: none;
}

.live-chat-crop-box {
    position: absolute;
    border: 2px solid var(--company-brand);
    background: rgba(255, 255, 255, 0.04);
    box-shadow: 0 0 0 9999px rgba(20, 33, 41, 0.46);
    cursor: move;
    touch-action: none;
}

.live-chat-crop-handle {
    position: absolute;
    width: 34px;
    height: 10px;
    border: 2px solid #ffffff;
    border-radius: 4px;
    background: var(--company-brand);
    box-shadow: 0 1px 4px rgba(20, 33, 41, 0.28);
    cursor: grab;
    touch-action: none;
}

.live-chat-crop-handle:active {
    cursor: grabbing;
}

.live-chat-crop-handle[data-crop-handle="top"] {
    top: -7px;
    left: 50%;
    transform: translateX(-50%);
    cursor: ns-resize;
}

.live-chat-crop-handle[data-crop-handle="right"] {
    top: 50%;
    right: -7px;
    transform: translateY(-50%) rotate(90deg);
    cursor: ew-resize;
}

.live-chat-crop-handle[data-crop-handle="bottom"] {
    bottom: -7px;
    left: 50%;
    transform: translateX(-50%);
    cursor: ns-resize;
}

.live-chat-crop-handle[data-crop-handle="left"] {
    top: 50%;
    left: -7px;
    transform: translateY(-50%) rotate(90deg);
    cursor: ew-resize;
}

.live-chat-media-viewer-file {
    display: grid;
    gap: 12px;
    justify-items: center;
    max-width: 360px;
    color: var(--company-ink);
    text-align: center;
}

.live-chat-media-viewer-file strong {
    overflow-wrap: anywhere;
}

.live-chat-media-viewer-file a {
    color: var(--company-brand);
    font-weight: 850;
}

.live-chat-media-editor .live-chat-media-viewer-card {
    grid-template-rows: auto minmax(0, 1fr) auto;
}

.live-chat-media-editor-footer {
    display: flex;
    justify-content: flex-end;
    gap: 6px;
    border-top: 1px solid var(--company-line);
    padding: 6px 10px;
    background: #ffffff;
}

.live-chat-editor-footer-button {
    display: inline-grid;
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    place-items: center;
    padding: 0;
    border: 1px solid var(--company-line);
    border-radius: 7px;
    background: #ffffff;
    color: var(--company-ink);
    cursor: pointer;
}

.live-chat-editor-footer-button.is-cancel:hover {
    background: #f2f5f7;
}

.live-chat-editor-footer-button.is-use {
    border-color: var(--company-brand);
    background: var(--company-brand);
    color: #ffffff;
}

.live-chat-editor-footer-button.is-use:hover {
    border-color: var(--company-brand-dark);
    background: var(--company-brand-dark);
}

.live-chat-editor-footer-button:focus-visible {
    outline: 2px solid var(--company-brand);
    outline-offset: 2px;
}

.live-chat-editor-footer-button:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

.live-chat-editor-footer-button svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.live-chat-image-editor {
    padding: 10px;
}

.live-chat-image-editor-card {
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr) auto auto;
    width: min(940px, 100%);
    max-height: calc(100dvh - 20px);
    overflow: hidden;
    border: 1px solid var(--company-line);
    border-radius: 10px;
    background: #ffffff;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.3);
}

.live-chat-image-editor-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 44px;
    padding: 6px 10px 4px 14px;
    color: var(--company-ink);
}

.live-chat-editor-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    padding: 6px 10px;
    border-bottom: 1px solid var(--company-line);
    background: #f8fbfa;
}

.live-chat-editor-group {
    display: flex;
    flex: 0 0 auto;
    gap: 2px;
    padding: 2px;
    border: 1px solid var(--company-line);
    border-radius: 8px;
    background: #ffffff;
}

.live-chat-editor-crop-actions.is-inactive {
    visibility: hidden;
    pointer-events: none;
}

.live-chat-editor-tool {
    display: inline-grid;
    flex: 0 0 32px;
    width: 32px;
    height: 32px;
    place-items: center;
    padding: 0;
    border: 1px solid transparent;
    border-radius: 6px;
    background: #ffffff;
    color: var(--company-ink);
    cursor: pointer;
}

.live-chat-editor-tool:hover,
.live-chat-editor-tool:focus-visible,
.live-chat-editor-tool.is-active {
    border-color: var(--company-brand);
    background: #e8f6f0;
    color: var(--company-brand-dark);
}

.live-chat-editor-tool:focus-visible,
.live-chat-editor-popover button:focus-visible,
.live-chat-editor-popover input:focus-visible {
    outline: 2px solid var(--company-brand);
    outline-offset: 2px;
}

.live-chat-editor-tool:disabled {
    cursor: not-allowed;
    opacity: 0.45;
}

.live-chat-editor-tool svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.live-chat-editor-swatch {
    width: 20px;
    height: 20px;
    border: 1px solid rgba(0, 0, 0, 0.2);
    border-radius: 5px;
}

.live-chat-editor-stage {
    display: flex;
    min-height: 0;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 10px;
    background-color: #f2f5fb;
    background-image: linear-gradient(45deg, #e9eef7 25%, transparent 25%), linear-gradient(-45deg, #e9eef7 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #e9eef7 75%), linear-gradient(-45deg, transparent 75%, #e9eef7 75%);
    background-position: 0 0, 0 8px, 8px -8px, -8px 0;
    background-size: 16px 16px;
}

.live-chat-editor-stage canvas {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: min(54dvh, 520px);
    box-shadow: 0 2px 14px rgba(20, 33, 41, 0.18);
    touch-action: none;
}

.live-chat-editor-message {
    min-height: 22px;
    padding: 3px 12px;
    color: var(--company-danger);
    font-size: 0.8rem;
}

.live-chat-editor-popover {
    position: fixed;
    z-index: 1201;
    box-sizing: border-box;
    max-width: calc(100vw - 16px);
    padding: 8px;
    border: 1px solid var(--company-line);
    border-radius: 9px;
    background: #ffffff;
    box-shadow: 0 12px 32px rgba(20, 33, 41, 0.24);
}

.live-chat-editor-popover[hidden] {
    display: none;
}

.live-chat-editor-palette {
    display: grid;
    grid-template-columns: repeat(4, 34px);
    gap: 5px;
}

.live-chat-editor-palette button {
    width: 34px;
    height: 34px;
    border: 2px solid var(--company-line);
    border-radius: 6px;
    cursor: pointer;
}

.live-chat-editor-palette input[type="color"] {
    grid-column: 1 / -1;
    width: 100%;
    height: 30px;
    padding: 0;
    border: 1px solid var(--company-line);
    border-radius: 5px;
    cursor: pointer;
}

.live-chat-editor-sizes {
    display: flex;
    gap: 4px;
}

.live-chat-editor-size-option {
    display: inline-grid;
    width: 32px;
    height: 32px;
    place-items: center;
    padding: 0;
    border: 1px solid transparent;
    border-radius: 6px;
    background: #ffffff;
    color: var(--company-brand);
    cursor: pointer;
}

.live-chat-editor-size-option.is-active {
    border-color: var(--company-brand);
}

.live-chat-editor-size-option span {
    display: block;
    border-radius: 50%;
    background: currentColor;
}

@media (max-width: 600px) {
    .live-chat-editor-toolbar {
        gap: 4px;
        padding: 5px;
    }

    .live-chat-editor-group {
        gap: 0;
        padding: 1px;
    }

    .live-chat-editor-tool {
        flex-basis: 30px;
        width: 30px;
        height: 30px;
    }

    .live-chat-editor-stage canvas {
        max-height: min(40dvh, 360px);
    }
}

.live-chat-send {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--company-brand);
    color: #ffffff;
}

.live-chat-send:disabled,
.live-chat-composer textarea:disabled {
    cursor: not-allowed;
    opacity: 0.58;
}

.live-chat-send-feedback {
    display: grid;
    gap: 6px;
    min-width: 0;
    font-size: 0.8rem;
    color: var(--company-brand-dark);
    padding: 6px 0;
}

.live-chat-send-feedback progress {
    width: 100%;
    height: 8px;
    accent-color: var(--company-brand);
}

.live-chat-lock-note {
    margin: 0;
    color: var(--company-danger);
    font-size: 0.86rem;
    font-weight: 850;
}

.live-chat-empty-list {
    min-height: 260px;
    box-shadow: none;
}

@media (min-width: 981px) {
    .live-chat-back {
        display: none;
    }
}

@media (max-width: 860px) {
    .live-chat-subscription-line {
        display: none;
    }

    .live-chat-heading {
        padding: 12px 14px;
    }

    .live-chat-layout {
        grid-template-columns: 1fr;
        grid-template-rows: minmax(0, 1fr);
        height: calc(100dvh - 180px);
        min-height: 0;
    }

    .live-chat-list {
        border-right: 0;
        max-height: none;
        min-height: 0;
    }

    .live-chat-conversation-list {
        flex: 1 1 auto;
        min-height: 0;
    }

    .live-chat-layout.has-thread::after {
        position: fixed;
        inset: 0;
        z-index: 60;
        background: rgba(20, 33, 41, 0.42);
        content: "";
    }

    .live-chat-layout.has-thread .live-chat-thread {
        display: grid;
        position: fixed;
        inset: 12px;
        z-index: 70;
        max-height: calc(100dvh - 24px);
        min-height: 0;
        border: 1px solid var(--company-line);
        border-radius: 8px;
        box-shadow: 0 20px 48px rgba(20, 33, 41, 0.24);
    }

    .live-chat-layout.is-thread-closed .live-chat-thread {
        display: none;
    }

    .live-chat-thread {
        display: none;
        min-height: 0;
    }

    .live-chat-bubble {
        max-width: 88%;
    }
}

@media (max-width: 560px) {
    .live-chat-thread-header {
        padding: 10px;
    }

    .live-chat-messages {
        padding: 10px;
    }

    .live-chat-bubble {
        max-width: 94%;
    }

    .live-chat-compose-row {
        grid-template-columns: 34px minmax(0, 1fr) 42px;
        gap: 5px;
    }

    .live-chat-recording-controls {
        gap: 2px;
    }

    .live-chat-record-button {
        width: 32px;
        height: 38px;
    }

    .live-chat-send {
        width: 42px;
        height: 44px;
    }

    .live-chat-recording-modal {
        padding: 10px;
    }

    .live-chat-recording-footer {
        justify-content: stretch;
    }

    .live-chat-recording-footer button {
        flex: 1 1 0;
    }
}

.history-heading {
    align-items: flex-start;
}

.history-filter-panel {
    padding: 16px;
    min-width: 0;
    max-width: 100%;
}

.history-filter-form {
    display: grid;
    grid-template-columns: minmax(150px, 1.6fr) repeat(5, minmax(90px, 1fr)) auto;
    gap: 12px;
    align-items: end;
    min-width: 0;
}

@media (max-width: 1280px) {
    .history-filter-form {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .history-search-field,
    .history-filter-actions {
        grid-column: span 2;
    }
}

.history-search-field,
.history-field {
    display: grid;
    gap: 6px;
    min-width: 0;
}

.history-field label {
    color: var(--company-muted);
    font-size: 0.78rem;
    font-weight: 850;
    text-transform: uppercase;
}

.history-search-field input,
.history-field input,
.history-field select {
    width: 100%;
    min-height: 40px;
    border: 1px solid var(--company-line);
    border-radius: 8px;
    background: #ffffff;
    padding: 0 10px;
    color: var(--company-text);
    font: inherit;
    font-weight: 700;
}

.history-search-field input:focus,
.history-field input:focus,
.history-field select:focus {
    border-color: var(--company-brand);
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.16);
    outline: none;
}

.history-filter-actions {
    display: flex;
    gap: 8px;
}

.history-button {
    display: inline-flex;
    min-height: 40px;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--company-line);
    border-radius: 8px;
    background: #ffffff;
    padding: 0 12px;
    color: var(--company-brand-dark);
    font-weight: 850;
    text-decoration: none;
    cursor: pointer;
}

.history-button:hover,
.history-button:focus-visible {
    border-color: var(--company-brand);
    background: var(--company-brand-soft);
    outline: none;
}

.history-button-primary {
    border-color: var(--company-brand);
    background: var(--company-brand);
    color: #ffffff;
}

.history-button-primary:hover,
.history-button-primary:focus-visible {
    background: var(--company-brand-dark);
    color: #ffffff;
}

.history-button.is-disabled {
    pointer-events: none;
    opacity: 0.5;
}

.history-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.history-metric {
    min-height: 112px;
}

.history-list-panel {
    padding: 0;
    overflow: hidden;
    min-width: 0;
    max-width: 100%;
}

.history-list-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 18px 20px;
    border-bottom: 1px solid var(--company-line);
}

.history-list-header h2 {
    margin: 4px 0 0;
    font-size: 1.2rem;
}

.history-list-header > span {
    color: var(--company-muted);
    font-weight: 800;
}

.history-table {
    min-width: 720px;
}

.history-table td {
    font-size: 0.8rem;
}

.history-status {
    display: inline-flex;
    min-height: 28px;
    align-items: center;
    border-radius: 8px;
    background: var(--company-soft);
    padding: 0 9px;
    color: var(--company-muted);
    font-size: 0.8rem;
    font-weight: 850;
}

.history-status.is-sent,
.history-status.is-delivered,
.history-status.is-received {
    background: var(--company-brand-soft);
    color: var(--company-brand-dark);
}

.history-status.is-read {
    background: #eef2ff;
    color: #3730a3;
}

.history-status.is-failed {
    background: var(--company-danger-soft);
    color: var(--company-danger);
}

.history-view-action svg,
.history-close-action svg,
.history-conversation-action svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
}

.history-card-list {
    display: none;
    gap: 12px;
    padding: 14px;
}

.history-card {
    display: grid;
    gap: 10px;
    border: 1px solid var(--company-line);
    border-radius: 8px;
    background: #ffffff;
    padding: 14px;
}

.history-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.history-card-top div {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.history-card-meta {
    color: var(--company-muted);
    font-size: 0.86rem;
    font-weight: 750;
}

.history-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.history-pagination {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    padding: 14px 20px 18px;
    border-top: 1px solid var(--company-line);
}

.history-pagination span {
    color: var(--company-muted);
    font-weight: 850;
}

.history-modal-shell {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: grid;
    place-items: center;
    overflow-y: auto;
    background: rgba(20, 33, 41, 0.48);
    padding: 24px;
}

.history-modal {
    display: grid;
    gap: 18px;
    width: min(940px, 100%);
    max-height: calc(100vh - 48px);
    overflow-y: auto;
    border: 1px solid var(--company-line);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: var(--company-shadow);
    padding: 20px;
}

.history-modal-header,
.history-section-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.history-modal-header h2,
.history-detail-section h3 {
    margin: 4px 0 0;
}

.history-detail-grid,
.history-media-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.history-detail-grid div,
.history-media-grid div,
.history-muted-box,
.history-failure-box {
    min-width: 0;
    border: 1px solid var(--company-line);
    border-radius: 8px;
    background: var(--company-soft);
    padding: 12px;
}

.history-detail-grid dt,
.history-media-grid dt {
    color: var(--company-muted);
    font-size: 0.78rem;
    font-weight: 850;
    text-transform: uppercase;
}

.history-detail-grid dd,
.history-media-grid dd {
    margin: 5px 0 0;
    overflow-wrap: anywhere;
    color: #243943;
    font-weight: 800;
}

.history-detail-section {
    display: grid;
    gap: 12px;
}

.history-message-body {
    margin: 0;
    border: 1px solid var(--company-line);
    border-radius: 8px;
    background: var(--company-soft);
    padding: 14px;
    color: #243943;
    font-weight: 750;
    line-height: 1.55;
    overflow-wrap: anywhere;
}

.history-failure-box {
    border-color: #fecaca;
    background: var(--company-danger-soft);
    color: var(--company-danger);
}

.history-failure-box p {
    margin: 6px 0 0;
    overflow-wrap: anywhere;
}

.history-muted-box {
    color: var(--company-muted);
    font-weight: 750;
}

.history-status-list {
    display: grid;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.history-status-list li {
    display: grid;
    gap: 6px;
    border: 1px solid var(--company-line);
    border-radius: 8px;
    padding: 12px;
}

.history-status-list time,
.history-status-list p {
    margin: 0;
    color: var(--company-muted);
    font-weight: 750;
}

@media (max-width: 1180px) {
    .history-filter-form {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .history-search-field {
        grid-column: 1 / -1;
    }
}

@media (max-width: 760px) {
    .history-filter-form,
    .history-summary-grid,
    .history-detail-grid,
    .history-media-grid {
        grid-template-columns: 1fr;
    }

    .history-search-field,
    .history-filter-actions {
        grid-column: auto;
    }

    .history-filter-actions,
    .history-button {
        width: 100%;
    }

    .history-filter-actions {
        flex-direction: column;
    }

    .history-table-wrap {
        display: none;
    }

    .history-card-list {
        display: grid;
    }

    .history-list-header,
    .history-pagination {
        align-items: stretch;
        flex-direction: column;
    }

    .history-modal-shell {
        padding: 10px;
    }

    .history-modal {
        max-height: calc(100vh - 20px);
        padding: 14px;
    }
}

.contacts-heading {
    align-items: center;
}

.contacts-add-action,
.contacts-action {
    width: 42px;
    height: 42px;
    flex: 0 0 auto;
}

.contacts-add-action svg,
.contacts-action svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
}

.contacts-filter-panel {
    padding: 16px;
}

.contacts-filter-form {
    display: grid;
    grid-template-columns: minmax(220px, 2fr) repeat(5, minmax(118px, 1fr)) auto;
    gap: 12px;
    align-items: end;
}

.contacts-search-field,
.contacts-field {
    display: grid;
    gap: 6px;
    min-width: 0;
}

.contacts-field label {
    color: var(--company-muted);
    font-size: 0.78rem;
    font-weight: 850;
    text-transform: uppercase;
}

.contacts-search-field input,
.contacts-field input,
.contacts-field select,
.contacts-field textarea {
    width: 100%;
    border: 1px solid var(--company-line);
    border-radius: 8px;
    background: #ffffff;
    color: var(--company-text);
    font: inherit;
    font-weight: 750;
}

.contacts-search-field input,
.contacts-field input,
.contacts-field select {
    min-height: 40px;
    padding: 0 10px;
}

.contacts-field textarea {
    min-height: 92px;
    padding: 10px;
    resize: vertical;
}

.contacts-field input:read-only {
    background: var(--company-soft);
    color: var(--company-muted);
}

.contacts-search-field input:focus,
.contacts-field input:focus,
.contacts-field select:focus,
.contacts-field textarea:focus {
    border-color: var(--company-brand);
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.16);
    outline: none;
}

.contacts-filter-actions,
.contacts-modal-actions,
.contacts-row-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.contacts-button {
    display: inline-flex;
    min-height: 40px;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--company-line);
    border-radius: 8px;
    background: #ffffff;
    color: var(--company-brand-dark);
    padding: 0 14px;
    font-weight: 850;
    text-decoration: none;
}

.contacts-button:hover,
.contacts-button:focus-visible {
    border-color: var(--company-brand);
    background: var(--company-brand-soft);
    outline: none;
}

.contacts-button-primary {
    border-color: var(--company-brand);
    background: var(--company-brand);
    color: #ffffff;
}

.contacts-button-primary:hover,
.contacts-button-primary:focus-visible {
    background: var(--company-brand-dark);
    color: #ffffff;
}

.contacts-button.is-disabled,
.contacts-action.is-disabled,
.contacts-add-action.is-disabled {
    pointer-events: none;
    opacity: 0.5;
}

.contacts-alert.is-success {
    border-color: #a7d8cf;
    background: var(--company-brand-soft);
    color: var(--company-brand-dark);
}

.contacts-alert.is-error {
    border-color: #fecaca;
    background: var(--company-danger-soft);
    color: var(--company-danger);
}

.contacts-list-panel {
    padding: 0;
    overflow: hidden;
}

.contacts-list-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 16px;
    border-bottom: 1px solid var(--company-line);
}

.contacts-list-header h2 {
    margin: 4px 0 0;
    font-size: 1.2rem;
}

.contacts-list-header > span,
.contacts-card-meta {
    color: var(--company-muted);
    font-weight: 800;
}

.contacts-table {
    min-width: 1040px;
}

.contacts-tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.contacts-tag,
.contacts-badge {
    display: inline-flex;
    min-height: 26px;
    align-items: center;
    border-radius: 999px;
    padding: 0 9px;
    font-size: 0.78rem;
    font-weight: 850;
}

.contacts-tag {
    background: var(--company-soft);
    color: #405661;
}

.contacts-badge {
    background: var(--company-soft);
    color: #405661;
}

.contacts-badge.is-opted_in,
.contacts-badge.is-active,
.contacts-badge.is-whatsapp {
    background: var(--company-brand-soft);
    color: var(--company-brand-dark);
}

.contacts-badge.is-opted_out,
.contacts-badge.is-inactive {
    background: var(--company-danger-soft);
    color: var(--company-danger);
}

.contacts-badge.is-unknown,
.contacts-badge.is-manual {
    background: #f1f5f9;
    color: #475569;
}

.contacts-card-list {
    display: none;
    gap: 12px;
    padding: 14px;
}

.contacts-card {
    display: grid;
    gap: 10px;
    border: 1px solid var(--company-line);
    border-radius: 8px;
    background: #ffffff;
    padding: 12px;
}

.contacts-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.contacts-card-top div:first-child {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.contacts-card-top strong,
.contacts-card-top span {
    overflow-wrap: anywhere;
}

.contacts-card-top span {
    color: var(--company-muted);
    font-size: 0.9rem;
    font-weight: 750;
}

.contacts-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 0.86rem;
}

.contacts-pagination {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    padding: 14px 16px;
    border-top: 1px solid var(--company-line);
}

.contacts-pagination span {
    color: var(--company-muted);
    font-weight: 850;
}

.contacts-modal-shell {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: grid;
    place-items: center;
    overflow-y: auto;
    background: rgba(20, 33, 41, 0.48);
    padding: 24px;
}

.contacts-modal {
    display: grid;
    gap: 18px;
    width: min(860px, 100%);
    max-height: calc(100vh - 48px);
    overflow-y: auto;
    border: 1px solid var(--company-line);
    border-radius: 8px;
    background: #ffffff;
    padding: 18px;
    box-shadow: var(--company-shadow);
}

.contacts-detail-modal {
    width: min(940px, 100%);
}

.contacts-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.contacts-modal-header h2,
.history-modal-header h2,
.contacts-detail-section h3 {
    margin: 4px 0 0;
}

.contacts-form {
    display: grid;
    gap: 16px;
}

.contacts-form-grid,
.contacts-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.contacts-wide-field {
    grid-column: 1 / -1;
}

.contacts-field-error {
    margin: 0;
    color: var(--company-danger);
    font-size: 0.82rem;
    font-weight: 750;
}

.contacts-detail-grid div,
.contacts-detail-section {
    min-width: 0;
    border: 1px solid var(--company-line);
    border-radius: 8px;
    background: var(--company-soft);
    padding: 10px 12px;
}

.contacts-detail-grid dt {
    color: var(--company-muted);
    font-size: 0.78rem;
    font-weight: 850;
    text-transform: uppercase;
}

.contacts-detail-grid dd {
    margin: 5px 0 0;
    overflow-wrap: anywhere;
    color: #243943;
    font-weight: 760;
}

.contacts-detail-section {
    display: grid;
    gap: 8px;
}

.contacts-detail-section p {
    margin: 0;
    overflow-wrap: anywhere;
    color: #243943;
    font-weight: 750;
}

@media (max-width: 1180px) {
    .contacts-filter-form {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .contacts-search-field {
        grid-column: 1 / -1;
    }
}

@media (max-width: 760px) {
    .contacts-filter-form,
    .contacts-form-grid,
    .contacts-detail-grid {
        grid-template-columns: 1fr;
    }

    .contacts-filter-actions,
    .contacts-button {
        width: 100%;
    }

    .contacts-filter-actions {
        flex-direction: column;
    }

    .contacts-table-wrap {
        display: none;
    }

    .contacts-card-list {
        display: grid;
    }

    .contacts-list-header,
    .contacts-pagination {
        align-items: stretch;
        flex-direction: column;
    }

    .contacts-modal-shell {
        padding: 10px;
    }

    .contacts-modal {
        max-height: calc(100vh - 20px);
        padding: 14px;
    }
}

.tags-heading {
    align-items: center;
}

.tags-add-action,
.tags-action {
    width: 42px;
    height: 42px;
    flex: 0 0 auto;
}

.tags-add-action svg,
.tags-action svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
}

.tags-filter-panel {
    padding: 16px;
}

.tags-filter-form {
    display: grid;
    grid-template-columns: minmax(220px, 2fr) repeat(2, minmax(118px, 1fr)) auto;
    gap: 12px;
    align-items: end;
}

.tags-search-field,
.tags-field {
    display: grid;
    gap: 6px;
    min-width: 0;
}

.tags-field label {
    color: var(--company-muted);
    font-size: 0.78rem;
    font-weight: 850;
    text-transform: uppercase;
}

.tags-search-field input,
.tags-field input,
.tags-field select {
    width: 100%;
    min-height: 40px;
    border: 1px solid var(--company-line);
    border-radius: 8px;
    background: #ffffff;
    color: var(--company-text);
    padding: 0 10px;
    font: inherit;
    font-weight: 750;
}

.tags-search-field input:focus,
.tags-field input:focus,
.tags-field select:focus {
    border-color: var(--company-brand);
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.16);
    outline: none;
}

.tags-filter-actions,
.tags-modal-actions,
.tags-row-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.tags-button {
    display: inline-flex;
    min-height: 40px;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--company-line);
    border-radius: 8px;
    background: #ffffff;
    color: var(--company-brand-dark);
    padding: 0 14px;
    font-weight: 850;
    text-decoration: none;
}

.tags-button:hover,
.tags-button:focus-visible {
    border-color: var(--company-brand);
    background: var(--company-brand-soft);
    outline: none;
}

.tags-button-primary {
    border-color: var(--company-brand);
    background: var(--company-brand);
    color: #ffffff;
}

.tags-button-primary:hover,
.tags-button-primary:focus-visible {
    background: var(--company-brand-dark);
    color: #ffffff;
}

.tags-button.is-disabled,
.tags-action.is-disabled,
.tags-add-action.is-disabled {
    pointer-events: none;
    opacity: 0.5;
}

.tags-alert.is-success {
    border-color: #a7d8cf;
    background: var(--company-brand-soft);
    color: var(--company-brand-dark);
}

.tags-alert.is-error {
    border-color: #fecaca;
    background: var(--company-danger-soft);
    color: var(--company-danger);
}

.tags-list-panel {
    padding: 0;
    overflow: hidden;
}

.tags-list-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 16px;
    border-bottom: 1px solid var(--company-line);
}

.tags-list-header h2 {
    margin: 4px 0 0;
    font-size: 1.2rem;
}

.tags-list-header > span,
.tags-card-meta {
    color: var(--company-muted);
    font-weight: 800;
}

.tags-table {
    min-width: 760px;
}

.tags-inline-form {
    display: inline-flex;
    margin: 0;
}

.tags-badge {
    display: inline-flex;
    min-height: 26px;
    align-items: center;
    border-radius: 999px;
    background: var(--company-soft);
    color: #405661;
    padding: 0 9px;
    font-size: 0.78rem;
    font-weight: 850;
}

.tags-badge.is-active {
    background: var(--company-brand-soft);
    color: var(--company-brand-dark);
}

.tags-badge.is-inactive {
    background: var(--company-danger-soft);
    color: var(--company-danger);
}

.tags-badge.is-unknown {
    background: #f1f5f9;
    color: #475569;
}

.tags-card-list {
    display: none;
    gap: 12px;
    padding: 14px;
}

.tags-card {
    display: grid;
    gap: 10px;
    border: 1px solid var(--company-line);
    border-radius: 8px;
    background: #ffffff;
    padding: 12px;
}

.tags-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.tags-card-top div:first-child {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.tags-card-top strong,
.tags-card-top span {
    overflow-wrap: anywhere;
}

.tags-card-top span {
    color: var(--company-muted);
    font-size: 0.9rem;
    font-weight: 750;
}

.tags-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 0.86rem;
}

.tags-pagination {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    padding: 14px 16px;
    border-top: 1px solid var(--company-line);
}

.tags-pagination span {
    color: var(--company-muted);
    font-weight: 850;
}

.tags-modal-shell {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: grid;
    place-items: center;
    overflow-y: auto;
    background: rgba(20, 33, 41, 0.48);
    padding: 24px;
}

.tags-modal {
    display: grid;
    gap: 18px;
    width: min(620px, 100%);
    max-height: calc(100vh - 48px);
    overflow-y: auto;
    border: 1px solid var(--company-line);
    border-radius: 8px;
    background: #ffffff;
    padding: 18px;
    box-shadow: var(--company-shadow);
}

.tags-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.tags-modal-header h2 {
    margin: 4px 0 0;
}

.tags-form {
    display: grid;
    gap: 16px;
}

.tags-form-grid {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(128px, 1fr);
    gap: 10px;
}

.tags-field-error {
    margin: 0;
    color: var(--company-danger);
    font-size: 0.82rem;
    font-weight: 750;
}

@media (max-width: 1180px) {
    .tags-filter-form {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .tags-search-field {
        grid-column: 1 / -1;
    }
}

@media (max-width: 760px) {
    .tags-filter-form,
    .tags-form-grid {
        grid-template-columns: 1fr;
    }

    .tags-filter-actions,
    .tags-button {
        width: 100%;
    }

    .tags-filter-actions {
        flex-direction: column;
    }

    .tags-table-wrap {
        display: none;
    }

    .tags-card-list {
        display: grid;
    }

    .tags-list-header,
    .tags-pagination {
        align-items: stretch;
        flex-direction: column;
    }

    .tags-modal-shell {
        padding: 10px;
    }

    .tags-modal {
        max-height: calc(100vh - 20px);
        padding: 14px;
    }
}

.optin-heading {
    align-items: center;
}

.optin-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.optin-summary-card {
    display: grid;
    gap: 8px;
    padding: 16px;
}

.optin-summary-card span {
    color: var(--company-muted);
    font-size: 0.78rem;
    font-weight: 850;
    text-transform: uppercase;
}

.optin-summary-card strong {
    color: var(--company-text);
    font-size: 1.45rem;
    line-height: 1;
}

.optin-action {
    width: 42px;
    height: 42px;
    flex: 0 0 auto;
}

.optin-action svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
}

.optin-filter-panel {
    padding: 16px;
}

.optin-filter-form {
    display: grid;
    grid-template-columns: minmax(220px, 2fr) repeat(4, minmax(118px, 1fr)) auto;
    gap: 12px;
    align-items: end;
}

.optin-search-field,
.optin-field {
    display: grid;
    gap: 6px;
    min-width: 0;
}

.optin-field label {
    color: var(--company-muted);
    font-size: 0.78rem;
    font-weight: 850;
    text-transform: uppercase;
}

.optin-search-field input,
.optin-field input,
.optin-field select {
    width: 100%;
    min-height: 40px;
    border: 1px solid var(--company-line);
    border-radius: 8px;
    background: #ffffff;
    color: var(--company-text);
    padding: 0 10px;
    font: inherit;
    font-weight: 750;
}

.optin-field input:read-only {
    background: var(--company-soft);
    color: var(--company-muted);
}

.optin-search-field input:focus,
.optin-field input:focus,
.optin-field select:focus {
    border-color: var(--company-brand);
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.16);
    outline: none;
}

.optin-filter-actions,
.optin-modal-actions,
.optin-row-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.optin-button {
    display: inline-flex;
    min-height: 40px;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--company-line);
    border-radius: 8px;
    background: #ffffff;
    color: var(--company-brand-dark);
    padding: 0 14px;
    font-weight: 850;
    text-decoration: none;
}

.optin-button:hover,
.optin-button:focus-visible {
    border-color: var(--company-brand);
    background: var(--company-brand-soft);
    outline: none;
}

.optin-button-primary {
    border-color: var(--company-brand);
    background: var(--company-brand);
    color: #ffffff;
}

.optin-button-primary:hover,
.optin-button-primary:focus-visible {
    background: var(--company-brand-dark);
    color: #ffffff;
}

.optin-button.is-disabled,
.optin-action.is-disabled {
    pointer-events: none;
    opacity: 0.5;
}

.optin-alert.is-success {
    border-color: #a7d8cf;
    background: var(--company-brand-soft);
    color: var(--company-brand-dark);
}

.optin-alert.is-error {
    border-color: #fecaca;
    background: var(--company-danger-soft);
    color: var(--company-danger);
}

.optin-list-panel {
    padding: 0;
    overflow: hidden;
}

.optin-list-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 16px;
    border-bottom: 1px solid var(--company-line);
}

.optin-list-header h2 {
    margin: 4px 0 0;
    font-size: 1.2rem;
}

.optin-list-header > span,
.optin-card-meta {
    color: var(--company-muted);
    font-weight: 800;
}

.optin-table {
    min-width: 1080px;
}

.optin-badge {
    display: inline-flex;
    min-height: 26px;
    align-items: center;
    border-radius: 999px;
    background: var(--company-soft);
    color: #405661;
    padding: 0 9px;
    font-size: 0.78rem;
    font-weight: 850;
}

.optin-badge.is-opted_in,
.optin-badge.is-active,
.optin-badge.is-whatsapp,
.optin-badge.is-api {
    background: var(--company-brand-soft);
    color: var(--company-brand-dark);
}

.optin-badge.is-opted_out,
.optin-badge.is-inactive {
    background: var(--company-danger-soft);
    color: var(--company-danger);
}

.optin-badge.is-unknown,
.optin-badge.is-manual,
.optin-badge.is-import,
.optin-badge.is-campaign {
    background: #f1f5f9;
    color: #475569;
}

.optin-card-list {
    display: none;
    gap: 12px;
    padding: 14px;
}

.optin-card {
    display: grid;
    gap: 10px;
    border: 1px solid var(--company-line);
    border-radius: 8px;
    background: #ffffff;
    padding: 12px;
}

.optin-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.optin-card-top div:first-child {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.optin-card-top strong,
.optin-card-top span {
    overflow-wrap: anywhere;
}

.optin-card-top span {
    color: var(--company-muted);
    font-size: 0.9rem;
    font-weight: 750;
}

.optin-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 0.86rem;
}

.optin-pagination {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    padding: 14px 16px;
    border-top: 1px solid var(--company-line);
}

.optin-pagination span {
    color: var(--company-muted);
    font-weight: 850;
}

.optin-modal-shell {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: grid;
    place-items: center;
    overflow-y: auto;
    background: rgba(20, 33, 41, 0.48);
    padding: 24px;
}

.optin-modal {
    display: grid;
    gap: 18px;
    width: min(760px, 100%);
    max-height: calc(100vh - 48px);
    overflow-y: auto;
    border: 1px solid var(--company-line);
    border-radius: 8px;
    background: #ffffff;
    padding: 18px;
    box-shadow: var(--company-shadow);
}

.optin-detail-modal {
    width: min(940px, 100%);
}

.optin-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.optin-modal-header h2 {
    margin: 4px 0 0;
}

.optin-form {
    display: grid;
    gap: 16px;
}

.optin-form-grid,
.optin-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.optin-field-error {
    margin: 0;
    color: var(--company-danger);
    font-size: 0.82rem;
    font-weight: 750;
}

.optin-note {
    margin: 0;
    color: var(--company-muted);
    font-weight: 750;
}

.optin-detail-grid div {
    min-width: 0;
    border: 1px solid var(--company-line);
    border-radius: 8px;
    background: var(--company-soft);
    padding: 10px 12px;
}

.optin-detail-grid dt {
    color: var(--company-muted);
    font-size: 0.78rem;
    font-weight: 850;
    text-transform: uppercase;
}

.optin-detail-grid dd {
    margin: 5px 0 0;
    overflow-wrap: anywhere;
    color: #243943;
    font-weight: 760;
}

@media (max-width: 1180px) {
    .optin-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .optin-filter-form {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .optin-search-field {
        grid-column: 1 / -1;
    }
}

@media (max-width: 760px) {
    .optin-summary-grid,
    .optin-filter-form,
    .optin-form-grid,
    .optin-detail-grid {
        grid-template-columns: 1fr;
    }

    .optin-filter-actions,
    .optin-button {
        width: 100%;
    }

    .optin-filter-actions {
        flex-direction: column;
    }

    .optin-table-wrap {
        display: none;
    }

    .optin-card-list {
        display: grid;
    }

    .optin-list-header,
    .optin-pagination {
        align-items: stretch;
        flex-direction: column;
    }

    .optin-modal-shell {
        padding: 10px;
    }

    .optin-modal {
        max-height: calc(100vh - 20px);
        padding: 14px;
    }
}

.company-sidebar-member {
    width: 100%;
    max-width: 100%;
    margin-top: 9px;
    overflow: hidden;
    color: var(--company-text);
    font-size: 0.9rem;
    line-height: 1.24;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.team-heading {
    align-items: center;
}

.team-add-action,
.team-action {
    width: 42px;
    height: 42px;
}

.team-add-action svg,
.team-action svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
}

.team-filter-panel {
    padding: 16px;
}

.team-filter-form {
    display: grid;
    grid-template-columns: minmax(220px, 2fr) repeat(3, minmax(118px, 1fr)) auto;
    gap: 12px;
    align-items: end;
}

.team-search-field,
.team-field {
    display: grid;
    gap: 6px;
}

.team-field label {
    color: var(--company-muted);
    font-size: 0.78rem;
    font-weight: 850;
    text-transform: uppercase;
}

.team-search-field input,
.team-field input,
.team-field select {
    width: 100%;
    min-height: 40px;
    border: 1px solid var(--company-line);
    border-radius: 8px;
    background: #ffffff;
    padding: 9px 11px;
    color: var(--company-text);
    font: inherit;
    font-weight: 700;
}

.team-search-field input:focus,
.team-field input:focus,
.team-field select:focus {
    border-color: var(--company-brand);
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.16);
    outline: none;
}

.team-filter-actions,
.team-modal-actions,
.team-row-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.team-button {
    display: inline-flex;
    min-height: 40px;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--company-line);
    border-radius: 8px;
    background: #ffffff;
    padding: 8px 13px;
    color: var(--company-text);
    font-weight: 850;
    text-decoration: none;
}

.team-button:hover,
.team-button:focus-visible {
    border-color: var(--company-brand);
    background: var(--company-brand-soft);
    outline: none;
}

.team-button-primary {
    border-color: var(--company-brand);
    background: var(--company-brand);
    color: #ffffff;
}

.team-button-primary:hover,
.team-button-primary:focus-visible {
    background: var(--company-brand-dark);
    color: #ffffff;
}

.team-button.is-disabled,
.team-action.is-disabled,
.team-add-action.is-disabled {
    pointer-events: none;
    opacity: 0.5;
}

button.team-action.is-disabled {
    pointer-events: auto;
}

.team-alert.is-success {
    border-color: #a7d8cf;
    background: var(--company-brand-soft);
    color: var(--company-brand-dark);
}

.team-alert.is-error {
    border-color: #fecaca;
    background: var(--company-danger-soft);
    color: var(--company-danger);
}

.team-list-panel {
    padding: 0;
    overflow: hidden;
}

.team-list-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px;
}

.team-list-header h2 {
    margin: 4px 0 0;
    font-size: 1.2rem;
}

.team-list-header > span,
.team-card-meta {
    color: var(--company-muted);
    font-weight: 800;
}

.team-table {
    min-width: 1080px;
}

.team-inline-form {
    display: inline-flex;
    margin: 0;
}

.team-badge {
    display: inline-flex;
    min-height: 26px;
    align-items: center;
    border-radius: 999px;
    background: var(--company-soft);
    color: #405661;
    padding: 0 9px;
    font-size: 0.78rem;
    font-weight: 850;
}

.team-badge.is-active,
.team-badge.is-admin,
.team-badge.is-primary {
    background: var(--company-brand-soft);
    color: var(--company-brand-dark);
}

.team-badge.is-inactive {
    background: var(--company-danger-soft);
    color: var(--company-danger);
}

.team-badge.is-agent,
.team-badge.is-viewer,
.team-badge.is-member,
.team-badge.is-unknown {
    background: #f1f5f9;
    color: #475569;
}

.team-card-list {
    display: none;
    gap: 12px;
    padding: 14px;
}

.team-card {
    display: grid;
    gap: 10px;
    border: 1px solid var(--company-line);
    border-radius: 8px;
    background: #ffffff;
    padding: 12px;
}

.team-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.team-card-top div:first-child {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.team-card-top strong,
.team-card-top span {
    overflow-wrap: anywhere;
}

.team-card-top span {
    color: var(--company-muted);
    font-size: 0.9rem;
    font-weight: 750;
}

.team-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 0.86rem;
}

.team-pagination {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    padding: 14px 16px;
    border-top: 1px solid var(--company-line);
}

.team-pagination span {
    color: var(--company-muted);
    font-weight: 850;
}

.team-modal-shell {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: grid;
    place-items: center;
    overflow-y: auto;
    background: rgba(20, 33, 41, 0.48);
    padding: 24px;
}

.team-modal {
    display: grid;
    gap: 18px;
    width: min(760px, 100%);
    max-height: calc(100vh - 48px);
    overflow-y: auto;
    border: 1px solid var(--company-line);
    border-radius: 8px;
    background: #ffffff;
    padding: 18px;
    box-shadow: var(--company-shadow);
}

.team-detail-modal {
    width: min(940px, 100%);
}

.team-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.team-modal-header h2 {
    margin: 4px 0 0;
}

.team-form {
    display: grid;
    gap: 16px;
}

.team-form-grid,
.team-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.team-field-error {
    margin: 0;
    color: var(--company-danger);
    font-size: 0.82rem;
    font-weight: 750;
}

.team-note {
    margin: 0;
    color: var(--company-muted);
    font-weight: 750;
}

.team-detail-grid div {
    min-width: 0;
    border: 1px solid var(--company-line);
    border-radius: 8px;
    background: var(--company-soft);
    padding: 10px 12px;
}

.team-detail-grid dt {
    color: var(--company-muted);
    font-size: 0.78rem;
    font-weight: 850;
    text-transform: uppercase;
}

.team-detail-grid dd {
    margin: 5px 0 0;
    overflow-wrap: anywhere;
    color: #243943;
    font-weight: 760;
}

@media (max-width: 1180px) {
    .team-filter-form {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .team-search-field {
        grid-column: 1 / -1;
    }
}

@media (max-width: 760px) {
    .team-filter-form,
    .team-form-grid,
    .team-detail-grid {
        grid-template-columns: 1fr;
    }

    .team-filter-actions,
    .team-button {
        width: 100%;
    }

    .team-filter-actions {
        flex-direction: column;
    }

    .team-table-wrap {
        display: none;
    }

    .team-card-list {
        display: grid;
    }

    .team-list-header,
    .team-pagination {
        align-items: stretch;
        flex-direction: column;
    }

    .team-modal-shell {
        padding: 10px;
    }

    .team-modal {
        max-height: calc(100vh - 20px);
        padding: 14px;
    }
}

.templates-heading {
    align-items: center;
}

.templates-sync-form {
    margin: 0;
}

.templates-summary-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 14px;
}

.templates-summary-card {
    display: grid;
    gap: 8px;
    padding: 16px;
}

.templates-summary-card span {
    color: var(--company-muted);
    font-size: 0.78rem;
    font-weight: 850;
    text-transform: uppercase;
}

.templates-summary-card strong {
    color: var(--company-text);
    font-size: 1.45rem;
    line-height: 1;
}

.templates-button {
    display: inline-flex;
    min-height: 40px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid var(--company-line);
    border-radius: 8px;
    background: #ffffff;
    padding: 8px 13px;
    color: var(--company-text);
    font-weight: 850;
    text-decoration: none;
    cursor: pointer;
}

.templates-button svg,
.templates-action svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
}

.templates-button:hover,
.templates-button:focus-visible {
    border-color: var(--company-brand);
    background: var(--company-brand-soft);
    outline: none;
}

.templates-button-primary {
    border-color: var(--company-brand);
    background: var(--company-brand);
    color: #ffffff;
}

.templates-button-primary:hover,
.templates-button-primary:focus-visible {
    background: var(--company-brand-dark);
    color: #ffffff;
}

.templates-button.is-disabled,
.templates-action.is-disabled {
    pointer-events: none;
    opacity: 0.5;
}

button.templates-button.is-disabled {
    pointer-events: auto;
}

.templates-action {
    width: 42px;
    height: 42px;
    flex: 0 0 auto;
}

.templates-alert.is-success {
    border-color: #a7d8cf;
    background: var(--company-brand-soft);
    color: var(--company-brand-dark);
}

.templates-alert.is-error {
    border-color: #fecaca;
    background: var(--company-danger-soft);
    color: var(--company-danger);
}

.templates-filter-panel {
    padding: 16px;
}

.templates-filter-form {
    display: grid;
    grid-template-columns: minmax(220px, 2fr) repeat(4, minmax(118px, 1fr)) auto;
    gap: 12px;
    align-items: end;
}

.templates-search-field,
.templates-field {
    display: grid;
    gap: 6px;
    min-width: 0;
}

.templates-field label {
    color: var(--company-muted);
    font-size: 0.78rem;
    font-weight: 850;
    text-transform: uppercase;
}

.templates-search-field input,
.templates-field select {
    width: 100%;
    min-height: 40px;
    border: 1px solid var(--company-line);
    border-radius: 8px;
    background: #ffffff;
    padding: 9px 11px;
    color: var(--company-text);
    font: inherit;
    font-weight: 700;
}

.templates-search-field input:focus,
.templates-field select:focus {
    border-color: var(--company-brand);
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.16);
    outline: none;
}

.templates-filter-actions,
.templates-card-meta,
.templates-modal-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.templates-list-panel {
    padding: 0;
    overflow: hidden;
}

.templates-list-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px;
    border-bottom: 1px solid var(--company-line);
}

.templates-list-header h2 {
    margin: 4px 0 0;
    font-size: 1.2rem;
}

.templates-list-header > span,
.templates-card-meta {
    color: var(--company-muted);
    font-weight: 800;
}

.templates-table {
    min-width: 980px;
}

.templates-badge {
    display: inline-flex;
    min-height: 26px;
    align-items: center;
    border-radius: 999px;
    background: var(--company-soft);
    color: #405661;
    padding: 0 9px;
    font-size: 0.78rem;
    font-weight: 850;
}

.templates-badge.is-approved {
    background: var(--company-brand-soft);
    color: var(--company-brand-dark);
}

.templates-badge.is-pending,
.templates-badge.is-in-appeal,
.templates-badge.is-pending-deletion,
.templates-badge.is-limit-exceeded,
.templates-badge.is-paused {
    background: var(--company-warn-soft);
    color: var(--company-warn);
}

.templates-badge.is-rejected,
.templates-badge.is-disabled,
.templates-badge.is-deleted {
    background: var(--company-danger-soft);
    color: var(--company-danger);
}

.templates-badge.is-archived,
.templates-badge.is-unknown {
    background: #f1f5f9;
    color: #475569;
}

.templates-card-list {
    display: none;
    gap: 12px;
    padding: 14px;
}

.templates-card {
    display: grid;
    gap: 10px;
    border: 1px solid var(--company-line);
    border-radius: 8px;
    background: #ffffff;
    padding: 12px;
}

.templates-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.templates-card-top div:first-child {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.templates-card-top strong,
.templates-card-top span {
    overflow-wrap: anywhere;
}

.templates-card-top span {
    color: var(--company-muted);
    font-size: 0.9rem;
    font-weight: 750;
}

.templates-pagination {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    padding: 14px 16px;
    border-top: 1px solid var(--company-line);
}

.templates-pagination span {
    color: var(--company-muted);
    font-weight: 850;
}

.templates-modal-shell {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: grid;
    place-items: center;
    overflow-y: auto;
    background: rgba(20, 33, 41, 0.48);
    padding: 24px;
}

.templates-modal {
    display: grid;
    gap: 18px;
    width: min(940px, 100%);
    max-height: calc(100vh - 48px);
    overflow-y: auto;
    border: 1px solid var(--company-line);
    border-radius: 8px;
    background: #ffffff;
    padding: 18px;
    box-shadow: var(--company-shadow);
}

.templates-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.templates-modal-header h2,
.templates-detail-section h3 {
    margin: 4px 0 0;
}

.templates-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.templates-detail-grid div,
.templates-component {
    min-width: 0;
    border: 1px solid var(--company-line);
    border-radius: 8px;
    background: var(--company-soft);
    padding: 10px 12px;
}

.templates-detail-grid dt,
.templates-component-meta dt {
    color: var(--company-muted);
    font-size: 0.78rem;
    font-weight: 850;
    text-transform: uppercase;
}

.templates-detail-grid dd,
.templates-component-meta dd {
    margin: 5px 0 0;
    overflow-wrap: anywhere;
    color: #243943;
    font-weight: 760;
}

.templates-detail-section {
    display: grid;
    gap: 12px;
}

.templates-detail-section p,
.templates-note {
    margin: 0;
    color: var(--company-muted);
    font-weight: 750;
}

.templates-component-list {
    display: grid;
    gap: 10px;
}

.templates-component {
    display: grid;
    gap: 10px;
}

.templates-component header {
    display: flex;
    align-items: center;
    gap: 10px;
}

.templates-component-text {
    overflow-wrap: anywhere;
    white-space: normal;
    color: #243943;
    font-weight: 760;
}

.templates-component-meta {
    display: grid;
    gap: 10px;
    margin: 0;
}

.templates-button-preview {
    display: grid;
    gap: 8px;
}

.templates-button-preview div {
    display: grid;
    gap: 3px;
    border: 1px solid var(--company-line);
    border-radius: 8px;
    background: #ffffff;
    padding: 9px 10px;
}

.templates-button-preview span,
.templates-button-preview small {
    overflow-wrap: anywhere;
    color: var(--company-muted);
    font-weight: 750;
}

@media (max-width: 1180px) {
    .templates-summary-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .templates-filter-form {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .templates-search-field {
        grid-column: 1 / -1;
    }
}

@media (max-width: 760px) {
    .templates-summary-grid,
    .templates-filter-form,
    .templates-detail-grid {
        grid-template-columns: 1fr;
    }

    .templates-filter-actions,
    .templates-button {
        width: 100%;
    }

    .templates-filter-actions,
    .templates-list-header,
    .templates-pagination,
    .templates-card-top {
        align-items: stretch;
        flex-direction: column;
    }

    .templates-table-wrap {
        display: none;
    }

    .templates-card-list {
        display: grid;
    }

    .templates-modal-shell {
        padding: 10px;
    }

    .templates-modal {
        max-height: calc(100vh - 20px);
        padding: 14px;
    }
}

/* Templates Phase 2 */
.tpl-page-head,
.tpl-create-topbar,
.tpl-toolbar,
.tpl-list-panel,
.tpl-panel,
.tpl-preview-panel {
    border: 1px solid var(--company-line);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 8px 18px rgba(20, 33, 41, 0.035);
}

.tpl-page-head,
.tpl-create-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 12px 14px;
}

.tpl-page-head h1,
.tpl-create-topbar h1,
.tpl-list-head h2,
.tpl-panel-header h2,
.tpl-modal-head h2 {
    margin: 0;
    letter-spacing: 0;
}

.tpl-page-head h1,
.tpl-create-topbar h1 {
    font-size: 1.45rem;
    line-height: 1.1;
}

.tpl-page-head span,
.tpl-create-topbar span,
.tpl-list-head span,
.tpl-preview-meta span,
.tpl-modal-head span {
    color: var(--company-muted);
    font-size: 0.82rem;
    font-weight: 800;
}

.tpl-head-actions,
.tpl-sync-form,
.tpl-status-tabs,
.tpl-toolbar form,
.tpl-list-head,
.tpl-list-head form,
.tpl-pagination,
.tpl-back-link,
.tpl-primary-action,
.tpl-secondary-action,
.tpl-submit-bar {
    display: flex;
    align-items: center;
    gap: 8px;
}

.tpl-primary-action,
.tpl-secondary-action {
    min-height: 38px;
    justify-content: center;
    border: 1px solid var(--company-line);
    border-radius: 8px;
    padding: 0 13px;
    font-size: 0.9rem;
    font-weight: 850;
    text-decoration: none;
    cursor: pointer;
}

.tpl-primary-action {
    border-color: var(--company-brand);
    background: var(--company-brand);
    color: #ffffff;
}

.tpl-primary-action span,
.tpl-primary-action svg {
    color: #ffffff;
}

.tpl-secondary-action {
    background: #ffffff;
    color: #27444d;
}

.tpl-primary-action:hover,
.tpl-primary-action:focus-visible,
.tpl-secondary-action:hover,
.tpl-secondary-action:focus-visible,
.tpl-back-link:hover,
.tpl-back-link:focus-visible {
    border-color: var(--company-brand);
    background: var(--company-brand-soft);
    color: var(--company-brand-dark);
    outline: none;
}

.tpl-primary-action:hover,
.tpl-primary-action:focus-visible {
    background: var(--company-brand-dark);
    color: #ffffff;
}

.tpl-primary-action:hover span,
.tpl-primary-action:focus-visible span,
.tpl-primary-action:hover svg,
.tpl-primary-action:focus-visible svg {
    color: #ffffff;
}

.tpl-primary-action svg,
.tpl-secondary-action svg,
.tpl-back-link svg,
.tpl-icon-action svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
}

.tpl-primary-action.is-disabled,
.tpl-secondary-action.is-disabled {
    pointer-events: none;
    opacity: 0.5;
}

button.tpl-secondary-action.is-disabled {
    pointer-events: auto;
}

.tpl-alert.is-success {
    border-color: #a7d8cf;
    background: var(--company-brand-soft);
    color: var(--company-brand-dark);
}

.tpl-alert.is-error {
    border-color: #fecaca;
    background: var(--company-danger-soft);
    color: var(--company-danger);
}

.tpl-status-tabs {
    flex-wrap: wrap;
}

.tpl-status-tab {
    display: inline-flex;
    min-height: 34px;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--company-line);
    border-radius: 999px;
    background: #ffffff;
    padding: 0 11px;
    color: #334852;
    font-size: 0.88rem;
    font-weight: 850;
    text-decoration: none;
}

.tpl-status-tab strong {
    display: inline-grid;
    min-width: 24px;
    min-height: 22px;
    place-items: center;
    border-radius: 999px;
    background: #eef4f5;
    color: #38525c;
    padding: 0 7px;
    font-size: 0.78rem;
}

.tpl-status-tab:hover,
.tpl-status-tab:focus-visible,
.tpl-status-tab.is-active {
    border-color: var(--company-brand);
    background: var(--company-brand-soft);
    color: var(--company-brand-dark);
    outline: none;
}

.tpl-toolbar {
    padding: 10px;
}

.tpl-toolbar form {
    display: grid;
    grid-template-columns: minmax(220px, 1.8fr) repeat(3, minmax(120px, 0.9fr)) auto auto;
    gap: 8px;
}

.tpl-toolbar input,
.tpl-toolbar select,
.tpl-list-head select,
.tpl-field input,
.tpl-field select,
.tpl-field textarea {
    width: 100%;
    min-height: 38px;
    border: 1px solid var(--company-line);
    border-radius: 8px;
    background: #ffffff;
    padding: 8px 10px;
    color: var(--company-text);
    font: inherit;
    font-size: 0.92rem;
    font-weight: 720;
}

.tpl-toolbar input:focus,
.tpl-toolbar select:focus,
.tpl-list-head select:focus,
.tpl-field input:focus,
.tpl-field select:focus,
.tpl-field textarea:focus {
    border-color: var(--company-brand);
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.14);
    outline: none;
}

.tpl-list-panel {
    overflow: hidden;
}

.tpl-list-head {
    justify-content: space-between;
    padding: 12px 14px;
    border-bottom: 1px solid var(--company-line);
}

.tpl-list-head h2 {
    margin-top: 2px;
    font-size: 1.08rem;
}

.tpl-list-head form span,
.tpl-pagination span {
    color: var(--company-muted);
    font-weight: 800;
}

.tpl-list-head select {
    width: 76px;
}

.tpl-table-wrap {
    overflow-x: auto;
}

.tpl-table {
    width: 100%;
    min-width: 880px;
    border-collapse: collapse;
}

.tpl-table th,
.tpl-table td {
    border-bottom: 1px solid #edf2f3;
    padding: 11px 12px;
    text-align: left;
    vertical-align: middle;
}

.tpl-table th {
    color: var(--company-muted);
    font-size: 0.74rem;
    font-weight: 900;
    text-transform: uppercase;
}

.tpl-table td {
    color: #243943;
    font-size: 0.92rem;
    font-weight: 740;
}

.tpl-table tbody tr:hover {
    background: #f8fbfb;
}

.tpl-table td strong,
.tpl-template-card strong {
    display: block;
    overflow-wrap: anywhere;
    color: var(--company-text);
}

.tpl-table td small,
.tpl-template-card span {
    display: block;
    margin-top: 3px;
    color: var(--company-muted);
    font-size: 0.78rem;
    font-weight: 760;
}

.tpl-badge,
.tpl-type-pill {
    display: inline-flex;
    min-height: 24px;
    align-items: center;
    border-radius: 999px;
    padding: 0 8px;
    font-size: 0.76rem;
    font-weight: 900;
}

.tpl-type-pill {
    background: #eef2ff;
    color: #3730a3;
}

.tpl-badge.is-approved {
    background: var(--company-brand-soft);
    color: var(--company-brand-dark);
}

.tpl-badge.is-pending,
.tpl-badge.is-paused,
.tpl-badge.is-in-appeal,
.tpl-badge.is-draft {
    background: var(--company-warn-soft);
    color: var(--company-warn);
}

.tpl-badge.is-rejected,
.tpl-badge.is-disabled {
    background: var(--company-danger-soft);
    color: var(--company-danger);
}

.tpl-badge.is-unknown {
    background: #f1f5f9;
    color: #475569;
}

.tpl-icon-action {
    width: 36px;
    height: 36px;
}

.tpl-card-list {
    display: none;
    gap: 10px;
    padding: 12px;
}

.tpl-template-card {
    display: grid;
    gap: 10px;
    border: 1px solid var(--company-line);
    border-radius: 8px;
    background: #ffffff;
    padding: 11px;
}

.tpl-template-card > div:last-child {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.tpl-pagination {
    justify-content: flex-end;
    padding: 12px 14px;
    border-top: 1px solid var(--company-line);
}

.tpl-modal-shell {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: grid;
    place-items: center;
    overflow-y: auto;
    background: rgba(20, 33, 41, 0.48);
    padding: 24px;
}

.tpl-modal {
    display: grid;
    gap: 16px;
    width: min(980px, 100%);
    max-height: calc(100vh - 48px);
    overflow-y: auto;
    border: 1px solid var(--company-line);
    border-radius: 8px;
    background: #ffffff;
    padding: 16px;
    box-shadow: var(--company-shadow);
}

.tpl-modal-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.tpl-modal-head h2 {
    margin-top: 3px;
    font-size: 1.25rem;
}

.tpl-detail-layout,
.tpl-builder {
    display: grid;
    grid-template-columns: minmax(0, 1.85fr) minmax(320px, 1fr);
    gap: 16px;
    align-items: start;
}

.tpl-detail-side dl {
    display: grid;
    gap: 8px;
    margin: 0;
}

.tpl-detail-side div {
    border: 1px solid var(--company-line);
    border-radius: 8px;
    background: var(--company-soft);
    padding: 9px 10px;
}

.tpl-detail-side dt {
    color: var(--company-muted);
    font-size: 0.74rem;
    font-weight: 900;
    text-transform: uppercase;
}

.tpl-detail-side dd {
    margin: 4px 0 0;
    overflow-wrap: anywhere;
    color: #243943;
    font-weight: 780;
}

.tpl-create-topbar {
    padding: 12px 14px;
}

.tpl-back-link {
    width: max-content;
    color: var(--company-brand-dark);
    font-weight: 850;
    text-decoration: none;
}

.tpl-builder-main,
.tpl-panel,
.tpl-field,
.tpl-button-builder,
.tpl-preview-sticky {
    display: grid;
    gap: 12px;
}

.tpl-panel {
    padding: 14px 16px;
}

.tpl-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #edf2f3;
    padding-bottom: 8px;
}

.tpl-panel-header span {
    color: var(--company-text);
    font-size: 0.9rem;
    font-weight: 920;
}

.tpl-field-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.tpl-field-grid-two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.tpl-category-language-grid {
    align-items: start;
}

.tpl-category-language-grid .tpl-field {
    gap: 7px;
}

.tpl-category-language-grid .tpl-field label {
    display: flex;
    min-height: 16px;
    align-items: center;
    line-height: 1.1;
}

.tpl-category-language-grid select {
    box-sizing: border-box;
    height: 38px;
    min-height: 38px;
    padding: 8px 10px;
    border-radius: 8px;
    font-size: 0.92rem;
    line-height: 1.2;
}

.tpl-field label {
    color: var(--company-muted);
    font-size: 0.75rem;
    font-weight: 900;
    text-transform: uppercase;
}

.tpl-field label span {
    color: var(--company-muted);
    font-size: 0.72rem;
    font-weight: 780;
    text-transform: none;
}

.tpl-helper-text {
    margin: 0;
    color: var(--company-muted);
    font-size: 0.8rem;
    font-weight: 740;
    line-height: 1.35;
}

.tpl-field textarea {
    min-height: 150px;
    resize: vertical;
}

.tpl-field-error {
    margin: 0;
    color: var(--company-danger);
    font-size: 0.82rem;
    font-weight: 780;
}

.tpl-button-builder {
    gap: 10px;
}

.tpl-action-mode,
.tpl-button-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tpl-action-mode label {
    position: relative;
    cursor: pointer;
}

.tpl-action-mode input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.tpl-action-mode span {
    display: inline-flex;
    min-height: 36px;
    align-items: center;
    border: 1px solid var(--company-line);
    border-radius: 999px;
    background: #ffffff;
    padding: 0 13px;
    color: #334852;
    font-size: 0.86rem;
    font-weight: 850;
}

.tpl-action-mode input:checked + span,
.tpl-action-mode input:focus-visible + span {
    border-color: var(--company-brand);
    background: var(--company-brand-soft);
    color: var(--company-brand-dark);
}

.tpl-button-row {
    display: grid;
    grid-template-columns: 112px minmax(150px, 1fr) minmax(200px, 1.15fr) minmax(150px, 0.85fr) 42px;
    gap: 8px;
    align-items: center;
    border: 1px solid #edf2f3;
    border-radius: 8px;
    background: #fbfcfc;
    padding: 10px;
}

.tpl-button-kind {
    display: inline-flex;
    min-height: 34px;
    align-items: center;
    border-radius: 999px;
    background: var(--company-brand-soft);
    padding: 0 10px;
    color: var(--company-brand-dark);
    font-size: 0.8rem;
    font-weight: 900;
}

.tpl-add-variable {
    width: max-content;
}

.tpl-remove-button {
    width: 38px;
    height: 38px;
}

.tpl-remove-button svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
}

.tpl-variable-examples {
    display: grid;
    gap: 8px;
    border: 1px solid #edf2f3;
    border-radius: 8px;
    background: #fbfcfc;
    padding: 10px;
}

.tpl-variable-row {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 8px;
    align-items: center;
}

.tpl-variable-row span {
    display: inline-grid;
    min-height: 34px;
    place-items: center;
    border: 1px solid var(--company-line);
    border-radius: 8px;
    background: var(--company-soft);
    color: var(--company-brand-dark);
    font-size: 0.82rem;
    font-weight: 900;
}

.tpl-advanced-media {
    grid-column: 1 / -1;
    border: 1px solid #edf2f3;
    border-radius: 8px;
    background: #fbfcfc;
    padding: 10px;
}

.tpl-advanced-media summary {
    color: var(--company-text);
    cursor: pointer;
    font-size: 0.86rem;
    font-weight: 880;
}

.tpl-advanced-media .tpl-field {
    margin-top: 10px;
}

.tpl-preview-panel {
    padding: 12px;
}

.tpl-preview-sticky {
    position: sticky;
    top: 92px;
}

.tpl-preview-sticky h2 {
    margin: 0;
    color: var(--company-text);
    font-size: 1.05rem;
    letter-spacing: 0;
}

.tpl-preview-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.tpl-preview-meta strong {
    color: var(--company-brand-dark);
    font-size: 0.82rem;
}

.tpl-phone-preview {
    display: grid;
    min-height: 360px;
    align-items: end;
    border: 1px solid #d8e6e1;
    border-radius: 8px;
    background:
        linear-gradient(45deg, rgba(255, 255, 255, 0.36) 25%, transparent 25%),
        linear-gradient(-45deg, rgba(255, 255, 255, 0.36) 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, rgba(255, 255, 255, 0.36) 75%),
        linear-gradient(-45deg, transparent 75%, rgba(255, 255, 255, 0.36) 75%),
        #e6f1ec;
    background-position: 0 0, 0 8px, 8px -8px, -8px 0;
    background-size: 16px 16px;
    padding: 16px;
}

.tpl-wa-bubble {
    display: grid;
    gap: 9px;
    width: min(100%, 340px);
    border-radius: 8px 8px 8px 2px;
    background: #ffffff;
    padding: 10px 11px;
    box-shadow: 0 10px 20px rgba(20, 33, 41, 0.08);
}

.tpl-wa-media {
    display: grid;
    min-height: 112px;
    place-items: center;
    border: 1px dashed #b8c8c5;
    border-radius: 8px;
    background: #f5f8f7;
    color: var(--company-muted);
    font-size: 0.82rem;
    font-weight: 900;
}

.tpl-wa-header {
    overflow-wrap: anywhere;
    color: #13252d;
    font-size: 0.98rem;
}

.tpl-wa-body {
    margin: 0;
    overflow-wrap: anywhere;
    color: #223740;
    font-size: 0.93rem;
    line-height: 1.45;
    white-space: normal;
}

.tpl-wa-footer {
    overflow-wrap: anywhere;
    color: #7a8a91;
    font-size: 0.78rem;
    font-weight: 750;
}

.tpl-wa-buttons {
    display: grid;
    border-top: 1px solid #edf2f3;
    gap: 0;
    margin: 1px -11px -10px;
}

.tpl-wa-buttons span {
    display: grid;
    min-height: 32px;
    place-items: center;
    border-top: 1px solid #edf2f3;
    color: #0b7285;
    font-size: 0.9rem;
    font-weight: 880;
}

.tpl-submit-bar {
    justify-content: flex-end;
}

@media (max-width: 1180px) {
    .tpl-toolbar form {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .tpl-toolbar input {
        grid-column: 1 / -1;
    }

    .tpl-detail-layout,
    .tpl-builder {
        grid-template-columns: 1fr;
    }

    .tpl-preview-sticky {
        position: static;
    }
}

@media (max-width: 760px) {
    .tpl-page-head,
    .tpl-create-topbar,
    .tpl-list-head,
    .tpl-list-head form,
    .tpl-head-actions,
    .tpl-submit-bar {
        align-items: stretch;
        flex-direction: column;
    }

    .tpl-head-actions,
    .tpl-sync-form,
    .tpl-primary-action,
    .tpl-secondary-action,
    .tpl-toolbar form,
    .tpl-list-head form,
    .tpl-list-head select {
        width: 100%;
    }

    .tpl-toolbar form,
    .tpl-field-grid,
    .tpl-field-grid-two,
    .tpl-button-row {
        grid-template-columns: 1fr;
    }

    .tpl-button-kind,
    .tpl-add-variable {
        width: 100%;
        justify-content: center;
    }

    .tpl-table-wrap {
        display: none;
    }

    .tpl-card-list {
        display: grid;
    }

    .tpl-modal-shell {
        padding: 10px;
    }

    .tpl-modal {
        max-height: calc(100vh - 20px);
        padding: 14px;
    }

    .tpl-phone-preview {
        min-height: 300px;
    }
}

/* Campaigns Step 1 */
.cmp-page-head,
.cmp-create-topbar,
.cmp-list-panel,
.cmp-panel,
.cmp-summary-grid div {
    border: 1px solid var(--company-line);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 8px 18px rgba(20, 33, 41, 0.035);
}

.cmp-page-head,
.cmp-create-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 12px 14px;
}

.cmp-page-head h1,
.cmp-create-topbar h1,
.cmp-list-head h2 {
    margin: 0;
    letter-spacing: 0;
}

.cmp-page-head h1,
.cmp-create-topbar h1 {
    font-size: 1.45rem;
    line-height: 1.1;
}

.cmp-page-head span,
.cmp-create-topbar span,
.cmp-muted {
    color: var(--company-muted);
    font-size: 0.84rem;
    font-weight: 780;
}

.cmp-primary-action,
.cmp-secondary-action,
.cmp-icon-action,
.cmp-back-link,
.cmp-submit-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.cmp-secondary-action[hidden],
.cmp-icon-action[hidden],
.cmp-modal[hidden],
[data-campaign-stage-panel][hidden] {
    display: none !important;
}

.cmp-primary-action,
.cmp-secondary-action {
    min-height: 38px;
    justify-content: center;
    border: 1px solid var(--company-line);
    border-radius: 8px;
    padding: 0 13px;
    font-size: 0.9rem;
    font-weight: 850;
    text-decoration: none;
    cursor: pointer;
}

.cmp-primary-action {
    border-color: var(--company-brand);
    background: var(--company-brand);
    color: #ffffff;
}

.cmp-primary-action span,
.cmp-primary-action svg {
    color: #ffffff;
    stroke: #ffffff;
}

.cmp-primary-action:hover,
.cmp-primary-action:focus-visible {
    border-color: var(--company-brand-dark);
    background: var(--company-brand-dark);
    color: #ffffff;
    outline: none;
}

.cmp-primary-action:hover span,
.cmp-primary-action:focus-visible span,
.cmp-primary-action:hover svg,
.cmp-primary-action:focus-visible svg {
    color: #ffffff;
    stroke: #ffffff;
}

.cmp-secondary-action {
    background: #ffffff;
    color: #27444d;
}

.cmp-icon-action {
    width: 34px;
    height: 34px;
    justify-content: center;
    border: 1px solid var(--company-line);
    border-radius: 8px;
    background: #ffffff;
    color: #526a72;
    padding: 0;
    cursor: pointer;
}

.cmp-icon-action:hover,
.cmp-icon-action:focus-visible {
    border-color: #fecaca;
    background: #fff7f7;
    color: var(--company-danger);
    outline: none;
}

.cmp-primary-action svg,
.cmp-secondary-action svg,
.cmp-icon-action svg,
.cmp-back-link svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
}

.cmp-primary-action.is-disabled,
.cmp-primary-action:disabled,
.cmp-secondary-action:disabled,
.cmp-icon-action:disabled {
    pointer-events: none;
    opacity: 0.55;
}

.cmp-back-link {
    width: max-content;
    color: var(--company-brand-dark);
    font-weight: 850;
    text-decoration: none;
}

.cmp-alert.is-error {
    border-color: #fecaca;
    background: var(--company-danger-soft);
    color: var(--company-danger);
}

.cmp-alert.is-warning {
    border-color: #fde68a;
    background: #fffbeb;
    color: #92400e;
}

.cmp-list-panel {
    overflow: hidden;
}

.cmp-list-panel > .company-pagination {
    margin: 16px 14px 14px;
    padding: 13px 0 0;
}

.cmp-list-head,
.cmp-panel-header {
    border-bottom: 1px solid #edf2f3;
    padding: 12px 14px;
}

.cmp-panel-header span {
    color: var(--company-text);
    font-size: 0.9rem;
    font-weight: 920;
}

.cmp-table-wrap {
    overflow-x: auto;
}

.cmp-table-scroll {
    max-height: 370px;
    overflow: auto;
}

.cmp-table-scroll .cmp-table th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #ffffff;
}

.cmp-panel-header-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.cmp-table-filter {
    display: flex;
    width: min(260px, 100%);
    align-items: center;
    gap: 8px;
}

.cmp-table-filter span {
    color: var(--company-muted);
    font-size: 0.74rem;
    font-weight: 900;
    text-transform: uppercase;
}

.cmp-table-filter input {
    width: 100%;
    min-height: 34px;
    border: 1px solid var(--company-line);
    border-radius: 8px;
    background: #ffffff;
    padding: 7px 10px;
    color: var(--company-text);
    font: inherit;
    font-size: 0.86rem;
    font-weight: 760;
}

.cmp-table {
    width: 100%;
    border-collapse: collapse;
}

.cmp-table th,
.cmp-table td {
    border-bottom: 1px solid #edf2f3;
    padding: 10px 12px;
    text-align: left;
    vertical-align: top;
}

.cmp-table th {
    color: var(--company-muted);
    font-size: 0.75rem;
    font-weight: 900;
    text-transform: uppercase;
}

.cmp-table td {
    color: var(--company-text);
    font-size: 0.9rem;
    font-weight: 760;
}

.cmp-table td span {
    display: block;
    margin-top: 3px;
    color: var(--company-muted);
    font-size: 0.8rem;
}

.cmp-status {
    display: inline-flex;
    min-height: 26px;
    align-items: center;
    border-radius: 999px;
    background: #eef4f5;
    padding: 0 9px;
    color: #38525c;
    font-size: 0.78rem;
    font-weight: 900;
}

.cmp-status.is-mapping_ready {
    background: var(--company-brand-soft);
    color: var(--company-brand-dark);
}

.cmp-stepper {
    display: grid;
    grid-template-columns: repeat(9, minmax(0, 1fr));
    gap: 8px;
}

.cmp-stepper button {
    display: flex;
    min-height: 42px;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--company-line);
    border-radius: 8px;
    background: #ffffff;
    padding: 0 10px;
    color: var(--company-muted);
    font: inherit;
    font-size: 0.86rem;
    font-weight: 850;
    cursor: pointer;
}

.cmp-stepper strong {
    display: grid;
    width: 24px;
    height: 24px;
    place-items: center;
    border-radius: 999px;
    background: #eef4f5;
    color: #38525c;
    font-size: 0.78rem;
}

.cmp-stepper .is-selected {
    border-color: var(--company-brand);
    background: #ffffff;
    color: var(--company-brand-dark);
    box-shadow: inset 0 0 0 1px var(--company-brand);
}

.cmp-stepper .is-selected strong {
    background: var(--company-brand);
    color: #ffffff;
}

.cmp-stepper .is-active {
    border-color: #cfe3df;
    background: #ffffff;
    color: #405661;
}

.cmp-stepper .is-active strong {
    background: #dff3ef;
    color: var(--company-brand-dark);
}

.cmp-stepper .is-complete {
    border-color: #cfe3df;
    background: #f7fbfa;
    color: #4b636b;
}

.cmp-stepper .is-complete strong {
    background: var(--company-brand-soft);
    color: var(--company-brand-dark);
}

.cmp-create-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(280px, 0.85fr);
    gap: 14px;
    align-items: start;
}

.cmp-create-layout.is-centered {
    grid-template-columns: minmax(0, 760px);
    justify-content: center;
}

.cmp-panel {
    display: grid;
    gap: 12px;
    padding-bottom: 14px;
}

.cmp-panel form,
.cmp-field,
.cmp-file-summary,
.cmp-mapping-list {
    display: grid;
    gap: 10px;
}

.cmp-panel form,
.cmp-panel > .cmp-muted,
.cmp-file-summary,
.cmp-panel > .cmp-field-error {
    padding: 0 14px;
}

.cmp-field label {
    color: var(--company-muted);
    font-size: 0.75rem;
    font-weight: 900;
    text-transform: uppercase;
}

.cmp-field input,
.cmp-field select,
.cmp-mapping-row select {
    width: 100%;
    min-height: 38px;
    border: 1px solid var(--company-line);
    border-radius: 8px;
    background: #ffffff;
    padding: 8px 10px;
    color: var(--company-text);
    font: inherit;
    font-size: 0.92rem;
    font-weight: 720;
}

.cmp-field input:focus,
.cmp-field select:focus,
.cmp-mapping-row select:focus {
    border-color: var(--company-brand);
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.14);
    outline: none;
}

.cmp-field-error {
    margin: 0;
    color: var(--company-danger);
    font-size: 0.82rem;
    font-weight: 780;
}

.cmp-upload {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    border: 1px dashed #a9c5bf;
    border-radius: 8px;
    background: #f7fbfa;
    padding: 14px;
    cursor: pointer;
}

.cmp-upload:hover {
    border-color: var(--company-brand);
    background: var(--company-brand-soft);
}

.cmp-upload.is-dragging,
.cmp-upload.has-file {
    border-color: var(--company-brand);
    background: var(--company-brand-soft);
}

.cmp-upload.is-uploading {
    opacity: 0.8;
}

.cmp-upload-icon {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 8px;
    background: #ffffff;
    color: var(--company-brand-dark);
}

.cmp-upload-icon svg {
    width: 23px;
    height: 23px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
}

.cmp-upload strong,
.cmp-file-summary strong {
    color: var(--company-text);
    font-size: 0.95rem;
    font-weight: 900;
}

.cmp-upload p,
.cmp-file-summary span {
    margin: 3px 0 0;
    color: var(--company-muted);
    font-size: 0.82rem;
    font-weight: 760;
}

.cmp-upload small {
    display: inline-flex;
    margin-top: 6px;
    border-radius: 999px;
    background: #ffffff;
    padding: 4px 9px;
    color: var(--company-brand-dark);
    font-size: 0.76rem;
    font-weight: 900;
}

.cmp-upload-remove {
    justify-self: end;
}

.cmp-submit-row {
    justify-content: flex-end;
}

.cmp-mapping-list {
    padding: 0 14px;
}

.cmp-mapping-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(180px, 240px);
    gap: 10px;
    align-items: center;
    border: 1px solid #edf2f3;
    border-radius: 8px;
    background: #fbfcfc;
    padding: 10px;
}

.cmp-mapping-row > span {
    overflow-wrap: anywhere;
    color: var(--company-text);
    font-size: 0.92rem;
    font-weight: 850;
}

.cmp-mapping-row select.has-error {
    border-color: var(--company-danger);
}

.cmp-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.cmp-summary-grid div {
    display: grid;
    gap: 4px;
    padding: 12px 14px;
}

.cmp-summary-grid span {
    color: var(--company-muted);
    font-size: 0.74rem;
    font-weight: 900;
    text-transform: uppercase;
}

.cmp-summary-grid strong {
    color: var(--company-text);
    font-size: 1.35rem;
    letter-spacing: 0;
}

.cmp-template-select-form,
.cmp-step2-form,
.cmp-variable-list,
.cmp-template-media,
.cmp-template-meta,
.cmp-preview {
    display: grid;
    gap: 10px;
}

.cmp-variable-row,
.cmp-template-meta div,
.cmp-template-note,
.cmp-preview-card {
    border: 1px solid #edf2f3;
    border-radius: 8px;
    background: #fbfcfc;
}

.cmp-variable-row strong,
.cmp-preview-recipient strong {
    display: block;
    color: var(--company-text);
    font-size: 0.92rem;
    font-weight: 900;
    overflow-wrap: anywhere;
}

.cmp-variable-row small,
.cmp-preview-recipient span,
.cmp-preview-card small {
    display: block;
    margin-top: 3px;
    color: var(--company-muted);
    font-size: 0.8rem;
    font-weight: 760;
    overflow-wrap: anywhere;
}

.cmp-step2-panel > .cmp-panel-header {
    border-bottom: 1px solid #edf2f3;
}

.cmp-step2-workbench {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
    gap: 30px;
    align-items: start;
    padding: 16px 14px 14px;
}

.cmp-panel .cmp-step2-form {
    gap: 12px;
    min-width: 0;
    padding: 0;
}

.cmp-step2-preview {
    position: sticky;
    top: 14px;
    display: grid;
    gap: 8px;
    min-width: 0;
}

.cmp-step2-phone-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: var(--company-muted);
    font-size: 0.78rem;
    font-weight: 900;
}

.cmp-step2-phone-head span {
    text-transform: uppercase;
}

.cmp-step2-phone-head strong {
    color: var(--company-brand-dark);
    font-size: 0.82rem;
}

.cmp-field > span {
    color: var(--company-muted);
    font-size: 0.75rem;
    font-weight: 900;
    text-transform: uppercase;
}

.cmp-template-picker {
    position: relative;
    display: grid;
    gap: 10px;
}

.cmp-template-picker .cmp-field {
    gap: 7px;
}

.cmp-template-picker input[type="search"] {
    width: 100%;
    min-height: 42px;
    border: 1px solid var(--company-line);
    border-radius: 8px;
    background: #ffffff;
    padding: 9px 11px;
    color: var(--company-text);
    font: inherit;
    font-size: 0.92rem;
    font-weight: 760;
}

.cmp-template-picker input[type="search"]:focus {
    border-color: var(--company-brand);
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.14);
    outline: none;
}

.cmp-template-selected {
    display: grid;
    gap: 3px;
    border: 1px solid #cfe3df;
    border-radius: 8px;
    background: #f7fbfa;
    padding: 10px;
}

.cmp-template-selected.is-empty {
    border-color: #edf2f3;
    background: #fbfcfc;
}

.cmp-template-selected strong,
.cmp-template-result strong {
    color: var(--company-text);
    font-size: 0.92rem;
    font-weight: 900;
    overflow-wrap: anywhere;
}

.cmp-template-selected span,
.cmp-template-result span,
.cmp-template-result-state {
    color: var(--company-muted);
    font-size: 0.8rem;
    font-weight: 760;
}

.cmp-template-results {
    position: absolute;
    z-index: 20;
    top: 73px;
    right: 0;
    left: 0;
    display: grid;
    gap: 6px;
    max-height: 340px;
    overflow-y: auto;
    border: 1px solid var(--company-line);
    border-radius: 8px;
    background: #ffffff;
    padding: 8px;
    box-shadow: 0 18px 38px rgba(20, 33, 41, 0.12);
}

.cmp-template-result-list {
    display: grid;
    gap: 4px;
}

.cmp-template-result {
    display: grid;
    width: 100%;
    gap: 3px;
    border: 0;
    border-radius: 8px;
    background: #ffffff;
    padding: 10px;
    text-align: left;
    cursor: pointer;
}

.cmp-template-result:hover,
.cmp-template-result:focus-visible {
    background: var(--company-brand-soft);
    outline: none;
}

.cmp-template-result-state {
    padding: 10px;
}

.cmp-template-meta {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.cmp-template-meta div,
.cmp-template-note {
    padding: 8px 10px;
}

.cmp-template-meta span {
    display: block;
    color: var(--company-muted);
    font-size: 0.72rem;
    font-weight: 900;
    text-transform: uppercase;
}

.cmp-template-meta strong {
    display: block;
    margin-top: 2px;
    color: var(--company-text);
    font-size: 0.88rem;
    font-weight: 900;
}

.cmp-variable-row {
    display: grid;
    grid-template-columns: minmax(120px, 170px) minmax(220px, 1fr);
    gap: 12px;
    align-items: center;
    padding: 8px 0;
    border-width: 0 0 1px;
    border-radius: 0;
    background: transparent;
}

.cmp-variable-row select {
    width: 100%;
    min-height: 36px;
    border: 1px solid var(--company-line);
    border-radius: 8px;
    background: #ffffff;
    padding: 7px 10px;
    color: var(--company-text);
    font: inherit;
    font-size: 0.9rem;
    font-weight: 720;
}

.cmp-variable-row select:focus {
    border-color: var(--company-brand);
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.14);
    outline: none;
}

.cmp-variable-token {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    border: 1px solid #cfe3df;
    border-radius: 999px;
    background: #f7fbfa;
    padding: 2px 8px;
    color: var(--company-brand-dark);
    font-size: 0.78rem;
    font-weight: 900;
}

.cmp-template-media {
    border-top: 1px solid #edf2f3;
    padding-top: 10px;
}

.cmp-template-media .cmp-panel-header {
    border-bottom: 0;
    padding: 0;
}

.cmp-media-selected,
.cmp-media-library-item {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) auto auto;
    gap: 8px;
    align-items: center;
    border: 1px solid #cfe3df;
    border-radius: 8px;
    background: #f7fbfa;
    padding: 8px 10px;
}

.cmp-media-selected.is-empty {
    grid-template-columns: 34px minmax(0, 1fr);
    border-color: #edf2f3;
    background: #fbfcfc;
}

.cmp-media-selected {
    cursor: pointer;
}

.cmp-media-selected:not(.is-empty) {
    grid-template-columns: 34px minmax(0, 1fr) auto auto;
}

.cmp-media-thumb {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 8px;
    background: #ffffff;
    color: var(--company-brand-dark);
    font-size: 0.95rem;
    font-weight: 950;
}

.cmp-media-selected strong,
.cmp-media-library-item strong {
    display: block;
    color: var(--company-text);
    font-size: 0.88rem;
    font-weight: 900;
    overflow-wrap: anywhere;
}

.cmp-media-selected span,
.cmp-media-library-item span,
.cmp-media-library-state {
    display: block;
    margin-top: 2px;
    color: var(--company-muted);
    font-size: 0.76rem;
    font-weight: 760;
}

.cmp-media-workspace {
    display: none;
    gap: 10px;
}

.cmp-media-workspace.is-open {
    display: grid;
}

.cmp-media-tabs {
    display: inline-grid;
    width: max-content;
    grid-template-columns: repeat(2, minmax(120px, 1fr));
    border: 1px solid var(--company-line);
    border-radius: 8px;
    background: #ffffff;
    padding: 3px;
}

.cmp-media-tabs button {
    min-height: 34px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: var(--company-muted);
    font: inherit;
    font-size: 0.86rem;
    font-weight: 900;
    cursor: pointer;
}

.cmp-media-tabs button.is-active {
    background: var(--company-brand);
    color: #ffffff;
}

.cmp-media-dropzone {
    min-height: 104px;
    cursor: pointer;
}

.cmp-media-progress {
    height: 8px;
    overflow: hidden;
    border-radius: 999px;
    background: #eef4f5;
}

.cmp-media-progress span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--company-brand);
    transition: width 0.18s ease;
}

.cmp-media-library-head input {
    width: 100%;
    min-height: 38px;
    border: 1px solid var(--company-line);
    border-radius: 8px;
    background: #ffffff;
    padding: 8px 10px;
    color: var(--company-text);
    font: inherit;
    font-size: 0.92rem;
    font-weight: 720;
}

.cmp-media-library-head input:focus {
    border-color: var(--company-brand);
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.14);
    outline: none;
}

.cmp-media-library-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
    gap: 12px;
    max-height: 310px;
    overflow-y: auto;
}

.cmp-media-library-item {
    grid-template-columns: 1fr;
    gap: 8px;
    align-content: start;
    border-color: #edf2f3;
    background: #ffffff;
    padding: 10px;
    cursor: pointer;
}

.cmp-media-library-item:hover,
.cmp-media-library-item:focus-visible {
    border-color: var(--company-brand);
    background: #f7fbfa;
    outline: none;
}

.cmp-media-library-item .cmp-media-thumb {
    width: 100%;
    height: auto;
    aspect-ratio: 1;
    border: 0;
    background: #ef3f83;
    color: rgba(255, 255, 255, 0.78);
}

.cmp-media-library-item .cmp-media-thumb svg {
    width: 42%;
    height: 42%;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

.cmp-media-library-item .cmp-media-thumb img {
    width: 100%;
    height: 100%;
    border-radius: 8px;
    object-fit: cover;
}

.cmp-media-library-item strong {
    display: -webkit-box;
    min-height: 32px;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    font-size: 0.8rem;
    line-height: 1.3;
}

.cmp-media-library-item span {
    font-size: 0.72rem;
}

.cmp-media-library-state {
    padding: 8px 0;
}

.cmp-preview {
    padding: 0 14px;
}

.cmp-preview-card {
    position: relative;
    max-width: 520px;
    padding: 14px;
}

.cmp-step2-phone-card {
    position: relative;
    max-width: none;
    max-height: calc(100vh - 150px);
    overflow: visible;
    border: 1px solid #dfe7e7;
    background: #ffffff;
    box-shadow: 0 14px 34px rgba(20, 33, 41, 0.1);
}

.cmp-step2-phone-card::before {
    content: none;
}

.cmp-whatsapp-badge {
    position: absolute;
    top: -13px;
    left: -13px;
    z-index: 2;
    display: grid;
    width: 28px;
    height: 28px;
    place-items: center;
    border: 2px solid #ffffff;
    border-radius: 999px;
    background: #25d366;
    color: #ffffff;
    box-shadow: 0 5px 14px rgba(20, 33, 41, 0.18);
}

.cmp-whatsapp-badge svg {
    width: 19px;
    height: 19px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.75;
}

.cmp-step3-panel {
    overflow: hidden;
}

.cmp-step3-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
    gap: 30px;
    align-items: start;
}

.cmp-step3-fields,
.cmp-final-summary,
.cmp-final-grid,
.cmp-test-facts,
.cmp-variable-summary,
.cmp-send-progress {
    display: grid;
    gap: 10px;
}

.cmp-final-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.cmp-test-facts {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.cmp-final-summary {
    padding: 14px;
    background: #ffffff;
}

.cmp-test-facts div,
.cmp-final-grid div {
    border: 1px solid #edf2f3;
    border-radius: 8px;
    background: #ffffff;
    padding: 10px 12px;
}

.cmp-test-facts span,
.cmp-final-grid span {
    display: block;
    color: var(--company-muted);
    font-size: 0.72rem;
    font-weight: 900;
    text-transform: uppercase;
}

.cmp-test-facts strong,
.cmp-final-grid strong {
    display: block;
    margin-top: 3px;
    color: var(--company-text);
    font-size: 0.88rem;
    font-weight: 900;
    overflow-wrap: anywhere;
}

.cmp-variable-summary {
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 8px;
}

.cmp-variable-summary span {
    border: 1px solid #e1eeee;
    border-radius: 8px;
    background: #fbfcfc;
    padding: 7px 9px;
    color: var(--company-brand-dark);
    font-size: 0.76rem;
    font-weight: 900;
    overflow-wrap: anywhere;
}

.cmp-send-result,
.cmp-send-progress {
    border: 1px solid #cfe3df;
    border-radius: 8px;
    background: #f7fbfa;
    padding: 10px;
    color: var(--company-brand-dark);
    font-size: 0.88rem;
    font-weight: 850;
}

.cmp-send-result.is-error {
    border-color: #fecaca;
    background: var(--company-danger-soft);
    color: var(--company-danger);
}

.cmp-send-progress small {
    color: var(--company-muted);
    font-size: 0.78rem;
    font-weight: 850;
}

.cmp-send-progress em {
    color: var(--company-muted);
    font-size: 0.8rem;
    font-style: normal;
    font-weight: 800;
}

.cmp-no-test-warning {
    border: 1px solid #e1eeee;
    border-radius: 8px;
    background: #fbfcfc;
    padding: 8px 10px;
    color: var(--company-muted);
    font-size: 0.86rem;
    font-weight: 850;
    box-shadow: none;
}

.cmp-modal {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: grid;
    place-items: center;
    background: rgba(15, 23, 42, 0.42);
    padding: 20px;
}

.cmp-modal-card {
    display: grid;
    width: min(440px, 100%);
    gap: 10px;
    border-radius: 8px;
    background: #ffffff;
    padding: 18px;
    box-shadow: 0 24px 60px rgba(20, 33, 41, 0.24);
}

.cmp-modal-card h2,
.cmp-modal-card p {
    margin: 0;
}

.cmp-modal-card h2 {
    color: var(--company-text);
    font-size: 1.15rem;
    letter-spacing: 0;
}

.cmp-modal-card p {
    color: var(--company-muted);
    font-size: 0.9rem;
    font-weight: 760;
}

.cmp-preview-recipient {
    border-bottom: 1px solid #edf2f3;
    margin-bottom: 10px;
    padding-bottom: 10px;
}

.cmp-preview-media {
    display: grid;
    min-height: 96px;
    place-items: center;
    border: 1px dashed #a9c5bf;
    border-radius: 8px;
    background: #f7fbfa;
    color: var(--company-brand-dark);
    font-size: 0.82rem;
    font-weight: 900;
}

.cmp-preview-card h3 {
    margin: 10px 0 0;
    color: var(--company-text);
    font-size: 1rem;
    letter-spacing: 0;
}

.cmp-preview-card p {
    margin: 10px 0 0;
    color: var(--company-text);
    font-size: 0.92rem;
    line-height: 1.5;
    white-space: normal;
}

.cmp-preview-button {
    display: block;
    width: 100%;
    margin-top: 8px;
    border: 1px solid #cfe3df;
    border-radius: 8px;
    background: #ffffff;
    padding: 9px 10px;
    color: var(--company-brand-dark);
    font-size: 0.86rem;
    font-weight: 900;
    text-align: center;
}

.cmp-preview-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    max-width: 520px;
}

.cmp-preview-nav .cmp-primary-action,
.cmp-preview-nav .cmp-secondary-action {
    min-height: 36px;
    padding: 0 12px;
}

.cmp-preview-nav span {
    color: var(--company-muted);
    font-size: 0.82rem;
    font-weight: 900;
}

.cmp-report-panel {
    overflow: hidden;
}

.cmp-report-header {
    justify-content: space-between;
}

.cmp-report-header .cmp-secondary-action {
    width: auto;
    min-height: 34px;
    padding: 0 12px;
}

.cmp-report {
    display: grid;
    gap: 14px;
    padding: 14px;
    background: #ffffff;
}

.cmp-report-tabs {
    display: grid;
    grid-template-columns: repeat(5, minmax(118px, 1fr));
    gap: 10px;
}

.cmp-report-tab {
    display: grid;
    min-height: 86px;
    cursor: pointer;
    gap: 4px;
    align-content: center;
    border: 1px solid #dfe9e8;
    border-radius: 8px;
    background: #fbfcfc;
    padding: 10px 12px;
    color: var(--company-text);
    font: inherit;
    text-align: left;
    transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease, background 0.16s ease;
}

.cmp-report-tab:hover,
.cmp-report-tab:focus-visible,
.cmp-report-tab.is-active {
    border-color: var(--company-brand);
    background: #f3fbf9;
    box-shadow: 0 10px 24px rgba(16, 88, 89, 0.12);
    outline: none;
    transform: translateY(-1px);
}

.cmp-report-tab span {
    color: var(--company-brand-dark);
    font-size: 0.92rem;
    font-weight: 950;
}

.cmp-report-tab strong {
    color: var(--company-text);
    font-size: 1.35rem;
    font-weight: 950;
    letter-spacing: 0;
    line-height: 1;
}

.cmp-report-tab em {
    color: var(--company-muted);
    font-size: 0.78rem;
    font-style: normal;
    font-weight: 900;
}

.cmp-report-tab.is-delivered,
.cmp-report-tab.is-read {
    border-top: 3px solid #25b46b;
}

.cmp-report-tab.is-sent,
.cmp-report-tab.is-overview {
    border-top: 3px solid var(--company-brand);
}

.cmp-report-tab.is-failed {
    border-top: 3px solid #ef6f4f;
}
.cmp-report-info-grid,
.cmp-report-excluded {
    display: grid;
    grid-template-columns: repeat(5, minmax(130px, 1fr));
    gap: 10px;
}

.cmp-report-info-grid div,
.cmp-report-excluded div {
    display: grid;
    gap: 4px;
    border: 1px solid #edf2f3;
    border-radius: 8px;
    background: #fbfcfc;
    padding: 10px 12px;
    min-width: 0;
}

.cmp-report-info-grid span,
.cmp-report-excluded span {
    color: var(--company-muted);
    font-size: 0.74rem;
    font-weight: 900;
    text-transform: uppercase;
}

.cmp-report-info-grid strong,
.cmp-report-excluded strong {
    color: var(--company-text);
    font-size: 0.88rem;
    font-weight: 900;
    overflow-wrap: anywhere;
}


.cmp-report-toolbar {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) minmax(220px, 280px) minmax(96px, 120px) auto;
    gap: 12px;
    align-items: end;
    border: 1px solid #edf2f3;
    border-radius: 8px;
    background: #fbfcfc;
    padding: 12px;
}

.cmp-report-toolbar > div:first-child {
    display: grid;
    gap: 3px;
}

.cmp-report-toolbar strong {
    color: var(--company-text);
    font-size: 0.94rem;
    font-weight: 950;
}

.cmp-report-toolbar span {
    color: var(--company-muted);
    font-size: 0.82rem;
    font-weight: 820;
}

.cmp-report-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.cmp-report-actions .cmp-primary-action,
.cmp-report-actions .cmp-secondary-action {
    min-height: 34px;
    padding: 0 12px;
    white-space: nowrap;
}

.cmp-report-search,
.cmp-report-page-size {
    width: 100%;
}

.cmp-report-page-size select {
    width: 100%;
    min-height: 36px;
    border: 1px solid var(--company-line);
    border-radius: 8px;
    background: #ffffff;
    padding: 7px 10px;
    color: var(--company-text);
    font: inherit;
    font-size: 0.9rem;
    font-weight: 820;
}

.cmp-report-table-wrap {
    max-height: 520px;
    overflow: auto;
    border: 1px solid #edf2f3;
    border-radius: 8px;
}

.cmp-report-table th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #ffffff;
}

.cmp-report-table td strong {
    display: block;
    color: var(--company-text);
    font-size: 0.9rem;
    font-weight: 900;
}

.cmp-report-badge {
    display: inline-flex;
    min-height: 24px;
    align-items: center;
    border-radius: 999px;
    background: #eef4f5;
    padding: 0 9px;
    color: #38525c;
    font-size: 0.76rem;
    font-weight: 950;
}

.cmp-report-badge.is-sent {
    background: var(--company-brand-soft);
    color: var(--company-brand-dark);
}

.cmp-report-badge.is-delivered,
.cmp-report-badge.is-read {
    background: #eaf8ef;
    color: #127347;
}

.cmp-report-badge.is-failed {
    background: #fff1ed;
    color: #b54126;
}

.cmp-report-view {
    width: auto;
    min-height: 30px;
    padding: 0 10px;
}

.cmp-report-pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: var(--company-muted);
    font-size: 0.84rem;
    font-weight: 850;
}

.cmp-report-pagination > div {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.cmp-report-pagination .cmp-secondary-action {
    width: auto;
    min-height: 32px;
    padding: 0 10px;
}

.cmp-report-history {
    display: grid;
    gap: 8px;
    margin: 12px 0 0;
    padding: 0;
    list-style: none;
}

.cmp-report-history li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border: 1px solid #edf2f3;
    border-radius: 8px;
    background: #fbfcfc;
    padding: 9px 10px;
}

.cmp-report-history strong {
    color: var(--company-text);
    font-size: 0.86rem;
    font-weight: 920;
}

.cmp-report-history span {
    color: var(--company-muted);
    font-size: 0.82rem;
    font-weight: 820;
    text-align: right;
}
.cmp-report-empty {
    border: 1px dashed #cfe3df;
    border-radius: 8px;
    background: #fbfcfc;
}

@media (max-width: 1180px) {
    .cmp-report-tabs {
        grid-template-columns: repeat(4, minmax(118px, 1fr));
    }

    .cmp-report-toolbar {
        grid-template-columns: 1fr;
    }

    .cmp-report-actions {
        justify-content: flex-start;
    }
}

@media (max-width: 980px) {
    .cmp-create-layout,
    .cmp-step2-workbench,
    .cmp-step3-grid,
    .cmp-stepper,
    .cmp-summary-grid,
    .cmp-final-grid,
    .cmp-template-meta {
        grid-template-columns: 1fr;
    }

    .cmp-step2-preview {
        position: static;
    }
}

@media (max-width: 760px) {
    .cmp-page-head,
    .cmp-create-topbar,
    .cmp-submit-row {
        align-items: stretch;
        flex-direction: column;
    }

    .cmp-primary-action,
    .cmp-secondary-action {
        width: 100%;
    }

    .cmp-upload,
    .cmp-mapping-row,
    .cmp-variable-row,
    .cmp-test-facts,
    .cmp-final-grid,
    .cmp-media-selected,
    .cmp-media-selected.is-empty,
    .cmp-media-library-item {
        grid-template-columns: 1fr;
    }

    .cmp-media-tabs {
        width: 100%;
    }

    .cmp-upload-icon {
        margin: 0 auto;
    }
}

/* Company Reports / Analytics */
.analytics-head {
    align-items: flex-start;
}

.analytics-head p {
    margin: 4px 0 0;
    color: var(--company-muted);
    font-size: 0.88rem;
    font-weight: 800;
}

.analytics-head-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.analytics-head-actions .cmp-primary-action,
.analytics-head-actions .cmp-secondary-action,
.analytics-filter .cmp-primary-action {
    min-height: 36px;
    padding: 0 12px;
    white-space: nowrap;
}

.analytics-filter {
    display: grid;
    grid-template-columns: minmax(280px, 1.2fr) repeat(4, minmax(150px, 1fr)) auto;
    gap: 10px;
    align-items: end;
    margin: 0 0 14px;
    border: 1px solid var(--company-line);
    border-radius: 8px;
    background: #ffffff;
    padding: 12px;
    box-shadow: var(--company-shadow-soft);
}

.analytics-filter label {
    display: grid;
    gap: 5px;
    color: var(--company-muted);
    font-size: 0.72rem;
    font-weight: 950;
    text-transform: uppercase;
}

.analytics-filter input[type="date"],
.analytics-filter select {
    min-height: 36px;
    width: 100%;
    border: 1px solid var(--company-line);
    border-radius: 8px;
    background: #ffffff;
    color: var(--company-text);
    font: inherit;
    font-size: 0.85rem;
    font-weight: 850;
    padding: 7px 9px;
}

.analytics-filter input[type="date"][readonly] {
    background: #f7faf9;
    color: #4d626b;
    cursor: default;
}

.analytics-segment {
    display: grid;
    overflow: hidden;
    grid-template-columns: 0.78fr 1.2fr 1.34fr 0.9fr;
    gap: 0;
    align-self: end;
    border: 1px solid #cfe3df;
    border-radius: 8px;
    background: #ffffff;
}

.analytics-segment label {
    display: block;
    min-width: 0;
    text-transform: none;
}

.analytics-segment input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.analytics-segment span {
    display: flex;
    min-height: 30px;
    align-items: center;
    justify-content: center;
    border-right: 1px solid #cfe3df;
    background: #ffffff;
    color: var(--company-brand-dark);
    font-size: 0.62rem;
    font-weight: 900;
    line-height: 1;
    padding: 0 4px;
    text-align: center;
    white-space: nowrap;
}

.analytics-segment label:last-child span {
    border-right: 0;
}

.analytics-segment input:checked + span {
    background: var(--company-brand);
    color: #ffffff;
}

.analytics-segment input:focus-visible + span {
    box-shadow: inset 0 0 0 3px rgba(15, 118, 110, 0.18);
}

.analytics-segment input:checked:focus-visible + span {
    box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.36);
}

.analytics-kpis {
    display: grid;
    grid-template-columns: repeat(7, minmax(116px, 1fr));
    gap: 10px;
    margin-bottom: 14px;
}

.analytics-kpi,
.analytics-panel {
    border: 1px solid var(--company-line);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: var(--company-shadow-soft);
}

.analytics-kpi {
    display: grid;
    gap: 3px;
    min-height: 78px;
    padding: 11px 12px;
    border-top: 3px solid #8bb8b2;
}

.analytics-kpi.is-good { border-top-color: #22a35a; }
.analytics-kpi.is-info { border-top-color: #2563eb; }
.analytics-kpi.is-risk { border-top-color: #ef6f4f; }

.analytics-kpi span,
.analytics-panel-head span {
    color: var(--company-muted);
    font-size: 0.72rem;
    font-weight: 950;
    letter-spacing: 0;
    text-transform: uppercase;
}

.analytics-kpi strong {
    color: var(--company-text);
    font-size: 1.28rem;
    font-weight: 980;
    line-height: 1.1;
}

.analytics-kpi small {
    color: var(--company-muted);
    font-size: 0.74rem;
    font-weight: 800;
}

.analytics-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(280px, 0.75fr);
    gap: 14px;
    margin-bottom: 14px;
}

.analytics-grid-secondary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.analytics-panel-wide {
    grid-row: span 2;
}

.analytics-panel {
    min-width: 0;
    padding: 12px;
}

.analytics-panel-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.analytics-panel-head h2 {
    margin: 2px 0 0;
    color: var(--company-text);
    font-size: 1rem;
    font-weight: 950;
}

.analytics-chart-wrap {
    min-height: 260px;
    border: 1px solid #edf2f3;
    border-radius: 8px;
    background: linear-gradient(180deg, #ffffff 0%, #fbfcfc 100%);
    overflow: hidden;
}

.analytics-chart {
    display: block;
    width: 100%;
    height: 260px;
}

.analytics-chart line {
    stroke: #dbe6e8;
    stroke-width: 1;
}

.analytics-chart polyline {
    fill: none;
    stroke: var(--line);
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.analytics-legend,
.analytics-chart-labels {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 8px;
    color: var(--company-muted);
    font-size: 0.78rem;
    font-weight: 850;
}

.analytics-legend span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.analytics-legend i {
    width: 9px;
    height: 9px;
    border-radius: 999px;
    background: var(--dot);
}

.analytics-chart-labels {
    justify-content: space-between;
}

.analytics-bars {
    display: grid;
    gap: 12px;
}

.analytics-bars div {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 6px 12px;
    align-items: center;
}

.analytics-bars span,
.analytics-mini-grid span {
    color: var(--company-muted);
    font-size: 0.8rem;
    font-weight: 850;
}

.analytics-bars strong,
.analytics-mini-grid strong {
    color: var(--company-text);
    font-size: 0.98rem;
    font-weight: 950;
}

.analytics-bars i {
    grid-column: 1 / -1;
    display: block;
    height: 8px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--company-brand) var(--bar), #edf2f3 var(--bar));
}

.analytics-spark-bars {
    display: flex;
    align-items: end;
    gap: 4px;
    height: 132px;
    border: 1px solid #edf2f3;
    border-radius: 8px;
    background: #fbfcfc;
    padding: 10px;
}

.analytics-spark-bars span {
    flex: 1 1 4px;
    min-width: 3px;
    height: var(--height);
    border-radius: 5px 5px 0 0;
    background: #0f766e;
}

.analytics-mini-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.analytics-mini-grid div {
    display: grid;
    gap: 3px;
    border: 1px solid #edf2f3;
    border-radius: 8px;
    background: #fbfcfc;
    padding: 9px;
}

.analytics-table-wrap {
    max-height: none;
}

.analytics-table td,
.analytics-table th {
    white-space: nowrap;
}

.analytics-table td:first-child,
.analytics-table th:first-child,
.analytics-table td:nth-child(2),
.analytics-table th:nth-child(2) {
    white-space: normal;
}

.analytics-row-link {
    display: block;
    color: var(--company-brand-dark);
    font-weight: 950;
    text-decoration: none;
}

.analytics-row-link:hover {
    text-decoration: underline;
}

.analytics-table td span {
    display: block;
    margin-top: 2px;
    color: var(--company-muted);
    font-size: 0.75rem;
    font-weight: 800;
}

.analytics-ranked-list,
.analytics-failure-list {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.analytics-ranked-list li,
.analytics-failure-list li {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 3px 10px;
    border: 1px solid #edf2f3;
    border-radius: 8px;
    background: #fbfcfc;
    padding: 9px;
}

.analytics-ranked-list a,
.analytics-failure-list span {
    color: var(--company-text);
    font-size: 0.86rem;
    font-weight: 900;
    text-decoration: none;
}

.analytics-ranked-list a:hover {
    text-decoration: underline;
}

.analytics-ranked-list strong,
.analytics-failure-list strong {
    color: var(--company-brand-dark);
    font-size: 0.84rem;
    font-weight: 950;
}

.analytics-ranked-list span {
    grid-column: 1 / -1;
    color: var(--company-muted);
    font-size: 0.76rem;
    font-weight: 800;
}

.analytics-empty {
    display: grid;
    place-items: center;
    min-height: 160px;
    border: 1px dashed #cfe3df;
    border-radius: 8px;
    background: #fbfcfc;
    padding: 18px;
    text-align: center;
}

.analytics-empty.compact {
    min-height: 120px;
}

.analytics-empty strong {
    color: var(--company-text);
    font-size: 0.95rem;
    font-weight: 950;
}

.analytics-empty span {
    margin-top: 5px;
    color: var(--company-muted);
    font-size: 0.84rem;
    font-weight: 800;
}

@media (max-width: 1280px) {
    .analytics-filter,
    .analytics-kpis {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .analytics-segment {
        grid-column: 1 / -1;
    }
}

@media (max-width: 980px) {
    .analytics-grid,
    .analytics-grid-secondary {
        grid-template-columns: 1fr;
    }

    .analytics-panel-wide {
        grid-row: auto;
    }

    .analytics-kpis {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .analytics-head-actions,
    .analytics-filter,
    .analytics-kpis,
    .analytics-mini-grid {
        grid-template-columns: 1fr;
    }

    .analytics-head-actions .cmp-primary-action,
    .analytics-head-actions .cmp-secondary-action,
    .analytics-filter .cmp-primary-action {
        width: 100%;
    }

    .analytics-table-wrap {
        overflow: visible;
    }

    .analytics-table thead {
        display: none;
    }

    .analytics-table tr,
    .analytics-table td {
        display: block;
        width: 100%;
    }

    .analytics-table tr {
        border-bottom: 1px solid #edf2f3;
        padding: 9px 0;
    }

    .analytics-table td {
        border: 0;
        padding: 6px 8px;
        white-space: normal;
    }

    .analytics-table td::before {
        content: attr(data-label);
        display: block;
        margin-bottom: 2px;
        color: var(--company-muted);
        font-size: 0.68rem;
        font-weight: 950;
        text-transform: uppercase;
    }
}

/* Campaigns list workflow actions */
.cmp-list-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.cmp-list-actions form {
    display: inline-flex;
    margin: 0;
}

.cmp-list-actions .company-icon-button {
    width: 34px;
    height: 34px;
}

.cmp-list-actions .company-icon-button svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.cmp-list-delete {
    color: var(--company-danger);
}

.cmp-list-delete:hover,
.cmp-list-delete:focus-visible {
    border-color: #fecaca;
    background: var(--company-danger-soft);
}

.cmp-list-modal-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 6px;
}

.cmp-danger-action {
    border-color: var(--company-danger);
    background: var(--company-danger);
    color: #ffffff;
}

.cmp-danger-action:hover,
.cmp-danger-action:focus-visible {
    border-color: #991b1b;
    background: #991b1b;
}

@media (max-width: 760px) {
    .cmp-list-actions {
        justify-content: flex-start;
    }

    .cmp-list-modal-actions .cmp-primary-action,
    .cmp-list-modal-actions .cmp-secondary-action {
        width: 100%;
    }
}

.developer-api-page {
    display: grid;
    gap: 14px;
}

.developer-api-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    border: 1px solid var(--company-line);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: var(--company-shadow-soft);
    padding: 18px;
}

.developer-api-head h1 {
    margin: 2px 0 6px;
    color: var(--company-text);
    font-size: 1.45rem;
    font-weight: 980;
}

.developer-api-head p,
.developer-api-muted {
    margin: 0;
    color: var(--company-muted);
    font-size: 0.88rem;
    font-weight: 750;
    line-height: 1.5;
}

.developer-api-status {
    display: inline-flex;
    min-height: 34px;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    border: 1px solid #cfe3df;
    border-radius: 8px;
    background: #f4fbf9;
    color: var(--company-brand-dark);
    padding: 7px 10px;
    font-size: 0.8rem;
    font-weight: 950;
}

.developer-api-status.disabled {
    border-color: #f2c9c9;
    background: #fff7f7;
    color: #b42318;
}

.developer-api-alert {
    border: 1px solid var(--company-line);
    border-radius: 8px;
    background: #ffffff;
    padding: 12px 14px;
    font-weight: 850;
}

.developer-api-alert.success {
    border-color: #b8ded5;
    background: #f1fbf8;
    color: var(--company-brand-dark);
}

.developer-api-alert.error {
    border-color: #f2c9c9;
    background: #fff7f7;
    color: #b42318;
}

.developer-api-kpis {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.developer-api-kpis article,
.developer-api-panel {
    border: 1px solid var(--company-line);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: var(--company-shadow-soft);
}

.developer-api-kpis article {
    display: grid;
    gap: 4px;
    min-height: 88px;
    padding: 12px;
    border-top: 3px solid var(--company-brand);
}

.developer-api-kpis span,
.developer-api-panel-head span,
.developer-api-endpoints span,
.developer-api-keybox dt {
    color: var(--company-muted);
    font-size: 0.72rem;
    font-weight: 950;
    letter-spacing: 0;
    text-transform: uppercase;
}

.developer-api-kpis strong {
    color: var(--company-text);
    font-size: 1.12rem;
    font-weight: 980;
}

.developer-api-kpis small {
    color: var(--company-muted);
    font-size: 0.76rem;
    font-weight: 800;
    line-height: 1.35;
}

.developer-api-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.developer-api-panel {
    min-width: 0;
    padding: 12px;
}

.developer-api-panel-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.developer-api-panel-head h2 {
    margin: 2px 0 0;
    color: var(--company-text);
    font-size: 1rem;
    font-weight: 950;
}

.developer-api-panel-head .cmp-primary-action,
.developer-api-panel-head .cmp-primary-action span,
.developer-api-panel-head .cmp-primary-action svg {
    color: #ffffff;
    text-transform: none;
}

.developer-api-panel-head .cmp-primary-action svg {
    stroke: #ffffff;
}

.developer-api-keybox,
.developer-api-endpoints {
    display: grid;
    gap: 10px;
}

.developer-api-keybox code,
.developer-api-endpoints code,
.developer-api-copy-row code,
.developer-api-panel pre {
    overflow-x: auto;
    border: 1px solid #dbe8e6;
    border-radius: 8px;
    background: #f7faf9;
    color: #132f38;
}

.developer-api-keybox code,
.developer-api-copy-row code {
    display: block;
    padding: 11px;
    font-size: 0.85rem;
    font-weight: 900;
}

.developer-api-keybox dl {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin: 0;
}

.developer-api-keybox div {
    display: grid;
    gap: 2px;
    border: 1px solid #edf2f3;
    border-radius: 8px;
    padding: 8px;
}

.developer-api-keybox dd {
    margin: 0;
    color: var(--company-text);
    font-size: 0.84rem;
    font-weight: 850;
}

.developer-api-endpoints div {
    display: grid;
    grid-template-columns: minmax(0, 0.5fr) minmax(0, 1fr) auto;
    gap: 8px;
    align-items: center;
}

.developer-api-endpoints code {
    padding: 9px;
    font-size: 0.78rem;
    white-space: nowrap;
}

.developer-api-panel pre {
    margin: 0 0 10px;
    padding: 12px;
    font-size: 0.8rem;
    line-height: 1.55;
}

.developer-api-panel pre code {
    white-space: pre;
}

.developer-api-errors {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-bottom: 10px;
}

.developer-api-errors code {
    border: 1px solid #dbe8e6;
    border-radius: 8px;
    background: #fbfcfc;
    color: var(--company-brand-dark);
    padding: 6px 8px;
    font-size: 0.74rem;
    font-weight: 900;
}

.developer-api-copy-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
}

.developer-api-key-modal p {
    margin: 0 0 10px;
    color: var(--company-muted);
    font-weight: 800;
}

@media (max-width: 1120px) {
    .developer-api-kpis {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .developer-api-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 680px) {
    .developer-api-head,
    .developer-api-panel-head,
    .developer-api-endpoints div,
    .developer-api-copy-row,
    .developer-api-keybox dl {
        grid-template-columns: 1fr;
    }

    .developer-api-head,
    .developer-api-panel-head {
        display: grid;
    }

    .developer-api-kpis {
        grid-template-columns: 1fr;
    }

    .developer-api-panel-head .cmp-primary-action,
    .developer-api-panel-head .cmp-secondary-action,
    .developer-api-copy-row .company-icon-button {
        width: 100%;
    }
}

.company-alert.success {
    border-color: #99f6e4;
    background: #f0fdfa;
    color: var(--company-brand-dark);
}
.company-password-toggle[aria-pressed="true"] span::before {
    position: absolute;
    top: -7px;
    left: 7px;
    width: 2px;
    height: 22px;
    background: currentColor;
    content: "";
    transform: rotate(45deg);
}
.company-auth-actions {
    margin-top: -2px;
    text-align: right;
}

.company-auth-link,
.company-auth-back-link {
    color: var(--company-brand-dark);
    font-size: 0.92rem;
    font-weight: 850;
    text-decoration: none;
}

.company-auth-link:hover,
.company-auth-link:focus-visible,
.company-auth-back-link:hover,
.company-auth-back-link:focus-visible {
    color: var(--company-brand);
    outline: none;
    text-decoration: underline;
}

.company-auth-footer-action {
    text-align: center;
}

/* Account password change */
body.modal-open {
    overflow: hidden;
}

.company-topbar-actions {
    display: flex;
    min-width: 0;
    align-items: center;
    justify-content: flex-end;
    justify-self: end;
    gap: 10px;
}

.company-account-menu {
    position: relative;
    min-width: 0;
}

.company-account-button {
    display: inline-flex;
    max-width: 260px;
    min-height: 38px;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--company-line);
    border-radius: 8px;
    background: #ffffff;
    color: #344852;
    cursor: pointer;
    font: inherit;
    font-size: 0.86rem;
    font-weight: 850;
    padding: 0 10px;
}

.company-account-button > span:not(.company-account-avatar):not(.company-account-chevron) {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.company-account-button:hover,
.company-account-button:focus-visible {
    border-color: var(--company-brand);
    background: var(--company-brand-soft);
    outline: none;
}

.company-account-avatar {
    display: inline-grid;
    width: 24px;
    height: 24px;
    flex: 0 0 auto;
    place-items: center;
    border-radius: 8px;
    background: var(--company-brand-soft);
    color: var(--company-brand-dark);
    font-size: 0.76rem;
    font-weight: 950;
}

.company-account-avatar.is-active {
    background: var(--company-brand-dark);
    color: #ffffff;
}

.company-account-avatar.is-upcoming,
.company-account-avatar.is-locked {
    background: var(--company-danger);
    color: #ffffff;
}

.company-account-chevron {
    display: inline-grid;
    width: 16px;
    height: 16px;
    flex: 0 0 auto;
    place-items: center;
    color: var(--company-muted);
}

.company-account-chevron svg,
.company-account-dropdown svg,
.company-secure-password-toggle svg,
.company-change-password-head .company-icon-button svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
}

.company-account-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 75;
    width: min(230px, calc(100vw - 32px));
    border: 1px solid var(--company-line);
    border-radius: 8px;
    background: #ffffff;
    padding: 6px;
    box-shadow: 0 18px 42px rgba(20, 33, 41, 0.16);
}

.company-account-dropdown button {
    display: flex;
    width: 100%;
    min-height: 38px;
    align-items: center;
    gap: 9px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--company-text);
    cursor: pointer;
    font: inherit;
    font-size: 0.88rem;
    font-weight: 850;
    padding: 0 10px;
    text-align: left;
}

.company-account-dropdown button:hover,
.company-account-dropdown button:focus-visible {
    background: var(--company-brand-soft);
    color: var(--company-brand-dark);
    outline: none;
}

.company-account-toast {
    position: fixed;
    top: 82px;
    right: 24px;
    z-index: 130;
    max-width: min(360px, calc(100vw - 32px));
    border: 1px solid #99f6e4;
    border-radius: 8px;
    background: #f0fdfa;
    color: var(--company-brand-dark);
    box-shadow: 0 18px 42px rgba(20, 33, 41, 0.14);
    padding: 12px 14px;
    font-size: 0.92rem;
    font-weight: 850;
}

.company-account-toast.is-error {
    border-color: #fecaca;
    background: #fff1f0;
    color: var(--company-danger);
}

.company-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 100;
    background: rgba(15, 23, 42, 0.46);
    backdrop-filter: blur(4px);
}

.company-change-password-modal {
    inset: auto;
    top: 50%;
    left: 50%;
    z-index: 110;
    display: grid;
    width: min(560px, calc(100vw - 40px));
    max-height: calc(100vh - 40px);
    transform: translate(-50%, -50%);
    overflow: hidden;
    place-items: stretch;
    border: 1px solid var(--company-line);
    border-radius: 8px;
    background: #ffffff;
    padding: 0;
    box-shadow: 0 28px 80px rgba(20, 33, 41, 0.24);
}

.company-change-password-form,
.company-change-password-body,
.company-change-password-grid {
    display: grid;
}

.company-change-password-head,
.company-change-password-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 20px;
}

.company-change-password-head {
    border-bottom: 1px solid var(--company-line);
}

.company-change-password-head h2,
.company-change-password-head p,
.company-change-password-message {
    margin: 0;
}

.company-change-password-head h2 {
    margin-top: 4px;
    color: var(--company-text);
    font-size: 1.25rem;
}

.company-change-password-head p {
    margin-top: 6px;
    color: var(--company-muted);
    font-weight: 750;
}

.company-change-password-body {
    max-height: min(62vh, 520px);
    overflow-y: auto;
    gap: 16px;
    padding: 20px;
}

.company-change-password-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.company-change-password-grid .wide {
    grid-column: 1 / -1;
}

.company-change-password-message {
    border: 1px solid #fecaca;
    border-radius: 8px;
    background: #fff1f0;
    color: var(--company-danger);
    padding: 11px 12px;
    font-weight: 850;
}

.company-secure-password-field {
    position: relative;
}

.company-secure-password-field input {
    padding-right: 48px;
}

.company-secure-password-toggle {
    position: absolute;
    top: 5px;
    right: 5px;
    display: inline-grid;
    width: 36px;
    height: 36px;
    place-items: center;
    border: 1px solid var(--company-line);
    border-radius: 8px;
    background: #ffffff;
    color: var(--company-brand-dark);
    cursor: pointer;
}

.company-secure-password-toggle:hover,
.company-secure-password-toggle:focus-visible {
    border-color: var(--company-brand);
    background: var(--company-brand-soft);
    outline: none;
}

.company-secure-password-toggle[aria-pressed="true"]::after {
    position: absolute;
    width: 2px;
    height: 22px;
    border-radius: 999px;
    background: currentColor;
    content: "";
    transform: rotate(45deg);
}

.company-change-password-actions {
    justify-content: flex-end;
    border-top: 1px solid var(--company-line);
}

@media (max-width: 680px) {
    .company-topbar {
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 10px;
    }

    .company-topbar-actions {
        gap: 7px;
    }

    .company-account-button > span:not(.company-account-avatar):not(.company-account-chevron),
    .company-account-chevron {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
        white-space: nowrap;
    }

    .company-account-button {
        width: 38px;
        justify-content: center;
        padding: 0;
    }

    .company-change-password-grid {
        grid-template-columns: 1fr;
    }

    .company-account-toast {
        top: 74px;
        right: 16px;
        left: 16px;
    }
}

/* Change password modal centering fix */
.company-modal-backdrop[data-change-password-overlay] {
    position: fixed;
    inset: 0;
    z-index: 100;
    min-height: 100vh;
    min-height: 100dvh;
}

.company-change-password-modal {
    position: fixed;
    inset: 0;
    z-index: 110;
    display: flex;
    width: 100%;
    max-height: none;
    align-items: center;
    justify-content: center;
    overflow: visible;
    place-items: initial;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    padding: 16px;
    pointer-events: none;
    transform: none;
}

.company-change-password-form {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    width: min(100%, 520px);
    max-height: calc(100vh - 32px);
    max-height: calc(100dvh - 32px);
    overflow: hidden;
    border: 1px solid var(--company-line);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 28px 80px rgba(20, 33, 41, 0.24);
    pointer-events: auto;
}

.company-change-password-body {
    min-height: 0;
    max-height: none;
    overflow-y: auto;
}

@media (max-width: 680px) {
    .company-change-password-modal {
        padding: 12px;
    }

    .company-change-password-form {
        width: 100%;
        max-height: calc(100vh - 24px);
        max-height: calc(100dvh - 24px);
    }

    .company-change-password-actions {
        align-items: stretch;
        flex-direction: column-reverse;
    }

    .company-change-password-actions .cmp-secondary-action,
    .company-change-password-actions .cmp-primary-action {
        width: 100%;
    }
}

@media (max-height: 560px) {
    .company-change-password-modal {
        padding: 12px;
    }

    .company-change-password-form {
        max-height: calc(100vh - 24px);
        max-height: calc(100dvh - 24px);
    }

    .company-change-password-head,
    .company-change-password-actions {
        padding: 14px 16px;
    }

    .company-change-password-body {
        padding: 16px;
    }
}


/* Company change password compact modal match */
.company-change-password-form {
    display: block;
    width: min(100%, 520px);
    height: auto;
    max-height: calc(100vh - 32px);
    max-height: calc(100dvh - 32px);
    overflow: hidden;
}

.company-change-password-body {
    display: block;
    min-height: 0;
    max-height: min(420px, calc(100vh - 190px));
    max-height: min(420px, calc(100dvh - 190px));
    overflow-y: auto;
}

.company-change-password-grid {
    align-items: start;
    grid-auto-rows: auto;
}

.company-change-password-grid .company-field {
    align-content: start;
}

.company-change-password-actions {
    flex: 0 0 auto;
}

@media (max-width: 680px) {
    .company-change-password-form {
        max-height: calc(100vh - 24px);
        max-height: calc(100dvh - 24px);
    }

    .company-change-password-body {
        max-height: calc(100vh - 180px);
        max-height: calc(100dvh - 180px);
    }
}

@media (max-height: 560px) {
    .company-change-password-body {
        max-height: calc(100vh - 156px);
        max-height: calc(100dvh - 156px);
    }
}

/* Company change password uses Super Admin modal structure */
.modal-overlay[data-change-password-overlay] {
    position: fixed;
    inset: 0;
    z-index: 100;
    min-height: 100vh;
    min-height: 100dvh;
    background: rgba(15, 23, 42, 0.46);
    backdrop-filter: blur(4px);
}

.change-password-modal {
    position: fixed;
    inset: 0;
    z-index: 110;
    display: flex;
    width: 100%;
    max-height: none;
    align-items: center;
    justify-content: center;
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    padding: 16px;
    pointer-events: none;
    transform: none;
}

.change-password-form {
    display: grid;
    grid-template-rows: auto auto auto;
    width: min(100%, 520px);
    max-height: calc(100vh - 32px);
    max-height: calc(100dvh - 32px);
    overflow: hidden;
    border: 1px solid var(--company-line);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 28px 80px rgba(20, 33, 41, 0.24);
    pointer-events: auto;
}

.change-password-form .modal-header,
.change-password-form .modal-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 20px;
    background: #ffffff;
}

.change-password-form .modal-header {
    border-bottom: 1px solid var(--company-line);
}

.change-password-form .modal-header h2,
.change-password-form .modal-header p,
.change-password-form .change-password-message {
    margin: 0;
}

.change-password-form .modal-header h2 {
    margin-top: 4px;
    color: var(--company-text);
    font-size: 1.25rem;
    line-height: 1.2;
}

.change-password-form .modal-header p:last-child {
    margin-top: 6px;
    color: var(--company-muted);
    font-weight: 750;
    line-height: 1.35;
}

.change-password-form .modal-body {
    min-height: 0;
    max-height: min(420px, calc(100vh - 190px));
    max-height: min(420px, calc(100dvh - 190px));
    overflow-y: auto;
    padding: 20px;
}

.change-password-form .modal-actions {
    justify-content: flex-end;
    border-top: 1px solid var(--company-line);
}

.change-password-form .form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.change-password-form .field-wide {
    grid-column: 1 / -1;
}

.change-password-form .field-group {
    display: grid;
    align-content: start;
    gap: 8px;
}

.change-password-form .field-group label {
    color: #344852;
    font-size: 0.9rem;
    font-weight: 850;
}

.change-password-form .field-group input {
    width: 100%;
    min-height: 44px;
    border: 1px solid var(--company-line);
    border-radius: 8px;
    background: #ffffff;
    color: var(--company-text);
    font: inherit;
    padding: 10px 12px;
    outline: none;
}

.change-password-form .field-group input:focus {
    border-color: var(--company-brand);
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.16);
}

.change-password-message {
    margin: 0 0 16px;
    border: 1px solid #fecaca;
    border-radius: 8px;
    background: #fff1f0;
    color: var(--company-danger);
    padding: 11px 12px;
    font-weight: 850;
}

.password-field {
    position: relative;
}

.password-field input {
    padding-right: 48px;
}

.password-visibility-toggle {
    position: absolute;
    top: 4px;
    right: 4px;
    display: inline-grid;
    width: 36px;
    height: 36px;
    place-items: center;
    border: 1px solid var(--company-line);
    border-radius: 8px;
    background: #ffffff;
    color: var(--company-brand-dark);
    cursor: pointer;
}

.password-visibility-toggle svg,
.change-password-form .icon-action svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
}

.password-visibility-toggle:hover,
.password-visibility-toggle:focus-visible,
.change-password-form .icon-action:hover,
.change-password-form .icon-action:focus-visible {
    border-color: var(--company-brand);
    background: var(--company-brand-soft);
    color: var(--company-brand-dark);
    outline: none;
}

.password-visibility-toggle[aria-pressed="true"]::after {
    position: absolute;
    width: 2px;
    height: 22px;
    border-radius: 999px;
    background: currentColor;
    content: "";
    transform: rotate(45deg);
}

.change-password-form .icon-action {
    display: inline-grid;
    width: 42px;
    height: 42px;
    flex: 0 0 auto;
    place-items: center;
    border: 1px solid var(--company-line);
    border-radius: 8px;
    background: #ffffff;
    color: var(--company-brand-dark);
    cursor: pointer;
}

.change-password-form .primary-action,
.change-password-form .panel-action {
    display: inline-flex;
    min-height: 40px;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    padding: 0 16px;
    font: inherit;
    font-weight: 850;
    text-decoration: none;
    cursor: pointer;
}

.change-password-form .primary-action {
    border: 1px solid var(--company-brand);
    background: var(--company-brand);
    color: #ffffff;
}

.change-password-form .primary-action:hover,
.change-password-form .primary-action:focus-visible {
    background: var(--company-brand-dark);
    outline: none;
}

.change-password-form .panel-action {
    border: 1px solid var(--company-line);
    background: #ffffff;
    color: var(--company-brand-dark);
}

.change-password-form .panel-action:hover,
.change-password-form .panel-action:focus-visible {
    border-color: var(--company-brand);
    background: var(--company-brand-soft);
    outline: none;
}

.account-toast {
    position: fixed;
    top: 82px;
    right: 24px;
    z-index: 130;
    max-width: min(360px, calc(100vw - 32px));
    border: 1px solid #99f6e4;
    border-radius: 8px;
    background: #f0fdfa;
    color: var(--company-brand-dark);
    box-shadow: 0 18px 42px rgba(20, 33, 41, 0.14);
    padding: 12px 14px;
    font-size: 0.92rem;
    font-weight: 850;
}

.account-toast.is-error {
    border-color: #fecaca;
    background: #fff1f0;
    color: var(--company-danger);
}

@media (max-width: 680px) {
    .change-password-modal {
        padding: 12px;
    }

    .change-password-form {
        width: 100%;
        max-height: calc(100vh - 24px);
        max-height: calc(100dvh - 24px);
    }

    .change-password-form .modal-body {
        max-height: calc(100vh - 180px);
        max-height: calc(100dvh - 180px);
    }

    .change-password-form .form-grid {
        grid-template-columns: 1fr;
    }

    .change-password-form .modal-actions {
        align-items: stretch;
        flex-direction: column-reverse;
    }

    .change-password-form .modal-actions .panel-action,
    .change-password-form .modal-actions .primary-action {
        width: 100%;
    }

    .account-toast {
        top: 74px;
        right: 16px;
        left: 16px;
    }
}

@media (max-height: 560px) {
    .change-password-modal {
        padding: 12px;
    }

    .change-password-form {
        max-height: calc(100vh - 24px);
        max-height: calc(100dvh - 24px);
    }

    .change-password-form .modal-header,
    .change-password-form .modal-actions {
        padding: 14px 16px;
    }

    .change-password-form .modal-body {
        max-height: calc(100vh - 156px);
        max-height: calc(100dvh - 156px);
        padding: 16px;
    }
}

/* Company change password hidden-state fix */
.modal-overlay[data-change-password-overlay][hidden],
.change-password-modal[data-change-password-modal][hidden],
.account-toast[data-change-password-toast][hidden] {
    display: none !important;
}

/* Change password visual polish */
.change-password-form {
    grid-template-rows: auto auto auto;
}

.change-password-form .modal-header {
    border-bottom: 0;
    border-radius: 8px 8px 0 0;
    background: var(--company-brand);
    color: #ffffff;
    padding: 16px 18px;
}

.change-password-form .modal-header h2 {
    margin: 0;
    color: #ffffff;
    font-size: 1.15rem;
    font-weight: 900;
    line-height: 1.2;
}

.change-password-form .modal-header .icon-action {
    width: 36px;
    height: 36px;
    border-color: rgba(255, 255, 255, 0.28);
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    transition: transform 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}

.change-password-form .modal-header .icon-action:hover,
.change-password-form .modal-header .icon-action:focus-visible {
    transform: scale(1.08);
    border-color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.18);
    color: #ffffff;
    outline: none;
}

.change-password-form .modal-body {
    max-height: min(420px, calc(100vh - 176px));
    max-height: min(420px, calc(100dvh - 176px));
    padding: 20px;
}

.change-password-form .modal-actions {
    gap: 10px;
    border-top: 1px solid var(--company-line);
    padding: 16px 18px;
}

.change-password-form .modal-actions .panel-action,
.change-password-form .modal-actions .primary-action {
    display: inline-flex;
    min-height: 40px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 8px;
    padding: 0 15px;
    font: inherit;
    font-weight: 850;
    cursor: pointer;
    transition: transform 0.15s ease, background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.change-password-form .modal-actions svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2.2;
}

.change-password-form .modal-actions .panel-action {
    border: 1px solid var(--company-strong-line);
    background: #ffffff;
    color: var(--company-brand-dark);
}

.change-password-form .modal-actions .panel-action:hover,
.change-password-form .modal-actions .panel-action:focus-visible {
    transform: scale(1.04);
    border-color: var(--company-brand);
    background: var(--company-brand-soft);
    color: var(--company-brand-dark);
    outline: none;
}

.change-password-form .modal-actions .primary-action {
    border: 1px solid var(--company-brand);
    background: var(--company-brand);
    color: #ffffff;
}

.change-password-form .modal-actions .primary-action:hover,
.change-password-form .modal-actions .primary-action:focus-visible {
    transform: scale(1.04);
    border-color: var(--company-brand-dark);
    background: var(--company-brand-dark);
    color: #ffffff;
    outline: none;
}

.password-visibility-toggle {
    transition: transform 0.15s ease, background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.password-visibility-toggle:hover,
.password-visibility-toggle:focus-visible {
    transform: scale(1.06);
}

@media (max-width: 680px) {
    .change-password-form .modal-body {
        max-height: calc(100dvh - 168px);
    }
}

@media (max-height: 560px) {
    .change-password-form .modal-body {
        max-height: calc(100dvh - 148px);
    }
}
/* Company panel global button and modal polish */
.company-primary-button,
.company-secondary-button,
.history-button,
.contacts-button,
.tags-button,
.optin-button,
.team-button,
.templates-button,
.tpl-primary-action,
.tpl-secondary-action,
.cmp-primary-action,
.cmp-secondary-action,
.company-table-link,
.company-icon-button,
.contacts-action,
.tags-action,
.optin-action,
.team-action,
.templates-action,
.tpl-icon-action,
.cmp-icon-action,
.knowledge-action-button {
    transition: transform 0.16s ease, border-color 0.16s ease, background-color 0.16s ease, box-shadow 0.16s ease, color 0.16s ease;
}

.company-primary-button,
.company-secondary-button,
.history-button,
.contacts-button,
.tags-button,
.optin-button,
.team-button,
.templates-button,
.tpl-primary-action,
.tpl-secondary-action,
.cmp-primary-action,
.cmp-secondary-action,
.company-table-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
}

.company-primary-button svg,
.company-secondary-button svg,
.history-button svg,
.contacts-button svg,
.tags-button svg,
.optin-button svg,
.team-button svg,
.templates-button svg,
.tpl-primary-action svg,
.tpl-secondary-action svg,
.cmp-primary-action svg,
.cmp-secondary-action svg,
.company-table-link svg,
.company-icon-button svg,
.contacts-action svg,
.tags-action svg,
.optin-action svg,
.team-action svg,
.templates-action svg,
.tpl-icon-action svg,
.cmp-icon-action svg,
.knowledge-action-button svg {
    width: 16px;
    height: 16px;
    flex: 0 0 auto;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.company-icon-button svg,
.contacts-action svg,
.tags-action svg,
.optin-action svg,
.team-action svg,
.templates-action svg,
.tpl-icon-action svg,
.cmp-icon-action svg,
.knowledge-action-button svg {
    width: 17px;
    height: 17px;
}

.company-primary-button:hover,
.company-primary-button:focus-visible,
.company-secondary-button:hover,
.company-secondary-button:focus-visible,
.history-button:hover,
.history-button:focus-visible,
.contacts-button:hover,
.contacts-button:focus-visible,
.tags-button:hover,
.tags-button:focus-visible,
.optin-button:hover,
.optin-button:focus-visible,
.team-button:hover,
.team-button:focus-visible,
.templates-button:hover,
.templates-button:focus-visible,
.tpl-primary-action:hover,
.tpl-primary-action:focus-visible,
.tpl-secondary-action:hover,
.tpl-secondary-action:focus-visible,
.cmp-primary-action:hover,
.cmp-primary-action:focus-visible,
.cmp-secondary-action:hover,
.cmp-secondary-action:focus-visible,
.company-table-link:hover,
.company-table-link:focus-visible {
    transform: scale(1.04);
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.09);
    outline: none;
}

.company-icon-button:hover,
.company-icon-button:focus-visible,
.contacts-action:hover,
.contacts-action:focus-visible,
.tags-action:hover,
.tags-action:focus-visible,
.optin-action:hover,
.optin-action:focus-visible,
.team-action:hover,
.team-action:focus-visible,
.templates-action:hover,
.templates-action:focus-visible,
.tpl-icon-action:hover,
.tpl-icon-action:focus-visible,
.cmp-icon-action:hover,
.cmp-icon-action:focus-visible,
.knowledge-action-button:hover,
.knowledge-action-button:focus-visible {
    transform: scale(1.07);
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.09);
    outline: none;
}

.cmp-danger-action,
.cmp-danger-action:hover,
.cmp-danger-action:focus-visible {
    border-color: #dc2626;
    background: #dc2626;
    color: #ffffff;
}

.company-nav-link,
.company-logout-link {
    transition: transform 0.16s ease, background-color 0.16s ease, color 0.16s ease, border-color 0.16s ease;
}

.company-nav-link:hover,
.company-nav-link:focus-visible,
.company-logout-link:hover,
.company-logout-link:focus-visible {
    transform: translateX(2px);
}

.company-nav-link.is-active:hover,
.company-nav-link.is-active:focus-visible {
    transform: none;
}

.contacts-modal,
.history-modal,
.tags-modal,
.optin-modal,
.team-modal,
.templates-modal,
.tpl-modal,
.cmp-modal-card,
.cmp-list-modal-card {
    overflow: hidden;
    padding: 0;
}

.contacts-modal-header,
.history-modal-header,
.tags-modal-header,
.optin-modal-header,
.team-modal-header,
.templates-modal-header,
.tpl-modal-head,
.cmp-modal-head {
    display: flex;
    min-height: 60px;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    border-bottom: 0;
    border-radius: 8px 8px 0 0;
    background: var(--company-brand-dark);
    color: #ffffff;
    padding: 14px 18px;
}

.contacts-modal-header > div,
.history-modal-header > div,
.tags-modal-header > div,
.optin-modal-header > div,
.team-modal-header > div,
.templates-modal-header > div,
.tpl-modal-head > div {
    min-width: 0;
}

.contacts-modal-header .company-muted-label,
.history-modal-header .company-muted-label,
.tags-modal-header .company-muted-label,
.optin-modal-header .company-muted-label,
.team-modal-header .company-muted-label,
.templates-modal-header .company-muted-label,
.tpl-modal-head span {
    display: none;
}

.contacts-modal-header h2,
.history-modal-header h2,
.tags-modal-header h2,
.optin-modal-header h2,
.team-modal-header h2,
.templates-modal-header h2,
.tpl-modal-head h2,
.cmp-modal-head h2 {
    margin: 0;
    color: #ffffff;
    font-size: 1.06rem;
    font-weight: 900;
    line-height: 1.2;
}

.contacts-modal-header .company-icon-button,
.history-modal-header .company-icon-button,
.tags-modal-header .company-icon-button,
.optin-modal-header .company-icon-button,
.team-modal-header .company-icon-button,
.templates-modal-header .company-icon-button,
.tpl-modal-head .company-icon-button,
.cmp-modal-close {
    width: 36px;
    height: 36px;
    flex: 0 0 auto;
    border-color: rgba(255, 255, 255, 0.34);
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
}

.contacts-modal-header .company-icon-button:hover,
.contacts-modal-header .company-icon-button:focus-visible,
.history-modal-header .company-icon-button:hover,
.history-modal-header .company-icon-button:focus-visible,
.tags-modal-header .company-icon-button:hover,
.tags-modal-header .company-icon-button:focus-visible,
.optin-modal-header .company-icon-button:hover,
.optin-modal-header .company-icon-button:focus-visible,
.team-modal-header .company-icon-button:hover,
.team-modal-header .company-icon-button:focus-visible,
.templates-modal-header .company-icon-button:hover,
.templates-modal-header .company-icon-button:focus-visible,
.tpl-modal-head .company-icon-button:hover,
.tpl-modal-head .company-icon-button:focus-visible,
.cmp-modal-close:hover,
.cmp-modal-close:focus-visible {
    border-color: rgba(255, 255, 255, 0.72);
    background: rgba(255, 255, 255, 0.18);
    color: #ffffff;
    transform: scale(1.07);
}

.contacts-modal > form,
.contacts-modal > dl,
.contacts-modal > section,
.contacts-modal > .contacts-modal-actions,
.history-modal > dl,
.history-modal > section,
.history-modal > .history-modal-actions,
.tags-modal > form,
.optin-modal > form,
.optin-modal > dl,
.optin-modal > section,
.optin-modal > .optin-modal-actions,
.team-modal > form,
.team-modal > dl,
.team-modal > section,
.team-modal > .team-modal-actions,
.templates-modal > form,
.tpl-modal > :not(.tpl-modal-head),
.cmp-modal-card > :not(.cmp-modal-head),
.cmp-list-modal-card > :not(.cmp-modal-head) {
    margin-left: 18px;
    margin-right: 18px;
}

.contacts-modal > form,
.history-modal > form,
.tags-modal > form,
.optin-modal > form,
.team-modal > form,
.templates-modal > form,
.tpl-modal > :last-child,
.cmp-modal-card > :last-child,
.cmp-list-modal-card > :last-child {
    margin-bottom: 18px;
}

.contacts-modal > form,
.contacts-modal > dl,
.history-modal > dl,
.tags-modal > form,
.optin-modal > form,
.optin-modal > dl,
.team-modal > form,
.team-modal > dl,
.tpl-modal > :not(.tpl-modal-head),
.cmp-modal-card > :not(.cmp-modal-head),
.cmp-list-modal-card > :not(.cmp-modal-head) {
    margin-top: 18px;
}

.contacts-detail-section,
.optin-detail-section,
.team-detail-section {
    margin-top: 14px;
}

.cmp-list-modal,
.cmp-modal {
    align-items: center;
    justify-content: center;
}

.cmp-list-modal-card,
.cmp-modal-card {
    width: min(520px, calc(100vw - 32px));
    max-height: calc(100dvh - 32px);
    overflow-y: auto;
    border-radius: 8px;
}

@media (max-width: 760px) {
    .contacts-modal-shell,
    .history-modal-shell,
    .tags-modal-shell,
    .optin-modal-shell,
    .team-modal-shell,
    .templates-modal-shell,
    .tpl-modal-shell {
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 12px;
    }

    .contacts-modal,
    .history-modal,
    .tags-modal,
    .optin-modal,
    .team-modal,
    .templates-modal,
    .tpl-modal,
    .cmp-modal-card,
    .cmp-list-modal-card {
        width: calc(100vw - 24px);
        max-width: calc(100vw - 24px);
        max-height: calc(100dvh - 24px);
    }

    .contacts-modal-header,
    .history-modal-header,
    .tags-modal-header,
    .optin-modal-header,
    .team-modal-header,
    .templates-modal-header,
    .tpl-modal-head,
    .cmp-modal-head {
        min-height: 56px;
        padding: 12px 14px;
    }

    .contacts-modal > form,
    .contacts-modal > dl,
    .contacts-modal > section,
    .contacts-modal > .contacts-modal-actions,
    .history-modal > dl,
    .history-modal > section,
    .history-modal > .history-modal-actions,
    .tags-modal > form,
    .optin-modal > form,
    .optin-modal > dl,
    .optin-modal > section,
    .optin-modal > .optin-modal-actions,
    .team-modal > form,
    .team-modal > dl,
    .team-modal > section,
    .team-modal > .team-modal-actions,
    .templates-modal > form,
    .tpl-modal > :not(.tpl-modal-head),
    .cmp-modal-card > :not(.cmp-modal-head),
    .cmp-list-modal-card > :not(.cmp-modal-head) {
        margin-left: 14px;
        margin-right: 14px;
    }

    .contacts-modal-actions,
    .history-modal-actions,
    .tags-modal-actions,
    .optin-modal-actions,
    .team-modal-actions,
    .templates-modal-actions,
    .cmp-submit-row,
    .cmp-list-modal-actions {
        flex-wrap: wrap;
    }

    .contacts-modal-actions .contacts-button,
    .history-modal-actions .history-button,
    .tags-modal-actions .tags-button,
    .optin-modal-actions .optin-button,
    .team-modal-actions .team-button,
    .templates-modal-actions .templates-button,
    .cmp-submit-row .cmp-primary-action,
    .cmp-submit-row .cmp-secondary-action,
    .cmp-list-modal-actions .cmp-primary-action,
    .cmp-list-modal-actions .cmp-secondary-action {
        flex: 1 1 140px;
    }
}

/* Final mobile overrides for page-specific rules declared above. */
@media (max-width: 760px) {
    .developer-api-head {
        display: grid;
        gap: 12px;
        padding: 16px;
    }

    .developer-api-panel {
        padding: 14px;
    }

    .developer-api-status {
        width: max-content;
        max-width: 100%;
        white-space: normal;
    }
}

@media (max-width: 480px) {
    .analytics-segment {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .analytics-segment span {
        min-height: 38px;
        white-space: normal;
    }

    .analytics-segment label:nth-child(2) span {
        border-right: 0;
    }

    .analytics-segment label:nth-child(-n + 2) span {
        border-bottom: 1px solid #cfe3df;
    }
}

/* Subscription page typography and account control polish. */
.company-subscription-heading h1 {
    font-size: 1.55rem;
    font-weight: 900;
    line-height: 1.1;
}

.company-subscription-heading p {
    font-size: 0.92rem;
    line-height: 1.45;
}

.company-subscription-table th {
    padding: 10px 12px;
    font-size: 0.72rem;
    line-height: 1.25;
}

.company-subscription-table td {
    padding: 10px 12px;
    font-size: 0.84rem;
    font-weight: 700;
    line-height: 1.35;
}

.company-subscription-table td span {
    font-size: 0.78rem;
}

.company-subscription-table .company-status-pill {
    min-height: 28px;
    padding: 0 9px;
    font-size: 0.74rem;
    font-weight: 850;
}

.company-subscription-table .company-table-link {
    font-size: 0.84rem;
    font-weight: 850;
}

.company-subscription-panel .company-empty-state strong {
    font-size: 1.1rem;
}

.company-account-button {
    min-height: 40px;
    gap: 7px;
    border-radius: 8px;
    padding: 0 9px;
    transition: transform 160ms ease, border-color 160ms ease, background-color 160ms ease, box-shadow 160ms ease;
}

.company-account-button:hover,
.company-account-button:focus-visible {
    transform: scale(1.02);
    box-shadow: 0 6px 14px rgba(20, 33, 41, 0.08);
}

.company-account-chevron {
    width: 18px;
    height: 18px;
    color: var(--company-brand-dark);
}

.company-account-chevron svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
    stroke: none;
    transition: transform 160ms ease;
}

.company-account-button:hover .company-account-chevron svg,
.company-account-button:focus-visible .company-account-chevron svg {
    transform: scale(1.08);
}

@media (max-width: 760px) {
    .company-subscription-heading,
    .company-subscription-panel {
        padding: 14px;
    }

    .company-subscription-heading h1 {
        font-size: 1.45rem;
    }

    .company-subscription-table th,
    .company-subscription-table td {
        padding: 9px 10px;
    }
}

@media (max-width: 680px) {
    .company-account-button {
        width: 40px;
        min-height: 40px;
    }
}

/* Company-logo account trigger */
.company-account-button.company-account-logo-trigger {
    width: auto;
    min-width: 54px;
    max-width: 132px;
    min-height: 48px;
    justify-content: center;
    gap: 5px;
    border-color: #b7c7ca;
    background: #ffffff;
    padding: 4px 6px;
    transition: border-color 160ms ease, background-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.company-account-button.company-account-logo-trigger.is-active {
    border-color: #7fc9bd;
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.1), 0 5px 16px rgba(15, 118, 110, 0.18);
}

.company-account-button.company-account-logo-trigger.is-inactive {
    border-color: #e7a5a5;
    box-shadow: 0 0 0 3px rgba(185, 28, 28, 0.09), 0 5px 16px rgba(185, 28, 28, 0.16);
}

.company-account-button.company-account-logo-trigger:hover,
.company-account-button.company-account-logo-trigger:focus-visible {
    background: #ffffff;
    transform: translateY(-1px);
    outline: 3px solid rgba(15, 118, 110, 0.22);
    outline-offset: 2px;
}

.company-account-button.company-account-logo-trigger.is-inactive:hover,
.company-account-button.company-account-logo-trigger.is-inactive:focus-visible {
    outline-color: rgba(185, 28, 28, 0.2);
}

.company-account-button.company-account-logo-trigger > span.company-account-logo-frame {
    display: inline-grid;
    position: static;
    width: 42px;
    height: 36px;
    min-width: 42px;
    min-height: 36px;
    flex: 0 0 42px;
    place-items: center;
    overflow: hidden;
    border-radius: 6px;
    background: #f7fbfb;
    color: var(--company-brand-dark);
    font-size: 0.78rem;
    font-weight: 950;
    line-height: 1;
    padding: 3px;
    clip: auto;
    white-space: normal;
}

.company-account-logo-frame .company-account-logo {
    display: block;
    width: auto;
    max-width: 100%;
    max-height: 30px;
    object-fit: contain;
}

.company-account-logo-fallback {
    border: 1px solid var(--company-line);
}

.company-account-logo-trigger.is-active .company-account-logo-frame {
    border: 1px solid rgba(15, 118, 110, 0.2);
}

.company-account-logo-trigger.is-inactive .company-account-logo-frame {
    border: 1px solid rgba(185, 28, 28, 0.2);
}

.company-account-logo-trigger .company-account-chevron {
    position: static;
    width: 14px;
    height: 18px;
    clip: auto;
    color: var(--company-muted);
    white-space: normal;
}

.company-account-logo-trigger .company-account-chevron svg {
    width: 14px;
    height: 14px;
}

.company-account-dropdown .company-account-dropdown-link {
    display: flex;
    width: 100%;
    min-height: 38px;
    align-items: center;
    gap: 9px;
    border-radius: 6px;
    color: var(--company-text);
    font-size: 0.88rem;
    font-weight: 850;
    padding: 0 10px;
    text-decoration: none;
}

.company-account-dropdown .company-account-dropdown-link:hover,
.company-account-dropdown .company-account-dropdown-link:focus-visible {
    background: var(--company-brand-soft);
    color: var(--company-brand-dark);
    outline: none;
}

/* Company user profile modal */
.modal-overlay[data-company-profile-overlay] {
    position: fixed;
    inset: 0;
    z-index: 100;
    background: rgba(15, 23, 42, 0.46);
    backdrop-filter: blur(4px);
}

.company-profile-modal {
    position: fixed;
    inset: 0;
    z-index: 110;
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    padding: 16px;
    pointer-events: none;
}

.company-profile-form {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    width: min(100%, 620px);
    max-height: calc(100vh - 32px);
    max-height: calc(100dvh - 32px);
    overflow: hidden;
    border: 1px solid var(--company-line);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 28px 80px rgba(20, 33, 41, 0.24);
    pointer-events: auto;
}

.company-profile-form .modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    border-radius: 8px 8px 0 0;
    background: var(--company-brand);
    color: #ffffff;
    padding: 16px 18px;
}

.company-profile-form .modal-header h2,
.company-profile-modal-kicker {
    margin: 0;
}

.company-profile-form .modal-header h2 {
    color: #ffffff;
    font-size: 1.2rem;
    font-weight: 900;
}

.company-profile-modal-kicker {
    color: #d8fffa;
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.company-profile-form .modal-header .icon-action {
    display: inline-grid;
    width: 36px;
    height: 36px;
    flex: 0 0 auto;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.32);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    cursor: pointer;
    transition: background-color 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.company-profile-form .modal-header .icon-action:hover,
.company-profile-form .modal-header .icon-action:focus-visible {
    border-color: rgba(255, 255, 255, 0.58);
    background: rgba(255, 255, 255, 0.2);
    outline: none;
    transform: scale(1.04);
}

.company-profile-form .modal-header .icon-action svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2.2;
}

.company-profile-body {
    min-height: 0;
    max-height: min(600px, calc(100vh - 170px));
    max-height: min(600px, calc(100dvh - 170px));
    overflow-y: auto;
    padding: 20px;
}

.company-profile-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.company-profile-phone-column {
    display: grid;
    align-content: start;
    gap: 12px;
    min-width: 0;
}

.company-profile-form .field-group {
    display: grid;
    align-content: start;
    gap: 7px;
    min-width: 0;
}

.company-profile-form .field-group label {
    color: #344852;
    font-size: 0.78rem;
    font-weight: 850;
    letter-spacing: 0.01em;
}

.company-profile-form .field-group input {
    width: 100%;
    min-height: 42px;
    border: 1px solid var(--company-line);
    border-radius: 7px;
    background: #ffffff;
    color: var(--company-text);
    font: inherit;
    font-size: 0.9rem;
    padding: 9px 11px;
    outline: none;
    transition: border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

.company-profile-form .field-group input:focus {
    border-color: var(--company-brand);
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.14);
}

.company-profile-form .field-group input[readonly] {
    background: #f4f8f8;
    color: #53666d;
}

.company-profile-grid .field-wide {
    grid-column: 1 / -1;
}

.company-profile-form .field-group small {
    display: block;
    margin-top: 6px;
    color: var(--company-muted);
    font-size: 0.76rem;
    line-height: 1.4;
}

.company-profile-facts {
    display: grid;
    grid-column: 1 / -1;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-top: 2px;
}

.company-profile-facts > div {
    min-width: 0;
    border: 1px solid var(--company-line);
    border-radius: 6px;
    background: #f8fbfb;
    padding: 10px 12px;
}

.company-profile-facts span,
.company-profile-facts strong {
    display: block;
}

.company-profile-facts span {
    color: var(--company-muted);
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.company-profile-facts strong {
    margin-top: 5px;
    overflow: hidden;
    color: var(--company-text);
    font-size: 0.88rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.company-profile-otp-inline {
    display: grid;
    grid-column: 2;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 3px 10px;
    align-items: center;
    min-width: 0;
    border-top: 1px solid #e4ecec;
    padding-top: 10px;
}

.company-profile-email-field {
    grid-column: 1;
    align-self: start;
}

.company-profile-otp-copy {
    display: grid;
    min-width: 0;
    gap: 3px;
}

.company-profile-otp-label {
    color: var(--company-text);
    font-size: 0.78rem;
    font-weight: 900;
}

.company-profile-otp-destination {
    overflow: hidden;
    color: var(--company-muted);
    font-size: 0.72rem;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.company-profile-switch {
    display: inline-flex;
    min-width: 82px;
    align-items: center;
    justify-content: flex-end;
    gap: 9px;
    color: var(--company-text);
    cursor: pointer;
    font-size: 0.72rem;
    font-weight: 850;
}

.company-profile-switch input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.company-profile-switch-track {
    display: inline-flex;
    width: 42px;
    height: 24px;
    flex: 0 0 auto;
    align-items: center;
    border-radius: 999px;
    background: #cbd5d8;
    padding: 3px;
    transition: background-color 160ms ease;
}

.company-profile-switch-track span {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(20, 33, 41, 0.2);
    transition: transform 160ms ease;
}

.company-profile-switch input:checked + .company-profile-switch-track {
    background: var(--company-brand);
}

.company-profile-switch input:checked + .company-profile-switch-track span {
    transform: translateX(18px);
}

.company-profile-switch input:focus-visible + .company-profile-switch-track {
    outline: 3px solid rgba(15, 118, 110, 0.24);
    outline-offset: 2px;
}

.company-profile-otp-state,
.company-profile-unavailable {
    grid-column: 1 / -1;
    margin-top: 1px;
    color: var(--company-muted);
    font-size: 0.78rem;
    font-weight: 850;
    text-align: left;
}

.company-profile-unavailable {
    max-width: 220px;
    line-height: 1.45;
}

.company-profile-message {
    margin: 0 0 14px;
    border-radius: 6px;
    padding: 10px 12px;
    font-size: 0.84rem;
    font-weight: 750;
}

.company-profile-message.is-error {
    border: 1px solid #fecaca;
    background: #fff1f0;
    color: var(--company-danger);
}

.company-profile-message.is-success {
    border: 1px solid #99f6e4;
    background: #f0fdfa;
    color: var(--company-brand-dark);
}

.company-profile-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    border-top: 1px solid var(--company-line);
    padding: 14px 20px;
}

.company-profile-actions .panel-action,
.company-profile-actions .primary-action {
    display: inline-flex;
    min-height: 40px;
    min-width: 112px;
    align-items: center;
    justify-content: center;
    border-radius: 7px;
    padding: 0 16px;
    font: inherit;
    font-size: 0.84rem;
    font-weight: 850;
    cursor: pointer;
    transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.company-profile-actions .panel-action {
    border: 1px solid var(--company-line);
    background: #ffffff;
    color: var(--company-brand-dark);
}

.company-profile-actions .panel-action:hover,
.company-profile-actions .panel-action:focus-visible {
    border-color: var(--company-brand);
    background: var(--company-brand-soft);
    outline: none;
    transform: translateY(-1px);
}

.company-profile-actions .primary-action {
    border: 1px solid var(--company-brand);
    background: var(--company-brand);
    color: #ffffff;
}

.company-profile-actions .primary-action:hover,
.company-profile-actions .primary-action:focus-visible {
    border-color: var(--company-brand-dark);
    background: var(--company-brand-dark);
    outline: none;
    transform: translateY(-1px);
}

.company-profile-form [data-company-profile-submit].is-loading {
    cursor: wait;
    opacity: 0.68;
}

.company-profile-overlay[hidden],
.company-profile-modal[hidden],
.account-toast[data-company-profile-toast][hidden] {
    display: none !important;
}

@media (max-width: 620px) {
    .company-profile-body {
        padding: 16px;
    }

    .company-profile-grid,
    .company-profile-facts {
        grid-template-columns: 1fr;
    }

    .company-profile-grid .field-wide,
    .company-profile-facts {
        grid-column: auto;
    }

    .company-profile-phone-column {
        gap: 10px;
    }

    .company-profile-otp-inline {
        grid-template-columns: minmax(0, 1fr) auto;
        grid-column: auto;
    }

    .company-profile-email-field {
        grid-column: auto;
    }

    .company-profile-actions {
        padding: 12px 16px;
    }

    .company-profile-actions > button {
        min-width: 0;
        flex: 1 1 0;
    }
}

/* Company user OTP verification page */
.company-otp-panel {
    width: min(100%, 460px);
}

.company-otp-copy,
.company-otp-email,
.company-otp-expiry {
    margin: 0;
    color: var(--company-muted);
    line-height: 1.55;
    text-align: center;
}

.company-otp-copy {
    margin-top: 12px;
}

.company-otp-email {
    margin-top: 4px;
    color: var(--company-text);
    font-weight: 900;
}

.company-otp-expiry {
    margin: 10px 0 16px;
    font-size: 0.84rem;
    text-align: left;
}

.company-otp-actions {
    display: grid;
    gap: 12px;
    margin-top: 16px;
    text-align: center;
}

.company-otp-actions form {
    margin: 0;
}

.company-secondary-button {
    display: inline-flex;
    min-height: 44px;
    width: 100%;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--company-line);
    border-radius: 8px;
    background: #ffffff;
    color: var(--company-text);
    cursor: pointer;
    font: inherit;
    font-weight: 850;
}

.company-secondary-button:hover,
.company-secondary-button:focus-visible {
    border-color: var(--company-brand);
    color: var(--company-brand-dark);
    outline: none;
}

.company-alert-success {
    border-color: #99f6e4;
    background: #f0fdfa;
    color: var(--company-brand-dark);
}

.company-otp-back {
    border: 0;
    background: transparent;
    cursor: pointer;
}

@media (max-width: 680px) {
    .company-account-button.company-account-logo-trigger {
        width: 48px;
        min-width: 48px;
        max-width: 48px;
        min-height: 44px;
        padding: 3px;
    }

    .company-account-button.company-account-logo-trigger > span.company-account-logo-frame {
        width: 38px;
        height: 34px;
        min-width: 38px;
        min-height: 34px;
        flex-basis: 38px;
    }

    .company-account-logo-trigger .company-account-chevron {
        display: none;
    }
}

.dashboard-hero-summary {
    display: grid;
    grid-template-columns: minmax(72px, 96px) minmax(0, 1fr);
    align-items: center;
    gap: 18px;
    min-width: 0;
    border: 1px solid var(--company-line);
    border-radius: 8px;
    background: var(--company-panel);
    box-shadow: 0 10px 24px rgba(20, 33, 41, 0.05);
    padding: 14px 16px;
}

.dashboard-hero-logo {
    display: grid;
    width: 72px;
    height: 56px;
    place-items: center;
    border: 1px solid #cfe3df;
    border-radius: 8px;
    background: var(--company-soft);
    color: var(--company-brand-dark);
    box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.07), 0 8px 18px rgba(15, 118, 110, 0.12);
}

.dashboard-hero-logo-image {
    display: block;
    width: auto;
    max-width: 64px;
    height: 44px;
    object-fit: contain;
}

.dashboard-hero-logo-image.company-avatar-initials {
    width: 44px;
    height: 44px;
    max-width: none;
    border-radius: 8px;
}

.dashboard-hero-summary.is-active .dashboard-hero-logo {
    border-color: #a7d8cf;
    box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.1), 0 8px 22px rgba(15, 118, 110, 0.24);
}

.dashboard-hero-summary.is-upcoming .dashboard-hero-logo,
.dashboard-hero-summary.is-locked .dashboard-hero-logo {
    border-color: #fecaca;
    box-shadow: 0 0 0 4px rgba(180, 35, 24, 0.08), 0 8px 22px rgba(180, 35, 24, 0.2);
}

.dashboard-hero-subscription {
    justify-self: end;
    min-width: 0;
    margin: 0;
    color: var(--company-text);
    font-size: 1rem;
    font-weight: 850;
    line-height: 1.35;
    text-align: right;
    overflow-wrap: anywhere;
}

.dashboard-hero-summary.is-active .dashboard-hero-subscription {
    color: var(--company-brand-dark);
}

.dashboard-hero-summary.is-upcoming .dashboard-hero-subscription {
    color: var(--company-warn);
}

.dashboard-hero-summary.is-locked .dashboard-hero-subscription {
    color: var(--company-danger);
}

@media (max-width: 680px) {
    .dashboard-hero-summary {
        grid-template-columns: 64px minmax(0, 1fr);
        gap: 12px;
        padding: 12px 14px;
    }

    .dashboard-hero-logo {
        width: 64px;
        height: 50px;
    }

    .dashboard-hero-logo-image {
        max-width: 54px;
        height: 38px;
    }

    .dashboard-hero-logo-image.company-avatar-initials {
        width: 38px;
        height: 38px;
    }

    .dashboard-hero-subscription {
        font-size: 0.92rem;
    }
}

@media (max-width: 360px) {
    .dashboard-hero-summary {
        grid-template-columns: 1fr;
        justify-items: start;
    }

    .dashboard-hero-logo {
        width: 64px;
    }

    .dashboard-hero-subscription {
        justify-self: start;
        text-align: left;
    }
}

.company-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    min-width: 0;
    margin-top: 16px;
    padding-top: 13px;
    border-top: 1px solid var(--company-line);
}

.company-pagination-summary {
    color: #52646b;
    font-size: 0.78rem;
    font-weight: 750;
    line-height: 1.35;
}

.company-pagination-controls {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 6px;
    min-width: 0;
}

.company-pagination-link {
    display: inline-flex;
    min-width: 34px;
    height: 34px;
    align-items: center;
    justify-content: center;
    gap: 5px;
    border: 1px solid var(--company-line);
    border-radius: 7px;
    background: var(--company-soft);
    color: var(--company-brand-dark);
    padding: 0 9px;
    font-size: 0.78rem;
    font-weight: 850;
    line-height: 1;
    text-decoration: none;
    transition: transform 150ms ease, border-color 150ms ease, background-color 150ms ease, color 150ms ease, box-shadow 150ms ease;
}

.company-pagination-link svg {
    width: 14px;
    height: 14px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

a.company-pagination-link:hover {
    transform: translateY(-1px);
    border-color: #8fc9c0;
    background: #edf8f6;
    box-shadow: 0 4px 10px rgba(15, 118, 110, 0.1);
}

.company-pagination-link:focus-visible {
    outline: 3px solid rgba(15, 118, 110, 0.2);
    outline-offset: 2px;
}

.company-pagination-link.is-current {
    border-color: var(--company-brand);
    background: var(--company-brand);
    color: #ffffff;
    box-shadow: 0 4px 10px rgba(15, 118, 110, 0.16);
}

.company-pagination-link.is-disabled {
    cursor: default;
    opacity: 0.48;
}

.company-pagination-ellipsis {
    display: inline-flex;
    width: 20px;
    height: 34px;
    align-items: center;
    justify-content: center;
    color: #71838a;
    font-weight: 850;
}

[data-company-pagination-region].is-pagination-loading {
    pointer-events: none;
    opacity: 0.58;
    transition: opacity 150ms ease;
}

.company-pagination-toast {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 1000;
    max-width: min(360px, calc(100vw - 32px));
    border: 1px solid #f0b9b3;
    border-radius: 8px;
    background: #fff7f6;
    color: var(--company-danger);
    box-shadow: 0 10px 24px rgba(20, 33, 41, 0.14);
    padding: 11px 13px;
    font-size: 0.8rem;
    font-weight: 750;
    line-height: 1.4;
}

@media (max-width: 680px) {
    .company-pagination {
        align-items: stretch;
        flex-direction: column;
    }

    .company-pagination-controls {
        justify-content: flex-start;
    }
}

@media (max-width: 360px) {
    .company-pagination-controls {
        justify-content: space-between;
    }

    .company-pagination-link {
        min-width: 32px;
        padding: 0 7px;
    }

    .company-pagination-link:not(.company-pagination-number):not(.is-current) span {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
    }
}

/* WhatsApp Business profile manager. */
.whatsapp-profile-page {
    display: grid;
    gap: 16px;
    min-width: 0;
}

.whatsapp-profile-heading,
.whatsapp-profile-card,
.whatsapp-profile-empty {
    min-width: 0;
    border: 1px solid var(--company-line);
    border-radius: 8px;
    background: var(--company-panel);
    box-shadow: 0 10px 24px rgba(20, 33, 41, 0.04);
}

.whatsapp-profile-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 20px 22px;
}

.whatsapp-profile-heading h1,
.whatsapp-profile-card h2,
.whatsapp-profile-empty h2 {
    margin: 3px 0 0;
    color: var(--company-ink);
    font-size: 1.35rem;
    line-height: 1.15;
}

.whatsapp-profile-heading p,
.whatsapp-profile-empty p,
.whatsapp-profile-identity p {
    margin: 6px 0 0;
    color: #60747b;
    font-size: 0.86rem;
    line-height: 1.45;
}

.whatsapp-profile-actions,
.whatsapp-profile-modal-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
}

.whatsapp-profile-card {
    padding: 20px 22px;
}

.whatsapp-profile-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--company-line);
}

.whatsapp-profile-identity {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.whatsapp-profile-avatar {
    display: grid;
    width: 72px;
    height: 72px;
    flex: 0 0 auto;
    place-items: center;
    overflow: hidden;
    border: 1px solid #a7d8cf;
    border-radius: 50%;
    background: #e7f5f2;
    color: var(--company-brand-dark);
    font-size: 1.35rem;
    font-weight: 900;
}

.whatsapp-profile-avatar img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.whatsapp-profile-status {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 30px;
    border: 1px solid #a7d8cf;
    border-radius: 999px;
    background: #edf8f6;
    color: var(--company-brand-dark);
    padding: 0 10px;
    font-size: 0.75rem;
    font-weight: 850;
}

.whatsapp-profile-status > span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
}

.whatsapp-profile-inline-note {
    margin-top: 16px;
    border: 1px solid #f0c8c3;
    border-radius: 7px;
    background: #fff8f7;
    color: #a33a31;
    padding: 10px 12px;
    font-size: 0.8rem;
    font-weight: 700;
}

.whatsapp-profile-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 24px;
    margin: 0;
}

.whatsapp-profile-fields > div {
    min-width: 0;
    padding: 15px 0;
    border-bottom: 1px solid #edf1f1;
}

.whatsapp-profile-fields dt {
    color: #6a7d83;
    font-size: 0.7rem;
    font-weight: 850;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.whatsapp-profile-fields dd {
    display: grid;
    gap: 4px;
    margin: 5px 0 0;
    color: var(--company-ink);
    font-size: 0.88rem;
    font-weight: 700;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.whatsapp-profile-empty {
    display: grid;
    justify-items: center;
    padding: 54px 22px;
    text-align: center;
}

.whatsapp-profile-empty-icon {
    display: grid;
    width: 54px;
    height: 54px;
    place-items: center;
    border: 1px solid #a7d8cf;
    border-radius: 50%;
    background: #edf8f6;
    color: var(--company-brand-dark);
}

.whatsapp-profile-empty-icon svg {
    width: 26px;
    height: 26px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.whatsapp-profile-empty .cmp-secondary-action {
    margin-top: 18px;
}

.whatsapp-profile-toast {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 1100;
    max-width: min(380px, calc(100vw - 32px));
    border: 1px solid #a7d8cf;
    border-radius: 8px;
    background: #edf8f6;
    color: var(--company-brand-dark);
    box-shadow: 0 12px 26px rgba(20, 33, 41, 0.16);
    padding: 12px 14px;
    font-size: 0.8rem;
    font-weight: 800;
    line-height: 1.4;
}

.whatsapp-profile-toast.is-error {
    border-color: #f0b9b3;
    background: #fff7f6;
    color: var(--company-danger);
}

.whatsapp-profile-modal-shell {
    z-index: 1050;
}

.whatsapp-profile-modal {
    width: min(700px, calc(100vw - 32px));
    max-height: calc(100dvh - 32px);
}

.whatsapp-profile-modal-body {
    display: grid;
    gap: 18px;
    max-height: calc(100dvh - 190px);
    overflow-y: auto;
    padding: 18px;
}

.whatsapp-profile-upload {
    display: grid;
    gap: 10px;
    padding: 14px;
    border: 1px solid var(--company-line);
    border-radius: 8px;
    background: #fbfdfd;
}

.whatsapp-profile-upload-copy {
    display: grid;
    gap: 3px;
}

.whatsapp-profile-upload-copy strong {
    color: var(--company-ink);
    font-size: 0.86rem;
}

.whatsapp-profile-upload-copy span {
    color: #6a7d83;
    font-size: 0.75rem;
}

.whatsapp-profile-dropzone {
    display: flex;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px dashed #91c9c0;
    border-radius: 7px;
    background: #f1faf8;
    color: var(--company-brand-dark);
    padding: 10px 12px;
    font-size: 0.8rem;
    font-weight: 800;
    cursor: pointer;
}

.whatsapp-profile-dropzone:hover,
.whatsapp-profile-dropzone.is-dragging {
    border-color: var(--company-brand);
    background: #e7f5f2;
}

.whatsapp-profile-dropzone svg,
.whatsapp-profile-upload .cmp-secondary-action svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.whatsapp-profile-image-editor {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr);
    align-items: start;
    gap: 14px;
}

.whatsapp-profile-crop-frame {
    width: 150px;
    aspect-ratio: 1;
    overflow: hidden;
    border: 1px solid #a7d8cf;
    border-radius: 8px;
    background: #e7f5f2;
}

.whatsapp-profile-crop-frame img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform-origin: center;
}

.whatsapp-profile-crop-controls {
    display: grid;
    gap: 8px;
}

.whatsapp-profile-crop-controls label {
    display: grid;
    gap: 4px;
    color: #62767d;
    font-size: 0.73rem;
    font-weight: 800;
}

.whatsapp-profile-crop-controls input[type="range"] {
    width: 100%;
    accent-color: var(--company-brand);
}

.whatsapp-profile-image-editor .cmp-secondary-action {
    grid-column: 1 / -1;
    justify-self: start;
}

.whatsapp-profile-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.whatsapp-profile-form-grid label {
    display: grid;
    gap: 6px;
    color: #587078;
    font-size: 0.73rem;
    font-weight: 850;
}

.whatsapp-profile-form-grid label.is-wide {
    grid-column: 1 / -1;
}

.whatsapp-profile-form-grid input,
.whatsapp-profile-form-grid select,
.whatsapp-profile-form-grid textarea {
    width: 100%;
    min-width: 0;
    border: 1px solid var(--company-line);
    border-radius: 7px;
    background: #ffffff;
    color: var(--company-ink);
    padding: 10px 11px;
    font: inherit;
    font-size: 0.84rem;
    font-weight: 650;
}

.whatsapp-profile-form-grid textarea {
    resize: vertical;
}

.whatsapp-profile-form-grid input:focus,
.whatsapp-profile-form-grid select:focus,
.whatsapp-profile-form-grid textarea:focus {
    border-color: var(--company-brand);
    outline: 3px solid rgba(15, 118, 110, 0.14);
}

.whatsapp-profile-progress {
    display: grid;
    gap: 6px;
}

.whatsapp-profile-progress > span {
    display: block;
    width: 0;
    height: 6px;
    border-radius: 999px;
    background: var(--company-brand);
    transition: width 150ms ease;
}

.whatsapp-profile-progress small {
    color: #60747b;
    font-size: 0.72rem;
    font-weight: 750;
}

.whatsapp-profile-modal-actions {
    margin: 0;
    padding: 0 18px 18px;
}

@media (max-width: 760px) {
    .whatsapp-profile-heading,
    .whatsapp-profile-card {
        padding: 16px;
    }

    .whatsapp-profile-heading,
    .whatsapp-profile-card-top {
        align-items: stretch;
        flex-direction: column;
    }

    .whatsapp-profile-actions {
        justify-content: flex-start;
    }

    .whatsapp-profile-fields {
        grid-template-columns: 1fr;
    }

    .whatsapp-profile-modal {
        width: calc(100vw - 24px);
        max-width: calc(100vw - 24px);
        max-height: calc(100dvh - 24px);
    }

    .whatsapp-profile-modal-body {
        max-height: calc(100dvh - 172px);
        padding: 14px;
    }

    .whatsapp-profile-form-grid {
        grid-template-columns: 1fr;
    }

    .whatsapp-profile-form-grid label.is-wide {
        grid-column: auto;
    }

    .whatsapp-profile-modal-actions {
        padding: 0 14px 14px;
    }

    .whatsapp-profile-modal-actions > button {
        flex: 1 1 140px;
    }
}

@media (max-width: 430px) {
    .whatsapp-profile-image-editor {
        grid-template-columns: 1fr;
    }

    .whatsapp-profile-crop-frame {
        width: min(180px, 100%);
    }
}

/* Consolidated WhatsApp tools hub. */
.whatsapp-tools-page {
    display: grid;
    gap: 16px;
    min-width: 0;
}

.whatsapp-tools-heading {
    min-width: 0;
    border: 1px solid var(--company-line);
    border-radius: 8px;
    background: var(--company-panel);
    box-shadow: 0 10px 24px rgba(20, 33, 41, 0.04);
    padding: 20px 22px;
}

.whatsapp-tools-heading h1 {
    margin: 3px 0 0;
    color: var(--company-ink);
    font-size: 1.45rem;
    line-height: 1.15;
}

.whatsapp-tools-heading p {
    margin: 6px 0 0;
    color: #60747b;
    font-size: 0.88rem;
    line-height: 1.45;
}

.whatsapp-tools-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: 1fr;
    gap: 16px;
    min-width: 0;
}

.whatsapp-tool-card {
    display: flex;
    min-width: 0;
    min-height: 236px;
    flex-direction: column;
    border: 1px solid var(--company-line);
    border-radius: 8px;
    background: var(--company-panel);
    box-shadow: 0 8px 20px rgba(20, 33, 41, 0.04);
    padding: 20px;
    cursor: pointer;
    transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.whatsapp-tool-card:hover,
.whatsapp-tool-card:focus-visible {
    transform: translateY(-2px);
    border-color: #8fc9c0;
    box-shadow: 0 14px 28px rgba(20, 33, 41, 0.1);
    outline: none;
}

.whatsapp-tool-card.is-primary {
    border-color: #a7d8cf;
}

.whatsapp-tool-card-icon {
    display: grid;
    width: 48px;
    height: 48px;
    place-items: center;
    border: 1px solid #b8ddd6;
    border-radius: 8px;
    background: #edf8f6;
    color: var(--company-brand-dark);
}

.whatsapp-tool-card-icon.is-link {
    color: #2f6478;
    background: #eef7fa;
    border-color: #b9d9e3;
}

.whatsapp-tool-card-icon.is-widget {
    color: #6b5a2d;
    background: #faf7e9;
    border-color: #e6dcae;
}

.whatsapp-tool-card-icon.is-verified {
    color: #496f58;
    background: #eff8f0;
    border-color: #bddcc5;
}

.whatsapp-tool-card-icon svg {
    width: 25px;
    height: 25px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.whatsapp-tool-card-copy {
    min-width: 0;
    margin-top: 18px;
}

.whatsapp-tool-card-copy h2 {
    margin: 0;
    color: var(--company-ink);
    font-size: 1.08rem;
    line-height: 1.25;
}

.whatsapp-tool-card-copy p {
    margin: 8px 0 0;
    color: #60747b;
    font-size: 0.82rem;
    font-weight: 650;
    line-height: 1.5;
}

.whatsapp-tool-card-profile-meta {
    display: grid;
    gap: 3px;
    margin-top: 10px;
    color: var(--company-brand-dark);
    font-size: 0.74rem;
    font-weight: 800;
    line-height: 1.35;
}

.whatsapp-tool-card-profile-meta span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.whatsapp-tool-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: auto;
    padding-top: 22px;
}

.whatsapp-tool-status {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 28px;
    border: 1px solid #d6e2e2;
    border-radius: 999px;
    background: #f5f9f9;
    color: #667b81;
    padding: 0 9px;
    font-size: 0.72rem;
    font-weight: 850;
}

.whatsapp-tool-status > span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
}

.whatsapp-tool-status.is-live {
    border-color: #a7d8cf;
    background: #edf8f6;
    color: var(--company-brand-dark);
}

.whatsapp-profile-modal-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: #60747b;
    font-size: 0.78rem;
    font-weight: 700;
}

.whatsapp-profile-modal-toolbar .cmp-secondary-action {
    flex: 0 0 auto;
}

.whatsapp-tools-placeholder-body {
    padding: 22px 18px 10px;
}

.whatsapp-tools-placeholder-body p {
    margin: 0;
    color: #526970;
    font-size: 0.88rem;
    font-weight: 700;
    line-height: 1.5;
}

.whatsapp-tools-placeholder-modal .cmp-modal-card {
    width: min(480px, calc(100vw - 32px));
}

@media (max-width: 760px) {
    .whatsapp-tools-heading {
        padding: 16px;
    }

    .whatsapp-tools-grid {
        grid-template-columns: 1fr;
    }

    .whatsapp-tool-card {
        min-height: 210px;
        padding: 16px;
    }

    .whatsapp-profile-modal-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .whatsapp-profile-modal-toolbar .cmp-secondary-action {
        align-self: flex-start;
    }
}

@media (max-width: 430px) {
    .whatsapp-tool-card-footer {
        align-items: stretch;
        flex-direction: column;
    }

    .whatsapp-tool-card-footer .cmp-primary-action,
    .whatsapp-tool-card-footer .cmp-secondary-action {
        width: 100%;
    }
}

.whatsapp-link-modal-card {
    width: min(900px, calc(100vw - 32px));
    max-height: calc(100dvh - 32px);
}

/* Website Button / Chat Widget generator. */
.whatsapp-widget-modal {
    width: min(1180px, calc(100vw - 32px));
    max-height: calc(100dvh - 32px);
}

.whatsapp-widget-modal-subtitle { margin: 5px 0 0; color: #70838a; font-size: .76rem; font-weight: 650; }
.whatsapp-widget-modal-body { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(300px, .88fr); gap: 18px; max-height: calc(100dvh - 184px); overflow-y: auto; padding: 18px; }
.whatsapp-widget-config, .whatsapp-widget-preview-column { min-width: 0; }
.whatsapp-widget-config { display: grid; align-content: start; gap: 12px; }
.whatsapp-widget-mode-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; border: 1px solid var(--company-line); border-radius: 8px; background: #f4f9f8; padding: 4px; }
.whatsapp-widget-mode-tabs button { min-height: 38px; border: 0; border-radius: 6px; background: transparent; color: #587077; cursor: pointer; font: inherit; font-size: .78rem; font-weight: 850; }
.whatsapp-widget-mode-tabs button.is-active { background: #fff; color: var(--company-brand-dark); box-shadow: 0 3px 10px rgba(20, 48, 43, .1); }
.whatsapp-widget-section { display: grid; gap: 11px; border: 1px solid var(--company-line); border-radius: 8px; background: #fbfdfd; padding: 13px; }
.whatsapp-widget-section-heading { display: grid; gap: 3px; }
.whatsapp-widget-section-heading strong { color: var(--company-ink); font-size: .82rem; }
.whatsapp-widget-section-heading span, .whatsapp-widget-field small, .whatsapp-widget-avatar-control small, .whatsapp-widget-active-note { color: #74878d; font-size: .7rem; font-weight: 650; line-height: 1.4; }
.whatsapp-widget-field { display: grid; gap: 5px; color: #526970; font-size: .73rem; font-weight: 850; }
.whatsapp-widget-field input:not([type="color"]):not([type="checkbox"]), .whatsapp-widget-field select, .whatsapp-widget-field textarea { width: 100%; min-width: 0; border: 1px solid var(--company-line); border-radius: 7px; background: #fff; color: var(--company-ink); padding: 9px 10px; font: inherit; font-size: .8rem; font-weight: 650; }
.whatsapp-widget-field textarea { min-height: 82px; resize: vertical; line-height: 1.45; }
.whatsapp-widget-field input:focus, .whatsapp-widget-field select:focus, .whatsapp-widget-field textarea:focus { border-color: var(--company-brand); outline: 3px solid rgba(15, 118, 110, .14); }
.whatsapp-widget-two-col { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.whatsapp-widget-switch-row { display: flex; flex-wrap: wrap; gap: 8px; }
.whatsapp-widget-mode-tabs button { display: flex; align-items: center; justify-content: flex-start; gap: 9px; min-height: 48px; padding: 6px 11px; text-align: left; }
.whatsapp-widget-mode-tabs button:hover { background: #edf8f5; color: var(--company-brand-dark); }
.whatsapp-widget-mode-tabs button:focus-visible { outline: 3px solid rgba(15, 118, 110, .2); outline-offset: 1px; }
.whatsapp-widget-mode-tabs button svg { width: 20px; height: 20px; flex: 0 0 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.whatsapp-widget-mode-tabs button span { display: grid; gap: 2px; min-width: 0; }
.whatsapp-widget-mode-tabs button strong { color: inherit; font-size: .76rem; line-height: 1.1; }
.whatsapp-widget-mode-tabs button small { color: #7a8b90; font-size: .62rem; font-weight: 650; line-height: 1.15; }
.whatsapp-widget-mode-tabs button.is-active svg { color: var(--company-brand-dark); }
.whatsapp-widget-mode-tabs button.is-active small { color: #5c7772; }
.whatsapp-widget-toggle { display: inline-flex; align-items: center; gap: 7px; min-height: 32px; color: #526970; font-size: .72rem; font-weight: 800; }
.whatsapp-widget-toggle input { accent-color: var(--company-brand); }
.whatsapp-widget-toggle.is-active-toggle { color: var(--company-brand-dark); }
.whatsapp-widget-color-control { display: grid; grid-template-columns: 38px minmax(0, 1fr); gap: 6px; }
.whatsapp-widget-color-control input[type="color"] { width: 38px; height: 36px; border: 1px solid var(--company-line); border-radius: 7px; background: #fff; padding: 3px; }
.whatsapp-widget-color-control input[type="text"] { width: 100%; min-width: 0; border: 1px solid var(--company-line); border-radius: 7px; background: #fff; color: var(--company-ink); padding: 8px 9px; font: 700 .78rem/1.2 ui-monospace, SFMono-Regular, Consolas, monospace; }
.whatsapp-widget-placeholder-help { display: grid; gap: 4px; border-radius: 6px; background: #eef8f5; padding: 8px 9px; }
.whatsapp-widget-placeholder-help span { color: var(--company-brand-dark); font-size: .68rem; font-weight: 850; }
.whatsapp-widget-placeholder-help code { color: #46646a; font: 650 .68rem/1.45 ui-monospace, SFMono-Regular, Consolas, monospace; overflow-wrap: anywhere; }
.whatsapp-widget-avatar-control { display: grid; gap: 9px; }
.whatsapp-widget-avatar-control > div:first-child { display: grid; gap: 3px; }
.whatsapp-widget-avatar-control strong { color: #526970; font-size: .73rem; }
.whatsapp-widget-dropzone { min-height: 48px; border: 1px dashed #9bcac2; border-radius: 7px; background: #f5fbf9; color: var(--company-brand-dark); cursor: pointer; font: 750 .74rem/1.2 inherit; }
.whatsapp-widget-dropzone:hover, .whatsapp-widget-dropzone.is-dragging { border-color: var(--company-brand); background: #eaf8f4; }
.whatsapp-widget-avatar-preview { display: flex; align-items: center; gap: 10px; min-height: 52px; }
.whatsapp-widget-avatar-frame { display: grid; width: 52px; height: 52px; flex: 0 0 52px; place-items: center; overflow: hidden; border: 1px solid #cfe0dc; border-radius: 50%; background: #f0f7f5; color: #73908a; }
.whatsapp-widget-avatar-preview img { width: 100%; height: 100%; object-fit: cover; }
.whatsapp-widget-avatar-placeholder { display: grid; width: 100%; height: 100%; place-items: center; }
.whatsapp-widget-avatar-placeholder svg { width: 25px; height: 25px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.whatsapp-widget-avatar-preview .cmp-secondary-action { min-height: 34px; padding: 0 10px; }
.whatsapp-widget-reset-button { white-space: nowrap; }
.whatsapp-widget-reset-button svg { width: 15px; height: 15px; }
.whatsapp-widget-preview-column { display: grid; align-content: start; gap: 9px; }
.whatsapp-widget-preview-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: #72848a; font-size: .7rem; font-weight: 750; }
.whatsapp-widget-preview-canvas { position: relative; min-height: 390px; overflow: hidden; border: 1px solid #d8e5e2; border-radius: 10px; background: linear-gradient(145deg, #f9fcfb 0%, #edf5f3 100%); }
.whatsapp-widget-preview-site { display: grid; grid-template-columns: repeat(3, 34px); gap: 7px; padding: 19px; }
.whatsapp-widget-preview-site > span { height: 6px; border-radius: 5px; background: #c7ddda; }
.whatsapp-widget-preview-site-title { grid-column: 1 / -1; margin-top: 30px; color: #60767a; font-size: 1.2rem; font-weight: 850; }
.whatsapp-widget-preview-site-line { grid-column: 1 / -1; height: 9px; border-radius: 8px; background: #d7e6e3; }
.whatsapp-widget-preview-site-line.is-short { width: 68%; }
.whatsapp-widget-preview-widget { position: absolute; right: var(--preview-side, 24px); bottom: var(--preview-bottom, 24px); z-index: 2; }
.whatsapp-widget-preview-widget.is-left { left: var(--preview-side, 24px); right: auto; }
.whatsapp-widget-preview-widget > button, .whatsapp-widget-preview-launcher { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 43px; border: 0; border-radius: 999px; color: #fff; padding: 0 14px; cursor: pointer; font: 800 .72rem/1 inherit; }
.whatsapp-widget-preview-launcher.is-compact { min-height: 36px; padding: 0 11px; }
.whatsapp-widget-preview-launcher.is-rounded { border-radius: 10px; }
.whatsapp-widget-preview-launcher.is-square { border-radius: 4px; }
.whatsapp-widget-preview-launcher.has-shadow { box-shadow: 0 8px 18px rgba(25, 70, 60, .2); }
.whatsapp-widget-preview-icon { display: inline-grid; width: 20px; height: 20px; place-items: center; border: 1px solid currentColor; border-radius: 50%; font-size: .95rem; line-height: 1; }
.whatsapp-widget-preview-icon svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.whatsapp-widget-preview-chat { display: grid; justify-items: end; gap: 9px; }
.whatsapp-widget-preview-chat-panel { width: min(250px, calc(100vw - 64px)); overflow: hidden; border: 1px solid #d9e5e2; border-radius: 12px; background: #fff; box-shadow: 0 12px 28px rgba(27, 61, 54, .18); }
.whatsapp-widget-preview-chat-head { display: flex; align-items: center; gap: 7px; background: var(--preview-color, #25D366); color: #fff; padding: 10px; }
.whatsapp-widget-preview-avatar { display: grid; width: 28px; height: 28px; flex: 0 0 28px; place-items: center; overflow: hidden; border-radius: 50%; background: rgba(255, 255, 255, .24); }
.whatsapp-widget-preview-avatar img { width: 100%; height: 100%; object-fit: cover; }
.whatsapp-widget-preview-chat-head strong, .whatsapp-widget-preview-chat-head span { display: block; }
.whatsapp-widget-preview-chat-head strong { font-size: .69rem; }
.whatsapp-widget-preview-chat-head span { margin-top: 2px; font-size: .56rem; opacity: .9; }
.whatsapp-widget-preview-close { margin-left: auto; border: 0; background: transparent; color: #fff; cursor: pointer; font-size: 1rem; }
.whatsapp-widget-preview-chat-body { display: grid; gap: 9px; background: #f6fbf9; padding: 11px; }
.whatsapp-widget-preview-chat-body p { margin: 0; border-radius: 8px; background: #fff; color: #496269; padding: 9px; font-size: .65rem; line-height: 1.4; white-space: pre-wrap; }
.whatsapp-widget-preview-start { display: grid; min-height: 33px; place-items: center; border-radius: 7px; color: #fff; font-size: .62rem; font-weight: 850; }
.whatsapp-widget-preview-note { margin: 0; color: #7a8b90; font-size: .69rem; line-height: 1.4; }
.whatsapp-widget-test-button { justify-self: start; width: auto; min-height: 36px; }
.whatsapp-widget-embed-panel { display: grid; grid-template-columns: 1fr; gap: 10px; align-items: start; border-top: 1px solid var(--company-line); background: #f8fbfa; padding: 14px 18px; }
.whatsapp-widget-embed-heading { display: grid; gap: 3px; }
.whatsapp-widget-embed-panel strong { color: var(--company-ink); font-size: .78rem; }
.whatsapp-widget-embed-panel span { color: #7b8b90; font-size: .69rem; line-height: 1.4; }
.whatsapp-widget-embed-panel textarea { grid-column: auto; width: 100%; min-width: 0; min-height: 62px; resize: vertical; border: 1px solid var(--company-line); border-radius: 7px; background: #fff; color: #38555a; padding: 10px 11px; font: .68rem/1.45 ui-monospace, SFMono-Regular, Consolas, monospace; }
.whatsapp-widget-embed-panel textarea::placeholder { color: #91a1a5; }
.whatsapp-widget-copy-button { justify-self: start; min-height: 36px; padding: 0 12px; }
.whatsapp-widget-modal-actions { display: flex; justify-content: flex-end; gap: 9px; }
.whatsapp-widget-modal-actions > button { min-height: 38px; }
.whatsapp-widget-error { margin: 0 18px; border-radius: 6px; background: #fff1f0; color: #a33d38; padding: 9px 11px; font-size: .74rem; font-weight: 750; }
@media (max-width: 760px) {
    .whatsapp-widget-modal-body { grid-template-columns: 1fr; max-height: calc(100dvh - 145px); }
    .whatsapp-widget-preview-column { order: -1; }
    .whatsapp-widget-preview-canvas { min-height: 300px; }
}
@media (max-width: 430px) {
    .whatsapp-widget-modal { width: calc(100vw - 16px); }
    .whatsapp-widget-modal-body, .whatsapp-widget-embed-panel { padding: 11px; }
    .whatsapp-widget-two-col { grid-template-columns: 1fr; }
    .whatsapp-widget-switch-row { display: grid; }
    .whatsapp-widget-modal-actions { align-items: stretch; flex-direction: column-reverse; }
    .whatsapp-widget-modal-actions > button { width: 100%; }
    .whatsapp-widget-copy-button, .whatsapp-widget-test-button { width: auto; }
}

.whatsapp-link-modal-body {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(240px, 0.9fr);
    gap: 22px;
    max-height: calc(100dvh - 142px);
    overflow-y: auto;
    padding: 18px;
}

.whatsapp-link-form-area,
.whatsapp-link-qr-area {
    display: grid;
    align-content: start;
    gap: 14px;
    min-width: 0;
}

.whatsapp-link-field,
.whatsapp-link-output {
    display: grid;
    gap: 6px;
    min-width: 0;
}

.whatsapp-link-field > span,
.whatsapp-link-output > label {
    color: #526970;
    font-size: 0.75rem;
    font-weight: 850;
}

.whatsapp-link-field input,
.whatsapp-link-field textarea,
.whatsapp-link-output input {
    width: 100%;
    min-width: 0;
    border: 1px solid var(--company-line);
    border-radius: 7px;
    background: #ffffff;
    color: var(--company-ink);
    padding: 10px 11px;
    font: inherit;
    font-size: 0.84rem;
    font-weight: 650;
}

.whatsapp-link-field textarea {
    min-height: 132px;
    resize: vertical;
    line-height: 1.45;
}

.whatsapp-link-field input:focus,
.whatsapp-link-field textarea:focus,
.whatsapp-link-output input:focus {
    border-color: var(--company-brand);
    outline: 3px solid rgba(15, 118, 110, 0.14);
}

.whatsapp-link-field small {
    color: #71838a;
    font-size: 0.72rem;
    font-weight: 650;
    line-height: 1.4;
}

.whatsapp-link-field em {
    color: var(--company-danger);
    font-size: 0.74rem;
    font-style: normal;
    font-weight: 750;
    line-height: 1.35;
}

.whatsapp-link-output input {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.whatsapp-link-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.whatsapp-link-actions > button,
.whatsapp-link-actions > a {
    flex: 1 1 150px;
}

.whatsapp-link-qr-area {
    align-items: center;
    border: 1px solid var(--company-line);
    border-radius: 8px;
    background: #fbfdfd;
    padding: 16px;
    text-align: center;
}

.whatsapp-link-qr-heading {
    display: flex;
    width: 100%;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    text-align: left;
}

.whatsapp-link-qr-heading h3 {
    margin: 3px 0 0;
    color: var(--company-ink);
    font-size: 0.95rem;
    line-height: 1.25;
}

.whatsapp-link-qr-heading > span {
    max-width: 130px;
    overflow: hidden;
    color: var(--company-brand-dark);
    font-size: 0.72rem;
    font-weight: 850;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.whatsapp-link-qr-frame {
    display: grid;
    width: min(256px, 100%);
    min-height: 256px;
    place-items: center;
    border: 1px solid #dce9e7;
    border-radius: 7px;
    background: #ffffff;
    padding: 12px;
}

.whatsapp-link-qr-frame canvas {
    display: block;
    width: 100%;
    height: auto;
    max-width: 256px;
    image-rendering: pixelated;
}

.whatsapp-link-qr-empty {
    max-width: 190px;
    color: #71838a;
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1.45;
}

.whatsapp-link-qr-area > .cmp-secondary-action {
    width: min(256px, 100%);
}

@media (max-width: 760px) {
    .whatsapp-link-modal-card {
        width: calc(100vw - 24px);
        max-width: calc(100vw - 24px);
        max-height: calc(100dvh - 24px);
    }

    .whatsapp-link-modal-body {
        grid-template-columns: 1fr;
        max-height: calc(100dvh - 142px);
        padding: 14px;
    }

    .whatsapp-link-qr-area {
        justify-items: center;
    }

    .whatsapp-link-qr-frame {
        min-height: 220px;
    }

    .whatsapp-link-qr-frame canvas {
        max-width: 220px;
    }
}

@media (max-width: 430px) {
    .whatsapp-link-actions {
        flex-direction: column;
    }

    .whatsapp-link-actions > button,
    .whatsapp-link-actions > a,
    .whatsapp-link-qr-area > .cmp-secondary-action {
        width: 100%;
    }
}


/* Session B recorder correction pass: compact symbolic, touch-friendly controls. */
.live-chat-recording-card {
    grid-template-rows: auto auto minmax(190px, 1fr) auto auto;
}
.live-chat-recording-action {
    display: inline-grid;
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    place-items: center;
    border: 1px solid var(--company-line);
    border-radius: 50%;
    padding: 0 !important;
    color: var(--company-brand-dark);
}
.live-chat-recording-action svg {
    width: 21px;
    height: 21px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.9;
}
.live-chat-recording-record {
    border-color: #d23f4b;
    background: #e84c58;
    color: #ffffff;
}
.live-chat-recording-record svg circle {
    fill: currentColor;
    stroke: currentColor;
}
.live-chat-recording-send {
    border-color: var(--company-brand);
    background: var(--company-brand);
    color: #ffffff;
}
.live-chat-recording-stop svg rect {
    fill: currentColor;
}
.live-chat-recording-action:disabled {
    cursor: not-allowed;
    opacity: 0.45;
}
.live-chat-recording-footer {
    justify-content: center;
}
.live-chat-recording-progress {
    display: grid;
    gap: 6px;
    border-top: 1px solid var(--company-line);
    padding: 10px 14px 12px;
    color: var(--company-brand-dark);
    font-size: 0.8rem;
    font-weight: 800;
}
.live-chat-recording-progress[hidden] {
    display: none;
}
.live-chat-recording-progress progress {
    width: 100%;
    height: 8px;
    accent-color: var(--company-brand);
}
.live-chat-recording-progress progress.is-indeterminate {
    appearance: none;
    overflow: hidden;
    background: #dbe9e7;
}
.live-chat-recording-progress progress.is-indeterminate::-webkit-progress-bar {
    background: #dbe9e7;
}
.live-chat-recording-progress progress.is-indeterminate::-webkit-progress-value {
    width: 35%;
    background: var(--company-brand);
    animation: live-chat-progress-slide 1.2s ease-in-out infinite;
}
.live-chat-recording-progress progress.is-indeterminate::-moz-progress-bar {
    width: 35%;
    background: var(--company-brand);
    animation: live-chat-progress-slide 1.2s ease-in-out infinite;
}
@keyframes live-chat-progress-slide {
    from { transform: translateX(-120%); }
    to { transform: translateX(320%); }
}
.live-chat-recording-stage video[src=""] {
    display: none;
}
@media (max-width: 600px) {
    .live-chat-recording-modal {
        padding: 10px;
    }
    .live-chat-recording-card {
        width: min(560px, 100%);
        max-height: calc(100vh - 20px);
    }
    .live-chat-recording-stage {
        min-height: 150px;
        padding: 10px;
    }
    .live-chat-recording-stage video,
    .live-chat-recording-stage audio {
        max-height: 42vh;
    }
    .live-chat-recording-footer {
        gap: 6px;
        padding: 8px;
    }
    .live-chat-recording-action {
        width: 42px;
        height: 42px;
        flex-basis: 42px;
    }
}

/* Session B recorder correction pass: live state and audio level presentation. */
.live-chat-recording-indicator {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-inline-start: auto;
    margin-inline-end: 8px;
    color: #b12738;
    font-size: 0.72rem;
    font-weight: 850;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.live-chat-recording-indicator[hidden] {
    display: none;
}
.live-chat-recording-indicator i {
    display: block;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: currentColor;
}
.live-chat-recording-indicator.is-recording i {
    animation: live-chat-recording-blink 1s ease-in-out infinite;
}
.live-chat-recording-indicator.is-paused {
    color: #9a6b17;
}
.live-chat-recording-indicator.is-paused i {
    opacity: 0.72;
}
@keyframes live-chat-recording-blink {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.35; transform: scale(0.82); }
}
.live-chat-recording-meter {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    width: min(100%, 360px);
    min-height: 92px;
    border: 1px solid #d8e7e5;
    border-radius: 14px;
    background: linear-gradient(135deg, #ffffff, #eef7f5);
    padding: 18px 20px;
}
.live-chat-recording-meter i {
    display: block;
    width: 6px;
    min-height: 14px;
    border-radius: 999px;
    background: var(--company-brand);
    box-shadow: 0 2px 7px rgba(15, 95, 115, 0.18);
    transition: height 90ms ease-out, opacity 160ms ease;
}
.live-chat-recording-meter.is-paused i {
    opacity: 0.48;
}
@media (prefers-reduced-motion: reduce) {
    .live-chat-recording-indicator.is-recording i {
        animation: none;
    }
    .live-chat-recording-meter i {
        transition: none;
    }
}
