/* Protokol o provedené činnosti – vzhled podle Lovablu (shadcn/ui, zelený motiv z podkladu, barvy přepočtené z oklch na hex).
   Firma Andyho maminky – mimo značku The One Percent. */
@font-face { font-family: "Noto Sans"; font-weight: 400; font-display: swap; src: url(/fonts/noto-sans-latin-ext-400-normal.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Noto Sans"; font-weight: 400; font-display: swap; src: url(/fonts/noto-sans-latin-400-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Noto Sans"; font-weight: 700; font-display: swap; src: url(/fonts/noto-sans-latin-ext-700-normal.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Noto Sans"; font-weight: 700; font-display: swap; src: url(/fonts/noto-sans-latin-700-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --background: #fbfaf6;
  --foreground: #0b121a;
  --card: #ffffff;
  --primary: #008b1d;
  --primary-hover: #00791a;
  --accent: #d4f1d4;
  --muted-foreground: #62748e;
  --border: #e2e8f0;
  --ring: #90a1b9;
  --radius: 0.625rem;
  --font: "Noto Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; border: 0 solid var(--border); }
html { -webkit-text-size-adjust: 100%; line-height: 1.5; }
body { margin: 0; min-height: 100vh; background: var(--background); color: var(--foreground); font-family: var(--font); font-size: 16px; -webkit-font-smoothing: antialiased; }
h1, h2, p { margin: 0; }
.ikona { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Hlavička ---------- */
.hlavicka { background: var(--card); border-bottom-width: 1px; }
.hlavicka-obsah { max-width: 64rem; margin: 0 auto; padding: 16px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
@media (min-width: 640px) { .hlavicka-obsah { padding: 16px 24px; } }
.logo { height: 40px; width: auto; }
@media (min-width: 640px) { .logo { height: 48px; } }
.hlavicka-text { min-width: 0; flex: 1; }
.hlavicka h1 { font-size: 1rem; line-height: 1.25; font-weight: 600; }
.hlavicka p { font-size: 0.75rem; line-height: 1rem; color: var(--muted-foreground); }
@media (min-width: 640px) { .hlavicka h1 { font-size: 1.25rem; } .hlavicka p { font-size: 0.875rem; line-height: 1.25rem; } }
.hlavicka .stahnout { width: 100%; }
@media (min-width: 640px) { .hlavicka .stahnout { width: auto; } }

/* ---------- Obsah a karty ---------- */
.obsah { max-width: 64rem; margin: 0 auto; padding: 24px 16px; display: flex; flex-direction: column; gap: 16px; }
@media (min-width: 640px) { .obsah { padding: 32px 24px; gap: 24px; } }
.karta { background: var(--card); border-width: 1px; border-radius: calc(var(--radius) + 4px); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); padding: 24px; display: flex; flex-direction: column; gap: 24px; }
.karta h2 { font-size: 1.125rem; line-height: 1.2; font-weight: 600; }
.karta-hlava { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.mrizka { display: grid; gap: 16px; }
.mrizka-3 { gap: 12px; }
@media (min-width: 768px) {
  .mrizka-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mrizka-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
  .cela { grid-column: span 2 / span 2; }
}
#cinnosti { gap: 12px; }
.sloupec { display: flex; flex-direction: column; gap: 16px; }

/* ---------- Pole ---------- */
.pole { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.pole label, .popisek { font-size: 0.875rem; line-height: 1.25; font-weight: 500; }
.radek-polozky label { font-size: 0.75rem; }
input:not([type="checkbox"]), textarea {
  width: 100%;
  min-width: 0;
  padding: 4px 12px;
  border-width: 1px;
  border-radius: calc(var(--radius) - 2px);
  background: transparent;
  color: var(--foreground);
  font: inherit;
  font-size: 1rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
input:not([type="checkbox"]) { height: 36px; }
textarea { min-height: 64px; padding: 8px 12px; resize: vertical; }
@media (min-width: 768px) { input:not([type="checkbox"]), textarea { font-size: 0.875rem; } }
input:focus-visible, textarea:focus-visible { border-color: var(--ring); box-shadow: 0 0 0 3px rgba(144, 161, 185, 0.5); }

.volba { display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: 0.875rem; }
.volba input { width: 16px; height: 16px; margin: 0; accent-color: var(--primary); cursor: pointer; }

/* ---------- Přidávané řádky ---------- */
.radky { display: flex; flex-direction: column; gap: 16px; }
.radek-polozky { padding: 12px; border-width: 1px; border-radius: var(--radius); background: rgba(255, 255, 255, 0.5); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
/* šířka buňky: mN = na mobilu (2 sloupce), dN = od 640 px (12 sloupců); bez třídy 1 sloupec */
.radek-polozky .m2 { grid-column: span 2 / span 2; }
.smazat-obal { display: flex; justify-content: flex-end; }
@media (min-width: 640px) {
  .radek-polozky { padding: 0; border: 0; background: none; grid-template-columns: repeat(12, minmax(0, 1fr)); align-items: end; }
  .radek-polozky .d1 { grid-column: span 1 / span 1; }
  .radek-polozky .d2 { grid-column: span 2 / span 2; }
  .radek-polozky .d5 { grid-column: span 5 / span 5; }
  .radek-polozky .d7 { grid-column: span 7 / span 7; }
}

/* ---------- Tlačítka ---------- */
.tlacitko {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 32px; padding: 0 12px; border-radius: calc(var(--radius) - 2px);
  font: inherit; font-size: 0.875rem; font-weight: 500; white-space: nowrap; cursor: pointer;
  transition: background-color 0.15s, color 0.15s;
}
.tlacitko:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(144, 161, 185, 0.5); }
.tlacitko:disabled { opacity: 0.5; pointer-events: none; }
.tlacitko-velke { height: 40px; padding: 0 24px; background: var(--primary); color: #fff; }
.tlacitko-velke:hover { background: var(--primary-hover); }
.tlacitko-obrys { border-width: 1px; background: var(--card); color: var(--foreground); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); }
.tlacitko-obrys:hover { background: var(--accent); }
.tlacitko-ikona { width: 36px; height: 36px; padding: 0; background: none; color: var(--foreground); }
.tlacitko-ikona:hover { background: var(--accent); }
.dole { display: flex; justify-content: flex-end; padding-bottom: 48px; }

/* ---------- Podpis ---------- */
.podpis-ram { border-width: 1px; border-radius: calc(var(--radius) - 2px); background: #fff; }
.podpis-plocha { display: block; width: 100%; height: 160px; border-radius: calc(var(--radius) - 2px); touch-action: none; cursor: crosshair; }
.podpis-pata { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.podpis-stav { font-size: 0.75rem; color: var(--muted-foreground); }

[hidden] { display: none !important; }
