/* iPredavak.cz — vlastní doplňky k Tailwindu */
:root {
  color-scheme: light;
  --grad: radial-gradient(1200px 600px at 10% -10%, #dbeafe 0%, transparent 60%),
          radial-gradient(900px 500px at 110% 10%, #e0e7ff 0%, transparent 55%),
          linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
}
html, body { max-width: 100%; overflow-x: hidden; }
html { -webkit-tap-highlight-color: transparent; scroll-behavior: smooth; }
body {
  font-family: 'Inter', ui-sans-serif, system-ui, sans-serif;
  background: var(--grad);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Anti-copy / anti-context (jen kosmetika) */
.no-select { user-select: none; -webkit-user-select: none; -ms-user-select: none; }

/* Mobil bezpečnost — žádné horizontální přetečení */
img, canvas, svg, video { max-width: 100%; height: auto; }
table { max-width: 100%; }
.break-anywhere { overflow-wrap: anywhere; word-break: break-word; }
@media (max-width: 640px) {
  .rounded-2xl { border-radius: 1rem; }
  .overflow-x-auto { -webkit-overflow-scrolling: touch; }

  /* Mobil: aplikační karty přes celou šířku displeje (bez bočních mezer a zaoblení) */
  main > .bg-white,
  main > div > .bg-white,
  main > .max-w-3xl > .bg-white,
  main > .max-w-3xl.mx-auto.space-y-6 > .bg-white {
    border-radius: 0;
    border-left: 0;
    border-right: 0;
  }
  /* Vnořený grid karet (např. dashboard, admin) - rovněž zarovnat k okraji */
  main > .max-w-6xl,
  main > .max-w-3xl,
  main > .max-w-4xl,
  main > .max-w-5xl {
    max-width: 100%;
    padding-left: 0;
    padding-right: 0;
  }
}

/* Sticky header glass */
header.sticky {
  background: rgba(255,255,255,.78);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid rgba(15,23,42,.08);
  box-shadow: 0 1px 0 rgba(15,23,42,.02), 0 8px 24px -16px rgba(15,23,42,.18);
}

/* Karty hezčí stín a hover lift */
.shadow-soft { box-shadow: 0 1px 0 rgba(15,23,42,.04), 0 12px 30px -18px rgba(15,23,42,.25); }
.card-hover { transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.card-hover:hover { transform: translateY(-2px); box-shadow: 0 1px 0 rgba(15,23,42,.04), 0 22px 40px -24px rgba(15,23,42,.35); }

/* Form inputy — zkrácené třídy "inp" / "lbl" pro stručnost ve formuláři */
.inp {
  width: 100%;
  border-radius: 0.75rem;
  border: 1px solid rgb(203 213 225);
  background: #fff;
  padding: 0.6rem 0.85rem;
  font-size: 0.92rem;
  color: rgb(15 23 42);
  transition: box-shadow .15s, border-color .15s, background .15s;
}
.inp:hover { border-color: rgb(148 163 184); }
.inp:focus {
  outline: none;
  border-color: #2773fb;
  box-shadow: 0 0 0 4px rgba(39,115,251,.18);
}
.lbl {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: rgb(71 85 105);
  letter-spacing: .01em;
  margin-bottom: .25rem;
}
textarea.inp { resize: vertical; min-height: 90px; }
select.inp { background-image: linear-gradient(45deg,transparent 50%,#94a3b8 50%),linear-gradient(135deg,#94a3b8 50%,transparent 50%); background-position: calc(100% - 18px) 55%, calc(100% - 13px) 55%; background-size: 5px 5px,5px 5px; background-repeat:no-repeat; padding-right: 2rem; appearance:none; }

/* Hezká primární tlačítka — gradient + sheen */
.btn-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .65rem 1.1rem; border-radius: .85rem; font-weight: 600; color: #fff;
  background: linear-gradient(135deg, #2773fb 0%, #1346b0 100%);
  box-shadow: 0 8px 22px -10px rgba(39,115,251,.55), inset 0 1px 0 rgba(255,255,255,.25);
  transition: transform .12s ease, box-shadow .18s ease, filter .18s ease;
}
.btn-primary:hover { filter: brightness(1.06); box-shadow: 0 14px 28px -10px rgba(39,115,251,.6), inset 0 1px 0 rgba(255,255,255,.3); }
.btn-primary:active { transform: translateY(1px); }

.btn-ghost {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .55rem .9rem; border-radius: .75rem; font-weight: 500; color: rgb(51 65 85);
  background: #fff; border: 1px solid rgb(226 232 240);
  transition: background .15s ease, border-color .15s ease;
}
.btn-ghost:hover { background: rgb(248 250 252); border-color: rgb(203 213 225); }

/* Tabs — aktivní stav */
.tab-btn {
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.tab-btn[data-active="1"] {
  background: #fff;
  border: 1px solid rgb(226 232 240);
  color: rgb(15 23 42);
  box-shadow: 0 4px 14px -10px rgba(15,23,42,.25);
}

/* Subtilní fade-in pro hlavní obsah */
main { animation: fade-up .35s ease both; }
@keyframes fade-up {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Scrollbar (desktop) */
@media (min-width: 768px) {
  *::-webkit-scrollbar { width: 10px; height: 10px; }
  *::-webkit-scrollbar-thumb { background: rgba(15,23,42,.18); border-radius: 8px; border: 2px solid transparent; background-clip: padding-box; }
  *::-webkit-scrollbar-thumb:hover { background: rgba(15,23,42,.32); border: 2px solid transparent; background-clip: padding-box; }
  *::-webkit-scrollbar-track { background: transparent; }
}

/* Print */
@media print {
  body { background: #fff; }
  header.sticky, footer, .tab-btn, .no-print { display: none !important; }
  [data-pane] { display: block !important; }
}
