
/* =========================
   ZÁKLAD STRÁNKY
========================= */
body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: var(--color-background);
    color: #2c3e50;
    min-height: 100vh;
}

/* =========================
   TOPBAR
========================= */
.topbar {
    width: 100%;
    max-width: var(--max-width);
    margin: 20px auto;
    padding: 20px;
    background: var(--color-primary);
    color: #fff;
    text-align: center;
    border-radius: 12px;
}

.logo {
    font-size: 26px;
    font-weight: bold;
    margin-bottom: 15px;
}

/* =========================
   MENU
========================= */
.menu {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 25px;
    flex-wrap: wrap;
}

.menu a,
.dropdown > a {
    display: flex;
    align-items: center;
    color: #fff;
    text-decoration: none;
    font-weight: bold;
    padding: 10px 15px;
    border-radius: 4px;
    transition: background 0.3s;
}

.menu a:hover,
.dropdown > a:hover {
    background: var(--color-primary-hover);
}

.menu .logout {
    background: var(--color-danger);
}

/* =========================
   LOGIN
========================= */

body {
   
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.login-box {
    max-width: 360px;
    margin: 120px auto;
    background: #ffffff;
    padding: 28px 30px;
    border-radius: 12px;
    border: 1px solid #e0e0e0;
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
}

.login-box h2 {
    margin-top: 0;
    margin-bottom: 18px;
    text-align: center;
    font-size: 22px;
    color: #0b2c3d;
}

.login-box label {
    display: block;
    margin-top: 14px;
    font-weight: 600;
    font-size: 14px;
    color: #333;
}

.login-box input {
    width: 100%;
    max-width: 275px; 
    padding: 10px 11px;
    margin-top: 5px;
    border-radius: 6px;
    border: 1px solid #ccc;
    font-size: 14px;
}

.login-box input:focus {
    outline: none;
    border-color: #0b2c3d;
    box-shadow: 0 0 0 2px rgba(11,44,61,0.15);
}

.login-box button {
    width: 100%;
    margin-top: 22px;
    padding: 12px;
    background: var(--color-primary);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
}

.login-box button:hover {
   background: var(--color-primary-hover);
}

.login-box p {
    margin-top: 10px;
    text-align: center;
    font-size: 14px;
}


/* =========================
   DROPDOWN
========================= */
.dropdown {
    position: relative;
    display: flex;
    align-items: center;
}

.dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 180px;
    background: var(--color-primary-hover);
    border-radius: 6px;
    z-index: 10;
}

.dropdown-content a {
    display: block;
    padding: 10px 15px;
    color: #fff;
    text-decoration: none;
}

.dropdown-content a:hover {
    background: var(--color-primary);
}

.dropdown:hover .dropdown-content {
    display: block;
}

/* =========================
   OBSAH
========================= */
.content {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 20px;
}

/* =========================
   DASHBOARD
========================= */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.card {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.card h3 {
    margin-top: 0;
    color: var(--color-primary);
}

/* =========================
   TABULKY
========================= */
.user-table,
.log-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    margin-top: 20px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 14px rgba(0,0,0,0.08);
}

.user-table thead,
.log-table th {
    background: var(--color-primary);
    color: #fff;
}

.user-table th,
.user-table td,
.log-table td {
    padding: 12px 14px;
    text-align: left;
    border-bottom: 1px solid #e6e6e6;
}

.user-table tbody tr:hover {
    background: #f4f8fb;
}

/* =========================
   TLAČÍTKA
========================= */
.btn {
    display: inline-block;
    padding: 9px 14px;
    border-radius: 6px;
    font-weight: bold;
    text-decoration: none;
    font-size: 14px;
    transition: background 0.2s;
}

.btn-blue {
    background: var(--color-primary);
    color: #fff;
}

.btn-blue:hover {
    background: var(--color-primary-hover);
}

.btn-red {
    background: var(--color-danger);
    color: #fff;
}

/* =========================
   FORMULÁŘE (ADD / EDIT / PROFILE)
========================= */
.profile-form {
    max-width: 420px;
    margin: 30px auto;
    background: #fff;
    padding: 22px;
    border-radius: 10px;
    border: 1px solid #e0e0e0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.profile-form label {
    display: block;
    margin-top: 14px;
    font-weight: bold;
    font-size: 14px;
}

.profile-form input,
.profile-form select {
    width: 100%;
    max-width: 360px;   /* ← TADY je to zmenšení */
    padding: 9px;
    margin-top: 4px;
    border-radius: 6px;
    border: 1px solid #ccc;
}

.profile-form input:disabled {
    background: #f3f3f3;
}


.profile-form .checkbox-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    font-weight: normal;
}

.profile-form .checkbox-row input {
    width: auto;
    margin: 0;
}

.area-box {
    margin-top: 6px;
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fafafa;
}

.area-box .area-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: normal;
    margin: 4px 0;
}


.area-row {
    padding: 6px 0;
    border-bottom: 1px solid #ddd;
}

.area-row strong {
    display: block;
    margin-bottom: 4px;
}

label.inline {
    margin-right: 15px;
}

.areas-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 6px;
}

.areas-table th,
.areas-table td {
    border: 1px solid #ddd;
    padding: 8px 10px;
}

.areas-table th {
    background: #f2f2f2;
    text-align: left;
}

.areas-table td.center {
    text-align: center;
}

/* =========================
   FORM ACTIONS
========================= */
.form-actions {
    margin-top: 20px;
    text-align: center;
}

.form-actions button {
    width: 100%;
    padding: 11px;
    background: var(--color-primary);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
}

.btn-secondary {
    display: inline-block;
    margin-top: 10px;
    background: #6c757d;
    color: #fff;
    padding: 10px 18px;
    border-radius: 6px;
    text-decoration: none;
}

/* =========================
   HLÁŠKY
========================= */
.success {
    background: #e6ffed;
    color: #1e7e34;
    padding: 10px 14px;
    border-radius: 6px;
    margin: 10px 0;
}

.error {
    background: #ffe6e6;
    color: #a30000;
    padding: 10px 14px;
    border-radius: 6px;
    margin: 10px 0;
}

/* =========================
   LOGIN
========================= */
.login-box {
    max-width: 300px;
    margin: 50px auto;
    padding: 25px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}



/* =========================
   FOOTER
========================= */
.footer {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 12px;
    text-align: center;
    background: #f1f1f1;
    color: #555;
    border-radius: 6px 6px 0 0;
}

/* =========================
   FILTRY LOGŮ – FINÁLNÍ OPRAVA
========================= */

.log-filters {
    display: flex;
    gap: 16px;
    align-items: flex-start;   /* 🔑 KLÍČ */
    flex-wrap: wrap;
}

/* label je blok, text nahoře */
.log-filters label {
    display: flex;
    flex-direction: column;   /* 🔑 */
    gap: 6px;
    font-weight: bold;
    font-size: 14px;
}

/* select */
.log-filters select {
    height: 40px;
    padding: 0 10px;
    border-radius: 6px;
    border: 1px solid #ccc;
    font-size: 14px;
}

/* tlačítka */
.log-filters .btn {
    height: 40px;
    padding: 0 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    line-height: 1;
    margin-top: 20px; /* 🔑 dorovnání k selectům */
}


/* TABULKA */
.log-table thead th {
    padding: 14px 16px;
    font-size: 15px;
    font-weight: bold;
    letter-spacing: 0.3px;
    vertical-align: middle;
}

.log-table td {
    vertical-align: middle;
}

.log-table .ua {
    font-size: 12px;
    color: #555;
    max-width: 360px;
    word-break: break-word;
}

.log-table td[colspan] {
    text-align: center;
    font-style: italic;
    color: #666;
}

/* =========================
   LOG – PODBARVENÍ ŘÁDKŮ
========================= */
.log-table tbody tr.log-success {
    background-color: #e6f7ec;   /* zelená */
}

.log-table tbody tr.log-fail {
    background-color: #fdeaea;   /* červená */
}

.log-table tbody tr.log-logout {
    background-color: #eaf2fd;   /* modrá */
}

.log-table tbody tr:hover {
    filter: brightness(0.97);
}
/* =========================
   LOG – ŘAZENÍ
========================= */
.sort-link {
    color: #fff;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.sort-link:hover {
    text-decoration: underline;
}


/* =========================
   STRÁNKOVÁNÍ
========================= */
.pagination {
    margin-top: 20px;
    display: flex;
    gap: 6px;
    justify-content: center;
    flex-wrap: wrap;
}

.pagination a {
    padding: 7px 12px;
    background: #f1f1f1;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    color: #333;
    transition: background 0.2s;
}

.pagination a:hover {
    background: #ddd;
}

.pagination a.active {
    background: var(--color-primary);
    color: #fff;
}

//Oblasti
.areas-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 14px;
}

.areas-table th,
.areas-table td {
    border: 1px solid #ddd;
    padding: 8px 10px;
}

.areas-table th {
    background: #f2f2f2;
    text-align: left;
}


.password-field {
    position: relative;
}

.password-field input {
    padding-right: 40px;
}

.toggle-password {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    user-select: none;
    opacity: 0.6;
}

.toggle-password:hover {
    opacity: 1;
}

/* =========================
   OBLASTI – KARTIČKY
========================= */
.areas-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 6px;
}

.area-card {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: #f2f2f2;
    border-radius: 8px;
    cursor: pointer;
    user-select: none;
    transition: background 0.2s ease, box-shadow 0.2s ease;
}

.area-card:hover {
    background: #e8e8e8;
}

.area-card input {
    accent-color: #8e44ad; /* stejná fialová */
    cursor: pointer;
}

.area-card input:checked + span {
    font-weight: 600;
}

/* =========================
   RESPONSIVITA
========================= */
@media (max-width: 768px) {
    .menu {
        flex-direction: column;
        gap: 10px;
    }

    .dropdown-content {
        position: static;
        width: 100%;
    }

    .user-table {
        display: block;
        overflow-x: auto;
    }
}

