@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');
:root {
    --bg:#f5f7fb;
    --card:#fff;
    --text:#142137;
    --muted:#778399;
    --line:#e9edf3;
    --green:#11ba86;
    --green-dark:#0d9e72;
    --nav:#111a2c;
    --nav-light:#1b2940;
    --danger:#e44859;
    --violet:#8066e8;
    --shadow:0 12px 40px rgba(26,43,70,.045);
}
* {
    box-sizing:border-box;
}
html {
    scroll-behavior:smooth;
}
body {
    margin:0;
    font-family:'DM Sans',Arial,sans-serif;
    background:var(--bg);
    color:var(--text);
    font-size:14px;
}
button,input,textarea,select {
    font:inherit;
}
button {
    cursor:pointer;
}
button:disabled {
    opacity:.55;
    cursor:not-allowed;
}
a {
    color:inherit;
    text-decoration:none;
}
p {
    line-height:1.55;
}
h1,h2,h3,h4 {
    font-family:'Plus Jakarta Sans',Arial,sans-serif;
    letter-spacing:-.035em;
}
h1,h2,h3,h4,p {
    margin-top:0;
}
.muted {
    color:var(--muted);
}
.small {
    font-size:12px;
}
.strong {
    font-weight:800;
}
.hidden,[hidden] {
    display:none!important;
}
.app-shell {
    display:flex;
    min-height:100vh;
}
.sidebar {
    background:var(--nav);
    width:255px;
    flex:none;
    min-height:100vh;
    color:#bac5d4;
    position:fixed;
    inset:0 auto 0 0;
    display:flex;
    flex-direction:column;
    z-index:20;
    padding:0 14px;
    overflow-y:auto;
    scrollbar-width:thin;
}
.sidebar-header {
    height:86px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    padding:0 13px;
}
.brand,.auth-brand,.auth-mobile-brand {
    display:flex;
    align-items:center;
    gap:11px;
    font-size:21px;
    font-weight:800;
    letter-spacing:-.7px;
    color:#fff;
    font-family:'Plus Jakarta Sans',sans-serif;
}
.brand-symbol {
    width:37px;
    height:37px;
    display:grid;
    place-items:center;
    background:linear-gradient(145deg,#18d2a1,#0aac84);
    border-radius:12px;
    color:white;
    font-size:24px;
    font-weight:800;
    letter-spacing:-4px;
    padding-right:5px;
    box-shadow:0 6px 18px #15ba8930;
}
.brand-dot {
    color:#b7ffe9;
}
.workspace-pill {
    background:#1b2940;
    border:1px solid #2b3a52;
    display:flex;
    align-items:center;
    gap:11px;
    border-radius:11px;
    padding:12px 10px;
    margin-bottom:27px;
}
.workspace-logo {
    width:34px;
    height:34px;
    display:grid;
    place-items:center;
    border-radius:10px;
    background:#465b83;
    color:#fff;
    font-size:16px;
    font-weight:800;
}
.workspace-meta {
    min-width:0;
    flex:1;
}
.workspace-meta strong,.workspace-meta small {
    display:block;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
}
.workspace-meta strong {
    color:white;
    font-size:12px;
}
.workspace-meta small {
    color:#94a4ba;
    font-size:11px;
    margin-top:4px;
}
.workspace-chevron {
    color:#94a4ba;
    font-size:20px;
}
.nav-label {
    padding:0 15px;
    margin-bottom:11px;
    font-size:10px;
    font-weight:800;
    letter-spacing:1.35px;
    color:#6f8098;
}
.nav-list {
    display:flex;
    flex-direction:column;
    gap:5px;
}
.nav-item {
    border:0;
    width:100%;
    display:flex;
    align-items:center;
    gap:13px;
    padding:12px 14px;
    border-radius:9px;
    text-align:left;
    background:transparent;
    color:#a5b2c4;
    font-weight:600;
    font-size:13px;
    transition:.2s;
}
.nav-item svg {
    width:18px;
    height:18px;
    flex:none;
}
.nav-item:hover {
    background:#1a2a42;
    color:white;
}
.nav-item.active {
    background:#183d3d;
    color:#41e5ad;
}
.nav-item.active::after {
    content:'';
    width:5px;
    height:5px;
    border-radius:50%;
    background:#29d69e;
    margin-left:auto;
}
.sidebar-bottom {
    margin-top:auto;
    padding-top:30px;
    padding-bottom:19px;
}
.sidebar-help {
    background:linear-gradient(135deg,#1b3d42,#19334b 70%);
    border:1px solid #2d4c54;
    border-radius:14px;
    padding:17px;
    margin-bottom:22px;
}
.help-icon {
    display:block;
    color:#6df5c9;
    font-size:23px;
    margin-bottom:10px;
}
.sidebar-help strong {
    display:block;
    color:#f5fffc;
    font-size:12px;
}
.sidebar-help p {
    font-size:11px;
    color:#b1c7cb;
    line-height:1.65;
    margin:7px 0 15px;
}
.btn-help {
    background:#22ce9d!important;
    color:#09261e!important;
    width:100%;
    font-weight:800;
}
.profile-button {
    border:0;
    border-top:1px solid #29374b;
    background:none;
    width:100%;
    padding:18px 5px 0;
    display:flex;
    align-items:center;
    gap:10px;
    text-align:left;
    color:#fff;
}
.profile-avatar,.top-user {
    height:36px;
    width:36px;
    display:grid;
    place-items:center;
    background:linear-gradient(135deg,#fcbb8a,#f48f70);
    color:#663c2c;
    border-radius:50%;
    font-size:11px;
    font-weight:800;
    flex:none;
}
.profile-button>span:nth-child(2) {
    min-width:0;
    flex:1;
}
.profile-button strong,.profile-button small {
    display:block;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
}
.profile-button strong {
    font-size:12px;
}
.profile-button small {
    font-size:11px;
    margin-top:4px;
    color:#91a1b7;
}
.profile-dots {
    font-size:20px;
    color:#a1b2c6;
}
.close-sidebar {
    display:none!important;
}
.app-main {
    margin-left:255px;
    flex:1;
    min-width:0;
}
.topbar {
    height:79px;
    background:white;
    border-bottom:1px solid var(--line);
    display:flex;
    align-items:center;
    justify-content:space-between;
    padding:0 38px;
    position:sticky;
    top:0;
    z-index:10;
}
.topbar-left,.topbar-right,.breadcrumb {
    display:flex;
    align-items:center;
}
.topbar-right {
    gap:20px;
}
.breadcrumb {
    gap:14px;
    font-size:13px;
    color:#8995a7;
}
.breadcrumb strong {
    color:#263751;
    font-weight:700;
}
.crumb-divider {
    color:#cbd4e0;
}
.top-divider {
    height:24px;
    width:1px;
    background:#edf0f4;
}
.live-pill {
    display:flex;
    align-items:center;
    gap:8px;
    font-size:12px;
    color:#8a97a7;
    background:#f6f8fa;
    border:1px solid #eef1f5;
    border-radius:24px;
    padding:9px 13px;
    white-space:nowrap;
}
.status-dot {
    width:7px;
    height:7px;
    border-radius:50%;
    background:#e6a464;
}
.status-dot.connected {
    background:#14bd87;
    box-shadow:0 0 0 3px #e0f8ee;
}
.hamburger {
    display:none!important;
}
.page-content {
    padding:35px 38px 65px;
    max-width:1600px;
    margin:0 auto;
}
.page-head {
    display:flex;
    justify-content:space-between;
    align-items:flex-start;
    gap:20px;
    margin-bottom:27px;
}
.page-heading {
    font-size:26px;
    line-height:1.3;
    margin:3px 0 8px;
    font-weight:800;
}
.page-sub {
    color:#8491a2;
    margin:0;
    font-size:13px;
}
.page-actions {
    display:flex;
    align-items:center;
    gap:10px;
    flex-wrap:wrap;
}
.eyebrow {
    color:var(--green-dark);
    font-weight:800;
    letter-spacing:1.7px;
    font-size:10px;
}
.eyebrow.light {
    color:#8af5d7;
}
.btn {
    background:white;
    color:#33435a;
    border:1px solid #e2e8f0;
    border-radius:9px;
    padding:10px 16px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:9px;
    font-weight:700;
    font-size:12px;
    line-height:1.45;
    min-height:39px;
    white-space:nowrap;
    transition:background .2s,transform .15s,box-shadow .2s;
}
.btn:hover {
    background:#f5f8fa;
}
.btn:active {
    transform:translateY(1px);
}
.btn-primary {
    background:var(--green);
    border-color:var(--green);
    color:white;
    box-shadow:0 5px 14px #11ba8626;
}
.btn-primary:hover {
    background:var(--green-dark);
    border-color:var(--green-dark);
}
.btn-dark {
    background:#17283c;
    color:white;
    border-color:#17283c;
}
.btn-dark:hover {
    background:#253d56;
}
.btn-danger {
    background:#fff5f5;
    border-color:#f8e1e4;
    color:#d83c54;
}
.btn-small {
    padding:7px 11px;
    min-height:31px;
    font-size:11px;
}
.btn-block {
    display:flex;
    width:100%;
}
.btn-ghost {
    background:#f7f9fc;
    border-color:#edf1f6;
}
.icon-btn {
    border:none;
    background:transparent;
    color:inherit;
    padding:8px;
    display:inline-grid;
    place-items:center;
    border-radius:8px;
}
.icon-btn:hover {
    background:#f3f6fa;
}
.icon-btn svg {
    width:18px;
    height:18px;
}
.card {
    border:1px solid #edf0f4;
    border-radius:15px;
    background:white;
    box-shadow:var(--shadow);
}
.card-pad {
    padding:23px;
}
.card-head {
    padding:23px 25px 0;
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:15px;
}
.card-head h3 {
    font-size:14px;
    margin:0 0 6px;
    letter-spacing:-.015em;
}
.card-head p {
    font-size:12px;
    color:#94a0ae;
    margin:0;
}
.card-body {
    padding:23px 25px;
}
.grid-4 {
    display:grid;
    grid-template-columns:repeat(4,minmax(0,1fr));
    gap:17px;
}
.grid-2 {
    display:grid;
    grid-template-columns:1.35fr 1fr;
    gap:17px;
}
.metric {
    padding:21px;
    position:relative;
    min-height:154px;
}
.metric-top {
    display:flex;
    justify-content:space-between;
    align-items:center;
    color:#738097;
    font-size:12px;
    font-weight:600;
}
.metric-icon {
    width:39px;
    height:39px;
    display:grid;
    place-items:center;
    border-radius:11px;
    background:#e5f9f3;
    color:#13b887;
}
.metric-icon svg {
    width:19px;
    height:19px;
}
.metric-icon.blue {
    background:#edf2ff;
    color:#6886eb;
}
.metric-icon.purple {
    background:#f0ecff;
    color:#9074e7;
}
.metric-icon.orange {
    background:#fff5ea;
    color:#eaa15d;
}
.metric-value {
    font-family:'Plus Jakarta Sans',sans-serif;
    font-size:30px;
    font-weight:800;
    letter-spacing:-1px;
    margin:14px 0 8px;
}
.metric-foot {
    display:flex;
    gap:7px;
    align-items:center;
    font-size:11px;
    color:#99a5b3;
}
.metric-foot .positive {
    color:#11b484;
    background:#e4f8f0;
    border-radius:4px;
    padding:2px 5px;
    font-weight:800;
}
.welcome-banner {
    position:relative;
    overflow:hidden;
    background:linear-gradient(105deg,#0d705e,#119a7b 66%,#23bb88);
    border-radius:16px;
    padding:28px 31px;
    margin-bottom:25px;
    min-height:184px;
    color:white;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:18px;
}
.welcome-banner:before {
    content:'';
    position:absolute;
    width:260px;
    height:260px;
    border:52px solid #ffffff10;
    border-radius:50%;
    right:40px;
    top:-120px;
}
.welcome-banner:after {
    content:'';
    position:absolute;
    width:230px;
    height:230px;
    border:40px solid #ffffff0a;
    border-radius:50%;
    right:-100px;
    bottom:-160px;
}
.welcome-banner h2 {
    font-size:24px;
    line-height:1.3;
    margin:10px 0 9px;
    letter-spacing:-.7px;
}
.welcome-banner p {
    margin:0;
    color:#d7fff4;
    max-width:480px;
    font-size:13px;
}
.welcome-banner .banner-actions {
    position:relative;
    z-index:1;
    display:flex;
    gap:10px;
    flex-wrap:wrap;
}
.btn-white {
    color:#0f8166;
    border-color:white;
    background:white;
}
.btn-outline-white {
    background:#ffffff11;
    color:white;
    border-color:#ffffff77;
}
.btn-outline-white:hover {
    background:#ffffff2d;
}
.section-gap {
    margin-top:19px;
}
.chart-area {
    height:242px;
    position:relative;
    margin:0 5px 9px;
}
.chart-svg {
    width:100%;
    height:100%;
    overflow:visible;
}
.chart-grid {
    stroke:#eaf0f5;
    stroke-width:1;
    stroke-dasharray:4 5;
}
.chart-axis {
    fill:#9aa7b6;
    font-size:10px;
}
.chart-legend {
    display:flex;
    gap:15px;
    align-items:center;
    font-size:11px;
    color:#8391a2;
}
.legend-dot {
    width:8px;
    height:8px;
    border-radius:50%;
    display:inline-block;
    margin-right:5px;
    background:var(--green);
}
.legend-dot.secondary {
    background:#7b8df0;
}
.activity {
    display:flex;
    flex-direction:column;
}
.activity-row {
    display:flex;
    align-items:center;
    gap:11px;
    padding:12px 0;
    border-bottom:1px solid #f0f2f6;
}
.activity-row:last-child {
    border-bottom:none;
}
.avatar {
    width:38px;
    height:38px;
    border-radius:12px;
    flex:none;
    display:grid;
    place-items:center;
    font-weight:800;
    font-size:12px;
    background:#e4f5ed;
    color:#26ab84;
}
.avatar:nth-child(3n) {
    background:#efeafd;
    color:#876ce4;
}
.activity-text {
    min-width:0;
    flex:1;
}
.activity-text strong {
    font-size:12px;
}
.activity-text p {
    font-size:11px;
    color:#8c9bad;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
    margin:5px 0 0;
}
.activity-time {
    font-size:10px;
    color:#a0acbb;
    white-space:nowrap;
}
.table-card {
    overflow:hidden;
}
.table-tools {
    padding:18px 20px;
    display:flex;
    align-items:center;
    gap:12px;
    justify-content:space-between;
    border-bottom:1px solid var(--line);
    flex-wrap:wrap;
}
.search-wrap {
    position:relative;
    max-width:320px;
    width:100%;
}
.search-wrap svg {
    width:15px;
    height:15px;
    position:absolute;
    top:12px;
    left:12px;
    color:#9ca8b7;
}
.input,.select,.textarea {
    width:100%;
    color:#263751;
    border:1px solid #e2e8f0;
    border-radius:9px;
    background:#fff;
    padding:11px 12px;
    outline:none;
    transition:border-color .2s,box-shadow .2s;
}
.input:focus,.select:focus,.textarea:focus {
    border-color:#31be95;
    box-shadow:0 0 0 3px #18c19416;
}
.search-wrap .input {
    padding-left:35px;
    background:#f8fafc;
}
.select {
    cursor:pointer;
}
.textarea {
    min-height:104px;
    resize:vertical;
}
.field-label {
    display:block;
    font-size:12px;
    font-weight:700;
    margin:16px 0 8px;
    color:#39475e;
}
.field-hint {
    font-size:11px;
    color:#91a0b0;
    margin-top:6px;
}
.check-line {
    display:flex;
    align-items:center;
    gap:9px;
    color:#58667a;
    margin:15px 0;
    font-size:12px;
}
.check-line input {
    accent-color:var(--green);
    height:16px;
    width:16px;
}
.table-scroll {
    width:100%;
    overflow:auto;
}
table {
    border-collapse:collapse;
    width:100%;
    text-align:left;
}
th {
    font-size:10px;
    letter-spacing:.8px;
    text-transform:uppercase;
    color:#8c9bae;
    font-weight:800;
    background:#fafbfd;
    padding:15px 20px;
    white-space:nowrap;
}
td {
    padding:14px 20px;
    border-top:1px solid #eff2f5;
    color:#59677b;
    font-size:12px;
    white-space:nowrap;
}
td strong {
    color:#26364b;
}
td .cell-sub {
    font-size:11px;
    color:#9aa5b4;
    margin-top:4px;
}
.contact-cell {
    display:flex;
    align-items:center;
    gap:11px;
}
.contact-cell .avatar {
    height:35px;
    width:35px;
}
.badge {
    display:inline-flex;
    align-items:center;
    gap:5px;
    border-radius:6px;
    padding:5px 9px;
    font-size:10px;
    font-weight:800;
    letter-spacing:.15px;
    white-space:nowrap;
}
.badge.green {
    background:#e8f8ef;
    color:#0b9d6e;
}
.badge.gray {
    background:#f0f2f6;
    color:#7d8a9d;
}
.badge.yellow {
    background:#fff4dc;
    color:#b8872e;
}
.badge.red {
    background:#fff0f1;
    color:#d94d60;
}
.badge.blue {
    background:#eaf0ff;
    color:#5773d7;
}
.badge.purple {
    background:#f0ebff;
    color:#8061cf;
}
.tag {
    background:#f1f5fa;
    border-radius:6px;
    padding:5px 7px;
    margin-right:4px;
    color:#70839a;
    font-size:10px;
    font-weight:700;
}
.empty {
    text-align:center;
    color:#97a3b2;
    padding:51px 20px;
}
.empty-icon {
    height:58px;
    width:58px;
    border-radius:17px;
    background:#edf8f5;
    color:#16a880;
    display:grid;
    place-items:center;
    margin:0 auto 15px;
}
.empty-icon svg {
    height:28px;
    width:28px;
}
.empty h3 {
    font-size:16px;
    color:#33425a;
    margin:8px 0;
}
.empty p {
    max-width:350px;
    margin:0 auto 18px;
    font-size:12px;
}
.toolbar-controls {
    display:flex;
    align-items:center;
    gap:8px;
}
.toolbar-controls .select {
    min-width:135px;
}
.text-button {
    padding:0;
    border:0;
    background:none;
    color:#0baa80;
    font-weight:800;
}
.text-button:hover {
    text-decoration:underline;
}
.table-actions {
    display:flex;
    gap:4px;
}
.plain-card {
    padding:22px;
}
.plain-card h3 {
    font-size:14px;
    margin:0 0 10px;
}
.plain-card p {
    font-size:12px;
    color:#8290a2;
}
.feature-grid {
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:17px;
}
.feature-card {
    padding:22px;
}
.feature-card .feature-icon {
    height:41px;
    width:41px;
    display:grid;
    place-items:center;
    border-radius:12px;
    background:#eaf8f2;
    color:#0cae81;
}
.feature-card h3 {
    margin:16px 0 6px;
    font-size:14px;
}
.feature-card p {
    color:#8693a4;
    font-size:12px;
    margin:0;
}
.inbox-layout {
    display:grid;
    grid-template-columns:minmax(260px,320px) minmax(0,1fr);
    height:calc(100vh - 171px);
    min-height:560px;
    border-radius:14px;
    overflow:hidden;
    background:white;
    border:1px solid #e8ecf1;
}
.inbox-list-panel {
    border-right:1px solid #edf1f5;
    display:flex;
    flex-direction:column;
    min-height:0;
}
.inbox-list-head {
    padding:21px 19px;
    border-bottom:1px solid #edf1f5;
}
.inbox-list-head h3 {
    font-size:15px;
    margin:0 0 15px;
}
.conversation-list {
    overflow-y:auto;
    min-height:0;
    flex:1;
}
.conversation {
    width:100%;
    border:0;
    border-bottom:1px solid #f3f5f8;
    background:white;
    text-align:left;
    padding:16px;
    display:flex;
    align-items:center;
    gap:11px;
}
.conversation:hover {
    background:#fafcfb;
}
.conversation.selected {
    background:#edfbf7;
    border-left:3px solid #13bc8a;
    padding-left:13px;
}
.conversation-details {
    min-width:0;
    flex:1;
}
.conversation-details strong {
    font-size:12px;
    display:block;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
}
.conversation-details p {
    font-size:11px;
    color:#8c98a8;
    margin:6px 0 0;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
}
.conversation small {
    align-self:flex-start;
    color:#a1aebc;
    font-size:10px;
    white-space:nowrap;
}
.chat-panel {
    display:flex;
    flex-direction:column;
    min-height:0;
    min-width:0;
}
.chat-head {
    height:76px;
    padding:13px 22px;
    display:flex;
    align-items:center;
    gap:12px;
    border-bottom:1px solid #edf1f5;
    flex:none;
}
.chat-head strong {
    font-size:13px;
}
.chat-head p {
    font-size:11px;
    color:#92a0af;
    margin:3px 0 0;
}
.chat-spacer {
    flex:1;
}
.chat-messages {
    flex:1;
    min-height:0;
    overflow-y:auto;
    padding:27px;
    background:#fafcfb;
    display:flex;
    flex-direction:column;
    gap:15px;
}
.chat-bubble {
    max-width:73%;
    padding:12px 14px;
    border-radius:14px;
    background:white;
    border:1px solid #e7ebf1;
    box-shadow:0 3px 9px #00000004;
    align-self:flex-start;
    font-size:12px;
    line-height:1.55;
    white-space:pre-wrap;
    overflow-wrap:anywhere;
}
.chat-bubble.out {
    align-self:flex-end;
    background:#ddf9ee;
    border-color:#cbf1e2;
    border-bottom-right-radius:3px;
}
.chat-bubble.in {
    border-bottom-left-radius:3px;
}
.chat-bubble .chat-meta {
    font-size:10px;
    color:#98a7b5;
    margin-top:6px;
    text-align:right;
}
.chat-compose {
    border-top:1px solid #e9eef3;
    padding:16px 20px;
    background:white;
    flex:none;
}
.chat-compose-row {
    display:flex;
    align-items:flex-end;
    gap:10px;
}
.chat-compose textarea {
    border:none;
    resize:none;
    background:#f7f9fb;
    border-radius:9px;
    min-height:42px;
    max-height:100px;
    padding:12px;
    flex:1;
    outline:0;
}
.chat-notice {
    color:#b28646;
    background:#fff8e8;
    border-radius:7px;
    padding:9px 11px;
    font-size:11px;
    margin-bottom:10px;
}
.chat-blank {
    height:100%;
    display:grid;
    place-items:center;
    text-align:center;
    color:#9aa6b6;
    padding:20px;
}
.chat-blank h3 {
    color:#33445c;
    margin:13px 0 5px;
}
.template-grid {
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:17px;
}
.template-card {
    padding:22px;
    display:flex;
    flex-direction:column;
    gap:15px;
}
.template-card h3 {
    font-size:14px;
    overflow-wrap:anywhere;
    margin:0 0 5px;
}
.template-body {
    background:#f7faf9;
    border:1px solid #ecf1f0;
    border-radius:9px;
    padding:16px;
    white-space:pre-wrap;
    font-size:12px;
    color:#5b6a7c;
    line-height:1.7;
    min-height:95px;
    flex:1;
}
.template-meta {
    display:flex;
    justify-content:space-between;
    gap:8px;
    align-items:center;
}
.template-title {
    display:flex;
    justify-content:space-between;
    align-items:flex-start;
    gap:10px;
}
.automation-card {
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:16px;
    padding:20px;
    margin-bottom:11px;
}
.automation-card h3 {
    font-size:13px;
    margin:0 0 7px;
}
.automation-card p {
    font-size:12px;
    color:#8a99aa;
    margin:0;
}
.automation-card .badge {
    margin-right:10px;
}
.automation-actions {
    display:flex;
    gap:7px;
    flex:none;
}
.settings-grid {
    display:grid;
    grid-template-columns:1.3fr .8fr;
    gap:17px;
}
.settings-card {
    padding:24px;
}
.settings-card h3 {
    font-size:15px;
    margin:0 0 7px;
}
.settings-card p {
    color:#8291a3;
    font-size:12px;
}
.settings-info {
    display:flex;
    justify-content:space-between;
    gap:15px;
    border-bottom:1px solid #edf1f4;
    padding:14px 0;
    font-size:12px;
}
.settings-info span {
    color:#8b99a9;
}
.settings-info strong {
    font-weight:700;
    text-align:right;
    overflow-wrap:anywhere;
}
.setup-steps {
    counter-reset:step;
    display:flex;
    flex-direction:column;
    gap:17px;
    margin-top:23px;
}
.setup-step {
    display:flex;
    gap:13px;
    align-items:flex-start;
}
.setup-step .step-number {
    flex:none;
    height:28px;
    width:28px;
    border-radius:50%;
    display:grid;
    place-items:center;
    background:#e7f9f2;
    color:#109e78;
    font-weight:800;
    font-size:11px;
}
.setup-step strong {
    display:block;
    font-size:12px;
}
.setup-step p {
    font-size:11px;
    margin:4px 0 0;
    color:#8c9aab;
}
.code-field {
    background:#f5f8fa;
    border:1px solid #e8edf3;
    color:#596a7d;
    border-radius:9px;
    padding:12px;
    font-family:monospace;
    font-size:12px;
    overflow-wrap:anywhere;
}
.role-summary {
    background:#f0faf6;
    padding:14px;
    border-radius:9px;
    color:#0d9270;
    font-size:12px;
    margin:17px 0;
}
.progress {
    background:#e8edf3;
    border-radius:20px;
    height:7px;
    min-width:100px;
    overflow:hidden;
}
.progress>span {
    height:100%;
    display:block;
    background:#17c18e;
    border-radius:20px;
}
.page-loading {
    padding:70px 20px;
    text-align:center;
    color:#8c9cab;
}
.notice {
    padding:14px 17px;
    border-radius:11px;
    background:#eaf8f3;
    color:#24775f;
    font-size:12px;
    border:1px solid #d7f2e5;
    margin-bottom:20px;
}
.notice.warning {
    background:#fff9ec;
    border-color:#f9e9cd;
    color:#947134;
}
.setup-warning {
    margin-top:13px;
}
.flex-between {
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:10px;
}
.inline-flex {
    display:flex;
    align-items:center;
    gap:8px;
}
.form-row {
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:15px;
}
.form-footer {
    display:flex;
    gap:9px;
    justify-content:flex-end;
    margin-top:22px;
}
.text-truncate {
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
    max-width:220px;
}
.modal-backdrop {
    position:fixed;
    inset:0;
    z-index:100;
    display:flex;
    align-items:center;
    justify-content:center;
    padding:20px;
    background:#0e1c31a6;
    backdrop-filter:blur(4px);
}
.modal {
    width:min(100%,550px);
    background:#fff;
    border-radius:17px;
    box-shadow:0 24px 70px #10213850;
    max-height:calc(100vh - 35px);
    overflow:auto;
}
.modal.wide {
    width:min(100%,680px);
}
.modal-head {
    padding:22px 25px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    border-bottom:1px solid #edf0f4;
}
.modal-head h3 {
    font-size:17px;
    margin:0;
}
.modal-body {
    padding:10px 25px 25px;
}
.modal-head .icon-btn {
    font-size:23px;
    color:#78879c;
}
.modal-body .field-label:first-child {
    margin-top:20px;
}
.toast {
    border:1px solid #def2e6;
    border-left:4px solid var(--green);
    border-radius:10px;
    padding:13px 16px;
    background:white;
    box-shadow:0 10px 35px #0001;
    min-width:260px;
    font-size:12px;
    font-weight:700;
}
.toast.error {
    border-left-color:#ef6271;
    background:#fffaf9;
}
.toastHost {
}
#toastHost {
    position:fixed;
    z-index:200;
    right:24px;
    bottom:22px;
    display:flex;
    flex-direction:column;
    gap:10px;
}
.mobile-shade {
    display:none;
}
.auth-page {
    display:grid;
    grid-template-columns:51% 49%;
    min-height:100vh;
    background:white;
}
.auth-showcase {
    background:linear-gradient(130deg,#0a3839,#0d6e5f 70%,#159579);
    color:white;
    position:relative;
    overflow:hidden;
    padding:42px 8%;
    display:flex;
    flex-direction:column;
    justify-content:space-between;
}
.auth-showcase:before {
    content:'';
    position:absolute;
    width:680px;
    height:680px;
    right:-330px;
    top:-140px;
    border:1px solid #ffffff1a;
    border-radius:50%;
    box-shadow:0 0 0 90px #ffffff05,0 0 0 190px #ffffff04;
}
.showcase-grid {
    position:absolute;
    inset:0;
    background-image:radial-gradient(#ffffff25 1px,transparent 1px);
    background-size:26px 26px;
    opacity:.25;
    mask-image:linear-gradient(90deg,transparent,black);
}
.auth-showcase>*:not(.showcase-grid) {
    position:relative;
    z-index:1;
}
.auth-showcase-content {
    max-width:560px;
    margin:50px 0;
}
.auth-showcase h1 {
    font-size:clamp(31px,3.3vw,54px);
    line-height:1.22;
    margin:16px 0 17px;
    font-weight:800;
    letter-spacing:-2px;
}
.auth-showcase h1 em {
    font-style:normal;
    color:#8af5d6;
}
.auth-showcase-content>p {
    max-width:440px;
    color:#b2e3d9;
    font-size:14px;
    line-height:1.8;
}
.auth-showcase-footer {
    font-size:11px;
    color:#a2d0c7;
}
.hero-mini-panel {
    background:#f8fffd;
    color:#24344b;
    border-radius:16px;
    max-width:480px;
    margin-top:30px;
    box-shadow:0 20px 70px #03292040;
    overflow:hidden;
    padding:19px;
}
.hero-mini-head {
    font-size:11px;
    font-weight:800;
    display:flex;
    align-items:center;
    gap:9px;
}
.hero-mini-head>span:last-child {
    margin-left:auto;
    color:#13b489;
}
.pulse-dot {
    height:9px;
    width:9px;
    background:#17c791;
    border-radius:50%;
    box-shadow:0 0 0 5px #d5f8e7;
}
.hero-metrics {
    display:grid;
    grid-template-columns:repeat(3,1fr);
    gap:10px;
    margin:19px 0;
}
.hero-metrics div {
    background:#effaf5;
    border-radius:8px;
    padding:12px;
}
.hero-metrics strong {
    font-size:20px;
    color:#178e70;
    display:block;
}
.hero-metrics small {
    font-size:10px;
    color:#7a9a8c;
}
.hero-chat {
    display:flex;
    gap:9px;
    align-items:center;
    padding:11px 0;
    border-top:1px solid #e6f1ec;
}
.hero-avatar {
    height:34px;
    width:34px;
    display:grid;
    place-items:center;
    background:#e0e7ff;
    border-radius:50%;
    color:#6379cf;
    font-weight:800;
}
.hero-chat div {
    flex:1;
    min-width:0;
}
.hero-chat strong,.hero-chat small {
    display:block;
    font-size:10px;
}
.hero-chat small {
    margin-top:5px;
    color:#8a9aab;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
}
.hero-check {
    color:#1aa98b;
}
.hero-reply {
    text-align:right;
    padding:10px 0 0;
    font-size:11px;
}
.hero-reply span {
    padding:10px;
    border-radius:9px;
    background:#d9f8eb;
    display:inline-block;
}
.hero-reply small {
    color:#0fb685;
    margin-left:6px;
}
.auth-panel {
    display:grid;
    place-items:center;
    padding:40px;
}
.auth-card {
    width:min(100%,405px);
}
.auth-panel .eyebrow {
    font-size:10px;
}
.auth-panel h2 {
    font-size:28px;
    margin:14px 0 10px;
    line-height:1.27;
}
.auth-subtitle {
    font-size:13px;
    margin-bottom:30px;
}
.auth-panel .input {
    padding:13px;
}
.auth-note {
    color:#a4adba;
    font-size:10px;
    margin:11px 0 21px;
}
.auth-switch {
    text-align:center;
    font-size:12px;
    color:#8997a8;
    margin:21px 0;
}
.auth-terms {
    text-align:center;
    font-size:10px;
    color:#a7b0be;
    margin-top:38px;
}
.auth-mobile-brand {
    display:none;
}
.auth-panel .btn-block {
    padding:13px 20px;
    font-size:13px;
    justify-content:space-between;
}
.auth-panel .btn-block span {
    font-size:18px;
}
@media(max-width:1280px) {
    .grid-4 {
        grid-template-columns:repeat(2,minmax(0,1fr));
    }
    .template-grid {
        grid-template-columns:repeat(2,minmax(0,1fr));
    }
    .page-content {
        padding:28px;
    }
    .topbar {
        padding:0 28px;
    }
    .sidebar {
        width:225px;
    }
    .app-main {
        margin-left:225px;
    }
    .feature-grid {
        grid-template-columns:repeat(2,minmax(0,1fr));
    }
}
@media(max-width:950px) {
    .sidebar {
        transform:translateX(-100%);
        transition:transform .22s;
        width:255px;
    }
    .sidebar.open {
        transform:translateX(0);
    }
    .mobile-shade.show {
        display:block;
        background:#111b2ab3;
        position:fixed;
        inset:0;
        z-index:19;
    }
    .app-main {
        margin-left:0;
    }
    .hamburger,.close-sidebar {
        display:inline-grid!important;
    }
    .grid-2,.settings-grid {
        grid-template-columns:minmax(0,1fr);
    }
    .page-content {
        padding:25px;
    }
    .topbar {
        height:65px;
    }
    .inbox-layout {
        height:calc(100vh - 151px);
    }
    .auth-showcase {
        padding:33px 6%;
    }
}
@media(max-width:650px) {
    .page-content {
        padding:20px 14px 55px;
    }
    .topbar {
        padding:0 14px;
    }
    .topbar-right {
        gap:9px;
    }
    .top-divider {
        display:none;
    }
    .live-pill {
        font-size:0;
        padding:10px;
    }
    .live-pill .status-dot {
        width:8px;
        height:8px;
    }
    .page-head {
        flex-direction:column;
        gap:14px;
    }
    .page-heading {
        font-size:22px;
    }
    .page-actions {
        width:100%;
    }
    .page-actions .btn {
        flex:1;
    }
    .grid-4,.grid-2,.template-grid,.feature-grid,.form-row {
        grid-template-columns:minmax(0,1fr);
    }
    .metric {
        min-height:123px;
    }
    .welcome-banner {
        padding:24px;
        align-items:flex-start;
        flex-direction:column;
    }
    .welcome-banner h2 {
        font-size:21px;
    }
    .card-head,.card-body {
        padding-left:17px;
        padding-right:17px;
    }
    .table-tools {
        padding:13px;
    }
    .toolbar-controls {
        width:100%;
        justify-content:space-between;
    }
    .toolbar-controls .select {
        min-width:0;
    }
    .auth-page {
        grid-template-columns:minmax(0,1fr);
    }
    .auth-showcase {
        display:none;
    }
    .auth-panel {
        min-height:100vh;
        padding:24px;
    }
    .auth-mobile-brand {
        display:flex;
        color:#1b2d46;
        margin-bottom:55px;
    }
    .auth-panel h2 {
        font-size:25px;
    }
    .modal-backdrop {
        padding:8px;
    }
    .modal-body {
        padding:8px 17px 22px;
    }
    .modal-head {
        padding:19px 17px;
    }
    .inbox-layout {
        display:flex;
        flex-direction:column;
        height:calc(100dvh - 185px);
        min-height:480px;
    }
    .inbox-list-panel {
        height:100%;
        border-right:0;
    }
    .inbox-layout.chat-open .inbox-list-panel {
        display:none;
    }
    .inbox-layout:not(.chat-open) .chat-panel {
        display:none;
    }
    .chat-panel {
        flex:1;
    }
    .chat-back {
        display:inline-flex!important;
    }
    .chat-bubble {
        max-width:87%;
    }
    .settings-info {
        flex-direction:column;
        gap:4px;
    }
    .settings-info strong {
        text-align:left;
    }
}

/* Prevent intrinsic SVG/table content from stretching narrow viewports. */
.card {
    min-width:0;
}
.grid-2 > *, .grid-4 > *, .settings-grid > *, .feature-grid > * {
    min-width:0;
}
@media (max-width:650px) {
    .card-head {
        flex-wrap:wrap;
    }
    .chart-area {
        min-width:0;
        overflow:hidden;
    }
    .activity-time {
        font-size:9px;
    }
}

/* WhatsApp template creator: scoped styles; no changes to other modals. */
.modal.wf-template-creator {
    width:min(980px, 100%);
}
.wf-template-creator .modal-body {
    padding:14px 24px 22px;
}
.wf-template-builder {
    display:grid;
    grid-template-columns:minmax(0, 1.55fr) minmax(255px, 1fr);
    gap:22px;
    align-items:start;
    margin-top:12px;
}
.wf-template-form {
    min-width:0;
}
.wf-builder-section {
    padding:18px 0 21px;
    border-bottom:1px solid var(--line);
}
.wf-builder-section:first-child {
    padding-top:0;
}
.wf-builder-section:last-child {
    border-bottom:0;
}
.wf-builder-section h4 {
    font-size:14px;
    letter-spacing:-.01em;
    margin:0 0 13px;
}
.wf-builder-section .field-label {
    display:block;
    margin-top:12px;
}
.wf-builder-section .field-hint {
    margin:7px 0;
    font-size:12px;
}
.wf-optional {
    font:500 11px 'DM Sans', Arial, sans-serif;
    color:var(--muted);
    padding-left:5px;
}
.wf-template-file {
    padding:11px;
    height:auto;
    max-width:100%;
}
.wf-sample-file {
    background:#effaf6;
    color:#107f5c;
    font-size:12px;
    padding:8px 11px;
    border-radius:8px;
    overflow-wrap:anywhere;
}
.wf-button-list {
    display:grid;
    gap:10px;
    margin:14px 0;
}
.wf-button-row {
    padding:14px 15px 16px;
    background:#f8fafc;
    border:1px solid #e3eaf3;
    border-radius:11px;
}
.wf-button-row-head,
.wf-section-head {
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:10px;
}
.wf-button-row-head strong {
    font-size:13px;
}
.wf-remove-button {
    color:#c44559;
    font-weight:600;
    border:0;
    background:transparent;
    padding:3px 0;
    font-size:12px;
}
.wf-button-row .field-label {
    margin-top:11px;
}
.wf-add-button-wrap {
    position:relative;
    display:inline-block;
    max-width:100%;
}
.wf-add-template-button {
    display:inline-flex;
    align-items:center;
    gap:7px;
    border:1px dashed #12b889;
    color:#0d9770;
    background:#f2fbf8;
    font-weight:700;
}
.wf-add-button-menu {
    position:absolute;
    top:calc(100% + 6px);
    left:0;
    width:270px;
    max-width:calc(100vw - 80px);
    background:#fff;
    border:1px solid #e1e8f0;
    box-shadow:0 16px 45px #14213728;
    border-radius:11px;
    z-index:7;
    padding:5px;
}
.wf-add-button-menu button {
    text-align:left;
    display:flex;
    flex-direction:column;
    gap:3px;
    background:transparent;
    border:0;
    width:100%;
    padding:10px 12px;
    border-radius:7px;
    color:var(--text);
}
.wf-add-button-menu button:hover:not(:disabled),
.wf-add-button-menu button:focus-visible {
    background:#f0f7f5;
}
.wf-add-button-menu button:disabled {
    opacity:.35;
}
.wf-add-button-menu small {
    font-size:11px;
    color:var(--muted);
}
.wf-template-preview-panel {
    position:sticky;
    top:0;
    background:#f7f9fc;
    border:1px solid var(--line);
    border-radius:14px;
    padding:14px;
}
.wf-preview-eyebrow {
    display:block;
    font-size:10px;
    letter-spacing:.12em;
    color:#64758e;
    font-weight:800;
    margin:0 0 12px;
}
.wf-preview-phone {
    border-radius:12px;
    overflow:hidden;
    background:#e7efe9;
    border:1px solid #e1e7e5;
}
.wf-preview-phone-top {
    display:flex;
    align-items:center;
    gap:8px;
    padding:11px;
    background:#fff;
    font-size:11px;
    white-space:nowrap;
}
.wf-preview-phone-top svg {
    width:14px;
}
.wf-preview-avatar {
    display:grid;
    place-items:center;
    color:#fff;
    background:#17ba91;
    width:25px;
    height:25px;
    border-radius:50%;
    font-weight:700;
}
.wf-preview-background {
    min-height:260px;
    padding:20px 12px 30px;
    background-image:radial-gradient(#7a9a9320 1px, transparent 1px);
    background-size:17px 17px;
}
.wf-preview-bubble {
    background:#fff;
    padding:10px;
    border-radius:10px;
    box-shadow:0 2px 5px #1b443815;
    font-size:12px;
    white-space:pre-wrap;
    overflow-wrap:anywhere;
}
.wf-preview-text-header {
    font-weight:700;
    margin-bottom:8px;
}
.wf-preview-media-header {
    padding:18px 6px;
    text-align:center;
    background:#e8eef0;
    border-radius:6px;
    font-weight:600;
    margin-bottom:9px;
}
.wf-preview-footer {
    color:#7d8d93;
    font-size:11px;
    padding-top:8px;
}
.wf-preview-time {
    text-align:right;
    font-size:9px;
    color:#9aa7a4;
    margin-top:3px;
}
.wf-preview-action {
    background:#fff;
    padding:9px;
    border-radius:8px;
    margin-top:4px;
    text-align:center;
    color:#079c78;
    font-weight:700;
    font-size:11px;
    overflow-wrap:anywhere;
}
@media (max-width:760px) {
    .wf-template-builder {
        grid-template-columns:minmax(0,1fr);
        gap:16px;
    }
    .wf-template-preview-panel {
        position:static;
    }
    .wf-preview-background {
        min-height:170px;
    }
    .wf-template-creator .modal-body {
        padding:8px 17px 22px;
    }
}
/* WaviFlow Public API — append-only CSS addition. Existing styles remain intact. */
.api-summary { margin-top: 4px; }
.api-code-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 12px;
    border: 1px solid var(--border, #dce2eb);
    border-radius: 10px;
    background: var(--surface-soft, #f7f9fc);
    margin-top: 8px;
}
.api-code-row code { flex: 1; min-width: 0; overflow-wrap: anywhere; font-size: 13px; }
.api-table-scroll { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.api-table-scroll .data-table { width: 100%; min-width: 700px; }
.api-scope-list { display: grid; gap: 10px; margin: 10px 0 15px; }
.api-scope-list label { display: flex; gap: 10px; align-items: center; line-height: 1.4; cursor: pointer; }
.api-scope-list input { flex: 0 0 auto; width: 16px; height: 16px; }
.api-scope-list small { color: var(--muted, #6d7787); font-size: 11px; }
.api-once-secret {
    width: 100%;
    height: auto;
    font: 13px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    overflow-wrap: anywhere;
    resize: none;
}
.api-endpoints { display: grid; gap: 10px; margin: 18px 0 22px; }
.api-endpoints > div {
    display: grid;
    grid-template-columns: 64px minmax(120px, 1fr) minmax(175px, 1.4fr);
    align-items: center;
    gap: 12px;
    padding: 11px 12px;
    background: var(--surface-soft, #f8f9fd);
    border: 1px solid var(--border, #e4e9f0);
    border-radius: 9px;
}
.api-endpoints strong { font-size: 11px; letter-spacing: .03em; color: #08745a; }
.api-endpoints code { overflow-wrap: anywhere; font-size: 12px; }
.api-endpoints span { font-size: 12px; color: var(--muted, #667085); }
.api-examples { display: grid; gap: 14px; margin-bottom: 18px; }
.api-example { border: 1px solid var(--border, #e4e9f0); border-radius: 10px; overflow: hidden; }
.api-example-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 10px 13px; }
.api-example-head strong { font-size: 13px; }
.api-example pre { margin: 0; padding: 15px; color: #e9eef5; background: #1c2839; overflow-x: auto; font: 12px/1.65 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; white-space: pre; }
@media (max-width: 650px) {
    .api-code-row { flex-wrap: wrap; }
    .api-code-row .btn { width: 100%; }
    .api-endpoints > div { grid-template-columns: 54px minmax(0, 1fr); gap: 5px 10px; }
    .api-endpoints > div span { grid-column: 2; }
    .api-example pre { font-size: 11px; }
}
