:root {
    --text: #1d2433;
    --muted: #5b6475;
    --line: #d9dee7;
    --panel: #ffffff;
    --page: #f4f6f9;
    --accent: #1f5fa8;
    --accent-soft: #e6eef8;
    --error: #a3251c;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    color: var(--text);
    background: var(--page);
}

body {
    margin: 0;
}

header.top {
    display: flex;
    gap: 1rem;
    align-items: baseline;
    padding: 0.8rem 1.5rem;
    background: var(--panel);
    border-bottom: 1px solid var(--line);
}

.brand {
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--accent);
}

main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem;
}

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

h1:focus {
    outline: none;
}

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

.panel {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.25rem;
}

.muted {
    color: var(--muted);
}

.files {
    margin: 0.75rem 0;
    padding-left: 1.25rem;
}

.options {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    align-items: center;
    margin: 1rem 0;
}

.options input[type=number] {
    width: 7rem;
    margin-left: 0.5rem;
}

button.primary {
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 0.5rem 1.25rem;
    font-size: 1rem;
    cursor: pointer;
    margin-right: 0.75rem;
}

button.primary:disabled {
    background: #9aa8bb;
    cursor: default;
}

.error {
    color: var(--error);
    background: #fbeceb;
    border-radius: 6px;
    padding: 0.75rem 1rem;
    white-space: pre-wrap;
    font-size: 0.9rem;
}

a.download {
    margin-left: 0.75rem;
    font-weight: 600;
    color: var(--accent);
}

.table-wrap {
    overflow-x: auto;
    max-height: 32rem;
    overflow-y: auto;
}

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

th, td {
    padding: 0.35rem 0.6rem;
    border-bottom: 1px solid var(--line);
    text-align: left;
    white-space: nowrap;
}

th {
    position: sticky;
    top: 0;
    background: var(--panel);
    font-weight: 600;
}

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

table.units tbody tr {
    cursor: pointer;
}

table.units tbody tr:hover {
    background: var(--accent-soft);
}

tr.sum {
    font-weight: 600;
}

tr.selected {
    background: var(--accent-soft);
    outline: 2px solid var(--accent);
    outline-offset: -2px;
}

svg.chart {
    width: 100%;
    max-width: 720px;
    height: auto;
    margin-bottom: 1rem;
}

svg.chart .axis {
    stroke: var(--muted);
}

svg.chart .grid {
    stroke: var(--line);
    stroke-dasharray: 4 4;
}

svg.chart .label {
    fill: var(--muted);
    font-size: 12px;
}

svg.chart .line {
    fill: none;
    stroke: var(--accent);
    stroke-width: 2.5;
}

#blazor-error-ui {
    display: none;
}

.levels {
    display: flex;
    gap: 0.25rem;
    margin: 0.5rem 0 1rem;
    border-bottom: 1px solid var(--line);
}

.levels button {
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    padding: 0.4rem 0.9rem;
    font-size: 0.95rem;
    color: var(--muted);
    cursor: pointer;
}

.levels button.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
    font-weight: 600;
}

.options select {
    margin-left: 0.5rem;
    padding: 0.2rem;
}

td.bar-cell, th.bar-cell {
    width: 40%;
}

.bar {
    height: 0.8rem;
    background: var(--accent);
    border-radius: 2px;
    opacity: 0.75;
}

.bar.negative {
    background: var(--error);
}

/* Účet v hlavičce, přihlášení a správa */

a.brand {
    text-decoration: none;
}

header.top .spacer {
    flex: 1;
}

nav.account {
    display: flex;
    gap: 1rem;
    align-items: baseline;
}

nav.account a {
    color: var(--accent);
    text-decoration: none;
}

nav.account a:hover {
    text-decoration: underline;
}

nav.language {
    display: flex;
    gap: 0.4rem;
    font-size: 0.85rem;
}

nav.language a {
    color: var(--muted);
    text-decoration: none;
    padding: 0.1rem 0.35rem;
    border-radius: 4px;
}

nav.language a.active {
    color: var(--accent);
    background: var(--accent-soft);
    font-weight: 600;
}

nav.account form {
    display: inline;
    margin: 0;
}

button.link {
    background: none;
    border: none;
    padding: 0;
    color: var(--accent);
    font: inherit;
    cursor: pointer;
}

button.link:hover {
    text-decoration: underline;
}

button.link:disabled {
    color: var(--muted);
    cursor: default;
}

.panel.narrow {
    max-width: 26rem;
}

label.field {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    margin-bottom: 0.9rem;
}

label.field input {
    font: inherit;
    padding: 0.45rem 0.6rem;
    border: 1px solid var(--line);
    border-radius: 6px;
}

.panel.narrow .error {
    margin: -0.4rem 0 0.9rem;
    padding: 0.4rem 0.75rem;
}

.notice {
    background: var(--accent-soft);
    border-radius: 6px;
    padding: 0.75rem 1rem;
}

td.actions button + button {
    margin-left: 1rem;
}

footer.bottom {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem 1.5rem;
    font-size: 0.8rem;
}
