* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    background: #f4f6f8;
    color: #222;
    font-size: 14px;
}
a { color: #098BB6; text-decoration: none; }
a:hover { text-decoration: underline; }

.layout { display: flex; min-height: 100vh; }

.sidebar {
    width: 230px;
    background: #1c2b36;
    color: #cfd8dc;
    flex-shrink: 0;
    padding: 18px 0;
}
.sidebar .logo {
    font-weight: bold;
    font-size: 16px;
    color: #fff;
    padding: 0 18px 16px;
    border-bottom: 1px solid #33454f;
    margin-bottom: 10px;
}
.sidebar nav { display: flex; flex-direction: column; }
.sidebar a {
    color: #cfd8dc;
    padding: 9px 18px;
    display: block;
}
.sidebar a:hover { background: #263845; text-decoration: none; }
.sidebar a.active { background: #098BB6; color: #fff; }
.sidebar .nav-sekcia {
    font-size: 11px;
    text-transform: uppercase;
    color: #6f8592;
    padding: 14px 18px 4px;
    letter-spacing: .5px;
}

.obsah-wrapper { flex: 1; display: flex; flex-direction: column; min-width: 0; }

.topbar {
    background: #fff;
    border-bottom: 1px solid #e0e4e8;
    padding: 14px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.topbar .titulok { font-size: 18px; font-weight: 600; }
.topbar .pouzivatel { font-size: 13px; color: #555; }

.obsah { padding: 22px; flex: 1; }

/* Karty na nástenke */
.karty { display: flex; flex-wrap: wrap; gap: 14px; }
.karta {
    background: #fff;
    border: 1px solid #e0e4e8;
    border-radius: 8px;
    padding: 18px;
    width: 200px;
    text-align: center;
}
.karta .ikona { font-size: 26px; margin-bottom: 8px; }
.karta a { display: block; font-weight: 600; }

/* Filter panel */
.filter-panel {
    background: #fff;
    border: 1px solid #e0e4e8;
    border-radius: 8px;
    padding: 14px 16px;
    margin-bottom: 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: flex-end;
}
.filter-panel .pole { display: flex; flex-direction: column; gap: 4px; }
.filter-panel label { font-size: 12px; color: #555; }
.filter-panel select, .filter-panel input[type=text], .filter-panel input[type=date] {
    padding: 6px 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 13px;
}

button, .btn {
    background: #098BB6;
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
}
button:hover, .btn:hover { background: #076e91; text-decoration: none; color: #fff; }
button.sekundarny, .btn.sekundarny { background: #90a4ae; }
button.sekundarny:hover, .btn.sekundarny:hover { background: #78909c; }
button.danger { background: #c0392b; }

/* Tabuľka */
table.data {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border: 1px solid #e0e4e8;
    border-radius: 8px;
    overflow: hidden;
}
table.data th, table.data td {
    padding: 8px 10px;
    border-bottom: 1px solid #eef1f3;
    text-align: left;
    font-size: 13px;
}
table.data th { background: #f0f3f5; font-weight: 600; white-space: nowrap; }
table.data tr:hover { background: #f8fbfc; }
table.data select { padding: 4px 6px; border: 1px solid #ccc; border-radius: 4px; }

.akcie-panel {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-bottom: 12px;
}

.hromadny-panel {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #fff8e1;
    border: 1px solid #ffe082;
    padding: 10px 14px;
    border-radius: 6px;
    margin-bottom: 12px;
}

.strankovanie { margin-top: 16px; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.strankovanie a, .strankovanie span {
    padding: 6px 11px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
    color: #333;
}
.strankovanie a:hover { background: #f0f3f5; text-decoration: none; }
.strankovanie .aktivna { background: #098BB6; color: #fff; border-color: #098BB6; }

.stitok-OK { color: #1a7a42; font-weight: 600; }
.stitok-KO { color: #c0392b; font-weight: 600; }
.stitok-storno { color: #888; font-weight: 600; }
.stitok-nevyhodnotene { color: #b8860b; font-weight: 600; }

.hlaska-ok { background: #e8f7ee; color: #1a7a42; padding: 10px 14px; border-radius: 6px; margin-bottom: 14px; }
.hlaska-chyba { background: #fdecea; color: #a33; padding: 10px 14px; border-radius: 6px; margin-bottom: 14px; }

.editor-mriezka {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 20px;
    align-items: start;
}
.editor-hlavny-stlpec, .editor-bocny-stlpec {
    background: #fff;
    border: 1px solid #e0e4e8;
    border-radius: 8px;
    padding: 18px;
}
@media (max-width: 900px) {
    .editor-mriezka { grid-template-columns: 1fr; }
}

.modal-overlay {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,.45);
    align-items: center; justify-content: center;
    z-index: 1000;
}
.modal-box {
    background: #fff; border-radius: 8px; padding: 24px 28px;
    width: 420px; max-width: 92vw; max-height: 88vh; overflow-y: auto;
    box-shadow: 0 6px 24px rgba(0,0,0,.2);
}
.modal-box h3 { margin-top: 0; }
.modal-pole { margin-bottom: 14px; }
.modal-pole label { display: block; font-size: 12px; color: #555; margin-bottom: 4px; }
.modal-pole input[type=text], .modal-pole textarea {
    width: 100%; padding: 7px; border: 1px solid #ccc; border-radius: 4px; box-sizing: border-box; font-size: 13px;
}
.modal-pole label input[type=checkbox] { margin-right: 6px; }
.modal-akcie { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }

.login-wrapper {
    display: flex; align-items: center; justify-content: center; min-height: 100vh;
}
.login-box {
    background: #fff; padding: 34px 38px; border-radius: 8px;
    box-shadow: 0 2px 14px rgba(0,0,0,.08); width: 320px;
}
.login-box h2 { margin-top: 0; }
.login-box input {
    width: 100%; padding: 9px; margin: 6px 0 16px; border: 1px solid #ccc;
    border-radius: 4px; box-sizing: border-box;
}
.login-box button { width: 100%; padding: 10px; }
