/* Styly interní administrace: telefon i tablet, světlý i tmavý režim, bez cizích zdrojů. */
:root {
    color-scheme: light dark;
    font-family: system-ui, sans-serif;
    line-height: 1.4;
}

body {
    margin: 0;
}

.bar {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    align-items: center;
    padding: .5rem 1rem;
    border-bottom: 1px solid #8884;
}

.bar nav {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
}

.bar nav a {
    display: inline-flex;
    align-items: center;
    min-height: 2.75rem;
}

.bar form {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    align-items: center;
    margin-left: auto;
}

main {
    padding: 1rem;
    max-width: 60rem;
}

input,
button {
    font: inherit;
    padding: .4rem .6rem;
}

button,
input:not([type="checkbox"]) {
    min-height: 2.75rem;
    box-sizing: border-box;
}

.stack {
    display: flex;
    flex-direction: column;
    gap: .75rem;
    max-width: 24rem;
}

.stack label:not(.choice) {
    display: flex;
    flex-direction: column;
    gap: .25rem;
}

.choice {
    display: flex;
    align-items: center;
    gap: .5rem;
    min-height: 2.75rem;
}

.table-wrap {
    overflow-x: auto;
}

table {
    border-collapse: collapse;
    width: 100%;
}

th,
td {
    text-align: left;
    padding: .35rem .5rem;
    border-bottom: 1px solid #8883;
    vertical-align: top;
    overflow-wrap: anywhere;
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.actions li {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    align-items: center;
}

select,
textarea {
    font: inherit;
    padding: .4rem .6rem;
    box-sizing: border-box;
    max-width: 100%;
}

select {
    min-height: 2.75rem;
}

textarea {
    min-height: 8rem;
    resize: vertical;
}

.stack.wide {
    max-width: 40rem;
}

.inline {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    align-items: end;
}

.inline label {
    display: flex;
    flex-direction: column;
    gap: .25rem;
    flex: 1 1 16rem;
    max-width: 28rem;
}

.link {
    display: inline-flex;
    align-items: center;
    min-height: 2.75rem;
}

dl {
    display: grid;
    grid-template-columns: minmax(8rem, max-content) 1fr;
    gap: .35rem 1rem;
}

dt {
    font-weight: 600;
}

dd {
    margin: 0;
    overflow-wrap: anywhere;
}

/* Na úzkém telefonu jdou popisek a hodnota pod sebe. */
@media (max-width: 30rem) {
    dl {
        grid-template-columns: 1fr;
    }
}

/* Text od uživatele: zachová řádky, dlouhé slovo nerozbije rozvržení. */
.user-text {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.photo {
    max-width: min(100%, 24rem);
    height: auto;
}

.muted {
    opacity: .7;
    overflow-wrap: anywhere;
}

.error {
    color: light-dark(#a93226, #f1948a);
}

.ok {
    color: light-dark(#196f3d, #7dcea0);
}
