
#live-status-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.55);
  z-index: 2600;
  font-family: Arial, sans-serif;
}

#live-status-modal.live-status-open {
  display: flex;
}

#live-status-box {
  width: min(980px, calc(100vw - 24px));
  max-height: calc(100vh - 24px);
  background: #f6f8fb;
  border-radius: 14px;
  box-shadow: 0 18px 55px rgba(0, 0, 0, 0.35);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

#live-status-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  background: #ffffff;
  border-bottom: 1px solid #dfe5ef;
}

#live-status-header h3 {
  margin: 0;
  font-size: 20px;
  color: #1f2937;
}

#live-status-close {
  border: none;
  background: transparent;
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
  color: #334155;
}

#live-status-body {
  padding: 16px;
  overflow: auto;
}

.live-status-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.live-status-updated {
  font-size: 13px;
  color: #64748b;
}

.live-status-export {
  border: none;
  border-radius: 9px;
  padding: 9px 13px;
  font-weight: 700;
  cursor: pointer;
  background: #0f766e;
  color: white;
  white-space: nowrap;
}

.live-status-export:hover {
  background: #115e59;
}

.live-status-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.live-status-secondary {
  background: #334155;
}

.live-status-secondary:hover {
  background: #1e293b;
}

.live-status-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.live-status-card {
  background: white;
  border: 1px solid #dfe5ef;
  border-radius: 12px;
  padding: 14px;
  min-height: 112px;
}

.live-status-card-wide {
  grid-column: span 3;
}

.live-status-card h4 {
  margin: 0 0 10px 0;
  color: #0f172a;
  font-size: 15px;
}

.live-status-value {
  font-size: 28px;
  font-weight: 800;
  color: #111827;
  line-height: 1.1;
}

.live-status-label {
  margin-top: 4px;
  color: #64748b;
  font-size: 13px;
}

.live-status-lines {
  display: grid;
  gap: 7px;
  font-size: 14px;
  color: #334155;
}

.live-status-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px dashed #e2e8f0;
  padding-bottom: 5px;
}

.live-status-line span:first-child {
  color: #64748b;
}

.live-status-line strong {
  color: #0f172a;
  text-align: right;
}

.live-status-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 13px;
  font-weight: 800;
}

.live-status-pill.ok {
  background: #dcfce7;
  color: #166534;
}

.live-status-pill.warning {
  background: #fef3c7;
  color: #92400e;
}

.live-status-pill.bad {
  background: #fee2e2;
  color: #991b1b;
}

.live-status-summary {
  display: grid;
  gap: 8px;
}

.live-status-summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 9px 10px;
  background: #f8fafc;
  border-radius: 9px;
}

.live-status-summary-row span {
  color: #334155;
}

.live-status-error {
  padding: 14px;
  border-radius: 12px;
  background: #fee2e2;
  color: #991b1b;
  font-weight: 700;
}



.live-status-log-toolbar {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
  background: #ffffff;
  border: 1px solid #dfe5ef;
  border-radius: 12px;
  padding: 12px;
}

.live-status-log-toolbar label,
.live-status-log-field {
  display: grid;
  gap: 4px;
  color: #475569;
  font-size: 12px;
  font-weight: 700;
}

.live-status-log-toolbar input {
  height: 34px;
  border: 1px solid #cbd5e1;
  border-radius: 9px;
  padding: 0 10px;
  font-size: 14px;
  background: white;
  color: #0f172a;
}

.live-status-log-select-row {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  flex: 0 0 auto;
}

.live-status-log-field {
  min-width: 124px;
}

.live-status-log-search-label {
  flex: 1 1 220px;
}

.live-status-log-action-row {
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 8px;
  flex: 0 0 auto;
}

.live-status-native-select {
  display: none !important;
}

.live-status-filter-dropdown {
  position: relative;
  min-width: 124px;
}

.live-status-filter-toggle {
  border: 2px solid #d6dee7;
  background: #ffffff;
  border-radius: 10px;
  padding: 0 10px;
  font-size: 14px;
  cursor: pointer;
  width: 100%;
  min-width: 124px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #0f172a;
  line-height: 1.2;
  appearance: none;
  -webkit-appearance: none;
  box-sizing: border-box;
}

.live-status-filter-toggle:focus {
  outline: none;
  border-color: #0f766e;
  box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.12);
}

.live-status-filter-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.live-status-filter-arrow {
  flex: 0 0 auto;
  color: #64748b;
}

.live-status-filter-menu {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 40;
  min-width: 100%;
  width: max-content;
  max-width: min(260px, calc(100vw - 32px));
  background: #ffffff;
  border: 1px solid #dfe5ef;
  border-radius: 14px;
  padding: 8px;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.18);
}

.live-status-filter-dropdown.open .live-status-filter-menu {
  display: grid;
  gap: 4px;
}

.live-status-filter-option {
  border: 0;
  background: transparent;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
  text-align: left;
  color: #0f172a;
  cursor: pointer;
  white-space: nowrap;
  appearance: none;
  -webkit-appearance: none;
}

.live-status-filter-option:hover,
.live-status-filter-option.active {
  background: #eef4fa;
}

.live-status-log-content {
  display: grid;
  gap: 8px;
  max-height: min(58vh, 560px);
  overflow: auto;
  padding-right: 4px;
}

.live-status-log-row {
  background: #ffffff;
  border: 1px solid #dfe5ef;
  border-left: 5px solid #64748b;
  border-radius: 10px;
  padding: 10px 12px;
  min-width: 0;
}

.live-status-log-row.error {
  border-left-color: #dc2626;
}

.live-status-log-row.warn {
  border-left-color: #d97706;
}

.live-status-log-row.info {
  border-left-color: #16a34a;
}

.live-status-log-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: #64748b;
  font-size: 12px;
  margin-bottom: 5px;
}

.live-status-log-meta strong {
  color: #0f172a;
}

.live-status-log-message {
  color: #0f172a;
  font-family: Consolas, Monaco, 'Courier New', monospace;
  font-size: 13px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.live-status-search-highlight {
  background: #ffe58a;
  color: inherit;
  padding: 0 2px;
  border-radius: 3px;
}

.live-status-log-extra {
  margin: 8px 0 0 0;
  padding: 8px;
  border-radius: 8px;
  background: #f1f5f9;
  color: #334155;
  overflow: auto;
  font-size: 12px;
}

.live-status-log-empty {
  padding: 14px;
  border-radius: 12px;
  background: #ffffff;
  border: 1px dashed #cbd5e1;
  color: #64748b;
  font-weight: 700;
}

@media (max-width: 820px) {
  .live-status-grid {
    grid-template-columns: 1fr;
  }

  .live-status-card-wide {
    grid-column: span 1;
  }

  .live-status-topbar {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* Mobilní oprava: modal Stav aplikace nesmí přesahovat mimo obrazovku */
#live-status-modal,
#live-status-box,
#live-status-box * {
  box-sizing: border-box;
}

#live-status-box {
  max-width: calc(100vw - 24px);
}

.live-status-line,
.live-status-summary-row,
.live-status-card,
.live-status-card * {
  min-width: 0;
}

.live-status-line strong,
.live-status-summary-row strong,
.live-status-value,
.live-status-label {
  overflow-wrap: anywhere;
  word-break: break-word;
}

@media (max-width: 820px) {
  #live-status-modal {
    align-items: flex-start;
    justify-content: center;
    padding: 10px;
    overflow: auto;
  }

  #live-status-box {
    width: 100%;
    max-width: 100%;
    height: calc(100vh - 20px);
    height: calc(100dvh - 20px);
    max-height: calc(100vh - 20px);
    max-height: calc(100dvh - 20px);
    border-radius: 12px;
  }

  #live-status-header {
    padding: 12px 14px;
    gap: 10px;
  }

  #live-status-header h3 {
    font-size: 18px;
    min-width: 0;
    overflow-wrap: anywhere;
  }

  #live-status-body {
    padding: 12px;
  }

  .live-status-topbar {
    gap: 10px;
  }

  .live-status-actions {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: nowrap;
  }

  #live-status-server-logs {
    flex: 1 1 auto;
    min-width: 0;
    height: 30px;
    padding: 0 10px;
  }

  .live-status-log-toolbar {
    align-items: stretch;
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .live-status-log-select-row {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 8px;
  }

  .live-status-log-field,
  .live-status-filter-dropdown,
  .live-status-filter-toggle {
    min-width: 0;
  }

  .live-status-filter-toggle {
    height: 34px;
    font-size: 13px;
    padding: 0 9px;
  }

  .live-status-filter-menu {
    width: max-content;
    min-width: 100%;
    max-width: calc(100vw - 24px);
  }

  .live-status-filter-option {
    font-size: 13px;
    padding: 10px 11px;
  }

  .live-status-log-search-label {
    width: 100%;
  }

  .live-status-log-action-row {
    width: 100%;
    justify-content: flex-end;
    flex-wrap: nowrap;
  }

  .live-status-log-content {
    max-height: calc(100dvh - 250px);
  }

  .live-status-card {
    padding: 12px;
    min-height: 0;
  }

  .live-status-line,
  .live-status-summary-row {
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 5px 10px;
  }

  .live-status-line strong,
  .live-status-summary-row strong {
    text-align: right;
    margin-left: auto;
    max-width: 100%;
  }
}

@media (max-width: 420px) {
  #live-status-modal {
    padding: 8px;
  }

  #live-status-box {
    height: calc(100vh - 16px);
    height: calc(100dvh - 16px);
    max-height: calc(100vh - 16px);
    max-height: calc(100dvh - 16px);
    border-radius: 10px;
  }

  .live-status-line,
  .live-status-summary-row {
    display: grid;
    grid-template-columns: 1fr;
  }

  .live-status-line strong,
  .live-status-summary-row strong {
    margin-left: 0;
    text-align: left;
  }
}


/* Ikonová tlačítka ve Stav aplikace – stejný vzhled jako export ve WAN server logách */
.live-status-icon-button {
  width: 34px;
  min-width: 34px;
  height: 30px;
  border: none;
  border-radius: 9px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 34px;
  cursor: pointer;
  background: #0f766e;
  color: white;
  white-space: nowrap;
  margin-left: 0;
  appearance: none;
  -webkit-appearance: none;
  box-sizing: border-box;
  font: inherit;
  line-height: 1;
}

.live-status-icon-button:hover {
  background: #115e59;
}

.live-status-icon-button:disabled {
  opacity: 0.65;
  cursor: wait;
}

.live-status-icon-button-secondary {
  background: #334155;
}

.live-status-icon-button-secondary:hover {
  background: #1e293b;
}

.live-status-action-icon {
  display: block;
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.25;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.live-status-actions .live-status-icon-button,
.live-status-log-toolbar .live-status-icon-button {
  width: 34px;
  min-width: 34px;
  height: 30px;
  padding: 0;
  flex: 0 0 34px;
}

@media (max-width: 820px) {
  .live-status-actions .live-status-icon-button,
  .live-status-log-toolbar .live-status-icon-button {
    width: 34px;
    min-width: 34px;
    max-width: 34px;
    flex: 0 0 34px;
  }
}


/* Server logy ve Stav aplikace: pevná velikost modalu, aby při filtrování neskákal */
#live-status-modal.live-status-server-log-view #live-status-box {
  height: min(820px, calc(100vh - 24px));
  height: min(820px, calc(100dvh - 24px));
}

#live-status-modal.live-status-server-log-view #live-status-body {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

#live-status-modal.live-status-server-log-view #live-status-content {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
}

#live-status-modal.live-status-server-log-view .live-status-log-toolbar {
  flex: 0 0 auto;
}

#live-status-modal.live-status-server-log-view .live-status-log-content {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
}

.live-status-log-row {
  cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease, box-shadow 120ms ease;
}

.live-status-log-row.live-status-log-selected {
  background: #ecfeff;
  border-color: #0891b2;
  box-shadow: 0 0 0 2px rgba(8, 145, 178, 0.22);
}

.live-status-log-row.live-status-log-selected .live-status-log-meta strong {
  color: #0e7490;
}

@media (max-width: 820px) {
  #live-status-modal.live-status-server-log-view #live-status-box {
    height: calc(100vh - 20px);
    height: calc(100dvh - 20px);
    max-height: calc(100vh - 20px);
    max-height: calc(100dvh - 20px);
  }

  #live-status-modal.live-status-server-log-view .live-status-log-content {
    max-height: none;
  }
}

@media (max-width: 420px) {
  #live-status-modal.live-status-server-log-view #live-status-box {
    height: calc(100vh - 16px);
    height: calc(100dvh - 16px);
    max-height: calc(100vh - 16px);
    max-height: calc(100dvh - 16px);
  }
}

/* Mobilní rozložení Server logů: hledání + zpět/export v jednom řádku */
@media (max-width: 820px) {
  #live-status-modal.live-status-server-log-view .live-status-log-toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px 8px;
    align-items: end;
  }

  #live-status-modal.live-status-server-log-view .live-status-log-select-row {
    grid-column: 1 / -1;
    width: 100%;
  }

  #live-status-modal.live-status-server-log-view .live-status-log-search-label {
    grid-column: 1;
    width: auto;
    min-width: 0;
  }

  #live-status-modal.live-status-server-log-view .live-status-log-search-label input {
    width: 100%;
    min-width: 0;
  }

  #live-status-modal.live-status-server-log-view .live-status-log-action-row {
    grid-column: 2;
    width: auto;
    justify-content: flex-start;
    align-items: flex-end;
    flex-wrap: nowrap;
  }
}


/* Kompaktní selecty Server logů – stejný styl jako WAN server logy */
.live-status-log-field {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  color: #475569;
  font-size: 13px;
  font-weight: 700;
}

.live-status-log-field > span {
  white-space: nowrap;
}

.live-status-filter-dropdown {
  min-width: 0;
}

.live-status-filter-toggle {
  height: 30px;
  min-width: 60px;
  border: 1px solid #bbb;
  border-radius: 6px;
  background: #ffffff;
  padding: 0 28px 0 10px;
  font-size: 13px;
  text-align: left;
  cursor: pointer;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0;
  color: #0f172a;
  line-height: 1.2;
  appearance: none;
  -webkit-appearance: none;
  box-sizing: border-box;
  box-shadow: none;
}

.live-status-filter-toggle::after {
  content: "▾";
  position: absolute;
  right: 9px;
  top: 50%;
  transform: translateY(-52%);
  font-size: 11px;
  color: #444;
  pointer-events: none;
}

.live-status-filter-arrow {
  display: none;
}

.live-status-filter-toggle:hover {
  border-color: #007bff;
}

.live-status-filter-toggle:focus,
.live-status-filter-dropdown.open .live-status-filter-toggle {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.12);
}

.live-status-filter-dropdown[data-live-status-dropdown="server-log-limit"] .live-status-filter-toggle {
  width: 74px;
  min-width: 74px;
}

.live-status-filter-dropdown[data-live-status-dropdown="server-log-level"] .live-status-filter-toggle {
  width: 78px;
  min-width: 78px;
}

.live-status-filter-menu {
  top: 38px;
  left: 0;
  z-index: 2600;
  min-width: 100%;
  width: max-content;
  max-width: min(260px, calc(100vw - 32px));
  border-radius: 14px;
  padding: 10px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.live-status-filter-dropdown[data-live-status-dropdown="server-log-limit"] .live-status-filter-menu {
  width: 90px;
}

.live-status-filter-dropdown[data-live-status-dropdown="server-log-level"] .live-status-filter-menu {
  width: 100px;
}

.live-status-filter-option {
  border: 0;
  background: transparent;
  border-radius: 9px;
  padding: 8px 9px;
  font-size: 13px;
  text-align: left;
  color: #222;
  cursor: pointer;
  white-space: nowrap;
  appearance: none;
  -webkit-appearance: none;
}

.live-status-filter-option:hover,
.live-status-filter-option.active {
  background: #f7f9fc;
}

@media (max-width: 820px) {
  #live-status-modal.live-status-server-log-view .live-status-log-select-row {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    flex-wrap: nowrap;
    width: 100%;
  }

  #live-status-modal.live-status-server-log-view .live-status-log-field {
    flex: 0 0 auto;
    min-width: 0;
  }

  #live-status-modal.live-status-server-log-view .live-status-filter-toggle {
    height: 30px;
    font-size: 13px;
    padding: 0 28px 0 10px;
  }

  #live-status-modal.live-status-server-log-view .live-status-filter-dropdown[data-live-status-dropdown="server-log-limit"] .live-status-filter-toggle {
    width: 68px;
    min-width: 68px;
  }

  #live-status-modal.live-status-server-log-view .live-status-filter-dropdown[data-live-status-dropdown="server-log-level"] .live-status-filter-toggle {
    width: 72px;
    min-width: 72px;
  }

  #live-status-modal.live-status-server-log-view .live-status-filter-menu {
    width: max-content;
    min-width: 100%;
    max-width: calc(100vw - 24px);
  }
}

/* Server logy ve Stav aplikace – ovládání stejné jako WAN server logy */
#live-status-modal.live-status-server-log-view .live-status-log-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  padding: 12px;
}

#live-status-modal.live-status-server-log-view .live-status-log-select-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  width: auto;
}

#live-status-modal.live-status-server-log-view .wan-logs-filter-dropdown {
  position: relative;
}

#live-status-modal.live-status-server-log-view .wan-logs-filter-toggle {
  height: 30px;
  min-width: 60px;
  border: 1px solid #bbb;
  border-radius: 6px;
  background: white;
  padding: 0 28px 0 10px;
  font-size: 13px;
  text-align: left;
  cursor: pointer;
  position: relative;
  color: #0f172a;
  box-sizing: border-box;
  appearance: none;
  -webkit-appearance: none;
}

#live-status-modal.live-status-server-log-view .wan-logs-filter-toggle::after {
  content: "▾";
  position: absolute;
  right: 9px;
  top: 50%;
  transform: translateY(-52%);
  font-size: 11px;
  color: #444;
  pointer-events: none;
}

#live-status-modal.live-status-server-log-view .wan-logs-filter-toggle:hover,
#live-status-modal.live-status-server-log-view .wan-logs-filter-dropdown.open .wan-logs-filter-toggle {
  border-color: #007bff;
}

#live-status-modal.live-status-server-log-view .wan-logs-filter-toggle:focus,
#live-status-modal.live-status-server-log-view .wan-logs-filter-dropdown.open .wan-logs-filter-toggle {
  outline: none;
  box-shadow: 0 0 0 3px rgba(0,123,255,0.12);
}

#live-status-modal.live-status-server-log-view .wan-logs-filter-menu {
  display: none;
  position: absolute;
  top: 38px;
  left: 0;
  z-index: 2600;
  width: 110px;
  background: white;
  border: 1px solid #dce4ec;
  border-radius: 14px;
  padding: 10px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.12);
}

#live-status-modal.live-status-server-log-view .wan-logs-limit-toggle {
  min-width: 95px;
}

#live-status-modal.live-status-server-log-view .wan-logs-limit-menu {
  width: 90px;
}

#live-status-modal.live-status-server-log-view .wan-logs-filter-dropdown.open .wan-logs-filter-menu {
  display: grid;
  gap: 6px;
}

#live-status-modal.live-status-server-log-view .wan-logs-custom-check {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 9px;
  border-radius: 9px;
  cursor: pointer;
  font-size: 13px;
  color: #222;
  user-select: none;
  white-space: nowrap;
}

#live-status-modal.live-status-server-log-view .wan-logs-custom-check:hover {
  background: #f7f9fc;
}

#live-status-modal.live-status-server-log-view .wan-logs-custom-check input {
  display: none;
}

#live-status-modal.live-status-server-log-view .wan-logs-checkmark {
  width: 18px;
  height: 18px;
  border: 2px solid #b8c5d1;
  border-radius: 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

#live-status-modal.live-status-server-log-view .wan-logs-custom-check input:checked + .wan-logs-checkmark {
  background: #007bff;
  border-color: #007bff;
}

#live-status-modal.live-status-server-log-view .wan-logs-custom-check input:checked + .wan-logs-checkmark::after {
  content: "✓";
  color: white;
  font-weight: 900;
  font-size: 13px;
}

#live-status-modal.live-status-server-log-view .wan-logs-menu-option {
  border: none;
  background: white;
  color: #222;
  text-align: left;
  border-radius: 9px;
  padding: 8px 9px;
  cursor: pointer;
  font-size: 13px;
  white-space: nowrap;
}

#live-status-modal.live-status-server-log-view .wan-logs-menu-option:hover {
  background: #f7f9fc;
}

#live-status-modal.live-status-server-log-view .wan-logs-menu-option.active {
  background: rgba(0,123,255,0.12);
  color: #0056b3;
  font-weight: 700;
}

#live-status-modal.live-status-server-log-view .live-status-log-search-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  min-width: 0;
  flex: 1 1 320px;
}

#live-status-modal.live-status-server-log-view .live-status-log-search-row label {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  font-size: 13px;
  font-weight: 400;
  color: #111827;
}

#live-status-modal.live-status-server-log-view #server-log-search {
  width: 250px;
  height: 30px;
  border: 1px solid #bbb;
  border-radius: 6px;
  padding: 0 8px;
  font-size: 13px;
  background: white;
  color: #0f172a;
}

@media (max-width: 820px) {
  #live-status-modal.live-status-server-log-view .live-status-log-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
  }

  #live-status-modal.live-status-server-log-view .live-status-log-select-row {
    flex: 0 0 auto;
    width: auto;
    gap: 8px;
  }

  #live-status-modal.live-status-server-log-view .live-status-log-search-row {
    order: 2;
    flex: 1 1 100%;
    width: 100%;
    margin-left: 0;
    display: flex;
    align-items: center;
    gap: 8px;
  }

  #live-status-modal.live-status-server-log-view .live-status-log-search-row label {
    flex: 1 1 auto;
    min-width: 0;
  }

  #live-status-modal.live-status-server-log-view #server-log-search {
    width: 100%;
    min-width: 0;
  }

  #live-status-modal.live-status-server-log-view .live-status-log-search-row .live-status-icon-button {
    width: 34px;
    min-width: 34px;
    max-width: 34px;
    height: 30px;
    flex: 0 0 34px;
  }

  #live-status-modal.live-status-server-log-view .wan-logs-filter-menu {
    max-width: calc(100vw - 24px);
  }
}


/* Finální oprava ovládání Server logů ve Stav aplikace */
#live-status-modal.live-status-server-log-view .live-status-log-toolbar {
  position: relative;
  z-index: 20;
  overflow: visible;
}

#live-status-modal.live-status-server-log-view .live-status-log-content {
  position: relative;
  z-index: 1;
}

#live-status-modal.live-status-server-log-view #server-log-view-dropdown .wan-logs-limit-toggle {
  min-width: 95px;
  width: 95px;
}

#live-status-modal.live-status-server-log-view #server-log-view-dropdown .wan-logs-limit-menu {
  width: 132px;
  min-width: 132px;
  max-width: min(180px, calc(100vw - 32px));
}

#live-status-modal.live-status-server-log-view #server-log-level-dropdown .wan-logs-filter-toggle {
  min-width: 60px;
  width: 60px;
}

#live-status-modal.live-status-server-log-view #server-log-level-dropdown .wan-logs-filter-menu {
  width: 132px;
  min-width: 132px;
  max-width: min(180px, calc(100vw - 32px));
}

#live-status-modal.live-status-server-log-view .wan-logs-filter-menu {
  z-index: 5000;
}

#live-status-modal.live-status-server-log-view .wan-logs-custom-check {
  cursor: pointer;
}

@media (max-width: 820px) {
  #live-status-modal.live-status-server-log-view #server-log-view-dropdown .wan-logs-limit-menu,
  #live-status-modal.live-status-server-log-view #server-log-level-dropdown .wan-logs-filter-menu {
    max-width: calc(100vw - 24px);
  }
}


/* Finální oprava dropdownů Server logů: stejné šířky jako WAN a bez ořezání pod řádky */
#live-status-modal.live-status-server-log-view #server-log-view-dropdown .wan-logs-limit-menu {
  width: 90px !important;
  min-width: 90px !important;
  max-width: 90px !important;
}

#live-status-modal.live-status-server-log-view #server-log-level-dropdown .wan-logs-filter-menu {
  width: 110px !important;
  min-width: 110px !important;
  max-width: 110px !important;
}

#live-status-modal.live-status-server-log-view .wan-logs-filter-menu {
  position: fixed !important;
  z-index: 2147483000 !important;
  overflow-x: hidden;
  overflow-y: auto;
  box-sizing: content-box;
}

#live-status-modal.live-status-server-log-view .wan-logs-custom-check {
  width: 100%;
  border: 0;
  background: white;
  font-family: inherit;
  text-align: left;
  box-sizing: border-box;
  appearance: none;
  -webkit-appearance: none;
}

#live-status-modal.live-status-server-log-view .wan-logs-custom-check.checked .wan-logs-checkmark {
  background: #007bff;
  border-color: #007bff;
}

#live-status-modal.live-status-server-log-view .wan-logs-custom-check.checked .wan-logs-checkmark::after {
  content: "✓";
  color: white;
  font-weight: 900;
  font-size: 13px;
}

#live-status-modal.live-status-server-log-view #server-log-content {
  overflow-x: hidden;
}


/* Oprava Server logů ve Stav aplikace podle WAN server logů */
#live-status-modal.live-status-server-log-view #server-log-view-dropdown .wan-logs-limit-toggle {
  min-width: 95px !important;
  width: 95px !important;
}

#live-status-modal.live-status-server-log-view #server-log-level-dropdown .wan-logs-filter-toggle {
  min-width: 60px !important;
  width: 60px !important;
}

#live-status-modal.live-status-server-log-view #server-log-view-dropdown .wan-logs-limit-menu {
  width: 90px !important;
  min-width: 90px !important;
  max-width: 90px !important;
  box-sizing: content-box !important;
}

#live-status-modal.live-status-server-log-view #server-log-level-dropdown .wan-logs-filter-menu {
  width: 110px !important;
  min-width: 110px !important;
  max-width: 110px !important;
  box-sizing: content-box !important;
}

#live-status-modal.live-status-server-log-view .wan-logs-filter-menu {
  display: none;
  position: fixed !important;
  z-index: 2147483000 !important;
  box-sizing: content-box !important;
}

#live-status-modal.live-status-server-log-view .wan-logs-filter-dropdown.open .wan-logs-filter-menu {
  display: grid;
  gap: 6px;
}

#live-status-modal.live-status-server-log-view .wan-logs-custom-check input {
  display: none;
}

#live-status-modal.live-status-server-log-view .wan-logs-custom-check input:checked + .wan-logs-checkmark {
  background: #007bff;
  border-color: #007bff;
}

#live-status-modal.live-status-server-log-view .wan-logs-custom-check input:checked + .wan-logs-checkmark::after {
  content: "✓";
  color: white;
  font-weight: 900;
  font-size: 13px;
}
