/* --- Celostránkový layout: patička dole při krátkém obsahu --- */
body.ep-layout {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin: 0;
}

.ep-main-wrap {
  flex: 1 0 auto;
  width: 100%;
}

body.ep-layout .footer-copyright-area.ep-footer-bar {
  margin-top: auto;
  flex-shrink: 0;
}

/* --- Horní lišta: stejná oranžová jako patička (#ec691f ze style.css) --- */
.ep-top-navbar.ep-header-bar.navbar-default {
  background-color: #ec691f;
  border-color: #d85f0e;
  border-radius: 0;
}

.ep-top-navbar.ep-header-bar.navbar-default .navbar-nav > li > a {
  color: #fff;
  font-weight: 600;
}

.ep-top-navbar.ep-header-bar.navbar-default .navbar-nav > li > a:hover,
.ep-top-navbar.ep-header-bar.navbar-default .navbar-nav > li > a:focus {
  color: #1a1a1a;
  background-color: rgba(255, 255, 255, 0.2);
}

.ep-top-navbar.ep-header-bar.navbar-default .navbar-toggle {
  border-color: rgba(255, 255, 255, 0.55);
}

.ep-top-navbar.ep-header-bar.navbar-default .navbar-toggle .icon-bar {
  background-color: #fff;
}

.ep-top-navbar.ep-header-bar.navbar-default .navbar-toggle:hover,
.ep-top-navbar.ep-header-bar.navbar-default .navbar-toggle:focus {
  background-color: rgba(255, 255, 255, 0.15);
}

/* Top navigation (rozcestník) */
.ep-top-navbar {
  margin-bottom: 0;
  border-radius: 0;
  border-left: none;
  border-right: none;
}

.ep-top-navbar .navbar-brand {
  padding: 8px 15px;
  height: auto;
}

.ep-top-navbar .navbar-brand img {
  max-height: 34px;
  width: auto;
}

.ep-top-navbar .navbar-nav > li > a {
  padding-top: 14px;
  padding-bottom: 14px;
}

.ep-top-navbar .navbar-toggle {
  margin-top: 8px;
}

/* Compact dashboard table */
.ep-dashboard {
  margin-top: 12px;
  margin-bottom: 24px;
}

.ep-table-instances {
  font-size: 13px;
  margin-bottom: 0;
}

.ep-table-instances thead th {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #607d8b;
  border-bottom-width: 1px;
  white-space: nowrap;
}

/* Mobil: jen heartbeat, zkratka a případně ikona u zastaralého přenosu */
.ep-mobile-only {
  display: none !important;
}

@media (max-width: 767px) {
  .ep-desktop-only {
    display: none !important;
  }

  .ep-mobile-only {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
  }

  .ep-table-instances .ep-col-transfer,
  .ep-table-instances .ep-col-transfer-hd {
    width: 2.75rem;
    max-width: 3rem;
    text-align: center;
    white-space: normal;
  }

  .ep-table-instances .ep-col-heart {
    width: 2.25rem;
  }

  .ep-transfer-stale-icon--mobile .fa {
    font-size: 1.35em;
    color: #c62828;
    line-height: 1;
  }
}

.ep-table-instances tbody tr.ep-row-instance {
  cursor: pointer;
}

.ep-table-instances tbody tr.ep-row-instance:hover {
  background: #f1f8f4;
}

.ep-table-instances td {
  vertical-align: middle !important;
}

.ep-col-heart {
  width: 36px;
  text-align: center;
}

.ep-col-zkr {
  min-width: 88px;
}

.ep-col-mode {
  min-width: 140px;
}

.ep-col-transfer {
  min-width: 130px;
}

.ep-col-ver {
  width: 1%;
  white-space: nowrap;
}

@keyframes ep-heartbeat-pulse {
  0%,
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 2px rgba(46, 125, 50, 0.28);
  }
  50% {
    transform: scale(1.12);
    box-shadow: 0 0 0 6px rgba(46, 125, 50, 0);
  }
}

.ep-status-dot {
  display: inline-block;
  vertical-align: middle;
  width: 11px;
  height: 11px;
  border-radius: 50%;
}

.ep-status-dot.ok {
  background: #2e7d32;
  animation: ep-heartbeat-pulse 1.85s ease-in-out infinite;
}

.ep-status-dot.timeout {
  background: #9e9e9e;
  animation: none;
  box-shadow: none;
}

.ep-status-dot.err {
  background: #c62828;
  animation: none;
  box-shadow: none;
}

@media (prefers-reduced-motion: reduce) {
  .ep-status-dot.ok {
    animation: none;
    box-shadow: 0 0 0 2px rgba(46, 125, 50, 0.22);
  }
}

.ep-mode-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
}

.ep-chip {
  display: inline-block;
  padding: 2px 7px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.35;
  border-radius: 3px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.ep-chip-default {
  background: #eceff1;
  color: #455a64;
}

.ep-chip-info {
  background: #e3f2fd;
  color: #0d47a1;
}

.ep-chip-success {
  background: #e8f5e9;
  color: #1b5e20;
}

.ep-chip-danger {
  background: #ffebee;
  color: #b71c1c;
}

.ep-chip-muted {
  background: #f5f5f5;
  color: #757575;
}

.ep-transfer {
  font-variant-numeric: tabular-nums;
}

.ep-transfer-recent {
  font-weight: 400;
  color: #212121;
}

.ep-transfer-stale {
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
  font-weight: 700;
  color: #c62828;
}

.ep-transfer-stale .ep-transfer-stale-icon {
  display: inline-flex;
  align-items: center;
  line-height: 1;
}

.ep-transfer-stale .ep-transfer-stale-icon .fa {
  font-size: 1.15em;
  opacity: 0.95;
}

.ep-transfer-na {
  color: #90a4ae;
}

.ep-pill-version {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
}

.ep-pill-version .ep-pill-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.95;
}

.ep-pill-version.latest {
  background: #e8f5e9;
  color: #1b5e20;
  border: 1px solid #a5d6a7;
}

.ep-pill-version.warn {
  background: #fff8e1;
  color: #e65100;
  border: 1px solid #ffe082;
}

.ep-pill-version.muted {
  background: #eceff1;
  color: #455a64;
  border: 1px solid #cfd8dc;
}

.ep-section-title {
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 10px 0;
  color: #37474f;
}

.ep-auto-table-wrap {
  margin-top: 8px;
}

/* --- Detail instance (mobil) --- */
.ep-break-long,
.ep-break-long a {
  word-wrap: break-word;
  overflow-wrap: anywhere;
  word-break: break-word;
  max-width: 100%;
}

.ep-counter-live {
  font-size: 80px;
  line-height: 1;
  margin: 0.08em 0;
}

.ep-instance-badges h1 {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.ep-instance-page .realtime-visitor-ctn.ep-instance-versions .realtime-vst-sg {
  flex: 1 1 0;
  min-width: 120px;
  width: auto;
  max-width: none;
}

.ep-instance-prelog {
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.ep-pre-wrap {
  white-space: pre-wrap;
  word-break: break-word;
  margin: 0;
}

@media (max-width: 767px) {
  .ep-instance-page .realtime-visitor-ctn {
    flex-direction: column !important;
    flex-wrap: nowrap !important;
    align-items: stretch !important;
  }

  .ep-instance-page .realtime-visitor-ctn .realtime-vst-sg {
    width: 100% !important;
    max-width: 100% !important;
    padding-right: 0 !important;
    box-sizing: border-box !important;
  }

  .ep-instance-page .realtime-visitor-ctn .realtime-vst-sg h3:not(.ep-counter-live) {
    font-size: 1.75rem !important;
    line-height: 1.2 !important;
  }

  .ep-instance-page .ep-counter-live {
    font-size: 2.25rem !important;
    line-height: 1.15 !important;
  }

  .ep-instance-page .ep-instance-head .ep-instance-badges {
    margin-top: 8px;
  }

  .ep-instance-page .container {
    padding-left: 12px;
    padding-right: 12px;
  }

  .ep-instance-page .btn-lg {
    white-space: normal;
    line-height: 1.3;
  }

  .ep-instance-page .realtime-wrap {
    overflow-x: hidden;
  }
}

/* --- Vaultwarden: odemykání hesel na detailu instance --- */
.ep-vault-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  padding: 12px 16px;
  margin-top: 20px;
  border-radius: 4px;
  border: 1px solid #ddd;
  background: #fafafa;
}

.ep-vault-bar--unlocked {
  border-color: #b8dfc4;
  background: #f3fbf5;
}

.ep-vault-bar-icon {
  font-size: 1.2em;
}

.ep-vault-bar-text {
  flex: 1 1 200px;
  margin: 0;
  font-size: 14px;
}

.ep-vault-bar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ep-vault-field .ep-vault-value {
  margin: 0;
  font-family: Consolas, "Courier New", monospace;
  word-break: break-all;
}

.ep-vault-missing {
  font-size: 12px;
}

.ep-vault-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 10050;
}

.ep-vault-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
}

.ep-vault-modal-dialog {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100%;
  padding: 20px;
}

.ep-vault-modal-content {
  width: 100%;
  max-width: 420px;
  background: #fff;
  border-radius: 6px;
  padding: 24px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.ep-vault-modal-content h3 {
  margin-top: 0;
}

.ep-vault-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 16px;
}
