/* Rheinschafe Go-Live-Checkliste – Stylesheet */

:root {
    --rs-dark: #0A2833;
    --rs-teal: #69C0BB;
    --rs-lime: #B1C800;
    --rs-red:  #E53517;
    --rs-body: #3F3F3F;
    --rs-grey: #8B8B8B;
    --rs-bg:   #F4F6F7;
    --rs-row:  #FAFBFC;
    --rs-border: #E2E5E8;
    --rs-white: #ffffff;
    --rs-shadow: 0 6px 24px rgba(10, 40, 51, 0.08);
    --rs-radius: 10px;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--rs-bg);
    color: var(--rs-body);
    font-family: "Open Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
    font-size: 16px;
    line-height: 1.55;
}

a { color: var(--rs-dark); }

.wrap {
    max-width: 1040px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ---------- Header / Footer ---------- */
.site-header {
    background: var(--rs-white);
    border-bottom: 3px solid var(--rs-lime);
    box-shadow: 0 1px 0 rgba(0,0,0,.02);
}
.site-header .wrap {
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 80px;
    gap: 16px;
    flex-wrap: wrap;
}
.brand {
    display: flex;
    align-items: center;
    text-decoration: none;
}
.brand-logo {
    max-height: 40px;
    width: auto;
    display: block;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.user-info {
    font-size: 14px;
    color: var(--rs-grey);
    display: flex;
    align-items: center;
    gap: 10px;
}
.user-info strong {
    color: var(--rs-dark);
}
.link-btn {
    background: none;
    border: none;
    color: var(--rs-teal);
    cursor: pointer;
    font: inherit;
    text-decoration: underline;
    padding: 0;
    font-size: 14px;
}
.link-btn:hover { color: var(--rs-dark); }

.site-footer {
    border-top: 3px solid var(--rs-teal);
    background: var(--rs-white);
    margin-top: 48px;
    padding: 20px 0;
    color: var(--rs-grey);
    font-size: 13px;
}
.site-footer .wrap {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

/* ---------- Main ---------- */
.page {
    max-width: 1040px;
    margin: 40px auto;
    padding: 0 24px;
}

.intro h1 {
    font-size: 32px;
    color: var(--rs-dark);
    margin: 0 0 8px;
    font-weight: 800;
    letter-spacing: -0.5px;
}
.intro .lead {
    font-size: 17px;
    color: var(--rs-body);
    margin: 0 0 24px;
    max-width: 800px;
    font-weight: 300;
}
.project-heading {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}
.project-heading h1 { margin: 0; }
.pill {
    display: inline-block;
    background: var(--rs-dark);
    color: var(--rs-lime);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 1px;
    padding: 4px 10px;
    border-radius: 100px;
    text-transform: uppercase;
}

.progress {
    background: var(--rs-white);
    border: 1px solid var(--rs-border);
    border-radius: var(--rs-radius);
    padding: 16px 20px;
    margin-bottom: 32px;
}
.progress-bar {
    height: 10px;
    background: var(--rs-bg);
    border-radius: 100px;
    overflow: hidden;
    margin-bottom: 10px;
}
#progressFill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--rs-teal), var(--rs-lime));
    transition: width .35s ease;
}
.progress-text {
    font-size: 14px;
    color: var(--rs-grey);
}

/* ---------- Projekt-Liste ---------- */
.projects { display: block; }
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    margin-bottom: 40px;
}
.project-card {
    background: var(--rs-white);
    border: 1px solid var(--rs-border);
    border-radius: var(--rs-radius);
    box-shadow: var(--rs-shadow);
    padding: 18px 20px;
    text-decoration: none;
    color: var(--rs-dark);
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: all .15s ease;
}
.project-card:hover {
    transform: translateY(-2px);
    border-color: var(--rs-teal);
}
.project-card .name {
    font-size: 17px;
    font-weight: 800;
    color: var(--rs-dark);
}
.project-card .meta {
    font-size: 12.5px;
    color: var(--rs-grey);
}
.project-card .pbar {
    height: 6px;
    background: var(--rs-bg);
    border-radius: 100px;
    overflow: hidden;
    margin-top: 4px;
}
.project-card .pbar span {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, var(--rs-teal), var(--rs-lime));
    border-radius: 100px;
}
.project-empty {
    background: var(--rs-white);
    border: 2px dashed var(--rs-border);
    border-radius: var(--rs-radius);
    padding: 28px;
    text-align: center;
    color: var(--rs-grey);
    font-size: 14px;
}

.project-create,
.admin-zone {
    background: var(--rs-white);
    border: 1px solid var(--rs-border);
    border-radius: var(--rs-radius);
    padding: 20px 24px;
    margin-bottom: 32px;
}
.project-create h2,
.admin-zone h2 {
    margin: 0 0 4px;
    color: var(--rs-dark);
    font-size: 18px;
    font-weight: 800;
}
.project-create p.hint,
.admin-zone p.muted {
    color: var(--rs-grey);
    font-size: 13.5px;
    margin: 4px 0 12px;
}

.form-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: flex-end;
}
.form-row .field { display: flex; flex-direction: column; gap: 4px; min-width: 200px; }
.form-row .field-grow { flex: 1 1 220px; }
.form-row label { font-size: 13px; font-weight: 600; color: var(--rs-dark); }
.form-row input,
.form-row select,
.form-row textarea {
    padding: 9px 12px;
    font: inherit;
    border: 1px solid var(--rs-border);
    border-radius: 8px;
    color: var(--rs-dark);
    background: var(--rs-white);
    outline: none;
    min-height: 40px;
}
.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
    border-color: var(--rs-teal);
    box-shadow: 0 0 0 3px rgba(105, 192, 187, .25);
}

/* ---------- Checklist ---------- */
.section { margin-bottom: 40px; }
.section-header {
    border-bottom: 3px solid var(--rs-lime);
    padding-bottom: 10px;
    margin-bottom: 16px;
}
.section-code {
    display: inline-block;
    background: var(--rs-dark);
    color: var(--rs-lime);
    font-weight: 800;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 14px;
    letter-spacing: 1px;
    margin-right: 10px;
}
.section-title {
    color: var(--rs-dark);
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.3px;
}

.group {
    background: var(--rs-white);
    border: 1px solid var(--rs-border);
    border-radius: var(--rs-radius);
    box-shadow: var(--rs-shadow);
    margin-bottom: 20px;
    overflow: hidden;
}
.group-header {
    padding: 14px 20px;
    background: var(--rs-white);
    border-bottom: 1px solid var(--rs-border);
    display: flex;
    align-items: center;
    gap: 10px;
}
.group-number {
    display: inline-grid;
    place-items: center;
    min-width: 28px;
    height: 28px;
    padding: 0 8px;
    background: var(--rs-teal);
    color: var(--rs-white);
    font-weight: 800;
    font-size: 13px;
    border-radius: 6px;
}
.group-title {
    color: var(--rs-dark);
    font-weight: 800;
    font-size: 17px;
    flex: 1;
}

.items { list-style: none; margin: 0; padding: 0; }

.item {
    display: grid;
    grid-template-columns: 48px 1fr auto;
    gap: 10px;
    align-items: flex-start;
    padding: 16px 20px;
    border-top: 1px solid var(--rs-border);
    position: relative;
}
.item:first-child { border-top: 0; }
.item:nth-child(even) { background: var(--rs-row); }
.item.is-checked .item-title { color: var(--rs-grey); text-decoration: line-through; text-decoration-color: rgba(10,40,51,.3); }

.checkbox {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    border: 2px solid var(--rs-teal);
    background: var(--rs-white);
    cursor: pointer;
    display: grid;
    place-items: center;
    transition: all .15s ease;
    flex-shrink: 0;
    padding: 0;
}
.checkbox:hover { border-color: var(--rs-dark); }
.checkbox::after {
    content: "";
    width: 14px;
    height: 8px;
    border-left: 3px solid var(--rs-white);
    border-bottom: 3px solid var(--rs-white);
    transform: rotate(-45deg) translate(2px, -2px);
    opacity: 0;
}
.checkbox[aria-checked="true"] {
    background: var(--rs-teal);
    border-color: var(--rs-teal);
}
.checkbox[aria-checked="true"]::after { opacity: 1; }

.item-body { min-width: 0; }
.item-title {
    color: var(--rs-dark);
    font-weight: 600;
    font-size: 15px;
    line-height: 1.45;
    margin-bottom: 2px;
}
.item-note {
    color: var(--rs-grey);
    font-size: 13.5px;
    font-weight: 300;
    line-height: 1.5;
}
.item-meta {
    margin-top: 6px;
    font-size: 12.5px;
    color: var(--rs-teal);
}
.item-meta strong { color: var(--rs-dark); }

.item-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
}

.add-row {
    padding: 12px 20px;
    background: var(--rs-row);
    border-top: 1px dashed var(--rs-border);
    text-align: right;
}

.btn {
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    padding: 7px 14px;
    border-radius: 6px;
    border: 1px solid transparent;
    cursor: pointer;
    white-space: nowrap;
    transition: all .15s ease;
}
.btn-primary {
    background: var(--rs-dark);
    color: var(--rs-white);
    border-color: var(--rs-dark);
}
.btn-primary:hover { background: #143A47; border-color: #143A47; }
.btn-ghost {
    background: transparent;
    color: var(--rs-dark);
    border-color: var(--rs-border);
}
.btn-ghost:hover { background: var(--rs-bg); }
.btn-danger {
    background: var(--rs-white);
    color: var(--rs-red);
    border-color: var(--rs-border);
    margin-right: auto;
}
.btn-danger:hover {
    background: var(--rs-red);
    color: var(--rs-white);
    border-color: var(--rs-red);
}
.btn-sm { font-size: 12px; padding: 5px 10px; }
.btn-add {
    background: var(--rs-white);
    color: var(--rs-teal);
    border: 1px dashed var(--rs-teal);
}
.btn-add:hover { background: var(--rs-teal); color: var(--rs-white); }

.btn-comment {
    background: var(--rs-white);
    color: var(--rs-dark);
    border-color: var(--rs-border);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.btn-comment:hover { border-color: var(--rs-teal); color: var(--rs-teal); }
.btn-comment .count {
    background: var(--rs-teal);
    color: var(--rs-white);
    border-radius: 100px;
    min-width: 20px;
    height: 18px;
    padding: 0 6px;
    font-size: 11px;
    font-weight: 800;
    display: inline-grid;
    place-items: center;
}
.btn-comment.no-comments .count { display: none; }

.btn-edit {
    background: transparent;
    color: var(--rs-grey);
    border: 1px solid transparent;
    font-size: 12px;
    padding: 4px 8px;
}
.btn-edit:hover { color: var(--rs-dark); border-color: var(--rs-border); }

.group-actions {
    display: flex;
    gap: 6px;
}

/* Kommentar-Liste */
.comments {
    grid-column: 2 / -1;
    margin-top: 12px;
    padding: 12px 16px;
    background: var(--rs-bg);
    border-radius: 8px;
    border-left: 3px solid var(--rs-teal);
}
.comment {
    padding: 8px 0;
    border-top: 1px solid var(--rs-border);
    font-size: 13.5px;
}
.comment:first-child { border-top: 0; padding-top: 0; }
.comment-head {
    font-size: 12px;
    color: var(--rs-grey);
    margin-bottom: 4px;
}
.comment-head strong { color: var(--rs-dark); }
.comment-body {
    color: var(--rs-body);
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

/* ---------- Modal ---------- */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(10, 40, 51, 0.55);
    backdrop-filter: blur(2px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 100;
    padding: 24px;
}
.modal.is-open { display: flex; }
.modal-box {
    background: var(--rs-white);
    border-radius: 12px;
    padding: 28px 32px;
    max-width: 520px;
    width: 100%;
    box-shadow: 0 24px 60px rgba(10,40,51,.25);
}
.modal-box h2 {
    color: var(--rs-dark);
    margin: 0 0 12px;
    font-weight: 800;
    font-size: 22px;
}
.modal-box p { margin: 0 0 16px; color: var(--rs-body); }
.modal-box label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--rs-dark);
    margin: 10px 0 6px;
}
.modal-box input,
.modal-box textarea,
.modal-box select {
    width: 100%;
    padding: 10px 12px;
    font: inherit;
    border: 1px solid var(--rs-border);
    border-radius: 8px;
    color: var(--rs-dark);
    outline: none;
    background: var(--rs-white);
}
.modal-box input:focus,
.modal-box textarea:focus,
.modal-box select:focus {
    border-color: var(--rs-teal);
    box-shadow: 0 0 0 3px rgba(105, 192, 187, .25);
}
.modal-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    margin-top: 20px;
    flex-wrap: wrap;
}
.muted { color: var(--rs-grey); font-size: 13.5px; }
.req { color: var(--rs-red); }

.update-status {
    font-size: 12px;
    color: var(--rs-grey);
}

/* ---------- Responsive ---------- */
@media (max-width: 720px) {
    .item { grid-template-columns: 36px 1fr; padding: 14px; }
    .item-actions { grid-column: 1 / -1; flex-direction: row; justify-content: flex-end; margin-top: 4px; }
    .comments { grid-column: 1 / -1; }
    .intro h1 { font-size: 26px; }
    .site-header .wrap { min-height: 64px; }
    .page { margin: 24px auto; }
    .form-row { flex-direction: column; align-items: stretch; }
    .form-row .btn { width: 100%; }
}
