/* ====== Bobus Marketing brand (dle brand guide v1.1) ====== */
:root {
  --teal:#257881; --teal-dark:#1a5a61; --teal-light:#e8f2f3;
  --coral:#de5237; --coral-dark:#b8402a; --coral-light:#fceeeb;
  --ink:#1a2530; --muted:#7a8896; --body:#3a4a58;
  --line:#e6ebf0; --soft:#f7f9fb;
  --shadow:0 4px 30px rgba(26,37,48,.06);
  --shadow-hover:0 12px 40px rgba(26,37,48,.12);
  --btn-shadow:0 2px 8px rgba(222,82,55,.25);
  font-family:"Exo 2",-apple-system,"Segoe UI",Helvetica,Arial,sans-serif;
}
* { box-sizing:border-box; }
body { margin:0; color:var(--body); background:var(--soft); font-size:16px; line-height:1.6; }
h1,h2,h3 { color:var(--ink); font-weight:800; letter-spacing:-.4px; line-height:1.2; }
h2 { font-size:1.5rem; } h3 { font-weight:700; }
a { color:var(--teal); text-decoration:none; transition:color .2s; }
a:hover { color:var(--teal-dark); text-decoration:underline; }
.muted { color:var(--muted); } .hint { color:var(--muted); }
.err { color:var(--coral-dark); } .ok { color:var(--teal-dark); }
code { background:#fff; border:1px solid var(--line); border-radius:5px; padding:1px 6px; font-size:.85em; }

/* Topbar (bily header dle webu) */
.topbar { display:flex; align-items:center; gap:1.5rem; padding:.6rem 1.4rem;
  background:#fff; border-bottom:1px solid var(--line); position:sticky; top:0; z-index:20;
  box-shadow:0 1px 8px rgba(26,37,48,.04); }
.brand { display:flex; align-items:baseline; gap:.4rem; text-decoration:none; }
.brand .logo { height:40px; width:auto; display:block; align-self:center; }
.brand .appname { font-weight:800; font-size:1.2rem; letter-spacing:-.5px; color:var(--coral); }
.mainnav { display:flex; gap:.3rem; flex:1; }
.mainnav a { color:var(--body); text-decoration:none; padding:.4rem .9rem; border-radius:8px; font-weight:600; }
.mainnav a:hover { background:var(--teal-light); color:var(--teal-dark); }
.mainnav a.on { background:var(--teal); color:#fff; }
.topbar .user { color:var(--muted); font-size:.85rem; }

main { padding:1.3rem 1.4rem; }
.page { max-width:1140px; margin:0 auto; }

/* Login */
.login { max-width:440px; margin:5rem auto; text-align:center; background:#fff;
  padding:3rem 2.5rem; border-radius:20px; border:1px solid var(--line); box-shadow:var(--shadow); }
.login h1 { margin-top:0; }

/* Buttons - default teal, primary coral (CTA dle brandu) */
.btn, button { background:var(--teal); color:#fff; border:0; padding:.55rem 1rem;
  border-radius:10px; cursor:pointer; text-decoration:none; display:inline-block;
  font-family:inherit; font-weight:700; font-size:.9rem; transition:background .2s, transform .2s; }
button:hover, .btn:hover { background:var(--teal-dark); color:#fff; text-decoration:none; }
button.primary { background:var(--coral); box-shadow:var(--btn-shadow); }
button.primary:hover { background:var(--coral-dark); }
button:disabled { background:#b6c2cc; cursor:not-allowed; box-shadow:none; }
.btn.small, button.small { padding:.32rem .7rem; font-size:.8rem; }

/* Konverzacni vyhledavac */
.searchbar { background:#fff; border:1px solid var(--line); border-radius:16px; padding:1rem 1.1rem;
  margin-bottom:1.1rem; box-shadow:var(--shadow); }
.searchbar textarea { width:100%; border:1px solid var(--line); border-radius:10px; padding:.6rem .7rem;
  font-family:inherit; font-size:1rem; resize:vertical; color:var(--ink); }
.searchbar textarea:focus { outline:none; border-color:var(--teal); }
.searchbar-row { display:flex; align-items:center; gap:.8rem; margin-top:.6rem; }
.smarttoggle { display:flex; align-items:center; gap:.4rem; font-size:.88rem; font-weight:600;
  color:var(--teal-dark); margin-right:auto; cursor:pointer; }
.smarttoggle input { accent-color:var(--teal); width:16px; height:16px; }
.searchbar-row button { padding:.55rem 1.6rem; }
.sidenote { font-size:.78rem; color:var(--muted); background:var(--teal-light); border-radius:8px; padding:.5rem .6rem; margin:0 0 .5rem; }

/* Understood banner */
.understood { background:var(--teal-light); border:1px solid #cbe3e0; border-radius:12px;
  padding:.6rem .9rem; margin-bottom:.9rem; font-size:.85rem; color:var(--teal-dark);
  display:flex; flex-wrap:wrap; align-items:center; gap:.4rem; }
.understood .uchip { background:#fff; border:1px solid #cbe3e0; border-radius:20px; padding:.05rem .55rem; font-weight:600; }
.understood .umuted { color:var(--muted); }
.reason { display:block; color:var(--coral-dark); font-weight:700; font-size:.68rem; margin-bottom:.15rem; }

/* Layout hledani */
.layout { display:grid; grid-template-columns:280px 1fr; gap:1.2rem; }
.sidebar { background:#fff; border:1px solid var(--line); border-radius:16px; padding:1.1rem;
  height:max-content; position:sticky; top:74px; box-shadow:var(--shadow); }
.sidebar input[type=text], .sidebar select, .sidebar input[type=date] {
  width:100%; padding:.5rem; border:1px solid var(--line); border-radius:9px; font-family:inherit; font-size:.9rem; }
.sidebar input[type=text]:focus, .sidebar select:focus { outline:none; border-color:var(--teal); }
.sidebar label { display:block; margin:.7rem 0 .2rem; font-size:.8rem; font-weight:600; color:var(--muted);
  text-transform:uppercase; letter-spacing:.5px; }
.sidebar fieldset { border:1px solid var(--line); border-radius:10px; margin:.7rem 0; max-height:180px; overflow:auto; }
.sidebar legend { font-size:.72rem; color:var(--muted); text-transform:uppercase; letter-spacing:.8px; padding:0 .3rem; }
.chk { display:flex; gap:.4rem; align-items:center; font-size:.85rem; text-transform:none; letter-spacing:0; font-weight:400; color:var(--body); }
.daterow { display:flex; gap:.5rem; } .daterow label { flex:1; }
.sidebar > form > button { width:100%; margin-top:.7rem; }

/* Toolbar */
.results { min-width:0; }
.toolbar { display:flex; align-items:center; gap:.6rem; margin-bottom:.9rem; flex-wrap:wrap;
  background:#fff; border:1px solid var(--line); border-radius:14px; padding:.6rem .9rem; box-shadow:var(--shadow); }
#selinfo { font-weight:700; color:var(--ink); margin-right:auto; }

/* Grid */
.grid { min-height:200px; }
.thumbs { display:grid; grid-template-columns:repeat(auto-fill,minmax(165px,1fr)); gap:.8rem; }
.thumb { margin:0; background:#fff; border:1px solid var(--line); border-radius:14px; overflow:hidden;
  position:relative; box-shadow:var(--shadow); transition:transform .2s, box-shadow .2s; }
.thumb:hover { transform:translateY(-3px); box-shadow:var(--shadow-hover); }
.thumb .sel { position:absolute; top:.5rem; left:.5rem; width:19px; height:19px; z-index:2; cursor:pointer; accent-color:var(--coral); }
.thumb img { width:100%; height:145px; object-fit:cover; display:block; cursor:pointer; background:var(--teal-light); }
.thumb figcaption { font-size:.72rem; padding:.45rem .55rem; color:var(--body); line-height:1.3;
  display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.thumb .cat { display:inline-block; background:var(--teal-light); color:var(--teal-dark); border-radius:5px;
  padding:.05rem .35rem; font-size:.63rem; font-weight:700; margin-right:.3rem; text-transform:uppercase; letter-spacing:.3px; }

.htmx-indicator { opacity:0; color:var(--muted); font-size:.85rem; transition:opacity .2s; }
.htmx-request .htmx-indicator, .htmx-indicator.htmx-request { opacity:1; }

/* Cards / tables */
.card { background:#fff; border:1px solid var(--line); border-radius:16px; padding:1.2rem 1.4rem; margin:1.2rem 0; box-shadow:var(--shadow); }
.card h2 { margin-top:0; }
.cardhead { display:flex; align-items:center; gap:.7rem; }
.cardhead h2 { margin:0; flex:1; }
.tbl { width:100%; border-collapse:collapse; font-size:.88rem; }
.tbl th { text-align:left; color:var(--muted); font-weight:700; text-transform:uppercase; letter-spacing:.5px;
  font-size:.72rem; border-bottom:2px solid var(--line); padding:.5rem .5rem; }
.tbl td { border-bottom:1px solid var(--line); padding:.5rem .5rem; }
.tbl tr.dim { opacity:.5; }
.badge { background:var(--teal-light); color:var(--teal-dark); border-radius:20px; padding:.12rem .7rem; font-size:.73rem; font-weight:700; }
.badge.success { background:var(--teal-light); color:var(--teal-dark); }
.badge.warn, .badge.partial { background:var(--coral-light); color:var(--coral-dark); }
.badge.failed { background:var(--coral-light); color:var(--coral-dark); }
.badge.running { background:#e8eef3; color:var(--teal); }

/* Progress */
.progwrap { background:var(--teal-light); border-radius:20px; height:14px; overflow:hidden; }
.progbar { height:100%; width:0; background:var(--teal); transition:width .4s; }

/* Form klienta */
.clientform { display:grid; grid-template-columns:1fr 1fr; gap:.8rem; max-width:660px; }
.clientform label { font-size:.85rem; font-weight:600; color:var(--muted); }
.clientform input { width:100%; padding:.5rem; border:1px solid var(--line); border-radius:9px; font-family:inherit; margin-top:.2rem; }
.clientform input:focus { outline:none; border-color:var(--teal); }
.clientform button { grid-column:1/-1; justify-self:start; }

/* Modal */
.modal { position:fixed; inset:0; background:rgba(26,37,48,.55); display:none;
  align-items:center; justify-content:center; z-index:50; padding:1rem; }
.modal-box { background:#fff; border-radius:20px; max-width:920px; width:100%; max-height:90vh;
  overflow:auto; padding:1.4rem 1.6rem; position:relative; box-shadow:var(--shadow-hover); }
.modal-close { position:absolute; top:.7rem; right:.7rem; background:var(--teal-light); color:var(--teal-dark); }
.modal-close:hover { background:var(--teal); color:#fff; }
.modal-actions { display:flex; gap:.6rem; justify-content:flex-end; margin-top:1rem; }
.modal-box label { display:block; margin:.6rem 0; }
.modal-box input[type=text], .modal-box #exp-name { padding:.5rem; border:1px solid var(--line); border-radius:9px; font-family:inherit; }

/* Detail */
.detail { display:grid; grid-template-columns:1.3fr 1fr; gap:1.3rem; }
.detail-img img { width:100%; border-radius:12px; background:var(--teal-light); }
.detail-meta h3 { margin:.2rem 0; }
.kv { display:flex; justify-content:space-between; gap:1rem; border-bottom:1px solid var(--line); padding:.4rem 0; font-size:.88rem; }
.kv span:first-child { color:var(--muted); }
.tags { margin:.8rem 0; display:flex; flex-wrap:wrap; gap:.35rem; }
.tag { background:var(--teal-light); color:var(--teal-dark); border-radius:6px; padding:.12rem .5rem; font-size:.78rem; font-weight:600; }
.colors { font-size:.82rem; color:var(--body); margin:.3rem 0; }
.maplink { display:inline-block; margin:.6rem 0; }
.exphist { margin-top:.7rem; font-size:.85rem; } .exphist ul { margin:.3rem 0; padding-left:1.1rem; }

@media (max-width:800px){
  .layout { grid-template-columns:1fr; } .sidebar { position:static; }
  .detail { grid-template-columns:1fr; } .clientform { grid-template-columns:1fr; }
  .mainnav { gap:0; } .mainnav a { padding:.4rem .6rem; }
}
