/* Drobné úpravy nad Tailwind CDN */

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

html, body { font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; }

/* Smooth přechod modal overlayů */
[x-show] { transition: opacity 0.12s ease-out; }

/* Tabulky: hover efekt */
tbody tr:hover { background-color: rgb(248 250 252); }

/* Scrollbar v sidebaru */
aside nav { scrollbar-width: thin; }

/* Number inputy bez spinnerů */
input[type=number]::-webkit-outer-spin-button,
input[type=number]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
input[type=number] { -moz-appearance: textfield; }

/* Focus stav */
input:focus, select:focus, textarea:focus, button:focus {
  outline: 2px solid rgb(59 130 246 / 0.4);
  outline-offset: 1px;
}

/* Help/tooltip ikonka — kruh s "?" vedle popisků složitých pojmů.
   Native title= zajišťuje hover popisek, vlastní styl jen pro vzhled. */
.help-tip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  margin-left: 4px;
  border-radius: 50%;
  background: rgb(226 232 240);
  color: rgb(71 85 105);
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  cursor: help;
  vertical-align: middle;
  user-select: none;
}
.help-tip:hover { background: rgb(203 213 225); color: rgb(15 23 42); }

/* Print-friendly - pro budoucí tisk předpisů */
@media print {
  aside, header button, .no-print { display: none !important; }
  main { padding: 0 !important; }
}

/* Mobilní pohled (≤768px) — tabulky scrollují vodorovně místo zbalení.
   Správce SVJ často kontroluje data z mobilu v zasedačce. */
@media (max-width: 768px) {
  /* Sidebar — schovaný (toggle bude přes hamburger v budoucnu) */
  aside { display: none; }
  main { padding: 1rem !important; }
  /* Tabulky: dát rodičovský div scroll, šířku tabulky nech přirozenou */
  table { min-width: 600px; }
  /* Wrap kolem tabulky pro horizontal scroll — Tailwind má overflow-x-auto, ale ne všude. */
  .bg-white > table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }
  /* Modaly: full-width na mobilu */
  .max-w-md, .max-w-lg, .max-w-xl, .max-w-2xl, .max-w-3xl, .max-w-4xl {
    max-width: calc(100vw - 1rem) !important;
  }
  /* Grid řady (KPI) — 2 sloupce místo 4 */
  .grid.grid-cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .grid.grid-cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  /* Header — menší padding */
  header { padding: 0.5rem 1rem !important; }
  /* Buttony v toolbarech menší */
  .text-sm { font-size: 0.8125rem; }
}
