/* Kalkulačka výnosů z pronájmu – vzhled 1:1 podle Lovablu (Tailwind + shadcn/ui přepsané do čistého CSS).
   Whitelabel: bez loga a bez značky The One Percent, systémové písmo, fialová + smaragdová. */

:root {
  --background: hsl(240 20% 99%);
  --foreground: hsl(240 10% 10%);
  --card: hsl(0 0% 100%);
  --primary: hsl(270 80% 60%);
  --secondary: hsl(160 70% 50%);
  --muted: hsl(240 20% 96%);
  --muted-foreground: hsl(240 5% 45%);
  --destructive: hsl(0 70% 55%);
  --border: hsl(240 15% 90%);
  --ring: hsl(270 80% 60%);
  --radius: 0.75rem;
  --shadow-card: 0 4px 20px -2px hsl(240 15% 80% / 0.2);
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", 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; background: var(--background); color: var(--foreground); font-family: var(--font); -webkit-font-smoothing: antialiased; }
h1, h2, h3, p { margin: 0; }

.ikona { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ikona-24 { width: 24px; height: 24px; }
.ikona-32 { width: 32px; height: 32px; }
.ikona-40 { width: 40px; height: 40px; }
.primarni { color: var(--primary); }
.sekundarni { color: var(--secondary); }

/* ---------- Rozvržení ---------- */
.stranka { min-height: 100vh; padding: 48px 16px; }
.obsah { width: 100%; max-width: 80rem; margin: 0 auto; padding: 0 2rem; }
@media (max-width: 639px) { .obsah { padding: 0; } }

.hlavicka { margin-bottom: 48px; text-align: center; }
.nadpis-radek { display: flex; align-items: center; justify-content: center; gap: 12px; margin-bottom: 16px; }
h1 { font-size: 2.25rem; line-height: 2.5rem; font-weight: 700; }
@media (min-width: 768px) { h1 { font-size: 3rem; line-height: 1; } }
.perex { font-size: 1.125rem; line-height: 1.75rem; color: var(--muted-foreground); }

.karta { border-width: 1px; border-radius: 1rem; background: var(--card); box-shadow: var(--shadow-card); padding: 32px; }
.karta-vstupy { margin-bottom: 32px; padding: 24px; }
@media (min-width: 768px) { .karta-vstupy { padding: 32px; } }
.karta h2 { display: flex; align-items: center; gap: 8px; margin-bottom: 24px; font-size: 1.5rem; line-height: 2rem; font-weight: 600; }

/* ---------- Vstupní pole ---------- */
.mrizka-poli { display: grid; gap: 24px; }
@media (min-width: 768px) { .mrizka-poli { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .mrizka-poli { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.pole { display: flex; flex-direction: column; gap: 8px; }
.pole label { font-size: 0.875rem; line-height: 1; font-weight: 500; }
.pole input {
  display: flex;
  width: 100%;
  height: 40px;
  padding: 8px 12px;
  border-width: 1px;
  border-radius: calc(var(--radius) - 2px);
  background: var(--background);
  color: var(--foreground);
  font: inherit;
  font-size: 1rem;
  outline: none;
}
@media (min-width: 768px) { .pole input { font-size: 0.875rem; } }
.pole input::placeholder { color: var(--muted-foreground); }
.pole input:focus-visible { box-shadow: 0 0 0 2px var(--background), 0 0 0 4px var(--ring); }

/* ---------- Výsledky ---------- */
.vysledky { display: grid; gap: 24px; align-items: stretch; }
@media (min-width: 1024px) { .vysledky { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.karta-vysledek { display: flex; flex-direction: column; }
.vysledek-hlava { margin-bottom: 24px; }
.vysledek-hlava h3 { display: flex; align-items: center; gap: 8px; font-size: 1.5rem; line-height: 2rem; font-weight: 600; }
.poznamka { margin: 4px 0 0 32px; font-size: 0.75rem; line-height: 1rem; color: var(--muted-foreground); }
.radky { display: flex; flex: 1; flex-direction: column; gap: 16px; }
.radek { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding-bottom: 12px; border-bottom-width: 1px; }
.radek-popis { color: var(--muted-foreground); }
.radek-hodnota { flex-shrink: 0; text-align: right; }
.castka { font-weight: 600; color: var(--destructive); }
.castka.prijem { color: var(--secondary); }
.mesic { margin-top: 4px; font-size: 0.75rem; line-height: 1rem; color: var(--muted-foreground); }
.mesic-sm { margin-top: 4px; font-size: 0.875rem; line-height: 1.25rem; }
.radek-celkem {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 16px;
  padding: 12px 8px; border-bottom-width: 2px; background: hsl(240 20% 96% / 0.3);
}
.radek-celkem > span { font-weight: 600; }
.radek-celkem .radek-hodnota { font-weight: 700; color: var(--destructive); }
.cisty { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-top: auto; padding: 16px; border-radius: 0.75rem; }
.cisty > span { font-size: 1.125rem; line-height: 1.75rem; font-weight: 600; }
.cisty .radek-hodnota { font-weight: 700; }
.cisty-rok { font-size: 1.125rem; line-height: 1.75rem; }
.cisty-primarni { background: hsl(270 80% 60% / 0.1); }
.cisty-primarni .radek-hodnota { color: var(--primary); }
.cisty-sekundarni { background: hsl(160 70% 50% / 0.1); }
.cisty-sekundarni .radek-hodnota { color: var(--secondary); }
.vynos { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 24px; border-radius: 0.75rem; text-align: center; }
.vynos-primarni { color: var(--primary); background: linear-gradient(to right, hsl(270 80% 60% / 0.2), hsl(270 80% 60% / 0.1)); }
.vynos-sekundarni { color: var(--secondary); background: linear-gradient(to right, hsl(160 70% 50% / 0.2), hsl(160 70% 50% / 0.1)); }
.vynos-popis { font-size: 0.875rem; line-height: 1.25rem; color: var(--muted-foreground); }
.vynos-hodnota { font-size: 2.25rem; line-height: 2.5rem; font-weight: 700; }

/* ---------- Rozdíl ---------- */
.karta-rozdil { margin-top: 24px; text-align: center; background: linear-gradient(to bottom right, hsl(270 80% 60% / 0.05), hsl(160 70% 50% / 0.05)); }
.karta-rozdil h3 { margin-bottom: 16px; font-size: 1.5rem; line-height: 2rem; font-weight: 600; }
.rozdil-rok { font-size: 3rem; line-height: 1; font-weight: 700; color: var(--primary); }
.rozdil-mesic { margin-top: 12px; font-size: 1.5rem; line-height: 2rem; font-weight: 600; color: var(--muted-foreground); }
.verdikt { margin-top: 24px; color: var(--muted-foreground); }

/* ---------- Tisk ---------- */
.tisk-obal { display: flex; justify-content: center; margin-top: 32px; }
.tlacitko {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 32px; border-radius: calc(var(--radius) - 2px);
  background: var(--primary); color: #fff; font: inherit; font-size: 0.875rem; font-weight: 500; white-space: nowrap; cursor: pointer;
  transition: background-color 0.15s;
}
.tlacitko:hover { background: hsl(270 80% 60% / 0.9); }
.tlacitko:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--background), 0 0 0 4px var(--ring); }

@media print {
  @page { margin: 1cm; }
  body { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  .tisk-obal { display: none !important; }
}
