:root {
    color-scheme: light;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: #f5f7f8;
    color: #1b252b;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
}

.shell {
    width: min(46rem, calc(100% - 2rem));
    margin: 8vh auto;
    padding: 2rem;
    background: #fff;
    border: 1px solid #dfe5e8;
    border-radius: 1rem;
}

.shell-form {
    width: min(34rem, calc(100% - 2rem));
}

.eyebrow {
    margin: 0 0 .4rem;
    font-size: .85rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}

h1,
h2,
p {
    margin-top: 0;
}

.intro {
    color: #526168;
}

a {
    color: inherit;
}

.form-stack {
    display: grid;
    gap: .65rem;
    margin-top: 1.5rem;
}

.form-stack label {
    margin-top: .45rem;
    font-weight: 700;
}

input {
    width: 100%;
    min-height: 2.8rem;
    padding: .65rem .75rem;
    border: 1px solid #aebbc1;
    border-radius: .55rem;
    background: #fff;
    color: inherit;
    font: inherit;
}

input:focus-visible,
button:focus-visible,
a:focus-visible {
    outline: 3px solid currentColor;
    outline-offset: 2px;
}

button,
.button-link {
    display: inline-block;
    min-height: 2.75rem;
    padding: .7rem 1rem;
    border: 1px solid #1b252b;
    border-radius: .55rem;
    background: #1b252b;
    color: #fff;
    font: inherit;
    font-weight: 700;
    line-height: 1.25;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
}

.form-stack button {
    margin-top: .8rem;
}

.button-secondary {
    background: #fff;
    color: #1b252b;
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    margin: 1.5rem 0;
}

.notice {
    margin: 1rem 0;
    padding: .85rem 1rem;
    border-radius: .55rem;
}

.notice ul {
    margin-bottom: 0;
    padding-left: 1.25rem;
}

.notice-error {
    border: 1px solid #b54b4b;
    background: #fff4f4;
}

.field-help,
.secondary-action,
.status-link {
    color: #526168;
    font-size: .92rem;
}

.field-help {
    margin: -.3rem 0 0;
}

.secondary-action {
    margin: 1.5rem 0 0;
}

.topline {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.panel {
    padding: 1.25rem;
    border: 1px solid #dfe5e8;
    border-radius: .75rem;
}

.account-data {
    display: grid;
    gap: .75rem;
    margin: 1rem 0 1.5rem;
}

.account-data div {
    display: grid;
    grid-template-columns: 7rem 1fr;
    gap: .75rem;
}

.account-data dt {
    font-weight: 700;
}

.account-data dd {
    margin: 0;
    overflow-wrap: anywhere;
}

@media (max-width: 36rem) {
    .shell {
        margin: 1rem auto;
        padding: 1.25rem;
    }

    .topline {
        display: block;
    }

    .topline form {
        margin-top: 1rem;
    }

    .account-data div {
        grid-template-columns: 1fr;
        gap: .2rem;
    }
}

.password-field {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: .45rem;
    align-items: stretch;
}

.password-toggle {
    min-width: 2.8rem;
    padding: .5rem .65rem;
    background: #fff;
    color: #1b252b;
    font-size: 1.1rem;
    line-height: 1;
}

.notice-success {
    border: 1px solid #4d8062;
    background: #f2fbf5;
}

.notice-action {
    margin: .6rem 0 0;
}

/* v0.1.4: Vorgänge */
.shell-wide {
    width: min(58rem, calc(100% - 2rem));
}

textarea,
select {
    width: 100%;
    padding: .65rem .75rem;
    border: 1px solid #aebbc1;
    border-radius: .55rem;
    background: #fff;
    color: inherit;
    font: inherit;
}

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

select {
    min-height: 2.8rem;
}

textarea:focus-visible,
select:focus-visible {
    outline: 3px solid currentColor;
    outline-offset: 2px;
}

.label-optional {
    font-weight: 400;
    color: #66757c;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: .45rem;
    margin: 0 0 1.25rem;
    color: #526168;
    font-size: .92rem;
}

.section-heading,
.case-detail-heading,
.case-card,
.case-card-titleline {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.section-heading h2,
.case-card h3 {
    margin-bottom: .25rem;
}

.section-note,
.case-meta,
.muted {
    color: #66757c;
}

.section-note,
.case-meta {
    margin-bottom: 0;
    font-size: .92rem;
}

.count-badge,
.status-badge {
    display: inline-flex;
    align-items: center;
    min-height: 1.75rem;
    padding: .25rem .55rem;
    border: 1px solid #bdc8cd;
    border-radius: 999px;
    background: #f5f7f8;
    font-size: .8rem;
    font-weight: 700;
    white-space: nowrap;
}

.status-open {
    border-color: #61806b;
    background: #f2fbf5;
}

.status-closed {
    border-color: #70818a;
    background: #f2f5f6;
}

.status-archived {
    border-color: #a5a5a5;
    background: #f4f4f4;
    color: #555;
}

.case-list {
    display: grid;
    gap: .75rem;
    margin-top: 1rem;
}

.case-card {
    padding: 1rem;
    border: 1px solid #dfe5e8;
    border-radius: .65rem;
}

.case-card-main {
    min-width: 0;
    flex: 1;
}

.case-card h3 {
    font-size: 1.05rem;
}

.case-card h3 a {
    overflow-wrap: anywhere;
}

.case-summary {
    margin: .65rem 0;
    color: #34434a;
    overflow-wrap: anywhere;
}

.text-action {
    font-weight: 700;
    white-space: nowrap;
}

.empty-state {
    margin-top: 1rem;
    padding: 1.25rem;
    border: 1px dashed #bdc8cd;
    border-radius: .65rem;
    text-align: center;
}

.empty-state p {
    margin-bottom: 1rem;
}

.compact-empty p {
    margin-bottom: 0;
}

.panel + .panel {
    margin-top: 1rem;
}

.panel-muted,
.panel-placeholder {
    background: #fafbfb;
}

.account-panel .account-data {
    margin-bottom: 0;
}

.panel-footer-link {
    margin: 1rem 0 0;
}

.case-detail-heading {
    margin-bottom: 1rem;
}

.case-detail-heading h1 {
    overflow-wrap: anywhere;
}

.case-data {
    display: grid;
    gap: .75rem;
    margin: 0 0 1.5rem;
}

.case-data div {
    display: grid;
    grid-template-columns: 8rem 1fr;
    gap: .75rem;
}

.case-data dt {
    font-weight: 700;
}

.case-data dd {
    margin: 0;
    overflow-wrap: anywhere;
}

.case-description {
    padding-top: 1.25rem;
    border-top: 1px solid #dfe5e8;
}

.case-description p {
    margin-bottom: 0;
    overflow-wrap: anywhere;
}

.inline-form {
    display: inline;
    margin: 0;
}

.case-actions {
    align-items: stretch;
}

.case-actions .inline-form button {
    height: 100%;
}

@media (max-width: 42rem) {
    .section-heading,
    .case-detail-heading,
    .case-card,
    .case-card-titleline {
        display: block;
    }

    .section-heading .button-link,
    .case-detail-heading .status-badge,
    .case-card-titleline .status-badge,
    .case-card > .text-action {
        margin-top: .75rem;
    }

    .case-data div {
        grid-template-columns: 1fr;
        gap: .2rem;
    }
}
