.portal-page {
    background:
        linear-gradient(180deg, #fff 0%, var(--aloha-surface) 220px, var(--aloha-surface) 100%);
    padding: 2rem 0 4rem;
    min-height: 60vh;
}

.portal-container {
    max-width: 1200px;
}

.portal-masthead {
    margin-bottom: 2rem;
    padding: 1.5rem 1.75rem 1.75rem;
    border-radius: var(--radius-lg);
    background: var(--aloha-surface-elevated);
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(15, 15, 15, 0.05);
    border-top: 4px solid var(--aloha-red);
}

.portal-breadcrumbs {
    margin-bottom: 1rem;
}

.portal-breadcrumbs ol {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: 0.82rem;
    font-weight: 600;
}

.portal-breadcrumbs li:not(:last-child)::after {
    content: '/';
    margin-left: 0.35rem;
    color: var(--aloha-border);
}

.portal-breadcrumbs a {
    color: var(--aloha-text-muted);
    text-decoration: none;
    transition: color var(--transition);
}

.portal-breadcrumbs a:hover {
    color: var(--aloha-red);
}

.portal-breadcrumbs span {
    color: var(--aloha-dark);
}

.portal-masthead .portal-hero {
    margin-bottom: 0;
}

.portal-hero {
    margin-bottom: 2rem;
}

.portal-hero .section-title-modern span {
    color: var(--aloha-red);
}

.portal-card,
.filter-card-modern,
.info-block,
.ranking-results-container,
.boerse-card,
.stat-card,
.result-card,
.setup-card-premium,
.gs-container,
.event-hero-card,
.results-list-card {
    background: var(--aloha-surface-elevated);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(15, 15, 15, 0.04);
}

.portal-card {
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.portal-alert {
    padding: 0.9rem 1.1rem;
    border-radius: var(--radius-md);
    margin-bottom: 1.25rem;
    font-weight: 600;
    font-size: 0.92rem;
}

.portal-alert--success {
    background: #dcfce7;
    color: #15803d;
    border: 1px solid #bbf7d0;
}

.portal-alert--error {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.portal-alert--info {
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
}

.filter-card-modern {
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.5rem;
}

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

.filter-item label {
    display: block;
    margin-bottom: 0.45rem;
    color: var(--aloha-text-muted);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.filter-item select,
.filter-item input,
.form-control,
.form-control-modern,
.form-control-premium {
    width: 100%;
    padding: 0.75rem 0.9rem;
    border: 1px solid var(--aloha-border);
    border-radius: var(--radius-md);
    background: var(--aloha-surface);
    color: var(--aloha-text);
    font-size: 0.95rem;
    transition: border-color var(--transition), box-shadow var(--transition);
}

.filter-item select:focus,
.filter-item input:focus,
.form-control:focus,
.form-control-modern:focus,
.form-control-premium:focus {
    outline: none;
    border-color: var(--aloha-red);
    box-shadow: 0 0 0 3px var(--aloha-red-soft);
}

.info-block {
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.info-title {
    margin-bottom: 1rem;
    color: var(--aloha-dark);
    font-family: var(--font-heading);
    font-size: 1rem;
    text-transform: uppercase;
}

.info-title i {
    color: var(--aloha-red);
    margin-right: 0.4rem;
}

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

.calc-item {
    padding: 1rem;
    border-radius: var(--radius-md);
    background: var(--aloha-surface);
}

.calc-item h6 {
    margin: 0 0 0.4rem;
    color: var(--aloha-red);
    font-family: var(--font-heading);
    text-transform: uppercase;
}

.calc-item p {
    margin: 0;
    color: var(--aloha-text-muted);
    font-size: 0.88rem;
    line-height: 1.5;
}

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

.rank-table-modern th {
    padding: 0.85rem 1rem;
    border-bottom: 2px solid var(--aloha-border);
    color: var(--aloha-text-muted);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    text-align: left;
}

.rank-table-modern td {
    padding: 0.9rem 1rem;
    border-bottom: 1px solid var(--aloha-border);
}

.rank-table-modern tbody tr {
    cursor: pointer;
    transition: background var(--transition);
}

.rank-table-modern tbody tr:hover {
    background: var(--aloha-red-soft);
}

.rank-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2rem;
    font-family: var(--font-heading);
    font-weight: 700;
}

.points-pill {
    display: inline-block;
    padding: 0.3rem 0.75rem;
    border-radius: var(--radius-pill);
    background: var(--aloha-red-soft);
    color: var(--aloha-red);
    font-weight: 800;
}

.rank-table-modern tr.is-top-rank td {
    background: linear-gradient(90deg, rgba(255, 215, 0, 0.08), transparent);
}

.boerse-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.25rem;
}

.boerse-card {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform var(--transition), box-shadow var(--transition);
}

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

.type-badge {
    display: inline-block;
    margin-bottom: 0.75rem;
    padding: 0.3rem 0.7rem;
    border-radius: var(--radius-pill);
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.type-suche {
    background: #fff7ed;
    color: #c2410c;
}

.type-biete {
    background: #f0fdf4;
    color: #15803d;
}

.dashboard-container {
    max-width: 1100px;
    margin: 0 auto;
}

.dashboard-hero {
    text-align: center;
    margin-bottom: 2rem;
}

.dashboard-hero h1 {
    margin: 0 0 0.5rem;
    font-family: var(--font-heading);
    font-size: clamp(2rem, 4vw, 2.8rem);
    text-transform: uppercase;
}

.dashboard-hero h1 span {
    color: var(--aloha-red);
}

.dashboard-hero p {
    color: var(--aloha-text-muted);
}

.dashboard-logout {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-top: 0.75rem;
    color: var(--aloha-text-muted);
    font-size: 0.88rem;
    text-decoration: none;
}

.dashboard-logout:hover {
    color: var(--aloha-red);
}

.gamification-box {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
    border-left: 6px solid var(--status-color, var(--aloha-red));
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 1.5rem;
    align-items: center;
}

.badge-circle {
    width: 84px;
    height: 84px;
    border-radius: 50%;
    background: var(--status-color, var(--aloha-red));
    display: grid;
    place-items: center;
    color: #fff;
    font-size: 2rem;
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    padding: 1.25rem;
    text-align: center;
}

.stat-card h3 {
    margin: 0.5rem 0;
    font-family: var(--font-heading);
    font-size: 1.8rem;
}

.result-card {
    padding: 1.25rem 1.5rem;
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    border-left: 4px solid var(--aloha-border);
    transition: transform var(--transition);
}

.result-card:hover {
    transform: translateX(4px);
}

.result-card.podium {
    border-left-color: #ffd700;
}

.result-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.result-chip {
    padding: 0.25rem 0.6rem;
    border-radius: var(--radius-sm);
    background: var(--aloha-surface);
    font-size: 0.72rem;
    font-weight: 700;
}

.results-header {
    margin-bottom: 1.5rem;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 1rem;
    color: var(--aloha-text-muted);
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: none;
}

.back-link:hover {
    color: var(--aloha-red);
}

.results-event-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 1.1rem 1.25rem;
    margin-bottom: 0.75rem;
    border-radius: var(--radius-md);
    background: #fff;
    box-shadow: var(--shadow-sm);
    text-decoration: none;
    color: inherit;
    transition: transform var(--transition), box-shadow var(--transition);
}

.results-event-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.blog-grid-modern,
.events-grid-portal {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.25rem;
}

.portal-empty {
    padding: 3rem 1.5rem;
    text-align: center;
    border-radius: var(--radius-lg);
    background: #fff;
    color: var(--aloha-text-muted);
}

.portal-pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.portal-pagination a,
.portal-pagination span {
    padding: 0.5rem 0.85rem;
    border-radius: var(--radius-pill);
    border: 1px solid var(--aloha-border);
    background: #fff;
    color: var(--aloha-text);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 700;
}

.portal-pagination a.is-active,
.portal-pagination span.is-active {
    background: var(--aloha-red);
    border-color: var(--aloha-red);
    color: #fff;
}

@media (max-width: 900px) {
    .gamification-box {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .badge-circle {
        margin: 0 auto;
    }

    .result-card {
        flex-direction: column;
        align-items: flex-start;
    }
}

.portal-page--dashboard .dashboard-hero {
    text-align: left;
    margin-bottom: 0;
}

.portal-page--dashboard .dashboard-hero h1 {
    font-size: clamp(1.8rem, 3vw, 2.4rem);
}

.portal-page--login .selection-container,
.portal-page--profile .setup-wrapper {
    max-width: 900px;
    margin: 0 auto;
}

.portal-page--login .selection-container {
    padding: 2rem 1rem 3rem;
}

.portal-page--profile {
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

.portal-page--profile .setup-wrapper {
    width: 100%;
    padding: 1rem 0 2rem;
}

.portal-page--legal {
    padding-bottom: 5rem;
}

.portal-page--legal .portal-container {
    max-width: 900px;
}

.legal-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.legal-section {
    background: var(--aloha-surface-elevated);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(15, 15, 15, 0.04);
}

.legal-section h3 {
    margin: 0 0 1rem;
    padding-bottom: 0.65rem;
    border-bottom: 2px solid var(--aloha-border);
    color: var(--aloha-red);
    font-family: var(--font-heading);
    font-size: 1rem;
    text-transform: uppercase;
}

.legal-section p {
    margin: 0 0 0.5rem;
    color: var(--aloha-text);
    line-height: 1.6;
    font-size: 0.95rem;
}

.legal-section a {
    color: var(--aloha-text);
    font-weight: 700;
    text-decoration: none;
    transition: color var(--transition);
}

.legal-section a:hover {
    color: var(--aloha-red);
}

.legal-highlight {
    grid-column: 1 / -1;
    background: var(--aloha-surface-elevated);
    border-left: 5px solid var(--aloha-red);
    border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.legal-highlight h3 {
    margin: 0 0 0.75rem;
    color: var(--aloha-dark);
    font-family: var(--font-heading);
    font-size: 0.95rem;
    text-transform: uppercase;
}

.legal-highlight p {
    margin: 0;
    color: var(--aloha-text-muted);
    line-height: 1.6;
}

.legal-note {
    grid-column: 1 / -1;
    padding: 1.25rem 1.5rem;
    border-radius: var(--radius-md);
    background: var(--aloha-surface);
    border: 1px solid var(--aloha-border);
    color: var(--aloha-text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
}

.legal-note a {
    color: var(--aloha-red);
    font-weight: 700;
}

.legal-content {
    background: var(--aloha-surface-elevated);
    padding: 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(15, 15, 15, 0.04);
}

.legal-content .legal-block {
    margin-bottom: 2rem;
}

.legal-content .legal-block:last-child {
    margin-bottom: 0;
}

.legal-content h2 {
    margin: 0 0 1rem;
    padding-bottom: 0.65rem;
    border-bottom: 2px solid var(--aloha-border);
    color: var(--aloha-red);
    font-family: var(--font-heading);
    font-size: 1.35rem;
    text-transform: uppercase;
}

.legal-content h3 {
    margin: 1.25rem 0 0.5rem;
    color: var(--aloha-dark);
    font-size: 1rem;
    font-weight: 700;
}

.legal-text {
    color: var(--aloha-text-muted);
    font-size: 0.95rem;
    line-height: 1.65;
}

.legal-text p {
    margin: 0 0 0.75rem;
}

.legal-list {
    margin: 0 0 1rem;
    padding-left: 1.25rem;
}

.legal-list li {
    margin-bottom: 0.5rem;
}

.legal-policy-box {
    margin: 1.25rem 0;
    padding: 1.25rem;
    border-left: 4px solid var(--aloha-red);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    background: var(--aloha-surface);
}

.legal-policy-box strong {
    display: block;
    margin-bottom: 0.35rem;
    color: var(--aloha-red);
    font-size: 0.85rem;
    text-transform: uppercase;
}

.portal-page--gallery {
    background: #fff;
}

.portal-page--gallery .event-chip span,
.portal-page--gallery .overlay {
    color: #fff;
}

@media (max-width: 768px) {
    .portal-page {
        padding: 1.25rem 0 3rem;
    }

    .legal-content {
        padding: 1.25rem;
    }
}
