.hidden { display: none !important; }
.flow-page, .admin-page, .basic-page { min-height: 100vh; background: var(--background); color: var(--text); }
.flow-header, .admin-header { display: flex; min-height: 78px; align-items: center; justify-content: space-between; gap: 24px; padding: 14px clamp(20px, 4vw, 64px); border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--background) 88%, transparent); }
.flow-brand { display: inline-flex; align-items: center; gap: 12px; color: var(--text); font-family: var(--display-font); font-size: 1.08rem; font-weight: 800; text-decoration: none; }
.flow-brand small { display: block; margin-top: 3px; color: var(--muted); font: 650 .65rem/1.2 Inter, sans-serif; letter-spacing: .05em; }
.flow-brand-mark { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 13px; background: var(--accent); color: var(--accent-ink); }
.secure-label, .status-chip { padding: 9px 13px; border: 1px solid var(--line-strong); border-radius: 999px; color: var(--muted); font-size: .72rem; font-weight: 750; }
.flow-main { display: grid; width: min(1180px, calc(100% - 40px)); min-height: calc(100vh - 140px); margin: 32px auto; grid-template-columns: minmax(280px, .8fr) minmax(500px, 1.35fr); overflow: hidden; border: 1px solid var(--line); border-radius: 28px; background: var(--panel); box-shadow: var(--panel-shadow); }
.flow-aside { display: flex; flex-direction: column; padding: clamp(30px, 5vw, 64px); background: var(--profile-featured); }
.flow-aside h1 { margin: 18px 0; font-family: var(--display-font); font-size: clamp(2.1rem, 4vw, 3.7rem); line-height: .98; }
.flow-aside > p:not(.eyebrow) { color: var(--muted); line-height: 1.7; }
.progress-list { display: grid; gap: 17px; margin: 40px 0; padding: 0; list-style: none; }
.progress-list li { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: .83rem; font-weight: 750; }
.progress-list li span { display: grid; width: 30px; height: 30px; place-items: center; border: 1px solid var(--line-strong); border-radius: 50%; }
.progress-list li.active { color: var(--text); }.progress-list li.active span { border-color: var(--accent); background: var(--accent); color: var(--accent-ink); }
.trust-note { display: grid; gap: 7px; margin-top: auto; padding-top: 22px; border-top: 1px solid var(--line); font-size: .75rem; line-height: 1.5; }.trust-note span { color: var(--muted); }
.flow-card { padding: clamp(30px, 5vw, 64px); background: var(--panel-raised); }
fieldset { min-width: 0; margin: 0; padding: 0; border: 0; } legend { margin-bottom: 28px; font-family: var(--display-font); font-size: clamp(1.65rem, 3vw, 2.4rem); font-weight: 800; } legend span { display: block; margin-bottom: 8px; color: var(--accent-text); font: 800 .7rem/1.2 Inter, sans-serif; letter-spacing: .12em; text-transform: uppercase; }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }.field.full { grid-column: 1 / -1; }
.field { display: grid; gap: 8px; margin-bottom: 20px; color: var(--text); font-size: .78rem; font-weight: 750; }.field > span small { color: var(--muted); font-weight: 500; }.field > small { color: var(--muted); font-weight: 500; }
.field input, .field select, .field textarea { width: 100%; min-height: 48px; padding: 11px 13px; border: 1px solid var(--line-strong); border-radius: 12px; outline: 0; background: var(--panel); color: var(--text); font: inherit; }.field input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
.choice-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }.choice { display: flex; min-height: 48px; align-items: center; gap: 9px; padding: 11px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); cursor: pointer; }.choice:has(input:checked) { border-color: var(--accent); background: var(--profile-featured); }.choice input { accent-color: var(--accent); }
.catalog-preview, .review-panel, .verification-explainer, .building-box { padding: 17px; border: 1px solid var(--line); border-radius: 15px; background: var(--panel); }.catalog-preview { display: flex; justify-content: space-between; gap: 14px; margin-top: 20px; }.catalog-preview span { color: var(--muted); font-size: .78rem; }
.verification-explainer { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 10px; }.verification-explainer span { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: .72rem; }.verification-explainer b { display: grid; width: 24px; height: 24px; place-items: center; border-radius: 50%; background: var(--accent); color: var(--accent-ink); }
.review-panel { display: grid; gap: 12px; margin-bottom: 20px; }.review-row { display: flex; justify-content: space-between; gap: 20px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }.review-row:last-child { padding: 0; border: 0; }.review-row span { color: var(--muted); font-size: .78rem; }
.check-field { display: flex; gap: 11px; color: var(--muted); font-size: .78rem; line-height: 1.55; }.check-field input { margin-top: 3px; accent-color: var(--accent); }.form-note { color: var(--muted); font-size: .78rem; line-height: 1.6; }
.flow-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 28px; }.form-error, .status-banner { margin: 18px 0; padding: 12px 14px; border: 1px solid #dc5858; border-radius: 11px; background: #dc585817; color: #e27a7a; font-size: .8rem; }.status-banner.success { border-color: #36b276; background: #36b27617; color: #53c990; }
.verification-panel h2 { font-family: var(--display-font); font-size: 2rem; }.verification-panel > p { color: var(--muted); line-height: 1.65; }.verification-panel form { display: flex; align-items: end; gap: 10px; margin: 25px 0; }.verification-panel form .field { flex: 1; margin: 0; }.check-list { display: grid; gap: 9px; }.check-item { display: flex; justify-content: space-between; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: .8rem; }.check-ok { color: #50c88d; }.check-pending { color: var(--muted); }.building-box { display: flex; align-items: center; gap: 15px; margin-top: 22px; }.building-box p { margin: 4px 0 0; color: var(--muted); font-size: .78rem; }.spinner { width: 28px; height: 28px; border: 3px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin .9s linear infinite; } @keyframes spin { to { transform: rotate(360deg); } }
.admin-main { width: min(1280px, calc(100% - 40px)); margin: 42px auto; }.login-card { width: min(480px, 100%); margin: 8vh auto; padding: 36px; border: 1px solid var(--line); border-radius: 24px; background: var(--panel); }.login-card h1 { font-family: var(--display-font); }.login-card p { color: var(--muted); line-height: 1.6; }.login-card .button { width: 100%; }
.dashboard-heading, .section-title { display: flex; align-items: end; justify-content: space-between; gap: 20px; }.dashboard-heading h1, .admin-section h2 { margin: 8px 0; font-family: var(--display-font); font-size: 2.5rem; }.dashboard-heading p { color: var(--muted); }.metric-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 30px 0; }.metric-card, .integration-card { padding: 20px; border: 1px solid var(--line); border-radius: 18px; background: var(--panel); }.metric-card span { display: block; color: var(--muted); font-size: .72rem; }.metric-card strong { display: block; margin-top: 8px; font-family: var(--display-font); font-size: 2rem; }.admin-section { margin-top: 28px; padding: 25px; border: 1px solid var(--line); border-radius: 22px; background: var(--panel); }.integration-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }.integration-card { background: var(--panel-raised); }.integration-card header { display: flex; justify-content: space-between; }.integration-card p { color: var(--muted); font-size: .78rem; line-height: 1.55; }.ready-dot { color: #50c88d; }.blocked-dot { color: #e7a253; }.table-wrap { overflow-x: auto; }.admin-table { width: 100%; min-width: 850px; border-collapse: collapse; }.admin-table th, .admin-table td { padding: 14px 10px; border-bottom: 1px solid var(--line); text-align: left; font-size: .76rem; }.admin-table th { color: var(--muted); }.mini-button { padding: 7px 10px; border: 1px solid var(--line-strong); border-radius: 9px; background: transparent; color: var(--text); cursor: pointer; }
.basic-page { display: grid; grid-template-columns: 250px 1fr; }.basic-sidebar { position: sticky; top: 0; display: flex; height: 100vh; flex-direction: column; padding: 26px 20px; border-right: 1px solid var(--line); background: var(--panel); }.basic-sidebar nav { display: grid; gap: 5px; margin-top: 38px; }.basic-sidebar nav a, .upgrade-link { padding: 11px 13px; border-radius: 10px; color: var(--muted); font-size: .78rem; font-weight: 700; text-decoration: none; }.basic-sidebar nav a.active, .basic-sidebar nav a:hover { background: var(--profile-featured); color: var(--text); }.upgrade-link { margin-top: auto; border: 1px solid var(--accent-border); color: var(--accent-text); }.basic-main { padding: 34px clamp(24px, 5vw, 70px); }.basic-main > header { display: flex; justify-content: space-between; }.basic-main h1 { margin: 5px 0; font-family: var(--display-font); }.basic-main header small { color: var(--muted); }.basic-welcome { display: flex; align-items: center; justify-content: space-between; gap: 30px; margin: 30px 0; padding: 28px; border: 1px solid var(--line); border-radius: 22px; background: var(--profile-featured); }.basic-welcome h2 { font-family: var(--display-font); }.basic-welcome p { color: var(--muted); }.completion-ring { display: grid; min-width: 95px; height: 95px; place-items: center; align-content: center; border: 8px solid var(--accent); border-right-color: var(--line); border-radius: 50%; font-size: 1.1rem; font-weight: 850; }.completion-ring small { color: var(--muted); font-size: .6rem; }.basic-modules { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }.basic-modules article { min-height: 155px; padding: 20px; border: 1px solid var(--line); border-radius: 18px; background: var(--panel); }.basic-modules article > span { color: var(--accent-text); font-size: .7rem; font-weight: 800; }.basic-modules h3 { margin: 12px 0 7px; }.basic-modules p { margin: 0; color: var(--muted); font-size: .78rem; line-height: 1.5; }
@media (max-width: 850px) { .flow-main { grid-template-columns: 1fr; }.flow-aside { padding: 30px; }.progress-list { grid-template-columns: repeat(4, 1fr); }.progress-list li { display: grid; justify-items: center; text-align: center; font-size: .65rem; }.trust-note { display: none; }.metric-grid, .basic-modules { grid-template-columns: repeat(2, 1fr); }.basic-page { grid-template-columns: 1fr; }.basic-sidebar { position: static; height: auto; }.basic-sidebar nav { display: none; }.upgrade-link { margin-top: 20px; }.integration-grid { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .secure-label { display: none; }.flow-main, .admin-main { width: min(100% - 20px, 100%); margin: 10px auto; border-radius: 18px; }.flow-card, .flow-aside { padding: 24px 19px; }.field-grid, .choice-grid, .verification-explainer, .metric-grid, .basic-modules { grid-template-columns: 1fr; }.verification-panel form { align-items: stretch; flex-direction: column; }.flow-actions .button { flex: 1; padding: 0 10px; }.basic-welcome { align-items: flex-start; flex-direction: column; } }

/* Administração e configurações do WhatsApp Bot */
.admin-main { width: min(1440px, calc(100% - 40px)); }
.admin-header-actions { display: flex; align-items: center; gap: 10px; }
.admin-mobile-menu { display: none; min-height: 40px; padding: 0 13px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); color: var(--text); font: inherit; font-size: .75rem; font-weight: 800; cursor: pointer; }
.admin-dashboard { display: grid; grid-template-columns: 235px minmax(0, 1fr); gap: 28px; }
.admin-sidebar { position: sticky; top: 20px; height: calc(100vh - 40px); padding: 22px; border: 1px solid var(--line); border-radius: 20px; background: var(--panel); }
.admin-sidebar > strong { display: block; font-family: var(--display-font); font-size: 1.2rem; }.admin-sidebar > small { color: var(--muted); }
.admin-sidebar nav { display: grid; gap: 4px; margin-top: 28px; }.admin-sidebar a, .admin-sidebar summary { padding: 10px 11px; border-radius: 9px; color: var(--muted); font-size: .75rem; font-weight: 700; text-decoration: none; cursor: pointer; }.admin-sidebar a.active, .admin-sidebar a:hover { background: var(--profile-featured); color: var(--text); }.admin-sidebar details a { display: block; padding-left: 24px; }.admin-content { min-width: 0; }
.section-title p { margin: 4px 0; color: var(--muted); font-size: .8rem; }.entity-list { display: grid; gap: 9px; margin-top: 15px; }.entity-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 14px; border: 1px solid var(--line); border-radius: 13px; background: var(--panel-raised); }.entity-row strong, .entity-row span { display: block; }.entity-row div > span { margin-top: 5px; color: var(--muted); font-size: .72rem; }.empty-state { padding: 22px; border: 1px dashed var(--line-strong); border-radius: 13px; color: var(--muted); font-size: .78rem; text-align: center; }
.entity-dialog { width: min(620px, calc(100% - 24px)); max-height: calc(100vh - 30px); overflow: auto; padding: 0; border: 1px solid var(--line-strong); border-radius: 22px; background: var(--panel-raised); color: var(--text); }.entity-dialog.agent-dialog { width: min(760px, calc(100% - 24px)); }.entity-dialog::backdrop { background: #020403b5; backdrop-filter: blur(4px); }.entity-dialog form { padding: 26px; }.entity-dialog header, .entity-dialog footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; }.entity-dialog header { margin-bottom: 22px; }.entity-dialog h2 { margin: 5px 0; font-family: var(--display-font); }.entity-dialog footer { justify-content: flex-end; margin-top: 22px; }.icon-close { border: 0; background: transparent; color: var(--text); font-size: 1.8rem; cursor: pointer; }.capability-grid, .connection-choice-list { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; max-height: 300px; overflow: auto; padding: 2px; }.capability-grid .choice, .connection-choice-list .choice { min-height: 54px; font-weight: 650; line-height: 1.35; }.capability-grid .choice input, .connection-choice-list .choice input { flex: 0 0 auto; width: 17px; height: 17px; margin: 0; }.connection-choice-list:empty::before { content: "Nenhuma conexão cadastrada. O agente ficará disponível no chat do portal."; grid-column: 1 / -1; padding: 13px; border: 1px dashed var(--line-strong); border-radius: 11px; color: var(--muted); font-size: .75rem; }
.basic-sidebar nav details summary { padding: 11px 13px; color: var(--muted); font-size: .78rem; font-weight: 700; cursor: pointer; }.basic-sidebar nav details a { display: block; padding-left: 25px; font-size: .7rem; }.basic-config-section { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 24px; padding: 24px; border: 1px solid var(--line); border-radius: 20px; background: var(--panel); }.basic-config-section h2 { margin: 7px 0; font-family: var(--display-font); }.basic-config-section p { margin: 0; color: var(--muted); font-size: .78rem; }
.access-main { width: min(1080px, calc(100% - 36px)); margin: 70px auto; }.access-heading { max-width: 600px; margin-bottom: 30px; }.access-heading h1 { margin: 12px 0; font-family: var(--display-font); font-size: clamp(2.3rem, 5vw, 4rem); }.access-heading p { color: var(--muted); }.access-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; }.access-grid article { display: flex; min-height: 280px; flex-direction: column; padding: 26px; border: 1px solid var(--line); border-radius: 22px; background: var(--panel); }.access-grid article > span { color: var(--accent-text); font-size: .7rem; font-weight: 800; text-transform: uppercase; }.access-grid h2 { font-family: var(--display-font); }.access-grid p { color: var(--muted); font-size: .82rem; line-height: 1.6; }.access-grid .button { margin-top: auto; }.access-note { margin-top: 22px; color: var(--muted); font-size: .75rem; text-align: center; }
@media (max-width: 850px) { .admin-dashboard { grid-template-columns: 1fr; }.admin-sidebar { position: static; height: auto; }.admin-sidebar nav { grid-template-columns: repeat(2, 1fr); }.access-grid { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .capability-grid { grid-template-columns: 1fr; }.section-title, .basic-config-section { align-items: stretch; flex-direction: column; }.admin-mobile-menu:not(.hidden) { display: inline-flex; align-items: center; }.admin-sidebar { position: fixed; z-index: 80; inset: 76px auto 14px 12px; display: block; width: min(300px, calc(100vw - 24px)); height: auto; transform: translateX(calc(-100% - 20px)); transition: transform .22s ease; box-shadow: 18px 20px 60px #0005; }.admin-sidebar.open { transform: translateX(0); }.admin-header .flow-brand small { display: none; } }
.master-setup { display: grid; min-height: calc(100vh - 80px); place-items: center; padding: 20px; }.master-setup .login-card { margin: 0; }.master-setup [data-setup-result] .button { margin-top: 24px; }
.secret-note { margin: -5px 0 18px; color: var(--muted); font-size: .7rem; line-height: 1.5; }
.entity-actions { display: flex; align-items: center; gap: 8px; }
.mini-button.danger { border-color: #dc585899; color: #dc5858; }
.mini-button.danger:hover { background: #dc585817; }
.back-link { display: inline-flex; margin-bottom: 18px; color: var(--accent-text); font-size: .78rem; font-weight: 800; text-decoration: none; }
.model-editor-heading { align-items: center; }
.model-table-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 28px; }
.model-table-card { display: flex; min-height: 180px; flex-direction: column; padding: 20px; border: 1px solid var(--line); border-radius: 17px; background: var(--panel-raised); }
.model-table-card h3 { margin: 9px 0; font-family: var(--display-font); font-size: 1.25rem; }
.model-table-card p { margin: 0; color: var(--muted); font-size: .76rem; line-height: 1.55; }
.model-table-card .button { margin-top: auto; align-self: flex-start; }
.model-table-count { color: var(--accent-text); font-size: .7rem; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.model-records-dialog { width: min(1100px, calc(100% - 24px)); }
.dialog-shell { padding: 26px; }
.dialog-shell > header, .dialog-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.dialog-shell > header { margin-bottom: 18px; }
.dialog-shell h2 { margin: 5px 0; font-family: var(--display-font); }
.dialog-toolbar { margin-bottom: 16px; padding: 13px 0; border-block: 1px solid var(--line); }
.dialog-toolbar p { margin: 0; color: var(--muted); font-size: .78rem; }
.model-record-table { min-width: 760px; }
.model-record-table td { max-width: 250px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.record-review { display: grid; grid-template-columns: minmax(120px, .45fr) minmax(0, 1fr); margin: 18px 0 0; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.record-review dt, .record-review dd { margin: 0; padding: 11px 13px; border-bottom: 1px solid var(--line); font-size: .76rem; overflow-wrap: anywhere; }
.record-review dt { color: var(--muted); font-weight: 800; }
.record-review dd { background: var(--panel); }
.button-danger { min-height: 44px; padding: 0 18px; border: 1px solid #dc5858; border-radius: 12px; background: #dc5858; color: #fff; font-weight: 800; cursor: pointer; }
@media (max-width: 980px) { .model-table-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .model-table-grid { grid-template-columns: 1fr; }.dialog-toolbar { align-items: stretch; flex-direction: column; }.dialog-toolbar .button { width: 100%; }.model-editor-heading { align-items: stretch; }.record-review { grid-template-columns: 1fr; }.record-review dt { padding-bottom: 3px; border-bottom: 0; }.record-review dd { padding-top: 3px; } }

/* Suíte de conexão e atendimento pelo WhatsApp Web */
.wa-web-notice { display: flex; gap: 10px 20px; margin: 18px 0; padding: 14px 16px; border: 1px solid #d9902f66; border-radius: 13px; background: #d9902f12; color: var(--muted); font-size: .76rem; line-height: 1.5; }
.wa-web-notice strong { flex: none; color: var(--text); }
.wa-pairing-dialog { width: min(720px, calc(100% - 24px)); }
.wa-pairing-dialog .dialog-shell { padding: 26px; }
.wa-pairing-dialog .dialog-shell > header, .wa-pairing-dialog .dialog-shell > footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.wa-pairing-dialog .dialog-shell > footer { justify-content: flex-end; flex-wrap: wrap; margin-top: 22px; }
.wa-session-state { text-align: center; }
.wa-session-state p { margin: 10px auto 0; color: var(--muted); font-size: .78rem; }
.wa-session-state [data-state="CONNECTED"] { border-color: #33a875; color: #33a875; }
.wa-session-state [data-state="QR_READY"] { border-color: #d9902f; color: #d9902f; }
.wa-session-state [data-state="ERROR"], .wa-session-state [data-state="LOGGED_OUT"] { border-color: #dc5858; color: #dc5858; }
.wa-qr-wrap { display: grid; grid-template-columns: minmax(220px, 340px) minmax(220px, 1fr); align-items: center; justify-content: center; gap: 24px; min-height: 260px; margin-top: 20px; padding: 20px; border: 1px solid var(--line); border-radius: 18px; background: #fff; color: #171717; }
.wa-qr-wrap > img { width: 100%; max-width: 340px; aspect-ratio: 1; object-fit: contain; }
.wa-qr-wrap strong { display: block; margin-bottom: 12px; }
.wa-qr-wrap ol { margin: 0; padding-left: 20px; color: #555; font-size: .8rem; line-height: 1.8; }
.wa-inbox-heading { display: flex; align-items: center; gap: 18px; margin-bottom: 16px; }
.wa-inbox-heading > div { flex: 1; }
.wa-inbox-heading h1, .wa-inbox-heading h2 { margin: 4px 0 0; }
.wa-live { color: #33a875; font-size: .72rem; font-weight: 800; }
.wa-inbox-shell { display: grid; height: calc(100dvh - 170px); min-height: 480px; max-height: 760px; grid-template-columns: minmax(280px, 36%) minmax(0, 1fr); overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: var(--panel-raised); }
.wa-contact-panel { display: grid; min-width: 0; min-height: 0; grid-template-rows: 68px minmax(0, 1fr); overflow: hidden; border-right: 1px solid var(--line); }
.wa-contact-panel-title { display: flex; align-items: center; justify-content: space-between; min-height: 68px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.wa-contact-panel-title small { color: var(--muted); font-size: .65rem; }
.wa-contacts { min-height: 0; overflow-y: scroll; overscroll-behavior: contain; scrollbar-color: var(--line-strong) transparent; scrollbar-gutter: stable; scrollbar-width: thin; }
.wa-contacts::-webkit-scrollbar, .wa-messages::-webkit-scrollbar { width: 10px; }
.wa-contacts::-webkit-scrollbar-thumb, .wa-messages::-webkit-scrollbar-thumb { border: 2px solid transparent; border-radius: 999px; background: var(--line-strong); background-clip: padding-box; }
.wa-contact { display: grid; width: 100%; grid-template-columns: 48px minmax(0, 1fr) auto; align-items: center; gap: 11px; padding: 12px 14px; border: 0; border-bottom: 1px solid var(--line); background: transparent; color: var(--text); text-align: left; cursor: pointer; }
.wa-contact:hover, .wa-contact.active { background: var(--profile-featured); }
.wa-avatar { position: relative; display: grid; width: 46px; height: 46px; place-items: center; overflow: hidden; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-weight: 850; }
.wa-avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.wa-contact-copy { min-width: 0; }
.wa-contact-copy strong, .wa-contact-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wa-contact-copy small { margin-top: 5px; color: var(--muted); font-size: .68rem; }
.wa-contact-meta { display: grid; justify-items: end; gap: 7px; }
.wa-contact-meta time { max-width: 72px; color: var(--muted); font-size: .58rem; text-align: right; }
.wa-contact-meta b { display: grid; min-width: 20px; height: 20px; place-items: center; padding: 0 5px; border-radius: 999px; background: #24b06b; color: #fff; font-size: .62rem; }
.wa-empty { padding: 28px 16px; color: var(--muted); font-size: .76rem; text-align: center; }
.wa-load-more { display: block; width: calc(100% - 24px); margin: 12px; padding: 10px 14px; border: 1px solid var(--line-strong); border-radius: 11px; background: var(--panel-raised); color: var(--accent); font: inherit; font-size: .72rem; font-weight: 800; cursor: pointer; }
.wa-load-more:hover { border-color: var(--accent); background: var(--profile-featured); }
.wa-load-more:disabled { border-style: dashed; color: var(--muted); background: transparent; cursor: default; opacity: .78; }
.wa-load-more:disabled:hover { border-color: var(--line-strong); background: transparent; }
.wa-load-contacts { position: static; display: grid; width: 100%; min-height: 64px; grid-template-columns: 1fr; place-items: center; justify-content: center; margin: 0; border-width: 0 0 1px; border-radius: 0; background: var(--panel-raised); box-shadow: none; text-align: center; }
.wa-load-contacts > span { display: inline-flex; align-items: center; justify-content: center; gap: 9px; text-align: center; }
.wa-load-contacts.is-loading > span::before { width: 16px; height: 16px; border: 2px solid color-mix(in srgb, var(--accent) 25%, transparent); border-top-color: var(--accent); border-radius: 50%; content: ""; animation: wa-spin .75s linear infinite; }
.wa-load-history { position: sticky; z-index: 3; top: 0; flex: 0 0 auto; align-self: center; width: auto; margin: 0 0 8px; background: var(--panel-raised); box-shadow: 0 5px 14px #00000010; }
.wa-load-history.is-loading { display: grid; min-width: 54px; min-height: 38px; place-items: center; }
.wa-loading-spinner { display: block; width: 18px; height: 18px; border: 2px solid color-mix(in srgb, var(--accent) 25%, transparent); border-top-color: var(--accent); border-radius: 50%; animation: wa-spin .75s linear infinite; }
.visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; overflow: hidden !important; clip: rect(0 0 0 0) !important; white-space: nowrap !important; clip-path: inset(50%) !important; }
.wa-conversation-panel { min-width: 0; min-height: 0; height: 100%; overflow: hidden; background: color-mix(in srgb, var(--profile-featured) 45%, var(--panel)); }
.wa-conversation-placeholder { display: grid; height: 100%; place-items: center; align-content: center; padding: 30px; color: var(--muted); text-align: center; }
.wa-conversation-placeholder span { font-size: 3rem; }.wa-conversation-placeholder h3 { margin: 12px 0 0; color: var(--text); }.wa-conversation-placeholder p { font-size: .76rem; }
.wa-conversation { display: grid; min-height: 0; height: 100%; grid-template-rows: 68px minmax(0, 1fr) auto; overflow: hidden; }
.wa-conversation { position: relative; }
.wa-unseen-messages { position: absolute; right: 22px; bottom: 70px; z-index: 3; padding: 8px 13px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--accent); color: #fff; box-shadow: 0 8px 22px #0003; font: inherit; font-size: .7rem; font-weight: 800; cursor: pointer; }
.wa-conversation > header { display: flex; align-items: center; padding: 13px 18px; border-bottom: 1px solid var(--line); background: var(--panel-raised); }
.wa-conversation > header strong, .wa-conversation > header small { display: block; }.wa-conversation > header small { margin-top: 4px; color: var(--muted); font-size: .65rem; }
.wa-messages { display: flex; min-height: 0; flex-direction: column; gap: 8px; overflow-y: scroll; overflow-anchor: none; overscroll-behavior: contain; padding: 20px; scrollbar-color: var(--line-strong) transparent; scrollbar-gutter: stable; scrollbar-width: thin; }
.wa-message { width: fit-content; max-width: min(78%, 620px); padding: 9px 11px 6px; border: 1px solid var(--line); border-radius: 13px 13px 13px 3px; background: var(--panel-raised); box-shadow: 0 2px 8px #0000000d; }
.wa-message.outbound { align-self: flex-end; border-color: #56a67755; border-radius: 13px 13px 3px; background: color-mix(in srgb, #64c98e 18%, var(--panel-raised)); }
.wa-message p { margin: 0; overflow-wrap: anywhere; white-space: pre-wrap; font-size: .8rem; line-height: 1.5; }
.wa-media-preview { display: grid; width: min(260px, 100%); min-width: 150px; grid-template-rows: 180px auto; gap: 7px; margin-bottom: 7px; overflow: hidden; border-radius: 9px; color: inherit; text-decoration: none; }
.wa-media-preview img { z-index: 1; display: block; width: 100%; height: 180px; grid-area: 1 / 1; border-radius: 9px; object-fit: cover; image-rendering: auto; }
.wa-media-preview small { color: var(--muted); font-size: .6rem; font-weight: 700; }
.wa-media-icon { display: grid; width: 100%; height: 180px; grid-area: 1 / 1; place-items: center; border-radius: 9px; background: var(--profile-featured); color: var(--accent); }
.wa-media-icon svg { width: 42px; height: 42px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2.4; }
.wa-media-icon svg path[d*="m20"] { fill: currentColor; stroke: none; }
.wa-media-preview.has-preview .wa-media-icon { display: none; }
.wa-audio-media { display: grid; min-width: min(330px, 66vw); gap: 9px; padding: 4px 2px 7px; }
.wa-audio-media audio { width: 100%; min-height: 42px; }
.wa-media-actions { display: flex; flex-wrap: wrap; gap: 7px; }
.wa-media-actions .mini-button { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.wa-transcription-dialog { width: min(680px, calc(100% - 24px)); }
.wa-reactions-dialog { width: min(560px, calc(100% - 24px)); }
.wa-reactions-dialog .dialog-shell { padding: 26px; }
.wa-reactions-dialog .dialog-shell > header, .wa-reactions-dialog .dialog-shell > footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.wa-reactions-dialog .dialog-shell > footer { justify-content: flex-end; margin-top: 20px; }
.wa-reactions-list { display: grid; max-height: 55vh; gap: 8px; overflow-y: auto; }
.wa-reaction-row { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 11px; background: var(--panel); }
.wa-reaction-row strong { font-size: 1.25rem; }.wa-reaction-row span { overflow: hidden; font-size: .76rem; font-weight: 750; text-overflow: ellipsis; white-space: nowrap; }.wa-reaction-row time { color: var(--muted); font-size: .62rem; }
.wa-reaction-summary { display: block; width: fit-content; margin: 6px 0 -9px; padding: 3px 8px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--panel); color: var(--text); font: inherit; font-size: .82rem; cursor: pointer; }
.wa-message.outbound .wa-reaction-summary { margin-left: auto; }
.wa-transcription-dialog .dialog-shell { padding: 26px; }
.wa-transcription-dialog .dialog-shell > header, .wa-transcription-dialog .dialog-shell > footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.wa-transcription-dialog .dialog-shell > footer { justify-content: flex-end; margin-top: 22px; }
.wa-transcription-status { margin-bottom: 14px; color: var(--muted); font-size: .72rem; font-weight: 750; }
.wa-transcription-status.is-loading::before { content: "● "; color: var(--accent); animation: wa-pulse 1s ease-in-out infinite alternate; }
.wa-transcription-text { max-height: 56vh; overflow: auto; padding: 18px; border: 1px solid var(--line); border-radius: 13px; background: var(--panel); white-space: pre-wrap; font-size: .86rem; line-height: 1.65; }
@keyframes wa-pulse { to { opacity: .28; } }
@keyframes wa-spin { to { transform: rotate(360deg); } }
.wa-message footer { display: flex; justify-content: flex-end; gap: 7px; margin-top: 4px; color: var(--muted); font-size: .55rem; }
.wa-conversation-empty { margin: auto; padding: 16px; color: var(--muted); font-size: .75rem; }
.wa-composer { display: flex; gap: 9px; padding: 12px; border-top: 1px solid var(--line); background: var(--panel-raised); }
.wa-composer input { flex: 1; min-width: 0; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--panel); color: var(--text); font: inherit; }
@media (max-width: 760px) { .wa-web-notice { flex-direction: column; }.wa-qr-wrap { grid-template-columns: 1fr; }.wa-inbox-shell { height: auto; min-height: 660px; grid-template-columns: 1fr; }.wa-contact-panel { height: 260px; border-right: 0; border-bottom: 1px solid var(--line); }.wa-conversation-panel { height: 400px; }.wa-inbox-heading { align-items: flex-start; flex-wrap: wrap; }.wa-live { width: 100%; }.wa-composer .button { padding-inline: 12px; } }
