/* SmartMade — vzhled podle smartmade.cz: skoro černá, sklo, kouř, bílá tlačítka, Inter Tight */
:root {
  --bg: #060507;
  --panel: #16151A;
  --t1: #FFFFFF;
  --t2: rgba(255, 255, 255, 0.68);
  --t3: #8D8D94;
  --line: rgba(255, 255, 255, 0.08);
  --line2: rgba(255, 255, 255, 0.14);
  --gl: linear-gradient(145deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.028));
  --gl2: rgba(255, 255, 255, 0.045);
  --ok: #7EE2A8; --ok-bg: rgba(126, 226, 168, 0.12);
  --warn: #F2C46D; --warn-bg: rgba(242, 196, 109, 0.12);
  --bad: #FF8F80; --bad-bg: rgba(255, 143, 128, 0.13);
  --info: #AEBBFF; --info-bg: rgba(174, 187, 255, 0.13);
  --r: 22px;
  --font: 'Inter Tight', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, Consolas, monospace;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--t1); font-family: var(--font); -webkit-font-smoothing: antialiased; }
body { overflow: hidden; }
a { color: inherit; }
button, input, textarea, select { font-family: inherit; color: inherit; }
::selection { background: rgba(255, 255, 255, 0.25); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.1); border-radius: 10px; border: 3px solid var(--bg); }
::-webkit-scrollbar-track { background: transparent; }

.ic { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.num { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--mono); }
.muted { color: var(--t3); }
.soft { color: var(--t2); }
.lbl { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--t3); font-weight: 500; }
.gl { background: var(--gl); border: 1px solid var(--line); border-radius: var(--r); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); }
.gl2 { background: var(--gl2); border: 1px solid var(--line); border-radius: 14px; }
.warnb { border-color: rgba(242, 196, 109, 0.38) !important; }
.row { display: flex; align-items: center; gap: 10px; }
.col { display: flex; flex-direction: column; }
.grow { flex-grow: 1; min-width: 0; }
.gap4 { gap: 4px; } .gap8 { gap: 8px; } .gap12 { gap: 12px; } .gap16 { gap: 16px; }
.wrap { flex-wrap: wrap; }
.clip { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* tlačítka */
.b { font-size: 14px; font-weight: 500; height: 40px; padding: 0 18px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; white-space: nowrap; border: 1px solid transparent; text-decoration: none; transition: transform .08s, background .15s, opacity .15s; }
.b:active { transform: scale(0.97); }
.b:disabled { opacity: .45; cursor: default; transform: none; }
.bw { background: #FFFFFF; color: #060507; border-color: #FFFFFF; }
.bw:hover { background: #E9E9EC; }
.bg { background: rgba(255, 255, 255, 0.06); color: #FFFFFF; border-color: rgba(255, 255, 255, 0.14); }
.bg:hover { background: rgba(255, 255, 255, 0.11); }
.bs { height: 34px; padding: 0 14px; font-size: 13px; }
.bi { width: 40px; padding: 0; }
.bs.bi { width: 34px; }

.tg { font-size: 12px; font-weight: 500; border-radius: 999px; padding: 3px 10px; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; background: rgba(255, 255, 255, 0.07); color: var(--t2); }
.tg.ok { background: var(--ok-bg); color: var(--ok); } .tg.warn { background: var(--warn-bg); color: var(--warn); }
.tg.bad { background: var(--bad-bg); color: var(--bad); } .tg.info { background: var(--info-bg); color: var(--info); }
.dot { width: 7px; height: 7px; border-radius: 999px; flex-shrink: 0; background: var(--t3); }
.dot.ok { background: var(--ok); box-shadow: 0 0 0 4px rgba(126, 226, 168, 0.16); } .dot.warn { background: var(--warn); }
.dot.bad { background: var(--bad); } .dot.info { background: var(--info); }
.q { border-left: 2px solid rgba(255, 255, 255, 0.25); padding-left: 10px; color: var(--t2); font-style: italic; }

/* rozvržení */
#app { position: relative; height: 100%; display: flex; }
.smoke { position: fixed; pointer-events: none; z-index: 0; border-radius: 50%; }
.smoke.a { left: 45%; top: -30%; width: 70vw; height: 90vh; background: radial-gradient(closest-side, rgba(255, 255, 255, 0.07), transparent); }
.smoke.b { left: -20%; top: 55%; width: 60vw; height: 70vh; background: radial-gradient(closest-side, rgba(255, 255, 255, 0.045), transparent); }

aside.side { width: 236px; flex-shrink: 0; display: flex; flex-direction: column; padding: 22px 14px 18px; gap: 2px; border-right: 1px solid rgba(255, 255, 255, 0.07); position: relative; z-index: 2; overflow-y: auto; }
.wm { font-size: 21px; letter-spacing: -0.02em; padding: 2px 12px 20px; }
.wm b { font-weight: 700; } .wm span { font-weight: 400; }
.ws { display: flex; align-items: center; gap: 10px; background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 14px; padding: 9px 10px; font-size: 13px; margin-bottom: 6px; }
.ws .logo { width: 28px; height: 28px; border-radius: 8px; background: #FFFFFF; color: #060507; font-weight: 700; font-size: 11px; display: flex; align-items: center; justify-content: center; }
.nsec { padding: 14px 12px 6px; }
.nv { display: flex; align-items: center; gap: 12px; height: 36px; padding: 0 12px; border-radius: 10px; color: var(--t2); font-size: 14px; text-decoration: none; }
.nv:hover { background: rgba(255, 255, 255, 0.05); color: #FFFFFF; }
.nv.on { background: rgba(255, 255, 255, 0.09); color: #FFFFFF; }
.nv.soon { color: var(--t3); }
.nv .cnt { margin-left: auto; background: #FFFFFF; color: #060507; font-size: 11px; font-weight: 700; border-radius: 999px; padding: 1px 7px; }
.nv .brzy { margin-left: auto; font-size: 10px; border: 1px dashed rgba(255, 255, 255, 0.22); border-radius: 999px; padding: 1px 7px; }
.me { display: flex; align-items: center; gap: 10px; padding: 12px 10px 0; border-top: 1px solid rgba(255, 255, 255, 0.07); margin-top: 10px; }
.av { width: 32px; height: 32px; border-radius: 999px; background: rgba(255, 255, 255, 0.12); font-size: 12px; font-weight: 600; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }

main.main { flex-grow: 1; min-width: 0; display: flex; flex-direction: column; position: relative; z-index: 1; }
header.top { height: 76px; flex-shrink: 0; display: flex; align-items: center; gap: 18px; padding: 0 32px; }
.ttl { display: flex; flex-direction: column; gap: 2px; min-width: 200px; }
.ttl h1 { margin: 0; font-size: 24px; font-weight: 500; letter-spacing: -0.03em; }
.ttl span { font-size: 13px; color: var(--t3); }
.cmd { flex-grow: 1; max-width: 620px; margin: 0 auto; display: flex; align-items: center; gap: 12px; height: 46px; border-radius: 999px; background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.12); padding: 0 6px 0 18px; }
.cmd input { flex-grow: 1; border: none; outline: none; background: transparent; font-size: 15px; min-width: 0; }
.cmd input::placeholder { color: var(--t3); }
.kbd { font-family: var(--mono); font-size: 11px; color: var(--t3); border: 1px solid rgba(255, 255, 255, 0.14); border-radius: 6px; padding: 2px 6px; }
.mic { width: 34px; height: 34px; border-radius: 999px; border: none; background: #FFFFFF; color: #060507; display: flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0; }
.mic.rec { background: var(--bad); color: #060507; animation: pulse 1.2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(255, 143, 128, 0.5); } 100% { box-shadow: 0 0 0 14px rgba(255, 143, 128, 0); } }
.stav { display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px; border-radius: 999px; font-size: 13px; font-weight: 500; white-space: nowrap; }
.stav.ok { background: var(--ok-bg); color: var(--ok); } .stav.warn { background: var(--warn-bg); color: var(--warn); } .stav.idle { background: rgba(255,255,255,.06); color: var(--t2); }
#view { flex-grow: 1; overflow-y: auto; padding: 4px 32px 32px; }
.page { display: flex; flex-direction: column; gap: 18px; max-width: 1600px; margin: 0 auto; animation: fade .25s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

h2 { margin: 0; font-size: 17px; font-weight: 600; }
.hero { padding: 26px 30px; display: flex; flex-direction: column; gap: 16px; position: relative; overflow: hidden; }
.hero::after { content: ""; position: absolute; right: -80px; top: -120px; width: 420px; height: 420px; background: radial-gradient(closest-side, rgba(255, 255, 255, 0.09), transparent); pointer-events: none; }
.big { font-size: 44px; font-weight: 300; letter-spacing: -0.04em; line-height: 1.05; }
.stat { padding: 18px; display: flex; flex-direction: column; justify-content: space-between; gap: 6px; border-radius: 20px; min-height: 118px; text-decoration: none; }
.stat .n { font-size: 44px; font-weight: 300; letter-spacing: -0.04em; line-height: 1; }
.grid { display: grid; gap: 18px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.card { padding: 20px 22px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.card.tight { padding: 16px 18px; }
.sep > * + * { border-top: 1px solid rgba(255, 255, 255, 0.07); }
.item { padding: 14px 0; display: flex; gap: 12px; }
.empty { padding: 26px; text-align: center; color: var(--t3); font-size: 14px; }
.skel { height: 14px; border-radius: 8px; background: linear-gradient(90deg, rgba(255,255,255,.04), rgba(255,255,255,.09), rgba(255,255,255,.04)); background-size: 200% 100%; animation: sk 1.2s infinite; }
@keyframes sk { to { background-position: -200% 0; } }

/* agenti */
.ag { padding: 14px 14px 12px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.agrow { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; }

/* časová osa / feed */
.fd { display: flex; gap: 12px; }
.fd .ico { width: 30px; height: 30px; border-radius: 999px; background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.1); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.fd .ln { width: 1px; flex-grow: 1; background: rgba(255, 255, 255, 0.08); margin-top: 4px; }
.fd .bd { display: flex; flex-direction: column; gap: 3px; padding-bottom: 14px; min-width: 0; }

/* chat */
.chat { display: flex; flex-direction: column; gap: 14px; }
.msg { max-width: min(640px, 86%); padding: 12px 16px; font-size: 15px; line-height: 1.55; white-space: pre-wrap; word-wrap: break-word; }
.msg.u { align-self: flex-end; background: #FFFFFF; color: #060507; border-radius: 18px 18px 4px 18px; }
.msg.a { align-self: flex-start; background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 4px 18px 18px 18px; }
.msg .kdy { display: block; font-size: 11px; opacity: .55; margin-top: 6px; }
.typing span { display: inline-block; width: 7px; height: 7px; margin-right: 4px; border-radius: 999px; background: var(--t2); animation: bl 1s infinite; }
.typing span:nth-child(2) { animation-delay: .15s; } .typing span:nth-child(3) { animation-delay: .3s; }
@keyframes bl { 50% { opacity: .2; } }
.composer { display: flex; align-items: flex-end; gap: 10px; border-radius: 26px; background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.12); padding: 8px 8px 8px 18px; }
.composer textarea { flex-grow: 1; border: none; outline: none; background: transparent; font-size: 15px; resize: none; max-height: 180px; min-height: 24px; padding: 8px 0; line-height: 1.5; }

/* kanban */
.kanban { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(210px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 8px; }
.kcol { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.kcard { padding: 12px 13px; display: flex; flex-direction: column; gap: 7px; text-decoration: none; }
.kcard:hover { background: rgba(255, 255, 255, 0.07); }

/* tabulky */
table.t { width: 100%; border-collapse: collapse; font-size: 14px; }
table.t th { text-align: left; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--t3); font-weight: 500; padding: 8px 10px 10px 0; }
table.t td { padding: 12px 10px 12px 0; border-top: 1px solid rgba(255, 255, 255, 0.06); vertical-align: top; }
table.t td.r, table.t th.r { text-align: right; }
tr.klik { cursor: pointer; } tr.klik:hover td { background: rgba(255, 255, 255, 0.03); }

/* fáze */
.stages { display: flex; gap: 10px; }
.st { display: flex; flex-direction: column; gap: 8px; flex: 1 1 0; min-width: 0; }
.st .d { width: 26px; height: 26px; border-radius: 999px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.st .d.done { background: #FFFFFF; color: #060507; }
.st .d.now { border: 2px solid #FFFFFF; box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.1); }
.st .d.now::after { content: ""; width: 8px; height: 8px; border-radius: 999px; background: #FFFFFF; }
.st .d.todo { border: 1px dashed rgba(255, 255, 255, 0.3); }
.st .bar { flex-grow: 1; height: 1px; background: rgba(255, 255, 255, 0.12); margin-left: 8px; }
.st .bar.done { background: rgba(255, 255, 255, 0.5); }

/* přehrávač */
.wave { display: flex; align-items: center; gap: 3px; height: 60px; overflow: hidden; flex-grow: 1; cursor: pointer; }
.wave span { width: 3px; border-radius: 3px; background: rgba(255, 255, 255, 0.28); flex-shrink: 0; }
.wave span.p { background: #FFFFFF; }
.play { width: 52px; height: 52px; border-radius: 999px; border: none; background: #FFFFFF; color: #060507; display: flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0; }

/* upozornění v aplikaci */
#toasts { position: fixed; right: 20px; top: 20px; z-index: 50; display: flex; flex-direction: column; gap: 10px; width: 360px; max-width: calc(100vw - 40px); }
.toast { background: rgba(30, 29, 36, 0.92); backdrop-filter: blur(20px); border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 18px; padding: 14px 16px; display: flex; gap: 12px; box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5); animation: fade .25s ease; cursor: pointer; }
.toast .ti { width: 30px; height: 30px; border-radius: 9px; background: #FFFFFF; color: #060507; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }

/* dialog */
.dlg-bg { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.6); z-index: 40; display: flex; align-items: center; justify-content: center; padding: 20px; animation: fade .2s; }
.dlg { width: 680px; max-width: 100%; max-height: 90vh; overflow-y: auto; background: #16151A; border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 24px; padding: 24px; display: flex; flex-direction: column; gap: 14px; }
.fld { width: 100%; background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.14); border-radius: 12px; padding: 12px 14px; font-size: 15px; line-height: 1.55; outline: none; }
.fld:focus { border-color: rgba(255, 255, 255, 0.35); }
textarea.fld { min-height: 280px; resize: vertical; }

/* mobil */
nav.tabs { display: none; }
.only-m { display: none; }
@media (max-width: 1180px) {
  .agrow { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stav { display: none; }
}
@media (max-width: 860px) {
  aside.side { display: none; }
  header.top { height: auto; padding: 18px 16px 10px; flex-wrap: wrap; gap: 10px; }
  .ttl h1 { font-size: 26px; }
  .cmd { order: 3; max-width: none; width: 100%; margin: 0; }
  .kbd { display: none; }
  #view { padding: 4px 14px 120px; }
  .g2, .g3, .g4 { grid-template-columns: minmax(0, 1fr); }
  .agrow { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .big { font-size: 30px; }
  .hero { padding: 20px; }
  .stat { min-height: 96px; } .stat .n { font-size: 32px; }
  .stages { flex-wrap: wrap; } .st { flex: 1 1 40%; }
  .only-d { display: none !important; } .only-m { display: flex; }
  nav.tabs { display: flex; position: fixed; left: 12px; right: 12px; bottom: 14px; height: 70px; border-radius: 26px; background: rgba(22, 21, 26, 0.9); border: 1px solid rgba(255, 255, 255, 0.1); backdrop-filter: blur(20px); align-items: center; justify-content: space-around; z-index: 20; }
  nav.tabs a { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 52px; min-height: 44px; justify-content: center; font-size: 11px; font-weight: 500; color: var(--t3); text-decoration: none; position: relative; }
  nav.tabs a.on { color: #FFFFFF; }
  nav.tabs .fab { width: 56px; height: 56px; border-radius: 999px; background: #FFFFFF; color: #060507; border: none; display: flex; align-items: center; justify-content: center; box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.08); cursor: pointer; }
  nav.tabs .fab.rec { background: var(--bad); animation: pulse 1.2s infinite; }
  nav.tabs .bdg { position: absolute; top: 0; right: 6px; background: #FFFFFF; color: #060507; font-size: 10px; font-weight: 700; border-radius: 999px; padding: 0 5px; }
  #toasts { top: auto; bottom: 100px; right: 12px; left: 12px; width: auto; }
}

/* nic nesmí roztáhnout stránku do šířky: sloupce mřížky a hlavní plocha se smí zúžit, dlouhý text se zalomí */
.grid > *, .kcol, .card { min-width: 0; }
main.main { overflow: hidden; }
#app { width: 100%; }
.card, .gl2, .msg { overflow-wrap: anywhere; }

/* rozvržení obrazovek (na telefonu jeden sloupec) */
.g-side { grid-template-columns: minmax(0, 1fr) 340px; }
.g-3w { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1fr); }
.g-3k { grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr) minmax(0, 1fr); }
.g-2w { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }
.g-2p { grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); }
@media (max-width: 1180px) {
  .g-3w, .g-3k { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .g-side { grid-template-columns: minmax(0, 1fr) 300px; }
}
@media (max-width: 860px) {
  .g-side, .g-3w, .g-3k, .g-2w, .g-2p { grid-template-columns: minmax(0, 1fr); }
  .g2m { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .g3m { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
  .g3m .stat .n { font-size: 26px; }
  .stat { min-height: 0; }
}
