.uf-ukoly {
  width: 100%;
  font-size: 15px;
}

.uf-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 18px;
}

.uf-toolbar input,
.uf-toolbar select,
.uf-table input,
.uf-table select,
.uf-table textarea {
  border: 1px solid #d7d7d7;
  border-radius: 8px;
  padding: 9px 10px;
  font-size: 14px;
  width: 100%;
  box-sizing: border-box;
}

.uf-toolbar input,
.uf-toolbar select {
  width: auto;
  min-width: 170px;
}

.uf-btn {
  border: 0;
  border-radius: 999px;
  padding: 10px 16px;
  cursor: pointer;
  font-weight: 600;
}

.uf-btn-primary {
  background: #1f2937;
  color: #fff;
}

.uf-btn-light {
  background: #f2f2f2;
  color: #222;
}

.uf-btn:disabled {
  opacity: .6;
  cursor: wait;
}

.uf-message {
  padding: 12px 14px;
  border-radius: 10px;
  margin-bottom: 15px;
}

.uf-message-ok {
  background: #eaf8ef;
  color: #166534;
}

.uf-message-error {
  background: #fdecec;
  color: #991b1b;
}

.uf-table-wrap {
  overflow-x: auto;
}

.uf-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: auto;
}

.uf-table th,
.uf-table td {
  border-bottom: 1px solid #ececec;
  padding: 12px 10px;
  vertical-align: top;
  text-align: left;
}

.uf-table th {
  background: #f7f7f7;
  font-weight: 700;
  white-space: nowrap;
}

.uf-table .uf-long {
  min-width: 220px;
  white-space: pre-wrap;
  word-break: break-word;
}

.uf-new-row {
  background: #fbfbfb;
}

.uf-new-row textarea {
  min-height: 74px;
  resize: vertical;
}

.uf-badge {
  display: inline-block;
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.uf-badge-nizka { background: #e9f7ef; color: #166534; }
.uf-badge-stredni { background: #fff7df; color: #92400e; }
.uf-badge-vysoka { background: #fff0e6; color: #c2410c; }
.uf-badge-kriticka { background: #fee2e2; color: #991b1b; }

.uf-priority-kriticka td:first-child { border-left: 4px solid #991b1b; }
.uf-priority-vysoka td:first-child { border-left: 4px solid #c2410c; }
.uf-priority-stredni td:first-child { border-left: 4px solid #f59e0b; }
.uf-priority-nizka td:first-child { border-left: 4px solid #16a34a; }

.uf-checkbox-filter {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 14px;
  font-weight: 600;
  color: #374151;
  background: #f7f7f7;
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  padding: 8px 12px;
  line-height: 1;
}

.uf-checkbox-filter input {
  width: auto !important;
  min-width: 0 !important;
  padding: 0;
  margin: 0;
}

.uf-status-splneno td {
  background: #dff3df;
  color: #1f2937;
}

.uf-status-splneno .uf-long {
  opacity: .9;
}

.uf-status-splneno .uf-status-select {
  background: #16a34a;
  color: #fff;
  border-color: #16a34a;
  font-weight: 700;
}

.uf-done-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: #16a34a;
  color: #fff;
  font-weight: 800;
  font-size: 13px;
}

@media (max-width: 860px) {
  .uf-toolbar {
    display: block;
  }
  .uf-toolbar > * {
    width: 100% !important;
    margin-bottom: 9px;
  }
  .uf-table,
  .uf-table thead,
  .uf-table tbody,
  .uf-table th,
  .uf-table td,
  .uf-table tr {
    display: block;
  }
  .uf-table thead {
    display: none;
  }
  .uf-table tr {
    border: 1px solid #e7e7e7;
    border-radius: 14px;
    padding: 12px;
    margin-bottom: 14px;
    background: #fff;
  }
  .uf-table td {
    border: 0;
    padding: 8px 0;
  }
  .uf-table td::before {
    content: attr(data-label);
    display: block;
    font-weight: 700;
    margin-bottom: 4px;
    color: #555;
  }
  .uf-priority-kriticka,
  .uf-priority-vysoka,
  .uf-priority-stredni,
  .uf-priority-nizka {
    border-left-width: 5px !important;
    border-left-style: solid !important;
  }
  .uf-priority-kriticka { border-left-color: #991b1b !important; }
  .uf-priority-vysoka { border-left-color: #c2410c !important; }
  .uf-priority-stredni { border-left-color: #f59e0b !important; }
  .uf-priority-nizka { border-left-color: #16a34a !important; }
  .uf-status-splneno { background: #eaf8ea !important; }
  .uf-status-splneno td { background: transparent; }
}

/* Zvýraznění požadavku otevřeného z odkazu v e-mailu: ?ukol_id=123 */
.uf-task-highlight {
  outline: 3px solid #1f2937;
  outline-offset: -3px;
  background: #fffbea !important;
}

.uf-task-highlight td {
  background: #fffbea !important;
}

.uf-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.uf-edit-row {
  background: #fbfbfb;
}

.uf-edit-row textarea {
  min-height: 86px;
  resize: vertical;
}

/* Verze 1.5 - přehlednější stav a užší akce */
.uf-status-select {
  min-width: 128px;
  width: 128px;
  max-width: 128px;
  padding: 10px 34px 10px 12px;
  font-weight: 600;
  text-overflow: clip;
}

.uf-actions {
  width: 92px;
  min-width: 92px;
  max-width: 92px;
  gap: 6px;
  align-items: flex-start;
}

.uf-actions .uf-btn {
  width: 38px;
  height: 38px;
  padding: 0;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  line-height: 1;
}

.uf-table th:last-child,
.uf-table td:last-child {
  width: 96px;
}

.uf-table th:nth-child(8),
.uf-table td:nth-child(8) {
  width: 145px;
}

.uf-status-rozpracovany td {
  background: #f4f9ff;
}

.uf-status-splneno .uf-done-icon {
  background: #22a447;
}

/* v1.6 action icons inline */
.uf-actions{white-space:nowrap;display:flex;gap:8px;align-items:center;}


/* Verze 1.7 - akce vedle sebe a jasná ikona historie */
.uf-actions {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  gap: 8px !important;
  align-items: center !important;
  justify-content: flex-start !important;
}
.uf-actions .uf-btn {
  font-family: Arial, Helvetica, sans-serif;
}


/* Verze 1.8 - souhrn, požadavky po termínu a více e-mailů */
.uf-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 14px;
}
.uf-summary-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: 999px;
  padding: 7px 11px;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid transparent;
}
.uf-summary-open { background:#eef6ff; color:#1d4ed8; border-color:#bfdbfe; }
.uf-summary-progress { background:#fff7df; color:#92400e; border-color:#fde68a; }
.uf-summary-critical { background:#fee2e2; color:#991b1b; border-color:#fecaca; }
.uf-summary-overdue { background:#fff1f2; color:#be123c; border-color:#fecdd3; }
.uf-overdue td {
  background: #fff1f2 !important;
}
.uf-overdue td:first-child {
  border-left: 4px solid #e11d48 !important;
}
.uf-overdue .uf-due-date {
  color: #be123c;
  font-weight: 800;
}
.uf-overdue-badge {
  display: block;
  width: fit-content;
  margin-top: 5px;
  border-radius: 999px;
  padding: 3px 7px;
  font-size: 12px;
  font-weight: 800;
  background: #ffe4e6;
  color: #be123c;
  border: 1px solid #fecdd3;
}
