:root {
    --navy: #0b1f3a;
    --navy-soft: #12335c;
    --blue-light: #eaf1f8;
    --gold: #c8a45d;
    --text: #1d2733;
    --muted: #64748b;
    --white: #ffffff;
    --border: #d8e1ec;
    --success: #166534;
    --warning: #92400e;
    --error: #b91c1c;
    --selected: #eaf1f8;
    --selected-border: #c8a45d;
    --shadow: 0 18px 45px rgba(11,31,58,.10);
    --radius: 22px;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top right, rgba(200,164,93,.18), transparent 34%),
        linear-gradient(135deg, #ffffff 0%, #eef4fb 48%, #eaf1f8 100%);
    line-height: 1.55;
    min-height: 100vh;
}

a { color: var(--navy); text-decoration: none; font-weight: 700; }
a:hover { text-decoration: underline; }

.app-header {
    background: rgba(255,255,255,.92);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
}

.app-nav {
    max-width: 1180px;
    margin: 0 auto;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}
.brand strong { font-size: 1.45rem; letter-spacing: .08em; color: var(--navy); }
.brand span { font-size: .78rem; color: var(--muted); letter-spacing: .04em; margin-top: 3px; }

.app-context {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    justify-content: flex-end;
}
.app-context-title {
    color: var(--navy);
    font-weight: 800;
    padding: 6px 12px;
    border-radius: 999px;
    background: var(--blue-light);
    font-size: .9rem;
}
.app-context-link { color: var(--navy); font-weight: 800; font-size: .94rem; }

main { padding: 30px 24px 58px; }

.wrap,
.layout {
    max-width: 1180px;
    margin: 0 auto;
}

.layout {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(320px, .75fr);
    gap: 34px;
    align-items: start;
    padding-top: 42px;
}

.hero-panel,
.login-card,
.info-card,
.status-box,
.message,
.lgp-block,
.card,
.summary-box {
    background: rgba(255,255,255,.96);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.hero-panel { padding: 38px; }
.login-card { padding: 28px; }
.info-card { padding: 24px; margin-top: 20px; box-shadow: 0 12px 30px rgba(11,31,58,.06); }

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--navy);
    font-weight: 800;
    font-size: .84rem;
    letter-spacing: .08em;
    text-transform: uppercase;
    margin-bottom: 18px;
}
.eyebrow::before { content: ""; width: 34px; height: 2px; background: var(--gold); display: inline-block; }

h1 { color: var(--navy); }
.hero-panel h1 {
    font-size: clamp(2.35rem, 5vw, 4.6rem);
    line-height: .98;
    letter-spacing: -.052em;
    margin: 0 0 22px;
}

h2 { color: var(--navy); margin: 0 0 12px; font-size: 1.35rem; }
h3 { color: var(--navy); margin: 0 0 8px; font-size: 1.08rem; }
p { margin: 0 0 16px; }
.lead { font-size: 1.16rem; color: #334155; max-width: 760px; }
.muted { color: var(--muted); }

.reason-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-top: 26px;
}
.reason {
    border: 1px solid var(--border);
    background: #fbfdff;
    border-radius: 18px;
    padding: 18px;
}

.status {
    display: inline-block;
    margin-bottom: 14px;
    padding: 6px 12px;
    border-radius: 999px;
    background: var(--blue-light);
    color: var(--navy);
    font-size: .84rem;
    font-weight: 800;
}

form { margin: 0; }
label { display: block; font-weight: 800; color: var(--navy); margin-bottom: 7px; }
select,
input[type="password"] {
    width: 100%;
    padding: 13px 14px;
    border: 1px solid var(--border);
    border-radius: 14px;
    font: inherit;
    margin-bottom: 16px;
    background: #fbfdff;
    color: var(--text);
}
input[disabled] { background: #f4f7fb; color: #9ca3af; cursor: not-allowed; }

button,
.print-button,
.print-button-link {
    appearance: none;
    border: 1px solid var(--navy);
    background: var(--navy);
    color: #fff !important;
    border-radius: 999px;
    padding: 11px 18px;
    cursor: pointer;
    font: inherit;
    font-weight: 800;
    text-decoration: none !important;
    box-shadow: 0 12px 28px rgba(11,31,58,.20);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
button:hover,
.print-button:hover,
.print-button-link:hover { opacity: .94; text-decoration: none; }
.hint { margin-top: 18px; font-size: .92rem; color: var(--muted); }

.error,
.message.error {
    color: var(--error);
    font-weight: 800;
    background: #fff1f2;
    border-color: #fecdd3;
}
.error {
    margin-bottom: 16px;
    padding: 12px 14px;
    border: 1px solid #fecdd3;
    border-radius: 14px;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 22px;
    margin-bottom: 24px;
    padding: 22px 0;
    border-bottom: 1px solid rgba(216,225,236,.9);
}
.topbar h1 {
    margin: 0 0 8px;
    color: var(--navy);
    font-size: clamp(2rem, 4vw, 3.2rem);
    line-height: 1.05;
    letter-spacing: -.035em;
}
.topbar-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    flex-wrap: wrap;
    color: var(--muted);
}
.meta { color: var(--muted); margin: 0; }

.status-box {
    padding: 20px 22px;
    margin-bottom: 22px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
}
.status-content strong { color: var(--navy); }

.message {
    margin-bottom: 20px;
    padding: 16px 18px;
    font-weight: 700;
    box-shadow: 0 12px 30px rgba(11,31,58,.06);
}
.message.success { background: #e8f7ee; color: var(--success); border-color: #bbebca; }
.message.warning { background: #fffbeb; color: var(--warning); border-color: #fde68a; }

.lgp-block {
    overflow: hidden;
    margin-bottom: 20px;
}
.lgp-head {
    padding: 18px 22px;
    background: linear-gradient(135deg, var(--navy), var(--navy-soft));
    color: var(--white);
    cursor: pointer;
    position: relative;
}
.lgp-head strong { font-size: 1.04rem; }
.lgp-head::after {
    content: "+";
    position: absolute;
    right: 22px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gold);
    font-size: 1.4rem;
    font-weight: 800;
}
.lgp-block.active .lgp-head::after { content: "–"; }
.lgp-content { display: none; background: var(--white); }
.lgp-block.active .lgp-content { display: block; }
.summary .lgp-content, .summary-page .lgp-content { display: block; }

.item {
    padding: 22px;
    border-bottom: 1px solid #edf2f7;
}
.item:last-child { border-bottom: 0; }
.item-id {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 64px;
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--blue-light);
    color: var(--navy);
    font-weight: 800;
    margin-bottom: 10px;
}
.item-text {
    margin: 0 0 8px;
    color: var(--navy);
    font-weight: 800;
    font-size: 1.05rem;
}
.item-desc { margin: 0 0 16px; color: var(--muted); }

.rating-grid,
.summary-metrics {
    display: grid;
    grid-template-columns: repeat(6, minmax(118px, 1fr));
    gap: 10px;
}
.rating-option,
.metric-box {
    border: 1px solid var(--border);
    border-radius: 16px;
    background: #fbfdff;
    padding: 12px 10px;
    min-height: 76px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    transition: background .15s ease, border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.rating-option:hover,
.metric-box:hover { border-color: #b8c7d9; }
.rating-option.selected,
.metric-box.highlight {
    background: var(--selected);
    border-color: var(--selected-border);
    box-shadow: inset 0 0 0 1px var(--selected-border);
}
.rating-option label {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 52px;
    margin: 0;
    cursor: pointer;
    position: relative;
    font-weight: 700;
    color: var(--navy);
}
.rating-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    width: 0;
    height: 0;
}
.rating-label { position: relative; z-index: 1; font-size: .92rem; line-height: 1.25; }
.rating-option.selected label::after {
    content: "✓";
    position: absolute;
    right: 4px;
    bottom: -8px;
    font-size: 1.55rem;
    font-weight: 900;
    color: rgba(11,31,58,.35);
    pointer-events: none;
}
.save-row {
    display: flex;
    justify-content: flex-end;
    min-height: 22px;
    margin-top: 8px;
}
.save-status { font-size: .9rem; color: var(--muted); }
.save-status[data-state="saving"] { color: var(--warning); }
.save-status[data-state="saved"] { color: var(--success); }
.save-status[data-state="error"] { color: var(--error); }
.print-link-wrap { margin-top: 0; }
.summary-box { background: #f8fbff; box-shadow: none; padding: 16px; }
.summary-total { margin-bottom: 12px; font-weight: 800; color: var(--navy); }
.metric-box { min-height: 98px; flex-direction: column; justify-content: space-between; }
.metric-label { font-size: .84rem; color: var(--muted); line-height: 1.2; }
.metric-value { font-size: 1.65rem; font-weight: 900; color: var(--navy); line-height: 1.1; }
.lgp-footer { padding: 20px 22px; border-top: 1px solid var(--border); background: #fbfdff; }
.lgp-footer-title { margin: 0 0 12px; color: var(--navy); font-size: 1rem; }
.card { overflow: hidden; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 14px 16px; border-bottom: 1px solid #edf2f7; text-align: left; vertical-align: middle; }
th { background: var(--blue-light); color: var(--navy); font-size: .95rem; }
tr:last-child td { border-bottom: 0; }
.status-complete { color: var(--success); font-weight: 800; }
.status-open { color: var(--warning); font-weight: 800; }
.actions { margin-top: 20px; }
.actions a { display: inline-flex; align-items: center; color: var(--navy); font-weight: 800; }

.app-footer {
    padding: 28px 24px 32px;
    color: var(--muted);
    border-top: 1px solid var(--border);
    background: rgba(255,255,255,.75);
}
.footer-inner {
    max-width: 1180px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
    font-size: .92rem;
}
.footer-meta {
    margin-top: 12px;
    text-align: center;
    font-size: .9rem;
}
.footer-meta a { color: var(--muted); text-decoration: none; font-weight: 700; }
.footer-meta a:hover { color: var(--navy); }
.footer-meta span { margin: 0 8px; color: var(--muted); }

@media (max-width: 1120px) {
    .rating-grid, .summary-metrics { grid-template-columns: repeat(3, minmax(140px, 1fr)); }
}
@media (max-width: 900px) {
    main { padding: 24px 16px 44px; }
    .layout { grid-template-columns: 1fr; padding-top: 20px; }
    .reason-grid { grid-template-columns: 1fr; }
    .hero-panel { padding: 28px; }
    .app-nav { align-items: flex-start; flex-direction: column; }
    .app-context { justify-content: flex-start; }
}
@media (max-width: 760px) {
    .wrap { padding: 0 0 44px; }
    .topbar, .status-box { flex-direction: column; align-items: stretch; }
    .topbar-actions { justify-content: flex-start; }
    .rating-grid, .summary-metrics { grid-template-columns: repeat(2, minmax(130px, 1fr)); }
    table, thead, tbody, th, td, tr { display: block; }
    thead { display: none; }
    tr { border-bottom: 1px solid #edf2f7; padding: 10px 0; }
    td { border: 0; padding: 6px 16px; }
    td::before { display: inline-block; min-width: 130px; font-weight: 800; color: var(--muted); }
    td:nth-child(1)::before { content: 'Teilnehmer: '; }
    td:nth-child(2)::before { content: 'Antworten: '; }
    td:nth-child(3)::before { content: 'Status: '; }
}
@media (max-width: 520px) {
    .rating-grid, .summary-metrics { grid-template-columns: 1fr; }
    .footer-inner { display: block; text-align: center; }
}
