:root {
    --sidebar-width: 248px;
    --brand: #1c5cab;
    --page: #f6f7f9;
    --ink-muted: #6b7280;
    --good: #006300;
    --bad: #b42318;
}

body {
    background: var(--page);
    font-size: 0.95rem;
}

[x-cloak] {
    display: none !important;
}

/* ---------------------------------------------------------------- layout */
/* !important: no desktop o .offcanvas-lg do Bootstrap força fundo transparente. */
.app-sidebar {
    --bs-offcanvas-width: var(--sidebar-width);
    --bs-offcanvas-bg: #0f2742;
    width: var(--sidebar-width);
    background: #0f2742 !important;
    color: #dbe4ee;
}

@media (max-width: 575.98px) {
    /* No celular a tabela mostra o essencial; conta e detalhes ficam na edição. */
    .table > :not(caption) > * > * {
        padding: 0.5rem 0.4rem;
    }
}

@media (min-width: 992px) {
    .app-sidebar {
        position: fixed;
        inset: 0 auto 0 0;
        overflow-y: auto;
    }

    .app-main {
        margin-left: var(--sidebar-width);
    }
}

.app-brand {
    color: #fff;
    font-weight: 700;
    font-size: 1.15rem;
    text-decoration: none;
}

.nav-group {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #7f93a8;
    padding: 0.9rem 0.75rem 0.25rem;
}

.app-nav .nav-link {
    color: #c5d1de;
    border-radius: 0.5rem;
    padding: 0.38rem 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.app-nav .nav-link:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.app-nav .nav-link.active {
    background: #1c5cab;
    color: #fff;
}

.app-topbar {
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
    position: sticky;
    top: 0;
    z-index: 1020;
}

/* ---------------------------------------------------------------- componentes */
.card {
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
}

.stat-label {
    color: var(--ink-muted);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.stat-value {
    font-size: 1.45rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    line-height: 1.2;
}

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

.text-good {
    color: var(--good) !important;
}

.text-bad {
    color: var(--bad) !important;
}

.cat-dot {
    display: inline-block;
    width: 0.65rem;
    height: 0.65rem;
    border-radius: 50%;
    margin-right: 0.35rem;
    flex: none;
}

.chart-box {
    position: relative;
    height: 280px;
}

.chart-box.tall {
    height: 340px;
}

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

.table thead th {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--ink-muted);
    font-weight: 600;
    white-space: nowrap;
}

.row-actions .btn {
    padding: 0.15rem 0.45rem;
}

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

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

.account-icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.6rem;
    display: grid;
    place-items: center;
    color: #fff;
    font-size: 1.15rem;
    flex: none;
}

/* ---------------------------------------------------------------- telas de entrada (login, cadastro, senha)
   Padrao da familia NDR | GESTOR: foto em tela cheia + cartao de vidro fosco no centro.
   A foto fica em assets/img/login-bg.jpg; sem ela, vale o degrade azul. */
.auth-body {
    background: #0b1f38;
}

.auth-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px 16px;
    background:
        linear-gradient(180deg, rgba(11, 31, 56, 0.1), rgba(11, 31, 56, 0.35)),
        url("../img/login-bg.jpg") center / cover no-repeat,
        linear-gradient(140deg, #0b1f38 0%, #123a6b 55%, #1c5cab 100%);
}

.auth-glass {
    width: 100%;
    max-width: 500px;
    padding: 36px 40px 26px;
    color: #fff;
    display: flex;
    flex-direction: column;
    gap: 16px;
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.2), rgba(11, 31, 56, 0.32));
    border: 1px solid rgba(255, 255, 255, 0.45);
    border-radius: 24px;
    box-shadow: 0 32px 64px rgba(15, 23, 42, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.35);
    -webkit-backdrop-filter: blur(18px) saturate(150%);
    backdrop-filter: blur(18px) saturate(150%);
    text-shadow: 0 1px 3px rgba(15, 23, 42, 0.5);
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .auth-glass {
        background: rgba(11, 31, 56, 0.88);
    }
}

.auth-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    color: #fff;
    text-decoration: none;
}

.auth-brand:hover {
    color: #fff;
}

.auth-brand-logo {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    flex: none;
    font-size: 1.8rem;
    background: linear-gradient(160deg, #1baf7a, #128a5f);
    box-shadow: 0 8px 20px rgba(18, 138, 95, 0.45);
}

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

.auth-brand-family {
    font-size: 1.3rem;
    letter-spacing: 0.08em;
}

.auth-brand-module {
    font-size: 2rem;
    font-weight: 800;
}

.auth-tagline {
    text-align: center;
    margin: 0;
}

.auth-card h1 {
    color: #fff;
    text-align: center;
}

.auth-glass .form-label,
.auth-glass .form-check-label {
    color: #fff;
}

.auth-glass .form-text,
.auth-glass .text-muted,
.auth-glass .text-secondary {
    color: rgba(255, 255, 255, 0.8) !important;
}

.auth-glass .form-control,
.auth-glass .form-select {
    height: 50px;
    border-radius: 12px;
    color: #fff;
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.55);
}

.auth-glass .form-select option {
    color: #0f172a;
}

.auth-glass .form-control::placeholder {
    color: rgba(255, 255, 255, 0.75);
}

.auth-glass .form-control:focus {
    background-color: rgba(255, 255, 255, 0.18);
    border-color: #fff;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.25);
}

.auth-glass .form-control:-webkit-autofill {
    -webkit-text-fill-color: #fff;
    caret-color: #fff;
    transition: background-color 9999s ease-in-out 0s;
}

.auth-glass .btn-primary {
    height: 50px;
    border-radius: 12px;
    font-weight: 700;
    border: 0;
    background: linear-gradient(180deg, #1baf7a, #128a5f);
    box-shadow: 0 12px 24px rgba(18, 138, 95, 0.4);
}

.auth-glass .btn-primary:hover:not(:disabled) {
    background: linear-gradient(180deg, #22c58b, #128a5f);
}

.auth-glass a:not(.auth-brand):not(.btn) {
    color: #fff;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.auth-glass .alert {
    text-shadow: none;
}

.auth-foot {
    text-align: center;
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.8rem;
    margin: 0;
}

@media (max-width: 575.98px) {
    .auth-glass {
        padding: 28px 20px 20px;
    }

    .auth-brand-logo {
        width: 50px;
        height: 50px;
    }

    .auth-brand-family {
        font-size: 1.05rem;
    }

    .auth-brand-module {
        font-size: 1.6rem;
    }
}

.notif-menu {
    width: min(360px, 92vw);
}

.notif-list {
    max-height: 60vh;
    overflow-y: auto;
}

.day-head {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--ink-muted);
    font-weight: 600;
}

.toast-container {
    z-index: 2000;
}

.pet-photo {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 50%;
    object-fit: cover;
    flex: none;
    background: #e5e7eb;
    display: grid;
    place-items: center;
    color: #6b7280;
    font-size: 1.4rem;
}

.score-ring {
    font-size: 3rem;
    font-weight: 700;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

/* Impressao (relatorios): so o conteudo, sem menu nem botoes. "Imprimir" gera o PDF pelo navegador. */
@media print {
    .app-sidebar, .app-topbar, .no-print, .toast-container, .modal { display: none !important; }
    .app-main { margin-left: 0 !important; }
    body { background: #fff; }
    .card { border: 0; }
    .table-responsive { overflow: visible !important; }
}

.tip-card {
    border-width: 1px 1px 1px 4px;
}
