:root {
    --bg: #f4f6f8;
    --panel: #ffffff;
    --text: #1f2933;
    --muted: #6b7280;
    --line: #dfe3e8;
    --primary: #2563eb;
    --danger: #b91c1c;
    --ok-bg: #dcfce7;
    --ok-text: #14532d;
    --err-bg: #fee2e2;
    --err-text: #7f1d1d;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

/* --- hlavicka --- */
.topbar {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
    padding: 12px 24px;
    background: #1f2933;
    color: #fff;
}
.brand { font-weight: 700; font-size: 18px; color: #fff; text-decoration: none; }
.topbar nav { display: flex; gap: 16px; }
.topbar nav a { color: #cbd2d9; text-decoration: none; }
.topbar nav a:hover { color: #fff; }
.user-box { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.who { color: #cbd2d9; font-size: 14px; }
.link-btn {
    background: none; border: 0; color: #93c5fd;
    cursor: pointer; font: inherit; padding: 0; text-decoration: underline;
}

main { max-width: 1180px; margin: 24px auto; padding: 0 24px; }
footer { max-width: 1180px; margin: 32px auto; padding: 0 24px; color: var(--muted); font-size: 13px; }

h1 { font-size: 22px; margin: 0 0 16px; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.page-head-actions { display: flex; gap: 10px; align-items: center; }

.summary { margin-top: 20px; }
.summary h2 { font-size: 16px; margin: 0 0 10px; }
.summary-list { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px 18px; font-size: 14px; }
.summary-list li { display: flex; align-items: center; gap: 6px; }

/* --- karty a formulare --- */
.card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 24px;
}
.card-narrow { max-width: 520px; margin: 0 auto; }

label { display: block; margin-bottom: 14px; font-size: 14px; font-weight: 600; }
input, select, textarea {
    width: 100%;
    margin-top: 4px;
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: 6px;
    font: inherit;
    background: #fff;
    color: var(--text);
}
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--primary); outline-offset: 1px; }
.row { display: flex; gap: 16px; }
.row label { flex: 1; }
.form-actions { display: flex; gap: 10px; align-items: center; margin-top: 8px; }
.hint { color: var(--muted); font-weight: 400; font-size: 13px; }

.filters {
    display: flex; gap: 16px; align-items: flex-end; flex-wrap: wrap;
    background: var(--panel); border: 1px solid var(--line);
    border-radius: 8px; padding: 16px; margin: 16px 0;
}
.filters label { margin: 0; }
.filters input, .filters select { width: auto; min-width: 180px; }

/* --- tlacitka --- */
.btn {
    display: inline-block;
    padding: 8px 14px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #fff;
    color: var(--text);
    font: inherit;
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
}
.btn:hover { border-color: var(--muted); }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-primary:hover { background: #1d4ed8; }
.btn-danger { color: var(--danger); border-color: #f0c4c4; }
.btn-danger:hover { background: #fef2f2; }
.btn-ghost { background: transparent; }
.btn-small { padding: 4px 8px; font-size: 13px; }
.inline { display: inline; }

/* --- tabulky --- */
.table-wrap {
    overflow-x: auto;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
}
table { width: 100%; border-collapse: collapse; }
th, td { padding: 9px 12px; text-align: left; border-bottom: 1px solid var(--line); }
th { background: #eef1f4; font-size: 13px; text-transform: uppercase; letter-spacing: .03em; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #f9fafb; }
tr.weekend td { background: #fbfaf5; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.actions { white-space: nowrap; text-align: right; }
.note { color: var(--muted); max-width: 320px; }
.empty { text-align: center; color: var(--muted); padding: 28px; }

/* --- stitky --- */
.badge, .status {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    background: #e5e7eb;
    color: #374151;
}
.badge-edit { background: #dbeafe; color: #1e40af; }
.badge-view { background: #e5e7eb; color: #4b5563; }
.status-prace { background: #dcfce7; color: #14532d; }
.status-home_office { background: #e0f2fe; color: #075985; }
.status-sluzebni { background: #ede9fe; color: #4c1d95; }
.status-dovolena { background: #fef3c7; color: #78350f; }
.status-nemoc,
.status-osetrovne { background: #fee2e2; color: #7f1d1d; }
.status-svatek { background: #f3e8ff; color: #6b21a8; }
.status-lekar { background: #ffedd5; color: #7c2d12; }
.status-nahradni { background: #e0e7ff; color: #3730a3; }
.status-neplacene { background: #f3f4f6; color: #374151; }
.status-skoleni { background: #cffafe; color: #155e75; }
.status-propustka { background: #fce7f3; color: #9d174d; }

/* --- hlasky --- */
.flash { padding: 12px 16px; border-radius: 6px; margin-bottom: 16px; }
.flash ul { margin: 0; padding-left: 20px; }
.flash-ok { background: var(--ok-bg); color: var(--ok-text); }
.flash-error { background: var(--err-bg); color: var(--err-text); }

@media (max-width: 640px) {
    .row { flex-direction: column; gap: 0; }
    .user-box { margin-left: 0; width: 100%; }
}
