/* ============================================================================
   porady.css — sekce PORADY (modul porady.js). Vychází z brandu portálu:
   SOFT WHITE pozadí, bílé karty (10px radius), GM GREEN akcent, IBM Plex Mono
   pro meta údaje. Barvy fází dle schváleného mockupu.
   ========================================================================== */

/* ---- Scroll (oprava 5. 8.): .main má overflow:hidden — pohled i menu
       potřebují vlastní posuv ------------------------------------------------ */
#view-porady { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; }
#view-porady .por-kwrap { flex: 1; min-height: 0; }
.sidebar #navWrap { overflow-y: auto; min-height: 0; flex-shrink: 1; }

/* ---- Menu: odsazené porady a oddělovací linky ------------------------------ */
.nav-item.por-child { padding-left: 34px; }
.nav-item.por-child2 { padding-left: 48px; }
.shell.sb-mini .nav-item.por-child,
.shell.sb-mini .nav-item.por-child2 { padding-left: 0; }
/* Porada jen k náhledu (management bez členství) — tlumený text */
.nav-item.por-guest span { color: #9E9D9B; }
.nav-item.por-guest.active span { color: var(--black, #1E1E1E); }
.por-nav-line { border-top: 1px solid #ECE9E3; margin: 7px 20px 7px 17px; }
.shell.sb-mini .por-nav-line { margin: 7px 8px; }

/* ---- Obecné ----------------------------------------------------------------- */
.por-wrap { padding: 16px 24px 32px; }
.por-mono { font-family: "IBM Plex Mono", monospace; }
.por-muted { color: var(--g4, #747473); }
.por-card { background: #fff; border: 1px solid #EFEDE8; border-radius: 10px;
  box-shadow: 0 1px 2px rgba(30,30,30,0.05); }

.por-avatar { width: 22px; height: 22px; border-radius: 50%; background: #F2F0EC;
  color: #1E1E1E; display: inline-flex; align-items: center; justify-content: center;
  font-family: "IBM Plex Mono", monospace; font-size: 9px; flex: none;
  box-shadow: 0 0 0 1.5px #fff, 0 0 0 2.5px #E3E0DA; }
.por-avatar + .por-avatar { margin-left: -6px; }

.por-btn { background: #22B573; color: #fff; font-weight: 600; font-size: 12.5px;
  padding: 8px 14px; border-radius: 8px; cursor: pointer; border: none;
  font-family: inherit; }
.por-btn:hover { background: #1DA467; }
.por-btn-outline { background: #fff; color: #747473; font-weight: 600; font-size: 12.5px;
  padding: 7px 13px; border-radius: 8px; cursor: pointer; border: 1px solid #E3E0DA;
  font-family: inherit; }
.por-btn-outline:hover { color: #1E1E1E; border-color: #C8C7C4; }

.por-input { border: 1px solid #E3E0DA; border-radius: 8px; padding: 8px 11px;
  font-size: 12.5px; font-family: inherit; outline: none; background: #fff; color: #1E1E1E; }
.por-input:focus { border-color: #22B573; }

/* ---- Hlavička obrazovky: vyhledávání + přepínač + nové téma ----------------- */
.por-toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.por-seg { padding: 5px 11px; font-size: 12px; color: #747473; cursor: pointer;
  border-radius: 6px; white-space: nowrap; user-select: none; }
.por-seg:hover { color: #1E1E1E; }
.por-seg.on { background: #fff; color: #1E1E1E; font-weight: 600;
  box-shadow: 0 1px 2px rgba(30,30,30,0.08); }
.por-search-box { position: relative; }
.por-search-box input { width: 230px; }
.por-search-drop { position: absolute; top: calc(100% + 6px); left: 0; width: 380px;
  max-height: 420px; overflow-y: auto; background: #fff; border: 1px solid #E3E0DA;
  border-radius: 10px; box-shadow: 0 8px 26px rgba(30,30,30,0.16); z-index: 80; padding: 6px; }
.por-search-hit { padding: 8px 10px; border-radius: 8px; cursor: pointer; }
.por-search-hit:hover { background: #F7F5F1; }

/* ---- KPI karty (Moje úkoly) -------------------------------------------------- */
.por-kpis { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.por-kpi { flex: 1; min-width: 150px; max-width: 240px; padding: 12px 16px; }
.por-kpi .l { font-family: "IBM Plex Mono", monospace; font-size: 10px;
  letter-spacing: 0.1em; color: #747473; }
.por-kpi .v { font-family: Archivo, Inter, sans-serif; font-weight: 600; font-size: 26px; margin-top: 2px; }

/* ---- Seznam Moje úkoly -------------------------------------------------------- */
.por-sec-title { font-family: Archivo, Inter, sans-serif; font-weight: 600; font-size: 13px; margin: 18px 0 7px; }
.por-sec-title .cnt { font-family: "IBM Plex Mono", monospace; font-size: 11px; color: #9E9D9B; font-weight: 400; margin-left: 6px; }
.por-task-row { display: flex; align-items: flex-start; gap: 11px; padding: 10px 14px;
  border-bottom: 1px solid #F5F3EF; flex-wrap: wrap; }
.por-task-row:last-child { border-bottom: none; }
.por-task-row.done { opacity: 0.6; }
.por-task-row.done .t { text-decoration: line-through; color: #9E9D9B; }
.por-task-row .t { font-size: 13.5px; font-weight: 500; line-height: 1.4; }
.por-task-topic { font-size: 11.5px; color: #9E9D9B; margin-top: 2px; cursor: pointer; width: fit-content; }
.por-task-topic:hover { color: #22B573; text-decoration: underline; }
.por-tag { border: 1px solid #22B573; color: #22B573; border-radius: 999px;
  font-size: 10.5px; font-weight: 600; padding: 1px 8px 2px; white-space: nowrap; }
.por-due { font-family: "IBM Plex Mono", monospace; font-size: 11.5px; color: #747473; white-space: nowrap; }
.por-due.overdue { color: #E02020; }

/* Checkbox */
.por-check { width: 16px; height: 16px; flex: none; margin-top: 2px; border: 1.5px solid #C8C7C4;
  border-radius: 5px; cursor: pointer; display: inline-flex; align-items: center;
  justify-content: center; font-size: 11px; line-height: 1; color: #fff; background: #fff; }
.por-check.on { border-color: #22B573; background: #22B573; }

/* ---- Kanban -------------------------------------------------------------------- */
.por-board { display: flex; gap: 13px; align-items: flex-start; width: max-content; min-width: 100%; }
.por-kwrap { flex: 1; overflow: auto; padding: 14px 24px 24px; }
/* pevná šířka sloupce (oba pohledy) — při větším počtu sloupců board roluje vodorovně */
.por-col { flex: none; width: 300px; }
.por-col-head { display: flex; align-items: center; gap: 7px; padding: 2px 4px 8px; }
.por-col-head .dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.por-col-head .n { font-weight: 600; font-size: 12.5px; }
.por-col-head .c { font-family: "IBM Plex Mono", monospace; font-size: 11px; color: #9E9D9B; }
.por-col-body { background: #F2F0EC; border-radius: 10px; padding: 8px; display: flex;
  flex-direction: column; gap: 8px; min-height: 120px; }
.por-tcard { background: #fff; border: 1px solid #EFEDE8; border-radius: 10px;
  padding: 10px 11px; cursor: pointer; box-shadow: 0 1px 2px rgba(30,30,30,0.05); }
.por-tcard[draggable="true"] { cursor: grab; }
.por-tcard[draggable="true"]:active { cursor: grabbing; }
.por-col-body.drag-over { outline: 2px dashed #22B573; outline-offset: -2px;
  background: #EAF6F0; }
.por-drop-line { height: 3px; background: #22B573; border-radius: 2px; margin: 1px 2px;
  pointer-events: none; }
.por-tcard:hover { border-color: #22B573; box-shadow: 0 2px 6px rgba(30,30,30,0.10); }
.por-tcard .nm { font-size: 12.5px; font-weight: 500; line-height: 1.35; }
.por-tcard .meta { display: flex; align-items: center; margin-top: 9px; gap: 8px; }
.por-tcard .mono { font-family: "IBM Plex Mono", monospace; font-size: 10.5px; color: #9E9D9B; }
.por-flow { display: inline-block; margin-top: 7px; font-family: "IBM Plex Mono", monospace;
  font-size: 10.5px; font-weight: 600; padding: 2px 9px 3px; border-radius: 999px; }
.por-flow.out { background: rgba(34,181,115,0.10); color: #1DA467; }
.por-flow.in { background: rgba(0,87,183,0.09); color: #0057B7; }

/* ---- Detail tématu (panel zprava) ---------------------------------------------- */
.por-ovl { position: fixed; inset: 0; background: rgba(30,30,30,0.28); z-index: 40;
  display: flex; justify-content: flex-end; }
.por-panel { position: relative; width: 680px; max-width: 94%; background: #fff;
  box-shadow: -8px 0 28px rgba(30,30,30,0.18); display: flex; flex-direction: column; }
.por-panel-head { display: flex; align-items: flex-start; gap: 14px; padding: 18px 22px 14px;
  border-bottom: 1px solid #F2F0EC; }
.por-panel-head .nm { flex: 1; font-family: Archivo, Inter, sans-serif; font-weight: 600;
  font-size: 16.5px; line-height: 1.35; }
.por-x { cursor: pointer; color: #9E9D9B; font-size: 17px; line-height: 1; padding: 2px 4px; background: none; border: none; }
.por-x:hover { color: #1E1E1E; }
.por-panel-body { flex: 1; overflow-y: auto; padding: 16px 22px 22px; }
.por-props { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 24px; }
.por-lab { font-family: "IBM Plex Mono", monospace; font-size: 10px; letter-spacing: 0.12em; color: #9E9D9B; }
.por-pill { color: #fff; font-size: 11.5px; font-weight: 600; padding: 3px 11px;
  border-radius: 999px; display: inline-block; cursor: pointer; }
.por-chip { background: rgba(34,181,115,0.08); border: 1px solid #22B573; color: #1E1E1E;
  font-size: 11.5px; font-weight: 600; padding: 3px 10px; border-radius: 999px; }
.por-chip-add { border: 1px dashed #C8C7C4; color: #747473; font-size: 11.5px;
  padding: 3px 10px; border-radius: 999px; cursor: pointer; background: #fff; }
.por-chip-add:hover { border-color: #22B573; color: #22B573; }
.por-pick { position: absolute; background: #fff; border: 1px solid #E3E0DA; border-radius: 10px;
  box-shadow: 0 6px 20px rgba(30,30,30,0.14); padding: 6px; z-index: 60; min-width: 190px; }
.por-pick div { padding: 7px 10px; font-size: 12.5px; cursor: pointer; border-radius: 6px;
  display: flex; gap: 8px; align-items: center; }
.por-pick div:hover { background: #F7F5F1; }
.por-h2 { font-family: Archivo, Inter, sans-serif; font-weight: 600; font-size: 13.5px; }

/* Úkoly v detailu + komentáře */
.por-sub { border-bottom: 1px solid #F7F5F1; }
.por-sub-row { display: flex; align-items: flex-start; gap: 10px; padding: 7px 2px; }
.por-sub-row .t { flex: 1; font-size: 13.5px; font-weight: 500; line-height: 1.4; }
.por-sub-row.done .t { text-decoration: line-through; color: #9E9D9B; }
.por-com-badge { font-family: "IBM Plex Mono", monospace; font-size: 10.5px; font-weight: 600;
  color: #0057B7; background: rgba(0,87,183,0.08); padding: 2px 8px; border-radius: 999px;
  cursor: pointer; flex: none; }
.por-plus { width: 20px; height: 20px; flex: none; margin-top: 1px; border: 1px solid #C8C7C4;
  border-radius: 6px; display: inline-flex; align-items: center; justify-content: center;
  font-size: 13px; color: #747473; cursor: pointer; line-height: 1; background: #fff; }
.por-plus:hover { border-color: #22B573; color: #22B573; }
.por-coms { margin: 0 2px 10px 52px; }
.por-com { padding: 7px 10px; border-radius: 8px; margin-top: 6px; background: #FAF9F6;
  border: 1px solid #F2F0EC; }
.por-com.reseni { background: rgba(34,181,115,0.07); border-color: rgba(34,181,115,0.25);
  border-left: 3px solid #22B573; }
.por-com.reopen { background: rgba(247,167,0,0.08); border-color: rgba(247,167,0,0.30);
  border-left: 3px solid #F7A700; }
.por-com .m { font-family: "IBM Plex Mono", monospace; font-size: 10px; color: #9E9D9B; letter-spacing: 0.04em; }
.por-com .x { font-size: 12.5px; line-height: 1.45; margin-top: 2px; }

/* Deník */
.por-log { margin-top: 13px; }
.por-log .m { font-family: "IBM Plex Mono", monospace; font-size: 11px; color: #747473; }
.por-log .x { font-size: 13px; line-height: 1.5; margin-top: 3px; }
.por-panel-foot { display: flex; gap: 9px; padding: 13px 22px; border-top: 1px solid #F2F0EC; background: #FAF9F6; }

/* Dialog dokončení úkolu */
.por-dlg-ovl { position: absolute; inset: 0; background: rgba(30,30,30,0.30); z-index: 70;
  display: flex; align-items: center; justify-content: center; padding: 20px; }
.por-dlg { background: #fff; border-radius: 12px; box-shadow: 0 12px 40px rgba(30,30,30,0.25);
  padding: 20px 22px; width: 440px; max-width: 100%; }
.por-dlg textarea { width: 100%; box-sizing: border-box; margin-top: 12px; border: 1px solid #E3E0DA;
  border-radius: 8px; padding: 9px 11px; font-size: 12.5px; font-family: inherit; outline: none;
  resize: vertical; background: #fff; color: #1E1E1E; }
.por-dlg textarea:focus { border-color: #22B573; }

/* Přehled porad (management) */
.por-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 13px; }
.por-bcard { padding: 16px 18px; }
.por-bcard .nm { font-family: Archivo, Inter, sans-serif; font-weight: 600; font-size: 15px; }
.por-bcard .nums { display: flex; gap: 20px; margin-top: 14px; }
.por-bcard .nums .v { font-family: Archivo, Inter, sans-serif; font-weight: 600; font-size: 21px; }
.por-bcard .nums .l { font-family: "IBM Plex Mono", monospace; font-size: 9.5px;
  letter-spacing: 0.08em; color: #9E9D9B; margin-top: 1px; }
.por-bcard .foot { display: flex; align-items: center; gap: 8px; margin-top: 14px;
  padding-top: 12px; border-top: 1px solid #F2F0EC; }

/* Stavy */
.por-msg { text-align: center; padding: 60px 20px; }
.por-msg .h { font-family: Archivo, Inter, sans-serif; font-weight: 600; font-size: 18px; margin-top: 10px; }
.por-msg .p { font-size: 13px; color: #747473; line-height: 1.55; margin-top: 8px; }
@keyframes porPulse { 0%, 100% { opacity: 0.5; } 50% { opacity: 1; } }
.por-skel { height: 64px; background: #fff; border-radius: 10px; animation: porPulse 1.4s ease-in-out infinite; }

/* ---- Zápis (AI): viditelný průběh analýzy (FCH 10. 8. 2026) ---- */
@keyframes porSpin { to { transform: rotate(360deg); } }
.por-spin { width: 26px; height: 26px; border: 3px solid #E5E2DC; border-top-color: #0057B7; border-radius: 50%; animation: porSpin 0.9s linear infinite; flex: none; }
.por-analyza { display: flex; gap: 14px; align-items: center; margin-top: 14px; padding: 16px 18px; background: #FAF9F6; border-radius: 10px; }
.por-bezi-card { padding: 12px 14px; margin-bottom: 10px; background: rgba(247, 167, 0, 0.10); color: #B87A00; font-size: 12.5px; font-weight: 600; border-radius: 10px; animation: porPulse 1.4s ease-in-out infinite; }

/* ---- Přílohy tématu (soubory + odkazy; FCH 12. 8. 2026) ---- */
.por-pril { display: flex; align-items: center; gap: 9px; padding: 8px 11px; margin-top: 6px; background: #FAF9F6; border-radius: 8px; cursor: pointer; font-size: 12.5px; }
.por-pril:hover { background: #F2F0EC; }
.por-pril .t { font-weight: 600; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---- Zvýraznění chybějících termínů (FCH 8. 9. 2026):
   oranžová = téma bez termínu, fialová = nedokončený úkol bez termínu,
   šrafování = chybí obojí; dokončená témata se nebarví ---- */
.por-tcard.bez-terminu { background: #FFF7E8; }
.por-tcard.ukol-bez-terminu { background: #EFEDFA; }
.por-tcard.bez-obojiho { background: repeating-linear-gradient(135deg, #FFF7E8 0px, #FFF7E8 12px, #EFEDFA 12px, #EFEDFA 24px); }
