/* ===== UŽIVATELSKÁ SEKCE (seznam zaměstnanců) ===== */
#user_list {
  display: table-row-group; /* Zachová strukturu tabulky */
}

thead, tbody, tr {
  display: table;
  width: 100%;
  table-layout: fixed; /* Fixní šířky sloupců */
}

/* Zajistí, že tabulka bude mít posuvník, pokud je širší než kontejner */
@media screen and (max-width: 1200px) {
  .table-responsive {
    overflow-x: scroll;
  }
  
  thead, tbody, tr {
    width: 100%;
    min-width: 1000px; /* Minimální šířka tabulky na menších obrazovkách */
  }
}/* 
 * Unifikovaný CSS soubor pro Terminál
 * Nový design inspirován stibus.cz
 * Obsahuje všechny styly: základ, hlavička, tabulky, formuláře, login, responsive
 */

/* ===== ZÁKLADNÍ NASTAVENÍ A PROMĚNNÉ ===== */
:root {
  --primary: #0067b3;     /* Hlavní modrá barva */
  --primary-dark: #00487d; /* Tmavší modrá pro hover stavy */
  --secondary: #e5e5e5;   /* Světle šedá pro pozadí */
  --accent: #ff6600;      /* Oranžová doplňková barva */
  --text-dark: #333333;   /* Tmavá barva textu */
  --text-light: #ffffff;  /* Světlá barva textu */
  --bg-light: #f5f5f5;    /* Světlé pozadí */
  --bg-medium: #e5e5e5;   /* Středně tmavé pozadí */
  --border-color: #dddddd; /* Barva ohraničení */
  --lavender-original: #E4D9FF; /* Původní světle fialová barva */
  --lavender-dark: #5b5666; /* Tmavší varianta fialové pro lepší čitelnost */
}

* {
  text-decoration: none;
  box-sizing: border-box;
}

/* ===== ZÁKLADNÍ NASTAVENÍ STRÁNKY ===== */
body {
  background: var(--lavender-original);
  font-family: 'Roboto', sans-serif;
  margin: 0;
  font-size: 15px;
  color: var(--text-dark);
}

header, main { 
  width: 100%;
  display: block;
  margin: 0 auto;
}

/* ===== HLAVIČKA A NAVIGACE ===== */
.header { 
  padding: 5px;
  width: 100%;
  height: 90px;
  background-color: white;
  border-bottom: 3px solid var(--primary);
}

.logo a {
  text-decoration: none; 
  font-family: 'Roboto', sans-serif;
  font-size: 40px;
  color: var(--primary);
  font-weight: bold;
  font-style: italic;
  text-align: center;
  vertical-align: middle;
  line-height: 100px;
  display: block;
}

.topnav {
  overflow: hidden;
  background-color: var(--primary);
  margin-bottom: 30px; /* Přidáno: mezera pod navigací */
}

.topnav a {
  float: left;
  display: block;
  color: var(--text-light);
  text-align: center;
  padding: 14px 16px;
  text-decoration: none !important;
  font-size: 15px;
  font-weight: 500;
}

.topnav a:hover {
  background-color: var(--primary-dark);
  color: white;
}

.topnav .icon {
  display: none;
}

/* ===== NADPISY ===== */
h1 {
  font-size: 26px !important;
  color: var(--primary);
  font-weight: 500;
  font-family: 'Roboto', sans-serif !important;
  text-align: center;
  margin: 30px 0; /* Stejná mezera nad i pod nadpisem */
  text-transform: uppercase;
}

/* Specifické zarovnání pro nadpis v hlavní sekci */
main section h1 {
  margin-top: 30px;
  margin-bottom: 30px;
}

/* Zajistíme mezeru mezi hlavičkou a hlavním obsahem */
header + main {
  padding-top: 20px; /* Dodatečná mezera mezi hlavičkou a obsahem */
}

h3 {
  padding: 15px;
  color: var(--primary);
}

/* ===== TABULKY ===== */
.table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 20px;
}

.table-responsive {
  width: 100%;
  overflow-x: auto; /* Horizontální posuvník, pokud je tabulka příliš široká */
  max-height: 80vh; /* Omezení výšky pro velké tabulky */
  overflow-y: auto; /* Vertikální posuvník pro dlouhé tabulky */
  display: block; /* Důležité pro fungování posuvníku */
}

.table-primary {
  background-color: var(--primary);
}

thead th {
  background-color: var(--primary) !important;
  color: var(--text-light) !important;
  border: none;
}

tbody tr:nth-child(even) {
  background-color: var(--bg-medium);
}

tbody tr:nth-child(odd) {
  background-color: white;
}

th {
  padding: 15px;
  text-align: center !important;
  font-weight: 500;
  font-size: 15px;
  color: var(--text-light) !important;
  text-transform: uppercase;
  border: none !important;
}

td {
  padding: 15px;
  text-align: center;
  font-weight: 400;
  font-size: 14px;
  color: var(--text-dark) !important;
  border-bottom: 1px solid var(--border-color);
}

/* Zajištění lepší čitelnosti UID karty a dalších odkazů v tabulkách */
td a, td a:visited {
  color: #000000 !important; /* Černá barva pro maximální kontrast */
  font-weight: 700 !important; /* Extra tučné písmo */
  text-decoration: none;
}

/* Speciální styl pro sloupec UID KARTY */
table td:first-child {
  color: var(--lavender-dark) !important; /* Tmavší fialová pro lepší kontrast */
  font-weight: 700 !important; /* Extra tučné písmo */
}

td a:hover {
  text-decoration: underline;
}

tbody tr:hover {
  background-color: rgba(0, 103, 179, 0.1);
}

/* ===== FORMULÁŘE ===== */
input[type="text"],
input[type="email"],
input[type="number"],
input[type="password"],
input[type="date"],
input[type="time"],
select {
  font-family: 'Roboto', sans-serif;
  background: white;
  border: 1px solid var(--border-color);
  border-radius: 3px;
  font-size: 14px;
  margin: 0;
  outline: 0;
  padding: 10px;
  width: 100%;
  box-sizing: border-box; 
  color: var(--text-dark);
  margin-bottom: 15px;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="number"]:focus,
input[type="password"]:focus,
input[type="date"]:focus,
input[type="time"]:focus,
select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 3px rgba(0, 103, 179, 0.3);
}

button, 
input[type="submit"], 
.form button, 
.form-style-5 button {
  font-family: 'Roboto', sans-serif;
  background-color: var(--primary);
  color: white;
  border: none;
  border-radius: 3px;
  padding: 10px 15px;
  cursor: pointer;
  transition: background-color 0.3s;
}

button:hover, 
input[type="submit"]:hover, 
.form button:hover, 
.form-style-5 button:hover {
  background-color: var(--primary-dark);
}

/* ===== LOGINOVÁ STRÁNKA ===== */
.login-page {
  width: 360px;
  padding: 30px 0 0;
  margin: auto;
}

.form {
  position: relative;
  z-index: 1;
  background: white;
  max-width: 360px;
  margin: 0 auto;
  padding: 40px;
  text-align: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  border-radius: 4px;
}

.form input {
  font-family: 'Roboto', sans-serif;
  outline: 0;
  background: white;
  width: 100%;
  border: 1px solid var(--border-color);
  margin: 0 0 15px;
  padding: 15px;
  box-sizing: border-box;
  font-size: 15px;
  border-radius: 3px;
}

.form button {
  font-family: 'Roboto', sans-serif;
  text-transform: uppercase;
  outline: 0;
  background: var(--primary);
  width: 100%;
  border: 0;
  padding: 15px;
  color: white;
  font-size: 15px;
  cursor: pointer;
  border-radius: 3px;
}

.form .message {
  margin: 15px 0 0;
  color: var(--text-dark);
  font-size: 13px;
  font-family: 'Roboto', sans-serif;
}

.form .message a {
  color: var(--primary);
  font-size: 14px;
  text-decoration: none;
}

.form .alert {
  border-radius: 3px;
  margin-bottom: 15px;
}

/* ===== SPRÁVA UŽIVATELŮ ===== */
.form-style-5 {
  max-width: 380px;
  height: 750px; /* Přidáno: fixní výška formuláře */
  padding: 30px 20px;
  margin: 46px 20px;
  background: white;
  border-radius: 4px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  font-family: 'Roboto', sans-serif;
  float: left;
  position: relative;
  overflow-y: auto; /* Přidáno: svislý posuvník pro formulář, pokud je obsah delší */
}

.form-style-5 fieldset {
  border: none;
  margin-top: 0;
}

.form-style-5 legend {
  font-size: 1.4em;
  margin-bottom: 10px;
  color: var(--primary);
}

.form-style-5 label {
  display: block;
  margin-bottom: 8px;
  font-family: 'Roboto', sans-serif;
  color: var(--text-dark);
}

.form-style-5 .number {
  background: var(--primary);
  color: white;
  height: 30px;
  width: 30px;
  display: inline-block;
  font-size: 0.8em;
  margin-right: 4px;
  line-height: 30px;
  text-align: center;
  border-radius: 3px;
}

/* Sekce vedle formuláře (tabulka) */
.section {
  margin: 10px;
  width: calc(100% - 440px);
  display: block;
  float: right;
  position: relative;
  top: 46px;
  right: 0;
  height: 750px; /* Přidáno: fixní výška sekce pro tabulku */
  overflow-y: auto; /* Přidáno: svislý posuvník pro tabulku */
}

/* Přidáno: styl pro span v sekci */
.section span {
  float: left;
  display: block;
  position: absolute;
  margin: 0 0 0 5px;
}

/* ===== MODÁLNÍ OKNA ===== */
.modal-header, .modal-footer {
  background-color: var(--primary) !important;
  color: var(--text-light) !important;
  border: none !important;
}

.modal-body {
  background-color: white !important;
  color: var(--text-dark);
}

.close {
  color: var(--text-light);
}

.close:hover {
  color: var(--text-light);
  opacity: 0.8;
}

/* ===== ALERTY A NOTIFIKACE ===== */
.alert-danger {
  background-color: #f8d7da;
  color: #721c24;
  border-color: #f5c6cb;
  padding: 10px;
  border-radius: 3px;
}

.alert-success {
  background-color: #d4edda;
  color: #155724;
  border-color: #c3e6cb;
  padding: 10px;
  border-radius: 3px;
}

.up_info1, .up_info2 {
  display: none;
  width: 270px;
  height: 40px;
  font-size: 17px;
  font-family: 'Roboto', sans-serif;
  padding: 5px;
  margin-right: 20px;
  text-align: center;
  position: absolute;
  border-radius: 3px;
}

/* ===== ANIMACE ===== */
.animate {
  -webkit-animation: animatezoom 0.6s;
  animation: animatezoom 0.6s
}

@-webkit-keyframes animatezoom {
  from {-webkit-transform: scale(0)} 
  to {-webkit-transform: scale(1)}
}
  
@keyframes animatezoom {
  from {transform: scale(0)} 
  to {transform: scale(1)}
}

.slideInRight {
  animation-name: slideInRight;
} 

.slideInDown {
  animation-name: slideInDown;
}

.animated {
  animation-duration: 1s;
  animation-fill-mode: both;
}

@keyframes slideInRight {
  from {
    transform: translate3d(100%, 0, 0);
    visibility: visible;
  }

  to {
    transform: translate3d(0, 0, 0);
  }
}

@keyframes slideInDown {
  from {
    transform: translate3d(0, 100%, 0);
    visibility: visible;
  }

  to {
    transform: translate3d(0, 0, 0);
  }
}

/* ===== SCROLLBARY ===== */
::-webkit-scrollbar {
  width: 8px;
  height: 8px; /* Pro horizontální scrollbar */
} 

::-webkit-scrollbar-track {
  -webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.3);
  background-color: #f0f0f0;
  border-radius: 4px;
} 

::-webkit-scrollbar-thumb {
  -webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.3);
  background-color: var(--primary);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background-color: var(--primary-dark);
}

/* ===== SPRÁVA DEVICES ===== */
.panel {
  border-color: var(--primary) !important;
  margin-bottom: 20px;
  background-color: white;
  border-radius: 4px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.panel-heading {
  background-color: var(--primary) !important;
  color: white;
  padding: 10px 15px;
  border-top-left-radius: 3px;
  border-top-right-radius: 3px;
}

.panel-body {
  background-color: white !important;
  padding: 15px;
}

.btn-mode_select_learn {
  background-color: var(--primary);
  color: white;
}

.btn-mode_select_read {
  background-color: #5cb85c;
  color: white;
  box-shadow: none;
}

/* ===== HISTORIE JÍZD ===== */
.time {
  display: block;
  position: absolute;
  right: 10%;
  margin-top: -25px;
}

.time input {
  position: absolute !important;
  clip: rect(0, 0, 0, 0);
  height: 1px;
  width: 1px;
  border: 0;
  overflow: hidden;
}

.time label {
  background-color: #e5e5e5;
  color: var(--text-dark);
  font-size: 14px;
  line-height: 1;
  text-align: center;
  padding: 6px 12px;
  margin-right: -1px;
  border: 1px solid rgba(0, 0, 0, 0.2);
  transition: all 0.1s ease-in-out;
}

.time label:hover {
  cursor: pointer;
}

.time input:checked + label {
  background-color: var(--primary);
  color: white;
  box-shadow: none;
}

/* ===== RESPONZIVNÍ DESIGN ===== */
@media screen and (max-width: 1200px) {
  .form-style-5, .section {
    float: none;
    width: 100%;
    max-width: 100%;
  }
  
  .section {
    position: relative;
    top: 0;
    right: 0;
  }
}

@media screen and (max-width: 900px) {
  section {
    margin: 10px;
    overflow-x: auto; /* Přidáno: horizontální posuvník pro menší obrazovky */
  }
  
  th {
    padding: 8px 2px;
    font-size: 11px;
  }
  
  td {
    padding: 8px;
    font-size: 10px;
  }
  
  h1 {
    font-size: 18px !important;
  }
  
  .table-responsive {
    max-height: 70vh; /* Omezení výšky na menších obrazovkách */
  }
}

@media screen and (max-width: 600px) {
  .topnav a:not(:first-child) {display: none;}
  .topnav a.icon {
    float: right;
    display: block;
  }
  
  .header { 
    height: 70px;
  }
  
  .logo a {
    font-size: 28px;
    line-height: 70px;
  }
  
  .topnav.responsive {position: relative;}
  .topnav.responsive .icon {
    position: absolute;
    right: 0;
    top: 0;
  }
  
  .topnav.responsive a {
    float: none;
    display: block;
    text-align: left;
  }
  
  .section {
    display: block;
    float: left;
    position: relative;
    top: 0px;
    right: 0px;
    width: 100%;
    padding: 10px 20px;
    margin: 20px 2px;
  }
  
  .section img {
    width: 15px;
    margin: 3px;
  }
  
  h1 {
    font-size: 19px !important;
    padding: 5px 8px !important;
  }
  
  th {
    font-size: 12px;
    padding: 10px 2px;
  }
  
  td {
    font-size: 11px;
    padding: 4px 2px;
  }
  
  .login-page {
    width: 100%;
    font-size: 1em;
  }
  
  .form input, .form button {
    margin: 0 0 10px;
    padding: 12px;
    font-size: 12px;
    border-radius: 3px;
  }
  
  .modalss-content {
    width: 90% !important;
  }
}

.logo a {
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    height: 100%;
}

.logo-image {
    max-height: 50px; /* Zvětšíme z 40px na 50px */
    width: auto;
    margin-right: 10px; /* Mezera mezi logem a textem */
}

.logo a div {
    font-family: 'Roboto', sans-serif;
    font-size: 40px;
    color: var(--primary);
    font-weight: bold;
    font-style: italic;
}
