html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

/*CSS de .btn*/
.btn-create {
    display: inline-block;
    padding: 0.45rem 1.2rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: #ffffff;
    background-color: #21897e; /* teal médio */
    border: 1px solid #1a6d64;
    border-radius: 0.375rem;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.05s ease;
}

    .btn-create:hover {
        background-color: #1d756c; /* ligeiramente mais escuro */
        border-color: #165851;
    }

    .btn-create:active {
        background-color: #185f58;
        border-color: #124741;
        transform: translateY(1px);
    }

    .btn-create:focus,
    .btn-create:focus-visible {
        outline: none;
        box-shadow: 0 0 0 3px rgba(33, 137, 126, 0.45);
    }


.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
}

:root {
    --lv-bg: #041421;
    --lv-bg-soft: #0b2436;
    --lv-accent: #e9b35a;
    --lv-accent-soft: #f4d18a;
    --lv-text: #f5f5f5;
    --lv-muted: #93a4b5;
}

body {
    background-color: var(--lv-bg);
    color: var(--lv-text);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
    color: var(--lv-accent);
}

    a:hover {
        color: var(--lv-accent-soft);
    }

.lv-shell {
    display: flex;
    min-height: 100vh;
}

/* SIDEBAR */

.lv-sidebar {
    width: 260px;
    background: radial-gradient(circle at top, #17354a 0%, var(--lv-bg-soft) 45%, var(--lv-bg) 100%);
    border-right: 1px solid rgba(233,179,90,.25);
    padding: 1.25rem 1rem;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
}

.lv-sidebar-header {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin-bottom: 1.5rem;
}

.lv-logo {
    width: 48px;
    height: 48px;
    border-radius: 999px;
    overflow: hidden;
    border: 1px solid rgba(233,179,90,.65);
    box-shadow: 0 0 12px rgba(233,179,90,.6);
}

    .lv-logo img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

.lv-brand {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.lv-brand-title {
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.lv-brand-sub {
    font-size: .75rem;
    color: var(--lv-muted);
}

.lv-nav {
    margin-top: .75rem;
    display: flex;
    flex-direction: column;
    gap: .25rem;
}

.lv-nav-section-title {
    font-size: .70rem;
    text-transform: uppercase;
    letter-spacing: .12em;
    color: var(--lv-muted);
    margin: .75rem 0 .25rem;
}

.lv-nav-link {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .55rem .75rem;
    border-radius: .55rem;
    color: var(--lv-text);
    text-decoration: none;
    font-size: .9rem;
    transition: all .15s ease-in-out;
}

    .lv-nav-link i {
        font-size: 1rem;
        width: 20px;
        text-align: center;
        color: var(--lv-accent-soft);
    }

    .lv-nav-link span {
        flex: 1;
    }

    .lv-nav-link:hover,
    .lv-nav-link.active {
        background: linear-gradient(90deg, rgba(233,179,90,.16), transparent);
        color: var(--lv-accent-soft);
    }

.lv-sidebar-footer {
    margin-top: auto;
    font-size: .75rem;
    color: var(--lv-muted);
}

/* MAIN */

.lv-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: radial-gradient(circle at top, #123047 0%, #020a11 55%);
}

.lv-topbar {
    height: 64px;
    border-bottom: 1px solid rgba(233,179,90,.25);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    backdrop-filter: blur(6px);
    background-color: rgba(4,20,33,.9);
    position: sticky;
    top: 0;
    z-index: 20;
}

.lv-topbar-left {
    display: flex;
    align-items: center;
    gap: .75rem;
}

.lv-topbar-title {
    font-size: 1.05rem;
    font-weight: 500;
}

.lv-topbar-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.lv-user-chip {
    display: flex;
    align-items: center;
    gap: .5rem;
    font-size: .9rem;
    color: var(--lv-muted);
}

.lv-avatar-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid rgba(233,179,90,.6);
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle, #204261 0%, #041421 75%);
    font-size: .8rem;
    font-weight: 600;
    color: var(--lv-accent-soft);
}

.lv-topbar-btn {
    border-radius: 999px;
    border: 1px solid rgba(233,179,90,.5);
    padding: .25rem .9rem;
    font-size: .85rem;
    color: var(--lv-text);
    background: transparent;
}

    .lv-topbar-btn:hover {
        background: rgba(233,179,90,.14);
        color: var(--lv-accent-soft);
    }

.lv-content {
    padding: 1.5rem;
}

.lv-footer {
    margin-top: auto;
    padding: .75rem 1.5rem;
    font-size: .75rem;
    color: var(--lv-muted);
    border-top: 1px solid rgba(233,179,90,.25);
}

/* MOBILE */

@media (max-width: 992px) {
    .lv-shell {
        flex-direction: column;
    }

    .lv-sidebar {
        position: fixed;
        z-index: 30;
        height: 100vh;
        transform: translateX(-100%);
        transition: transform .2s ease-in-out;
    }

        .lv-sidebar.open {
            transform: translateX(0);
        }
}

:root {
    --primary-color: #2C3E50;
    --success-color: #66BB6A;
    --warning-color: #FFA726;
    --danger-color: #EF5350;
    --info-color: #42A5F5;
    --light-bg: #F8F9FA;
    --border-color: #DEE2E6;
}

.relatorio-container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.header-section {
    border-bottom: 3px solid var(--primary-color);
    padding-bottom: 1.5rem;
    margin-bottom: 2rem;
}

.patient-info {
    background: var(--light-bg);
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
}

    .patient-info h5 {
        color: var(--primary-color);
        font-weight: 600;
        margin-bottom: 1rem;
    }

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.info-item {
    display: flex;
    flex-direction: column;
}

.info-label {
    font-size: 0.85rem;
    color: #6C757D;
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.info-value {
    font-size: 1.1rem;
    color: var(--primary-color);
    font-weight: 600;
}

.section-title {
    color: var(--primary-color);
    font-weight: 600;
    margin: 2rem 0 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border-color);
}

.indicators-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.indicator-card {
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    transition: transform 0.2s, box-shadow 0.2s;
}

    .indicator-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    }

.indicator-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.indicator-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary-color);
}

.indicator-status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status-normal {
    background: #E8F5E9;
    color: #2E7D32;
    border-left: 4px solid var(--success-color);
}

.status-abaixo {
    background: #FFF3E0;
    color: #E65100;
    border-left: 4px solid var(--warning-color);
}

.status-acima {
    background: #FFF3E0;
    color: #E65100;
    border-left: 4px solid var(--warning-color);
}

.status-critico {
    background: #FFEBEE;
    color: #C62828;
    border-left: 4px solid var(--danger-color);
}

.indicator-value-display {
    text-align: center;
    padding: 1rem 0;
}

.indicator-value {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1;
}

.indicator-unit {
    font-size: 1rem;
    color: #6C757D;
    margin-left: 0.25rem;
}

.indicator-classification {
    text-align: center;
    font-size: 0.9rem;
    font-weight: 600;
    color: #495057;
    margin: 0.5rem 0;
}

.indicator-range {
    background: var(--light-bg);
    padding: 0.75rem;
    border-radius: 6px;
    text-align: center;
    font-size: 0.85rem;
    margin: 1rem 0;
}

.range-label {
    color: #6C757D;
    margin-bottom: 0.25rem;
}

.range-values {
    font-weight: 600;
    color: var(--primary-color);
}

.indicator-recommendation {
    background: #F8F9FA;
    border-left: 3px solid var(--info-color);
    padding: 0.75rem;
    font-size: 0.85rem;
    color: #495057;
    border-radius: 4px;
    margin-top: 1rem;
}

.evolution-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem;
    border-radius: 12px;
    margin: 2rem 0;
}

.evolution-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.evolution-item {
    text-align: center;
}

.evolution-label {
    font-size: 0.9rem;
    opacity: 0.9;
    margin-bottom: 0.5rem;
}

.evolution-value {
    font-size: 2rem;
    font-weight: 700;
}

.evolution-trend {
    font-size: 0.85rem;
    margin-top: 0.25rem;
    opacity: 0.9;
}

.chart-container {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    border: 2px solid var(--border-color);
    margin-bottom: 2rem;
}

.chart-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

/* Estilos para impressão */
@media print {
    .btn, .no-print {
        display: none !important;
    }

    .relatorio-container {
        box-shadow: none;
        padding: 0;
    }

    .indicator-card {
        break-inside: avoid;
        page-break-inside: avoid;
    }

    .section-title {
        page-break-after: avoid;
    }
}

/* Responsividade */
@media (max-width: 768px) {
    .relatorio-container {
        padding: 1rem;
    }

    .indicators-grid {
        grid-template-columns: 1fr;
    }

    .evolution-grid {
        grid-template-columns: 1fr;
    }
}

@media print {
    body {
        margin: 0;
        padding: 10px;
        font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    }

    .btn, .navbar, footer, .d-flex.justify-content-between {
        display: none !important;
    }

    .relatorio-container {
        box-shadow: none;
        margin: 0;
        padding: 0;
        background: white;
    }

    .page-break {
        page-break-after: always;
    }

    .no-print {
        display: none;
    }
}

.no-print {
    display: block;
}

@media print {
    .no-print {
        display: none !important;
    }

    .relatorio-container {
        box-shadow: none !important;
        margin: 0 !important;
        padding: 20px !important;
        max-width: none !important;
    }

    canvas {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}

.chart-container {
    height: 350px; /* ALTURA FIXA */
}

    .chart-container canvas {
        max-height: 280px !important; /* LIMITAR CANVAS */
    }