/**
 * HuddleSuite - Main CSS
 * 
 * Mobile-First Design System
 * Version: 1.0.0
 */

/* ==========================================================================
   CSS Variables (Design-System)
   ========================================================================== */

:root {
    /* Primärfarben (Society-Themes) */
    --hs-color-yellow: #FAC306;
    --hs-color-green: #60D34F;
    --hs-color-pink: #FF6613;   /* orange */
    --hs-color-cyan: #0AB5FF;
    --hs-color-violet: #9E80E8;   /* lila */
    /* Brand magenta — reserved for the demo society, not offered in the picker. */
    --hs-color-magenta: #FA06C6;

    /* UI-Farben */
    --hs-color-gray-light-1: #BFC4D3;
    --hs-color-gray-light-2: #D3D7E1;
    --hs-color-gray-light-3: #E1E3EB;
    --hs-color-gray-mid: #919AB4;
    --hs-color-gray-dark: #424A61;
    --hs-color-violet-dark: #3F1C42;
    --hs-color-white: #FFFFFF;
    --hs-color-black: #000000;

    /* Alert-Farben */
    --hs-color-success: #10A248;
    --hs-color-error: #FF0000;
    --hs-color-warning: #FF0000;
    --hs-color-info: #000000;

    /* Spacing */
    --hs-space-xs: 4px;
    --hs-space-sm: 8px;
    --hs-space-md: 12px;
    --hs-space-lg: 16px;
    --hs-space-xl: 24px;

    /* Border-Radius */
    --hs-radius-none: 0px;
    --hs-radius-btn: 10px;
    --hs-radius-sm: 15px;
    --hs-radius-md: 20px;
    --hs-radius-lg: 50px;

    /* Typografie - System Font Stack */
    --hs-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --hs-font-size-base: 16px;
    --hs-font-size-h1: 48px;
    --hs-font-size-h2: 38px;
    --hs-font-size-h3: 30px;
    --hs-font-size-h4: 24px;
    --hs-font-size-h5: 21px;
    --hs-font-size-h6: 17px;
}

/* ==========================================================================
   Base Styles
   ========================================================================== */

.huddlesuite {
    font-family: var(--hs-font-family);
    font-size: var(--hs-font-size-base);
    color: var(--hs-color-black);
    line-height: 1.5;
    width: 100%;
    background: var(--hs-color-white);
}

.huddlesuite * {
    box-sizing: border-box;
}

/* Content Wrapper - 1140px max width (matches Elementor/Astra container), centered */
.hs-content-wrapper {
    max-width: 1140px;
    margin: 0 auto;
    padding: var(--hs-space-lg);
    width: 100%;
}

/* ==========================================================================
   Hide Page Title on Society Pages (Meta-Daten funktionieren nicht immer)
   ========================================================================== */

/* Hide Astra page title */
.ast-page-builder-template .entry-header,
.ast-page-builder-template .entry-title {
    display: none !important;
}

/* Hide default WordPress/Theme title on pages with HuddleSuite shortcodes */
.page-template-elementor_canvas .entry-title,
.page-template-elementor_header_footer .entry-title,
body.page .entry-header .entry-title {
    display: none !important;
}

/* Generic fallback for any theme */
.page .site-main > .entry-header,
.single .site-main > .entry-header {
    display: none !important;
}

/* ==========================================================================
   Typography
   ========================================================================== */

.huddlesuite h1 {
    font-size: var(--hs-font-size-h1);
    font-weight: 700;
    margin: 0 0 0.5em 0;
}

.huddlesuite h2 {
    font-size: var(--hs-font-size-h2);
    font-weight: 700;
    margin: 0 0 0.5em 0;
}

.huddlesuite h3 {
    font-size: var(--hs-font-size-h3);
    font-weight: 700;
    margin: 0 0 0.5em 0;
}

.huddlesuite h4 {
    font-size: var(--hs-font-size-h4);
    font-weight: 600;
    margin: 0 0 0.5em 0;
}

.huddlesuite h5 {
    font-size: var(--hs-font-size-h5);
    font-weight: 600;
    margin: 0 0 0.5em 0;
}

.huddlesuite h6 {
    font-size: var(--hs-font-size-h6);
    font-weight: 600;
    margin: 0 0 0.5em 0;
}

.huddlesuite p {
    margin: 0 0 0.5em 0;
}

/* ==========================================================================
   Buttons
   ========================================================================== */


.hs-btn {
    font-family: var(--hs-font-family);
    font-size: 16px;
    font-weight: 700;
    padding: 14px 28px !important;
    min-height: 48px;
    border: none !important;
    border-radius: 6px !important;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    text-decoration: none;
    transition: background-color 0.2s ease, transform 0.1s ease;
    background: #000 !important;
    color: #fff !important;
    box-shadow: none !important;
    -webkit-tap-highlight-color: transparent;
    box-sizing: border-box;
    line-height: 1.3;
    /* Buttons are bold and mostly uppercase - without extra tracking the
       letters clump together. Same value the redesign buttons already use
       (.hs-btn-huddle in design.css). !important because Astra styles buttons
       by tag and would otherwise win. */
    letter-spacing: .07em !important;
}

/* ==========================================================================
   Forms & Inputs
   ========================================================================== */

.hs-form-group {
    margin-bottom: var(--hs-space-lg);
}

.hs-input,
.hs-textarea,
.hs-select {
    width: 100%;
    background: var(--hs-color-white);
    border: none !important;
    border-radius: var(--hs-radius-none);
    padding: var(--hs-space-sm) var(--hs-space-md);
    font-family: var(--hs-font-family);
    font-size: var(--hs-font-size-base);
    color: var(--hs-color-black);
    outline: none !important;
    box-shadow: none !important;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.hs-input:focus,
.hs-textarea:focus,
.hs-select:focus,
.hs-input:required,
.hs-input:invalid,
.hs-input:valid,
.hs-textarea:required,
.hs-textarea:invalid,
.hs-textarea:valid {
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
}

.hs-input::placeholder,
.hs-textarea::placeholder {
    color: var(--hs-color-gray-mid);
}

.hs-textarea {
    min-height: 100px;
    resize: vertical;
}

/* ==========================================================================
   Tables
   ========================================================================== */

.hs-table {
    width: 100%;
    background: var(--hs-color-white);
    border-collapse: collapse;
    font-family: var(--hs-font-family);
    font-size: var(--hs-font-size-base);
}

.hs-table thead th {
    background: var(--hs-color-black);
    color: var(--hs-color-white);
    font-weight: 600;
    text-align: left;
    padding: 6px;
    border: 1px solid var(--hs-color-white);
}

.hs-table tbody td {
    padding: 6px;
    color: var(--hs-color-black);
    font-size: 14px;
    line-height: 1.2;
    border: 1px solid var(--hs-color-white);
}

/* Zebrastreifen (Design-System: odd=#D3D7E1, even=#E1E3EB) */
.hs-table tbody tr:nth-child(odd) {
    background: var(--hs-color-gray-light-2);
}

.hs-table tbody tr:nth-child(even) {
    background: var(--hs-color-gray-light-3);
}

/* ==========================================================================
   Alerts & Benachrichtigungen
   ========================================================================== */

.hs-alert {
    border-radius: var(--hs-radius-sm);
    padding: var(--hs-space-md) var(--hs-space-lg);
    margin-bottom: var(--hs-space-lg);
    font-family: var(--hs-font-family);
    font-size: var(--hs-font-size-base);
}

.hs-alert-error {
    background: var(--hs-color-error);
    color: var(--hs-color-white);
}

.hs-alert-info {
    background: var(--hs-color-gray-light-1);
    color: var(--hs-color-black);
}

.hs-hidden { display: none; }
.hs-visible { display: block; }

/* ==========================================================================
   Specific Page Containers
   ========================================================================== */

/* ==========================================================================
   Auth Forms (Login, Register)
   ========================================================================== */

/* Auth Tabs (Login/Register Toggle) */
.hs-auth-tabs {
    display: flex;
    margin-bottom: var(--hs-space-lg);
    border-bottom: 2px solid var(--hs-color-gray-light-2);
}

.hs-auth-tab {
    flex: 1;
    padding: var(--hs-space-md) var(--hs-space-lg);
    text-align: center;
    text-decoration: none;
    color: var(--hs-color-gray-mid);
    font-weight: 600;
    font-size: var(--hs-font-size-base);
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s ease;
}

.hs-auth-tab:hover {
    color: var(--hs-color-black);
}

.hs-auth-tab.active {
    color: var(--hs-color-violet);
    border-bottom-color: var(--hs-color-violet);
}

/* ==========================================================================
   Login Section (SuM-Events-Stil: horizontal, 2-spaltig)
   ========================================================================== */

.hs-login-section {
    background: var(--hs-color-gray-light-1);
    border-radius: var(--hs-radius-sm);
    padding: var(--hs-space-xl);
    width: 100%;
}

/* The login section renders OUTSIDE the .huddlesuite wrapper, so the
   plugin's own border-box reset does not reach it. Astra happens to set
   border-box globally (which masks this live) - other themes do not:
   width:100% + padding then overflows the 390px viewport sideways. */
.hs-login-section,
.hs-login-section * {
    box-sizing: border-box;
}

.hs-login-description {
    margin: 0 0 var(--hs-space-lg) 0;
    font-size: var(--hs-font-size-base);
    color: var(--hs-color-black);
    line-height: 1.5;
}

/* 2-column layout for email + password side by side */
.hs-login-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--hs-space-lg);
}

/* Bold labels like SuM-Events */
.hs-login-section .hs-form-group label {
    font-weight: 700;
    font-size: 14px;
    margin-bottom: var(--hs-space-xs);
    text-align: left;
}

/* Footer: links left, button right */
.hs-login-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: var(--hs-space-lg);
    flex-wrap: wrap;
    gap: var(--hs-space-md);
}

.hs-login-links {
    display: flex;
    gap: var(--hs-space-md);
    flex-wrap: wrap;
    align-items: center;
}

.hs-login-links .hs-link {
    font-size: var(--hs-font-size-base);
    color: #000;
}

.hs-link-separator {
    color: #000;
    font-size: var(--hs-font-size-base);
}

/* Schmale Bildschirme: die zwei Wortlinks passen nicht nebeneinander, und
   beim Umbruch hing der Trennstrich allein am Zeilenende (Nicoles
   Trennpunkt-Regel, s. Kopf-Kachel 1.1.76). Untereinander, ohne Strich. */
@media (max-width: 600px) {
    .hs-link-separator { display: none; }
    .hs-login-links {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }
}

.hs-login-action .hs-btn {
    min-width: 160px;
}

/* Logged-in state */
.hs-login-logged-in {
    text-align: center;
}

.hs-login-logged-in p {
    margin-bottom: var(--hs-space-lg);
}

/* Login inside society page - no extra background */
.hs-society-auth {
    margin-top: var(--hs-space-lg);
    padding: 0 var(--hs-space-xl);
}

.hs-society-auth .hs-login-section {
    background: transparent;
    padding: var(--hs-space-lg) 0;
}

/* Responsive: stack fields on mobile */
@media (max-width: 767px) {
    .hs-login-fields {
        grid-template-columns: 1fr;
    }

    .hs-login-footer {
        flex-direction: column;
        align-items: flex-start;
    }

    .hs-login-action {
        width: 100%;
    }

    .hs-login-action .hs-btn {
        width: 100%;
    }
}

/* ==========================================================================
   Auth Container (Register form, legacy)
   ========================================================================== */

.hs-auth-container {
    max-width: 480px;
    margin: 0 auto;
    padding: var(--hs-space-lg);
}

.hs-auth-box {
    background: var(--hs-color-gray-light-1);
    border-radius: var(--hs-radius-sm);
    padding: var(--hs-space-xl);
}

.hs-auth-title {
    font-size: var(--hs-font-size-h2);
    font-weight: 700;
    color: var(--hs-color-black);
    margin: 0 0 var(--hs-space-xl) 0;
    text-align: center;
}

/* Register inside society page */
.hs-society-auth .hs-auth-container {
    max-width: none;
    padding: 0;
}

.hs-society-auth .hs-auth-box {
    background: transparent;
    padding: var(--hs-space-lg) 0;
}

/* Form Styles */
.hs-form {
    width: 100%;
}

/* Note: .hs-form-group base styles are defined above in Forms section */

.hs-form-group label {
    display: block;
    font-family: var(--hs-font-family);
    font-size: 14px;
    font-weight: 600;
    color: var(--hs-color-black);
    text-align: left;
    margin-bottom: var(--hs-space-xs);
}

.hs-input {
    width: 100%;
    background: var(--hs-color-white);
    border: none !important;
    border-radius: var(--hs-radius-none);
    padding: var(--hs-space-sm) var(--hs-space-md);
    font-family: var(--hs-font-family);
    font-size: var(--hs-font-size-base);
    color: var(--hs-color-black);
    outline: none !important;
    box-shadow: none !important;
}

.hs-input:focus {
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
}

.hs-input::placeholder {
    color: var(--hs-color-gray-mid);
}

/* Password Input Container with Toggle */
.hs-password-container {
    position: relative;
    display: block;
}

.hs-password-container .hs-input {
    padding-right: 40px;
}

/* The naked eye. Nicole, 19.07.2026: "die Augen brauchen KEINE schwarze
   Pille" - that pill was Astra painting its own button background/padding
   through our transparent rule, so every property Astra touches is forced
   here. Colour comes from `color` because the SVG strokes currentColor. */
.hs-password-toggle {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    user-select: none;
    z-index: 2;
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: auto !important;
    min-width: 0 !important;
    height: auto !important;
    min-height: 0 !important;
    background: none !important;
    background-color: transparent !important;
    background-image: none !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    outline: none !important;
    padding: 0 !important;
    margin: 0 !important;
    line-height: 1 !important;
    color: var(--hs-color-black, #000) !important;
    transition: color 0.2s ease;
    -webkit-appearance: none;
    appearance: none;
}

.hs-password-toggle:hover,
.hs-password-toggle:focus,
.hs-password-toggle:active {
    background: none !important;
    background-color: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    color: var(--hs-color-magenta, #FA06C6) !important;
}

.hs-password-toggle svg {
    display: block;
}

.hs-form-description {
    color: var(--hs-color-black);
    margin-bottom: var(--hs-space-lg);
    font-size: var(--hs-font-size-base);
}

.hs-form-actions {
    margin-top: var(--hs-space-xl);
    display: flex;
    gap: var(--hs-space-sm);
    flex-wrap: wrap;
}

.hs-form-actions .hs-btn {
    flex: 1;
    min-width: 120px;
}

.hs-form-links {
    margin-top: var(--hs-space-lg);
    text-align: center;
    font-size: var(--hs-font-size-base);
}

.hs-link {
    color: var(--hs-color-violet);
    text-decoration: none;
}

.hs-link:hover {
    text-decoration: underline;
}

/* Primary Button */
.hs-btn-primary {
    background: var(--hs-color-black) !important;
    color: var(--hs-color-white) !important;
}

/* Secondary Button */
.hs-btn-secondary {
    background: var(--hs-color-gray-dark) !important;
    color: var(--hs-color-white) !important;
}

/* Hover nur Desktop */
@media (min-width: 1024px) {
    .hs-btn-primary:hover,
    .hs-btn-secondary:hover {
        background: var(--hs-color-violet-dark);
    }
}

/* Logout Button - uses standard .hs-btn styling */

/* Checkbox Group */
.hs-checkbox-group {
    margin-bottom: var(--hs-space-lg);
}

.hs-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: var(--hs-space-sm);
    cursor: pointer;
    font-size: var(--hs-font-size-base);
}

.hs-checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    flex-shrink: 0;
    accent-color: var(--hs-color-violet);
}

.hs-checkbox-label span {
    flex: 1;
}

.hs-checkbox-label a {
    color: var(--hs-color-violet);
    text-decoration: none;
}

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

.hs-checkbox-label small.hs-hint {
    display: block;
    font-weight: normal;
    color: var(--hs-color-gray-mid);
    margin-top: 2px;
}

/* Society Info Box (Registration) */
.hs-society-info {
    background: var(--hs-color-white);
    border-radius: var(--hs-radius-sm);
    padding: var(--hs-space-lg);
    margin-bottom: var(--hs-space-lg);
    text-align: center;
}

.hs-society-info p {
    margin: 0 0 var(--hs-space-xs) 0;
    color: var(--hs-color-gray-mid);
}

.hs-society-info strong {
    font-size: var(--hs-font-size-h4);
    color: var(--hs-color-black);
}

/* Form Hint */
.hs-form-group .hs-hint {
    display: block;
    margin-top: var(--hs-space-xs);
    font-size: 14px;
    color: var(--hs-color-gray-mid);
}

/* Message Box */
.hs-message {
    border-radius: var(--hs-radius-sm);
    padding: var(--hs-space-md) var(--hs-space-lg);
    margin-top: var(--hs-space-lg);
    font-size: var(--hs-font-size-base);
}

.hs-message-success {
    background: var(--hs-color-success);
    color: var(--hs-color-white);
}

.hs-message-error {
    background: var(--hs-color-error);
    color: var(--hs-color-white);
}

.hs-message-info {
    background: var(--hs-color-gray-light-1);
    color: var(--hs-color-black);
}

/* Auth Required Box */
.hs-auth-required {
    text-align: center;
}

.hs-auth-required-message {
    margin-bottom: var(--hs-space-xl);
    font-size: var(--hs-font-size-base);
    color: var(--hs-color-black);
}

/* ==========================================================================
   Responsive
   ========================================================================== */

/* Mobile (default - Mobile First!) */
/* bis 767px */

@media (max-width: 767px) {
    /* Content */
    .hs-content-wrapper {
        padding: var(--hs-space-md);
    }


    /* Auth Forms */
    .hs-auth-container {
        padding: var(--hs-space-md);
    }

    .hs-auth-box {
        padding: var(--hs-space-lg);
    }

    .hs-auth-title {
        font-size: var(--hs-font-size-h3);
    }

    .hs-form-actions {
        flex-direction: column;
    }

    .hs-form-actions .hs-btn {
        width: 100%;
    }
}


/* Desktop */
@media (min-width: 1024px) {
    /* Desktop-spezifische Anpassungen hier */
}

/* ==========================================================================
   Society Overview & Cards
   ========================================================================== */

.hs-society-overview {
    width: 100%;
}

/* Society Page (single) - bordered container */
.hs-society-page {
    border: 4px solid #000;
    border-radius: var(--hs-radius-sm);
    overflow: hidden;
    text-align: center;
}

/* Light theme colors for society page body */
.hs-society-page.hs-page-yellow { background: #FFFFFF; }
.hs-society-page.hs-page-green { background: #FFFFFF; }
.hs-society-page.hs-page-pink { background: #FFFFFF; }
.hs-society-page.hs-page-cyan { background: #FFFFFF; }
.hs-society-page.hs-page-violet { background: #FFFFFF; }

/* Society Header with Color Theme + Auth */
.hs-society-header {
    background: var(--hs-color-violet);
    border-radius: 0;
    /* More air above the name since the Abmelden button left the head
       (Nicole, 17.07.2026). */
    padding: 24px var(--hs-space-xl) var(--hs-space-sm);
    border-bottom: 2px solid #000;
    text-align: center;
}

.hs-society-header h1 {
    margin: 0;
    color: var(--hs-color-white);
    /* Fluid instead of a fixed 38px: long names ("Die Donnerstagsrunde") broke
       onto a second line on phones. Shrinks with the viewport, never below 20px
       and never above the desktop size. A name long enough to wrap anyway gets
       even lines via text-wrap and cannot overflow the box. */
    font-size: clamp(20px, 6vw, var(--hs-font-size-h2));
    line-height: 1.15;
    text-wrap: balance;
    overflow-wrap: break-word;
}

/* Phones: give the name the room the wide side padding was eating. */
@media (max-width: 767px) {
    .hs-society-header {
        padding: var(--hs-space-sm) var(--hs-space-md);
    }
}

/* Society Header Theme Colors (reuse admin header patterns) */
.hs-society-header.hs-header-yellow { background: var(--hs-color-yellow); }
.hs-society-header.hs-header-green { background: var(--hs-color-green); }
.hs-society-header.hs-header-pink { background: var(--hs-color-pink); }
.hs-society-header.hs-header-cyan { background: var(--hs-color-cyan); }
.hs-society-header.hs-header-violet { background: var(--hs-color-violet); }

/* ===== MAGENTA — reserved for the demo society "Die Donnerstagsrunde".
   Brand colour #FA06C6; deliberately NOT listed in the colour picker, so only
   the seeder can assign it. Mirrors the violet rules across this file. Two-class
   selectors keep the same specificity as their violet siblings. ===== */
.hs-society-page.hs-page-magenta { background: #FFFFFF; }
.hs-society-header.hs-header-magenta { background: var(--hs-color-magenta, #FA06C6); }
.hs-theme-magenta .hs-society-card-header { background: var(--hs-color-magenta, #FA06C6); }
.hs-theme-magenta .hs-society-card-body { background: #FFFFFF; }
.hs-society-description-section.hs-desc-magenta { background: #FFFFFF; }
.hs-admin-theme-magenta { background: #FFFFFF; }

.hs-society-header.hs-header-yellow h1 { color: var(--hs-color-black); }

/* The header Abmelden button moved to the menu (17.07.2026) - rule removed
   with it, so nobody re-attaches markup to a dead class. */

/* Info bar below header (light color, inside bordered container) */
.hs-header-info-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 20px;
    font-size: 14px;
    color: #000;
}

/* Facts about THIS society, quiet on the white strip (Nicole, 20.07.2026 -
   replaced "Angemeldet als", which the profile modal now covers). Member
   count and partners sit on one line, separated by a middot; they wrap to
   the next line on a narrow phone instead of squeezing the manage link. */
.hs-header-info-facts {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px 10px;
    font-size: 13px;
    color: #000;
}

.hs-header-info-facts > * + *::before {
    content: "·";
    margin-right: 10px;
    color: #000;
}

.hs-header-info-partners a {
    color: #000;
    text-decoration: underline;
}

.hs-header-info-partners a:hover {
    color: var(--hs-color-magenta, #FA06C6);
}

/* Only shown when something is off (pending / blocked) - never for the
   normal member or admin case, so it reads as a warning, not as decoration. */
.hs-header-info-state {
    font-weight: 700;
    color: var(--hs-color-magenta, #FA06C6);
}

.hs-header-info-link {
    /* Archivo Black + Versalien (Nicole 17.07.2026). Smaller size on purpose:
       Black at caps needs less to carry the same weight. */
    font-family: "Archivo Black", "Segoe UI", system-ui, Arial, sans-serif;
    text-transform: uppercase;
    letter-spacing: .05em;
    font-size: 13px;
    font-weight: 400;
    color: #000 !important;
    text-decoration: none !important;
}

.hs-header-info-link:hover {
    text-decoration: underline !important;
}

/* Kopf-Kachel am Handy (Nicole, 08.08.2026: "nicht schön"). Drei Sachen
   gingen schief, sobald die Zeile nicht mehr auf einer Breite Platz hat:
   der Trennpunkt landete allein am Anfang der Umbruchzeile, "SOCIETY
   VERWALTEN" wurde rechts in zwei Zeilen gequetscht, und die Zeile war als
   einzige links/rechts ausgerichtet, waehrend Name, Impressum und
   "Freunde einladen" darueber und darunter zentriert stehen.
   Am Handy also: alles untereinander, zentriert, ohne Trennpunkte. */
@media (max-width: 600px) {
    .hs-header-info-bar {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 6px;
    }

    .hs-header-info-facts {
        flex-direction: column;
        align-items: center;
        gap: 3px;
    }

    .hs-header-info-facts > * + *::before { content: none; }
}

/* Legacy: keep for WP-Admin display */
.hs-header-user-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-top: var(--hs-space-sm);
}

.hs-header-username {
    font-size: 14px;
    color: rgba(255,255,255,0.9);
}

.hs-society-header.hs-header-yellow .hs-header-username {
    color: rgba(0,0,0,0.7);
}

/* Compact login form in header */
.hs-header-login-form {
    margin-top: var(--hs-space-md);
}

.hs-header-login-form .hs-login-section {
    background: transparent;
    padding: 0;
    margin: 0;
}

.hs-header-login-form .hs-form-group label {
    color: rgba(255,255,255,0.9);
}

.hs-society-header.hs-header-yellow .hs-header-login-form .hs-form-group label {
    color: rgba(0,0,0,0.7);
}

.hs-header-login-form .hs-login-fields {
    gap: var(--hs-space-xs);
}

/* Public Societies Section */
.hs-public-societies {
    margin-top: var(--hs-space-xl);
}

.hs-public-societies h2 {
    font-size: var(--hs-font-size-h3);
    font-weight: 700;
    color: var(--hs-color-violet);
    margin: 0 0 var(--hs-space-lg) 0;
}

/* Society Cards Grid */
.hs-society-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--hs-space-lg);
}

/* Single Society Card (clickable link) */
a.hs-society-card,
.hs-society-card {
    background: var(--hs-color-white);
    border-radius: var(--hs-radius-sm);
    border: 4px solid #000;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

@media (min-width: 1024px) {
    a.hs-society-card:hover {
        transform: translateY(-3px);
        box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
    }
}

/* Society Card Color Header - full section with name */
.hs-society-card-header {
    padding: var(--hs-space-xl) var(--hs-space-lg);
    width: 100%;
    border-bottom: 2px solid #000;
}

/* Theme Colors for Society Card Headers */
.hs-theme-yellow .hs-society-card-header { background: var(--hs-color-yellow); }
.hs-theme-green .hs-society-card-header { background: var(--hs-color-green); }
.hs-theme-pink .hs-society-card-header { background: var(--hs-color-pink); }
.hs-theme-cyan .hs-society-card-header { background: var(--hs-color-cyan); }
.hs-theme-violet .hs-society-card-header { background: var(--hs-color-violet); }

/* Text color inside card header */
.hs-society-card-header,
.hs-society-card-header * {
    color: var(--hs-color-white);
}

/* Yellow needs dark text for readability */
.hs-theme-yellow .hs-society-card-header,
.hs-theme-yellow .hs-society-card-header * {
    color: var(--hs-color-black);
}

.hs-society-card-name {
    font-size: var(--hs-font-size-h4);
    font-weight: 700;
    margin: 0;
}

/* Society Card Body (light theme color) */
.hs-society-card-body {
    padding: var(--hs-space-lg);
    flex: 1;
}

.hs-theme-yellow .hs-society-card-body { background: #FFFFFF; }
.hs-theme-green .hs-society-card-body { background: #FFFFFF; }
.hs-theme-pink .hs-society-card-body { background: #FFFFFF; }
.hs-theme-cyan .hs-society-card-body { background: #FFFFFF; }
.hs-theme-violet .hs-society-card-body { background: #FFFFFF; }

.hs-society-card-location {
    font-size: 14px;
    margin: 0 0 var(--hs-space-xs) 0;
    display: flex;
    align-items: center;
    gap: var(--hs-space-xs);
    color: #000;
}

.hs-icon-pin {
    font-size: 14px;
}

.hs-society-card-members {
    font-size: 14px;
    margin: 0 0 var(--hs-space-md) 0;
    font-weight: 600;
    color: #000;
}

.hs-society-card-description {
    font-size: var(--hs-font-size-base);
    color: var(--hs-color-gray-dark);
    margin: 0;
    line-height: 1.5;
}

/* Society Description Section (non-members, before login) */
.hs-society-description-section {
    border: 4px solid #000;
    border-radius: var(--hs-radius-sm);
    padding: var(--hs-space-lg) var(--hs-space-xl);
    overflow: hidden;
}

/* Description color themes - same light colors as society page */
.hs-society-description-section.hs-desc-yellow { background: #FFFFFF; }
.hs-society-description-section.hs-desc-green { background: #FFFFFF; }
.hs-society-description-section.hs-desc-pink { background: #FFFFFF; }
.hs-society-description-section.hs-desc-cyan { background: #FFFFFF; }
.hs-society-description-section.hs-desc-violet { background: #FFFFFF; }

.hs-society-description-title {
    font-size: 20px;
    font-weight: 700;
    text-transform: uppercase;
    margin: 0 0 var(--hs-space-md) 0;
    color: #000;
}

.hs-society-description-section p {
    font-size: var(--hs-font-size-base);
    line-height: 1.6;
    color: #000;
    margin: 0;
}

.hs-society-description-text {
    margin-bottom: var(--hs-space-lg) !important;
}

/* Image placeholders grid */
.hs-society-images-grid {
    display: flex;
    gap: var(--hs-space-md);
    flex-wrap: wrap;
}

/* Society images (public view) */
.hs-society-image {
    flex: 1;
    min-width: 200px;
    border-radius: var(--hs-radius-sm);
    overflow: hidden;
}

.hs-society-image img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: var(--hs-radius-sm);
}

/* Responsive: images side by side on desktop */
@media (min-width: 768px) {
    .hs-society-image {
        flex: 0 0 calc(33.333% - var(--hs-space-md));
    }
}

/* Public Societies Section (standalone shortcode) - SCHWARZER Container */
.hs-public-societies-section {
    width: 100%;
    background: var(--hs-color-black);
    border-radius: var(--hs-radius-sm);
    padding: var(--hs-space-xl);
}

.hs-public-societies-title {
    font-size: var(--hs-font-size-h3);
    font-weight: 700;
    color: #fff;
    margin: 0 0 var(--hs-space-lg) 0;
    text-transform: uppercase;
}

/* Create Button Wrapper (standalone shortcode) - KEIN Container, nur Button */
.hs-create-button-wrapper {
    margin-bottom: var(--hs-space-xl);
    width: fit-content;
    align-self: flex-start;
}

.hs-create-button-wrapper .hs-btn {
    width: auto;
    height: auto;
    font-size: var(--hs-font-size-h5);
    font-weight: 600;
    padding: 18px 48px;
}

/* Responsive Society Cards */
@media (max-width: 767px) {
    .hs-society-grid {
        grid-template-columns: 1fr;
    }

    .hs-public-societies-section {
        padding: var(--hs-space-lg);
    }

    .hs-public-societies h2 {
        font-size: var(--hs-font-size-h4);
    }
}

/* ==========================================================================
   Frontend Society Admin Dashboard
   ========================================================================== */

.hs-society-admin {
    width: 100%;
    max-width: 1140px;
    margin: 0 auto;
    background: var(--hs-color-gray-light-3);
    border-radius: var(--hs-radius-sm);
    padding: var(--hs-space-lg);
}

/* --------------------------------------------------------------------------
   CI-Typografie fuer den Frontend-Verwaltungsbereich (?admin=1).
   Dieser Teilbaum ist NICHT in .hs-redesign gewrappt, deshalb fiel er auf den
   System-Font-Stack aus main.css zurueck -> das waren Nicoles "falsche
   Schriften". Die Archivo-@font-face liegen in design.css (site-weit geladen),
   wir wenden sie hier nur per Name an. !important, weil Astra den Theme-Font
   auf body/Form-Controls setzt.
   -------------------------------------------------------------------------- */
.hs-society-admin,
.hs-society-admin input,
.hs-society-admin select,
.hs-society-admin textarea,
.hs-society-admin button {
    font-family: "Archivo", "Segoe UI", system-ui, Arial, sans-serif !important;
}

/* Ueberschriften + Tabellenkoepfe: Archivo Black in Versalien. */
.hs-society-admin h1,
.hs-society-admin h2,
.hs-society-admin h3,
.hs-society-admin h4,
.hs-society-admin .hs-table thead th {
    font-family: "Archivo Black", "Segoe UI", system-ui, Arial, sans-serif !important;
    font-weight: 400 !important; /* Archivo Black ist bereits fett - kein Faux-Bold */
}

.hs-society-admin .hs-admin-box h3,
.hs-society-admin .hs-table thead th {
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Admin dashboard background in society color (light shades) */
.hs-admin-theme-yellow { background: #FFFFFF; }
.hs-admin-theme-green { background: #FFFFFF; }
.hs-admin-theme-pink { background: #FFFFFF; }
.hs-admin-theme-cyan { background: #FFFFFF; }
.hs-admin-theme-violet { background: #FFFFFF; }

.hs-header-back-link {
    margin-top: var(--hs-space-md);
}

.hs-header-back-link .hs-link {
    color: var(--hs-color-black);
    font-size: var(--hs-font-size-base);
    text-decoration: none;
    font-weight: 500;
}

.hs-header-back-link .hs-link:hover {
    text-decoration: underline;
}

.hs-members-info-stats {
    display: flex;
    gap: var(--hs-space-lg);
    margin-bottom: var(--hs-space-md);
    font-size: 14px;
    color: var(--hs-color-gray-dark);
}

.hs-members-info-stats span {
    display: flex;
    align-items: center;
    gap: var(--hs-space-xs);
}

.hs-members-info-stats .hs-stat-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.hs-stat-dot-green { background: var(--hs-color-green); }
.hs-stat-dot-yellow { background: #d4a700; }
.hs-stat-dot-pink { background: var(--hs-color-pink); }

/* Tab Navigation */
.hs-admin-tabs {
    display: flex;
    gap: var(--hs-space-xs);
    margin-bottom: var(--hs-space-lg);
    border-bottom: 2px solid var(--hs-color-gray-light-2);
    padding-bottom: 0;
}

.hs-tab {
    padding: var(--hs-space-sm) var(--hs-space-lg);
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    color: var(--hs-color-gray-mid);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: var(--hs-space-xs);
}

.hs-tab:hover {
    color: var(--hs-color-black);
}

.hs-tab.active {
    color: var(--hs-color-violet);
    border-bottom-color: var(--hs-color-violet);
}

/* Badge */
.hs-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 700;
}

.hs-badge-warning {
    background: var(--hs-color-yellow);
    color: var(--hs-color-black);
}

/* Admin Content */
.hs-admin-content {
    padding: var(--hs-space-md) 0;
}

/* Statistics Cards */
.hs-admin-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--hs-space-lg);
    margin-bottom: var(--hs-space-xl);
}

.hs-stat-card {
    background: var(--hs-color-white);
    border-radius: var(--hs-radius-sm);
    padding: var(--hs-space-xl);
    text-align: center;
}

.hs-stat-card .hs-stat-number {
    font-size: 48px;
    font-weight: 700;
    line-height: 1;
    margin-bottom: var(--hs-space-sm);
}

.hs-stat-card .hs-stat-label {
    font-size: 14px;
    color: var(--hs-color-gray-dark);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Admin Box */
.hs-admin-box {
    background: var(--hs-color-white);
    border-radius: var(--hs-radius-sm);
    padding: var(--hs-space-xl);
    margin-bottom: var(--hs-space-lg);
}

.hs-admin-box h3 {
    margin: 0 0 var(--hs-space-md) 0;
    font-size: var(--hs-font-size-h4);
    color: var(--hs-color-black);
}

.hs-admin-box .hs-description {
    color: var(--hs-color-gray-mid);
    margin-bottom: var(--hs-space-lg);
}

/* Textareas in admin boxes need visible borders */
.hs-admin-box textarea.hs-input {
    border: 2px solid #ccc !important;
    border-radius: 6px;
    min-height: 100px;
    resize: vertical;
    transition: border-color 0.2s;
}

.hs-admin-box textarea.hs-input:focus {
    border-color: #333 !important;
}

/* Toggle switches for settings */
.hs-setting-toggle {
    display: flex;
    align-items: center;
    gap: 12px;
}

.hs-setting-toggle .hs-toggle-switch {
    position: relative;
    width: 48px;
    height: 26px;
    flex-shrink: 0;
}

.hs-setting-toggle .hs-toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.hs-setting-toggle .hs-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #ccc;
    border-radius: 26px;
    transition: background 0.3s;
}

.hs-setting-toggle .hs-toggle-slider:before {
    content: "";
    position: absolute;
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background: white;
    border-radius: 50%;
    transition: transform 0.3s;
}

.hs-setting-toggle .hs-toggle-switch input:checked + .hs-toggle-slider {
    background: #10A248;
}

.hs-setting-toggle .hs-toggle-switch input:checked + .hs-toggle-slider:before {
    transform: translateX(22px);
}

.hs-setting-toggle .hs-toggle-text {
    font-size: 14px;
    color: #333;
}

.hs-setting-hint {
    font-size: 13px;
    color: var(--hs-color-gray-mid);
    margin-top: 4px;
    line-height: 1.4;
}

/* Invite Box */
.hs-invite-box {
    background: var(--hs-color-gray-light-3);
    border-radius: var(--hs-radius-sm);
    padding: var(--hs-space-lg);
}

.hs-invite-url {
    margin-bottom: var(--hs-space-md);
}

.hs-invite-url code {
    display: block;
    padding: var(--hs-space-md);
    background: var(--hs-color-white);
    border-radius: 8px;
    font-size: 14px;
    word-break: break-all;
    border: 1px solid var(--hs-color-gray-light-2);
}

.hs-invite-actions {
    display: flex;
    gap: var(--hs-space-sm);
    flex-wrap: wrap;
}

.hs-filter-tab {
    padding: 2px 0;
    background: none;
    border: 0;
    border-radius: 0;
    color: var(--hs-color-gray-dark);
    text-decoration: none;
    font-size: 15px;
    font-weight: 600;
    transition: color 0.2s ease;
}

.hs-filter-tab:hover {
    background: none;
    color: var(--hs-color-black);
    text-decoration: underline;
}

.hs-filter-tab.active {
    background: none;
    color: var(--hs-color-black);
    font-weight: 800;
    text-decoration: underline;
    text-underline-offset: 4px;
    text-decoration-thickness: 2px;
}

.hs-role-badge {
    font-size: 10px;
    padding: 2px 8px;
    background: var(--hs-color-violet);
    color: var(--hs-color-white);
    border-radius: 10px;
    text-transform: uppercase;
    font-weight: 700;
}

.hs-status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.hs-status-active {
    background: #dcfce7;
    color: #166534;
}

.hs-status-pending {
    background: #fef3c7;
    color: #92400e;
}

.hs-status-blocked {
    background: #fee2e2;
    color: #991b1b;
}

/* Small Buttons - still touch-friendly */
.hs-btn-sm {
    padding: 10px 18px !important;
    font-size: 14px;
    min-height: 40px;
}

.hs-btn-danger {
    background: #dc2626 !important;
    color: var(--hs-color-white) !important;
}

.hs-btn-danger:hover {
    background: #b91c1c !important;
}

/* Settings */
.hs-setting-group {
    padding: var(--hs-space-md) 0;
    border-bottom: 1px solid var(--hs-color-gray-light-2);
}

.hs-setting-group:last-of-type {
    border-bottom: none;
}

.hs-setting-group label {
    display: block;
    font-weight: 600;
    color: var(--hs-color-gray-dark);
    margin-bottom: var(--hs-space-xs);
    font-size: 14px;
}

.hs-setting-value {
    color: var(--hs-color-black);
}

.hs-setting-value code {
    padding: 4px 8px;
    background: var(--hs-color-gray-light-3);
    border-radius: 4px;
    font-size: 14px;
}

/* Empty State */
.hs-empty-state {
    text-align: center;
    padding: var(--hs-space-xl);
    color: var(--hs-color-gray-mid);
}

/* Responsive Frontend Admin */
@media (max-width: 767px) {

    .hs-members-info-stats {
        flex-wrap: wrap;
        justify-content: center;
        gap: var(--hs-space-md);
    }

    .hs-admin-tabs {
        flex-wrap: wrap;
    }

    .hs-tab {
        flex: 1;
        text-align: center;
        justify-content: center;
    }

    .hs-invite-actions {
        flex-direction: column;
    }

    .hs-invite-actions .hs-btn {
        width: 100%;
        text-align: center;
    }
}

/* Body scroll lock when modal is open */
body.hs-modal-open {
    overflow: hidden !important;
}

/* iOS kennt kein overflow:hidden auf dem Body - dort friert main.js die
   Seite zusaetzlich per position:fixed ein (Klasse kommt zentral aus dem
   Beobachter in main.js); top traegt die gemerkte Scrollposition, damit
   die Seite beim Schliessen nicht springt (03.08.2026). */
body.hs-scroll-lock {
    position: fixed !important;
    left: 0;
    right: 0;
    width: 100%;
}

/* ============================================
   MODAL STYLES (Frontend)
   Works with jQuery fadeIn/fadeOut (display: block)
   Scrollable overlay with centered content
   (Web best-practice, compatible with all browsers)
   ============================================ */

.hs-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    z-index: 100000;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.hs-modal-content {
    background: var(--hs-color-gray-light-3);
    border-radius: 12px;
    width: calc(100% - 40px);
    max-width: 500px;
    max-height: 90vh;
    box-shadow: 0 10px 50px rgba(0,0,0,0.3);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    /* Desktop: centering via margin (no transform, allows proper scrolling) */
    position: relative;
    margin: 5vh auto;
}

.hs-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--hs-color-gray-light-2);
    flex-shrink: 0;
}

.hs-modal-header h2,
.hs-modal-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    color: var(--hs-color-black);
}

.hs-modal-close {
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    font-size: 28px;
    cursor: pointer;
    color: var(--hs-color-gray-mid) !important;
    padding: 0 !important;
    line-height: 1;
    width: 44px;
    height: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50% !important;
    transition: background 0.2s ease;
    flex-shrink: 0;
}

.hs-modal-close:hover {
    background: var(--hs-color-gray-light-2) !important;
    color: var(--hs-color-black) !important;
}

.hs-modal-body {
    padding: 16px 20px;
    overflow-y: auto;
    flex: 1;
    -webkit-overflow-scrolling: touch;
}

.hs-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 16px 20px;
    border-top: 1px solid var(--hs-color-gray-light-2);
    flex-shrink: 0;
    flex-wrap: wrap;
}

/* ============================================
   STEP WIZARD
   ============================================ */

.hs-steps {
    display: flex;
    justify-content: center;
    gap: var(--hs-space-xl);
    margin-bottom: var(--hs-space-xl);
    padding-bottom: var(--hs-space-lg);
    border-bottom: 1px solid var(--hs-color-gray-light-2);
}

.hs-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--hs-space-xs);
    opacity: 0.4;
    transition: opacity 0.3s ease;
}

.hs-step.active,
.hs-step.completed {
    opacity: 1;
}

.hs-step-number {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--hs-color-gray-light-2);
    color: var(--hs-color-gray-mid);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
    transition: background 0.3s ease, color 0.3s ease;
}

.hs-step.active .hs-step-number {
    background: var(--hs-color-violet);
    color: var(--hs-color-white);
}

.hs-step.completed .hs-step-number {
    background: var(--hs-color-green);
    color: var(--hs-color-white);
}

.hs-step.completed .hs-step-number::before {
    content: "\2713";
}

.hs-step-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--hs-color-gray-mid);
}

.hs-step.active .hs-step-label {
    color: var(--hs-color-black);
}

.hs-step-intro {
    text-align: center;
    color: var(--hs-color-gray-mid);
    margin-bottom: var(--hs-space-lg);
    font-size: 15px;
}

/* ============================================
   COLOR PICKER (Frontend)
   ============================================ */

.hs-color-picker {
    display: flex;
    gap: var(--hs-space-sm);
    flex-wrap: wrap;
    justify-content: center;
}

.hs-color-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    padding: var(--hs-space-sm);
    border-radius: var(--hs-radius-md);
    border: 2px solid transparent;
    transition: all 0.2s ease;
}

.hs-color-option:hover {
    background: var(--hs-color-gray-light-3);
}

.hs-color-option input[type="radio"] {
    display: none;
}

.hs-color-swatch {
    display: block;
    width: 44px;
    height: 44px;
    min-width: 44px;
    flex-shrink: 0;
    border-radius: 10px;
    border: 3px solid rgba(0,0,0,0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hs-color-option input[type="radio"]:checked + .hs-color-swatch {
    transform: scale(1.15);
    box-shadow: 0 0 0 3px var(--hs-color-white), 0 0 0 5px currentColor;
}

.hs-color-option input[type="radio"]:checked ~ .hs-color-label {
    font-weight: 700;
    color: var(--hs-color-black);
}

.hs-color-label {
    margin-top: var(--hs-space-xs);
    font-size: 12px;
    color: var(--hs-color-gray-mid);
}

/* ============================================
   MESSAGE STYLES
   ============================================ */

.hs-message {
    padding: var(--hs-space-md);
    border-radius: var(--hs-radius-md);
    margin-top: var(--hs-space-md);
    font-size: 14px;
}

.hs-message-success {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.hs-message-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* ============================================
   RESPONSIVE MODAL - Mobile
   Scrollable overlay with centered content
   (no position:fixed on content - breaks iOS/Android)
   ============================================ */

@media (max-width: 767px) {
    .hs-modal {
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        padding: 16px 0;
    }

    .hs-modal-content {
        position: relative;
        bottom: auto;
        left: auto;
        right: auto;
        top: auto;
        transform: none;
        margin: 0 auto;
        width: 92%;
        max-width: 500px;
        max-height: none;
        border-radius: 12px;
    }

    .hs-modal-header {
        padding: 14px 16px;
    }

    .hs-modal-body {
        padding: 14px 16px;
        max-height: 70vh;
        max-height: 70dvh;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .hs-modal-footer {
        padding: 14px 16px 24px;
        flex-direction: column;
    }

    .hs-modal-footer .hs-btn {
        width: 100%;
    }

    .hs-steps {
        gap: var(--hs-space-md);
    }

    .hs-step-label {
        font-size: 11px;
    }

    .hs-color-picker {
        gap: var(--hs-space-xs);
    }

    .hs-color-swatch {
        width: 36px;
        height: 36px;
    }

    .hs-color-label {
        font-size: 10px;
    }
}

/* ==========================================================================
   Slide Panel (Member Edit)
   ========================================================================== */

/* Slide Panel Backdrop */
.hs-slide-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.hs-slide-backdrop.active {
    display: block;
    opacity: 1;
}

/* Slide Panel Container */
.hs-slide-panel {
    position: fixed;
    top: 0;
    right: -500px;
    width: 100%;
    max-width: 500px;
    height: 100vh;
    background: var(--hs-color-white);
    z-index: 9999;
    overflow-y: auto;
    box-shadow: -4px 0 12px rgba(0, 0, 0, 0.15);
    transition: right 0.3s ease;
}

.hs-slide-panel.active {
    right: 0;
}

/* Panel Header */
.hs-slide-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--hs-space-xl);
    background: var(--hs-color-gray-light-1);
    border-bottom: 1px solid var(--hs-color-gray-light-2);
    position: sticky;
    top: 0;
    z-index: 10;
}

.hs-slide-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: var(--hs-color-black);
}

.hs-slide-close {
    background: transparent;
    border: none;
    font-size: 28px;
    line-height: 1;
    color: var(--hs-color-gray-dark);
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}

.hs-slide-close:hover {
    color: var(--hs-color-black);
}

/* Panel Body */
.hs-slide-body {
    padding: var(--hs-space-xl);
}

/* Panel Form Groups */
.hs-slide-form-group {
    margin-bottom: var(--hs-space-xl);
}

.hs-slide-form-group label {
    display: block;
    margin-bottom: var(--hs-space-sm);
    font-weight: 600;
    color: var(--hs-color-black);
}

.hs-slide-form-group input[type="text"],
.hs-slide-form-group input[type="email"],
.hs-slide-form-group select {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--hs-color-white);
    border-radius: var(--hs-radius-btn);
    font-size: 16px;
    font-family: var(--hs-font-family);
    background: var(--hs-color-gray-light-3);
    transition: border-color 0.2s ease;
}

.hs-slide-form-group input:focus,
.hs-slide-form-group select:focus {
    outline: none;
    border-color: var(--hs-color-gray-mid);
}

.hs-slide-form-group input:disabled {
    background: var(--hs-color-gray-light-2);
    color: var(--hs-color-gray-mid);
    cursor: not-allowed;
}

.hs-slide-form-hint {
    font-size: 13px;
    color: var(--hs-color-gray-dark);
    margin-top: var(--hs-space-sm);
    font-style: italic;
}

/* Panel Footer */
.hs-slide-footer {
    padding: var(--hs-space-xl);
    background: var(--hs-color-gray-light-1);
    border-top: 1px solid var(--hs-color-gray-light-2);
    position: sticky;
    bottom: 0;
    display: flex;
    gap: var(--hs-space-md);
    justify-content: flex-end;
}

.hs-slide-footer .hs-btn {
    min-width: 120px;
}

/* Delete Section */
/* Danger zone box in settings tab */
.hs-admin-box.hs-danger-zone {
    border: 2px solid #dc3232;
    background: #fff5f5;
}

.hs-admin-box.hs-danger-zone h3 {
    color: #dc3232;
}

.hs-slide-danger-zone {
    margin-top: var(--hs-space-xl);
    padding: var(--hs-space-xl);
    background: #FFF5F5;
    border: 2px solid #FF0000;
    border-radius: var(--hs-radius-btn);
}

.hs-slide-danger-zone h4 {
    margin: 0 0 var(--hs-space-sm) 0;
    color: #FF0000;
    font-size: 16px;
}

.hs-slide-danger-zone p {
    margin: 0 0 var(--hs-space-md) 0;
    font-size: 14px;
    color: var(--hs-color-gray-dark);
}

/* Mobile Anpassungen */
@media (max-width: 768px) {
    .hs-slide-panel {
        top: auto;
        right: 0;
        bottom: -100%;
        left: 0;
        width: 100%;
        max-width: 100%;
        height: 90vh;
        max-height: 90vh;
        border-radius: var(--hs-radius-md) var(--hs-radius-md) 0 0;
        transition: bottom 0.3s ease;
    }

    .hs-slide-panel.active {
        bottom: 0;
        right: 0;
    }

    .hs-slide-footer {
        flex-direction: column;
    }

    .hs-slide-footer .hs-btn {
        width: 100%;
    }
}

/* ==========================================================================
   Members Table (Frontend Admin)
   ========================================================================== */

.hs-table-container {
    overflow-x: auto;
    margin-top: var(--hs-space-lg);
}

.hs-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--hs-color-white);
}

/* Table Header */
.hs-table thead {
    background: var(--hs-color-black);
    color: var(--hs-color-white);
}

.hs-table th {
    padding: 14px 16px;
    text-align: left;
    font-weight: 600;
    font-size: 14px;
    white-space: nowrap;
}

/* Table Body */
.hs-table tbody tr {
    border-bottom: 1px solid var(--hs-color-gray-light-2);
    transition: background-color 0.15s ease;
}

/* Zebra-Stripes */
.hs-table tbody tr:nth-child(even) {
    background: var(--hs-color-gray-light-3);
}

.hs-table tbody tr:nth-child(odd) {
    background: var(--hs-color-white);
}

.hs-table tbody tr:hover {
    background: var(--hs-color-gray-light-2);
}

.hs-table td {
    padding: 14px 16px;
    font-size: 14px;
    vertical-align: middle;
}

.hs-table td strong {
    font-weight: 600;
    color: var(--hs-color-black);
}

/* Role Badge */
.hs-role-badge {
    display: inline-block;
    padding: 3px 10px;
    background: var(--hs-color-violet);
    color: var(--hs-color-black);
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

/* Status Badges */
.hs-status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.hs-status-active {
    background: var(--hs-color-green);
    color: var(--hs-color-black);
}

.hs-status-pending {
    background: var(--hs-color-yellow);
    color: var(--hs-color-black);
}

.hs-status-blocked {
    background: var(--hs-color-pink);
    color: var(--hs-color-black);
}

/* Action Links */
.hs-table-actions {
    white-space: nowrap;
}

.hs-action-link {
    color: var(--hs-color-black);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: color 0.2s ease;
}

.hs-action-link:hover {
    color: var(--hs-color-violet);
    text-decoration: underline;
}

.hs-action-success {
    color: var(--hs-color-green) !important;
}

.hs-action-danger {
    color: var(--hs-color-pink) !important;
}

.hs-action-separator {
    margin: 0 8px;
    color: var(--hs-color-gray-mid);
}

/* Helper classes */
.hs-text-muted {
    color: #888;
}

/* Events admin actions bar - create button sits on the right */
.hs-events-admin-actions {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
}

/* Mobile Anpassungen */
@media (max-width: 768px) {
    .hs-table {
        font-size: 13px;
    }

    .hs-table th,
    .hs-table td {
        padding: 10px 12px;
        font-size: 13px;
    }

    .hs-action-link {
        font-size: 13px;
    }

    .hs-action-separator {
        margin: 0 6px;
    }
}

/* Very small screens: Make table scrollable.
   Die Event-Verwaltung ist ausgenommen - dort steht in Spalte 3 der TITEL,
   und ohne ihn ist die Liste am Handy nicht zu gebrauchen (Nicole,
   08.08.2026: "der Ort ist weniger wichtig"). */
@media (max-width: 480px) {
    .hs-table:not(.hs-events-admin-table) th:nth-child(3),
    .hs-table:not(.hs-events-admin-table) td:nth-child(3),
    .hs-table:not(.hs-events-admin-table) th:nth-child(5),
    .hs-table:not(.hs-events-admin-table) td:nth-child(5) {
        display: none;
    }

    /* Event-Verwaltung: Titel bleibt, dafuer weichen Ort (4) und
       Teilnehmer (5) - die Zahl steht ohnehin im Event-Fenster. */
    .hs-events-admin-table th:nth-child(4),
    .hs-events-admin-table td:nth-child(4),
    .hs-events-admin-table th:nth-child(5),
    .hs-events-admin-table td:nth-child(5) {
        display: none;
    }

    /* Der Titel bekommt den frei gewordenen Platz - sonst bricht er in
       Einzelwoerter um, waehrend daneben Luft steht. Engeres Zellenpolster,
       damit neben Datum und Titel noch der Status ins Bild passt; fuer die
       Aktionen wischt man weiter (fuenf Spalten passen auf kein Handy). */
    .hs-events-admin-table td:nth-child(3) { min-width: 150px; }
    .hs-events-admin-table th,
    .hs-events-admin-table td { padding-left: 4px; padding-right: 4px; }

    /* Die Aktionen stehen untereinander statt in einer langen Zeile: das
       macht die Spalte schmal genug, dass die Zeile ohne Wischen lesbar
       bleibt. Die Trennstriche braucht es dann nicht mehr. */
    .hs-events-admin-table .hs-actions-cell { white-space: normal; }
    .hs-events-admin-table .hs-actions-cell .hs-link { display: block; text-align: left; }
    .hs-events-admin-table .hs-actions-cell .hs-action-separator { display: none; }
}


/* =========================================================================
   PWA ONBOARDING POPUP (Zum Home-Bildschirm, added 4.8.0)
   ========================================================================= */

.hs-pwa-onboarding-content {
    max-width: 420px;
    width: 92%;
    border-radius: 12px;
}

.hs-pwa-onboarding .hs-modal-body p {
    font-size: 14px;
    line-height: 1.5;
}

.hs-pwa-steps {
    margin: 12px 0;
    padding-left: 22px;
    font-size: 14px;
    line-height: 1.7;
}

.hs-pwa-key {
    display: inline-block;
    min-width: 22px;
    text-align: center;
    border: 1px solid #ccc;
    border-radius: 5px;
    padding: 0 4px;
    background: #f5f5f5;
    font-size: 13px;
}

.hs-pwa-both-label {
    margin: 10px 0 2px;
}

/* =========================================================================
   "WHAT'S NEW" STRIP IN THE CALENDAR (added 4.8.0)
   ========================================================================= */

.hs-whats-new {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 14px;
    padding: 10px 14px;
    background: #FFF8E1;
    border: 1px solid #F0C040;
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.5;
}

.hs-whats-new-icon {
    font-size: 16px;
    line-height: 1.2;
}

/* =========================================================================
   WEB-APP BACK BUTTON (Nicole 17.07.2026, Punkt 2)
   The manifest uses display:standalone -> iOS drops the Safari bar, and with it
   the only way back. This arrow replaces it. .hs-standalone is set by main.js
   ONLY when the page really runs as an installed app, so the browser never
   sees this button.
   ========================================================================= */

.hs-app-back {
    display: none;
}

.hs-standalone .hs-app-back.is-visible {
    display: flex;
    position: fixed;
    /* Below the 10px brand stripe, clear of the iPhone status bar. */
    top: calc(env(safe-area-inset-top, 0px) + 18px);
    left: calc(env(safe-area-inset-left, 0px) + 12px);
    z-index: 99999;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    /* !important: Astra skins every <button> (background/border/shadow/radius). */
    padding: 0 !important;
    border: none !important;
    border-radius: 50% !important;
    background: #0B0B0D !important;
    color: #fff !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .25) !important;
    cursor: pointer;
}

.hs-standalone .hs-app-back svg {
    width: 22px;
    height: 22px;
}

.hs-standalone .hs-app-back:active {
    background: #FA06C6 !important;
}

/* Inside the modal the section's own grey box steps back - the modal surface
   already is the grey. Grey-in-grey was exactly the mistake the polls band
   just got rid of. */
.hs-modal-content .hs-login-section {
    background: none;
    border-radius: 0;
    padding: 0;
}

.hs-login-modal-content {
    max-width: 440px;
}

/* The page variant lays email+password side by side via .hs-login-fields -
   in a 440px modal they stack. */
.hs-modal-content .hs-login-fields {
    display: flex;
    flex-direction: column;
    gap: var(--hs-space-md);
}

/* "Administrator kontaktieren" needs a society context (.hs-society-page) to
   know WHOSE admin - the menu's login modal opens on Home/overview, where
   there is none and the link could only produce an error. Hide it there;
   "Passwort vergessen?" stays. */
#hs-login-modal .hs-contact-admin-link,
#hs-login-modal .hs-link-separator {
    display: none;
}

/* =========================================================================
   PLUGIN MENU ITEMS (Nicole 17.07.2026)
   Spacing comes from class="menu-link" on our anchors - the class Astra
   hangs its item padding on, desktop AND burger. The earlier margin-left
   hack fixed only the desktop and left the burger entries flush at the
   screen edge; with menu-link both follow the theme natively.
   ========================================================================= */

/* Invite QR (Nicole 17.07.2026): white tile so the code scans on any
   background, centred under the buttons. The img/canvas the lib renders
   must not be squeezed by theme rules. */
#hs-invite-qr-wrap {
    margin-top: 16px;
    text-align: center;
}

#hs-invite-qr {
    display: inline-block;
    padding: 16px;
    background: #fff;
    border: 2px solid #000;
}

#hs-invite-qr img,
#hs-invite-qr canvas {
    display: block;
    max-width: none;
}

/* "Freunde einladen" UNDER the head tile (Nicole, 17.07.2026: "dezent, ohne
   schwarzen Button"). Text links in the approved Abo-Link look: black + bold,
   small stroked icon, no underline, hover magenta. Centred in the white area
   between tile and grey band.
   19.07.2026 (Nicole): ONE row on phones too, just tighter - the stacked
   version cost three lines of scroll. Title black, not grey. */
.hs-member-invite {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 14px;
}

/* The QR code always breaks onto its own full line under the row. */
.hs-member-invite #hs-invite-qr-wrap {
    flex-basis: 100%;
}

@media (max-width: 600px) {
    .hs-member-invite {
        gap: 10px;
        margin-top: 8px;
    }
    .hs-member-invite-title { font-size: 11px; }
    a.hs-invite-link { font-size: 13px; }
}

.hs-member-invite-title {
    font-family: "Archivo Black", "Segoe UI", system-ui, Arial, sans-serif;
    text-transform: uppercase;
    letter-spacing: .05em;
    font-size: 12px;
    color: #000; /* Nicole 18.07.2026: black, not grey */
}

a.hs-invite-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 700;
    color: #000 !important;
    text-decoration: none !important;
}

a.hs-invite-link:hover {
    color: #FA06C6 !important;
}

.hs-invite-icon {
    width: 16px;
    height: 16px;
    flex: 0 0 auto;
}

/* The QR code opens centred on its own full row below the links. */
.hs-member-invite #hs-invite-qr-wrap {
    flex-basis: 100%;
    text-align: center;
}

/* Manual invite-code entry under the login form (folded by default). */
.hs-invite-entry {
    margin-top: 16px;
    text-align: center;
}

#hs-invite-entry-form {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 10px;
}

#hs-invite-entry-code {
    max-width: 220px;
}

#hs-invite-entry-message {
    flex-basis: 100%;
}

/* Invite-link modal (register/login tabs). The forms bring their own grey
   boxes and a shouting REGISTRIEREN heading - inside the modal the surface
   is already there and the tabs already name the two modes. */
.hs-invite-auth-content {
    max-width: 560px;
}

#hs-invite-auth-modal .hs-auth-box {
    background: none;
    padding: 0;
    box-shadow: none;
    border: 0;
}

#hs-invite-auth-modal .hs-auth-title {
    display: none;
}

#hs-invite-auth-modal .hs-society-auth {
    background: none;
    padding: 0;
    margin: 0;
}

/* Scroll-to-top arrow (Nicole, 18.07.2026: "man scrollt sich den Wolf").
   Fixed bottom right, appears after some scrolling. !important on the box:
   Astra skins every <button>. */
#hs-scroll-top {
    position: fixed;
    right: 16px;
    bottom: 16px;
    z-index: 9990;
    width: 44px;
    height: 44px;
    border-radius: 50% !important;
    background: #0B0B0D !important;
    color: #fff !important;
    border: none !important;
    box-shadow: none !important;
    font-size: 20px;
    line-height: 1;
    padding: 0 !important;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
}

#hs-scroll-top.hs-visible { display: flex; }

#hs-scroll-top:hover {
    background: #FA06C6 !important;
    color: #000 !important;
}
