:root{
  --s2-bg: rgba(10, 16, 28, 0.65);         /* pozadie inputu */
  --s2-bg-2: rgba(10, 16, 28, 0.92);       /* pozadie dropdownu */
  --s2-border: rgba(255,255,255,0.10);     /* border */
  --s2-border-strong: rgba(255,255,255,0.18);
  --s2-text: rgba(255,255,255,0.88);
  --s2-muted: rgba(255,255,255,0.55);
  --s2-focus: rgba(60, 170, 255, 0.55);    /* glow */
  --s2-radius: 10px;
  --s2-item-bg: rgba(255,255,255,0.08);    /* tag item */
  --s2-item-border: rgba(255,255,255,0.12);
  --topbar-h: 65px;
  --footer-h: 50px;
}

* {
    box-sizing: border-box;
}

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

/* Celá stránka = stĺpec: hore topbar, pod tým layout */
body {
    display: block;
    font-family: "Roboto", sans-serif;
}

#preloader {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    z-index: 9999;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

#preloader.preloader-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}


.preloader-inner img {
  width: 150px;
  height: 150px;
}

/* Kontajner pod topbarom */
.layout {
    display: flex;
    min-height: calc(100svh - var(--topbar-h) - var(--footer-h));
    overflow: visible;
}

/* Ľavé menu */
.sidebar {
    width: 260px;
    background: #1f2937;
    color: #f9fafb;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    border-right: 1px solid #111827;
    overflow-y: auto;     /* nech scrolluje menu, ak je dlhé */
    position: relative;
    inset: 0;
    z-index: 1001;
}
.sidebar-backdrop{ display:none; }
body.sidebar-open .sidebar-backdrop{ display:block; }

/* horný riadok v menu (nadpis "Menu" + tlačidlo ☰) */
.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    border-bottom: 1px solid #111827;
    font-weight: 600;
    font-size: 15px;
}

.sidebar-toggle {
    background: transparent;
    border: none;
    color: #e5e7eb;
    font-size: 18px;
    cursor: pointer;
}

/* Scrollovateľná časť menu */
.menu {
    padding: 8px 0;
    overflow-y: auto;
}

/* Skupiny v menu (accordion) */
.menu-group {
    border-bottom: 1px solid rgba(55, 65, 81, 0.7);
}

.menu-group-header {
    padding: 10px 14px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
}

.menu-group-header:hover {
    background: #374151;
}

.menu-group .arrow {
    font-size: 11px;
    opacity: 0.8;
}

/* Pod-položky (skryté/zobrazené jQuery-čkom) */
.menu-group-items {
    display: none; /* defaultne skryté – prvú môžeš potom v JS otvoriť */
    padding: 4px 0 8px 0;
}

.menu-item {
    display: block;
    padding: 6px 24px;
    font-size: 13px;
    color: #d1d5db;
    text-decoration: none;
}

.menu-item:hover {
    background: #4b5563;
    color: #ffffff;
}

/* Pravá časť – obsah */
.content {
    position: relative;
    width: 100%;
    min-width: 0;
    /*display: flex;
    flex-direction: column;
    align-items: center;*/
    padding: 15px;
    box-sizing: border-box;
    overflow: visible;
}
.menu-group-header {
   cursor: pointer;
   padding: 8px 12px;
}

/* otvorená skupina */
.menu-group.open > .menu-group-header {
    /*background: #f3f4ff;*/
    font-weight: 500;
}

/* aktívna (kliknutá) položka */
.menu-item.active {
    background: #007bff;
    color: #fff;
}

/* ====== Skryté menu ====== */

/* keď dáš na body class="sidebar-hidden", menu zmizne a obsah je na plnú šírku */
body.sidebar-hidden .sidebar {
    display: none;
}

body.sidebar-hidden .content {
    flex: 1 1 100%;
}

/* ====== FORM ====== */
form table {
  margin: 0 auto;
}
form{
    flex-direction: column;
}
/* ====== Tabulky ====== */
.table_main {
    border-collapse: collapse;
    font-size: 15px;
    background: #fff;
    max-width:90%;
    min-width: 650px;
}

.table_main th,
.table_main td {
    padding: 7px 7px;
    border: 1px solid #d6d6d6;
}

.table_main td {
    text-align: left;
}
.table_main td label{
    display: inline-block;
    white-space: nowrap;
}

.table_main th {
    background: #eaeaea;
    font-weight: 600;
    border-bottom: 2px solid #b8c6ff;
    text-align: center;
}

.table_main tr:hover {
    background: #e9f1ff;
    transition: 0.2s;
}

.table_main {
    border-radius: 6px;
    overflow: hidden; /* pre zaoblené rohy */
}
.table_filter{
    border-collapse: collapse;
    font-size: 15px;
    background: #fff;
}
.table_filter th,
.table_filter td {
    padding: 10px 14px;
    border: 1px solid #d6d6d6;
}

td label {
    display: inline-block;
}

.truncate {
    display: inline-block;
    max-width: 250px;  
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
#filter_line{
    display: flex;
    flex-flow: row;
}

/* ====== Nadpisi ====== */
h1{
    color: #000000ba;
}


/* ====== Tlačítka ====== */
.headbutton,.bottombutton{
    width: 100%;
    margin-top: 15px;
    margin-bottom: 15px;
    text-align: center;
}
.link_button {
    display: inline-block;
    padding: 10px 18px;
    background: #007bff;
    color: #fff;
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    border-radius: 6px;
    border: 1px solid #006ae0;
    cursor: pointer;
    transition: 0.2s ease;
}

.link_button:hover {
    background: #006ae0;
    border-color: #005ec4;
}

.submit_button {
    display: block;
    margin: 20px auto 0;
    padding: 12px 22px;
    background: #28a745;           /* zelená – akcia/potvrdenie */
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: 0.2s ease;
}

.submit_button:hover {
    background: #218838;
}

.uvod_btn {
    padding: 4px 12px;
    font-size: 13px;
    background: #eef2f6;
    border: 1px solid #c7ccd2;
    border-radius: 5px;
    color: #2b2f33;
    cursor: pointer;
    transition: 0.15s ease-in-out;
}

.uvod_btn:hover {
    background: #e2e7ec;
    border-color: #b4b9bf;
}

td .uvod_btn {
    float: right;
}

.pagination {
    margin: 20px 0;
    text-align: center;
}

.pagination a {
    display: inline-block;
    padding: 3px 5px;
    margin: 0 4px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 500;
    font-size:0.8em;
    background: #0077cc;
    color: white;
    transition: 0.2s;
}

.pagination a:hover {
    background: #005fa3;
}

.pagination a.disabled {
    background: #cccccc;
    color: #777777;
    pointer-events: none;
    cursor: default;
}

.pagination .label {
    margin: 0 10px;
    font-weight: bold;
    font-size: 14px;
}

ul, li{
    color: #808080;
}

/* ====== POP UP ====== */

.result_ok,
.result_err {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    min-width: 340px;
    padding: 18px 26px;
    font-size: 17px;
    font-weight: 600;
    text-align: center;
    border-radius: 10px;
    box-shadow: 0 6px 22px rgba(0, 0, 0, 0.25);
    z-index: 50;
    cursor:pointer;
}

.result_ok {
    background: #e8fff0;
    color: #1f7c3d;
    border: 2px solid #28a745;
}
.result_err {
    background: #ffe8e8;
    color: #a30000;
    border: 2px solid #e60000;
}
/* ====== OSTATNE ====== */
.red_count {
    display: inline-block;      /* aby fungoval padding, border-radius, width */
    min-width: 18px;
    padding: 2px 6px;
    margin-right: 4px;
    border-radius: 999px;       /* pekná bublinka */
    background-color: #ff0095;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    text-align: center;
    line-height: 1.2;
}

.modal{
  position: relative;       /* kľúčové */
  background: #ffffff;
  width: min(900px, 95vw);
  max-height: 100%;         /* aby nepretiekol overlay */
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,0.35);
}


.modal iframe {
  width: 100%;
  height: 100%;
}
#closeBtn {
  position: absolute;
  top: 10px;
  right: 12px;
  cursor: pointer;
  z-index: 10;
}
#iframePopup.overlay{
  position: fixed;
  top: var(--topbar-h);
  left: 0;
  right: 0;
  bottom: var(--footer-h);

  display: none;      /* dôležité – nespustí sa sám */

  background: rgba(0,0,0,0.75); /* ✅ tmavé pozadie */

  align-items: center;
  justify-content: center;

  z-index: 900;       /* pod topbarom (topbar má 1000) */
  padding: 20px;
  box-sizing: border-box;
}

/* otvorenie popupu */
#iframePopup.overlay.is-open{
  display: flex;
}

#iframePopup .modal{
  position: relative;
  background: #fff;
  width: min(900px, 95vw);

  max-height: 95%;          /* 🔑 MAX 95 % dostupnej výšky */
  overflow: auto;           /* 🔑 scroll ak je obsah väčší */

  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.35);
}

#iframePopup iframe,
#iframePopup #popupFrame{
  width: 100%;
  min-height: 300px;   /* bezpečné minimum */
  border: 0;
  display: block;
}

.centerbox{
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
}
/*podpisy*/
.sig-wrap { width: 350px; }
.sig-wrap canvas {
    border: 1px solid #333;
    width: 100%;
    height: 200px;
    touch-action: none; /* dôležité pre mobil */
    display: block;
    background: #fff;
}
/* ====== MOBILE SIDEBAR (<1000px) ====== */
.sidebar-backdrop{
  display:none;
}
/* hamburger button */
.mobile-menu-btn{
  display:none;
  align-items:center;
  justify-content:center;

  width:44px;
  height:38px;

  background: rgb(0 0 0 / 60%);
  color: #fff;                 /* ✅ aby bolo ☰ vidno */
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 10px;

  font-size: 22px;
  line-height: 1;
  font-weight: 800;

  cursor: pointer;
  user-select: none;

  position: relative;
  z-index: 2000;               /* ✅ nad topbar prvkami */
}
#admin_logo_chrobakio{
    display: block;
}

/* kontajner */
.select2-container{
  min-width: 300px;
  font-size: 14px;
}

/* ====== SELECTION (SINGLE) ====== */
.select2-container--default .select2-selection--single{
  background: var(--s2-bg);
  border: 1px solid var(--s2-border);
  border-radius: var(--s2-radius);
  height: 40px;                 /* uprav podľa tvojich inputov */
  display: flex;
  align-items: center;
  box-shadow: 0 8px 20px rgba(0,0,0,0.25);
}

.select2-container--default .select2-selection--single .select2-selection__rendered{
  color: var(--s2-text);
  padding-left: 12px;
  padding-right: 38px;
  line-height: 40px;
}

.select2-container--default .select2-selection--single .select2-selection__placeholder{
  color: var(--s2-muted);
}

/* šípka */
.select2-container--default .select2-selection--single .select2-selection__arrow{
  height: 40px;
  right: 10px;
}

.select2-container--default .select2-selection--single .select2-selection__arrow b{
  border-color: var(--s2-muted) transparent transparent transparent;
}

/* clear "x" */
.select2-container--default .select2-selection--single .select2-selection__clear{
  color: var(--s2-muted);
  margin-right: 8px;
}

/* ====== SELECTION (MULTIPLE) ====== */
.select2-container--default .select2-selection--multiple{
  background: var(--s2-bg);
  border: 1px solid var(--s2-border);
  border-radius: var(--s2-radius);
  min-height: 40px;
  padding: 4px 8px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.25);
}

.select2-container--default .select2-selection--multiple .select2-selection__rendered{
  padding: 0;
}

/* tagy */
.select2-container--default .select2-selection--multiple .select2-selection__choice{
  background: var(--s2-item-bg);
  border: 1px solid var(--s2-item-border);
  border-radius: 8px;
  color: var(--s2-text);
  padding: 4px 8px 4px 26px;
  margin: 4px 6px 0 0;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice__remove{
  color: var(--s2-muted);
  border-right: 0;
  margin-right: 8px;
  left: 8px;
  top: 50%;
  transform: translateY(-50%);
}

/* input v multiple (kde píšeš) */
.select2-container--default .select2-selection--multiple .select2-search__field{
  color: var(--s2-text);
  margin-top: 6px;
}

.select2-container--default .select2-selection--multiple .select2-search__field::placeholder{
  color: var(--s2-muted);
}

/* ====== FOCUS / OPEN stavy ====== */
.select2-container--default.select2-container--focus .select2-selection,
.select2-container--default.select2-container--open .select2-selection{
  border-color: var(--s2-border-strong);
  box-shadow: 0 0 0 3px rgba(60, 170, 255, 0.18), 0 10px 26px rgba(0,0,0,0.35);
}

/* otočenie šípky pri open */
.select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow b{
  border-color: transparent transparent var(--s2-muted) transparent;
}

/* ====== DROPDOWN ====== */
.select2-container--default .select2-dropdown{
  background: var(--s2-bg-2);
  border: 1px solid var(--s2-border);
  border-radius: var(--s2-radius);
  overflow: hidden;
  box-shadow: 0 18px 40px rgba(0,0,0,0.45);
}

/* search v dropdown */
.select2-container--default .select2-search--dropdown .select2-search__field{
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--s2-border);
  border-radius: 10px;
  color: var(--s2-text);
  padding: 10px 12px;
  outline: none;
}

/* možnosti */
.select2-container--default .select2-results__option{
  color: var(--s2-text);
  padding: 10px 12px;
}

/* hover */
.select2-container--default .select2-results__option--highlighted.select2-results__option--selectable{
  background: rgba(60, 170, 255, 0.18);
  color: var(--s2-text);
}

/* selected item */
.select2-container--default .select2-results__option--selected{
  background: rgba(255,255,255,0.08);
}

/* disabled */
.select2-container--default .select2-results__option--disabled{
  color: rgba(255,255,255,0.35);
}

/* scrollbar (WebKit) */
.select2-results__options::-webkit-scrollbar{
  width: 10px;
}
.select2-results__options::-webkit-scrollbar-thumb{
  background: rgba(255,255,255,0.12);
  border-radius: 10px;
}
.select2-results__options::-webkit-scrollbar-track{
  background: rgba(0,0,0,0.15);
}
@media (max-width: 1400px){

    #admin_logo_chrobakio{
        display: none;
    }
  .mobile-menu-btn{
    display:inline-flex;
    align-items:center;
    justify-content:center;
  }
  .mobile-menu-btn{ display:inline-flex; }
  /* sidebar sa vyberie z layout flow a spraví sa vysúvací panel */
  .sidebar{
    position: fixed;
    left: 0;
    top: var(--topbar-h);
    bottom: var(--footer-h);
    transform: translateX(-105%);
    transition: transform .25s ease;
    z-index: 1100;
    width: min(320px, 85vw);
  }

  /* obsah na plnú šírku */
  /*.content{
    width: 100%;
    height: auto;
    min-height: auto;
    display: flex;
    flex-direction: column;
    overflow: visible;
  }*/

  /* backdrop */
  .sidebar-backdrop{
    position: fixed;
    left: 0;
    right: 0;
    top: var(--topbar-h);
    bottom: var(--footer-h);
    background: rgba(0,0,0,.45);
    z-index: 1090;
  }

  body.sidebar-open .sidebar{
    transform: translateX(0);
  }

  body.sidebar-open .sidebar-backdrop{
    display:block;
  }
}



