/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

html {
  min-height: 100%;
  background: #f3f3f3;
}

body {
  min-height: 100vh;
  margin: 0;
  background: #f3f3f3;
}

.siapd-page {
  min-height: calc(100vh - 80px);
  background: #f3f3f3;
  padding-top: 1px;
  padding-bottom: 1px;
}

summary {
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}

.dashboard-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 130px;
  background: #f8f8f8;
  border-radius: 12px;
  text-decoration: none;
  color: #333;
  transition: 0.2s ease;
  gap: 10px;
}

.dashboard-tile:hover {
  background: #e6f2ff;
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.08);
}

.dashboard-tile span:last-child {
  font-size: 14px;
  font-weight: 500;
}

/* Odontograma: estilos isolados pelo prefixo odt-. */
.odt-form-layout { display:grid; gap:20px; }
.odt-form-layout__visual,.odt-form-layout__details { min-width:0; }
.odt-form-layout__details { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:end; gap:16px; }
.odt-form-layout__details > .uk-card { min-width:0; }
.odt-wrap { display:grid; gap:14px; min-width:0; }
.odt-board { min-width:0; padding:20px 22px; overflow:hidden; background:#fbfcfd; border:1px solid #dbe3ea; border-radius:10px; }
.odt-panel { min-width:0; padding:16px 18px; background:#fff; border:1px solid #dbe3ea; border-radius:10px; }
.odt-heading { display:flex; justify-content:space-between; align-items:flex-start; flex-wrap:wrap; gap:12px; padding-bottom:13px; border-bottom:1px solid #e8edf2; }
.odt-title { margin:0 0 4px; color:#243746; font-size:14px; font-weight:700; letter-spacing:.01em; }
.odt-help { margin:0; color:#6b7c8c; font-size:11px; line-height:1.4; }
.odt-legend { display:flex; flex-wrap:wrap; gap:14px; color:#536575; font-size:11px; }
.odt-legend span { display:inline-flex; align-items:center; gap:6px; }
.odt-swatch { display:inline-block; width:11px; height:11px; border:1px solid #a7b3bd; border-radius:50%; }
.odt-swatch--pending,.odt-wrap [data-state="pendente"] { fill:#d83b3b !important; background:#d83b3b; }
.odt-swatch--treated,.odt-wrap [data-state="tratado"] { fill:#2878c8 !important; background:#2878c8; }
.odt-swatch--empty { background:#fff; }
.odt-arch { margin-top:18px; }
.odt-arch h6 { margin:0 0 8px; color:#6b7c8c; font-size:11px; font-weight:600; text-transform:uppercase; letter-spacing:.08em; }
.odt-row { display:flex; justify-content:center; align-items:flex-end; gap:6px; min-width:max-content; overflow-x:visible; padding:4px 8px 8px; }
.odt-board { overflow-x:auto; scrollbar-width:thin; }
.odt-arch:last-child .odt-row { align-items:flex-start; }
.odt-midline { flex:0 0 16px; height:190px; margin:0 3px; border-left:1px solid #ced7df; }
.odt-tooth { --odt-status:#aab6c0; box-sizing:border-box; position:relative; display:flex; flex:0 0 66px; width:66px; min-height:202px; padding:3px 4px 5px; flex-direction:column; align-items:center; justify-content:flex-end; border:1px solid transparent; border-radius:6px; outline:none; background:transparent; transition:background-color .15s,border-color .15s,box-shadow .15s; }
.odt-arch:last-child .odt-tooth { justify-content:flex-start; }
.odt-tooth:hover { background:#f3f7fa; }
.odt-tooth:focus-visible,.odt-tooth.is-active { background:#eef6fc; border-color:#82afd2; box-shadow:0 0 0 2px rgba(45,116,170,.12); }
.odt-tooth__num { position:relative; color:#314858; font-size:12px; font-weight:700; line-height:20px; }
.odt-tooth__num::before { content:""; display:inline-block; width:5px; height:5px; margin-right:5px; vertical-align:1px; background:var(--odt-status); border-radius:50%; }
.odt-tooth__status { width:100%; min-height:18px; color:#71808d; font-size:8px; line-height:1.15; text-align:center; overflow-wrap:anywhere; }
.odt-tooth__conditions { display:flex; min-height:17px; max-width:62px; align-items:center; justify-content:center; gap:2px; }
.odt-tooth__conditions span { display:inline-flex; min-width:16px; height:15px; padding:0 3px; align-items:center; justify-content:center; box-sizing:border-box; background:#e8f0f6; border:1px solid #c8d8e4; border-radius:8px; color:#31566f; font-size:8px; font-weight:700; line-height:1; }
.odt-anatomy { width:60px; height:112px; overflow:visible; }
.odt-anatomy__region { fill:#fff; stroke:#657887; stroke-width:.9; stroke-linecap:round; stroke-linejoin:round; cursor:pointer; transition:fill .15s,stroke .15s,filter .15s; }
.odt-anatomy__region:hover { fill:#f2f7fa; stroke:#304b5e; }
.odt-anatomy__region:focus { outline:none; filter:drop-shadow(0 0 2px rgba(31,99,151,.55)); }
.odt-anatomy__root { fill:#f9fbfc; }
.odt-anatomy__crown { fill:#fff; }
.odt-anatomy__enamel { fill:none; stroke:#c4cfd7; stroke-width:.65; pointer-events:none; }
.odt-faces { width:43px; height:43px; overflow:visible; }
.odt-face { fill:#fff; stroke:#81919d; stroke-width:.8; cursor:pointer; transition:fill .12s,stroke .12s; }
.odt-face:hover,.odt-face:focus { fill:#eef4f7; stroke:#2f4a5c; stroke-width:1.2; outline:none; }
.odt-wrap[data-odontograma-readonly-value="true"] .odt-face,
.odt-wrap[data-odontograma-readonly-value="true"] .odt-anatomy__region { cursor:default; }
.odt-panel__empty { margin:4px 0 0; color:#6b7c8c; font-size:12px; }
.odt-panel__fields { display:grid; grid-template-columns:1.05fr .9fr 1fr 1.6fr auto; align-items:end; gap:12px; }
.odt-panel__fields[hidden] { display:none; }
.odt-panel__fields .uk-margin-small { margin:0 !important; }
.odt-panel__actions { align-self:end; min-width:150px; }
.odt-conditions-editor { grid-column:1 / -1; padding:13px 14px; background:#f8fafc; border:1px solid #e1e8ee; border-radius:8px; }
.odt-conditions-editor__heading { display:flex; align-items:baseline; justify-content:space-between; flex-wrap:wrap; gap:8px; margin-bottom:10px; color:#304858; font-size:13px; }
.odt-conditions-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:6px 24px; }
.odt-conditions-group { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); align-content:start; gap:5px 12px; }
.odt-condition-option { display:flex; min-width:0; align-items:flex-start; gap:7px; padding:4px 5px; border-radius:5px; color:#3f5362; font-size:11px; line-height:1.25; cursor:pointer; }
.odt-condition-option:hover { background:#edf3f7; }
.odt-condition-option input { flex:0 0 auto; margin-top:1px; accent-color:#2878c8; }
.odt-tooth--higido { --odt-status:#34a56f; }
.odt-tooth--cariado { --odt-status:#d94848; }
.odt-tooth--restaurado { --odt-status:#347fbd; }
.odt-tooth--ausente { --odt-status:#7f8c96; opacity:.62; }
.odt-tooth--extracao { --odt-status:#e88b2c; }
.odt-tooth--endo { --odt-status:#9068b5; }

@media (max-width:1199px) {
  .odt-row { justify-content:flex-start; }
  .odt-panel__fields { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .odt-conditions-grid { grid-template-columns:1fr; }
  .odt-panel__actions { grid-column:1 / -1; }
}
@media (max-width:639px) {
  .odt-form-layout__details { grid-template-columns:1fr; }
  .odt-board,.odt-panel { padding:13px; }
  .odt-tooth { flex-basis:60px; width:60px; }
  .odt-row { gap:3px; padding-inline:2px; }
  .odt-panel__fields { grid-template-columns:1fr; }
  .odt-conditions-group { grid-template-columns:1fr; }
  .odt-panel__actions { grid-column:auto; }
}

/* Resumo compacto do odontograma na página do paciente */
.odt-summary-card { display:block; color:inherit; text-decoration:none !important; transition:transform .15s,box-shadow .15s; }
.odt-summary-card:hover { color:inherit; transform:translateY(-1px); box-shadow:0 8px 24px rgba(31,51,68,.1); }
.odt-summary-metrics { display:flex; gap:6px; flex-wrap:wrap; justify-content:flex-end; }
.odt-summary-metrics > span { display:grid; min-width:62px; padding:6px 9px; background:#f5f8fa; border:1px solid #dce5eb; border-radius:8px; text-align:center; }
.odt-summary-metrics strong { color:#29485d; font-size:16px; line-height:1; }
.odt-summary-metrics small { margin-top:3px; color:#71808d; font-size:9px; text-transform:uppercase; letter-spacing:.04em; }
.odt-summary-metric--pending strong { color:#c43f3f; }
.odt-summary-metric--treated strong { color:#276fa8; }
.odt-resumo-visual { display:grid; gap:10px; margin-top:14px; }
.odt-resumo-arcada { padding:10px 12px; background:#f8fafb; border:1px solid #e0e7ec; border-radius:9px; }
.odt-resumo-titulo { margin-bottom:7px; color:#546877; font-size:10px; font-weight:700; text-transform:uppercase; letter-spacing:.05em; }
.odt-resumo-linha { display:flex; flex-wrap:nowrap; gap:7px; overflow-x:auto; padding:3px 1px 5px; scrollbar-width:thin; }
.odt-resumo-linha--centro { justify-content:center; }
.odt-dot-wrap { display:flex; flex:0 0 25px; min-width:25px; flex-direction:column; align-items:center; gap:3px; }
.odt-mini-tooth { position:relative; display:block; width:19px; height:22px; overflow:hidden; background:#fff; border:1px solid #aebcc6; border-radius:7px 7px 9px 9px; box-shadow:inset 0 -3px 0 var(--odt-summary-status,#edf1f4); }
.odt-mini-tooth::after { content:""; position:absolute; inset:4px; border:1px solid rgba(91,109,122,.28); border-radius:3px; }
.odt-mini-tooth i { position:absolute; z-index:1; bottom:2px; width:calc(var(--amount) * 10%); height:4px; max-width:50%; }
.odt-mini-tooth__pending { left:2px; background:#d94848; }
.odt-mini-tooth__treated { right:2px; background:#347fbd; }
.odt-dot-num { color:#4c6272; font-size:9px; font-weight:700; line-height:1; }
.odt-dot--vazio { --odt-summary-status:#edf1f4; background:#fff; }
.odt-dot--higido { --odt-summary-status:#55b987; background:#f1fbf6; }
.odt-dot--cariado { --odt-summary-status:#dc5a5a; background:#fff5f5; }
.odt-dot--restaurado { --odt-summary-status:#4d91c7; background:#f2f8fc; }
.odt-dot--ausente { --odt-summary-status:#8796a1; background:#edf1f3; opacity:.6; }
.odt-dot--extracao { --odt-summary-status:#e59643; background:#fff8ef; }
.odt-dot--endo { --odt-summary-status:#9570b7; background:#faf6fd; }
.odt-legenda { display:flex; flex-wrap:wrap; gap:12px; margin-top:10px; }
.odt-legenda-item { display:inline-flex; align-items:center; gap:5px; color:#657684; font-size:10px; }
.odt-summary-status-dot { display:inline-block; width:10px; height:10px; background:var(--odt-summary-status); border:1px solid rgba(72,91,105,.2); border-radius:50%; }

@media (max-width:639px) {
  .odt-summary-metrics { justify-content:flex-start; }
  .odt-summary-metrics > span { min-width:54px; }
  .odt-resumo-linha--centro { justify-content:flex-start; }
}

/* Relógio para escolher horário (controllers/relogio_controller.js) */
.relogio-campo {
  position: relative;
  display: flex;
  gap: 6px;
}

.relogio-campo .uk-input {
  flex: 1;
  min-width: 0;
}

.relogio-botao {
  padding: 0 12px;
}

.relogio-painel {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 1010;
  width: 260px;
  max-width: calc(100vw - 32px);
  padding: 12px;
  box-sizing: border-box;
}

.relogio-topo {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 4px;
  font-size: 28px;
  margin-bottom: 8px;
}

.relogio-parte {
  border: 0;
  background: transparent;
  font: inherit;
  color: #999;
  cursor: pointer;
  padding: 0 4px;
  border-radius: 4px;
}

.relogio-parte.ativa {
  color: #1e87f0;
}

.relogio-mostrador {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #f3f3f3;
}

.relogio-numero {
  position: absolute;
  transform: translate(-50%, -50%);
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  font-size: 13px;
  cursor: pointer;
  color: #333;
}

.relogio-numero.interno {
  font-size: 11px;
  color: #777;
}

.relogio-numero:hover,
.relogio-numero:focus-visible {
  background: rgba(30, 135, 240, .15);
  outline: none;
}

.relogio-numero.selecionado {
  background: #1e87f0;
  color: #fff;
}

.relogio-dica {
  text-align: center;
  margin-top: 6px;
}
