/* dc.662.cz - Bootstrap 5 theme (faze 1: login, menu, ovl; faze 2: itemlist/itemedit) */

:root {
  --dc-brand: #0d6efd;
  --dc-bg: #f4f6f9;
  --dc-surface: #ffffff;
  --dc-nav: #0d1117;
  --dc-nav-accent: #1f6feb;
  --bs-font-sans-serif: system-ui, -apple-system, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

html, body {
  min-height: 100%;
}

body {
  font-family: system-ui, -apple-system, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  background: var(--dc-bg);
  color: #212529;
}

/* ---- Login ---- */
.dc-login-page {
  min-height: 100vh;
  overflow-x: hidden;
  max-width: 100vw;
  background: linear-gradient(145deg, #0d1117 0%, #1a2332 45%, #243447 100%);
}

.dc-login-page main.container {
  max-width: 100%;
  overflow-x: hidden;
}

.dc-login-card {
  border: 0;
  border-radius: 1rem;
  box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.35);
}

.dc-login-card .card-header {
  background: var(--dc-nav);
  color: #fff;
  border-radius: 1rem 1rem 0 0 !important;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.dc-login-card-header {
  border-bottom: 0;
}

.dc-login-logo {
  display: inline-block;
  height: 44px;
  width: auto;
  max-width: 200px;
  object-fit: contain;
}

@media (max-width: 576px) {
  .dc-login-logo {
    height: 36px;
    max-width: 170px;
  }
}

/* ---- Layout ---- */
#contentBody,
.dc-page-body {
  padding: 1rem 0 5rem;
}

.dc-page-body .container-fluid {
  width: 100%;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
}

/* itemlist / itemedit / admin prehledy – plna sirka obrazovky */
.dc-page-body .container-fluid.dc-container-wide {
  max-width: none;
  width: 100%;
  padding-left: clamp(0.5rem, 1.25vw, 1.5rem);
  padding-right: clamp(0.5rem, 1.25vw, 1.5rem);
}

/* Prepis legacy #contentHeader z dc.css (opacity vytvarela stacking context) */
#contentHeader.dc-header {
  position: sticky;
  top: 0;
  z-index: 1030;
  opacity: 1 !important;
  filter: none !important;
  background: transparent;
  border: 0;
}

.dc-maintenance-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem 1.25rem;
  flex-wrap: wrap;
  padding: 0.7rem 1rem;
  background: repeating-linear-gradient(
    -45deg,
    #fbbf24,
    #fbbf24 12px,
    #f59e0b 12px,
    #f59e0b 24px
  );
  color: #1c1917;
  border-bottom: 3px solid #b45309;
  box-shadow: 0 4px 16px rgba(245, 158, 11, 0.5);
  animation: dc-maint-banner-pulse 2.2s ease-in-out infinite;
}

.dc-maintenance-banner-label {
  font-size: clamp(1.25rem, 3.5vw, 1.75rem);
  font-weight: 900;
  letter-spacing: 0.35em;
  text-indent: 0.35em;
  text-transform: uppercase;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.4);
  line-height: 1.1;
}

.dc-maintenance-banner-label .bi {
  letter-spacing: 0;
  text-indent: 0;
  margin-right: 0.15rem;
  font-size: 1.15em;
  vertical-align: -0.1em;
}

.dc-maintenance-banner-sub {
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  opacity: 0.92;
}

@keyframes dc-maint-banner-pulse {
  0%,
  100% {
    filter: brightness(1);
  }
  50% {
    filter: brightness(1.1);
  }
}

#contentHeader.dc-header--maintenance .dc-navbar {
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25), inset 0 3px 0 rgba(245, 158, 11, 0.35);
}

/* ---- Navbar (prepise legacy nav v dc.css) ---- */
.dc-navbar.navbar {
  background: var(--dc-nav) !important;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
  z-index: 1030;
}

.dc-navbar .dropdown-menu {
  border: 0;
  box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.15);
  border-radius: 0.5rem;
  z-index: 1050;
}

.dc-navbar .navbar-brand {
  font-weight: 700;
  letter-spacing: 0.03em;
}

.dc-navbar .dc-navbar-brand {
  padding-top: 0.35rem;
  padding-bottom: 0.35rem;
  line-height: 1;
}

.dc-navbar-logo {
  display: block;
  height: 38px;
  width: auto;
  max-width: 180px;
  object-fit: contain;
}

@media (max-width: 576px) {
  .dc-navbar-logo {
    height: 32px;
    max-width: 150px;
  }
}

.dc-navbar .nav-link {
  font-weight: 500;
  padding: 0.5rem 0.85rem !important;
}

.dc-navbar .dropdown-item:active {
  background-color: var(--dc-brand);
}

/* Account dropdown (ADD) - oddelene od hlavniho menu */
.dc-navbar-flex {
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
}

.dc-account-dropdown {
  order: 2;
}

.dc-navbar .navbar-toggler {
  order: 3;
  margin-left: auto;
}

.dc-navbar .navbar-collapse {
  order: 4;
  flex-basis: 100%;
}

@media (min-width: 992px) {
  .dc-account-dropdown {
    order: 4;
    margin-left: auto;
  }

  .dc-navbar .navbar-collapse {
    order: 2;
    flex-basis: auto;
    flex-grow: 1;
  }

  .dc-navbar .navbar-toggler {
    margin-left: 0;
  }
}

.dc-account-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  max-width: min(52vw, 14rem);
  border-color: rgba(255, 255, 255, 0.35) !important;
  color: #e6edf3 !important;
  font-size: 0.8rem;
  font-weight: 500;
  padding: 0.25rem 0.55rem;
  border-radius: 2rem;
  background: rgba(255, 255, 255, 0.06);
}

.dc-account-toggle:hover,
.dc-account-toggle:focus,
.dc-account-toggle.show {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.55) !important;
  color: #fff !important;
}

.dc-account-icon {
  font-size: 1.1rem;
  flex-shrink: 0;
  opacity: 0.9;
}

.dc-account-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dc-account-menu {
  min-width: 11rem;
}

.dc-account-menu .dc-account-logout {
  color: #dc3545;
}

.dc-account-menu .dc-account-logout:hover {
  background-color: rgba(220, 53, 69, 0.1);
  color: #b02a37;
}

@media (max-width: 991.98px) {
  .dc-account-name {
    max-width: 8rem;
  }
}

/* Skryt legacy header pokud by zustal */
#contentHeader nav:not(.dc-navbar) {
  display: none;
}

/* ---- Alerts / oznameni ---- */
.oznameni {
  margin: 0;
  padding: 0.75rem 1rem;
  font-size: 0.95rem;
  font-weight: 500;
  text-align: center;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  background: #fff;
}

/* ---- Footer ---- */
#contentFooter,
.dc-footer {
  background: var(--dc-nav);
  color: #adb5bd;
  font-size: 0.8rem;
  text-align: center;
  padding: 0.65rem 1rem;
  height: auto !important;
  min-height: 2.5rem;
  line-height: 1.5;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.25rem 0.5rem;
  padding-bottom: calc(0.65rem + env(safe-area-inset-bottom, 0px));
  opacity: 1 !important;
  filter: none !important;
  border: 0;
  z-index: 1020;
}

#contentFooter a,
.dc-footer a {
  color: #9ec5fe;
  text-decoration: none;
}

#contentFooter a:hover,
.dc-footer a:hover {
  color: #fff;
}

/* ---- OVL portal (zasuvky, prichod, odchod) ---- */
.dc-ovl-card {
  border: 0;
  border-radius: 0.75rem;
  box-shadow: 0 0.25rem 1rem rgba(0, 0, 0, 0.08);
}

.dc-ovl-card .card-header {
  background: linear-gradient(90deg, #0d6efd, #0a58ca);
  color: #fff;
  font-weight: 600;
  border-radius: 0.75rem 0.75rem 0 0 !important;
}

.dc-ucet-section-title {
  letter-spacing: 0.06em;
  margin-bottom: 0.75rem;
}

.dc-ucet-dl {
  display: grid;
  grid-template-columns: 4.75rem minmax(0, 1fr);
  column-gap: 0.65rem;
  row-gap: 0.35rem;
  margin: 0;
}

.dc-ucet-dl dt {
  font-weight: 500;
  color: #6c757d;
  font-size: 0.82rem;
  margin: 0;
  padding: 0;
  line-height: 1.35;
}

.dc-ucet-dl dd {
  margin: 0;
  padding: 0;
  font-size: 0.92rem;
  line-height: 1.35;
  word-break: break-word;
}

@media (min-width: 576px) {
  .dc-ucet-dl {
    grid-template-columns: 6.5rem minmax(0, 1fr);
    column-gap: 1rem;
  }

  .dc-ucet-dl dt {
    font-size: 0.875rem;
  }
}

.dc-ovl-table th {
  white-space: nowrap;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #6c757d;
}

/* OVL zasuvky - mobil: meta sloupce pod sebou, ovladani vpravo */
@media (max-width: 767.98px) {
  .dc-ovl-table-zasuvky thead {
    display: none;
  }

  .dc-ovl-table-zasuvky,
  .dc-ovl-table-zasuvky tbody {
    display: block;
    width: 100%;
  }

  .dc-ovl-table-zasuvky tbody tr {
    display: grid;
    grid-template-columns: minmax(5.5rem, 34%) minmax(0, 1fr);
    grid-template-rows: repeat(4, auto);
    gap: 0.15rem 0.65rem;
    padding: 0.75rem 0.65rem;
    border-bottom: 1px solid #dee2e6;
  }

  .dc-ovl-table-zasuvky tbody tr:last-child {
    border-bottom: 0;
  }

  .dc-ovl-table-zasuvky tbody td {
    display: block;
    padding: 0.1rem 0;
    border: 0;
    background: transparent !important;
    vertical-align: top;
  }

  .dc-ovl-table-zasuvky tbody td.dc-ovl-zas-meta-item {
    font-size: 0.82rem;
    line-height: 1.3;
    word-break: break-word;
  }

  .dc-ovl-table-zasuvky tbody td.dc-ovl-zas-meta-item:nth-child(1) {
    grid-column: 1;
    grid-row: 1;
    font-weight: 600;
  }

  .dc-ovl-table-zasuvky tbody td.dc-ovl-zas-meta-item:nth-child(2) {
    grid-column: 1;
    grid-row: 2;
  }

  .dc-ovl-table-zasuvky tbody td.dc-ovl-zas-meta-item:nth-child(3) {
    grid-column: 1;
    grid-row: 3;
  }

  .dc-ovl-table-zasuvky tbody td.dc-ovl-zas-meta-item:nth-child(4) {
    grid-column: 1;
    grid-row: 4;
    color: #495057;
  }

  .dc-ovl-table-zasuvky tbody td.dc-ovl-zas-outlets {
    grid-column: 2;
    grid-row: 1 / span 4;
    align-self: start;
    border-left: 1px solid #e9ecef;
    padding-left: 0.65rem;
    min-width: 0;
  }

  .dc-ovl-table-zasuvky .dc-ovl-outlet-row {
    flex-wrap: nowrap !important;
    gap: 0.35rem;
    margin-bottom: 0.45rem !important;
  }

  .dc-ovl-table-zasuvky .dc-ovl-outlet-row:last-child {
    margin-bottom: 0 !important;
  }

  .dc-ovl-table-zasuvky .dc-ovl-outlet-row .btn-sm {
    padding: 0.2rem 0.5rem;
    font-size: 0.78rem;
    white-space: nowrap;
  }

  .dc-ovl-table-zasuvky .dc-outlet-badge {
    min-width: 1.5rem;
    flex-shrink: 0;
  }

  .dc-ovl-table-zasuvky .badge {
    flex-shrink: 0;
  }
}

.dc-outlet-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.75rem;
  font-weight: 700;
  border-radius: 0.35rem;
}

.dc-status-on {
  background: #198754;
  color: #fff;
}

.dc-status-off {
  background: #dc3545;
  color: #fff;
}

.dc-progress-table td:first-child {
  min-width: 12rem;
}

/* ---- Faze 2: itemlist / itemedit (lehci modernizace) ---- */
.mainwin {
  background: var(--dc-surface);
  border-radius: 0.75rem;
  box-shadow: 0 0.125rem 0.5rem rgba(0, 0, 0, 0.06);
  padding: 0.75rem 1rem;
  margin: 0 0 1rem;
  width: 100%;
  max-width: none;
  overflow-x: visible;
}

.dc-itemlist-scroll {
  width: 100%;
  max-width: none;
  overflow-x: visible;
  margin-top: 0.75rem;
}

/* OVL spotreba + logy - listovat doprava na uzke obrazovce */
.dc-itemlist-scroll:has(table.dc-itemlist-spotreba),
.dc-itemlist-scroll:has(table.dc-itemlist-log) {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  max-width: 100%;
}

table.itemlist.dc-itemlist-spotreba {
  width: max-content;
  min-width: 100%;
  margin-bottom: 0;
}

table.itemlist.dc-itemlist-spotreba th,
table.itemlist.dc-itemlist-spotreba td {
  white-space: nowrap;
  word-break: normal !important;
  overflow-wrap: normal !important;
  vertical-align: top !important;
}

table.itemlist.dc-itemlist-spotreba th.dc-spotreba-col-rack,
table.itemlist.dc-itemlist-spotreba td.dc-spotreba-col-rack {
  min-width: 6.5rem;
}

table.itemlist.dc-itemlist-spotreba th.dc-spotreba-col-netio,
table.itemlist.dc-itemlist-spotreba td.dc-spotreba-col-netio {
  min-width: 7rem;
}

table.itemlist.dc-itemlist-spotreba th.dc-spotreba-col-kwh,
table.itemlist.dc-itemlist-spotreba td.dc-spotreba-col-kwh {
  min-width: 18rem;
  white-space: normal;
}

table.itemlist.dc-itemlist-spotreba .dc-spotreba-subtable {
  width: max-content;
  min-width: 17rem;
  margin: 0;
  font-size: 0.8rem;
}

table.itemlist.dc-itemlist-spotreba .dc-spotreba-subtable thead th {
  display: table-cell !important;
  visibility: visible !important;
  background: #f1f3f5 !important;
  color: #495057 !important;
  font-size: 0.68rem !important;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

table.itemlist.dc-itemlist-spotreba .dc-spotreba-subtable thead th.dc-spotreba-th-nadlimit {
  min-width: 4.75rem;
  text-align: center;
}

table.itemlist.dc-itemlist-spotreba .dc-spotreba-subtable th,
table.itemlist.dc-itemlist-spotreba .dc-spotreba-subtable td {
  white-space: nowrap;
  padding: 0.3rem 0.5rem;
}

table.itemlist.dc-itemlist-spotreba .dc-spotreba-subtable td:nth-child(2),
table.itemlist.dc-itemlist-spotreba .dc-spotreba-subtable td:nth-child(3) {
  text-align: right;
}

table.itemlist.dc-itemlist-spotreba .dc-spotreba-subtable td:nth-child(4) {
  text-align: center;
}

table.itemlist th.dc-itemlist-th-akce-hidden,
table.itemlist.dc-itemlist-spotreba td.dc-spotreba-col-akce {
  display: none !important;
}

table.itemlist.dc-itemlist-log {
  width: max-content;
  min-width: 100%;
  margin-bottom: 0;
}

table.itemlist.dc-itemlist-log th,
table.itemlist.dc-itemlist-log td {
  white-space: nowrap;
  word-break: normal !important;
  overflow-wrap: normal !important;
  vertical-align: top !important;
}

table.itemlist.dc-itemlist-log th:nth-child(1),
table.itemlist.dc-itemlist-log td:nth-child(1) {
  min-width: 8.5rem;
}

table.itemlist.dc-itemlist-log th:nth-child(2),
table.itemlist.dc-itemlist-log td:nth-child(2) {
  min-width: 7rem;
}

table.itemlist.dc-itemlist-log th:nth-child(3),
table.itemlist.dc-itemlist-log td:nth-child(3) {
  min-width: 8rem;
}

table.itemlist.dc-itemlist-log th:nth-child(4),
table.itemlist.dc-itemlist-log td:nth-child(4) {
  min-width: 8rem;
}

table.itemlist.dc-itemlist-log th:nth-child(5),
table.itemlist.dc-itemlist-log td:nth-child(5) {
  min-width: 6.5rem;
}

table.itemlist.dc-itemlist-log th:nth-child(6),
table.itemlist.dc-itemlist-log td:nth-child(6) {
  min-width: 5rem;
}

table.itemlist.dc-itemlist-log td img {
  max-width: 120px;
  height: auto;
}

#list_title {
  font-size: 1.35rem !important;
  font-weight: 700;
  margin-bottom: 0.75rem;
  padding: 0.65rem 1rem !important;
  color: #fff !important;
  background: linear-gradient(90deg, #0d6efd, #0a58ca) !important;
  border-radius: 0.5rem;
  line-height: 1.4 !important;
  width: auto !important;
  text-align: left !important;
}

.filtering,
.filter_datum,
.filter2_items,
.paging {
  background: #f8f9fa !important;
  border: 1px solid #dee2e6 !important;
  border-radius: 0.5rem;
  color: #495057 !important;
  font-size: 0.95rem !important;
  font-weight: 500 !important;
  margin-bottom: 0.75rem;
  padding: 0.65rem 0.85rem !important;
}

table.itemlist {
  border: 1px solid #dee2e6 !important;
  border-radius: 0.5rem;
  overflow: visible !important;
  font-size: 0.85rem !important;
  margin-top: 0 !important;
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
  table-layout: auto;
  border-collapse: collapse !important;
  --bs-table-striped-bg: #f8f9fb;
  --bs-table-hover-bg: #eef4ff;
}

table.itemlist > :not(caption) > * > * {
  border-bottom-width: 1px;
  border-color: #dee2e6;
  box-shadow: none !important;
}

table.itemlist > thead > tr > th {
  background: #e9ecef !important;
  color: #495057 !important;
  border-bottom: 2px solid #ced4da !important;
  font-weight: 600;
}

table.itemlist tbody tr:last-child td {
  border-bottom: 0;
}

table.itemlist > thead > tr > th,
table.itemlist > tbody > tr > td {
  word-break: break-word;
  overflow-wrap: anywhere;
}

/* vnorene tabulky (spotreba, subtabulky) */
.mainwin table table,
table.itemlist table {
  font-size: 0.8rem;
  width: 100%;
  min-width: 0;
}

#wysiwyg.mainwin .form,
#wysiwyg.mainwin .formtable,
#wysiwyg.mainwin .divform2 {
  width: 100%;
  max-width: none;
}

table.itemlist > thead > tr > th {
  background: #e9ecef !important;
  color: #495057 !important;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

table.itemlist tr:hover td {
  background: var(--bs-table-hover-bg) !important;
}

table.itemlist tr:hover .dc-il-zkratka {
  color: #084298;
}

table.itemlist tr:hover .dc-il-nazev {
  color: #0d6efd;
}

table.itemlist .itemlistActions,
span.itemlistActions,
.dc-il-actions {
  display: inline-flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  gap: 0.35rem;
  width: auto !important;
  min-width: 0;
  white-space: nowrap;
  vertical-align: middle;
}

.dc-il-action-btn {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  padding: 0.25rem 0.5rem !important;
  line-height: 1;
  flex: 0 0 auto;
}

.dc-il-action-btn .bi {
  font-size: 1rem;
  line-height: 1;
  pointer-events: none;
}

/* Akcni tlacitka: neprepisovat barvu linku z table.itemlist td a */
table.itemlist td a.dc-il-action-btn.btn-outline-primary {
  color: #0d6efd !important;
}
table.itemlist td a.dc-il-action-btn.btn-outline-primary:hover,
table.itemlist td a.dc-il-action-btn.btn-outline-primary:focus {
  color: #fff !important;
  background-color: #0d6efd !important;
  border-color: #0d6efd !important;
}

table.itemlist td a.dc-il-action-btn.btn-outline-danger {
  color: #dc3545 !important;
}
table.itemlist td a.dc-il-action-btn.btn-outline-danger:hover,
table.itemlist td a.dc-il-action-btn.btn-outline-danger:focus {
  color: #fff !important;
  background-color: #dc3545 !important;
  border-color: #dc3545 !important;
}

table.itemlist td a.dc-il-action-btn.btn-outline-secondary {
  color: #6c757d !important;
}
table.itemlist td a.dc-il-action-btn.btn-outline-secondary:hover,
table.itemlist td a.dc-il-action-btn.btn-outline-secondary:focus {
  color: #fff !important;
  background-color: #6c757d !important;
  border-color: #6c757d !important;
}

.dc-il-toolbar .btn {
  font-weight: 500;
}

.newitem.dc-il-toolbar .btn,
.newitem.dc-il-toolbar a.btn {
  background-image: none !important;
  text-decoration: none !important;
}

.newitem.dc-il-toolbar #itemadd,
.newitem.dc-il-toolbar #itemadd_bottom,
.newitem.dc-il-toolbar #itemprint {
  padding: 0.375rem 0.75rem !important;
}

table.itemlist td a:not(.dc-il-action-btn) {
  color: #0d6efd !important;
}

.itemlist_after {
  background: #f8f9fa !important;
  border-radius: 0.5rem;
  border: 1px solid #dee2e6;
  color: #6c757d !important;
}

/* ---- Itemlist: firmy / rackhosting / rack (dc.itemlist.inc.php) ---- */
.dc-il-cell {
  vertical-align: top !important;
  line-height: 1.45;
}

.dc-il-id {
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  opacity: 0.65;
}

.dc-il-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: #0d1117;
  line-height: 1.3;
}

.dc-il-zkratka {
  font-size: 1.45rem;
  font-weight: 800;
  color: #0a58ca;
  letter-spacing: 0.04em;
  line-height: 1.15;
  text-transform: uppercase;
}

.dc-il-nazev {
  font-size: 1.12rem;
  font-weight: 600;
  color: #212529;
  margin-top: 0.35rem;
  line-height: 1.35;
}

.dc-il-firma-block {
  margin-bottom: 0.15rem;
}

.dc-il-zkr-col {
  text-align: left;
  white-space: nowrap;
}

.dc-il-zkr-col .dc-il-zkratka {
  display: inline-block;
  font-size: 1.05rem;
  font-weight: 700;
  color: #c92a2a;
  line-height: 1.2;
  margin-bottom: 0.35rem;
  white-space: nowrap;
}

.dc-il-zkr-skup {
  display: flex;
  justify-content: flex-start;
}

.dc-il-hostbill-id {
  display: inline-block;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-weight: 700;
  color: #0a58ca;
  background: #cfe2ff;
  padding: 0.2rem 0.5rem;
  border-radius: 0.35rem;
  font-size: 0.82rem;
  white-space: nowrap;
}

/* firmy.edit: HostBill account_id when SPOTREBA=Ano */
input.dc-hostbill-account-id.dc-hostbill-missing {
  outline: 2px solid #dc3545 !important;
  outline-offset: 1px;
  background-color: #fff5f5;
}

input.dc-hostbill-account-id.dc-hostbill-ok {
  outline: 2px solid #198754 !important;
  outline-offset: 1px;
  background-color: #f0fff4;
}

th.dc-il-th-zkr,
td.dc-il-td-zkr {
  white-space: nowrap !important;
  word-break: normal !important;
  overflow-wrap: normal !important;
  width: 1%;
  vertical-align: top !important;
  text-align: left;
}

th.dc-il-th-zkr {
  text-align: left;
}

table.itemlist.dc-itemlist-firmy th.dc-il-th-firma,
table.itemlist.dc-itemlist-firmy td.dc-il-td-firma {
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
  width: auto;
  min-width: 11rem;
}

table.itemlist.dc-itemlist-firmy td.dc-il-td-firma .dc-il-muted {
  word-break: break-all;
  overflow-wrap: anywhere;
}

table.itemlist.dc-itemlist-firmy td.dc-il-td-firma .dc-il-firma-head {
  flex-wrap: wrap;
}

table.itemlist.dc-itemlist-firmy td.dc-il-td-firma .dc-il-firma-head .dc-il-nazev {
  min-width: 0;
}

.dc-il-firma-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 0.5rem;
}

.dc-il-firma-head .dc-il-nazev {
  margin-top: 0;
  flex: 1 1 auto;
  min-width: 8rem;
}

.dc-il-firma-id {
  margin-left: auto;
}

.dc-il-firma-id .dc-il-id {
  font-size: 0.68rem;
}

.dc-il-muted {
  font-size: 0.8rem;
  color: #6c757d;
  margin-top: 0.15rem;
}

.dc-il-mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.dc-il-badge {
  font-size: 0.72rem;
  font-weight: 500;
  padding: 0.35em 0.65em;
}

.dc-il-rack {
  font-weight: 600;
  letter-spacing: 0.03em;
}

.dc-il-subrack {
  font-size: 1rem;
  color: #212529;
}

.dc-il-tags {
  margin-top: 0.15rem;
}

table.dc-il-nested {
  font-size: 0.78rem;
}

table.dc-il-nested th {
  background: #f1f3f5 !important;
  color: #495057 !important;
  font-size: 0.68rem !important;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.35rem 0.5rem !important;
  white-space: nowrap;
}

table.dc-il-nested td {
  padding: 0.35rem 0.5rem !important;
  vertical-align: top;
}

table.itemlist tr:hover .dc-il-title {
  color: #0d6efd;
}

.mainwin table,
.inner_table {
  width: 100%;
}

.mainwin table {
  border-collapse: separate;
  border-spacing: 0;
}

.mainwin table th {
  background: #e9ecef;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.mainwin table td,
.mainwin table th {
  padding: 0.5rem 0.65rem;
  vertical-align: top;
}

.filtering form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 0.75rem;
}

.filtering .inputText,
.mainwin input[type="text"],
.mainwin input[type="password"],
.mainwin select,
.mainwin textarea {
  border-radius: 0.375rem;
  border: 1px solid #ced4da;
  padding: 0.35rem 0.55rem;
}

.submitButtonSave,
.submitButtonMag,
.submitButtonCan,
.submitButtonNew {
  border-radius: 0.375rem !important;
  padding: 0.35rem 0.85rem !important;
  border: 1px solid transparent !important;
  font-weight: 500;
}

.submitButtonSave { background: #198754 !important; color: #fff !important; }
.submitButtonMag { background: #0d6efd !important; color: #fff !important; }
.submitButtonCan { background: #6c757d !important; color: #fff !important; }
.submitButtonNew { background: #0dcaf0 !important; color: #000 !important; }

.formtable,
.divform2 table {
  width: 100%;
}

.formsubmit {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #dee2e6;
}

.paging {
  margin: 0.75rem 0;
  font-size: 0.9rem;
}

@media (max-width: 576px) {
  .dc-navbar .navbar-brand span.d-none-xs {
    display: none;
  }

  .dc-page-body .container-fluid.dc-container-wide {
    padding-left: 0.35rem;
    padding-right: 0.35rem;
  }

  .mainwin {
    padding: 0.5rem 0.35rem;
    border-radius: 0.25rem;
    margin-left: 0;
    margin-right: 0;
  }

  table.itemlist {
    font-size: 0.8rem !important;
  }

  .dc-ovl-table {
    font-size: 0.85rem;
  }
}

/* ---- UPS stav (dc.elektro.ups.php) ---- */
.dc-ups-load-btn {
  font-weight: 600;
  letter-spacing: 0.02em;
}

.dc-ups-source-banner {
  border-radius: 0.5rem;
  font-size: 0.95rem;
}

.dc-ups-card .card-body {
  padding: 1.25rem 1.5rem;
}

.dc-ups-meta dt {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #6c757d;
  margin-bottom: 0.15rem;
}

.dc-ups-meta dd {
  font-size: 1rem;
  font-weight: 500;
  margin-bottom: 0;
}

.dc-ups-table-wrap {
  border-radius: 0.5rem;
  overflow: hidden;
}

.dc-ups-table {
  margin-bottom: 0;
}

.dc-ups-table--ok {
  box-shadow: inset 0 0 0 2px rgba(25, 135, 84, 0.35);
}

.dc-ups-table--fault {
  box-shadow: inset 0 0 0 2px rgba(220, 53, 69, 0.55);
}

.dc-ups-table thead th {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #6c757d;
  white-space: nowrap;
}

.dc-ups-row th {
  width: 42%;
  font-weight: 500;
  color: #495057;
  font-size: 0.88rem;
  vertical-align: middle;
}

.dc-ups-row td {
  font-size: 0.92rem;
  vertical-align: middle;
}

.dc-ups-row--ok {
  background-color: rgba(25, 135, 84, 0.04);
}

.dc-ups-row--bad {
  background-color: rgba(220, 53, 69, 0.07);
}

.dc-ups-row--bad th,
.dc-ups-row--bad td {
  box-shadow: inset 3px 0 0 #dc3545;
}

.dc-ups-val {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.dc-ups-val--ok {
  color: #198754;
}

.dc-ups-val--bad {
  color: #dc3545;
}

.dc-ups-val--na {
  color: #6c757d;
  font-weight: 500;
}

.dc-ups-est .dc-ups-val--ok,
.dc-ups-est .dc-ups-val--bad {
  font-size: 1.05rem;
}

.dc-ups-links a {
  text-decoration: none;
  font-size: 0.88rem;
}

.dc-ups-links a:hover {
  text-decoration: underline;
}

.dc-ups-log-table {
  font-size: 0.85rem;
}

.dc-ups-log-table thead th {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

@media (max-width: 575.98px) {
  .dc-ups-row th,
  .dc-ups-row td {
    display: block;
    width: 100%;
  }

  .dc-ups-row th {
    padding-bottom: 0.15rem;
    border-bottom: 0;
  }

  .dc-ups-row td {
    padding-top: 0;
    padding-bottom: 0.65rem;
  }
}
