/* v6 – modernejší "GSAP web" look (bez externých knižníc) + lepší footer */

:root{
  --bg0:#050711;
  --bg1:#070A18;
  --bg2:#0A1022;
  --card:rgba(10,14,28,.70);
  --stroke:rgba(255,255,255,.08);
  --stroke2:rgba(56,189,248,.32);
  --txt:#EEF2FF;
  --muted:#A6B0CD;
  --accent:#38BDF8;
  --accent2:#22C55E;
  --shadow: 0 30px 100px rgba(0,0,0,.60);
  --r:20px;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family:Inter,system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
  color:var(--txt);
  background: linear-gradient(180deg,var(--bg0),var(--bg1) 35%, var(--bg2));
  overflow-x:hidden;
}

/* ---- Ambient background ---- */
.bg{position:fixed; inset:0; z-index:-1; pointer-events:none}
.bg-grid{
  position:absolute; inset:-2px;
  background-image:
    linear-gradient(to right, rgba(255,255,255,.045) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,.045) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(closest-side at 50% 10%, black 0%, transparent 85%);
  opacity:.35;
  transform: translateZ(0);
}
.bg-blobs .blob{
  position:absolute; border-radius:999px; filter: blur(55px);
  opacity:.22; transform: translateZ(0);
  animation: float 10s ease-in-out infinite;
}
.bg-blobs .b1{width:520px;height:520px; left:-120px; top:-160px; background:rgba(56,189,248,.95)}
.bg-blobs .b2{width:560px;height:560px; right:-180px; top:-120px; background:rgba(34,197,94,.90); animation-delay: -2.5s}
.bg-blobs .b3{width:420px;height:420px; left:30%; bottom:-220px; background:rgba(99,102,241,.90); animation-delay: -4s}
@keyframes float{
  0%,100%{transform:translate3d(0,0,0) scale(1)}
  50%{transform:translate3d(0,-18px,0) scale(1.03)}
}
.noise{
  position:absolute; inset:0;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='220' height='220' filter='url(%23n)' opacity='.25'/%3E%3C/svg%3E");
  opacity:.05;
}

/* ---- Layout ---- */
.wrap{max-width:1220px; margin:0 auto; padding:0 18px}
.header{
  display:flex; align-items:center; justify-content:space-between;
  padding:26px 0 16px;
  gap:16px; flex-wrap:wrap;
}
.brand{display:flex; align-items:center; gap:12px; text-decoration:none; color:inherit}
.brand:hover{opacity:.95}

.logo{
  width:46px; height:46px; border-radius:16px;
  background: radial-gradient(120% 120% at 20% 20%, rgba(255,255,255,.22), transparent 55%),
              linear-gradient(135deg, rgba(34,197,94,.98), rgba(56,189,248,.88));
  display:grid; place-items:center;
  font-weight:900; color:#041118;
  box-shadow: 0 18px 60px rgba(0,0,0,.35);
  border:1px solid rgba(255,255,255,.12);
}
.logo span{letter-spacing:-.03em}
.logo.sm{width:40px;height:40px;border-radius:14px}

.title{font-size:20px; font-weight:900; line-height:1.1; letter-spacing:-.02em}
.subtitle{color:var(--muted); font-size:13px; margin-top:2px}
.accent{color:var(--accent)}
.header-actions{display:flex; align-items:center; gap:10px; flex-wrap:wrap}

/* switch */
.switch{display:flex; align-items:center; gap:10px; user-select:none}
.switch input{display:none}
.switch .slider{
  width:44px; height:26px; border-radius:999px;
  border:1px solid var(--stroke); background:rgba(255,255,255,.04);
  position:relative; box-shadow: inset 0 0 0 1px rgba(255,255,255,.02);
}
.switch .slider::after{
  content:""; position:absolute; top:3px; left:3px;
  width:18px; height:18px; border-radius:999px;
  background:#c7d2fe; transition:.18s ease;
}
.switch input:checked + .slider::after{transform:translateX(18px); background:var(--accent2)}
.switch-label{font-size:13px; color:var(--muted)}

/* hero */
.hero{
  display:grid;
  grid-template-columns: 1fr 320px;
  gap:16px;
  overflow:hidden;
  position:relative;
}
.hero::before{
  content:"";
  position:absolute; inset:-1px;
  background: radial-gradient(700px 260px at 20% 0%, rgba(56,189,248,.14), transparent 65%),
              radial-gradient(700px 260px at 85% 0%, rgba(34,197,94,.12), transparent 65%);
  pointer-events:none;
}
.hero-left{position:relative}
.hero h1{margin:0; font-size:26px; font-weight:900; letter-spacing:-.03em; line-height:1.15}
.hero p{margin:10px 0 0; max-width:58ch; line-height:1.6}
.hero-badges{display:flex; flex-wrap:wrap; gap:8px; margin-top:14px}
.pill{
  display:inline-flex;
  gap:8px;
  align-items:center;
  padding:7px 10px;
  border-radius:999px;
  border:1px solid rgba(56,189,248,.20);
  background: rgba(56,189,248,.06);
  font-weight:800;
  font-size:12px;
  color:#dbeafe;
}
.hero-right{position:relative; display:flex; flex-direction:column; gap:10px}
.stat{
  border:1px solid var(--stroke);
  background: rgba(255,255,255,.04);
  border-radius: 16px;
  padding:12px 12px;
}
.stat-k{color:var(--muted); font-size:12px; font-weight:800}
.stat-v{font-size:18px; font-weight:900; margin-top:6px}
@media (max-width: 980px){
  .hero{grid-template-columns:1fr}
}

/* main layout */
.layout{
  display:grid;
  grid-template-columns: 1fr 390px;
  gap:22px;
  padding-bottom: 34px;
}
@media (max-width: 980px){
  .layout{grid-template-columns:1fr}
  .sticky{position:relative; top:auto}
}

.content{min-width:0}
.section{margin-top:18px}
.spacer{height:10px}

/* card */
.card{
  background: var(--card);
  border:1px solid var(--stroke);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  padding:18px;
  backdrop-filter: blur(14px);
}
.card-head{margin-bottom:12px}
.card-head h2{margin:0; font-size:16px; font-weight:900}
.card-head p{margin:6px 0 0; color:var(--muted); font-size:13px; line-height:1.55}

/* tabs */
.tabs{display:flex; gap:8px; margin-top:12px; flex-wrap:wrap}
.tab{
  border:1px solid var(--stroke);
  background:rgba(255,255,255,.04);
  color:var(--muted);
  border-radius: 999px;
  padding:9px 12px;
  font-weight:900;
  font-size:12px;
  cursor:pointer;
  transition: filter .12s ease, border-color .12s ease, transform .08s ease;
}
.tab:hover{filter:brightness(1.07)}
.tab:active{transform:translateY(1px)}
.tab.active{
  color:var(--txt);
  border-color:var(--stroke2);
  box-shadow: inset 0 0 0 1px rgba(56,189,248,.14);
}
.panel{display:none; margin-top:12px}
.panel.active{display:block}

/* list items */
.list{display:flex; flex-direction:column; gap:12px; margin-top:12px}
.item{
  border:1px solid var(--stroke);
  border-radius:18px;
  padding:12px 12px;
  background: rgba(255,255,255,.032);
  transition: border-color .15s ease, transform .10s ease, background .15s ease;
}
.item:hover{border-color:rgba(56,189,248,.20); background: rgba(255,255,255,.04)}
.item:active{transform:translateY(1px)}
.item-top{display:flex; align-items:flex-start; gap:12px}
.item-body{min-width:0}
.item-title{font-weight:900; font-size:13px; line-height:1.2}
.item-meta{margin-left:auto; text-align:right; min-width:168px}
.price{font-weight:900; color:var(--accent); font-size:13px}
.desc{margin-top:6px; color:var(--muted); font-size:12px; line-height:1.55}
.item-top input{margin-top:3px; width:18px; height:18px; accent-color: var(--accent2)}

/* forms */
.row{display:grid; grid-template-columns:1fr 1fr 1fr; gap:12px; margin-top:12px}
.row-2{grid-template-columns:1fr 1fr}
@media (max-width: 740px){.row,.row-2{grid-template-columns:1fr}}
.field label{display:block; font-size:12px; color:var(--muted); margin-bottom:6px}
select,.input{
  width:100%;
  border:1px solid var(--stroke);
  background: rgba(255,255,255,.04);
  color:var(--txt);
  border-radius:14px;
  padding:11px 12px;
  outline:none;
}
select:focus,.input:focus{border-color:var(--stroke2)}

/* languages */
.lang-row{
  display:grid;
  grid-template-columns: 260px 1fr;
  gap:12px;
  align-items:start;
  margin-top:12px;
}
@media (max-width: 740px){.lang-row{grid-template-columns:1fr}}
.lang-preview{
  border:1px solid var(--stroke);
  border-radius:18px;
  background: rgba(255,255,255,.032);
  padding:12px;
}

/* callouts / hints */
.callout{
  margin-top:14px;
  padding:12px 14px;
  border:1px dashed rgba(56,189,248,.32);
  border-radius:18px;
  color:var(--muted);
  background: rgba(11,18,32,.25);
  font-size:12px;
  line-height:1.6;
}
.callout b{color:var(--txt)}
.callout ul{margin:8px 0 0; padding-left:18px}
.callout li{margin:4px 0}
.hint{
  margin-top:12px;
  padding:10px 12px;
  border:1px solid rgba(34,197,94,.22);
  border-radius:14px;
  background: rgba(34,197,94,.06);
  color:var(--muted);
  font-size:12px;
  line-height:1.55;
}

/* checkbox line */
.checkline{display:flex; gap:10px; align-items:flex-start; margin-top:12px}
.checkline input{accent-color:var(--accent2); width:18px; height:18px; margin-top:3px}

/* summary */
.sticky{position:sticky; top:16px; align-self:start}
.summary-head{
  display:flex; align-items:flex-start; justify-content:space-between; gap:10px;
}
.summary-head h2{margin:0; font-size:16px; font-weight:900}
.summary-head p{margin:6px 0 0}
.chip{
  display:inline-flex;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid rgba(34,197,94,.25);
  background: rgba(34,197,94,.08);
  color:#bbf7d0;
  font-weight:900;
  font-size:12px;
}

.totals{display:flex; flex-direction:column; gap:10px; margin-top:12px}
.total{
  display:flex; justify-content:space-between; gap:10px;
  padding:10px 12px;
  border:1px solid var(--stroke);
  border-radius:18px;
  background: rgba(255,255,255,.032);
}
.total .k{font-weight:900; font-size:12px; color:#c7d2fe}
.total .v{font-weight:900; font-size:14px}
.divider{height:1px; background:var(--stroke); margin:14px 0}

.break-wrap{margin-top:12px}
.label{font-weight:900; font-size:12px; color:#c7d2fe; margin-bottom:8px}
.breakdown{
  white-space:pre-wrap;
  margin:0;
  padding:12px 12px;
  border:1px solid var(--stroke);
  border-radius:18px;
  background: rgba(0,0,0,.18);
  min-height:190px;
  color:#dbeafe;
  font-size:12px;
  line-height:1.6;
}

.small{font-size:12px}
.muted{color:var(--muted)}
.hidden{display:none !important}

/* buttons */
.btn{
  border:1px solid var(--stroke);
  background: rgba(255,255,255,.04);
  color:var(--txt);
  padding:10px 12px;
  border-radius:14px;
  font-weight:900;
  cursor:pointer;
  transition: transform .08s ease, filter .12s ease, border-color .12s ease;
}
.btn:hover{filter:brightness(1.08)}
.btn:active{transform:translateY(1px)}
.btn-primary{
  background: radial-gradient(120% 120% at 20% 20%, rgba(255,255,255,.20), transparent 55%),
              linear-gradient(135deg, rgba(34,197,94,.95), rgba(56,189,248,.75));
  border-color: rgba(56,189,248,.55);
  color:#041118;
}
.btn-soft{background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.14)}
.btn-ghost{background: transparent}
.summary-actions{display:flex; gap:10px}
.summary-actions .btn{flex:1}

/* footer */
.footer{
  border-top:1px solid rgba(255,255,255,.07);
  background: rgba(7,10,18,.65);
  backdrop-filter: blur(10px);
}
.footer-inner{padding:26px 18px 30px}
.footer-top{
  display:flex; justify-content:space-between; gap:18px; flex-wrap:wrap;
}
.footer-brand{display:flex; align-items:center; gap:12px}
.footer-title{font-weight:900; letter-spacing:-.01em}
.footer-cols{
  display:grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap:16px;
  width:min(760px, 100%);
}
@media (max-width: 920px){ .footer-cols{grid-template-columns:1fr} }

.fcol{
  border:1px solid rgba(255,255,255,.07);
  background: rgba(255,255,255,.03);
  border-radius:18px;
  padding:12px 12px;
}
.fhead{font-weight:900; font-size:12px; color:#c7d2fe; margin-bottom:10px}
.fcol ul{margin:0; padding-left:18px; color:var(--muted); font-size:12px; line-height:1.7}
.fcol li{margin:4px 0}

.footer-bottom{
  margin-top:18px;
  padding-top:14px;
  border-top:1px solid rgba(255,255,255,.07);
  display:flex; justify-content:space-between; align-items:center; gap:12px; flex-wrap:wrap;
}
.footer-actions{display:flex; gap:10px}


/* PDF export button */
.btn.secondary{background:rgba(255,255,255,.08);border:1px solid rgba(255,255,255,.16);}
.btn.secondary:hover{background:rgba(255,255,255,.12);}
/* ---------------- PDF SHEET (canvas -> PDF, keeps diacritics) ---------------- */
.pdf-sheet{
  position:fixed; left:-10000px; top:0;
  width:794px; /* ~A4 at 96dpi */
  background: #0b1220;
  color:#e7eefc;
  border:1px solid rgba(255,255,255,.08);
  border-radius:18px;
  padding:34px 34px 26px;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}
.pdf-header{
  display:flex; align-items:flex-start; justify-content:space-between;
  gap:18px; padding-bottom:18px; border-bottom:1px solid rgba(255,255,255,.10);
}
.pdf-title{font-size:18px; font-weight:800; letter-spacing:.2px}
.pdf-sub{margin-top:6px; color:rgba(231,238,252,.72); font-size:12px}
.pdf-meta{
  min-width:220px;
  background: rgba(255,255,255,.06);
  border:1px solid rgba(255,255,255,.10);
  border-radius:14px;
  padding:12px 12px;
}
.pdf-meta-row{display:flex; justify-content:space-between; gap:12px; font-size:11px; color:rgba(231,238,252,.75); margin:2px 0}
.pdf-meta-row b{color:#e7eefc; font-weight:700}
.pdf-totals{display:grid; grid-template-columns:1fr 1fr 1fr; gap:12px; margin-top:18px}
.pdf-card{
  background: rgba(255,255,255,.06);
  border:1px solid rgba(255,255,255,.10);
  border-radius:16px;
  padding:14px 14px;
}
.pdf-card-k{font-size:11px; color:rgba(231,238,252,.70)}
.pdf-card-v{margin-top:6px; font-size:18px; font-weight:800}
.pdf-section{margin-top:18px}
.pdf-section-h{font-size:12px; font-weight:800; color:rgba(231,238,252,.92); margin-bottom:10px}
.pdf-breakdown{
  white-space:pre-wrap;
  background: rgba(255,255,255,.04);
  border:1px solid rgba(255,255,255,.10);
  border-radius:16px;
  padding:14px 14px;
  font-size:11px;
  line-height:1.45;
  color:#e7eefc;
}
.pdf-footer{
  display:flex; justify-content:space-between; gap:14px;
  padding-top:14px; margin-top:18px;
  border-top:1px solid rgba(255,255,255,.10);
  font-size:10px; color:rgba(231,238,252,.70);
}
