@charset "UTF-8";
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,400&family=Outfit:wght@500;600;700;800&display=swap');

/* ==========================================================================
   LIGHTASSIST DESIGN SYSTEM
   Identidade visual verde refinada, moderna e acolhedora
   ========================================================================== */

:root {
    /* Paleta Principal - Tons de Verde Floresta & Esmeralda */
    --color-primary-950: #091a19;
    --color-primary-900: #0f2c2a;
    --color-primary-850: #102c2b;
    --color-primary-800: #143d3b;
    --color-primary-700: #19524f;
    --color-primary-600: #1f6b67;
    --color-primary-500: #2a8a85;
    
    /* Acentos & Luz - Menta & Esmeralda Vibrante */
    --color-emerald-500: #10b981;
    --color-emerald-400: #34d399;
    --color-emerald-300: #6ee7b7;
    --color-emerald-100: #d1fae5;
    --color-emerald-50:  #ecfdf5;

    /* Acentos Quentes - Âmbar & Alerta */
    --color-amber-500: #d97706;
    --color-amber-400: #f59e0b;
    --color-amber-100: #fef3c7;
    --color-amber-50:  #fffbeb;

    /* Cores de Alerta & Sucesso */
    --color-rose-600: #e11d48;
    --color-rose-100: #ffe4e6;
    --color-rose-50:  #fff1f2;

    /* Superfícies & Neutros */
    --color-canvas: #f7faf9;
    --color-surface: #ffffff;
    --color-surface-hover: #fcfdfd;
    --color-surface-subtle: #f0f5f4;
    --color-surface-muted: #e7eeec;
    
    /* Bordas & Divisores */
    --border-subtle: rgba(16, 44, 43, 0.07);
    --border-default: rgba(16, 44, 43, 0.12);
    --border-strong: rgba(16, 44, 43, 0.22);
    --border-focus: #10b981;

    /* Textos */
    --text-main: #102423;
    --text-body: #2c4442;
    --text-muted: #5e7a77;
    --text-subtle: #89a3a0;
    --text-inverse: #ffffff;
    --text-inverse-muted: #b0cac7;

    /* Tipografia */
    --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-display: 'Outfit', 'Plus Jakarta Sans', system-ui, sans-serif;

    /* Sombras & Elevações */
    --shadow-xs: 0 1px 2px rgba(15, 44, 42, 0.04);
    --shadow-sm: 0 2px 5px rgba(15, 44, 42, 0.05), 0 1px 2px rgba(15, 44, 42, 0.03);
    --shadow-md: 0 6px 18px -3px rgba(15, 44, 42, 0.08), 0 2px 6px -2px rgba(15, 44, 42, 0.04);
    --shadow-lg: 0 16px 32px -6px rgba(15, 44, 42, 0.12), 0 6px 12px -4px rgba(15, 44, 42, 0.05);
    --shadow-glow: 0 0 30px rgba(16, 185, 129, 0.25);

    /* Raios de Borda */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 22px;
    --radius-full: 9999px;

    /* Transições */
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --transition-fast: 0.16s var(--ease-out);
    --transition-base: 0.24s var(--ease-out);

    /* Layout */
    --navbar-height: 72px;
}

/* ==========================================================================
   RESET & FUNDAMENTOS
   ========================================================================== */

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

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
    color-scheme: light;
}

body {
    font-family: var(--font-sans);
    background-color: var(--color-canvas);
    color: var(--text-body);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition-fast);
}

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

button {
    cursor: pointer;
    background: none;
    border: none;
}

img, svg {
    display: block;
    max-width: 100%;
}

.skip-link {
    position: absolute;
    top: -60px;
    left: 20px;
    padding: 10px 18px;
    background: var(--color-emerald-500);
    color: var(--color-primary-950);
    font-weight: 700;
    border-radius: var(--radius-md);
    z-index: 9999;
    box-shadow: var(--shadow-lg);
    transition: top var(--transition-fast);
}

.skip-link:focus {
    top: 20px;
}

.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;
}

/* ==========================================================================
   ÍCONES & COMPONENTES BASE
   ========================================================================== */

.icon {
    width: 1.25rem;
    height: 1.25rem;
    flex-shrink: 0;
    display: inline-block;
    vertical-align: middle;
}

.soft-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: var(--radius-md);
    background-color: var(--color-emerald-50);
    color: var(--color-emerald-500);
    flex-shrink: 0;
}

.soft-icon.mint {
    background-color: #e6f9f3;
    color: #059669;
}

.soft-icon.amber {
    background-color: var(--color-amber-50);
    color: var(--color-amber-500);
}

/* ==========================================================================
   TIPOGRAFIA & CABEÇALHOS
   ========================================================================== */

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    color: var(--text-main);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.25;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-sans);
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-emerald-500);
    margin-bottom: 0.4rem;
}

.eyebrow.light {
    color: var(--color-emerald-300);
}

.page-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.page-heading h1 {
    font-size: 2rem;
    font-weight: 800;
}

.page-heading p {
    color: var(--text-muted);
    font-size: 1rem;
    margin-top: 0.35rem;
}

.greeting-dot {
    color: var(--color-emerald-500);
}

/* ==========================================================================
   BOTÕES & AÇÕES
   ========================================================================== */

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    font-size: 0.9375rem;
    font-weight: 600;
    padding: 0.75rem 1.35rem;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    white-space: nowrap;
    line-height: 1;
    text-align: center;
}

.button:focus-visible {
    outline: 2px solid var(--color-emerald-500);
    outline-offset: 2px;
}

.button-primary {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(34, 197, 94, 0.32);
    border-radius: 12px;
}

.button-primary:hover {
    background: linear-gradient(135deg, #4ade80 0%, #22c55e 100%);
    box-shadow: 0 6px 20px rgba(34, 197, 94, 0.42);
    transform: translateY(-1px);
    color: #ffffff;
}

.button-primary:active {
    transform: translateY(0);
}

.button-secondary {
    background-color: var(--color-surface);
    color: var(--text-main);
    border: 1px solid var(--border-default);
    box-shadow: var(--shadow-xs);
}

.button-secondary:hover {
    background-color: var(--color-surface-subtle);
    border-color: var(--border-strong);
}

.button-white {
    background-color: #ffffff;
    color: var(--color-primary-900);
    font-weight: 700;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
}

.button-white:hover {
    background-color: #f7faf9;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
}

.button-danger {
    background-color: var(--color-rose-600);
    color: #ffffff;
}

.button-danger:hover {
    background-color: #be123c;
}

.button-full {
    width: 100%;
}

.button.disabled, .button[disabled] {
    opacity: 0.55;
    cursor: not-allowed;
    pointer-events: none;
}

.icon-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: var(--radius-md);
    color: var(--text-muted);
    transition: all var(--transition-fast);
}

.icon-button:hover {
    background-color: var(--color-surface-subtle);
    color: var(--text-main);
}

.icon-button.outlined {
    border: 1px solid var(--border-default);
    background-color: var(--color-surface);
}

.icon-button.outlined:hover {
    border-color: var(--color-emerald-500);
    color: var(--color-emerald-500);
}

.text-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-emerald-500);
}

.text-link:hover {
    color: var(--color-primary-700);
    text-decoration: underline;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 1.25rem;
    transition: color var(--transition-fast);
}

.back-link:hover {
    color: var(--color-emerald-500);
}

/* ==========================================================================
   BADGES & CHIPS
   ========================================================================== */

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.65rem;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: var(--radius-full);
    background-color: var(--color-emerald-50);
    color: var(--color-emerald-500);
    border: 1px solid rgba(16, 185, 129, 0.2);
    letter-spacing: 0.01em;
}

.badge-amber {
    background-color: var(--color-amber-50);
    color: var(--color-amber-500);
    border-color: rgba(245, 158, 11, 0.25);
}

.badge-muted {
    background-color: var(--color-surface-subtle);
    color: var(--text-muted);
    border-color: var(--border-default);
}

/* ==========================================================================
   ALERTA & FEEDBACK
   ========================================================================== */

.alert {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    padding: 1rem 1.25rem;
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
    font-size: 0.9375rem;
    line-height: 1.5;
    box-shadow: var(--shadow-sm);
    animation: alertSlideDown 0.3s var(--ease-out);
}

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

.alert-success {
    background-color: var(--color-emerald-50);
    border: 1px solid var(--color-emerald-300);
    color: #065f46;
}

.alert-success .icon {
    color: var(--color-emerald-500);
}

.alert-error {
    background-color: var(--color-rose-50);
    border: 1px solid #fecdd3;
    color: #9f1239;
}

.alert-error ul {
    margin-top: 0.4rem;
    margin-left: 1.2rem;
}

/* ==========================================================================
   LAYOUT SHELL COM NAVBAR SUPERIOR (NO TOPO)
   ========================================================================== */

.app-body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background-color: var(--color-canvas);
}

/* Top Navbar Superior Clara & Limpa (Fiel ao Legado) */
.top-navbar {
    position: sticky;
    top: 0;
    z-index: 50;
    background-color: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.85);
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.04);
    color: #1e293b;
}

.navbar-container {
    max-width: 1360px;
    margin: 0 auto;
    padding: 0 2rem;
    height: 66px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.navbar-left {
    display: flex;
    align-items: center;
    gap: 2.5rem;
}

/* Marca Oficial Idêntica ao Legado */
.brand-link {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    transition: opacity var(--transition-fast);
}

.brand-link:hover {
    opacity: 0.9;
}

.brand-logo-wrap {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
}

.brand-sparkles {
    display: inline-block;
    flex-shrink: 0;
}

.brand-text {
    font-family: var(--font-sans);
    font-size: 1.35rem;
    font-weight: 800;
    color: #1e293b;
    letter-spacing: -0.025em;
}

.brand-green {
    color: #22c55e;
}

/* Links de Navegação */
.navbar-nav {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    margin-right: auto;
    margin-left: 2.5rem;
}

.mobile-nav-header,
.mobile-nav-user {
    display: none;
}

.nav-item {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.5rem 0.95rem;
    border-radius: var(--radius-md);
    color: #64748b;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all var(--transition-fast);
    text-decoration: none;
    border: 1px solid transparent;
}

.nav-item .icon {
    width: 1.15rem;
    height: 1.15rem;
    color: #64748b;
    transition: color var(--transition-fast);
}

.nav-item:hover {
    color: #1e293b;
    background-color: #f8fafc;
}

.nav-item:hover .icon {
    color: #1e293b;
}

.nav-item.active {
    color: #16a34a;
    background-color: #f0fdf4;
    font-weight: 600;
}

.nav-item.active .icon {
    color: #16a34a;
}

.nav-pending-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.2rem;
    height: 1.2rem;
    padding: 0 0.25rem;
    border-radius: 999px;
    background: #b42334;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.menu-toggle { position: relative; }

.nav-pending-dot {
    position: absolute;
    top: 0.3rem;
    right: 0.3rem;
    width: 0.6rem;
    height: 0.6rem;
    border: 1px solid #fff;
    border-radius: 50%;
    background: #b42334;
}

.nav-pending-count[hidden], .nav-pending-dot[hidden] { display: none; }

/* Lado Direito da Navbar */
.navbar-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.user-dropdown-container {
    position: relative;
}

.user-trigger {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.35rem 0.65rem;
    border-radius: var(--radius-lg);
    border: 1px solid transparent;
    background: transparent;
    cursor: pointer;
    text-align: left;
    transition: all var(--transition-fast);
}

.user-trigger:hover,
.user-trigger[aria-expanded="true"] {
    background-color: #f8fafc;
    border-color: #e2e8f0;
}

.user-avatar {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 10px;
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    color: #ffffff;
    font-weight: 700;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(34, 197, 94, 0.25);
    flex-shrink: 0;
}

.user-details {
    display: flex;
    flex-direction: column;
    line-height: 1.25;
}

.user-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: #334155;
    white-space: nowrap;
}

.user-role {
    font-size: 0.75rem;
    color: #94a3b8;
    white-space: nowrap;
}

.user-chevron {
    width: 0.85rem;
    height: 0.85rem;
    color: #94a3b8;
    transition: transform var(--transition-fast);
}

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

/* Dropdown Menu Flutuante */
.user-dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 220px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-lg);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
    padding: 0.5rem 0;
    z-index: 60;
    animation: dropdownFade 0.18s var(--ease-out);
}

.user-dropdown-menu[hidden] {
    display: none !important;
}

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

.dropdown-header {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #f1f5f9;
}

.dropdown-header strong {
    display: block;
    font-size: 0.875rem;
    color: #1e293b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dropdown-header small {
    display: block;
    font-size: 0.75rem;
    color: #64748b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dropdown-links,
.dropdown-body {
    padding: 0.35rem 0;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    width: 100%;
    padding: 0.55rem 1rem;
    font-size: 0.875rem;
    color: #475569;
    text-decoration: none;
    background: transparent;
    border: none;
    cursor: pointer;
    text-align: left;
    transition: all var(--transition-fast);
}

.dropdown-item:hover {
    background-color: #f8fafc;
    color: #1e293b;
}

.dropdown-footer {
    border-top: 1px solid #f1f5f9;
    padding-top: 0.35rem;
    margin-top: 0.35rem;
}

.dropdown-logout {
    color: #dc2626;
}

.dropdown-logout:hover {
    background-color: #fef2f2;
    color: #b91c1c;
}

.quick-logout-form {
    display: flex;
    align-items: center;
}

.quick-logout-form .icon-button {
    color: #94a3b8;
}

.quick-logout-form .icon-button:hover {
    color: #dc2626;
    background-color: #fef2f2;
}

.menu-toggle {
    display: none;
    color: #64748b;
}

.menu-toggle:hover {
    color: #1e293b;
    background-color: #f1f5f9;
}

/* App Shell (Conteúdo Central de Largura Total) */
.app-shell {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 72px);
    width: 100%;
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 2.5rem 2rem 3.5rem;
    max-width: 1280px;
    width: 100%;
    margin: 0 auto;
}

/* App Footer */
.app-footer {
    border-top: 1px solid var(--border-subtle);
    background-color: var(--color-surface);
    color: var(--text-subtle);
    font-size: 0.8125rem;
    margin-top: auto;
}

.footer-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 1.25rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* ==========================================================================
   PAINEL & DASHBOARD (PADRÃO CLARO & AREJADO FIEL AO LEGADO)
   ========================================================================== */

/* Dashboard Header */
.dashboard-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1.5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.dashboard-header h1 {
    font-size: 1.875rem;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.25;
    letter-spacing: -0.025em;
}

.dashboard-subtitle {
    font-size: 0.95rem;
    color: #64748b;
    margin-top: 0.35rem;
}

.dashboard-subtitle strong {
    color: #1e293b;
    font-weight: 600;
}

.dashboard-header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 1.65rem 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    transition: all var(--transition-base);
    display: flex;
    flex-direction: column;
}

.stat-card:hover {
    box-shadow: 0 12px 24px -6px rgba(0, 0, 0, 0.08);
    border-color: #cbd5e1;
    transform: translateY(-3px);
}

.stat-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.875rem;
    font-weight: 600;
    color: #64748b;
    margin-bottom: 0.75rem;
}

.stat-icon-wrap {
    width: 3rem;
    height: 3rem;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-icon-wrap .icon {
    width: 1.45rem;
    height: 1.45rem;
}

.stat-icon-green {
    background-color: #ecfdf5;
    color: #16a34a;
}

.stat-icon-blue {
    background-color: #eff6ff;
    color: #2563eb;
}

.stat-icon-amber {
    background-color: #fffbeb;
    color: #d97706;
}

.stat-value {
    font-family: var(--font-sans);
    font-size: 2.25rem;
    font-weight: 800;
    color: #0f172a;
    line-height: 1;
    margin-bottom: 1rem;
}

.stat-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.8125rem;
    color: #64748b;
    margin-top: auto;
    padding-top: 0.75rem;
    border-top: 1px solid #f1f5f9;
}

.stat-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: #16a34a;
    font-weight: 600;
    text-decoration: none;
    transition: transform var(--transition-fast);
}

.stat-link:hover {
    color: #15803d;
    transform: translateX(3px);
}

.stat-highlight-dot {
    color: #16a34a;
    font-size: 0.65rem;
    margin-right: 0.35rem;
}

/* Dashboard Columns */
.dashboard-columns {
    display: grid;
    grid-template-columns: 1.35fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

/* Painéis Gerais */
.panel {
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 1.75rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    min-width: 0;
    max-width: 100%;
}

.panel-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.panel-heading h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #0f172a;
}

.panel-heading p {
    font-size: 0.875rem;
    color: #64748b;
    margin-top: 0.2rem;
}

.stack {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    min-width: 0;
    max-width: 100%;
}

/* Bot List Rows */
.bot-list-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.95rem 1.15rem;
    border-radius: 12px;
    background-color: #f8fafc;
    border: 1px solid #f1f5f9;
    margin-bottom: 0.75rem;
    transition: all var(--transition-fast);
    text-decoration: none;
}

.bot-list-row:hover {
    background-color: #f0fdf4;
    border-color: #bbf7d0;
    transform: translateX(3px);
}

.bot-list-avatar {
    width: 2.65rem;
    height: 2.65rem;
    border-radius: 12px;
    background-color: #dcfce7;
    color: #16a34a;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.bot-list-avatar .icon {
    width: 1.35rem;
    height: 1.35rem;
}

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

.row-copy strong {
    display: block;
    font-size: 0.9375rem;
    color: #0f172a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.row-copy small {
    display: block;
    font-size: 0.8125rem;
    color: #64748b;
    margin-top: 0.15rem;
}

.row-arrow {
    color: #94a3b8;
    transition: transform var(--transition-fast);
}

.bot-list-row:hover .row-arrow {
    color: #16a34a;
    transform: translateX(3px);
}

/* Onboarding & Progress Bar */
.onboarding-progress-wrap {
    margin-bottom: 1.5rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid #f1f5f9;
}

.onboarding-progress-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.8125rem;
    color: #64748b;
    margin-bottom: 0.6rem;
}

.onboarding-progress-meta strong {
    font-size: 0.875rem;
    font-weight: 700;
    color: #16a34a;
}

.progress-bar-track {
    width: 100%;
    height: 8px;
    background-color: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-full);
    overflow: hidden;
    position: relative;
}

.progress-bar-fill {
    height: 100%;
    border-radius: var(--radius-full);
    background: linear-gradient(90deg, #22c55e 0%, #16a34a 100%);
    box-shadow: 0 1px 4px rgba(34, 197, 94, 0.35);
    transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.onboarding {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.onboarding li {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.step-number {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: var(--radius-full);
    background-color: #f8fafc;
    border: 1px solid #cbd5e1;
    color: #64748b;
    font-weight: 700;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all var(--transition-fast);
}

.onboarding li.is-complete .step-number {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    border-color: #16a34a;
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(34, 197, 94, 0.3);
}

.onboarding li a {
    font-weight: 600;
    font-size: 0.9375rem;
    color: #0f172a;
    text-decoration: none;
    transition: color var(--transition-fast);
}

.onboarding li a:hover {
    color: #16a34a;
    text-decoration: underline;
}

.onboarding li strong {
    font-weight: 600;
    font-size: 0.9375rem;
    color: #0f172a;
}

.onboarding li p {
    font-size: 0.8125rem;
    color: #64748b;
    margin-top: 0.2rem;
    line-height: 1.4;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem 2rem;
}

.empty-state.compact {
    padding: 2rem 1rem;
}

.empty-icon {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: var(--radius-xl);
    background-color: var(--color-emerald-50);
    color: var(--color-emerald-500);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
}

.empty-state h3, .empty-state h2 {
    font-size: 1.25rem;
    margin-bottom: 0.4rem;
}

.empty-state p {
    color: var(--text-muted);
    font-size: 0.9375rem;
    max-width: 420px;
    margin: 0 auto 1.5rem;
}

.empty-presets {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 1.5rem;
    font-size: 0.875rem;
    color: var(--text-subtle);
}

.empty-presets span {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

/* Roadmap Details / Acordeão */
.roadmap {
    background-color: var(--color-surface);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    padding: 1.25rem 1.75rem;
    box-shadow: var(--shadow-xs);
}

.roadmap summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    font-weight: 700;
    font-size: 0.9375rem;
    list-style: none;
    user-select: none;
}

.roadmap summary::-webkit-details-marker {
    display: none;
}

.summary-hint {
    font-size: 0.8125rem;
    color: var(--text-muted);
    font-weight: 600;
}

.chevron {
    display: inline-block;
    transition: transform var(--transition-fast);
}

details[open] .chevron {
    transform: rotate(180deg);
}

.roadmap-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25rem;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-subtle);
}

.roadmap-grid div {
    background-color: var(--color-surface-subtle);
    padding: 1.25rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-subtle);
}

.roadmap-grid h3 {
    font-size: 0.95rem;
    margin: 0.75rem 0 0.35rem;
}

.roadmap-grid p {
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-bottom: 0.85rem;
}

/* ==========================================================================
   BOTS & CARDS
   ========================================================================== */

.collection-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    font-size: 0.9375rem;
    color: var(--text-muted);
}

.collection-bar .muted {
    font-size: 0.8125rem;
    color: var(--text-subtle);
}

.bots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.bot-card {
    display: flex;
    flex-direction: column;
    padding: 1.75rem;
    transition: all var(--transition-base);
}

.bot-card:hover {
    box-shadow: var(--shadow-md);
    border-color: rgba(16, 185, 129, 0.3);
    transform: translateY(-2px);
}

.bot-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.1rem;
}

.bot-avatar {
    width: 2.75rem;
    height: 2.75rem;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, #102c2b 0%, #1c4b47 100%);
    color: var(--color-emerald-300);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-xs);
}

.bot-card h2 {
    font-size: 1.25rem;
    margin-bottom: 0.4rem;
}

.bot-description {
    font-size: 0.875rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 1.25rem;
    flex: 1;
}

.bot-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-subtle);
}

.bot-meta span {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.connection-note {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.78125rem;
    color: var(--color-amber-500);
    background-color: var(--color-amber-50);
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1.25rem;
}

.status-dot {
    width: 7px;
    height: 7px;
    border-radius: var(--radius-full);
    background-color: var(--color-amber-400);
}

.bot-card-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: auto;
}

.bot-card-actions .button {
    flex: 1;
}

/* Pagination */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin: 2rem 0;
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* Info Note */
.info-note {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    background-color: var(--color-surface);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    padding: 1.1rem 1.35rem;
    color: var(--text-muted);
    font-size: 0.875rem;
    line-height: 1.5;
    margin-top: 1.5rem;
}

.info-note .icon {
    color: var(--color-emerald-500);
}

.info-note.vertical {
    flex-direction: column;
}

/* ==========================================================================
   FORMULÁRIOS & CAMPOS
   ========================================================================== */

.field {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    margin-bottom: 1.25rem;
}

.field label, legend {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-main);
}

.field .optional {
    font-weight: 400;
    color: var(--text-subtle);
    font-size: 0.8125rem;
}

/* Estilização universal e robusta de inputs e formulários */
.field input:where(:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]):not([type="reset"]):not([type="file"]):not([type="hidden"])),
.field textarea,
.field select,
input:where(:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]):not([type="reset"]):not([type="file"]):not([type="hidden"])),
textarea,
select {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 0.9375rem;
    font-family: inherit;
    line-height: 1.5;
    background-color: var(--color-surface);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    color: var(--text-main);
    transition: all var(--transition-fast);
    box-shadow: var(--shadow-xs);
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.field input:where(:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]):not([type="reset"]):not([type="file"]):not([type="hidden"])):hover,
.field textarea:hover,
.field select:hover,
input:where(:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]):not([type="reset"]):not([type="file"]):not([type="hidden"])):hover,
textarea:hover,
select:hover {
    border-color: var(--border-strong);
}

.field input:where(:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]):not([type="reset"]):not([type="file"]):not([type="hidden"])):focus,
.field textarea:focus,
.field select:focus,
input:where(:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]):not([type="reset"]):not([type="file"]):not([type="hidden"])):focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--color-emerald-500);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
    background-color: #ffffff;
}

.field input::placeholder,
.field textarea::placeholder,
input::placeholder,
textarea::placeholder {
    color: var(--text-subtle);
    opacity: 0.75;
}

/* Checkbox estilizado */
input[type="checkbox"] {
    accent-color: var(--color-emerald-500);
    width: 1.15rem;
    height: 1.15rem;
    cursor: pointer;
    vertical-align: middle;
}

.field textarea {
    resize: vertical;
    min-height: 90px;
    line-height: 1.6;
}

.field small {
    font-size: 0.78125rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
}

.phone-grid {
    display: grid;
    grid-template-columns: 110px 1fr;
    gap: 1rem;
}

.form-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border-subtle);
}

.section-number {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--color-emerald-500);
    opacity: 0.8;
}

/* Preset Radio Cards */
.preset-fieldset {
    border: none;
    padding: 0;
    margin-bottom: 1.5rem;
}

.preset-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin: 0.6rem 0;
}

.preset-option {
    position: relative;
    cursor: pointer;
}

.preset-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.preset-content {
    display: flex;
    flex-direction: column;
    padding: 1.25rem;
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    background-color: var(--color-surface);
    transition: all var(--transition-fast);
    height: 100%;
}

.preset-content .soft-icon {
    margin-bottom: 0.75rem;
}

.preset-content strong {
    font-size: 0.95rem;
    color: var(--text-main);
    margin-bottom: 0.25rem;
}

.preset-content small {
    font-size: 0.8125rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.preset-option:hover .preset-content {
    border-color: var(--border-strong);
    background-color: var(--color-surface-subtle);
}

.preset-option input:checked + .preset-content {
    border-color: var(--color-emerald-500);
    background-color: var(--color-emerald-50);
    box-shadow: 0 0 0 2px var(--color-emerald-500);
}

/* ==========================================================================
   EDITOR, TABS & BASE DE CONHECIMENTO
   ========================================================================== */

.page-tabs {
    display: flex;
    gap: 0.5rem;
    border-bottom: 1px solid var(--border-default);
    margin-bottom: 2rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
}

.page-tabs a {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.85rem 1.25rem;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-muted);
    border-bottom: 2px solid transparent;
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.page-tabs a:hover {
    color: var(--text-main);
}

.page-tabs a.active {
    color: var(--color-emerald-500);
    border-bottom-color: var(--color-emerald-500);
}

.editor-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 2rem;
    align-items: start;
    min-width: 0;
}

.editor-aside {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.knowledge-intro {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    background-color: var(--color-emerald-50);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: var(--radius-md);
    padding: 1rem 1.25rem;
    font-size: 0.875rem;
    color: #065f46;
}

.knowledge-section {
    background-color: var(--color-surface);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
    box-shadow: var(--shadow-xs);
    overflow: hidden;
    transition: border-color var(--transition-fast);
}

.knowledge-section[open] {
    border-color: rgba(16, 185, 129, 0.4);
}

.knowledge-section summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.15rem 1.4rem;
    cursor: pointer;
    list-style: none;
    user-select: none;
}

.knowledge-section summary::-webkit-details-marker {
    display: none;
}

.knowledge-heading {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.knowledge-heading strong {
    display: block;
    font-size: 0.95rem;
    color: var(--text-main);
}

.knowledge-heading small {
    display: block;
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.knowledge-content {
    padding: 1rem 1.4rem 1.4rem;
    border-top: 1px solid var(--border-subtle);
}

.tip-card {
    background: linear-gradient(135deg, #102c2b 0%, #153e3a 100%);
    color: #ffffff;
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    box-shadow: var(--shadow-md);
}

.tip-card .soft-icon {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--color-emerald-400);
    margin-bottom: 1rem;
}

.tip-card h2 {
    font-size: 1.15rem;
    color: #ffffff;
    margin-bottom: 0.4rem;
}

.tip-card p {
    font-size: 0.84375rem;
    color: var(--text-inverse-muted);
    line-height: 1.5;
}

.tip-divider {
    height: 1px;
    background-color: rgba(255, 255, 255, 0.1);
    margin: 1.25rem 0;
}

.knowledge-callout {
    display: block;
    background-color: var(--color-surface);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    transition: all var(--transition-base);
}

.knowledge-callout:hover {
    border-color: var(--color-emerald-500);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.knowledge-callout .soft-icon {
    margin-bottom: 0.85rem;
}

.knowledge-callout h2 {
    font-size: 1.15rem;
    margin-bottom: 0.35rem;
}

.knowledge-callout p {
    font-size: 0.84375rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.knowledge-callout strong {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.875rem;
    color: var(--color-emerald-500);
}

.connection-panel {
    text-align: center;
    padding: 1.75rem;
}

.connection-panel .soft-icon {
    margin: 0 auto 0.75rem;
}

.connection-panel h3 {
    font-size: 1.05rem;
    margin-bottom: 0.4rem;
}

.connection-panel p {
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-top: 0.65rem;
}

/* Versões do Bot */
.version-list {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.version-item {
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    background-color: var(--color-surface-subtle);
    overflow: hidden;
}

.version-item summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.85rem 1.1rem;
    cursor: pointer;
    font-size: 0.875rem;
    list-style: none;
}

.version-item summary::-webkit-details-marker {
    display: none;
}

.version-item small {
    display: block;
    font-size: 0.75rem;
    color: var(--text-subtle);
}

.version-content {
    padding: 1rem 1.1rem;
    background-color: var(--color-surface);
    border-top: 1px solid var(--border-subtle);
    font-size: 0.875rem;
    line-height: 1.6;
    color: var(--text-body);
    white-space: pre-wrap;
    word-break: break-word;
    overflow-wrap: break-word;
}

/* Danger Zone */
.danger-zone {
    border: 1px solid #fecdd3;
    border-radius: var(--radius-md);
    background-color: var(--color-rose-50);
    padding: 1.1rem 1.35rem;
    color: #9f1239;
    font-size: 0.875rem;
}

.danger-zone summary {
    font-weight: 700;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
}

.danger-zone p {
    margin: 0.65rem 0 1rem;
    color: #881337;
}

.confirmation-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8125rem;
    font-weight: 600;
    margin-bottom: 0.85rem;
}

/* ==========================================================================
   PERFIL & SEGURANÇA
   ========================================================================== */

.settings-grid {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 2rem;
    align-items: start;
}

.profile-summary {
    text-align: center;
    padding: 2.25rem 1.5rem;
}

.profile-summary h2 {
    font-size: 1.25rem;
    margin-bottom: 0.2rem;
}

.profile-summary p {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 0.85rem;
}

.profile-hint {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border-subtle);
    font-size: 0.78125rem;
    color: var(--text-subtle);
}

/* ==========================================================================
   TELAS DE AUTENTICAÇÃO (/entrar, /cadastro)
   ========================================================================== */

.auth-body {
    min-height: 100vh;
    background-color: var(--color-canvas);
}

.auth-shell {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 100vh;
}

.auth-story {
    background: linear-gradient(135deg, #091a19 0%, #0f2c2a 40%, #153c39 100%);
    color: #ffffff;
    padding: 3.5rem 4rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
}

.auth-story-content {
    margin: auto 0;
    max-width: 520px;
}

.auth-story h2 {
    font-size: 2.75rem;
    font-weight: 800;
    color: #ffffff;
    line-height: 1.15;
    margin: 1rem 0 1.25rem;
}

.auth-story h2 em {
    font-style: italic;
    color: var(--color-emerald-300);
}

.auth-story p {
    font-size: 1.125rem;
    color: var(--text-inverse-muted);
    line-height: 1.6;
    margin-bottom: 2.5rem;
}

.auth-illustration {
    position: relative;
    width: 280px;
    height: 200px;
    margin-top: 1.5rem;
}

.illustration-orbit {
    position: absolute;
    width: 220px;
    height: 220px;
    border-radius: var(--radius-full);
    border: 1px dashed rgba(52, 211, 153, 0.3);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: ringRotate 25s linear infinite;
}

.illustration-bot {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 4.5rem;
    height: 4.5rem;
    border-radius: var(--radius-xl);
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 12px 30px rgba(16, 185, 129, 0.5);
}

.illustration-bot .icon {
    width: 2.25rem;
    height: 2.25rem;
}

.floating-note {
    position: absolute;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 0.95rem;
    border-radius: var(--radius-full);
    background-color: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 0.78125rem;
    font-weight: 600;
    color: #ffffff;
    box-shadow: var(--shadow-sm);
    white-space: nowrap;
}

.floating-note .soft-icon {
    width: 1.5rem;
    height: 1.5rem;
    border-radius: var(--radius-full);
    background-color: rgba(16, 185, 129, 0.2);
    color: var(--color-emerald-300);
}

.floating-note .soft-icon .icon {
    width: 0.85rem;
    height: 0.85rem;
}

.note-one {
    top: 10px;
    left: -20px;
}

.note-two {
    bottom: 10px;
    right: -20px;
}

.auth-story-footer {
    display: flex;
    justify-content: space-between;
    font-size: 0.8125rem;
    color: var(--text-subtle);
}

.auth-main {
    padding: 3.5rem 4rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background-color: var(--color-canvas);
}

.auth-mobile-brand {
    display: none;
    margin-bottom: 2rem;
}

.auth-form-wrap {
    max-width: 440px;
    width: 100%;
    margin: auto auto;
    background-color: var(--color-surface);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-xl);
    padding: 2.75rem 2.5rem;
    box-shadow: var(--shadow-md);
}

.auth-form-wrap h1 {
    font-size: 1.85rem;
    margin: 0.35rem 0 0.5rem;
}

.auth-description {
    font-size: 0.9375rem;
    color: var(--text-muted);
    margin-bottom: 1.75rem;
}

.auth-form {
    display: flex;
    flex-direction: column;
}

.auth-switch {
    font-size: 0.875rem;
    color: var(--text-muted);
    text-align: center;
    margin-top: 1.5rem;
}

.auth-switch a {
    color: var(--color-emerald-500);
    font-weight: 700;
}

.auth-switch a:hover {
    text-decoration: underline;
}

.auth-footnote {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    font-size: 0.8125rem;
    color: var(--text-subtle);
    margin-top: 1.5rem;
}

/* ==========================================================================
   RESPONSIVIDADE & MOBILE FIRST BREAKPOINTS
   ========================================================================== */

.connections-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.connection-card {
    display: flex;
    min-height: 290px;
    flex-direction: column;
    gap: 0.7rem;
}

.connection-card h2,
.connection-summary-card h2 {
    margin: 0;
    font-size: 1.125rem;
    color: #163b38;
}

.connection-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.connection-avatar {
    display: inline-flex;
    width: 46px;
    height: 46px;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    color: #087c68;
    background: linear-gradient(145deg, #d9f8ee, #effcf8);
    box-shadow: inset 0 0 0 1px rgba(8, 124, 104, 0.1);
}

.connection-avatar .icon {
    width: 24px;
    height: 24px;
}

.whatsapp-empty {
    color: #087c68;
    background: #e1f8f0;
}

.connection-phone {
    margin: 0;
    color: #64748b;
    font-size: 0.875rem;
}

.connection-agent {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem;
    margin-top: auto;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #f8fafc;
}

.connection-agent span:last-child {
    min-width: 0;
}

.connection-agent small,
.connection-agent strong {
    display: block;
}

.connection-agent small {
    margin-bottom: 0.15rem;
    color: #64748b;
    font-size: 0.72rem;
}

.connection-agent strong {
    overflow: hidden;
    color: #334155;
    font-size: 0.84rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.button-full {
    width: 100%;
}

.agent-scope-note {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: #087c68;
    font-size: 0.78rem;
    font-weight: 650;
}

.agent-scope-note .icon {
    width: 16px;
    height: 16px;
}

.connection-callout,
.connection-summary-card {
    display: block;
    padding: 1.5rem;
    border: 1px solid #cfe9e2;
    border-radius: 18px;
    color: inherit;
    background: linear-gradient(145deg, #f4fdf9, #fff);
    text-decoration: none;
}

.connection-callout h2 {
    margin: 0.8rem 0 0.4rem;
    color: #163b38;
    font-size: 1rem;
}

.connection-callout p {
    margin: 0 0 0.8rem;
    color: #64748b;
    font-size: 0.85rem;
    line-height: 1.55;
}

.connection-callout strong {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    color: #087c68;
    font-size: 0.82rem;
}

.connection-summary-card {
    display: grid;
    gap: 0.75rem;
}

.connection-summary-card dl {
    display: grid;
    gap: 0;
    margin: 0.25rem 0 0;
}

.connection-summary-card dl div {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.75rem 0;
    border-top: 1px solid #dceee8;
}

.connection-summary-card dt {
    color: #64748b;
    font-size: 0.8rem;
}

.connection-summary-card dd {
    margin: 0;
    color: #1e3a37;
    font-size: 0.8rem;
    font-weight: 700;
    text-align: right;
}

@media (max-width: 1024px) {
    .connections-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .dashboard-columns {
        grid-template-columns: minmax(0, 1fr);
    }

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

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

    .auth-shell {
        grid-template-columns: 1fr;
    }

    .auth-story {
        display: none;
    }

    .auth-mobile-brand {
        display: block;
    }

    .auth-main {
        padding: 2rem 1.5rem;
    }
}

@media (max-width: 768px) {
    .connections-grid {
        grid-template-columns: 1fr;
    }

    .top-navbar {
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        background-color: #ffffff;
    }

    .navbar-container {
        padding: 0 1rem;
        height: 60px;
    }

    .navbar-nav {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: 280px;
        max-width: 85vw;
        margin: 0;
        background: #ffffff;
        flex-direction: column;
        align-items: stretch;
        padding: 1.5rem 1.25rem;
        gap: 0.5rem;
        z-index: 100;
        transform: translateX(-100%);
        visibility: hidden;
        pointer-events: none;
        transition: transform 0.28s var(--ease-out), visibility 0.28s;
        box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.15);
        border-right: 1px solid #e2e8f0;
        overflow-y: auto;
    }

    .navbar-nav.is-open {
        transform: translateX(0);
        visibility: visible;
        pointer-events: auto;
    }

    .mobile-nav-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin-bottom: 1.25rem;
        padding-bottom: 0.85rem;
        border-bottom: 1px solid #f1f5f9;
    }

    .mobile-nav-user {
        margin-top: auto;
        padding-top: 1.25rem;
        border-top: 1px solid #f1f5f9;
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
    }

    .user-meta-mobile {
        display: flex;
        align-items: center;
        gap: 0.75rem;
        padding: 0.5rem 0.25rem;
        margin-bottom: 0.5rem;
    }

    .user-meta-mobile strong {
        display: block;
        font-size: 0.875rem;
        color: #1e293b;
    }

    .user-meta-mobile small {
        display: block;
        font-size: 0.75rem;
        color: #64748b;
    }

    .user-trigger .user-details,
    .user-trigger .user-chevron {
        display: none;
    }

    .user-trigger {
        padding: 0.2rem;
    }

    .nav-close {
        display: inline-flex;
        color: #64748b;
    }

    .nav-backdrop {
        position: fixed;
        inset: 0;
        background-color: rgba(9, 26, 25, 0.65);
        backdrop-filter: blur(4px);
        -webkit-backdrop-filter: blur(4px);
        z-index: 45;
        display: block;
        animation: fadeIn 0.2s ease-out;
    }

    .nav-backdrop[hidden] {
        display: none !important;
        pointer-events: none !important;
    }

    @keyframes fadeIn {
        from { opacity: 0; }
        to { opacity: 1; }
    }

    .menu-toggle {
        display: inline-flex;
    }

    .user-name {
        display: none;
    }

    .user-link {
        padding: 0.2rem;
    }

    .main-content {
        padding: 1.5rem 1rem 2.5rem;
    }

    .page-tabs {
        margin-bottom: 1.5rem;
    }

    .page-tabs a {
        padding: 0.65rem 0.85rem;
        font-size: 0.84375rem;
        gap: 0.35rem;
    }

    .panel {
        padding: 1.25rem 1rem;
    }

    .welcome-banner {
        flex-direction: column;
        align-items: flex-start;
        padding: 2rem 1.5rem;
    }

    .banner-art {
        display: none;
    }

    .desktop-break {
        display: none;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .preset-grid {
        grid-template-columns: 1fr;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .phone-grid {
        grid-template-columns: 1fr;
    }

    .auth-form-wrap {
        padding: 2rem 1.5rem;
    }
}

/* ==========================================================================
   CONEXÃO WHATSAPP — ESTADOS E QR CODE (E2.1)
   ========================================================================== */

.badge-danger {
    background-color: var(--color-rose-50);
    color: var(--color-rose-600);
    border-color: #fecdd3;
}

.alert-warning {
    background-color: var(--color-amber-50);
    border: 1px solid rgba(245, 158, 11, 0.35);
    color: #92400e;
}

.state-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
    gap: 0.75rem;
    margin: 0;
}

.state-list div {
    padding: 0.75rem 0.9rem;
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    background-color: var(--color-surface-subtle);
}

.state-list dt {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.state-list dd {
    margin: 0.2rem 0 0;
    font-weight: 700;
}

.qr-box {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem 1.5rem;
    margin: 0;
    padding: 1rem;
    border: 1px dashed var(--border-default);
    border-radius: var(--radius-md);
}

.qr-box img {
    width: min(240px, 100%);
    height: auto;
    aspect-ratio: 1;
    image-rendering: pixelated;
    background: #fff;
}

.qr-box figcaption {
    flex: 1 1 14rem;
    font-size: 0.875rem;
}

#whatsapp .form-actions {
    flex-wrap: wrap;
    justify-content: flex-start;
}

/* ==========================================================================
   CONVERSAS (E2.2)
   ========================================================================== */

.conversation-list {
    padding: 0;
    overflow: hidden;
}

.conversation-row {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding: 0.9rem 1.25rem;
    border-bottom: 1px solid var(--border-subtle);
    color: inherit;
    text-decoration: none;
}

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

.conversation-row:hover,
.conversation-row:focus-visible {
    background-color: var(--color-surface-subtle);
}

.conversation-row-main {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-width: 0;
}

.conversation-row-main strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.conversation-row-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.25rem;
    flex: 0 0 auto;
}

.conversation-row small,
.message-meta time {
    color: var(--text-muted);
    font-size: 0.8rem;
}

.message-list {
    list-style: none;
    margin: 0;
    padding: 0 1.25rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.message {
    max-width: min(36rem, 92%);
    padding: 0.7rem 0.9rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-default);
    background-color: var(--color-surface-subtle);
}

.message-out {
    align-self: flex-end;
    background-color: var(--color-emerald-50);
    border-color: rgba(16, 185, 129, 0.25);
}

.message p {
    margin: 0.35rem 0 0;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.message-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 0.6rem;
    align-items: baseline;
    font-size: 0.85rem;
}

.message-type {
    display: inline-block;
    margin-top: 0.3rem;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-muted);
}

.message-status {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.message-status-failed,
.message-status-unknown {
    color: var(--color-rose-600);
    font-weight: 700;
}

.mode-actions {
    flex-wrap: wrap;
    justify-content: flex-start;
}

.handoff-list {
    margin: 0;
    padding: 0 1.25rem 1.25rem 2.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.instance-code,
.instance-code-inline {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    letter-spacing: 0.02em;
}

.instance-code {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    margin: 0.15rem 0 0.5rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.instance-code-inline {
    padding: 0.05rem 0.35rem;
    border-radius: var(--radius-sm, 4px);
    background-color: var(--color-surface-subtle);
    border: 1px solid var(--border-default);
    font-size: 0.85em;
}

/* Pareamento dinâmico do QR Code */
.qr-meta {
    display: block;
    margin-top: 0.45rem;
}

.live-indicator {
    display: inline-block;
    width: 0.6rem;
    height: 0.6rem;
    border-radius: 50%;
    background-color: var(--color-emerald-500);
    animation: live-pulse 1.4s ease-in-out infinite;
    vertical-align: middle;
}

@keyframes live-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.35; transform: scale(0.8); }
}

@media (prefers-reduced-motion: reduce) {
    .live-indicator { animation: none; }
}

/* ==========================================================================
   CENTRAL DE CONVERSAS
   ========================================================================== */

.main-content.main-content-full {
    max-width: none;
    padding: 0;
}

.main-content-full > .alert {
    margin: 0.75rem 1rem 0;
}

.button-sm {
    padding: 0.45rem 0.8rem;
    font-size: 0.8125rem;
    gap: 0.35rem;
}

.button-sm .icon {
    width: 1rem;
    height: 1rem;
}

.inbox {
    display: grid;
    grid-template-columns: minmax(300px, 380px) minmax(0, 1fr);
    height: calc(100dvh - 67px);
    min-height: 480px;
    background-color: var(--color-surface);
    border-top: 1px solid var(--border-subtle);
}

/* Coluna da lista */
.inbox-sidebar {
    display: flex;
    flex-direction: column;
    min-height: 0;
    border-right: 1px solid var(--border-subtle);
    background-color: var(--color-surface);
}

.inbox-sidebar-head {
    padding: 1rem 1rem 0;
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    border-bottom: 1px solid var(--border-subtle);
}

.inbox-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.inbox-title h1 {
    font-size: 1.15rem;
    margin: 0;
}

.inbox-live {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.inbox-filters {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.inbox-search {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0 0.75rem;
    border-radius: var(--radius-full);
    background-color: var(--color-surface-subtle);
    border: 1px solid transparent;
    color: var(--text-muted);
}

.inbox-search:focus-within {
    border-color: var(--border-focus);
    background-color: var(--color-surface);
}

.inbox-search .icon {
    width: 1rem;
    height: 1rem;
    flex: 0 0 auto;
}

.inbox-search input {
    flex: 1;
    min-width: 0;
    border: 0;
    background: transparent;
    padding: 0.55rem 0;
    font: inherit;
    font-size: 0.875rem;
    color: var(--text-main);
    outline: none;
}

.inbox-select {
    width: 100%;
    padding: 0.45rem 0.6rem;
    font: inherit;
    font-size: 0.8125rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-default);
    background-color: var(--color-surface);
    color: var(--text-body);
}

.inbox-tabs {
    display: flex;
    gap: 0.25rem;
    overflow-x: auto;
    scrollbar-width: none;
    margin: 0 -0.25rem;
}

.inbox-tab {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.55rem 0.6rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-muted);
    text-decoration: none;
    white-space: nowrap;
    border-bottom: 2px solid transparent;
}

.inbox-tab:hover {
    color: var(--text-main);
}

.inbox-tab.is-active {
    color: var(--color-primary-600);
    border-bottom-color: var(--color-primary-600);
}

.inbox-count {
    min-width: 1.35rem;
    padding: 0 0.35rem;
    border-radius: var(--radius-full);
    background-color: var(--color-surface-subtle);
    font-size: 0.7rem;
    line-height: 1.35rem;
    text-align: center;
}

.inbox-tab.is-active .inbox-count {
    background-color: var(--color-emerald-50);
}

.inbox-list {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
}

.inbox-item {
    display: flex;
    gap: 0.7rem;
    padding: 0.7rem 1rem;
    color: inherit;
    text-decoration: none;
    border-bottom: 1px solid var(--border-subtle);
    border-left: 3px solid transparent;
}

.inbox-item:hover,
.inbox-item:focus-visible {
    background-color: var(--color-surface-hover);
}

.inbox-item.is-active {
    background-color: var(--color-emerald-50);
    border-left-color: var(--color-primary-600);
}

.inbox-avatar {
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    width: 2.6rem;
    height: 2.6rem;
    border-radius: 50%;
    font-size: 0.85rem;
    font-weight: 700;
    color: #fff;
}

.tone-0 { background-color: #0f766e; }
.tone-1 { background-color: #2563eb; }
.tone-2 { background-color: #7c3aed; }
.tone-3 { background-color: #db2777; }
.tone-4 { background-color: #ea580c; }
.tone-5 { background-color: #0891b2; }
.tone-6 { background-color: #4d7c0f; }
.tone-7 { background-color: #475569; }

.inbox-item-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.inbox-item-top {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.5rem;
}

.inbox-item-name {
    font-size: 0.9rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.inbox-item-time {
    flex: 0 0 auto;
    font-size: 0.72rem;
    color: var(--text-muted);
}

.inbox-pending-dot {
    flex: 0 0 auto;
    width: 0.55rem;
    height: 0.55rem;
    border-radius: 50%;
    background: #b42334;
}

.inbox-item-preview {
    font-size: 0.8125rem;
    color: var(--text-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.inbox-item-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.3rem;
    margin-top: 0.15rem;
}

.inbox-chip {
    display: inline-block;
    max-width: 9rem;
    padding: 0.05rem 0.4rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-default);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.68rem;
    color: var(--text-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: middle;
}

.inbox-mode {
    display: inline-block;
    padding: 0.05rem 0.45rem;
    border-radius: var(--radius-full);
    font-size: 0.68rem;
    font-weight: 700;
}

.inbox-mode-ai { background-color: var(--color-emerald-50); color: #047857; }
.inbox-mode-human { background-color: var(--color-amber-50); color: #b45309; }
.inbox-mode-closed { background-color: var(--color-surface-subtle); color: var(--text-muted); }

.inbox-flag {
    padding: 0.05rem 0.45rem;
    border-radius: var(--radius-full);
    font-size: 0.68rem;
    font-weight: 700;
    background-color: var(--color-rose-600);
    color: #fff;
}

.inbox-flag-soft {
    background-color: var(--color-surface-subtle);
    color: var(--text-muted);
}

.inbox-empty-list {
    padding: 2.5rem 1.5rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.875rem;
}

.inbox-empty-list .icon {
    width: 2rem;
    height: 2rem;
    opacity: 0.5;
}

.inbox-more,
.inbox-older {
    display: block;
    margin: 0.75rem auto;
    padding: 0.4rem 0.9rem;
    border-radius: var(--radius-full);
    border: 1px solid var(--border-default);
    background-color: var(--color-surface);
    font: inherit;
    font-size: 0.8rem;
    color: var(--text-body);
    cursor: pointer;
}

.inbox-more:hover,
.inbox-older:hover {
    background-color: var(--color-surface-hover);
}

/* Coluna da conversa */
.inbox-thread {
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
    background-color: var(--color-canvas);
}

.inbox-placeholder {
    margin: auto;
    max-width: 26rem;
    padding: 2rem;
    text-align: center;
    color: var(--text-muted);
}

.inbox-placeholder h2 {
    margin: 0.75rem 0 0.35rem;
    font-size: 1.1rem;
    color: var(--text-main);
}

.inbox-placeholder-icon {
    display: inline-grid;
    place-items: center;
    width: 4rem;
    height: 4rem;
    border-radius: 50%;
    background-color: var(--color-emerald-50);
    color: var(--color-primary-600);
}

.inbox-placeholder-icon .icon {
    width: 2rem;
    height: 2rem;
}

.thread-head {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 1rem;
    background-color: var(--color-surface);
    border-bottom: 1px solid var(--border-subtle);
}

.thread-back {
    display: none;
}

.thread-contact {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.thread-contact strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.thread-contact small {
    font-size: 0.78rem;
    color: var(--text-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.thread-mode {
    flex: 0 0 auto;
    font-size: 0.75rem;
    padding: 0.2rem 0.6rem;
}

.thread-actions {
    display: flex;
    gap: 0.4rem;
    flex: 0 0 auto;
}

.thread-warning {
    padding: 0.5rem 1rem;
    font-size: 0.8125rem;
    background-color: var(--color-amber-50);
    color: #92400e;
    border-bottom: 1px solid rgba(245, 158, 11, 0.3);
}

.thread-messages {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 1rem clamp(0.75rem, 3vw, 2.5rem);
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.inbox-day {
    display: flex;
    justify-content: center;
    margin: 0.75rem 0 0.4rem;
}

.inbox-day span {
    padding: 0.2rem 0.7rem;
    border-radius: var(--radius-full);
    background-color: var(--color-surface);
    box-shadow: var(--shadow-xs);
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-muted);
}

.bubble-row {
    display: flex;
}

.bubble-out {
    justify-content: flex-end;
}

.bubble {
    max-width: min(34rem, 78%);
    padding: 0.45rem 0.7rem 0.3rem;
    border-radius: 0.9rem;
    background-color: var(--color-surface);
    box-shadow: var(--shadow-xs);
    font-size: 0.9rem;
    line-height: 1.4;
}

.bubble-in .bubble {
    border-top-left-radius: 0.25rem;
}

.bubble-out .bubble {
    border-top-right-radius: 0.25rem;
    background-color: #dcfce7;
}

.author-agent .bubble {
    background-color: #e0f2fe;
}

.author-human_phone .bubble {
    background-color: #fef9c3;
}

.bubble p {
    margin: 0;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.bubble-author {
    display: block;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: 0.1rem;
}

.bubble-type {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-body);
}

.bubble-meta {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 0.3rem;
    margin-top: 0.1rem;
    font-size: 0.68rem;
    color: var(--text-muted);
}

.bubble-tick {
    font-weight: 700;
    letter-spacing: -0.1em;
}

.tick-read { color: #0284c7; }
.tick-failed,
.tick-unknown,
.tick-cancelled { color: var(--color-rose-600); }

.thread-composer {
    padding: 0.6rem 1rem 0.75rem;
    background-color: var(--color-surface);
    border-top: 1px solid var(--border-subtle);
}

.composer-form {
    display: flex;
    align-items: flex-end;
    gap: 0.5rem;
}

.composer-form textarea {
    flex: 1;
    min-width: 0;
    resize: none;
    max-height: 160px;
    padding: 0.6rem 0.9rem;
    border-radius: 1.25rem;
    border: 1px solid var(--border-default);
    background-color: var(--color-surface-subtle);
    font: inherit;
    font-size: 0.9rem;
    line-height: 1.4;
    color: var(--text-main);
}

.composer-form textarea:focus {
    outline: none;
    border-color: var(--border-focus);
    background-color: var(--color-surface);
}

.composer-send {
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    width: 2.6rem;
    height: 2.6rem;
    border: 0;
    border-radius: 50%;
    background-color: var(--color-primary-600);
    color: #fff;
    cursor: pointer;
}

.composer-send:hover {
    background-color: var(--color-primary-700);
}

.composer-send:disabled {
    opacity: 0.6;
    cursor: wait;
}

.composer-send .icon {
    width: 1.15rem;
    height: 1.15rem;
}

.composer-error {
    margin: 0.4rem 0 0;
    font-size: 0.8rem;
    color: var(--color-rose-600);
}

.composer-takeover {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
    font-size: 0.85rem;
    color: var(--text-muted);
}

@media (max-width: 1100px) {
    .thread-actions .button-sm {
        padding: 0.45rem 0.55rem;
    }

    .thread-mode {
        display: none;
    }
}

@media (max-width: 820px) {
    .inbox {
        grid-template-columns: 1fr;
    }

    .inbox.has-selection .inbox-sidebar {
        display: none;
    }

    .inbox:not(.has-selection) .inbox-thread {
        display: none;
    }

    .thread-back {
        display: inline-grid;
    }

    .thread-head {
        flex-wrap: wrap;
        gap: 0.5rem;
        padding: 0.5rem 0.75rem;
    }

    .thread-actions {
        width: 100%;
    }

    .thread-actions .button-sm {
        flex: 1;
        justify-content: center;
    }

    .bubble {
        max-width: 88%;
    }
}

@media (max-width: 768px) {
    .inbox {
        height: calc(100dvh - 61px);
    }
}


.bubble-transcript {
    font-style: italic;
    color: var(--text-body);
}

.toggle-option {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
}

.toggle-option input {
    width: 1.15rem;
    height: 1.15rem;
    margin-top: 0.15rem;
    accent-color: var(--color-primary-600);
    flex: 0 0 auto;
}

.toggle-option span {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.toggle-option small {
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* ==========================================================================
   ALERTA DE TRANSFERÊNCIA PARA HUMANO
   ========================================================================== */

.alert-toggle .bell-off,
.alert-toggle.is-muted .bell-on {
    display: none;
}

.alert-toggle.is-muted .bell-off {
    display: inline-block;
    color: var(--text-muted);
}

.alert-stack {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    z-index: 200;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    width: min(22rem, calc(100vw - 2rem));
    pointer-events: none;
}

.handoff-toast {
    pointer-events: auto;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.85rem 1rem;
    border-radius: var(--radius-md);
    border-left: 4px solid var(--color-amber-500);
    background-color: var(--color-surface);
    box-shadow: var(--shadow-lg);
    font-size: 0.875rem;
    animation: toast-in 0.25s var(--ease-out, ease-out);
}

.handoff-toast span {
    color: var(--text-body);
}

.handoff-toast small {
    color: var(--text-muted);
}

.handoff-toast-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.4rem;
}

@keyframes toast-in {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
    .handoff-toast { animation: none; }
}

/* ==========================================================================
   AGENDA (E4)
   ========================================================================== */

.heading-actions,
.card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.card-actions .button {
    flex: 1;
    justify-content: center;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
    gap: 1rem;
}

.field-wide {
    grid-column: 1 / -1;
}

.inline-field,
.inline-check {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.85rem;
    color: var(--text-body);
    white-space: nowrap;
}

.inline-field input[type="number"] {
    width: 4.5rem;
}

.inline-field input[type="text"] {
    width: 6rem;
}

.week-editor {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.week-day {
    display: grid;
    grid-template-columns: 9rem 1fr;
    gap: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-subtle);
}

.week-day-head {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.4rem;
}

.week-periods,
.service-row,
.period-row,
.exception-row,
.agent-link-row,
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0.75rem;
}

.week-periods {
    flex-direction: column;
    align-items: stretch;
}

.service-row input[type="text"],
.agent-link-row input[type="text"] {
    flex: 1 1 12rem;
    min-width: 0;
}

.service-row input[type="color"] {
    width: 2.25rem;
    height: 2.25rem;
    padding: 0.1rem;
}

.service-row,
.exception-row {
    padding-bottom: 0.6rem;
    border-bottom: 1px solid var(--border-subtle);
}

.service-row-new {
    border-bottom: 0;
    padding: 0.75rem;
    border-radius: var(--radius-md);
    background-color: var(--color-surface-subtle);
}

.exception-row {
    justify-content: space-between;
}

.filter-bar {
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
}

.appointment-row {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding: 0.75rem 1.25rem;
    border-top: 1px solid var(--border-subtle);
    color: inherit;
    text-decoration: none;
}

.appointment-row:hover {
    background-color: var(--color-surface-hover);
}

.appointment-time {
    display: flex;
    flex-direction: column;
    min-width: 3.5rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.appointment-time small,
.appointment-main small {
    font-weight: 400;
    color: var(--text-muted);
    font-size: 0.78rem;
}

.appointment-color {
    width: 4px;
    align-self: stretch;
    border-radius: 2px;
}

.appointment-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.slot-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.slot-button {
    padding: 0.45rem 0.75rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-default);
    background-color: var(--color-surface);
    font: inherit;
    font-variant-numeric: tabular-nums;
    cursor: pointer;
}

.slot-button:hover {
    border-color: var(--color-primary-600);
}

.slot-button.is-selected {
    background-color: var(--color-primary-600);
    border-color: var(--color-primary-600);
    color: #fff;
}

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

    .week-day-head {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
}

/* ==========================================================================
   CONTROLES COMPACTOS E PÁGINA DE AGENDAMENTOS
   A regra global de campos usa :where() (especificidade baixa), então estes
   estilos de contêiner se aplicam normalmente.
   ========================================================================== */

:is(.toolbar, .inline-field, .service-row, .exception-row, .agent-link-row, .period-row) input:not([type="checkbox"]):not([type="radio"]):not([type="color"]) {
    width: auto;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    line-height: 1.4;
}

:is(.toolbar, .inline-field, .service-row, .exception-row, .agent-link-row, .period-row) select:not([multiple]):not([size]) {
    width: auto;
    padding: 0.5rem 2.1rem 0.5rem 0.75rem;
    font-size: 0.875rem;
    line-height: 1.4;
    background-position: right 0.6rem center;
}

:is(.service-row, .agent-link-row) input[type="text"] {
    flex: 1 1 12rem;
    min-width: 8rem;
}

:is(.inline-field, .period-row) input[type="number"] {
    width: 5rem;
}

.inline-field input[type="text"] {
    width: 6.5rem;
}

.service-row input[type="color"] {
    width: 2.4rem;
    height: 2.4rem;
    padding: 0.2rem;
    border: 1px solid var(--border-default);
    border-radius: var(--radius-sm);
    background-color: var(--color-surface);
    cursor: pointer;
}

/* Seta dos selects (a aparência nativa é removida pela regra global). */
select:not([multiple]):not([size]) {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.85rem center;
    background-size: 1rem;
    padding-right: 2.6rem;
}

.navbar-nav {
    gap: 0.15rem;
    margin-left: 1.75rem;
}

.nav-item {
    white-space: nowrap;
    padding: 0.5rem 0.75rem;
}

@media (max-width: 1280px) and (min-width: 1025px) {
    .navbar-nav { margin-left: 1rem; }
    .nav-item { padding: 0.5rem 0.55rem; gap: 0.4rem; }
    .nav-item .icon { display: none; }
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.stat-card {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    padding: 1rem 1.25rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-subtle);
    background-color: var(--color-surface);
    box-shadow: var(--shadow-xs);
}

.stat-card-attention {
    border-color: rgba(245, 158, 11, 0.45);
    background-color: var(--color-amber-50);
}

.stat-label {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.stat-value {
    font-size: 1.75rem;
    line-height: 1.2;
    color: var(--text-main);
    font-variant-numeric: tabular-nums;
}

.stat-value-sm {
    font-size: 1.15rem;
}

.stat-card small {
    color: var(--text-muted);
    font-size: 0.8rem;
}

.toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 0.75rem 1.25rem;
    padding: 0.85rem 1rem;
    margin-bottom: 1rem;
}

.chip-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.chip {
    padding: 0.4rem 0.8rem;
    border-radius: var(--radius-full);
    border: 1px solid var(--border-default);
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-body);
    text-decoration: none;
    white-space: nowrap;
}

.chip:hover {
    border-color: var(--color-primary-600);
    color: var(--color-primary-600);
}

.chip.is-active {
    background-color: var(--color-primary-600);
    border-color: var(--color-primary-600);
    color: #fff;
}

.toolbar-fields {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 0.6rem;
}

.toolbar-field {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.toolbar-field select {
    min-width: 10rem;
}

.toolbar-submit {
    padding: 0.5rem 1.2rem;
    min-height: 2.45rem;
}

.list-summary {
    margin: 0 0 0.5rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.appointment-day {
    padding: 0;
    overflow: hidden;
}

.appointment-day-head {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.85rem 1.25rem;
    background-color: var(--color-surface-subtle);
}

.appointment-day-head h2 {
    margin: 0;
    font-size: 1rem;
}

.appointment-day-head small {
    color: var(--text-muted);
    font-size: 0.8rem;
}

.day-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 2.9rem;
    height: 2.9rem;
    border-radius: var(--radius-md);
    background-color: var(--color-surface);
    border: 1px solid var(--border-default);
    line-height: 1;
}

.day-badge strong {
    font-size: 1.1rem;
}

.day-badge small {
    font-size: 0.62rem;
    font-weight: 700;
    color: var(--color-primary-600);
    margin-top: 0.15rem;
}

.source-chip {
    flex: 0 0 auto;
    padding: 0.15rem 0.55rem;
    border-radius: var(--radius-full);
    font-size: 0.72rem;
    font-weight: 600;
    background-color: var(--color-surface-subtle);
    color: var(--text-muted);
}

.source-agent {
    background-color: #e0f2fe;
    color: #0369a1;
}

.row-chevron {
    width: 1rem;
    height: 1rem;
    color: var(--text-subtle, #94a3b8);
}

.empty-inline {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
}

.empty-inline > .icon {
    width: 2rem;
    height: 2rem;
    color: var(--color-primary-600);
}

.empty-inline div {
    flex: 1 1 16rem;
    display: flex;
    flex-direction: column;
}

.empty-inline small {
    color: var(--text-muted);
}

.onboarding {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding: 2rem;
}

.onboarding-intro {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.onboarding-intro h2 {
    margin: 0 0 0.25rem;
}

.onboarding-intro p {
    margin: 0;
    color: var(--text-muted);
}

.onboarding-steps {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
    gap: 1rem;
}

.onboarding-steps li {
    display: flex;
    gap: 0.75rem;
    padding: 1rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-subtle);
    background-color: var(--color-surface-subtle);
}

.onboarding-steps small {
    display: block;
    margin-top: 0.2rem;
    color: var(--text-muted);
    font-size: 0.82rem;
}

.step-number {
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    width: 1.8rem;
    height: 1.8rem;
    border-radius: 50%;
    background-color: var(--color-primary-600);
    color: #fff;
    font-weight: 700;
    font-size: 0.85rem;
}

@media (max-width: 640px) {
    .toolbar-fields,
    .toolbar-field,
    .toolbar-field select,
    .toolbar-submit {
        width: 100%;
    }

    .appointment-row .source-chip,
    .row-chevron {
        display: none;
    }
}

.inbox-tabs {
    gap: 0;
}

.inbox-tab {
    padding: 0.55rem 0.45rem;
    gap: 0.3rem;
    font-size: 0.8rem;
}

.inbox-tab {
    flex: 1 1 auto;
    justify-content: center;
    padding: 0.55rem 0.2rem;
}

.inbox-tab .inbox-count {
    min-width: 1.15rem;
    padding: 0 0.25rem;
}

/* ==========================================================================
   CALENDÁRIO DE AGENDAMENTOS
   ========================================================================== */

.segmented {
    display: inline-flex;
    padding: 0.2rem;
    border-radius: var(--radius-md);
    background-color: var(--color-surface-subtle);
    border: 1px solid var(--border-default);
}

.segmented-item {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.45rem 0.85rem;
    border-radius: calc(var(--radius-md) - 0.15rem);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    text-decoration: none;
    white-space: nowrap;
}

.segmented-item .icon {
    width: 1rem;
    height: 1rem;
}

.segmented-item.is-active {
    background-color: var(--color-surface);
    color: var(--color-primary-600);
    box-shadow: var(--shadow-xs);
}

.segmented-sm .segmented-item {
    padding: 0.35rem 0.7rem;
    font-size: 0.8rem;
}

.calendar {
    padding: 0;
    overflow: hidden;
}

.calendar-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem 1rem;
    padding: 0.9rem 1.1rem;
    border-bottom: 1px solid var(--border-subtle);
}

.calendar-nav {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.calendar-nav h2 {
    margin: 0 0.5rem;
    font-size: 1.2rem;
}

.calendar-nav .icon-button .icon {
    width: 1rem;
    height: 1rem;
}

.calendar-total {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.toolbar-inline {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.toolbar-inline select:not([multiple]):not([size]) {
    width: auto;
    padding: 0.45rem 2.1rem 0.45rem 0.75rem;
    font-size: 0.85rem;
    background-position: right 0.6rem center;
}

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

.month-weekday {
    padding: 0.55rem 0.6rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-subtle);
    background-color: var(--color-surface-subtle);
}

.month-cell {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    min-height: 7.5rem;
    padding: 0.4rem;
    border-right: 1px solid var(--border-subtle);
    border-bottom: 1px solid var(--border-subtle);
    min-width: 0;
}

.month-cell:nth-child(7n) {
    border-right: 0;
}

.month-cell.is-outside {
    background-color: var(--color-surface-subtle);
}

.month-cell.is-outside .month-day {
    color: var(--text-subtle, #94a3b8);
}

.month-cell-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.month-day {
    display: inline-grid;
    place-items: center;
    min-width: 1.75rem;
    height: 1.75rem;
    padding: 0 0.3rem;
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-main);
    text-decoration: none;
}

.month-day:hover {
    background-color: var(--color-surface-hover);
}

.month-cell.is-today .month-day {
    background-color: var(--color-primary-600);
    color: #fff;
}

.month-add {
    display: grid;
    place-items: center;
    width: 1.5rem;
    height: 1.5rem;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.month-add .icon {
    width: 0.95rem;
    height: 0.95rem;
}

.month-cell:hover .month-add,
.month-add:focus-visible {
    opacity: 1;
}

.month-add:hover {
    background-color: var(--color-emerald-50);
    color: var(--color-primary-600);
}

.cal-chip {
    display: flex;
    align-items: baseline;
    gap: 0.3rem;
    padding: 0.15rem 0.4rem;
    border-radius: 0.35rem;
    border-left: 3px solid var(--chip-color);
    background-color: color-mix(in srgb, var(--chip-color) 12%, white);
    font-size: 0.75rem;
    color: var(--text-main);
    text-decoration: none;
    min-width: 0;
}

.cal-chip:hover {
    background-color: color-mix(in srgb, var(--chip-color) 22%, white);
}

.cal-chip-time {
    flex: 0 0 auto;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.cal-chip-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.status-pending {
    border-left-style: dashed;
    background-image: repeating-linear-gradient(135deg, transparent 0 6px, rgba(245, 158, 11, 0.12) 6px 9px);
}

.status-cancelled,
.status-no_show {
    opacity: 0.55;
    text-decoration: line-through;
}

.cal-more {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--color-primary-600);
    text-decoration: none;
    padding-left: 0.3rem;
}

.month-dot {
    display: none;
}

.week-scroll {
    overflow-x: auto;
}

.week-grid {
    --hour-height: 3.5rem;
    display: grid;
    grid-template-columns: 3.75rem repeat(7, minmax(7.5rem, 1fr));
    grid-template-rows: auto calc(var(--hours) * var(--hour-height));
    min-width: 58rem;
}

.week-corner,
.week-head {
    border-bottom: 1px solid var(--border-subtle);
    background-color: var(--color-surface-subtle);
}

.week-head {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.45rem 0;
    border-left: 1px solid var(--border-subtle);
    color: var(--text-main);
    text-decoration: none;
}

.week-head small {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
}

.week-head strong {
    display: grid;
    place-items: center;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
}

.week-head.is-today strong {
    background-color: var(--color-primary-600);
    color: #fff;
}

.week-hours {
    display: grid;
    grid-template-rows: repeat(var(--hours), var(--hour-height));
}

.week-hours span {
    padding: 0.15rem 0.4rem 0 0;
    text-align: right;
    font-size: 0.7rem;
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
    transform: translateY(-0.45rem);
}

.week-day-col {
    position: relative;
    border-left: 1px solid var(--border-subtle);
    background-image: repeating-linear-gradient(to bottom, transparent 0, transparent calc(var(--hour-height) - 1px), var(--border-subtle) calc(var(--hour-height) - 1px), var(--border-subtle) var(--hour-height));
}

.week-day-col.is-today {
    background-color: color-mix(in srgb, var(--color-emerald-50) 60%, transparent);
}

.week-add {
    position: absolute;
    inset: 0;
}

.week-add:hover {
    background-color: rgba(16, 185, 129, 0.04);
}

.week-event {
    position: absolute;
    z-index: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    margin: 1px 2px;
    padding: 0.2rem 0.4rem;
    border-radius: 0.4rem;
    border-left: 3px solid var(--chip-color);
    background-color: color-mix(in srgb, var(--chip-color) 16%, white);
    box-shadow: var(--shadow-xs);
    font-size: 0.72rem;
    line-height: 1.25;
    color: var(--text-main);
    text-decoration: none;
}

.week-event:hover {
    z-index: 2;
    background-color: color-mix(in srgb, var(--chip-color) 26%, white);
}

.week-event strong,
.week-event small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.week-event small {
    color: var(--text-muted);
}

.calendar-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.25rem;
    padding: 0.75rem 1.1rem;
    border-top: 1px solid var(--border-subtle);
    font-size: 0.78rem;
    color: var(--text-body);
}

.calendar-legend span {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.legend-swatch {
    display: inline-block;
    width: 1.1rem;
    height: 0.75rem;
    border-radius: 0.2rem;
    border-left: 3px solid var(--color-primary-600);
    background-color: var(--color-emerald-50);
}

.legend-swatch.is-pending {
    border-left-style: dashed;
    background-image: repeating-linear-gradient(135deg, transparent 0 4px, rgba(245, 158, 11, 0.25) 4px 6px);
}

.legend-swatch.is-cancelled {
    opacity: 0.5;
}

@media (max-width: 760px) {
    .month-cell {
        min-height: 3.6rem;
        align-items: center;
        padding: 0.3rem 0.1rem;
    }

    .month-cell .cal-chip,
    .month-cell .cal-more,
    .month-add {
        display: none;
    }

    .month-dot {
        display: grid;
        place-items: center;
        min-width: 1.3rem;
        height: 1.3rem;
        padding: 0 0.25rem;
        border-radius: var(--radius-full);
        background-color: var(--color-emerald-50);
        color: var(--color-primary-600);
        font-size: 0.7rem;
        font-weight: 700;
    }

    .calendar-nav h2 {
        width: 100%;
        margin: 0.25rem 0 0;
        order: 5;
    }
}

.week-hours span:first-child {
    transform: none;
}

/* Cabeçalho de página: o texto encolhe e as ações ficam à direita do título. */
.page-heading > div:first-child {
    flex: 1 1 20rem;
    min-width: 0;
}

.page-heading > .heading-actions,
.page-heading > .button,
.page-heading > .badge {
    flex: 0 0 auto;
}

.readiness {
    margin-bottom: 1.25rem;
}

.readiness ul {
    margin: 0.35rem 0 0 1.1rem;
}

.readiness a {
    color: inherit;
    font-weight: 700;
}

.readiness-line {
    margin: 0.2rem 0 0.4rem;
    font-size: 0.82rem;
    font-weight: 600;
}

.readiness-line.is-ready {
    color: var(--color-primary-600);
}

.readiness-line.is-pending {
    color: #b45309;
}

/* Cabeçalho de painel: o texto encolhe e o número da seção fica sempre à direita. */
.panel-heading > div:first-child {
    flex: 1 1 0;
    min-width: 12rem;
}

.panel-heading > .section-number {
    flex: 0 0 auto;
}

/* Seletor de agentes da agenda */
.agent-picker {
    display: flex;
    flex-direction: column;
}

.agent-picker-head,
.agent-picker-row {
    display: grid;
    grid-template-columns: minmax(12rem, 1fr) minmax(12rem, 1fr) minmax(14rem, 1.3fr);
    gap: 1rem 1.5rem;
}

.agent-picker-head {
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-subtle);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.agent-picker-row {
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--border-subtle);
}

.agent-picker-cell {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    min-width: 0;
}

.agent-picker-cell small {
    font-size: 0.78rem;
    color: var(--text-muted);
    line-height: 1.35;
}

.agent-picker-cell input[type="text"] {
    width: 100%;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
}

.agent-picker-row.is-off .agent-picker-cell:not(:first-child) {
    opacity: 0.45;
}

@media (max-width: 760px) {
    .agent-picker-head {
        display: none;
    }

    .agent-picker-head,
    .agent-picker-row {
        grid-template-columns: 1fr;
        gap: 0.6rem;
    }
}

/* Lembretes automáticos */
.reminders {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.reminders-body {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(16rem, 1fr);
    gap: 1.25rem;
    align-items: start;
}

.reminders-body.is-off {
    opacity: 0.45;
}

.reminder-preview {
    padding: 1rem;
    border-radius: var(--radius-md);
    background-color: #e7f8ee;
    border: 1px solid rgba(16, 185, 129, 0.25);
}

.reminder-preview p {
    margin: 0.4rem 0 0;
    padding: 0.6rem 0.75rem;
    border-radius: 0.6rem 0.6rem 0.6rem 0.15rem;
    background-color: #fff;
    box-shadow: var(--shadow-xs);
    font-size: 0.875rem;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.variable-chip {
    margin: 0.15rem 0.1rem 0 0;
    padding: 0.1rem 0.45rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-default);
    background-color: var(--color-surface-subtle);
    font: inherit;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.75rem;
    cursor: pointer;
}

.variable-chip:hover {
    border-color: var(--color-primary-600);
    color: var(--color-primary-600);
}

@media (max-width: 900px) {
    .reminders-body {
        grid-template-columns: 1fr;
    }
}

/* E4.2 — página pública (configuração) e links rastreáveis */
.public-page { display: flex; flex-direction: column; gap: 1rem; }
.public-url { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; padding: 0.7rem 0.9rem; border: 1px solid var(--color-emerald-100); background: var(--color-emerald-50); border-radius: var(--radius-md); }
.public-url a { flex: 1 1 14rem; min-width: 0; overflow-wrap: anywhere; font-weight: 600; color: var(--color-primary-700); }
.public-url-new { margin-bottom: 1rem; }
.input-prefix { display: flex; align-items: stretch; border: 1px solid var(--border-default); border-radius: var(--radius-sm); overflow: hidden; background: var(--color-surface); }
.input-prefix span { display: flex; align-items: center; padding: 0 0.75rem; background: var(--color-canvas); border-right: 1px solid var(--border-default); color: var(--text-muted); font-size: 0.85rem; white-space: nowrap; }
.public-page input[type="color"] { width: 4.5rem; height: 2.75rem; padding: 0.2rem; border: 1px solid var(--border-default); border-radius: var(--radius-sm); background-color: var(--color-surface); cursor: pointer; }
.input-prefix input { flex: 1; min-width: 6rem; border: 0 !important; border-radius: 0 !important; box-shadow: none !important; }
.field-error { color: var(--color-rose-600) !important; }
.field-hint { margin: 0; color: var(--color-amber-500); font-size: 0.85rem; }
.toolbar-title { align-self: center; font-size: 0.9rem; color: var(--text-main); }
.chip-count { margin-left: 0.25rem; opacity: 0.7; font-variant-numeric: tabular-nums; }
.link-list { padding: 0; }
.link-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; padding: 0.85rem 1.1rem; border-bottom: 1px solid var(--border-subtle); }
.link-row:last-child { border-bottom: 0; }
.avatar-initials { display: grid; place-items: center; flex-shrink: 0; width: 2.4rem; height: 2.4rem; border-radius: 12px; background: #dcfce7; color: #16a34a; font-weight: 700; }
.link-main { display: flex; flex-direction: column; flex: 1 1 14rem; min-width: 0; }
.link-main small, .link-activity small { color: var(--text-muted); font-size: 0.8rem; }
.link-activity { flex: 0 1 13rem; }
.segment-chip, .recency-chip { display: inline-flex; padding: 0.2rem 0.6rem; border-radius: var(--radius-full); font-size: 0.75rem; font-weight: 600; white-space: nowrap; }
.segment-not_opened { background: #f1f5f9; color: #475569; }
.segment-opened { background: var(--color-amber-100); color: #92400e; }
.segment-booked { background: var(--color-emerald-100); color: #065f46; }
.recency-chip { background: transparent; border: 1px solid var(--border-default); color: var(--text-muted); }
.recency-active { border-color: var(--color-emerald-300); color: #047857; }
.recency-dormant { opacity: 0.7; }
@media (max-width: 640px) { .link-activity { flex-basis: 100%; padding-left: 3.15rem; } }

/* Aviso de reagendamento */
.reschedule-notice { display: flex; flex-direction: column; gap: 0.6rem; margin-top: 1.25rem; padding-top: 1.1rem; border-top: 1px solid var(--border-subtle); }
.reschedule-template summary { cursor: pointer; font-size: 0.875rem; font-weight: 600; color: var(--color-primary-600); }
.reschedule-template .field { margin-top: 0.6rem; }
.reschedule-template code { font-size: 0.75rem; padding: 0.05rem 0.35rem; border-radius: 6px; background: var(--color-canvas); }

/* Etiquetas e termômetro (Quente/Morno/Frio) */
:root { --temp-hot: #EA580C; --temp-hot-bg: #FFF1E7; --temp-warm: #CA8A04; --temp-warm-bg: #FEF9C3; --temp-cold: #2563EB; --temp-cold-bg: #E0ECFF; }
.temp-dot { display: inline-block; flex: 0 0 auto; width: 0.55rem; height: 0.55rem; border-radius: 50%; background: var(--text-subtle); }
.temp-dot.temp-hot { background: var(--temp-hot); box-shadow: 0 0 0 3px var(--temp-hot-bg); }
.temp-dot.temp-warm { background: var(--temp-warm); box-shadow: 0 0 0 3px var(--temp-warm-bg); }
.temp-dot.temp-cold { background: var(--temp-cold); box-shadow: 0 0 0 3px var(--temp-cold-bg); }
.temp-pill { display: inline-flex; align-items: center; padding: 0.05rem 0.5rem; border-radius: var(--radius-full); font-size: 0.7rem; font-weight: 700; white-space: nowrap; }
.temp-pill.temp-hot { background: var(--temp-hot-bg); color: #9A3412; }
.temp-pill.temp-warm { background: var(--temp-warm-bg); color: #854D0E; }
.temp-pill.temp-cold { background: var(--temp-cold-bg); color: #1E40AF; }
.temp-pill.temp-none { background: var(--color-canvas); color: var(--text-muted); font-weight: 600; }
.tag-chip { --tag: #64748B; display: inline-flex; align-items: center; max-width: 11rem; padding: 0.05rem 0.5rem; border-radius: var(--radius-full); border: 1px solid color-mix(in srgb, var(--tag) 35%, transparent); background: color-mix(in srgb, var(--tag) 12%, white); color: color-mix(in srgb, var(--tag) 75%, black); font-size: 0.7rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tag-chip-more { --tag: #64748B; }
.inbox-item-right { display: inline-flex; align-items: center; gap: 0.45rem; flex: 0 0 auto; }
.inbox-item-tags { display: flex; flex-wrap: wrap; gap: 0.25rem; margin-top: 0.25rem; }
.temp-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem; }
.temp-filter { display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.25rem 0.6rem; border: 1px solid var(--border-default); border-radius: var(--radius-full); font-size: 0.75rem; color: var(--text-body); text-decoration: none; background: var(--color-surface); }
.temp-filter strong { font-variant-numeric: tabular-nums; }
.temp-filter:hover { border-color: var(--border-strong); }
.temp-filter.is-active.temp-hot { background: var(--temp-hot-bg); border-color: var(--temp-hot); }
.temp-filter.is-active.temp-warm { background: var(--temp-warm-bg); border-color: var(--temp-warm); }
.temp-filter.is-active.temp-cold { background: var(--temp-cold-bg); border-color: var(--temp-cold); }
.temp-filters-manage { margin-left: auto; font-size: 0.75rem; font-weight: 600; color: var(--color-primary-600); text-decoration: none; }
.temp-filters-manage:hover { text-decoration: underline; }
.thread-tags { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem; padding: 0.45rem 1rem; background: var(--color-surface); border-bottom: 1px solid var(--border-subtle); }
.tag-editor { margin-left: auto; }
.tag-editor-toggle { display: inline-flex; align-items: center; gap: 0.3rem; padding: 0.2rem 0.6rem; border: 1px dashed var(--border-strong); border-radius: var(--radius-full); font-size: 0.75rem; font-weight: 600; color: var(--text-body); cursor: pointer; list-style: none; }
.tag-editor-toggle::-webkit-details-marker { display: none; }
.tag-editor-toggle .icon { width: 0.85rem; height: 0.85rem; }
.tag-editor[open] .tag-editor-toggle { border-style: solid; border-color: var(--color-emerald-400); background: var(--color-emerald-50); }
.tag-editor-panel { position: absolute; right: 1rem; top: calc(100% + 0.25rem); z-index: 30; width: min(22rem, calc(100vw - 2rem)); max-height: 70vh; overflow-y: auto; display: flex; flex-direction: column; gap: 0.75rem; padding: 0.9rem; background: var(--color-surface); border: 1px solid var(--border-default); border-radius: var(--radius-md); box-shadow: 0 12px 32px rgba(16, 44, 43, 0.14); }
.tag-editor-panel fieldset { border: 0; margin: 0; padding: 0; }
.tag-editor-panel legend { margin-bottom: 0.4rem; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-muted); }
.tag-editor-temps { display: flex; flex-wrap: wrap; gap: 0.35rem 0.9rem; font-size: 0.8125rem; }
.tag-editor-temps label { display: inline-flex; align-items: center; gap: 0.35rem; cursor: pointer; }
.tag-editor-list { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.tag-editor-item { display: inline-flex; align-items: center; gap: 0.3rem; cursor: pointer; }
.tag-editor-item .tag-chip { max-width: 14rem; font-size: 0.75rem; }
.tag-editor-hint { margin: 0; font-size: 0.75rem; color: var(--text-muted); }
.tag-editor-actions { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; font-size: 0.8rem; }
.tag-editor-actions a { color: var(--color-primary-600); font-weight: 600; }
.tags-auto { display: flex; flex-direction: column; gap: 0.9rem; }
.temp-legend { display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; font-size: 0.8125rem; color: var(--text-muted); }
.temp-legend > span { display: inline-flex; align-items: center; gap: 0.4rem; }
.tag-catalog { display: flex; flex-direction: column; }
.tag-row { border-top: 1px solid var(--border-subtle); }
.tag-row summary { display: grid; grid-template-columns: minmax(8rem, 12rem) 1fr auto auto; align-items: center; gap: 0.9rem; padding: 0.75rem 1.5rem; cursor: pointer; list-style: none; }
.tag-row summary::-webkit-details-marker { display: none; }
.tag-row summary:hover { background: var(--color-canvas); }
.tag-row .tag-chip { justify-self: start; max-width: 100%; font-size: 0.75rem; }
.tag-row-desc { font-size: 0.8125rem; color: var(--text-body); }
.tag-row-meta { font-size: 0.75rem; color: var(--text-muted); white-space: nowrap; }
.tag-row-edit { font-size: 0.75rem; font-weight: 600; color: var(--color-primary-600); }
.tag-row.is-inactive summary { opacity: 0.55; }
.tag-row-form { padding: 0.25rem 1.5rem 0.75rem; }
.tag-row-delete { padding: 0 1.5rem 1rem; }
.tag-color-field input[type="color"] { width: 4.5rem; height: 2.75rem; padding: 0.2rem; border: 1px solid var(--border-default); border-radius: var(--radius-sm); background: var(--color-surface); cursor: pointer; }
.field-note { margin: 0; font-size: 0.8rem; color: var(--text-muted); }
.link-danger { padding: 0; border: 0; background: none; color: var(--color-rose-600); font: inherit; font-size: 0.8rem; font-weight: 600; cursor: pointer; }
.link-danger:hover { text-decoration: underline; }
.tag-packs { list-style: none; margin: 0; padding: 0 1.5rem 1.25rem; display: flex; flex-direction: column; gap: 0.9rem; }
.tag-packs li { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.tag-pack-chips { display: flex; flex-wrap: wrap; gap: 0.3rem; margin-top: 0.35rem; }
.tag-pack-done { display: inline-flex; align-items: center; gap: 0.3rem; font-size: 0.8rem; color: var(--color-emerald-500); font-weight: 600; white-space: nowrap; }
.tag-pack-done .icon { width: 0.9rem; height: 0.9rem; }
@media (max-width: 720px) { .tag-row summary { grid-template-columns: 1fr auto; } .tag-row-desc { grid-column: 1 / -1; } .tag-row-meta { display: none; } }

/* Central: busca + botão Filtros com painel recolhível */
.inbox-search-row { display: flex; align-items: center; gap: 0.5rem; }
.inbox-search-row .inbox-search { flex: 1; min-width: 0; }
.inbox-filter-toggle { position: relative; display: inline-flex; align-items: center; gap: 0.35rem; flex: 0 0 auto; padding: 0.5rem 0.75rem; border: 1px solid var(--border-default); border-radius: var(--radius-full); background: var(--color-surface); color: var(--text-body); font: inherit; font-size: 0.8125rem; font-weight: 600; cursor: pointer; }
.inbox-filter-toggle .icon { width: 0.95rem; height: 0.95rem; }
.inbox-filter-toggle:hover { border-color: var(--border-strong); }
.inbox-filter-toggle.is-open, .inbox-filter-toggle.has-active { border-color: var(--color-emerald-400); background: var(--color-emerald-50); color: var(--color-primary-700); }
.inbox-filter-count { display: inline-grid; place-items: center; min-width: 1.15rem; height: 1.15rem; padding: 0 0.3rem; border-radius: var(--radius-full); background: var(--color-emerald-500); color: #fff; font-size: 0.68rem; font-weight: 700; }
.inbox-filter-panel { display: flex; flex-direction: column; gap: 0.7rem; padding: 0.75rem; border: 1px solid var(--border-subtle); border-radius: var(--radius-md); background: var(--color-canvas); }
.inbox-filter-panel[hidden] { display: none; }
.inbox-filter-group { display: flex; flex-direction: column; gap: 0.35rem; }
.inbox-filter-label { font-size: 0.68rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-muted); }
.inbox-filter-foot { display: flex; justify-content: space-between; gap: 0.5rem; font-size: 0.75rem; }
.inbox-filter-foot a { color: var(--color-primary-600); font-weight: 600; text-decoration: none; }
.inbox-filter-foot a:hover { text-decoration: underline; }
.inbox-active-filters { display: flex; flex-wrap: wrap; gap: 0.3rem; }
.inbox-active-filter { display: inline-flex; align-items: center; gap: 0.3rem; padding: 0.15rem 0.55rem; border-radius: var(--radius-full); background: var(--color-emerald-50); border: 1px solid var(--color-emerald-100); color: var(--color-primary-700); font-size: 0.72rem; font-weight: 600; text-decoration: none; }
.inbox-active-filter:hover { border-color: var(--color-emerald-400); }

/* Etiquetas no cabeçalho da conversa (substitui a barra separada) */
.thread-contact-tags { display: flex; flex-wrap: wrap; gap: 0.25rem; margin-top: 0.3rem; }
.thread-head .tag-editor { position: relative; margin-left: auto; }
.thread-head .tag-editor + .thread-mode { margin-left: 0; }
.thread-head .tag-editor-toggle { gap: 0.35rem; padding: 0.4rem 0.7rem; border: 1px solid var(--border-default); border-style: solid; border-radius: var(--radius-sm); background: var(--color-surface); font-size: 0.8125rem; line-height: 1.2; }
.thread-head .tag-editor-toggle:hover { border-color: var(--border-strong); }
.thread-head .tag-editor-toggle .icon { width: 0.95rem; height: 0.95rem; }
.thread-head .tag-editor-panel { right: 0; top: calc(100% + 0.4rem); }
@media (max-width: 900px) { .thread-head .tag-editor-label { display: none; } }

/* Lista da Central: etiquetas compactas, sempre numa linha */
.inbox-item-tags { flex-wrap: nowrap; gap: 0.2rem; overflow: hidden; margin-top: 0.2rem; }
.inbox-item-tags .tag-chip, .inbox-item-tags .temp-pill { flex: 0 1 auto; min-width: 0; padding: 0 0.4rem; font-size: 0.64rem; line-height: 1.45; font-weight: 600; border-radius: var(--radius-full); }
.inbox-item-tags .tag-chip { max-width: 7.5rem; border-color: transparent; }
.inbox-item-tags .temp-pill, .inbox-item-tags .tag-chip-more { flex-shrink: 0; }
.inbox-item-tags .tag-chip-more { background: var(--color-canvas); color: var(--text-muted); }
.inbox-item-tags .tag-chip { display: inline-block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.temp-pill-sm { padding: 0 0.45rem; font-size: 0.64rem; line-height: 1.6; }

/* Anexos nas mensagens */
.bubble-image { display: block; margin: 0.15rem 0 0.3rem; }
.bubble-image img { display: block; max-width: min(18rem, 100%); max-height: 18rem; border-radius: 10px; object-fit: cover; }
.bubble-audio { display: block; width: min(17rem, 100%); height: 2.4rem; margin: 0.15rem 0 0.2rem; }
.bubble-video { display: block; max-width: min(18rem, 100%); max-height: 18rem; border-radius: 10px; margin: 0.15rem 0 0.3rem; background: #000; }
.bubble-file { display: flex; align-items: center; gap: 0.6rem; margin: 0.15rem 0 0.3rem; padding: 0.55rem 0.7rem; border-radius: 10px; background: rgba(255, 255, 255, 0.65); color: inherit; text-decoration: none; }
.bubble-file:hover { background: #fff; }
.bubble-file-icon { font-size: 1.4rem; }
.bubble-file strong { display: block; max-width: 14rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.85rem; }
.bubble-file small { color: var(--text-muted); font-size: 0.72rem; }

/* Compositor: emojis, anexos e áudio */
.composer-form { position: relative; flex-direction: column; align-items: stretch; gap: 0.45rem; }
.composer-row { display: flex; align-items: flex-end; gap: 0.35rem; }
.composer-row[hidden], .composer-recording[hidden], .composer-preview[hidden], .emoji-panel[hidden] { display: none; }
.composer-tool { flex: 0 0 auto; display: grid; place-items: center; width: 2.4rem; height: 2.6rem; border: 0; border-radius: 50%; background: transparent; color: var(--text-muted); cursor: pointer; }
.composer-tool:hover, .composer-tool.is-active { background: var(--color-canvas); color: var(--color-primary-700); }
.composer-tool .icon { width: 1.3rem; height: 1.3rem; }
.composer-tool-danger:hover { background: var(--color-rose-50); color: var(--color-rose-600); }
.composer-form.has-content .composer-mic { display: none; }
.composer-form:not(.has-content) .composer-submit { display: none; }
.composer-form.is-sending .composer-send { opacity: 0.6; pointer-events: none; }
.composer-preview { display: flex; align-items: center; gap: 0.7rem; padding: 0.45rem 0.5rem 0.45rem 0.6rem; border: 1px solid var(--border-subtle); border-radius: var(--radius-md); background: var(--color-canvas); }
.composer-preview-thumb { display: grid; place-items: center; width: 2.75rem; height: 2.75rem; flex: 0 0 auto; border-radius: 8px; background: var(--color-surface); font-size: 1.4rem; overflow: hidden; }
.composer-preview-thumb img { width: 100%; height: 100%; object-fit: cover; }
.composer-preview-info { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.composer-preview-info strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.85rem; }
.composer-preview-info small { font-size: 0.75rem; color: var(--text-muted); }
.composer-recording { display: flex; align-items: center; gap: 0.6rem; padding: 0.15rem 0; }
.composer-recording-dot { width: 0.65rem; height: 0.65rem; border-radius: 50%; background: var(--color-rose-600); animation: rec-pulse 1.2s ease-in-out infinite; }
.composer-recording-time { font-variant-numeric: tabular-nums; font-weight: 700; }
.composer-recording-label { flex: 1; color: var(--text-muted); font-size: 0.85rem; }
@keyframes rec-pulse { 50% { opacity: 0.25; } }
@media (prefers-reduced-motion: reduce) { .composer-recording-dot { animation: none; } }
.emoji-panel { position: absolute; left: 0; bottom: calc(100% + 0.5rem); z-index: 40; width: min(22rem, calc(100vw - 2rem)); padding: 0.5rem; background: var(--color-surface); border: 1px solid var(--border-default); border-radius: var(--radius-md); box-shadow: 0 12px 32px rgba(16, 44, 43, 0.16); }
.emoji-tabs { display: flex; gap: 0.25rem; padding-bottom: 0.4rem; margin-bottom: 0.4rem; border-bottom: 1px solid var(--border-subtle); }
.emoji-tabs button { padding: 0.25rem 0.55rem; border: 0; border-radius: var(--radius-sm); background: transparent; font-size: 1.1rem; cursor: pointer; }
.emoji-tabs button[aria-selected="true"] { background: var(--color-emerald-50); }
.emoji-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 0.1rem; max-height: 13rem; overflow-y: auto; }
.emoji-item { padding: 0.3rem 0; border: 0; border-radius: var(--radius-sm); background: transparent; font-size: 1.3rem; line-height: 1.2; cursor: pointer; }
.emoji-item:hover, .emoji-item:focus-visible { background: var(--color-canvas); }
.bubble-sticker { display: block; width: 8rem; height: 8rem; object-fit: contain; margin: 0.1rem 0 0.2rem; }
.bubble-load { font-weight: 600; color: var(--color-primary-600); }
/* Player de áudio com largura própria (o balão encolhe ao conteúdo; 100% colapsava o player) */
.bubble .bubble-audio { width: 17rem; max-width: calc(100vw - 7rem); min-width: 12rem; }

/* ===== E5.1 — Cardápios e pedidos ===== */
.badge-warning { background: var(--color-amber-100); color: #92400e; }
.menu-logo { width: 2.75rem; height: 2.75rem; border-radius: 12px; object-fit: cover; }
.link-button { padding: 0; border: 0; background: none; color: var(--color-primary-600); font: inherit; font-size: 0.8125rem; font-weight: 600; cursor: pointer; }
.link-button:hover { text-decoration: underline; }
.segmented label { display: inline-flex; cursor: pointer; }
.segmented label input { position: absolute; opacity: 0; pointer-events: none; }
.segmented label span { padding: 0.45rem 0.85rem; border-radius: calc(var(--radius-md) - 0.15rem); font-size: 0.85rem; font-weight: 600; color: var(--text-muted); }
.segmented label input:checked + span { background: var(--color-surface); color: var(--color-primary-600); box-shadow: var(--shadow-xs); }
.segmented label input:focus-visible + span { outline: 2px solid var(--border-focus); }
.type-picker, .check-grid { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.type-option, .check-pill { position: relative; display: inline-flex; cursor: pointer; }
.type-option input, .check-pill input { position: absolute; opacity: 0; pointer-events: none; }
.type-option span, .check-pill span { padding: 0.45rem 0.85rem; border: 1px solid var(--border-default); border-radius: var(--radius-full); font-size: 0.85rem; font-weight: 600; color: var(--text-body); background: var(--color-surface); }
.type-option input:checked + span, .check-pill input:checked + span { border-color: var(--color-emerald-400); background: var(--color-emerald-50); color: var(--color-primary-700); }
.type-option input:focus-visible + span, .check-pill input:focus-visible + span { outline: 2px solid var(--border-focus); }
.color-swatch { width: 4.5rem; height: 2.75rem; padding: 0.2rem; border: 1px solid var(--border-default); border-radius: var(--radius-sm); background: var(--color-surface); cursor: pointer; }
.logo-field { display: flex; flex-wrap: wrap; align-items: center; gap: 0.9rem; }
.logo-field img { width: 4rem; height: 4rem; border-radius: 12px; object-fit: cover; border: 1px solid var(--border-subtle); }
.menu-tabs { display: flex; gap: 0.25rem; margin-bottom: 1.25rem; border-bottom: 1px solid var(--border-default); }
.menu-tabs a { padding: 0.6rem 0.9rem; margin-bottom: -1px; border-bottom: 2px solid transparent; font-weight: 600; font-size: 0.9rem; color: var(--text-muted); text-decoration: none; }
.menu-tabs a:hover { color: var(--text-main); }
.menu-tabs a.is-active { color: var(--color-primary-700); border-bottom-color: var(--color-emerald-500); }
.hours-editor { display: flex; flex-direction: column; margin-bottom: 1rem; }
.hours-day { display: grid; grid-template-columns: 6rem 1fr auto; align-items: center; gap: 0.75rem; padding: 0.55rem 0; border-bottom: 1px solid var(--border-subtle); }
.hours-periods { display: flex; flex-wrap: wrap; gap: 0.4rem 0.9rem; align-items: center; }
.hours-period { display: inline-flex; align-items: center; gap: 0.35rem; font-size: 0.85rem; color: var(--text-muted); }
.hours-period input[type="time"] { width: 7rem; padding: 0.35rem 0.5rem; }
.hours-closed { font-size: 0.85rem; color: var(--text-subtle); }
.hours-period ~ .hours-closed { display: none; }
.zone-row { border: 1px solid var(--border-subtle); border-radius: var(--radius-md); }
.zone-row summary { display: grid; grid-template-columns: minmax(8rem, auto) auto 1fr auto; align-items: center; gap: 0.75rem; padding: 0.7rem 0.9rem; cursor: pointer; list-style: none; }
.zone-row summary::-webkit-details-marker { display: none; }
.zone-row summary span { font-size: 0.85rem; font-weight: 600; color: var(--text-body); }
.zone-row summary small { color: var(--text-muted); font-size: 0.78rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.zone-row > form { padding: 0 0.9rem 0.6rem; }
.zone-row.is-inactive summary { opacity: 0.55; }
.zone-delete { padding-bottom: 0.9rem !important; }
.zone-new > summary { list-style: none; display: inline-flex; }
.zone-new > summary::-webkit-details-marker { display: none; }
.zone-new[open] > summary { margin-bottom: 0.75rem; }
.inline-form { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.inline-form input:not([type="checkbox"]) { flex: 1 1 12rem; min-width: 0; }
.inline-form input.input-icon { flex: 0 0 3.5rem; width: 3.5rem; text-align: center; }
.catalog-category { padding: 0; }
.catalog-category.is-inactive { opacity: 0.75; }
.catalog-category-head { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; padding: 0.9rem 1.25rem; border-bottom: 1px solid var(--border-subtle); }
.catalog-category-head h2 { margin: 0; font-size: 1.05rem; }
.catalog-category-head > .muted { flex: 1; font-size: 0.8rem; }
.catalog-category-edit[open] { flex-basis: 100%; order: 5; display: flex; flex-direction: column; gap: 0.5rem; }
.catalog-category-edit summary { list-style: none; }
.catalog-category-edit summary::-webkit-details-marker { display: none; }
.catalog-item { display: flex; align-items: center; gap: 0.85rem; padding: 0.7rem 1.25rem; border-bottom: 1px solid var(--border-subtle); }
.catalog-item:last-child { border-bottom: 0; }
.catalog-item.is-soldout .catalog-item-main strong, .catalog-item.is-inactive .catalog-item-main { opacity: 0.55; }
.catalog-thumb { flex: 0 0 auto; width: 3rem; height: 3rem; border-radius: 10px; object-fit: cover; }
.catalog-thumb-empty { display: grid; place-items: center; background: var(--color-canvas); color: var(--text-subtle); }
.catalog-thumb-empty .icon { width: 1.2rem; height: 1.2rem; }
.catalog-item-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 0.1rem; }
.catalog-item-main small { color: var(--text-muted); font-size: 0.8rem; }
.catalog-empty { padding: 0.9rem 1.25rem; margin: 0; font-size: 0.85rem; }
.availability-toggle { padding: 0.3rem 0.7rem; border-radius: var(--radius-full); border: 1px solid var(--color-rose-100); background: var(--color-rose-50); color: var(--color-rose-600); font: inherit; font-size: 0.75rem; font-weight: 700; cursor: pointer; }
.availability-toggle.is-on { border-color: var(--color-emerald-100); background: var(--color-emerald-50); color: #047857; }
.variation-list { display: flex; flex-direction: column; gap: 0.4rem; }
.variation-row { display: grid; grid-template-columns: 2fr 1fr 1fr 5.5rem auto; gap: 0.4rem; align-items: center; }
.order-status { display: inline-flex; padding: 0.2rem 0.65rem; border-radius: var(--radius-full); font-size: 0.75rem; font-weight: 700; white-space: nowrap; background: var(--color-canvas); color: var(--text-body); }
.order-status-pending { background: var(--color-amber-100); color: #92400e; }
.order-status-confirmed { background: #e0ecff; color: #1e40af; }
.order-status-preparing { background: #ede9fe; color: #5b21b6; }
.order-status-ready { background: #cffafe; color: #155e75; }
.order-status-delivering { background: #ffedd5; color: #9a3412; }
.order-status-delivered { background: var(--color-emerald-100); color: #065f46; }
.order-status-cancelled { background: var(--color-rose-50); color: var(--color-rose-600); }
.order-list { display: flex; flex-direction: column; gap: 0.6rem; }
.order-card { display: flex; align-items: center; gap: 0.75rem; padding: 0.75rem 1rem; border-left: 4px solid var(--border-default); }
.order-card.order-state-pending { border-left-color: var(--color-amber-400); }
.order-card.order-state-cancelled { opacity: 0.7; }
.order-card-main { flex: 1; min-width: 0; display: grid; grid-template-columns: 6.5rem minmax(10rem, 1.2fr) minmax(0, 2fr) auto auto; align-items: center; gap: 0.9rem; color: inherit; text-decoration: none; }
.order-number { font-weight: 800; font-variant-numeric: tabular-nums; color: var(--text-muted); font-size: 0.85rem; }
.order-customer { display: flex; flex-direction: column; min-width: 0; }
.order-customer small, .order-total small { color: var(--text-muted); font-size: 0.75rem; }
.order-items { font-size: 0.85rem; color: var(--text-body); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.order-total { display: flex; flex-direction: column; align-items: flex-end; font-weight: 700; white-space: nowrap; }
@media (max-width: 900px) { .order-card { flex-wrap: wrap; } .order-card-main { grid-template-columns: 1fr auto; } .order-items { grid-column: 1 / -1; white-space: normal; } .order-number { grid-column: 1 / -1; } }
.order-steps { display: flex; flex-wrap: wrap; gap: 0.3rem; margin: 0 0 1.25rem; padding: 0; list-style: none; counter-reset: step; }
.order-steps li { flex: 1 1 7rem; padding: 0.45rem 0.6rem; border-radius: var(--radius-sm); background: var(--color-canvas); color: var(--text-subtle); font-size: 0.78rem; font-weight: 600; text-align: center; }
.order-steps li.is-done { background: var(--color-emerald-50); color: #047857; }
.order-steps li.is-current { background: var(--color-emerald-500); color: #fff; }
.order-lines { list-style: none; margin: 0 0 1rem; padding: 0; display: flex; flex-direction: column; }
.order-lines li { display: flex; align-items: flex-start; gap: 0.6rem; padding: 0.6rem 0; border-bottom: 1px solid var(--border-subtle); }
.order-line-qty { font-weight: 800; color: var(--text-muted); min-width: 2rem; }
.order-line-main { flex: 1; display: flex; flex-direction: column; gap: 0.1rem; min-width: 0; }
.order-line-main small { color: var(--text-muted); font-size: 0.8rem; }
.order-line-note { color: #92400e !important; }
.order-line-total { font-weight: 700; white-space: nowrap; }
.order-totals { margin: 0; display: flex; flex-direction: column; gap: 0.35rem; }
.order-totals div { display: flex; justify-content: space-between; font-size: 0.9rem; }
.order-totals dt { color: var(--text-muted); }
.order-totals dd { margin: 0; font-variant-numeric: tabular-nums; }
.order-grand { padding-top: 0.45rem; border-top: 1px solid var(--border-default); font-size: 1.05rem !important; font-weight: 800; }
.order-grand dt { color: var(--text-main) !important; }
.order-note { margin: 1rem 0 0; padding: 0.6rem 0.8rem; border-radius: var(--radius-sm); background: var(--color-amber-50); font-size: 0.85rem; }
.order-cancel summary { color: var(--color-rose-600); font-weight: 600; cursor: pointer; }
.order-cancel[open] { display: flex; flex-direction: column; gap: 0.6rem; }
.payment-line { margin: 0; }
.payment-status { font-weight: 700; }
.payment-paid { color: #047857; }
.payment-refunded { color: var(--color-rose-600); }
.order-builder { display: grid; grid-template-columns: minmax(0, 1fr) 22rem; gap: 1.25rem; align-items: start; }
@media (max-width: 1000px) { .order-builder { grid-template-columns: 1fr; } }
.builder-summary { position: sticky; top: 5.5rem; }
.builder-category h3 { margin: 0.4rem 0 0.5rem; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-muted); }
.builder-items { display: grid; grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr)); gap: 0.5rem; margin-bottom: 0.75rem; }
.builder-item { display: flex; flex-direction: column; align-items: flex-start; gap: 0.15rem; padding: 0.6rem 0.75rem; border: 1px solid var(--border-default); border-radius: var(--radius-md); background: var(--color-surface); font: inherit; text-align: left; cursor: pointer; }
.builder-item:hover { border-color: var(--color-emerald-400); background: var(--color-emerald-50); }
.builder-item:disabled { opacity: 0.5; cursor: not-allowed; }
.builder-item small { color: var(--text-muted); font-size: 0.75rem; }
.builder-config { display: flex; flex-direction: column; gap: 0.75rem; margin: 0 1.5rem 1.25rem; padding: 1rem; border: 1px solid var(--color-emerald-100); border-radius: var(--radius-md); background: var(--color-emerald-50); }
.builder-config[hidden] { display: none; }
.builder-config-head { display: flex; justify-content: space-between; align-items: center; font-size: 1rem; }
.builder-config-row { display: grid; grid-template-columns: 7rem 1fr; gap: 0.75rem; }
.builder-config .field { display: flex; flex-direction: column; gap: 0.3rem; font-size: 0.85rem; font-weight: 600; }
.builder-addons { display: flex; flex-direction: column; gap: 0.35rem; }
.builder-addons label { display: flex; align-items: center; gap: 0.5rem; font-weight: 500; }
.builder-addons small { color: var(--text-muted); flex: 1; }
.builder-addons input { width: 4.5rem; }
.builder-lines { list-style: none; margin: 0 0 0.9rem; padding: 0; }
.builder-lines li { display: flex; align-items: flex-start; gap: 0.5rem; padding: 0.5rem 0; border-bottom: 1px solid var(--border-subtle); font-size: 0.9rem; }
.builder-error { margin: 0.75rem 0 0; padding: 0.55rem 0.75rem; border-radius: var(--radius-sm); background: var(--color-rose-50); color: var(--color-rose-600); font-size: 0.85rem; }
.builder-submit { width: 100%; justify-content: center; margin-top: 1rem; }
.address-fields[hidden] { display: none; }
.order-totals[hidden], .builder-error[hidden] { display: none; }

/* Configuração do cardápio em um único formulário */
.settings-form { padding-bottom: 0.5rem; }
.settings-savebar { position: sticky; bottom: 0; z-index: 20; display: flex; align-items: center; justify-content: flex-end; gap: 1rem; padding: 0.75rem 1rem; margin-top: 0.25rem; border: 1px solid var(--border-default); border-radius: var(--radius-lg); background: rgba(255, 255, 255, 0.94); backdrop-filter: blur(6px); box-shadow: 0 -6px 24px rgba(16, 44, 43, 0.08); }
.settings-savebar-text { margin-right: auto; font-size: 0.85rem; color: var(--text-muted); }
.settings-savebar.is-dirty { border-color: var(--color-amber-400); }
.settings-savebar.is-dirty .settings-savebar-text { color: #92400e; font-weight: 600; }
.zone-list { display: flex; flex-direction: column; gap: 0.75rem; margin-bottom: 0.9rem; }
.zone-card { padding: 0.85rem; border: 1px solid var(--border-subtle); border-radius: var(--radius-md); background: var(--color-canvas); }
.zone-card-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 0.6rem; }
.zone-card-grid .field { display: flex; flex-direction: column; gap: 0.3rem; font-size: 0.8rem; font-weight: 600; }
.zone-card-wide { grid-column: 1 / -1; }
.zone-card-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 0.5rem; }
.zone-empty { margin: 0 0 0.75rem; }
@media (max-width: 720px) { .zone-card-grid { grid-template-columns: 1fr 1fr; } .zone-card-grid .field:first-child { grid-column: 1 / -1; } }
.segment-cart { background: #ffedd5; color: #9a3412; }
.segment-bought { background: var(--color-emerald-100); color: #065f46; }
.menu-tabs-external { margin-left: auto; }

/* Aparência do cardápio online */
.cover-field { display: flex; flex-direction: column; gap: 0.6rem; }
.cover-field img, .cover-empty { width: 100%; max-width: 36rem; aspect-ratio: 3 / 1; object-fit: cover; border-radius: var(--radius-md); }
.cover-empty { display: grid; place-items: center; color: #fff; font-weight: 600; font-size: 0.85rem; opacity: 0.85; }
.layout-picker { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.layout-option { position: relative; cursor: pointer; }
.layout-option > input { position: absolute; opacity: 0; }
.layout-option > span { display: flex; flex-direction: column; align-items: center; gap: 0.45rem; padding: 0.7rem 0.9rem; border: 1.5px solid var(--border-default); border-radius: var(--radius-md); font-size: 0.85rem; font-weight: 600; }
.layout-option > input:checked + span { border-color: var(--color-emerald-400); background: var(--color-emerald-50); }
.layout-option > input:focus-visible + span { outline: 2px solid var(--border-focus); }
.layout-preview { display: grid; gap: 4px; width: 7rem; }
.layout-preview i { display: block; height: 12px; border-radius: 3px; background: var(--border-strong); }
.layout-preview-list i { background: linear-gradient(90deg, var(--border-strong) 70%, transparent 70%, transparent 76%, var(--color-emerald-300) 76%); }
.layout-preview-grid { grid-template-columns: 1fr 1fr; }
.layout-preview-grid i { height: 22px; background: linear-gradient(var(--color-emerald-300) 60%, var(--border-strong) 60%); }
.banner-list { display: flex; flex-direction: column; gap: 0.6rem; margin: 0.6rem 0; }
.banner-card { display: grid; grid-template-columns: 13rem 1fr; gap: 0.8rem; padding: 0.7rem; border: 1px solid var(--border-subtle); border-radius: var(--radius-md); background: var(--color-canvas); }
.banner-card.is-removed { opacity: 0.45; }
.banner-thumb { display: flex; flex-direction: column; gap: 0.4rem; }
.banner-thumb img { width: 100%; aspect-ratio: 12 / 5; object-fit: cover; border-radius: var(--radius-sm); }
.banner-upload { font-size: 0.8rem; font-weight: 600; color: var(--color-primary-600); cursor: pointer; }
.banner-upload input { display: block; margin-bottom: 0.2rem; font-size: 0.75rem; max-width: 100%; }
.banner-fields { display: flex; flex-direction: column; gap: 0.45rem; }
@media (max-width: 720px) { .banner-card { grid-template-columns: 1fr; } }

/* Modo do agente e avisos de pedido */
.mode-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 0.6rem; }
.mode-card { position: relative; cursor: pointer; }
.mode-card input { position: absolute; opacity: 0; }
.mode-card > span { display: flex; flex-direction: column; gap: 0.25rem; height: 100%; padding: 0.8rem 0.9rem; border: 1.5px solid var(--border-default); border-radius: var(--radius-md); }
.mode-card small { color: var(--text-muted); font-size: 0.8rem; line-height: 1.4; }
.mode-card input:checked + span { border-color: var(--color-emerald-400); background: var(--color-emerald-50); }
.mode-card input:focus-visible + span { outline: 2px solid var(--border-focus); }
.notice-row { padding-bottom: 0.6rem; border-bottom: 1px solid var(--border-subtle); }
.notice-row:last-of-type { border-bottom: 0; }

/* ==========================================================================
   ASSINATURA (F19)
   ========================================================================== */
.billing-layout { display: grid; grid-template-columns: minmax(18rem, 22rem) minmax(0, 1fr); gap: 1.5rem; align-items: start; margin-bottom: 1.5rem; }
.billing-summary { display: grid; gap: 1rem; }
.billing-summary .panel-heading { margin-bottom: 0; }
.billing-plan-line { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem; }
.billing-plan-line strong { font-family: var(--font-display); font-size: 1.45rem; color: var(--text-main); }
.billing-facts { display: grid; gap: 0.5rem; margin: 0; }
.billing-facts div { display: flex; justify-content: space-between; gap: 1rem; padding-bottom: 0.5rem; border-bottom: 1px solid var(--border-subtle); }
.billing-facts dt { color: var(--text-muted); font-size: 0.875rem; }
.billing-facts dd { margin: 0; font-weight: 700; color: var(--text-main); }
.billing-note { margin: 0; padding: 0.75rem 0.9rem; border-radius: var(--radius-sm); background: var(--color-amber-50); color: #92400e; font-size: 0.875rem; }
.billing-limits { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0; padding: 0; list-style: none; }
.billing-limits li { padding: 0.35rem 0.7rem; border-radius: var(--radius-full); background: var(--color-surface-subtle); color: var(--text-body); font-size: 0.8125rem; }
.billing-limits strong { color: var(--text-main); }
.billing-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.billing-actions form { margin: 0; }
.billing-cancel { background: transparent; border: 1px solid transparent; color: var(--color-rose-600); box-shadow: none; }
.billing-cancel:hover { background: var(--color-rose-50); }
.billing-section-title { margin: 0 0 0.75rem; font-family: var(--font-display); font-size: 1.15rem; color: var(--text-main); }
.billing-trial { display: flex; align-items: center; gap: 0.5rem; margin: 0 0 1rem; color: var(--color-primary-600); font-weight: 600; }
.billing-plan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 1rem; }
.billing-plan { position: relative; display: flex; flex-direction: column; gap: 0.75rem; }
.billing-plan h3 { margin: 0; font-family: var(--font-display); font-size: 1.3rem; color: var(--text-main); }
.billing-plan p { margin: 0; }
.billing-plan form { margin-top: auto; }
.billing-plan > .button { margin-top: auto; }
.billing-plan.is-highlight { border-color: var(--color-emerald-400); box-shadow: var(--shadow-md), 0 0 0 1px var(--color-emerald-300); }
.billing-plan.is-current { background: var(--color-emerald-50); }
.billing-plan-tag { position: absolute; top: 1rem; right: 1rem; }
.billing-price { display: flex; align-items: baseline; gap: 0.25rem; }
.billing-price strong { font-family: var(--font-display); font-size: 2rem; color: var(--text-main); }
.billing-price span { color: var(--text-muted); }
.billing-plan-features { display: grid; gap: 0.45rem; margin: 0; padding: 0; list-style: none; font-size: 0.9rem; color: var(--text-body); }
.billing-plan-features li { display: flex; align-items: center; gap: 0.5rem; }
.billing-plan-features .icon { width: 1rem; height: 1rem; color: var(--color-emerald-500); flex: 0 0 auto; }
.billing-secure { display: flex; align-items: center; gap: 0.5rem; margin: 1rem 0 0; font-size: 0.8125rem; }
.billing-secure .icon { width: 1rem; height: 1rem; }
.billing-table-wrap { overflow-x: auto; }
.billing-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.billing-table th { padding: 0.6rem 0.75rem; text-align: left; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-muted); border-bottom: 1px solid var(--border-default); }
.billing-table td { padding: 0.75rem; border-bottom: 1px solid var(--border-subtle); vertical-align: middle; }
.billing-table tr:last-child td { border-bottom: 0; }
.billing-table form { margin: 0 0 0.25rem; }
.billing-admin-search { gap: 0.75rem; }
.billing-admin-search input { flex: 1 1 14rem; min-width: 0; }
@media (max-width: 900px) {
    .billing-layout { grid-template-columns: 1fr; }
}
.billing-table a { color: var(--color-primary-600); font-weight: 600; }

/* ==========================================================================
   PAINEL SUPERADMIN
   ========================================================================== */
.impersonation-bar { position: sticky; top: 0; z-index: 60; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 0.5rem 1rem; padding: 0.55rem 1rem; background: #7c2d12; color: #fff; font-size: 0.875rem; text-align: center; }
.impersonation-bar .icon { width: 1rem; height: 1rem; }
.impersonation-bar form { margin: 0; }
.impersonation-bar button { padding: 0.3rem 0.85rem; border: 1px solid rgba(255, 255, 255, 0.6); border-radius: var(--radius-full); background: #fff; color: #7c2d12; font: inherit; font-weight: 700; cursor: pointer; }
.admin-tabs { display: flex; gap: 0.35rem; margin: -0.5rem 0 1.5rem; padding: 0.3rem; overflow-x: auto; border-radius: var(--radius-md); background: var(--color-surface-subtle); }
.admin-tabs a { display: inline-flex; align-items: center; gap: 0.45rem; padding: 0.55rem 0.95rem; border-radius: var(--radius-sm); color: var(--text-muted); font-weight: 600; font-size: 0.9rem; text-decoration: none; white-space: nowrap; }
.admin-tabs a .icon { width: 1rem; height: 1rem; }
.admin-tabs a:hover { color: var(--text-main); }
.admin-tabs a.active { background: var(--color-surface); color: var(--color-primary-700); box-shadow: var(--shadow-sm); }
.admin-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.admin-stat { display: grid; gap: 0.2rem; color: inherit; text-decoration: none; }
a.admin-stat:hover { border-color: var(--color-emerald-300); }
.admin-stat span { color: var(--text-muted); font-size: 0.8125rem; font-weight: 600; }
.admin-stat strong { font-family: var(--font-display); font-size: 1.85rem; color: var(--text-main); line-height: 1.2; }
.admin-stat strong em { font-style: normal; font-size: 1.1rem; color: var(--text-subtle); }
.admin-stat small { color: var(--text-muted); font-size: 0.8rem; }
.admin-stat.is-warning { border-color: rgba(245, 158, 11, 0.45); background: var(--color-amber-50); }
.admin-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem; margin-bottom: 1.5rem; align-items: start; }
.admin-columns > .panel { margin: 0; }
.admin-health, .admin-list { display: grid; margin: 0; padding: 0; list-style: none; }
.admin-health li { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 0.7rem; padding: 0.65rem 0; border-bottom: 1px solid var(--border-subtle); font-size: 0.9rem; }
.admin-health li:last-child, .admin-list li:last-child { border-bottom: 0; }
.admin-health strong { font-weight: 600; color: var(--text-body); text-align: right; }
.admin-health-dot { width: 0.65rem; height: 0.65rem; border-radius: 50%; background: var(--text-subtle); }
.admin-health-dot.is-ok { background: var(--color-emerald-500); box-shadow: 0 0 0 3px var(--color-emerald-100); }
.admin-health-dot.is-fail { background: var(--color-rose-600); box-shadow: 0 0 0 3px var(--color-rose-100); }
.admin-health-dot.is-info { background: #60a5fa; box-shadow: 0 0 0 3px #dbeafe; }
.admin-list li { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; padding: 0.65rem 0; border-bottom: 1px solid var(--border-subtle); }
.admin-list a, .admin-list li > span:first-child { display: grid; min-width: 0; color: var(--text-main); text-decoration: none; }
.admin-list small { color: var(--text-muted); font-size: 0.8rem; overflow-wrap: anywhere; }
.admin-list a:hover strong { color: var(--color-primary-600); }
.admin-filters { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-bottom: 1.25rem; }
.admin-filters input { flex: 1 1 16rem; width: auto; min-width: 0; }
.admin-filters select { flex: 0 1 14rem; width: auto; }
.admin-accounts-table td small { display: block; }
.admin-account-link { color: var(--text-main); text-decoration: none; }
.admin-account-link:hover { color: var(--color-primary-600); text-decoration: underline; }
.admin-badges { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; margin-top: 0.35rem; }
.admin-heading-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.admin-heading-actions form { margin: 0; }
.admin-check { display: flex; align-items: flex-start; gap: 0.7rem; padding: 0.85rem 1rem; border: 1px solid var(--border-default); border-radius: var(--radius-md); background: var(--color-surface); cursor: pointer; }
.admin-check input { margin-top: 0.25rem; accent-color: var(--color-emerald-500); width: 1.05rem; height: 1.05rem; flex: 0 0 auto; }
.admin-check span { display: grid; gap: 0.15rem; }
.admin-check small { color: var(--text-muted); font-size: 0.82rem; }
.admin-check:has(input:checked) { border-color: var(--color-emerald-400); background: var(--color-emerald-50); }
.admin-check-warning:has(input:checked) { border-color: rgba(245, 158, 11, 0.5); background: var(--color-amber-50); }
.admin-radio-group { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem; margin: 0 0 0.75rem; padding: 0; border: 0; }
.admin-limits { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.75rem; }
.admin-subfact dt { padding-left: 0.75rem; }
.admin-users { display: grid; gap: 0.75rem; }
.admin-user { display: grid; gap: 0.75rem; padding: 1rem; border: 1px solid var(--border-subtle); border-radius: var(--radius-md); background: var(--color-surface-hover); }
.admin-user-head { display: flex; align-items: flex-start; gap: 0.75rem; }
.admin-user-head > div { display: grid; min-width: 0; }
.admin-user-head small { color: var(--text-muted); overflow-wrap: anywhere; }
.admin-user-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.admin-user-actions form { margin: 0; }
.admin-password summary { cursor: pointer; color: var(--color-primary-600); font-weight: 600; font-size: 0.875rem; }
.admin-password-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)) auto; gap: 0.75rem; align-items: end; margin-top: 0.75rem; }
.admin-password-form .field { margin: 0; }
.admin-stripe-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; }
.admin-subtitle { margin: 0 0 0.35rem; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); }
.admin-audit-details { max-width: 22rem; font-size: 0.85rem; color: var(--text-body); }
.admin-settings { display: grid; gap: 1.5rem; margin-bottom: 1.5rem; }
.admin-settings > .panel { margin: 0; }
.admin-settings-actions { justify-content: flex-end; }
.admin-inline-check { display: inline-flex; align-items: center; gap: 0.3rem; margin-left: 0.5rem; font-weight: 600; cursor: pointer; }
.admin-webhook { display: grid; gap: 0.35rem; margin-top: 1.25rem; padding: 0.9rem 1rem; border-radius: var(--radius-md); background: var(--color-surface-subtle); font-size: 0.875rem; }
.admin-webhook code { padding: 0.45rem 0.6rem; border-radius: var(--radius-sm); background: var(--color-surface); border: 1px solid var(--border-default); overflow-wrap: anywhere; user-select: all; }
.admin-form-panel { max-width: 56rem; }
@media (max-width: 900px) {
    .admin-columns, .admin-stripe-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
    .admin-radio-group, .admin-limits, .admin-password-form { grid-template-columns: 1fr; }
    .admin-filters select { flex: 1 1 100%; }
}
.admin-limits { margin-top: 0.35rem; }

/* Indicadores do dashboard: 3 em cima e 2 embaixo (2+2+1 no celular), sem card sobrando sozinho */
.stats-grid.dashboard-kpis { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 1rem; }
.dashboard-kpis .stat-card { min-width: 0; }
.dashboard-kpis .stat-value { overflow-wrap: anywhere; }
.dashboard-kpis > * { grid-column: span 2; }
.dashboard-kpis > :nth-child(n + 4) { grid-column: span 3; }
@media (max-width: 768px) {
    .stats-grid.dashboard-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .dashboard-kpis > *, .dashboard-kpis > :nth-child(n + 4) { grid-column: auto; }
    .dashboard-kpis > :last-child:nth-child(odd) { grid-column: 1 / -1; }
    .dashboard-kpis .stat-value { font-size: 1.6rem; }
}
@media (max-width: 480px) {
    .stats-grid.dashboard-kpis { grid-template-columns: 1fr; }
}

/* Pedido: abrir conversa e comprovante de pagamento */
.order-open-chat { margin: 0.85rem 0 0; }
.order-receipt { display: grid; gap: 0.5rem; padding: 0.85rem 1rem; border: 1px solid var(--border-default); border-radius: var(--radius-md); background: var(--color-surface-hover); }
.order-receipt-detected { border-color: rgba(245, 158, 11, 0.45); background: var(--color-amber-50); }
.order-receipt-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem; }
.order-receipt-head strong { display: inline-flex; align-items: center; gap: 0.35rem; }
.order-receipt-head .icon { width: 1rem; height: 1rem; color: var(--color-emerald-500); }
.order-receipt p { margin: 0; }
.order-receipt .button { justify-self: start; }
.order-receipt-match, .order-receipt-mismatch { display: inline-block; margin-left: 0.35rem; padding: 0.05rem 0.5rem; border-radius: var(--radius-full); font-size: 0.75rem; font-weight: 700; }
.order-receipt-match { background: var(--color-emerald-50); color: #047857; }
.order-receipt-mismatch { background: var(--color-rose-50); color: var(--color-rose-600); }
.receipt-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(18rem, 22rem); gap: 1.5rem; align-items: start; }
.receipt-viewer { display: grid; gap: 1rem; justify-items: center; }
.receipt-viewer figure { margin: 0; display: grid; gap: 0.35rem; justify-items: center; }
.receipt-viewer img { display: block; max-width: 100%; max-height: 80vh; border: 1px solid var(--border-default); border-radius: var(--radius-sm); background: #fff; }
.receipt-viewer figcaption { font-size: 0.8rem; color: var(--text-muted); }
.receipt-safety { display: flex; align-items: center; gap: 0.45rem; margin: 0; font-size: 0.8rem; color: var(--text-muted); }
.receipt-safety .icon { width: 1rem; height: 1rem; flex: 0 0 auto; }
.receipt-summary { margin: 0.85rem 0 0; font-size: 0.875rem; }
@media (max-width: 900px) { .receipt-layout { grid-template-columns: 1fr; } }

/* Pop-up do comprovante e chegada em tempo real */
.receipt-dialog { position: fixed; inset: 0; margin: auto; height: fit-content; width: min(68rem, calc(100vw - 2rem)); max-height: calc(100vh - 2rem); padding: 0; border: 0; border-radius: var(--radius-lg); background: var(--color-canvas); box-shadow: var(--shadow-lg); color: inherit; }
.receipt-dialog::backdrop { background: rgba(9, 26, 25, 0.55); backdrop-filter: blur(2px); }
.receipt-dialog[open] { display: flex; flex-direction: column; animation: receiptDialogIn 0.2s var(--ease-out); }
@keyframes receiptDialogIn { from { opacity: 0; transform: translateY(12px) scale(0.98); } to { opacity: 1; transform: none; } }
.receipt-dialog-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; padding: 1.1rem 1.4rem; border-bottom: 1px solid var(--border-subtle); background: var(--color-surface); }
.receipt-dialog-head h2 { margin: 0.2rem 0 0; font-family: var(--font-display); font-size: 1.15rem; color: var(--text-main); }
.receipt-dialog-body { padding: 1.25rem 1.4rem 1.4rem; overflow-y: auto; }
.receipt-dialog .receipt-viewer img { max-height: 70vh; }
.order-receipt.is-new { animation: receiptArrive 1.6s var(--ease-out) 2; }
@keyframes receiptArrive { 0%, 100% { box-shadow: none; } 40% { box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.35); } }
.receipt-toast { position: fixed; right: 1.25rem; bottom: 1.25rem; z-index: 70; display: flex; align-items: center; gap: 0.6rem; max-width: calc(100vw - 2.5rem); padding: 0.85rem 1.1rem; border-radius: var(--radius-md); background: var(--color-primary-850); color: #fff; font-weight: 600; box-shadow: var(--shadow-lg); animation: alertSlideDown 0.3s var(--ease-out); }
.receipt-toast[hidden] { display: none; }
.receipt-toast .icon { width: 1.1rem; height: 1.1rem; color: var(--color-emerald-300); }
@media (max-width: 640px) {
    .receipt-dialog { width: 100vw; max-width: 100vw; max-height: 100vh; height: 100vh; margin: 0; border-radius: 0; }
    .receipt-dialog-head, .receipt-dialog-body { padding-left: 1rem; padding-right: 1rem; }
}

/* Suporte interno */
.support-layout { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 1.5rem; align-items: start; }
.support-layout > .panel { margin: 0; }
.support-chat { display: grid; gap: 1rem; }
.support-thread { display: flex; flex-direction: column; gap: 0.85rem; max-height: min(62vh, 44rem); overflow-y: auto; padding: 0.25rem 0.25rem 0.5rem; }
.support-message { max-width: min(46rem, 88%); padding: 0.75rem 1rem; border-radius: var(--radius-md); background: var(--color-surface-subtle); border: 1px solid var(--border-subtle); }
.support-message header { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.5rem; margin-bottom: 0.3rem; font-size: 0.8rem; color: var(--text-muted); }
.support-message header strong { color: var(--text-main); font-size: 0.85rem; }
.support-message-body { font-size: 0.925rem; line-height: 1.55; color: var(--text-body); overflow-wrap: anywhere; }
.support-message-body a { color: var(--color-primary-600); font-weight: 600; }
.support-message-ai { background: var(--color-emerald-50); border-color: rgba(16, 185, 129, 0.2); }
.support-message-admin { background: #eff6ff; border-color: #dbeafe; }
.support-message.is-mine { align-self: flex-end; background: var(--color-primary-850); border-color: var(--color-primary-850); }
.support-message.is-mine header, .support-message.is-mine header strong, .support-message.is-mine .support-message-body { color: #fff; }
.support-message.is-mine .support-message-body a { color: var(--color-emerald-300); }
.support-meta { display: block; margin-top: 0.4rem; font-size: 0.75rem; color: var(--text-subtle); }
.support-notice { align-self: center; margin: 0; padding: 0.3rem 0.85rem; border-radius: var(--radius-full); background: var(--color-surface-muted); color: var(--text-muted); font-size: 0.8rem; text-align: center; }
.support-typing { display: inline-flex; align-items: center; gap: 0.25rem; margin: 0; color: var(--text-muted); font-size: 0.8rem; }
.support-typing[hidden] { display: none; }
.support-typing span { width: 0.4rem; height: 0.4rem; border-radius: 50%; background: var(--color-emerald-400); animation: supportTyping 1s infinite ease-in-out; }
.support-typing span:nth-child(2) { animation-delay: 0.15s; }
.support-typing span:nth-child(3) { animation-delay: 0.3s; margin-right: 0.35rem; }
@keyframes supportTyping { 0%, 80%, 100% { opacity: 0.3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
.support-composer { display: flex; gap: 0.75rem; align-items: flex-end; padding-top: 1rem; border-top: 1px solid var(--border-subtle); }
.support-composer textarea { flex: 1; min-height: 3rem; resize: vertical; }
.support-tokens { margin: 0; font-size: 0.8rem; }
.admin-tab-count { margin-left: 0.35rem; min-width: 1.25rem; padding: 0 0.4rem; border-radius: var(--radius-full); background: var(--color-amber-400); color: #fff; font-size: 0.72rem; font-weight: 800; line-height: 1.25rem; text-align: center; }
@media (max-width: 900px) { .support-layout { grid-template-columns: 1fr; } .support-message { max-width: 100%; } }

/* Balão de suporte (todas as telas do painel) */
.support-widget { position: fixed; right: 1.25rem; bottom: 1.25rem; z-index: 150; display: flex; flex-direction: column; align-items: flex-end; gap: 0.75rem; }
body:has(.main-content-full) .support-widget { bottom: 5.75rem; }
body:has(.support-widget) .alert-stack { bottom: 5.5rem; }
body:has(.support-widget) .receipt-toast { bottom: 5.5rem; }
.support-fab { position: relative; display: grid; place-items: center; width: 3.5rem; height: 3.5rem; border: 0; border-radius: 50%; background: linear-gradient(135deg, var(--color-primary-700), var(--color-primary-850)); color: #fff; box-shadow: 0 12px 26px -8px rgba(15, 44, 42, 0.55); cursor: pointer; transition: transform var(--transition-fast), box-shadow var(--transition-fast); }
.support-fab:hover { transform: translateY(-2px) scale(1.04); box-shadow: 0 16px 30px -8px rgba(15, 44, 42, 0.6); }
.support-fab:focus-visible { outline: 3px solid var(--color-emerald-300); outline-offset: 3px; }
.support-fab .icon { width: 1.5rem; height: 1.5rem; }
.support-fab-close, .support-widget.is-open .support-fab-open { display: none; }
.support-widget.is-open .support-fab-close { display: block; }
.support-fab-dot { position: absolute; top: 0.3rem; right: 0.3rem; width: 0.8rem; height: 0.8rem; border: 2px solid #fff; border-radius: 50%; background: var(--color-amber-400); }
.support-fab-dot[hidden] { display: none; }
.support-bubble { display: flex; flex-direction: column; width: min(24rem, calc(100vw - 2rem)); height: min(36rem, calc(100vh - 8rem)); overflow: hidden; border: 1px solid var(--border-default); border-radius: var(--radius-lg); background: var(--color-surface); box-shadow: var(--shadow-lg); transform-origin: bottom right; animation: supportBubbleIn 0.2s var(--ease-out); }
.support-bubble[hidden] { display: none; }
@keyframes supportBubbleIn { from { opacity: 0; transform: translateY(10px) scale(0.96); } to { opacity: 1; transform: none; } }
.support-bubble-head { display: flex; align-items: center; gap: 0.65rem; padding: 0.85rem 0.9rem; background: linear-gradient(135deg, var(--color-primary-700), var(--color-primary-850)); color: #fff; }
.support-bubble-head > div { flex: 1; display: grid; min-width: 0; }
.support-bubble-head strong { font-size: 0.95rem; }
.support-bubble-head small { color: var(--text-inverse-muted); font-size: 0.75rem; }
.support-bubble-avatar { display: grid; place-items: center; width: 2.2rem; height: 2.2rem; border-radius: 50%; background: rgba(255, 255, 255, 0.14); flex: 0 0 auto; }
.support-bubble-avatar .icon { width: 1.15rem; height: 1.15rem; color: var(--color-emerald-300); }
.support-bubble-icon { display: grid; place-items: center; width: 2rem; height: 2rem; border: 0; border-radius: var(--radius-sm); background: transparent; color: #fff; cursor: pointer; }
.support-bubble-icon:hover { background: rgba(255, 255, 255, 0.14); }
.support-bubble-icon .icon { width: 1.1rem; height: 1.1rem; }
.support-bubble-body { flex: 1; overflow-y: auto; padding: 0.9rem; background: var(--color-canvas); }
.support-bubble-body .support-thread { max-height: none; overflow: visible; padding: 0; gap: 0.65rem; }
.support-bubble-body .support-message { max-width: 92%; padding: 0.6rem 0.8rem; }
.support-bubble-body .support-message-body { font-size: 0.875rem; }
.support-bubble-welcome p { margin: 0 0 0.6rem; font-size: 0.9rem; color: var(--text-body); }
.support-bubble-welcome[hidden] { display: none; }
.support-bubble-suggestions { display: grid; gap: 0.45rem; margin-top: 0.75rem; }
.support-bubble-suggestions button { padding: 0.55rem 0.75rem; border: 1px solid var(--border-default); border-radius: var(--radius-md); background: var(--color-surface); color: var(--color-primary-700); font: inherit; font-size: 0.85rem; font-weight: 600; text-align: left; cursor: pointer; }
.support-bubble-suggestions button:hover { border-color: var(--color-emerald-400); background: var(--color-emerald-50); }
.support-bubble-composer { display: flex; gap: 0.5rem; align-items: flex-end; padding: 0.7rem; border-top: 1px solid var(--border-subtle); background: var(--color-surface); }
.support-bubble-composer textarea { flex: 1; min-height: 2.6rem; max-height: 7.5rem; padding: 0.55rem 0.75rem; resize: none; font-size: 0.9rem; }
.support-bubble-composer .button { min-height: 2.6rem; padding: 0 0.85rem; }
.support-bubble-link { padding: 0 0.9rem 0.65rem; background: var(--color-surface); font-size: 0.78rem; font-weight: 600; color: var(--color-primary-600); text-align: right; }
.support-bubble-link[hidden] { display: none; }
@media (max-width: 640px) {
    .support-widget { right: 0.85rem; bottom: 0.85rem; }
    .support-widget.is-open { left: 0.85rem; }
    .support-bubble { width: 100%; height: calc(100vh - 7rem); }
}

/* Menu principal com submenus (Agenda, Pedidos, Configurar) */
.nav-group { position: relative; }
.nav-group-trigger { font: inherit; font-size: 0.875rem; background: transparent; cursor: pointer; }
.nav-group-chevron { width: 0.9rem !important; height: 0.9rem !important; margin-left: -0.15rem; transition: transform var(--transition-fast); }
.nav-group.is-open .nav-group-chevron { transform: rotate(180deg); }
.nav-group.is-open > .nav-group-trigger { color: #1e293b; background-color: #f8fafc; }
.nav-group-dot { display: none; width: 0.45rem; height: 0.45rem; border-radius: 50%; background: #b42334; }
.nav-group:not(.is-open):has(.nav-pending-count:not([hidden])) .nav-group-dot { display: inline-block; }
.nav-submenu { position: absolute; top: calc(100% + 0.55rem); left: 0; z-index: 120; display: none; min-width: 17.5rem; padding: 0.45rem; border: 1px solid var(--border-default); border-radius: var(--radius-lg); background: var(--color-surface); box-shadow: var(--shadow-lg); animation: navSubmenuIn 0.16s var(--ease-out); }
.nav-submenu::before { content: ''; position: absolute; left: 0; right: 0; top: -0.7rem; height: 0.7rem; }
.nav-group.is-open .nav-submenu { display: grid; gap: 0.15rem; }
@keyframes navSubmenuIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.nav-subitem { display: flex; align-items: center; gap: 0.7rem; padding: 0.55rem 0.65rem; border-radius: var(--radius-md); color: var(--text-body); text-decoration: none; }
.nav-subitem:hover { background: var(--color-surface-subtle); }
.nav-subitem.active { background: #f0fdf4; }
.nav-subitem-icon { display: grid; place-items: center; width: 2.1rem; height: 2.1rem; flex: 0 0 auto; border-radius: var(--radius-sm); background: var(--color-surface-subtle); color: var(--color-primary-600); }
.nav-subitem.active .nav-subitem-icon { background: var(--color-emerald-100); color: #16a34a; }
.nav-subitem-icon .icon { width: 1.05rem; height: 1.05rem; }
.nav-subitem-text { display: grid; flex: 1; min-width: 0; }
.nav-subitem-text > span { font-size: 0.875rem; font-weight: 600; color: var(--text-main); }
.nav-subitem.active .nav-subitem-text > span { color: #16a34a; }
.nav-subitem-text small { font-size: 0.75rem; color: var(--text-muted); white-space: nowrap; }
@media (hover: hover) and (min-width: 1025px) {
    .nav-group:hover .nav-submenu { display: grid; gap: 0.15rem; }
    .nav-group:hover .nav-group-dot { display: none; }
}
@media (max-width: 1024px) {
    .nav-group { display: grid; gap: 0.2rem; margin-top: 0.5rem; }
    .nav-group-trigger { pointer-events: none; padding: 0.35rem 0.75rem; color: var(--text-subtle) !important; background: transparent !important; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
    .nav-group-trigger > .icon, .nav-group-chevron, .nav-group-dot { display: none !important; }
    .nav-submenu, .nav-group.is-open .nav-submenu { position: static; display: grid; gap: 0.1rem; min-width: 0; padding: 0; border: 0; box-shadow: none; animation: none; background: transparent; }
    .nav-submenu::before { display: none; }
    .nav-subitem-text small { display: none; }
    .nav-subitem-icon { width: 1.9rem; height: 1.9rem; }
}
body:has(.navbar-nav.is-open) .support-widget { display: none; }

/* Dashboard: indicadores com variação e cards de gráfico */
.dashboard-kpis:has(> :nth-child(6)) > * { grid-column: span 2; }
@media (max-width: 768px) { .dashboard-kpis:has(> :nth-child(6)) > * { grid-column: auto; } }
.stat-value-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 0.75rem; }
.stat-value-row .stat-value { margin-bottom: 0.5rem; }
.stat-value-of { font-size: 1rem; font-weight: 600; color: var(--text-subtle); }
.sparkline { width: 7.5rem; height: 2.15rem; flex: 0 0 auto; margin-bottom: 0.45rem; overflow: visible; }
.sparkline-line { fill: none; stroke: #94a3b8; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.sparkline-area { fill: #2a78d6; opacity: 0.08; }
.sparkline-dot { fill: #2a78d6; stroke: #fff; stroke-width: 2; }
.stat-delta { display: flex; align-items: baseline; gap: 0.3rem; margin: 0 0 0.85rem; font-size: 0.8rem; font-weight: 700; }
.stat-delta small { font-weight: 500; color: var(--text-muted); }
.stat-delta-up { color: #15803d; }
.stat-delta-down { color: #b42334; }
.stat-delta-flat { color: var(--text-muted); }
.dashboard-charts { display: grid; gap: 1rem; margin-bottom: 2rem; }
.dashboard-charts > .panel { margin: 0; }
.chart-card { display: flex; flex-direction: column; gap: 0.75rem; min-width: 0; }
.chart-card-head h2 { margin: 0; font-family: var(--font-display); font-size: 1.05rem; color: var(--text-main); }
.chart-card-head p { margin: 0.15rem 0 0; font-size: 0.82rem; color: var(--text-muted); }
.chart-columns { position: relative; margin: 0; }
.chart-columns svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart-grid { stroke: #eef2f1; stroke-width: 1; }
.chart-baseline { stroke: #d5dedc; stroke-width: 1; }
.chart-axis { fill: var(--text-muted); font-size: 13px; font-family: var(--font-sans); }
.chart-hit { fill: transparent; cursor: default; }
.chart-hit:hover { fill: rgba(16, 44, 43, 0.04); }
.chart-legend { display: flex; flex-wrap: wrap; gap: 0.35rem 1rem; margin-top: 0.4rem; font-size: 0.8rem; color: var(--text-body); }
.chart-legend span { display: inline-flex; align-items: center; gap: 0.4rem; }
.chart-legend i, .chart-breakdown i { display: inline-block; width: 0.7rem; height: 0.7rem; border-radius: 3px; }
.chart-empty { position: absolute; inset: 0 0 2.5rem 2.5rem; display: grid; place-items: center; margin: 0; font-size: 0.85rem; color: var(--text-muted); pointer-events: none; }
.chart-table { margin-top: 0.35rem; font-size: 0.78rem; }
.chart-table summary { cursor: pointer; color: var(--text-muted); font-weight: 600; width: fit-content; }
.chart-table table { width: 100%; margin-top: 0.4rem; border-collapse: collapse; }
.chart-table th, .chart-table td { padding: 0.3rem 0.4rem; border-bottom: 1px solid var(--border-subtle); text-align: left; }
.chart-tooltip { position: fixed; z-index: 300; padding: 0.5rem 0.7rem; border-radius: var(--radius-sm); background: var(--color-primary-900); color: #fff; font-size: 0.78rem; line-height: 1.45; box-shadow: var(--shadow-md); pointer-events: none; white-space: nowrap; }
.chart-tooltip strong { display: block; margin-bottom: 0.1rem; }
.chart-tooltip[hidden] { display: none; }
.chart-hero { margin: 0.25rem 0 0; font-size: 0.9rem; color: var(--text-body); }
.chart-hero strong { display: block; font-family: var(--font-display); font-size: 2.4rem; line-height: 1.1; color: var(--text-main); }
.chart-segments { display: flex; gap: 2px; height: 0.9rem; overflow: hidden; border-radius: 4px; }
.chart-segments span { min-width: 4px; }
.chart-breakdown { display: grid; gap: 0.4rem; margin: 0.25rem 0 0; padding: 0; list-style: none; font-size: 0.875rem; }
.chart-breakdown li { display: flex; align-items: center; gap: 0.5rem; }
.chart-breakdown span { flex: 1; color: var(--text-body); }
.chart-breakdown strong { color: var(--text-main); }
.chart-card .text-link { margin-top: auto; }
.chart-empty-block { margin: auto 0; color: var(--text-muted); font-size: 0.875rem; }
.dashboard-single { margin-bottom: 2rem; }
@media (min-width: 901px) {
    .dashboard-charts { grid-template-columns: repeat(6, minmax(0, 1fr)); }
    .dashboard-charts > :nth-child(1) { grid-column: span 4; }
    .dashboard-charts > :nth-child(2) { grid-column: span 2; }
    .dashboard-charts > :nth-child(n + 3) { grid-column: span 3; }
}
@media (max-width: 900px) { .dashboard-charts { grid-template-columns: 1fr; } }
@media (max-width: 768px) {
    .stat-value-row { flex-direction: column; align-items: stretch; gap: 0; }
    .stat-value-row .stat-value { white-space: nowrap; font-size: 1.45rem; margin-bottom: 0.35rem; }
    .stat-value-row .sparkline { width: 100%; height: 1.75rem; }
    .stat-delta { flex-wrap: wrap; }
}

/* Dashboard: cabeçalho, faixa de atenção e barra de período */
.dash-hero { margin-bottom: 1.75rem; overflow: hidden; border: 1px solid var(--border-subtle); border-radius: var(--radius-xl); background: linear-gradient(120deg, #ffffff 0%, #ffffff 55%, var(--color-emerald-50) 100%); box-shadow: var(--shadow-sm); }
.dash-hero-main { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.25rem 2rem; padding: 1.6rem 1.75rem 1.4rem; }
.dash-hero-date { display: block; margin-bottom: 0.25rem; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--color-primary-500); }
.dash-hero-copy h1 { margin: 0; font-family: var(--font-display); font-size: clamp(1.6rem, 2.6vw, 2.1rem); color: var(--text-main); }
.dash-hero-status { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.75rem; margin: 0.55rem 0 0; font-size: 0.9rem; color: var(--text-body); }
.dash-hero-pill { display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.2rem 0.65rem; border-radius: var(--radius-full); font-size: 0.8rem; font-weight: 600; background: var(--color-surface-subtle); color: var(--text-body); }
.dash-hero-pill i { width: 0.5rem; height: 0.5rem; border-radius: 50%; background: var(--text-subtle); }
.dash-hero-pill.is-ok { background: var(--color-emerald-50); color: #047857; }
.dash-hero-pill.is-ok i { background: var(--color-emerald-500); box-shadow: 0 0 0 3px var(--color-emerald-100); }
.dash-hero-pill.is-warn { background: var(--color-amber-50); color: #92400e; }
.dash-hero-pill.is-warn i { background: var(--color-amber-400); }
.dash-hero-meta { color: var(--text-muted); font-size: 0.85rem; }
.dash-hero-meta::before { content: '·'; margin-right: 0.75rem; color: var(--text-subtle); }
.dash-hero-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.dash-attention { padding: 0.85rem 1.75rem 1rem; border-top: 1px solid var(--border-subtle); background: rgba(247, 250, 249, 0.85); }
.dash-attention-ok { display: flex; align-items: center; gap: 0.5rem; margin: 0; font-size: 0.875rem; font-weight: 600; color: #047857; }
.dash-attention-ok .icon { width: 1.05rem; height: 1.05rem; }
.dash-attention-title { display: block; margin-bottom: 0.5rem; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-muted); }
.dash-attention ul { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0; padding: 0; list-style: none; }
.dash-attention-item a { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.45rem 0.75rem; border: 1px solid var(--border-default); border-radius: var(--radius-md); background: var(--color-surface); color: var(--text-body); font-size: 0.85rem; text-decoration: none; transition: border-color var(--transition-fast), box-shadow var(--transition-fast); }
.dash-attention-item a:hover { box-shadow: var(--shadow-sm); }
.dash-attention-item .icon { width: 1rem; height: 1rem; flex: 0 0 auto; }
.dash-attention-item strong { display: inline-flex; align-items: center; gap: 0.2rem; margin-left: 0.25rem; font-size: 0.8rem; color: var(--color-primary-600); }
.dash-attention-item strong .icon { width: 0.85rem; height: 0.85rem; }
.dash-attention-item.is-critical a { border-color: #fecdd3; background: var(--color-rose-50); }
.dash-attention-item.is-critical > a > .icon { color: var(--color-rose-600); }
.dash-attention-item.is-warning a { border-color: rgba(245, 158, 11, 0.35); background: var(--color-amber-50); }
.dash-attention-item.is-warning > a > .icon { color: var(--color-amber-500); }
.dash-attention-item.is-info > a > .icon { color: var(--color-primary-500); }
.dash-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1rem; margin-bottom: 1.1rem; }
.dash-toolbar-title { margin-right: auto; }
.dash-toolbar-title h2 { margin: 0; font-family: var(--font-display); font-size: 1.25rem; color: var(--text-main); }
.dash-toolbar-title p { margin: 0.1rem 0 0; font-size: 0.82rem; color: var(--text-muted); }
.dash-period { display: inline-flex; padding: 0.25rem; border-radius: var(--radius-md); background: var(--color-surface-muted); }
.dash-period a { padding: 0.4rem 0.9rem; border-radius: var(--radius-sm); color: var(--text-muted); font-size: 0.85rem; font-weight: 600; text-decoration: none; white-space: nowrap; }
.dash-period a:hover { color: var(--text-main); }
.dash-period a.is-active { background: var(--color-surface); color: var(--color-primary-700); box-shadow: var(--shadow-xs); }
.dash-customize { position: relative; }
.dash-customize summary { list-style: none; }
.dash-customize summary::-webkit-details-marker { display: none; }
.dash-customize > form { position: absolute; right: 0; top: calc(100% + 0.5rem); z-index: 40; min-width: 16rem; margin: 0; box-shadow: var(--shadow-lg); }
@media (max-width: 640px) {
    .dash-hero-main { padding: 1.25rem 1.1rem 1.1rem; }
    .dash-attention { padding: 0.8rem 1.1rem 0.9rem; }
    .dash-hero-actions { width: 100%; }
    .dash-hero-actions .button { flex: 1 1 auto; justify-content: center; }
    .dash-attention-item a { flex-wrap: wrap; }
    .dash-toolbar-title { width: 100%; }
    .dash-customize summary span { display: none; }
}
/* Cabeçalho direto na página (sem card) */
.dash-hero { overflow: visible; border: 0; border-radius: 0; background: none; box-shadow: none; }
.dash-hero-main { padding: 0 0 1rem; }
.dash-attention { padding: 0; border-top: 0; background: none; }
@media (max-width: 640px) { .dash-hero-main { padding: 0 0 0.9rem; } .dash-attention { padding: 0; } }

/* Sininho de notificações (todas as telas) */
.notify { position: relative; }
.notify-toggle { position: relative; }
.notify-count { position: absolute; top: 0.1rem; right: 0.05rem; min-width: 1.05rem; height: 1.05rem; padding: 0 0.25rem; border: 2px solid #fff; border-radius: 999px; background: var(--color-amber-400); color: #fff; font-size: 0.62rem; font-weight: 800; line-height: 0.75rem; text-align: center; box-sizing: content-box; }
.notify-count.is-critical { background: #b42334; }
.notify-count[hidden] { display: none; }
.notify-panel { position: absolute; right: -0.5rem; top: calc(100% + 0.6rem); z-index: 130; width: min(23rem, calc(100vw - 1.5rem)); overflow: hidden; border: 1px solid var(--border-default); border-radius: var(--radius-lg); background: var(--color-surface); box-shadow: var(--shadow-lg); animation: navSubmenuIn 0.16s var(--ease-out); }
.notify-panel[hidden] { display: none; }
.notify-head { display: flex; align-items: baseline; justify-content: space-between; padding: 0.85rem 1rem 0.6rem; border-bottom: 1px solid var(--border-subtle); }
.notify-head strong { font-family: var(--font-display); font-size: 1rem; color: var(--text-main); }
.notify-head span { font-size: 0.78rem; color: var(--text-muted); }
.notify-list { display: grid; gap: 0.35rem; max-height: min(22rem, 60vh); margin: 0; padding: 0.6rem; overflow-y: auto; list-style: none; }
.notify-list:empty { display: none; }
.notify-item a { display: grid; grid-template-columns: auto 1fr; gap: 0.15rem 0.65rem; align-items: center; padding: 0.6rem 0.7rem; border: 1px solid var(--border-subtle); border-radius: var(--radius-md); color: var(--text-body); font-size: 0.85rem; text-decoration: none; }
.notify-item a:hover { box-shadow: var(--shadow-sm); }
.notify-item-icon { grid-row: span 2; display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: var(--radius-sm); background: var(--color-surface-subtle); color: var(--color-primary-600); }
.notify-item-icon .icon { width: 1rem; height: 1rem; }
.notify-item-text { color: var(--text-main); font-weight: 600; line-height: 1.35; }
.notify-item strong { font-size: 0.78rem; color: var(--color-primary-600); }
.notify-item.is-critical a { border-color: #fecdd3; background: var(--color-rose-50); }
.notify-item.is-critical .notify-item-icon { background: #ffe4e6; color: var(--color-rose-600); }
.notify-item.is-warning a { border-color: rgba(245, 158, 11, 0.35); background: var(--color-amber-50); }
.notify-item.is-warning .notify-item-icon { background: var(--color-amber-100); color: var(--color-amber-500); }
.notify-empty { display: flex; align-items: center; gap: 0.5rem; margin: 0; padding: 1rem; font-size: 0.875rem; font-weight: 600; color: #047857; }
.notify-empty[hidden] { display: none; }
.notify-empty .icon { width: 1.05rem; height: 1.05rem; }
.notify-sound { display: flex; align-items: center; gap: 0.55rem; width: 100%; padding: 0.75rem 1rem; border: 0; border-top: 1px solid var(--border-subtle); background: var(--color-surface-hover); color: var(--text-body); font: inherit; font-size: 0.82rem; text-align: left; cursor: pointer; }
.notify-sound:hover { background: var(--color-surface-subtle); }
.notify-sound .icon { width: 1rem; height: 1rem; color: var(--text-muted); }
.notify-sound span { flex: 1; }
.notify-sound em { font-style: normal; font-weight: 700; font-size: 0.75rem; padding: 0.1rem 0.5rem; border-radius: var(--radius-full); }
.notify-sound .sound-on { background: var(--color-emerald-50); color: #047857; }
.notify-sound .sound-off { display: none; background: var(--color-surface-muted); color: var(--text-muted); }
.notify-sound.is-muted .sound-on { display: none; }
.notify-sound.is-muted .sound-off { display: inline; }
@media (max-width: 640px) { .notify-panel { position: fixed; left: 0.75rem; right: 0.75rem; top: 4rem; width: auto; } }

/* Leads: lista e kanban por intenção */
.leads-view a { display: inline-flex; align-items: center; gap: 0.4rem; }
.leads-view .icon { width: 1rem; height: 1rem; }
.leads-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; margin-bottom: 1rem; }
.leads-filters input[type=search] { flex: 1 1 16rem; width: auto; min-width: 0; }
.leads-filters select { flex: 0 1 12rem; width: auto; }
.leads-summary { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin-bottom: 1.1rem; }
.leads-total { margin-left: auto; font-size: 0.85rem; }
.intent-chip { --intent: #94a3b8; display: inline-flex; align-items: center; gap: 0.45rem; padding: 0.4rem 0.8rem; border: 1px solid var(--border-default); border-radius: var(--radius-full); background: var(--color-surface); color: var(--text-body); font-size: 0.85rem; font-weight: 600; text-decoration: none; }
.intent-chip i, .kanban-column header i { width: 0.6rem; height: 0.6rem; border-radius: 50%; background: var(--intent); }
.intent-chip strong { color: var(--text-main); }
.intent-chip.is-active { border-color: var(--intent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--intent) 25%, transparent); }
.intent-new { --intent: #94a3b8; }
.intent-cold { --intent: #2a78d6; }
.intent-warm { --intent: #eda100; }
.intent-hot { --intent: #e34948; }
.leads-table td { vertical-align: top; }
.lead-cell { min-width: 14rem; }
.lead-cell > strong { display: block; color: var(--text-main); }
.lead-cell > small { display: block; color: var(--text-muted); }
.lead-history { margin-top: 0.3rem; font-size: 0.8rem; }
.lead-history summary { cursor: pointer; color: var(--color-primary-600); font-weight: 600; width: fit-content; }
.lead-history ul { display: grid; gap: 0.4rem; margin: 0.4rem 0 0; padding: 0; list-style: none; }
.lead-history li { display: grid; grid-template-columns: auto 1fr auto; gap: 0.5rem; align-items: start; color: var(--text-body); }
.lead-history li .icon { width: 0.95rem; height: 0.95rem; margin-top: 0.15rem; color: var(--text-muted); }
.lead-history time { color: var(--text-subtle); white-space: nowrap; }
.lead-sources { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 0.3rem; }
.lead-source { display: inline-flex; align-items: center; gap: 0.3rem; padding: 0.15rem 0.5rem; border-radius: var(--radius-full); background: var(--color-surface-subtle); color: var(--text-body); font-size: 0.75rem; font-weight: 600; white-space: nowrap; }
.lead-source .icon { width: 0.85rem; height: 0.85rem; color: var(--color-primary-600); }
.lead-source.is-icon { padding: 0.25rem; }
.lead-converted { padding: 0.05rem 0.45rem; border-radius: var(--radius-full); background: var(--color-emerald-50); color: #047857; font-size: 0.72rem; font-style: normal; font-weight: 700; }
.intent-select { width: auto; min-width: 9.5rem; padding: 0.35rem 2rem 0.35rem 0.7rem !important; border-left: 4px solid var(--intent) !important; font-size: 0.85rem !important; font-weight: 600; }
.lead-intent-form { margin: 0; }
.lead-tags { display: inline-flex; flex-wrap: wrap; gap: 0.3rem; }
.lead-tag { --tag: #64748b; padding: 0.1rem 0.5rem; border: 1px solid color-mix(in srgb, var(--tag) 40%, transparent); border-radius: var(--radius-full); background: color-mix(in srgb, var(--tag) 10%, #fff); color: var(--text-main); font-size: 0.72rem; font-weight: 600; white-space: nowrap; }
.kanban { display: grid; grid-template-columns: repeat(4, minmax(15rem, 1fr)); gap: 1rem; align-items: start; overflow-x: auto; padding-bottom: 0.5rem; }
.kanban-column { display: flex; flex-direction: column; min-height: 20rem; border-radius: var(--radius-lg); background: var(--color-surface-muted); border-top: 4px solid var(--intent); transition: box-shadow var(--transition-fast); }
.kanban-column.is-over { box-shadow: 0 0 0 2px var(--intent); }
.kanban-column header { display: flex; align-items: center; gap: 0.5rem; padding: 0.8rem 0.9rem 0.6rem; }
.kanban-column h2 { flex: 1; margin: 0; font-size: 0.95rem; color: var(--text-main); }
.kanban-count { min-width: 1.6rem; padding: 0.1rem 0.5rem; border-radius: var(--radius-full); background: var(--color-surface); color: var(--text-body); font-size: 0.78rem; font-weight: 700; text-align: center; }
.kanban-cards { display: flex; flex: 1; flex-direction: column; gap: 0.6rem; max-height: 70vh; overflow-y: auto; padding: 0 0.6rem 0.75rem; }
.kanban-card { display: grid; gap: 0.35rem; padding: 0.75rem 0.8rem; border: 1px solid var(--border-subtle); border-radius: var(--radius-md); background: var(--color-surface); box-shadow: var(--shadow-xs); cursor: grab; }
.kanban-card:hover { box-shadow: var(--shadow-sm); }
.kanban-card:focus-visible { outline: 2px solid var(--intent, var(--border-focus)); outline-offset: 2px; }
.kanban-card.is-dragging { opacity: 0.45; }
.kanban-card.is-saving { opacity: 0.7; }
.kanban-card > strong { color: var(--text-main); font-size: 0.9rem; overflow-wrap: anywhere; }
.kanban-card > small { color: var(--text-muted); font-size: 0.78rem; }
.kanban-card footer { display: flex; align-items: center; gap: 0.5rem; margin-top: 0.2rem; padding-top: 0.45rem; border-top: 1px solid var(--border-subtle); font-size: 0.75rem; color: var(--text-muted); }
.kanban-card footer time { flex: 1; }
.kanban-card footer a { display: grid; place-items: center; width: 1.6rem; height: 1.6rem; border-radius: var(--radius-sm); color: var(--color-primary-600); }
.kanban-card footer a:hover { background: var(--color-surface-subtle); }
.kanban-card footer .icon { width: 0.95rem; height: 0.95rem; }
.kanban-move { width: auto !important; max-width: 8.5rem; padding: 0.15rem 1.7rem 0.15rem 0.5rem !important; background-position: right 0.4rem center !important; font-size: 0.72rem !important; box-shadow: none !important; }
.kanban-more { padding: 0.4rem; font-size: 0.8rem; font-weight: 600; text-align: center; color: var(--color-primary-600); }
.kanban-empty { margin: 0.5rem 0; padding: 1.25rem 0.5rem; border: 2px dashed var(--border-default); border-radius: var(--radius-md); color: var(--text-subtle); font-size: 0.82rem; text-align: center; }
.kanban-empty[hidden] { display: none; }
.kanban-hint { display: flex; align-items: center; gap: 0.4rem; margin-top: 0.75rem; font-size: 0.82rem; }
.kanban-hint .icon { width: 0.95rem; height: 0.95rem; }
@media (max-width: 900px) { .kanban { grid-template-columns: repeat(4, minmax(15rem, 80vw)); } }
