/* v0.36 Ikdiena -> Fiziskie dati: her own daily numbers in neutral tiles with small charts, and the Garmin import. */
.db { display: flex; flex-direction: column; min-width: 0; }
.db > .sheet { margin-bottom: 16px; }
.db .db-intro { order: -3; }
.db.db-empty .db-import { order: -2; }
.db-intro p { margin: 0; max-width: 72ch; }
.db-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; }
.db-head h2 { margin: 0; }
.db-head .daily-choices[hidden] { display: none; }
.db-period { margin: 0 0 10px; color: var(--ink-2); font-size: 14px; }
.db-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.db-tile { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; min-width: 0; background: var(--surface); display: flex; flex-direction: column; }
.db-tile h3 { margin: 0 0 6px; font-size: 14px; font-weight: 600; color: var(--ink-2); }
.db-value { margin: 0; font-size: 15px; color: var(--ink-2); }
.db-value b { font-size: 28px; line-height: 1.15; font-weight: 650; color: var(--ink); font-variant-numeric: tabular-nums; margin-right: 4px; }
.db-sub { margin: 4px 0 10px; font-size: 13px; line-height: 1.45; color: var(--ink-2); }
.db-none { margin: 4px 0 0; color: var(--ink-muted); }
.db-note { margin: 6px 0 0; font-size: 12px; color: var(--ink-muted); }
.db-spark { display: block; width: 100%; height: 56px; margin-top: auto; overflow: visible; }
.db-bar { fill: var(--teal); opacity: .72; }
.db-bar:hover { opacity: 1; }
.db-line { fill: none; stroke: var(--teal); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.db-dot { stroke: var(--teal); stroke-width: 4; stroke-linecap: round; }
.db-dot:hover { stroke-width: 8; }
.db-meter { position: relative; height: 8px; margin: 10px 0 2px; border-radius: 4px; background: var(--canvas-alt); border: 1px solid var(--line); overflow: hidden; }
.db-meter-fill { display: block; height: 100%; width: 0; background: var(--teal); opacity: .8; }
.db-extra { margin: 12px 0 0; }
.db-ask { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.db-ask p { margin: 8px 0 0; max-width: 80ch; }
.db-empty-note { margin: 0; color: var(--ink-2); }

.db-help ol { padding-left: 20px; margin: 4px 0 8px; }
.db-help li { line-height: 1.55; margin-block: 6px; }
.db-form { margin-block: 8px; }
.db-file { display: block; font-size: 15px; cursor: pointer; }
.db-file-title { display: block; font-weight: 600; }
.db-file-row { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 6px; padding: 8px; border: 1px dashed var(--line-strong); border-radius: var(--radius); background: var(--elevated); }
.daily-view .db-file input.db-file-input[type=file] { position: absolute; left: 8px; top: 8px; min-width: 0; width: 1px; height: 1px; min-height: 0; margin: 0; padding: 0; opacity: 0; overflow: hidden; }
.db-file-button { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); font-weight: 600; }
.db-file:hover .db-file-button { border-color: var(--blue); color: var(--blue); }
.db-file-input:focus-visible + .db-file-button { outline: 2px solid var(--focus); outline-offset: 2px; }
.db-file-input:disabled + .db-file-button { opacity: .6; }
.db-file-name { color: var(--ink-2); overflow-wrap: anywhere; min-width: 0; }
.db-summary { margin: 12px 0 8px; line-height: 1.5; }
.db-found { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 8px; padding: 0; margin: 4px 0 8px; }
.db-found li { border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px; font-size: 13px; background: var(--elevated); }
.db-found b { font-weight: 600; }
.db-found-range { color: var(--ink-2); }
.db-sample { margin-block: 4px; }
.db-sample th.db-num { text-align: right; }
.db-num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.db-sample th[scope=row] { white-space: nowrap; font-weight: 600; }
.db-sample-title { margin: 14px 0 4px; font-size: 16px; }
.db-skipped ul { padding-left: 20px; margin: 4px 0; }
.db-skipped li { margin-block: 4px; line-height: 1.5; }
.db-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 10px; }

.db-sources { list-style: none; padding: 0; margin: 0 0 8px; }
.db-sources li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.db-source-actions { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px; }

@media (max-width: 480px) {
  /* four Ikdiena tabs fit a phone: icon above a shorter label instead of a sideways-scrolling bar */
  .daily-view .life-tabs { gap: 2px; padding: 0 2px; overflow-x: visible; }
  .daily-view .life-tabs a { flex: 1 1 0; min-width: 0; flex-direction: column; justify-content: center; gap: 2px; padding: 6px 2px 5px; font-size: 12.5px; text-align: center; }
  .db-tiles { grid-template-columns: minmax(0, 1fr); }
  .db-value b { font-size: 24px; }
  .db-head .daily-choices { width: 100%; }
  .db-head .daily-choices button { flex: 1 1 0; padding-inline: 6px; }
  .db-actions button, .db-ask button { width: 100%; }
}
