/* Súbor: style.css */

/* --- ZÁKLADNÉ NASTAVENIA --- */
body {
    font-family: 'Inter', -apple-system, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f8faf9; /* Svetlé pozadie pre dashboard */
    color: #333;
    font-size: 14px;
}

/* --- SIDEBAR --- */
.sidebar {
    width: 240px;
    background: #14322a; /* Reserve Green */
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    color: white;
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    padding: 30px 10px;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.logo-main {
    width: 100px; /* Pevná šírka loga v menu */
    height: auto;
    display: block;
    margin: 0 auto 10px auto;
}

.admin-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 2px;
    opacity: 0.6;
    margin: 0;
    color: white;
}

.nav-menu {
    padding: 20px 0;
    flex-grow: 1;
}

.nav-item {
    padding: 12px 25px;
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    transition: 0.2s;
}

.nav-item i {
    width: 25px;
    text-align: center;
    margin-right: 10px;
}

.nav-item:hover, .nav-item.active {
    color: #c9a66b; /* Gold */
    background: rgba(255,255,255,0.05);
    border-left: 3px solid #c9a66b;
}

/* --- HLAVNÝ OBSAH --- */
.content {
    margin-left: 240px; /* Odsadenie kvôli sidebaru */
    padding: 40px;
    width: calc(100% - 240px);
    box-sizing: border-box;
}

.header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.header-flex h1 {
    font-size: 24px;
    margin: 0;
}

/* --- KARTY (GRID) --- */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.03);
    border: 1px solid #eee;
}

.stat-card h3 {
    font-size: 11px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0 0 10px 0;
}

.stat-card .value {
    font-size: 28px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0;
}

.stat-card .status-ok { color: #27ae60; font-size: 13px; margin-top: 5px; }
.stat-card .status-bad { color: #e74c3c; font-size: 13px; margin-top: 5px; }

/* --- TABUĽKY --- */
.table-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.03);
    padding: 20px;
    border: 1px solid #eee;
}

.table-title {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    text-align: left;
    padding: 12px;
    background: #f9f9f9;
    font-size: 12px;
    text-transform: uppercase;
    color: #666;
    border-bottom: 1px solid #eee;
}

td {
    padding: 12px;
    border-bottom: 1px solid #eee;
    font-size: 13px;
}

/* --- TLAČIDLÁ --- */
.btn-run {
    background: #c9a66b;
    color: white;
    padding: 10px 20px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-block;
    border: none;
    cursor: pointer;
}

.btn-run:hover {
    background: #b08d55;
}

/* --- LOGIN ŠTÝLY (ak by boli v rovnakom súbore) --- */
body.login-body {
    background: #111;
    display: flex;
    align-items: center;
    justify-content: center;
}
.login-logo { width: 150px; margin: 0 auto 30px auto; display: block; }

/* --- DOPLNENIE PRE LOGIN KARTU (Vložte na koniec style.css) --- */
.login-card {
    background: #1a1a1a;
    padding: 40px;
    border-radius: 8px;
    width: 100%;
    max-width: 320px;
    text-align: center;
    border: 1px solid #333;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    /* Zabezpečí, že formulár bude pekne v strede */
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Oprava pre vstupné polia na logine, aby boli odsadené */
.login-card input {
    background: #000;
    border: 1px solid #444;
    color: white;
}

/* --- FINÁLNA ÚPRAVA LOGINU --- */
.login-card form {
    display: flex;        /* Zoradí prvky flexibilne */
    flex-direction: column; /* Prvky pôjdu pod seba (stĺpec) */
    width: 100%;          /* Roztiahne formulár na celú šírku */
    box-sizing: border-box;
}

.login-card input {
    width: 100%;          /* Každé pole zaberie 100% šírky */
    margin-bottom: 15px;  /* Medzera medzi Používateľom a Heslom */
}

.login-card button {
    margin-top: 30px;     /* Veľká medzera nad tlačidlom PRIHLÁSIŤ SA */
    width: 100%;
}

/* --- VNORENE MENU --- */
.nav-submenu {
    padding-left: 20px;
    display: none; /* Skryté v základe */
    background: rgba(0,0,0,0.1);
}

.nav-item.has-submenu:hover + .nav-submenu,
.nav-submenu:hover,
.nav-submenu.open { /* Trieda pre trvalé otvorenie */
    display: block;
}

.nav-subitem {
    padding: 10px 15px 10px 40px;
    color: #bbb;
    text-decoration: none;
    font-size: 11px;
    display: block;
    text-transform: uppercase;
    border-left: 1px solid rgba(255,255,255,0.05);
}

.nav-subitem:hover, .nav-subitem.active {
    color: #c9a66b;
    background: rgba(255,255,255,0.05);
}

/* --- TOGGLE SWITCH (PREPÍNAČ) --- */
.switch {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 20px;
}

.switch input { 
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: .4s;
  border-radius: 20px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 2px;
  bottom: 2px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: #c9a66b; /* Gold */
}

input:checked + .slider:before {
  transform: translateX(20px);
}

/* --- STRÁNKOVANIE (PAGINATION) --- */
.pagination {
    display: flex;
    justify-content: center;
    margin-top: 20px;
    gap: 5px;
}
.page-link {
    padding: 8px 12px;
    background: white;
    border: 1px solid #ddd;
    text-decoration: none;
    color: #333;
    border-radius: 4px;
}
.page-link.active {
    background: #c9a66b;
    color: white;
    border-color: #c9a66b;
}