/* BNI Folien-Generator – Stylesheet
   BNI-Rot: #C8202F (laut PPTX-Vorlage)
*/

:root {
    --bni-red: #C8202F;
    --bni-red-dark: #A01827;
    --bni-red-light: #E73A4A;
    --text: #1f2937;
    --text-muted: #6b7280;
    --bg: #f4f5f7;
    --card-bg: #ffffff;
    --border: #e5e7eb;
    --border-input: #cbd5e1;
    --shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    --shadow-hover: 0 4px 12px rgba(0,0,0,0.08);
    --radius: 8px;
    --status-ok-bg: #d1fae5;
    --status-ok-text: #065f46;
    --status-err-bg: #fee2e2;
    --status-err-text: #991b1b;
    --status-info-bg: #dbeafe;
    --status-info-text: #1e40af;
}

* { box-sizing: border-box; }

html, body {
    margin: 0; padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    color: var(--text);
    background: var(--bg);
    font-size: 15px;
    line-height: 1.5;
}

/* Topbar */
.topbar {
    background: var(--bni-red);
    color: white;
    padding: 16px 24px;
    box-shadow: var(--shadow);
}
.topbar-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
.brand {
    display: flex;
    align-items: center;
    gap: 14px;
}
.logo-box {
    background: white;
    color: var(--bni-red);
    font-weight: 900;
    font-size: 22px;
    padding: 6px 12px;
    border-radius: 4px;
    line-height: 1;
}
.logo-box span { color: var(--bni-red); }
.brand h1 {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
}
.version-badge {
    font-size: 12px;
    opacity: 0.85;
    background: rgba(255,255,255,0.18);
    padding: 2px 8px;
    border-radius: 999px;
}
.chapter-badge {
    background: white;
    color: var(--bni-red);
    padding: 6px 14px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 14px;
    box-shadow: var(--shadow);
}

/* Layout */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 24px;
}

/* Cards */
.card {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 20px;
    overflow: hidden;
}
.card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    background: #fafbfc;
}
.card-header h2 {
    margin: 0;
    font-size: 17px;
    font-weight: 600;
    flex: 1;
}
.step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--bni-red);
    color: white;
    font-weight: 700;
    font-size: 14px;
}
.card-body {
    padding: 20px;
}
.card-body.center {
    text-align: center;
}

/* Section titles */
.section-title {
    margin: 20px 0 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--bni-red);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding-top: 8px;
    border-top: 1px solid var(--border);
}
.section-title:first-child {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

/* Form elements */
label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.4px;
    margin-bottom: 4px;
}
input[type="text"], input[type="url"], input[type="number"], input[type="date"], textarea, select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-input);
    border-radius: 6px;
    font-size: 15px;
    font-family: inherit;
    background: white;
    color: var(--text);
    transition: border-color 0.15s, box-shadow 0.15s;
}
input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--bni-red);
    box-shadow: 0 0 0 3px rgba(200, 32, 47, 0.12);
}
textarea {
    resize: vertical;
    min-height: 60px;
}

.hint {
    margin: 8px 0 0;
    font-size: 13px;
    color: var(--text-muted);
}

/* Grid */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px 16px;
    margin-bottom: 8px;
}
.grid-2 .full-row {
    grid-column: 1 / -1;
}

/* Input rows (input + button) */
.input-row {
    display: flex;
    gap: 10px;
}
.input-row input {
    flex: 1;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, transform 0.05s;
    font-family: inherit;
    white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
    background: var(--bni-red);
    color: white;
}
.btn-primary:hover {
    background: var(--bni-red-dark);
}
.btn-primary:disabled {
    background: #9ca3af;
    cursor: not-allowed;
}
.btn-big {
    padding: 14px 36px;
    font-size: 17px;
}

/* Checkboxes */
.checkbox-line {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 8px 0;
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
    text-transform: none;
    letter-spacing: 0;
}
.checkbox-line input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--bni-red);
}

/* Status messages */
.status {
    margin-top: 12px;
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
}
.status.success {
    background: var(--status-ok-bg);
    color: var(--status-ok-text);
}
.status.error {
    background: var(--status-err-bg);
    color: var(--status-err-text);
}
.status.info, .status.loading {
    background: var(--status-info-bg);
    color: var(--status-info-text);
}
.status.loading::before {
    content: "";
    display: inline-block;
    width: 12px;
    height: 12px;
    margin-right: 8px;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    vertical-align: middle;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Member list */
.member-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 12px;
    margin-top: 12px;
}
.member-card {
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 12px;
    display: flex;
    gap: 12px;
    align-items: flex-start;
    background: white;
    transition: box-shadow 0.15s;
}
.member-card:hover {
    box-shadow: var(--shadow-hover);
}
.member-card img {
    width: 56px;
    height: 56px;
    border-radius: 6px;
    object-fit: cover;
    background: #e5e7eb;
    flex-shrink: 0;
}
.member-card .info {
    flex: 1;
    min-width: 0;
}
.member-card .info strong {
    display: block;
    font-size: 14px;
    color: var(--text);
    text-transform: none;
    letter-spacing: 0;
    margin-bottom: 2px;
}
.member-card .info span {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.member-card .toggle {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    margin-top: 4px;
}

.hidden {
    display: none !important;
}

.page-footer {
    text-align: center;
    color: var(--text-muted);
    font-size: 13px;
    padding: 20px;
}

@media (max-width: 700px) {
    .grid-2 {
        grid-template-columns: 1fr;
    }
    .topbar-inner {
        flex-direction: column;
        align-items: flex-start;
    }
    .input-row {
        flex-direction: column;
    }
}
