*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: system-ui, sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    color: #1a1a1a;
    background: #f5f5f5;
}

.dev-banner {
    background: #b91c1c;
    color: #fff;
    text-align: center;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 0.25rem;
}

main {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
}

h1 {
    margin-bottom: 2rem;
}

section {
    margin-bottom: 1.5rem;
}

/* Header & nav */
.site-header {
    background: #fff;
    border-bottom: 3px solid #00A651;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    height: 64px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.site-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #00A651;
    text-decoration: none;
    letter-spacing: -0.01em;
}

.site-title:hover {
    color: #008a44;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.site-nav a {
    color: #333;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
}

.site-nav a:hover {
    color: #00A651;
}

.nav-username {
    font-weight: 500;
    font-size: 0.95rem;
    color: #333;
}

.nav-badge {
    font-size: 0.7rem;
    vertical-align: super;
}

.nav-logout-form {
    margin: 0;
}

.nav-logout-form button {
    padding: 0.35rem 0.9rem;
    font-size: 0.9rem;
    cursor: pointer;
    border: 1px solid #ccc;
    border-radius: 4px;
    background: #fff;
    color: #333;
    font-weight: 500;
}

.nav-logout-form button:hover {
    border-color: #00A651;
    color: #00A651;
    background: #fff;
}

/* Generic buttons */
button {
    padding: 0.4rem 1rem;
    font-size: 0.95rem;
    cursor: pointer;
    border: 1px solid #555;
    border-radius: 4px;
    background: #fff;
}

button:hover {
    background: #eee;
}

/* Auth pages */
.auth-page {
    min-height: calc(100vh - 64px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.auth-card {
    background: #fff;
    border: 1px solid #ddd;
    border-top: 3px solid #00A651;
    border-radius: 4px;
    padding: 2rem;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.auth-card h1 {
    margin-bottom: 1.5rem;
    font-size: 1.4rem;
    color: #1a1a1a;
}

/* Form elements */
.field {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    margin-bottom: 1.2rem;
}

.toggle-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.95rem;
}

.field label {
    font-size: 0.9rem;
    font-weight: 600;
}

.field input,
.field select {
    padding: 0.5rem 0.75rem;
    font-size: 1rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    width: 100%;
    font-family: inherit;
    background: #fff;
}

.field input:focus {
    outline: 2px solid #00A651;
    outline-offset: 1px;
    border-color: transparent;
}

.field-hint {
    font-size: 0.8rem;
    color: #666;
}

.optional {
    font-weight: 400;
    color: #888;
    font-size: 0.85rem;
}

.btn-primary {
    width: 100%;
    padding: 0.6rem 1rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    border-radius: 4px;
    background: #00A651;
    color: #fff;
}

.btn-primary:hover {
    background: #008a44;
}

.form-error {
    background: #fef2f2;
    border: 1px solid #fca5a5;
    color: #b91c1c;
    border-radius: 4px;
    padding: 0.6rem 0.75rem;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.form-info {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1e40af;
    border-radius: 4px;
    padding: 0.6rem 0.75rem;
    margin-bottom: 1rem;
}

.form-hint {
    color: #555;
    font-size: 0.95rem;
    margin-bottom: 1.2rem;
}

.form-success {
    background: #f0fdf4;
    border: 1px solid #86efac;
    color: #166534;
    border-radius: 4px;
    padding: 0.6rem 0.75rem;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.field-password {
    position: relative;
}

.field-password input {
    padding-right: 5rem;
}

.btn-show-password {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    padding: 0.2rem 0.5rem;
    font-size: 0.8rem;
    font-weight: 500;
    color: #00A651;
    background: none;
    border: none;
    cursor: pointer;
}

.btn-show-password:hover {
    background: none;
    text-decoration: underline;
}

.auth-footer {
    margin-top: 1.25rem;
    font-size: 0.88rem;
    color: #666;
    text-align: center;
}

.auth-footer a {
    color: #00A651;
    text-decoration: none;
    font-weight: 500;
}

.auth-footer a:hover {
    text-decoration: underline;
}

/* ── Badge grid ─────────────────────────────────────────────────────────── */

.section-header {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 1rem;
    padding-bottom: 0.4rem;
    border-bottom: 2px solid #00A651;
}

.badge-group-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.6rem;
}

.badge-group-title a {
    color: #1a1a1a;
    text-decoration: none;
}

.badge-group-title a:hover {
    color: #00A651;
}

.badge-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.badge-card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 1.25rem;
    text-decoration: none;
    color: inherit;
    display: block;
    transition: box-shadow 0.15s, border-color 0.15s;
}

.badge-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    border-color: #00A651;
}

.badge-card-image {
    width: 100%;
    height: auto;
    object-fit: contain;
    border-radius: 3px;
    margin-bottom: 0.75rem;
    display: block;
}

.badge-card-level {
    font-size: 0.82rem;
    font-weight: 600;
    color: #555;
    margin-bottom: 0.75rem;
    margin-top: -0.5rem;
    text-align: center;
}

.badge-card .badge-category {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #00A651;
    margin-bottom: 0.4rem;
}

.badge-card h2 {
    font-size: 1rem;
    margin-bottom: 0.9rem;
}

.progress-bar-wrap {
    background: #e5e7eb;
    border-radius: 999px;
    height: 7px;
    overflow: hidden;
    margin-bottom: 0.3rem;
}

.progress-bar-fill {
    background: #00A651;
    height: 100%;
    border-radius: 999px;
}

.progress-label {
    font-size: 0.78rem;
    color: #666;
    text-align: center;
}

/* ── Badge detail ────────────────────────────────────────────────────────── */

.breadcrumb {
    font-size: 0.85rem;
    color: #888;
    margin-bottom: 1.25rem;
}

.breadcrumb a {
    color: #00A651;
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.badge-header {
    margin-bottom: 2rem;
}

.badge-header h1 {
    font-size: 1.7rem;
    margin-bottom: 0.25rem;
}

.badge-introduction {
    color: #444;
    line-height: 1.7;
    white-space: pre-line;
    border-left: 3px solid #00A651;
    padding-left: 1rem;
    margin-top: 1rem;
    font-size: 0.95rem;
}

.badge-afterword {
    color: #555;
    font-size: 0.875rem;
    line-height: 1.7;
    padding: 1rem 1.25rem;
    background: #f9fafb;
    border-radius: 4px;
    margin-top: 2rem;
    white-space: pre-line;
}

/* ── Badge overview grid (3 niveaus × 5 eisen) ───────────────────────────── */

.badge-overview-grid {
    display: grid;
    grid-template-columns: 160px repeat(3, 1fr);
    gap: 0.5rem;
    margin-bottom: 2rem;
    align-items: stretch;
}

.niveau-col-header {
    text-align: center;
    padding: 0.5rem 0.25rem 0.75rem;
}

.niveau-header-image {
    max-width: 100px;
    max-height: 100px;
    object-fit: contain;
    border-radius: 3px;
    margin: 0 auto 0.4rem;
    display: block;
}

.niveau-col-title {
    font-weight: 700;
    font-size: 0.95rem;
    color: #1a1a1a;
}

.eis-row-header {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    padding: 0.75rem 0.5rem;
    border-right: 2px solid #e5e7eb;
}

.eis-row-number {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #00A651;
}

.eis-row-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: #1a1a1a;
}

.eis-row-progress {
    font-size: 0.75rem;
    color: #888;
    margin-top: 0.2rem;
}

/* ── Levels ──────────────────────────────────────────────────────────────── */

.badge-levels {
    margin-bottom: 1.5rem;
}

.level-section {
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    margin-bottom: 0.75rem;
    overflow: hidden;
}

.level-header {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.9rem 1.1rem;
    background: #f9fafb;
    border: none;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95rem;
    text-align: left;
    color: #1a1a1a;
}

.level-header:hover {
    background: #f0fdf4;
}

.level-stats {
    margin-left: auto;
    font-size: 0.8rem;
    font-weight: 500;
    color: #666;
}

.level-steps {
    padding: 0.5rem;
}

/* ── Step cards ──────────────────────────────────────────────────────────── */

.step-card {
    border: 1px solid #e5e7eb;
    border-left: 3px solid #e5e7eb;
    border-radius: 4px;
    padding: 0.9rem 1rem;
    margin-bottom: 0.4rem;
    background: #fff;
    display: flex;
    flex-direction: column;
}

.step-state {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.step-card.status-open       { border-left-color: #f59e0b; }
.step-card.status-pending_signoff { border-left-color: #3b82f6; }
.step-card.status-completed  { border-left-color: #00A651; background: #f0fdf4; }

.step-header {
    display: flex;
    gap: 0.7rem;
    align-items: flex-start;
    margin-bottom: 0.6rem;
}

.step-number {
    font-size: 0.72rem;
    font-weight: 700;
    color: #fff;
    background: #ccc;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 0.2rem;
}

.status-open            .step-number { background: #f59e0b; }
.status-pending_signoff .step-number { background: #3b82f6; }
.status-completed       .step-number { background: #00A651; }

.step-text {
    font-size: 0.875rem;
    line-height: 1.6;
    white-space: pre-line;
    flex: 1;
    color: #333;
}

.step-check {
    width: 22px;
    height: 22px;
    border-radius: 3px;
    border: 2px solid #d1d5db;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0;
    line-height: 1;
    color: transparent;
    background: white;
    cursor: default;
    user-select: none;
}
.step-check-in_progress    { background: #3b82f6; border-color: #3b82f6; color: white; }
.step-check-work_done      { background: #86efac; border-color: #86efac; color: white; }
.step-check-pending_signoff { background: #4ade80; border-color: #4ade80; color: white; }
.step-check-signed_off     { background: #16a34a; border-color: #16a34a; color: white; }

.badge-progress-card {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    margin-bottom: 1rem;
    overflow: hidden;
    background: white;
}
.badge-progress-summary {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.65rem 1rem;
    background: white;
    cursor: pointer;
    user-select: none;
    list-style: none;
    border-bottom: 1px solid transparent;
}
.badge-progress-card[open] .badge-progress-summary {
    border-bottom-color: #e5e7eb;
}
.badge-progress-summary::-webkit-details-marker { display: none; }
.badge-progress-summary::before {
    content: "▶";
    font-size: 0.65rem;
    color: #9ca3af;
    transition: transform 0.15s;
    flex-shrink: 0;
}
.badge-progress-card[open] .badge-progress-summary::before { transform: rotate(90deg); }
.badge-progress-title {
    font-weight: 600;
    font-size: 0.95rem;
    color: #111827;
    flex: 1;
}
.badge-progress-counts {
    display: flex;
    gap: 1.25rem;
    align-items: center;
    margin-right: 0.5rem;
    flex-shrink: 0;
    font-size: 0.8rem;
    color: #374151;
}
.badge-progress-card[open] .badge-progress-counts { display: none; }
.niveau-count-group {
    white-space: nowrap;
}
.badge-progress-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
}
.badge-progress-table th {
    padding: 0.4rem 0.75rem;
    text-align: left;
    font-weight: 600;
    color: #6b7280;
    font-size: 0.75rem;
    border-bottom: 1px solid #e5e7eb;
    background: white;
    white-space: nowrap;
}
.badge-progress-table td {
    padding: 0.4rem 0.75rem;
    border-bottom: 1px solid #f3f4f6;
    vertical-align: middle;
    height: 36px;
    line-height: 1;
}
.badge-progress-table tbody tr:last-child td { border-bottom: none; }
.badge-progress-table tbody tr:hover td { background: #f9fafb; }
.badge-progress-name {
    min-width: 90px;
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #374151;
}

.step-check-wrapper {
    position: relative;
    display: inline-flex;
    vertical-align: middle;
}
.step-check-wrapper > summary {
    cursor: pointer;
    list-style: none;
}
.step-check-wrapper > summary::-webkit-details-marker { display: none; }
.step-check-dropdown {
    display: none;
    position: fixed;
    z-index: 9999;
    background: white;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
    padding: 4px;
    min-width: 130px;
    white-space: nowrap;
}
.step-check-wrapper[open] .step-check-dropdown { display: flex; flex-direction: column; gap: 2px; }
.step-check-wrapper--review[open] .step-check-dropdown { min-width: 200px; white-space: normal; }
.step-check-wrapper--review .step-check-dropdown form { display: flex; flex-direction: column; gap: 4px; padding: 2px 4px 4px; }
.step-check-wrapper--review .step-check-dropdown textarea { font-size: 0.8rem; padding: 4px 6px; border: 1px solid #d1d5db; border-radius: 4px; resize: vertical; width: 100%; box-sizing: border-box; }
.step-check-wrapper--review .step-check-option--reject { width: 100%; justify-content: center; }
.step-check-divider { border: none; border-top: 1px solid #e5e7eb; margin: 2px 0; }
.step-check-option {
    display: flex;
    align-items: center;
    gap: 7px;
    background: none;
    border: none;
    border-radius: 4px;
    padding: 5px 8px;
    font-size: 0.82rem;
    text-align: left;
    cursor: pointer;
    color: #374151;
    width: 100%;
}
.step-check-option:hover { background: #f3f4f6; }
.step-check-option--active { font-weight: 600; color: #111827; background: #f0fdf4; }
.step-check-option .step-check { flex-shrink: 0; }

.niveau-checks {
    display: flex;
    gap: 4px;
    justify-content: center;
    margin-top: 0.5rem;
}

.step-notes {
    display: flex;
    align-items: flex-start;
    gap: 0.4rem;
    font-size: 0.85rem;
    color: #555;
    background: #f9fafb;
    border-radius: 4px;
    padding: 0.45rem 0.7rem;
    margin-bottom: 0.6rem;
    white-space: pre-line;
}

.step-notes span { flex: 1; }

.btn-icon {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    color: #9ca3af;
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    margin-top: 1px;
}
.btn-icon:hover { color: #374151; }

.step-signoff-info {
    font-size: 0.82rem;
    color: #166534;
    margin-top: 0.1rem;
}

.step-mentor-list {
    font-size: 0.82rem;
    color: #1e40af;
    margin-bottom: 0.5rem;
}

.step-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: auto;
    padding-top: 0.75rem;
}

.btn-secondary {
    padding: 0.4rem 0.9rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    border: 1px solid #00A651;
    border-radius: 4px;
    background: #fff;
    color: #00A651;
}

.btn-secondary:hover {
    background: #f0fdf4;
}

.btn-sm {
    padding: 0.3rem 0.7rem;
    font-size: 0.82rem;
}

.btn-success {
    padding: 0.4rem 0.9rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    border: none;
    border-radius: 4px;
    background: #00A651;
    color: #fff;
}

.btn-success:hover {
    background: #008a44;
}

button:disabled, a[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.btn-danger {
    padding: 0.4rem 0.9rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    border: none;
    border-radius: 4px;
    background: #b91c1c;
    color: #fff;
}

.btn-danger:hover {
    background: #991b1b;
}

.btn-cancel {
    padding: 0.4rem 0.9rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    border: 1px solid #b91c1c;
    border-radius: 4px;
    background: #fff;
    color: #b91c1c;
}

.btn-cancel:hover {
    background: #fef2f2;
}

.btn-neutral {
    padding: 0.4rem 0.9rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    background: #f9fafb;
    color: #374151;
}

.btn-star-active {
    padding: 0.4rem 0.9rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    border: 1px solid #f59e0b;
    border-radius: 4px;
    background: #fffbeb;
    color: #f59e0b;
}
.btn-star-active:hover {
    background: #fef3c7;
}
.btn-neutral:hover {
    background: #f3f4f6;
}

.btn-danger-link {
    background: none;
    border: none;
    color: #b91c1c;
    font-size: 0.82rem;
    cursor: pointer;
    padding: 0;
    text-decoration: underline;
}

.btn-danger-link:hover {
    color: #7f1d1d;
}

/* ── Inline forms ────────────────────────────────────────────────────────── */

.inline-form {
    margin-top: 0.6rem;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    max-width: 380px;
    align-self: center;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
}

.inline-form input,
.inline-form textarea {
    font-size: 0.875rem;
    padding: 0.4rem 0.6rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-family: inherit;
}

.inline-form input:focus,
.inline-form textarea:focus {
    outline: 2px solid #00A651;
    outline-offset: 1px;
    border-color: transparent;
}

.inline-form textarea {
    resize: vertical;
    min-height: 56px;
}

.mentor-suggestions {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
    align-items: center;
}

.mentor-chip {
    font-size: 0.75rem;
    padding: 0.2rem 0.55rem;
    background: #f0fdf4;
    border: 1px solid #86efac;
    border-radius: 999px;
    cursor: pointer;
    color: #166534;
}

.mentor-chip:hover {
    background: #dcfce7;
    border-color: #00A651;
}

/* ── Signoff path selector ───────────────────────────────────────────────── */

.signoff-path-selector {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    margin-bottom: 0.5rem;
}

.btn-path {
    font-size: 0.875rem;
    font-family: inherit;
    padding: 0.4rem 0.75rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
    color: #333;
    text-align: left;
}

.btn-path:hover {
    border-color: #00A651;
    color: #00A651;
}

.btn-path-active {
    border-color: #00A651;
    background: #f0faf4;
    color: #00A651;
    font-weight: 600;
}

.signoff-member-prompt {
    margin: 0 0 0.4rem;
    font-size: 0.9rem;
}

.signoff-member-list {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    margin-bottom: 0.4rem;
}

.signoff-member-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    cursor: pointer;
}

/* ── Notifications ───────────────────────────────────────────────────────── */

.notification-bar {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 4px;
    padding: 0.7rem 1rem;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    color: #1e40af;
}

.notification-bar a {
    color: #1e40af;
    font-weight: 600;
}

.badge-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #e74c3c;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 999px;
    min-width: 1.25rem;
    height: 1.25rem;
    padding: 0 0.3rem;
    line-height: 1;
}

/* ── Invitations section ─────────────────────────────────────────────────── */

.invitations-section {
    margin-bottom: 2rem;
}

.invitations-section h2 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

/* ── Membership panel ────────────────────────────────────────────────────── */

.membership-panel {
    margin-top: -1.5rem;
    margin-bottom: 2.5rem;
    font-size: 0.9rem;
}

.membership-panel__summary {
    cursor: pointer;
    color: #888;
    font-size: 0.85rem;
    list-style: revert;
    user-select: none;
    margin-bottom: 0.5rem;
}

.membership-panel__summary:hover {
    color: #555;
}

.membership-panel__table {
    margin-top: 0.5rem;
}

.membership-panel--empty {
    color: #555;
}

.membership-panel--empty p {
    margin: 0;
}

/* ── Join group list ─────────────────────────────────────────────────────── */

.join-group-list {
    list-style: none;
    margin: 0 0 1rem;
    padding: 0;
    border: 1px solid #ddd;
    border-radius: 6px;
    overflow: hidden;
    max-height: 320px;
    overflow-y: auto;
}

.join-group-list__item {
    border-bottom: 1px solid #f0f0f0;
}

.join-group-list__item:last-child {
    border-bottom: none;
}

.join-group-list__empty {
    padding: 0.6rem 0.9rem;
    color: #999;
}

.join-group-list__row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 0.9rem;
}

.join-group-list__name {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.join-group-list__name--expandable {
    cursor: pointer;
}

.join-group-list__name--expandable:hover {
    color: #333;
}

.join-group-list__chevron {
    font-size: 0.7em;
    color: #aaa;
}

.join-speltak-list {
    list-style: none;
    margin: 0;
    padding: 0;
    border-top: 1px solid #f0f0f0;
    background: #fafafa;
}

.join-speltak-list__row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.9rem 0.5rem 2rem;
    border-bottom: 1px solid #f0f0f0;
}

.join-speltak-list__row:last-child {
    border-bottom: none;
}

.requests-group {
    margin-bottom: 1.5rem;
}

.requests-group__title {
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 0.5rem;
}

.requests-group__speltak {
    font-size: 0.9rem;
    font-weight: 500;
    color: #555;
    margin: 0.75rem 0 0.25rem 0.5rem;
}

.join-invite-hint {
    margin-top: 1rem;
    font-size: 0.9rem;
    color: #666;
}

.join-speltak-list__row > span:first-child {
    flex: 1;
    color: #555;
    font-size: 0.95em;
}

.muted {
    color: #888;
    font-size: 0.9em;
}

/* ── Sign-off requests page ──────────────────────────────────────────────── */

.signoff-card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 1.1rem 1.25rem;
    margin-bottom: 1rem;
}

.signoff-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.4rem;
}

.signoff-scout {
    font-weight: 600;
    font-size: 0.95rem;
}

.signoff-badge-info {
    font-size: 0.8rem;
    color: #888;
    margin-bottom: 0.6rem;
}

.signoff-step-text {
    font-size: 0.875rem;
    color: #333;
    white-space: pre-line;
    line-height: 1.55;
    background: #f9fafb;
    padding: 0.5rem 0.7rem;
    border-radius: 4px;
    margin-bottom: 0.7rem;
}

.step-mentor-comment {
    margin-top: 0.5rem;
    background: #f0fdf4;
    border-left: 3px solid #00A651;
    padding: 0.4rem 0.6rem;
    border-radius: 0 4px 4px 0;
    font-size: 0.85rem;
}

.step-mentor-comment-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: #166534;
    margin-bottom: 0.2rem;
}

.step-mentor-comment p {
    margin: 0;
    color: #333;
    line-height: 1.5;
}

.step-rejections {
    margin-bottom: 0.5rem;
}

.step-rejection {
    background: #fff7ed;
    border-left: 3px solid #f97316;
    padding: 0.4rem 0.6rem;
    border-radius: 0 4px 4px 0;
    font-size: 0.85rem;
    margin-bottom: 0.4rem;
}

.step-rejection-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: #9a3412;
    margin-bottom: 0.2rem;
}

.step-rejection p {
    margin: 0;
    color: #333;
    line-height: 1.5;
}

.signoff-requested-at {
    font-size: 0.78rem;
    color: #aaa;
    margin-bottom: 0.6rem;
}

.signoff-level-name {
    font-size: 0.82rem;
    font-weight: 600;
    color: #444;
    margin-bottom: 0.4rem;
}

.signoff-notes-section {
    margin-bottom: 0.7rem;
}

.signoff-notes-label {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #888;
    margin-bottom: 0.2rem;
}

.signoff-notes {
    font-size: 0.82rem;
    color: #555;
    font-style: italic;
    margin: 0;
    white-space: pre-line;
}

.signoff-confirmed {
    color: #166534;
    font-weight: 500;
    font-size: 0.95rem;
    padding: 0.25rem 0;
}

.empty-state {
    color: #666;
    font-size: 0.9rem;
    padding: 2rem;
    text-align: center;
    background: #f9fafb;
    border-radius: 4px;
}

/* ── Invite panel ────────────────────────────────────────────────────────── */

.invite-panel {
    background: #fffbeb;
    border: 1px solid #fcd34d;
    border-radius: 6px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.invite-panel p {
    margin: 0;
    color: #92400e;
    line-height: 1.5;
}

/* ── Groups / Speltakken ─────────────────────────────────────────────────── */

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.page-header h1 {
    margin: 0;
}

.section-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.section-header-row h2 {
    margin: 0;
}

.item-list {
    list-style: none;
    margin: 0;
    padding: 0;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    overflow: hidden;
}

.item-list-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    padding: 0.65rem 1rem;
    border-bottom: 1px solid #e5e7eb;
    gap: 0.5rem;
}

.item-list-row:last-child {
    border-bottom: none;
}

.item-list-row a {
    color: inherit;
    text-decoration: none;
    font-weight: 500;
}

.item-list-row a:hover {
    text-decoration: underline;
}

.row-actions {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-shrink: 0;
}

.row-actions form {
    display: contents;
}

.role-badge {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #374151;
    background: #e5e7eb;
    border-radius: 4px;
    padding: 0.15rem 0.4rem;
}

.role-badge--pending {
    color: #92400e;
    background: #fef3c7;
}

.role-badge--withdrawn {
    color: #6b7280;
    background: #f3f4f6;
    text-decoration: line-through;
}

.role-select {
    font-size: 0.82rem;
    padding: 0.2rem 0.4rem;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
}

.breadcrumb {
    font-size: 0.82rem;
    color: #6b7280;
    margin: 0 0 0.25rem;
}

.breadcrumb a {
    color: #6b7280;
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.speltak-type-info {
    font-size: 0.9rem;
    color: #6b7280;
    margin: 0 0 1.5rem;
}

[x-cloak] { display: none !important; }

.ribbon {
    margin: 1.5rem 0;
    padding: 1rem 1.25rem;
    background: #f9fdf9;
    border: 1px solid #c8e6c9;
    border-radius: 6px;
}

.ribbon__title {
    font-size: 0.85rem;
    font-weight: 600;
    color: #555;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0 0 0.75rem;
}

.ribbon__items {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    padding-bottom: 1.5rem;
}

.ribbon__pair {
    display: flex;
    align-items: flex-start;
    margin-bottom: 0.2rem;
}

.ribbon__item {
    display: block;
    width: 2.75rem;
    margin-right: -0.6rem;
    position: relative;
    transition: transform 0.15s, box-shadow 0.15s;
}

.ribbon__pair .ribbon__item:nth-child(2) {
    top: 1.375rem; /* W/2 — honeycomb column offset */
}

.ribbon__item:hover {
    transform: scale(1.12);
    z-index: 1;
}

.ribbon__item img {
    width: 100%;
    height: auto;
    display: block;
}

.site-footer {
    margin-top: 4rem;
    padding: 1.5rem 2rem;
    border-top: 1px solid #e5e7eb;
    text-align: center;
    font-size: 0.85rem;
    color: #6b7280;
}

.site-footer a {
    color: #6b7280;
    text-decoration: none;
}

.site-footer a:hover {
    color: #00A651;
    text-decoration: underline;
}
