/*
 * AutoHub — shell operacional e design system.
 * Este arquivo convive com hub.css enquanto o chat legado permanece isolado.
 */

:root {
    color-scheme: light;
    --app-font: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --app-display: "Outfit", "Inter", sans-serif;
    --app-bg: #f4f1e9;
    --app-bg-soft: #ebe6da;
    --app-surface: #fffdf8;
    --app-surface-raised: #ffffff;
    --app-surface-muted: #f7f3ea;
    --app-sidebar: #17231f;
    --app-sidebar-soft: #21302a;
    --app-sidebar-text: #f7f3e9;
    --app-sidebar-muted: #aebbb4;
    --app-text: #23302b;
    --app-text-soft: #65716c;
    --app-border: #ddd8cd;
    --app-border-strong: #c8c1b5;
    --app-accent: #c6693d;
    --app-accent-hover: #ad5731;
    --app-accent-soft: #f7e1d4;
    --app-positive: #31735a;
    --app-positive-soft: #dcece4;
    --app-warning: #9d6723;
    --app-warning-soft: #f8ead0;
    --app-danger: #b84b43;
    --app-danger-soft: #f8dfdc;
    --app-info: #376d87;
    --app-info-soft: #dceaf0;
    --app-shadow-sm: 0 1px 2px rgba(30, 39, 35, .06), 0 5px 15px rgba(30, 39, 35, .04);
    --app-shadow-md: 0 16px 45px rgba(30, 39, 35, .13);
    --app-shadow-lg: 0 30px 90px rgba(20, 29, 25, .22);
    --app-radius-sm: 10px;
    --app-radius: 16px;
    --app-radius-lg: 24px;
    --app-sidebar-width: 250px;
    --app-sidebar-collapsed: 82px;
    --app-topbar-height: 76px;

    /* Compatibilidade com as telas existentes. */
    --hub-bg: var(--app-bg);
    --hub-surface: var(--app-surface);
    --hub-text: var(--app-text);
    --hub-text-muted: var(--app-text-soft);
    --hub-border: var(--app-border);
    --hub-primary: var(--app-accent);
    --hub-font: var(--app-font);
}

html[data-theme="dark"] {
    color-scheme: dark;
    --app-bg: #111814;
    --app-bg-soft: #18211c;
    --app-surface: #1b2520;
    --app-surface-raised: #202c26;
    --app-surface-muted: #25312b;
    --app-sidebar: #0b100e;
    --app-sidebar-soft: #17201c;
    --app-sidebar-text: #f4f2e9;
    --app-sidebar-muted: #9ca9a2;
    --app-text: #f2f0e8;
    --app-text-soft: #a9b4ae;
    --app-border: #34413a;
    --app-border-strong: #46554d;
    --app-accent: #e08050;
    --app-accent-hover: #ed9367;
    --app-accent-soft: #442d22;
    --app-positive: #6fbe94;
    --app-positive-soft: #203c2e;
    --app-warning: #e3ad62;
    --app-warning-soft: #3f3220;
    --app-danger: #ee8178;
    --app-danger-soft: #452522;
    --app-info: #73aec9;
    --app-info-soft: #203641;
    --app-shadow-sm: 0 1px 2px rgba(0, 0, 0, .2), 0 6px 18px rgba(0, 0, 0, .12);
    --app-shadow-md: 0 18px 50px rgba(0, 0, 0, .28);
    --app-shadow-lg: 0 30px 90px rgba(0, 0, 0, .48);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    height: auto;
    min-height: 100%;
    overflow: auto;
    scroll-behavior: smooth;
}

body.app-body,
body.login-body {
    min-height: 100vh;
    margin: 0;
    overflow: auto;
    background: var(--app-bg);
    color: var(--app-text);
    font-family: var(--app-font);
    -webkit-font-smoothing: antialiased;
    transition: background-color .24s ease, color .24s ease;
}

.app-body [hidden] {
    display: none !important;
}

button,
input,
select,
textarea {
    font: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

button {
    color: inherit;
}

a {
    color: inherit;
}

:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--app-accent) 42%, transparent);
    outline-offset: 2px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.app-skip-link {
    position: fixed;
    top: 10px;
    left: 10px;
    z-index: 1000;
    transform: translateY(-160%);
    padding: 10px 14px;
    border-radius: 10px;
    background: var(--app-text);
    color: var(--app-surface);
    text-decoration: none;
}

.app-skip-link:focus {
    transform: translateY(0);
}

/* Shell */
.app-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: var(--app-sidebar-width) minmax(0, 1fr);
    transition: grid-template-columns .22s cubic-bezier(.2, .8, .2, 1);
}

.app-shell.is-collapsed {
    grid-template-columns: var(--app-sidebar-collapsed) minmax(0, 1fr);
}

.app-sidebar {
    position: sticky;
    top: 0;
    z-index: 120;
    /* height: 100vh; */
    min-width: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background:
        radial-gradient(circle at 16% 10%, rgba(198, 105, 61, .18), transparent 28%),
        var(--app-sidebar);
    color: var(--app-sidebar-text);
    border-right: 1px solid rgba(255, 255, 255, .07);
}

.app-sidebar-head {
    min-height: var(--app-topbar-height);
    padding: 16px 18px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.app-brand {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 11px;
    text-decoration: none;
}

.app-brand-mark {
    width: 43px;
    height: 43px;
    flex: 0 0 43px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: linear-gradient(145deg, #e38a5e, #aa4f2e);
    color: #fff;
    box-shadow: 0 10px 25px rgba(198, 105, 61, .28);
}

.app-brand-copy {
    min-width: 0;
    transition: opacity .16s ease;
}

.app-brand-copy strong {
    display: block;
    font-family: var(--app-display);
    font-size: 19px;
    line-height: 1.1;
    letter-spacing: -.02em;
}

.app-brand-copy small {
    display: block;
    margin-top: 3px;
    overflow: hidden;
    color: var(--app-sidebar-muted);
    font-size: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.app-sidebar-toggle {
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    margin-left: auto;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 11px;
    background: rgba(255, 255, 255, .05);
    color: var(--app-sidebar-muted);
    cursor: pointer;
    transition: background .18s ease, color .18s ease, transform .18s ease;
}

.app-sidebar-toggle:hover {
    background: rgba(255, 255, 255, .1);
    color: #fff;
}

.app-nav {
    flex: 1;
    padding: 8px 12px 24px;
    /* overflow: auto; */
    scrollbar-width: thin;
}

.app-nav-group+.app-nav-group {
    margin-top: 21px;
}

.app-nav-label {
    margin: 0 10px 8px;
    color: var(--app-sidebar-muted);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
    white-space: nowrap;
}

.app-nav-link {
    min-height: 44px;
    padding: 8px 11px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-radius: 13px;
    color: var(--app-sidebar-muted);
    text-decoration: none;
    white-space: nowrap;
    transition: background .16s ease, color .16s ease, transform .16s ease;
}

.app-nav-link+.app-nav-link {
    margin-top: 4px;
}

.app-nav-link i {
    width: 20px;
    flex: 0 0 20px;
    text-align: center;
    font-size: 16px;
}

.app-nav-link span {
    overflow: hidden;
    font-size: 13px;
    font-weight: 650;
    text-overflow: ellipsis;
}

.app-nav-link:hover {
    background: rgba(255, 255, 255, .07);
    color: #fff;
    transform: translateX(2px);
}

.app-nav-link.is-active {
    background: rgba(224, 128, 80, .15);
    color: #fff;
    box-shadow: inset 3px 0 0 #e08050;
}

.app-sidebar-footer {
    padding: 12px;
    border-top: 1px solid rgba(255, 255, 255, .08);
}

.app-user {
    padding: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-radius: 14px;
    background: rgba(255, 255, 255, .04);
}

.app-user-avatar {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: var(--app-sidebar-soft);
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
}

.app-user-copy {
    min-width: 0;
    flex: 1;
}

.app-user-copy strong,
.app-user-copy small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.app-user-copy strong {
    font-size: 12px;
}

.app-user-copy small {
    margin-top: 2px;
    color: var(--app-sidebar-muted);
    font-size: 10px;
}

.app-user-logout {
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    color: var(--app-sidebar-muted);
    text-decoration: none;
}

.app-user-logout:hover {
    background: rgba(255, 255, 255, .08);
    color: #fff;
}

.app-shell.is-collapsed .app-brand-copy,
.app-shell.is-collapsed .app-nav-label,
.app-shell.is-collapsed .app-nav-link span,
.app-shell.is-collapsed .app-user-copy,
.app-shell.is-collapsed .app-user-logout {
    opacity: 0;
    width: 0;
    pointer-events: none;
}

.app-shell.is-collapsed .app-sidebar-head {
    padding-inline: 19px;
}

.app-shell.is-collapsed .app-sidebar-toggle {
    display: none;
}

.app-shell.is-collapsed .app-nav {
    padding-inline: 13px;
}

.app-shell.is-collapsed .app-nav-link {
    justify-content: center;
    padding-inline: 10px;
}

.app-shell.is-collapsed .app-nav-link:hover {
    transform: translateY(-1px);
}

.app-shell.is-collapsed .app-user {
    justify-content: center;
    padding-inline: 9px;
}

.app-stage {
    min-width: 0;
    min-height: 100vh;
}

.app-mobile-overlay {
    display: none;
}

.app-topbar {
    position: sticky;
    top: 0;
    z-index: 90;
    min-height: var(--app-topbar-height);
    padding: 13px clamp(18px, 3vw, 38px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    background: color-mix(in srgb, var(--app-bg) 88%, transparent);
    border-bottom: 1px solid color-mix(in srgb, var(--app-border) 75%, transparent);
    backdrop-filter: blur(18px);
}

.app-mobile-menu {
    display: none;
}

.app-breadcrumb {
    min-width: 0;
}

.app-breadcrumb small {
    display: block;
    color: var(--app-text-soft);
    font-size: 11px;
    font-weight: 700;
}

.app-breadcrumb strong {
    display: block;
    margin-top: 2px;
    overflow: hidden;
    font-family: var(--app-display);
    font-size: 20px;
    letter-spacing: -.02em;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.app-topbar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.app-icon-button {
    width: 42px;
    height: 42px;
    display: inline-grid;
    place-items: center;
    border: 1px solid var(--app-border);
    border-radius: 13px;
    background: var(--app-surface);
    color: var(--app-text-soft);
    box-shadow: var(--app-shadow-sm);
    cursor: pointer;
    transition: transform .16s ease, border-color .16s ease, color .16s ease;
}

.app-icon-button:hover {
    transform: translateY(-2px);
    border-color: var(--app-border-strong);
    color: var(--app-accent);
}

.app-content {
    width: min(1540px, 100%);
    margin: 0 auto;
    padding: 28px clamp(18px, 3vw, 42px) 84px;
}

.app-page-head {
    margin-bottom: 24px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
}

.app-page-head h1 {
    margin: 0;
    font-family: var(--app-display);
    font-size: clamp(25px, 3vw, 36px);
    line-height: 1.08;
    letter-spacing: -.035em;
}

.app-page-head p {
    max-width: 720px;
    margin: 7px 0 0;
    color: var(--app-text-soft);
    font-size: 13px;
    line-height: 1.6;
}

.app-page-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 9px;
}

/* Componentes */
.app-button,
.hub-page-btn,
.hub-mini-btn {
    min-height: 40px;
    padding: 9px 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid var(--app-border);
    border-radius: 12px;
    background: var(--app-surface);
    color: var(--app-text);
    box-shadow: var(--app-shadow-sm);
    font-size: 12px;
    font-weight: 750;
    text-decoration: none;
    cursor: pointer;
    transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease, background .16s ease;
}

.app-button:hover,
.hub-page-btn:hover,
.hub-mini-btn:hover {
    transform: translateY(-2px);
    border-color: var(--app-border-strong);
    box-shadow: 0 8px 20px rgba(30, 39, 35, .09);
}

.app-button.is-primary,
.hub-page-btn.primary {
    border-color: var(--app-accent);
    background: var(--app-accent);
    color: #fff;
    box-shadow: 0 9px 24px color-mix(in srgb, var(--app-accent) 25%, transparent);
}

.app-button.is-primary:hover,
.hub-page-btn.primary:hover {
    border-color: var(--app-accent-hover);
    background: var(--app-accent-hover);
}

.app-button.is-danger,
.hub-mini-btn.danger {
    border-color: color-mix(in srgb, var(--app-danger) 40%, var(--app-border));
    color: var(--app-danger);
}

.app-button.is-ghost {
    border-color: transparent;
    background: transparent;
    box-shadow: none;
}

.app-button.is-block {
    width: 100%;
}

.app-button:disabled {
    opacity: .58;
    cursor: not-allowed;
    transform: none;
}

.section-spacer {
    margin-top: 28px;
}

.section-spacer-small {
    margin-top: 16px;
}

.app-card,
.hub-page-card {
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius);
    background: var(--app-surface);
    box-shadow: var(--app-shadow-sm);
}

.app-card {
    padding: 20px;
}

.app-card-head {
    margin-bottom: 17px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.app-card-head h2,
.hub-page-card h2 {
    margin: 0;
    font-family: var(--app-display);
    font-size: 16px;
    letter-spacing: -.01em;
}

.app-card-head p {
    margin: 4px 0 0;
    color: var(--app-text-soft);
    font-size: 11px;
}

.app-card-link {
    color: var(--app-accent);
    font-size: 11px;
    font-weight: 800;
    text-decoration: none;
}

.app-grid {
    display: grid;
    gap: 16px;
}

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

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

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

.app-grid-main {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(280px, .75fr);
    gap: 16px;
}

.app-kpis {
    margin-bottom: 16px;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 13px;
}

.app-kpi {
    min-width: 0;
    padding: 18px;
    position: relative;
    overflow: hidden;
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius);
    background: var(--app-surface);
    box-shadow: var(--app-shadow-sm);
}

.app-kpi::after {
    content: "";
    position: absolute;
    right: -25px;
    bottom: -35px;
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: var(--kpi-soft, var(--app-accent-soft));
    opacity: .75;
}

.app-kpi-top {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.app-kpi-icon {
    width: 39px;
    height: 39px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: var(--kpi-soft, var(--app-accent-soft));
    color: var(--kpi-color, var(--app-accent));
}

.app-kpi-label {
    color: var(--app-text-soft);
    font-size: 11px;
    font-weight: 750;
}

.app-kpi-value {
    position: relative;
    z-index: 1;
    display: block;
    margin-top: 15px;
    font-family: var(--app-display);
    font-size: 27px;
    line-height: 1;
}

.app-kpi-foot {
    position: relative;
    z-index: 1;
    display: block;
    margin-top: 7px;
    color: var(--app-text-soft);
    font-size: 10px;
}

.app-badge,
.app-status {
    width: max-content;
    max-width: 100%;
    padding: 5px 8px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-radius: 999px;
    background: var(--app-bg-soft);
    color: var(--app-text-soft);
    font-size: 10px;
    font-weight: 800;
    line-height: 1;
}

.app-status::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

.app-status.is-positive {
    background: var(--app-positive-soft);
    color: var(--app-positive);
}

.app-status.is-warning {
    background: var(--app-warning-soft);
    color: var(--app-warning);
}

.app-status.is-danger {
    background: var(--app-danger-soft);
    color: var(--app-danger);
}

.app-status.is-info {
    background: var(--app-info-soft);
    color: var(--app-info);
}

.app-field {
    display: grid;
    gap: 7px;
}

.app-field>span,
.app-field>label {
    color: var(--app-text-soft);
    font-size: 11px;
    font-weight: 750;
}

.app-input,
.app-select,
.app-textarea,
.hub-catalog-search,
.hub-marketing-select,
.hub-marketing-date {
    width: 100%;
    min-height: 42px;
    padding: 9px 12px;
    border: 1px solid var(--app-border);
    border-radius: 11px;
    background: var(--app-surface-raised);
    color: var(--app-text);
    outline: none;
    transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}

.app-textarea {
    min-height: 100px;
    resize: vertical;
    line-height: 1.55;
}

.app-input:focus,
.app-select:focus,
.app-textarea:focus,
.hub-catalog-search:focus,
.hub-marketing-select:focus,
.hub-marketing-date:focus {
    border-color: var(--app-accent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--app-accent) 16%, transparent);
}

.app-field.is-dirty .app-input,
.app-field.is-dirty .app-select,
.app-field.is-dirty .app-textarea {
    border-color: var(--app-warning);
    background: var(--app-warning-soft);
}

.app-field-error {
    color: var(--app-danger);
    font-size: 10px;
}

.app-toolbar {
    margin-bottom: 16px;
    padding: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.app-toolbar-fields {
    flex: 1;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 9px;
}

.app-search {
    position: relative;
    width: min(330px, 100%);
}

.app-search i {
    position: absolute;
    top: 50%;
    left: 13px;
    color: var(--app-text-soft);
    transform: translateY(-50%);
    pointer-events: none;
}

.app-search .app-input {
    padding-left: 38px;
}

.app-table-wrap {
    overflow: auto;
    border: 1px solid var(--app-border);
    border-radius: 14px;
    background: var(--app-surface);
}

.app-table {
    width: 100%;
    min-width: 760px;
    border-collapse: collapse;
}

.app-table th,
.app-table td {
    padding: 13px 15px;
    border-bottom: 1px solid var(--app-border);
    text-align: left;
    vertical-align: middle;
}

.app-table th {
    background: var(--app-surface-muted);
    color: var(--app-text-soft);
    font-size: 9px;
    font-weight: 850;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.app-table td {
    font-size: 11px;
}

.app-table tr:last-child td {
    border-bottom: 0;
}

.app-table tbody tr {
    transition: background .14s ease;
}

.app-table tbody tr:hover {
    background: var(--app-surface-muted);
}

.finance-positive {
    color: var(--app-positive);
}

.finance-negative {
    color: var(--app-danger);
}

.import-preview-alert {
    margin-top: 16px;
}

.import-preview-list {
    max-height: 360px;
    margin-top: 12px;
    display: grid;
    gap: 7px;
    overflow: auto;
}

.import-preview-list .app-select {
    width: 150px;
}

.import-confirm-button {
    width: 100%;
    margin-top: 14px;
}

.app-person {
    display: flex;
    align-items: center;
    gap: 10px;
}

.app-person-avatar {
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: var(--app-accent-soft);
    color: var(--app-accent);
    font-weight: 850;
}

.app-person strong,
.app-person small {
    display: block;
}

.app-person small {
    margin-top: 2px;
    color: var(--app-text-soft);
    font-size: 10px;
}

.app-empty {
    min-height: 250px;
    padding: 38px 20px;
    display: grid;
    place-items: center;
    text-align: center;
}

.app-empty-icon {
    width: 62px;
    height: 62px;
    margin: 0 auto 14px;
    display: grid;
    place-items: center;
    border-radius: 20px;
    background: var(--app-accent-soft);
    color: var(--app-accent);
    font-size: 23px;
}

.app-empty h3 {
    margin: 0;
    font-family: var(--app-display);
    font-size: 18px;
}

.app-empty p {
    max-width: 440px;
    margin: 7px auto 16px;
    color: var(--app-text-soft);
    font-size: 12px;
    line-height: 1.55;
}

.app-skeleton {
    overflow: hidden;
    position: relative;
    border-radius: 8px;
    background: var(--app-bg-soft);
    color: transparent !important;
}

.app-skeleton::after {
    content: "";
    position: absolute;
    inset: 0;
    transform: translateX(-100%);
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .45), transparent);
    animation: appShimmer 1.4s infinite;
}

@keyframes appShimmer {
    to {
        transform: translateX(100%);
    }
}

.app-progress {
    height: 9px;
    overflow: hidden;
    border-radius: 999px;
    background: var(--app-bg-soft);
}

.app-progress>span {
    display: block;
    width: var(--progress, 0%);
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--app-accent), #e6a16b);
    transition: width .35s ease;
}

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

.app-list-item {
    padding: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid var(--app-border);
    border-radius: 13px;
    background: var(--app-surface-raised);
}

.app-list-icon {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: var(--app-bg-soft);
    color: var(--app-text-soft);
}

.app-list-copy {
    min-width: 0;
    flex: 1;
}

.app-list-copy strong,
.app-list-copy small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.app-list-copy strong {
    font-size: 12px;
}

.app-list-copy small {
    margin-top: 3px;
    color: var(--app-text-soft);
    font-size: 10px;
}

.app-checklist {
    display: grid;
    gap: 9px;
}

.app-check {
    padding: 10px 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-radius: 12px;
    background: var(--app-surface-muted);
    color: var(--app-text-soft);
    text-decoration: none;
    font-size: 11px;
    font-weight: 700;
}

.app-check i {
    width: 25px;
    height: 25px;
    display: grid;
    place-items: center;
    border-radius: 9px;
    background: var(--app-bg-soft);
}

.app-check.is-done {
    color: var(--app-positive);
}

.app-check.is-done i {
    background: var(--app-positive-soft);
}

.app-alert {
    padding: 12px 14px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    border: 1px solid var(--app-border);
    border-radius: 13px;
    background: var(--app-surface-muted);
    color: var(--app-text-soft);
    font-size: 11px;
    line-height: 1.5;
}

.app-alert.is-warning {
    border-color: color-mix(in srgb, var(--app-warning) 30%, var(--app-border));
    background: var(--app-warning-soft);
    color: var(--app-warning);
}

.app-alert.is-danger {
    border-color: color-mix(in srgb, var(--app-danger) 30%, var(--app-border));
    background: var(--app-danger-soft);
    color: var(--app-danger);
}

/* Configuração */
.setup-layout {
    display: grid;
    grid-template-columns: 245px minmax(0, 1fr);
    gap: 16px;
    align-items: start;
}

.setup-nav {
    position: sticky;
    top: calc(var(--app-topbar-height) + 18px);
    padding: 12px;
}

.setup-nav-progress {
    padding: 10px 8px 15px;
}

.setup-nav-progress strong {
    display: block;
    margin-bottom: 8px;
    font-size: 11px;
}

.setup-nav-progress small {
    display: block;
    margin-top: 7px;
    color: var(--app-text-soft);
    font-size: 9px;
}

.setup-nav button {
    width: 100%;
    min-height: 41px;
    padding: 8px 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 0;
    border-radius: 11px;
    background: transparent;
    color: var(--app-text-soft);
    text-align: left;
    cursor: pointer;
}

.setup-nav button:hover,
.setup-nav button.is-active {
    background: var(--app-accent-soft);
    color: var(--app-accent);
}

.setup-nav button i {
    width: 18px;
    text-align: center;
}

.setup-nav button span {
    font-size: 10px;
    font-weight: 800;
}

.setup-nav button.is-complete::after {
    content: "✓";
    margin-left: auto;
    color: var(--app-positive);
    font-weight: 900;
}

.setup-inline-action {
    margin: 10px 0 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.setup-inline-action span {
    color: var(--app-text-soft);
    font-size: 9px;
}

.setup-panel {
    display: none;
}

.setup-panel.is-active {
    display: block;
    animation: appPanelIn .22s ease both;
}

@keyframes appPanelIn {
    from {
        opacity: 0;
        transform: translateY(7px);
    }
}

.setup-panel-head {
    margin-bottom: 20px;
}

.setup-panel-head h2 {
    margin: 0;
    font-family: var(--app-display);
    font-size: 21px;
}

.setup-panel-head p {
    margin: 5px 0 0;
    color: var(--app-text-soft);
    font-size: 11px;
    line-height: 1.55;
}

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

.setup-form-grid>.is-full {
    grid-column: 1 / -1;
}

.setup-actions {
    margin-top: 20px;
    padding-top: 16px;
    display: flex;
    justify-content: flex-end;
    gap: 9px;
    border-top: 1px solid var(--app-border);
}

.schedule-grid {
    display: grid;
    gap: 8px;
}

.schedule-row {
    padding: 10px;
    display: grid;
    grid-template-columns: 92px 72px repeat(4, minmax(82px, 1fr));
    gap: 8px;
    align-items: center;
    border: 1px solid var(--app-border);
    border-radius: 12px;
}

.schedule-day {
    font-size: 10px;
    font-weight: 800;
}

.schedule-row input[type="time"] {
    min-width: 0;
}

/* Atendimentos */
.appointment-board {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
}

.appointment-column {
    min-height: 0;
    border: 1px solid var(--app-border);
    border-radius: 15px;
    overflow: hidden;
    background: var(--app-surface-muted);
}

.appointment-column-head {
    width: 100%;
    min-height: 54px;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    border: 0;
    background: transparent;
    color: var(--app-text);
    cursor: pointer;
    text-align: left;
}

.appointment-column-head strong {
    font-size: 11px;
}

.appointment-column-head>span {
    display: flex;
    align-items: center;
    gap: 9px;
}

.appointment-column-chevron {
    color: var(--app-text-soft);
    font-size: 10px;
    transition: transform .18s ease;
}

.appointment-column-head[aria-expanded="true"] .appointment-column-chevron {
    transform: rotate(180deg);
}

.appointment-column-body {
    padding: 0 12px 12px;
    border-top: 1px solid var(--app-border);
}

.appointment-column-items {
    padding-top: 12px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 9px;
}

.appointment-count {
    min-width: 24px;
    height: 24px;
    padding: 0 7px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: var(--app-bg-soft);
    color: var(--app-text-soft);
    font-size: 9px;
    font-weight: 850;
}

.appointment-card {
    padding: 12px;
    border: 1px solid var(--app-border);
    border-radius: 13px;
    background: var(--app-surface);
    box-shadow: var(--app-shadow-sm);
}

.appointment-card+.appointment-card {
    margin-top: 0;
}

.appointment-card-time {
    color: var(--app-accent);
    font-size: 10px;
    font-weight: 850;
}

.appointment-card h3 {
    margin: 6px 0 3px;
    font-size: 12px;
}

.appointment-card p {
    margin: 0;
    color: var(--app-text-soft);
    font-size: 10px;
    line-height: 1.45;
}

.appointment-card {
    cursor: pointer;
    transition: transform .16s ease, border-color .16s ease;
}

.appointment-card:hover {
    transform: translateY(-2px);
    border-color: var(--app-border-strong);
}

.appointment-card.is-targeted {
    border-color: var(--app-accent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--app-accent) 15%, transparent);
}

.workflow-panel {
    padding-top: 18px;
    border-top: 1px solid var(--app-border);
}

.workflow-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* Modais/drawers */
.app-overlay {
    position: fixed;
    inset: 0;
    z-index: 240;
    display: none;
    background: rgba(10, 16, 13, .56);
    backdrop-filter: blur(4px);
}

.app-overlay.is-open {
    display: block;
    animation: appFade .16s ease both;
}

.app-drawer {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 250;
    width: min(590px, 100vw);
    height: 100dvh;
    display: flex;
    flex-direction: column;
    visibility: hidden;
    background: var(--app-surface);
    box-shadow: var(--app-shadow-lg);
    transform: translateX(104%);
    transition: transform .25s cubic-bezier(.2, .8, .2, 1), visibility .25s;
}

.app-drawer.is-open {
    visibility: visible;
    transform: translateX(0);
}

.app-drawer-head {
    padding: 19px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    border-bottom: 1px solid var(--app-border);
}

.app-drawer-head h2 {
    margin: 0;
    font-family: var(--app-display);
    font-size: 19px;
}

.app-drawer-head p {
    margin: 3px 0 0;
    color: var(--app-text-soft);
    font-size: 10px;
}

.app-drawer-body {
    flex: 1;
    padding: 20px;
    overflow: auto;
}

.app-drawer-footer {
    padding: 14px 20px calc(14px + env(safe-area-inset-bottom));
    display: flex;
    justify-content: flex-end;
    gap: 9px;
    border-top: 1px solid var(--app-border);
    background: var(--app-surface);
}

.drawer-danger-action {
    margin-right: auto;
}

.client-vehicle-list {
    margin-bottom: 14px;
}

.client-vehicle-list .app-list-item.is-selected {
    border-color: var(--app-accent);
    background: var(--app-accent-soft);
}

.client-vehicle-forms {
    display: grid;
    gap: 14px;
}

.client-vehicle-entry {
    position: relative;
    padding: 16px;
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius-lg);
    background: color-mix(in srgb, var(--app-surface) 94%, var(--app-accent) 6%);
    box-shadow: 0 8px 24px rgba(35, 30, 24, .05);
    transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.client-vehicle-entry:focus-within {
    border-color: color-mix(in srgb, var(--app-accent) 58%, var(--app-border));
    box-shadow: 0 12px 30px rgba(35, 30, 24, .08), 0 0 0 3px var(--app-accent-soft);
}

.client-vehicle-entry-head {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 11px;
    margin-bottom: 15px;
}

.client-vehicle-entry-head>span:nth-child(2) {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.client-vehicle-entry-head small {
    color: var(--app-text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.client-vehicle-entry-icon {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    color: var(--app-accent);
    background: var(--app-accent-soft);
}

.client-vehicle-remove {
    color: var(--app-danger);
}

[data-client-new-vehicle]:disabled {
    cursor: not-allowed;
    opacity: .52;
    transform: none !important;
}

@media (prefers-reduced-motion: reduce) {
    .client-vehicle-entry {
        transition: none;
    }
}

.app-close {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border: 1px solid var(--app-border);
    border-radius: 12px;
    background: var(--app-surface-muted);
    cursor: pointer;
}

@keyframes appFade {
    from {
        opacity: 0;
    }
}

.app-dialog-backdrop {
    position: fixed;
    inset: 0;
    z-index: 520;
    padding: 18px;
    display: grid;
    place-items: center;
    background: rgba(10, 16, 13, .64);
    backdrop-filter: blur(5px);
    animation: appFade .16s ease both;
}

.app-dialog {
    width: min(430px, 100%);
    padding: 25px;
    display: grid;
    justify-items: center;
    gap: 13px;
    border: 1px solid var(--app-border);
    border-radius: 22px;
    background: var(--app-surface);
    box-shadow: var(--app-shadow-lg);
    text-align: center;
}

.app-dialog h2 {
    margin: 0;
    font-family: var(--app-display);
    font-size: 22px;
}

.app-dialog p {
    margin: 0;
    color: var(--app-text-soft);
    font-size: 11px;
    line-height: 1.55;
}

.app-qr-code {
    width: min(280px, 72vw);
    aspect-ratio: 1;
    padding: 10px;
    border-radius: 14px;
    background: #fff;
    object-fit: contain;
}

/* Assistente contextual */
.context-assistant-fab {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 205;
    min-height: 52px;
    padding: 0 17px;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--app-accent), #9e4b2d);
    color: #fff;
    box-shadow: 0 16px 38px color-mix(in srgb, var(--app-accent) 34%, transparent);
    font-size: 12px;
    font-weight: 850;
    cursor: pointer;
    transition: transform .18s ease, box-shadow .18s ease;
}

.context-assistant-fab:hover {
    transform: translateY(-3px) scale(1.015);
    box-shadow: 0 21px 45px color-mix(in srgb, var(--app-accent) 42%, transparent);
}

.context-assistant-fab-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #fff2cc;
    box-shadow: 0 0 0 5px rgba(255, 242, 204, .15);
}

.context-assistant {
    position: fixed;
    right: 20px;
    bottom: 84px;
    z-index: 210;
    width: min(620px, calc(100vw - 40px));
    height: min(760px, calc(100dvh - 110px));
    display: flex;
    flex-direction: column;
    visibility: hidden;
    overflow: hidden;
    border: 1px solid var(--app-border);
    border-radius: 22px;
    background: var(--app-surface);
    box-shadow: var(--app-shadow-lg);
    opacity: 0;
    transform: translateY(14px) scale(.98);
    transform-origin: bottom right;
    transition: opacity .18s ease, transform .2s ease, visibility .2s;
}

.context-assistant.is-open {
    visibility: visible;
    opacity: 1;
    transform: translateY(0) scale(1);
}

.context-assistant-head {
    padding: 15px 16px;
    display: flex;
    align-items: center;
    gap: 11px;
    border-bottom: 1px solid var(--app-border);
    background: var(--app-surface-muted);
}

.context-assistant-avatar {
    width: 39px;
    height: 39px;
    display: grid;
    place-items: center;
    border-radius: 13px;
    background: var(--app-accent);
    color: #fff;
}

.context-assistant-title {
    min-width: 0;
    flex: 1;
}

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

.context-assistant-title strong {
    font-family: var(--app-display);
    font-size: 14px;
}

.context-assistant-title small {
    margin-top: 2px;
    color: var(--app-text-soft);
    font-size: 9px;
}

.context-assistant-messages {
    flex: 1;
    padding: 16px;
    overflow: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.context-message.has-operation-preview {
    width: 100%;
    max-width: 100%;
}

.context-message.has-operation-preview>p {
    margin: 0;
}

.context-operation-preview {
    margin-top: 10px;
    padding-top: 10px;
    display: grid;
    gap: 9px;
    border-top: 1px solid color-mix(in srgb, currentColor 18%, transparent);
}

.context-operation-preview>label {
    display: grid;
    gap: 4px;
}

.context-operation-preview>label>span,
.context-operation-preview legend {
    color: var(--app-text-soft);
    font-size: 8px;
    font-weight: 800;
    text-transform: uppercase;
}

.context-operation-preview input,
.context-operation-preview textarea,
.context-operation-preview select {
    width: 100%;
    padding: 8px 9px;
    border: 1px solid var(--app-border);
    border-radius: 9px;
    background: var(--app-surface-raised);
    color: var(--app-text);
    font: inherit;
    resize: vertical;
}

.context-operation-preview fieldset {
    min-width: 0;
    padding: 9px;
    display: grid;
    gap: 6px;
    border: 1px solid var(--app-border);
    border-radius: 10px;
}

.context-operation-candidate {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 7px;
    align-items: center;
    cursor: pointer;
}

.context-operation-candidate span {
    min-width: 0;
    display: grid;
    gap: 2px;
}

.context-operation-candidate strong,
.context-operation-candidate small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.context-operation-candidate small {
    color: var(--app-text-soft);
    font-size: 8px;
}

.context-operation-empty {
    margin: 0;
    color: var(--app-text-soft);
    font-size: 9px;
}

.context-operation-preview .app-button {
    width: 100%;
    min-height: 38px;
}

.context-operation-items {
    display: grid;
    gap: 9px;
}

.context-operation-item {
    padding: 9px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
    border: 1px solid var(--app-border);
    border-radius: 12px;
    background: color-mix(in srgb, var(--app-surface-raised) 92%, var(--app-accent) 8%);
}

.context-operation-item>header {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 7px;
    align-items: center;
}

.context-operation-item>header>span {
    width: 22px;
    height: 22px;
    display: grid;
    place-items: center;
    border-radius: 7px;
    background: var(--app-accent-soft);
    color: var(--app-accent);
    font-size: 8px;
    font-weight: 850;
}

.context-operation-item>header strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 10px;
}

.context-operation-item>header b {
    color: var(--app-positive);
    font-size: 9px;
}

.context-operation-item>label {
    display: grid;
    gap: 3px;
}

.context-operation-item>label:first-of-type {
    grid-column: 1 / -1;
}

.context-operation-item>label>span {
    color: var(--app-text-soft);
    font-size: 7px;
    font-weight: 800;
    text-transform: uppercase;
}

.context-operation-item fieldset,
.context-operation-item-client {
    grid-column: 1 / -1;
}

.context-operation-item-client {
    padding: 8px;
    display: flex;
    align-items: center;
    gap: 7px;
    border-radius: 9px;
    background: var(--app-surface-muted);
    color: var(--app-text-soft);
    font-size: 9px;
}

.context-message {
    max-width: 87%;
    padding: 10px 12px;
    align-self: flex-start;
    border-radius: 14px 14px 14px 4px;
    background: var(--app-surface-muted);
    color: var(--app-text);
    font-size: 11px;
    line-height: 1.55;
    white-space: pre-wrap;
}

.context-message.is-user {
    align-self: flex-end;
    border-radius: 14px 14px 4px 14px;
    background: var(--app-accent);
    color: #fff;
}

.context-message.is-error {
    border: 1px solid color-mix(in srgb, var(--app-danger) 35%, transparent);
    background: var(--app-danger-soft);
    color: var(--app-danger);
}

.context-suggestions {
    padding: 0 16px 12px;
    display: flex;
    gap: 6px;
    overflow-x: auto;
}

.context-suggestions button {
    padding: 7px 9px;
    border: 1px solid var(--app-border);
    border-radius: 999px;
    background: var(--app-surface);
    color: var(--app-text-soft);
    font-size: 9px;
    font-weight: 750;
    white-space: nowrap;
    cursor: pointer;
}

.context-assistant-form {
    padding: 12px;
    display: flex;
    align-items: flex-end;
    gap: 8px;
    border-top: 1px solid var(--app-border);
}

.context-assistant-form textarea {
    flex: 1;
    max-height: 110px;
    min-height: 42px;
    padding: 10px 11px;
    resize: none;
    border: 1px solid var(--app-border);
    border-radius: 12px;
    background: var(--app-surface-raised);
    color: var(--app-text);
    outline: none;
}

.context-assistant-form button {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 12px;
    background: var(--app-accent);
    color: #fff;
    cursor: pointer;
}

.context-assistant-form button:disabled {
    opacity: .6;
    cursor: wait;
}

.context-assistant-form .assistant-audio-record,
.hub-catalog-chat-form .assistant-audio-record {
    flex: 0 0 42px;
    background: var(--app-bg-soft);
    color: var(--app-text-soft);
    border: 1px solid var(--app-border);
}

.context-assistant-form .assistant-audio-record.is-recording,
.hub-catalog-chat-form .assistant-audio-record.is-recording {
    background: var(--app-danger-soft);
    color: var(--app-danger);
    border-color: color-mix(in srgb, var(--app-danger) 35%, var(--app-border));
    animation: appAudioPulse 1.1s ease-in-out infinite;
}

@keyframes appAudioPulse {
    50% {
        transform: scale(.94);
        opacity: .72;
    }
}

.assistant-audio-review {
    margin: 0 12px 10px;
    padding: 11px;
    display: grid;
    gap: 9px;
    border: 1px solid var(--app-border);
    border-radius: 13px;
    background: var(--app-surface-muted);
}

.assistant-audio-review label {
    display: grid;
    gap: 6px;
    color: var(--app-text-soft);
    font-size: 10px;
    font-weight: 750;
}

.assistant-audio-review textarea {
    width: 100%;
    min-height: 78px;
    padding: 9px 10px;
    resize: vertical;
    border: 1px solid var(--app-border);
    border-radius: 10px;
    background: var(--app-surface-raised);
    color: var(--app-text);
}

.assistant-audio-actions {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 7px;
}

.assistant-audio-actions button {
    min-height: 34px;
    padding: 6px 9px;
    border: 1px solid var(--app-border);
    border-radius: 9px;
    background: var(--app-surface-raised);
    color: var(--app-text-soft);
    font: inherit;
    font-size: 9px;
    font-weight: 750;
    cursor: pointer;
}

.assistant-audio-actions button.is-primary {
    border-color: transparent;
    background: var(--app-accent);
    color: #fff;
}

.assistant-audio-original {
    margin-top: 8px;
    display: grid;
    gap: 5px;
}

.assistant-audio-original small {
    color: currentColor;
    opacity: .68;
    font-size: 9px;
    font-weight: 700;
}

.assistant-audio-original audio {
    width: min(250px, 100%);
    height: 34px;
}

.app-toast-region {
    position: fixed;
    top: 18px;
    right: 18px;
    z-index: 10100;
    display: grid;
    gap: 8px;
    pointer-events: none;
}

.app-toast {
    min-width: min(320px, calc(100vw - 36px));
    max-width: 420px;
    padding: 12px 14px;
    display: flex;
    align-items: flex-start;
    gap: 9px;
    border: 1px solid var(--app-border);
    border-radius: 13px;
    background: var(--app-surface-raised);
    box-shadow: var(--app-shadow-md);
    font-size: 11px;
    line-height: 1.45;
    pointer-events: auto;
    animation: appToastIn .22s ease both;
}

.app-toast.is-error {
    border-color: color-mix(in srgb, var(--app-danger) 38%, var(--app-border));
    color: var(--app-danger);
}

.app-toast.is-success {
    border-color: color-mix(in srgb, var(--app-positive) 38%, var(--app-border));
    color: var(--app-positive);
}

@keyframes appToastIn {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
}

.app-pointer-glow {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 0;
    width: 260px;
    height: 260px;
    border-radius: 50%;
    background: radial-gradient(circle, color-mix(in srgb, var(--app-accent) 9%, transparent), transparent 68%);
    opacity: 0;
    pointer-events: none;
    will-change: transform;
    transition: opacity .25s ease;
}

.app-pointer-glow.is-visible {
    opacity: 1;
}

.app-bottom-nav {
    display: none;
}

.app-mobile-sheet {
    display: none;
}

/* Compatibilidade Catálogo e Marketing */
.hub-page-shell {
    min-height: auto;
    padding: 0;
    background: transparent;
}

.hub-page-inner {
    width: 100%;
    margin: 0;
}

.hub-page-top {
    display: none;
}

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

.hub-page-card {
    padding: 18px;
}

.hub-page-card.full {
    grid-column: 1 / -1;
}

.hub-note {
    margin: 0;
    color: var(--app-text-soft);
    font-size: 12px;
    line-height: 1.6;
}

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

.hub-info-row {
    padding-bottom: 8px;
    display: flex;
    justify-content: space-between;
    gap: 14px;
    border-bottom: 1px solid var(--app-border);
    font-size: 12px;
}

.hub-info-row:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.hub-info-row span:first-child {
    color: var(--app-text-soft);
}

.hub-status-pill {
    padding: 7px 10px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border-radius: 999px;
    background: var(--app-surface-muted);
    font-size: 11px;
    font-weight: 700;
}

.hub-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--app-danger);
}

.hub-status-dot.conectado {
    background: var(--app-positive);
}

.hub-status-dot.aguardando_qr {
    background: var(--app-warning);
}

code.hub-code {
    padding: 10px 12px;
    display: block;
    overflow: auto;
    border: 1px solid var(--app-border);
    border-radius: 10px;
    background: var(--app-surface-muted);
    color: var(--app-text);
    font-size: 11px;
}

.hub-catalogo-categoria,
.hub-catalog-status-btn {
    height: 40px;
    padding: 0 11px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    border: 1px solid var(--app-border);
    border-radius: 11px;
    background: var(--app-surface-raised);
    color: var(--app-text);
    font: inherit;
    font-size: 11px;
    font-weight: 750;
    cursor: pointer;
}

.hub-catalog-shell {
    min-height: 520px;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
}

.hub-catalog-products {
    min-height: 0;
    overflow: hidden;
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius);
    background: var(--app-surface);
    box-shadow: var(--app-shadow-sm);
}

.hub-catalog-toolbar,
.hub-marketing-toolbar {
    margin-bottom: 14px;
    padding: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius);
    background: var(--app-surface);
    box-shadow: var(--app-shadow-sm);
    flex-wrap: wrap;
}

.hub-catalog-filters {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.hub-catalog-search {
    width: min(320px, 70vw);
}

.hub-catalog-status {
    min-width: 190px;
    position: relative;
}

.hub-catalog-status-btn {
    width: 100%;
}

.hub-catalog-status-btn i {
    color: var(--app-text-soft);
    transition: transform .16s ease;
}

.hub-catalog-status.open .hub-catalog-status-btn i {
    transform: rotate(180deg);
}

.hub-catalog-status-menu {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    z-index: 170;
    width: 100%;
    min-width: 220px;
    padding: 5px;
    display: none;
    border: 1px solid var(--app-border);
    border-radius: 12px;
    background: var(--app-surface-raised);
    box-shadow: var(--app-shadow-md);
}

.hub-catalog-status.open .hub-catalog-status-menu {
    display: grid;
    gap: 3px;
}

.hub-catalog-status-menu button {
    padding: 9px 10px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: var(--app-text);
    text-align: left;
    font: inherit;
    font-size: 11px;
    cursor: pointer;
}

.hub-catalog-status-menu button:hover,
.hub-catalog-status-menu button.active {
    background: var(--app-accent);
    color: #fff;
}

.hub-card-category-row .hub-catalog-status {
    width: 100%;
    min-width: 0;
}

.hub-catalog-category-select .hub-catalog-status-menu {
    max-height: 230px;
    overflow: auto;
}

.hub-catalog-category-select.is-empty .hub-catalog-status-btn span {
    color: var(--app-text-soft);
}

.hub-product-list {
    max-height: calc(100vh - 235px);
    padding: 14px;
    overflow: auto;
}

.hub-product-card-grid {
    display: none;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 12px;
}

.hub-product-table-wrap {
    overflow: auto;
    border: 1px solid var(--app-border);
    border-radius: 12px;
}

.hub-product-table {
    width: 100%;
    min-width: 1040px;
    border-collapse: collapse;
    font-size: 11px;
}

.hub-product-table th,
.hub-product-table td {
    padding: 10px;
    border-bottom: 1px solid var(--app-border);
    text-align: left;
    vertical-align: middle;
}

.hub-product-table th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: var(--app-surface-muted);
    color: var(--app-text-soft);
    font-size: 9px;
    text-transform: uppercase;
}

.hub-product-name-cell {
    min-width: 0;
    display: grid;
    gap: 5px;
}

.hub-product-title-row {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 7px;
    flex-wrap: wrap;
}

.hub-product-category-chip {
    width: max-content;
    max-width: 100%;
    padding: 4px 7px;
    display: inline-flex;
    border-radius: 999px;
    background: var(--app-positive-soft);
    color: var(--app-positive);
    font-size: 9px;
    font-weight: 800;
}

.hub-product-thumb {
    width: 48px;
    height: 48px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    overflow: hidden;
    border-radius: 14px;
    background: var(--app-bg-soft);
    color: var(--app-text-soft);
}

.hub-product-thumb.small {
    width: 35px;
    height: 35px;
}

.hub-product-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hub-product-card {
    padding: 12px;
    display: grid;
    gap: 10px;
    border: 1px solid var(--app-border);
    border-radius: 13px;
    background: var(--app-surface);
}

.hub-product-top {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.hub-product-title {
    margin: 0;
    font-size: 13px;
}

.hub-product-desc {
    max-height: 36px;
    overflow: hidden;
    color: var(--app-text-soft);
    font-size: 10px;
    line-height: 1.45;
}

.hub-product-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.hub-product-meta div {
    padding: 8px;
    border-radius: 10px;
    background: var(--app-surface-muted);
}

.hub-product-meta span {
    display: block;
    margin-bottom: 3px;
    color: var(--app-text-soft);
    font-size: 9px;
    text-transform: uppercase;
}

.hub-product-meta strong {
    font-size: 11px;
}

.hub-product-addons {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    color: var(--app-text-soft);
    font-size: 10px;
}

.hub-product-addons span {
    padding: 5px 8px;
    border: 1px solid var(--app-border);
    border-radius: 999px;
}

.hub-product-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.hub-catalog-pager {
    padding: 12px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    border-top: 1px solid var(--app-border);
    color: var(--app-text-soft);
    font-size: 10px;
}

.hub-product-empty {
    padding: 32px 14px;
    color: var(--app-text-soft);
    text-align: center;
}

.hub-catalog-processing {
    margin-bottom: 12px;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    gap: 9px;
    border-radius: 12px;
    background: var(--app-positive-soft);
    color: var(--app-positive);
    font-size: 11px;
    font-weight: 750;
}

.hub-catalog-chat,
.hub-agent-chat {
    position: fixed;
    right: 20px;
    bottom: 83px;
    z-index: 210;
    width: min(420px, calc(100vw - 40px));
    height: min(650px, calc(100dvh - 110px));
    display: none;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--app-border);
    border-radius: 20px;
    background: var(--app-surface);
    box-shadow: var(--app-shadow-lg);
}

.hub-catalog-chat.open,
.hub-agent-chat.open {
    display: flex;
}

.hub-catalog-chat-head,
.hub-agent-chat-head {
    padding: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    border-bottom: 1px solid var(--app-border);
}

.hub-catalog-chat-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.hub-catalog-chat-messages {
    flex: 1;
    min-height: 0;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow: auto;
}

.hub-catalog-msg {
    max-width: 86%;
    padding: 9px 11px;
    align-self: flex-start;
    border-radius: 13px 13px 13px 4px;
    background: var(--app-surface-muted);
    font-size: 11px;
    line-height: 1.5;
}

.hub-catalog-msg.enviada {
    align-self: flex-end;
    border-radius: 13px 13px 4px 13px;
    background: var(--app-accent);
    color: #fff;
}

.hub-catalog-msg.erro {
    background: var(--app-danger-soft);
    color: var(--app-danger);
}

.hub-catalog-msg-time {
    display: block;
    margin-top: 5px;
    font-size: 9px;
    opacity: .72;
}

.hub-catalog-debug {
    display: none !important;
}

.hub-catalog-retry {
    margin-top: 7px;
    padding: 5px 8px;
    border: 1px solid currentColor;
    border-radius: 8px;
    background: transparent;
    color: inherit;
    font-size: 9px;
    cursor: pointer;
}

.hub-catalog-typing {
    padding: 0 14px 8px;
}

.hub-catalog-chat-form {
    padding: 12px;
    display: flex;
    gap: 8px;
    border-top: 1px solid var(--app-border);
}

.hub-catalog-chat-form textarea {
    flex: 1;
    min-height: 42px;
    max-height: 110px;
    padding: 10px;
    resize: none;
    border: 1px solid var(--app-border);
    border-radius: 12px;
    background: var(--app-surface-raised);
    color: var(--app-text);
}

.hub-catalog-chat-form button {
    width: 42px;
    border: 0;
    border-radius: 12px;
    background: var(--app-accent);
    color: #fff;
    cursor: pointer;
}

.hub-catalog-chat-fab {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 205;
    height: 52px;
    padding: 0 17px;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    border: 0;
    border-radius: 999px;
    background: var(--app-accent);
    color: #fff;
    box-shadow: 0 16px 38px color-mix(in srgb, var(--app-accent) 34%, transparent);
    font-size: 11px;
    font-weight: 800;
    cursor: pointer;
}

.hub-chat-fab-dot {
    width: 8px;
    height: 8px;
    display: none;
    border-radius: 50%;
    background: #fff3cf;
}

.is-busy .hub-chat-fab-dot {
    display: block;
}

.hub-catalog-chat-close {
    width: 35px;
    height: 35px;
    display: grid;
    place-items: center;
    border: 1px solid var(--app-border);
    border-radius: 11px;
    background: var(--app-surface-muted);
    color: var(--app-text);
    cursor: pointer;
}

.hub-catalog-toast {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 300;
    max-width: min(360px, calc(100vw - 36px));
    padding: 11px 13px;
    border: 1px solid var(--app-border);
    border-radius: 12px;
    background: var(--app-surface);
    color: var(--app-text);
    box-shadow: var(--app-shadow-md);
    opacity: 0;
    transform: translateY(10px);
    pointer-events: none;
    transition: opacity .18s, transform .18s;
}

.hub-catalog-toast.show {
    opacity: 1;
    transform: translateY(0);
}

.hub-catalog-toast[data-type="error"] {
    color: var(--app-danger);
}

.hub-product-modal {
    position: fixed;
    inset: 0;
    z-index: 230;
    padding: 18px;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(10, 16, 13, .62);
    backdrop-filter: blur(4px);
}

.hub-product-modal.open {
    display: flex;
}

.hub-product-modal-box {
    max-height: 92vh;
    overflow: auto;
    border: 1px solid var(--app-border);
    border-radius: 20px;
    background: var(--app-surface);
    box-shadow: var(--app-shadow-lg);
}

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

.hub-product-field {
    display: grid;
    gap: 6px;
    color: var(--app-text-soft);
    font-size: 10px;
}

.hub-product-field.full,
.hub-marketing-form .full {
    grid-column: 1 / -1;
}

.hub-product-field input,
.hub-product-field textarea,
.hub-product-field select {
    padding: 10px;
    border: 1px solid var(--app-border);
    border-radius: 11px;
    background: var(--app-surface-raised);
    color: var(--app-text);
}

.hub-product-modal-actions {
    margin-top: 14px;
    display: flex;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}

.hub-marketing-page .app-page-head {
    display: none !important;
}

.hub-marketing-shell {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
}

/* Header Executivo */
.hub-mkt-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    padding: 16px 20px;
    background: var(--app-surface-raised, #1e293b);
    border: 1px solid var(--app-border, rgba(255,255,255,0.08));
    border-radius: 16px;
    box-shadow: var(--app-shadow-sm, 0 4px 14px rgba(0,0,0,0.15));
}

.hub-mkt-header-brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.hub-mkt-header-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(168,85,247,0.25), rgba(59,130,246,0.25));
    border: 1px solid rgba(168,85,247,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #c084fc;
    font-size: 18px;
    flex-shrink: 0;
}

.hub-mkt-header-title {
    font-size: 18px;
    font-weight: 800;
    color: var(--app-text, #f8fafc);
    letter-spacing: -0.02em;
    margin: 0;
    line-height: 1.2;
}

.hub-mkt-header-subtitle {
    font-size: 11px;
    color: var(--app-text-soft, #94a3b8);
    margin: 3px 0 0 0;
}

.hub-mkt-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

/* KPIs Executivos em Grid Responsivo */
.hub-mkt-kpis,
.hub-marketing-kpis {
    display: grid !important;
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    gap: 12px !important;
    width: 100%;
}

.hub-mkt-kpi-card {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    padding: 14px 16px !important;
    background: var(--app-surface, #1e293b) !important;
    border: 1px solid var(--app-border, rgba(255,255,255,0.08)) !important;
    border-radius: 14px !important;
    box-shadow: var(--app-shadow-sm, 0 2px 8px rgba(0,0,0,0.12)) !important;
    transition: transform .2s ease, border-color .2s ease;
    min-width: 0;
}

.hub-mkt-kpi-card:hover {
    border-color: rgba(255,255,255,0.2) !important;
    transform: translateY(-2px);
}

.hub-mkt-kpi-icon {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 11px;
    font-size: 16px;
    flex-shrink: 0;
}

.hub-mkt-kpi-icon.icon-purple {
    background: rgba(168, 85, 247, 0.15);
    color: #c084fc;
    border: 1px solid rgba(168, 85, 247, 0.3);
}

.hub-mkt-kpi-icon.icon-blue {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.hub-mkt-kpi-icon.icon-emerald {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.hub-mkt-kpi-icon.icon-amber {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.hub-mkt-kpi-icon.icon-rose {
    background: rgba(244, 63, 94, 0.15);
    color: #fb7185;
    border: 1px solid rgba(244, 63, 94, 0.3);
}

.hub-mkt-kpi-data {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.hub-mkt-kpi-label {
    font-size: 10px;
    font-weight: 700;
    color: var(--app-text-soft, #94a3b8);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hub-mkt-kpi-value {
    font-size: 22px;
    font-weight: 800;
    color: var(--app-text, #f8fafc);
    font-family: var(--app-display, inherit);
    line-height: 1.1;
}

/* Responsividade dos KPIs */
@media (max-width: 1200px) {
    .hub-mkt-kpis,
    .hub-marketing-kpis {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 768px) {
    .hub-mkt-kpis,
    .hub-marketing-kpis {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 480px) {
    .hub-mkt-kpis,
    .hub-marketing-kpis {
        grid-template-columns: 1fr !important;
    }
}

/* Navegação por Status de Campanha (Pills) */
.hub-mkt-status-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
}

.hub-mkt-status-nav::-webkit-scrollbar {
    display: none;
}

.hub-mkt-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: 999px;
    border: 1px solid var(--app-border, rgba(255,255,255,0.08));
    background: var(--app-surface-muted, rgba(255,255,255,0.03));
    color: var(--app-text-soft, #94a3b8);
    font-size: 11px;
    font-weight: 650;
    cursor: pointer;
    transition: all .2s ease;
    white-space: nowrap;
}

.hub-mkt-status-pill:hover {
    color: var(--app-text, #f8fafc);
    border-color: rgba(255,255,255,0.2);
    background: var(--app-surface, rgba(255,255,255,0.06));
}

.hub-mkt-status-pill.active {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    border-color: #3b82f6;
    color: #fff;
    box-shadow: 0 2px 10px rgba(59,130,246,0.4);
}

/* Barra de Controles: Busca, Filtros e Alternador */
.hub-mkt-controls-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    padding: 10px 14px;
    background: var(--app-surface, #1e293b);
    border: 1px solid var(--app-border, rgba(255,255,255,0.08));
    border-radius: 14px;
}

.hub-mkt-search-wrapper {
    position: relative;
    flex: 1;
    min-width: 240px;
    max-width: 420px;
}

.hub-mkt-search-wrapper i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--app-text-soft, #94a3b8);
    font-size: 12px;
    pointer-events: none;
}

.hub-mkt-search-wrapper input {
    width: 100%;
    padding: 8px 12px 8px 34px;
    border-radius: 9px;
    border: 1px solid var(--app-border, rgba(255,255,255,0.12));
    background: var(--app-bg-soft, rgba(0,0,0,0.25));
    color: var(--app-text, #f8fafc);
    font-size: 11px;
    outline: none;
    transition: border-color .2s ease;
}

.hub-mkt-search-wrapper input:focus {
    border-color: var(--app-accent, #3b82f6);
    box-shadow: 0 0 0 2px rgba(59,130,246,0.2);
}

.hub-marketing-select,
.hub-marketing-date {
    padding: 8px 12px;
    border-radius: 9px;
    border: 1px solid var(--app-border, rgba(255,255,255,0.12));
    background: var(--app-bg-soft, rgba(0,0,0,0.25));
    color: var(--app-text, #f8fafc);
    font-size: 11px;
    outline: none;
    transition: border-color .2s ease;
}

.hub-marketing-select:focus,
.hub-marketing-date:focus {
    border-color: var(--app-accent, #3b82f6);
    box-shadow: 0 0 0 2px rgba(59,130,246,0.2);
}

.hub-mkt-view-toggle {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 3px;
    border-radius: 8px;
    background: var(--app-bg-soft, rgba(0,0,0,0.25));
    border: 1px solid var(--app-border, rgba(255,255,255,0.08));
    margin-left: auto;
}

.hub-mkt-view-btn {
    width: 32px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    border: none;
    background: transparent;
    color: var(--app-text-soft, #94a3b8);
    font-size: 12px;
    cursor: pointer;
    transition: all .2s ease;
}

.hub-mkt-view-btn:hover {
    color: var(--app-text, #f8fafc);
}

.hub-mkt-view-btn.active {
    background: var(--app-surface-raised, rgba(255,255,255,0.14));
    color: #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}

/* Área Principal de Conteúdo em Largura Total */
.hub-marketing-main-area {
    width: 100%;
}

/* GRID DE CARDS PREMIUM */
.hub-marketing-list.grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)) !important;
    gap: 16px !important;
    width: 100%;
}

.hub-mkt-premium-card {
    display: flex;
    flex-direction: column;
    border-radius: 16px;
    border: 1px solid var(--app-border, rgba(255,255,255,0.08));
    background: var(--app-surface, #1e293b);
    overflow: hidden;
    box-shadow: var(--app-shadow-sm, 0 4px 16px rgba(0,0,0,0.12));
    transition: all .25s ease;
}

.hub-mkt-premium-card:hover {
    border-color: rgba(255,255,255,0.2);
    transform: translateY(-3px);
    box-shadow: 0 10px 24px rgba(0,0,0,0.28);
}

.hub-mkt-card-cover {
    position: relative;
    height: 130px;
    width: 100%;
    background: linear-gradient(135deg, #1e1b4b, #312e81, #0f172a);
    overflow: hidden;
}

.hub-mkt-card-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .4s ease;
}

.hub-mkt-premium-card:hover .hub-mkt-card-cover img {
    transform: scale(1.05);
}

.hub-mkt-thumb-placeholder-modern {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.25);
    font-size: 38px;
    background: radial-gradient(circle, rgba(99,102,241,0.2) 0%, rgba(15,23,42,0.8) 100%);
}

.hub-mkt-cover-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0.2) 0%, rgba(15,23,42,0.85) 100%);
    pointer-events: none;
}

.hub-mkt-channel-pill {
    position: absolute;
    top: 10px;
    left: 10px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 9px;
    border-radius: 999px;
    background: rgba(0,0,0,0.65);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.12);
    color: #f8fafc;
    font-size: 10px;
    font-weight: 700;
    z-index: 2;
}

.hub-mkt-status-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 9px;
    border-radius: 999px;
    background: rgba(0,0,0,0.65);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.12);
    font-size: 10px;
    font-weight: 750;
    z-index: 2;
}

.hub-mkt-status-badge.pronta { color: #34d399; border-color: rgba(52,211,153,0.35); }
.hub-mkt-status-badge.rascunho { color: #94a3b8; }
.hub-mkt-status-badge.agendada { color: #60a5fa; border-color: rgba(96,165,250,0.35); }
.hub-mkt-status-badge.enviada, .hub-mkt-status-badge.concluido { color: #22d3ee; border-color: rgba(34,211,238,0.35); }
.hub-mkt-status-badge.pausada { color: #fbbf24; border-color: rgba(251,191,36,0.35); }
.hub-mkt-status-badge.arquivada { color: #64748b; }

.hub-mkt-status-badge .pulse-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    box-shadow: 0 0 6px currentColor;
    animation: app-pulse 2s infinite;
}

.hub-mkt-card-body {
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
}

.hub-mkt-card-meta-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.hub-mkt-card-type {
    font-size: 10px;
    font-weight: 800;
    color: #60a5fa;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.hub-mkt-card-date {
    font-size: 10px;
    color: var(--app-text-soft, #94a3b8);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.hub-mkt-card-title {
    font-size: 14px;
    font-weight: 750;
    color: var(--app-text, #f8fafc);
    margin: 0;
    line-height: 1.35;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hub-mkt-badges-cluster {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.hub-mkt-card-audience {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: var(--app-text-soft, #94a3b8);
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hub-mkt-metrics-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    padding: 8px 10px;
    border-radius: 10px;
    background: var(--app-surface-muted, rgba(255,255,255,0.025));
    border: 1px solid var(--app-border, rgba(255,255,255,0.06));
}

.hub-mkt-metric-cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 2px;
}

.hub-mkt-metric-cell span {
    font-size: 9px;
    color: var(--app-text-soft, #94a3b8);
    font-weight: 600;
    text-transform: uppercase;
}

.hub-mkt-metric-cell strong {
    font-size: 12px;
    font-weight: 750;
    color: var(--app-text, #f8fafc);
}

.hub-mkt-card-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    margin-top: 4px;
}

/* TABELA DE CAMPANHAS (VISÃO LISTA) */
.hub-mkt-table-wrap {
    width: 100%;
    overflow-x: auto;
    border: 1px solid var(--app-border, rgba(255,255,255,0.08));
    border-radius: 14px;
    background: var(--app-surface, #1e293b);
    box-shadow: var(--app-shadow-sm, 0 4px 14px rgba(0,0,0,0.12));
}

.hub-mkt-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 11px;
    min-width: 860px;
}

.hub-mkt-table th {
    background: var(--app-surface-raised, rgba(255,255,255,0.03));
    color: var(--app-text-soft, #94a3b8);
    font-size: 10px;
    font-weight: 750;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 12px 14px;
    border-bottom: 1px solid var(--app-border, rgba(255,255,255,0.08));
    text-align: left;
}

.hub-mkt-table td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--app-border, rgba(255,255,255,0.05));
    vertical-align: middle;
    color: var(--app-text, #f8fafc);
}

.hub-mkt-table tr:hover td {
    background: rgba(255,255,255,0.02);
}

.hub-mkt-table-campaign-col {
    display: flex;
    align-items: center;
    gap: 12px;
}

.hub-mkt-table-thumb {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    overflow: hidden;
    background: var(--app-surface-muted, #334155);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.hub-mkt-table-thumb.placeholder {
    color: rgba(255,255,255,0.3);
    font-size: 16px;
}

.hub-mkt-table-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hub-mkt-table-campaign-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.hub-mkt-table-type {
    font-size: 9px;
    font-weight: 800;
    color: #60a5fa;
    text-transform: uppercase;
}

.hub-mkt-table-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--app-text, #f8fafc);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 240px;
}

.hub-mkt-channel-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 8px;
    border-radius: 6px;
    background: rgba(255,255,255,0.05);
    color: var(--app-text, #f8fafc);
    font-size: 10px;
}

.hub-mkt-channel-tag i.fa-whatsapp { color: #22c55e; }
.hub-mkt-channel-tag i.fa-instagram { color: #ec4899; }

/* Empty State */
.hub-mkt-empty-state {
    grid-column: 1 / -1;
    padding: 48px 24px;
    text-align: center;
    background: var(--app-surface, #1e293b);
    border: 1px dashed var(--app-border, rgba(255,255,255,0.12));
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.hub-mkt-empty-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(168,85,247,0.12);
    color: #c084fc;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-bottom: 4px;
}

.hub-mkt-empty-state h3 {
    font-size: 16px;
    font-weight: 750;
    color: var(--app-text, #f8fafc);
    margin: 0;
}

.hub-mkt-empty-state p {
    font-size: 12px;
    color: var(--app-text-soft, #94a3b8);
    max-width: 420px;
    margin: 0 0 8px 0;
}

/* Modal de Ideias Rápidas com IA */
.hub-ideas-modal-box {
    width: min(580px, 100%);
    padding: 20px 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.hub-ideas-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.hub-idea-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px;
    border-radius: 12px;
    border: 1px solid var(--app-border, rgba(255,255,255,0.08));
    background: var(--app-surface-muted, rgba(255,255,255,0.02));
    cursor: pointer;
    transition: all .2s ease;
    text-align: left;
}

.hub-idea-item:hover {
    border-color: #c084fc;
    background: rgba(168,85,247,0.06);
    transform: translateX(4px);
}

.hub-idea-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    font-size: 17px;
    flex-shrink: 0;
}

.hub-idea-content {
    display: flex;
    flex-direction: column;
    gap: 3px;
    flex: 1;
}

.hub-idea-content h4 {
    font-size: 13px;
    font-weight: 750;
    color: var(--app-text, #f8fafc);
    margin: 0;
}

.hub-idea-content p {
    margin: 0;
    font-size: 11px;
    color: var(--app-text-soft, #94a3b8);
    line-height: 1.35;
}

.hub-marketing-modal {
    width: min(760px, 100%);
}

.hub-marketing-audience-modal {
    width: min(920px, 100%);
    padding-bottom: 14px;
}

.hub-marketing-audience-filters {
    padding: 14px 16px;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
    align-items: end;
    border-bottom: 1px solid var(--app-border);
}

.hub-marketing-audience-filters .hub-card-field {
    min-width: 0;
}

.hub-marketing-audience-summary {
    padding: 12px 16px 6px;
    color: var(--app-text-soft);
    font-size: 10px;
}

.hub-marketing-select-all {
    margin: 4px 16px 10px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--app-text);
    font-size: 10px;
    font-weight: 750;
}

.hub-marketing-audience-list {
    max-height: min(390px, 42vh);
    margin: 0 16px;
    overflow: auto;
    border: 1px solid var(--app-border);
    border-radius: 13px;
    background: var(--app-surface-muted);
}

.hub-marketing-audience-item {
    padding: 11px 12px;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    border-bottom: 1px solid var(--app-border);
    cursor: pointer;
}

.hub-marketing-audience-item:last-child {
    border-bottom: 0;
}

.hub-marketing-audience-item:hover {
    background: var(--app-surface);
}

.hub-marketing-audience-item span {
    min-width: 0;
    display: grid;
    gap: 3px;
}

.hub-marketing-audience-item strong {
    overflow: hidden;
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hub-marketing-audience-item small,
.hub-marketing-audience-item em {
    color: var(--app-text-soft);
    font-size: 9px;
    font-style: normal;
}

.hub-marketing-progress {
    padding: 20px 16px;
}

.hub-marketing-progress-counts {
    margin-top: 10px;
    display: flex;
    justify-content: space-between;
    gap: 10px;
    color: var(--app-text-soft);
    font-size: 10px;
}

.hub-marketing-progress-counts strong {
    color: var(--app-text);
}

.hub-marketing-progress p {
    margin: 12px 0 0;
    color: var(--app-positive);
    font-size: 10px;
}

.hub-marketing-ban-warning {
    margin: 10px 16px 6px;
    padding: 12px 14px;
    border-radius: 10px;
    background: rgba(245, 158, 11, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.35);
    color: var(--app-text);
    font-size: 11px;
    line-height: 1.45;
}

.hub-ban-warning-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    color: #f59e0b;
    margin-bottom: 6px;
    font-size: 12px;
}

.hub-marketing-ban-warning p {
    margin: 0 0 8px;
    color: var(--app-text);
    font-size: 11px;
}

.hub-ban-tips {
    list-style: none;
    margin: 0 0 10px;
    padding: 0;
    display: grid;
    gap: 4px;
    font-size: 10.5px;
    color: var(--app-text-soft);
}

.hub-ban-tips li {
    display: flex;
    align-items: center;
    gap: 6px;
}

.hub-ban-tips li i {
    color: #10b981;
    font-size: 9px;
}

.hub-ban-consent-check {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 11px;
    padding-top: 6px;
    border-top: 1px dashed rgba(245, 158, 11, 0.25);
    color: var(--app-text);
}

.hub-ban-consent-check input[type="checkbox"] {
    margin-top: 2px;
    accent-color: #f59e0b;
}

.hub-marketing-audience-modal>.hub-catalogo-modal-actions {
    padding: 12px 16px 0;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    border-top: 1px solid var(--app-border);
}

.hub-catalogo-modal>.hub-catalogo-modal-actions,
.hub-marketing-form>.hub-catalogo-modal-actions {
    position: sticky;
    bottom: 0;
    z-index: 3;
    background: color-mix(in srgb, var(--app-surface) 94%, transparent);
    backdrop-filter: blur(12px);
}

/* ═══════════════════════════════════════════════════════════════
   STUDIO DE CAMPANHAS DE MARKETING — UI/UX REDESIGN
   ═══════════════════════════════════════════════════════════════ */
.hub-marketing-modal {
    width: min(1060px, 96vw) !important;
    max-height: 92vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.hub-marketing-form {
    display: flex;
    flex-direction: column;
    gap: 0;
    overflow-y: auto;
    max-height: calc(92vh - 120px);
    padding-right: 2px;
}

/* Abas de Navegação */
.hub-mkt-tabs {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    background: var(--app-surface-raised, rgba(255,255,255,0.03));
    border-bottom: 1px solid var(--app-border, rgba(255,255,255,0.08));
    overflow-x: auto;
}

.hub-mkt-tab-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 9px;
    border: 1px solid transparent;
    background: transparent;
    color: var(--app-text-soft, #94a3b8);
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all .2s ease;
    white-space: nowrap;
}

.hub-mkt-tab-btn:hover {
    color: var(--app-text, #f8fafc);
    background: var(--app-surface, rgba(255,255,255,0.06));
}

.hub-mkt-tab-btn.active {
    color: #fff;
    background: var(--app-accent, #3b82f6);
    border-color: rgba(255,255,255,0.15);
    box-shadow: 0 4px 12px rgba(59,130,246,0.3);
}

.hub-mkt-tab-btn i {
    font-size: 12px;
}

.hub-mkt-tab-badge {
    padding: 2px 6px;
    border-radius: 999px;
    background: rgba(255,255,255,0.18);
    font-size: 9px;
    font-weight: 700;
}

/* Conteúdo das Abas */
.hub-mkt-tab-pane {
    display: none;
    padding: 18px 20px;
    flex-direction: column;
    gap: 16px;
}

.hub-mkt-tab-pane.active {
    display: flex;
}

/* Seletor de Mecânica de Oferta */
.hub-offer-type-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 4px;
}

.hub-offer-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 14px;
    border-radius: 12px;
    border: 1.5px solid var(--app-border, rgba(255,255,255,0.08));
    background: var(--app-surface-raised, rgba(255,255,255,0.02));
    cursor: pointer;
    transition: all .22s ease;
}

.hub-offer-card:hover {
    border-color: rgba(255,255,255,0.22);
    transform: translateY(-2px);
    background: var(--app-surface, rgba(255,255,255,0.05));
}

.hub-offer-card.selected {
    border-color: var(--app-accent, #3b82f6);
    background: color-mix(in srgb, var(--app-accent, #3b82f6) 12%, var(--app-surface, #1e293b));
    box-shadow: 0 6px 18px rgba(59,130,246,0.2);
}

.hub-offer-card-check {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 20px;
    height: 20px;
    border-radius: 6px;
    border: 1.5px solid var(--app-border, rgba(255,255,255,0.18));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    color: transparent;
    transition: all .2s ease;
}

.hub-offer-card.selected .hub-offer-card-check {
    background: var(--app-accent, #3b82f6);
    border-color: var(--app-accent, #3b82f6);
    color: #fff;
    box-shadow: 0 2px 6px rgba(59,130,246,0.4);
}

.hub-offer-card-icon {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    font-size: 16px;
}

.hub-offer-card[data-type="cupom"] .hub-offer-card-icon {
    background: rgba(168,85,247,0.18);
    color: #c084fc;
}

.hub-offer-card[data-type="combo"] .hub-offer-card-icon {
    background: rgba(249,115,22,0.18);
    color: #fb923c;
}

.hub-offer-card[data-type="fidelidade"] .hub-offer-card-icon {
    background: rgba(234,179,8,0.18);
    color: #facc15;
}

.hub-offer-card[data-type="direta"] .hub-offer-card-icon {
    background: rgba(59,130,246,0.18);
    color: #60a5fa;
}

.hub-offer-card strong {
    font-size: 12px;
    color: var(--app-text, #f8fafc);
}

.hub-offer-card p {
    margin: 0;
    font-size: 10px;
    color: var(--app-text-soft, #94a3b8);
    line-height: 1.35;
}

/* Painéis de Detalhes da Oferta */
.hub-offer-detail-box {
    padding: 16px;
    border-radius: 12px;
    border: 1px solid var(--app-border, rgba(255,255,255,0.08));
    background: var(--app-surface-muted, rgba(255,255,255,0.015));
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.hub-offer-detail-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.hub-offer-detail-header h3 {
    margin: 0;
    font-size: 12px;
    font-weight: 700;
    color: var(--app-text, #f8fafc);
    display: flex;
    align-items: center;
    gap: 8px;
}

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

.hub-btn-toggle-group {
    display: inline-flex;
    border-radius: 9px;
    border: 1px solid var(--app-border, rgba(255,255,255,0.1));
    overflow: hidden;
    height: 38px;
}

.hub-btn-toggle {
    flex: 1;
    padding: 0 14px;
    border: none;
    background: var(--app-surface-raised, rgba(255,255,255,0.04));
    color: var(--app-text-soft, #94a3b8);
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    transition: all .18s;
}

.hub-btn-toggle.active {
    background: var(--app-accent, #3b82f6);
    color: #fff;
}

.hub-coupon-code-wrap {
    display: flex;
    gap: 6px;
}

.hub-coupon-code-wrap input {
    flex: 1;
    text-transform: uppercase;
    font-family: monospace;
    font-weight: 700;
    letter-spacing: 0.05em;
}

.hub-live-offer-summary {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 9px;
    background: color-mix(in srgb, var(--app-accent, #3b82f6) 10%, transparent);
    border: 1px dashed color-mix(in srgb, var(--app-accent, #3b82f6) 40%, transparent);
    color: var(--app-text, #f8fafc);
    font-size: 11px;
}

.hub-live-offer-summary i {
    color: var(--app-accent, #3b82f6);
    font-size: 14px;
}

/* Grid de Múltiplos Serviços */
.hub-services-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.hub-services-search-wrap {
    position: relative;
    flex: 1;
    min-width: 200px;
}

.hub-services-search-wrap input {
    width: 100%;
    padding-left: 32px;
}

.hub-services-search-wrap i {
    position: absolute;
    left: 11px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--app-text-soft, #94a3b8);
    font-size: 11px;
}

.hub-services-counter {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    color: var(--app-text-soft, #94a3b8);
}

.hub-services-counter strong {
    color: var(--app-accent, #3b82f6);
}

.hub-services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 10px;
    max-height: 380px;
    overflow-y: auto;
    padding: 2px;
}

.hub-service-card-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 11px 13px;
    border-radius: 11px;
    border: 1px solid var(--app-border, rgba(255,255,255,0.08));
    background: var(--app-surface-raised, rgba(255,255,255,0.02));
    cursor: pointer;
    transition: all .18s ease;
    user-select: none;
}

.hub-service-card-item:hover {
    border-color: rgba(255,255,255,0.2);
    background: var(--app-surface, rgba(255,255,255,0.05));
}

.hub-service-card-item.selected {
    border-color: var(--app-accent, #3b82f6);
    background: color-mix(in srgb, var(--app-accent, #3b82f6) 10%, var(--app-surface, #1e293b));
}

.hub-service-card-item input[type="checkbox"] {
    margin-top: 3px;
    accent-color: var(--app-accent, #3b82f6);
    cursor: pointer;
}

.hub-service-card-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.hub-service-card-name {
    font-size: 11px;
    font-weight: 600;
    color: var(--app-text, #f8fafc);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hub-service-card-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 10px;
    color: var(--app-text-soft, #94a3b8);
}

.hub-service-card-price {
    color: #4ade80;
    font-weight: 700;
}

/* Aba de Mensagem e Preview WhatsApp */
.hub-mkt-msg-layout {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 18px;
    align-items: start;
}

.hub-var-chips-container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
}

.hub-var-chip {
    padding: 4px 9px;
    border-radius: 999px;
    border: 1px solid var(--app-border, rgba(255,255,255,0.1));
    background: var(--app-surface-raised, rgba(255,255,255,0.04));
    color: var(--app-accent, #3b82f6);
    font-size: 10px;
    font-family: monospace;
    font-weight: 600;
    cursor: pointer;
    transition: all .15s;
}

.hub-var-chip:hover {
    background: var(--app-accent, #3b82f6);
    color: #fff;
    border-color: var(--app-accent, #3b82f6);
}

.hub-btn-ai-suggest {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 11px;
    border-radius: 7px;
    border: 1px solid rgba(168,85,247,0.4);
    background: rgba(168,85,247,0.12);
    color: #c084fc;
    font-size: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all .2s;
    margin-left: auto;
}

.hub-btn-ai-suggest:hover {
    background: rgba(168,85,247,0.25);
    color: #fff;
}

/* WhatsApp Phone Mockup */
.hub-whatsapp-phone {
    border-radius: 26px;
    border: 4px solid #334155;
    background: #0b141a;
    box-shadow: 0 18px 38px rgba(0,0,0,0.5);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 420px;
}

.hub-whatsapp-phone-top {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: #202c33;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.hub-whatsapp-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #00a884;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 14px;
}

.hub-whatsapp-phone-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.hub-whatsapp-phone-info strong {
    font-size: 11px;
    color: #e9edef;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hub-whatsapp-phone-info small {
    font-size: 9px;
    color: #8696a0;
}

.hub-whatsapp-chat-body {
    flex: 1;
    padding: 14px 12px;
    background: #0b141a;
    background-image: radial-gradient(rgba(255,255,255,0.03) 1px, transparent 0);
    background-size: 14px 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.hub-whatsapp-bubble {
    align-self: flex-start;
    max-width: 88%;
    padding: 9px 12px 6px;
    border-radius: 0 10px 10px 10px;
    background: #005c4b;
    color: #e9edef;
    font-size: 11.5px;
    line-height: 1.45;
    position: relative;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
    word-break: break-word;
}

.hub-whatsapp-bubble-img {
    margin: -4px -7px 7px;
    border-radius: 8px;
    overflow: hidden;
    max-height: 160px;
}

.hub-whatsapp-bubble-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.hub-whatsapp-bubble-time {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
    font-size: 9px;
    color: rgba(255,255,255,0.6);
    margin-top: 4px;
}

.hub-whatsapp-bubble-time i {
    color: #53bdeb;
    font-size: 11px;
}

/* Aba de Segmentação & Histórico */
.hub-audience-history-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.hub-history-filter-card {
    padding: 14px;
    border-radius: 11px;
    border: 1px solid var(--app-border, rgba(255,255,255,0.08));
    background: var(--app-surface-raised, rgba(255,255,255,0.02));
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.hub-history-filter-card label {
    font-size: 11px;
    font-weight: 700;
    color: var(--app-text, #f8fafc);
    display: flex;
    align-items: center;
    gap: 7px;
}

.hub-quick-inactivity-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 4px;
}

.hub-inactivity-pill {
    padding: 5px 10px;
    border-radius: 999px;
    border: 1px solid var(--app-border, rgba(255,255,255,0.1));
    background: transparent;
    color: var(--app-text-soft, #94a3b8);
    font-size: 10px;
    cursor: pointer;
    transition: all .15s;
}

.hub-inactivity-pill:hover {
    color: var(--app-text, #f8fafc);
    border-color: rgba(255,255,255,0.25);
}

.hub-inactivity-pill.active {
    background: var(--app-accent, #3b82f6);
    color: #fff;
    border-color: var(--app-accent, #3b82f6);
}

.hub-audience-estimator-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 12px 16px;
    border-radius: 11px;
    background: var(--app-surface-raised, rgba(255,255,255,0.03));
    border: 1px solid var(--app-border, rgba(255,255,255,0.08));
}

.hub-audience-estimator-bar strong {
    font-size: 12px;
    color: var(--app-text, #f8fafc);
}

/* Badges da Listagem de Campanhas */
.hub-mkt-badge-offer {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
}

.hub-mkt-badge-offer.cupom {
    background: rgba(168,85,247,0.18);
    color: #d8b4fe;
    border: 1px solid rgba(168,85,247,0.3);
}

.hub-mkt-badge-offer.combo {
    background: rgba(249,115,22,0.18);
    color: #fdba74;
    border: 1px solid rgba(249,115,22,0.3);
}

.hub-mkt-badge-offer.fidelidade {
    background: rgba(234,179,8,0.18);
    color: #fde047;
    border: 1px solid rgba(234,179,8,0.3);
}

.hub-mkt-badge-offer.direta {
    background: rgba(59,130,246,0.18);
    color: #93c5fd;
    border: 1px solid rgba(59,130,246,0.3);
}

.hub-mkt-badge-services {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 7px;
    border-radius: 6px;
    background: rgba(255,255,255,0.06);
    color: var(--app-text-soft, #cbd5e1);
    font-size: 10px;
}

@media (max-width: 900px) {
    .hub-offer-type-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .hub-mkt-msg-layout {
        grid-template-columns: 1fr;
    }
    .hub-audience-history-grid {
        grid-template-columns: 1fr;
    }
}

/* ==============================================================================
   FASE 2: GALERIA INTELIGENTE DE CRIATIVOS E ÁLBUNS
   ============================================================================== */
.hub-gallery-modal-box {
    width: min(1040px, 96vw);
    max-height: 90vh;
    padding: 20px 24px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    overflow: hidden;
}

/* Barra de Álbuns com Scroll Horizontal */
.hub-gallery-albums-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--app-border, rgba(255,255,255,0.08));
}

.hub-gallery-albums-scroll {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow-x: auto;
    flex: 1;
    scrollbar-width: thin;
    padding: 2px 0;
}

.hub-gallery-albums-scroll::-webkit-scrollbar {
    height: 4px;
}

.hub-gallery-albums-scroll::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.15);
    border-radius: 999px;
}

.hub-gallery-album-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 10px;
    border: 1px solid var(--app-border, rgba(255,255,255,0.08));
    background: var(--app-surface-muted, rgba(255,255,255,0.03));
    color: var(--app-text-soft, #94a3b8);
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all .18s ease;
}

.hub-gallery-album-chip:hover {
    border-color: rgba(255,255,255,0.22);
    color: var(--app-text, #f8fafc);
    background: var(--app-surface, rgba(255,255,255,0.06));
}

.hub-gallery-album-chip.active {
    background: rgba(59,130,246,0.14);
    border-color: #3b82f6;
    color: #93c5fd;
    box-shadow: 0 2px 8px rgba(59,130,246,0.2);
}

.hub-album-icon {
    width: 22px;
    height: 22px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
}

.hub-album-name {
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hub-album-count {
    padding: 1px 6px;
    border-radius: 999px;
    background: rgba(255,255,255,0.1);
    font-size: 9px;
    font-weight: 700;
}

/* Controles da Galeria */
.hub-gallery-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.hub-aspect-filters {
    display: flex;
    align-items: center;
    gap: 6px;
}

.hub-aspect-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 11px;
    border-radius: 8px;
    border: 1px solid var(--app-border, rgba(255,255,255,0.08));
    background: var(--app-surface-raised, rgba(255,255,255,0.03));
    color: var(--app-text-soft, #94a3b8);
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all .15s ease;
}

.hub-aspect-pill:hover {
    color: var(--app-text, #f8fafc);
    border-color: rgba(255,255,255,0.2);
}

.hub-aspect-pill.active {
    background: #3b82f6;
    border-color: #3b82f6;
    color: #fff;
    box-shadow: 0 2px 6px rgba(59,130,246,0.3);
}

/* Conteúdo da Galeria & Grid */
.hub-gallery-content-area {
    flex: 1;
    overflow-y: auto;
    min-height: 320px;
    max-height: 55vh;
    padding-right: 4px;
    scrollbar-width: thin;
}

.hub-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 12px;
}

.hub-gallery-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: var(--app-surface, #1e293b);
    border: 1px solid var(--app-border, rgba(255,255,255,0.08));
    aspect-ratio: 1 / 1;
    cursor: pointer;
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.hub-gallery-item.ratio-4-5 {
    aspect-ratio: 4 / 5;
}

.hub-gallery-item.ratio-9-16 {
    aspect-ratio: 9 / 16;
}

.hub-gallery-item:hover {
    transform: translateY(-3px);
    border-color: #60a5fa;
    box-shadow: 0 8px 24px rgba(0,0,0,0.35);
}

.hub-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.hub-gallery-format-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    padding: 2px 6px;
    border-radius: 6px;
    background: rgba(0,0,0,0.65);
    backdrop-filter: blur(4px);
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.03em;
    z-index: 2;
}

.hub-gallery-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.2) 60%, transparent 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 10px;
    opacity: 0;
    transition: opacity .2s ease;
    z-index: 3;
}

.hub-gallery-item:hover .hub-gallery-overlay {
    opacity: 1;
}

.hub-gallery-item-title {
    font-size: 11px;
    color: #fff;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 6px;
}

.hub-gallery-item-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.hub-gallery-action-btn {
    padding: 4px 8px;
    border-radius: 6px;
    border: 1px solid rgba(255,255,255,0.2);
    background: rgba(255,255,255,0.12);
    backdrop-filter: blur(4px);
    color: #fff;
    font-size: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all .15s ease;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.hub-gallery-action-btn:hover {
    background: rgba(255,255,255,0.3);
    transform: scale(1.05);
}

.hub-gallery-action-btn.primary {
    background: #3b82f6;
    border-color: #3b82f6;
}

.hub-gallery-action-btn.danger {
    background: rgba(239,68,68,0.35);
    border-color: rgba(239,68,68,0.5);
    color: #fca5a5;
}

.hub-gallery-action-btn.danger:hover {
    background: #ef4444;
    color: #fff;
}

.hub-gallery-modal-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 10px;
    border-top: 1px solid var(--app-border, rgba(255,255,255,0.08));
}

/* Alternador de Modo de Visualização da Galeria */
.hub-gallery-view-modes {
    display: inline-flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--app-border, rgba(255, 255, 255, 0.08));
    border-radius: 8px;
    padding: 3px;
    gap: 4px;
}

.hub-gallery-mode-btn {
    padding: 6px 12px;
    border-radius: 6px;
    border: none;
    background: transparent;
    color: var(--app-text-soft, #94a3b8);
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all .2s ease;
}

.hub-gallery-mode-btn:hover {
    color: var(--app-text, #f8fafc);
    background: rgba(255, 255, 255, 0.06);
}

.hub-gallery-mode-btn.active {
    background: #3b82f6;
    color: #fff;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.35);
}

/* Container e Cards de Lotes de Criação / Requisições */
.hub-gallery-lotes-container {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 4px 2px;
}

.hub-gallery-lote-card {
    background: var(--app-surface, #1e293b);
    border: 1px solid var(--app-border, rgba(255, 255, 255, 0.08));
    border-radius: 12px;
    padding: 14px 16px;
    transition: border-color .2s ease, box-shadow .2s ease;
}

.hub-gallery-lote-card:hover {
    border-color: rgba(96, 165, 250, 0.4);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.hub-lote-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.hub-lote-title-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 240px;
}

.hub-lote-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--app-text, #f8fafc);
    cursor: default;
}

.hub-lote-edit-btn {
    padding: 3px 7px;
    font-size: 10.5px;
    color: var(--app-text-soft, #94a3b8);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    cursor: pointer;
    transition: all .15s ease;
}

.hub-lote-edit-btn:hover {
    color: #60a5fa;
    border-color: #60a5fa;
    background: rgba(96, 165, 250, 0.1);
}

.hub-lote-title-edit-form {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
}

.hub-lote-title-input {
    height: 30px;
    padding: 0 10px;
    font-size: 12px;
    border-radius: 6px;
    border: 1px solid #3b82f6;
    background: rgba(15, 23, 42, 0.85);
    color: #fff;
    flex: 1;
    max-width: 320px;
}

.hub-lote-meta-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.hub-lote-badge {
    font-size: 10px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.06);
    color: var(--app-text-soft, #94a3b8);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.hub-lote-badge.count {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.hub-lote-badge.format {
    background: rgba(168, 85, 247, 0.15);
    color: #c084fc;
    border: 1px solid rgba(168, 85, 247, 0.3);
}

.hub-lote-slides-scroll {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 6px;
    scrollbar-width: thin;
}

.hub-lote-slide-thumb {
    position: relative;
    flex: 0 0 110px;
    aspect-ratio: 1 / 1;
    border-radius: 8px;
    overflow: hidden;
    background: #0f172a;
    border: 1px solid rgba(255, 255, 255, 0.08);
    cursor: pointer;
    transition: transform .15s ease, border-color .15s ease;
}

.hub-lote-slide-thumb.ratio-4-5 {
    aspect-ratio: 4 / 5;
    flex: 0 0 100px;
}

.hub-lote-slide-thumb.ratio-9-16 {
    aspect-ratio: 9 / 16;
    flex: 0 0 85px;
}

.hub-lote-slide-thumb:hover {
    transform: scale(1.03);
    border-color: #60a5fa;
}

.hub-lote-slide-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.hub-lote-slide-num {
    position: absolute;
    bottom: 4px;
    right: 4px;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
    color: #fff;
    font-size: 8.5px;
    font-weight: 700;
    padding: 2px 5px;
    border-radius: 4px;
}

.hub-lote-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* ==============================================================================
   FASE 2: STUDIO VISUAL IA & GERADOR DE CARROSSEL INSTAGRAM
   ============================================================================== */
.hub-studio-modal-box {
    width: min(1160px, 98vw);
    max-height: 94vh;
    padding: 20px 24px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    overflow-y: auto;
}

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

.hub-studio-settings-col {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.hub-studio-section {
    padding: 14px;
    border-radius: 12px;
    border: 1px solid var(--app-border, rgba(255,255,255,0.08));
    background: var(--app-surface-raised, rgba(255,255,255,0.02));
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.hub-studio-section-label {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--app-text, #f8fafc);
}

/* 1. Formatos */
.hub-format-selector-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.hub-format-card {
    padding: 12px 10px;
    border-radius: 10px;
    border: 1.5px solid var(--app-border, rgba(255,255,255,0.08));
    background: var(--app-surface, rgba(255,255,255,0.02));
    display: flex;
    flex-direction: column;
    gap: 4px;
    cursor: pointer;
    transition: all .2s ease;
    text-align: center;
    align-items: center;
}

.hub-format-card i {
    font-size: 20px;
    margin-bottom: 4px;
    color: var(--app-text-soft, #94a3b8);
    transition: color .2s;
}

.hub-format-card strong {
    font-size: 11px;
    color: var(--app-text, #f8fafc);
}

.hub-format-card span {
    font-size: 9px;
    color: var(--app-text-soft, #94a3b8);
    line-height: 1.3;
}

.hub-format-card:hover {
    border-color: rgba(255,255,255,0.25);
    background: rgba(255,255,255,0.04);
}

.hub-format-card.selected {
    border-color: #ec4899;
    background: rgba(236,72,153,0.1);
    box-shadow: 0 4px 14px rgba(236,72,153,0.25);
}

.hub-format-card.selected i {
    color: #f472b6;
}

/* 2. Quantidade de Slides */
.hub-slides-quantity-bar {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.hub-qtd-btn {
    padding: 6px 12px;
    border-radius: 8px;
    border: 1px solid var(--app-border, rgba(255,255,255,0.1));
    background: transparent;
    color: var(--app-text-soft, #94a3b8);
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all .15s ease;
}

.hub-qtd-btn:hover {
    color: var(--app-text, #f8fafc);
    border-color: rgba(255,255,255,0.25);
}

.hub-qtd-btn.active {
    background: #ec4899;
    border-color: #ec4899;
    color: #fff;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(236,72,153,0.3);
}

/* Modo de Geração */
.hub-generation-mode-box {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.hub-mode-radio {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1.5px solid var(--app-border, rgba(255,255,255,0.08));
    background: var(--app-surface, rgba(255,255,255,0.02));
    cursor: pointer;
    transition: all .2s ease;
}

.hub-mode-radio input[type="radio"] {
    margin-top: 3px;
}

.hub-mode-radio strong {
    font-size: 11px;
    color: var(--app-text, #f8fafc);
    display: block;
    margin-bottom: 2px;
}

.hub-mode-radio p {
    margin: 0;
    font-size: 10px;
    color: var(--app-text-soft, #94a3b8);
    line-height: 1.35;
}

.hub-mode-radio:hover {
    border-color: rgba(255,255,255,0.2);
}

.hub-mode-radio.selected {
    border-color: #3b82f6;
    background: rgba(59,130,246,0.08);
}

/* 3. Comparativo de Provedores de IA */
.hub-ai-providers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
}

.hub-ai-provider-card {
    position: relative;
    padding: 12px 10px;
    border-radius: 10px;
    border: 1.5px solid var(--app-border, rgba(255,255,255,0.08));
    background: var(--app-surface, rgba(255,255,255,0.02));
    display: flex;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    transition: all .2s ease;
}

.hub-provider-badge {
    position: absolute;
    top: -8px;
    right: 8px;
    padding: 2px 7px;
    border-radius: 999px;
    font-size: 8.5px;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.hub-provider-badge.star {
    background: #f59e0b;
    color: #000;
}

.hub-provider-badge.text {
    background: #10a37f;
    color: #fff;
}

.hub-provider-badge.economy {
    background: #8b5cf6;
    color: #fff;
}

.hub-provider-head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
}

.hub-provider-logo {
    width: 28px;
    height: 28px;
    border-radius: 7px;
    background: rgba(255,255,255,0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    color: #f59e0b;
    flex-shrink: 0;
}

.hub-provider-head strong {
    font-size: 11px;
    color: var(--app-text, #f8fafc);
    display: block;
    line-height: 1.2;
}

.hub-provider-head small {
    font-size: 9px;
    color: var(--app-text-soft, #94a3b8);
}

.hub-ai-provider-card p {
    margin: 0;
    font-size: 10px;
    color: var(--app-text-soft, #94a3b8);
    line-height: 1.35;
    flex: 1;
}

.hub-provider-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 4px;
}

.hub-provider-tags span {
    padding: 1px 5px;
    border-radius: 4px;
    background: rgba(255,255,255,0.06);
    font-size: 9px;
    color: var(--app-text-soft, #cbd5e1);
    font-weight: 600;
}

.hub-ai-provider-card:hover {
    border-color: rgba(255,255,255,0.25);
    background: rgba(255,255,255,0.04);
}

.hub-ai-provider-card.selected {
    border-color: #f59e0b;
    background: rgba(245,158,11,0.08);
    box-shadow: 0 4px 14px rgba(245,158,11,0.2);
}

.hub-provider-card-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px solid rgba(255,255,255,0.06);
}

.hub-provider-key-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 9px;
    font-weight: 700;
    color: #60a5fa;
    text-decoration: none;
    padding: 2px 7px;
    border-radius: 5px;
    background: rgba(59,130,246,0.12);
    border: 1px solid rgba(59,130,246,0.25);
    transition: all .15s ease;
    white-space: nowrap;
}

.hub-provider-key-btn:hover {
    background: rgba(59,130,246,0.25);
    border-color: #60a5fa;
    color: #bfdbfe;
}

.hub-provider-key-status {
    font-size: 8.5px;
    font-weight: 700;
    padding: 2px 5px;
    border-radius: 4px;
    white-space: nowrap;
}

.hub-provider-key-status.configured {
    color: #34d399;
    background: rgba(16,185,129,0.12);
}

.hub-provider-key-status.missing {
    color: #f59e0b;
    background: rgba(245,158,11,0.12);
}

.hub-api-keys-panel {
    padding: 12px;
    border-radius: 9px;
    background: rgba(0,0,0,0.3);
    border: 1px solid var(--app-border, rgba(255,255,255,0.08));
}

/* 4. Prompt Presets */
.hub-prompt-presets-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.hub-preset-chip {
    padding: 4px 9px;
    border-radius: 8px;
    border: 1px solid var(--app-border, rgba(255,255,255,0.08));
    background: var(--app-surface-raised, rgba(255,255,255,0.03));
    color: var(--app-text-soft, #cbd5e1);
    font-size: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all .15s ease;
}

.hub-preset-chip:hover {
    border-color: #f472b6;
    color: #fff;
    background: rgba(236,72,153,0.15);
    transform: translateY(-1px);
}

.hub-studio-prompt-field {
    width: 100%;
    padding: 10px 14px;
    border-radius: 9px;
    border: 1px solid var(--app-border, rgba(255,255,255,0.12));
    background: var(--app-surface, #0f172a);
    color: var(--app-text, #f8fafc);
    font-size: 12px;
    box-sizing: border-box;
    transition: border-color .2s;
}

.hub-studio-prompt-field:focus {
    outline: none;
    border-color: #ec4899;
    box-shadow: 0 0 0 3px rgba(236,72,153,0.25);
}

/* Coluna Direita: Prévia do Carrossel */
.hub-studio-preview-col {
    display: flex;
    flex-direction: column;
    gap: 10px;
    position: sticky;
    top: 0;
}

.hub-preview-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.hub-preview-header strong {
    font-size: 12px;
    color: var(--app-text, #f8fafc);
}

.hub-carousel-viewer-box {
    border-radius: 16px;
    border: 1px solid var(--app-border, rgba(255,255,255,0.12));
    background: #0f172a;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 380px;
    box-shadow: 0 12px 30px rgba(0,0,0,0.4);
}

.hub-carousel-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    min-height: 300px;
    text-align: center;
    padding: 24px;
}

.hub-carousel-slide-active {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.hub-carousel-slide-media {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: #000;
    max-height: 380px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hub-carousel-slide-media img {
    max-width: 100%;
    max-height: 380px;
    object-fit: contain;
    border-radius: 10px;
    display: block;
}

.hub-carousel-slide-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 3px 8px;
    border-radius: 6px;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(4px);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
}

.hub-carousel-slide-info {
    padding: 10px 12px;
    border-radius: 9px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
}

.hub-carousel-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.hub-carousel-dots {
    display: flex;
    align-items: center;
    gap: 6px;
}

.hub-carousel-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: rgba(255,255,255,0.25);
    cursor: pointer;
    transition: all .2s;
}

.hub-carousel-dot.active {
    width: 18px;
    border-radius: 999px;
    background: #ec4899;
}

.hub-carousel-thumbs-row {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow-x: auto;
    padding: 6px 2px;
    scrollbar-width: thin;
}

.hub-carousel-thumb {
    position: relative;
    width: 54px;
    height: 54px;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid transparent;
    cursor: pointer;
    flex-shrink: 0;
    transition: all .15s ease;
}

.hub-carousel-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hub-carousel-thumb span {
    position: absolute;
    bottom: 2px;
    right: 2px;
    background: rgba(0,0,0,0.75);
    color: #fff;
    font-size: 8px;
    font-weight: 800;
    padding: 1px 4px;
    border-radius: 4px;
}

.hub-carousel-thumb.active {
    border-color: #ec4899;
    box-shadow: 0 0 8px rgba(236,72,153,0.5);
}

.hub-thumb-del-btn {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: rgba(239, 68, 68, 0.9);
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: 8px;
    display: none;
    align-items: center;
    justify-content: center;
    transition: background .15s ease;
    z-index: 2;
}

.hub-carousel-thumb:hover .hub-thumb-del-btn {
    display: flex;
}

.hub-thumb-del-btn:hover {
    background: #dc2626;
    transform: scale(1.1);
}

.hub-studio-ajuste-panel {
    background: rgba(236, 72, 153, 0.04);
    border: 1px solid rgba(236, 72, 153, 0.25);
    border-radius: 8px;
    padding: 10px 12px;
    animation: hubSlideDown 0.2s ease;
}

.hub-studio-slides-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    margin-bottom: 8px;
}

.hub-studio-slide-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px 4px 6px;
    background: var(--app-surface, #1e293b);
    border: 1px solid var(--app-border, #334155);
    border-radius: 6px;
    color: var(--app-text-soft, #94a3b8);
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    user-select: none;
}

.hub-studio-slide-chip:hover {
    border-color: rgba(236, 72, 153, 0.5);
    color: var(--app-text, #f8fafc);
}

.hub-studio-slide-chip.viewing {
    outline: 1px dashed rgba(236, 72, 153, 0.6);
    outline-offset: 1px;
}

.hub-studio-slide-chip.active {
    background: rgba(236, 72, 153, 0.15);
    border-color: #ec4899;
    color: #ffffff;
    box-shadow: 0 0 8px rgba(236, 72, 153, 0.2);
}

.hub-studio-slide-chip .hub-studio-chip-thumb {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    object-fit: cover;
    display: block;
}

.hub-studio-slide-chip .hub-studio-chip-check {
    font-size: 10px;
    color: #ec4899;
}

.hub-studio-slide-chip:not(.active) .hub-studio-chip-check {
    opacity: 0.3;
    color: var(--app-text-soft, #94a3b8);
}

.hub-studio-chip-all {
    padding: 4px 10px;
    border-style: dashed;
}

.hub-studio-chip-all.active {
    border-style: solid;
}

@keyframes hubSlideDown {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

.hub-carousel-actions {
    display: flex;
    gap: 10px;
}

@media (max-width: 992px) {
    .hub-studio-form-grid {
        grid-template-columns: 1fr;
    }
    .hub-ai-providers-grid {
        grid-template-columns: 1fr;
    }
}


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

.finance-breakdowns .app-card {
    padding: 16px;
    min-width: 0;
}

.finance-breakdowns h2 {
    margin: 0 0 12px;
    font-size: .95rem;
}

.finance-breakdown-item {
    gap: 10px;
    padding: 9px 0;
}

.finance-breakdown-item b {
    white-space: nowrap;
    font-size: .85rem;
}

.finance-breakdown-empty {
    color: var(--app-text-muted);
    font-size: .82rem;
    padding: 8px 0;
}

.finance-batch-review {
    display: grid;
    gap: 14px;
}

.finance-batch-summary {
    padding: 12px 14px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    border: 1px solid var(--app-border);
    border-radius: 14px;
    background: var(--app-surface-muted);
}

.finance-batch-summary span {
    display: grid;
    gap: 2px;
    color: var(--app-text-soft);
    font-size: .72rem;
}

.finance-batch-summary strong {
    overflow: hidden;
    color: var(--app-text);
    font-size: .92rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.finance-batch-items {
    display: grid;
    gap: 14px;
}

.finance-batch-item {
    padding: 16px;
    border: 1px solid var(--app-border);
    border-radius: 18px;
    background: color-mix(in srgb, var(--app-surface) 95%, var(--app-accent) 5%);
    box-shadow: 0 8px 24px rgba(25, 30, 27, .05);
}

.finance-batch-item:focus-within {
    border-color: color-mix(in srgb, var(--app-accent) 55%, var(--app-border));
    box-shadow: 0 0 0 3px var(--app-accent-soft);
}

.finance-batch-item>header {
    margin-bottom: 14px;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
}

.finance-batch-item>header>span:nth-child(2) {
    min-width: 0;
    display: grid;
    gap: 2px;
}

.finance-batch-item>header small {
    overflow: hidden;
    color: var(--app-text-soft);
    font-size: .72rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.finance-batch-index {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 11px;
    background: var(--app-accent-soft);
    color: var(--app-accent);
    font-weight: 850;
}

.finance-batch-item [data-finance-batch-remove] {
    color: var(--app-danger);
}

@media (max-width: 1100px) {
    .finance-breakdowns {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 620px) {

    .finance-breakdowns,
    .finance-batch-summary {
        grid-template-columns: 1fr;
    }

    .context-operation-item {
        grid-template-columns: 1fr;
    }

    .context-operation-item>header,
    .context-operation-item>label,
    .context-operation-item fieldset,
    .context-operation-item-client {
        grid-column: 1;
    }
}

.hub-catalog-dialog-overlay {
    position: fixed;
    inset: 0;
    z-index: 310;
    padding: 18px;
    display: grid;
    place-items: center;
    background: rgba(10, 16, 13, .64);
    backdrop-filter: blur(4px);
}

.hub-catalog-dialog {
    width: min(430px, 100%);
    padding: 20px;
    border: 1px solid var(--app-border);
    border-radius: 18px;
    background: var(--app-surface);
    box-shadow: var(--app-shadow-lg);
}

.hub-catalog-dialog h2 {
    margin: 0;
    font-family: var(--app-display);
    font-size: 18px;
}

.hub-catalog-dialog p {
    margin: 8px 0 16px;
    color: var(--app-text-soft);
    font-size: 11px;
    line-height: 1.55;
}

.hub-catalog-dialog label {
    display: grid;
    gap: 6px;
    margin-bottom: 14px;
    color: var(--app-text-soft);
    font-size: 10px;
}

.hub-catalog-dialog input {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--app-border);
    border-radius: 11px;
    background: var(--app-surface-raised);
    color: var(--app-text);
}

.hub-catalog-dialog-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.hub-catalog-dialog-actions button {
    min-height: 38px;
    padding: 0 13px;
    border: 1px solid var(--app-border);
    border-radius: 10px;
    background: var(--app-surface-muted);
    color: var(--app-text);
    cursor: pointer;
}

.hub-catalog-dialog-actions button.primary {
    border-color: var(--app-accent);
    background: var(--app-accent);
    color: #fff;
}

.hub-catalog-dialog-actions button.danger {
    border-color: var(--app-danger);
    background: var(--app-danger);
    color: #fff;
}

.hub-audio-original {
    margin-bottom: 8px;
    padding: 9px;
    display: grid;
    gap: 7px;
    border: 1px solid var(--app-border);
    border-radius: 11px;
    background: var(--app-surface-muted);
}

.hub-audio-original span {
    color: var(--app-text-soft);
    font-size: 9px;
    font-weight: 750;
}

.hub-audio-original audio {
    width: 100%;
    height: 36px;
}

.finance-option-lists {
    display: grid;
    gap: 14px;
}

.finance-option-lists section {
    min-width: 0;
}

.finance-option-lists h3 {
    margin: 0 0 7px;
    color: var(--app-text-soft);
    font-size: 9px;
    text-transform: uppercase;
}

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

.appointment-calendar-day {
    min-width: 145px;
    overflow: hidden;
    border: 1px solid var(--app-border);
    border-radius: 13px;
    background: var(--app-surface);
}

.appointment-calendar-day>header {
    padding: 9px 10px;
    display: flex;
    justify-content: space-between;
    gap: 8px;
    border-bottom: 1px solid var(--app-border);
    background: var(--app-surface-muted);
    font-size: 9px;
    text-transform: capitalize;
}

.appointment-calendar-day>header span {
    color: var(--app-text-soft);
}

.appointment-calendar-day>div {
    min-height: 180px;
    padding: 7px;
    display: grid;
    align-content: start;
    gap: 6px;
}

.appointment-calendar-day>div>p {
    color: var(--app-text-soft);
    font-size: 9px;
    text-align: center;
}

.appointment-calendar-day button {
    padding: 8px;
    display: grid;
    gap: 3px;
    border: 1px solid var(--app-border);
    border-radius: 9px;
    background: var(--app-surface-muted);
    color: var(--app-text);
    text-align: left;
    cursor: pointer;
}

.appointment-calendar-day button:hover {
    border-color: var(--app-accent);
    transform: translateY(-1px);
}

.appointment-calendar-day time,
.appointment-calendar-day small {
    color: var(--app-text-soft);
    font-size: 8px;
}

.appointment-calendar-day strong {
    overflow: hidden;
    font-size: 9px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.import-conflict-row {
    align-items: flex-start;
    flex-wrap: wrap;
}

.import-merge-fields {
    margin-top: 8px;
    padding: 8px;
    display: grid;
    gap: 5px;
    border: 1px solid var(--app-border);
    border-radius: 10px;
    background: var(--app-surface-muted);
}

.import-merge-fields[hidden] {
    display: none;
}

.import-merge-fields em {
    color: var(--app-text-soft);
    font-size: 9px;
    font-style: normal;
}

.import-merge-fields label {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    color: var(--app-text);
    font-size: 9px;
}

/* Login */
.login-body {
    display: grid;
    place-items: center;
    padding: 24px;
    overflow: hidden;
}

.login-scene {
    position: fixed;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.login-scene::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: linear-gradient(color-mix(in srgb, var(--app-border) 45%, transparent) 1px, transparent 1px), linear-gradient(90deg, color-mix(in srgb, var(--app-border) 45%, transparent) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, .7), transparent 85%);
}

.login-orb {
    position: absolute;
    width: 520px;
    height: 520px;
    border-radius: 50%;
    background: var(--app-accent);
    filter: blur(130px);
    opacity: .13;
}

.login-orb.is-one {
    top: -260px;
    left: -160px;
}

.login-orb.is-two {
    right: -220px;
    bottom: -300px;
    background: var(--app-positive);
}

.login-theme {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 5;
}

.login-layout {
    position: relative;
    z-index: 2;
    width: min(960px, 100%);
    display: grid;
    grid-template-columns: minmax(0, 1fr) 430px;
    overflow: hidden;
    border: 1px solid var(--app-border);
    border-radius: 28px;
    background: var(--app-surface);
    box-shadow: var(--app-shadow-lg);
    animation: loginIn .5s cubic-bezier(.16, 1, .3, 1) both;
}

@keyframes loginIn {
    from {
        opacity: 0;
        transform: translateY(18px) scale(.985);
    }
}

.login-story {
    min-height: 600px;
    padding: 48px;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    background: var(--app-sidebar);
    color: var(--app-sidebar-text);
}

.login-story::after {
    content: "";
    position: absolute;
    width: 340px;
    height: 340px;
    right: -120px;
    bottom: -130px;
    border-radius: 50%;
    border: 80px solid rgba(224, 128, 80, .16);
}

.login-brand {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 12px;
}

.login-brand strong {
    font-family: var(--app-display);
    font-size: 21px;
}

.login-story-copy {
    position: relative;
    z-index: 1;
    max-width: 390px;
}

.login-story-copy h1 {
    margin: 0;
    font-family: var(--app-display);
    font-size: clamp(34px, 5vw, 52px);
    line-height: .99;
    letter-spacing: -.045em;
}

.login-story-copy p {
    margin: 18px 0 0;
    color: var(--app-sidebar-muted);
    font-size: 13px;
    line-height: 1.7;
}

.login-story-badge {
    position: relative;
    z-index: 1;
    width: max-content;
    padding: 8px 11px;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 999px;
    color: var(--app-sidebar-muted);
    font-size: 10px;
    font-weight: 750;
}

.login-panel {
    padding: 52px 42px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.login-panel h2 {
    margin: 0;
    font-family: var(--app-display);
    font-size: 28px;
    letter-spacing: -.03em;
}

.login-panel>p {
    margin: 7px 0 28px;
    color: var(--app-text-soft);
    font-size: 12px;
    line-height: 1.55;
}

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

.login-input-wrap {
    position: relative;
}

.login-input-wrap>i {
    position: absolute;
    top: 50%;
    left: 13px;
    color: var(--app-text-soft);
    transform: translateY(-50%);
    pointer-events: none;
}

.login-input-wrap .app-input {
    padding-left: 39px;
    padding-right: 42px;
}

.login-password-toggle {
    position: absolute;
    top: 50%;
    right: 7px;
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: var(--app-text-soft);
    cursor: pointer;
    transform: translateY(-50%);
}

.login-submit {
    width: 100%;
    min-height: 46px;
    margin-top: 4px;
}

.login-submit .spinner {
    width: 18px;
    height: 18px;
    display: none;
    border: 2px solid rgba(255, 255, 255, .35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: appSpin .7s linear infinite;
}

.login-submit.is-loading .spinner {
    display: block;
}

.login-submit.is-loading .button-label {
    display: none;
}

@keyframes appSpin {
    to {
        transform: rotate(360deg);
    }
}

.login-alert {
    display: none;
}

.login-alert.is-visible {
    display: flex;
}

.login-foot {
    margin-top: 24px;
    color: var(--app-text-soft);
    font-size: 10px;
    text-align: center;
}

@media (max-width: 1180px) {

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

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

@media (max-width: 860px) {
    body.app-body {
        padding-bottom: calc(68px + env(safe-area-inset-bottom));
    }

    .app-shell {
        display: block;
    }

    .app-sidebar {
        position: fixed;
        inset: 0 auto 0 0;
        width: min(300px, 88vw);
        height: 100dvh;
        visibility: hidden;
        box-shadow: var(--app-shadow-lg);
        transform: translateX(-105%);
        transition: transform .22s ease, visibility .22s;
    }

    .app-mobile-overlay {
        position: fixed;
        inset: 0;
        z-index: 110;
        display: block;
        visibility: hidden;
        border: 0;
        background: rgba(10, 16, 13, .5);
        opacity: 0;
        transition: opacity .2s ease, visibility .2s;
    }

    .app-shell.is-mobile-open .app-mobile-overlay {
        visibility: visible;
        opacity: 1;
    }

    .app-shell.is-mobile-open .app-sidebar {
        visibility: visible;
        transform: translateX(0);
    }

    .app-shell.is-collapsed .app-brand-copy,
    .app-shell.is-collapsed .app-nav-label,
    .app-shell.is-collapsed .app-nav-link span,
    .app-shell.is-collapsed .app-user-copy,
    .app-shell.is-collapsed .app-user-logout {
        width: auto;
        opacity: 1;
        pointer-events: auto;
    }

    .app-shell.is-collapsed .app-sidebar-head {
        padding-inline: 18px;
    }

    .app-shell.is-collapsed .app-nav {
        padding-inline: 12px;
    }

    .app-shell.is-collapsed .app-nav-link {
        justify-content: flex-start;
    }

    .app-shell.is-collapsed .app-user {
        justify-content: flex-start;
    }

    .app-sidebar-toggle {
        display: none !important;
    }

    .app-stage {
        min-height: auto;
    }

    .app-mobile-menu {
        display: inline-grid;
    }

    .app-desktop-sidebar-toggle {
        display: none;
    }

    .app-topbar {
        min-height: 68px;
        padding: 10px 16px;
    }

    .app-breadcrumb small {
        display: none;
    }

    .app-breadcrumb strong {
        font-size: 17px;
    }

    .app-content {
        padding: 22px 14px 32px;
    }

    .app-page-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .app-page-actions {
        width: 100%;
    }

    .app-grid-main,
    .setup-layout,
    .hub-marketing-content {
        grid-template-columns: 1fr;
    }

    .setup-nav {
        position: static;
        display: flex;
        gap: 5px;
        overflow-x: auto;
    }

    .setup-nav-progress {
        min-width: 170px;
    }

    .setup-nav button {
        min-width: max-content;
        width: auto;
    }

    .app-bottom-nav {
        position: fixed;
        right: 0;
        bottom: 0;
        left: 0;
        z-index: 180;
        min-height: 64px;
        padding: 7px 8px calc(7px + env(safe-area-inset-bottom));
        display: grid;
        grid-template-columns: repeat(5, 1fr);
        border-top: 1px solid var(--app-border);
        background: color-mix(in srgb, var(--app-surface) 94%, transparent);
        box-shadow: 0 -10px 35px rgba(20, 29, 25, .1);
        backdrop-filter: blur(18px);
    }

    .app-bottom-link {
        min-width: 0;
        display: grid;
        place-items: center;
        gap: 3px;
        border: 0;
        border-radius: 10px;
        background: transparent;
        color: var(--app-text-soft);
        font-size: 8px;
        font-weight: 750;
        text-decoration: none;
        cursor: pointer;
    }

    .app-bottom-link i {
        font-size: 16px;
    }

    .app-bottom-link.is-active {
        background: var(--app-accent-soft);
        color: var(--app-accent);
    }

    .app-mobile-sheet {
        position: fixed;
        right: 8px;
        bottom: calc(67px + env(safe-area-inset-bottom));
        left: 8px;
        z-index: 190;
        padding: 10px;
        display: grid;
        visibility: hidden;
        gap: 4px;
        border: 1px solid var(--app-border);
        border-radius: 18px;
        background: var(--app-surface);
        box-shadow: var(--app-shadow-lg);
        opacity: 0;
        transform: translateY(10px);
        transition: opacity .16s, transform .16s, visibility .16s;
    }

    .app-mobile-sheet.is-open {
        visibility: visible;
        opacity: 1;
        transform: translateY(0);
    }

    .app-mobile-sheet a {
        padding: 11px 12px;
        display: flex;
        align-items: center;
        gap: 10px;
        border-radius: 11px;
        color: var(--app-text);
        font-size: 11px;
        font-weight: 700;
        text-decoration: none;
    }

    .app-mobile-sheet a:hover {
        background: var(--app-surface-muted);
    }

    .context-assistant-fab,
    .hub-catalog-chat-fab {
        right: 14px;
        bottom: calc(78px + env(safe-area-inset-bottom));
    }

    .context-assistant,
    .hub-catalog-chat,
    .hub-agent-chat {
        inset: 0;
        width: auto;
        height: 100dvh;
        max-height: none;
        border: 0;
        border-radius: 0;
    }

    .hub-product-list {
        max-height: none;
    }

    .hub-product-table-wrap {
        display: none;
    }

    .hub-product-card-grid {
        display: grid;
        grid-template-columns: 1fr;
    }

    .hub-marketing-card {
        grid-template-columns: 1fr;
    }

    .hub-marketing-thumb {
        min-height: 140px;
    }

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

    .hub-catalog-chat-form,
    .context-assistant-form {
        padding-bottom: calc(12px + env(safe-area-inset-bottom));
    }
}

@media (max-width: 680px) {

    .app-grid.is-2,
    .app-grid.is-3,
    .app-grid.is-4,
    .app-kpis,
    .hub-page-grid,
    .hub-marketing-kpis {
        grid-template-columns: 1fr;
    }

    .setup-form-grid,
    .hub-product-form-grid,
    .hub-marketing-form {
        grid-template-columns: 1fr;
    }

    .hub-marketing-audience-filters {
        grid-template-columns: 1fr;
    }

    .hub-marketing-audience-item {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .hub-marketing-audience-item em {
        grid-column: 2;
    }

    .hub-marketing-progress-counts {
        align-items: flex-start;
        flex-direction: column;
    }

    .setup-form-grid .is-full,
    .hub-product-field.full,
    .hub-marketing-form .full {
        grid-column: auto;
    }

    .schedule-row {
        grid-template-columns: 1fr 70px repeat(2, 1fr);
    }

    .app-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .app-toolbar-fields {
        align-items: stretch;
        flex-direction: column;
    }

    .app-search {
        width: 100%;
    }

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

    .app-page-actions .app-button {
        min-width: 0;
        width: 100%;
        padding-inline: 9px;
        white-space: normal;
        text-align: center;
    }

    .app-toast-region {
        right: 12px;
        left: 12px;
        width: auto;
    }

    .app-toast {
        width: 100%;
        min-width: 0;
        max-width: none;
    }

    .login-body {
        padding: 12px;
        overflow: auto;
    }

    .login-layout {
        grid-template-columns: 1fr;
        border-radius: 22px;
    }

    .login-story {
        min-height: 220px;
        padding: 28px;
    }

    .login-story-copy h1 {
        font-size: 34px;
    }

    .login-story-copy p {
        margin-top: 10px;
    }

    .login-story-badge {
        display: none;
    }

    .login-panel {
        padding: 32px 25px;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}

/* Ajustes de layout global e modais */
.app-topbar {
    position: fixed;
    top: 0;
    right: 0;
    left: var(--app-sidebar-width);
}

.app-shell.is-collapsed .app-topbar {
    left: var(--app-sidebar-collapsed);
}

.app-content {
    padding-top: var(--app-topbar-height);
}

.app-mobile-menu {
    display: none !important;
}

.app-shell.is-collapsed .app-user-copy,
.app-shell.is-collapsed .app-user-logout {
    display: none;
}

.app-shell.is-collapsed .app-user-avatar {
    margin-inline: auto;
}

/* Drawer global: ocupa a viewport real e mantém apenas o corpo rolável. */
.app-overlay {
    z-index: 9998 !important;
}

/* Seleciona o <small> dentro de qualquer botão que tenha o atributo data-attendant-section-link */
button[data-attendant-section-link] small {
    padding-left: 10px;
    /* display: block;  */
}

.app-drawer {
    position: fixed !important;
    top: 0 !important;
    right: 0 !important;
    height: 100vh !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    z-index: 9999 !important;
}

.app-drawer-head {
    flex: 0 0 auto !important;
}

.app-drawer>form {
    width: 100%;
    flex: 1 1 auto !important;
    min-height: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
}

.app-drawer-body {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

.app-drawer-footer {
    margin-top: auto !important;
    flex: 0 0 auto !important;
}

.hub-marketing-modal {
    padding: 0;
    overflow: hidden;
}

.hub-marketing-modal .hub-catalogo-modal-head {
    padding: 20px 22px;
    background: linear-gradient(135deg, var(--app-surface-raised), var(--app-surface));
}

.hub-marketing-form {
    padding: 18px 22px 22px;
    gap: 14px;
}

.hub-marketing-form .hub-card-field {
    padding: 11px 12px;
    border: 1px solid var(--app-border);
    border-radius: 13px;
    background: var(--app-surface-muted);
}

.hub-marketing-form .hub-card-field>span {
    color: var(--app-text-soft);
    font-size: 10px;
    font-weight: 800;
}

.hub-marketing-form input,
.hub-marketing-form select,
.hub-marketing-form textarea {
    width: 100%;
    margin-top: 6px;
}

.hub-marketing-form .is-hidden {
    display: none;
}

.hub-marketing-image-picker {
    display: grid;
    gap: 9px;
}

.hub-marketing-image-preview {
    min-height: 90px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border-radius: 12px;
    background: var(--app-bg-soft);
    color: var(--app-text-soft);
}

.hub-marketing-image-preview img {
    max-width: 100%;
    max-height: 180px;
    object-fit: contain;
}

/* Revisão assistida: cliente, serviço e adicionais. */
.context-operation-preview.is-v2 {
    display: grid;
    gap: 14px;
    min-width: 0;
}

.context-message .context-operation-preview {
    white-space: normal;
}

.context-operation-item {
    display: grid;
    gap: 13px;
    padding: 14px;
    border: 1px solid var(--app-border);
    border-radius: 16px;
    background: var(--app-surface-muted);
}

.context-operation-item>header {
    display: flex;
    align-items: center;
    gap: 10px;
}

.context-operation-item>header>div {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.context-operation-item>header small {
    color: var(--app-text-soft);
}

.context-operation-step,
.appointment-service-index {
    width: 28px;
    height: 28px;
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
    border-radius: 9px;
    color: #fff;
    background: var(--app-accent);
    font-weight: 800;
}

.context-operation-client-summary,
.context-operation-service-summary {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 12px;
    border: 1px solid color-mix(in srgb, var(--app-positive) 35%, var(--app-border));
    border-radius: 13px;
    background: color-mix(in srgb, var(--app-positive) 8%, var(--app-surface));
}

.context-operation-client-summary>span,
.context-operation-service-summary>span {
    display: grid;
    gap: 2px;
    flex: 1;
    min-width: 0;
}

.context-operation-client-summary small,
.context-operation-service-summary small {
    color: var(--app-text-soft);
}

.context-operation-item-client,
.context-operation-item-service,
.context-operation-additional-group,
.finance-batch-new-client,
.finance-batch-additional-group,
.appointment-additional-group,
.appointment-new-client {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 12px;
    border: 1px solid var(--app-border);
    border-radius: 13px;
}

.context-operation-item-client legend,
.context-operation-item-service legend,
.context-operation-additional-group legend,
.finance-batch-new-client legend,
.finance-batch-additional-group legend,
.appointment-additional-group legend,
.appointment-new-client legend {
    padding: 0 5px;
    color: var(--app-text);
    font-weight: 800;
}

.context-operation-candidate,
.context-operation-additional,
.finance-batch-additional-group label,
.appointment-additional-group label {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border: 1px solid var(--app-border);
    border-radius: 11px;
    background: var(--app-surface);
    cursor: pointer;
}

.context-operation-candidate:has(input:checked),
.context-operation-additional:has(input:checked),
.finance-batch-additional-group label:has(input:checked),
.appointment-additional-group label:has(input:checked) {
    border-color: var(--app-accent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--app-accent) 12%, transparent);
}

.context-operation-candidate span,
.context-operation-additional span {
    display: grid;
    gap: 2px;
}

.context-operation-candidate small,
.context-operation-additional small {
    color: var(--app-text-soft);
}

.context-operation-new-client {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
    padding-top: 4px;
}

.context-operation-new-client label,
.context-operation-fields label {
    display: grid;
    gap: 5px;
    color: var(--app-text-soft);
    font-size: 12px;
    font-weight: 700;
}

.context-operation-new-client input,
.context-operation-fields input {
    min-width: 0;
    padding: 10px;
    border: 1px solid var(--app-border);
    border-radius: 10px;
    background: var(--app-surface);
    color: var(--app-text);
}

.context-operation-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
}

.context-operation-price-warning {
    display: flex;
    gap: 9px;
    padding: 11px;
    border-radius: 12px;
    color: var(--app-warning);
    background: var(--app-warning-soft);
}

.context-operation-additional-group>p {
    margin: 0;
    color: var(--app-text-soft);
    font-size: 12px;
}

.context-operation-additional-group.has-error,
.finance-batch-additional-group.has-error,
.appointment-additional-group.has-error {
    border-color: var(--app-danger);
}

.context-operation-validation {
    color: var(--app-danger);
}

.context-operation-additional.is-unavailable {
    opacity: .55;
    cursor: not-allowed;
}

.context-operation-additional-groups.is-loading {
    opacity: .55;
    pointer-events: none;
}

input[type="radio"],
input[type="checkbox"] {
    width: auto !important;
}

/* No chat mostramos apenas o resumo; a edição detalhada acontece na revisão fullscreen. */
.context-operation-preview.is-v2:not(.is-review-modal) .context-operation-client,
.context-operation-preview.is-v2:not(.is-review-modal) .context-operation-service,
.context-operation-preview.is-v2:not(.is-review-modal) .context-operation-fields,
.context-operation-preview.is-v2:not(.is-review-modal) .context-operation-schedule,
.context-operation-preview.is-v2:not(.is-review-modal) .context-operation-price-warning {
    display: none;
}

.context-operation-preview.is-v2:not(.is-review-modal) .context-operation-item {
    grid-template-columns: repeat(1, minmax(0, 1fr)) !important;
    gap: 11px;
    padding: 13px;
}

.context-operation-compact {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.context-operation-compact-field {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 9px 10px;
    border: 1px solid var(--app-border);
    border-radius: 11px;
    background: var(--app-surface);
}

.context-operation-compact-field>i {
    width: 27px;
    height: 27px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border-radius: 8px;
    color: var(--app-accent);
    background: var(--app-accent-soft);
}

.context-operation-compact-field>span {
    min-width: 0;
    display: grid;
    gap: 1px;
}

.context-operation-compact-field small {
    color: var(--app-text-soft);
    font-size: 9px;
    font-weight: 750;
}

.context-operation-compact-field strong {
    overflow: hidden;
    color: var(--app-text);
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.has-operation-review {
    overflow: hidden;
}

.operation-review-overlay {
    position: fixed;
    inset: 0;
    z-index: 10050;
    display: grid;
    background: color-mix(in srgb, #08100c 72%, transparent);
    backdrop-filter: blur(7px);
    animation: operationReviewFade .18s ease-out;
}

.operation-review-dialog {
    width: 100%;
    height: 100dvh;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 0;
    background: var(--app-bg);
    color: var(--app-text);
    box-shadow: var(--app-shadow-lg);
}

.operation-review-head {
    flex: 0 0 auto;
    min-height: 88px;
    padding: 16px clamp(18px, 4vw, 54px);
    display: flex;
    align-items: center;
    gap: 14px;
    border-bottom: 1px solid var(--app-border);
    background: var(--app-surface);
}

.operation-review-head>div {
    min-width: 0;
    flex: 1;
}

.operation-review-head small {
    display: block;
    margin-bottom: 2px;
    color: var(--app-accent);
    font-size: 10px;
    font-weight: 850;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.operation-review-head h2 {
    margin: 0;
    font-family: var(--app-display);
    font-size: clamp(18px, 2.3vw, 26px);
}

.operation-review-head p {
    margin: 4px 0 0;
    color: var(--app-text-soft);
    font-size: 12px;
}

.operation-review-icon {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border-radius: 14px;
    color: #fff;
    background: var(--app-accent);
    box-shadow: 0 9px 22px color-mix(in srgb, var(--app-accent) 28%, transparent);
}

.operation-review-body {
    flex: 1 1 auto;
    min-height: 0;
    padding: clamp(16px, 3vw, 36px);
    overflow-y: auto;
    overscroll-behavior: contain;
}

.operation-review-body .context-operation-preview.is-review-modal {
    width: min(1120px, 100%);
    margin: 0 auto;
    padding: 0;
    gap: 18px;
    border: 0;
}

.operation-review-body .context-operation-preview.is-review-modal>.context-operation-item {
    padding: clamp(15px, 2vw, 22px);
    background: var(--app-surface);
    box-shadow: var(--app-shadow-sm);
}

/* Layout 2 colunas no modal de revisão: cliente+campos à esq, serviço+agenda à dir */
.operation-review-body .context-operation-preview.is-review-modal>.context-operation-item[data-operation-module="atendimentos"],
.operation-review-body .context-operation-preview.is-review-modal>[data-operation-item] {
    display: grid;
    grid-template-columns: 1fr;
}

.operation-review-body [data-operation-item].is-atendimentos-item {
    display: grid;
    grid-template:
        "hdr hdr" auto
        "compact compact" auto
        "left right" 1fr
        "foot foot" auto
        / minmax(0, 1fr) minmax(0, 1.4fr);
    gap: 14px;
    align-items: start;
}

.operation-review-body [data-operation-item].is-atendimentos-item>header {
    grid-area: hdr;
}

.operation-review-body [data-operation-item].is-atendimentos-item>.context-operation-compact {
    grid-area: compact;
}

.operation-review-body [data-operation-item].is-atendimentos-item>.context-operation-left {
    grid-area: left;
    display: grid;
    gap: 11px;
}

.operation-review-body [data-operation-item].is-atendimentos-item>.context-operation-right {
    grid-area: right;
    display: grid;
    gap: 11px;
}

.operation-review-body [data-operation-item].is-atendimentos-item>.context-operation-price-warning {
    grid-area: foot;
}

@media (max-width: 720px) {
    .operation-review-body [data-operation-item].is-atendimentos-item {
        grid-template:
            "hdr" auto
            "compact" auto
            "left" auto
            "right" auto
            "foot" auto
            / 1fr;
    }
}

/* ── Combobox pesquisável (select2-like) ── */
.op-combobox {
    position: relative;
}

.op-combobox-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0;
    border: 1px solid var(--app-border);
    border-radius: 11px;
    background: var(--app-surface);
    transition: border-color .16s, box-shadow .16s;
    overflow: hidden;
}

.op-combobox-input-wrap:focus-within {
    border-color: var(--app-accent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--app-accent) 13%, transparent);
}

.op-combobox-input-wrap input[type="text"] {
    flex: 1;
    min-width: 0;
    padding: 10px 12px;
    border: 0;
    background: transparent;
    color: var(--app-text);
    font-size: 13px;
    outline: none;
    box-shadow: none !important;
}

.op-combobox-chevron {
    padding: 0 12px;
    color: var(--app-text-soft);
    pointer-events: none;
    font-size: 11px;
}

.op-combobox-list {
    position: absolute;
    z-index: 800;
    top: calc(100% + 5px);
    left: 0;
    right: 0;
    max-height: 270px;
    overflow-y: auto;
    overflow-x: hidden;
    border: 1px solid var(--app-border);
    border-radius: 13px;
    background: var(--app-surface-raised);
    box-shadow: var(--app-shadow-md);
    display: none;
}

.op-combobox.is-open .op-combobox-list {
    display: block;
    animation: opComboboxIn .13s ease-out;
}

@keyframes opComboboxIn {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.op-combobox-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 13px;
    cursor: pointer;
    border-bottom: 1px solid var(--app-border);
    transition: background .1s;
}

.op-combobox-item:last-child {
    border-bottom: 0;
}

.op-combobox-item:hover,
.op-combobox-item.is-focused {
    background: var(--app-surface-muted);
}

.op-combobox-item.is-selected {
    background: color-mix(in srgb, var(--app-accent) 10%, var(--app-surface));
}

.op-combobox-item.is-custom {
    border-top: 1px solid var(--app-border);
    border-bottom: 0;
    background: var(--app-surface-muted);
    position: sticky;
    bottom: 0;
}

.op-combobox-item-icon {
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border-radius: 8px;
    background: var(--app-accent-soft);
    color: var(--app-accent);
    font-size: 11px;
}

.op-combobox-item-icon.is-create {
    background: var(--app-positive-soft);
    color: var(--app-positive);
}

.op-combobox-item-body {
    min-width: 0;
    flex: 1;
}

.op-combobox-item-body strong {
    display: block;
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.op-combobox-item-body small {
    display: block;
    font-size: 10px;
    color: var(--app-text-soft);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.op-combobox-item-badge {
    flex: 0 0 auto;
    padding: 2px 7px;
    border-radius: 6px;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
    background: var(--app-accent-soft);
    color: var(--app-accent);
}

.op-combobox-item-badge.is-top {
    background: var(--app-positive-soft);
    color: var(--app-positive);
}

.op-combobox-empty {
    padding: 12px 14px;
    color: var(--app-text-soft);
    font-size: 12px;
}

.op-combobox-loading {
    padding: 12px 14px;
    color: var(--app-text-soft);
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Hidden radio keeps the fieldset logic alive */
.op-combobox-radios {
    display: none;
}

/* Slot auto-selected status banner */
.operation-slot-status {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 9px 12px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 600;
}

.operation-slot-status.is-free {
    background: var(--app-positive-soft);
    color: var(--app-positive);
}

.operation-slot-status.is-partial {
    background: var(--app-warning-soft);
    color: var(--app-warning);
}

.operation-slot-status.is-full {
    background: var(--app-danger-soft);
    color: var(--app-danger);
}

.operation-review-body .context-operation-preview.is-review-modal>[data-operation-review] {
    display: none;
}

.operation-review-body .context-operation-preview.is-review-modal .context-operation-compact {
    display: none;
}

.operation-review-feedback {
    flex: 0 0 auto;
    width: min(1120px, calc(100% - 32px));
    margin: 0 auto 10px;
}

.operation-review-footer {
    flex: 0 0 auto;
    min-height: 76px;
    padding: 13px clamp(18px, 4vw, 54px) calc(13px + env(safe-area-inset-bottom));
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
    border-top: 1px solid var(--app-border);
    background: color-mix(in srgb, var(--app-surface) 96%, transparent);
    box-shadow: 0 -10px 30px color-mix(in srgb, #000 8%, transparent);
}

.operation-review-footer .app-button {
    width: auto;
    min-width: 180px;
}

@keyframes operationReviewFade {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.context-operation-custom-fields {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 9px;
    padding: 12px;
    border: 1px dashed var(--app-border-strong);
    border-radius: 13px;
    background: var(--app-surface);
}

.context-operation-custom-fields label {
    display: grid;
    gap: 5px;
    color: var(--app-text-soft);
    font-size: 11px;
    font-weight: 750;
}

.context-operation-schedule,
.appointment-slot-picker {
    display: grid;
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--app-border);
    border-radius: 15px;
    background: var(--app-surface-muted);
}

.context-operation-schedule-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.context-operation-schedule-head>span {
    display: grid;
    gap: 2px;
}

.context-operation-schedule-head small {
    color: var(--app-text-soft);
}

.context-operation-schedule-head input {
    width: auto;
    min-width: 160px;
}

.appointment-slot-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    color: var(--app-text-soft);
    font-size: 10px;
}

.appointment-slot-legend span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.appointment-slot-legend i {
    width: 12px;
    height: 12px;
    border: 1px solid var(--app-border-strong);
    border-radius: 4px;
    background: var(--app-surface);
}

.appointment-slot-legend .is-partial {
    border-color: #e3ba55;
    background: #fff0bd;
}

.appointment-slot-legend .is-full {
    border-color: var(--app-danger);
    background: var(--app-danger-soft);
}

.appointment-slot-legend .is-selected {
    border-color: var(--app-positive);
    background: var(--app-positive);
}

.appointment-slot-grid {
    min-height: 54px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
    gap: 9px;
    transition: opacity .18s;
}

.appointment-slot-grid.is-loading {
    opacity: .5;
    pointer-events: none;
}

.appointment-slot-grid>p {
    grid-column: 1/-1;
    margin: 8px 0;
    color: var(--app-text-soft);
}

.appointment-slot {
    position: relative;
    min-height: 62px;
    padding: 9px;
    display: grid;
    place-items: center;
    gap: 1px;
    border: 1px solid var(--app-border-strong);
    border-radius: 11px;
    background: var(--app-surface);
    color: var(--app-text);
    cursor: pointer;
    transition: transform .16s, border-color .16s, background .16s;
}

.appointment-slot:hover:not(:disabled) {
    transform: translateY(-2px);
    border-color: var(--app-accent);
}

.appointment-slot strong {
    font-size: 13px;
}

.appointment-slot small {
    color: var(--app-text-soft);
    font-size: 8px;
}

.appointment-slot>span {
    position: absolute;
    top: -7px;
    right: -6px;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: var(--app-danger);
    color: #fff;
    font-size: 9px;
    font-weight: 850;
}

.appointment-slot.is-partial {
    border-color: #e3ba55;
    background: color-mix(in srgb, #ffd867 28%, var(--app-surface));
}

.appointment-slot.is-full {
    border-color: color-mix(in srgb, var(--app-danger) 65%, var(--app-border));
    background: var(--app-danger-soft);
}

.appointment-slot.is-selected {
    border-color: var(--app-positive);
    background: var(--app-positive);
    color: #fff;
    box-shadow: 0 7px 18px color-mix(in srgb, var(--app-positive) 25%, transparent);
}

.appointment-slot.is-selected small {
    color: rgba(255, 255, 255, .78);
}

.appointment-slot.is-range-start,
.appointment-slot.is-range-end {
    outline: 3px solid color-mix(in srgb, var(--app-positive) 34%, transparent);
    outline-offset: 2px;
}

.appointment-slot.is-range-overbook {
    border-color: var(--app-danger);
    background: var(--app-danger);
    color: #fff;
    box-shadow: 0 7px 18px color-mix(in srgb, var(--app-danger) 25%, transparent);
}

.appointment-slot.is-range-overbook small {
    color: rgba(255, 255, 255, .8);
}

.appointment-slot.is-confirming {
    outline: 3px solid color-mix(in srgb, var(--app-warning) 25%, transparent);
}

.appointment-slot:disabled {
    opacity: .42;
    cursor: not-allowed;
}

.appointment-selected-slots {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.appointment-selected-slots>span {
    padding: 7px 8px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    border-radius: 9px;
    background: var(--app-positive-soft);
    color: var(--app-positive);
    font-size: 10px;
    font-weight: 750;
}

.appointment-selected-slots>.appointment-range-summary {
    flex-wrap: wrap;
    padding: 9px 11px;
}

.appointment-range-summary strong {
    font-size: 12px;
}

.appointment-range-summary small {
    color: var(--app-text-soft);
    font-weight: 600;
}

.appointment-selected-slots>.appointment-range-summary.is-overbook {
    background: var(--app-danger-soft);
    color: var(--app-danger);
}

.appointment-selected-slots button {
    width: 22px;
    height: 22px;
    padding: 0;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: currentColor;
    cursor: pointer;
}

.context-operation-saved {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 13px;
    border: 1px solid color-mix(in srgb, var(--app-positive) 35%, var(--app-border));
    border-radius: 13px;
    background: var(--app-positive-soft);
    color: var(--app-positive);
}

.context-operation-saved>span {
    display: grid;
    gap: 2px;
}

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

.attendant-settings .setup-nav {
    position: sticky;
    top: calc(var(--app-topbar-height) + 18px);
}

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

.attendant-policy {
    cursor: pointer;
}

.attendant-policy>input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.attendant-policy>span {
    height: 100%;
    min-height: 140px;
    padding: 16px;
    display: grid;
    align-content: start;
    gap: 7px;
    border: 1px solid var(--app-border);
    border-radius: 15px;
    background: var(--app-surface-muted);
    transition: border-color .16s, box-shadow .16s, transform .16s;
}

.attendant-policy>span>i {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 11px;
    background: var(--app-accent-soft);
    color: var(--app-accent);
}

.attendant-policy small {
    color: var(--app-text-soft);
    line-height: 1.5;
}

.attendant-policy>input:checked+span {
    border-color: var(--app-accent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--app-accent) 14%, transparent);
    transform: translateY(-2px);
}

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

.attendant-capacity-summary>span {
    padding: 16px;
    display: grid;
    gap: 5px;
    border-radius: 14px;
    background: var(--app-surface-muted);
}

.attendant-capacity-summary small {
    color: var(--app-text-soft);
}

.attendant-capacity-summary strong {
    font: 800 22px var(--app-display);
}

.attendant-request {
    flex-wrap: wrap;
}

.attendant-request-actions {
    margin-left: auto;
    display: flex;
    gap: 7px;
}

.appointment-overbook-panel {
    margin-bottom: 16px;
    border-color: color-mix(in srgb, var(--app-warning) 45%, var(--app-border));
}

.app-notification-button {
    position: relative;
}

.app-notification-button>span {
    position: absolute;
    top: -5px;
    right: -5px;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: var(--app-danger);
    color: #fff;
    font-size: 8px;
    font-weight: 850;
}

.app-notification-panel {
    position: fixed;
    top: var(--app-topbar-height);
    right: 18px;
    z-index: 400;
    width: min(390px, calc(100vw - 24px));
    max-height: calc(100dvh - var(--app-topbar-height) - 18px);
    display: flex;
    flex-direction: column;
    visibility: hidden;
    overflow: hidden;
    border: 1px solid var(--app-border);
    border-radius: 18px;
    background: var(--app-surface);
    box-shadow: var(--app-shadow-lg);
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity .16s, transform .16s, visibility .16s;
}

.app-notification-panel.is-open {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
}

.app-notification-panel>header {
    padding: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid var(--app-border);
}

.app-notification-panel>header>div {
    display: grid;
    gap: 2px;
    flex: 1;
}

.app-notification-panel>header small {
    color: var(--app-text-soft);
}

.app-notification-panel>div {
    min-height: 100px;
    padding: 10px;
    overflow-y: auto;
}

.app-notification-panel>footer {
    padding: 10px;
    border-top: 1px solid var(--app-border);
}

.notification-item {
    width: 100%;
    border: 0;
    text-align: left;
    cursor: pointer;
}

.notification-item.is-unread {
    background: var(--app-accent-soft);
}

.finance-batch-service,
.appointment-services-editor {
    grid-column: 1 / -1;
    display: grid;
    gap: 10px;
    padding: 13px;
    border: 1px solid var(--app-border);
    border-radius: 14px;
    background: var(--app-surface);
}

.finance-batch-service>header,
.appointment-services-editor>header,
.appointment-service-item>header {
    display: flex;
    align-items: center;
    gap: 10px;
}

.finance-batch-service>header span,
.appointment-services-editor>header>div {
    display: grid;
    gap: 2px;
    flex: 1;
}

.finance-batch-new-client {
    grid-column: 1 / -1;
}

.appointment-service-items {
    display: grid;
    gap: 12px;
}

.appointment-service-item {
    display: grid;
    gap: 11px;
    padding: 13px;
    border: 1px solid var(--app-border);
    border-radius: 14px;
    background: var(--app-surface-muted);
}

.appointment-service-item>header strong {
    flex: 1;
}

.appointment-additional-groups {
    display: grid;
    gap: 9px;
}

.appointment-additional-group p {
    margin: 0;
    color: var(--app-text-soft);
    font-size: 12px;
}

@media (max-width: 620px) {

    .context-operation-new-client,
    .context-operation-fields {
        grid-template-columns: 1fr;
    }

    .context-operation-item {
        padding: 11px;
    }

    .context-operation-compact {
        grid-template-columns: 1fr;
    }

    .operation-review-head {
        align-items: flex-start;
        padding: 13px 14px;
    }

    .operation-review-head p {
        display: none;
    }

    .operation-review-icon {
        width: 38px;
        height: 38px;
        border-radius: 12px;
    }

    .operation-review-body {
        padding: 12px;
    }

    .operation-review-footer {
        padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
    }

    .operation-review-footer .app-button {
        min-width: 0;
        flex: 1;
    }

    .context-operation-custom-fields {
        grid-template-columns: 1fr;
    }

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

    .context-operation-schedule-head {
        align-items: stretch;
        flex-direction: column;
    }

    .context-operation-schedule-head input {
        width: 100%;
    }
}

@media (max-width: 900px) {
    .attendant-settings {
        grid-template-columns: 1fr;
    }

    .attendant-settings .setup-nav {
        position: static;
        display: flex;
        overflow-x: auto;
    }

    .attendant-settings .setup-nav button {
        min-width: 190px;
    }

    .attendant-policy-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 860px) {
    .app-topbar {
        left: 0;
    }

    .app-mobile-menu {
        display: inline-grid !important;
    }
}

@media (pointer: coarse) {

    .app-nav-link:hover,
    .app-button:hover,
    .app-icon-button:hover,
    .context-assistant-fab:hover {
        transform: none;
    }
}

/* Atendente — mesma navegação e hierarquia da Configuração inicial */
.attendant-setup-layout .setup-content {
    min-width: 0;
}

.attendant-config-form {
    display: contents;
}

.attendant-readonly {
    margin-bottom: 14px;
}

.attendant-inherited-context {
    margin-bottom: 18px;
    padding: 13px;
    display: grid;
    gap: 12px;
    border: 1px solid var(--app-border);
    border-radius: 13px;
    background: var(--app-surface-muted);
}

.attendant-inherited-context>div:first-child {
    display: flex;
    align-items: center;
    gap: 10px;
}

.attendant-inherited-context>div:first-child>span {
    width: 36px;
    height: 36px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    border-radius: 11px;
    background: var(--app-positive-soft);
    color: var(--app-positive);
}

.attendant-inherited-context p {
    margin: 0;
    display: grid;
    gap: 2px;
}

.attendant-inherited-context p strong {
    font-size: 11px;
}

.attendant-inherited-context p small {
    color: var(--app-text-soft);
    font-size: 9px;
}

.attendant-context-facts {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.attendant-context-facts>span {
    min-width: 0;
    padding: 9px 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--app-border);
    border-radius: 10px;
    background: var(--app-surface);
}

.attendant-context-facts i {
    width: 16px;
    flex: 0 0 auto;
    color: var(--app-text-soft);
    text-align: center;
}

.attendant-context-facts b {
    overflow: hidden;
    font-size: 9px;
    font-weight: 650;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.attendant-primary-toggle {
    padding: 14px;
    display: flex;
    align-items: center;
    gap: 16px;
    border: 1px solid var(--app-border);
    border-radius: 13px;
    background: var(--app-surface-muted);
    cursor: pointer;
}

.attendant-primary-toggle>span:first-child {
    min-width: 0;
    display: grid;
    gap: 3px;
    flex: 1;
}

.attendant-primary-toggle strong {
    font-size: 12px;
}

.attendant-primary-toggle small {
    color: var(--app-text-soft);
    font-size: 9px;
    line-height: 1.45;
}

.attendant-field-group {
    display: grid;
    gap: 12px;
}

.attendant-field-group h3,
.attendant-field-group p {
    margin: 0;
}

.attendant-field-group h3 {
    font-size: 12px;
}

.attendant-field-group>p {
    margin-top: -8px;
    color: var(--app-text-soft);
    font-size: 9px;
}

.attendant-setup-layout .attendant-progressive {
    margin-top: 16px;
}

.attendant-setup-layout .attendant-permission-list>label {
    padding: 14px 2px;
}

.attendant-setup-layout .attendant-calendar-strip {
    margin-bottom: 14px;
}

.attendant-setup-layout .attendant-count {
    display: inline-grid;
    vertical-align: middle;
    margin-left: 6px;
}

.attendant-setup-layout .attendant-request-list {
    gap: 9px;
}

.attendant-progressive[hidden] {
    display: none !important;
}

/* Componentes do Atendente: calendário, Mentor e laboratório */
.attendant-page-head {
    align-items: flex-end;
}

.attendant-eyebrow {
    margin-bottom: 7px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--app-positive);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.attendant-studio {
    display: grid;
    gap: 14px;
}

.attendant-hero-widget {
    position: relative;
    padding: 19px;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) minmax(270px, .72fr);
    gap: 16px;
    align-items: center;
    overflow: hidden;
    border-color: color-mix(in srgb, var(--app-positive) 32%, var(--app-border));
    background: linear-gradient(135deg, color-mix(in srgb, var(--app-positive-soft) 46%, var(--app-surface)) 0%, var(--app-surface) 62%);
}

.attendant-hero-widget::after {
    content: "";
    position: absolute;
    right: -80px;
    bottom: -100px;
    width: 260px;
    height: 260px;
    border-radius: 50%;
    background: color-mix(in srgb, var(--app-positive) 8%, transparent);
    filter: blur(3px);
    pointer-events: none;
}

.attendant-agent-orb {
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    border: 1px solid color-mix(in srgb, var(--app-positive) 45%, transparent);
    border-radius: 17px;
    background: var(--app-positive);
    color: #fff;
    box-shadow: 0 14px 36px color-mix(in srgb, var(--app-positive) 26%, transparent);
    font-size: 21px;
}

.attendant-hero-copy {
    display: grid;
    gap: 7px;
}

.attendant-hero-copy h2,
.attendant-hero-copy p {
    margin: 0;
}

.attendant-hero-copy h2 {
    font: 800 23px var(--app-display);
}

.attendant-hero-copy p {
    max-width: 720px;
    color: var(--app-text-soft);
    line-height: 1.55;
}

.attendant-context-chips {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 8px;
}

.attendant-context-chips>span {
    min-width: 0;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    gap: 9px;
    border: 1px solid var(--app-border);
    border-radius: 12px;
    background: color-mix(in srgb, var(--app-surface-raised) 82%, transparent);
}

.attendant-context-chips i {
    width: 18px;
    color: var(--app-positive);
    text-align: center;
}

.attendant-context-chips b {
    overflow: hidden;
    font-size: 11px;
    font-weight: 650;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.attendant-quick-nav {
    padding: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
    overflow-x: auto;
    scrollbar-width: none;
}

.attendant-quick-nav::-webkit-scrollbar {
    display: none;
}

.attendant-quick-nav>span,
.attendant-quick-nav a {
    min-height: 36px;
    padding: 0 12px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    border-radius: 10px;
    white-space: nowrap;
}

.attendant-quick-nav>span {
    color: var(--app-text-soft);
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
}

.attendant-quick-nav a {
    border: 1px solid transparent;
    color: var(--app-text-soft);
    font-size: 11px;
    font-weight: 700;
    text-decoration: none;
    transition: border-color .18s, background .18s, color .18s;
}

.attendant-quick-nav a:hover,
.attendant-quick-nav a:focus-visible {
    border-color: var(--app-border);
    background: var(--app-surface-muted);
    color: var(--app-text);
    outline: 0;
}

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

.attendant-widget {
    padding: 17px;
    display: grid;
    align-content: start;
    gap: 14px;
    scroll-margin-top: 22px;
}

.attendant-widget.is-featured,
.attendant-calendar-widget,
.attendant-messages-widget {
    grid-column: 1/-1;
}

.attendant-balanced-card {
    height: 100%;
}

.attendant-widget-head {
    display: flex;
    align-items: center;
    gap: 12px;
}

.attendant-widget-head>div:not(.attendant-simulator-person) {
    min-width: 0;
    flex: 1;
}

.attendant-widget-head h2,
.attendant-widget-head p {
    margin: 0;
}

.attendant-widget-head h2 {
    font: 800 17px var(--app-display);
}

.attendant-widget-head p {
    margin-top: 3px;
    color: var(--app-text-soft);
    font-size: 11px;
    line-height: 1.45;
}

.attendant-widget-icon {
    width: 42px;
    height: 42px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    border-radius: 13px;
    background: var(--app-accent-soft);
    color: var(--app-accent);
}

.attendant-widget-icon.is-green {
    background: var(--app-positive-soft);
    color: var(--app-positive);
}

.attendant-widget-icon.is-blue {
    background: var(--app-info-soft);
    color: var(--app-info);
}

.attendant-widget-icon.is-amber,
.attendant-widget-icon.is-orange {
    background: var(--app-warning-soft);
    color: var(--app-warning);
}

.attendant-widget-icon.is-purple {
    background: color-mix(in srgb, #8b5cf6 16%, var(--app-surface));
    color: #8b5cf6;
}

.attendant-widget-icon.is-pink {
    background: color-mix(in srgb, #e85d91 16%, var(--app-surface));
    color: #db4e84;
}

.attendant-widget-icon.is-cyan {
    background: color-mix(in srgb, #18a8b9 16%, var(--app-surface));
    color: #18a8b9;
}

.app-switch {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.app-switch input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.app-switch input+span,
.app-switch input+i {
    position: relative;
    width: 43px;
    height: 24px;
    flex: 0 0 auto;
    display: block;
    border: 1px solid var(--app-border-strong);
    border-radius: 999px;
    background: var(--app-bg-soft);
    transition: background .18s, border-color .18s;
}

.app-switch input+span::after,
.app-switch input+i::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--app-surface-raised);
    box-shadow: 0 2px 7px rgba(0, 0, 0, .22);
    transition: transform .18s;
}

.app-switch input:checked+span,
.app-switch input:checked+i {
    border-color: var(--app-positive);
    background: var(--app-positive);
}

.app-switch input:checked+span::after,
.app-switch input:checked+i::after {
    transform: translateX(19px);
    background: #fff;
}

.app-switch em {
    color: var(--app-text-soft);
    font-size: 11px;
    font-style: normal;
    font-weight: 750;
}

.attendant-progressive {
    display: grid;
    gap: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--app-border);
    animation: attendantReveal .24s ease both;
}

.attendant-progressive.is-compact {
    gap: 10px;
    padding-top: 12px;
}

@keyframes attendantReveal {
    from {
        opacity: 0;
        transform: translateY(-7px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.attendant-choice {
    cursor: pointer;
}

.attendant-choice>input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.attendant-choice>span {
    height: 100%;
    min-height: 100px;
    padding: 15px;
    display: grid;
    align-content: center;
    grid-template-columns: auto 1fr;
    gap: 5px 10px;
    border: 1px solid var(--app-border);
    border-radius: 14px;
    background: var(--app-surface-muted);
    transition: border-color .18s, background .18s, transform .18s;
}

.attendant-choice>span i {
    grid-row: 1/3;
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: var(--app-surface);
    color: var(--app-accent);
}

.attendant-choice>span strong {
    align-self: end;
}

.attendant-choice>span small {
    color: var(--app-text-soft);
    line-height: 1.4;
}

.attendant-choice>input:checked+span {
    border-color: var(--app-positive);
    background: color-mix(in srgb, var(--app-positive-soft) 70%, var(--app-surface));
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--app-positive) 12%, transparent);
    transform: translateY(-1px);
}

.attendant-choice-grid.is-compact .attendant-choice>span {
    min-height: 66px;
}

.attendant-inline-fields,
.attendant-time-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.app-input-suffix {
    position: relative;
}

.app-input-suffix .app-input {
    padding-right: 56px;
}

.app-input-suffix small {
    position: absolute;
    top: 50%;
    right: 13px;
    color: var(--app-text-soft);
    transform: translateY(-50%);
}

.attendant-subsection {
    padding: 16px;
    display: grid;
    gap: 14px;
    border: 1px solid var(--app-border);
    border-radius: 15px;
    background: color-mix(in srgb, var(--app-surface-muted) 75%, transparent);
}

.attendant-subsection h3,
.attendant-subsection p {
    margin: 0;
}

.attendant-subsection h3 {
    font-size: 13px;
}

.attendant-subsection p {
    margin-top: 3px;
    color: var(--app-text-soft);
    font-size: 10px;
}

.attendant-response-time {
    max-width: 320px;
}

.attendant-widget-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.attendant-widget-actions>small {
    color: var(--app-text-soft);
    font-size: 9px;
    text-align: right;
}

.attendant-permission-list {
    display: grid;
    gap: 2px;
}

.attendant-permission-list>label {
    padding: 12px 0;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid var(--app-border);
    cursor: pointer;
}

.attendant-permission-list>label:last-child {
    border-bottom: 0;
}

.attendant-permission-list>label>span:first-child {
    min-width: 0;
    display: grid;
    grid-template-columns: 30px 1fr;
    gap: 1px 8px;
    flex: 1;
}

.attendant-permission-list>label>span:first-child>i {
    grid-row: 1/3;
    align-self: center;
    color: var(--app-text-soft);
}

.attendant-permission-list b {
    font-size: 12px;
}

.attendant-permission-list small {
    color: var(--app-text-soft);
    font-size: 9px;
}

.attendant-calendar-strip {
    display: none !important;
    grid-template-columns: repeat(7, minmax(70px, 1fr));
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: thin;
}

.attendant-calendar-day {
    min-width: 70px;
    padding: 11px 8px;
    display: grid;
    place-items: center;
    gap: 4px;
    border: 1px solid var(--app-border);
    border-radius: 13px;
    background: var(--app-surface-muted);
    text-align: center;
}

.attendant-calendar-day small {
    color: var(--app-text-soft);
    font-size: 9px;
    text-transform: uppercase;
}

.attendant-calendar-day strong {
    font: 800 17px var(--app-display);
}

.attendant-calendar-day i {
    color: var(--app-text-soft);
    font-size: 8px;
    font-style: normal;
}

.attendant-calendar-day.has-exception {
    border-color: var(--app-warning);
    background: var(--app-warning-soft);
    color: var(--app-warning);
}

.attendant-exception-list,
.attendant-mentor-list {
    display: grid;
    gap: 9px;
}

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

.attendant-exception-list>.app-empty {
    min-height: 58px;
    padding: 12px;
    grid-column: 1/-1;
}

.attendant-exception {
    padding: 12px 13px;
    display: flex;
    align-items: center;
    gap: 11px;
    border: 1px solid var(--app-border);
    border-radius: 13px;
    background: var(--app-surface-muted);
}

.attendant-exception>i {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: var(--app-warning-soft);
    color: var(--app-warning);
}

.attendant-exception>span {
    min-width: 0;
    display: grid;
    gap: 2px;
    flex: 1;
}

.attendant-exception small {
    color: var(--app-text-soft);
}

.attendant-exception button {
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: var(--app-danger);
    cursor: pointer;
}

.attendant-count {
    min-width: 31px;
    height: 31px;
    padding: 0 8px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: var(--app-accent-soft);
    color: var(--app-accent);
    font-size: 11px;
    font-weight: 850;
}

.attendant-mentor-card {
    padding: 15px;
    display: grid;
    gap: 12px;
    border: 1px solid var(--app-border);
    border-radius: 15px;
    background: var(--app-surface-muted);
}

.attendant-mentor-card>header {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.attendant-mentor-card>header>span:first-child {
    min-width: 0;
    display: grid;
    gap: 4px;
    flex: 1;
}

.attendant-mentor-card header small {
    color: var(--app-text-soft);
}

.attendant-mentor-card blockquote {
    margin: 0;
    padding: 11px 13px;
    border-left: 3px solid var(--app-info);
    border-radius: 0 11px 11px 0;
    background: var(--app-surface);
    line-height: 1.5;
}

.attendant-mentor-form {
    display: grid;
    gap: 10px;
}

.attendant-mentor-scope {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.attendant-mentor-scope label {
    padding: 8px 10px;
    border: 1px solid var(--app-border);
    border-radius: 10px;
    background: var(--app-surface);
    cursor: pointer;
    font-size: 10px;
    font-weight: 700;
}

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

.attendant-message-grid .is-wide {
    grid-column: 1/-1;
}

.attendant-mentor-widget,
.attendant-requests-widget {
    min-height: 0;
}

.attendant-mentor-list>.app-empty,
.attendant-request-list>.app-empty {
    min-height: 76px;
    padding: 14px;
}

.attendant-savebar {
    position: sticky;
    z-index: 25;
    bottom: 14px;
    grid-column: 1/-1;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    gap: 14px;
    border: 1px solid color-mix(in srgb, var(--app-accent) 32%, var(--app-border));
    border-radius: 15px;
    background: color-mix(in srgb, var(--app-surface-raised) 92%, transparent);
    box-shadow: var(--app-shadow-md);
    backdrop-filter: blur(16px);
}

.attendant-savebar>span {
    flex: 1;
    color: var(--app-text-soft);
    font-size: 10px;
}

.attendant-readonly {
    grid-column: 1/-1;
}

.attendant-dialog-backdrop {
    position: fixed;
    z-index: 1250;
    inset: 0;
    padding: 20px;
    display: grid;
    place-items: center;
    background: rgba(4, 8, 6, .68);
    backdrop-filter: blur(8px);
}

.attendant-dialog {
    width: min(570px, 100%);
    max-height: calc(100dvh - 40px);
    overflow: auto;
    border: 1px solid var(--app-border);
    border-radius: 22px;
    background: var(--app-surface);
    box-shadow: var(--app-shadow-lg);
}

.attendant-dialog>header {
    padding: 18px 20px;
    display: flex;
    gap: 12px;
    border-bottom: 1px solid var(--app-border);
}

.attendant-dialog>header>div {
    flex: 1;
}

.attendant-dialog h2,
.attendant-dialog p {
    margin: 0;
}

.attendant-dialog p {
    margin-top: 4px;
    color: var(--app-text-soft);
    font-size: 11px;
}

.attendant-dialog form {
    padding: 20px;
    display: grid;
    gap: 14px;
}

.attendant-dialog footer {
    display: flex;
    justify-content: flex-end;
    gap: 9px;
}

.attendant-simulator {
    position: fixed;
    z-index: 1400;
    inset: 0;
    padding: 0;
    background: #07100c;
}

.attendant-simulator>section {
    width: 100%;
    height: 100%;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    background: radial-gradient(circle at 18% 0%, rgba(45, 132, 88, .18), transparent 33%), #0d1712;
    color: #edf5f0;
}

.attendant-simulator>section>header {
    min-height: 72px;
    padding: 12px clamp(16px, 4vw, 50px);
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, .09);
    background: rgba(9, 18, 13, .8);
    backdrop-filter: blur(18px);
}

.attendant-simulator-person {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 11px;
    flex: 1;
}

.attendant-simulator-person>span {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #31735a;
    color: #fff;
}

.attendant-simulator-person h2,
.attendant-simulator-person small {
    margin: 0;
}

.attendant-simulator-person h2 {
    font: 750 16px var(--app-display);
}

.attendant-simulator-person small {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #9eb1a7;
    font-size: 9px;
}

.attendant-simulator-person small i {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #66d39a;
    box-shadow: 0 0 0 4px rgba(102, 211, 154, .1);
}

.attendant-simulator .app-close {
    color: #edf5f0;
}

.attendant-simulator-body {
    width: min(820px, 100%);
    margin: 0 auto;
    padding: 28px clamp(14px, 4vw, 32px);
    display: flex;
    flex-direction: column;
    gap: 12px;
    overflow-y: auto;
}

.simulator-bubble {
    width: fit-content;
    max-width: min(76%, 650px);
    padding: 11px 14px;
    border-radius: 16px 16px 16px 4px;
    background: #1b2b23;
    box-shadow: 0 8px 20px rgba(0, 0, 0, .15);
    line-height: 1.55;
    white-space: pre-wrap;
}

.simulator-bubble.is-user {
    align-self: flex-end;
    border-radius: 16px 16px 4px 16px;
    background: #2d704f;
}

.simulator-bubble.is-loading {
    color: #91a69b;
}

.simulator-feedback {
    align-self: flex-start;
    display: flex;
    gap: 6px;
    margin-top: -6px;
}

.simulator-feedback button {
    width: 31px;
    height: 31px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 9px;
    background: #15221b;
    color: #9eb1a7;
    cursor: pointer;
}

.attendant-simulator-compose {
    width: min(820px, calc(100% - 28px));
    margin: 0 auto max(16px, env(safe-area-inset-bottom));
    padding: 8px;
    display: flex;
    align-items: flex-end;
    gap: 8px;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 17px;
    background: #17231d;
    box-shadow: 0 16px 40px rgba(0, 0, 0, .32);
}

.attendant-simulator-compose textarea {
    min-height: 42px;
    max-height: 130px;
    padding: 10px 12px;
    flex: 1;
    resize: none;
    border: 0;
    outline: 0;
    background: transparent;
    color: #edf5f0;
}

.attendant-simulator-compose button {
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 13px;
    background: #4ca476;
    color: #fff;
    cursor: pointer;
}

body.has-attendant-simulator {
    overflow: hidden !important;
}

@media (max-width: 980px) {
    .attendant-hero-widget {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .attendant-context-chips {
        grid-column: 1/-1;
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .attendant-context-facts {
        grid-template-columns: 1fr;
    }

    .attendant-setup-layout .setup-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .attendant-setup-layout .setup-actions .app-button {
        width: 100%;
    }

    .attendant-primary-toggle {
        align-items: flex-start;
    }

    .attendant-page-head {
        align-items: stretch;
    }

    .attendant-page-head .app-page-actions,
    .attendant-page-head .app-button {
        width: 100%;
    }

    .attendant-hero-widget {
        grid-template-columns: 1fr;
    }

    .attendant-agent-orb {
        width: 50px;
        height: 50px;
        border-radius: 16px;
    }

    .attendant-context-chips {
        grid-template-columns: 1fr;
    }

    .attendant-quick-nav {
        margin-inline: -2px;
    }

    .attendant-quick-nav>span {
        display: none;
    }

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

    .attendant-widget,
    .attendant-widget.is-featured,
    .attendant-calendar-widget,
    .attendant-messages-widget,
    .attendant-mentor-widget,
    .attendant-requests-widget {
        grid-column: 1;
        padding: 15px;
    }

    .attendant-widget-head {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .attendant-widget-head>.app-button {
        width: 100%;
    }

    .attendant-choice-grid,
    .attendant-inline-fields,
    .attendant-time-grid,
    .attendant-policy-grid,
    .attendant-message-grid,
    .attendant-exception-list {
        grid-template-columns: 1fr;
    }

    .attendant-message-grid .is-wide {
        grid-column: 1;
    }

    .attendant-widget-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .attendant-widget-actions>small {
        text-align: left;
    }

    .context-assistant-fab {
        width: 48px;
        min-height: 48px;
        padding: 0;
        justify-content: center;
    }

    .context-assistant-fab>span:last-child,
    .context-assistant-fab-dot {
        display: none;
    }

    .attendant-savebar {
        bottom: calc(72px + env(safe-area-inset-bottom));
    }

    .attendant-savebar>span {
        display: none;
    }

    .attendant-savebar .app-button {
        width: 100%;
    }

    .attendant-calendar-strip {
        grid-template-columns: repeat(7, 76px);
    }

    .simulator-bubble {
        max-width: 88%;
    }
}

.context-message.has-assistant-batch {
    width: min(100%, 720px);
    max-width: 100%;
}

.assistant-batch {
    display: grid;
    gap: 16px;
    margin-top: 14px;
    color: var(--app-text, #f4f7fb);
}

.assistant-batch-head,
.assistant-task-head,
.assistant-task-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.assistant-batch-head span,
.assistant-task-head span {
    display: grid;
    gap: 3px;
}

.assistant-batch-head small,
.assistant-task-head small,
.assistant-task-dependency {
    color: var(--app-muted, #94a3b8);
}

.assistant-batch-head b {
    padding: 6px 10px;
    border: 1px solid rgba(76, 201, 240, .25);
    border-radius: 999px;
    background: rgba(76, 201, 240, .09);
    color: #8be1ff;
    font-size: .72rem;
    text-transform: capitalize;
}

.assistant-batch-stepper {
    display: grid;
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}

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

.assistant-task-index {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border: 1px solid rgba(255, 255, 255, .13);
    border-radius: 50%;
    background: #141c29;
    color: #d9e4f2;
    font-weight: 750;
}

.assistant-task article {
    min-width: 0;
    padding: 15px;
    border: 1px solid rgba(255, 255, 255, .09);
    border-radius: 16px;
    background: rgba(8, 14, 24, .72);
}

.assistant-task.is-concluida .assistant-task-index {
    border-color: rgba(34, 197, 94, .32);
    background: rgba(34, 197, 94, .16);
    color: #86efac;
}

.assistant-task.is-falhou .assistant-task-index {
    border-color: rgba(239, 68, 68, .3);
    background: rgba(239, 68, 68, .14);
    color: #fca5a5;
}

.assistant-task.is-ignorada .assistant-task-index,
.assistant-task.is-cancelada .assistant-task-index {
    opacity: .55;
}

.assistant-task-head em {
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .06);
    color: #cbd5e1;
    font-size: .68rem;
    font-style: normal;
}

.assistant-task-head em.is-critica {
    background: rgba(245, 158, 11, .12);
    color: #fcd34d;
}

.assistant-task-source {
    margin: 10px 0;
    color: #cbd5e1;
    font-size: .82rem;
}

.assistant-task-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 6px 0 2px;
    padding: 9px 12px;
    border: 1px solid rgba(255, 255, 255, .09);
    border-radius: 13px;
    background: rgba(255, 255, 255, .035);
}

.assistant-task-summary>span {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.assistant-task-summary>span>i {
    display: grid;
    flex: 0 0 auto;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: rgba(238, 121, 75, .12);
    color: var(--app-primary, #ee794b);
}

.assistant-task-summary>span>span {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.assistant-task-summary strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: .84rem;
}

.assistant-task-summary small {
    color: var(--app-muted, #94a3b8);
    font-size: .72rem;
}

.assistant-task-editor {
    display: grid;
    gap: 14px;
    margin: 12px 0;
    padding: 14px;
    border: 1px solid rgba(238, 121, 75, .2);
    border-radius: 14px;
    background: rgba(5, 10, 18, .52);
    animation: app-fade-in .18s ease both;
}

.assistant-task-editor[hidden] {
    display: none !important;
}

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

.assistant-structured-field {
    display: grid;
    gap: 5px;
    min-width: 0;
}

.assistant-structured-field>span,
.assistant-weekly-hours label>span:not(:has(strong)) {
    color: #9fb0c4;
    font-size: .72rem;
}

.assistant-structured-field input,
.assistant-structured-field select,
.assistant-weekly-hours input[type="time"] {
    width: 100%;
    min-width: 0;
    min-height: 40px;
    padding: 9px 10px;
    border: 1px solid rgba(255, 255, 255, .11);
    border-radius: 10px;
    background: rgba(255, 255, 255, .035);
    color: #eef5ff;
}

.assistant-structured-field select option {
    background: #111b18;
    color: #eef5ff;
}

.assistant-structured-group,
.assistant-financial-list,
.assistant-weekly-hours {
    display: grid;
    gap: 10px;
    min-width: 0;
    margin: 0;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 13px;
}

.assistant-structured-group legend,
.assistant-financial-list legend,
.assistant-weekly-hours legend {
    padding: 0 6px;
    color: #dce8f5;
    font-size: .78rem;
    font-weight: 750;
}

.assistant-structured-item,
.assistant-financial-item {
    display: grid;
    gap: 11px;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 12px;
    background: rgba(255, 255, 255, .025);
}

.assistant-structured-item>header,
.assistant-financial-item>header {
    display: flex;
    align-items: center;
    gap: 9px;
}

.assistant-structured-item>header>button,
.assistant-financial-item>header>button {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    margin-left: auto;
    border: 0;
    border-radius: 9px;
    background: rgba(239, 68, 68, .1);
    color: #fca5a5;
    cursor: pointer;
}

.assistant-financial-item>header>span:not(.assistant-financial-index) {
    display: grid;
    gap: 1px;
}

.assistant-financial-item>header small {
    color: #9fb0c4;
    font-size: .7rem;
}

.assistant-financial-index {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 9px;
    background: rgba(238, 121, 75, .13);
    color: #ffac87;
    font-size: .75rem;
    font-weight: 800;
}

.assistant-financial-list [data-assistant-collection-items] {
    display: grid;
    gap: 10px;
}

.assistant-weekly-hours {
    gap: 8px;
}

.assistant-hours-day {
    display: grid;
    grid-template-columns: minmax(145px, 1fr) 110px 110px;
    align-items: center;
    gap: 9px;
    padding: 9px;
    border: 1px solid rgba(255, 255, 255, .07);
    border-radius: 11px;
    opacity: .72;
}

.assistant-hours-day.is-active {
    border-color: rgba(34, 197, 94, .25);
    background: rgba(34, 197, 94, .045);
    opacity: 1;
}

.assistant-hours-toggle {
    display: flex;
    align-items: center;
    gap: 9px;
    cursor: pointer;
}

.assistant-hours-toggle>input {
    accent-color: var(--app-primary, #ee794b);
}

.assistant-hours-toggle>span {
    display: grid;
    gap: 1px;
}

.assistant-hours-toggle small {
    color: #94a3b8;
    font-size: .68rem;
}

.assistant-hours-day>label:not(.assistant-hours-toggle) {
    display: grid;
    gap: 3px;
    color: #94a3b8;
    font-size: .68rem;
}

.assistant-task-validation {
    min-height: 0;
    margin: 0;
    color: #fca5a5;
    font-size: .76rem;
}

.assistant-task-validation:empty {
    display: none;
}

.assistant-task.has-validation-error article {
    border-color: rgba(239, 68, 68, .28);
}

.assistant-structured-unsupported {
    display: flex;
    gap: 8px;
    align-items: center;
    padding: 10px;
    border-radius: 10px;
    background: rgba(245, 158, 11, .1);
    color: #fcd34d;
    font-size: .76rem;
}

.assistant-appointment-editor.context-operation-preview {
    padding: 0;
    border: 0;
    background: transparent;
}

.assistant-appointment-editor .context-operation-item {
    padding: 0;
    border: 0;
    background: transparent;
}

.assistant-service-finder {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 9px;
    margin-bottom: 10px;
}

.assistant-service-finder>small {
    grid-column: 1 / -1;
    min-height: 0;
    color: #9fb0c4;
    font-size: .72rem;
}

.assistant-service-finder>small:empty {
    display: none;
}

.assistant-task-actions {
    justify-content: flex-end;
    margin-top: 4px;
}

.assistant-task-error,
.assistant-batch-feedback {
    color: #fca5a5;
    font-size: .78rem;
}

.assistant-task-result {
    margin-top: 4px;
    color: #a7f3d0;
    font-size: .78rem;
}

.assistant-task-result:empty,
.assistant-task-result[hidden] {
    display: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

@media (max-width: 560px) {

    .assistant-batch-head,
    .assistant-task-head,
    .assistant-task-actions {
        align-items: flex-start;
        flex-direction: column;
    }

    .assistant-task-summary {
        align-items: stretch;
        flex-direction: column;
    }

    .assistant-task-summary .app-button {
        width: 100%;
        justify-content: center;
    }

    .assistant-structured-grid {
        grid-template-columns: 1fr;
    }

    .assistant-hours-day {
        grid-template-columns: 1fr 1fr;
    }

    .assistant-hours-toggle {
        grid-column: 1 / -1;
    }

    .assistant-service-finder {
        grid-template-columns: 1fr;
    }

    .assistant-service-finder>.app-button {
        width: 100%;
        justify-content: center;
    }

    .assistant-service-finder>small {
        grid-column: auto;
    }

    .assistant-task-actions .app-button {
        width: 100%;
        justify-content: center;
    }
}

/* Textarea no editor de agendamento (observações) */
.assistant-structured-field textarea {
    width: 100%;
    min-width: 0;
    padding: 9px 10px;
    border: 1px solid rgba(255, 255, 255, .11);
    border-radius: 10px;
    background: rgba(255, 255, 255, .035);
    color: #eef5ff;
    font-family: inherit;
    font-size: inherit;
    resize: vertical;
    line-height: 1.45;
}

.assistant-structured-field textarea::placeholder {
    color: rgba(159, 176, 196, .5);
}

.assistant-structured-field textarea:focus,
.assistant-structured-field input:focus,
.assistant-structured-field select:focus {
    outline: 2px solid rgba(238, 121, 75, .4);
    outline-offset: 1px;
    border-color: rgba(238, 121, 75, .35);
}

.assistant-structured-field>span small {
    opacity: .65;
}

/* Campo que ocupa toda a largura do grid (ex: observações) */
.assistant-structured-field.is-full-width {
    grid-column: 1 / -1;
}

.assistant-marketing-editor {
    display: grid;
    gap: 12px;
}

.assistant-marketing-draft-note {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 10px 12px;
    border: 1px solid rgba(76, 201, 240, .18);
    border-radius: 11px;
    background: rgba(76, 201, 240, .06);
    color: #b9eaff;
    font-size: .74rem;
}

/* Dispatcher de lotes assistidos */
.ai-batch-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 7px;
    margin-left: auto;
}

.assistant-batch-head:has(.ai-batch-actions) {
    flex-wrap: wrap;
}

.assistant-batch-head:has(.ai-batch-actions)>b {
    order: 2;
}

.assistant-batch-head:has(.ai-batch-actions)>.ai-batch-actions {
    order: 3;
    flex-basis: 100%;
}

.is-ai-filled {
    position: relative;
}

.is-ai-filled>span:first-child::after {
    content: "Preenchido pelo assistente";
    margin-left: 7px;
    color: var(--app-accent);
    font-size: 8px;
    font-weight: 750;
    letter-spacing: .02em;
}

.is-ai-filled input,
.is-ai-filled select,
.is-ai-filled textarea,
input.is-ai-filled,
select.is-ai-filled,
textarea.is-ai-filled {
    border-color: color-mix(in srgb, var(--app-accent) 46%, var(--app-border)) !important;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--app-accent) 10%, transparent);
}

.is-ai-target {
    position: relative;
    z-index: 1;
    outline: 3px solid color-mix(in srgb, var(--app-accent) 35%, transparent) !important;
    outline-offset: 4px;
    animation: ai-target-pulse 1.6s ease-in-out 2;
}

.ai-wizard-bar {
    position: fixed;
    z-index: 15050;
    top: max(10px, env(safe-area-inset-top));
    left: 50%;
    width: min(1180px, calc(100% - 28px));
    min-height: 70px;
    padding: 11px 13px;
    display: grid;
    grid-template-columns: 5px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    border: 1px solid color-mix(in srgb, var(--app-accent) 38%, var(--app-border));
    border-radius: 17px;
    background: color-mix(in srgb, var(--app-surface-raised) 94%, transparent);
    box-shadow: 0 20px 58px rgba(2, 12, 8, .28);
    backdrop-filter: blur(18px);
    transform: translateX(-50%);
    animation: ai-wizard-enter .22s ease both;
}

.ai-wizard-progress {
    width: 5px;
    height: 46px;
    overflow: hidden;
    border-radius: 999px;
    background: color-mix(in srgb, var(--app-border) 75%, transparent);
}

.ai-wizard-progress i {
    display: block;
    width: 100%;
    height: var(--progress, 0%);
    border-radius: inherit;
    background: linear-gradient(180deg, var(--app-accent), var(--app-positive));
    transition: height .25s ease;
}

.ai-wizard-copy {
    min-width: 0;
    display: grid;
    gap: 2px;
}

.ai-wizard-copy small {
    color: var(--app-accent);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.ai-wizard-copy strong {
    overflow: hidden;
    color: var(--app-text);
    font: 750 13px var(--app-display);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ai-wizard-copy em {
    overflow: hidden;
    color: var(--app-text-soft);
    font-size: 9px;
    font-style: normal;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ai-wizard-copy em.is-error {
    color: var(--app-danger);
}

.ai-wizard-copy em.is-success {
    color: var(--app-positive);
}

.ai-wizard-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 7px;
}

.ai-wizard-actions .app-button {
    white-space: nowrap;
}

.ai-wizard-actions [data-ai-wizard-approve-all] {
    border-color: color-mix(in srgb, var(--app-positive) 35%, var(--app-border));
    background: color-mix(in srgb, var(--app-positive) 10%, transparent);
    color: var(--app-positive);
}

.ai-wizard-actions [data-ai-wizard-undo],
.ai-restore-button {
    border-color: color-mix(in srgb, var(--app-accent) 28%, var(--app-border));
}

.ai-restore-button {
    margin-top: 10px;
}

.has-ai-bulk-action .ai-wizard-actions .app-button {
    pointer-events: none;
    opacity: .58;
}

.has-ai-wizard .app-drawer,
.has-ai-wizard .hub-product-modal.open,
.has-ai-wizard .attendant-dialog-backdrop:not([hidden]) {
    padding-top: max(94px, calc(82px + env(safe-area-inset-top)));
}

.has-ai-wizard .app-drawer {
    height: 100dvh !important;
}

.has-ai-wizard .app-drawer-head {
    border-top-left-radius: 16px;
}

.ai-confirm-overlay {
    position: fixed;
    z-index: 17000;
    inset: 0;
    padding: 18px;
    display: grid;
    place-items: center;
    background: rgba(3, 11, 8, .68);
    backdrop-filter: blur(9px);
    animation: app-fade-in .16s ease both;
}

.ai-confirm-dialog {
    width: min(520px, 100%);
    padding: 22px;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 15px;
    border: 1px solid color-mix(in srgb, var(--app-warning) 34%, var(--app-border));
    border-radius: 22px;
    background: var(--app-surface-raised);
    box-shadow: var(--app-shadow-lg);
}

.ai-confirm-icon {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 13px;
    background: color-mix(in srgb, var(--app-warning) 14%, transparent);
    color: var(--app-warning);
    font-size: 17px;
}

.ai-confirm-dialog h2,
.ai-confirm-dialog p {
    margin: 0;
}

.ai-confirm-dialog h2 {
    color: var(--app-text);
    font: 760 17px var(--app-display);
}

.ai-confirm-dialog p {
    margin-top: 6px;
    color: var(--app-text-soft);
    font-size: 11px;
    line-height: 1.55;
}

.ai-confirm-dialog>.app-field,
.ai-confirm-dialog>footer {
    grid-column: 1/-1;
}

.ai-confirm-dialog footer {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.has-ai-dialog {
    overflow: hidden !important;
}

@keyframes ai-wizard-enter {
    from {
        opacity: 0;
        transform: translate(-50%, -12px);
    }

    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

@keyframes ai-target-pulse {
    50% {
        outline-color: color-mix(in srgb, var(--app-accent) 75%, transparent);
        box-shadow: 0 0 0 9px color-mix(in srgb, var(--app-accent) 9%, transparent);
    }
}

@media (min-width: 721px) and (max-width: 1100px) {
    .ai-wizard-bar {
        grid-template-columns: 5px minmax(0, 1fr);
    }

    .ai-wizard-progress {
        grid-row: 1 / span 2;
    }

    .ai-wizard-actions {
        grid-column: 2;
        justify-content: flex-start;
    }

    .has-ai-wizard .app-drawer,
    .has-ai-wizard .hub-product-modal.open,
    .has-ai-wizard .attendant-dialog-backdrop:not([hidden]) {
        padding-top: max(142px, calc(130px + env(safe-area-inset-top)));
    }
}

@media (max-width: 720px) {
    .ai-batch-actions {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr;
    }

    .ai-batch-actions .app-button {
        width: 100%;
        justify-content: center;
    }

    .ai-wizard-bar {
        top: auto;
        bottom: calc(74px + env(safe-area-inset-bottom));
        width: calc(100% - 20px);
        padding: 10px 11px;
        grid-template-columns: 4px minmax(0, 1fr);
        border-radius: 16px;
        transform: translateX(-50%);
    }

    .ai-wizard-actions {
        grid-column: 1/-1;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .ai-wizard-actions:has(:only-child) {
        grid-template-columns: 1fr;
    }

    .ai-wizard-actions .app-button {
        width: 100%;
        justify-content: center;
        min-height: 38px;
        white-space: normal;
    }

    .ai-wizard-actions .ai-wizard-exit {
        grid-column: 1 / -1;
    }

    .has-ai-wizard .app-drawer,
    .has-ai-wizard .hub-product-modal.open,
    .has-ai-wizard .attendant-dialog-backdrop:not([hidden]) {
        padding-top: 0;
        padding-bottom: calc(224px + env(safe-area-inset-bottom));
    }

    .has-ai-wizard .app-drawer-footer {
        padding-bottom: calc(226px + env(safe-area-inset-bottom));
    }

    .ai-confirm-dialog {
        padding: 18px;
        grid-template-columns: 1fr;
    }

    .ai-confirm-dialog>.app-field,
    .ai-confirm-dialog>footer {
        grid-column: 1;
    }

    .ai-confirm-dialog footer {
        display: grid;
        grid-template-columns: 1fr;
    }

    .ai-confirm-dialog footer .app-button {
        width: 100%;
        justify-content: center;
    }
}

@media (prefers-reduced-motion: reduce) {

    .ai-wizard-bar,
    .ai-confirm-overlay,
    .is-ai-target {
        animation: none !important;
    }

    .ai-wizard-progress i {
        transition: none;
    }
}