:root {
    --bg: #f5f7fb;
    --surface: #ffffff;
    --surface-soft: #f8fafc;
    --line: #dce3ec;
    --line-soft: #e8edf3;
    --text: #152033;
    --muted: #667085;
    --teal: #0f766e;
    --teal-soft: #dff6f1;
    --indigo: #4257b2;
    --indigo-soft: #e8ebff;
    --amber: #a96312;
    --amber-soft: #fff2d8;
    --slate: #475467;
    --slate-soft: #eef2f6;
    --shadow: 0 18px 45px rgba(21, 32, 51, 0.08);
}

* {
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    letter-spacing: 0;
}

a {
    color: inherit;
}

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

.sidebar {
    position: sticky;
    top: 0;
    display: flex;
    flex-direction: column;
    height: 100vh;
    padding: 24px 18px;
    background: #101828;
    color: #e6edf5;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 10px 22px;
    text-decoration: none;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
    color: #6ee7d8;
}

.brand strong,
.brand small {
    display: block;
    line-height: 1.1;
}

.brand strong {
    font-size: 16px;
}

.brand small {
    margin-top: 4px;
    color: #98a2b3;
    font-size: 12px;
}

.sidebar-nav {
    display: grid;
    gap: 6px;
    margin-top: 8px;
}

.sidebar .nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 42px;
    padding: 10px 12px;
    border-radius: 8px;
    color: #b7c3d2;
    font-size: 14px;
    text-decoration: none;
}

.sidebar .nav-link svg {
    width: 18px;
    height: 18px;
}

.sidebar .nav-link.active {
    background: rgba(255, 255, 255, 0.09);
    color: #ffffff;
}

.sidebar .nav-link.sub-link {
    min-height: 36px;
    margin-left: 18px;
    color: #c7d3df;
    font-size: 13px;
}

.sidebar .nav-link.sub-link svg {
    width: 16px;
    height: 16px;
}

.sidebar .nav-link.disabled {
    opacity: 0.55;
    cursor: default;
}

.sidebar-footer {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: auto;
    padding: 14px 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #c7d3df;
    font-size: 13px;
}

.main-area {
    min-width: 0;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 88px;
    padding: 20px 34px;
    border-bottom: 1px solid var(--line-soft);
    background: rgba(255, 255, 255, 0.78);
    backdrop-filter: blur(14px);
}

.eyebrow,
.section-kicker {
    display: block;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: uppercase;
}

.topbar h1 {
    margin: 4px 0 0;
    font-size: 24px;
    font-weight: 750;
}

.icon-button,
.soft-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 38px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    color: var(--text);
    text-decoration: none;
    box-shadow: 0 1px 2px rgba(21, 32, 51, 0.04);
}

.icon-button {
    width: 38px;
}

.soft-button {
    padding: 0 14px;
    font-size: 14px;
    font-weight: 650;
}

.soft-button.primary {
    border-color: var(--teal);
    background: var(--teal);
    color: #ffffff;
}

.icon-button svg,
.soft-button svg {
    width: 17px;
    height: 17px;
}

.content {
    width: min(1180px, 100%);
    padding: 32px 34px 46px;
}

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

.dashboard-hero h2 {
    margin: 6px 0 8px;
    font-size: 30px;
    font-weight: 780;
}

.dashboard-hero p {
    max-width: 680px;
    margin: 0;
    color: var(--muted);
}

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

.metric-card,
.panel {
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.metric-card {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 14px;
    min-height: 158px;
    padding: 18px;
}

.metric-icon {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 8px;
}

.metric-icon svg {
    width: 20px;
    height: 20px;
}

.metric-card span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.metric-card strong {
    display: block;
    margin-top: 6px;
    font-size: 28px;
    line-height: 1.1;
}

.metric-card p {
    margin: 12px 0 0;
    color: var(--muted);
    font-size: 13px;
}

.tone-teal .metric-icon {
    background: var(--teal-soft);
    color: var(--teal);
}

.tone-indigo .metric-icon {
    background: var(--indigo-soft);
    color: var(--indigo);
}

.tone-amber .metric-icon {
    background: var(--amber-soft);
    color: var(--amber);
}

.tone-slate .metric-icon {
    background: var(--slate-soft);
    color: var(--slate);
}

.workspace-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
    gap: 16px;
    margin-top: 16px;
}

.panel {
    padding: 22px;
}

.panel-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.panel-heading h3 {
    margin: 5px 0 0;
    font-size: 18px;
    font-weight: 760;
}

.panel-heading > svg {
    color: var(--teal);
}

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

.task-item {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 42px;
    padding: 10px 12px;
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    background: var(--surface-soft);
    color: var(--muted);
    font-size: 14px;
}

.task-item svg {
    width: 17px;
    height: 17px;
}

.task-item.done {
    color: var(--text);
}

.task-item.done svg {
    color: var(--teal);
}

.connection-state {
    padding: 18px;
    border-radius: 8px;
    background: var(--surface-soft);
}

.state-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    margin-right: 8px;
    border-radius: 50%;
    background: #f59e0b;
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.16);
}

.state-dot.success {
    background: var(--teal);
    box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.16);
}

.state-dot.failed {
    background: #e11d48;
    box-shadow: 0 0 0 4px rgba(225, 29, 72, 0.14);
}

.state-dot.pending {
    background: #f59e0b;
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.16);
}

.live-indicator {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 0 12px;
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    background: var(--surface);
    color: var(--muted);
    font-size: 13px;
}

.live-indicator em {
    color: var(--text);
    font-style: normal;
}

.realtime-grid .metric-card {
    min-height: 136px;
}

.dashboard-sync-panel {
    margin-top: 16px;
}

.connection-state strong {
    font-size: 15px;
}

.connection-state p {
    margin: 12px 0 0;
    color: var(--muted);
    font-size: 14px;
}

.integration-layout {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 16px;
}

.message-layout {
    display: grid;
    grid-template-columns: minmax(0, 760px);
}

.message-panel {
    min-width: 0;
}

.integration-list {
    display: grid;
    align-content: start;
    gap: 10px;
}

.integration-item {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 14px;
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    background: var(--surface);
    color: var(--text);
    text-decoration: none;
    box-shadow: 0 8px 24px rgba(21, 32, 51, 0.05);
}

.integration-item.active {
    border-color: rgba(15, 118, 110, 0.28);
}

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

.integration-item small {
    margin-top: 3px;
    color: var(--muted);
    font-size: 12px;
}

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

.settings-form {
    display: grid;
    gap: 16px;
}

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

.textarea-shell {
    grid-template-columns: 40px minmax(0, 1fr);
    align-items: start;
    padding-top: 11px;
}

.textarea-shell textarea {
    width: 100%;
    min-width: 0;
    resize: vertical;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--text);
    font-size: 14px;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding-top: 2px;
}

.form-alert {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    padding: 12px;
    border-radius: 8px;
    font-size: 14px;
}

.form-alert svg {
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
}

.form-alert.success {
    border: 1px solid #bbf7d0;
    background: #f0fdf4;
    color: #166534;
}

.form-alert.error {
    border: 1px solid #fecaca;
    background: #fff1f2;
    color: #9f1239;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    background: var(--slate-soft);
    color: var(--slate);
    font-size: 12px;
    font-weight: 750;
}

.status-badge.status-success {
    background: var(--teal-soft);
    color: var(--teal);
}

.status-badge.status-sent {
    background: var(--teal-soft);
    color: var(--teal);
}

.status-badge.status-failed {
    background: #fff1f2;
    color: #9f1239;
}

.status-badge.status-pending {
    background: var(--amber-soft);
    color: var(--amber);
}

.connection-note {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 18px;
    padding: 12px;
    border-radius: 8px;
    background: var(--surface-soft);
    color: var(--muted);
    font-size: 13px;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.data-table th,
.data-table td {
    padding: 13px 12px;
    border-bottom: 1px solid var(--line-soft);
    vertical-align: top;
}

.data-table th {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.data-table td {
    color: var(--text);
}

.data-table td strong,
.data-table td small {
    display: block;
}

.data-table td small {
    margin-top: 3px;
    color: var(--muted);
    font-size: 12px;
}

.data-table td:nth-child(3) {
    max-width: 420px;
}

.empty-state {
    padding: 26px 12px;
    color: var(--muted);
    text-align: center;
}

.toolbar-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.search-form {
    width: min(100%, 520px);
}

.action-row {
    display: flex;
    align-items: center;
    gap: 7px;
    flex-wrap: wrap;
}

.action-row form {
    margin: 0;
}

.icon-button.danger {
    color: #9f1239;
}

.select-shell {
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr);
    align-items: center;
    min-height: 44px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    color: var(--muted);
}

.select-shell svg {
    justify-self: center;
    width: 17px;
    height: 17px;
}

.select-shell select {
    width: 100%;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--text);
    font-size: 14px;
}

.compact-grid {
    align-items: end;
}

.check-row {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    color: var(--text);
    font-size: 14px;
    font-weight: 700;
}

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

.detail-panel {
    display: grid;
    gap: 20px;
}

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

.detail-grid div,
.detail-notes {
    padding: 14px;
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    background: var(--surface-soft);
}

.detail-grid span,
.detail-notes span {
    display: block;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.detail-grid strong {
    display: block;
    margin-top: 5px;
    font-size: 14px;
}

.detail-notes p {
    margin: 8px 0 0;
    color: var(--text);
}

.list-search {
    width: 100%;
    margin-bottom: 14px;
}

.available-list {
    display: grid;
    gap: 9px;
}

.available-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 38px;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    background: var(--surface-soft);
}

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

.available-item small {
    margin-top: 3px;
    color: var(--muted);
    font-size: 12px;
}

.available-item > svg {
    justify-self: center;
    width: 18px;
    height: 18px;
    color: var(--teal);
}

.template-components {
    display: grid;
    gap: 12px;
}

.component-card {
    padding: 14px;
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    background: var(--surface-soft);
}

.component-card span,
.component-card small {
    display: block;
}

.component-card span {
    color: var(--text);
    font-size: 13px;
    font-weight: 800;
}

.component-card small {
    margin-top: 3px;
    color: var(--muted);
    font-size: 12px;
}

.component-card p,
.component-card pre {
    margin: 10px 0 0;
    color: var(--text);
    font-size: 13px;
    line-height: 1.55;
    white-space: pre-wrap;
}

.template-meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-bottom: 16px;
}

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

.campaign-summary div {
    padding: 14px;
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    background: var(--surface-soft);
}

.campaign-summary span,
.campaign-summary strong {
    display: block;
}

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

.campaign-summary strong {
    margin-top: 5px;
    font-size: 15px;
}

.template-variable-box {
    display: grid;
    gap: 12px;
}

.compact-heading {
    margin-bottom: 0;
}

.progress-meter {
    overflow: hidden;
    width: min(210px, 100%);
    height: 8px;
    margin-bottom: 6px;
    border-radius: 999px;
    background: var(--slate-soft);
}

.progress-meter span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--teal);
}

.progress-meter.large {
    width: 100%;
    height: 12px;
    margin: 0;
}

.campaign-metrics {
    margin-bottom: 16px;
}

.campaign-metrics .metric-card {
    min-height: 112px;
}

.campaign-progress-panel {
    margin-bottom: 16px;
}

.system-migration-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-bottom: 16px;
}

.system-migration-metrics .metric-card {
    min-height: 112px;
}

.conversation-shell {
    display: grid;
    grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
    min-height: 680px;
    overflow: hidden;
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.conversation-list-panel {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    border-right: 1px solid var(--line-soft);
    background: var(--surface-soft);
}

.conversation-search {
    padding: 14px;
    border-bottom: 1px solid var(--line-soft);
}

.conversation-list {
    overflow: auto;
}

.conversation-item {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    gap: 10px;
    padding: 13px 14px;
    border-bottom: 1px solid var(--line-soft);
    color: var(--text);
    text-decoration: none;
}

.conversation-item.active,
.conversation-item:hover {
    background: #eef8f6;
}

.conversation-avatar {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 999px;
    background: var(--teal-soft);
    color: var(--teal);
    font-weight: 800;
    text-transform: uppercase;
}

.conversation-avatar.large {
    width: 48px;
    height: 48px;
}

.conversation-summary,
.conversation-meta {
    min-width: 0;
}

.conversation-summary strong,
.conversation-summary small,
.conversation-meta small {
    display: block;
}

.conversation-summary strong {
    overflow: hidden;
    font-size: 14px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.conversation-summary small {
    overflow: hidden;
    margin-top: 4px;
    color: var(--muted);
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.conversation-meta {
    display: grid;
    justify-items: end;
    align-content: start;
    gap: 6px;
}

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

.conversation-meta em {
    display: grid;
    place-items: center;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border-radius: 999px;
    background: var(--teal);
    color: #ffffff;
    font-size: 11px;
    font-style: normal;
    font-weight: 800;
}

.conversation-chat-panel {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    min-width: 0;
    background: #f8fbfb;
}

.conversation-chat-header {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 78px;
    padding: 14px 18px;
    border-bottom: 1px solid var(--line-soft);
    background: var(--surface);
}

.conversation-chat-header div {
    min-width: 0;
    margin-right: auto;
}

.conversation-chat-header strong,
.conversation-chat-header small {
    display: block;
}

.conversation-chat-header small {
    margin-top: 3px;
    color: var(--muted);
}

.conversation-messages {
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow: auto;
    padding: 18px;
}

.conversation-bubble {
    width: min(72%, 620px);
    padding: 11px 12px;
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: 0 8px 20px rgba(21, 32, 51, 0.05);
}

.conversation-bubble.outbound {
    align-self: flex-end;
    border-color: #c9f4ea;
    background: #e7fbf6;
}

.conversation-bubble.inbound {
    align-self: flex-start;
}

.bubble-type {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

.bubble-type svg {
    width: 14px;
    height: 14px;
}

.conversation-bubble p {
    margin: 6px 0;
    font-size: 14px;
    line-height: 1.55;
}

.conversation-bubble small,
.conversation-bubble time {
    display: block;
    color: var(--muted);
    font-size: 11px;
}

.conversation-bubble time {
    text-align: right;
}

.conversation-composer {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 10px;
    align-items: end;
    padding: 14px;
    border-top: 1px solid var(--line-soft);
    background: var(--surface);
}

.conversation-composer textarea {
    min-height: 44px;
    resize: vertical;
}

.composer-tools {
    display: flex;
    gap: 6px;
}

.composer-tools .icon-button:disabled {
    opacity: 0.48;
}

.conversation-empty {
    display: grid;
    place-items: center;
    align-content: center;
    gap: 8px;
    min-height: 100%;
    padding: 32px;
    color: var(--muted);
    text-align: center;
}

.conversation-empty svg {
    width: 36px;
    height: 36px;
    color: var(--teal);
}

.webhook-filter-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
    gap: 12px;
    align-items: end;
}

.webhook-filter-actions {
    padding-bottom: 1px;
}

.webhook-log-table td:nth-child(6) {
    max-width: 460px;
}

.payload-details summary {
    color: var(--teal);
    cursor: pointer;
    font-size: 13px;
    font-weight: 800;
}

.payload-details pre {
    max-height: 260px;
    overflow: auto;
    margin: 10px 0 0;
    padding: 12px;
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    background: #0f172a;
    color: #dbeafe;
    font-size: 12px;
    white-space: pre-wrap;
}

.crm-metrics {
    margin-bottom: 16px;
}

.crm-metrics .metric-card {
    min-height: 112px;
}

.crm-workspace {
    align-items: start;
    margin-bottom: 16px;
}

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

.tag-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

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

.crm-chart-row {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr) 42px;
    gap: 10px;
    align-items: center;
}

.crm-chart-row span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.crm-chart-row div {
    overflow: hidden;
    height: 10px;
    border-radius: 999px;
    background: var(--slate-soft);
}

.crm-chart-row em {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--teal);
}

.crm-chart-row strong {
    text-align: right;
}

.crm-feed-item {
    grid-template-columns: minmax(0, 1fr) 28px;
}

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

.crm-timeline-item {
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr);
    gap: 10px;
}

.crm-timeline-item > span {
    width: 10px;
    height: 10px;
    margin-top: 7px;
    border-radius: 999px;
    background: var(--teal);
    box-shadow: 0 0 0 4px var(--teal-soft);
}

.crm-timeline-item strong,
.crm-timeline-item small {
    display: block;
}

.crm-timeline-item p {
    margin: 4px 0;
    color: var(--text);
}

.crm-timeline-item small {
    color: var(--muted);
    font-size: 12px;
}

@media (max-width: 1080px) {
    .app-shell {
        grid-template-columns: 86px minmax(0, 1fr);
    }

    .brand span:last-child,
    .sidebar .nav-link span,
    .sidebar-footer span {
        display: none;
    }

    .sidebar {
        align-items: center;
        padding-inline: 14px;
    }

    .sidebar .nav-link {
        justify-content: center;
        width: 48px;
        padding-inline: 0;
    }

    .sidebar .nav-link.sub-link {
        margin-left: 0;
    }

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

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

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

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

@media (max-width: 760px) {
    .app-shell {
        display: block;
    }

    .sidebar {
        position: static;
        flex-direction: row;
        align-items: center;
        width: 100%;
        height: auto;
        padding: 12px;
    }

    .brand {
        padding: 0;
    }

    .sidebar-nav {
        display: flex;
        margin: 0 0 0 auto;
    }

    .sidebar-footer {
        display: none;
    }

    .topbar {
        min-height: 76px;
        padding: 18px;
    }

    .topbar h1 {
        font-size: 21px;
    }

    .content {
        padding: 24px 18px 34px;
    }

    .dashboard-hero,
    .workspace-grid,
    .integration-layout,
    .message-layout {
        display: grid;
        grid-template-columns: 1fr;
    }

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

    .form-actions {
        justify-content: stretch;
        flex-direction: column;
    }

    .toolbar-row {
        display: block;
    }

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

    .campaign-summary {
        grid-template-columns: 1fr;
    }

    .dashboard-hero h2 {
        font-size: 25px;
    }

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

    .conversation-shell,
    .conversation-chat-panel {
        display: grid;
        grid-template-columns: 1fr;
    }

    .conversation-list-panel {
        max-height: 340px;
        border-right: 0;
        border-bottom: 1px solid var(--line-soft);
    }

    .conversation-bubble {
        width: min(92%, 620px);
    }

    .conversation-composer {
        grid-template-columns: 1fr;
    }

    .composer-tools {
        order: -1;
    }

    .webhook-filter-grid {
        grid-template-columns: 1fr;
    }
}

.auth-page {
    background: var(--bg);
}

.auth-shell {
    display: grid;
    min-height: 100vh;
    place-items: center;
    padding: 24px;
}

.auth-card {
    width: min(100%, 420px);
    padding: 30px;
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.auth-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--text);
    text-decoration: none;
}

.auth-brand .brand-mark {
    border-color: var(--line-soft);
    background: var(--teal-soft);
    color: var(--teal);
}

.auth-brand strong,
.auth-brand small {
    display: block;
    line-height: 1.1;
}

.auth-brand strong {
    font-size: 16px;
}

.auth-brand small {
    margin-top: 4px;
    color: var(--muted);
    font-size: 12px;
}

.auth-heading {
    margin: 30px 0 22px;
}

.auth-heading h1 {
    margin: 6px 0 8px;
    font-size: 26px;
    font-weight: 780;
}

.auth-heading p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
}

.auth-alert {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    padding: 12px;
    border: 1px solid #fecaca;
    border-radius: 8px;
    background: #fff1f2;
    color: #9f1239;
    font-size: 14px;
}

.auth-alert svg {
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
}

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

.field-group {
    display: grid;
    gap: 7px;
    color: var(--text);
    font-size: 13px;
    font-weight: 700;
}

.input-shell {
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr);
    align-items: center;
    min-height: 44px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    color: var(--muted);
    transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.input-shell:focus-within {
    border-color: rgba(15, 118, 110, 0.55);
    box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.1);
}

.input-shell svg {
    justify-self: center;
    width: 17px;
    height: 17px;
}

.input-shell input {
    width: 100%;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--text);
    font-size: 14px;
}

.auth-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    margin-top: 4px;
    border: 1px solid #0f766e;
    border-radius: 8px;
    background: #0f766e;
    color: #ffffff;
    font-size: 14px;
    font-weight: 750;
}

.auth-button svg {
    width: 17px;
    height: 17px;
}

@media (max-width: 520px) {
    .auth-shell {
        padding: 16px;
    }

    .auth-card {
        padding: 24px;
    }
}

.public-page {
    background: var(--bg);
}

.install-page {
    background: var(--bg);
}

.install-shell {
    display: grid;
    min-height: 100vh;
    place-items: center;
    padding: 24px;
}

.install-card {
    width: min(100%, 720px);
    padding: 30px;
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.install-section {
    display: grid;
    gap: 10px;
    margin-bottom: 18px;
}

.install-section h2 {
    margin: 0;
    font-size: 16px;
    font-weight: 780;
}

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

.requirement-item {
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    min-height: 42px;
    padding: 10px 12px;
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    background: var(--surface-soft);
    font-size: 13px;
}

.requirement-item svg {
    width: 17px;
    height: 17px;
}

.requirement-item.ok svg {
    color: var(--teal);
}

.requirement-item.fail svg {
    color: #9f1239;
}

.requirement-item strong {
    color: var(--muted);
    font-weight: 700;
    text-align: right;
}

.public-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    width: min(1120px, calc(100% - 36px));
    margin: 0 auto;
    padding: 22px 0;
}

.public-nav {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.public-nav a {
    min-height: 34px;
    padding: 8px 10px;
    border-radius: 8px;
    color: var(--muted);
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
}

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

.public-main {
    width: min(960px, calc(100% - 36px));
    margin: 0 auto;
    padding: 38px 0 56px;
}

.public-hero {
    margin-bottom: 24px;
}

.public-hero h1 {
    margin: 8px 0 10px;
    font-size: 38px;
    font-weight: 790;
}

.public-hero p {
    max-width: 720px;
    margin: 0;
    color: var(--muted);
    font-size: 16px;
}

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

.public-card {
    padding: 24px;
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.public-card > svg {
    width: 24px;
    height: 24px;
    margin-bottom: 14px;
    color: var(--teal);
}

.public-card h2 {
    margin: 0 0 10px;
    font-size: 20px;
    font-weight: 760;
}

.public-card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.65;
}

.legal-content {
    display: grid;
    gap: 18px;
}

.legal-content h2 {
    margin: 0;
    font-size: 19px;
}

.legal-content p {
    margin: 0;
}

.legal-content a,
.contact-card a {
    color: var(--teal);
    font-weight: 750;
    text-decoration: none;
}

.contact-card {
    display: grid;
    gap: 14px;
}

.contact-row {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 12px;
    align-items: start;
    padding: 14px;
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    background: var(--surface-soft);
}

.contact-row svg {
    width: 20px;
    height: 20px;
    color: var(--teal);
}

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

.contact-row span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.contact-row strong {
    margin-top: 4px;
    font-size: 15px;
    line-height: 1.5;
}

.public-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    flex-wrap: wrap;
    width: min(1120px, calc(100% - 36px));
    margin: 0 auto;
    padding: 24px 0 34px;
    border-top: 1px solid var(--line-soft);
    color: var(--muted);
    font-size: 13px;
}

.button-row,
.table-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.button-row form,
.table-actions form {
    margin: 0;
}

.soft-button.compact {
    min-height: 34px;
    padding: 7px 10px;
    font-size: 12px;
}

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

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

.form-field {
    display: grid;
    gap: 7px;
    min-width: 0;
    color: var(--text);
    font-size: 13px;
    font-weight: 760;
}

.form-field input,
.form-field select,
.form-field textarea {
    width: 100%;
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    color: var(--text);
    font-size: 14px;
    outline: 0;
    transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.form-field input,
.form-field select {
    min-height: 42px;
    padding: 0 12px;
}

.form-field textarea {
    padding: 12px;
    resize: vertical;
    line-height: 1.55;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
    border-color: rgba(15, 118, 110, 0.55);
    box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.1);
}

.form-field small {
    color: var(--muted);
    font-size: 12px;
    font-weight: 650;
}

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

.segmented-field label {
    display: flex;
    align-items: center;
    gap: 9px;
    min-height: 42px;
    padding: 0 12px;
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    background: var(--surface-soft);
    color: var(--text);
    font-size: 13px;
    font-weight: 760;
}

.template-designer-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 18px;
    align-items: start;
}

.template-designer-panel,
.template-preview-column {
    min-width: 0;
}

.template-preview-column {
    display: grid;
    gap: 18px;
    position: sticky;
    top: 18px;
}

.designer-step {
    display: grid;
    gap: 14px;
    padding-bottom: 20px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--line-soft);
}

.designer-step:last-child {
    margin-bottom: 0;
}

.designer-step > span,
.compact-step > span {
    color: var(--teal);
    font-size: 11px;
    font-weight: 850;
    letter-spacing: 0;
    text-transform: uppercase;
}

.designer-step h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 790;
}

.designer-step p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.6;
}

.template-variable-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.template-button-grid {
    display: grid;
    gap: 12px;
}

.template-button-row {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr) minmax(0, 1fr) 170px;
    gap: 10px;
    padding: 12px;
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    background: var(--surface-soft);
}

.template-preview-grid {
    display: grid;
    gap: 14px;
}

.template-desktop-preview,
.template-phone-preview {
    display: grid;
    gap: 10px;
}

.template-desktop-preview > span,
.template-phone-preview > span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.template-phone-preview {
    width: min(100%, 250px);
    min-height: 430px;
    padding: 42px 14px 16px;
    margin: 0 auto;
    border: 1px solid var(--line);
    border-radius: 28px;
    background: linear-gradient(180deg, #f8fafc 0%, #eef6f4 100%);
    box-shadow: 0 22px 54px rgba(21, 32, 51, 0.12);
}

.template-desktop-preview {
    padding: 14px;
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    background: #f8fafc;
}

.template-preview-bubble {
    display: grid;
    gap: 9px;
    max-width: 100%;
    padding: 13px;
    border-radius: 8px;
    background: #ffffff;
    color: var(--text);
    box-shadow: 0 8px 28px rgba(21, 32, 51, 0.08);
    font-size: 14px;
    line-height: 1.5;
}

.template-preview-bubble strong,
.template-preview-bubble em,
.template-preview-bubble p,
.template-preview-bubble small {
    display: block;
    margin: 0;
    overflow-wrap: anywhere;
}

.template-preview-bubble strong {
    font-size: 15px;
}

.template-preview-bubble em,
.template-preview-bubble small {
    color: var(--muted);
}

.preview-buttons {
    display: grid;
    gap: 6px;
    padding-top: 4px;
}

.preview-buttons button {
    min-height: 34px;
    border: 1px solid rgba(15, 118, 110, 0.18);
    border-radius: 8px;
    background: #f0fdfa;
    color: var(--teal);
    font-size: 13px;
    font-weight: 760;
}

.validation-list,
.validation-server-list {
    display: grid;
    gap: 8px;
}

.validation-list span,
.validation-server-list span {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 34px;
    padding: 8px 10px;
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    background: var(--surface-soft);
    color: var(--muted);
    font-size: 13px;
    font-weight: 720;
}

.validation-list svg,
.validation-server-list svg {
    width: 17px;
    height: 17px;
}

.validation-list .ok {
    color: #166534;
}

.validation-list .fail,
.validation-server-list span {
    color: #9f1239;
}

.template-editor-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.template-editor-actions form {
    margin: 0;
}

.template-history {
    display: grid;
    gap: 10px;
    max-height: 420px;
    overflow: auto;
}

.template-history article {
    padding: 12px;
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    background: var(--surface-soft);
}

.template-history strong,
.template-history p,
.template-history small {
    display: block;
}

.template-history strong {
    font-size: 13px;
    text-transform: uppercase;
}

.template-history p {
    margin: 5px 0;
    color: var(--text);
    font-size: 13px;
}

.template-history small {
    color: var(--muted);
    font-size: 12px;
}

.status-badge.status-approved {
    background: var(--teal-soft);
    color: var(--teal);
}

.status-badge.status-rejected,
.status-badge.status-invalid {
    background: #fff1f2;
    color: #9f1239;
}

.status-badge.status-draft {
    background: var(--slate-soft);
    color: var(--slate);
}

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

.media-summary-card {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    min-height: 72px;
    padding: 14px;
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    background: var(--surface);
    color: var(--text);
    text-decoration: none;
    box-shadow: 0 8px 24px rgba(21, 32, 51, 0.05);
}

.media-summary-card.active,
.media-summary-card:hover {
    border-color: rgba(15, 118, 110, 0.28);
    color: var(--text);
}

.media-summary-card svg {
    width: 21px;
    height: 21px;
    color: var(--teal);
}

.media-summary-card span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 760;
}

.media-summary-card strong {
    font-size: 20px;
    font-weight: 820;
}

.media-admin-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 18px;
}

.inline-create-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 42px;
    gap: 10px;
}

.media-filter-form {
    display: grid;
    grid-template-columns: minmax(220px, 1.4fr) minmax(160px, 0.8fr) minmax(180px, 0.9fr) minmax(180px, 0.9fr) auto;
    gap: 10px;
    width: 100%;
}

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

.media-card {
    display: grid;
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: 0 8px 24px rgba(21, 32, 51, 0.05);
}

.media-preview {
    display: grid;
    min-height: 210px;
    max-height: 210px;
    place-items: center;
    overflow: hidden;
    border-bottom: 1px solid var(--line-soft);
    background: #f8fafc;
}

.media-preview img,
.media-preview video,
.media-preview iframe {
    width: 100%;
    height: 210px;
    border: 0;
    object-fit: cover;
}

.media-preview iframe {
    background: #ffffff;
}

.media-icon-preview {
    display: grid;
    gap: 12px;
    place-items: center;
    width: 100%;
    height: 210px;
    padding: 18px;
    color: var(--muted);
}

.media-icon-preview svg {
    width: 42px;
    height: 42px;
    color: var(--teal);
}

.media-icon-preview audio {
    width: min(100%, 260px);
}

.media-icon-preview span {
    font-size: 13px;
    font-weight: 820;
    text-transform: uppercase;
}

.media-card-body {
    display: grid;
    gap: 10px;
    padding: 14px;
}

.media-card-body strong,
.media-card-body small {
    display: block;
    overflow-wrap: anywhere;
}

.media-card-body strong {
    color: var(--text);
    font-size: 15px;
    font-weight: 790;
}

.media-card-body small {
    margin-top: 3px;
    color: var(--muted);
    font-size: 12px;
}

.media-meta-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    color: var(--muted);
    font-size: 12px;
    font-weight: 720;
}

.media-empty {
    grid-column: 1 / -1;
    display: grid;
    gap: 8px;
    place-items: center;
}

.media-empty svg {
    width: 30px;
    height: 30px;
    color: var(--muted);
}

.automation-form {
    gap: 20px;
}

.automation-builder-section {
    display: grid;
    gap: 14px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--line-soft);
}

.automation-builder-section:last-of-type {
    border-bottom: 0;
}

.automation-row-grid {
    display: grid;
    gap: 12px;
    align-items: end;
}

.automation-row-grid.trigger-row,
.automation-row-grid.action-config-row {
    grid-template-columns: minmax(220px, 0.8fr) minmax(0, 1.2fr);
}

.automation-row-grid.condition-row {
    grid-template-columns: minmax(190px, 1fr) minmax(160px, 0.7fr) minmax(180px, 1fr);
}

.automation-summary-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
    gap: 16px;
    margin-bottom: 18px;
}

.definition-list {
    display: grid;
    gap: 10px;
    margin: 0;
}

.definition-list div {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr);
    gap: 12px;
    padding: 11px 0;
    border-bottom: 1px solid var(--line-soft);
}

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

.definition-list dt {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.definition-list dd {
    margin: 0;
    color: var(--text);
    font-size: 14px;
    font-weight: 720;
}

.muted-copy {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.65;
}

.automation-flow-view {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.automation-view-column {
    display: grid;
    align-content: start;
    gap: 10px;
    min-width: 0;
}

.automation-view-column h4 {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
    font-weight: 850;
    text-transform: uppercase;
}

.automation-view-column article {
    display: grid;
    gap: 5px;
    padding: 12px;
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    background: var(--surface-soft);
}

.automation-view-column strong,
.automation-view-column small {
    display: block;
    overflow-wrap: anywhere;
}

.automation-view-column strong {
    color: var(--text);
    font-size: 14px;
}

.automation-view-column small {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.5;
}

.status-badge.status-paused,
.status-badge.status-skipped {
    background: var(--amber-soft);
    color: var(--amber);
}

.status-badge.status-archived,
.status-badge.status-failed {
    background: #fff1f2;
    color: #9f1239;
}

.automation-visual-builder {
    display: grid;
    gap: 18px;
}

.automation-builder-head {
    display: grid;
    gap: 14px;
}

.automation-state-line {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.automation-canvas {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) 34px minmax(260px, 1.12fr) 34px minmax(260px, 1.12fr);
    gap: 0;
    align-items: start;
}

.automation-stage {
    display: grid;
    gap: 12px;
    min-width: 0;
    padding: 16px;
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: 0 8px 24px rgba(21, 32, 51, 0.05);
}

.automation-stage header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: var(--text);
}

.automation-stage header span {
    color: var(--teal);
    font-size: 12px;
    font-weight: 850;
    letter-spacing: 0;
}

.automation-stage header svg {
    width: 18px;
    height: 18px;
    color: var(--teal);
}

.automation-connector {
    position: relative;
    height: 2px;
    margin-top: 64px;
    background: var(--line);
}

.automation-connector::before,
.automation-connector::after {
    position: absolute;
    top: 50%;
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: var(--teal);
    content: "";
    transform: translateY(-50%);
}

.automation-connector::before {
    left: -1px;
}

.automation-connector::after {
    right: -1px;
}

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

.automation-block {
    display: grid;
    gap: 12px;
    padding: 13px;
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    background: var(--surface-soft);
}

.automation-block-title {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.automation-block-title strong,
.automation-block-title small {
    display: block;
}

.automation-block-title strong {
    color: var(--text);
    font-size: 14px;
}

.automation-block-title small {
    margin-top: 2px;
    color: var(--muted);
    font-size: 12px;
}

.automation-block-tools {
    display: flex;
    gap: 5px;
    flex: 0 0 auto;
}

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

.automation-builder-footer {
    display: grid;
    gap: 14px;
    padding: 16px;
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    background: var(--surface);
}

.status-badge.status-error {
    background: #fff1f2;
    color: #9f1239;
}

@media (max-width: 760px) {
    .install-card {
        padding: 24px;
    }

    .requirement-item {
        grid-template-columns: 22px minmax(0, 1fr);
    }

    .requirement-item strong {
        grid-column: 2;
        text-align: left;
    }

    .public-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .public-nav {
        justify-content: flex-start;
    }

    .public-hero h1 {
        font-size: 30px;
    }

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

    .button-row,
    .template-editor-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .button-row .soft-button,
    .button-row form,
    .button-row button,
    .template-editor-actions .soft-button,
    .template-editor-actions form,
    .template-editor-actions button {
        width: 100%;
    }

    .form-grid,
    .form-grid.two,
    .form-grid.three,
    .segmented-field,
    .template-designer-grid,
    .template-button-row,
    .media-summary-grid,
    .media-admin-grid,
    .media-filter-form,
    .media-grid,
    .automation-row-grid.trigger-row,
    .automation-row-grid.action-config-row,
    .automation-row-grid.condition-row,
    .automation-summary-grid,
    .automation-flow-view,
    .definition-list div,
    .automation-canvas {
        grid-template-columns: 1fr;
    }

    .automation-connector {
        width: 2px;
        height: 28px;
        margin: 0 auto;
    }

    .automation-connector::before,
    .automation-connector::after {
        left: 50%;
        transform: translateX(-50%);
    }

    .automation-connector::before {
        top: -1px;
    }

    .automation-connector::after {
        top: auto;
        bottom: -1px;
    }

    .template-preview-column {
        position: static;
    }
}
