/* =============================================================
   SISTEMA TIRZ - Estilos Customizados
   ============================================================= */

:root {
    --tirz-blue:   #0d6efd;
    --tirz-green:  #198754;
    --tirz-bg:     #f0f4f8;
    --tirz-card:   #ffffff;
    --tirz-radius: 0.6rem;
}

/* ----- Layout Base ----- */
body {
    background-color: var(--tirz-bg);
    font-size: 0.925rem;
    color: #333;
}

/* ----- Navbar ----- */
.navbar {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.navbar-brand {
    font-size: 1.1rem;
    letter-spacing: 0.03em;
}

/* ----- Cards ----- */
.card {
    border-radius: var(--tirz-radius);
    border: none;
    transition: box-shadow 0.2s ease;
}

.card:hover {
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.10) !important;
}

/* ----- Cards de Estatísticas ----- */
.stat-icon {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.1;
}

.stat-label {
    font-size: 0.78rem;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ----- Tabelas ----- */
.table th {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6c757d;
    font-weight: 600;
    white-space: nowrap;
}

.table td {
    vertical-align: middle;
}

.table-hover tbody tr:hover {
    background-color: #f0f6ff;
}

/* ----- Formulários ----- */
.form-label {
    font-size: 0.85rem;
    margin-bottom: 0.3rem;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--tirz-blue);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.15);
}

/* ----- Badges de dosagem ----- */
.badge-dosagem {
    font-size: 0.78rem;
    font-weight: 600;
}

/* ----- Página de Login ----- */
.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0a58ca 0%, #0d6efd 60%, #6ea8fe 100%);
}

.login-card {
    width: 100%;
    max-width: 420px;
    border-radius: 1rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
}

.login-logo {
    font-size: 2.5rem;
}

/* ----- Paginação ----- */
.pagination {
    margin-top: 1rem;
    margin-bottom: 0;
}

/* ----- Alertas auto-dismiss ----- */
.alert {
    border-radius: var(--tirz-radius);
}

/* ----- Link WhatsApp ----- */
.link-whatsapp {
    color: #25d366;
    text-decoration: none;
    font-weight: 500;
}

.link-whatsapp:hover {
    color: #128c7e;
    text-decoration: underline;
}

/* ----- Badge de retorno urgente ----- */
.badge-retorno-urgente   { background-color: #dc3545 !important; }
.badge-retorno-atencao   { background-color: #ffc107 !important; color: #000 !important; }
.badge-retorno-normal    { background-color: #6c757d !important; }

/* ----- Botões de ação na tabela ----- */
.btn-acao {
    padding: 0.2rem 0.5rem;
    font-size: 0.8rem;
}

/* ----- Seção de retornos próximos no dashboard ----- */
.retorno-item {
    border-left: 4px solid var(--tirz-blue);
    padding-left: 0.75rem;
}

/* ----- Responsive: tabela em telas pequenas ----- */
@media (max-width: 576px) {
    .stat-value {
        font-size: 1.4rem;
    }

    .table th,
    .table td {
        font-size: 0.78rem;
    }
}
