* { margin: 0; padding: 0; box-sizing: border-box; }

/* FIX_20260705_AUDIT_014 (R6): extraido do style inline repetido ~24x no index.html (InBody, Acesso Medico etc) */
.input-dark { width:100%; background:#0F172A; color:#fff; border:1px solid #444; padding:7px; border-radius:5px; }
.input-dark-active { width:100%; background:#0F172A; color:#fff; border:1px solid #3B82F6; padding:7px; border-radius:5px; }
.input-dark-active-sm { background:#0F172A; color:#fff; border:1px solid #3B82F6; padding:6px; border-radius:5px; }
body { background: #0a0a0a; color: #e0e0e0; font-family: 'Segoe UI', Roboto, Arial, sans-serif; min-height: 100vh; }
.login-wrap { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 20px; background: radial-gradient(circle at top, #1a0000, #0a0a0a); }
.login-box { background: #1a1a1a; border-radius: 16px; padding: 40px; max-width: 420px; width: 100%; border: 2px solid #E60000; box-shadow: 0 0 40px rgba(230,0,0,0.3); }
.login-box h1 { color: #E60000; text-align: center; margin-bottom: 8px; font-size: 26px; }
.login-box .sub { text-align: center; color: #999; margin-bottom: 16px; font-size: 14px; }


 50% { opacity: 0.4; } }
.tabs { display: flex; gap: 8px; margin-bottom: 20px; }
.tab { flex: 1; padding: 10px; background: #2a2a2a; border: none; color: #e0e0e0; border-radius: 8px; cursor: pointer; font-size: 13px; }
.tab.active { background: #E60000; font-weight: bold; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; margin-bottom: 6px; color: #aaa; font-size: 13px; }
.form-group input { width: 100%; padding: 12px; background: #2a2a2a; border: 1px solid #444; border-radius: 8px; color: #fff; font-size: 14px; }
.form-group input:focus { outline: none; border-color: #E60000; }
.btn-primary { width: 100%; padding: 14px; background: #E60000; border: none; color: #fff; border-radius: 8px; font-size: 15px; font-weight: bold; cursor: pointer; margin-top: 8px; }
.btn-primary:hover { background: #b30000; }
.btn-secondary { padding: 10px 16px; background: #2a2a2a; border: 1px solid #444; color: #e0e0e0; border-radius: 8px; cursor: pointer; }
.error { color: #ff6b6b; font-size: 13px; margin-top: 8px; text-align: center; }
.info { color: #4dabf7; font-size: 12px; margin-top: 12px; text-align: center; }
.app { display: none; }
.app.active { display: block; }
.header { background: #1a1a1a; padding: 16px 24px; border-bottom: 2px solid #E60000; display: flex; justify-content: space-between; align-items: center; position: sticky; top: 0; z-index: 100; }
.header h1 { font-size: 20px; color: #E60000; }
.user-info { display: flex; align-items: center; gap: 16px; font-size: 13px; }
.badge { padding: 4px 10px; background: #E60000; border-radius: 12px; font-size: 11px; }
.badge.medico { background: #4dabf7; }
.nav { background: #151515; padding: 12px 24px; display: flex; gap: 8px; overflow-x: auto; border-bottom: 1px solid #2a2a2a; }
.nav button { padding: 8px 16px; background: transparent; border: 1px solid #333; color: #ccc; border-radius: 20px; cursor: pointer; white-space: nowrap; font-size: 13px; }
.nav button.active { background: #E60000; color: #fff; border-color: #E60000; }
.nav button.admin { border-color: #ffa500; color: #ffa500; }
.nav button.admin.active { background: #ffa500; color: #000; }
/* FIX_20260707_001: subabas dentro da pagina Admin */
.admin-subnav { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 22px; }
.admin-subnav-btn { padding: 9px 18px; background: transparent; border: 1px solid #3B82F6; color: #93C5FD; border-radius: 20px; cursor: pointer; white-space: nowrap; font-size: 13px; font-weight: 600; }
.admin-subnav-btn.active { background: #3B82F6; color: #fff; border-color: #3B82F6; }
.admin-subpage { display: none; }
.admin-subpage.active { display: block; }
/* FIX_20260707c: versao generica do padrao admin-subnav/admin-subpage, reaproveitada nas
   abas fundidas Glicemia&Insulina, Historico Clinico e Corpo&Atividade (ver mudarSubGlicemia/
   mudarSubHistorico/mudarSubCorpo em app.js). Mesmo visual, nome sem "admin" pra nao confundir. */
.subnav { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 22px; }
.subnav-btn { padding: 9px 18px; background: transparent; border: 1px solid #3B82F6; color: #93C5FD; border-radius: 20px; cursor: pointer; white-space: nowrap; font-size: 13px; font-weight: 600; }
.subnav-btn.active { background: #3B82F6; color: #fff; border-color: #3B82F6; }
.subpage { display: none; }
.subpage.active { display: block; }
.content { padding: 24px; max-width: 1400px; margin: 0 auto; }
.page { display: none; }
.page.active { display: block; }
.page h2 { color: #E60000; margin-bottom: 20px; font-size: 24px; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-bottom: 24px; }
.card { background: #1a1a1a; padding: 20px; border-radius: 12px; border-left: 4px solid #E60000; }
.card .label { font-size: 12px; color: #888; text-transform: uppercase; }
.card .value { font-size: 26px; color: #fff; margin-top: 6px; font-weight: bold; }
.card .sub { font-size: 12px; color: #4dabf7; margin-top: 4px; }
.section { background: #1a1a1a; border-radius: 12px; padding: 20px; margin-bottom: 20px; border: 1px solid #2a2a2a; }
table { width: 100%; border-collapse: collapse; }
table th { background: #2a2a2a; padding: 10px; text-align: left; color: #ccc; font-size: 12px; text-transform: uppercase; }
table td { padding: 10px; border-bottom: 1px solid #2a2a2a; font-size: 14px; }
table tr:hover { background: #1f1f1f; }
.docs-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.doc-card { background: #1a1a1a; padding: 16px; border-radius: 10px; border: 1px solid #2a2a2a; cursor: pointer; transition: 0.2s; }
.doc-card:hover { border-color: #E60000; transform: translateY(-2px); }
.doc-card .doc-cat { display: inline-block; padding: 3px 8px; background: #E60000; font-size: 10px; border-radius: 4px; margin-bottom: 8px; }
.doc-card .doc-cat.lab { background: #4dabf7; }
.doc-card .doc-cat.imagem { background: #ffa500; }
.doc-card .doc-cat.glicemia { background: #51cf66; }
.doc-card .doc-cat.relatorio { background: #cc5de8; }
.doc-card .doc-cat.receita { background: #20c997; }
.doc-card .doc-cat.peso { background: #F59E0B; }
.doc-card .doc-name { color: #fff; font-size: 13px; word-break: break-all; }
.doc-card .doc-info { color: #888; font-size: 11px; margin-top: 6px; }
.filter-bar { margin-bottom: 16px; display: flex; gap: 10px; flex-wrap: wrap; }
.filter-bar select, .filter-bar input { padding: 8px 12px; background: #2a2a2a; border: 1px solid #444; color: #fff; border-radius: 6px; font-size: 13px; }
#chart-glicemia, #chart-hba1c, #chart-peso, #chart-samsung-passos { height: 380px; background: #1a1a1a; border-radius: 12px; padding: 10px; }
.alert { padding: 14px; border-radius: 8px; margin-bottom: 16px; background: rgba(255,165,0,0.15); border-left: 4px solid #ffa500; color: #ffd9a0; }
.footer { text-align: center; padding: 20px; color: #555; font-size: 12px; }
.admin-only { display: none !important; }
.admin-only-inline { display: none !important; }
body.is-admin .admin-only { display: block !important; }
body.is-admin .admin-only-inline { display: inline-block !important; }
/* F11: trava de somente-leitura pro medico temporario (CRM) - esconde tudo que escreve dado,
   exceto a configuracao da calculadora (unica excecao aprovada por Ronaldo em 04/07/2026) */
body.is-medico-temporario .oculta-medico { display: none !important; }
.modal-bg { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.85); z-index: 1000; align-items: center; justify-content: center; padding: 20px; }
.modal-bg.show { display: flex; }
.modal { background: #1a1a1a; padding: 30px; border-radius: 12px; max-width: 500px; width: 100%; border: 2px solid #E60000; }
.modal h3 { color: #E60000; margin-bottom: 16px; }
.pdf-modal { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.95); z-index: 9999; align-items: center; justify-content: center; padding: 20px; }
.pdf-modal.show { display: flex; }
.pdf-modal-content { background: #1a1a1a; border-radius: 12px; border: 2px solid #E60000; width: 95%; max-width: 1200px; height: 95vh; display: flex; flex-direction: column; overflow: hidden; }
.pdf-modal-header { background: #2a2a2a; padding: 14px 20px; display: flex; justify-content: space-between; align-items: center; border-bottom: 2px solid #E60000; }
.pdf-modal-header h3 { color: #fff; font-size: 15px; margin: 0; flex: 1; }
.pdf-modal-body { flex: 1; overflow: auto; background: #2a2a2a; }
.pdf-modal-body iframe { width: 100%; height: 100%; border: none; background: white; }
.pdf-modal-footer { background: #2a2a2a; padding: 10px 20px; display: flex; justify-content: space-between; align-items: center; color: #ccc; font-size: 12px; }
.pdf-btn { background: #E60000; color: #fff; border: none; padding: 8px 14px; border-radius: 6px; cursor: pointer; font-size: 13px; margin-left: 8px; }
.pdf-btn:hover { background: #b30000; }
.pdf-btn.secondary { background: #444; }
.pdf-close { background: transparent; border: none; color: #fff; font-size: 28px; cursor: pointer; padding: 0 10px; }
.pdf-close:hover { color: #E60000; }
.resumo-medico { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; margin-bottom: 30px; }
.metric-card { background: #1a1a1a; border-radius: 12px; padding: 18px; border-left: 5px solid #444; position: relative; }
.metric-card.normal { border-left-color: #51cf66; }
.metric-card.atencao { border-left-color: #ffa500; }
.metric-card.alterado { border-left-color: #E60000; }
.metric-card.clicavel { cursor: pointer; transition: all 0.2s ease; }
.metric-card.clicavel:hover { transform: translateY(-3px); box-shadow: 0 8px 25px rgba(230,0,0,0.35); }
.metric-card .metric-name { color: #fff; font-size: 14px; font-weight: 600; margin: 6px 0; }
.metric-card .metric-value { color: #fff; font-size: 26px; font-weight: bold; }
.metric-card .metric-unit { color: #888; font-size: 14px; font-weight: normal; }
.metric-card .metric-ref { color: #4dabf7; font-size: 11px; margin-top: 6px; line-height: 1.3; }
.metric-card .metric-date { color: #666; font-size: 11px; margin-top: 4px; }
.metric-card .metric-status { position: absolute; top: 12px; right: 12px; font-size: 11px; padding: 3px 8px; border-radius: 10px; }
.metric-card.normal .metric-status { background: rgba(81,207,102,0.2); color: #51cf66; }
.metric-card.atencao .metric-status { background: rgba(255,165,0,0.2); color: #ffa500; }
.metric-card.alterado .metric-status { background: rgba(230,0,0,0.2); color: #ff6b6b; }
.metric-card .metric-link { color: #4dabf7; font-size: 11px; margin-top: 10px; text-transform: uppercase; letter-spacing: 1px; font-weight: 600; padding-top: 6px; border-top: 1px dashed #333; }
.cat-titulo { color: #E60000; font-size: 18px; margin: 20px 0 12px 0; padding-bottom: 6px; border-bottom: 2px solid #2a2a2a; }
.print-btn { background: #4dabf7; color: #fff; border: none; padding: 10px 18px; border-radius: 8px; cursor: pointer; font-size: 13px; }

/* Badge no LOGIN */
.atualizado-login { display: flex; align-items: center; justify-content: center; gap: 8px; background: rgba(81,207,102,0.1); color: #51cf66; border: 1px solid rgba(81,207,102,0.3); border-radius: 8px; padding: 10px 14px; font-size: 11px; margin-bottom: 24px; }
.atualizado-login .dot { width: 8px; height: 8px; background: #51cf66; border-radius: 50%; animation: pulse 2s infinite; }

/* Badge no HEADER (apos login) */
.atualizado-badge { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; background: rgba(81,207,102,0.15); color: #51cf66; border: 1px solid rgba(81,207,102,0.3); border-radius: 16px; font-size: 11px; margin-right: 12px; cursor: help; }
.atualizado-badge .dot { width: 8px; height: 8px; background: #51cf66; border-radius: 50%; animation: pulse 2s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }
@media (max-width: 768px) {
    .atualizado-badge { font-size: 10px; padding: 4px 8px; }
    .atualizado-badge .label-completo { display: none; }
}

/* Cards de MEDICACOES ocupam largura toda */
.resumo-medico .metric-card[data-categoria="MEDICACOES"],
.resumo-medico .metric-card.full-width { grid-column: 1 / -1; }
.metric-card.full-width .metric-value { font-size: 16px; line-height: 1.6; font-weight: 500; }

/* DIARIO */
.diario-actions { display: flex; gap: 10px; margin-bottom: 20px; flex-wrap: wrap; }
.btn-novo-evento, .btn-novo-pedido { padding: 12px 20px; border: none; border-radius: 8px; cursor: pointer; font-size: 14px; font-weight: 600; }
.btn-novo-evento { background: #E60000; color: #fff; }
.btn-novo-evento:hover { background: #b30000; }
.btn-novo-pedido { background: #4dabf7; color: #fff; }
.btn-novo-pedido:hover { background: #2196f3; }

.eventos-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; margin-bottom: 30px; }

.evento-card { background: #1a1a1a; border-radius: 12px; padding: 18px; border-left: 5px solid #444; position: relative; transition: 0.2s; }
.evento-card:hover { transform: translateY(-2px); box-shadow: 0 4px 15px rgba(230,0,0,0.2); }
.evento-card.urgente { border-left-color: #E60000; }
.evento-card.atencao { border-left-color: #ffa500; }
.evento-card.normal { border-left-color: #51cf66; }
.evento-card.realizado { border-left-color: #4dabf7; opacity: 0.7; }
.evento-card.cancelado { border-left-color: #888; opacity: 0.5; }

.evento-card .evento-tipo { display: inline-block; padding: 3px 10px; background: #2a2a2a; border-radius: 4px; font-size: 10px; text-transform: uppercase; letter-spacing: 1px; color: #ccc; margin-bottom: 8px; }
.evento-card .evento-tipo.consulta { background: #E60000; color: #fff; }
.evento-card .evento-tipo.exame { background: #4dabf7; color: #fff; }
.evento-card .evento-tipo.procedimento { background: #ffa500; color: #fff; }

.evento-card .evento-data { color: #fff; font-size: 16px; font-weight: bold; margin-bottom: 6px; }
.evento-card .evento-titulo { color: #fff; font-size: 14px; margin-bottom: 6px; }
.evento-card .evento-info { color: #888; font-size: 12px; margin-bottom: 4px; }
.evento-card .evento-actions { display: flex; gap: 6px; margin-top: 12px; padding-top: 10px; border-top: 1px dashed #333; }
.evento-card .evento-btn { padding: 6px 12px; background: #2a2a2a; color: #ccc; border: none; border-radius: 4px; cursor: pointer; font-size: 11px; }
.evento-card .evento-btn:hover { background: #E60000; color: #fff; }
.evento-card .evento-btn.realizar { background: #51cf66; color: #000; }
.evento-card .evento-btn.realizar:hover { background: #40c057; }

.evento-card .dias-restantes { position: absolute; top: 12px; right: 12px; font-size: 11px; padding: 4px 10px; border-radius: 12px; background: rgba(255,255,255,0.1); color: #fff; }
.evento-card.urgente .dias-restantes { background: rgba(230,0,0,0.3); color: #ff6b6b; }
.evento-card.atencao .dias-restantes { background: rgba(255,165,0,0.3); color: #ffa500; }

/* FORMULARIOS */
.modal-large { max-width: 600px !important; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-group textarea { width: 100%; padding: 10px; background: #2a2a2a; border: 1px solid #444; color: #fff; border-radius: 6px; font-family: inherit; font-size: 14px; resize: vertical; }
.form-group select { width: 100%; padding: 12px; background: #2a2a2a; border: 1px solid #444; color: #fff; border-radius: 6px; font-size: 14px; }

/* CALENDARIO MENSAL */
.calendario-container { background: #1a1a1a; border-radius: 12px; padding: 20px; margin-bottom: 30px; border: 1px solid #2a2a2a; }
.calendario-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid #333; }
.calendario-header h3 { color: #E60000; font-size: 20px; margin: 0; text-transform: capitalize; }
.cal-nav { background: #2a2a2a; color: #fff; border: 1px solid #444; border-radius: 6px; padding: 6px 16px; cursor: pointer; font-size: 16px; font-weight: bold; transition: 0.2s; }
.cal-nav:hover { background: #E60000; border-color: #E60000; }

.calendario-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-dia-header { background: #2a2a2a; color: #ccc; text-align: center; padding: 8px; font-size: 11px; text-transform: uppercase; letter-spacing: 1px; border-radius: 4px; font-weight: 600; }

.cal-dia { background: #222; min-height: 70px; padding: 6px; border-radius: 4px; cursor: pointer; transition: 0.15s; border: 1px solid transparent; position: relative; }
.cal-dia:hover { background: #2a2a2a; border-color: #E60000; }
.cal-dia.outro-mes { opacity: 0.3; }
.cal-dia.hoje { background: rgba(230,0,0,0.15); border-color: #E60000; }
.cal-dia.com-evento { background: #1a2a3a; }

.cal-dia-num { color: #ccc; font-size: 13px; font-weight: 600; margin-bottom: 4px; }
.cal-dia.hoje .cal-dia-num { color: #E60000; font-weight: bold; }
.cal-dia.outro-mes .cal-dia-num { color: #555; }

.cal-evento { display: block; font-size: 9px; padding: 2px 4px; margin-bottom: 2px; border-radius: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
.cal-evento.consulta { background: #E60000; color: #fff; }
.cal-evento.exame { background: #4dabf7; color: #fff; }
.cal-evento.procedimento { background: #ffa500; color: #fff; }
.cal-evento.anotacao { background: #888; color: #fff; }
.cal-evento.realizado { opacity: 0.5; text-decoration: line-through; }

.cal-mais { color: #888; font-size: 10px; font-style: italic; }

.calendario-legenda { display: flex; gap: 16px; margin-top: 16px; padding-top: 12px; border-top: 1px solid #333; flex-wrap: wrap; justify-content: center; }
.leg-item { color: #888; font-size: 11px; display: flex; align-items: center; gap: 6px; }
.leg-dot { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.leg-dot.consulta { background: #E60000; }
.leg-dot.exame { background: #4dabf7; }
.leg-dot.procedimento { background: #ffa500; }
.leg-dot.hoje { background: rgba(230,0,0,0.4); border: 1px solid #E60000; }

@media (max-width: 768px) {
  .cal-dia { min-height: 50px; padding: 3px; }
  .cal-dia-num { font-size: 11px; }
  .cal-evento { font-size: 7px; padding: 1px 2px; }
  .calendario-legenda { font-size: 10px; }
}

/* UPLOAD FILE */
.form-group input[type="file"] { width: 100%; padding: 10px; background: #2a2a2a; border: 2px dashed #444; color: #ccc; border-radius: 6px; cursor: pointer; font-size: 13px; }
.form-group input[type="file"]:hover { border-color: #E60000; }
#evento-anexo-preview, #pedido-anexo-preview { margin-top: 8px; }
.anexo-preview { padding: 8px 12px; background: #1f2937; border-radius: 6px; color: #4dabf7; font-size: 12px; display: flex; align-items: center; gap: 8px; }
.anexo-preview .remove { color: #ff6b6b; cursor: pointer; margin-left: auto; }

/* LEMBRETES HOME */
.lembretes-home { background: rgba(255,165,0,0.1); border: 1px solid rgba(255,165,0,0.3); border-radius: 12px; padding: 16px; margin-bottom: 20px; }
.lembretes-home h3 { color: #ffa500; font-size: 14px; margin-bottom: 12px; text-transform: uppercase; letter-spacing: 1px; }
.lembrete-item { background: rgba(0,0,0,0.3); padding: 10px 14px; border-radius: 6px; margin-bottom: 8px; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.lembrete-item.urgente { background: rgba(230,0,0,0.15); border-left: 4px solid #E60000; }
.lembrete-item.atencao { background: rgba(255,165,0,0.15); border-left: 4px solid #ffa500; }
.lembrete-info { flex: 1; }
.lembrete-titulo { color: #fff; font-size: 13px; font-weight: 600; }
.lembrete-detalhe { color: #ccc; font-size: 11px; margin-top: 2px; }
.lembrete-btn { background: #ffa500; color: #000; border: none; padding: 6px 12px; border-radius: 6px; font-size: 11px; cursor: pointer; font-weight: 600; white-space: nowrap; }
.lembrete-btn:hover { background: #ff8800; }

/* CALCULADORA */
.calc-config-box { background: #1a1a1a; border-radius: 12px; margin-bottom: 24px; border: 1px solid #2a2a2a; overflow: hidden; }
.calc-config-header { padding: 14px 20px; background: #2a2a2a; cursor: pointer; display: flex; justify-content: space-between; align-items: center; color: #ccc; font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; }
.calc-config-header:hover { background: #333; }
.calc-config-body { padding: 20px; }

.calculadora-main { background: #1a1a1a; border-radius: 12px; padding: 24px; margin-bottom: 24px; border: 1px solid #2a2a2a; }
.calc-form { margin-bottom: 24px; }

.calc-resultado { background: linear-gradient(135deg, #1a0000 0%, #0a0a0a 100%); border-radius: 12px; padding: 24px; border: 2px solid #E60000; min-height: 200px; }
.resultado-placeholder { text-align: center; color: #888; padding: 40px; font-size: 14px; }

.calc-result-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; margin-bottom: 20px; }
.calc-result-item { background: #1a1a1a; padding: 16px; border-radius: 8px; text-align: center; border-left: 4px solid #444; }
.calc-result-item.bolus { border-left-color: #4dabf7; }
.calc-result-item.correcao { border-left-color: #ffa500; }
.calc-result-item.total { border-left-color: #E60000; background: rgba(230,0,0,0.1); }
.calc-result-label { font-size: 11px; color: #888; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 6px; }
.calc-result-value { font-size: 32px; color: #fff; font-weight: bold; }
.calc-result-unit { font-size: 14px; color: #888; font-weight: normal; }
.calc-result-detail { font-size: 11px; color: #999; margin-top: 4px; line-height: 1.4; }

.calc-aplicar-btn { width: 100%; padding: 14px; background: #51cf66; color: #000; border: none; border-radius: 8px; font-size: 15px; font-weight: bold; cursor: pointer; margin-top: 16px; }
.calc-aplicar-btn:hover { background: #40c057; }

.calc-warning { background: rgba(255,165,0,0.1); border-left: 4px solid #ffa500; padding: 12px; border-radius: 6px; color: #ffd9a0; margin-top: 12px; font-size: 12px; }
.calc-alert { background: rgba(230,0,0,0.15); border-left: 4px solid #E60000; padding: 12px; border-radius: 6px; color: #ff9999; margin-top: 12px; font-size: 12px; }

@media (max-width: 768px) {
  .calc-result-grid { grid-template-columns: 1fr; }
  .calc-result-value { font-size: 26px; }
}

/* DIARIO CGM */
#chart-cgm { height: 400px; background: #1a1a1a; border-radius: 12px; padding: 10px; margin-bottom: 24px; }

.tir-bar { display: flex; height: 40px; border-radius: 8px; overflow: hidden; margin-bottom: 12px; }
.tir-segment { display: flex; align-items: center; justify-content: center; color: #fff; font-size: 11px; font-weight: bold; transition: 0.3s; }
.tir-segment.hipo { background: #E60000; }
.tir-segment.alvo { background: #51cf66; }
.tir-segment.acima { background: #ffa500; }
.tir-segment.muito-alto { background: #cc5de8; }

.tir-legenda { display: flex; gap: 16px; flex-wrap: wrap; font-size: 11px; color: #888; margin-bottom: 20px; }
.tir-leg-dot { width: 12px; height: 12px; border-radius: 3px; display: inline-block; margin-right: 6px; }

.comparacao-item { background: #1a1a1a; padding: 14px; border-radius: 8px; margin-bottom: 8px; border-left: 4px solid #444; }
.comparacao-item.match { border-left-color: #51cf66; }
.comparacao-item.divergente { border-left-color: #ffa500; }
.comparacao-titulo { color: #fff; font-size: 13px; font-weight: 600; }
.comparacao-info { color: #888; font-size: 11px; margin-top: 4px; }
.comparacao-diff { display: inline-block; padding: 2px 8px; border-radius: 12px; font-size: 11px; font-weight: bold; margin-left: 8px; }
.comparacao-diff.ok { background: rgba(81,207,102,0.2); color: #51cf66; }
.comparacao-diff.warn { background: rgba(255,165,0,0.2); color: #ffa500; }

/* FIX_20260704_003 (F7): impressao do Diario de Insulina Detalhado (Salvar como PDF) */
@media print {
  body.modo-impressao-diario-insulina .nav,
  body.modo-impressao-diario-insulina .page:not(#page-calculadora) {
    display: none !important;
  }
  body.modo-impressao-diario-insulina #page-calculadora {
    display: block !important;
  }
  body.modo-impressao-diario-insulina #page-calculadora > *:not(#diario-insulina-secao) {
    display: none !important;
  }
  body.modo-impressao-diario-insulina .no-print {
    display: none !important;
  }
  body.modo-impressao-diario-insulina,
  body.modo-impressao-diario-insulina #diario-insulina-secao,
  body.modo-impressao-diario-insulina .diario-insulina-dia {
    background: #fff !important;
    color: #000 !important;
  }
  body.modo-impressao-diario-insulina .diario-insulina-dia {
    border-color: #999 !important;
  }
  body.modo-impressao-diario-insulina .diario-insulina-dia h4 {
    color: #000 !important;
  }
  body.modo-impressao-diario-insulina table {
    color: #000 !important;
  }
}
