/* Hub CSS - Member Dashboard */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;700&family=Lato:wght@400;700;900&display=swap');

[x-cloak] { display: none !important; }

/* Tab nav used in the voting standings card */
.vote-tab {
    padding: 0.625rem 1.25rem;
    font-size: 0.9rem;
    color: var(--hub-text-muted);
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    cursor: pointer;
    transition: color 0.15s ease, border-color 0.15s ease;
}
.vote-tab:hover { color: var(--hub-text); }
.vote-tab--active { color: var(--hub-link); border-bottom-color: var(--hub-link); }

/* ========================================
   HTMX Loading Indicator
   ======================================== */
.htmx-request .hub-content {
    opacity: 0.6;
    transition: opacity 200ms ease-out;
}

/* ========================================
   CSS Custom Properties - Dark (default)
   ======================================== */
:root {
    /* Surfaces — "Obsidian" elevation ladder (near-black charcoal).
       Distinct layers replace the old single flat navy so the UI reads
       as depth, not one monotone wash. Anchored on PL blue #092e4b. */
    --hub-bg: #0a0b10;            /* deepest page background */
    --hub-surface: #13151d;       /* inset panels, tiles, table stripes */
    --hub-card-bg: #181b24;       /* cards & modals (sits above the page) */
    --hub-elevated: #20242f;      /* dropdowns, popovers, raised pills */
    --hub-card-border: rgba(255, 255, 255, 0.07);
    --hub-border: rgba(255, 255, 255, 0.08);
    --hub-border-strong: rgba(255, 255, 255, 0.14);
    --hub-text: #F4EFDD;
    --hub-text-muted: #8b97a8;
    --hub-topbar-bg: #0d0f15;
    --hub-topbar-border: rgba(255,255,255,0.06);
    --hub-dropdown-bg: #20242f;
    --hub-dropdown-border: rgba(255,255,255,0.10);
    --hub-input-bg: #14161f;
    --hub-input-border: rgba(255,255,255,0.14);

    /* Sidebar — theme-aware (was hardcoded to --color-navy, which never
       switched on light mode). These tokens are overridden under [data-theme]. */
    --hub-sidebar-bg: #0d0f15;
    --hub-sidebar-text: #F4EFDD;
    --hub-sidebar-muted: rgba(244, 239, 221, 0.60);
    --hub-sidebar-hover: rgba(255, 255, 255, 0.06);
    --hub-sidebar-border: rgba(255, 255, 255, 0.08);

    --color-navy: #092E4C;        /* brand structural blue (button text, overlays) */
    /* Brighter PL-blue sibling for interactive/structural accents on dark */
    --hub-blue: #3d8bd4;
    --hub-blue-soft: rgba(61, 139, 212, 0.15);
    /* Hero gradient: PL blue #092e4b fading to near-black ("black & blue") */
    --hub-hero-from: #15527f;
    --hub-hero-mid: #092e4b;
    --hub-hero-to: #0a0d14;

    --color-tuscan-yellow: #EEB44B;
    --color-yellow-hover: #d4a043;
    /* Gold as TEXT (links, active tabs, prices). Theme-aware so it stays
       bright on dark but darkens to a readable amber on light surfaces.
       Gold FILLS (buttons, pills, bars) keep --color-tuscan-yellow. */
    --hub-link: #EEB44B;
    --hub-link-hover: #d4a043;
    --color-cream: #F4EFDD;
    --color-brand-link: #3d8bd4;
    --color-error: #f0a0a0;
    --color-error-bg: rgba(240, 160, 160, 0.12);
    --color-success: #7bc88f;
    --color-success-bg: rgba(123, 200, 143, 0.12);

    --font-heading: 'Lato', system-ui, -apple-system, sans-serif;
    --font-body: 'Inter', system-ui, -apple-system, sans-serif;

    --sidebar-width: 220px;
    --topbar-height: 56px;
}

/* ========================================
   Light Theme Override
   ======================================== */
[data-theme="light"] {
    /* "Slate" light — cool neutral gray (not warm cream) with white cards. */
    --hub-bg: #eef0f3;
    --hub-surface: #e6e9ee;
    --hub-card-bg: #ffffff;
    --hub-elevated: #ffffff;
    --hub-card-border: #dfe3ea;
    --hub-border: #e2e6ec;
    --hub-border-strong: #cfd5de;
    --hub-text: #1D1E1E;
    --hub-text-muted: #5b6675;
    --hub-topbar-bg: #ffffff;
    --hub-topbar-border: #e2e6ec;
    --hub-dropdown-bg: #ffffff;
    --hub-dropdown-border: #e2e6ec;
    --hub-input-bg: #f4f6f8;
    --hub-input-border: #d3d9e1;

    /* Sidebar follows the theme (the fix) — light rail in light mode. */
    --hub-sidebar-bg: #ffffff;
    --hub-sidebar-text: #1D1E1E;
    --hub-sidebar-muted: #5b6675;
    --hub-sidebar-hover: rgba(9, 46, 75, 0.06);
    --hub-sidebar-border: #e2e6ec;

    --hub-blue: #2f6fb0;
    --hub-blue-soft: rgba(9, 46, 75, 0.08);
    --hub-hero-from: #f8fafc;
    --hub-hero-mid: #f1f5f9;
    --hub-hero-to: #e2e8f0;

    /* Darker amber for gold text on white (~5:1 contrast, passes AA). */
    --hub-link: #9c5e0d;
    --hub-link-hover: #7e4b09;
}

/* ========================================
   Reset & Base
   ======================================== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

body {
    font-family: var(--font-body);
    font-weight: 300;
    line-height: 1.6;
    background-color: var(--hub-bg);
    color: var(--hub-text);
    min-height: 100vh;
    display: flex;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    color: var(--hub-text);
}

a {
    color: var(--hub-link);
    text-decoration: none;
    transition: color 0.15s ease;
}

a:hover { color: var(--hub-link-hover); }

/* ========================================
   Sidebar
   ======================================== */
.hub-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    height: 100dvh; /* dynamic viewport height — survives mobile URL-bar collapse */
    background-color: var(--hub-sidebar-bg);
    border-right: 1px solid var(--hub-sidebar-border);
    display: flex;
    flex-direction: column;
    z-index: 100;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    transition: transform 0.2s ease;
    padding-bottom: env(safe-area-inset-bottom, 0px);
}

.hub-sidebar--closed {
    transform: translateX(-100%);
}

/* Shared brand block — identical in hub and admin */
.pl-brand {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 1.25rem 1rem;
    color: var(--hub-sidebar-text);
    border-bottom: 1px solid var(--hub-sidebar-border);
    text-decoration: none;
}

.pl-brand:hover { color: var(--hub-sidebar-text); }

.pl-brand__icon { width: 24px; height: 24px; }

.pl-brand__info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.pl-brand__text {
    font-family: var(--font-heading);
    font-size: 1.125rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    line-height: 1.2;
}

.pl-brand__label {
    font-size: 0.625rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 0.125rem 0.375rem;
    border-radius: 10px;
    background-color: rgba(238, 180, 75, 0.15);
    color: var(--color-tuscan-yellow);
    width: fit-content;
}

.hub-sidebar__nav {
    padding: 0.75rem 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.hub-sidebar__link {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 400;
    color: var(--hub-sidebar-muted);
    border-radius: 6px;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.hub-sidebar__link:hover {
    background-color: var(--hub-sidebar-hover);
    color: var(--hub-sidebar-text);
}

.hub-sidebar__link.active {
    background-color: rgba(238, 180, 75, 0.12);
    color: var(--hub-sidebar-text);
    box-shadow: inset 3px 0 0 var(--color-tuscan-yellow);
    font-weight: 600;
}

.hub-sidebar__link.active svg {
    color: var(--color-tuscan-yellow);
}

.hub-sidebar__section-header {
    padding: 1.25rem 0.75rem 0.375rem;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--hub-sidebar-muted);
}

.hub-sidebar__section-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 1.25rem 0.75rem 0.375rem;
    font-family: var(--font-body);
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--hub-sidebar-muted);
    background: none;
    border: none;
    cursor: pointer;
    transition: color 0.15s ease;
}

.hub-sidebar__section-toggle:hover {
    color: var(--hub-sidebar-text);
}

.hub-sidebar__chevron {
    transition: transform 0.25s ease;
}

.hub-sidebar__section-toggle[aria-expanded="true"] .hub-sidebar__chevron {
    transform: rotate(180deg);
}

.hub-sidebar__collapsible {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.25s ease;
}

.hub-sidebar__collapsible.open {
    grid-template-rows: 1fr;
}

.hub-sidebar__collapsible-inner {
    overflow: hidden;
}

/* Sidebar footer — pinned to bottom, reuses .hub-sidebar__link styling */
.hub-sidebar__footer {
    margin-top: auto;
    padding: 0.75rem 0.5rem 1rem;
    border-top: 1px solid var(--hub-sidebar-border);
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.hub-sidebar__footer-label {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--hub-sidebar-muted);
    padding: 0.35rem 0.75rem 0.25rem;
}

.hub-sidebar__ext-icon {
    margin-left: auto;
    opacity: 0.45;
    flex-shrink: 0;
}

.hub-sidebar__link--external:hover .hub-sidebar__ext-icon {
    opacity: 0.85;
}

.hub-sidebar__link--feedback {
    margin-top: 0.4rem;
    border-top: 1px dashed var(--hub-sidebar-border);
    padding-top: 0.75rem;
}

/* Email list used on the User Settings > Emails tab */
.hub-email-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 0.4rem; }
.hub-email-list__item label {
    display: flex; align-items: center; gap: 0.6rem;
    padding: 0.6rem 0.75rem;
    border: 1px solid var(--hub-border);
    border-radius: 6px;
    cursor: pointer;
}
.hub-email-list__item label:hover { background-color: rgba(255, 255, 255, 0.03); }
.hub-email-list__addr { flex: 1; font-family: var(--font-body); }

.hub-pill {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.15rem 0.5rem;
    border-radius: 10px;
    letter-spacing: 0.02em;
}
.hub-pill--ok { background: rgba(52, 211, 153, 0.15); color: #6ee7b7; }
.hub-pill--warn { background: rgba(251, 191, 36, 0.15); color: #fbbf24; }
.hub-pill--primary { background: rgba(238, 180, 75, 0.15); color: var(--color-tuscan-yellow, #EEB44B); }
/* Invite-status pills (introduced by the Manage Members invites panel). Same shape as
   the family above; new in-family modifiers, no new prefix/token. */
.hub-pill--neutral { background: rgba(139, 151, 168, 0.18); color: var(--hub-text-muted); }
.hub-pill--danger { background: rgba(224, 85, 85, 0.16); color: #f0a0a0; }

/* ========================================
   Invites panel — Manage Members page
   #invites-list is the HTMX-swappable region.
   ======================================== */
.pl-invite-card__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1rem;
}
.pl-invite-form {
    margin-bottom: 1.25rem;
}
.pl-invite-form__actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
}
.pl-invite-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.pl-invite-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0.75rem;
    padding: 0.75rem 0.85rem;
    border: 1px solid var(--hub-input-border);
    border-radius: 8px;
    background: var(--hub-surface);
}
.pl-invite-row__main {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    flex: 1 1 240px;
    min-width: 0;
}
.pl-invite-row__email {
    font-weight: 500;
    color: var(--hub-text);
    word-break: break-word;
}
.pl-invite-row__meta {
    font-size: 0.8125rem;
    color: var(--hub-text-muted);
}
.pl-invite-row__actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}
.pl-invite-empty {
    color: var(--hub-text-muted);
    font-size: 0.875rem;
    margin: 0;
    padding: 0.5rem 0;
}
/* Light theme (Slate) contrast bumps — SCOPED to the invite list so the shared
   .hub-pill--ok used on other pages (e.g. user_settings.html) is untouched. */
[data-theme="light"] .pl-invite-list .hub-pill--ok { color: #1f7a52; }
[data-theme="light"] .pl-invite-list .hub-pill--neutral { color: #5b6675; }
[data-theme="light"] .pl-invite-list .hub-pill--danger { color: #b03030; }
/* Same contrast bumps for the person-status badges in the Manage Members table
   ("Hasn't signed in yet" / "Non-member user"), Review fix #8. */
[data-theme="light"] .pl-members-table .hub-pill--neutral { color: #5b6675; }
[data-theme="light"] .pl-members-table .hub-pill--danger { color: #b03030; }
@media (max-width: 640px) {
    .pl-invite-row__actions {
        width: 100%;
    }
    .pl-invite-row__actions .hub-btn {
        flex: 1 1 auto;
        text-align: center;
    }
}

/* ========================================
   Main Wrapper
   ======================================== */
.hub-main-wrapper {
    margin-left: var(--sidebar-width);
    flex: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: margin-left 0.2s ease;
}

.hub-main-wrapper--expanded {
    margin-left: 0;
}

/* ========================================
   Shared Top Bar (.pl-topbar)
   ======================================== */
.pl-topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    height: var(--topbar-height);
    background-color: var(--hub-topbar-bg);
    border-bottom: 1px solid var(--hub-topbar-border);
    display: flex;
    align-items: center;
    padding: 0 1.5rem;
    gap: 0.75rem;
    overflow: visible;
}

.pl-topbar__toggle {
    background: none;
    border: none;
    color: var(--hub-text-muted);
    cursor: pointer;
    padding: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: color 0.15s ease, background-color 0.15s ease;
}

.pl-topbar__toggle:hover {
    color: var(--hub-text);
    background-color: rgba(255, 255, 255, 0.06);
}

.pl-topbar__divider {
    width: 1px;
    height: 20px;
    background-color: var(--hub-topbar-border);
}

.pl-badge--version {
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    color: var(--color-tuscan-yellow);
    background-color: rgba(238, 180, 75, 0.15);
    padding: 0.125rem 0.5rem;
    border-radius: 999px;
    border: none;
    cursor: pointer;
    font-family: var(--font-body);
    transition: background-color 0.15s ease, color 0.15s ease;
}

.pl-badge--version:hover {
    background-color: rgba(238, 180, 75, 0.28);
}

/* View switcher — distinct button to switch between admin/hub */
.pl-view-switcher {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.75rem;
    font-family: var(--font-body);
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--color-tuscan-yellow);
    background-color: rgba(238, 180, 75, 0.1);
    border: 1px solid rgba(238, 180, 75, 0.25);
    border-radius: 6px;
    text-decoration: none;
    transition: background-color 0.15s ease, border-color 0.15s ease;
    white-space: nowrap;
}

.pl-view-switcher:hover {
    background-color: rgba(238, 180, 75, 0.18);
    border-color: rgba(238, 180, 75, 0.4);
    color: var(--color-tuscan-yellow);
}

.pl-view-switcher svg {
    flex-shrink: 0;
}

.pl-topbar__spacer { flex: 1; }

.pl-topbar__theme-toggle {
    background: none;
    border: none;
    color: var(--hub-text-muted);
    cursor: pointer;
    padding: 0.375rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: color 0.15s ease, background-color 0.15s ease;
}

.pl-topbar__theme-toggle:hover {
    color: var(--hub-text);
    background-color: rgba(255, 255, 255, 0.06);
}

[data-theme="light"] .pl-topbar__theme-toggle:hover {
    background-color: rgba(0, 0, 0, 0.06);
}

/* ========================================
   Shared Profile Dropdown (.pl-profile)
   ======================================== */
.pl-profile {
    position: relative;
    z-index: 100;
}

.pl-profile__avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: var(--color-tuscan-yellow);
    color: var(--color-navy);
    font-size: 0.8125rem;
    font-weight: 700;
    font-family: var(--font-body);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: box-shadow 0.15s ease;
}

.pl-profile__avatar:hover {
    box-shadow: 0 0 0 2px var(--hub-topbar-bg), 0 0 0 4px var(--color-tuscan-yellow);
}

.pl-profile__dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 240px;
    background-color: var(--hub-dropdown-bg);
    border: 1px solid var(--hub-dropdown-border);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
    overflow: hidden;
    z-index: 100;
}

.pl-profile__dropdown-header {
    padding: 0.875rem 1rem;
    border-bottom: 1px solid var(--hub-dropdown-border);
}

.pl-profile__dropdown-name {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--hub-text);
}

.pl-profile__dropdown-email {
    font-size: 0.75rem;
    color: var(--hub-text-muted);
    margin-top: 2px;
}

.pl-profile__dropdown-item {
    display: block;
    width: 100%;
    padding: 0.625rem 1rem;
    font-size: 0.875rem;
    font-family: var(--font-body);
    color: var(--hub-text);
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
    transition: background-color 0.15s ease;
    text-decoration: none;
}

.pl-profile__dropdown-item:hover {
    background-color: rgba(255,255,255,0.05);
    color: var(--hub-text);
}

[data-theme="light"] .pl-profile__dropdown-item:hover {
    background-color: rgba(0,0,0,0.04);
}

.pl-profile__dropdown-item--danger { color: #e05555; }
.pl-profile__dropdown-item--danger:hover { color: #e05555; }

.pl-profile__dropdown-divider {
    height: 1px;
    background-color: var(--hub-dropdown-border);
    margin: 0.25rem 0;
}

/* ========================================
   Content Area
   ======================================== */
.hub-content {
    flex: 1;
    padding: 2rem 2.5rem;
}

/* ========================================
   Messages
   ======================================== */
.hub-messages {
    list-style: none;
    margin-bottom: 1.5rem;
}

.hub-message {
    padding: 0.75rem 1rem;
    border-radius: 6px;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
    border-left: 3px solid;
}

.hub-message--success {
    color: var(--color-success);
    background-color: var(--color-success-bg);
    border-left-color: var(--color-success);
}

.hub-message--error {
    color: var(--color-error);
    background-color: var(--color-error-bg);
    border-left-color: var(--color-error);
}

.hub-message--info {
    color: var(--hub-text-muted);
    background-color: rgba(150, 172, 187, 0.1);
    border-left-color: var(--hub-text-muted);
}

/* ========================================
   Cards
   ======================================== */
.hub-card {
    background-color: var(--hub-card-bg);
    border: 1px solid var(--hub-card-border);
    border-radius: 10px;
    padding: 2rem;
}

/* Classes admin area (Overview sections + Settings hub cards): the dark theme's
   card border is transparent, so nested cards blend into the page. Give them a
   visible outline in dark mode; light keeps its existing card border. */
.cms-admin .hub-card {
    border-color: var(--hub-border);
}
[data-theme="light"] .cms-admin .hub-card {
    border-color: var(--hub-card-border);
}

.hub-page-title {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
}

.hub-text-muted {
    color: var(--hub-text-muted);
    font-size: 0.9375rem;
}

/* ========================================
   Vote List
   ======================================== */
.hub-vote-list {
    list-style: none;
    margin-top: 1rem;
}

.hub-vote-list li {
    padding: 0.5rem 0;
    font-size: 0.9375rem;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

[data-theme="light"] .hub-vote-list li {
    border-bottom-color: #e0ddd5;
}

.hub-vote-list li:last-child { border-bottom: none; }

.hub-success-icon {
    color: var(--color-success);
    margin-bottom: 1rem;
}

/* ========================================
   Forms
   ======================================== */
.hub-form-group {
    margin-bottom: 1.25rem;
}

.hub-form-group label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 400;
    color: var(--hub-text-muted);
    margin-bottom: 0.375rem;
    letter-spacing: 0.02em;
}

.hub-form-group input[type="text"],
.hub-form-group input[type="email"],
.hub-form-group input[type="tel"],
.hub-form-group input[type="number"],
.hub-form-group select,
.hub-form-group textarea {
    width: 100%;
    padding: 0.625rem 0.875rem;
    font-family: var(--font-body);
    font-size: 0.9375rem;
    font-weight: 300;
    color: var(--hub-text);
    background-color: var(--hub-input-bg);
    border: 1px solid var(--hub-input-border);
    border-radius: 6px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.hub-form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.hub-form-group input:focus,
.hub-form-group select:focus,
.hub-form-group textarea:focus {
    outline: none;
    border-color: var(--color-tuscan-yellow);
    box-shadow: 0 0 0 3px rgba(238, 180, 75, 0.15);
}

.hub-form-group input:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.hub-field-hint {
    display: block;
    font-size: 0.75rem;
    color: var(--hub-text-muted);
    margin-top: 0.25rem;
}

.hub-field-error {
    font-size: 0.8125rem;
    color: var(--color-error);
    margin-top: 0.25rem;
}

.hub-form-error {
    padding: 0.75rem 1rem;
    background-color: var(--color-error-bg);
    border-left: 3px solid var(--color-error);
    border-radius: 6px;
    color: var(--color-error);
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

/* ========================================
   Fixed Feedback Button — bottom left
   ======================================== */
.pl-feedback-btn {
    position: fixed;
    bottom: 1.25rem;
    left: 1.25rem;
    z-index: 200;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    font-family: var(--font-body);
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--hub-text-muted);
    background-color: var(--hub-card-bg);
    border: 1px solid var(--hub-input-border);
    border-radius: 8px;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.pl-feedback-btn:hover {
    color: var(--color-tuscan-yellow);
    border-color: var(--color-tuscan-yellow);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.pl-feedback-btn svg {
    flex-shrink: 0;
    opacity: 0.7;
}

.pl-feedback-btn:hover svg {
    opacity: 1;
}

/* ========================================
   Buttons
   ======================================== */
.hub-btn {
    display: inline-block;
    padding: 0.625rem 1.5rem;
    font-family: var(--font-body);
    font-size: 0.9375rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.15s ease, transform 0.1s ease;
}

.hub-btn:active { transform: translateY(1px); }

.hub-btn--primary {
    background-color: var(--color-tuscan-yellow);
    color: var(--color-navy);
}

.hub-btn--primary:hover {
    background-color: var(--color-yellow-hover);
    color: var(--color-navy);
}

.hub-btn--danger {
    background: #c0392b;
    color: #fff;
    border: 1px solid #c0392b;
}
.hub-btn--danger:hover {
    background: #d94a3d;
    border-color: #d94a3d;
    color: #fff;
}

/* Small size modifier for table-row / inline actions. */
.hub-btn--sm {
    padding: 0.3rem 0.7rem;
    font-size: 0.8125rem;
    border-radius: 4px;
}

/* Low-emphasis inline action (e.g. "Edit" in a table row). */
.hub-btn--ghost {
    background: transparent;
    color: var(--hub-text-muted);
    border: 1px solid var(--hub-border-strong);
}
.hub-btn--ghost:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--hub-text);
    border-color: var(--hub-text-muted);
}

/* ========================================
   Guild Detail
   ======================================== */
.hub-detail-section {
    margin-top: 1.5rem;
}

.hub-detail-label {
    font-family: var(--font-body);
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--hub-text-muted);
    margin-bottom: 0.75rem;
}

.hub-member-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 0;
}

.hub-member-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: rgba(238, 180, 75, 0.15);
    color: var(--color-tuscan-yellow);
    font-size: 0.8125rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hub-member-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.hub-member-name {
    font-size: 0.9375rem;
    font-weight: 400;
}

.hub-badge {
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 0.125rem 0.5rem;
    border-radius: 10px;
    background-color: rgba(238, 180, 75, 0.15);
    color: var(--color-tuscan-yellow);
}

.hub-note {
    font-size: 0.8125rem;
    font-style: italic;
}


/* ========================================
   Members Table (Manage Members)
   Token-driven; stacks into labelled cards on phones (no horizontal scroll).
   ======================================== */
.pl-members-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9375rem;
}
.pl-members-table th,
.pl-members-table td {
    padding: 0.55rem 0.75rem;
}
.pl-members-table th {
    text-align: left;
    color: var(--hub-text-muted);
    font-weight: 500;
    font-size: 0.875rem;
}
.pl-members-table td {
    color: var(--hub-text-muted);
}
.pl-members-table td:first-child {
    color: var(--hub-text); /* Name column reads as primary text (two-tone rows) */
}
.pl-members-table tr {
    border-bottom: 1px solid var(--hub-border);
}

@media (max-width: 640px) {
    .pl-members-table thead {
        display: none;
    }
    .pl-members-table tr {
        display: block;
        border: 1px solid var(--hub-border);
        border-radius: 8px;
        margin-bottom: 0.75rem;
        padding: 0.25rem 0.75rem;
    }
    .pl-members-table td[data-label] {
        display: flex;
        justify-content: space-between;
        gap: 1rem;
        text-align: right;
        padding: 0.4rem 0;
    }
    .pl-members-table td[data-label]::before {
        content: attr(data-label);
        color: var(--hub-text-muted);
        font-weight: 500;
        text-align: left;
    }
}


/* ========================================
   Mobile Sidebar Backdrop
   ======================================== */
.hub-sidebar-backdrop {
    display: none;
}

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 768px) {
    .hub-sidebar {
        transform: translateX(-100%);
        box-shadow: none;
        transition: transform 0.25s ease, box-shadow 0.25s ease;
    }

    /* On mobile, sidebar is visible when NOT closed */
    .hub-sidebar:not(.hub-sidebar--closed) {
        transform: translateX(0);
        box-shadow: 4px 0 24px rgba(0, 0, 0, 0.4);
    }

    .hub-sidebar-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 99;
        background-color: rgba(0, 0, 0, 0.5);
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.25s ease;
    }

    .hub-sidebar-backdrop--visible {
        opacity: 1;
        pointer-events: auto;
    }

    .hub-main-wrapper { margin-left: 0; }

    .hub-content {
        padding: 1.5rem 1rem;
    }

    .hub-card {
        padding: 1.25rem;
    }
}

/* ========================================
   Member Directory
   ======================================== */
.directory-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1rem;
}

.directory-card {
    background-color: var(--hub-card-bg);
    border: 1px solid var(--hub-input-border);
    border-radius: 10px;
    padding: 1.25rem;
}

.directory-card__header {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
}

.directory-card__avatar {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(238, 180, 75, 0.15);
    color: var(--color-tuscan-yellow);
    font-size: 0.75rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    letter-spacing: 0.03em;
}

.directory-card__identity {
    min-width: 0;
}

.directory-card__name {
    font-weight: 600;
    font-size: 1rem;
    color: var(--hub-text);
    line-height: 1.3;
}

.directory-card__preferred {
    font-size: 0.85rem;
    color: var(--hub-text-muted);
    font-style: italic;
}

.directory-card__meta {
    display: flex;
    gap: 0.75rem;
    margin-top: 0.25rem;
    font-size: 0.8rem;
    color: var(--hub-text-muted);
}

.directory-card__role {
    font-weight: 500;
}

.directory-card__about {
    margin: 0.75rem 0 0;
    font-size: 0.9rem;
    color: var(--hub-text-muted);
    line-height: 1.5;
}

.directory-card__contact {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--hub-input-border);
}

.directory-card__contact-row {
    display: flex;
    gap: 0.5rem;
    font-size: 0.85rem;
    padding: 0.2rem 0;
    color: var(--hub-text-muted);
}

.directory-card__contact-row a {
    color: var(--color-tuscan-yellow);
    text-decoration: none;
}

.directory-card__contact-row a:hover {
    text-decoration: underline;
}

.directory-card__contact-label {
    font-weight: 500;
    color: var(--hub-text);
    min-width: 4rem;
    flex-shrink: 0;
}

.directory-card__role-mgmt {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--hub-input-border);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.directory-card__role-form {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
}

.directory-card__role-select {
    flex: 1;
    padding: 0.375rem 0.5rem;
    font-size: 0.8rem;
    font-family: var(--font-body);
    color: var(--hub-text);
    background-color: var(--hub-input-bg);
    border: 1px solid var(--hub-input-border);
    border-radius: 6px;
    cursor: pointer;
}

.directory-card__role-select:focus {
    outline: none;
    border-color: var(--color-tuscan-yellow);
}

.directory-card__role-btn {
    padding: 0.375rem 0.75rem;
    font-size: 0.8rem;
    font-weight: 600;
    font-family: var(--font-body);
    color: var(--color-navy);
    background-color: var(--color-tuscan-yellow);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.15s ease;
    white-space: nowrap;
}

.directory-card__role-btn:hover {
    background-color: var(--color-yellow-hover);
}

/* ========================================
   Changelog Modal
   ======================================== */
.changelog-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(0, 0, 0, 0.6);
    padding: 1rem;
}

.changelog-modal {
    background-color: var(--hub-card-bg);
    border-radius: 12px;
    border: 1px solid var(--hub-input-border);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 520px;
    width: 100%;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
}

.changelog-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--hub-input-border);
}

.changelog-modal__title {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--hub-text);
    margin: 0;
}

.changelog-modal__close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--hub-text-muted);
    padding: 0;
    line-height: 1;
}

.changelog-modal__close:hover {
    color: var(--hub-text);
}

.changelog-modal__body {
    padding: 1.5rem;
    overflow-y: auto;
}

.changelog-entry + .changelog-entry {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--hub-input-border);
}

.changelog-entry__header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.changelog-entry__version {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 0.125rem 0.5rem;
    border-radius: 10px;
    background-color: rgba(238, 180, 75, 0.15);
    color: var(--color-tuscan-yellow);
}

.changelog-entry__date {
    font-size: 0.8rem;
    color: var(--hub-text-muted);
}

.changelog-entry__title {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 600;
    color: var(--hub-text);
    margin: 0 0 0.5rem 0;
}

.changelog-entry__list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.changelog-entry__list li {
    font-size: 0.9rem;
    color: var(--hub-text-muted);
    padding: 0.3rem 0;
    padding-left: 1rem;
    position: relative;
}

.changelog-entry__list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.7rem;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background-color: var(--color-tuscan-yellow);
}

/* ========================================
   Tab Balance Pill (topbar)
   ======================================== */
.pl-topbar__tab-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.6rem;
    font-size: 0.75rem;
    font-weight: 600;
    font-family: var(--font-body);
    color: var(--hub-text);
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 12px;
    text-decoration: none;
    margin-right: 0.5rem;
    transition: background 150ms ease;
}
.pl-topbar__tab-pill:hover {
    background: rgba(255,255,255,0.14);
    color: var(--hub-text);
}
.pl-topbar__tab-pill--locked {
    background: rgba(240, 100, 100, 0.2);
    border-color: rgba(240, 100, 100, 0.4);
    color: var(--color-error);
}
[data-theme="light"] .pl-topbar__tab-pill {
    background: rgba(0,0,0,0.06);
    border-color: rgba(0,0,0,0.12);
    color: #333;
}
[data-theme="light"] .pl-topbar__tab-pill:hover {
    background: rgba(0,0,0,0.1);
    color: #333;
}

/* ========================================
   Tab Pages
   ======================================== */
.tab-page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.tab-page-header .hub-page-title { margin-bottom: 0; }
.tab-page-header__title {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}
.tab-page-header__title-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.tab-page-header__subtext {
    margin: 0;
    font-size: 0.8125rem;
    color: var(--hub-text-muted, #96ACBB);
}

/* Hoverable help bubble — used next to section titles */
.pl-help {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: help;
}
.pl-help__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.125rem;
    height: 1.125rem;
    border-radius: 50%;
    background: var(--hub-input-border, #334155);
    color: var(--hub-text, #F4EFDD);
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1;
    user-select: none;
}
.pl-help__bubble {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    z-index: 50;
    width: max-content;
    max-width: 320px;
    padding: 0.75rem 0.875rem;
    background: var(--hub-card-bg, #0b1f33);
    color: var(--hub-text, #F4EFDD);
    border: 1px solid var(--hub-input-border, #334155);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
    font-size: 0.8125rem;
    line-height: 1.45;
    white-space: normal;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
    transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
    pointer-events: none;
}
.pl-help:hover .pl-help__bubble,
.pl-help:focus-within .pl-help__bubble {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.tab-history-link {
    font-size: 0.85rem;
    color: var(--color-tuscan-yellow);
    text-decoration: none;
}
.tab-history-link:hover { text-decoration: underline; }

/* Banners */
.tab-banner {
    padding: 0.75rem 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}
.tab-banner--error {
    background: var(--color-error-bg);
    color: var(--color-error);
    border: 1px solid rgba(240, 160, 160, 0.25);
}
.tab-banner--warning {
    background: rgba(238, 180, 75, 0.12);
    color: var(--color-tuscan-yellow);
    border: 1px solid rgba(238, 180, 75, 0.25);
}

/* Summary card */
.tab-summary { margin-bottom: 1rem; }
.tab-summary__row {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
}
.tab-summary__row + .tab-summary__row {
    border-top: 1px solid var(--hub-topbar-border);
}
.tab-summary__label {
    font-size: 0.9rem;
    color: var(--hub-text-muted);
}
.tab-summary__value {
    font-size: 0.9rem;
    font-weight: 600;
}
.tab-summary__value--balance {
    font-size: 1.1rem;
    color: var(--color-tuscan-yellow);
}

/* Pending checkout — direct-keys "Pay Now" list */
.tab-checkout-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.tab-checkout-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.875rem 1rem;
    background: rgba(238, 180, 75, 0.08);
    border: 1px solid rgba(238, 180, 75, 0.3);
    border-radius: 8px;
    gap: 1rem;
}
.tab-checkout-item__title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--hub-text);
}
.tab-checkout-item__meta {
    font-size: 0.8rem;
    color: var(--hub-text-muted);
    margin-top: 0.125rem;
}
.tab-checkout-item__btn {
    flex-shrink: 0;
    padding: 0.5rem 1rem;
    background: var(--color-tuscan-yellow);
    color: #1a1a1a;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    transition: filter 0.15s ease;
}
.tab-checkout-item__btn:hover {
    filter: brightness(1.1);
}

/* Guild detail — product card grid */
.guild-product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 0.875rem;
}
.guild-product-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    transition: border-color 0.15s ease, background 0.15s ease;
    min-height: 90px;
}
.guild-product-card:hover {
    border-color: rgba(238, 180, 75, 0.4);
    background: rgba(238, 180, 75, 0.05);
}
.guild-product-card__name {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--hub-text);
    line-height: 1.3;
}
.guild-product-card__price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--hub-link);
}
.guild-product-card__splits {
    font-size: 0.75rem;
    color: var(--hub-text-muted);
    line-height: 1.3;
    margin-top: -0.1rem;
}
.guild-product-card__add-form {
    margin-top: 0.5rem;
}
.guild-product-card__add-btn {
    width: 100%;
    padding: 0.4rem 0.6rem;
    background: var(--color-tuscan-yellow);
    color: #1a1a2e;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.8rem;
    cursor: pointer;
    transition: background 0.15s ease;
}
.guild-product-card__add-btn:hover {
    background: var(--color-yellow-hover);
}

/* Enter-Your-Own-Price card — first card in the product grid */
.guild-product-card--eyop {
    align-items: center;
    text-align: center;
    border-style: dashed;
    border-color: rgba(238, 180, 75, 0.4);
}
.guild-product-card--eyop:hover {
    border-color: rgba(238, 180, 75, 0.8);
    background: rgba(238, 180, 75, 0.08);
}
.guild-product-card__subtext {
    font-size: 0.8125rem;
    color: var(--hub-text-muted);
    margin-top: -0.25rem;
}
.guild-product-card__eyop-plus {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    margin: 0.25rem auto 0.25rem;
    background: var(--color-tuscan-yellow);
    border: none;
    border-radius: 50%;
    color: #1a1a2e;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.15s ease;
}
.guild-product-card__eyop-plus:hover {
    background: var(--color-yellow-hover);
    transform: scale(1.05);
}

/* Trash-can remove button on the My Tab table */
.tab-table__remove {
    background: transparent;
    border: none;
    padding: 0;
    cursor: pointer;
    line-height: 1;
    color: #dc2626;
    transition: color 0.15s ease, transform 0.15s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.tab-table__remove svg {
    stroke: #dc2626;
}
.tab-table__remove:hover {
    color: #ef4444;
    transform: scale(1.15);
}
.tab-table__remove:hover svg {
    stroke: #ef4444;
}

/* Shared table */
.tab-section-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}
.tab-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}
.tab-table th {
    text-align: left;
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid var(--hub-topbar-border);
    font-weight: 500;
    color: var(--hub-text-muted);
}
.tab-table td {
    padding: 0.5rem 0.75rem;
}
.tab-table th.tab-table__right,
.tab-table td.tab-table__right { text-align: right; }
.tab-table__date {
    font-size: 0.8rem;
    color: var(--hub-text-muted);
}

/* Add to Tab form */
.tab-add-form__fields {
    display: flex;
    gap: 0.75rem;
    align-items: flex-end;
    flex-wrap: wrap;
}
.tab-add-form__field {
    flex: 1;
    min-width: 150px;
}
.tab-add-form__field--amount {
    flex: 0 0 120px;
    min-width: 100px;
}
.tab-add-form__field label {
    display: block;
    font-size: 0.8rem;
    color: var(--hub-text-muted);
    margin-bottom: 0.25rem;
}
.tab-add-form__field input {
    width: 100%;
    padding: 0.5rem 0.6rem;
    background: var(--hub-input-bg);
    border: 1px solid var(--hub-input-border);
    border-radius: 6px;
    color: var(--hub-text);
    font-size: 0.85rem;
}
.tab-add-form__btn {
    padding: 0.5rem 1rem;
    background: var(--color-tuscan-yellow);
    color: #1a1a2e;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    white-space: nowrap;
}
.tab-add-form__btn:hover {
    background: var(--color-yellow-hover);
}
.tab-form-error {
    display: block;
    font-size: 0.75rem;
    color: var(--color-error);
    margin-top: 0.25rem;
}

/* Tab History — charge cards */
.tab-charge {
    border-bottom: 1px solid var(--hub-topbar-border);
}
.tab-charge:last-child { border-bottom: none; }
.tab-charge__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
}
.tab-charge__info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}
.tab-charge__date {
    font-size: 0.9rem;
    font-weight: 500;
}
.tab-charge__status {
    font-size: 0.75rem;
    padding: 0.15rem 0.5rem;
    border-radius: 10px;
    font-weight: 600;
}
.tab-charge__status--succeeded {
    background: var(--color-success-bg);
    color: var(--color-success);
}
.tab-charge__status--failed {
    background: var(--color-error-bg);
    color: var(--color-error);
}
.tab-charge__status--processing {
    background: rgba(238, 180, 75, 0.12);
    color: var(--color-tuscan-yellow);
}
.tab-charge__count {
    font-size: 0.8rem;
    color: var(--hub-text-muted);
}
.tab-charge__amount {
    font-weight: 600;
    font-size: 0.95rem;
}
.tab-charge__details {
    padding: 0 0 0.75rem;
}
.tab-charge__receipt-link {
    display: inline-block;
    margin-top: 0.5rem;
    font-size: 0.8rem;
    color: var(--color-tuscan-yellow);
    text-decoration: none;
}
.tab-charge__receipt-link:hover { text-decoration: underline; }
.tab-entry-guild {
    font-size: 0.75rem;
    color: var(--hub-text-muted);
    opacity: 0.8;
}
.tab-charge__destination {
    font-size: 0.8rem;
    color: var(--hub-text-muted);
}

/* ========================================
   Guild page — Edit / Add Product modals
   ======================================== */

/* Header row — title + action buttons on the guild detail page. */
.pl-guild-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}
.pl-guild-header .hub-page-title {
    margin: 0;
}
.pl-guild-header__actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* Edit Guild + Add Product form shells used inside the modal. */
.pl-guild-edit-form,
.pl-product-form form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.pl-guild-edit-form__actions,
.pl-product-form__actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

/* Inputs inside these modal forms. Mirrors the .pl-form-group styling from
   components.css but scoped so we can use standalone <input>/<textarea>
   without the wrapper class. */
.pl-guild-edit-form input[type="text"],
.pl-guild-edit-form textarea,
.pl-product-form input[type="text"],
.pl-product-form input[type="number"],
.pl-product-form select {
    background: var(--hub-input-bg, rgba(255, 255, 255, 0.06));
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 6px;
    color: var(--hub-text, #F4EFDD);
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    width: 100%;
    box-sizing: border-box;
    transition: border-color 0.15s ease;
}
.pl-guild-edit-form input[type="text"]:focus,
.pl-guild-edit-form textarea:focus,
.pl-product-form input[type="text"]:focus,
.pl-product-form input[type="number"]:focus,
.pl-product-form select:focus {
    border-color: var(--color-tuscan-yellow, #EEB44B);
    outline: none;
    box-shadow: 0 0 0 3px rgba(238, 180, 75, 0.15);
}

/* Two-column row for Name + Price. */
.pl-product-form__row {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}
.pl-product-form__row .pl-form-group {
    flex: 1 1 180px;
    min-width: 0;
}

/* Revenue-splits fieldset inside the Add Product modal. */
.pl-product-form__splits {
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.02);
    padding: 1rem 1.25rem 1.25rem;
    margin: 0;
}
.pl-product-form__splits > legend {
    padding: 0 0.5rem;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--hub-text-muted, #96ACBB);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.pl-splits {
    width: 100%;
    border-collapse: collapse;
    margin: 0.25rem 0 0.75rem;
}
.pl-splits thead th {
    text-align: left;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--hub-text-muted, #96ACBB);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 0.25rem 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.pl-splits tbody td {
    padding: 0.375rem 0.5rem;
    vertical-align: middle;
    color: var(--hub-text, #F4EFDD);
    font-size: 0.875rem;
}
.pl-splits__percent {
    white-space: nowrap;
    width: 30%;
}
.pl-splits__percent input[type="number"] {
    display: inline-block;
    width: 6rem !important;
    margin-right: 0.35rem;
}
.pl-splits__actions {
    text-align: right;
    width: auto;
}
.pl-splits__remove {
    background: rgba(224, 85, 85, 0.1);
    color: #e05555;
    border: none;
    border-radius: 4px;
    width: 1.75rem;
    height: 1.75rem;
    font-size: 1.1rem;
    line-height: 1;
    cursor: pointer;
    transition: background 0.15s ease;
}
.pl-splits__remove:hover {
    background: rgba(224, 85, 85, 0.25);
}
.pl-splits__add {
    margin-top: 0.25rem;
}
.pl-splits__preview {
    margin: 0.5rem 0 0.25rem;
    font-size: 0.8125rem;
    font-style: italic;
    color: var(--hub-text-muted, #96ACBB);
}
.pl-splits__total {
    margin: 0.75rem 0 0;
    font-size: 0.9375rem;
    font-weight: 700;
}
.pl-splits__total--ok {
    color: #7bc88f;
}
.pl-splits__total--bad {
    color: #f0a0a0;
}

/* Small delete button on each existing product card. */
.guild-product-card {
    position: relative;
}
.guild-product-card__delete-btn {
    position: absolute;
    top: 0.35rem;
    right: 0.35rem;
    background: rgba(224, 85, 85, 0.15);
    color: #e05555;
    border: none;
    border-radius: 4px;
    width: 1.5rem;
    height: 1.5rem;
    font-size: 1rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    cursor: pointer;
    transition: background 0.15s ease;
    padding: 0;
}
.guild-product-card__delete-btn:hover {
    background: rgba(224, 85, 85, 0.3);
}
.guild-product-card__edit-btn {
    position: absolute;
    top: 0.35rem;
    right: 2rem;
    background: rgba(238, 180, 75, 0.15);
    color: var(--color-tuscan-yellow, #eeb44b);
    border: none;
    border-radius: 4px;
    width: 1.5rem;
    height: 1.5rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    cursor: pointer;
    transition: background 0.15s ease;
}
.guild-product-card__edit-btn:hover {
    background: rgba(238, 180, 75, 0.3);
}

/* Viewing-as popover */
.pl-view-as-popover {
    position: relative;
}

.pl-view-as-popover__menu {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    min-width: 200px;
    background: var(--hub-dropdown-bg);
    border: 1px solid var(--hub-dropdown-border);
    border-radius: 8px;
    padding: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
    z-index: 50;
}

.pl-view-as-popover__header {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    opacity: 0.6;
    padding: 4px 8px 8px;
}

.pl-view-as-popover__row {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 7px 10px;
    border: none;
    background: none;
    color: inherit;
    text-align: left;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-family: inherit;
}

.pl-view-as-popover__row:hover {
    background: rgba(255, 255, 255, 0.05);
}

.pl-view-as-popover__row--selected {
    background: rgba(255, 255, 255, 0.04);
    font-weight: 600;
}

.pl-view-as-popover__check {
    opacity: 0.7;
    font-size: 12px;
}

.pl-view-as-popover__hint {
    font-size: 11px;
    opacity: 0.55;
    padding: 8px;
    border-top: 1px solid var(--hub-dropdown-border);
    margin-top: 4px;
}

.hub-sidebar__icons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    padding: 0.5rem 0.75rem 0.625rem;
}

.hub-sidebar__icon-link {
    display: inline-flex;
    align-items: center;
    color: rgba(244, 239, 221, 0.4);
    text-decoration: none;
    transition: color 0.15s ease;
    line-height: 0;
}

.hub-sidebar__icon-link:hover {
    color: var(--color-tuscan-yellow);
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ========================================
   Public Top Bar (anonymous visitors)
   Used on Classes & Workshops, register, etc. when no user is logged in.
   ======================================== */
.pl-public-topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    height: var(--topbar-height);
    background-color: rgba(6, 31, 51, 0.85);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(238, 180, 75, 0.18);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    gap: 1rem;
}
.pl-public-topbar__brand {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--color-cream, #f4efdd);
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 800;
    font-size: 16px;
    text-decoration: none;
}
.pl-public-topbar__brand:hover { text-decoration: none; opacity: 0.9; }
.pl-public-topbar__nav {
    display: inline-flex;
    align-items: center;
    gap: 14px;
}
.pl-public-topbar__link {
    color: var(--color-steel, #96acbb);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.pl-public-topbar__link:hover { color: var(--color-tuscan-yellow, #EEB44B); text-decoration: none; }
.pl-public-topbar__signup {
    background: var(--color-tuscan-yellow, #EEB44B);
    color: #061f33;
    padding: 8px 18px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    text-decoration: none;
}
.pl-public-topbar__signup:hover { background: #f5ca6e; text-decoration: none; }
.pl-public-topbar__login {
    color: var(--color-tuscan-yellow, #EEB44B);
    padding: 8px 14px;
    border-radius: 4px;
    border: 1px solid rgba(238, 180, 75, 0.45);
    background: rgba(238, 180, 75, 0.06);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    text-decoration: none;
}
.pl-public-topbar__login:hover {
    background: rgba(238, 180, 75, 0.18);
    text-decoration: none;
}
.pl-public-topbar__exit-preview {
    background: rgba(238, 180, 75, 0.12);
    color: var(--color-tuscan-yellow, #EEB44B);
    border: 1px solid rgba(238, 180, 75, 0.4);
    padding: 7px 14px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    text-decoration: none;
    white-space: nowrap;
}
.pl-public-topbar__exit-preview:hover {
    background: rgba(238, 180, 75, 0.22);
    text-decoration: none;
}

.pl-public-topbar__ext {
    color: var(--color-tuscan-yellow, #EEB44B);
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 8px 12px;
    border-radius: 4px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.pl-public-topbar__ext:hover { background: rgba(238, 180, 75, 0.08); text-decoration: none; }

.pl-public-topbar__pill {
    display: inline-block;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    padding: 3px 8px;
    border-radius: 999px;
    background: rgba(238, 180, 75, 0.12);
    border: 1px solid rgba(238, 180, 75, 0.4);
    color: var(--color-tuscan-yellow, #EEB44B);
}

.pl-public-topbar__logout {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 7px 14px;
    border-radius: 4px;
    border: 1px solid rgba(26, 69, 104, 0.6);
    background: rgba(255, 255, 255, 0.02);
    color: var(--color-steel, #96acbb);
    text-decoration: none;
}
.pl-public-topbar__logout:hover {
    border-color: rgba(238, 180, 75, 0.35);
    color: var(--color-cream, #f4efdd);
    text-decoration: none;
}

/* When no sidebar (anonymous), the wrapper occupies the full viewport. */
.hub-main-wrapper--public { margin-left: 0; }

/* ──────────────────────────────────────────────────────────────
   Profile Settings — visibility-aware redesign
   ────────────────────────────────────────────────────────────── */

.pl-profile-edit { display: flex; flex-direction: column; gap: 1.25rem; }

/* Master "Listed/Hidden" panel */
.pl-profile-master {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    column-gap: 1.5rem;
    row-gap: 0.625rem;
    background: var(--hub-card-bg);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 12px;
    padding: 1rem 1.25rem;
}
[data-theme="light"] .pl-profile-master { border-color: rgba(0,0,0,0.08); }
.pl-profile-master__copy { min-width: 0; }
.pl-profile-master__title { margin: 0 0 0.125rem; font-size: 1rem; font-weight: 700; color: var(--hub-text); }
.pl-profile-master__sub { margin: 0; font-size: 0.8125rem; color: var(--hub-text-muted); line-height: 1.45; }

.pl-profile-master__seg {
    display: inline-flex;
    align-items: stretch;
    justify-self: end;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 999px;
    padding: 3px;
    gap: 2px;
}
[data-theme="light"] .pl-profile-master__seg {
    background: rgba(0,0,0,0.04);
    border-color: rgba(0,0,0,0.1);
}
.pl-profile-master__seg-input {
    position: absolute; opacity: 0; pointer-events: none; width: 0; height: 0;
}
.pl-profile-master__seg-btn {
    display: inline-flex; align-items: center; gap: 0.375rem;
    padding: 0.4375rem 0.875rem;
    border: 0;
    background: transparent;
    color: var(--hub-text-muted);
    font-size: 0.75rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.05em;
    border-radius: 999px;
    cursor: pointer;
    transition: background 0.18s, color 0.18s, box-shadow 0.18s;
    line-height: 1;
}
.pl-profile-master__seg-btn:hover:not(.pl-profile-master__seg-btn--active):not(:disabled) {
    color: var(--hub-text);
}
.pl-profile-master__seg-btn--active {
    background: var(--color-tuscan-yellow, #EEB44B);
    color: #1a1a2e;
    box-shadow: 0 1px 3px rgba(0,0,0,0.18);
}
.pl-profile-master__seg--locked .pl-profile-master__seg-btn { cursor: not-allowed; }
.pl-profile-master__seg--locked .pl-profile-master__seg-btn:not(.pl-profile-master__seg-btn--active) {
    opacity: 0.4;
}
.pl-profile-master__locked-note {
    grid-column: 1 / -1;
    margin: 0; font-size: 0.75rem; color: var(--hub-text-muted); line-height: 1.45;
}

@media (max-width: 560px) {
    .pl-profile-master { grid-template-columns: 1fr; }
    .pl-profile-master__seg { justify-self: start; }
}

/* Two-column grid */
.pl-profile-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 1.5rem;
    align-items: start;
}
.pl-profile-edit__col { display: flex; flex-direction: column; gap: 1rem; }

@media (max-width: 900px) {
    .pl-profile-grid { grid-template-columns: 1fr; }
    .pl-profile-preview { order: -1; }
    .pl-profile-preview__sticky { position: static !important; }
}

/* Each row */
.pl-profile-row {
    background: var(--hub-card-bg);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 10px;
    padding: 0.875rem 1rem;
    display: flex; flex-direction: column; gap: 0.4375rem;
}
[data-theme="light"] .pl-profile-row { border-color: rgba(0,0,0,0.08); }
.pl-profile-row__head {
    display: flex; align-items: center; justify-content: space-between; gap: 0.5rem;
}
.pl-profile-row__label {
    font-size: 0.8125rem; font-weight: 600; color: var(--hub-text);
    text-transform: uppercase; letter-spacing: 0.04em;
}
.pl-profile-row input[type="text"],
.pl-profile-row input[type="email"],
.pl-profile-row input[type="tel"],
.pl-profile-row input[type="url"],
.pl-profile-row select,
.pl-profile-row textarea {
    width: 100%;
    padding: 0.625rem 0.875rem;
    font-family: var(--font-body);
    font-size: 0.9375rem;
    font-weight: 300;
    color: var(--hub-text);
    background-color: var(--hub-input-bg);
    border: 1px solid var(--hub-input-border);
    border-radius: 6px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.pl-profile-row textarea { resize: vertical; min-height: 96px; }

.pl-profile-row input:focus,
.pl-profile-row select:focus,
.pl-profile-row textarea:focus {
    outline: none;
    border-color: var(--color-tuscan-yellow);
    box-shadow: 0 0 0 3px rgba(238, 180, 75, 0.15);
}

.pl-profile-row input:disabled { opacity: 0.5; cursor: not-allowed; }

/* Visibility toggle pill */
.pl-vis-toggle {
    display: inline-flex; align-items: center; gap: 0.3125rem;
    padding: 3px 9px 3px 8px;
    border-radius: 999px;
    border: 1px solid currentColor;
    background: transparent;
    font-size: 0.6875rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.05em;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, opacity 0.15s;
}
.pl-vis-toggle--on { color: #4ade80; background: rgba(74, 222, 128, 0.10); }
.pl-vis-toggle--on:hover { background: rgba(74, 222, 128, 0.18); }
.pl-vis-toggle--off { color: var(--hub-text-muted); background: transparent; }
.pl-vis-toggle--off:hover { background: rgba(255,255,255,0.05); }
.pl-vis-toggle--disabled { opacity: 0.4; cursor: not-allowed; }
[data-theme="light"] .pl-vis-toggle--on { color: #16a34a; background: rgba(22, 163, 74, 0.10); }

/* iOS-style toggle switch — applied to a checkbox <input class="hub-switch-input">.
   Reusable: any boolean form field can render as a switch by adding this class. */
.hub-switch-input {
    appearance: none; -webkit-appearance: none;
    flex: none; position: relative;
    width: 2.5rem; height: 1.375rem;
    border-radius: 999px;
    background: var(--hub-border);
    cursor: pointer;
    transition: background 0.15s ease;
    margin: 0;
}
.hub-switch-input::before {
    content: ""; position: absolute; top: 2px; left: 2px;
    width: 1.125rem; height: 1.125rem;
    border-radius: 50%;
    background: #fff;
    transition: transform 0.15s ease;
}
.hub-switch-input:checked { background: var(--hub-accent, #c46a1b); }
.hub-switch-input:checked::before { transform: translateX(1.125rem); }
.hub-switch-input:focus-visible { outline: 2px solid var(--hub-accent, #c46a1b); outline-offset: 2px; }
.hub-switch-input:disabled { opacity: 0.4; cursor: not-allowed; }

/* Always-shown badge */
.pl-vis-static {
    display: inline-flex; align-items: center; gap: 0.3125rem;
    padding: 3px 9px;
    font-size: 0.625rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.05em;
    color: var(--hub-text-muted);
}

/* Reassurance panel */
.pl-profile-never {
    margin-top: 0.5rem;
    padding: 0.875rem 1rem;
    background: rgba(255,255,255,0.025);
    border: 1px dashed rgba(255,255,255,0.14);
    border-radius: 10px;
}
[data-theme="light"] .pl-profile-never { background: rgba(0,0,0,0.025); border-color: rgba(0,0,0,0.14); }
.pl-profile-never__title {
    display: flex; align-items: center; gap: 0.4375rem;
    margin: 0 0 0.5rem;
    font-size: 0.75rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.05em;
    color: var(--hub-text-muted);
}
.pl-profile-never__list {
    margin: 0; padding-left: 1.25rem;
    font-size: 0.8125rem; color: var(--hub-text-muted);
    line-height: 1.7;
}

/* Live preview */
.pl-profile-preview__sticky { position: sticky; top: 1rem; }
.pl-profile-preview__heading {
    margin: 0 0 0.5rem;
    font-size: 0.6875rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.06em;
    color: var(--hub-text-muted);
}
.pl-profile-preview__card {
    background: var(--hub-card-bg);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    padding: 1.25rem 1rem;
    text-align: center;
    transition: opacity 0.18s;
}
[data-theme="light"] .pl-profile-preview__card { border-color: rgba(0,0,0,0.1); }
.pl-profile-preview__card--hidden {
    border-style: dashed;
    background: transparent;
}
.pl-profile-preview__hidden {
    display: flex; flex-direction: column; align-items: center; gap: 0.5rem;
    color: var(--hub-text-muted);
    padding: 1.5rem 0.5rem;
}
.pl-profile-preview__hidden p { margin: 0; font-size: 0.875rem; }
.pl-profile-preview__hidden-sub { font-size: 0.75rem !important; opacity: 0.7; }
.pl-profile-preview__avatar-wrap {
    display: flex; justify-content: center; margin-bottom: 0.75rem;
}
.pl-profile-preview__avatar {
    width: 84px; height: 84px;
    background: rgba(255,255,255,0.08);
    color: var(--hub-text);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.875rem; font-weight: 700;
}
.pl-profile-preview__avatar--photo { object-fit: cover; background: none; }
.pl-profile-preview__name { font-size: 1rem; font-weight: 700; color: var(--hub-text); }
.pl-profile-preview__meta {
    display: flex; flex-wrap: wrap; justify-content: center; gap: 0.375rem;
    margin: 0.5rem 0;
}
.pl-profile-preview__pill {
    display: inline-block;
    padding: 2px 9px;
    background: var(--color-tuscan-yellow, #EEB44B);
    color: #1a1a2e;
    font-size: 0.6875rem; font-weight: 700;
    border-radius: 999px;
    text-transform: uppercase; letter-spacing: 0.04em;
}
.pl-profile-preview__pill--soft {
    background: rgba(255,255,255,0.08);
    color: var(--hub-text-muted);
}
[data-theme="light"] .pl-profile-preview__pill--soft { background: rgba(0,0,0,0.06); }
.pl-profile-preview__about {
    margin: 0.625rem 0;
    font-size: 0.8125rem; color: var(--hub-text-muted); line-height: 1.5;
    text-align: left;
}
.pl-profile-preview__contact {
    margin-top: 0.75rem;
    display: flex; flex-direction: column; gap: 0.3125rem;
    text-align: left;
}
.pl-profile-preview__contact-row {
    display: flex; gap: 0.5rem; font-size: 0.8125rem;
}
.pl-profile-preview__contact-row > span:first-child {
    flex-shrink: 0; min-width: 56px;
    color: var(--hub-text-muted);
    font-size: 0.6875rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.04em;
    line-height: 1.45;
}
.pl-profile-preview__contact-row > span:last-child {
    color: var(--hub-text); word-break: break-word;
}
.pl-profile-preview__caption {
    margin: 0.5rem 0 0;
    font-size: 0.6875rem; color: var(--hub-text-muted); text-align: center;
}

.pl-profile-actionbar {
    margin-top: 0.5rem;
    display: flex; justify-content: flex-end; gap: 0.5rem;
}

/* ──────────────────────────────────────────────────────────────
   Floating Feedback button (mobile)
   ────────────────────────────────────────────────────────────── */
.hub-feedback-fab {
    display: none;
    position: fixed;
    right: calc(env(safe-area-inset-right, 0px) + 1rem);
    bottom: calc(env(safe-area-inset-bottom, 0px) + 1rem);
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--color-tuscan-yellow, #EEB44B);
    color: #1a1a2e;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.32), 0 2px 4px rgba(0, 0, 0, 0.18);
    z-index: 95;
    text-decoration: none;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.hub-feedback-fab:hover,
.hub-feedback-fab:focus-visible {
    background: #f5ca6e;
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.35), 0 3px 6px rgba(0, 0, 0, 0.2);
    text-decoration: none;
}

.hub-feedback-fab.active {
    background: #1a1a2e;
    color: var(--color-tuscan-yellow, #EEB44B);
}

@media (max-width: 768px) {
    .hub-feedback-fab { display: inline-flex; }
    /* Hide the in-sidebar feedback link on mobile — the FAB replaces it. */
    .hub-sidebar__link--feedback { display: none; }
}

/* ========================================
   Admin table toolkit
   ======================================== */
.admin-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 0.75rem;
}

.admin-filters {
    display: flex;
    gap: 0.375rem;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 0.75rem;
}

.admin-table-wrap {
    border: 1px solid var(--hub-border);
    border-radius: 8px;
    overflow: hidden;
}

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

.admin-table-wrap thead {
    background: rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .admin-table-wrap thead,
html:not(.dark) .admin-table-wrap thead {
    background: rgba(0, 0, 0, 0.03);
}

.admin-table-wrap thead th {
    text-align: left;
    padding: 0.6rem 0.75rem;
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--hub-text-muted);
    border-bottom: 1px solid var(--hub-border);
}

.admin-table-wrap thead th a {
    color: inherit;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.admin-table-wrap thead th a:hover {
    color: var(--hub-text);
    text-decoration: none;
}

.admin-table-wrap tbody td {
    padding: 0.6rem 0.75rem;
    font-size: 0.875rem;
}

.admin-table-wrap tbody tr {
    border-bottom: 1px solid var(--hub-border);
}

/* Zebra striping for readability — subtle, theme-aware. */
.admin-table-wrap tbody tr:nth-child(even) {
    background: rgba(255, 255, 255, 0.025);
}

[data-theme="light"] .admin-table-wrap tbody tr:nth-child(even),
html:not(.dark) .admin-table-wrap tbody tr:nth-child(even) {
    background: rgba(0, 0, 0, 0.025);
}

.admin-table-wrap tbody tr:last-child {
    border-bottom: none;
}

/* Hover wins over stripes — defined last so equal-specificity source order favors it. */
.admin-table-wrap tbody tr:hover {
    background: rgba(238, 180, 75, 0.07);
}

.admin-table-wrap .admin-actions {
    display: flex;
    gap: 0.375rem;
    justify-content: flex-end;
    flex-wrap: nowrap;
    white-space: nowrap;
}

.admin-table-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    border: 1px solid var(--hub-border);
    border-top: none;
    border-radius: 0 0 8px 8px;
    background: var(--hub-card-bg);
    font-size: 0.8rem;
    color: var(--hub-text-muted);
}

.admin-table-footer nav {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* Classes-admin Overview: section titles — accent bar + stronger weight so
   headings read as section headers, not body text. */
.cms-overview .overview-title {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    margin: 0 0 0.9rem;
    padding-left: 0.6rem;
    border-left: 3px solid var(--color-tuscan-yellow, #EEB44B);
    font-weight: 700;
    font-size: 1rem;
    line-height: 1.25;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--hub-text);
}

.cms-overview .overview-title__count {
    color: var(--hub-text-muted);
    font-weight: 600;
    font-size: 0.9em;
}

/* Subordinate heading for a block nested inside an Overview card (e.g. Recent
   sign-ups within "At a glance"). Lighter than .overview-title to signal nesting. */
.cms-overview .overview-subtitle {
    margin: 0;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--hub-text);
}

.pl-bell { position: relative; }
.pl-bell__btn { position: relative; background: none; border: none; color: var(--hub-text); cursor: pointer; padding: 0.4rem; border-radius: 6px; }
.pl-bell__btn:hover { background: rgba(255,255,255,0.06); }
.pl-bell__badge { position: absolute; top: 0; right: 0; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: #ef4444; color: #fff; font-size: 0.625rem; line-height: 16px; text-align: center; font-weight: 700; }
.pl-bell__panel { position: absolute; right: 0; top: calc(100% + 8px); width: 340px; max-height: 420px; overflow-y: auto; background: var(--hub-card-bg); border: 1px solid var(--hub-border); border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,0.3); z-index: 50; }
.pl-bell__header { display: flex; justify-content: space-between; align-items: center; padding: 0.75rem 1rem; border-bottom: 1px solid var(--hub-border); font-weight: 600; }
.pl-bell__mark { background: none; border: none; color: var(--color-tuscan-yellow); cursor: pointer; font-size: 0.8125rem; }
.pl-note { border-bottom: 1px solid var(--hub-border); }
.pl-note__btn { display: flex; flex-direction: column; gap: 0.15rem; width: 100%; text-align: left; background: none; border: none; padding: 0.75rem 1rem; cursor: pointer; color: var(--hub-text); }
.pl-note__btn:hover { background: rgba(255,255,255,0.04); }
.pl-note--unread .pl-note__btn { background: rgba(238,180,75,0.08); }
.pl-note__title { font-weight: 600; font-size: 0.875rem; }
.pl-note__body { font-size: 0.8125rem; color: var(--hub-text-muted); }
.pl-note__time { font-size: 0.6875rem; color: var(--hub-text-muted); }
.pl-note__empty { padding: 1.5rem 1rem; text-align: center; }

/* ── Guild detail page redesign (pl-guild-*) ──────────────────────────── */
.pl-guild-hero { position: relative; min-height: clamp(220px, 32vw, 380px); border-radius: 8px; overflow: hidden; margin-bottom: 1.5rem; display: flex; align-items: flex-end; }
.pl-guild-hero__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pl-guild-hero__overlay { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(9,46,76,0) 0%, rgba(9,46,76,0.85) 100%); }
.pl-guild-hero--noimg { background: linear-gradient(120deg, var(--hub-hero-from) 0%, var(--hub-hero-mid) 46%, var(--hub-hero-to) 100%); }
.pl-guild-hero__content { position: relative; z-index: 1; padding: 1.5rem; color: #F4EFDD; }
.pl-guild-hero__title { font-family: Lato, sans-serif; font-weight: 900; font-size: clamp(1.75rem, 4vw, 2.75rem); margin: 0; color: #F4EFDD; }
[data-theme="light"] .pl-guild-hero--noimg .pl-guild-hero__title { color: var(--hub-text); }
[data-theme="light"] .pl-guild-hero--noimg .pl-guild-hero__lead { color: var(--hub-text-muted); opacity: 1; }
.pl-guild-hero__lead { font-size: 0.9375rem; opacity: 0.9; margin-top: 0.25rem; }
.pl-guild-grid { display: grid; grid-template-columns: 1fr; gap: 1.5rem; }
.pl-guild-grid aside { display: flex; flex-direction: column; gap: 1.5rem; }
@media (min-width: 1024px) { .pl-guild-grid { grid-template-columns: 1fr 340px; } }
.pl-guild-section { padding: 1.25rem 0; border-top: 1px solid var(--hub-border); }
.pl-guild-section:first-child { border-top: none; padding-top: 0; }
.pl-guild-section__h2 { font-family: Lato, sans-serif; font-weight: 700; font-size: 1.375rem; margin: 0 0 0.75rem; }
.pl-guild-video { position: relative; aspect-ratio: 16/9; border-radius: 6px; overflow: hidden; background: #000; }
.pl-guild-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.pl-guild-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 0.5rem; }
.pl-guild-gallery__item { aspect-ratio: 1; border-radius: 6px; overflow: hidden; cursor: pointer; border: none; padding: 0; background: none; }
.pl-guild-gallery__item img { width: 100%; height: 100%; object-fit: cover; }
.pl-guild-lightbox { position: fixed; inset: 0; background: rgba(0,0,0,0.9); display: flex; align-items: center; justify-content: center; z-index: 100; }
.pl-guild-lightbox img { max-width: 90vw; max-height: 90vh; border-radius: 6px; }
.pl-guild-faq__q { font-weight: 600; cursor: pointer; padding: 0.75rem 0; border-top: 1px solid var(--hub-border); }
.pl-guild-faq__a { padding-bottom: 0.75rem; color: var(--hub-text-muted); }
.pl-guild-roster { display: flex; flex-direction: column; gap: 0.5rem; }
.pl-guild-links a { display: block; padding: 0.5rem 0; color: var(--color-tuscan-yellow); }

/* Rendered-Markdown body (guild meeting notes). Theme-tokened — no --surface (not a token). */
.pl-md { color: var(--hub-text); line-height: 1.55; }
.pl-md p { margin: 0 0 0.75rem; }
.pl-md p:last-child { margin-bottom: 0; }
.pl-md h1, .pl-md h2, .pl-md h3, .pl-md h4 { margin: 1rem 0 0.5rem; font-weight: 700; }
.pl-md ul, .pl-md ol { margin: 0 0 0.75rem; padding-left: 1.5rem; }
.pl-md li { margin-bottom: 0.25rem; }
.pl-md a { color: var(--color-tuscan-yellow); text-decoration: underline; }
.pl-md hr { border: 0; border-top: 1px solid var(--hub-border); margin: 1rem 0; }
.pl-md code { background: var(--hub-surface); padding: 0.1rem 0.35rem; border-radius: 4px; font-size: 0.9em; }
.pl-md pre { background: var(--hub-surface); padding: 0.75rem; border-radius: 6px; overflow-x: auto; }
.pl-md pre code { background: none; padding: 0; }
.pl-md blockquote { margin: 0 0 0.75rem; padding: 0.25rem 0 0.25rem 1rem; border-left: 3px solid var(--hub-border-strong); background: var(--hub-surface); color: var(--hub-text-muted); }

/* Orientation slot booking table. Layout lives in classes (not inline) so Alpine's
   x-show — which strips inline `display` when it reveals a row — can't break the columns. */
.pl-orient-slots__head,
.pl-orient-slots__row { display: flex; align-items: center; gap: 1rem; }
.pl-orient-slots__head {
    padding: 0 0 0.4rem;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--hub-text-muted);
}
.pl-orient-slots__row { padding: 0.55rem 0; border-top: 1px solid var(--hub-border); }
.pl-orient-slots__date { flex: 0 0 6rem; font-weight: 500; }
.pl-orient-slots__time { flex: 1; color: var(--hub-text-muted); font-size: 0.9rem; }
.pl-orient-slots__action { flex: 0 0 7rem; text-align: right; }
.pl-orient-slots__action .hub-btn { width: 100%; }
.pl-orient-slots__pager { display: flex; align-items: center; gap: 0.75rem; margin-top: 0.75rem; }

/* ============================================================
   Skills directory — filter bar, chips, commission badge, editor
   ============================================================ */

/* Member directory filters */
.pl-directory-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}
.pl-filter-field { display: flex; flex-direction: column; gap: 0.25rem; }
.pl-filter-label { font-size: 0.75rem; color: var(--hub-text-muted); }
.pl-filter-control {
    background: var(--hub-input-bg);
    color: var(--hub-text);
    border: 1px solid var(--hub-input-border);
    border-radius: 6px;
    padding: 0.45rem 0.75rem;
    font-size: 0.875rem;
}
.pl-filter-control option { background: var(--hub-elevated); color: var(--hub-text); }
.pl-filter-checkbox { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.875rem; color: var(--hub-text); }

/* Skill chips */
.pl-skill-chips { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: 0.6rem; }
.pl-skill-chip {
    display: inline-flex; align-items: center; gap: 0.35rem;
    background: var(--hub-surface); color: var(--hub-text);
    border: 1px solid var(--hub-input-border);
    border-radius: 12px; padding: 2px 10px; font-size: 0.8125rem;
}
.pl-skill-chip__years { color: var(--hub-text-muted); font-size: 0.75rem; }
.pl-skill-chip__pending {
    color: var(--hub-text-muted); font-size: 0.7rem; font-style: italic;
    border: 1px solid var(--hub-input-border); border-radius: 8px; padding: 0 6px;
}

/* Open for commissions */
.pl-commission { margin-top: 0.75rem; }
.pl-commission__badge {
    display: inline-flex; align-items: center;
    background: rgba(238, 180, 75, 0.14); color: var(--color-tuscan-yellow);
    border: 1px solid rgba(238, 180, 75, 0.35);
    border-radius: 12px; padding: 2px 10px; font-size: 0.8125rem; font-weight: 700;
}
.pl-commission__note { margin: 0.4rem 0 0; font-size: 0.85rem; color: var(--hub-text-muted); }

/* Skill editor (profile settings) */
.pl-skill-editor { display: flex; flex-direction: column; gap: 0.85rem; }
.pl-skill-add { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0.5rem; }
.pl-skill-suggest { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0.5rem; }
.pl-skill-chip__remove { margin-left: 0.15rem; }

/* Profile settings — skills & commissions sections */
.pl-profile-section { margin-top: 1.5rem; padding-top: 1.25rem; border-top: 1px solid var(--hub-border); }
.pl-profile-section__title { font-size: 1rem; font-weight: 700; margin: 0 0 0.5rem; }
.pl-commission-note { display: block; margin-top: 0.5rem; }
