/* ============================================
   Internal Pages – Member Area, Admin, Blog
   Matches the main site design language
   ============================================ */

/* --- Page Hero (shared across all subpages) --- */
.page-hero {
    background: var(--bg-dark);
    padding: 140px 2rem 80px;
    position: relative;
    overflow: hidden;
}

.page-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(232,101,26,0.08) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.page-hero::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(232,101,26,0.05) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.page-hero h1 {
    color: var(--white);
    font-size: clamp(2rem, 4vw, 3rem);
    position: relative;
    z-index: 1;
}

.page-hero p {
    color: rgba(255,255,255,0.55);
    max-width: 600px;
    position: relative;
    z-index: 1;
}

.page-hero .hero-label {
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
}

/* --- Breadcrumb / Back link --- */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 2rem;
    transition: all var(--transition);
}

.back-link:hover {
    gap: 0.75rem;
}

/* --- Dashboard Layout --- */
.dash-welcome {
    text-align: center;
    margin-bottom: 3rem;
}

.dash-welcome .welcome-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    color: var(--white);
    font-weight: 800;
    margin-bottom: 1rem;
    box-shadow: 0 8px 24px rgba(232,101,26,0.3);
}

.dash-welcome h2 {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}

.dash-welcome p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* --- Quick Action Cards --- */
.action-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.action-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-light);
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.action-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    opacity: 0;
    transition: opacity var(--transition);
}

.action-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.action-card:hover::before {
    opacity: 1;
}

.action-card .card-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1.25rem;
}

.action-card .card-icon.icon-energy {
    background: linear-gradient(135deg, #FFF3E0, #FFE0B2);
}

.action-card .card-icon.icon-blog {
    background: linear-gradient(135deg, #E3F2FD, #BBDEFB);
}

.action-card .card-icon.icon-statuten {
    background: linear-gradient(135deg, #F3E5F5, #E1BEE7);
}

.action-card .card-icon.icon-vorstand {
    background: linear-gradient(135deg, #E8F5E9, #C8E6C9);
}

.action-card .card-icon.icon-admin {
    background: linear-gradient(135deg, rgba(232,101,26,0.1), rgba(232,101,26,0.2));
}

.action-card .card-icon.icon-finance {
    background: linear-gradient(135deg, rgba(16,185,129,0.1), rgba(16,185,129,0.2));
}

.action-card .card-icon.icon-profile {
    background: linear-gradient(135deg, #E8EAF6, #C5CAE9);
}

.action-card .card-icon.icon-docs {
    background: linear-gradient(135deg, #FFF8E1, #FFECB3);
}

.action-card .card-icon.icon-poll {
    background: linear-gradient(135deg, #F3E5F5, #E1BEE7);
}

.action-card h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.action-card p {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 1.25rem;
    flex: 1;
}

.action-card .card-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary);
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    transition: gap var(--transition);
}

.action-card .card-link:hover {
    gap: 0.75rem;
}

/* --- Member Info Card --- */
.info-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-light);
}

.info-card h3 {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.25rem;
}

.info-item {
    padding: 1rem 1.25rem;
    background: var(--bg-light);
    border-radius: var(--radius);
    border: 1px solid var(--border-light);
}

.info-item .info-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    margin-bottom: 0.3rem;
}

.info-item .info-value {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
}

.info-footer {
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border-light);
    font-size: 0.85rem;
    color: var(--text-muted);
}

.info-footer a {
    color: var(--primary);
    font-weight: 600;
}

/* --- Stats Grid (Energy + Admin) --- */
.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.stat-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-light);
    position: relative;
    overflow: hidden;
}

.stat-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
}

.stat-card .stat-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(232,101,26,0.08), rgba(232,101,26,0.15));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.stat-card .stat-number {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text);
    line-height: 1;
    letter-spacing: -0.02em;
}

.stat-card .stat-number .stat-unit {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-left: 0.25rem;
}

.stat-card .stat-label {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 0.4rem;
    font-weight: 500;
}

.stat-card.stat-positive .stat-number { color: #16a34a; }
.stat-card.stat-negative .stat-number { color: #dc2626; }
.stat-card.stat-accent .stat-number { color: var(--primary); }

/* --- Data Tables --- */
.data-panel {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    border: 1px solid var(--border-light);
    overflow: hidden;
    margin-bottom: 2rem;
}

.data-panel-header {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.data-panel-header h3 {
    font-size: 1.15rem;
    margin-bottom: 0;
}

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

.data-table th {
    padding: 0.875rem 1.5rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    background: var(--bg-light);
    border-bottom: 1px solid var(--border-light);
}

.data-table td {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-light);
    font-size: 0.95rem;
    color: var(--text);
}

.data-table tr:last-child td {
    border-bottom: none;
}

.data-table tr:hover td {
    background: var(--bg-light);
}

.data-table .text-positive { color: #16a34a; font-weight: 600; }
.data-table .text-negative { color: #dc2626; font-weight: 600; }
.data-table .text-muted { color: var(--text-muted); }

/* --- Badges --- */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.3rem 0.75rem;
    border-radius: 50px;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.01em;
}

.badge-success { background: #dcfce7; color: #16a34a; }
.badge-warning { background: #fef3c7; color: #b45309; }
.badge-danger { background: #fee2e2; color: #dc2626; }
.badge-info { background: #dbeafe; color: #2563eb; }
.badge-primary { background: rgba(232,101,26,0.1); color: var(--primary); }
.badge-neutral { background: var(--bg-light); color: var(--text-muted); }

/* --- Admin Navigation --- */
.admin-nav {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2.5rem;
    flex-wrap: wrap;
    background: var(--white);
    border-radius: var(--radius);
    padding: 0.375rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
}

.admin-nav a {
    padding: 0.625rem 1.25rem;
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.875rem;
    transition: all var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.admin-nav a:hover {
    background: var(--bg-light);
    color: var(--text);
}

.admin-nav a.active {
    background: var(--primary);
    color: var(--white);
}

/* --- Forms --- */
.form-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-light);
    margin-bottom: 2rem;
}

.form-card h3 {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    align-items: end;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.4rem;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.95rem;
    font-family: var(--font);
    color: var(--text);
    background: var(--white);
    transition: all var(--transition);
    box-sizing: border-box;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(232,101,26,0.1);
}

.form-group textarea {
    resize: vertical;
}

.form-group .form-hint {
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-top: 0.3rem;
}

.checkbox-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.checkbox-row input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
}

.checkbox-row label {
    margin-bottom: 0;
    font-weight: 500;
}

/* --- Alerts --- */
.alert {
    padding: 0.875rem 1.25rem;
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.alert-success {
    background: #dcfce7;
    color: #16a34a;
    border: 1px solid #bbf7d0;
}

.alert-error {
    background: #fee2e2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.alert-info {
    background: #dbeafe;
    color: #2563eb;
    border: 1px solid #bfdbfe;
}

.badge-internal {
    background: #EDE9FE;
    color: #7C3AED;
    border: 1px solid #DDD6FE;
    font-size: 0.75rem;
    vertical-align: middle;
    margin-left: 0.5rem;
}

/* Override btn-outline for internal pages (light backgrounds) */
.btn-outline {
    color: var(--primary);
    border-color: var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

/* --- Action Buttons (small inline) --- */
.btn-sm {
    padding: 0.4rem 0.875rem;
    font-size: 0.8rem;
    border-radius: 8px;
}

.btn-ghost {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.75rem;
    background: none;
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    font-family: var(--font);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    transition: all var(--transition);
}

.btn-ghost:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.btn-danger-ghost {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.75rem;
    background: none;
    border: none;
    cursor: pointer;
    font-family: var(--font);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    transition: all var(--transition);
}

.btn-danger-ghost:hover {
    color: #dc2626;
}

/* --- Chart Placeholder --- */
.chart-area {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    border: 1px solid var(--border-light);
    padding: 2rem;
    margin-bottom: 2rem;
    position: relative;
    min-height: 240px;
}

.chart-area .chart-bars {
    display: flex;
    align-items: flex-end;
    gap: 1rem;
    height: 180px;
    padding: 0 1rem;
}

.chart-area .chart-bar {
    flex: 1;
    border-radius: 6px 6px 0 0;
    position: relative;
    min-width: 20px;
    transition: all var(--transition);
}

.chart-area .chart-bar.bar-consumed {
    background: linear-gradient(to top, rgba(232,101,26,0.6), var(--primary));
}

.chart-area .chart-bar.bar-produced {
    background: linear-gradient(to top, rgba(22,163,74,0.6), #16a34a);
}

.chart-area .chart-bar-label {
    position: absolute;
    bottom: -24px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.7rem;
    color: var(--text-muted);
    white-space: nowrap;
}

.chart-bar-group {
    cursor: pointer;
    transition: transform 0.2s ease;
}

.chart-bar-group:hover {
    transform: translateY(-3px);
}

.chart-bar-group:hover .chart-bar {
    filter: brightness(1.2);
    box-shadow: 0 4px 12px rgba(232, 101, 26, 0.3);
}

.chart-bar-group:hover .chart-bar-label {
    color: var(--primary);
    font-weight: 600;
}

.chart-legend {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    margin-top: 2.5rem;
}

.chart-legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

.chart-legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 3px;
}

.chart-legend-dot.dot-consumed { background: var(--primary); }
.chart-legend-dot.dot-produced { background: #16a34a; }

/* --- EDA Note --- */
.notice-card {
    background: var(--bg-accent);
    border: 1px solid rgba(232,101,26,0.15);
    border-radius: var(--radius);
    padding: 1.5rem 2rem;
    font-size: 0.9rem;
    color: var(--text-light);
    line-height: 1.7;
}

.notice-card h4 {
    font-size: 1.05rem;
    margin-bottom: 0.75rem;
    color: var(--text);
}

.notice-card p {
    margin-bottom: 0.5rem;
}

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

.notice-card strong {
    color: var(--text);
}

.notice-card .notice-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
    margin-top: 0.1rem;
}

/* --- Finance Summary --- */
.finance-summary {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.finance-summary-item {
    background: var(--white);
    border-radius: var(--radius);
    padding: 1.5rem 2rem;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    text-align: center;
}

.finance-summary-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.finance-summary-value {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text);
}

.finance-summary-value.highlight {
    color: var(--primary);
}

/* Table footer */
.data-table tfoot td {
    border-top: 2px solid var(--primary);
    font-size: 1rem;
    padding-top: 1rem;
}

@media (max-width: 768px) {
    .finance-summary { grid-template-columns: 1fr; }
}

/* --- Blog Cards --- */
.blog-grid {
    display: grid;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.blog-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-light);
    transition: all var(--transition);
}

.blog-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.blog-card h3 {
    font-size: 1.15rem;
    margin-bottom: 0.75rem;
}

.blog-card h3 a {
    color: var(--text);
    text-decoration: none;
    transition: color var(--transition);
}

.blog-card h3 a:hover {
    color: var(--primary);
}

.blog-meta {
    display: flex;
    gap: 1rem;
    color: var(--text-muted);
    font-size: 0.82rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.blog-meta span {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.blog-excerpt {
    color: var(--text-light);
    line-height: 1.7;
    margin-bottom: 1.25rem;
    font-size: 0.95rem;
}

.blog-read-more {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: gap var(--transition);
}

.blog-read-more:hover {
    gap: 0.65rem;
}

.blog-empty {
    text-align: center;
    padding: 5rem 2rem;
    color: var(--text-muted);
}

.blog-empty .empty-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.4;
}

/* --- Blog Post Body --- */
.post-content {
    max-width: 800px;
    margin: 0 auto;
}

.post-body {
    line-height: 1.9;
    color: var(--text);
}

.post-body h2 { margin-top: 2.5rem; margin-bottom: 1rem; }
.post-body h3 { margin-top: 2rem; margin-bottom: 0.75rem; }
.post-body p { margin-bottom: 1.25rem; color: var(--text-light); }

.post-body img {
    max-width: 100%;
    border-radius: var(--radius);
    margin: 1.5rem 0;
}

.post-body blockquote {
    border-left: 3px solid var(--primary);
    padding-left: 1.5rem;
    margin: 1.5rem 0;
    color: var(--text-light);
    font-style: italic;
}

.post-body code {
    background: var(--bg-light);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.9em;
}

.post-body pre {
    background: var(--secondary);
    color: #e0e0e0;
    padding: 1.5rem;
    border-radius: var(--radius);
    overflow-x: auto;
    margin: 1.5rem 0;
}

/* --- Blog Post Meta --- */
.post-meta {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 2rem;
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.post-back {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    margin-bottom: 2rem;
    transition: gap 0.2s;
}

.post-back:hover {
    text-decoration: underline;
    gap: 0.75rem;
}

/* --- Vorstand Member Cards --- */
.member-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 2rem;
    text-align: center;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    transition: transform 0.3s, box-shadow 0.3s;
}

.member-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}

.member-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--primary);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 auto 1rem;
}

.member-card h3 {
    margin-bottom: 0.25rem;
    font-size: 1.1rem;
}

.member-role {
    color: var(--primary);
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.member-desc {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.placeholder-note {
    background: rgba(232,101,26,0.08);
    border: 1px solid rgba(232,101,26,0.2);
    border-radius: var(--radius);
    padding: 1.25rem 1.5rem;
    margin-top: 2rem;
    font-size: 0.9rem;
    color: var(--text-muted);
    text-align: center;
}

/* --- Pagination --- */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 3rem;
}

.pagination a,
.pagination .page-current {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all var(--transition);
}

.pagination a {
    background: var(--white);
    color: var(--text);
    border: 1px solid var(--border);
}

.pagination a:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.pagination .page-current {
    background: var(--primary);
    color: var(--white);
    border: none;
}

/* --- Login Form --- */
.login-wrapper {
    max-width: 440px;
    margin: 0 auto;
}

.login-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-light);
}

.login-card h2 {
    text-align: center;
    margin-bottom: 0.25rem;
    font-size: 1.5rem;
}

.login-subtitle {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 2rem;
    font-size: 0.9rem;
}

.login-btn {
    width: 100%;
    margin-top: 0.5rem;
}

.login-error {
    background: #fee2e2;
    color: #dc2626;
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    margin-bottom: 1.25rem;
    font-size: 0.9rem;
    border: 1px solid #fecaca;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.login-footer {
    text-align: center;
    margin-top: 1.75rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border-light);
    font-size: 0.9rem;
    color: var(--text-muted);
}

.login-footer a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

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

/* --- Upload Section --- */
.upload-zone {
    padding: 1.25rem;
    background: var(--bg-light);
    border-radius: var(--radius);
    border: 2px dashed var(--border);
    transition: all var(--transition);
}

.upload-zone:hover {
    border-color: var(--primary);
}

.upload-zone h4 {
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
}

.upload-row {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: wrap;
}

.upload-row input[type="file"] {
    font-family: var(--font);
    font-size: 0.85rem;
}

.upload-btn {
    padding: 0.5rem 1rem;
    background: var(--secondary);
    color: var(--white);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-family: var(--font);
    font-size: 0.82rem;
    font-weight: 600;
    transition: all var(--transition);
}

.upload-btn:hover {
    background: var(--secondary-light);
}

/* --- Editor Area --- */
.editor-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-light);
    max-width: 900px;
}

.editor-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

/* --- Page Content (Impressum, Datenschutz) --- */
.page-content {
    max-width: 800px;
    margin: 0 auto;
}

.page-content h2 {
    font-size: 1.5rem;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
}

.page-content h3 {
    font-size: 1.15rem;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
}

.page-content p, .page-content li {
    color: var(--text-light);
    line-height: 1.8;
}

.page-content ul {
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}

/* --- 404 Page --- */
.error-page {
    text-align: center;
    padding: 4rem 2rem;
}

.error-page .error-code {
    font-size: clamp(5rem, 12vw, 8rem);
    font-weight: 900;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    margin-bottom: 1rem;
}

.error-page h2 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
}

.error-page p {
    color: var(--text-muted);
    margin-bottom: 2rem;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .page-hero { padding: 120px 1.5rem 60px; }
    .action-grid { grid-template-columns: 1fr 1fr; }
    .stats-row { grid-template-columns: 1fr 1fr; }
    .info-grid { grid-template-columns: 1fr; }
    .admin-nav { gap: 0.25rem; }
    .admin-nav a { font-size: 0.8rem; padding: 0.5rem 0.875rem; }
    .data-table th, .data-table td { padding: 0.75rem 1rem; font-size: 0.85rem; }
    .form-row { grid-template-columns: 1fr; }
    .editor-card { padding: 1.5rem; }
    .login-card { padding: 2rem 1.5rem; }
}

@media (max-width: 480px) {
    .stats-row { grid-template-columns: 1fr; }
    .chart-area .chart-bars { gap: 0.5rem; }
    .blog-grid { grid-template-columns: 1fr; }
}

/* ============================================
   Mitglied werden – Nahbereich & Kontaktformular
   ============================================ */

/* --- Nahbereich Info Section --- */
.nahbereich-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
    margin-bottom: 4rem;
}

.nahbereich-text h2 {
    font-size: 1.6rem;
    margin-bottom: 1rem;
    color: var(--text);
}

.nahbereich-text p {
    color: var(--text-light);
    line-height: 1.8;
    margin-bottom: 1rem;
}

.nahbereich-hint {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    background: rgba(232, 101, 26, 0.06);
    border: 1px solid rgba(232, 101, 26, 0.15);
    border-radius: var(--radius);
    padding: 1.25rem;
    margin-top: 1.5rem;
}

.nahbereich-hint span {
    font-size: 1.3rem;
    flex-shrink: 0;
}

.nahbereich-hint p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-light);
}

.nahbereich-tool {
    margin-top: 1.5rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, #fff7ed 0%, #fff 100%);
    border-radius: var(--radius);
    border: 1px solid rgba(232, 101, 26, 0.2);
}

.nahbereich-tool h3 {
    margin: 0 0 0.75rem 0;
    font-size: 1.1rem;
    color: var(--text);
}

.nahbereich-tool p {
    font-size: 0.95rem;
    color: var(--text-light);
    margin: 0 0 0.5rem 0;
    line-height: 1.6;
}

.nahbereich-disclaimer {
    margin-top: 1rem !important;
    font-size: 0.8rem !important;
    color: #888 !important;
    font-style: italic;
}

.nahbereich-map {
    position: relative;
}

.nahbereich-map img {
    width: 100%;
    border-radius: var(--radius);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12);
    border: 1px solid #e0e0e0;
}

.nahbereich-caption {
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.75rem;
}

/* --- Application Form --- */
.application-form {
    max-width: 740px;
    margin: 0 auto;
    background: var(--white);
    border-radius: var(--radius-lg, 20px);
    padding: 3rem;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
}

.application-form > h2 {
    font-size: 1.6rem;
    margin-bottom: 0.5rem;
}

.form-intro {
    color: var(--text-muted);
    margin-bottom: 2rem;
    font-size: 0.95rem;
}

.required-mark {
    color: #dc2828;
    font-weight: 700;
}

.text-optional {
    color: var(--text-muted);
    font-weight: 400;
    font-size: 0.85rem;
}

.form-section {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #f0f0f0;
}

.form-section:last-of-type {
    border-bottom: none;
}

.form-section h3 {
    font-size: 1.1rem;
    margin-bottom: 1.25rem;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-section h3::before {
    content: '';
    width: 3px;
    height: 1.1em;
    background: var(--primary);
    border-radius: 2px;
}

.field-hint {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
    line-height: 1.6;
}

.field-hint a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.field-hint a:hover {
    text-decoration: underline;
}

/* --- Checkboxes --- */
.checkbox-group {
    margin-bottom: 1rem;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
    line-height: 1.6;
}

.checkbox-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-top: 0.15rem;
    flex-shrink: 0;
    accent-color: var(--primary);
    cursor: pointer;
}

.checkbox-text {
    font-size: 0.9rem;
    color: var(--text-light);
}

.checkbox-text a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

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

/* --- Form Actions --- */
.form-actions {
    text-align: center;
    padding-top: 1rem;
}

.btn-lg {
    padding: 1rem 2.5rem;
    font-size: 1.05rem;
}

.form-note {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 1rem;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .nahbereich-info {
        grid-template-columns: 1fr;
    }

    .application-form {
        padding: 2rem 1.5rem;
    }

    .day-selector { gap: 0.35rem; }
    .day-btn { min-width: 34px; height: 34px; font-size: 0.8rem; }
    .energy-chart-container { height: 280px; }
}

/* --- Energy Detail: Day Selector --- */
.day-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.day-btn {
    min-width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f5f5;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    color: #333;
    font-size: 0.875rem;
    font-weight: 500;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: all 0.2s;
}

.day-btn:hover {
    background: rgba(232,101,26,0.12);
    border-color: var(--primary);
    color: var(--primary);
}

.day-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
    color: var(--white);
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(232,101,26,0.3);
}

/* --- Energy Detail: Chart Container --- */
.energy-chart-container {
    height: 360px;
    position: relative;
}

/* --- Energy Detail: Month Link in Table --- */
.month-detail-link {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s;
}

.month-detail-link:hover {
    color: var(--primary-light, #F4943E);
    text-decoration: underline;
}

/* ============================================
   Polls / Umfragen
   ============================================ */
.poll-card { background: var(--card-bg); border-radius: var(--radius); padding: 1.5rem; margin-bottom: 1rem; border: 1px solid rgba(255,255,255,0.06); }
.poll-card-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 1rem; }
.poll-card-title { font-size: 1.15rem; font-weight: 600; color: var(--white); }
.poll-card-desc { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 1rem; line-height: 1.5; }
.poll-card-meta { display: flex; gap: 1rem; font-size: 0.8rem; color: var(--text-muted); flex-wrap: wrap; align-items: center; }
.poll-card-actions { display: flex; gap: 0.5rem; margin-top: 1rem; }

/* Poll results bar */
.poll-result { margin-bottom: 1rem; }
.poll-result-label { display: flex; justify-content: space-between; margin-bottom: 0.4rem; font-size: 0.9rem; color: var(--text-light); }
.poll-result-bar { height: 28px; background: rgba(255,255,255,0.06); border-radius: 6px; overflow: hidden; }
.poll-result-fill { height: 100%; background: linear-gradient(90deg, var(--primary), var(--primary-light)); border-radius: 6px; transition: width 0.5s ease; min-width: 2px; display: flex; align-items: center; padding-left: 8px; font-size: 0.8rem; color: white; font-weight: 600; }

/* Poll vote form */
.poll-vote-options { display: flex; flex-direction: column; gap: 0.75rem; margin: 1.5rem 0; }
.poll-vote-option { display: flex; align-items: center; gap: 0.75rem; padding: 1rem 1.25rem; background: rgba(255,255,255,0.04); border-radius: var(--radius); border: 1px solid rgba(255,255,255,0.08); cursor: pointer; transition: all 0.2s; }
.poll-vote-option:hover { background: rgba(232,101,26,0.1); border-color: var(--primary); }
.poll-vote-option input[type="radio"] { accent-color: var(--primary); width: 18px; height: 18px; }
.poll-vote-option label { cursor: pointer; color: var(--text-light); font-size: 1rem; flex: 1; }

/* Poll option editor (dynamic fields) */
.poll-options-list { display: flex; flex-direction: column; gap: 0.75rem; margin: 1rem 0; }
.poll-option-row { display: flex; gap: 0.5rem; align-items: center; }
.poll-option-row input { flex: 1; }
.poll-option-remove { background: none; border: none; color: #dc2828; cursor: pointer; font-size: 1.2rem; padding: 0.5rem; border-radius: 4px; }
.poll-option-remove:hover { background: rgba(220,40,40,0.1); }

/* Voter list */
.voter-list { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.75rem; }
.voter-chip { background: rgba(255,255,255,0.08); border-radius: 20px; padding: 0.35rem 0.75rem; font-size: 0.8rem; color: var(--text-muted); }

/* Poll deadline */
.poll-deadline { color: var(--primary); font-weight: 500; }
.poll-deadline.expired { color: #dc2828; }

/* Poll voted indicator */
.poll-voted { display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.35rem 0.75rem; background: rgba(22,163,74,0.15); color: #16a34a; border-radius: 20px; font-size: 0.8rem; font-weight: 500; }

/* Icon for poll cards */
.icon-poll { background: rgba(139,92,246,0.15); color: #8b5cf6; }

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255,255,255,0.06);
}
.pagination-info {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* =====================================================
   VPP (Virtual Power Plant) Page
   ===================================================== */
.vpp-intro {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--text-light);
}

.vpp-intro p {
    margin-bottom: 1rem;
}

/* Steps */
.vpp-steps {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.vpp-step {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
    padding: 1.5rem;
    background: #fff;
    border-radius: var(--radius);
    border: 1px solid #e8e8e8;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    transition: transform 0.2s, box-shadow 0.2s;
}

.vpp-step:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.08);
}

.vpp-step-number {
    min-width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary);
    color: #fff;
    font-size: 1.25rem;
    font-weight: 700;
    border-radius: 12px;
    flex-shrink: 0;
}

.vpp-step-content h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
    color: var(--text);
}

.vpp-step-content p {
    margin: 0;
    color: var(--text-light);
    line-height: 1.6;
    font-size: 0.95rem;
}

/* Benefits */
.vpp-benefits {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
}

.vpp-benefit-card {
    text-align: center;
    padding: 2rem 1.5rem;
    background: #fff;
    border-radius: var(--radius);
    border: 1px solid #e8e8e8;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    transition: transform 0.2s, box-shadow 0.2s;
}

.vpp-benefit-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}

.vpp-benefit-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.vpp-benefit-card h3 {
    font-size: 1.1rem;
    color: var(--text);
    margin: 0 0 0.75rem 0;
}

.vpp-benefit-card p {
    font-size: 0.9rem;
    color: var(--text-light);
    line-height: 1.6;
    margin: 0;
}

/* Requirements */
.vpp-requirements {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.vpp-req-item {
    display: flex;
    gap: 1.25rem;
    align-items: flex-start;
    padding: 1.25rem 1.5rem;
    background: #fff;
    border-radius: var(--radius);
    border: 1px solid #e8e8e8;
}

.vpp-req-icon {
    font-size: 1.75rem;
    min-width: 40px;
    text-align: center;
    flex-shrink: 0;
}

.vpp-req-content h4 {
    margin: 0 0 0.35rem 0;
    font-size: 1rem;
    color: var(--text);
}

.vpp-req-content p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-light);
    line-height: 1.6;
}

/* CTA */
.vpp-cta {
    margin-top: 3rem;
    text-align: center;
    padding: 2.5rem;
    background: linear-gradient(135deg, #fff7ed 0%, #fff 100%);
    border-radius: var(--radius);
    border: 1px solid rgba(232,101,26,0.2);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.vpp-cta h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.3rem;
    color: var(--text);
}

.vpp-cta p {
    color: var(--text-light);
    margin: 0 0 1.5rem 0;
}

.vpp-cta .btn-outline {
    color: var(--primary);
    border-color: var(--primary);
}

.vpp-cta .btn-outline:hover {
    background: var(--primary);
    color: #fff;
}

@media (max-width: 640px) {
    .vpp-step { flex-direction: column; gap: 1rem; }
    .vpp-req-item { flex-direction: column; gap: 0.75rem; }
    .vpp-benefits { grid-template-columns: 1fr; }
}

/* VPP Financial Comparison */
.vpp-finance {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
}

.vpp-finance-scenario {
    background: #fff;
    border-radius: var(--radius);
    border: 1px solid #e8e8e8;
    box-shadow: 0 2px 12px rgba(0,0,0,0.05);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.vpp-finance-header {
    padding: 1.5rem 1.5rem 1rem;
    text-align: center;
}

.vpp-finance-icon {
    font-size: 2rem;
}

.vpp-finance-header h3 {
    margin: 0.5rem 0 0.25rem;
    font-size: 1.15rem;
    color: var(--text);
}

.vpp-finance-subtitle {
    font-size: 0.85rem;
    color: var(--text-light);
    margin: 0;
}

.vpp-finance-compare {
    display: flex;
    align-items: stretch;
    gap: 0;
    padding: 0 1rem;
    flex: 1;
}

.vpp-finance-option {
    flex: 1;
    padding: 1rem;
    border-radius: 10px;
    text-align: center;
}

.vpp-finance-bad {
    background: #fef2f2;
    border: 1px solid #fecaca;
}

.vpp-finance-good {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
}

.vpp-finance-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.vpp-finance-bad .vpp-finance-label { color: #dc2626; }
.vpp-finance-good .vpp-finance-label { color: #16a34a; }

.vpp-finance-detail {
    font-size: 0.8rem;
    color: #666;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.vpp-finance-amount {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text);
}

.vpp-finance-total {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-top: 0.25rem;
}

.vpp-finance-vs {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    color: #999;
    min-width: 36px;
}

.vpp-finance-result {
    margin: 1rem;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    text-align: center;
    font-size: 0.9rem;
}

.vpp-finance-result-positive {
    background: #f0fdf4;
    color: #15803d;
    border: 1px solid #bbf7d0;
}

@media (max-width: 640px) {
    .vpp-finance { grid-template-columns: 1fr; }
    .vpp-finance-compare { flex-direction: column; gap: 0.5rem; padding: 0 0.75rem; }
    .vpp-finance-vs { min-width: auto; padding: 0.25rem 0; }
}

/* VPP 3D Animation */
.vpp-animation-container {
    position: relative;
    width: 100%;
    height: 500px;
    margin: 2.5rem 0;
    border-radius: var(--radius);
    overflow: hidden;
    background: #dceefb;
    box-shadow: 0 4px 24px rgba(0,0,0,0.08);
}

.vpp-animation-container canvas {
    display: block;
    width: 100% !important;
    height: 100% !important;
}

.vpp-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 10;
}

.vpp-anim-label {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: var(--text);
    font-size: 0.95rem;
    font-weight: 600;
    padding: 0.6rem 1.25rem;
    border-radius: 50px;
    box-shadow: 0 2px 16px rgba(0,0,0,0.1);
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.vpp-anim-label.visible {
    opacity: 1;
}

.vpp-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #888;
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    .vpp-animation-container {
        height: 350px;
        margin: 1.5rem 0;
    }
    .vpp-anim-label {
        font-size: 0.8rem;
        padding: 0.5rem 1rem;
        bottom: 16px;
    }
}

@media (max-width: 480px) {
    .vpp-animation-container {
        height: 280px;
    }
}
