:root {
    --wz-green: #00a884;
    --wz-green-dark: #128c7e;
    --wz-green-soft: #d9fdd3;
    --wz-mint: #e7f8f3;
    --wz-sky: #e0f2fe;
    --wz-amber: #fef3c7;
    --wz-rose: #ffe4e6;
    --wz-violet: #ede9fe;
    --wz-paper: #f3f6f4;
    --wz-ink: #111b21;
    --wz-muted: #667781;
}

.wz-app,
.wz-app body {
    font-family: Nunito, ui-sans-serif, system-ui, sans-serif;
    background: var(--wz-paper);
    color: var(--wz-ink);
}

.wz-app [data-flux-sidebar] {
    background: #ffffff !important;
    border-color: #e5efe9 !important;
}

.wz-nav {
    display: grid;
    gap: 0.35rem;
    padding: 0.25rem 0.35rem 0.75rem;
}

.wz-nav-label {
    margin: 0.15rem 0.65rem 0.55rem;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--wz-muted);
}

.wz-nav-link {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.45rem 0.55rem;
    border-radius: 1rem;
    color: #1f2c34;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.92rem;
}

.wz-nav-link:hover {
    background: var(--wz-mint);
    color: var(--wz-green-dark);
}

.wz-nav-link.is-active {
    background: var(--wz-mint);
    color: var(--wz-green-dark);
    box-shadow: inset 0 0 0 1px #b7eadc;
}

.wz-ico {
    width: 2rem;
    height: 2rem;
    border-radius: 0.85rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.wz-ico svg {
    width: 1.05rem;
    height: 1.05rem;
}

.wz-ico-mint { background: #d1fae5; color: #047857; }
.wz-ico-green { background: #dcfce7; color: #15803d; }
.wz-ico-sky { background: #e0f2fe; color: #0369a1; }
.wz-ico-amber { background: #fef3c7; color: #b45309; }
.wz-ico-rose { background: #ffe4e6; color: #be123c; }
.wz-ico-violet { background: #ede9fe; color: #6d28d9; }
.wz-ico-wa { background: #d1fae5; color: #128c7e; }

.wz-logo {
    display: flex;
    aspect-ratio: 1;
    width: 2.15rem;
    height: 2.15rem;
    align-items: center;
    justify-content: center;
    border-radius: 0.9rem;
    background: linear-gradient(180deg, #25d366, #00a884);
    color: #fff !important;
    box-shadow: 0 8px 16px rgba(0, 168, 132, 0.28);
}

.wz-logo svg {
    color: #fff !important;
    fill: currentColor;
}

.wz-app [data-flux-sidebar-brand] {
    gap: 0.7rem;
}

.wz-app [data-flux-sidebar] a .truncate,
.wz-app [data-flux-sidebar] [class*="font-medium"].truncate {
    color: #0f3d34 !important;
}

.wz-app [data-flux-main] {
    background: var(--wz-paper);
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.wz-app [data-flux-header] {
    background: #00a884 !important;
    color: #fff !important;
    border: 0 !important;
}

.wz-app [data-flux-card] {
    border-radius: 1.15rem !important;
    border-color: #dcebe3 !important;
    box-shadow: 0 10px 28px rgba(18, 140, 126, 0.06);
}

.wz-app [data-flux-button][variant="primary"],
.wz-app button[data-flux-button-variant="primary"] {
    background: var(--wz-green) !important;
    color: #fff !important;
}

.wz-stats {
    display: grid;
    gap: 1rem;
}

@media (min-width: 768px) {
    .wz-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 1280px) {
    .wz-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.wz-stat {
    background: #fff;
    border: 1px solid #dcebe3;
    border-radius: 1.25rem;
    padding: 1.1rem 1.15rem;
    box-shadow: 0 10px 28px rgba(18, 140, 126, 0.06);
}

.wz-stat-label {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    font-size: 0.8rem;
    font-weight: 800;
    color: var(--wz-muted);
}

.wz-stat-value {
    margin-top: 0.45rem;
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--wz-ink);
}

.wz-stat-help {
    margin-top: 0.2rem;
    font-size: 0.8rem;
    color: var(--wz-muted);
}

.wz-page-title {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--wz-ink);
}

.wz-page-sub {
    margin-top: 0.2rem;
    color: var(--wz-muted);
}

/* Inbox: classic WhatsApp light */
.wa-shell { display: flex; flex: 1; height: 100%; min-height: 0; background: #fff; color: #111b21; overflow: hidden; }
@media (max-width: 1023px) { .wa-shell { min-height: calc(100dvh - 3.5rem); } }
.wa-list { flex: 0 0 22rem; width: 22rem; max-width: 22rem; display: flex; flex-direction: column; border-right: 1px solid #e9edef; background: #fff; min-width: 0; }
@media (max-width: 1023px) {
    .wa-list { flex-basis: 100%; width: 100%; max-width: none; }
    .wa-thread { display: none; }
    .wa-shell.has-chat .wa-list { display: none; }
    .wa-shell.has-chat .wa-thread { display: flex; flex: 1; }
}
.wa-list-head { padding: 0.9rem 1rem; background: #00a884; color: #fff; display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; }
.wa-list-head .wa-preview { color: rgba(255,255,255,.85); }
.wa-live { font-size: 0.7rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; background: rgba(255,255,255,.18); border-radius: 999px; padding: 0.25rem 0.55rem; }
.wa-new-chat { display: block; margin: 0.65rem 0.75rem 0.85rem; text-align: center; text-decoration: none; font-weight: 800; font-size: 0.85rem; color: #00a884; background: #e7f8f3; border-radius: 999px; padding: 0.55rem 0.75rem; }
.wa-search { margin: 0.65rem 0.75rem 0.5rem; }
.wa-search input { width: 100%; border: 0; border-radius: 999px; background: #f0f2f5; color: #111b21; padding: 0.55rem 0.95rem; font-size: 0.875rem; outline: none; }
.wa-search input::placeholder { color: #667781; }
.wa-chats { overflow-y: auto; flex: 1; }
.wa-chat { display: flex; gap: 0.75rem; padding: 0.7rem 1rem; text-decoration: none; color: inherit; border-bottom: 1px solid #f0f2f5; }
.wa-chat:hover { background: #f5f6f6; }
.wa-chat.is-active { background: #e7f8f3; }
.wa-avatar { width: 2.75rem; height: 2.75rem; border-radius: 999px; background: linear-gradient(180deg, #34d399, #00a884); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 0.8rem; font-weight: 800; flex-shrink: 0; }
.wa-chat-meta { min-width: 0; flex: 1; }
.wa-chat-top { display: flex; justify-content: space-between; gap: 0.5rem; }
.wa-name { font-weight: 800; font-size: 0.98rem; }
.wa-time { color: #667781; font-size: 0.75rem; white-space: nowrap; }
.wa-preview { color: #667781; font-size: 0.8125rem; margin-top: 0.15rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wa-thread { flex: 1; display: flex; flex-direction: column; min-width: 0; background: #ece5dd; }
.wa-thread-head { padding: 0.7rem 1rem; background: #00a884; color: #fff; display: flex; align-items: center; gap: 0.75rem; }
.wa-thread-head .wa-preview { color: rgba(255,255,255,.85); }
.wa-pane { flex: 1; overflow-y: auto; padding: 1.25rem 4%; display: flex; flex-direction: column; gap: 0.15rem;
    background-color: #ece5dd;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23d4cfc7' fill-opacity='0.55'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.wa-day { align-self: center; background: #ffffffcc; color: #54656f; font-size: 0.75rem; padding: 0.3rem 0.75rem; border-radius: 8px; margin: 0.6rem 0; }
.wa-row { display: flex; margin: 0.12rem 0; }
.wa-row.in { justify-content: flex-start; }
.wa-row.out { justify-content: flex-end; }
.wa-bubble { max-width: 65%; padding: 0.4rem 0.55rem 0.3rem 0.65rem; border-radius: 12px; font-size: 0.9rem; line-height: 1.35; position: relative; box-shadow: 0 1px 0.5px rgba(0,0,0,.08); }
.wa-row.in .wa-bubble { background: #fff; border-top-left-radius: 0; }
.wa-row.out .wa-bubble { background: #d9fdd3; border-top-right-radius: 0; }
.wa-body { white-space: pre-wrap; word-wrap: break-word; }
.wa-stamp { display: flex; justify-content: flex-end; align-items: center; gap: 0.25rem; color: #667781; font-size: 0.68rem; margin-top: 0.15rem; }
.wa-ticks { letter-spacing: -0.12em; font-size: 0.8rem; color: #667781; }
.wa-ticks.read { color: #53bdeb; }
.wa-ticks.failed { color: #f15c6d; letter-spacing: 0; }
.wa-dock { background: #f0f2f5; flex-shrink: 0; }
.wa-quick { padding: 0.45rem 0.9rem 0; }
.wa-composer { background: #f0f2f5; padding: 0.55rem 0.75rem 0.7rem; display: flex; gap: 0.5rem; align-items: center; }
.wa-composer input[type="text"] { flex: 1; min-width: 0; border: 0; border-radius: 999px; background: #fff; color: #111b21; padding: 0.7rem 1rem; font-size: 0.95rem; outline: none; }
.wa-send { border: 0; border-radius: 999px; min-width: 4.4rem; height: 2.6rem; padding: 0 1rem; background: #00a884; color: #fff; font-weight: 800; cursor: pointer; }
.wa-send:disabled, .wa-attach:has(input:disabled) { opacity: 0.45; cursor: not-allowed; }
.wa-attach { min-height: 2.6rem; border-radius: 999px; background: #fff; color: #0b6e62; display: inline-flex; align-items: center; justify-content: center; gap: 0.35rem; padding: 0 0.85rem; cursor: pointer; font-size: 0.8rem; font-weight: 800; flex-shrink: 0; }
.wa-attach svg { width: 1.15rem; height: 1.15rem; }
.wa-attach input { display: none; }
.wa-file-name { color: #667781; font-size: 0.75rem; padding: 0 1rem 0.6rem; }
.wa-media { display: block; max-width: 16rem; max-height: 16rem; border-radius: 0.6rem; margin-bottom: 0.35rem; }
.wa-audio { display: block; max-width: 16rem; margin-bottom: 0.35rem; }
.wa-file { display: inline-flex; gap: 0.35rem; color: #0b6e62; font-weight: 700; text-decoration: none; margin-bottom: 0.25rem; }
.wa-back { display: none; color: #fff; text-decoration: none; font-size: 1.2rem; padding-right: 0.25rem; }
@media (max-width: 1023px) { .wa-back { display: inline; } }
.wa-tpl { border: 0; background: transparent; color: #00a884; font-size: 0.75rem; font-weight: 800; cursor: pointer; white-space: nowrap; }
.wa-list-head .wa-tpl { color: #fff; }
.wa-empty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; color: #667781; text-align: center; padding: 2rem; }
.wa-empty h2 { color: #111b21; font-size: 1.75rem; font-weight: 800; margin-bottom: 0.5rem; }
.wa-alert { padding: 0.5rem 1rem; font-size: 0.8rem; background: #fff7ed; color: #c2410c; }
.wa-alert a { color: inherit; font-weight: 800; text-decoration: underline; }
.wa-alert-ok { background: #ecfdf3; color: #047857; }
[x-cloak] { display: none !important; }

.wz-theme {
    margin: 0.35rem 0.75rem 0.6rem;
    border: 0;
    border-radius: 999px;
    padding: 0.45rem 0.8rem;
    font-weight: 800;
    font-size: 0.8rem;
    cursor: pointer;
    background: var(--wz-mint);
    color: var(--wz-green-dark);
}
.wz-theme-bar { margin: 0 0.5rem 0 0; background: rgba(255,255,255,.18); color: #fff; }
.wz-theme-dark { display: none; }
html.dark .wz-theme-light { display: none; }
html.dark .wz-theme-dark { display: inline; }

html.dark {
    --wz-paper: #0b141a;
    --wz-ink: #e9edef;
    --wz-muted: #8696a0;
    --wz-mint: #10352f;
}
html.dark.wz-app,
html.dark.wz-app body { background: #0b141a; color: #e9edef; }
html.dark.wz-app [data-flux-sidebar] { background: #111b21 !important; border-color: #1f2c34 !important; }
html.dark .wz-nav-link { color: #e9edef; }
html.dark .wz-nav-link:hover,
html.dark .wz-nav-link.is-active { background: #10352f; color: #25d366; box-shadow: inset 0 0 0 1px #1b6b55; }
html.dark.wz-app [data-flux-sidebar] a .truncate,
html.dark.wz-app [data-flux-sidebar] [class*="font-medium"].truncate { color: #e9edef !important; }
html.dark.wz-app [data-flux-main] { background: #0b141a; }
html.dark.wz-app [data-flux-card] { background: #111b21 !important; border-color: #1f2c34 !important; color: #e9edef; }
html.dark.wz-app [data-flux-heading],
html.dark.wz-app [data-flux-subheading] { color: #e9edef !important; }
html.dark.wz-app [data-flux-text] { color: #8696a0 !important; }
html.dark .wz-stat { background: #111b21; border-color: #1f2c34; }
html.dark .wz-stat-value,
html.dark .wz-page-title { color: #e9edef; }
html.dark .wz-theme { background: #1f2c34; color: #25d366; }
html.dark .wz-theme-bar { background: rgba(255,255,255,.08); color: #25d366; }
html.dark .wa-shell,
html.dark .wa-list { background: #111b21; color: #e9edef; }
html.dark .wa-list { border-color: #1f2c34; }
html.dark .wa-list-head,
html.dark .wa-thread-head { background: #202c33; }
html.dark .wa-search input { background: #202c33; color: #e9edef; }
html.dark .wa-chat { border-color: #1f2c34; }
html.dark .wa-chat:hover { background: #202c33; }
html.dark .wa-chat.is-active { background: #10352f; }
html.dark .wa-thread,
html.dark .wa-pane { background-color: #0b141a; background-image: none; }
html.dark .wa-alert { background: #3b2415; color: #fdba74; }
html.dark .wa-alert-ok { background: #10352f; color: #6ee7b7; }
html.dark .wa-row.in .wa-bubble { background: #202c33; color: #e9edef; }
html.dark .wa-row.out .wa-bubble { background: #005c4b; color: #e9edef; }
html.dark .wa-dock,
html.dark .wa-composer,
html.dark .wa-file-name { background: #202c33; color: #8696a0; }
html.dark .wa-composer input[type="text"],
html.dark .wa-attach { background: #2a3942; color: #e9edef; }
html.dark .wa-empty h2 { color: #e9edef; }
html.dark .wa-day { background: #182229; color: #8696a0; }
html.dark .wa-file { color: #25d366; }
html.dark .wa-new-chat { background: #10352f; color: #25d366; }
html.dark .wa-live { background: rgba(37,211,102,.18); color: #25d366; }
