/* =====================================================
   LUMIS – BASE VISUAL (SaaS)
   ===================================================== */

/* =========================
   RESET GLOBAL
   ========================= */

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    color: #444;
}

/* =========================
   LOGIN / AUTENTICAÇÃO
   ========================= */

body.auth {
    background: linear-gradient(135deg, #EAF6F1, #F5F7F6);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.box {
    background: #fff;
    padding: 30px;
    width: 100%;
    max-width: 420px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}

/* =========================
   LOGO AUTH
   ========================= */

.logo-auth span {
    display: block;
    text-align: center;
    margin-bottom: 20px;
}

.logo-auth img {
    max-width: 260px;
    margin-bottom: 8px;
}


/* =========================
   TÍTULOS E TEXTO
   ========================= */

h2 {
    color: #4A4A4A;
    margin: 0;
}

label {
    font-size: 15px;     /* ↑ */
    color: #4A4A4A;
    margin-bottom: 8px;  /* ↑ */
}


/* =========================
   INPUTS
   ========================= */

input,
select,
textarea {
    width: 100%;
    padding: 12px 14px;   /* ↑ mais altura */
    border-radius: 8px;
    border: 1px solid #ccc;
    font-size: 15px;     /* ↑ fonte maior */
    font-family: inherit;
}


textarea {
    resize: vertical;
}

/* =========================
   BOTÕES
   ========================= */

.btn {
    all: unset;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 46px;
    padding: 0 22px;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-atestado {
    background-color:#f84666;
    color:#fff;
}

.btn-atestado:hover {
    background-color: #f19fac
}

.btn-outline {
    background: transparent;
    border: 1px solid #bbb;
    color: #444;
}

.btn-outline:hover {
    background: #f5f5f5;
    border-color: #999;
}

.btn-360 {
    background-color: #F59E0B;
    color: #fff;
}

.btn-360:hover {
    background-color: #D97706;
}

.btn-timeline {
    background-color: #374151;
    color: #fff;
}

.btn-timeline:hover {
    background-color: #1F2937;
}



.btn-roxo { 
    background: #6C5CE7; 
    color: #fff; 
} 

.btn-roxo:hover { 
    background: #5A4AD1; 
} 

.btn-azul { 
    background: #0d6efd; 
    color: #fff; 
    border: none; 
} 

.btn-azul:hover { 
    background: #347de9; 
} 

.btn-vermelho { 
    background:#c0392b; 
    color: #fff; 
    border: none; 
} 

.btn-vermelhor:hover { 
    background:#c9a6a2; 
}

.btn-novo {
    background: #2f7d5a;
    color: #fff;
}

.btn-novo:hover {
    opacity: 0.9;
}

.btn-voltar {
    background: #e0e0e0;
    color: #444;
}

.btn-voltar:hover {
    background: #d5d5d5;
}

/* =========================
   TOPO DAS TELAS
   ========================= */

.top-actions {
    margin: 20px 0 30px 20px;
}

/* =====================================================
   FORMULÁRIOS – PADRÃO LUMIS
   ===================================================== */

/* Área total do formulário */
form {
    max-width: 1024px;
    padding: 0 24px;           /* espaço lateral elegante */
}

/* Linha genérica */
.form-row {
    display: grid;
    gap: 14px;                 /* aproxima os campos */
    margin-bottom: 18px;
}

/* 3 colunas (Nome / CPF / Data) */
.row-3 {
    grid-template-columns: 2fr 1fr 1fr;
}

/* 6 colunas (CEP / Endereço / Nº / Bairro / Cidade / UF) */
.row-6 {
    grid-template-columns: 1fr 3fr 0.8fr 1.5fr 1.5fr 0.7fr;
}

/* Grupo de campo (ÚNICO, SEM DUPLICAÇÃO) */
.form-group {
    display: flex;
    flex-direction: column;
}

/* Campo ocupando linha inteira */
.form-group.full {
    grid-column: 1 / -1;
}

/* Campos especiais */
.form-group.numero input {
    text-align: center;
}

.form-group.estado input {
    text-transform: uppercase;
}

/* =========================
   AÇÕES DO FORMULÁRIO
   ========================= */

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 25px;
}

/* =========================
   TABELAS (PACIENTES / LISTAS)
   ========================= */

.table,
.tabela {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    font-size: 14px;
}

.table th,
.table td,
.tabela th,
.tabela td {
    padding: 12px;
    border-bottom: 1px solid #eee;
    text-align: left;
}

.tabela thead {
    background: #f4f6f8;
}

/* =========================
   STATUS
   ========================= */

.status {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 13px;
}

.status.ativo {
    background: #e3f7ef;
    color: #0f5132;
}

.status.inativo {
    background: #f8d7da;
    color: #842029;
}

/* =========================
   AÇÕES EM TABELAS
   ========================= */

.acoes {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.acoes .btn {
    padding: 6px 10px;
    font-size: 12px;
}

/* =========================
   PRONTUÁRIO – TEXTO CLÍNICO
   ========================= */

.prontuario-texto {
    font-size: 15px;
    line-height: 1;
    color: #2f2f2f;
}

.prontuario-texto strong {
    color: #1f7a5c;
}

/* =========================
   SEPARADOR <hr>
   ========================= */

hr {
    border: none;
    border-top: 1px solid #e0e0e0;
    margin: 32px 0;     /* ↑ espaço em cima e embaixo */
}

/* Espaçamento lateral do conteúdo principal */
.content main {
    padding: 30px 40px;
}

/* Tabela Movimentação Financeira */
.tabela-financeiro {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.tabela-financeiro th,
.tabela-financeiro td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid #E0E0E0;
}

.tabela-financeiro th {
    font-weight: bold;
    color: #444;
}

/* Largura das colunas */
.tabela-financeiro th:nth-child(1),
.tabela-financeiro td:nth-child(1) {
    width: 140px;
}

.tabela-financeiro th:nth-child(2),
.tabela-financeiro td:nth-child(2) {
    width: 50%;
}

.tabela-financeiro th:nth-child(3),
.tabela-financeiro td:nth-child(3) {
    width: 140px;
}

.tabela-financeiro th:nth-child(4),
.tabela-financeiro td:nth-child(4) {
    width: 160px;
    text-align: right;
}

/* ===== TOPBAR ===== */

.topbar {
    height: 60px;
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    padding: 0 24px;

    display: flex;
    align-items: center;
    justify-content: space-between;
}

.topbar-left {
    display: flex;
    gap: 20px;
}

.topbar-item {
    font-size: 14px;
    color: #4b5563;
}

.topbar-right {
    font-size: 14px;
    font-weight: 500;
    color: #111827;
}


/* ======== PACIENTE 360 ======== */

.bloco {
    margin-bottom: 20px;
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.bloco h3 {
    margin-bottom: 10px;
    color: #2f7d5b;
}


/* ======== TIMELINE PACIENTE 360 ======== */

.status-paciente {
    padding: 10px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-weight: bold;
}

.status-ativo {
    background: #e6f7f0;
    color: #1a7f5a;
}

.status-acompanhamento {
    background: #e8f1fb;
    color: #2a5fa0;
}

.status-inativo {
    background: #fdecea;
    color: #b42318;
}

.timeline {
    border-left: 3px solid #ddd;
    padding-left: 20px;
}

.timeline-item {
    margin-bottom: 20px;
    position: relative;
}

.timeline-item::before {
    content: '';
    width: 12px;
    height: 12px;
    border-radius: 50%;
    position: absolute;
    left: -27px;
    top: 5px;
}

.timeline-item.sessao::before {
    background: #4CAF50;
}

.timeline-item.prontuario::before {
    background: #2196F3;
}

.timeline-item.financeiro::before {
    background: #FF9800;
}

.timeline-data {
    font-size: 13px;
    color: #666;
}

.timeline-conteudo {
    background: #fff;
    padding: 12px;
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(0,0,0,.05);
}

/* =====================================================
   LOGIN – ISOLADO (SEM CONFLITO COM O SISTEMA)
   ===================================================== */

body.auth .login-box {
    background: #ffffff;
    padding: 32px;
    width: 100%;
    max-width: 420px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}

/* Logo */
body.auth .login-logo {
    text-align: center;
    margin-bottom: 22px;
}

body.auth .login-logo img {
    max-width: 180px;
    margin-bottom: 8px;
}

body.auth .login-logo span {
    font-size: 13px;
    color: #6B7280;
}

/* Título */
body.auth .login-box h2 {
    text-align: center;
    color: #374151;
    margin-bottom: 20px;
}

/* Labels */
body.auth .login-box label {
    display: block;
    margin-top: 14px;
    font-size: 14px;
    color: #374151;
}

/* Inputs */
body.auth .login-box input {
    width: 100%;
    padding: 11px;
    margin-top: 6px;
    border-radius: 6px;
    border: 1px solid #D1D5DB;
    font-size: 14px;
}

body.auth .login-box input:focus {
    outline: none;
    border-color: #10B981;
}

/* Botão login */
body.auth .btn-login {
    width: 100%;
    margin-top: 22px;
    height: 46px;
    background: #10B981;
    border: none;
    color: #ffffff;
    font-size: 15px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
}

body.auth .btn-login:hover {
    background: #059669;
}

/* Erro */
body.auth .alert-error {
    background: #FEE2E2;
    color: #991B1B;
    padding: 10px;
    border-radius: 6px;
    margin-bottom: 15px;
    font-size: 14px;
    text-align: center;
}

/* =========================
   LINKS AUTH – PADRÃO LUMIS
   ========================= */

body.auth .link {
    text-align: center;
    margin-top: 18px;
}

body.auth .link a {
    color: #2f7d5a;          /* verde Lumis */
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
}

body.auth .link a:hover {
    text-decoration: underline;
}

body.auth .link a:visited {
    color: #2f7d5a;          /* impede roxo de link visitado */
}

/* =========================
   AJUSTES FINAIS – LOGIN LUMIS
   ========================= */

/* Centraliza logo e slogan */
body.auth .logo-auth {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

/* Garante que a imagem não fique inline */
body.auth .logo-auth img {
    display: block;
    margin: 0 auto 8px auto;
}

/* =========================
   LOGIN – BOTÃO FINAL (FUNCIONA)
   ========================= */

body.auth form {
    padding: 0; /* remove deslocamento visual */
}

body.auth .btn-login {
    width: 100%;
    height: 46px;

    display: flex;
    justify-content: center;
    align-items: center;

    margin-top: 20px;

    background: #2f7d5a;
    color: #fff;
    font-size: 15px;
    font-weight: 600;

    border: none;
    border-radius: 6px;
    cursor: pointer;
}

body.auth .btn-login:hover {
    opacity: 0.9;
}

.form-busca {
    display: flex;
    gap: 12px;              /* ← espaço entre input e botão */
    max-width: 500px;
    margin-bottom: 20px;    /* espaço abaixo da busca */
}

.form-busca input {
    flex: 1;
    padding: 10px;
}

.btn-disabled {
    background: #ccc;
    color: #666;
    cursor: not-allowed;
}
.red {
    color: #c0392b;
}

/* =========================
   ANIMAÇÃO GERAR IA 
   ========================= */

   #ia-loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ia-loading-box {
    background: #fff;
    padding: 30px 40px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
    animation: fadeIn 0.3s ease-in-out;
}

.ia-spinner {
    width: 55px;
    height: 55px;
    border: 6px solid #ddd;
    border-top: 6px solid #6c5ce7;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

.ia-text {
    font-size: 16px;
    color: #333;
    line-height: 1.4;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to   { opacity: 1; transform: scale(1); }
}


/* ===== AÇÕES DA AGENDA – ESTILO SISTEMA (SEM SUBLINHADO) ===== */

.acoes-agenda {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    white-space: nowrap;
}

/* Ação padrão */
.acao-link {
    background: #f3f4f6;
    border: 1px solid #d1d5db;
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
    color: #374151;
    text-decoration: none;       /* 🔴 remove underline */
    font-size: 13px;
    line-height: 1.2;
}

/* Hover */
.acao-link:hover {
    background: #e5e7eb;
    color: #111827;
}

/* Botão Sala – menor */
.acao-sala {
    background: #eef2ff;
    border-color: #c7d2fe;
}

/* Excluir */
.acao-excluir {
    background: #fee2e2;
    border-color: #fecaca;
    color: #991b1b;
}

.acao-excluir:hover {
    background: #fecaca;
    color: #7f1d1d;
}

/* Remove aparência de botão HTML */
.acao-link:focus {
    outline: none;
}

/* Input invisível */
.input-hidden {
    position: absolute;
    left: -9999px;
}

/* =========================================================
   ATESTADO PSICOLÓGICO (PDF)
   ========================================================= */

.atestado-pdf {
    font-family: DejaVu Sans, sans-serif;
    margin: 40px;
    color: #333;
    font-size: 14px;
}

/* ===== HEADER ===== */
.atestado-pdf .header {
    text-align: center;
    margin-bottom: 30px;
}

.atestado-pdf .header h1 {
    font-size: 22px;
    letter-spacing: 1px;
    margin-bottom: 5px;
    text-transform: uppercase;
}

.atestado-pdf .header .subtitle {
    font-size: 13px;
    color: #666;
    margin-top: 4px;
}

.atestado-pdf .header .logo {
    max-width: 330px;
    max-height: 190px;
    margin-bottom: 15px;
}

/* ===== DIVIDER ===== */
.atestado-pdf .divider {
    width: 100%;
    height: 2px;
    background: #444;
    margin: 20px 0;
}

/* ===== SECTIONS ===== */
.atestado-pdf .section {
    margin-bottom: 20px;
}

.atestado-pdf .section-title {
    font-weight: bold;
    margin-bottom: 6px;
    font-size: 14px;
    text-transform: uppercase;
}

.atestado-pdf .section-content {
    font-size: 14px;
    line-height: 1.6;
    text-align: justify;
}

/* ===== FOOTER / ASSINATURA ===== */
.atestado-pdf .footer {
    margin-top: 60px;
    text-align: center;
}

.atestado-pdf .signature {
    margin-top: 50px;
}

.atestado-pdf .signature-line {
    width: 300px;
    border-top: 1px solid #000;
    margin: 0 auto 8px;
}

.atestado-pdf .signature p {
    margin: 0;
    font-size: 13px;
}

.atestado-pdf .location-date {
    margin-top: 40px;
    font-size: 14px;
    text-align: right;
}

/* ========== CABEÇALHO ATESTADO ====== */

.atestado-pdf .title-atestado {
    text-align: center;
    font-size: 28px;
    font-weight: 700;
    letter-spacing: 3px;
    margin: 20px 0 40px 0;
    font-family: "DejaVu Serif", serif;
}

