:root {
    --paper: #f4ede0;
    --paper-strong: #eadbc2;
    --ink: #18242d;
    --ink-soft: #52606a;
    --line: rgba(24, 36, 45, 0.12);
    --accent: #d36427;
    --accent-deep: #9b4315;
    --accent-soft: rgba(211, 100, 39, 0.14);
    --emerald: #2d7f5e;
    --amber: #c07d18;
    --red: #ab3a31;
    --white: #fffdf8;
    --shadow: 0 26px 60px rgba(18, 33, 43, 0.12);
    --radius-xl: 30px;
    --radius-lg: 22px;
    --radius-md: 16px;
    --radius-sm: 12px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--ink);
    background:
        radial-gradient(circle at top left, rgba(211, 100, 39, 0.18), transparent 34%),
        radial-gradient(circle at top right, rgba(45, 127, 94, 0.14), transparent 28%),
        linear-gradient(180deg, #f8f1e6 0%, #efe5d5 100%);
    font-family: "Avenir Next", "Trebuchet MS", "Gill Sans", sans-serif;
    line-height: 1.55;
}

a {
    color: var(--accent-deep);
    text-decoration-thickness: 1.5px;
    text-underline-offset: 3px;
}

a:hover {
    color: var(--accent);
}

p,
ul,
ol {
    margin-top: 0;
}

.site-shell {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
    padding: 24px 0 48px;
}

.nav-shell {
    position: sticky;
    top: 14px;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 18px 22px;
    border: 1px solid rgba(255, 253, 248, 0.44);
    border-radius: 999px;
    background: rgba(255, 253, 248, 0.84);
    backdrop-filter: blur(18px);
    box-shadow: 0 14px 36px rgba(18, 33, 43, 0.08);
}

.brand {
    font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
    font-size: clamp(1.15rem, 1.1rem + 0.6vw, 1.75rem);
    font-weight: 700;
    letter-spacing: 0.01em;
}

.top-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 14px 18px;
}

.top-nav a {
    color: var(--ink);
    font-size: 0.98rem;
    font-weight: 600;
    text-decoration: none;
}

.top-nav a:hover {
    color: var(--accent-deep);
}

.main-shell {
    display: grid;
    gap: 28px;
    margin-top: 28px;
}

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1.8fr) minmax(280px, 0.9fr);
    gap: 24px;
    align-items: stretch;
}

.hero-copy,
.hero-card,
.section,
.notice {
    border: 1px solid rgba(255, 253, 248, 0.5);
    background: rgba(255, 253, 248, 0.88);
    box-shadow: var(--shadow);
}

.hero-copy {
    position: relative;
    overflow: hidden;
    padding: 34px;
    border-radius: var(--radius-xl);
}

.hero-copy::after {
    content: "";
    position: absolute;
    right: -36px;
    bottom: -36px;
    width: 190px;
    height: 190px;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(211, 100, 39, 0.22), transparent 70%);
}

.hero-card {
    padding: 28px;
    border-radius: var(--radius-xl);
    background:
        linear-gradient(180deg, rgba(24, 36, 45, 0.96), rgba(33, 47, 58, 0.96)),
        var(--white);
    color: #fef7eb;
}

.hero h1,
.section-head h2 {
    margin: 0 0 16px;
    font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
    font-size: clamp(2.1rem, 1.8rem + 1.5vw, 4rem);
    line-height: 1.02;
    letter-spacing: -0.02em;
}

.section-head h2 {
    font-size: clamp(1.6rem, 1.2rem + 1vw, 2.35rem);
}

.kicker {
    margin-bottom: 16px;
    color: var(--accent-deep);
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.lead {
    max-width: 72ch;
    font-size: 1.08rem;
    color: var(--ink-soft);
}

.hero-list,
.hero-card ol {
    padding-left: 20px;
    margin-bottom: 0;
}

.section {
    padding: 30px;
    border-radius: var(--radius-xl);
}

.section-head {
    margin-bottom: 22px;
}

.notice {
    padding: 16px 18px;
    border-radius: var(--radius-md);
}

.notice-success {
    border-color: rgba(45, 127, 94, 0.3);
    background: rgba(245, 255, 250, 0.9);
}

.notice-error {
    border-color: rgba(171, 58, 49, 0.26);
    background: rgba(255, 245, 244, 0.92);
}

.notice-info {
    border-color: rgba(24, 36, 45, 0.18);
    background: rgba(250, 248, 244, 0.94);
}

.preview-grid,
.account-grid,
.auth-grid,
.form-grid,
.inline-2,
.inline-3 {
    display: grid;
    gap: 18px;
}

.preview-grid,
.account-grid,
.auth-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-grid {
    grid-template-columns: 1.1fr 0.9fr;
}

.inline-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.inline-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.card-block,
.preview-card,
.auth-card,
.subcard {
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: linear-gradient(180deg, rgba(255, 253, 248, 0.98), rgba(248, 242, 232, 0.96));
}

.block-title {
    margin-bottom: 16px;
    font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
    font-size: 1.45rem;
    font-weight: 700;
}

label,
fieldset {
    display: block;
}

label {
    margin-bottom: 12px;
    color: var(--ink);
    font-size: 0.95rem;
    font-weight: 700;
}

label input,
label select,
label textarea {
    width: 100%;
    margin-top: 8px;
}

input,
select,
textarea,
button {
    font: inherit;
}

input,
select,
textarea {
    padding: 14px 15px;
    border: 1px solid rgba(24, 36, 45, 0.15);
    border-radius: var(--radius-sm);
    background: rgba(255, 253, 248, 0.94);
    color: var(--ink);
    transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: rgba(211, 100, 39, 0.46);
    box-shadow: 0 0 0 4px rgba(211, 100, 39, 0.1);
}

fieldset {
    margin: 0 0 14px;
    padding: 14px 16px 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
}

legend {
    padding: 0 8px;
    font-weight: 800;
}

.ticket-types,
.action-stack {
    display: grid;
    gap: 10px;
}

.radio,
.check {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
}

.radio input,
.check input {
    width: auto;
    margin: 0;
}

.ticket-panels {
    display: grid;
    gap: 14px;
    margin-bottom: 16px;
}

.ticket-panel {
    transition: opacity 0.18s ease, transform 0.18s ease, margin 0.18s ease;
}

.ticket-panel.is-hidden {
    display: none;
}

.btn,
.link-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 50px;
    padding: 0 20px;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(180deg, var(--accent), var(--accent-deep));
    color: #fff9f0;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 16px 28px rgba(155, 67, 21, 0.22);
    transition: transform 0.16s ease, box-shadow 0.16s ease, filter 0.16s ease;
}

.btn:hover,
.link-button:hover {
    transform: translateY(-1px);
    filter: brightness(1.03);
    box-shadow: 0 20px 34px rgba(155, 67, 21, 0.28);
}

.btn-muted {
    background: linear-gradient(180deg, #3d5562, #243844);
    box-shadow: 0 16px 28px rgba(24, 36, 45, 0.18);
}

.btn-danger {
    background: linear-gradient(180deg, #ca5046, #ab3a31);
    box-shadow: 0 16px 28px rgba(171, 58, 49, 0.2);
}

.form-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 8px;
}

.form-hint {
    max-width: 56ch;
    margin: 0;
    color: var(--ink-soft);
}

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

.table th,
.table td {
    padding: 13px 12px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
}

.table th {
    font-size: 0.8rem;
    color: var(--ink-soft);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.inline-form {
    display: inline;
}

.link-button {
    min-height: auto;
    padding: 0;
    background: transparent;
    color: var(--accent-deep);
    box-shadow: none;
}

.link-button:hover {
    transform: none;
    box-shadow: none;
}

.inline-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 14px;
    margin-bottom: 18px;
}

.inline-links span {
    color: var(--ink-soft);
    font-weight: 700;
}

.status {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.status-preview,
.status-approved {
    background: rgba(192, 125, 24, 0.15);
    color: var(--amber);
}

.status-sent,
.status-letter_ready {
    background: rgba(45, 127, 94, 0.16);
    color: var(--emerald);
}

.status-rejected,
.status-error {
    background: rgba(171, 58, 49, 0.12);
    color: var(--red);
}

.impressum p:last-child {
    margin-bottom: 0;
}

.footer {
    padding: 14px 4px 0;
    font-size: 0.92rem;
    color: var(--ink-soft);
}

.footer a {
    color: inherit;
    text-decoration: none;
}

.footer a:hover {
    color: var(--accent-deep);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    align-items: center;
    padding: 20px 24px;
    border: 1px solid rgba(255, 253, 248, 0.5);
    border-radius: var(--radius-xl);
    background: rgba(255, 253, 248, 0.82);
    box-shadow: 0 18px 42px rgba(18, 33, 43, 0.08);
}

.footer-block {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 10px;
    align-items: center;
}

.footer-block strong {
    display: block;
    width: 100%;
    color: var(--ink);
}

.footer-block-center {
    flex-direction: column;
    justify-content: center;
    text-align: center;
}

.footer-block-right {
    justify-content: flex-end;
    text-align: right;
}

.footer-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 4px;
}

.footer-badge img {
    width: 150px;
    height: auto;
    border: 0;
    border-radius: 12px;
}

@media (max-width: 1080px) {
    .hero,
    .form-grid,
    .preview-grid,
    .account-grid,
    .auth-grid,
    .footer-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .site-shell {
        width: min(100% - 20px, 1240px);
        padding-top: 14px;
    }

    .nav-shell {
        position: static;
        padding: 16px;
        border-radius: 24px;
    }

    .top-nav {
        justify-content: flex-start;
    }

    .hero-copy,
    .section,
    .hero-card {
        padding: 22px;
    }

    .inline-2,
    .inline-3 {
        grid-template-columns: 1fr;
    }

    .table,
    .table thead,
    .table tbody,
    .table tr,
    .table th,
    .table td {
        display: block;
        width: 100%;
    }

    .table thead {
        display: none;
    }

    .table tr {
        padding: 10px 0;
    }

    .table td {
        padding: 10px 0;
    }

    .footer-grid {
        padding: 18px;
    }

    .footer-block,
    .footer-block-right,
    .footer-block-center {
        justify-content: flex-start;
        text-align: left;
    }
}
