/* WinTrack — jednoduchý střízlivý vzhled webových reportů (bez frameworku) */

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
    font-size: 15px;
    color: #24292f;
    background: #f6f8fa;
}

/* --- horní lišta --- */

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.5rem 1.25rem;
    background: #24467d;
    color: #fff;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.brand {
    font-size: 1.15rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.mainnav {
    display: flex;
    gap: 0.25rem;
}

.mainnav a {
    color: #dbe4f0;
    text-decoration: none;
    padding: 0.35rem 0.7rem;
    border-radius: 4px;
}

.mainnav a:hover {
    background: #35578e;
    color: #fff;
}

.mainnav a.active {
    background: #fff;
    color: #24467d;
    font-weight: 600;
}

.userbox {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9rem;
}

.userbox form {
    margin: 0;
}

.btn-logout {
    background: transparent;
    border: 1px solid #8aa3c4;
    color: #dbe4f0;
    border-radius: 4px;
    padding: 0.25rem 0.7rem;
    cursor: pointer;
    font: inherit;
    font-size: 0.85rem;
}

.btn-logout:hover {
    background: #35578e;
    color: #fff;
}

/* --- obsah --- */

.content {
    max-width: 1200px;
    margin: 1.5rem auto;
    padding: 0 1.25rem;
}

h1 {
    font-size: 1.4rem;
    margin: 0 0 1rem;
}

.empty {
    color: #6e7781;
    font-style: italic;
}

.error {
    color: #b91c1c;
    background: #fee2e2;
    border: 1px solid #fca5a5;
    border-radius: 4px;
    padding: 0.5rem 0.75rem;
}

/* --- přihlašovací formulář --- */

.login-box {
    max-width: 22rem;
    margin: 4rem auto;
    padding: 1.5rem 2rem 2rem;
    background: #fff;
    border: 1px solid #d0d7de;
    border-radius: 6px;
}

.login-box h1 {
    text-align: center;
}

.login-box label {
    display: block;
    margin: 0.9rem 0 0.25rem;
    font-weight: 600;
    font-size: 0.9rem;
}

.login-box input[type="text"],
.login-box input[type="password"] {
    width: 100%;
    padding: 0.45rem 0.6rem;
    border: 1px solid #d0d7de;
    border-radius: 4px;
    font: inherit;
}

.login-box input:focus {
    outline: none;
    border-color: #24467d;
    box-shadow: 0 0 0 2px rgba(36, 70, 125, 0.2);
}

.login-box button[type="submit"] {
    width: 100%;
    margin-top: 1.25rem;
    padding: 0.5rem;
    background: #24467d;
    color: #fff;
    border: none;
    border-radius: 4px;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.login-box button[type="submit"]:hover {
    background: #35578e;
}

/* --- filtrovací lišta --- */

.filterbar {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 0.75rem;
    margin: 0 0 1.25rem;
    padding: 0.75rem 1rem;
    background: #fff;
    border: 1px solid #d0d7de;
    border-radius: 6px;
}

.filterbar label {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: #57606a;
}

.filterbar input,
.filterbar select {
    padding: 0.3rem 0.45rem;
    border: 1px solid #d0d7de;
    border-radius: 4px;
    font: inherit;
    font-size: 0.9rem;
    font-weight: 400;
    color: #24292f;
    background: #fff;
    min-width: 8rem;
}

.filterbar button[type="submit"] {
    padding: 0.4rem 1rem;
    background: #24467d;
    color: #fff;
    border: none;
    border-radius: 4px;
    font: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
}

.filterbar button[type="submit"]:hover {
    background: #35578e;
}

/* --- tabulky reportů --- */

.table-wrap {
    overflow-x: auto;
    background: #fff;
    border: 1px solid #d0d7de;
    border-radius: 6px;
}

.report-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.report-table th {
    text-align: left;
    padding: 0.5rem 0.75rem;
    background: #f6f8fa;
    border-bottom: 2px solid #d0d7de;
    white-space: nowrap;
}

.report-table td {
    padding: 0.4rem 0.75rem;
    border-bottom: 1px solid #eaeef2;
    vertical-align: top;
}

.report-table tbody tr:hover {
    background: #f6f8fa;
}

.report-table .nowrap {
    white-space: nowrap;
}

.report-table .num {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.report-table .center {
    text-align: center;
}

.report-table .title-cell {
    max-width: 28rem;
    overflow-wrap: anywhere;
}

/* jedoucí interval (closed = false) */
.report-table tr.running td {
    font-style: italic;
    color: #57606a;
}

.running-mark {
    font-size: 0.75rem;
    font-style: normal;
    color: #1a7f37;
    background: #dafbe1;
    border-radius: 4px;
    padding: 0.05rem 0.35rem;
    vertical-align: middle;
}

/* --- patička tabulky a stránkování --- */

.table-footer {
    margin-top: 0.75rem;
    color: #57606a;
    font-size: 0.9rem;
}

.table-footer a {
    color: #24467d;
    text-decoration: none;
    font-weight: 600;
}

.table-footer a:hover {
    text-decoration: underline;
}

.pager-disabled {
    color: #a8b1ba;
}

/* --- souhrny a grafy --- */

.summary {
    margin: 0 0 1rem;
    font-size: 1.05rem;
}

.summary-extra {
    margin-left: 1.25rem;
    color: #57606a;
}

.columns {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
    align-items: flex-start;
    margin-bottom: 1.5rem;
}

.columns .table-wrap {
    flex: 1 1 22rem;
}

.chart-box {
    flex: 2 1 30rem;
    min-width: 0;
    height: 22rem;
    padding: 1rem;
    background: #fff;
    border: 1px solid #d0d7de;
    border-radius: 6px;
    position: relative;
}

h2 {
    font-size: 1.15rem;
    margin: 1.5rem 0 0.75rem;
}

/* pseudo-procesy pod čarou v reportu programů */
.report-table tbody.pseudo-section tr:first-child td {
    border-top: 2px solid #d0d7de;
}

.report-table tbody.pseudo-section td {
    color: #57606a;
    font-style: italic;
}

/* --- graf dne --- */

.chart-box-day {
    flex: none;
    width: 100%;
    height: 26rem;
    margin-bottom: 1.5rem;
}

.day-nav {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.day-arrow {
    text-decoration: none;
    color: #24467d;
    font-size: 0.9rem;
    padding: 0.3rem 0.45rem;
    border: 1px solid #d0d7de;
    border-radius: 4px;
    background: #fff;
}

.day-arrow:hover {
    background: #eef2f7;
}

/* --- přehled po týdnech --- */

.quick-links {
    margin: -0.5rem 0 1rem;
    font-size: 0.9rem;
    color: #57606a;
}

.quick-links a {
    color: #24467d;
    text-decoration: none;
    font-weight: 600;
    margin-left: 0.6rem;
}

.quick-links a:hover {
    text-decoration: underline;
}

.week-table {
    margin-bottom: 1.25rem;
}

.week-range {
    color: #6e7781;
    font-size: 0.8rem;
    margin-left: 0.4rem;
}

.chart-box-wide {
    flex: none;
    width: 100%;
    height: 20rem;
    margin: 0 0 1.5rem;
}
