/* ===========================
   CRM OFTALMOLÓGICO – CSS GLOBAL
   =========================== */

/* 🎨 VARIÁVEIS */
:root {
    --font-base: 'Inter', system-ui, -apple-system, BlinkMacSystemFont,
                 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;

    --text-primary: #212529;
    --text-muted: #6c757d;

    --border-color: #dee2e6;
    --bg-light: #f8f9fa;
    --row-hover: #f8fafc;
}

/* 🔤 BASE */
body {
    font-family: var(--font-base);
    font-size: 14px;
    font-weight: 400;
    color: var(--text-primary);
}

/* 🧭 TÍTULOS */
h1, h2, h3, h4, h5 {
    font-weight: 600;
    letter-spacing: -0.2px;
}

h4 {
    font-size: 1.1rem;
}

/* 🧾 LABELS */
label,
.form-label {
    font-weight: 500;
}

/* =================================================
   📊 TABELAS – PADRÃO CRM / SAAS
   ================================================= */

/* Base */
.table {
    font-family: var(--font-base);
}

/* Cabeçalho */
.table thead th,
.table thead.table-light th {
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #495057;
    background-color: var(--bg-light);
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
    vertical-align: middle;
    padding: 0.4rem 0.45rem;
}

/* Corpo */
.table tbody td {
    font-size: 0.78rem;
    font-weight: 400;
    padding: 0.32rem 0.45rem;
    line-height: 1.2;
    color: var(--text-primary);
    vertical-align: middle;
}

/* Hover */
.table tbody tr:hover {
    background-color: var(--row-hover);
}

/* Primeira coluna (Paciente) */
.table tbody td:first-child {
    font-weight: 500;
    letter-spacing: -0.1px;
}

/* ===== COLUNA DE AÇÕES ===== */

.table td.text-center {
    white-space: nowrap;
}

.table td.text-center .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0 2px;
    padding: 0.25rem 0.35rem;
}

/* 🏷 BADGES */
.badge {
    font-weight: 600;
    letter-spacing: 0.03em;
    border-radius: 6px;
    padding: 0.32em 0.55em;
    font-size: 0.68rem;
}

/* 🔘 BOTÕES */
.btn {
    font-weight: 500;
}

/* 🧩 ÍCONES */
.bi {
    vertical-align: middle;
}

/* Ícones na tabela */
.table i.bi {
    font-size: 1rem;
    cursor: pointer;
}

/* Ícones dentro de botões */
.table .btn i {
    font-size: 0.85rem;
}

/* 🔍 TOOLTIP */
.tooltip-inner {
    font-size: 0.75rem;
    padding: 6px 8px;
}

/* 🔗 LINKS LIMPOS */
a {
    text-decoration: none;
}

a:hover {
    text-decoration: none;
}

/* =================================================
   📝 FORMULÁRIOS – PADRÃO CRM / SAAS
   ================================================= */

/* Inputs, selects e textareas */
.form-control,
.form-select,
textarea,
input,
select {
    font-family: var(--font-base) !important;
    font-size: 0.85rem;
    font-weight: 400;
    color: var(--text-primary);
}

/* Placeholder (inputs e textarea) */
.form-control::placeholder,
textarea::placeholder {
    font-family: var(--font-base);
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Select placeholder ("Selecione") */
.form-select {
    color: var(--text-muted);
}

/* Quando selecionado */
.form-select option {
    color: var(--text-primary);
    font-weight: 400;
}

/* Labels acima dos campos */
.form-label {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-primary);
}

/* Altura mais elegante dos campos */
.form-control,
.form-select {
    padding: 0.45rem 0.6rem;
    line-height: 1.2;
}

/* =================================================
	🔘 BOTÕES – PADRÃO CRM / SAAS
   ================================================= */

/* Botões padrão */
.btn {
    font-family: var(--font-base) !important;
    font-size: 0.8rem;        /* 🔽 menor */
    font-weight: 500;
    line-height: 1.2;
    padding: 0.45rem 0.75rem; /* 🔽 mais compacto */
    border-radius: 6px;
}

/* Botões primários (Salvar, Confirmar, etc.) */
.btn-primary {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

.btn-primary:hover {
    background-color: #0b5ed7;
    border-color: #0b5ed7;
}

/* Botões com ícone */
.btn i {
    font-size: 0.8rem;
    margin-right: 0.25rem;
    vertical-align: middle;
}

/* Botões de ação da tabela */
.table .btn {
    padding: 0.25rem 0.35rem;
    font-size: 0.75rem;
}

/* Grupo de botões (se usar futuramente) */
.btn-group .btn {
    border-radius: 6px;
}

/* Usuário logado no menu */
.sidebar-user {
    font-size: 0.75rem;
    opacity: 0.9;
}

.sidebar-user i {
    font-size: 1rem;
}

/* ===== POPOVER ESTILO MINI-MODAL ===== */

.popover {
    max-width: 320px;
    font-family: var(--font-base);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,.12);
}

.popover-header {
    font-size: 0.75rem;
    font-weight: 600;
    background-color: #f8f9fa;
}

.popover-body {
    font-size: 0.75rem;
    max-height: 180px;
    overflow-y: auto;
}

/* Lista dentro do popover */
.popover-body ul {
    padding-left: 14px;
    margin: 0;
}

.popover-body li {
    margin-bottom: 4px;
    line-height: 1.3;
}


/* ===== DASHBOARD CARDS – ESTILO SAAS ===== */

.dashboard-card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow:
        0 8px 24px rgba(0, 0, 0, 0.06),
        0 2px 6px rgba(0, 0, 0, 0.04);
    border: 1px solid #eef1f5;
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Header do card */
.dashboard-card-header {
    padding: 14px 18px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #0d6efd;
    border-bottom: 1px solid #eef1f5;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Ícone de opções (⋮) */
.dashboard-card-header .options {
    color: #adb5bd;
    cursor: pointer;
}

.dashboard-card-header .options:hover {
    color: #495057;
}

/* Corpo */
.dashboard-card-body {
    padding: 18px;
}

/* Área do gráfico */
.dashboard-chart {
    height: 260px;
}


.obs-modal {
    position: fixed;
    max-width: 380px;
    z-index: 1055;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 8px 30px rgba(0,0,0,.15);
    padding: 12px;
    font-size: 13px;
    pointer-events: none;
}

.obs-content strong {
    font-size: 14px;
}

.obs-text {
    max-height: 200px;
    overflow-y: auto;
    white-space: pre-line;
    color: #495057;
}

