/* --------------------------------------------------------------------------
   Central do Cliente — Catcom Software
   Camada fina sobre o Bootstrap 5, com os mesmos tokens do :root de
   www.catcom.com.br (css/modern.css). Mudar as variáveis abaixo muda o
   sistema inteiro.
   -------------------------------------------------------------------------- */

:root {
    /* Paleta do site */
    --catcom-blue: #1d4ed8;        /* --primary       */
    --catcom-blue-light: #3b82f6;  /* --primary-light */
    --catcom-blue-dark: #1e40af;   /* --primary-dark  */
    --catcom-accent: #f59e0b;      /* --accent        */
    --catcom-accent-dark: #d97706; /* --accent-dark   */
    --catcom-dark: #0f172a;        /* --bg-dark       */
    --catcom-font: "Orbitron", "Inter", system-ui, sans-serif;

    --brand: var(--catcom-blue);
    --brand-dark: var(--catcom-blue-dark);
    --brand-soft: #eff6ff;

    --surface: #ffffff;
    --page-bg: #f8fafc;            /* --bg-section    */
    --border: #e2e8f0;             /* --border        */
    --text: #1e293b;               /* --text          */
    --text-muted: #475569;         /* --text-muted    */
    --text-light: #64748b;         /* --text-light    */
    --danger: #ef4444;
    --success: #16a34a;
    --warning: #f59e0b;
    --info: #0ea5e9;

    --radius: 12px;                /* --radius        */
    --radius-sm: 8px;              /* --radius-sm     */
    --radius-lg: 20px;             /* --radius-lg     */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.08);

    --bs-body-font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

    /* Faz os utilitários do Bootstrap seguirem o azul da Catcom. */
    --bs-primary: #1d4ed8;
    --bs-primary-rgb: 29, 78, 216;
    --bs-link-color: #1d4ed8;
    --bs-link-color-rgb: 29, 78, 216;
    --bs-link-hover-color: #1e40af;
    --bs-focus-ring-color: rgba(29, 78, 216, 0.1);
    --bs-border-color: #e2e8f0;
}

body {
    background-color: var(--page-bg);
    color: var(--text);
    font-family: var(--bs-body-font-family);
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    color: var(--text);
}

a {
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* ==========================================================================
   Marca
   ========================================================================== */

/* Mesma tipografia do site: Orbitron 900 no wordmark, com o gradiente que a
   catcom.com.br usa sobre fundo claro (#navbar.scrolled .logo-name). */
/* Conjunto da marca nos mesmos valores do Catcom Apps e do hotsite do
   Dentinho. O nome grande com a linha miúda e espaçada embaixo é o que faz os
   dois lerem como um logotipo, e não como imagem ao lado de texto. */
.brand-company {
    font-family: var(--catcom-font);
    font-weight: 900;
    letter-spacing: 3.5px;
    font-size: 20px;
    background: linear-gradient(135deg, #1e293b 30%, var(--catcom-blue) 70%, #7c3aed 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: var(--catcom-blue);
}

.brand-app {
    font-size: 8px;
    font-weight: 600;
    letter-spacing: 4.5px;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-top: 4px;
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1;
}

.brand-logo {
    display: block;
    filter: drop-shadow(0 3px 10px rgba(29, 78, 216, 0.3));
}

/* Classe, e não utilitário: `gap-2` do Bootstrap sai como !important e
   venceria qualquer ajuste por seletor. */
.brand-lockup {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

/* ==========================================================================
   Navegação — portal do cliente
   ========================================================================== */

.app-navbar {
    /* Translúcida com desfoque, igual à do Catcom Apps e à do hotsite: sob
       rolagem o conteúdo aparece por trás, em vez de sumir atrás de uma barra
       sólida. */
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
}

.app-navbar .navbar-brand {
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #111827;
}

.app-navbar .navbar-brand:hover {
    text-decoration: none;
}

.app-navbar .nav-link {
    color: #4b5563;
    font-weight: 500;
    border-radius: var(--radius-sm);
    padding: 0.45rem 0.8rem;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.app-navbar .nav-link:hover {
    background: #f3f4f6;
    color: #111827;
    text-decoration: none;
}

.app-navbar .nav-link.active {
    background: var(--brand-soft);
    color: var(--brand-dark);
}

.app-navbar .nav-link .badge {
    font-size: 0.65rem;
    vertical-align: middle;
}

/* ==========================================================================
   Navegação — painel interno (barra lateral)
   ========================================================================== */

.admin-shell {
    display: flex;
    min-height: 100vh;
}

.admin-sidebar {
    width: 250px;
    flex: 0 0 250px;
    background: var(--catcom-dark);
    color: #cbd5e1;
    padding: 1rem 0.75rem 2rem;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}

.admin-sidebar .sidebar-brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.5rem 0.6rem 1.25rem;
    color: #fff;
}

.admin-sidebar .sidebar-brand:hover {
    text-decoration: none;
}

/* Sobre o fundo escuro o wordmark é sólido: o gradiente do site é feito para
   fundo claro e desapareceria aqui. */
.admin-sidebar .brand-company {
    background: none;
    -webkit-text-fill-color: #fff;
    color: #fff;
}

.admin-sidebar .brand-app {
    color: #94a3b8;
}

.admin-sidebar .sidebar-section {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    color: #64748b;
    padding: 1rem 0.75rem 0.35rem;
    font-weight: 700;
}

.admin-sidebar .sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.55rem 0.75rem;
    border-radius: var(--radius-sm);
    color: #cbd5e1;
    font-size: 0.92rem;
    font-weight: 500;
}

.admin-sidebar .sidebar-link:hover {
    background: rgba(255, 255, 255, 0.07);
    color: #fff;
    text-decoration: none;
}

.admin-sidebar .sidebar-link.active {
    background: var(--catcom-blue);
    color: #fff;
    box-shadow: 0 4px 14px rgba(29, 78, 216, 0.4);
}

.admin-sidebar .sidebar-link i {
    font-size: 1rem;
    width: 1.1rem;
    text-align: center;
}

.admin-sidebar .sidebar-link .badge {
    margin-left: auto;
    font-size: 0.68rem;
}

.admin-main {
    flex: 1 1 auto;
    min-width: 0;
}

.admin-topbar {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 0.75rem 1.5rem;
    position: sticky;
    top: 0;
    z-index: 1020;
}

@media (max-width: 991.98px) {
    .admin-shell {
        display: block;
    }

    .admin-sidebar {
        width: auto;
        height: auto;
        position: static;
        padding-bottom: 1rem;
    }

    .admin-sidebar .sidebar-section {
        padding-top: 0.75rem;
    }
}

/* ==========================================================================
   Blocos de conteúdo
   ========================================================================== */

.card {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

.card-header {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    border-radius: var(--radius) var(--radius) 0 0 !important;
    font-weight: 600;
    padding: 0.85rem 1.1rem;
}

.page-title {
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 0.15rem;
}

.page-subtitle {
    color: var(--text-muted);
    margin-bottom: 0;
}

.page-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-end;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.empty-state {
    text-align: center;
    padding: 2.5rem 1rem;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 2rem;
    display: block;
    margin-bottom: 0.5rem;
    opacity: 0.5;
}

.pre-wrap {
    white-space: pre-wrap;
    word-break: break-word;
}

/* ==========================================================================
   Estatísticas
   ========================================================================== */

.stat-card .stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

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

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

.stat-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--brand-soft);
    color: var(--brand-dark);
    font-size: 1.2rem;
    flex: 0 0 auto;
}

.stat-icon.is-danger  { background: #fef2f2; color: #b91c1c; }
.stat-icon.is-success { background: #f0fdf4; color: #15803d; }
.stat-icon.is-warning { background: #fffbeb; color: #b45309; }
.stat-icon.is-info    { background: #f0f9ff; color: #0369a1; }

/* ==========================================================================
   Selos de situação
   ========================================================================== */

.badge {
    font-weight: 600;
    border-radius: 999px;
    padding: 0.35em 0.7em;
    font-size: 0.75rem;
}

.badge-soft-primary   { background: #eff6ff; color: #1d4ed8; }
.badge-soft-secondary { background: #f1f5f9; color: #475569; }
.badge-soft-success   { background: #f0fdf4; color: #15803d; }
.badge-soft-danger    { background: #fef2f2; color: #b91c1c; }
.badge-soft-warning   { background: #fffbeb; color: #b45309; }
.badge-soft-info      { background: #f0f9ff; color: #0369a1; }

/* Trilha de etapas do wizzard.
   
   Bolinhas numeradas ligadas por uma linha, distribuídas na largura. A linha
   sai de `::before` no item, e não de um elemento próprio entre eles: assim a
   marcação continua sendo uma lista de etapas — o que ela é —, sem separadores
   vazios que um leitor de tela teria de ignorar.
   
   Clicável para trás: quem quer conferir o plano escolhido volta num clique,
   sem perder o preenchido. Para a frente não anda — pular a escolha deixaria o
   contrato sem valor e ciclo para citar. */
.wizzard-trilha {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem;
}

.wizzard-etapa {
    position: relative;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.45rem;
    color: var(--text-muted);
    font-size: 0.82rem;
    text-align: center;
}

/* A linha liga o centro do círculo anterior ao deste, passando por baixo das
   bolinhas — daí o z-index na bolinha. */
.wizzard-etapa:not(:first-child)::before {
    content: "";
    position: absolute;
    top: 1.05rem;
    right: 50%;
    left: -50%;
    height: 2px;
    background: #e2e8f0;
}

.wizzard-etapa.atual::before,
.wizzard-etapa.feita::before {
    background: var(--catcom-blue);
}

.wizzard-etapa .passo {
    position: relative;
    z-index: 1;
    width: 2.1rem;
    height: 2.1rem;
    font-size: 0.9rem;
    background: #e2e8f0;
    color: #64748b;
    box-shadow: 0 0 0 4px var(--page-bg);
}

.wizzard-etapa.atual {
    color: var(--text);
    font-weight: 600;
}

.wizzard-etapa.atual .passo {
    background: var(--catcom-blue);
    color: #ffffff;
}

.wizzard-etapa.feita {
    cursor: pointer;
}

.wizzard-etapa.feita .passo {
    background: var(--catcom-blue);
    color: #ffffff;
}

.wizzard-etapa.feita:hover .passo {
    background: var(--catcom-blue-dark);
}

@media (max-width: 575.98px) {
    /* No celular sobram as bolinhas: quatro rótulos lado a lado quebram em
       três linhas cada e a trilha vira um bloco de texto. */
    .wizzard-etapa .wizzard-rotulo { display: none; }
}

/* O resumo gruda no topo: a pessoa muda de etapa e nunca perde de vista o que
   está comprando nem por quanto. Era um cartão na coluna da direita, que saía
   da tela assim que a etapa era mais alta que ele. */
.wizzard-resumo {
    position: sticky;
    top: 4.5rem;
    z-index: 3;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1.5rem;
    padding: 0.85rem 1.15rem;
    margin-bottom: 1.25rem;
    border: 1px solid var(--border);
    border-radius: 0.9rem;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    box-shadow: var(--shadow-sm);
}

.wizzard-resumo-rotulo {
    display: block;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    font-weight: 600;
}

.wizzard-total {
    font-size: 1.15rem;
}

@media (max-width: 575.98px) {
    .wizzard-resumo { gap: 1rem; }
}

/* Etapa de pagamento.
   
   Os botões do PayPal são renderizados por ele, num iframe, e ocupam 100% do
   que a caixa oferecer. Soltos no corpo do cartão viravam duas faixas da
   largura da tela — largas demais para o que são, e sem parentesco com os
   outros botões da página. A caixa dá a eles largura de botão. */
.paypal-caixa {
    max-width: 24rem;
}

.pagamento-total {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
    padding: 0.9rem 1.1rem;
    margin-bottom: 0.5rem;
    border-radius: 0.8rem;
    background: var(--brand-soft);
}

.pagamento-total strong {
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

/* Prévia do contrato dentro do wizzard.
   
   O texto vem com os títulos do documento — <h1> para o nome do contrato, <h2>
   para as cláusulas. Num documento impresso isso está certo; dentro de um
   cartão de uma tela, o <h1> saía maior que o título da própria página, e
   "Contrato de Licença de Uso de Software" ocupava duas linhas gritando.
   
   Aqui eles viram hierarquia de leitura, não de página. */
.contrato-previa {
    max-height: 26rem;
    overflow-y: auto;
    font-size: 0.9rem;
}

.contrato-previa h1 {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.contrato-previa h2 {
    font-size: 0.95rem;
    font-weight: 700;
    margin-top: 1.25rem;
    margin-bottom: 0.4rem;
}

.contrato-previa p {
    margin-bottom: 0.6rem;
}

/* ==========================================================================
   Contratação
   ========================================================================== */

/* O número do passo sai do texto e vira marcador. Escrito como "1." dentro do
   título, ele competia com o título; como círculo, guia o olho pela sequência
   sem disputar leitura. */
.passo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.6rem;
    height: 1.6rem;
    border-radius: 999px;
    background: var(--catcom-blue);
    color: #ffffff;
    font-size: 0.8rem;
    font-weight: 700;
    flex-shrink: 0;
}

/* Cada ciclo num quadro próprio, e não em fila de etiquetas: com quatro
   opções lado a lado, comparar preço é o que a pessoa está fazendo ali, e
   etiqueta em linha corrida não deixa comparar. */
.preco-opcao {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    height: 100%;
    padding: 0.6rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: 0.7rem;
    background: #f8fafc;
}

.preco-ciclo {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    font-weight: 600;
}

.preco-valor {
    font-weight: 700;
    color: var(--text);
}

/* ==========================================================================
   Listas e tabelas
   ========================================================================== */

.table > :not(caption) > * > * {
    padding: 0.75rem;
}

.table thead th {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    font-weight: 700;
    background: #f8fafc;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

.table-hover > tbody > tr:hover > * {
    background-color: #f8fafc;
}

.table td .fw-semibold {
    color: var(--text);
}

/* Lista de itens clicáveis (produtos, documentos, comunicados) */
.list-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.9rem 1.1rem;
    border-bottom: 1px solid var(--border);
    color: inherit;
}

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

a.list-row:hover {
    background: #f8fafc;
    text-decoration: none;
}

.list-row .list-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--brand-soft);
    color: var(--brand-dark);
    flex: 0 0 auto;
}

/* ==========================================================================
   Formulários — espelham .form-group input do site
   ========================================================================== */

.form-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.375rem;
}

.form-control,
.form-select {
    background-color: var(--page-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.6rem 0.85rem;
    color: var(--text);
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.form-control:focus,
.form-select:focus {
    background-color: var(--surface);
    border-color: var(--catcom-blue);
    box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.1);
}

.form-control::placeholder {
    color: #94a3b8;
}

.form-control:disabled,
.form-control[readonly] {
    background-color: #f1f5f9;
}

.input-group-text {
    background-color: var(--page-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-muted);
}

.input-group > :not(:last-child).form-control,
.input-group > :not(:last-child).input-group-text {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.input-group > :not(:first-child).form-control,
.input-group > :not(:first-child).input-group-text {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

.form-control.is-invalid,
.form-select.is-invalid {
    border-color: var(--danger);
    background-color: #fef2f2;
}

.form-control.is-invalid:focus,
.form-select.is-invalid:focus {
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12);
}

.invalid-feedback {
    color: var(--danger);
}

.form-check-input:checked {
    background-color: var(--catcom-blue);
    border-color: var(--catcom-blue);
}

.form-check-input:focus {
    border-color: var(--catcom-blue);
    box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.1);
}

.form-text {
    color: var(--text-light);
    font-size: 0.82rem;
}

/* ==========================================================================
   Botões — mesmas regras do .btn/.btn-primary do site
   ========================================================================== */

.btn {
    font-weight: 600;
    border-radius: var(--radius-sm);
    transition: background-color 0.15s ease, border-color 0.15s ease,
                transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-primary {
    --bs-btn-bg: var(--catcom-blue);
    --bs-btn-border-color: var(--catcom-blue);
    --bs-btn-hover-bg: var(--catcom-blue-dark);
    --bs-btn-hover-border-color: var(--catcom-blue-dark);
    --bs-btn-active-bg: var(--catcom-blue-dark);
    --bs-btn-active-border-color: var(--catcom-blue-dark);
    --bs-btn-disabled-bg: var(--catcom-blue);
    --bs-btn-disabled-border-color: var(--catcom-blue);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(29, 78, 216, 0.3);
}

.btn-outline-primary {
    --bs-btn-color: var(--catcom-blue);
    --bs-btn-border-color: var(--catcom-blue);
    --bs-btn-hover-bg: var(--catcom-blue);
    --bs-btn-hover-border-color: var(--catcom-blue);
    --bs-btn-active-bg: var(--catcom-blue-dark);
    --bs-btn-active-border-color: var(--catcom-blue-dark);
}

.btn-success {
    --bs-btn-bg: var(--success);
    --bs-btn-border-color: var(--success);
    --bs-btn-hover-bg: #15803d;
    --bs-btn-hover-border-color: #15803d;
    --bs-btn-active-bg: #15803d;
    --bs-btn-active-border-color: #15803d;
}

.btn-warning {
    --bs-btn-bg: var(--catcom-accent);
    --bs-btn-border-color: var(--catcom-accent);
    --bs-btn-color: #fff;
    --bs-btn-hover-bg: var(--catcom-accent-dark);
    --bs-btn-hover-border-color: var(--catcom-accent-dark);
    --bs-btn-hover-color: #fff;
    --bs-btn-active-color: #fff;
}

.btn:hover {
    text-decoration: none;
}

/* ==========================================================================
   Tela de entrada (login, cadastro, recuperação)
   ========================================================================== */

.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    background: linear-gradient(160deg, #eff6ff 0%, var(--page-bg) 45%, var(--page-bg) 100%);
}

.auth-card {
    width: 100%;
    max-width: 440px;
}

.auth-card.is-wide {
    max-width: 720px;
}

.auth-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.auth-brand img {
    filter: drop-shadow(0 3px 10px rgba(29, 78, 216, 0.3));
}

.auth-brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1;
    text-align: left;
}

/* Espelha .logo-name / .logo-tagline do catcom.com.br. */
.auth-brand-name {
    font-family: var(--catcom-font);
    font-size: 24px;
    font-weight: 900;
    letter-spacing: 4px;
    background: linear-gradient(135deg, #1e293b 30%, var(--catcom-blue) 70%, #7c3aed 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: var(--catcom-blue);
}

.auth-brand-tagline {
    font-size: 8.5px;
    font-weight: 600;
    letter-spacing: 5px;
    text-transform: uppercase;
    color: #475569;
    margin-top: 3px;
}

/* --------------------------------------------------------------------------
   Assinatura da empresa sob o cartão de login.

   `width: 100%` e `margin-inline: auto` para o parágrafo ocupar a largura do
   cartão em vez de encolher até o texto — encolhido, ele deixa de acompanhar o
   eixo do cartão quando a tela é estreita e o conteúdo não cabe.

   `overflow-wrap` deixa o endereço quebrar em vez de esticar o container.
   -------------------------------------------------------------------------- */
.auth-footer {
    width: 100%;
    margin: 2rem auto 0;
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-muted);
    overflow-wrap: anywhere;
}

/* ==========================================================================
   Chamados — conversa
   ========================================================================== */

.ticket-thread {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.ticket-message {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    padding: 1rem 1.1rem;
}

/* Mensagem da equipe: destaque azul à esquerda, para o cliente localizar a
   resposta ao rolar a conversa. */
.ticket-message.is-team {
    border-left: 3px solid var(--catcom-blue);
    background: #fbfdff;
}

.ticket-message.is-internal {
    border-left: 3px solid var(--catcom-accent);
    background: #fffbeb;
}

.ticket-message.is-system {
    background: #f8fafc;
    border-style: dashed;
    color: var(--text-muted);
    font-size: 0.87rem;
    padding: 0.6rem 1.1rem;
}

.ticket-message .message-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.6rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.ticket-message .message-author {
    font-weight: 600;
    color: var(--text);
}

.ticket-message .message-body {
    white-space: pre-wrap;
    word-break: break-word;
    line-height: 1.65;
}

.avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--brand-soft);
    color: var(--brand-dark);
    font-size: 0.78rem;
    font-weight: 700;
    flex: 0 0 auto;
}

.avatar.is-team {
    background: var(--catcom-blue);
    color: #fff;
}

/* ==========================================================================
   SLA
   ========================================================================== */

.sla-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.78rem;
    font-weight: 600;
    border-radius: 999px;
    padding: 0.25rem 0.65rem;
}

.sla-chip.is-dentro    { background: #f0fdf4; color: #15803d; }
.sla-chip.is-atencao   { background: #fffbeb; color: #b45309; }
.sla-chip.is-estourado { background: #fef2f2; color: #b91c1c; }
.sla-chip.is-encerrado,
.sla-chip.is-indefinido { background: #f1f5f9; color: #475569; }

/* ==========================================================================
   Financeiro
   ========================================================================== */

.money {
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.money-lg {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.pix-code {
    font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
    font-size: 0.78rem;
    line-height: 1.5;
    word-break: break-all;
    background: var(--page-bg);
    border: 1px dashed var(--border);
    border-radius: var(--radius-sm);
    padding: 0.85rem;
    color: var(--text);
}

.payment-option {
    display: block;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem;
    background: var(--surface);
    height: 100%;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.payment-option:hover {
    border-color: var(--catcom-blue);
    box-shadow: var(--shadow-md);
    text-decoration: none;
}

.payment-option .payment-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--brand-soft);
    color: var(--brand-dark);
    font-size: 1.15rem;
    margin-bottom: 0.6rem;
}

/* Linha de destaque no topo de fatura vencida */
.alert-overdue {
    border-left: 4px solid var(--danger);
}

/* ==========================================================================
   Definições (ficha do cliente / contrato)
   ========================================================================== */

.definition-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 0.9rem 1.5rem;
    margin: 0;
}

.definition-list .definition-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-light);
    font-weight: 700;
    margin-bottom: 0.15rem;
}

.definition-list .definition-value {
    font-size: 0.95rem;
    color: var(--text);
    word-break: break-word;
}

/* ==========================================================================
   Progresso e diversos
   ========================================================================== */

.progress {
    background-color: #eef0f5;
    border-radius: 999px;
}

.progress-bar {
    background-color: var(--brand);
}

.progress-thin {
    height: 6px;
}

.text-brand {
    color: var(--catcom-blue) !important;
}

.bg-brand-soft {
    background-color: var(--brand-soft) !important;
}

.hover-lift {
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.hover-lift:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.article-body {
    line-height: 1.75;
    color: var(--text);
}

.article-body h2,
.article-body h3 {
    margin-top: 1.5rem;
    font-size: 1.1rem;
}

.article-body ul,
.article-body ol {
    padding-left: 1.25rem;
}

.article-body table {
    width: 100%;
    margin: 1rem 0;
    border-collapse: collapse;
}

.article-body table th,
.article-body table td {
    border: 1px solid var(--border);
    padding: 0.5rem 0.7rem;
    text-align: left;
}

.article-body table th {
    background: var(--page-bg);
    font-weight: 600;
}

.article-body code {
    background: var(--page-bg);
    border-radius: 4px;
    padding: 0.1rem 0.3rem;
    color: var(--brand-dark);
}

.article-body blockquote {
    border-left: 3px solid var(--border);
    padding-left: 1rem;
    color: var(--text-muted);
}

/* ==========================================================================
   Impressão (segunda via da fatura)
   ========================================================================== */

.print-sheet {
    max-width: 820px;
    margin: 2rem auto;
    background: #fff;
    padding: 2.5rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

@media print {
    body {
        background: #fff;
    }

    .no-print {
        display: none !important;
    }

    .print-sheet {
        margin: 0;
        border: 0;
        padding: 0;
        max-width: none;
    }
}
