/* HSG Rodenstein Portal – Unified Design System */

:root {
    --hsg-primary:          #ff3131;   /* HSG Rot */
    --hsg-primary-dark:     #d42828;   /* Hover-Rot */
    --hsg-secondary:        #313131;   /* Dunkelgrau */
    --hsg-secondary-dark:   #1a1a1a;
    --hsg-accent:           #ff3131;
    --hsg-light:            #f0f0f0;
    --hsg-border:           #dde2ec;
    --hsg-text:             #1a1a1a;
    --hsg-muted:            #6c757d;
    --hsg-white:            #ffffff;
    --hsg-danger:           #dc3545;
    --hsg-success:          #198754;

    --header-main-height:   100px;
    --header-nav-height:    44px;
    --header-total:         144px;
    --topbar-height:        144px;   /* Alias für Sub-Apps */
    --border-radius:        8px;
    --shadow-sm:            0 1px 4px rgba(0,0,0,.08);
    --shadow-md:            0 4px 16px rgba(0,0,0,.12);
}

/* ── Reset & Base ───────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: var(--hsg-light);
    color: var(--hsg-text);
    margin: 0;
    min-height: 100vh;
}

/* ── Portal Header ──────────────────────────────────────────────── */
.portal-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
}

/* Roter Hauptbalken */
.portal-header-main {
    background: var(--hsg-primary);
    /* border-bottom: 2px solid var(--hsg-secondary); */
    height: var(--header-main-height);
    display: flex;
    align-items: center;
    padding-right: 3vw;
    overflow: visible;
    position: relative;
    z-index: 2;          /* Logo-Overflow liegt über dem Sub-Nav */
}

/* Logo-Bereich – übergreifend (ragt nach unten über den roten Balken hinaus) */
.portal-header-logo-wrap {
    position: relative;
    display: flex;
    align-items: flex-end;   /* Logo hängt nach unten */
    height: 100%;
    padding-left: 4vw;
    text-decoration: none;
    flex-shrink: 0;
}

.portal-header-logo-bg {
    position: absolute;
    left: 4vw;
    top: 50%;
    transform: translateY(-35%);   /* Schwerpunkt nach unten verschoben */
    width: 125px;
    height: 125px;
    /* background: white; */
    border-radius: 20px;
    z-index: 1;
}

.portal-header-logo {
    position: relative;
    z-index: 2;
    height: 120px;        /* Größer als der 100px-Balken → Überlappung */
    width: auto;
    padding: 8px;
    margin-bottom: -33px; /* Lässt das Logo nach unten herausragen */
    display: block;
}

/* Spacer zwischen Logo und User-Bereich */
.portal-header-spacer { flex: 1; }

/* Nav-Links im roten Hauptbalken (Portal-eigene Seiten: Dashboard, Admin) */
.portal-main-nav {
    display: flex;
    align-items: center;
    height: 100%;
    list-style: none;
    margin: 0;
    padding: 0 0 0 10px;
    gap: 20px;
}

.portal-main-nav li a {
    display: block;
    color: var(--hsg-primary);
    background-color: white;
    text-transform: uppercase;
    font-weight: 700;
    font-size: 0.9rem;
    text-decoration: none;
    padding: 12px 20px;
    border-radius: 10px;
    letter-spacing: 0.03em;
    transition: background .3s, color .3s;
}

.portal-main-nav li a:hover,
.portal-main-nav li a.active {
    background: var(--hsg-secondary);
    color: white;
}

/* Dropdown im roten Hauptbalken */
.portal-main-nav li.nav-dropdown {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
}

.portal-main-nav li.nav-dropdown > a::after {
    content: ' ▾';
    font-size: .75rem;
    opacity: .8;
    margin-left: 2px;
}

.portal-main-nav li.nav-dropdown .nav-dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--hsg-secondary);
    list-style: none;
    padding: 6px 0;
    margin: 0;
    border-top: 3px solid var(--hsg-primary);
    border-radius: 0 0 10px 10px;
    box-shadow: 0 6px 18px rgba(0,0,0,.28);
    min-width: 190px;
    z-index: 200;
}

.portal-main-nav li.nav-dropdown:hover .nav-dropdown-menu { display: block; }

.portal-main-nav li.nav-dropdown .nav-dropdown-menu li {
    height: auto;
    display: block;
}

.portal-main-nav li.nav-dropdown .nav-dropdown-menu li a {
    color: white;
    height: auto;
    padding: 10px 20px;
    font-size: .82rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .03em;
    text-decoration: none;
    border-radius: 0;
    border-bottom: 1px solid rgba(255,255,255,.06);
    display: block;
    background: none;
    transition: background .12s;
}

.portal-main-nav li.nav-dropdown .nav-dropdown-menu li:last-child a { border-bottom: none; }

.portal-main-nav li.nav-dropdown .nav-dropdown-menu li a:hover {
    background: var(--hsg-primary);
    color: white;
}

/* User-Bereich rechts */
.portal-header-user {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.portal-header-username {
    color: white;
    font-weight: 600;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    white-space: nowrap;
    text-decoration: none;
    padding: 0;
    border-radius: 0;
    text-transform: none;
    letter-spacing: normal;
}

.portal-header-user a {
    color: white;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.88rem;
    padding: 9px 18px;
    border-radius: 8px;
    letter-spacing: 0.04em;
    transition: background .15s, color .15s;
    white-space: nowrap;
}

.portal-header-user a:hover {
    background: white;
    color: var(--hsg-primary);
}

/* Anmelden-Button im Topnav (für Gäste) */
.portal-header-login-btn {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    color: var(--hsg-primary);
    background: white;
    font-weight: 700;
    font-size: .88rem;
    padding: 9px 18px;
    border-radius: 8px;
    text-decoration: none;
    letter-spacing: .04em;
    white-space: nowrap;
    transition: background .15s, color .15s;
    margin-left: 1rem;
}
.portal-header-login-btn:hover {
    background: var(--hsg-secondary);
    color: white;
}

/* Mobile Hamburger */
.portal-nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px 16px;
    margin-left: 1rem;
    flex-shrink: 0;
    width: auto;
    z-index: 200;
}

.portal-nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: white;
    border-radius: 2px;
    transition: transform .25s, opacity .25s;
}

/* Dunkler Navigations-Balken */
.portal-header-nav {
    background: var(--hsg-secondary);
    height: var(--header-nav-height);
    position: relative;
    z-index: 1;         /* Unter dem roten Balken → Logo überlappt */
}

.portal-header-nav ul {
    display: flex;
    align-items: center;
    height: 100%;
    list-style: none;
    margin: 0;
    /* Links-Abstand groß genug, damit das überlappende Logo sie nicht verdeckt */
    padding: 0 3vw 0 calc(4vw + 250px);
    gap: 20px;
}

.portal-header-nav ul li {
    height: 100%;
    display: flex;
    align-items: center;
}

.portal-header-nav ul li a {
    display: flex;
    align-items: center;
    height: 100%;
    color: white;
    text-decoration: none;
    text-transform: uppercase;
    font-weight: 700;
    font-size: 0.88rem;
    padding: 0 20px;
    letter-spacing: 0.03em;
    transition: background .15s, color .15s;
    white-space: nowrap;
}

.portal-header-nav ul li a:hover,
.portal-header-nav ul li a.active {
    background: var(--hsg-primary);
    color: white;
    text-decoration: none;
}

/* Dropdown im Navigations-Balken */
.portal-header-nav ul li.nav-dropdown {
    position: relative;
}

.portal-header-nav ul li.nav-dropdown > a::after {
    content: ' ▾';
    font-size: 0.75rem;
    opacity: 0.8;
    margin-left: 2px;
}

.portal-header-nav ul li.nav-dropdown .nav-dropdown-menu {
    display: none;
    height: fit-content;
    position: absolute;
    top: 100%;
    left: 50%;
    background: var(--hsg-secondary);
    list-style: none;
    padding: 6px 0;
    margin: 0;
    border-top: 3px solid var(--hsg-primary);
    border-radius: 0 0 10px 10px;
    box-shadow: 0 6px 18px rgba(0,0,0,.28);
    z-index: 200;
}

.portal-header-nav ul li.nav-dropdown:hover .nav-dropdown-menu {
    display: block;
}

.portal-header-nav ul li.nav-dropdown .nav-dropdown-menu li {
    height: auto;
    display: block;
}

.portal-header-nav ul li.nav-dropdown .nav-dropdown-menu li a {
    height: auto;
    padding: 10px 20px;
    font-size: 0.82rem;
    border-radius: 0;
    border-bottom: 1px solid rgba(255,255,255,.06);
}

.portal-header-nav ul li.nav-dropdown .nav-dropdown-menu li:last-child a {
    border-bottom: none;
}

/* Trenner | zwischen Sub-Nav-Items */
.portal-header-nav ul li.nav-sep {
    color: rgba(255,255,255,.22);
    font-size: .85rem;
    pointer-events: none;
    flex-shrink: 0;
    height: auto;
    padding: 0;
}

/* Nicht-verlinktes Kontext-Label in der Sub-Leiste (z.B. Bereichsname) */
.portal-header-nav ul li.nav-label {
    color: rgba(255,255,255,.88);
    font-weight: 700;
    font-size: .88rem;
    text-transform: uppercase;
    letter-spacing: .03em;
    white-space: nowrap;
    height: auto;
}

/* Platzhalter für den fixen Header */
.portal-header-push {
    height: var(--header-total);
}

/* ── Main content area (Portal-eigene Seiten: 2 Balken) ────────── */
.portal-main {
    padding-top: calc(var(--header-total) + 1.5rem);
    padding-bottom: 2rem;
    min-height: calc(100vh - var(--header-nav-height));
}

.portal-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.25rem;
}

/* ── Breadcrumb ─────────────────────────────────────────────────── */
.portal-breadcrumb {
    font-size: .83rem;
    color: var(--hsg-muted);
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: .4rem;
    flex-wrap: wrap;
}

.portal-breadcrumb a {
    color: var(--hsg-primary);
    text-decoration: none;
}

.portal-breadcrumb a:hover { text-decoration: underline; }
.portal-breadcrumb .sep { opacity: .45; }

/* ── Page title ─────────────────────────────────────────────────── */
.portal-page-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--hsg-secondary);
    margin: 0 0 1.5rem;
}

/* ── Cards ──────────────────────────────────────────────────────── */
.portal-card {
    background: var(--hsg-white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--hsg-border);
    overflow: hidden;
}

.portal-card-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--hsg-border);
    font-weight: 600;
    font-size: .95rem;
    display: flex;
    align-items: center;
    gap: .5rem;
}

.portal-card-body { padding: 1.25rem; }

/* ── Dashboard Bereichs-Cards ───────────────────────────────────── */
.bereich-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.25rem;
    margin-top: .5rem;
}

.bereich-card {
    background: var(--hsg-white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--hsg-border);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: .75rem;
    transition: box-shadow .18s, transform .18s;
    text-decoration: none;
    color: var(--hsg-text);
}

.bereich-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
    color: var(--hsg-text);
    text-decoration: none;
}

.bereich-card-icon {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.bereich-card-icon.sponsoren { background: #fde8e8; color: #d42828; }
.bereich-card-icon.busplan   { background: #e6f4ea; color: #198754; }
.bereich-card-icon.events    { background: #fde8e8; color: #d42828; }
.bereich-card-icon.admin     { background: #f0f0f0; color: #313131; }
.bereich-card-icon.portal    { background: #e8f0fe; color: #1a56db; }
.bereich-card-icon.custom    { background: #f3f0fe; color: #6c3fc7; }

.bereich-card-title {
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--hsg-secondary);
}

.bereich-card-desc {
    font-size: .85rem;
    color: var(--hsg-muted);
    line-height: 1.4;
    flex: 1;
}

.bereich-card-action {
    font-size: .82rem;
    font-weight: 600;
    color: var(--hsg-primary);
    display: flex;
    align-items: center;
    gap: .3rem;
}

/* ── Buttons ────────────────────────────────────────────────────── */
.btn-portal-primary {
    background: var(--hsg-primary);
    color: var(--hsg-white);
    border: none;
    border-radius: 6px;
    padding: .55rem 1.2rem;
    font-size: .9rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    transition: background .15s;
}

.btn-portal-primary:hover {
    background: var(--hsg-primary-dark);
    color: var(--hsg-white);
    text-decoration: none;
}

.btn-portal-guest {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    padding: .65rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: .95rem;
    cursor: pointer;
    text-decoration: none;
    border: 2px solid var(--hsg-border);
    background: transparent;
    color: var(--hsg-muted);
    transition: border-color .15s, color .15s, background .15s;
    box-sizing: border-box;
}
.btn-portal-guest:hover {
    border-color: var(--hsg-secondary);
    color: var(--hsg-secondary);
    background: var(--hsg-light);
    text-decoration: none;
}

.login-divider {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin: 1.25rem 0 1rem;
    color: var(--hsg-muted);
    font-size: .85rem;
}
.login-divider::before,
.login-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--hsg-border);
}

.btn-portal-secondary {
    background: var(--hsg-white);
    color: var(--hsg-secondary);
    border: 1px solid var(--hsg-secondary);
    border-radius: 6px;
    padding: .5rem 1.2rem;
    font-size: .9rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    transition: background .15s;
}

.btn-portal-secondary:hover {
    background: var(--hsg-light);
    color: var(--hsg-secondary);
    text-decoration: none;
}

.btn-portal-danger {
    background: var(--hsg-danger);
    color: var(--hsg-white);
    border: none;
    border-radius: 6px;
    padding: .5rem 1.1rem;
    font-size: .88rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    transition: background .15s;
}

.btn-portal-danger:hover {
    background: #b02a37;
    color: var(--hsg-white);
    text-decoration: none;
}

/* ── Buttons ────────────────────────────────────────────────────── */
.portal-btn {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .45rem 1.05rem;
    background: var(--hsg-primary);
    color: #fff !important;
    border: 1px solid transparent;
    border-radius: 6px;
    font-size: .875rem;
    font-weight: 600;
    text-decoration: none !important;
    cursor: pointer;
    line-height: 1.4;
    transition: background .15s, box-shadow .15s;
    white-space: nowrap;
}
.portal-btn:hover  { background: #d42828; box-shadow: 0 2px 6px rgba(255,49,49,.25); }
.portal-btn:active { background: #b91c1c; }

.portal-btn-sm {
    padding: .3rem .7rem;
    font-size: .8rem;
}

.portal-btn-secondary {
    background: #fff;
    color: var(--hsg-secondary) !important;
    border-color: var(--hsg-border);
}
.portal-btn-secondary:hover { background: var(--hsg-light); box-shadow: none; }

.portal-btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    padding: 0;
    border-radius: 6px;
}

/* ── Alerts ─────────────────────────────────────────────────────── */
.portal-alert {
    border-radius: 6px;
    padding: .8rem 1rem;
    font-size: .9rem;
    display: flex;
    align-items: flex-start;
    gap: .6rem;
    margin-bottom: 1rem;
}

.portal-alert.success { background: #d1e7dd; color: #0f5132; border: 1px solid #badbcc; }
.portal-alert.error   { background: #f8d7da; color: #842029; border: 1px solid #f5c2c7; }
.portal-alert.info    { background: #cff4fc; color: #055160; border: 1px solid #b6effb; }
.portal-alert.warning { background: #fff3cd; color: #664d03; border: 1px solid #ffecb5; }

/* ── Tables ─────────────────────────────────────────────────────── */
.portal-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .9rem;
}

.portal-table th {
    background: var(--hsg-light);
    font-weight: 600;
    font-size: .8rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--hsg-muted);
    padding: .65rem .9rem;
    border-bottom: 2px solid var(--hsg-border);
    text-align: left;
    white-space: nowrap;
}

.portal-table td {
    padding: .7rem .9rem;
    border-bottom: 1px solid var(--hsg-border);
    vertical-align: middle;
}

.portal-table tbody tr:hover { background: var(--hsg-light); }
.portal-table tbody tr:last-child td { border-bottom: none; }

/* ── Badges ─────────────────────────────────────────────────────── */
.badge-role {
    display: inline-block;
    padding: .2rem .55rem;
    border-radius: 20px;
    font-size: .72rem;
    font-weight: 600;
    line-height: 1.4;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.badge-role.sponsoren  { background: #fde8e8; color: #d42828; }
.badge-role.busplan    { background: #e6f4ea; color: #198754; }
.badge-role.events     { background: #e9e8fd; color: #2834d4; }
.badge-role.portal     { background: #f0f0f0; color: #313131; }
.badge-role.admin      { background: #313131; color: #fff; }
.badge-role.superadmin { background: #ff3131; color: #fff; }
.badge-role.trainer    { background: #198754; color: #fff; }
.badge-role.putzer     { background: #6c757d; color: #fff; }
.badge-role.sponsor    { background: #ff3131; color: #fff; }

/* ── Forms ──────────────────────────────────────────────────────── */
.portal-form-group { margin-bottom: 1rem; }

.portal-form-group label {
    display: block;
    font-size: .85rem;
    font-weight: 600;
    margin-bottom: .35rem;
    color: var(--hsg-text);
}

.portal-form-group input,
.portal-form-group select,
.portal-form-group textarea {
    width: 100%;
    padding: .55rem .8rem;
    border: 1px solid var(--hsg-border);
    border-radius: 6px;
    font-size: .9rem;
    color: var(--hsg-text);
    background: var(--hsg-white);
    transition: border-color .15s, box-shadow .15s;
}

.portal-form-group input:focus,
.portal-form-group select:focus,
.portal-form-group textarea:focus {
    border-color: var(--hsg-primary);
    box-shadow: 0 0 0 3px rgba(255,49,49,.15);
    outline: none;
}

/* ── Login page ─────────────────────────────────────────────────── */
.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--hsg-secondary) 0%, var(--hsg-primary) 100%);
    padding: 1rem;
}

.login-box {
    background: var(--hsg-white);
    border-radius: 14px;
    box-shadow: 0 8px 40px rgba(0,0,0,.22);
    padding: 2.5rem 2rem;
    width: 100%;
    max-width: 400px;
}

.login-logo {
    text-align: center;
    margin-bottom: 1.5rem;
}

.login-logo img {
    height: 80px;
    width: auto;
}

.login-title {
    text-align: center;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--hsg-secondary);
    margin-bottom: .25rem;
}

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

/* ── Responsive ─────────────────────────────────────────────────── */
@media (max-width: 1150px) {
    :root {
        --header-main-height: 70px;
        --header-total:       114px;
        --topbar-height:      114px;
    }

    .portal-header-logo-bg {
        width: 88px;
        height: 88px;
        border-radius: 15px;
    }

    .portal-header-logo { height: 100px; }

    .portal-nav-toggle { display: flex; }

    /* Portal-Main-Nav (im roten Balken) – mobile: als Dropdown unter dem Balken */
    .portal-main-nav {
        display: none;
        position: absolute;
        top: var(--header-main-height);
        left: 0;
        width: 100%;
        flex-direction: column;
        background: var(--hsg-secondary);
        border-top: 3px solid var(--hsg-primary);
        box-shadow: 0 6px 24px rgba(0,0,0,.28);
        z-index: 99;
        margin: 0;
        padding: 6px 0 10px;
    }

    .portal-main-nav.is-open { display: flex; }

    .portal-main-nav li { width: 100%; }

    .portal-main-nav li a {
        padding: 13px 24px;
        font-size: .95rem;
        border-radius: 0;
        border-bottom: 1px solid rgba(255,255,255,.08);
        display: block;
    }

    .portal-main-nav li:last-child a { border-bottom: none; }

    /* Sub-App-Nav (dunkler Balken) – mobile: als Dropdown */
    .portal-header-nav { overflow: visible; }

    .portal-header-nav ul {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        flex-direction: column;
        background: var(--hsg-secondary);
        border-top: 3px solid var(--hsg-primary);
        box-shadow: 0 6px 24px rgba(0,0,0,.28);
        z-index: 99;
        height: auto;
        padding: 6px 0 10px;
        gap: 0;
    }

    .portal-header-nav.is-open ul { display: flex; }

    .portal-header-nav ul li {
        width: 100%;
        height: auto;
        display: block;
    }

    .portal-header-nav ul li a {
        height: auto;
        padding: 13px 24px;
        font-size: .95rem;
        border-bottom: 1px solid rgba(255,255,255,.08);
        display: block;
    }

    .portal-header-nav ul li:last-child a { border-bottom: none; }

    /* Aktiver Link: statt vollem rotem Hintergrund nur linker Balken */
    .portal-header-nav ul li a.active {
        background: rgba(255,49,49,.12);
        border-left: 3px solid var(--hsg-primary);
        padding-left: 21px;
        color: #fff;
    }
    .portal-header-nav ul li a:hover {
        background: rgba(255,255,255,.07);
    }

    /* Trenner und Label im mobilen Menü ausblenden */
    .portal-header-nav ul li.nav-sep,
    .portal-header-nav ul li.nav-label { display: none; }

    /* Dropdown im dunklen Sub-Nav – mobile: Eltern ausblenden, Kinder flach */
    .portal-header-nav ul li.nav-dropdown > a { display: none; }
    .portal-header-nav ul li.nav-dropdown { display: contents; }
    .portal-header-nav ul li.nav-dropdown .nav-dropdown-menu { display: contents; }
    .portal-header-nav ul li.nav-dropdown .nav-dropdown-menu li {
        display: block;
        width: 100%;
    }

    /* Dropdown im roten Balken – mobile: Eltern ausblenden, Kinder flach */
    .portal-main-nav li.nav-dropdown > a { display: none; }
    .portal-main-nav li.nav-dropdown { display: contents; }
    .portal-main-nav li.nav-dropdown .nav-dropdown-menu { display: contents; }
    .portal-main-nav li.nav-dropdown .nav-dropdown-menu li {
        display: block;
        width: 100%;
    }
    .portal-main-nav li.nav-dropdown .nav-dropdown-menu li a {
        padding: 13px 24px;
        font-size: .95rem;
        border-bottom: 1px solid rgba(255,255,255,.08);
        display: block;
    }
}

@media (max-width: 590px) {
    :root {
        --header-main-height: 58px;
        --header-total:       102px;
        --topbar-height:      102px;
    }

    .portal-header-logo-bg {
        width: 75px;
        height: 75px;
        border-radius: 12px;
    }

    .portal-header-logo { height: 90px; }
    .portal-header-username { display: none; }
}

/* ── Konto-Seite ────────────────────────────────────────────────── */
.konto-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-top: .5rem;
}

@media (max-width: 720px) {
    .konto-grid { grid-template-columns: 1fr; }
}

/* ── Utility ────────────────────────────────────────────────────── */
.text-muted    { color: var(--hsg-muted) !important; }
.text-primary  { color: var(--hsg-primary) !important; }
.gap-2         { gap: .5rem; }
.d-flex        { display: flex; }
.align-items-center       { align-items: center; }
.justify-content-between  { justify-content: space-between; }
.flex-wrap     { flex-wrap: wrap; }
.mt-1 { margin-top: .25rem; }
.mt-2 { margin-top: .5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: .25rem; }
.mb-3 { margin-bottom: 1rem; }
.me-1 { margin-right: .25rem; }
.me-2 { margin-right: .5rem; }
.ms-auto { margin-left: auto; }
.w-100 { width: 100%; }

@media (max-width: 576px) {
    .bereich-grid { grid-template-columns: 1fr; }
    .portal-container { padding: 0 .75rem; }
    .login-box { padding: 2rem 1.25rem; }
}
