:root {
    --bg: #f6f8fb;
    --bg-2: #eef3f8;
    --surface: #ffffff;
    --line: #dce5f0;
    --text: #172638;
    --muted: #5f7288;
    --brand: #1e8bff;
    --brand-2: #00b894;
    --brand-3: #ffb74d;
    --topbar-bg: rgba(255, 255, 255, 0.85);
    --hero-grad-a: rgba(30, 139, 255, 0.2);
    --hero-grad-b: rgba(0, 184, 148, 0.12);
    --soft-panel: #f3f8ff;
    --surface-soft: #f4f8fc;
    --pill-border: #d3e3f7;
    --trust-line: #e4edf7;
}

:root[data-theme="dark"] {
    --bg: #0c1218;
    --bg-2: #101b25;
    --surface: #121e2a;
    --line: #27394c;
    --text: #e6eef7;
    --muted: #9fb2c7;
    --brand: #53a8ff;
    --brand-2: #42d0b0;
    --brand-3: #ffc46b;
    --topbar-bg: rgba(12, 18, 24, 0.86);
    --hero-grad-a: rgba(83, 168, 255, 0.16);
    --hero-grad-b: rgba(66, 208, 176, 0.1);
    --soft-panel: #14263a;
    --surface-soft: #14212e;
    --pill-border: #2b4258;
    --trust-line: #1e3042;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Space Grotesk", sans-serif;
    color: var(--text);
    background:
        radial-gradient(1000px 420px at -5% -8%, var(--hero-grad-a), transparent 60%),
        radial-gradient(900px 420px at 105% -10%, var(--hero-grad-b), transparent 60%),
        var(--bg);
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 14px 24px;
    background: var(--topbar-bg);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(8px);
}

.brand {
    text-decoration: none;
    color: var(--brand);
    font-weight: 700;
    letter-spacing: 0.08em;
}

.menu {
    display: flex;
    gap: 14px;
}

.menu a {
    text-decoration: none;
    color: var(--muted);
    font-weight: 500;
}

.auth-btn {
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--text);
    border-radius: 8px;
    padding: 5px 10px;
    cursor: pointer;
}

.auth-btn.pangeiaid-login {
    border-radius: 999px;
    padding: 9px 16px;
    font-weight: 700;
    letter-spacing: 0.01em;
    color: #08213a;
    border: 1px solid #9cc7ff;
    background: linear-gradient(90deg, #e7f2ff 0 50%, #d8f8f1 50% 100%);
    box-shadow: 0 10px 24px rgba(30, 139, 255, 0.15);
}

:root[data-theme="dark"] .auth-btn.pangeiaid-login {
    color: #e8f3ff;
    border-color: #2b4a69;
    background: linear-gradient(90deg, #1a2f45 0 50%, #173a36 50% 100%);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
}

.auth-shell {
    display: none;
    position: relative;
    align-items: center;
}

.auth-avatar-btn {
    border: 1px solid var(--line);
    background: var(--surface);
    border-radius: 999px;
    width: 40px;
    height: 40px;
    padding: 0;
    display: grid;
    place-items: center;
    overflow: hidden;
}

.auth-avatar-btn img,
.auth-menu-header img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.auth-menu {
    position: absolute;
    top: 48px;
    right: 0;
    min-width: 240px;
    border: 1px solid var(--line);
    background: var(--surface);
    border-radius: 12px;
    padding: 8px;
    box-shadow: 0 16px 36px rgba(12, 18, 24, 0.15);
    display: none;
    z-index: 40;
}

.auth-menu.open {
    display: block;
}

.auth-menu-header {
    display: grid;
    grid-template-columns: 40px 1fr;
    gap: 8px;
    align-items: center;
    padding: 8px;
    border-bottom: 1px solid var(--line);
    margin-bottom: 6px;
}

.auth-menu-header img {
    border-radius: 999px;
}

.auth-menu-header strong {
    font-size: 0.93rem;
    display: block;
}

.auth-menu-header small {
    color: var(--muted);
    font-size: 0.8rem;
}

.auth-menu a,
.auth-menu-logout {
    width: 100%;
    text-align: left;
    border: 0;
    background: transparent;
    color: var(--text);
    text-decoration: none;
    padding: 10px 8px;
    border-radius: 8px;
    display: block;
    font-size: 0.92rem;
}

.auth-menu a:hover,
.auth-menu-logout:hover {
    background: var(--surface-soft);
}

.auth-menu-logout {
    border-top: 1px solid var(--line);
    margin-top: 6px;
}

main {
    width: min(1160px, 94vw);
    margin: 0 auto;
    padding: 28px 0 80px;
}

.landing-main {
    width: 100%;
    padding: 0 0 80px;
}

.wrap {
    width: min(1180px, 92vw);
    margin: 0 auto;
}

.site-footer {
    border-top: 1px solid var(--line);
    background: color-mix(in srgb, var(--surface) 88%, transparent);
}

.site-footer-inner {
    width: min(1160px, 94vw);
    margin: 0 auto;
    padding: 18px 0 24px;
    display: flex;
    justify-content: center;
}

.powered-by-pixia {
    display: inline-flex;
    align-items: center;
    opacity: 0.9;
    transition: opacity 0.2s ease;
}

.powered-by-pixia:hover {
    opacity: 1;
}

.powered-by-pixia img {
    display: block;
    width: auto;
    max-width: min(340px, 88vw);
    height: clamp(34px, 4.2vw, 48px);
}

.kicker {
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 0.74rem;
    color: var(--brand);
    font-weight: 700;
}

.menu .theme-toggle {
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--text);
    border-radius: 999px;
    width: 40px;
    height: 40px;
    padding: 0;
    display: grid;
    place-items: center;
    cursor: pointer;
}

.menu .theme-toggle svg {
    width: 18px;
    height: 18px;
    display: block;
}

.hero {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 16px;
    align-items: stretch;
}

.lp-hero {
    padding: 26px 0 40px;
}

.lp-hero-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 24px;
    align-items: center;
}

.lp-hero h1 {
    margin: 10px 0;
    font-size: clamp(2rem, 5.2vw, 4rem);
    line-height: 1;
    max-width: 15ch;
}

.lp-numbers {
    margin-top: 20px;
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
}

.lp-numbers div strong {
    display: block;
    font-size: 1.35rem;
}

.lp-numbers div span {
    color: var(--muted);
    font-size: 0.84rem;
}

.lp-showcase {
    position: relative;
    min-height: 380px;
    background: linear-gradient(140deg, var(--surface-soft), var(--bg-2));
    border-radius: 24px;
    overflow: hidden;
    padding: 20px;
}

.bubble {
    position: absolute;
    background: var(--surface);
    border-radius: 999px;
    padding: 7px 12px;
    border: 1px solid var(--pill-border);
    font-size: 0.82rem;
}

.bubble.one { top: 22px; left: 22px; }
.bubble.two { top: 66px; right: 20px; }
.bubble.three { top: 112px; left: 68px; }

.mock-screen {
    position: absolute;
    left: 20px;
    right: 20px;
    bottom: 20px;
    background: var(--surface);
    border-radius: 16px;
    padding: 16px;
    box-shadow: 0 20px 50px rgba(23, 38, 56, 0.12);
}

.mock-screen p {
    margin: 0;
    color: var(--brand);
    font-size: 0.78rem;
    letter-spacing: 0.11em;
    text-transform: uppercase;
}

.mock-screen h3 {
    margin: 6px 0 10px;
}

.mock-screen ul {
    margin: 0;
    padding-left: 18px;
    color: var(--muted);
}

.lp-trust {
    background: var(--surface);
    border-top: 1px solid var(--trust-line);
    border-bottom: 1px solid var(--trust-line);
}

.trust-row {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
    padding: 14px 0;
}

.trust-row span {
    text-align: center;
    font-family: "IBM Plex Mono", monospace;
    color: #7e93aa;
    font-size: 0.78rem;
}

.lp-flow {
    padding: 44px 0;
}

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

.flow-grid article p {
    width: 34px;
    height: 34px;
    margin: 0;
    border-radius: 999px;
    display: grid;
    place-items: center;
    color: #ffffff;
    background: linear-gradient(135deg, var(--brand), #53afff);
    font-weight: 700;
}

.flow-grid article h3 {
    margin: 10px 0 6px;
}

.flow-grid article span {
    color: var(--muted);
}

.lp-split {
    background: linear-gradient(180deg, var(--surface), var(--bg-2));
    padding: 44px 0;
}

.split-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
    align-items: center;
}

.split-grid h2 {
    margin: 8px 0;
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    max-width: 18ch;
}

.split-grid p {
    color: var(--muted);
}

.mini-panel {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 18px;
}

.mini-panel p {
    margin: 0;
    color: var(--brand);
    font-weight: 700;
}

.mini-panel ul {
    color: var(--muted);
}

.lp-pricing {
    padding: 44px 0 0;
}

.pricing-line {
    margin-top: 16px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.pricing-line article {
    padding: 16px 14px;
    min-height: 360px;
    display: flex;
    flex-direction: column;
}

.pricing-line article + article {
    border-left: 1px solid var(--line);
}

.pricing-line h3 {
    margin: 0;
}

.pricing-line p {
    margin: 6px 0;
    font-size: 1.9rem;
}

.pricing-line p span {
    font-size: 0.9rem;
    color: var(--muted);
}

.pricing-line small {
    color: var(--muted);
    display: block;
    margin-bottom: 12px;
    min-height: 38px;
}

.plan-specs {
    margin: 0 0 14px;
    flex: 1;
}

.plan-specs p {
    margin: 0;
    padding: 8px 0;
    display: flex;
    justify-content: space-between;
    gap: 10px;
    border-top: 1px solid var(--line);
    font-size: 0.92rem;
}

.plan-specs p span {
    color: var(--muted);
}

.plan-specs p strong {
    color: var(--text);
    text-align: right;
}

.pricing-line .highlight {
    background: linear-gradient(180deg, var(--bg-2), var(--surface-soft));
}

.billing-box {
    margin-top: 18px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface);
    padding: 14px;
}

.billing-form {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 8px;
}

.billing-form select {
    border: 1px solid var(--line);
    border-radius: 9px;
    padding: 10px;
    background: var(--surface);
    color: var(--text);
}

.billing-form [disabled] {
    opacity: 0.72;
    cursor: not-allowed;
}

.billing-preview {
    margin: 10px 0 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface-soft);
    padding: 10px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.billing-preview p {
    margin: 0;
    font-size: 0.9rem;
}

.billing-preview p strong {
    color: var(--muted);
    margin-right: 4px;
}

.billing-result {
    margin-top: 12px;
    border-top: 1px solid var(--line);
    padding-top: 10px;
    display: none;
}

.billing-result.open {
    display: block;
}

.billing-result textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 9px;
    min-height: 84px;
    padding: 8px;
    margin-top: 8px;
    color: var(--text);
    background: var(--surface);
}

.billing-result img {
    max-width: 240px;
    margin-top: 8px;
    border: 1px solid var(--line);
    border-radius: 10px;
    display: block;
}

.checkout-main {
    width: 100%;
    padding: 22px 0 64px;
}

.checkout-shell {
    padding: 16px 0 0;
}

.checkout-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 20px;
    align-items: start;
}

.checkout-panel {
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--surface);
    padding: 18px;
}

.checkout-form-panel h1 {
    margin: 8px 0 10px;
    font-size: clamp(1.6rem, 3.4vw, 2.5rem);
    max-width: 22ch;
}

.checkout-plan-picker {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin: 14px 0;
}

.checkout-plan-btn {
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface);
    color: var(--text);
    padding: 10px 8px;
    font-weight: 700;
    cursor: pointer;
}

.checkout-plan-btn.is-active {
    border-color: color-mix(in srgb, var(--brand) 55%, var(--line));
    background: color-mix(in srgb, var(--brand) 13%, var(--surface));
}

.checkout-billing-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 8px;
}

.checkout-billing-form button {
    grid-column: 1 / -1;
}

.checkout-summary-panel h2 {
    margin-top: 0;
}

.checkout-preview {
    grid-template-columns: 1fr;
}

.checkout-highlights {
    margin: 14px 0;
    padding-left: 18px;
    color: var(--muted);
}

.checkout-result {
    margin-top: 14px;
}

.hero h1 {
    margin: 8px 0 10px;
    font-size: clamp(2rem, 4.6vw, 3.4rem);
    line-height: 1.04;
    max-width: 17ch;
}

.hero-sub,
.page-head p,
.dim {
    color: var(--muted);
}

.hero-card,
.proof-card,
.card,
.plan,
.sim-chat,
.sim-panel {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 18px;
}

.hero-card {
    padding: 24px;
    box-shadow: 0 16px 45px rgba(23, 38, 56, 0.09);
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border-radius: 11px;
    min-height: 38px;
    padding: 9px 14px;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid transparent;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

.btn-primary {
    background: linear-gradient(135deg, var(--brand), #4da7ff);
    color: #ffffff;
    box-shadow: 0 8px 18px rgba(30, 139, 255, 0.2);
}

.btn-ghost {
    color: var(--text);
    border-color: var(--line);
    background: var(--surface);
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-primary:hover {
    box-shadow: 0 12px 24px rgba(30, 139, 255, 0.26);
}

.btn-ghost:hover {
    border-color: color-mix(in srgb, var(--brand) 45%, var(--line));
    background: color-mix(in srgb, var(--brand) 10%, var(--surface));
}

.hero-meta {
    margin-top: 16px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.hero-meta .item {
    background: var(--bg-2);
    border-radius: 12px;
    padding: 10px;
}

.hero-meta .item strong {
    display: block;
    font-size: 1.2rem;
}

.hero-meta .item span {
    color: var(--muted);
    font-size: 0.85rem;
}

.proof-card {
    padding: 18px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: linear-gradient(180deg, #ffffff, #f4f8fc);
}

.proof-card h3 {
    margin: 4px 0;
}

.proof-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.proof-list li {
    padding: 10px 0;
    border-bottom: 1px solid var(--line);
    color: var(--muted);
}

.logo-row {
    margin-top: 16px;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
}

.logo-row span {
    border: 1px dashed #c8d9ec;
    border-radius: 10px;
    padding: 8px;
    text-align: center;
    font-family: "IBM Plex Mono", monospace;
    color: #6e8299;
    font-size: 0.76rem;
}

.section-title {
    margin: 36px 0 0;
    font-size: 1.6rem;
}

.section-sub {
    color: var(--muted);
    margin-top: 8px;
}

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

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

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

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

.card {
    padding: 16px;
}

.feature-icon {
    display: inline-block;
    background: #e9f3ff;
    color: var(--brand);
    font-size: 0.78rem;
    border-radius: 999px;
    padding: 4px 10px;
    margin-bottom: 8px;
}

.plan {
    padding: 18px;
}

.plan-name {
    margin: 0;
    color: var(--muted);
}

.plan-price {
    margin: 8px 0 12px;
    font-size: 2rem;
}

.plan-price span {
    font-size: 0.95rem;
    color: var(--muted);
}

.plan ul {
    margin: 0;
    padding-left: 18px;
    color: var(--muted);
}

.featured {
    border-color: #8ac0ff;
    box-shadow: 0 12px 36px rgba(30, 139, 255, 0.18);
    transform: translateY(-3px);
}

.cta-strip {
    margin-top: 24px;
    padding: 16px;
    border-radius: 16px;
    border: 1px solid #cae2ff;
    background: linear-gradient(90deg, #edf6ff, #ecfbf7);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.page-head h1 {
    margin: 6px 0;
}

.page-head-top {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
}

.tenant-switch {
    display: grid;
    gap: 4px;
    min-width: 280px;
}

.tenant-switch label {
    font-size: 0.78rem;
    color: var(--muted);
    font-weight: 600;
}

.tenant-switch select {
    border: 1px solid var(--line);
    border-radius: 9px;
    padding: 9px 10px;
    background: var(--surface);
    color: var(--text);
    font-family: "Space Grotesk", sans-serif;
}

.tenant-switch small {
    color: var(--muted);
    font-size: 0.78rem;
}

.plan-current {
    margin-top: 16px;
}

.plan-current-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    flex-wrap: wrap;
}

.plan-current-head h3 {
    margin: 4px 0;
}

.plan-current-price {
    font-size: 1.7rem;
    font-weight: 700;
}

.plan-remaining {
    margin: 10px 0 0;
    color: var(--muted);
}

.plan-remaining.warn {
    color: #b45309;
    font-weight: 700;
}

:root[data-theme="dark"] .plan-remaining.warn {
    color: #ffc46b;
}

.plan-limits {
    margin-top: 10px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.plan-limits p {
    margin: 0;
    background: var(--surface-soft);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 8px 10px;
    font-size: 0.9rem;
}

.plan-limits p strong {
    color: var(--muted);
}

.team-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.team-item {
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface-soft);
    padding: 8px 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.team-person {
    display: block;
    margin-bottom: 3px;
}

.team-mail {
    display: block;
}

.team-role {
    font-family: "IBM Plex Mono", monospace;
    color: var(--muted);
    font-size: 0.82rem;
}

.team-capacity {
    margin: 8px 0 12px;
    display: grid;
    gap: 4px;
}

.team-capacity p {
    margin: 0;
}

.team-actions {
    display: flex;
    gap: 6px;
    align-items: center;
}

.team-actions button {
    padding: 7px 10px;
    min-height: 34px;
}

.billing-table td input[type="text"],
.billing-table td input[type="email"],
.billing-table td select {
    width: 100%;
    min-width: 150px;
}

.team-delete-btn {
    background: #c2410c;
}

.team-delete-panel {
    margin-top: 8px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface-soft);
    display: grid;
    gap: 8px;
    min-width: 260px;
}

.team-delete-panel p {
    margin: 0;
}

.team-delete-panel input,
.team-delete-panel select {
    min-width: 220px;
}

.team-delete-actions {
    display: flex;
    gap: 6px;
}

.team-delete-actions .team-cancel-btn {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--line);
}

.team-delete-modal-body {
    margin-top: 10px;
    display: grid;
    gap: 8px;
}

.team-delete-modal-body p {
    margin: 0;
}

.simulator-wrap {
    margin-top: 16px;
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: 14px;
}

.sim-header {
    padding: 12px;
    border-bottom: 1px solid var(--line);
}

.sim-messages,
.widget-messages {
    padding: 12px;
    height: 320px;
    overflow: auto;
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.sim-form,
.widget-form {
    display: flex;
    gap: 8px;
    padding: 12px;
    border-top: 1px solid var(--line);
}

input {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 9px;
    padding: 10px;
    color: var(--text);
    background: var(--surface);
}

select {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 9px;
    padding: 10px;
    color: var(--text);
    background: var(--surface);
    font-family: "Space Grotesk", sans-serif;
}

button {
    border: 1px solid transparent;
    border-radius: 9px;
    min-height: 36px;
    padding: 7px 12px;
    font-weight: 600;
    font-family: "Space Grotesk", sans-serif;
    line-height: 1.2;
    background: var(--brand);
    color: #ffffff;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

button:hover:not(:disabled) {
    border-color: color-mix(in srgb, #ffffff 28%, transparent);
    box-shadow: 0 8px 18px rgba(23, 38, 56, 0.16);
}

button:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

.msg {
    max-width: 84%;
    padding: 9px 10px;
    border-radius: 10px;
    line-height: 1.35;
    border: 1px solid var(--line);
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.msg.bot {
    background: var(--surface-soft);
}

.msg.user {
    align-self: flex-end;
    background: #e9f3ff;
    border-color: #b8d8ff;
}

.msg a {
    color: #0072d6;
    text-decoration: underline;
    text-underline-offset: 2px;
    font-weight: 600;
}

.msg a:visited {
    color: #5f3dc4;
}

:root[data-theme="dark"] .msg a {
    color: #8fd0ff;
}

:root[data-theme="dark"] .msg a:visited {
    color: #b4dbff;
}

.sim-panel {
    padding: 14px;
}

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

.stat h3 {
    margin: 8px 0 2px;
    font-size: 1.8rem;
}

.stat small {
    color: var(--brand);
}

.bar {
    margin: 8px 0;
    border-radius: 10px;
    border: 1px solid var(--line);
    overflow: hidden;
}

.bar span {
    display: block;
    color: #ffffff;
    background: linear-gradient(90deg, var(--brand), var(--brand-2));
    padding: 8px;
    font-size: 0.85rem;
    font-family: "IBM Plex Mono", monospace;
}

.list-clean {
    list-style: none;
    margin: 0;
    padding: 0;
    color: var(--muted);
}

textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 9px;
    padding: 10px;
    color: var(--text);
    background: var(--surface);
    font-family: "Space Grotesk", sans-serif;
}

.mono-text {
    font-family: "IBM Plex Mono", monospace;
    font-size: 0.86rem;
}

.row-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
}

.wa-channels-list {
    border: 1px solid var(--line);
    border-radius: 12px;
    overflow: hidden;
}

.wa-channel-row {
    display: grid;
    grid-template-columns: 1.5fr 1fr auto;
    gap: 10px;
    align-items: center;
    padding: 10px 12px;
    border-bottom: 1px solid var(--line);
}

.wa-channel-row:nth-child(odd) {
    background: var(--surface);
}

.wa-channel-row:nth-child(even) {
    background: var(--surface-soft);
}

.wa-channel-row:last-child {
    border-bottom: 0;
}

.wa-channel-main strong {
    display: block;
}

.wa-channel-title-edit {
    display: flex;
    align-items: center;
    gap: 8px;
}

.wa-channel-title-edit input[type="text"] {
    min-width: 0;
    max-width: 320px;
}

.wa-channel-title-edit button {
    min-height: 34px;
    padding: 6px 10px;
}

.wa-channel-main small {
    color: var(--muted);
    font-family: "IBM Plex Mono", monospace;
}

.wa-channel-status {
    font-family: "IBM Plex Mono", monospace;
    font-size: 0.84rem;
    color: var(--muted);
}

.wa-channel-actions {
    display: flex;
    gap: 8px;
}

.wa-channel-extra {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    border-top: 1px dashed var(--line);
    padding-top: 8px;
}

.wa-schedule-editor {
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface);
    padding: 10px;
}

.wa-schedule-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(340px, 1fr));
    gap: 8px;
    overflow-x: auto;
}

.wa-day-card {
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface-soft);
    padding: 8px;
    min-height: 120px;
    min-width: 0;
}

.wa-day-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 0.84rem;
}

.wa-ranges {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.wa-range-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 4px;
    min-width: 0;
}

.wa-range-row input[type="time"] {
    width: 100%;
    min-width: 0;
    padding: 4px 6px;
}

.wa-range-row button {
    padding: 0 8px;
    min-width: 28px;
}

.wa-24h-tag {
    font-size: 0.78rem;
    color: var(--muted);
    font-family: "IBM Plex Mono", monospace;
}

@media (max-width: 980px) {
    .wa-schedule-grid {
        grid-template-columns: repeat(2, minmax(340px, 1fr));
        overflow-x: visible;
    }
}

@media (max-width: 640px) {
    .wa-schedule-grid {
        grid-template-columns: 1fr;
    }
}

.wa-btn-muted {
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--line);
}

.wa-modal[hidden] {
    display: none;
}

.wa-modal {
    position: fixed;
    inset: 0;
    z-index: 90;
}

.wa-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
}

.wa-modal-card {
    position: relative;
    width: min(620px, 92vw);
    margin: 60px auto;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 14px;
    box-shadow: 0 20px 45px rgba(23, 38, 56, 0.25);
}

.wa-modal-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.wa-modal-head h3 {
    margin: 0;
}

.wa-modal-close {
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--line);
}

.wa-qr-shell {
    margin-top: 10px;
    margin-bottom: 8px;
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    border: 2px solid #ffffff;
    border-radius: 12px;
    background: #ffffff;
}

[data-wa-qr-box] {
    position: relative;
    z-index: 1;
    width: 220px;
    height: 220px;
    background: #ffffff;
}

[data-wa-qr-box] img,
[data-wa-qr-box] canvas {
    display: block;
}

.wa-qr-loading {
    position: absolute;
    inset: 12px;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    border-radius: 8px;
    pointer-events: none;
}

.wa-qr-loading.is-hidden {
    display: none !important;
}

.wa-qr-spinner {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    border: 3px solid #d7d7d7;
    border-top-color: #000000;
    animation: spin 0.9s linear infinite;
}

.rag-list {
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.rag-item {
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface-soft);
    padding: 10px;
}

.rag-item-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.rag-item strong {
    display: block;
    margin-bottom: 0;
}

.rag-editor {
    margin-top: 10px;
    border-top: 1px solid var(--line);
    padding-top: 10px;
    display: grid;
    gap: 8px;
}

.rag-policy-grid {
    display: grid;
    gap: 10px;
}

.rag-policy-grid label {
    display: grid;
    gap: 6px;
    font-size: 0.9rem;
    color: var(--muted);
}

[data-rag-add] {
    margin-bottom: 8px;
}

.billing-orders {
    overflow-x: auto;
}

.billing-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.billing-table th,
.billing-table td {
    text-align: left;
    border-bottom: 1px solid var(--line);
    padding: 8px 6px;
    white-space: nowrap;
}

.billing-table th {
    color: var(--muted);
    font-weight: 600;
}

.billing-link {
    color: var(--brand);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 3px 10px;
    font-size: 0.78rem;
    font-weight: 700;
    border: 1px solid transparent;
}

.status-badge.paid {
    color: #0f7a4d;
    background: #dff6eb;
    border-color: #9fdabd;
}

.status-badge.pending {
    color: #8a5a00;
    background: #fff3d6;
    border-color: #f1d59a;
}

.status-badge.canceled {
    color: #96272a;
    background: #fde5e7;
    border-color: #f0b7bd;
}

:root[data-theme="dark"] .status-badge.paid {
    color: #baf2d8;
    background: #133428;
    border-color: #245f48;
}

:root[data-theme="dark"] .status-badge.pending {
    color: #ffe4a6;
    background: #3b2e12;
    border-color: #6d5421;
}

:root[data-theme="dark"] .status-badge.canceled {
    color: #ffc7cc;
    background: #3d1c20;
    border-color: #6f3138;
}

.list-clean li {
    padding: 7px 0;
    border-bottom: 1px solid var(--line);
}

.help-grid {
    align-items: stretch;
}

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

.help-list a {
    color: var(--brand);
    font-weight: 600;
}

.att-msg-list {
    display: grid;
    gap: 10px;
    max-height: 460px;
    overflow: auto;
    padding: 10px;
    padding-right: 8px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: color-mix(in srgb, var(--surface-soft) 70%, var(--surface));
}

.att-msg {
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 10px;
    background: var(--surface-soft);
    max-width: 82%;
    animation: rise 0.14s ease-out;
}

.att-msg header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
}

.att-msg header strong {
    text-transform: uppercase;
    font-size: 0.72rem;
    letter-spacing: 0.08em;
}

.att-msg header small {
    color: var(--muted);
}

.att-msg-user {
    border-color: var(--pill-border);
    background: color-mix(in srgb, var(--brand) 14%, var(--surface));
    margin-left: auto;
}

.att-msg-assistant {
    border-color: color-mix(in srgb, var(--brand-2) 38%, var(--line));
    background: color-mix(in srgb, var(--brand-2) 12%, var(--surface));
    margin-right: auto;
}

.att-msg-body {
    line-height: 1.45;
    word-break: break-word;
}

.att-msg-body img {
    max-width: min(320px, 100%);
    border-radius: 10px;
    border: 1px solid var(--line);
    display: block;
}

.att-msg-body audio {
    width: min(320px, 100%);
    display: block;
}

.media-link {
    display: inline-block;
    margin-top: 6px;
    color: var(--brand);
    text-decoration: none;
    font-weight: 600;
}

.media-caption {
    margin-top: 8px;
}

.att-media-pill {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 999px;
    border: 1px solid var(--line);
    color: var(--muted);
    font-size: 0.78rem;
}

.wa-code {
    font-family: "IBM Plex Mono", monospace;
    background: rgba(0, 0, 0, 0.06);
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 1px 4px;
}

:root[data-theme="dark"] .att-msg {
    background: var(--surface-soft);
}

:root[data-theme="dark"] .att-msg-user {
    border-color: color-mix(in srgb, var(--brand) 45%, var(--line));
    background: color-mix(in srgb, var(--brand) 20%, var(--surface));
}

:root[data-theme="dark"] .att-msg-assistant {
    border-color: color-mix(in srgb, var(--brand-2) 45%, var(--line));
    background: color-mix(in srgb, var(--brand-2) 16%, var(--surface));
}

:root[data-theme="dark"] .wa-code {
    background: rgba(255, 255, 255, 0.08);
}

[data-att-conversations] {
    border: 1px solid var(--line);
    border-radius: 12px;
    background: color-mix(in srgb, var(--surface) 84%, var(--surface-soft));
    padding: 6px;
    max-height: 560px;
    overflow: auto;
}

.att-conv-item {
    border-radius: 12px;
    border: 1px solid transparent;
    background: transparent;
    display: grid;
    grid-template-columns: 1fr;
    align-items: stretch;
    gap: 6px;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.att-conv-item:hover {
    background: color-mix(in srgb, var(--brand) 8%, var(--surface));
    border-color: color-mix(in srgb, var(--brand) 30%, var(--line));
}

.att-conv-item.active {
    background: color-mix(in srgb, var(--brand-2) 12%, var(--surface));
    border-color: color-mix(in srgb, var(--brand-2) 34%, var(--line));
}

.att-conv-open {
    display: grid;
    gap: 2px;
}

.att-meta-row {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.att-pill {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 2px 8px;
    font-size: 0.72rem;
    font-family: "IBM Plex Mono", monospace;
    color: var(--muted);
    background: color-mix(in srgb, var(--surface-soft) 76%, var(--surface));
}

.att-pill-status.is-new {
    border-color: color-mix(in srgb, #68a7ff 45%, var(--line));
    color: #236ed3;
}

.att-pill-status.is-progress {
    border-color: color-mix(in srgb, #26c2a1 45%, var(--line));
    color: #107b66;
}

.att-pill-status.is-closed {
    border-color: color-mix(in srgb, #d89aa8 45%, var(--line));
    color: #944056;
}

.att-conv-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.att-conv-actions button {
    min-height: 32px;
    padding: 6px 10px;
    font-size: 0.84rem;
}

[data-att-detail] {
    border: 1px solid var(--line);
    border-radius: 12px;
    background: color-mix(in srgb, var(--surface) 88%, var(--surface-soft));
    padding: 12px;
}

:root[data-theme="dark"] [data-att-conversations],
:root[data-theme="dark"] [data-att-detail],
:root[data-theme="dark"] .att-msg-list {
    background: color-mix(in srgb, var(--surface-soft) 82%, var(--surface));
}

.att-thread-panel {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.atendimento-layout {
    grid-template-columns: minmax(260px, 340px) minmax(0, 1fr);
}

.att-thread-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.att-thread-actions button {
    min-height: 34px;
    padding: 7px 10px;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, opacity 0.15s ease;
}

.att-thread-actions button:hover:not(:disabled) {
    border-color: color-mix(in srgb, var(--brand) 45%, var(--line));
    background: color-mix(in srgb, var(--brand) 10%, var(--surface));
}

.att-thread-actions button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    filter: grayscale(0.2);
}

.att-thread-head {
    position: sticky;
    top: 0;
    z-index: 1;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface);
    padding: 10px 12px;
    display: grid;
    gap: 2px;
}

.att-thread-head small {
    color: var(--muted);
    font-family: "IBM Plex Mono", monospace;
    font-size: 0.75rem;
}

.att-msg-top {
    display: flex;
    align-items: center;
    gap: 8px;
}

.att-msg-avatar {
    width: 24px;
    height: 24px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.66rem;
    font-weight: 700;
    font-family: "IBM Plex Mono", monospace;
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--muted);
}

.att-composer {
    border: 1px solid var(--line);
    border-radius: 12px;
    background: color-mix(in srgb, var(--surface) 90%, var(--surface-soft));
    padding: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    overflow: hidden;
}

.att-file-btn {
    border: 1px solid var(--line);
    border-radius: 9px;
    padding: 8px 10px;
    cursor: pointer;
    font-family: "IBM Plex Mono", monospace;
    font-size: 0.75rem;
    background: color-mix(in srgb, var(--surface-soft) 78%, var(--surface));
}

.file-input {
    display: none;
}

.att-file-name {
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--muted);
    font-size: 0.75rem;
    font-family: "IBM Plex Mono", monospace;
}

.att-reply-input {
    flex: 1;
    min-width: 0;
}

:root[data-theme="dark"] .att-thread-head,
:root[data-theme="dark"] .att-composer {
    background: color-mix(in srgb, var(--surface-soft) 80%, var(--surface));
}

:root[data-theme="dark"] .att-pill-status.is-new {
    color: #8dc2ff;
}

:root[data-theme="dark"] .att-pill-status.is-progress {
    color: #7de5cd;
}

:root[data-theme="dark"] .att-pill-status.is-closed {
    color: #f4b2c2;
}

.att-transfer-list {
    margin-top: 8px;
    display: grid;
    gap: 6px;
    max-height: min(45vh, 320px);
    overflow: auto;
}

.att-transfer-item {
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface-soft);
    color: var(--text);
    text-align: left;
    padding: 9px 10px;
    cursor: pointer;
    display: grid;
    gap: 2px;
}

.att-transfer-item strong {
    font-size: 0.92rem;
}

.att-transfer-item small {
    color: var(--muted);
    font-family: "IBM Plex Mono", monospace;
    font-size: 0.74rem;
}

.att-transfer-item:hover {
    border-color: color-mix(in srgb, var(--brand) 45%, var(--line));
    background: color-mix(in srgb, var(--brand) 10%, var(--surface));
}

@media (max-width: 960px) {
    .atendimento-layout {
        grid-template-columns: 1fr;
    }

    .att-composer {
        flex-wrap: wrap;
    }

    .att-file-name {
        flex-basis: 100%;
        max-width: none;
        order: 4;
    }
}

.vcard {
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface);
    padding: 10px;
    display: grid;
    gap: 6px;
}

.vcard-photo {
    width: 56px;
    height: 56px;
    border-radius: 999px;
    object-fit: cover;
}

.vcard-title {
    font-weight: 700;
}

.vcard-row {
    font-size: 0.9rem;
}

.vcard-desc {
    color: var(--muted);
}

.vcard-download {
    color: var(--brand);
    font-weight: 600;
    text-decoration: none;
}

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

.kanban .col {
    background: var(--surface-soft);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 10px;
}

.kanban .col p {
    margin: 8px 0;
    padding: 8px;
    border-radius: 8px;
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--muted);
}

.mock-site {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 14px;
}

.floating-widget {
    position: fixed;
    right: 16px;
    bottom: 16px;
    width: min(360px, calc(100vw - 24px));
    z-index: 30;
}

.widget-trigger {
    width: 100%;
    padding: 11px;
    box-shadow: 0 10px 24px rgba(30, 139, 255, 0.28);
}

.widget-shell {
    margin-top: 8px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface);
    overflow: hidden;
    max-height: 0;
    transition: max-height 240ms ease;
}

.widget-shell.open {
    max-height: 520px;
}

.widget-head {
    padding: 11px;
    border-bottom: 1px solid var(--line);
    font-family: "IBM Plex Mono", monospace;
    background: var(--soft-panel);
}

@media (max-width: 900px) {
    .lp-hero-grid,
    .trust-row,
    .flow-grid,
    .split-grid,
    .pricing-line,
    .checkout-grid,
    .checkout-plan-picker,
    .billing-form,
    .billing-preview,
    .hero,
    .grid-2,
    .grid-3,
    .grid-4,
    .logo-row,
    .simulator-wrap,
    .kanban-board,
    .mock-site,
    .hero-meta {
        grid-template-columns: 1fr;
    }

    .plan-specs p {
        flex-direction: column;
        align-items: flex-start;
    }

    .plan-specs p strong {
        text-align: left;
    }

    .cta-strip {
        flex-direction: column;
        align-items: flex-start;
    }
}
